From 6e1a96b95f6423b72c0f2910ce53464859477907 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 14 May 2020 17:47:47 +0000 Subject: remove poppler support from TL git-svn-id: svn://tug.org/texlive/trunk@55138 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/ChangeLog | 4 + Build/source/Makefile.in | 3 - Build/source/aclocal.m4 | 1 - Build/source/configure | 120 +- Build/source/doc/ChangeLog | 5 + Build/source/doc/Makefile.in | 3 - Build/source/doc/build-tools.txt | 2 +- Build/source/doc/tlbuild.info | 1287 +- Build/source/doc/tlbuild.texi | 38 +- Build/source/libs/ChangeLog | 6 + Build/source/libs/Makefile.in | 2 - Build/source/libs/README | 8 +- Build/source/libs/aclocal.m4 | 1 - Build/source/libs/configure | 52 +- Build/source/libs/poppler/ChangeLog | 387 - Build/source/libs/poppler/Makefile.am | 147 - Build/source/libs/poppler/Makefile.in | 1705 - Build/source/libs/poppler/TLpatches/ChangeLog | 435 - Build/source/libs/poppler/TLpatches/TL-Changes | 24 - Build/source/libs/poppler/TLpatches/patch-03-time | 23 - Build/source/libs/poppler/ac/poppler.ac | 9 - Build/source/libs/poppler/ac/withenable.ac | 7 - Build/source/libs/poppler/aclocal.m4 | 1179 - Build/source/libs/poppler/config.h.in | 153 - Build/source/libs/poppler/configure | 9278 --- Build/source/libs/poppler/configure.ac | 144 - Build/source/libs/poppler/include/Makefile.am | 14 - Build/source/libs/poppler/include/Makefile.in | 620 - Build/source/libs/poppler/include/fofi/Makefile.am | 12 - Build/source/libs/poppler/include/fofi/Makefile.in | 438 - Build/source/libs/poppler/include/goo/Makefile.am | 12 - Build/source/libs/poppler/include/goo/Makefile.in | 438 - Build/source/libs/poppler/poppler-src/AUTHORS | 5 - .../source/libs/poppler/poppler-src/CMakeLists.txt | 767 - Build/source/libs/poppler/poppler-src/COPYING | 339 - Build/source/libs/poppler/poppler-src/COPYING3 | 674 - Build/source/libs/poppler/poppler-src/ChangeLog | 70401 ------------------- .../libs/poppler/poppler-src/ConfigureChecks.cmake | 56 - Build/source/libs/poppler/poppler-src/INSTALL | 104 - Build/source/libs/poppler/poppler-src/NEWS | 3039 - Build/source/libs/poppler/poppler-src/README | 39 - Build/source/libs/poppler/poppler-src/README-XPDF | 423 - .../libs/poppler/poppler-src/README.contributors | 21 - .../source/libs/poppler/poppler-src/config.h.cmake | 209 - .../libs/poppler/poppler-src/fofi/FoFiBase.cc | 204 - .../libs/poppler/poppler-src/fofi/FoFiBase.h | 72 - .../libs/poppler/poppler-src/fofi/FoFiEncodings.cc | 1008 - .../libs/poppler/poppler-src/fofi/FoFiEncodings.h | 48 - .../poppler/poppler-src/fofi/FoFiIdentifier.cc | 651 - .../libs/poppler/poppler-src/fofi/FoFiIdentifier.h | 42 - .../libs/poppler/poppler-src/fofi/FoFiTrueType.cc | 1863 - .../libs/poppler/poppler-src/fofi/FoFiTrueType.h | 213 - .../libs/poppler/poppler-src/fofi/FoFiType1.cc | 403 - .../libs/poppler/poppler-src/fofi/FoFiType1.h | 62 - .../libs/poppler/poppler-src/fofi/FoFiType1C.cc | 2755 - .../libs/poppler/poppler-src/fofi/FoFiType1C.h | 267 - .../libs/poppler/poppler-src/goo/FixedPoint.cc | 149 - .../libs/poppler/poppler-src/goo/FixedPoint.h | 181 - .../libs/poppler/poppler-src/goo/GooLikely.h | 22 - .../source/libs/poppler/poppler-src/goo/GooList.cc | 136 - .../source/libs/poppler/poppler-src/goo/GooList.h | 120 - .../source/libs/poppler/poppler-src/goo/GooMutex.h | 93 - .../libs/poppler/poppler-src/goo/GooString.cc | 925 - .../libs/poppler/poppler-src/goo/GooString.h | 208 - .../libs/poppler/poppler-src/goo/GooTimer.cc | 95 - .../source/libs/poppler/poppler-src/goo/GooTimer.h | 62 - .../libs/poppler/poppler-src/goo/ImgWriter.cc | 15 - .../libs/poppler/poppler-src/goo/ImgWriter.h | 37 - .../libs/poppler/poppler-src/goo/JpegWriter.cc | 203 - .../libs/poppler/poppler-src/goo/JpegWriter.h | 63 - .../libs/poppler/poppler-src/goo/NetPBMWriter.cc | 84 - .../libs/poppler/poppler-src/goo/NetPBMWriter.h | 52 - .../libs/poppler/poppler-src/goo/PNGWriter.cc | 193 - .../libs/poppler/poppler-src/goo/PNGWriter.h | 62 - .../libs/poppler/poppler-src/goo/TiffWriter.cc | 242 - .../libs/poppler/poppler-src/goo/TiffWriter.h | 61 - Build/source/libs/poppler/poppler-src/goo/gfile.cc | 876 - Build/source/libs/poppler/poppler-src/goo/gfile.h | 221 - Build/source/libs/poppler/poppler-src/goo/glibc.cc | 58 - Build/source/libs/poppler/poppler-src/goo/glibc.h | 38 - .../libs/poppler/poppler-src/goo/glibc_strtok_r.cc | 98 - Build/source/libs/poppler/poppler-src/goo/gmem.cc | 322 - Build/source/libs/poppler/poppler-src/goo/gmem.h | 92 - .../source/libs/poppler/poppler-src/goo/gmempp.cc | 32 - .../source/libs/poppler/poppler-src/goo/grandom.cc | 70 - .../source/libs/poppler/poppler-src/goo/grandom.h | 34 - .../source/libs/poppler/poppler-src/goo/gstrtod.cc | 147 - .../source/libs/poppler/poppler-src/goo/gstrtod.h | 43 - Build/source/libs/poppler/poppler-src/goo/gtypes.h | 52 - Build/source/libs/poppler/poppler-src/gtkdoc.py | 447 - .../libs/poppler/poppler-src/make-glib-api-docs | 66 - .../poppler/poppler-src/poppler-cairo.pc.cmake | 8 - .../libs/poppler/poppler-src/poppler-cpp.pc.cmake | 12 - .../libs/poppler/poppler-src/poppler-glib.pc.cmake | 12 - .../libs/poppler/poppler-src/poppler-qt5.pc.cmake | 12 - .../poppler/poppler-src/poppler-splash.pc.cmake | 8 - .../libs/poppler/poppler-src/poppler.pc.cmake | 10 - .../libs/poppler/poppler-src/poppler/Annot.cc | 6951 -- .../libs/poppler/poppler-src/poppler/Annot.h | 1669 - .../libs/poppler/poppler-src/poppler/Array.cc | 150 - .../libs/poppler/poppler-src/poppler/Array.h | 91 - .../poppler/poppler-src/poppler/BuiltinFont.cc | 65 - .../libs/poppler/poppler-src/poppler/BuiltinFont.h | 73 - .../poppler-src/poppler/BuiltinFontTables.cc | 4284 -- .../poppler-src/poppler/BuiltinFontTables.h | 23 - .../libs/poppler/poppler-src/poppler/CMap.cc | 595 - .../source/libs/poppler/poppler-src/poppler/CMap.h | 151 - .../libs/poppler/poppler-src/poppler/CachedFile.cc | 257 - .../libs/poppler/poppler-src/poppler/CachedFile.h | 153 - .../poppler/poppler-src/poppler/CairoFontEngine.cc | 871 - .../poppler/poppler-src/poppler/CairoFontEngine.h | 133 - .../poppler/poppler-src/poppler/CairoOutputDev.cc | 3573 - .../poppler/poppler-src/poppler/CairoOutputDev.h | 530 - .../poppler/poppler-src/poppler/CairoRescaleBox.cc | 376 - .../poppler/poppler-src/poppler/CairoRescaleBox.h | 65 - .../libs/poppler/poppler-src/poppler/Catalog.cc | 1065 - .../libs/poppler/poppler-src/poppler/Catalog.h | 300 - .../poppler-src/poppler/CharCodeToUnicode.cc | 734 - .../poppler-src/poppler/CharCodeToUnicode.h | 155 - .../libs/poppler/poppler-src/poppler/CharTypes.h | 24 - .../poppler-src/poppler/CompactFontTables.h | 480 - .../poppler/poppler-src/poppler/CurlCachedFile.cc | 99 - .../poppler/poppler-src/poppler/CurlCachedFile.h | 40 - .../poppler-src/poppler/CurlPDFDocBuilder.cc | 50 - .../poppler-src/poppler/CurlPDFDocBuilder.h | 33 - .../libs/poppler/poppler-src/poppler/DCTStream.cc | 265 - .../libs/poppler/poppler-src/poppler/DCTStream.h | 91 - .../libs/poppler/poppler-src/poppler/DateInfo.cc | 150 - .../libs/poppler/poppler-src/poppler/DateInfo.h | 43 - .../libs/poppler/poppler-src/poppler/Decrypt.cc | 1781 - .../libs/poppler/poppler-src/poppler/Decrypt.h | 161 - .../libs/poppler/poppler-src/poppler/Dict.cc | 297 - .../source/libs/poppler/poppler-src/poppler/Dict.h | 119 - .../libs/poppler/poppler-src/poppler/Error.cc | 99 - .../libs/poppler/poppler-src/poppler/Error.h | 60 - .../libs/poppler/poppler-src/poppler/ErrorCodes.h | 52 - .../libs/poppler/poppler-src/poppler/FileSpec.cc | 282 - .../libs/poppler/poppler-src/poppler/FileSpec.h | 84 - .../poppler/poppler-src/poppler/FlateEncoder.cc | 148 - .../poppler/poppler-src/poppler/FlateEncoder.h | 73 - .../poppler/poppler-src/poppler/FlateStream.cc | 144 - .../libs/poppler/poppler-src/poppler/FlateStream.h | 77 - .../poppler-src/poppler/FontEncodingTables.cc | 1824 - .../poppler-src/poppler/FontEncodingTables.h | 20 - .../libs/poppler/poppler-src/poppler/FontInfo.cc | 232 - .../libs/poppler/poppler-src/poppler/FontInfo.h | 105 - .../libs/poppler/poppler-src/poppler/Form.cc | 2003 - .../source/libs/poppler/poppler-src/poppler/Form.h | 634 - .../libs/poppler/poppler-src/poppler/Function.cc | 1758 - .../libs/poppler/poppler-src/poppler/Function.h | 261 - .../source/libs/poppler/poppler-src/poppler/Gfx.cc | 5397 -- .../source/libs/poppler/poppler-src/poppler/Gfx.h | 397 - .../libs/poppler/poppler-src/poppler/GfxFont.cc | 2554 - .../libs/poppler/poppler-src/poppler/GfxFont.h | 470 - .../libs/poppler/poppler-src/poppler/GfxState.cc | 7213 -- .../libs/poppler/poppler-src/poppler/GfxState.h | 1703 - .../poppler/poppler-src/poppler/GfxState_helpers.h | 82 - .../poppler/poppler-src/poppler/GlobalParams.cc | 1607 - .../poppler/poppler-src/poppler/GlobalParams.h | 257 - .../poppler/poppler-src/poppler/GlobalParamsWin.cc | 592 - .../libs/poppler/poppler-src/poppler/Hints.cc | 510 - .../libs/poppler/poppler-src/poppler/Hints.h | 93 - .../poppler-src/poppler/JArithmeticDecoder.cc | 355 - .../poppler-src/poppler/JArithmeticDecoder.h | 129 - .../poppler/poppler-src/poppler/JBIG2Stream.cc | 4314 -- .../libs/poppler/poppler-src/poppler/JBIG2Stream.h | 169 - .../poppler/poppler-src/poppler/JPEG2000Stream.cc | 365 - .../poppler/poppler-src/poppler/JPEG2000Stream.h | 55 - .../libs/poppler/poppler-src/poppler/JPXStream.cc | 3478 - .../libs/poppler/poppler-src/poppler/JPXStream.h | 338 - .../libs/poppler/poppler-src/poppler/Lexer.cc | 644 - .../libs/poppler/poppler-src/poppler/Lexer.h | 112 - .../poppler/poppler-src/poppler/Linearization.cc | 206 - .../poppler/poppler-src/poppler/Linearization.h | 45 - .../libs/poppler/poppler-src/poppler/Link.cc | 984 - .../source/libs/poppler/poppler-src/poppler/Link.h | 561 - .../poppler-src/poppler/LocalPDFDocBuilder.cc | 46 - .../poppler-src/poppler/LocalPDFDocBuilder.h | 32 - .../poppler-src/poppler/MarkedContentOutputDev.cc | 212 - .../poppler-src/poppler/MarkedContentOutputDev.h | 134 - .../libs/poppler/poppler-src/poppler/Movie.cc | 279 - .../libs/poppler/poppler-src/poppler/Movie.h | 113 - .../poppler/poppler-src/poppler/NameToCharCode.cc | 116 - .../poppler/poppler-src/poppler/NameToCharCode.h | 57 - .../poppler-src/poppler/NameToUnicodeTable.h | 4484 -- .../libs/poppler/poppler-src/poppler/Object.cc | 256 - .../libs/poppler/poppler-src/poppler/Object.h | 425 - .../poppler/poppler-src/poppler/OptionalContent.cc | 501 - .../poppler/poppler-src/poppler/OptionalContent.h | 149 - .../libs/poppler/poppler-src/poppler/Outline.cc | 162 - .../libs/poppler/poppler-src/poppler/Outline.h | 97 - .../libs/poppler/poppler-src/poppler/OutputDev.cc | 194 - .../libs/poppler/poppler-src/poppler/OutputDev.h | 378 - .../libs/poppler/poppler-src/poppler/PDFDoc.cc | 2017 - .../libs/poppler/poppler-src/poppler/PDFDoc.h | 394 - .../poppler/poppler-src/poppler/PDFDocBuilder.h | 46 - .../poppler/poppler-src/poppler/PDFDocEncoding.cc | 69 - .../poppler/poppler-src/poppler/PDFDocEncoding.h | 34 - .../poppler/poppler-src/poppler/PDFDocFactory.cc | 73 - .../poppler/poppler-src/poppler/PDFDocFactory.h | 58 - .../poppler/poppler-src/poppler/PSOutputDev.cc | 7607 -- .../libs/poppler/poppler-src/poppler/PSOutputDev.h | 570 - .../poppler/poppler-src/poppler/PSTokenizer.cc | 160 - .../libs/poppler/poppler-src/poppler/PSTokenizer.h | 54 - .../libs/poppler/poppler-src/poppler/Page.cc | 805 - .../source/libs/poppler/poppler-src/poppler/Page.h | 293 - .../poppler/poppler-src/poppler/PageLabelInfo.cc | 220 - .../poppler/poppler-src/poppler/PageLabelInfo.h | 55 - .../poppler/poppler-src/poppler/PageLabelInfo_p.h | 153 - .../poppler/poppler-src/poppler/PageTransition.cc | 139 - .../poppler/poppler-src/poppler/PageTransition.h | 105 - .../libs/poppler/poppler-src/poppler/Parser.cc | 331 - .../libs/poppler/poppler-src/poppler/Parser.h | 86 - .../poppler/poppler-src/poppler/PopplerCache.cc | 156 - .../poppler/poppler-src/poppler/PopplerCache.h | 90 - .../poppler-src/poppler/PreScanOutputDev.cc | 369 - .../poppler/poppler-src/poppler/PreScanOutputDev.h | 182 - .../poppler/poppler-src/poppler/ProfileData.cc | 36 - .../libs/poppler/poppler-src/poppler/ProfileData.h | 36 - .../libs/poppler/poppler-src/poppler/Rendition.cc | 379 - .../libs/poppler/poppler-src/poppler/Rendition.h | 161 - .../poppler/poppler-src/poppler/SecurityHandler.cc | 439 - .../poppler/poppler-src/poppler/SecurityHandler.h | 186 - .../poppler-src/poppler/SignatureHandler.cc | 365 - .../poppler/poppler-src/poppler/SignatureHandler.h | 74 - .../poppler/poppler-src/poppler/SignatureInfo.cc | 150 - .../poppler/poppler-src/poppler/SignatureInfo.h | 85 - .../libs/poppler/poppler-src/poppler/Sound.cc | 133 - .../libs/poppler/poppler-src/poppler/Sound.h | 78 - .../poppler/poppler-src/poppler/SplashOutputDev.cc | 4932 -- .../poppler/poppler-src/poppler/SplashOutputDev.h | 471 - .../poppler/poppler-src/poppler/StdinCachedFile.cc | 47 - .../poppler/poppler-src/poppler/StdinCachedFile.h | 26 - .../poppler-src/poppler/StdinPDFDocBuilder.cc | 40 - .../poppler-src/poppler/StdinPDFDocBuilder.h | 32 - .../poppler/poppler-src/poppler/Stream-CCITT.h | 478 - .../libs/poppler/poppler-src/poppler/Stream.cc | 5512 -- .../libs/poppler/poppler-src/poppler/Stream.h | 1401 - .../poppler/poppler-src/poppler/StructElement.cc | 1347 - .../poppler/poppler-src/poppler/StructElement.h | 313 - .../poppler/poppler-src/poppler/StructTreeRoot.cc | 186 - .../poppler/poppler-src/poppler/StructTreeRoot.h | 92 - .../poppler/poppler-src/poppler/TextOutputDev.cc | 5880 -- .../poppler/poppler-src/poppler/TextOutputDev.h | 912 - .../source/libs/poppler/poppler-src/poppler/UTF.cc | 418 - .../source/libs/poppler/poppler-src/poppler/UTF.h | 82 - .../poppler-src/poppler/UnicodeCClassTables.h | 1827 - .../poppler-src/poppler/UnicodeCompTables.h | 665 - .../poppler-src/poppler/UnicodeDecompTables.h | 8526 --- .../libs/poppler/poppler-src/poppler/UnicodeMap.cc | 364 - .../libs/poppler/poppler-src/poppler/UnicodeMap.h | 143 - .../poppler/poppler-src/poppler/UnicodeMapFuncs.cc | 88 - .../poppler/poppler-src/poppler/UnicodeMapFuncs.h | 29 - .../poppler/poppler-src/poppler/UnicodeMapTables.h | 365 - .../poppler-src/poppler/UnicodeTypeTable.cc | 1238 - .../poppler/poppler-src/poppler/UnicodeTypeTable.h | 49 - .../poppler-src/poppler/ViewerPreferences.cc | 116 - .../poppler-src/poppler/ViewerPreferences.h | 76 - .../libs/poppler/poppler-src/poppler/XRef.cc | 1747 - .../source/libs/poppler/poppler-src/poppler/XRef.h | 303 - .../poppler/poppler-src/poppler/XpdfPluginAPI.cc | 243 - .../poppler/poppler-src/poppler/XpdfPluginAPI.h | 342 - .../poppler-src/poppler/gen-unicode-tables.py | 38 - .../poppler-src/poppler/poppler-config.h.cmake | 162 - .../poppler-src/poppler/poppler-config.h.in | 196 - .../libs/poppler/poppler-src/splash/SplashTypes.h | 201 - Build/source/libs/poppler/version.ac | 12 - Build/source/libs/xpdf/ChangeLog | 4 + Build/source/libs/xpdf/ac/xpdf.ac | 7 +- Build/source/m4/ChangeLog | 8 + Build/source/m4/kpse-pkgs.m4 | 4 +- Build/source/m4/kpse-poppler-flags.m4 | 34 - Build/source/m4/kpse-xpdf-flags.m4 | 48 +- Build/source/texk/Makefile.in | 2 - Build/source/texk/aclocal.m4 | 1 - Build/source/texk/configure | 48 +- Build/source/texk/dvidvi/Makefile.in | 2 +- Build/source/texk/dvidvi/configure | 24 +- Build/source/texk/dviout-util/Makefile.in | 1 - Build/source/texk/dvipdfm-x/Makefile.in | 1 - Build/source/texk/dvipsk/Makefile.in | 1 - Build/source/texk/seetexk/Makefile.in | 2 +- Build/source/texk/seetexk/configure | 24 +- .../source/texk/texlive/linked_scripts/Makefile.in | 4 +- Build/source/texk/web2c/ChangeLog | 7 + Build/source/texk/web2c/Makefile.am | 4 +- Build/source/texk/web2c/Makefile.in | 5 - Build/source/texk/web2c/ac/web2c.ac | 4 +- Build/source/texk/web2c/aclocal.m4 | 1 - Build/source/texk/web2c/configure | 68 +- Build/source/texk/web2c/configure.ac | 7 +- Build/source/texk/web2c/doc/Makefile.in | 4 - Build/source/texk/web2c/lib/Makefile.in | 4 - Build/source/texk/web2c/man/Makefile.in | 4 - Build/source/texk/web2c/omegafonts/Makefile.in | 4 - Build/source/texk/web2c/otps/Makefile.in | 4 - Build/source/texk/web2c/otps/win32/Makefile.in | 4 - Build/source/texk/web2c/pdftexdir/ChangeLog | 19 + .../web2c/pdftexdir/pdftoepdf-poppler0.68.0.cc | 1113 - .../web2c/pdftexdir/pdftoepdf-poppler0.69.0.cc | 1113 - .../web2c/pdftexdir/pdftoepdf-poppler0.70.0.cc | 1113 - .../web2c/pdftexdir/pdftoepdf-poppler0.71.0.cc | 1113 - .../web2c/pdftexdir/pdftoepdf-poppler0.72.0.cc | 1114 - .../web2c/pdftexdir/pdftoepdf-poppler0.75.0.cc | 1113 - .../web2c/pdftexdir/pdftoepdf-poppler0.76.0.cc | 1113 - .../web2c/pdftexdir/pdftoepdf-poppler0.83.0.cc | 1111 - .../web2c/pdftexdir/pdftoepdf-poppler0.86.0.cc | 1110 - .../texk/web2c/pdftexdir/pdftosrc-newpoppler.cc | 208 - .../texk/web2c/pdftexdir/pdftosrc-poppler0.71.0.cc | 207 - .../texk/web2c/pdftexdir/pdftosrc-poppler0.72.0.cc | 208 - .../texk/web2c/pdftexdir/pdftosrc-poppler0.76.0.cc | 206 - .../texk/web2c/pdftexdir/pdftosrc-poppler0.83.0.cc | 205 - Build/source/texk/web2c/window/Makefile.in | 4 - Build/source/utils/Makefile.in | 2 - Build/source/utils/aclocal.m4 | 1 - Build/source/utils/configure | 48 +- 316 files changed, 768 insertions(+), 245676 deletions(-) delete mode 100644 Build/source/libs/poppler/ChangeLog delete mode 100644 Build/source/libs/poppler/Makefile.am delete mode 100644 Build/source/libs/poppler/Makefile.in delete mode 100644 Build/source/libs/poppler/TLpatches/ChangeLog delete mode 100644 Build/source/libs/poppler/TLpatches/TL-Changes delete mode 100644 Build/source/libs/poppler/TLpatches/patch-03-time delete mode 100644 Build/source/libs/poppler/ac/poppler.ac delete mode 100644 Build/source/libs/poppler/ac/withenable.ac delete mode 100644 Build/source/libs/poppler/aclocal.m4 delete mode 100644 Build/source/libs/poppler/config.h.in delete mode 100755 Build/source/libs/poppler/configure delete mode 100644 Build/source/libs/poppler/configure.ac delete mode 100644 Build/source/libs/poppler/include/Makefile.am delete mode 100644 Build/source/libs/poppler/include/Makefile.in delete mode 100644 Build/source/libs/poppler/include/fofi/Makefile.am delete mode 100644 Build/source/libs/poppler/include/fofi/Makefile.in delete mode 100644 Build/source/libs/poppler/include/goo/Makefile.am delete mode 100644 Build/source/libs/poppler/include/goo/Makefile.in delete mode 100644 Build/source/libs/poppler/poppler-src/AUTHORS delete mode 100644 Build/source/libs/poppler/poppler-src/CMakeLists.txt delete mode 100644 Build/source/libs/poppler/poppler-src/COPYING delete mode 100644 Build/source/libs/poppler/poppler-src/COPYING3 delete mode 100644 Build/source/libs/poppler/poppler-src/ChangeLog delete mode 100644 Build/source/libs/poppler/poppler-src/ConfigureChecks.cmake delete mode 100644 Build/source/libs/poppler/poppler-src/INSTALL delete mode 100644 Build/source/libs/poppler/poppler-src/NEWS delete mode 100644 Build/source/libs/poppler/poppler-src/README delete mode 100644 Build/source/libs/poppler/poppler-src/README-XPDF delete mode 100644 Build/source/libs/poppler/poppler-src/README.contributors delete mode 100644 Build/source/libs/poppler/poppler-src/config.h.cmake delete mode 100644 Build/source/libs/poppler/poppler-src/fofi/FoFiBase.cc delete mode 100644 Build/source/libs/poppler/poppler-src/fofi/FoFiBase.h delete mode 100644 Build/source/libs/poppler/poppler-src/fofi/FoFiEncodings.cc delete mode 100644 Build/source/libs/poppler/poppler-src/fofi/FoFiEncodings.h delete mode 100644 Build/source/libs/poppler/poppler-src/fofi/FoFiIdentifier.cc delete mode 100644 Build/source/libs/poppler/poppler-src/fofi/FoFiIdentifier.h delete mode 100644 Build/source/libs/poppler/poppler-src/fofi/FoFiTrueType.cc delete mode 100644 Build/source/libs/poppler/poppler-src/fofi/FoFiTrueType.h delete mode 100644 Build/source/libs/poppler/poppler-src/fofi/FoFiType1.cc delete mode 100644 Build/source/libs/poppler/poppler-src/fofi/FoFiType1.h delete mode 100644 Build/source/libs/poppler/poppler-src/fofi/FoFiType1C.cc delete mode 100644 Build/source/libs/poppler/poppler-src/fofi/FoFiType1C.h delete mode 100644 Build/source/libs/poppler/poppler-src/goo/FixedPoint.cc delete mode 100644 Build/source/libs/poppler/poppler-src/goo/FixedPoint.h delete mode 100644 Build/source/libs/poppler/poppler-src/goo/GooLikely.h delete mode 100644 Build/source/libs/poppler/poppler-src/goo/GooList.cc delete mode 100644 Build/source/libs/poppler/poppler-src/goo/GooList.h delete mode 100644 Build/source/libs/poppler/poppler-src/goo/GooMutex.h delete mode 100644 Build/source/libs/poppler/poppler-src/goo/GooString.cc delete mode 100644 Build/source/libs/poppler/poppler-src/goo/GooString.h delete mode 100644 Build/source/libs/poppler/poppler-src/goo/GooTimer.cc delete mode 100644 Build/source/libs/poppler/poppler-src/goo/GooTimer.h delete mode 100644 Build/source/libs/poppler/poppler-src/goo/ImgWriter.cc delete mode 100644 Build/source/libs/poppler/poppler-src/goo/ImgWriter.h delete mode 100644 Build/source/libs/poppler/poppler-src/goo/JpegWriter.cc delete mode 100644 Build/source/libs/poppler/poppler-src/goo/JpegWriter.h delete mode 100644 Build/source/libs/poppler/poppler-src/goo/NetPBMWriter.cc delete mode 100644 Build/source/libs/poppler/poppler-src/goo/NetPBMWriter.h delete mode 100644 Build/source/libs/poppler/poppler-src/goo/PNGWriter.cc delete mode 100644 Build/source/libs/poppler/poppler-src/goo/PNGWriter.h delete mode 100644 Build/source/libs/poppler/poppler-src/goo/TiffWriter.cc delete mode 100644 Build/source/libs/poppler/poppler-src/goo/TiffWriter.h delete mode 100644 Build/source/libs/poppler/poppler-src/goo/gfile.cc delete mode 100644 Build/source/libs/poppler/poppler-src/goo/gfile.h delete mode 100644 Build/source/libs/poppler/poppler-src/goo/glibc.cc delete mode 100644 Build/source/libs/poppler/poppler-src/goo/glibc.h delete mode 100644 Build/source/libs/poppler/poppler-src/goo/glibc_strtok_r.cc delete mode 100644 Build/source/libs/poppler/poppler-src/goo/gmem.cc delete mode 100644 Build/source/libs/poppler/poppler-src/goo/gmem.h delete mode 100644 Build/source/libs/poppler/poppler-src/goo/gmempp.cc delete mode 100644 Build/source/libs/poppler/poppler-src/goo/grandom.cc delete mode 100644 Build/source/libs/poppler/poppler-src/goo/grandom.h delete mode 100644 Build/source/libs/poppler/poppler-src/goo/gstrtod.cc delete mode 100644 Build/source/libs/poppler/poppler-src/goo/gstrtod.h delete mode 100644 Build/source/libs/poppler/poppler-src/goo/gtypes.h delete mode 100644 Build/source/libs/poppler/poppler-src/gtkdoc.py delete mode 100755 Build/source/libs/poppler/poppler-src/make-glib-api-docs delete mode 100644 Build/source/libs/poppler/poppler-src/poppler-cairo.pc.cmake delete mode 100644 Build/source/libs/poppler/poppler-src/poppler-cpp.pc.cmake delete mode 100644 Build/source/libs/poppler/poppler-src/poppler-glib.pc.cmake delete mode 100644 Build/source/libs/poppler/poppler-src/poppler-qt5.pc.cmake delete mode 100644 Build/source/libs/poppler/poppler-src/poppler-splash.pc.cmake delete mode 100644 Build/source/libs/poppler/poppler-src/poppler.pc.cmake delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/Annot.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/Annot.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/Array.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/Array.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/BuiltinFont.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/BuiltinFont.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/BuiltinFontTables.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/BuiltinFontTables.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/CMap.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/CMap.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/CachedFile.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/CachedFile.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/CairoFontEngine.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/CairoFontEngine.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/CairoOutputDev.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/CairoOutputDev.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/CairoRescaleBox.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/CairoRescaleBox.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/Catalog.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/Catalog.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/CharCodeToUnicode.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/CharCodeToUnicode.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/CharTypes.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/CompactFontTables.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/CurlCachedFile.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/CurlCachedFile.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/CurlPDFDocBuilder.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/CurlPDFDocBuilder.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/DCTStream.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/DCTStream.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/DateInfo.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/DateInfo.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/Decrypt.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/Decrypt.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/Dict.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/Dict.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/Error.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/Error.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/ErrorCodes.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/FileSpec.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/FileSpec.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/FlateEncoder.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/FlateEncoder.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/FlateStream.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/FlateStream.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/FontEncodingTables.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/FontEncodingTables.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/FontInfo.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/FontInfo.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/Form.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/Form.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/Function.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/Function.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/Gfx.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/Gfx.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/GfxFont.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/GfxFont.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/GfxState.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/GfxState.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/GfxState_helpers.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/GlobalParams.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/GlobalParams.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/GlobalParamsWin.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/Hints.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/Hints.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/JArithmeticDecoder.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/JArithmeticDecoder.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/JBIG2Stream.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/JBIG2Stream.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/JPEG2000Stream.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/JPEG2000Stream.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/JPXStream.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/JPXStream.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/Lexer.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/Lexer.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/Linearization.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/Linearization.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/Link.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/Link.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/LocalPDFDocBuilder.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/LocalPDFDocBuilder.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/MarkedContentOutputDev.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/MarkedContentOutputDev.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/Movie.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/Movie.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/NameToCharCode.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/NameToCharCode.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/NameToUnicodeTable.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/Object.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/Object.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/OptionalContent.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/OptionalContent.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/Outline.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/Outline.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/OutputDev.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/OutputDev.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/PDFDoc.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/PDFDoc.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/PDFDocBuilder.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/PDFDocEncoding.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/PDFDocEncoding.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/PDFDocFactory.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/PDFDocFactory.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/PSOutputDev.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/PSOutputDev.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/PSTokenizer.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/PSTokenizer.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/Page.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/Page.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/PageLabelInfo.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/PageLabelInfo.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/PageLabelInfo_p.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/PageTransition.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/PageTransition.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/Parser.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/Parser.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/PopplerCache.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/PopplerCache.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/PreScanOutputDev.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/PreScanOutputDev.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/ProfileData.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/ProfileData.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/Rendition.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/Rendition.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/SecurityHandler.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/SecurityHandler.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/SignatureHandler.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/SignatureHandler.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/SignatureInfo.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/SignatureInfo.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/Sound.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/Sound.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/SplashOutputDev.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/SplashOutputDev.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/StdinCachedFile.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/StdinCachedFile.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/StdinPDFDocBuilder.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/StdinPDFDocBuilder.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/Stream-CCITT.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/Stream.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/Stream.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/StructElement.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/StructElement.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/StructTreeRoot.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/StructTreeRoot.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/TextOutputDev.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/TextOutputDev.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/UTF.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/UTF.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/UnicodeCClassTables.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/UnicodeCompTables.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/UnicodeDecompTables.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/UnicodeMap.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/UnicodeMap.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/UnicodeMapFuncs.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/UnicodeMapFuncs.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/UnicodeMapTables.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/UnicodeTypeTable.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/UnicodeTypeTable.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/ViewerPreferences.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/ViewerPreferences.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/XRef.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/XRef.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/XpdfPluginAPI.cc delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/XpdfPluginAPI.h delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/gen-unicode-tables.py delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/poppler-config.h.cmake delete mode 100644 Build/source/libs/poppler/poppler-src/poppler/poppler-config.h.in delete mode 100644 Build/source/libs/poppler/poppler-src/splash/SplashTypes.h delete mode 100644 Build/source/libs/poppler/version.ac delete mode 100644 Build/source/m4/kpse-poppler-flags.m4 delete mode 100644 Build/source/texk/web2c/pdftexdir/pdftoepdf-poppler0.68.0.cc delete mode 100644 Build/source/texk/web2c/pdftexdir/pdftoepdf-poppler0.69.0.cc delete mode 100644 Build/source/texk/web2c/pdftexdir/pdftoepdf-poppler0.70.0.cc delete mode 100644 Build/source/texk/web2c/pdftexdir/pdftoepdf-poppler0.71.0.cc delete mode 100644 Build/source/texk/web2c/pdftexdir/pdftoepdf-poppler0.72.0.cc delete mode 100644 Build/source/texk/web2c/pdftexdir/pdftoepdf-poppler0.75.0.cc delete mode 100644 Build/source/texk/web2c/pdftexdir/pdftoepdf-poppler0.76.0.cc delete mode 100644 Build/source/texk/web2c/pdftexdir/pdftoepdf-poppler0.83.0.cc delete mode 100644 Build/source/texk/web2c/pdftexdir/pdftoepdf-poppler0.86.0.cc delete mode 100644 Build/source/texk/web2c/pdftexdir/pdftosrc-newpoppler.cc delete mode 100644 Build/source/texk/web2c/pdftexdir/pdftosrc-poppler0.71.0.cc delete mode 100644 Build/source/texk/web2c/pdftexdir/pdftosrc-poppler0.72.0.cc delete mode 100644 Build/source/texk/web2c/pdftexdir/pdftosrc-poppler0.76.0.cc delete mode 100644 Build/source/texk/web2c/pdftexdir/pdftosrc-poppler0.83.0.cc diff --git a/Build/source/ChangeLog b/Build/source/ChangeLog index beed0f6570c..f3a4c2278c5 100644 --- a/Build/source/ChangeLog +++ b/Build/source/ChangeLog @@ -1,3 +1,7 @@ +2020-05-14 Karl Berry + + * reautoconf for removal of poppler support. + 2020-04-10 Karl Berry * version.ac: 2020/dev. diff --git a/Build/source/Makefile.in b/Build/source/Makefile.in index d21e9be5576..4bc4cc11296 100644 --- a/Build/source/Makefile.in +++ b/Build/source/Makefile.in @@ -107,7 +107,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/kpse-cairo-flags.m4 \ $(top_srcdir)/m4/kpse-options.m4 \ $(top_srcdir)/m4/kpse-pixman-flags.m4 \ $(top_srcdir)/m4/kpse-pkgs.m4 \ - $(top_srcdir)/m4/kpse-poppler-flags.m4 \ $(top_srcdir)/m4/kpse-pplib-flags.m4 \ $(top_srcdir)/m4/kpse-ptexenc-flags.m4 \ $(top_srcdir)/m4/kpse-setup.m4 \ @@ -181,7 +180,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/kpse-cairo-flags.m4 \ $(top_srcdir)/libs/graphite2/ac/withenable.ac \ $(top_srcdir)/libs/zziplib/ac/withenable.ac \ $(top_srcdir)/libs/xpdf/ac/withenable.ac \ - $(top_srcdir)/libs/poppler/ac/withenable.ac \ $(top_srcdir)/libs/mpfr/ac/withenable.ac \ $(top_srcdir)/libs/gmp/ac/withenable.ac \ $(top_srcdir)/libs/cairo/ac/withenable.ac \ @@ -207,7 +205,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/kpse-cairo-flags.m4 \ $(top_srcdir)/libs/cairo/ac/cairo.ac \ $(top_srcdir)/libs/gmp/ac/gmp.ac \ $(top_srcdir)/libs/mpfr/ac/mpfr.ac \ - $(top_srcdir)/libs/poppler/ac/poppler.ac \ $(top_srcdir)/libs/xpdf/ac/xpdf.ac \ $(top_srcdir)/libs/zziplib/ac/zziplib.ac \ $(top_srcdir)/libs/graphite2/ac/graphite2.ac \ diff --git a/Build/source/aclocal.m4 b/Build/source/aclocal.m4 index bbdc1d3dad2..16219732a0a 100644 --- a/Build/source/aclocal.m4 +++ b/Build/source/aclocal.m4 @@ -1189,7 +1189,6 @@ m4_include([m4/kpse-mpfr-flags.m4]) m4_include([m4/kpse-options.m4]) m4_include([m4/kpse-pixman-flags.m4]) m4_include([m4/kpse-pkgs.m4]) -m4_include([m4/kpse-poppler-flags.m4]) m4_include([m4/kpse-pplib-flags.m4]) m4_include([m4/kpse-ptexenc-flags.m4]) m4_include([m4/kpse-setup.m4]) diff --git a/Build/source/configure b/Build/source/configure index 272d320e268..05193367e80 100755 --- a/Build/source/configure +++ b/Build/source/configure @@ -903,8 +903,6 @@ with_system_icu with_system_teckit with_system_graphite2 with_system_zziplib -with_system_xpdf -with_system_poppler with_system_mpfr with_mpfr_includes with_mpfr_libdir @@ -1761,10 +1759,6 @@ Optional Packages: (requires pkg-config) --with-system-zziplib use installed zziplib headers and library (requires pkg-config) - --with-system-xpdf use installed poppler headers and library instead of - xpdf library from TL (requires pkg-config) - --with-system-poppler use installed poppler headers and library (requires - pkg-config) --with-system-mpfr use installed mpfr headers and library --with-mpfr-includes=DIR mpfr headers installed in DIR @@ -4827,7 +4821,7 @@ if test "${enable_xetex_synctex+set}" = set; then : fi test "x$enable_web2c:$enable_xetex" = xyes:yes && { - need_poppler=yes + need_pplib=yes need_libpng=yes need_freetype2=yes need_teckit=yes @@ -5989,11 +5983,7 @@ test "x$need_zziplib" = xyes && { ## libs/xpdf/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/xpdf/ ## configure options and TL libraries required for xpdf - -# Check whether --with-system-xpdf was given. -if test "${with_system_xpdf+set}" = set; then : - withval=$with_system_xpdf; -fi +: "kpse_xpdf_options - no-op" if test "x$with_system_xpdf" = x; then if test -f $srcdir/libs/xpdf/configure; then { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`xpdf' headers and library from TL tree" >&5 @@ -6017,50 +6007,6 @@ $as_echo "$as_me: Using \`xpdf' headers and library from TL tree" >&6;} fi fi -## libs/poppler/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/poppler/ -## configure options and TL libraries required for poppler - -# Check whether --with-system-poppler was given. -if test "${with_system_poppler+set}" = set; then : - withval=$with_system_poppler; -fi -if test "x$with_system_poppler" = x; then - if test -f $srcdir/libs/poppler/configure; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`poppler' headers and library from TL tree" >&5 -$as_echo "$as_me: Assuming \`poppler' headers and library from TL tree" >&6;} - with_system_poppler=no - else - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming installed \`poppler' headers and library" >&5 -$as_echo "$as_me: Assuming installed \`poppler' headers and library" >&6;} - with_system_poppler=yes - fi - ac_configure_args="$ac_configure_args '--with-system-poppler=$with_system_poppler'" -elif test "x$with_system_poppler" = xyes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Using installed \`poppler' headers and library" >&5 -$as_echo "$as_me: Using installed \`poppler' headers and library" >&6;} -else - { $as_echo "$as_me:${as_lineno-$LINENO}: Using \`poppler' headers and library from TL tree" >&5 -$as_echo "$as_me: Using \`poppler' headers and library from TL tree" >&6;} - if test "x$with_system_poppler" != xno; then - with_system_poppler=no - ac_configure_args="$ac_configure_args '--without-system-poppler'" - fi -fi -if test "x$with_system_poppler" = xyes; then - if test "x$with_system_zlib" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: -> installed \`zlib' headers and library" >&5 -$as_echo "$as_me: -> installed \`zlib' headers and library" >&6;} - with_system_zlib=yes - ac_configure_args="$ac_configure_args '--with-system-zlib'" - elif test "x$with_system_zlib" != xyes; then - as_fn_error $? "Sorry, \`--with-system-poppler' requires \`--with-system-zlib'" "$LINENO" 5 - fi -fi - -test "x$need_poppler" = xyes && { - need_zlib=yes -} - ## libs/mpfr/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/mpfr/ ## configure options and TL libraries required for mpfr @@ -21536,25 +21482,7 @@ if test "x$with_mpfr_libdir" != x && test "x$with_mpfr_libdir" != xyes; then MPFR_LIBS="-L$with_mpfr_libdir $MPFR_LIBS" fi -if $PKG_CONFIG poppler --atleast-version=0.30; then - POPPLER_INCLUDES=`$PKG_CONFIG poppler --cflags` - POPPLER_LIBS=`$PKG_CONFIG poppler --libs` -elif test "x$need_poppler:$with_system_poppler" = xyes:yes; then - as_fn_error $? "did not find poppler 0.30 or better" "$LINENO" 5 -fi - -POPPLER_VERSION='-DPOPPLER_VERSION=\"'`$PKG_CONFIG poppler --modversion`'\"' -POPPLER_INCLUDES="$POPPLER_VERSION $POPPLER_INCLUDES" - -if $PKG_CONFIG poppler --atleast-version=0.12; then - XPDF_INCLUDES=`$PKG_CONFIG poppler --cflags` - XPDF_LIBS=`$PKG_CONFIG poppler --libs` -elif test "x$need_xpdf:$with_system_xpdf" = xyes:yes; then - as_fn_error $? "did not find poppler 0.12 or better" "$LINENO" 5 -fi - -POPPLER_VERSION='-DPOPPLER_VERSION=\"'`$PKG_CONFIG poppler --modversion`'\"' -XPDF_INCLUDES="$POPPLER_VERSION $XPDF_INCLUDES" +: "kpse_xpdf_system_flags - no-op" if $PKG_CONFIG zziplib --atleast-version=0.12; then ZZIPLIB_INCLUDES=`$PKG_CONFIG zziplib --cflags` @@ -22108,47 +22036,9 @@ rm -f core conftest.err conftest.$ac_objext \ $as_echo "$kpse_res" >&6; } fi -## libs/poppler/ac/poppler.ac: configure.ac fragment for the TeX Live subdirectory libs/poppler/ -## basic check of system poppler -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test "x$need_poppler:$with_system_poppler" = xyes:yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking requested system \`poppler' library" >&5 -$as_echo_n "checking requested system \`poppler' library... " >&6; } - CPPFLAGS="$POPPLER_INCLUDES $CPPFLAGS" - LIBS="$POPPLER_LIBS $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -GfxFont *gfxFont; gfxFont->decRefCnt(); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - syslib_used=yes kpse_res=ok -else - syslib_status=no kpse_res=failed -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kpse_res" >&5 -$as_echo "$kpse_res" >&6; } -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - ## libs/xpdf/ac/xpdf.ac: configure.ac fragment for the TeX Live subdirectory libs/xpdf/ -## basic check of system xpdf (poppler) +## basic check of system xpdf (a.k.a. poppler, no longer supported in +## TL sources) ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' diff --git a/Build/source/doc/ChangeLog b/Build/source/doc/ChangeLog index c29c90130e6..6b1d04520af 100644 --- a/Build/source/doc/ChangeLog +++ b/Build/source/doc/ChangeLog @@ -1,3 +1,8 @@ +2020-05-14 Karl Berry + + * tlbuild.texi: remove poppler references. + * build-tools.txt: bison 3.6.1. + 2020-03-13 Karl Berry * tlbuild.texi: update for 2020. diff --git a/Build/source/doc/Makefile.in b/Build/source/doc/Makefile.in index 813d20d67e9..32510be6407 100644 --- a/Build/source/doc/Makefile.in +++ b/Build/source/doc/Makefile.in @@ -107,7 +107,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/kpse-cairo-flags.m4 \ $(top_srcdir)/m4/kpse-options.m4 \ $(top_srcdir)/m4/kpse-pixman-flags.m4 \ $(top_srcdir)/m4/kpse-pkgs.m4 \ - $(top_srcdir)/m4/kpse-poppler-flags.m4 \ $(top_srcdir)/m4/kpse-pplib-flags.m4 \ $(top_srcdir)/m4/kpse-ptexenc-flags.m4 \ $(top_srcdir)/m4/kpse-setup.m4 \ @@ -181,7 +180,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/kpse-cairo-flags.m4 \ $(top_srcdir)/libs/graphite2/ac/withenable.ac \ $(top_srcdir)/libs/zziplib/ac/withenable.ac \ $(top_srcdir)/libs/xpdf/ac/withenable.ac \ - $(top_srcdir)/libs/poppler/ac/withenable.ac \ $(top_srcdir)/libs/mpfr/ac/withenable.ac \ $(top_srcdir)/libs/gmp/ac/withenable.ac \ $(top_srcdir)/libs/cairo/ac/withenable.ac \ @@ -207,7 +205,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/kpse-cairo-flags.m4 \ $(top_srcdir)/libs/cairo/ac/cairo.ac \ $(top_srcdir)/libs/gmp/ac/gmp.ac \ $(top_srcdir)/libs/mpfr/ac/mpfr.ac \ - $(top_srcdir)/libs/poppler/ac/poppler.ac \ $(top_srcdir)/libs/xpdf/ac/xpdf.ac \ $(top_srcdir)/libs/zziplib/ac/zziplib.ac \ $(top_srcdir)/libs/graphite2/ac/graphite2.ac \ diff --git a/Build/source/doc/build-tools.txt b/Build/source/doc/build-tools.txt index 12c4f4c4eca..44748a7b9b3 100644 --- a/Build/source/doc/build-tools.txt +++ b/Build/source/doc/build-tools.txt @@ -1,6 +1,6 @@ autoconf (GNU Autoconf) 2.69 automake (GNU automake) 1.16.2 -bison (GNU Bison) 3.5.4 +bison (GNU Bison) 3.6.1 flex 2.6.0 ltmain.sh (GNU libtool) 2.4.6 m4 (GNU M4) 1.4.18 diff --git a/Build/source/doc/tlbuild.info b/Build/source/doc/tlbuild.info index ac4b81dbd99..bf6cd3e0d89 100644 --- a/Build/source/doc/tlbuild.info +++ b/Build/source/doc/tlbuild.info @@ -1,4 +1,4 @@ -This is tlbuild.info, produced by makeinfo version 5.1 from +This is tlbuild.info, produced by makeinfo version 6.7 from tlbuild.texi. This file documents the TeX Live build system and more. @@ -167,9 +167,9 @@ notably FreeType; all the TL-maintained directories (and Automake/Autoconf output in general) work with any reasonable 'make'. A C++11 compiler is similarly required because of the third-party -libraries ICU and Poppler; the program 'dvisvgm' also requires C++11. -It is possible to build everything else with older compilers, but you -have to remove the C++11-dependent sources. *Note Build one package::. +library ICU; the program 'dvisvgm' also requires C++11. It is possible +to build everything else with older compilers, but you have to remove +the C++11-dependent sources. *Note Build one package::. A few programs in the tree have additional requirements: @@ -321,8 +321,8 @@ File: tlbuild.info, Node: Build one package, Next: Build one engine, Prev: Bu ===================== To build one package, the basic idea is to use the 'configure' option -'--disable-all-pkgs' (*note '--disable-all-pkgs'::). Then all program -and library modules are configured but none are made. However, the +'--disable-all-pkgs' (*note --disable-all-pkgs::). Then all program and +library modules are configured but none are made. However, the 'Makefile's still contain all build rules and dependencies and can be invoked to build an individual program or library, first building any required libraries. @@ -383,7 +383,7 @@ an older compiler lacking such support, you need to (re)move those source directories; specifying '--disable' for them does not suffice, unfortunately. Specifically, before running 'configure': - rm -rf libs/icu libs/poppler libs/graphite2 texk/dvisvgm + rm -rf libs/icu libs/graphite2 texk/dvisvgm Also, even with '--disable-all-pkgs', dependencies are (currently) checked. For instance, if a (non-MacOSX) system does not have @@ -746,7 +746,7 @@ many extra hassles, so don't do that, tempting as it may be. autoconf (GNU Autoconf) 2.69 automake (GNU automake) 1.16.2 - bison (GNU Bison) 3.5.4 + bison (GNU Bison) 3.6.1 flex 2.6.0 ltmain.sh (GNU libtool) 2.4.6 m4 (GNU M4) 1.4.18 @@ -1037,13 +1037,13 @@ structure and variation. * Menu: -* 'png' library:: 'libs/libpng' -* 'zlib' library:: 'libs/zlib' -* 'freetype' library:: 'libs/freetype2' -* 'kpathsea' library:: 'texk/kpathsea' +* png library:: 'libs/libpng' +* zlib library:: 'libs/zlib' +* freetype library:: 'libs/freetype2' +* kpathsea library:: 'texk/kpathsea'  -File: tlbuild.info, Node: 'png' library, Next: 'zlib' library, Up: Library modules +File: tlbuild.info, Node: png library, Next: zlib library, Up: Library modules 6.4.1 The 'png' library in 'libs/libpng' ---------------------------------------- @@ -1099,7 +1099,7 @@ the 'make' rules to rebuild the library. flags required for the system library.  -File: tlbuild.info, Node: 'zlib' library, Next: 'freetype' library, Prev: 'png' library, Up: Library modules +File: tlbuild.info, Node: zlib library, Next: freetype library, Prev: png library, Up: Library modules 6.4.2 The 'zlib' library in 'libs/zlib' --------------------------------------- @@ -1111,7 +1111,7 @@ supplies the configure option '--with-system-zlib', as well as locations of the 'zlib' headers and/or library.  -File: tlbuild.info, Node: 'freetype' library, Next: 'kpathsea' library, Prev: 'zlib' library, Up: Library modules +File: tlbuild.info, Node: freetype library, Next: kpathsea library, Prev: zlib library, Up: Library modules 6.4.3 The 'freetype' library in 'libs/freetype2' ------------------------------------------------ @@ -1127,7 +1127,7 @@ system provided by upstream (possibly patched). 'freetype-config'.  -File: tlbuild.info, Node: 'kpathsea' library, Prev: 'freetype' library, Up: Library modules +File: tlbuild.info, Node: kpathsea library, Prev: freetype library, Up: Library modules 6.4.4 The 'kpathsea' library in 'texk/kpathsea' ----------------------------------------------- @@ -1165,13 +1165,13 @@ for a few of the programs in TL. * Menu: -* 't1utils' package:: 'utils/t1utils' -* 'xindy' package:: 'utils/xindy' -* 'xdvik' package:: 'texk/xdvik' -* 'asymptote':: 'utils/asymptote' +* t1utils package:: 'utils/t1utils' +* xindy package:: 'utils/xindy' +* xdvik package:: 'texk/xdvik' +* asymptote:: 'utils/asymptote'  -File: tlbuild.info, Node: 't1utils' package, Next: 'xindy' package, Up: Program modules +File: tlbuild.info, Node: t1utils package, Next: xindy package, Up: Program modules 6.5.1 The 't1utils' package in 'utils/t1utils' ---------------------------------------------- @@ -1187,7 +1187,7 @@ specifying the module name without any dependencies, and supplies the configure option '--disable-t1utils'.  -File: tlbuild.info, Node: 'xindy' package, Next: 'xdvik' package, Prev: 't1utils' package, Up: Program modules +File: tlbuild.info, Node: xindy package, Next: xdvik package, Prev: t1utils package, Up: Program modules 6.5.2 The 'xindy' package in 'utils/xindy' ------------------------------------------ @@ -1213,7 +1213,7 @@ built if explicitly enabled by the user with 'configure --enable-xindy' included by 'configure.ac'.  -File: tlbuild.info, Node: 'xdvik' package, Next: 'asymptote', Prev: 'xindy' package, Up: Program modules +File: tlbuild.info, Node: xdvik package, Next: asymptote, Prev: xindy package, Up: Program modules 6.5.3 The 'xdvik' package in 'texk/xdvik' ----------------------------------------- @@ -1238,7 +1238,7 @@ system whereas the auxiliary program 'squeeze/squeeze' has to run on the also seen at the top level.  -File: tlbuild.info, Node: 'asymptote', Prev: 'xdvik' package, Up: Program modules +File: tlbuild.info, Node: asymptote, Prev: xdvik package, Up: Program modules 6.5.4 The subdirectory 'utils/asymptote' ---------------------------------------- @@ -1455,21 +1455,21 @@ Here are the global configure options. * Menu: -* '--disable-native-texlive-build':: -* '--prefix' '--bindir' ...:: -* '--disable-largefile':: -* '--disable-missing':: -* '--enable-compiler-warnings='LEVEL:: -* '--enable-cxx-runtime-hack':: -* '--enable-maintainer-mode':: -* '--enable-multiplatform':: -* '--enable-shared':: -* '--enable-silent-rules':: -* '--without-ln-s':: -* '--without-x':: +* --disable-native-texlive-build:: +* --prefix --bindir ...:: +* --disable-largefile:: +* --disable-missing:: +* --enable-compiler-warnings=LEVEL:: +* --enable-cxx-runtime-hack:: +* --enable-maintainer-mode:: +* --enable-multiplatform:: +* --enable-shared:: +* --enable-silent-rules:: +* --without-ln-s:: +* --without-x::  -File: tlbuild.info, Node: '--disable-native-texlive-build', Next: '--prefix' '--bindir' ..., Up: Global configure options +File: tlbuild.info, Node: --disable-native-texlive-build, Next: --prefix --bindir ..., Up: Global configure options 7.1.1 '--disable-native-texlive-build' -------------------------------------- @@ -1490,7 +1490,7 @@ also be built independently from the TL tree (such as 'utils/xindy' and TL-specific adaptations, such as installation paths.  -File: tlbuild.info, Node: '--prefix' '--bindir' ..., Next: '--disable-largefile', Prev: '--disable-native-texlive-build', Up: Global configure options +File: tlbuild.info, Node: --prefix --bindir ..., Next: --disable-largefile, Prev: --disable-native-texlive-build, Up: Global configure options 7.1.2 '--prefix', '--bindir', ... --------------------------------- @@ -1503,7 +1503,7 @@ set, on the 'make' command line (*note Installation in a temporary location: (automake)Staged Installs.).  -File: tlbuild.info, Node: '--disable-largefile', Next: '--disable-missing', Prev: '--prefix' '--bindir' ..., Up: Global configure options +File: tlbuild.info, Node: --disable-largefile, Next: --disable-missing, Prev: --prefix --bindir ..., Up: Global configure options 7.1.3 '--disable-largefile' --------------------------- @@ -1514,12 +1514,10 @@ of 'DVI' and 'GF' files must always be <2GB, due to the file format specifications. With LFS, there is no fixed limit on the size of PDF files created by -'pdftex' or PostScript files created by 'dvips'. The size of PDF images -included by 'pdftex' or 'luatex' must, however, be <2GB when using -'poppler' version 0.22 or before (even on 64-bit systems with LFS). +'pdftex' or PostScript files created by 'dvips'.  -File: tlbuild.info, Node: '--disable-missing', Next: '--enable-compiler-warnings='LEVEL, Prev: '--disable-largefile', Up: Global configure options +File: tlbuild.info, Node: --disable-missing, Next: --enable-compiler-warnings=LEVEL, Prev: --disable-largefile, Up: Global configure options 7.1.4 '--disable-missing' ------------------------- @@ -1529,7 +1527,7 @@ feature must be disabled, e.g., due to missing libraries. This can help when figuring out a specific (sub)set of modules to enable.  -File: tlbuild.info, Node: '--enable-compiler-warnings='LEVEL, Next: '--enable-cxx-runtime-hack', Prev: '--disable-missing', Up: Global configure options +File: tlbuild.info, Node: --enable-compiler-warnings=LEVEL, Next: --enable-cxx-runtime-hack, Prev: --disable-missing, Up: Global configure options 7.1.5 '--enable-compiler-warnings='LEVEL ---------------------------------------- @@ -1542,7 +1540,7 @@ variables are not consistently used in all library and program modules. At present, these warning flags assume options from the GNU compilers.  -File: tlbuild.info, Node: '--enable-cxx-runtime-hack', Next: '--enable-maintainer-mode', Prev: '--enable-compiler-warnings='LEVEL, Up: Global configure options +File: tlbuild.info, Node: --enable-cxx-runtime-hack, Next: --enable-maintainer-mode, Prev: --enable-compiler-warnings=LEVEL, Up: Global configure options 7.1.6 '--enable-cxx-runtime-hack' --------------------------------- @@ -1552,7 +1550,7 @@ statically link with 'libstdc++', thus improving portability of the resulting binary. *Note Macros for compilers::.  -File: tlbuild.info, Node: '--enable-maintainer-mode', Next: '--enable-multiplatform', Prev: '--enable-cxx-runtime-hack', Up: Global configure options +File: tlbuild.info, Node: --enable-maintainer-mode, Next: --enable-multiplatform, Prev: --enable-cxx-runtime-hack, Up: Global configure options 7.1.7 '--enable-maintainer-mode' -------------------------------- @@ -1564,7 +1562,7 @@ rebuilds infrastructure files as needed. *Note 'missing' and 'AM_MAINTAINER_MODE': (automake)maintainer-mode.  -File: tlbuild.info, Node: '--enable-multiplatform', Next: '--enable-shared', Prev: '--enable-maintainer-mode', Up: Global configure options +File: tlbuild.info, Node: --enable-multiplatform, Next: --enable-shared, Prev: --enable-maintainer-mode, Up: Global configure options 7.1.8 '--enable-multiplatform' ------------------------------ @@ -1577,7 +1575,7 @@ the values for 'bindir' and 'libdir' are automatically propagated to all subdirectories.  -File: tlbuild.info, Node: '--enable-shared', Next: '--enable-silent-rules', Prev: '--enable-multiplatform', Up: Global configure options +File: tlbuild.info, Node: --enable-shared, Next: --enable-silent-rules, Prev: --enable-multiplatform, Up: Global configure options 7.1.9 '--enable-shared' ----------------------- @@ -1587,7 +1585,7 @@ Build shared versions of the TeX-specific libraries such as '--disable-native-texlive-build' must also be specified).  -File: tlbuild.info, Node: '--enable-silent-rules', Next: '--without-ln-s', Prev: '--enable-shared', Up: Global configure options +File: tlbuild.info, Node: --enable-silent-rules, Next: --without-ln-s, Prev: --enable-shared, Up: Global configure options 7.1.10 '--enable-silent-rules' ------------------------------ @@ -1598,7 +1596,7 @@ can specify 'V=1' on the 'make' command line to get more verbosity, or 'V=0' to get less, regardless of this option.  -File: tlbuild.info, Node: '--without-ln-s', Next: '--without-x', Prev: '--enable-silent-rules', Up: Global configure options +File: tlbuild.info, Node: --without-ln-s, Next: --without-x, Prev: --enable-silent-rules, Up: Global configure options 7.1.11 '--without-ln-s' ----------------------- @@ -1608,7 +1606,7 @@ for a Unix-like system. However, 'make install' will not create anything useful, and might fail.  -File: tlbuild.info, Node: '--without-x', Prev: '--without-ln-s', Up: Global configure options +File: tlbuild.info, Node: --without-x, Prev: --without-ln-s, Up: Global configure options 7.1.12 '--without-x' -------------------- @@ -1625,18 +1623,18 @@ Here are (some of) the program-specific 'configure' options. * Menu: -* '--enable-PROG' '--disable-PROG':: -* '--disable-all-pkgs':: -* Configure options for 'texk/web2c':: -* Configure options for 'texk/bibtex-x':: -* Configure options for 'texk/dvipdfm-x':: -* Configure options for 'texk/dvisvgm':: -* Configure options for 'texk/texlive':: -* Configure options for 'texk/xdvik':: -* Configure options for 'utils/xindy':: +* --enable-PROG --disable-PROG:: +* --disable-all-pkgs:: +* Configure options for texk/web2c:: +* Configure options for texk/bibtex-x:: +* Configure options for texk/dvipdfm-x:: +* Configure options for texk/dvisvgm:: +* Configure options for texk/texlive:: +* Configure options for texk/xdvik:: +* Configure options for utils/xindy::  -File: tlbuild.info, Node: '--enable-PROG' '--disable-PROG', Next: '--disable-all-pkgs', Up: Program-specific configure options +File: tlbuild.info, Node: --enable-PROG --disable-PROG, Next: --disable-all-pkgs, Up: Program-specific configure options 7.2.1 '--enable-PROG', '--disable-PROG' --------------------------------------- @@ -1644,7 +1642,7 @@ File: tlbuild.info, Node: '--enable-PROG' '--disable-PROG', Next: '--disable-a Do or do not build and install the program(s) of module 'PROG'.  -File: tlbuild.info, Node: '--disable-all-pkgs', Next: Configure options for 'texk/web2c', Prev: '--enable-PROG' '--disable-PROG', Up: Program-specific configure options +File: tlbuild.info, Node: --disable-all-pkgs, Next: Configure options for texk/web2c, Prev: --enable-PROG --disable-PROG, Up: Program-specific configure options 7.2.2 '--disable-all-pkgs' -------------------------- @@ -1661,7 +1659,7 @@ explicitly disabled or specify 'disable' in their 'ac/withenable.ac' fragment.  -File: tlbuild.info, Node: Configure options for 'texk/web2c', Next: Configure options for 'texk/bibtex-x', Prev: '--disable-all-pkgs', Up: Program-specific configure options +File: tlbuild.info, Node: Configure options for texk/web2c, Next: Configure options for texk/bibtex-x, Prev: --disable-all-pkgs, Up: Program-specific configure options 7.2.3 Configure options for 'texk/web2c' ---------------------------------------- @@ -1728,7 +1726,7 @@ native TeX Live build. Defaults are defined in Do not build the 'SyncTeX' library and tool.  -File: tlbuild.info, Node: Configure options for 'texk/bibtex-x', Next: Configure options for 'texk/dvipdfm-x', Prev: Configure options for 'texk/web2c', Up: Program-specific configure options +File: tlbuild.info, Node: Configure options for texk/bibtex-x, Next: Configure options for texk/dvipdfm-x, Prev: Configure options for texk/web2c, Up: Program-specific configure options 7.2.4 Configure options for 'texk/bibtex-x' ------------------------------------------- @@ -1744,7 +1742,7 @@ Do not build the 'bibtexu' program (building 'bibtexu' requires 'ICU' libraries).  -File: tlbuild.info, Node: Configure options for 'texk/dvipdfm-x', Next: Configure options for 'texk/dvisvgm', Prev: Configure options for 'texk/bibtex-x', Up: Program-specific configure options +File: tlbuild.info, Node: Configure options for texk/dvipdfm-x, Next: Configure options for texk/dvisvgm, Prev: Configure options for texk/bibtex-x, Up: Program-specific configure options 7.2.5 Configure options for 'texk/dvipdfm-x' -------------------------------------------- @@ -1762,7 +1760,7 @@ Do not build the 'dvipdfmx' program or make the 'dvipdfm' symlink. Do not build the 'xdvipdfmx' program.  -File: tlbuild.info, Node: Configure options for 'texk/dvisvgm', Next: Configure options for 'texk/texlive', Prev: Configure options for 'texk/dvipdfm-x', Up: Program-specific configure options +File: tlbuild.info, Node: Configure options for texk/dvisvgm, Next: Configure options for texk/texlive, Prev: Configure options for texk/dvipdfm-x, Up: Program-specific configure options 7.2.6 Configure options for 'texk/dvisvgm' ------------------------------------------ @@ -1782,7 +1780,7 @@ result can crash due to library incompatibilities, e.g., on CentOS 5. Specify non-standard locations of the Ghostscript headers and library.  -File: tlbuild.info, Node: Configure options for 'texk/texlive', Next: Configure options for 'texk/xdvik', Prev: Configure options for 'texk/dvisvgm', Up: Program-specific configure options +File: tlbuild.info, Node: Configure options for texk/texlive, Next: Configure options for texk/xdvik, Prev: Configure options for texk/dvisvgm, Up: Program-specific configure options 7.2.7 Configure options for 'texk/texlive' ------------------------------------------ @@ -1792,7 +1790,7 @@ Do not install the "linked scripts" (*note Linked scripts::), except for the TL scripts required to run 'texlinks'.  -File: tlbuild.info, Node: Configure options for 'texk/xdvik', Next: Configure options for 'utils/xindy', Prev: Configure options for 'texk/texlive', Up: Program-specific configure options +File: tlbuild.info, Node: Configure options for texk/xdvik, Next: Configure options for utils/xindy, Prev: Configure options for texk/texlive, Up: Program-specific configure options 7.2.8 Configure options for 'texk/xdvik' ---------------------------------------- @@ -1809,7 +1807,7 @@ Use XInput 2.1 "smooth scrolling" if available (default: yes, except for a native TL build).  -File: tlbuild.info, Node: Configure options for 'utils/xindy', Prev: Configure options for 'texk/xdvik', Up: Program-specific configure options +File: tlbuild.info, Node: Configure options for utils/xindy, Prev: Configure options for texk/xdvik, Up: Program-specific configure options 7.2.9 Configure options for 'utils/xindy' ----------------------------------------- @@ -1855,11 +1853,10 @@ required system libraries and bails out if tests fail. * Menu: -* Configure options for 'kpathsea':: -* Configure options for system 'poppler':: +* Configure options for kpathsea::  -File: tlbuild.info, Node: Configure options for 'kpathsea', Next: Configure options for system 'poppler', Up: Library-specific configure options +File: tlbuild.info, Node: Configure options for kpathsea, Up: Library-specific configure options 7.3.1 Configure options for 'kpathsea' -------------------------------------- @@ -1883,26 +1880,7 @@ is one of: (TFM file) to generate the specified type of file dynamically. The default can be -overridden by the user in any case (*note 'kpathsea' library::). - - -File: tlbuild.info, Node: Configure options for system 'poppler', Prev: Configure options for 'kpathsea', Up: Library-specific configure options - -7.3.2 Configure options for system 'poppler' --------------------------------------------- - -Building XeTeX requires 'poppler', either from the TL tree or system -headers and library. Building pdfTeX requires either 'xpdf' from the -TeX Live tree or system 'poppler' headers and library. - -'--with-system-poppler' -Use a system version (0.18 or newer) of 'poppler' for LuaTeX (or -LuaJITTeX) and XeTeX, and use 'pkg-config' to obtain the required flags. - -'--with-system-xpdf' -Use a system version (0.12 or newer) of 'poppler' (and 'pkg-config') for -pdfTeX instead of 'xpdf' from the TL tree. *Note -'--disable-largefile'::. +overridden by the user in any case (*note kpathsea library::).  File: tlbuild.info, Node: Variables for configure, Prev: Library-specific configure options, Up: Configure options @@ -5075,11 +5053,11 @@ _pkg_..., and *note option: tlmgr option. actions. * Menu: -* tlmgr Machine-readable 'update' and 'install' output:: -* tlmgr Machine-readable 'option' output:: +* tlmgr Machine-readable update and install output:: +* tlmgr Machine-readable option output::  -File: tlbuild.info, Node: tlmgr Machine-readable 'update' and 'install' output, Next: tlmgr Machine-readable 'option' output, Up: tlmgr MACHINE-READABLE OUTPUT +File: tlbuild.info, Node: tlmgr Machine-readable update and install output, Next: tlmgr Machine-readable option output, Up: tlmgr MACHINE-READABLE OUTPUT B.12.1 Machine-readable 'update' and 'install' output ----------------------------------------------------- @@ -5197,7 +5175,7 @@ _esttot_ The estimated total time.  -File: tlbuild.info, Node: tlmgr Machine-readable 'option' output, Prev: tlmgr Machine-readable 'update' and 'install' output, Up: tlmgr MACHINE-READABLE OUTPUT +File: tlbuild.info, Node: tlmgr Machine-readable option output, Prev: tlmgr Machine-readable update and install output, Up: tlmgr MACHINE-READABLE OUTPUT B.12.2 Machine-readable 'option' output --------------------------------------- @@ -5318,117 +5296,112 @@ Index [index] * Menu: -* --bindir configure option: '--prefix' '--bindir' .... +* --bindir configure option: --prefix --bindir .... (line 6) -* --bindir configure option <1>: '--enable-multiplatform'. +* --bindir configure option <1>: --enable-multiplatform. (line 6) * --build=HOST: Cross configuring. (line 6) * --disable-all-packages: Build one package. (line 6) -* --disable-all-pkgs: '--disable-all-pkgs'. (line 6) -* --disable-bibtex8: Configure options for 'texk/bibtex-x'. +* --disable-all-pkgs: --disable-all-pkgs. (line 6) +* --disable-bibtex8: Configure options for texk/bibtex-x. (line 9) -* --disable-bibtexu: Configure options for 'texk/bibtex-x'. +* --disable-bibtexu: Configure options for texk/bibtex-x. (line 12) -* --disable-dump-share: Configure options for 'texk/web2c'. +* --disable-dump-share: Configure options for texk/web2c. (line 27) -* --disable-dvipdfmx: Configure options for 'texk/dvipdfm-x'. +* --disable-dvipdfmx: Configure options for texk/dvipdfm-x. (line 12) -* --disable-etex-synctex: Configure options for 'texk/web2c'. +* --disable-etex-synctex: Configure options for texk/web2c. (line 59) -* --disable-ipc: Configure options for 'texk/web2c'. +* --disable-ipc: Configure options for texk/web2c. (line 31) -* --disable-largefile: '--disable-largefile'. - (line 6) -* --disable-linked-scripts: Configure options for 'texk/texlive'. +* --disable-largefile: --disable-largefile. (line 6) +* --disable-linked-scripts: Configure options for texk/texlive. (line 6) -* --disable-mf-nowin: Configure options for 'texk/web2c'. +* --disable-mf-nowin: Configure options for texk/web2c. (line 34) -* --disable-missing: '--disable-missing'. (line 6) -* --disable-native-texlive-build: '--disable-native-texlive-build'. +* --disable-missing: --disable-missing. (line 6) +* --disable-native-texlive-build: --disable-native-texlive-build. (line 6) -* --disable-PROG: '--enable-PROG' '--disable-PROG'. +* --disable-PROG: --enable-PROG --disable-PROG. (line 6) -* --disable-synctex: Configure options for 'texk/web2c'. +* --disable-synctex: Configure options for texk/web2c. (line 64) -* --disable-tex: Configure options for 'texk/web2c'. +* --disable-tex: Configure options for texk/web2c. (line 37) -* --disable-web-progs: Configure options for 'texk/web2c'. +* --disable-web-progs: Configure options for texk/web2c. (line 41) -* --disable-xdvipdfmx: Configure options for 'texk/dvipdfm-x'. +* --disable-xdvipdfmx: Configure options for texk/dvipdfm-x. (line 15) -* --enable-*win for Metafont window support: Configure options for 'texk/web2c'. +* --enable-*win for Metafont window support: Configure options for texk/web2c. (line 55) -* --enable-auto-core: Configure options for 'texk/web2c'. +* --enable-auto-core: Configure options for texk/web2c. (line 45) -* --enable-compiler-warnings=LEVEL: '--enable-compiler-warnings='LEVEL. +* --enable-compiler-warnings=LEVEL: --enable-compiler-warnings=LEVEL. (line 6) * --enable-cxx-runtime-hack: Macros for compilers. (line 29) -* --enable-etex: Configure options for 'texk/web2c'. +* --enable-etex: Configure options for texk/web2c. (line 37) -* --enable-libtool-hack: Configure options for 'texk/web2c'. +* --enable-libtool-hack: Configure options for texk/web2c. (line 50) * --enable-maintainer-mode: Build system tools. (line 28) -* --enable-maintainer-mode <1>: '--enable-maintainer-mode'. +* --enable-maintainer-mode <1>: --enable-maintainer-mode. (line 6) * --enable-missing to ignore dependencies: Build one package. (line 71) -* --enable-mktextfm-default: 'kpathsea' library. (line 18) -* --enable-multiplatform: '--enable-multiplatform'. +* --enable-mktextfm-default: kpathsea library. (line 18) +* --enable-multiplatform: --enable-multiplatform. (line 6) -* --enable-PROG: '--enable-PROG' '--disable-PROG'. +* --enable-PROG: --enable-PROG --disable-PROG. (line 6) -* --enable-shared: '--enable-shared'. (line 6) -* --enable-silent-rules: '--enable-silent-rules'. +* --enable-shared: --enable-shared. (line 6) +* --enable-silent-rules: --enable-silent-rules. (line 6) -* --enable-tex-synctex: Configure options for 'texk/web2c'. +* --enable-tex-synctex: Configure options for texk/web2c. (line 59) -* --enable-texlive-build: '--disable-native-texlive-build'. +* --enable-texlive-build: --disable-native-texlive-build. (line 15) -* --enable-xi2-scrolling: Configure options for 'texk/xdvik'. +* --enable-xi2-scrolling: Configure options for texk/xdvik. (line 13) -* --enable-xindy-docs: Configure options for 'utils/xindy'. +* --enable-xindy-docs: Configure options for utils/xindy. (line 10) -* --enable-xindy-rules: Configure options for 'utils/xindy'. +* --enable-xindy-rules: Configure options for utils/xindy. (line 6) * --host=HOST: Cross configuring. (line 6) -* --libdir configure option: '--enable-multiplatform'. +* --libdir configure option: --enable-multiplatform. (line 6) * --no-clean Build option: Build problems. (line 6) -* --prefix configure option: '--prefix' '--bindir' .... +* --prefix configure option: --prefix --bindir .... (line 6) -* --with-banner-add=STR: Configure options for 'texk/web2c'. +* --with-banner-add=STR: Configure options for texk/web2c. (line 6) -* --with-clisp-runtime=FILENAME: Configure options for 'utils/xindy'. +* --with-clisp-runtime=FILENAME: Configure options for utils/xindy. (line 14) -* --with-editor=CMD: Configure options for 'texk/web2c'. +* --with-editor=CMD: Configure options for texk/web2c. (line 11) -* --with-fontconfig-includes=DIR: Configure options for 'texk/web2c'. +* --with-fontconfig-includes=DIR: Configure options for texk/web2c. (line 16) -* --with-fontconfig-libdir=DIR: Configure options for 'texk/web2c'. +* --with-fontconfig-libdir=DIR: Configure options for texk/web2c. (line 16) -* --with-gs=FILENAME: Configure options for 'texk/xdvik'. +* --with-gs=FILENAME: Configure options for texk/xdvik. (line 6) * --with-LIB-includes=DIR, -libdir: Library-specific configure options. (line 16) -* --with-libgs-includes, -libdir: Configure options for 'texk/dvisvgm'. +* --with-libgs-includes, -libdir: Configure options for texk/dvisvgm. (line 17) -* --with-system-kpathsea: 'kpathsea' library. (line 13) +* --with-system-kpathsea: kpathsea library. (line 13) * --with-system-LIB: Adding a new generic library module. (line 34) * --with-system-LIB <1>: Library-specific configure options. (line 9) -* --with-system-libgs: Configure options for 'texk/dvisvgm'. +* --with-system-libgs: Configure options for texk/dvisvgm. (line 6) -* --with-system-poppler: Configure options for system 'poppler'. - (line 11) -* --with-system-xpdf: Configure options for system 'poppler'. - (line 15) -* --with-xdvi-x-toolkit: 'xdvik' package. (line 21) -* --with-xdvi-x-toolkit=KIT: Configure options for 'texk/xdvik'. +* --with-xdvi-x-toolkit: xdvik package. (line 21) +* --with-xdvi-x-toolkit=KIT: Configure options for texk/xdvik. (line 9) -* --without-libgs: Configure options for 'texk/dvisvgm'. +* --without-libgs: Configure options for texk/dvisvgm. (line 12) -* --without-ln-s: '--without-ln-s'. (line 6) -* --without-x: '--without-x'. (line 6) +* --without-ln-s: --without-ln-s. (line 6) +* --without-x: --without-x. (line 6) * -C configure option: Build in parallel. (line 11) * -j make option: Build in parallel. (line 6) * adapting TeX Live for distros: Distro builds. (line 54) @@ -5439,25 +5412,25 @@ Index * adding a new TeX-specific library: Adding a new TeX-specific library module. (line 6) * adding to TeX Live: Extending TeX Live. (line 6) -* 'am/' top-level directory: Top-level directories. +* am/ top-level directory: Top-level directories. (line 14) * ANSI C: Declarations and definitions. (line 6) -* 'ApplicationServices' Mac framework, required by 'xetex': Prerequisites. +* ApplicationServices Mac framework, required by xetex: Prerequisites. (line 31) * asymptote: Linked scripts. (line 23) -* asymptote <1>: 'asymptote'. (line 6) +* asymptote <1>: asymptote. (line 6) * Autoconf: Overview of build system. (line 6) * autoconf macros: Autoconf macros. (line 6) * Automake: Overview of build system. (line 6) * biber: Linked scripts. (line 23) -* bibtex-x: Configure options for 'texk/bibtex-x'. +* bibtex-x: Configure options for texk/bibtex-x. (line 6) -* bibtex8: Configure options for 'texk/bibtex-x'. +* bibtex8: Configure options for texk/bibtex-x. (line 6) -* bibtexu: Configure options for 'texk/bibtex-x'. +* bibtexu: Configure options for texk/bibtex-x. (line 6) * BSD distro: Distro builds. (line 6) * build directory, required: Building. (line 17) @@ -5469,7 +5442,7 @@ Index * Build script: Building. (line 6) * build system, design of: Overview of build system. (line 6) -* 'build-aux/' top-level directory: Top-level directories. +* build-aux/ top-level directory: Top-level directories. (line 30) * BUILDCC, BUILDCFLAGS, ...: Cross configuring. (line 42) * building: Building. (line 6) @@ -5481,8 +5454,8 @@ Index (line 6) * C99, avoided: Declarations and definitions. (line 6) -* cache file, for 'configure': Build in parallel. (line 11) -* cache for 'configure': Build in parallel. (line 6) +* cache file, for configure: Build in parallel. (line 11) +* cache for configure: Build in parallel. (line 6) * callexe.c: Macros for Windows. (line 32) * CC: Variables for configure. (line 10) @@ -5494,43 +5467,41 @@ Index (line 18) * CLISP: Variables for configure. (line 17) -* CLISP <1>: Configure options for 'utils/xindy'. +* CLISP <1>: Configure options for utils/xindy. (line 14) -* 'clisp', required by 'xindy': Prerequisites. (line 35) -* 'Cocoa' Mac framework, required by 'xetex': Prerequisites. (line 31) +* clisp, required by xindy: Prerequisites. (line 35) +* Cocoa Mac framework, required by xetex: Prerequisites. (line 31) * coding conventions: Coding conventions. (line 6) * compilers, C and C++11: Prerequisites. (line 6) * config.guess, config.sub, ...: Top-level directories. (line 30) -* 'configure' options: Configure options. (line 6) -* 'configure' options, for 'bibtex-x': Configure options for 'texk/bibtex-x'. - (line 6) -* 'configure' options, for 'dvipdfm-x': Configure options for 'texk/dvipdfm-x'. +* configure options: Configure options. (line 6) +* configure options, for bibtex-x: Configure options for texk/bibtex-x. (line 6) -* 'configure' options, for 'dvisvgm': Configure options for 'texk/dvisvgm'. +* configure options, for dvipdfm-x: Configure options for texk/dvipdfm-x. (line 6) -* 'configure' options, for 'kpathsea': Configure options for 'kpathsea'. +* configure options, for dvisvgm: Configure options for texk/dvisvgm. (line 6) -* 'configure' options, for system 'poppler': Configure options for system 'poppler'. +* configure options, for kpathsea: Configure options for kpathsea. (line 6) -* 'configure' options, for 'texk/texlive': Configure options for 'texk/texlive'. +* configure options, for texk/texlive: Configure options for texk/texlive. (line 6) -* 'configure' options, for 'web2c': Configure options for 'texk/web2c'. +* configure options, for web2c: Configure options for texk/web2c. (line 6) -* 'configure' options, for 'xdvik': Configure options for 'texk/xdvik'. +* configure options, for xdvik: Configure options for texk/xdvik. (line 6) -* 'configure' options, for 'xindy': Configure options for 'utils/xindy'. +* configure options, for xindy: Configure options for utils/xindy. (line 6) -* 'configure' options, global: Global configure options. +* configure options, global: Global configure options. (line 6) -* 'configure' options, library-specific: Library-specific configure options. +* configure options, library-specific: Library-specific configure options. (line 6) -* 'configure' options, program-specific: Program-specific configure options. +* configure options, program-specific: Program-specific configure options. (line 6) -* 'configure' variables: Variables for configure. +* configure variables: Variables for configure. (line 6) * configuring, for cross compilation: Cross configuring. (line 6) -* 'const': Const. (line 6) +* const: Const. (line 6) * continuous integration: Continuous integration. (line 6) * conventions, coding: Coding conventions. (line 6) @@ -5539,7 +5510,7 @@ Index * cross compilation: Cross compilation. (line 6) * cross compilation configuring: Cross configuring. (line 6) * cross compilation problems: Cross problems. (line 6) -* cross compilation, with host binary: 'xdvik' package. (line 14) +* cross compilation, with host binary: xdvik package. (line 14) * ctangle: Cross problems. (line 26) * CXX: Variables for configure. (line 11) @@ -5549,38 +5520,37 @@ Index * declarations before statements, avoiding: Declarations and definitions. (line 6) * dependencies, with several output files: Build in parallel. (line 6) -* DESTDIR: '--prefix' '--bindir' .... +* DESTDIR: --prefix --bindir .... (line 9) * directories, for installation: Installation directories. (line 6) * directories, top-level: Top-level directories. (line 6) * discards qualifiers warning: Const. (line 30) -* 'dist' and 'distcheck' targets for 'make': Build distribution. - (line 6) +* dist and distcheck targets for make: Build distribution. (line 6) * distribution tarball, making: Build distribution. (line 6) * distro, building for: Distro builds. (line 6) -* dvipdfm-x: Configure options for 'texk/dvipdfm-x'. +* dvipdfm-x: Configure options for texk/dvipdfm-x. (line 6) -* dvipdfmx: Configure options for 'texk/dvipdfm-x'. +* dvipdfmx: Configure options for texk/dvipdfm-x. (line 6) -* dvisvgm: Configure options for 'texk/dvisvgm'. +* dvisvgm: Configure options for texk/dvisvgm. (line 6) * engine, building one: Build one engine. (line 6) -* environment variables, for 'configure': Configure options. (line 16) -* exec_prefix: '--enable-multiplatform'. +* environment variables, for configure: Configure options. (line 16) +* exec_prefix: --enable-multiplatform. (line 6) * extending TeX Live: Extending TeX Live. (line 6) -* 'extern' functions: Declarations and definitions. +* extern functions: Declarations and definitions. (line 41) * failure to build: Build problems. (line 6) * flags, macros for library and header: Macros for library and header flags. (line 6) -* 'fontconfig' library, required by 'xetex': Prerequisites. (line 31) +* fontconfig library, required by xetex: Prerequisites. (line 31) * FreeType: Prerequisites. (line 11) -* 'freetype' cross compiling: Cross problems. (line 13) -* freetype library: 'freetype' library. (line 6) -* freetype-config: 'freetype' library. (line 13) +* freetype cross compiling: Cross problems. (line 13) +* freetype library: freetype library. (line 6) +* freetype-config: freetype library. (line 13) * freetype-config <1>: Variables for configure. (line 24) * FT2_CONFIG: Variables for configure. @@ -5589,14 +5559,14 @@ Index * general setup macros: General setup macros. (line 6) * generic library module, adding: Adding a new generic library module. (line 6) -* Ghostscript location for Xdvik: Configure options for 'texk/xdvik'. +* Ghostscript location for Xdvik: Configure options for texk/xdvik. (line 6) * git-svn: Transfer from Subversion to Github. (line 6) -* global 'configure' options: Global configure options. +* global configure options: Global configure options. (line 6) -* 'gmake', required: Prerequisites. (line 11) -* GNU 'make', required: Prerequisites. (line 11) +* gmake, required: Prerequisites. (line 11) +* GNU make, required: Prerequisites. (line 11) * GNU tools, needed for building: Build system tools. (line 6) * GNU/Linux distro: Distro builds. (line 6) * Gnulib, used for common files: Top-level directories. @@ -5609,23 +5579,23 @@ Index * ICU_CONFIG: Variables for configure. (line 22) * infrastructure, tools needed for: Build system tools. (line 6) -* 'inst/' top-level directory: Top-level directories. +* inst/ top-level directory: Top-level directories. (line 39) * install-tl, TeX Live installer: Installing. (line 8) * installation directories: Installation directories. (line 6) * installing: Installing. (line 6) -* interprocess communication: Configure options for 'texk/web2c'. +* interprocess communication: Configure options for texk/web2c. (line 31) * introduction: Introduction. (line 6) -* iteration through sources, by 'configure' and 'make': Build iteration. +* iteration through sources, by configure and make: Build iteration. (line 6) -* kpathsea library: 'kpathsea' library. (line 6) -* kpathsea.ac: 'kpathsea' library. (line 18) -* kpse-libpng-flags.m4: 'png' library. (line 46) +* kpathsea library: kpathsea library. (line 6) +* kpathsea.ac: kpathsea library. (line 18) +* kpse-libpng-flags.m4: png library. (line 46) * kpse-pkgs.m4: Overview of build system. (line 30) -* kpse-zlib-flags.m4: 'zlib' library. (line 6) +* kpse-zlib-flags.m4: zlib library. (line 6) * kpsewhich: Variables for configure. (line 30) * KPSEWHICH: Variables for configure. @@ -5655,7 +5625,7 @@ Index * KPSE_LARGEFILE: Macros for libraries. (line 8) * KPSE_LIBPNG_FLAGS: Macros for library and header flags. (line 10) -* KPSE_LIBPNG_FLAGS <1>: 'png' library. (line 46) +* KPSE_LIBPNG_FLAGS <1>: png library. (line 46) * kpse_libs_pkgs: Adding a new generic library module. (line 6) * KPSE_LIB_FLAGS: Macros for library and header flags. @@ -5671,10 +5641,10 @@ Index (line 6) * kpse_texlibs_pkgs: Adding a new TeX-specific library module. (line 11) -* KPSE_TRY_LIB: 'png' library. (line 18) +* KPSE_TRY_LIB: png library. (line 18) * KPSE_TRY_LIB <1>: Adding a new generic library module. (line 20) -* KPSE_TRY_LIBXX: 'png' library. (line 31) +* KPSE_TRY_LIBXX: png library. (line 31) * KPSE_TRY_LIBXX <1>: Adding a new generic library module. (line 20) * kpse_utils_pkgs: Adding a new program module. @@ -5684,44 +5654,42 @@ Index (line 11) * KPSE_WITH_TEXLIB: Adding a new TeX-specific library module. (line 14) -* large file support: '--disable-largefile'. - (line 6) +* large file support: --disable-largefile. (line 6) * LATEX: Variables for configure. (line 40) * layout of sources: Layout and infrastructure. (line 6) -* LFS (large file support): '--disable-largefile'. - (line 6) -* libexpat, dependency of 'libfontconfig': Configure options for 'texk/web2c'. +* LFS (large file support): --disable-largefile. (line 6) +* libexpat, dependency of libfontconfig: Configure options for texk/web2c. (line 50) -* libfontconfig, hack for avoiding linking dependencies: Configure options for 'texk/web2c'. +* libfontconfig, hack for avoiding linking dependencies: Configure options for texk/web2c. (line 50) * libfreetype: Variables for configure. (line 24) -* 'libfreetype', and 'const': Const. (line 21) -* libpng library: 'png' library. (line 6) +* libfreetype, and const: Const. (line 21) +* libpng library: png library. (line 6) * library module, generic, adding: Adding a new generic library module. (line 6) * library module, TeX-specific, adding: Adding a new TeX-specific library module. (line 6) * library modules: Library modules. (line 6) -* library-specific 'configure' options: Library-specific configure options. +* library-specific configure options: Library-specific configure options. (line 6) -* 'libsigsegv', required by 'xindy': Prerequisites. (line 35) +* libsigsegv, required by xindy: Prerequisites. (line 35) * libstc++, statically linking: Macros for compilers. (line 29) * Libtool: Overview of build system. (line 6) -* libtool, hack for avoiding excessive linking: Configure options for 'texk/web2c'. +* libtool, hack for avoiding excessive linking: Configure options for texk/web2c. (line 50) -* libXt: Configure options for 'texk/web2c'. +* libXt: Configure options for texk/web2c. (line 22) * linked scripts: Linked scripts. (line 6) * linking C++ libraries statically: Macros for compilers. (line 29) -* lisp.run, lisp.exe: Configure options for 'utils/xindy'. +* lisp.run, lisp.exe: Configure options for utils/xindy. (line 14) -* LittleEndian architectures: Configure options for 'texk/web2c'. +* LittleEndian architectures: Configure options for texk/web2c. (line 27) -* 'm4/' top-level directory: Top-level directories. +* m4/ top-level directory: Top-level directories. (line 14) * macros, for compilers: Macros for compilers. (line 6) * macros, for libraries: Macros for libraries. (line 6) @@ -5733,67 +5701,62 @@ Index * MAKE: Variables for configure. (line 33) * make -t: Build system tools. (line 43) -* 'make' rules, verbose vs. silent: '--enable-silent-rules'. +* make rules, verbose vs. silent: --enable-silent-rules. (line 6) -* mf-nowin: Configure options for 'texk/web2c'. +* mf-nowin: Configure options for texk/web2c. (line 34) -* 'mingw32': Cross configuring. (line 27) +* mingw32: Cross configuring. (line 27) * MINGW32, Automake conditional: Macros for Windows. (line 20) -* mktex.ac: 'kpathsea' library. (line 18) -* mktextfm: 'kpathsea' library. (line 18) +* mktex.ac: kpathsea library. (line 18) +* mktextfm: kpathsea library. (line 18) * modules, for libraries: Library modules. (line 6) * modules, for programs: Program modules. (line 6) -* motif: Configure options for 'texk/xdvik'. +* motif: Configure options for texk/xdvik. (line 9) * native cross compilation: Cross compilation. (line 10) * OBJCXX=OBJC-COMPILER: Build one package. (line 78) * one engine, building: Build one engine. (line 6) * one package, building: Build one package. (line 6) -* OpenGL, required for Asymptote: 'asymptote'. (line 6) +* OpenGL, required for Asymptote: asymptote. (line 6) * operating system distribution, building for: Distro builds. (line 6) * otangle: Cross problems. (line 26) * overall build process: Building. (line 6) * parallel build: Build in parallel. (line 6) * paths, for installation: Installation directories. (line 6) -* PDF files, size of: '--disable-largefile'. - (line 11) +* PDF files, size of: --disable-largefile. (line 11) * PDFLATEX: Variables for configure. (line 41) * PERL: Variables for configure. (line 39) -* 'perl', required by 'web2c', etc.: Prerequisites. (line 23) +* perl, required by web2c, etc.: Prerequisites. (line 23) * PKG_CONFIG: Variables for configure. (line 23) * plain.tex, not in source tree: Installing. (line 8) -* png library: 'png' library. (line 6) -* poppler: Configure options for system 'poppler'. - (line 6) -* PostScript files, size of: '--disable-largefile'. - (line 11) +* png library: png library. (line 6) +* PostScript files, size of: --disable-largefile. (line 11) * Preining, Norbert: Distro builds. (line 54) -* preloaded binaries: Configure options for 'texk/web2c'. +* preloaded binaries: Configure options for texk/web2c. (line 45) * prerequisites for building: Prerequisites. (line 6) * problems with build: Build problems. (line 6) * program module, adding: Adding a new program module. (line 6) * program modules: Program modules. (line 6) -* program-specific 'configure' options: Program-specific configure options. +* program-specific configure options: Program-specific configure options. (line 6) -* proxy build system: 'png' library. (line 36) +* proxy build system: png library. (line 36) * reautoconf: Build system tools. (line 28) * requirements for building: Prerequisites. (line 6) * runscript.exe: Macros for Windows. (line 25) * scripts, linked and not maintained: Linked scripts. (line 6) -* scrolling, smooth: Configure options for 'texk/xdvik'. +* scrolling, smooth: Configure options for texk/xdvik. (line 13) * SED: Variables for configure. (line 34) * setup macros, general: General setup macros. (line 6) * shared libraries, using vs. avoiding: Distro builds. (line 11) -* size of PDF and PS files: '--disable-largefile'. - (line 11) +* size of PDF and PS files: --disable-largefile. (line 11) * size of source tree: Build one package. (line 53) * source code declarations: Declarations and definitions. (line 6) @@ -5801,8 +5764,8 @@ Index * source tree: Layout and infrastructure. (line 6) * squeeze: Cross problems. (line 13) -* squeeze/configure.ac: 'xdvik' package. (line 14) -* 'static' functions: Declarations and definitions. +* squeeze/configure.ac: xdvik package. (line 14) +* static functions: Declarations and definitions. (line 35) * static linking for C++: Macros for compilers. (line 29) * stpcpy: Declarations and definitions. @@ -5810,12 +5773,12 @@ Index * Subversion repository: Build system tools. (line 38) * support files, separate from build: Installing. (line 8) * symlinks, used for scripts: Linked scripts. (line 6) -* synctex: Configure options for 'texk/web2c'. +* synctex: Configure options for texk/web2c. (line 59) -* synctex <1>: Configure options for 'texk/web2c'. +* synctex <1>: Configure options for texk/web2c. (line 64) * system distribution, building for: Distro builds. (line 6) -* t1utils package: 't1utils' package. (line 6) +* t1utils package: t1utils package. (line 6) * tangle: Cross problems. (line 26) * tests, running: Overview of build system. (line 6) @@ -5836,12 +5799,12 @@ Index * use-commit-times, Subversion: Build system tools. (line 38) * variable declarations, in source code: Declarations and definitions. (line 52) -* variables for 'configure': Variables for configure. +* variables for configure: Variables for configure. (line 6) * warning, discards qualifiers: Const. (line 30) * WARNING_C[XX]FLAGS: Macros for compilers. (line 9) * web2c program: Cross problems. (line 13) -* web2c.ac: Configure options for 'texk/web2c'. +* web2c.ac: Configure options for texk/web2c. (line 37) * wget: Linked scripts. (line 23) * WIN32, Automake conditional: Macros for Windows. (line 16) @@ -5850,35 +5813,33 @@ Index * Windows, macros for: Macros for Windows. (line 6) * withenable.ac, for new modules: Adding a new program module. (line 14) -* 'Work/' top-level directory: Top-level directories. +* Work/ top-level directory: Top-level directories. (line 39) * wrapper binary for scripts on Windows: Linked scripts. (line 6) -* wrapper build system: 'freetype' library. (line 6) -* X toolkit: Configure options for 'texk/web2c'. +* wrapper build system: freetype library. (line 6) +* X toolkit: Configure options for texk/web2c. (line 22) * X11 development, required by X clients: Prerequisites. (line 27) -* X11 headers, and 'const': Const. (line 21) -* xasy: 'asymptote'. (line 6) -* xaw: Configure options for 'texk/xdvik'. +* X11 headers, and const: Const. (line 21) +* xasy: asymptote. (line 6) +* xaw: Configure options for texk/xdvik. (line 9) -* xdvik: 'xdvik' package. (line 6) -* xdvik <1>: Configure options for 'texk/xdvik'. +* xdvik: xdvik package. (line 6) +* xdvik <1>: Configure options for texk/xdvik. (line 6) -* xdvipdfmx: Configure options for 'texk/dvipdfm-x'. +* xdvipdfmx: Configure options for texk/dvipdfm-x. (line 6) * xindy: Linked scripts. (line 23) -* xindy <1>: 'xindy' package. (line 6) -* xindy <2>: Configure options for 'utils/xindy'. +* xindy <1>: xindy package. (line 6) +* xindy <2>: Configure options for utils/xindy. (line 6) -* 'xindy' cross compiling requires 'clisp': Cross problems. (line 33) -* XInput: Configure options for 'texk/xdvik'. +* xindy cross compiling requires clisp: Cross problems. (line 33) +* XInput: Configure options for texk/xdvik. (line 13) -* Xlib: Configure options for 'texk/web2c'. +* Xlib: Configure options for texk/web2c. (line 22) -* xpdf as library: Configure options for system 'poppler'. - (line 6) * xz: Linked scripts. (line 23) -* zlib library: 'zlib' library. (line 6) +* zlib library: zlib library. (line 6)  @@ -5887,398 +5848,402 @@ Node: Top1208 Node: Introduction2118 Node: Overview of build system3943 Node: Prerequisites5994 -Node: Building8603 -Node: Build iteration9989 -Node: Build problems11030 -Node: Build in parallel11484 -Node: Build distribution12088 -Node: Build one package12736 -Node: Build one engine16417 -Node: Cross compilation17466 -Node: Cross configuring18746 -Node: Cross problems20423 -Node: Installing22085 -Node: Installation directories23105 -Node: Linked scripts24923 -Node: Distro builds26414 -Node: Layout and infrastructure28790 -Node: Build system tools29621 -Node: Top-level directories31838 -Node: Autoconf macros34074 -Node: General setup macros34836 -Node: Macros for programs35711 -Node: Macros for compilers36512 -Node: Macros for libraries37920 -Node: Macros for library and header flags38346 -Node: Macros for Windows40257 -Node: Library modules41844 -Node: 'png' library42341 -Node: 'zlib' library44693 -Node: 'freetype' library45214 -Node: 'kpathsea' library45916 -Node: Program modules47299 -Node: 't1utils' package47735 -Node: 'xindy' package48284 -Node: 'xdvik' package49404 -Node: 'asymptote'50469 -Node: Extending TeX Live50969 -Node: Adding a new program module51752 -Node: Adding a new generic library module55091 -Node: Adding a new TeX-specific library module57320 -Node: Configure options58018 -Node: Global configure options59399 -Node: '--disable-native-texlive-build'59967 -Node: '--prefix' '--bindir' ...60935 -Node: '--disable-largefile'61483 -Node: '--disable-missing'62192 -Node: '--enable-compiler-warnings='LEVEL62599 -Node: '--enable-cxx-runtime-hack'63261 -Node: '--enable-maintainer-mode'63687 -Node: '--enable-multiplatform'64222 -Node: '--enable-shared'64801 -Node: '--enable-silent-rules'65178 -Node: '--without-ln-s'65636 -Node: '--without-x'65989 -Node: Program-specific configure options66181 -Node: '--enable-PROG' '--disable-PROG'66844 -Node: '--disable-all-pkgs'67123 -Node: Configure options for 'texk/web2c'67914 -Node: Configure options for 'texk/bibtex-x'70458 -Node: Configure options for 'texk/dvipdfm-x'71007 -Node: Configure options for 'texk/dvisvgm'71789 -Node: Configure options for 'texk/texlive'72676 -Node: Configure options for 'texk/xdvik'73103 -Node: Configure options for 'utils/xindy'73730 -Node: Library-specific configure options74624 -Node: Configure options for 'kpathsea'75630 -Node: Configure options for system 'poppler'76385 -Node: Variables for configure77155 -Node: Coding conventions78581 -Node: Declarations and definitions79296 -Node: Const81470 -Node: Continuous integration83334 -Node: Transfer from Subversion to Github83998 -Node: Automatic update of the Git mirror86160 -Node: CI testing on Travis-CI86742 -Node: Releases on Github87451 -Node: install-tl87891 -Node: install-tl NAME88260 -Node: install-tl SYNOPSIS88418 -Node: install-tl DESCRIPTION88676 -Node: install-tl REFERENCES89736 -Node: install-tl OPTIONS90260 -Ref: install-tl *-gui* [[=]_module_]90601 -Ref: install-tl 'text'90809 -Ref: install-tl 'tcl'90929 -Ref: install-tl 'wizard'91271 -Ref: install-tl 'expert'91404 -Ref: install-tl 'perltk'91526 -Ref: install-tl *-no-gui*92072 -Ref: install-tl *-lang* _llcode_92162 -Ref: install-tl *-repository* _url|path_92918 -Ref: install-tl *-select-repository*93806 -Ref: install-tl *-all-options*94242 -Ref: install-tl *-custom-bin* _path_94497 -Ref: install-tl *-debug-translation*95331 -Ref: install-tl *-force-platform* _platform_95550 -Ref: install-tl *-help*, *--help*, *-?*95794 -Ref: install-tl *-in-place*96207 -Ref: install-tl *-init-from-profile* _profile_file_96752 -Ref: install-tl *-logfile* _file_97021 -Ref: install-tl *-no-cls*97372 -Ref: install-tl *-no-persistent-downloads*97520 -Ref: install-tl *-persistent-downloads*97545 -Ref: install-tl *-no-verify-downloads*98163 -Ref: install-tl *-non-admin*98526 -Ref: install-tl *-portable*98619 -Ref: install-tl *-print-platform*98758 -Ref: install-tl *-profile* _profile_file_98956 -Ref: install-tl *-q*99177 -Ref: install-tl *-scheme* _scheme_99239 -Ref: install-tl *-v*99713 -Ref: install-tl *-version*, *--version*99868 -Node: install-tl PROFILES100002 -Ref: install-tl 'instopt_adjustpath' (default 0 on Unix, 1 on Windows)102868 -Ref: install-tl 'instopt_adjustrepo' (default 1)102944 -Ref: install-tl 'instopt_letter' (default 0)103081 -Ref: install-tl 'instopt_portable' (default 0)103172 -Ref: install-tl 'instopt_write18_restricted' (default 1)103268 -Node: install-tl ENVIRONMENT VARIABLES104607 -Ref: install-tl 'TEXLIVE_DOWNLOADER'104985 -Ref: install-tl 'TL_DOWNLOAD_PROGRAM'105008 -Ref: install-tl 'TL_DOWNLOAD_ARGS'105028 -Ref: install-tl 'TEXLIVE_INSTALL_ENV_NOCHECK'105232 -Ref: install-tl 'TEXLIVE_INSTALL_NO_CONTEXT_CACHE'105434 -Ref: install-tl 'TEXLIVE_INSTALL_NO_IMPORT'105543 -Ref: install-tl 'TEXLIVE_INSTALL_NO_WELCOME'105695 -Ref: install-tl 'TEXLIVE_INSTALL_PREFIX'105817 -Ref: install-tl 'TEXLIVE_INSTALL_TEXDIR'105843 -Ref: install-tl 'TEXLIVE_INSTALL_TEXMFCONFIG'105874 -Ref: install-tl 'TEXLIVE_INSTALL_TEXMFVAR'105902 -Ref: install-tl 'TEXLIVE_INSTALL_TEXMFHOME'105931 -Ref: install-tl 'TEXLIVE_INSTALL_TEXMFLOCAL'105961 -Ref: install-tl 'TEXLIVE_INSTALL_TEXMFSYSCONFIG'105995 -Ref: install-tl 'TEXLIVE_INSTALL_TEXMFSYSVAR'106026 -Ref: install-tl 'NOPERLDOC'106397 -Node: install-tl AUTHORS AND COPYRIGHT106461 -Node: tlmgr106874 -Node: tlmgr NAME107359 -Node: tlmgr SYNOPSIS107491 -Node: tlmgr DESCRIPTION107681 -Node: tlmgr EXAMPLES108780 -Ref: tlmgr 'tlmgr option repository ctan'109031 -Ref: tlmgr 'tlmgr option repository http://mirror.ctan.org/systems/texlive/tlnet'109103 -Ref: tlmgr 'tlmgr update --list'109708 -Ref: tlmgr 'tlmgr update --all'109801 -Ref: tlmgr 'tlmgr info' _what_109958 -Node: tlmgr OPTIONS110220 -Ref: tlmgr *--repository* _url|path_110740 -Ref: tlmgr '/some/local/dir'111926 -Ref: tlmgr 'file:/some/local/dir'111955 -Ref: tlmgr 'ctan'112028 -Ref: tlmgr 'http://mirror.ctan.org/systems/texlive/tlnet'112081 -Ref: tlmgr 'http://server/path/to/tlnet'112422 -Ref: tlmgr 'https://server/path/to/tlnet'112803 -Ref: tlmgr 'ftp://server/path/to/tlnet'113271 -Ref: tlmgr 'user@machine:/path/to/tlnet'113403 -Ref: tlmgr 'scp://user@machine/path/to/tlnet'113444 -Ref: tlmgr 'ssh://user@machine/path/to/tlnet'113485 -Ref: tlmgr *--gui* [_action_]113878 -Ref: tlmgr *--gui-lang* _llcode_114691 -Ref: tlmgr *--debug-translation*115427 -Ref: tlmgr *--machine-readable*115630 -Ref: tlmgr *--no-execute-actions*115898 -Ref: tlmgr *--package-logfile* _file_116091 -Ref: tlmgr *--pause*116345 -Ref: tlmgr *--persistent-downloads*116500 -Ref: tlmgr *--no-persistent-downloads*116528 -Ref: tlmgr *--pin-file*117022 -Ref: tlmgr *--usermode*117240 -Ref: tlmgr *--usertree* _dir_117360 -Ref: tlmgr *--verify-repo=[none|main|all]*117486 -Node: tlmgr ACTIONS118385 -Node: tlmgr help119246 -Node: tlmgr version119723 -Node: tlmgr backup119986 -Ref: tlmgr *backup [_option_...] --all*120157 -Ref: tlmgr *backup [_option_...] _pkg_...*120190 -Ref: tlmgr *--backupdir* _directory_121256 -Ref: tlmgr *--all*121473 -Ref: tlmgr *--clean*[=_N_]121725 -Ref: tlmgr *--dry-run*122052 -Node: tlmgr candidates _pkg_122182 -Node: tlmgr check [_option_...] [depends|executes|files|runfiles|texmfdbs|all]122537 -Ref: tlmgr *depends*123051 -Ref: tlmgr *executes*123393 -Ref: tlmgr *files*123508 -Ref: tlmgr *runfiles*123644 -Ref: tlmgr *texmfdbs*123781 -Ref: tlmgr - all items in 'TEXMFDBS' have the '!!' prefix.124011 -Ref: tlmgr - all items in 'TEXMFBDS' have an 'ls-R' file (if they exist at all).124087 -Ref: tlmgr - all items in 'TEXMF' with '!!' are listed in 'TEXMFDBS'.124152 -Ref: tlmgr - all items in 'TEXMF' with an 'ls-R' file are listed in 'TEXMFDBS'.124227 -Ref: tlmgr *--use-svn*124252 -Node: tlmgr conf124393 -Ref: tlmgr *conf [texmf|tlmgr|updmap [--conffile _file_] [--delete] [_key_ [_value_]]]*124681 -Ref: tlmgr *conf auxtrees [--conffile _file_] [show|add|remove] [_value_]*124745 -Node: tlmgr dump-tlpdb [_option_...] [--json]127160 -Ref: tlmgr *--local*127593 -Ref: tlmgr *--remote*127632 -Ref: tlmgr *--json*127670 -Node: tlmgr generate128241 -Ref: tlmgr *generate [_option_...] language*128437 -Ref: tlmgr *generate [_option_...] language.dat*128476 -Ref: tlmgr *generate [_option_...] language.def*128515 -Ref: tlmgr *generate [_option_...] language.dat.lua*128558 -Ref: tlmgr *--dest* _output_file_130885 -Ref: tlmgr *--localcfg* _local_conf_file_131461 -Ref: tlmgr *--rebuild-sys*131584 -Node: tlmgr gui132399 -Node: tlmgr info132577 -Ref: tlmgr *info [_option_...] _pkg_...*132739 -Ref: tlmgr *info [_option_...] collections*132773 -Ref: tlmgr *info [_option_...] schemes*132803 -Ref: tlmgr *--list*134333 -Ref: tlmgr *--only-installed*134647 -Ref: tlmgr *--only-remote*134835 -Ref: tlmgr *--data 'item1,item2,...'*135139 -Ref: tlmgr *--json* 1135720 -Node: tlmgr init-usertree136103 -Node: tlmgr install [_option_...] _pkg_...136484 -Ref: tlmgr *--dry-run* 1136992 -Ref: tlmgr *--file*137109 -Ref: tlmgr *--force*137331 -Ref: tlmgr *--no-depends*137551 -Ref: tlmgr *--no-depends-at-all*137710 -Ref: tlmgr *--reinstall*138110 -Ref: tlmgr *--with-doc*138488 -Ref: tlmgr *--with-src*138501 -Node: tlmgr key139229 -Ref: tlmgr *key list*139387 -Ref: tlmgr *key add _file_*139405 -Ref: tlmgr *key remove _keyid_*139427 -Node: tlmgr list140021 -Node: tlmgr option140183 -Ref: tlmgr *option [--json] [show]*140338 -Ref: tlmgr *option [--json] showall|help*140369 -Ref: tlmgr *option _key_ [_value_]*140395 -Node: tlmgr paper144973 -Ref: tlmgr *paper [a4|letter]*145122 -Ref: tlmgr *<[xdvi|pdftex|dvips|dvipdfmx|context|psutils] paper [_papersize_|--list]*>145198 -Ref: tlmgr *paper --json*145213 -Node: tlmgr path146428 -Ref: tlmgr *path [--w32mode=user|admin] add*146589 -Ref: tlmgr *path [--w32mode=user|admin] remove*146626 -Node: tlmgr pinning148111 -Ref: tlmgr 'pinning show'148352 -Ref: tlmgr 'pinning add' _repo_ _pkgglob_...148425 -Ref: tlmgr 'pinning remove' _repo_ _pkgglob_...148544 -Ref: tlmgr 'pinning remove _repo_ --all'148697 -Node: tlmgr platform148751 -Ref: tlmgr *platform list|add|remove _platform_...*148937 -Ref: tlmgr *platform set _platform_*148964 -Ref: tlmgr *platform set auto*148985 -Ref: tlmgr *--dry-run* 2149862 -Node: tlmgr postaction149981 -Ref: tlmgr *postaction [_option_...] install [shortcut|fileassoc|script] [_pkg_...]*150211 -Ref: tlmgr *postaction [_option_...] remove [shortcut|fileassoc|script] [_pkg_...]*150285 -Ref: tlmgr *--w32mode=[user|admin]*150600 -Ref: tlmgr *--fileassocmode=[1|2]*151016 -Ref: tlmgr *--all* 1151301 -Node: tlmgr print-platform151356 -Node: tlmgr print-platform-info151687 -Node: tlmgr remove [_option_...] _pkg_...151987 -Ref: tlmgr *--all* 2152471 -Ref: tlmgr *--backup*152581 -Ref: tlmgr *--backupdir* _directory_ 1152607 -Ref: tlmgr *--no-depends* 1153012 -Ref: tlmgr *--no-depends-at-all* 1153074 -Ref: tlmgr *--force* 1153177 -Ref: tlmgr *--dry-run* 3153650 -Node: tlmgr repository153986 -Ref: tlmgr *repository list*154174 -Ref: tlmgr *repository list _path|url|tag_*154208 -Ref: tlmgr *repository add _path_ [_tag_]*154241 -Ref: tlmgr *repository remove _path|tag_*154273 -Ref: tlmgr *repository set _path_[#_tag_] [_path_[#_tag_] ...]*154327 -Ref: tlmgr *repository status*154348 -Ref: tlmgr The tag (which can be the same as the url);155575 -Node: tlmgr restore156053 -Ref: tlmgr *restore [_option_...] _pkg_ [_rev_]*156232 -Ref: tlmgr *restore [_option_...] --all*156262 -Ref: tlmgr *--all* 3156962 -Ref: tlmgr *--backupdir* _directory_ 2157176 -Ref: tlmgr *--dry-run* 4157357 -Ref: tlmgr *--force* 2157489 -Ref: tlmgr *--json* 2157535 -Node: tlmgr search157862 -Ref: tlmgr *search [_option_...] _what_*158026 -Ref: tlmgr *search [_option_...] --file _what_*158063 -Ref: tlmgr *search [_option_...] --all _what_*158099 -Ref: tlmgr *--file* 1158319 -Ref: tlmgr *--all* 4158381 -Ref: tlmgr *--global*158470 -Ref: tlmgr *--word*158597 -Node: tlmgr shell158912 -Ref: tlmgr protocol159647 -Ref: tlmgr help 1159711 -Ref: tlmgr version 1159764 -Ref: tlmgr quit, end, bye, byebye, EOF159832 -Ref: tlmgr restart159853 -Ref: tlmgr load [local|remote]159976 -Ref: tlmgr save160046 -Ref: tlmgr get [_var_] =item set [_var_ [_val_]]160169 -Node: tlmgr show160770 -Node: tlmgr uninstall160937 -Node: tlmgr update [_option_...] [_pkg_...]161167 -Ref: tlmgr *--all* 5161538 -Ref: tlmgr *--self*163717 -Ref: tlmgr *--dry-run* 5164481 -Ref: tlmgr *--list* [_pkg_]164658 -Ref: tlmgr *--exclude* _pkg_165347 -Ref: tlmgr *--no-auto-remove* [_pkg_...]166147 -Ref: tlmgr *--no-auto-install* [_pkg_...]166631 -Ref: tlmgr *--reinstall-forcibly-removed*167393 -Ref: tlmgr *--backup* 1167928 -Ref: tlmgr *--backupdir* _directory_ 3167954 -Ref: tlmgr *--no-depends* 2169120 -Ref: tlmgr *--no-depends-at-all* 2169323 -Ref: tlmgr *--force* 3169426 -Node: tlmgr CONFIGURATION FILE FOR TLMGR170446 -Ref: tlmgr 'auto-remove', value 0 or 1 (default 1), same as command-line option.171453 -Ref: tlmgr 'gui-expertmode', value 0 or 1 (default 1). This switches between the full GUI and a simplified GUI with only the most common settings.171590 -Ref: tlmgr 'gui-lang' _llcode_, with a language code value as with the command-line option.171672 -Ref: tlmgr 'no-checksums', value 0 or 1 (default 0, see below).171726 -Ref: tlmgr 'persistent-downloads', value 0 or 1 (default 1), same as command-line option.171806 -Ref: tlmgr 'require-verification', value 0 or 1 (default 0), same as command-line option.171886 -Ref: tlmgr 'update-exclude', value: comma-separated list of packages (no space allowed). Same as the command line option '--exclude' for the action 'update'.172034 -Ref: tlmgr 'verify-downloads', value 0 or 1 (default 1), same as command-line option.172110 -Ref: tlmgr 'allowed-actions' _action1_ [,_action_,...] The value is a comma-separated list of 'tlmgr' actions which are allowed to be executed when 'tlmgr' is invoked in system mode (that is, without '--usermode').172379 -Node: tlmgr CRYPTOGRAPHIC VERIFICATION173467 -Node: tlmgr Configuration of GnuPG invocation175640 -Node: tlmgr USER MODE176278 -Node: tlmgr User mode install179124 -Node: tlmgr User mode backup, restore, remove, update180268 -Node: tlmgr User mode generate, option, paper180710 -Node: tlmgr MULTIPLE REPOSITORIES181086 -Node: tlmgr Pinning182815 -Node: tlmgr GUI FOR TLMGR184738 -Node: tlmgr Main display186387 -Node: tlmgr Display configuration area186639 -Ref: tlmgr Status187000 -Ref: tlmgr Category187164 -Ref: tlmgr Match187350 -Ref: tlmgr Selection187531 -Ref: tlmgr Display configuration buttons187735 -Node: tlmgr Package list area187918 -Ref: tlmgr a checkbox188502 -Ref: tlmgr package name188638 -Ref: tlmgr local revision (and version)188737 -Ref: tlmgr remote revision (and version)189112 -Ref: tlmgr short description189409 -Node: tlmgr Main display action buttons189454 -Ref: tlmgr Update all installed189720 -Ref: tlmgr Update190092 -Ref: tlmgr Install190142 -Ref: tlmgr Remove190328 -Ref: tlmgr Backup190506 -Node: tlmgr Menu bar190663 -Ref: tlmgr 'tlmgr' menu190886 -Ref: tlmgr 'Options menu'191194 -Ref: tlmgr 'Actions menu'192277 -Ref: tlmgr 'Help menu'192705 -Node: tlmgr GUI options192839 -Ref: tlmgr '-background' _color_193085 -Ref: tlmgr '-font "' _fontname_ _fontsize_ '"'193150 -Ref: tlmgr '-foreground' _color_193308 -Ref: tlmgr '-geometry' _geomspec_193360 -Ref: tlmgr '-xrm' _xresource_193552 -Node: tlmgr MACHINE-READABLE OUTPUT193821 -Node: tlmgr Machine-readable 'update' and 'install' output194637 -Ref: tlmgr 'location-url' _location_195919 -Ref: tlmgr 'total-bytes' _count_196135 -Ref: tlmgr _pkgname_196545 -Ref: tlmgr _status_196755 -Ref: tlmgr 'd'196833 -Ref: tlmgr 'f'196893 -Ref: tlmgr 'u'197072 -Ref: tlmgr 'r'197118 -Ref: tlmgr 'a'197241 -Ref: tlmgr 'i'197419 -Ref: tlmgr 'I'197538 -Ref: tlmgr _localrev_197640 -Ref: tlmgr _serverrev_197747 -Ref: tlmgr _size_197859 -Ref: tlmgr _runtime_198028 -Ref: tlmgr _esttot_198098 -Node: tlmgr Machine-readable 'option' output198131 -Node: tlmgr ENVIRONMENT VARIABLES198649 -Ref: tlmgr 'TEXLIVE_COMPRESSOR'199160 -Ref: tlmgr 'TEXLIVE_DOWNLOADER'200008 -Ref: tlmgr 'TL_DOWNLOAD_PROGRAM'200031 -Ref: tlmgr 'TL_DOWNLOAD_ARGS'200051 -Ref: tlmgr 'TEXLIVE_PREFER_OWN'201077 -Node: tlmgr AUTHORS AND COPYRIGHT201901 -Node: Index202299 +Node: Building8590 +Node: Build iteration9976 +Node: Build problems11017 +Node: Build in parallel11471 +Node: Build distribution12075 +Node: Build one package12723 +Node: Build one engine16389 +Node: Cross compilation17438 +Node: Cross configuring18718 +Node: Cross problems20395 +Node: Installing22057 +Node: Installation directories23077 +Node: Linked scripts24895 +Node: Distro builds26386 +Node: Layout and infrastructure28762 +Node: Build system tools29593 +Node: Top-level directories31810 +Node: Autoconf macros34046 +Node: General setup macros34808 +Node: Macros for programs35683 +Node: Macros for compilers36484 +Node: Macros for libraries37892 +Node: Macros for library and header flags38318 +Node: Macros for Windows40229 +Node: Library modules41816 +Node: png library42305 +Node: zlib library44653 +Node: freetype library45168 +Node: kpathsea library45864 +Node: Program modules47243 +Node: t1utils package47671 +Node: xindy package48216 +Node: xdvik package49330 +Node: asymptote50389 +Node: Extending TeX Live50885 +Node: Adding a new program module51668 +Node: Adding a new generic library module55007 +Node: Adding a new TeX-specific library module57236 +Node: Configure options57934 +Node: Global configure options59315 +Node: --disable-native-texlive-build59857 +Node: --prefix --bindir ...60819 +Node: --disable-largefile61359 +Node: --disable-missing61901 +Node: --enable-compiler-warnings=LEVEL62302 +Node: --enable-cxx-runtime-hack62958 +Node: --enable-maintainer-mode63378 +Node: --enable-multiplatform63907 +Node: --enable-shared64480 +Node: --enable-silent-rules64851 +Node: --without-ln-s65303 +Node: --without-x65650 +Node: Program-specific configure options65838 +Node: --enable-PROG --disable-PROG66481 +Node: --disable-all-pkgs66754 +Node: Configure options for texk/web2c67537 +Node: Configure options for texk/bibtex-x70075 +Node: Configure options for texk/dvipdfm-x70618 +Node: Configure options for texk/dvisvgm71394 +Node: Configure options for texk/texlive72275 +Node: Configure options for texk/xdvik72696 +Node: Configure options for utils/xindy73317 +Node: Library-specific configure options74207 +Node: Configure options for kpathsea75168 +Node: Variables for configure75872 +Node: Coding conventions77298 +Node: Declarations and definitions78013 +Node: Const80187 +Node: Continuous integration82051 +Node: Transfer from Subversion to Github82715 +Node: Automatic update of the Git mirror84877 +Node: CI testing on Travis-CI85459 +Node: Releases on Github86168 +Node: install-tl86608 +Node: install-tl NAME86977 +Node: install-tl SYNOPSIS87135 +Node: install-tl DESCRIPTION87393 +Node: install-tl REFERENCES88453 +Node: install-tl OPTIONS88977 +Ref: install-tl *-gui* [[=]_module_]89318 +Ref: install-tl text89526 +Ref: install-tl tcl89646 +Ref: install-tl wizard89988 +Ref: install-tl expert90121 +Ref: install-tl perltk90243 +Ref: install-tl *-no-gui*90789 +Ref: install-tl *-lang* _llcode_90879 +Ref: install-tl *-repository* _url|path_91635 +Ref: install-tl *-select-repository*92523 +Ref: install-tl *-all-options*92959 +Ref: install-tl *-custom-bin* _path_93214 +Ref: install-tl *-debug-translation*94048 +Ref: install-tl *-force-platform* _platform_94267 +Ref: install-tl *-help*, *--help*, *-?*94511 +Ref: install-tl *-in-place*94924 +Ref: install-tl *-init-from-profile* _profile_file_95469 +Ref: install-tl *-logfile* _file_95738 +Ref: install-tl *-no-cls*96089 +Ref: install-tl *-no-persistent-downloads*96237 +Ref: install-tl *-persistent-downloads*96262 +Ref: install-tl *-no-verify-downloads*96880 +Ref: install-tl *-non-admin*97243 +Ref: install-tl *-portable*97336 +Ref: install-tl *-print-platform*97475 +Ref: install-tl *-profile* _profile_file_97673 +Ref: install-tl *-q*97894 +Ref: install-tl *-scheme* _scheme_97956 +Ref: install-tl *-v*98430 +Ref: install-tl *-version*, *--version*98585 +Node: install-tl PROFILES98719 +Ref: install-tl instopt_adjustpath (default 0 on Unix, 1 on Windows)101585 +Ref: install-tl instopt_adjustrepo (default 1)101661 +Ref: install-tl instopt_letter (default 0)101798 +Ref: install-tl instopt_portable (default 0)101889 +Ref: install-tl instopt_write18_restricted (default 1)101985 +Node: install-tl ENVIRONMENT VARIABLES103324 +Ref: install-tl TEXLIVE_DOWNLOADER103702 +Ref: install-tl TL_DOWNLOAD_PROGRAM103725 +Ref: install-tl TL_DOWNLOAD_ARGS103745 +Ref: install-tl TEXLIVE_INSTALL_ENV_NOCHECK103949 +Ref: install-tl TEXLIVE_INSTALL_NO_CONTEXT_CACHE104151 +Ref: install-tl TEXLIVE_INSTALL_NO_IMPORT104260 +Ref: install-tl TEXLIVE_INSTALL_NO_WELCOME104412 +Ref: install-tl TEXLIVE_INSTALL_PREFIX104534 +Ref: install-tl TEXLIVE_INSTALL_TEXDIR104560 +Ref: install-tl TEXLIVE_INSTALL_TEXMFCONFIG104591 +Ref: install-tl TEXLIVE_INSTALL_TEXMFVAR104619 +Ref: install-tl TEXLIVE_INSTALL_TEXMFHOME104648 +Ref: install-tl TEXLIVE_INSTALL_TEXMFLOCAL104678 +Ref: install-tl TEXLIVE_INSTALL_TEXMFSYSCONFIG104712 +Ref: install-tl TEXLIVE_INSTALL_TEXMFSYSVAR104743 +Ref: install-tl NOPERLDOC105114 +Node: install-tl AUTHORS AND COPYRIGHT105178 +Node: tlmgr105591 +Node: tlmgr NAME106076 +Node: tlmgr SYNOPSIS106208 +Node: tlmgr DESCRIPTION106398 +Node: tlmgr EXAMPLES107497 +Ref: tlmgr tlmgr option repository ctan107748 +Ref: tlmgr tlmgr option repository http://mirror.ctan.org/systems/texlive/tlnet107820 +Ref: tlmgr tlmgr update --list108425 +Ref: tlmgr tlmgr update --all108518 +Ref: tlmgr tlmgr info _what_108675 +Node: tlmgr OPTIONS108937 +Ref: tlmgr *--repository* _url|path_109457 +Ref: tlmgr /some/local/dir110643 +Ref: tlmgr file:/some/local/dir110672 +Ref: tlmgr ctan110745 +Ref: tlmgr http://mirror.ctan.org/systems/texlive/tlnet110798 +Ref: tlmgr http://server/path/to/tlnet111139 +Ref: tlmgr https://server/path/to/tlnet111520 +Ref: tlmgr ftp://server/path/to/tlnet111988 +Ref: tlmgr user@machine:/path/to/tlnet112120 +Ref: tlmgr scp://user@machine/path/to/tlnet112161 +Ref: tlmgr ssh://user@machine/path/to/tlnet112202 +Ref: tlmgr *--gui* [_action_]112595 +Ref: tlmgr *--gui-lang* _llcode_113408 +Ref: tlmgr *--debug-translation*114144 +Ref: tlmgr *--machine-readable*114347 +Ref: tlmgr *--no-execute-actions*114615 +Ref: tlmgr *--package-logfile* _file_114808 +Ref: tlmgr *--pause*115062 +Ref: tlmgr *--persistent-downloads*115217 +Ref: tlmgr *--no-persistent-downloads*115245 +Ref: tlmgr *--pin-file*115739 +Ref: tlmgr *--usermode*115957 +Ref: tlmgr *--usertree* _dir_116077 +Ref: tlmgr *--verify-repo=[none|main|all]*116203 +Node: tlmgr ACTIONS117102 +Node: tlmgr help117963 +Node: tlmgr version118440 +Node: tlmgr backup118703 +Ref: tlmgr *backup [_option_...] --all*118874 +Ref: tlmgr *backup [_option_...] _pkg_...*118907 +Ref: tlmgr *--backupdir* _directory_119973 +Ref: tlmgr *--all*120190 +Ref: tlmgr *--clean*[=_N_]120442 +Ref: tlmgr *--dry-run*120769 +Node: tlmgr candidates _pkg_120899 +Node: tlmgr check [_option_...] [depends|executes|files|runfiles|texmfdbs|all]121254 +Ref: tlmgr *depends*121768 +Ref: tlmgr *executes*122110 +Ref: tlmgr *files*122225 +Ref: tlmgr *runfiles*122361 +Ref: tlmgr *texmfdbs*122498 +Ref: tlmgr - all items in TEXMFDBS have the !! prefix.122728 +Ref: tlmgr - all items in TEXMFBDS have an ls-R file (if they exist at all).122804 +Ref: tlmgr - all items in TEXMF with !! are listed in TEXMFDBS.122869 +Ref: tlmgr - all items in TEXMF with an ls-R file are listed in TEXMFDBS.122944 +Ref: tlmgr *--use-svn*122969 +Node: tlmgr conf123110 +Ref: tlmgr *conf [texmf|tlmgr|updmap [--conffile _file_] [--delete] [_key_ [_value_]]]*123398 +Ref: tlmgr *conf auxtrees [--conffile _file_] [show|add|remove] [_value_]*123462 +Node: tlmgr dump-tlpdb [_option_...] [--json]125877 +Ref: tlmgr *--local*126310 +Ref: tlmgr *--remote*126349 +Ref: tlmgr *--json*126387 +Node: tlmgr generate126958 +Ref: tlmgr *generate [_option_...] language*127154 +Ref: tlmgr *generate [_option_...] language.dat*127193 +Ref: tlmgr *generate [_option_...] language.def*127232 +Ref: tlmgr *generate [_option_...] language.dat.lua*127275 +Ref: tlmgr *--dest* _output_file_129602 +Ref: tlmgr *--localcfg* _local_conf_file_130178 +Ref: tlmgr *--rebuild-sys*130301 +Node: tlmgr gui131116 +Node: tlmgr info131294 +Ref: tlmgr *info [_option_...] _pkg_...*131456 +Ref: tlmgr *info [_option_...] collections*131490 +Ref: tlmgr *info [_option_...] schemes*131520 +Ref: tlmgr *--list*133050 +Ref: tlmgr *--only-installed*133364 +Ref: tlmgr *--only-remote*133552 +Ref: tlmgr *--data item1,item2,...*133856 +Ref: tlmgr *--json* 1134437 +Node: tlmgr init-usertree134820 +Node: tlmgr install [_option_...] _pkg_...135201 +Ref: tlmgr *--dry-run* 1135709 +Ref: tlmgr *--file*135826 +Ref: tlmgr *--force*136048 +Ref: tlmgr *--no-depends*136268 +Ref: tlmgr *--no-depends-at-all*136427 +Ref: tlmgr *--reinstall*136827 +Ref: tlmgr *--with-doc*137205 +Ref: tlmgr *--with-src*137218 +Node: tlmgr key137946 +Ref: tlmgr *key list*138104 +Ref: tlmgr *key add _file_*138122 +Ref: tlmgr *key remove _keyid_*138144 +Node: tlmgr list138738 +Node: tlmgr option138900 +Ref: tlmgr *option [--json] [show]*139055 +Ref: tlmgr *option [--json] showall|help*139086 +Ref: tlmgr *option _key_ [_value_]*139112 +Node: tlmgr paper143690 +Ref: tlmgr *paper [a4|letter]*143839 +Ref: tlmgr *<[xdvi|pdftex|dvips|dvipdfmx|context|psutils] paper [_papersize_|--list]*>143915 +Ref: tlmgr *paper --json*143930 +Node: tlmgr path145145 +Ref: tlmgr *path [--w32mode=user|admin] add*145306 +Ref: tlmgr *path [--w32mode=user|admin] remove*145343 +Node: tlmgr pinning146828 +Ref: tlmgr pinning show147069 +Ref: tlmgr pinning add _repo_ _pkgglob_...147142 +Ref: tlmgr pinning remove _repo_ _pkgglob_...147261 +Ref: tlmgr pinning remove _repo_ --all147414 +Node: tlmgr platform147468 +Ref: tlmgr *platform list|add|remove _platform_...*147654 +Ref: tlmgr *platform set _platform_*147681 +Ref: tlmgr *platform set auto*147702 +Ref: tlmgr *--dry-run* 2148579 +Node: tlmgr postaction148698 +Ref: tlmgr *postaction [_option_...] install [shortcut|fileassoc|script] [_pkg_...]*148928 +Ref: tlmgr *postaction [_option_...] remove [shortcut|fileassoc|script] [_pkg_...]*149002 +Ref: tlmgr *--w32mode=[user|admin]*149317 +Ref: tlmgr *--fileassocmode=[1|2]*149733 +Ref: tlmgr *--all* 1150018 +Node: tlmgr print-platform150073 +Node: tlmgr print-platform-info150404 +Node: tlmgr remove [_option_...] _pkg_...150704 +Ref: tlmgr *--all* 2151188 +Ref: tlmgr *--backup*151298 +Ref: tlmgr *--backupdir* _directory_ 1151324 +Ref: tlmgr *--no-depends* 1151729 +Ref: tlmgr *--no-depends-at-all* 1151791 +Ref: tlmgr *--force* 1151894 +Ref: tlmgr *--dry-run* 3152367 +Node: tlmgr repository152703 +Ref: tlmgr *repository list*152891 +Ref: tlmgr *repository list _path|url|tag_*152925 +Ref: tlmgr *repository add _path_ [_tag_]*152958 +Ref: tlmgr *repository remove _path|tag_*152990 +Ref: tlmgr *repository set _path_[#_tag_] [_path_[#_tag_] ...]*153044 +Ref: tlmgr *repository status*153065 +Ref: tlmgr The tag (which can be the same as the url);154292 +Node: tlmgr restore154770 +Ref: tlmgr *restore [_option_...] _pkg_ [_rev_]*154949 +Ref: tlmgr *restore [_option_...] --all*154979 +Ref: tlmgr *--all* 3155679 +Ref: tlmgr *--backupdir* _directory_ 2155893 +Ref: tlmgr *--dry-run* 4156074 +Ref: tlmgr *--force* 2156206 +Ref: tlmgr *--json* 2156252 +Node: tlmgr search156579 +Ref: tlmgr *search [_option_...] _what_*156743 +Ref: tlmgr *search [_option_...] --file _what_*156780 +Ref: tlmgr *search [_option_...] --all _what_*156816 +Ref: tlmgr *--file* 1157036 +Ref: tlmgr *--all* 4157098 +Ref: tlmgr *--global*157187 +Ref: tlmgr *--word*157314 +Node: tlmgr shell157629 +Ref: tlmgr protocol158364 +Ref: tlmgr help 1158428 +Ref: tlmgr version 1158481 +Ref: tlmgr quit, end, bye, byebye, EOF158549 +Ref: tlmgr restart158570 +Ref: tlmgr load [local|remote]158693 +Ref: tlmgr save158763 +Ref: tlmgr get [_var_] =item set [_var_ [_val_]]158886 +Node: tlmgr show159487 +Node: tlmgr uninstall159654 +Node: tlmgr update [_option_...] [_pkg_...]159884 +Ref: tlmgr *--all* 5160255 +Ref: tlmgr *--self*162434 +Ref: tlmgr *--dry-run* 5163198 +Ref: tlmgr *--list* [_pkg_]163375 +Ref: tlmgr *--exclude* _pkg_164064 +Ref: tlmgr *--no-auto-remove* [_pkg_...]164864 +Ref: tlmgr *--no-auto-install* [_pkg_...]165348 +Ref: tlmgr *--reinstall-forcibly-removed*166110 +Ref: tlmgr *--backup* 1166645 +Ref: tlmgr *--backupdir* _directory_ 3166671 +Ref: tlmgr *--no-depends* 2167837 +Ref: tlmgr *--no-depends-at-all* 2168040 +Ref: tlmgr *--force* 3168143 +Node: tlmgr CONFIGURATION FILE FOR TLMGR169163 +Ref: tlmgr auto-remove, value 0 or 1 (default 1), same as command-line option.170170 +Ref: tlmgr gui-expertmode, value 0 or 1 (default 1). This switches between the full GUI and a simplified GUI with only the most common settings.170307 +Ref: tlmgr gui-lang _llcode_, with a language code value as with the command-line option.170389 +Ref: tlmgr no-checksums, value 0 or 1 (default 0, see below).170443 +Ref: tlmgr persistent-downloads, value 0 or 1 (default 1), same as command-line option.170523 +Ref: tlmgr require-verification, value 0 or 1 (default 0), same as command-line option.170603 +Ref: tlmgr update-exclude, value: comma-separated list of packages (no space allowed). Same as the command line option --exclude for the action update.170751 +Ref: tlmgr verify-downloads, value 0 or 1 (default 1), same as command-line option.170827 +Ref: tlmgr allowed-actions _action1_ [,_action_,...] The value is a comma-separated list of tlmgr actions which are allowed to be executed when tlmgr is invoked in system mode (that is, without --usermode).171096 +Node: tlmgr CRYPTOGRAPHIC VERIFICATION172184 +Node: tlmgr Configuration of GnuPG invocation174357 +Node: tlmgr USER MODE174995 +Node: tlmgr User mode install177841 +Node: tlmgr User mode backup, restore, remove, update178985 +Node: tlmgr User mode generate, option, paper179427 +Node: tlmgr MULTIPLE REPOSITORIES179803 +Node: tlmgr Pinning181532 +Node: tlmgr GUI FOR TLMGR183455 +Node: tlmgr Main display185104 +Node: tlmgr Display configuration area185356 +Ref: tlmgr Status185717 +Ref: tlmgr Category185881 +Ref: tlmgr Match186067 +Ref: tlmgr Selection186248 +Ref: tlmgr Display configuration buttons186452 +Node: tlmgr Package list area186635 +Ref: tlmgr a checkbox187219 +Ref: tlmgr package name187355 +Ref: tlmgr local revision (and version)187454 +Ref: tlmgr remote revision (and version)187829 +Ref: tlmgr short description188126 +Node: tlmgr Main display action buttons188171 +Ref: tlmgr Update all installed188437 +Ref: tlmgr Update188809 +Ref: tlmgr Install188859 +Ref: tlmgr Remove189045 +Ref: tlmgr Backup189223 +Node: tlmgr Menu bar189380 +Ref: tlmgr tlmgr menu189603 +Ref: tlmgr Options menu189911 +Ref: tlmgr Actions menu190994 +Ref: tlmgr Help menu191422 +Node: tlmgr GUI options191556 +Ref: tlmgr -background _color_191802 +Ref: tlmgr -font " _fontname_ _fontsize_ "191867 +Ref: tlmgr -foreground _color_192025 +Ref: tlmgr -geometry _geomspec_192077 +Ref: tlmgr -xrm _xresource_192269 +Node: tlmgr MACHINE-READABLE OUTPUT192538 +Node: tlmgr Machine-readable update and install output193348 +Ref: tlmgr location-url _location_194624 +Ref: tlmgr total-bytes _count_194840 +Ref: tlmgr _pkgname_195250 +Ref: tlmgr _status_195460 +Ref: tlmgr d195538 +Ref: tlmgr f195598 +Ref: tlmgr u195777 +Ref: tlmgr r195823 +Ref: tlmgr a195946 +Ref: tlmgr i196124 +Ref: tlmgr I196243 +Ref: tlmgr _localrev_196345 +Ref: tlmgr _serverrev_196452 +Ref: tlmgr _size_196564 +Ref: tlmgr _runtime_196733 +Ref: tlmgr _esttot_196803 +Node: tlmgr Machine-readable option output196836 +Node: tlmgr ENVIRONMENT VARIABLES197348 +Ref: tlmgr TEXLIVE_COMPRESSOR197859 +Ref: tlmgr TEXLIVE_DOWNLOADER198707 +Ref: tlmgr TL_DOWNLOAD_PROGRAM198730 +Ref: tlmgr TL_DOWNLOAD_ARGS198750 +Ref: tlmgr TEXLIVE_PREFER_OWN199776 +Node: tlmgr AUTHORS AND COPYRIGHT200600 +Node: Index200998  End Tag Table + + +Local Variables: +coding: utf-8 +End: diff --git a/Build/source/doc/tlbuild.texi b/Build/source/doc/tlbuild.texi index f0011a7df76..06b70960927 100644 --- a/Build/source/doc/tlbuild.texi +++ b/Build/source/doc/tlbuild.texi @@ -233,10 +233,9 @@ Automake/Autoconf output in general) work with any reasonable @cindex C++11, required A C++11 compiler is similarly required because of the third-party -libraries ICU and Poppler; the program @code{dvisvgm} also requires -C++11. It is possible to build everything else with older compilers, -but you have to remove the C++11-dependent sources. @xref{Build one -package}. +library ICU; the program @code{dvisvgm} also requires C++11. It is +possible to build everything else with older compilers, but you have +to remove the C++11-dependent sources. @xref{Build one package}. A few programs in the tree have additional requirements: @@ -504,7 +503,7 @@ source directories; specifying @code{--disable} for them does not suffice, unfortunately. Specifically, before running @code{configure}: @example -rm -rf libs/icu libs/poppler libs/graphite2 texk/dvisvgm +rm -rf libs/icu libs/graphite2 texk/dvisvgm @end example @vindex --enable-missing @r{to ignore dependencies} @@ -1895,10 +1894,7 @@ to the file format specifications. @cindex PDF files, size of @cindex PostScript files, size of With LFS, there is no fixed limit on the size of PDF files created by -@file{pdftex} or PostScript files created by @file{dvips}. The size -of PDF images included by @file{pdftex} or @file{luatex} must, however, -be @math{<2}GB when using @file{poppler} version@tie{}0.22 or before -(even on 64-bit systems with LFS). +@file{pdftex} or PostScript files created by @file{dvips}. @node @code{--disable-missing} @@ -2292,10 +2288,8 @@ required system libraries and bails out if tests fail. @menu * Configure options for @code{kpathsea}:: -* Configure options for system @code{poppler}:: @end menu - @node Configure options for @code{kpathsea} @subsection Configure options for @code{kpathsea} @@ -2325,28 +2319,6 @@ for whether or not to run @var{cmd}, which is one of: The default can be overridden by the user in any case (@pxref{@code{kpathsea} library}). -@node Configure options for system @code{poppler} -@subsection Configure options for system @code{poppler} - -@cindex @code{configure} options, for system @code{poppler} - -@pindex poppler -@pindex xpdf @r{as library} -Building Xe@TeX{} requires @code{poppler}, either from the TL tree or -system headers and library. Building pdf@TeX{} requires either -@code{xpdf} from the @TL{} tree or system @code{poppler} headers and -library. - -@vindex --with-system-poppler -@noindent @code{--with-system-poppler}@*Use a system version (0.18 or -newer) of @code{poppler} for Lua@TeX{} (or LuaJIT@TeX{}) and Xe@TeX{}, -and use @file{pkg-config} to obtain the required flags. - -@vindex --with-system-xpdf -@noindent @code{--with-system-xpdf}@*Use a system version (0.12 or newer) -of @code{poppler} (and @file{pkg-config}) for pdf@TeX{} instead of -@code{xpdf} from the TL tree. @xref{@code{--disable-largefile}}. - @node Variables for configure @section Variables for configure diff --git a/Build/source/libs/ChangeLog b/Build/source/libs/ChangeLog index 9352e488319..591e81b753c 100644 --- a/Build/source/libs/ChangeLog +++ b/Build/source/libs/ChangeLog @@ -1,4 +1,10 @@ +2020-05-14 Karl Berry + + * poppler: remove. + See source/m4/kpse-xpdf-flags.m4 for some discussion. + 2020-04-21 Luigi Scarso + * pplib: move from luatexdir, add test. 2018-08-30 Karl Berry diff --git a/Build/source/libs/Makefile.in b/Build/source/libs/Makefile.in index 9d6f8e988c8..56a46508b64 100644 --- a/Build/source/libs/Makefile.in +++ b/Build/source/libs/Makefile.in @@ -107,7 +107,6 @@ am__aclocal_m4_deps = $(top_srcdir)/../m4/kpse-cairo-flags.m4 \ $(top_srcdir)/../m4/kpse-options.m4 \ $(top_srcdir)/../m4/kpse-pixman-flags.m4 \ $(top_srcdir)/../m4/kpse-pkgs.m4 \ - $(top_srcdir)/../m4/kpse-poppler-flags.m4 \ $(top_srcdir)/../m4/kpse-ptexenc-flags.m4 \ $(top_srcdir)/../m4/kpse-setup.m4 \ $(top_srcdir)/../m4/kpse-teckit-flags.m4 \ @@ -178,7 +177,6 @@ am__aclocal_m4_deps = $(top_srcdir)/../m4/kpse-cairo-flags.m4 \ $(top_srcdir)/../libs/graphite2/ac/withenable.ac \ $(top_srcdir)/../libs/zziplib/ac/withenable.ac \ $(top_srcdir)/../libs/xpdf/ac/withenable.ac \ - $(top_srcdir)/../libs/poppler/ac/withenable.ac \ $(top_srcdir)/../libs/mpfr/ac/withenable.ac \ $(top_srcdir)/../libs/gmp/ac/withenable.ac \ $(top_srcdir)/../libs/cairo/ac/withenable.ac \ diff --git a/Build/source/libs/README b/Build/source/libs/README index d357c1b300a..f5139b84c49 100644 --- a/Build/source/libs/README +++ b/Build/source/libs/README @@ -9,9 +9,6 @@ bypassing or using the original one. See also comments in ../texk/README. -pplib 2.05.0 - checked 21apr20 - https://github.com/contextgarden/pplib - cairo 1.16.0 - checked 20oct18 http://cairographics.org/releases/ @@ -55,9 +52,8 @@ mpfr 4.0.2 - checked 1jan19 pixman 0.40.0 - checked 21apr20 http://cairographics.org/releases/ -poppler 0.68.0 - checked 20aug18 - http://poppler.freedesktop.org/ - used by xetex - (requires C++11) +pplib 2.05.0 - checked 21apr20 + https://github.com/contextgarden/pplib teckit 2.5.10 - checked 06may20 https://github.com/silnrsi/teckit/archive/2.5.10.tar.gz diff --git a/Build/source/libs/aclocal.m4 b/Build/source/libs/aclocal.m4 index 023c395f2e4..e17f1337fed 100644 --- a/Build/source/libs/aclocal.m4 +++ b/Build/source/libs/aclocal.m4 @@ -1189,7 +1189,6 @@ m4_include([../m4/kpse-mpfr-flags.m4]) m4_include([../m4/kpse-options.m4]) m4_include([../m4/kpse-pixman-flags.m4]) m4_include([../m4/kpse-pkgs.m4]) -m4_include([../m4/kpse-poppler-flags.m4]) m4_include([../m4/kpse-ptexenc-flags.m4]) m4_include([../m4/kpse-setup.m4]) m4_include([../m4/kpse-teckit-flags.m4]) diff --git a/Build/source/libs/configure b/Build/source/libs/configure index 9f165065bda..b01a80c8350 100755 --- a/Build/source/libs/configure +++ b/Build/source/libs/configure @@ -812,8 +812,6 @@ with_system_icu with_system_teckit with_system_graphite2 with_system_zziplib -with_system_xpdf -with_system_poppler with_system_mpfr with_mpfr_includes with_mpfr_libdir @@ -1642,10 +1640,6 @@ Optional Packages: (requires pkg-config) --with-system-zziplib use installed zziplib headers and library (requires pkg-config) - --with-system-xpdf use installed poppler headers and library instead of - xpdf library from TL (requires pkg-config) - --with-system-poppler use installed poppler headers and library (requires - pkg-config) --with-system-mpfr use installed mpfr headers and library --with-mpfr-includes=DIR mpfr headers installed in DIR @@ -4007,7 +4001,7 @@ if test "${enable_xetex_synctex+set}" = set; then : fi test "x$enable_web2c:$enable_xetex" = xyes:yes && { - need_poppler=yes + need_pplib=yes need_libpng=yes need_freetype2=yes need_teckit=yes @@ -5119,11 +5113,7 @@ test "x$need_zziplib" = xyes && { ## libs/xpdf/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/xpdf/ ## configure options and TL libraries required for xpdf - -# Check whether --with-system-xpdf was given. -if test "${with_system_xpdf+set}" = set; then : - withval=$with_system_xpdf; -fi +: "kpse_xpdf_options - no-op" if test "x$with_system_xpdf" = x; then if test -f $srcdir/../libs/xpdf/configure; then { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`xpdf' headers and library from TL tree" >&5 @@ -5137,40 +5127,6 @@ $as_echo "$as_me: Assuming installed \`xpdf' headers and library" >&6;} ac_configure_args="$ac_configure_args '--with-system-xpdf=$with_system_xpdf'" fi -## libs/poppler/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/poppler/ -## configure options and TL libraries required for poppler - -# Check whether --with-system-poppler was given. -if test "${with_system_poppler+set}" = set; then : - withval=$with_system_poppler; -fi -if test "x$with_system_poppler" = x; then - if test -f $srcdir/../libs/poppler/configure; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`poppler' headers and library from TL tree" >&5 -$as_echo "$as_me: Assuming \`poppler' headers and library from TL tree" >&6;} - with_system_poppler=no - else - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming installed \`poppler' headers and library" >&5 -$as_echo "$as_me: Assuming installed \`poppler' headers and library" >&6;} - with_system_poppler=yes - fi - ac_configure_args="$ac_configure_args '--with-system-poppler=$with_system_poppler'" -fi -if test "x$with_system_poppler" = xyes; then - if test "x$with_system_zlib" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: -> installed \`zlib' headers and library" >&5 -$as_echo "$as_me: -> installed \`zlib' headers and library" >&6;} - with_system_zlib=yes - ac_configure_args="$ac_configure_args '--with-system-zlib'" - elif test "x$with_system_zlib" != xyes; then - as_fn_error $? "Sorry, \`--with-system-poppler' requires \`--with-system-zlib'" "$LINENO" 5 - fi -fi - -test "x$need_poppler" = xyes && { - need_zlib=yes -} - ## libs/mpfr/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/mpfr/ ## configure options and TL libraries required for mpfr @@ -6503,10 +6459,6 @@ if test -x $srcdir/xpdf/configure; then test "x$with_system_xpdf" != xyes && test "x$need_xpdf" = xyes && MAKE_SUBDIRS="xpdf $MAKE_SUBDIRS" CONF_SUBDIRS="xpdf $CONF_SUBDIRS" fi -if test -x $srcdir/poppler/configure; then - test "x$with_system_poppler" != xyes && test "x$need_poppler" = xyes && MAKE_SUBDIRS="poppler $MAKE_SUBDIRS" - CONF_SUBDIRS="poppler $CONF_SUBDIRS" -fi if test -x $srcdir/mpfr/configure; then test "x$with_system_mpfr" != xyes && test "x$need_mpfr" = xyes && MAKE_SUBDIRS="mpfr $MAKE_SUBDIRS" CONF_SUBDIRS="mpfr $CONF_SUBDIRS" diff --git a/Build/source/libs/poppler/ChangeLog b/Build/source/libs/poppler/ChangeLog deleted file mode 100644 index e5cd68be0e2..00000000000 --- a/Build/source/libs/poppler/ChangeLog +++ /dev/null @@ -1,387 +0,0 @@ -2018-08-20 Akira Kakuto - - Import poppler-0.68.0. - * version.ac: Adjust. - -2018-07-21 Akira Kakuto - - Import poppler-0.67.0. - * version.ac: Adjust. - -2018-06-20 Akira Kakuto - - Import poppler-0.66.0. - * version.ac: Adjust. - -2018-05-21 Akira Kakuto - - Import poppler-0.65.0. - * version.ac, Makefile.am: Adjust. - -2018-04-29 Akira Kakuto - - Import poppler-0.64.0. - * version.ac: Adjust. - -2018-03-18 Akira Kakuto - - Import poppler-0.63.0. - * Makefile.am, version.ac: Adjust. - -2018-03-14 Luigi Scarso - - * configure.ac (HAVE_DCT_DECODER, HAVE_JPX_DECODER): hardwire to 1, - instead of requiring --enable. - Original report from Jose Manuel, - http://tug.org/pipermail/tex-live/2018-March/041158.html - -2018-01-08 Karl Berry - - Import poppler-0.62.0. - * Makefile.am, configure.ac, version.ac: Adjust. - -2017-02-17 Akira Kakuto - - Import poppler-0.52.0. - * version.ac: Adjust. - -2017-01-15 Akira Kakuto - - Import poppler-0.51.0. - * version.ac: Adjust. - -2016-12-16 Akira Kakuto - - Import poppler-0.50.0. - * version.ac: Adjust. - -2016-11-15 Akira Kakuto - - Import poppler-0.49.0. - * version.ac: Adjust. - -2016-10-08 Akira Kakuto - - Import poppler-0.48.0. - * version.ac: Adjust. - -2016-08-19 Akira Kakuto - - Import poppler-0.47.0. - * version.ac: Adjust. - -2016-07-25 Akira Kakuto - - Import poppler-0.46.0. - * version.ac: Adjust. - -2016-06-18 Akira Kakuto - - Import poppler-0.45.0. - * version.ac, configure.ac, config.h.in, Makefile.am: Adjust. - -2016-05-22 Akira Kakuto - - Import poppler-0.44.0. - * version.ac: Adjust. - -2016-04-29 Akira Kakuto - - Import poppler-0.43.0. - * version.ac: Adjust. - -2016-03-18 Luigi Scarso - - Import poppler-0.42.0. - * version.ac: Adjust. - -2016-02-17 Akira Kakuto - - Import poppler-0.41.0. - * version.ac: Adjust. - -2016-02-15 Karl Berry - - * poppler-PATCHES: rename from poppler-src-PATCHES. - * Makefile.am (EXTRA_DIST): likewise. - -2016-01-14 Akira Kakuto - - Import poppler-0.40.0. - * version.ac: Adjust. - -2015-12-28 Akira Kakuto - - Import poppler-0.39.0. - * version.ac: Adjust. - -2015-10-10 Peter Breitenlohner - - Import poppler-0.37.0. - * version.ac: Adjust. - -2015-09-10 Peter Breitenlohner - - Import poppler-0.36.0. - * version.ac: Adjust. - -2015-08-10 Peter Breitenlohner - - Import poppler-0.35.0. - * version.ac: Adjust. - -2015-07-09 Peter Breitenlohner - - Import poppler-0.34.0. - * version.ac: Adjust. - -2015-06-12 Peter Breitenlohner - - Import poppler-0.33.0. - * version.ac: Adjust. - -2015-03-08 Peter Breitenlohner - - Import poppler-0.32.0. - * version.ac: Adjust. - -2015-02-16 Peter Breitenlohner - - * Makefile.am: Use the fragment ../../am/dist_hook.am. - -2015-02-06 Peter Breitenlohner - - Import poppler-0.31.0. - * version.ac: Adjust. - -2015-01-07 Peter Breitenlohner - - Import poppler-0.30.0. - * version.ac: Adjust. - -2014-12-05 Peter Breitenlohner - - Import poppler-0.29.0. - * version.ac: Adjust. - -2014-12-03 Peter Breitenlohner - - * configure.ac: Added KPSE_COMPILER_VISIBILITY. - * Makefile.am [AM_C*FLAGS]: Added $(VISIBILITY_C*FLAGS). - -2014-11-04 Peter Breitenlohner - - Import poppler-0.28.0. - * version.ac: Adjust. - -2014-09-29 Peter Breitenlohner - - Import poppler-0.26.5. - * version.ac: Adjust. - -2014-08-22 Peter Breitenlohner - - Import poppler-0.26.4. - * version.ac: Adjust. - -2014-07-21 Peter Breitenlohner - - Import poppler-0.26.3. - * version.ac: Adjust. - -2014-06-20 Peter Breitenlohner - - Import poppler-0.26.2. - * version.ac: Adjust. - -2014-06-16 Peter Breitenlohner - - Import poppler-0.26.1. - * version.ac: Adjust. - * Makefile.am: Drop the obsolete ACLOCAL_AMFLAGS. - -2014-03-27 Peter Breitenlohner - - Import poppler-0.25.2. - * version.ac: Adjust. - -2014-01-03 Peter Breitenlohner - - Import poppler-0.25.1. - * version.ac: Adjust. - -2013-12-13 Peter Breitenlohner - - Import poppler-0.25.0. - * Makefile.am (poppler_libpoppler_a_sources): Add - MarkedContentOutputDev.cc, StructElement.cc, and - StructTreeRoot.cc (new files). - * version.ac: Adjust. - -2013-12-02 Peter Breitenlohner - - Import poppler-0.24.4. - * version.ac: Adjust. - -2013-10-28 Peter Breitenlohner - - Import poppler-0.24.3. - * version.ac: Adjust. - -2013-09-30 Peter Breitenlohner - - Import poppler-0.24.2. - * version.ac: Adjust. - -2013-09-10 Peter Breitenlohner - - Import poppler-0.24.1. - * version.ac: Adjust. - -2013-07-30 Peter Breitenlohner - - Import poppler-0.24.0. - * version.ac: Adjust. - -2013-07-19 Peter Breitenlohner - - Import poppler-0.23.4. - * version.ac: Adjust. - -2012-07-06 Peter Breitenlohner - - * Makefile.am: Use ../../am/reconfig.am and ../../am/rebuild.am. - -2013-07-05 Peter Breitenlohner - - * include/Makefile.am, include/{fofi,goo}/Makefile.am: - Moved Makefile fragments to ../../am/. - -2013-07-02 Peter Breitenlohner - - Import poppler-0.23.3. - * version.ac: Adjust. - -2013-06-26 Peter Breitenlohner - - * Makefile.am: Ensure existence of zlib headers. - -2013-06-18 Peter Breitenlohner - - Import poppler-0.23.2. - * version.ac: Adjust. - - * configure.ac: Add check for ftell64()/fseek64(). - Check sizeof(long long) == 8. - [MinGW] Define _WIN32_WINNT to 0x0500 for GetFileSizeEx(). - - Install headers as for system-poppler. - * poppler/Makefile.am: Moved from here ... - * include/Makefile.am: ... to here. - * {goo,fofi}/Makefile.am: Moved from here ... - * include/{goo,fofi}/Makefile.am: ... to here. - * configure.ac: Adjusted. - -2013-03-12 Peter Breitenlohner - - Import poppler-0.22.2. - * version.ac: Adjust. - -2013-01-29 Peter Breitenlohner - - * Makefile.am: Allow subdir-objects. - -2012-12-31 Peter Breitenlohner - - Import poppler-0.22.0. - * version.ac: Adjust. - -2012-12-15 Peter Breitenlohner - - * configure.ac: Use KPSE_BASIC to enable silent rules. - -2012-11-16 Peter Breitenlohner - - * Makefile.am: Avoid use of deprecated INCLUDES. - -2012-10-15 Peter Breitenlohner - - Import poppler-0.21.0. - * version.ac: Adjust. - * configure.ac: Add check for rand_r(). - * Makefile.am (goo_libGoo_a_sources): Add grandom.cc; - (poppler_libpoppler_a_sources): add UTF.cc (new files). - -2012-07-22 Peter Breitenlohner - - * Makefile.am (poppler_libpoppler_a_sources): Drop PSOutputDev.cc, - not used by {lua,Xe}TeX. - -2012-07-11 Peter Breitenlohner - - Import poppler-0.20.2. - * version.ac: Adjust. - -2012-05-09 Peter Breitenlohner - - Import poppler-0.20.0. - * version.ac: Adjust. - -2012-05-09 Peter Breitenlohner - - Import poppler-0.19.4. - * version.ac: Adjust. - * Makefile.am (fofi_libfofi_a_sources): Add FoFiIdentifier.cc. - -2012-02-24 Peter Breitenlohner - - * {fofi,goo,poppler}/Makefile.am: Use ../am/hdr_links.am. - * hdrs.am (removed): Obsolete. - -2012-02-23 Peter Breitenlohner - - Import poppler-0.18.4. - * version.ac: Adjust. - -2012-01-13 Peter Breitenlohner - - * Makefile.am (AM_CPPFLAGS): Drop `-DPDF_PARSER_ONLY'. - -2011-10-10 Peter Breitenlohner - - * configure.ac: Reorganize definition of POPPLER_VERSION. - -2011-10-08 Peter Breitenlohner - - Import poppler 0.18.0. - * version.ac: New file defining the poppler version. - * Makefile.am (poppler_libpoppler_a_sources): Add CachedFile.cc, - Hints.cc, Linearization.cc, Rendition.cc, strtok_r.cpp, and - ViewerPreferences.cc. - * configure.ac: Adapt. - -2011-04-23 Peter Breitenlohner - - * Makefile.am (goo_libGoo_a_sources): Omit PNGWriter.cc. - -2011-04-23 Peter Breitenlohner - - Suppress "deprecated conversion from string constant to 'char*'" - warnings from g++-4.4. - Unfortunately poppler declares lots of function parameters as - 'char *' that should actually be 'const char *'. - Compiling with the g++-4.4 default '-Wwrite-strings' would yield - >10000 such warnings. - - * Makefile.am, configure.ac: Define and use NO_WARN_CXXFLAGS. - -2011-04-14 Peter Breitenlohner - - * Makefile.am, ac/poppler.ac, ac/withenable.ac, configure.ac: - Better integration into the TeX Live build system. - -2011-04-12 Taco Hoekwater - - Imported poppler-0.12.4 source tree from: - http://poppler.freedesktop.org/ - diff --git a/Build/source/libs/poppler/Makefile.am b/Build/source/libs/poppler/Makefile.am deleted file mode 100644 index e20f407f543..00000000000 --- a/Build/source/libs/poppler/Makefile.am +++ /dev/null @@ -1,147 +0,0 @@ -## $Id$ -## Proxy Makefile.am to build poppler for TeX Live. -## -## Copyright 2016-2018 Karl Berry -## Copyright 2011-2015 Peter Breitenlohner -## -## This file is free software; the copyright holder -## gives unlimited permission to copy and/or distribute it, -## with or without modifications, as long as this notice is preserved. -## -## We want to re-distribute the whole poppler source tree. -## -EXTRA_DIST = $(POPPLER_TREE) - -## Changes applied to the original source tree -## -EXTRA_DIST += TLpatches - -# Files not to be distributed -include $(srcdir)/../../am/dist_hook.am -NEVER_NAMES += $(NEVER_NAMES_SUB) - -SUBDIRS = . include - -GOO_SRC = $(top_srcdir)/$(POPPLER_TREE)/goo -FOFI_SRC = $(top_srcdir)/$(POPPLER_TREE)/fofi -POPPLER_SRC = $(top_srcdir)/$(POPPLER_TREE)/poppler - -AM_CPPFLAGS = -I$(top_srcdir)/$(POPPLER_TREE) -I$(GOO_SRC) $(ZLIB_INCLUDES) -AM_CPPFLAGS += -DPOPPLER_DATADIR='"."' -AM_CFLAGS = $(VISIBILITY_CFLAGS) $(WARNING_CFLAGS) -AM_CXXFLAGS = $(VISIBILITY_CXXFLAGS) $(NO_WARN_CXXFLAGS) $(CXX_FLAGS_RELEASE) - -noinst_LIBRARIES = libpoppler.a - -$(libpoppler_a_OBJECTS): $(ZLIB_DEPEND) - -nodist_libpoppler_a_SOURCES = \ - $(goo_libGoo_a_sources) \ - $(fofi_libfofi_a_sources) \ - $(poppler_libpoppler_a_sources) - -goo_libGoo_a_sources = \ - @POPPLER_TREE@/goo/gfile.cc \ - @POPPLER_TREE@/goo/glibc.cc \ - @POPPLER_TREE@/goo/gmem.cc \ - @POPPLER_TREE@/goo/gmempp.cc \ - @POPPLER_TREE@/goo/grandom.cc \ - @POPPLER_TREE@/goo/gstrtod.cc \ - @POPPLER_TREE@/goo/FixedPoint.cc \ - @POPPLER_TREE@/goo/GooList.cc \ - @POPPLER_TREE@/goo/GooString.cc \ - @POPPLER_TREE@/goo/GooTimer.cc - -fofi_libfofi_a_sources = \ - @POPPLER_TREE@/fofi/FoFiBase.cc \ - @POPPLER_TREE@/fofi/FoFiEncodings.cc \ - @POPPLER_TREE@/fofi/FoFiIdentifier.cc \ - @POPPLER_TREE@/fofi/FoFiTrueType.cc \ - @POPPLER_TREE@/fofi/FoFiType1.cc \ - @POPPLER_TREE@/fofi/FoFiType1C.cc - - - -poppler_libpoppler_a_sources = \ - @POPPLER_TREE@/poppler/Annot.cc \ - @POPPLER_TREE@/poppler/Array.cc \ - @POPPLER_TREE@/poppler/BuiltinFont.cc \ - @POPPLER_TREE@/poppler/BuiltinFontTables.cc \ - @POPPLER_TREE@/poppler/CMap.cc \ - @POPPLER_TREE@/poppler/CachedFile.cc \ - @POPPLER_TREE@/poppler/Catalog.cc \ - @POPPLER_TREE@/poppler/CharCodeToUnicode.cc \ - @POPPLER_TREE@/poppler/DateInfo.cc \ - @POPPLER_TREE@/poppler/Decrypt.cc \ - @POPPLER_TREE@/poppler/Dict.cc \ - @POPPLER_TREE@/poppler/Error.cc \ - @POPPLER_TREE@/poppler/FileSpec.cc \ - @POPPLER_TREE@/poppler/FlateStream.cc \ - @POPPLER_TREE@/poppler/FontEncodingTables.cc \ - @POPPLER_TREE@/poppler/FontInfo.cc \ - @POPPLER_TREE@/poppler/Form.cc \ - @POPPLER_TREE@/poppler/Function.cc \ - @POPPLER_TREE@/poppler/Gfx.cc \ - @POPPLER_TREE@/poppler/GfxFont.cc \ - @POPPLER_TREE@/poppler/GfxState.cc \ - @POPPLER_TREE@/poppler/GlobalParams.cc \ - @POPPLER_TREE@/poppler/Hints.cc \ - @POPPLER_TREE@/poppler/JArithmeticDecoder.cc \ - @POPPLER_TREE@/poppler/JBIG2Stream.cc \ - @POPPLER_TREE@/poppler/JPXStream.cc \ - @POPPLER_TREE@/poppler/Lexer.cc \ - @POPPLER_TREE@/poppler/Linearization.cc \ - @POPPLER_TREE@/poppler/Link.cc \ - @POPPLER_TREE@/poppler/MarkedContentOutputDev.cc \ - @POPPLER_TREE@/poppler/Movie.cc \ - @POPPLER_TREE@/poppler/NameToCharCode.cc \ - @POPPLER_TREE@/poppler/Object.cc \ - @POPPLER_TREE@/poppler/OptionalContent.cc \ - @POPPLER_TREE@/poppler/Outline.cc \ - @POPPLER_TREE@/poppler/OutputDev.cc \ - @POPPLER_TREE@/poppler/PDFDoc.cc \ - @POPPLER_TREE@/poppler/PDFDocEncoding.cc \ - @POPPLER_TREE@/poppler/PDFDocFactory.cc \ - @POPPLER_TREE@/poppler/PSTokenizer.cc \ - @POPPLER_TREE@/poppler/Page.cc \ - @POPPLER_TREE@/poppler/PageLabelInfo.cc \ - @POPPLER_TREE@/poppler/PageTransition.cc \ - @POPPLER_TREE@/poppler/Parser.cc \ - @POPPLER_TREE@/poppler/PopplerCache.cc \ - @POPPLER_TREE@/poppler/PreScanOutputDev.cc \ - @POPPLER_TREE@/poppler/ProfileData.cc \ - @POPPLER_TREE@/poppler/Rendition.cc \ - @POPPLER_TREE@/poppler/SecurityHandler.cc \ - @POPPLER_TREE@/poppler/SignatureInfo.cc \ - @POPPLER_TREE@/poppler/Sound.cc \ - @POPPLER_TREE@/poppler/StdinCachedFile.cc \ - @POPPLER_TREE@/poppler/StdinPDFDocBuilder.cc \ - @POPPLER_TREE@/poppler/Stream.cc \ - @POPPLER_TREE@/poppler/StructElement.cc \ - @POPPLER_TREE@/poppler/StructTreeRoot.cc \ - @POPPLER_TREE@/poppler/UTF.cc \ - @POPPLER_TREE@/poppler/UnicodeMap.cc \ - @POPPLER_TREE@/poppler/UnicodeMapFuncs.cc \ - @POPPLER_TREE@/poppler/UnicodeTypeTable.cc \ - @POPPLER_TREE@/poppler/ViewerPreferences.cc \ - @POPPLER_TREE@/poppler/XRef.cc \ - @POPPLER_TREE@/poppler/XpdfPluginAPI.cc - -$(libpoppler_a_OBJECTS): config.force - -## Rebuild zlib -@ZLIB_RULE@ - -# Reconfig -reconfig_prereq = $(ZLIB_DEPEND) -DISTCLEANFILES = - -include $(srcdir)/../../am/reconfig.am - -# Rebuild -rebuild_prereq = -rebuild_target = all -CLEANFILES = - -include $(srcdir)/../../am/rebuild.am - diff --git a/Build/source/libs/poppler/Makefile.in b/Build/source/libs/poppler/Makefile.in deleted file mode 100644 index e7c3ea56f8f..00000000000 --- a/Build/source/libs/poppler/Makefile.in +++ /dev/null @@ -1,1705 +0,0 @@ -# Makefile.in generated by automake 1.16.2 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2020 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -subdir = . -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/../../m4/ax_cxx_compile_stdcxx.m4 \ - $(top_srcdir)/../../m4/kpse-common.m4 \ - $(top_srcdir)/../../m4/kpse-visibility.m4 \ - $(top_srcdir)/../../m4/kpse-warnings.m4 \ - $(top_srcdir)/../../m4/kpse-win32.m4 \ - $(top_srcdir)/../../m4/kpse-zlib-flags.m4 \ - $(top_srcdir)/version.ac $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ - $(am__configure_deps) $(am__DIST_COMMON) -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno config.status.lineno -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = config.h poppler-config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -AR = ar -ARFLAGS = cru -AM_V_AR = $(am__v_AR_@AM_V@) -am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) -am__v_AR_0 = @echo " AR " $@; -am__v_AR_1 = -libpoppler_a_AR = $(AR) $(ARFLAGS) -libpoppler_a_LIBADD = -am__dirstamp = $(am__leading_dot)dirstamp -am__objects_1 = @POPPLER_TREE@/goo/gfile.$(OBJEXT) \ - @POPPLER_TREE@/goo/glibc.$(OBJEXT) \ - @POPPLER_TREE@/goo/gmem.$(OBJEXT) \ - @POPPLER_TREE@/goo/gmempp.$(OBJEXT) \ - @POPPLER_TREE@/goo/grandom.$(OBJEXT) \ - @POPPLER_TREE@/goo/gstrtod.$(OBJEXT) \ - @POPPLER_TREE@/goo/FixedPoint.$(OBJEXT) \ - @POPPLER_TREE@/goo/GooList.$(OBJEXT) \ - @POPPLER_TREE@/goo/GooString.$(OBJEXT) \ - @POPPLER_TREE@/goo/GooTimer.$(OBJEXT) -am__objects_2 = @POPPLER_TREE@/fofi/FoFiBase.$(OBJEXT) \ - @POPPLER_TREE@/fofi/FoFiEncodings.$(OBJEXT) \ - @POPPLER_TREE@/fofi/FoFiIdentifier.$(OBJEXT) \ - @POPPLER_TREE@/fofi/FoFiTrueType.$(OBJEXT) \ - @POPPLER_TREE@/fofi/FoFiType1.$(OBJEXT) \ - @POPPLER_TREE@/fofi/FoFiType1C.$(OBJEXT) -am__objects_3 = @POPPLER_TREE@/poppler/Annot.$(OBJEXT) \ - @POPPLER_TREE@/poppler/Array.$(OBJEXT) \ - @POPPLER_TREE@/poppler/BuiltinFont.$(OBJEXT) \ - @POPPLER_TREE@/poppler/BuiltinFontTables.$(OBJEXT) \ - @POPPLER_TREE@/poppler/CMap.$(OBJEXT) \ - @POPPLER_TREE@/poppler/CachedFile.$(OBJEXT) \ - @POPPLER_TREE@/poppler/Catalog.$(OBJEXT) \ - @POPPLER_TREE@/poppler/CharCodeToUnicode.$(OBJEXT) \ - @POPPLER_TREE@/poppler/DateInfo.$(OBJEXT) \ - @POPPLER_TREE@/poppler/Decrypt.$(OBJEXT) \ - @POPPLER_TREE@/poppler/Dict.$(OBJEXT) \ - @POPPLER_TREE@/poppler/Error.$(OBJEXT) \ - @POPPLER_TREE@/poppler/FileSpec.$(OBJEXT) \ - @POPPLER_TREE@/poppler/FlateStream.$(OBJEXT) \ - @POPPLER_TREE@/poppler/FontEncodingTables.$(OBJEXT) \ - @POPPLER_TREE@/poppler/FontInfo.$(OBJEXT) \ - @POPPLER_TREE@/poppler/Form.$(OBJEXT) \ - @POPPLER_TREE@/poppler/Function.$(OBJEXT) \ - @POPPLER_TREE@/poppler/Gfx.$(OBJEXT) \ - @POPPLER_TREE@/poppler/GfxFont.$(OBJEXT) \ - @POPPLER_TREE@/poppler/GfxState.$(OBJEXT) \ - @POPPLER_TREE@/poppler/GlobalParams.$(OBJEXT) \ - @POPPLER_TREE@/poppler/Hints.$(OBJEXT) \ - @POPPLER_TREE@/poppler/JArithmeticDecoder.$(OBJEXT) \ - @POPPLER_TREE@/poppler/JBIG2Stream.$(OBJEXT) \ - @POPPLER_TREE@/poppler/JPXStream.$(OBJEXT) \ - @POPPLER_TREE@/poppler/Lexer.$(OBJEXT) \ - @POPPLER_TREE@/poppler/Linearization.$(OBJEXT) \ - @POPPLER_TREE@/poppler/Link.$(OBJEXT) \ - @POPPLER_TREE@/poppler/MarkedContentOutputDev.$(OBJEXT) \ - @POPPLER_TREE@/poppler/Movie.$(OBJEXT) \ - @POPPLER_TREE@/poppler/NameToCharCode.$(OBJEXT) \ - @POPPLER_TREE@/poppler/Object.$(OBJEXT) \ - @POPPLER_TREE@/poppler/OptionalContent.$(OBJEXT) \ - @POPPLER_TREE@/poppler/Outline.$(OBJEXT) \ - @POPPLER_TREE@/poppler/OutputDev.$(OBJEXT) \ - @POPPLER_TREE@/poppler/PDFDoc.$(OBJEXT) \ - @POPPLER_TREE@/poppler/PDFDocEncoding.$(OBJEXT) \ - @POPPLER_TREE@/poppler/PDFDocFactory.$(OBJEXT) \ - @POPPLER_TREE@/poppler/PSTokenizer.$(OBJEXT) \ - @POPPLER_TREE@/poppler/Page.$(OBJEXT) \ - @POPPLER_TREE@/poppler/PageLabelInfo.$(OBJEXT) \ - @POPPLER_TREE@/poppler/PageTransition.$(OBJEXT) \ - @POPPLER_TREE@/poppler/Parser.$(OBJEXT) \ - @POPPLER_TREE@/poppler/PopplerCache.$(OBJEXT) \ - @POPPLER_TREE@/poppler/PreScanOutputDev.$(OBJEXT) \ - @POPPLER_TREE@/poppler/ProfileData.$(OBJEXT) \ - @POPPLER_TREE@/poppler/Rendition.$(OBJEXT) \ - @POPPLER_TREE@/poppler/SecurityHandler.$(OBJEXT) \ - @POPPLER_TREE@/poppler/SignatureInfo.$(OBJEXT) \ - @POPPLER_TREE@/poppler/Sound.$(OBJEXT) \ - @POPPLER_TREE@/poppler/StdinCachedFile.$(OBJEXT) \ - @POPPLER_TREE@/poppler/StdinPDFDocBuilder.$(OBJEXT) \ - @POPPLER_TREE@/poppler/Stream.$(OBJEXT) \ - @POPPLER_TREE@/poppler/StructElement.$(OBJEXT) \ - @POPPLER_TREE@/poppler/StructTreeRoot.$(OBJEXT) \ - @POPPLER_TREE@/poppler/UTF.$(OBJEXT) \ - @POPPLER_TREE@/poppler/UnicodeMap.$(OBJEXT) \ - @POPPLER_TREE@/poppler/UnicodeMapFuncs.$(OBJEXT) \ - @POPPLER_TREE@/poppler/UnicodeTypeTable.$(OBJEXT) \ - @POPPLER_TREE@/poppler/ViewerPreferences.$(OBJEXT) \ - @POPPLER_TREE@/poppler/XRef.$(OBJEXT) \ - @POPPLER_TREE@/poppler/XpdfPluginAPI.$(OBJEXT) -nodist_libpoppler_a_OBJECTS = $(am__objects_1) $(am__objects_2) \ - $(am__objects_3) -libpoppler_a_OBJECTS = $(nodist_libpoppler_a_OBJECTS) -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/../../build-aux/depcomp -am__maybe_remake_depfiles = depfiles -am__depfiles_remade = @POPPLER_TREE@/fofi/$(DEPDIR)/FoFiBase.Po \ - @POPPLER_TREE@/fofi/$(DEPDIR)/FoFiEncodings.Po \ - @POPPLER_TREE@/fofi/$(DEPDIR)/FoFiIdentifier.Po \ - @POPPLER_TREE@/fofi/$(DEPDIR)/FoFiTrueType.Po \ - @POPPLER_TREE@/fofi/$(DEPDIR)/FoFiType1.Po \ - @POPPLER_TREE@/fofi/$(DEPDIR)/FoFiType1C.Po \ - @POPPLER_TREE@/goo/$(DEPDIR)/FixedPoint.Po \ - @POPPLER_TREE@/goo/$(DEPDIR)/GooList.Po \ - @POPPLER_TREE@/goo/$(DEPDIR)/GooString.Po \ - @POPPLER_TREE@/goo/$(DEPDIR)/GooTimer.Po \ - @POPPLER_TREE@/goo/$(DEPDIR)/gfile.Po \ - @POPPLER_TREE@/goo/$(DEPDIR)/glibc.Po \ - @POPPLER_TREE@/goo/$(DEPDIR)/gmem.Po \ - @POPPLER_TREE@/goo/$(DEPDIR)/gmempp.Po \ - @POPPLER_TREE@/goo/$(DEPDIR)/grandom.Po \ - @POPPLER_TREE@/goo/$(DEPDIR)/gstrtod.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/Annot.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/Array.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/BuiltinFont.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/BuiltinFontTables.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/CMap.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/CachedFile.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/Catalog.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/CharCodeToUnicode.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/DateInfo.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/Decrypt.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/Dict.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/Error.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/FileSpec.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/FlateStream.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/FontEncodingTables.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/FontInfo.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/Form.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/Function.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/Gfx.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/GfxFont.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/GfxState.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/GlobalParams.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/Hints.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/JArithmeticDecoder.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/JBIG2Stream.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/JPXStream.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/Lexer.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/Linearization.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/Link.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/MarkedContentOutputDev.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/Movie.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/NameToCharCode.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/Object.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/OptionalContent.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/Outline.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/OutputDev.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/PDFDoc.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/PDFDocEncoding.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/PDFDocFactory.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/PSTokenizer.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/Page.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/PageLabelInfo.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/PageTransition.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/Parser.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/PopplerCache.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/PreScanOutputDev.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/ProfileData.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/Rendition.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/SecurityHandler.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/SignatureInfo.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/Sound.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/StdinCachedFile.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/StdinPDFDocBuilder.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/Stream.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/StructElement.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/StructTreeRoot.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/UTF.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/UnicodeMap.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/UnicodeMapFuncs.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/UnicodeTypeTable.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/ViewerPreferences.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/XRef.Po \ - @POPPLER_TREE@/poppler/$(DEPDIR)/XpdfPluginAPI.Po -am__mv = mv -f -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -AM_V_CXX = $(am__v_CXX_@AM_V@) -am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) -am__v_CXX_0 = @echo " CXX " $@; -am__v_CXX_1 = -CXXLD = $(CXX) -CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ - -o $@ -AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) -am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) -am__v_CXXLD_0 = @echo " CXXLD " $@; -am__v_CXXLD_1 = -SOURCES = $(nodist_libpoppler_a_SOURCES) -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ - ctags-recursive dvi-recursive html-recursive info-recursive \ - install-data-recursive install-dvi-recursive \ - install-exec-recursive install-html-recursive \ - install-info-recursive install-pdf-recursive \ - install-ps-recursive install-recursive installcheck-recursive \ - installdirs-recursive pdf-recursive ps-recursive \ - tags-recursive uninstall-recursive -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -am__recursive_targets = \ - $(RECURSIVE_TARGETS) \ - $(RECURSIVE_CLEAN_TARGETS) \ - $(am__extra_recursive_targets) -AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ - cscope distdir distdir-am dist dist-all distcheck -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \ - config.h.in -# Read a list of newline-separated strings from the standard input, -# and print each of them once, without duplicates. Input order is -# *not* preserved. -am__uniquify_input = $(AWK) '\ - BEGIN { nonempty = 0; } \ - { items[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in items) print i; }; } \ -' -# Make sure the list of sources is unique. This is necessary because, -# e.g., the same source file might be shared among _SOURCES variables -# for different programs/libraries. -am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -CSCOPE = cscope -DIST_SUBDIRS = $(SUBDIRS) -am__DIST_COMMON = $(srcdir)/../../am/dist_hook.am \ - $(srcdir)/../../am/rebuild.am $(srcdir)/../../am/reconfig.am \ - $(srcdir)/Makefile.in $(srcdir)/config.h.in \ - $(top_srcdir)/../../build-aux/compile \ - $(top_srcdir)/../../build-aux/depcomp \ - $(top_srcdir)/../../build-aux/install-sh \ - $(top_srcdir)/../../build-aux/missing \ - $(top_srcdir)/poppler-src/poppler/poppler-config.h.in \ - ../../build-aux/ar-lib ../../build-aux/compile \ - ../../build-aux/config.guess ../../build-aux/config.sub \ - ../../build-aux/depcomp ../../build-aux/install-sh \ - ../../build-aux/ltmain.sh ../../build-aux/missing \ - ../../build-aux/texinfo.tex ../../build-aux/ylwrap ChangeLog -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -distdir = $(PACKAGE)-$(VERSION) -top_distdir = $(distdir) -am__remove_distdir = \ - if test -d "$(distdir)"; then \ - find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -rf "$(distdir)" \ - || { sleep 5 && rm -rf "$(distdir)"; }; \ - else :; fi -am__post_remove_distdir = $(am__remove_distdir) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -DIST_ARCHIVES = $(distdir).tar.gz -GZIP_ENV = --best -DIST_TARGETS = dist-gzip -distuninstallcheck_listfiles = find . -type f -print -am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ - | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' -distcleancheck_listfiles = find . -type f -print -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -GREP = @GREP@ -HAVE_CXX11 = @HAVE_CXX11@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -NO_WARN_CXXFLAGS = @NO_WARN_CXXFLAGS@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -POPPLER_TREE = @POPPLER_TREE@ -RANLIB = @RANLIB@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -VISIBILITY_CFLAGS = @VISIBILITY_CFLAGS@ -VISIBILITY_CXXFLAGS = @VISIBILITY_CXXFLAGS@ -WARNING_CFLAGS = @WARNING_CFLAGS@ -WARNING_CXXFLAGS = @WARNING_CXXFLAGS@ -ZLIB_DEPEND = @ZLIB_DEPEND@ -ZLIB_INCLUDES = @ZLIB_INCLUDES@ -ZLIB_LIBS = @ZLIB_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build_alias = @build_alias@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host_alias = @host_alias@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -EXTRA_DIST = $(POPPLER_TREE) TLpatches -NEVER_DIST = `find . $(NEVER_NAMES)` - -# Files not to be distributed -NEVER_NAMES = -name .svn $(NEVER_NAMES_SUB) -NEVER_NAMES_SUB = -o -name .deps -o -name .dirstamp -o -name '*.$(OBJEXT)' -NEVER_NAMES_LT = -o -name .libs -o -name '*.lo' -SUBDIRS = . include -GOO_SRC = $(top_srcdir)/$(POPPLER_TREE)/goo -FOFI_SRC = $(top_srcdir)/$(POPPLER_TREE)/fofi -POPPLER_SRC = $(top_srcdir)/$(POPPLER_TREE)/poppler -AM_CPPFLAGS = -I$(top_srcdir)/$(POPPLER_TREE) -I$(GOO_SRC) \ - $(ZLIB_INCLUDES) -DPOPPLER_DATADIR='"."' -AM_CFLAGS = $(VISIBILITY_CFLAGS) $(WARNING_CFLAGS) -AM_CXXFLAGS = $(VISIBILITY_CXXFLAGS) $(NO_WARN_CXXFLAGS) $(CXX_FLAGS_RELEASE) -noinst_LIBRARIES = libpoppler.a -nodist_libpoppler_a_SOURCES = \ - $(goo_libGoo_a_sources) \ - $(fofi_libfofi_a_sources) \ - $(poppler_libpoppler_a_sources) - -goo_libGoo_a_sources = \ - @POPPLER_TREE@/goo/gfile.cc \ - @POPPLER_TREE@/goo/glibc.cc \ - @POPPLER_TREE@/goo/gmem.cc \ - @POPPLER_TREE@/goo/gmempp.cc \ - @POPPLER_TREE@/goo/grandom.cc \ - @POPPLER_TREE@/goo/gstrtod.cc \ - @POPPLER_TREE@/goo/FixedPoint.cc \ - @POPPLER_TREE@/goo/GooList.cc \ - @POPPLER_TREE@/goo/GooString.cc \ - @POPPLER_TREE@/goo/GooTimer.cc - -fofi_libfofi_a_sources = \ - @POPPLER_TREE@/fofi/FoFiBase.cc \ - @POPPLER_TREE@/fofi/FoFiEncodings.cc \ - @POPPLER_TREE@/fofi/FoFiIdentifier.cc \ - @POPPLER_TREE@/fofi/FoFiTrueType.cc \ - @POPPLER_TREE@/fofi/FoFiType1.cc \ - @POPPLER_TREE@/fofi/FoFiType1C.cc - -poppler_libpoppler_a_sources = \ - @POPPLER_TREE@/poppler/Annot.cc \ - @POPPLER_TREE@/poppler/Array.cc \ - @POPPLER_TREE@/poppler/BuiltinFont.cc \ - @POPPLER_TREE@/poppler/BuiltinFontTables.cc \ - @POPPLER_TREE@/poppler/CMap.cc \ - @POPPLER_TREE@/poppler/CachedFile.cc \ - @POPPLER_TREE@/poppler/Catalog.cc \ - @POPPLER_TREE@/poppler/CharCodeToUnicode.cc \ - @POPPLER_TREE@/poppler/DateInfo.cc \ - @POPPLER_TREE@/poppler/Decrypt.cc \ - @POPPLER_TREE@/poppler/Dict.cc \ - @POPPLER_TREE@/poppler/Error.cc \ - @POPPLER_TREE@/poppler/FileSpec.cc \ - @POPPLER_TREE@/poppler/FlateStream.cc \ - @POPPLER_TREE@/poppler/FontEncodingTables.cc \ - @POPPLER_TREE@/poppler/FontInfo.cc \ - @POPPLER_TREE@/poppler/Form.cc \ - @POPPLER_TREE@/poppler/Function.cc \ - @POPPLER_TREE@/poppler/Gfx.cc \ - @POPPLER_TREE@/poppler/GfxFont.cc \ - @POPPLER_TREE@/poppler/GfxState.cc \ - @POPPLER_TREE@/poppler/GlobalParams.cc \ - @POPPLER_TREE@/poppler/Hints.cc \ - @POPPLER_TREE@/poppler/JArithmeticDecoder.cc \ - @POPPLER_TREE@/poppler/JBIG2Stream.cc \ - @POPPLER_TREE@/poppler/JPXStream.cc \ - @POPPLER_TREE@/poppler/Lexer.cc \ - @POPPLER_TREE@/poppler/Linearization.cc \ - @POPPLER_TREE@/poppler/Link.cc \ - @POPPLER_TREE@/poppler/MarkedContentOutputDev.cc \ - @POPPLER_TREE@/poppler/Movie.cc \ - @POPPLER_TREE@/poppler/NameToCharCode.cc \ - @POPPLER_TREE@/poppler/Object.cc \ - @POPPLER_TREE@/poppler/OptionalContent.cc \ - @POPPLER_TREE@/poppler/Outline.cc \ - @POPPLER_TREE@/poppler/OutputDev.cc \ - @POPPLER_TREE@/poppler/PDFDoc.cc \ - @POPPLER_TREE@/poppler/PDFDocEncoding.cc \ - @POPPLER_TREE@/poppler/PDFDocFactory.cc \ - @POPPLER_TREE@/poppler/PSTokenizer.cc \ - @POPPLER_TREE@/poppler/Page.cc \ - @POPPLER_TREE@/poppler/PageLabelInfo.cc \ - @POPPLER_TREE@/poppler/PageTransition.cc \ - @POPPLER_TREE@/poppler/Parser.cc \ - @POPPLER_TREE@/poppler/PopplerCache.cc \ - @POPPLER_TREE@/poppler/PreScanOutputDev.cc \ - @POPPLER_TREE@/poppler/ProfileData.cc \ - @POPPLER_TREE@/poppler/Rendition.cc \ - @POPPLER_TREE@/poppler/SecurityHandler.cc \ - @POPPLER_TREE@/poppler/SignatureInfo.cc \ - @POPPLER_TREE@/poppler/Sound.cc \ - @POPPLER_TREE@/poppler/StdinCachedFile.cc \ - @POPPLER_TREE@/poppler/StdinPDFDocBuilder.cc \ - @POPPLER_TREE@/poppler/Stream.cc \ - @POPPLER_TREE@/poppler/StructElement.cc \ - @POPPLER_TREE@/poppler/StructTreeRoot.cc \ - @POPPLER_TREE@/poppler/UTF.cc \ - @POPPLER_TREE@/poppler/UnicodeMap.cc \ - @POPPLER_TREE@/poppler/UnicodeMapFuncs.cc \ - @POPPLER_TREE@/poppler/UnicodeTypeTable.cc \ - @POPPLER_TREE@/poppler/ViewerPreferences.cc \ - @POPPLER_TREE@/poppler/XRef.cc \ - @POPPLER_TREE@/poppler/XpdfPluginAPI.cc - - -# Reconfig -reconfig_prereq = $(ZLIB_DEPEND) -DISTCLEANFILES = config.force - -# Rebuild -rebuild_prereq = -rebuild_target = all -CLEANFILES = rebuild.stamp -all: config.h poppler-config.h - $(MAKE) $(AM_MAKEFLAGS) all-recursive - -.SUFFIXES: -.SUFFIXES: .cc .o .obj -am--refresh: Makefile - @: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/../../am/dist_hook.am $(srcdir)/../../am/reconfig.am $(srcdir)/../../am/rebuild.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ - $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - echo ' $(SHELL) ./config.status'; \ - $(SHELL) ./config.status;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ - esac; -$(srcdir)/../../am/dist_hook.am $(srcdir)/../../am/reconfig.am $(srcdir)/../../am/rebuild.am $(am__empty): - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - $(SHELL) ./config.status --recheck - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - $(am__cd) $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) -$(am__aclocal_m4_deps): - -config.h: stamp-h1 - @test -f $@ || rm -f stamp-h1 - @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 - -stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status - @rm -f stamp-h1 - cd $(top_builddir) && $(SHELL) ./config.status config.h -$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) - rm -f stamp-h1 - touch $@ - -poppler-config.h: stamp-h2 - @test -f $@ || rm -f stamp-h2 - @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h2 - -stamp-h2: $(top_srcdir)/poppler-src/poppler/poppler-config.h.in $(top_builddir)/config.status - @rm -f stamp-h2 - cd $(top_builddir) && $(SHELL) ./config.status poppler-config.h - -distclean-hdr: - -rm -f config.h stamp-h1 poppler-config.h stamp-h2 - -clean-noinstLIBRARIES: - -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -@POPPLER_TREE@/goo/$(am__dirstamp): - @$(MKDIR_P) @POPPLER_TREE@/goo - @: > @POPPLER_TREE@/goo/$(am__dirstamp) -@POPPLER_TREE@/goo/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) @POPPLER_TREE@/goo/$(DEPDIR) - @: > @POPPLER_TREE@/goo/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/goo/gfile.$(OBJEXT): \ - @POPPLER_TREE@/goo/$(am__dirstamp) \ - @POPPLER_TREE@/goo/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/goo/glibc.$(OBJEXT): \ - @POPPLER_TREE@/goo/$(am__dirstamp) \ - @POPPLER_TREE@/goo/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/goo/gmem.$(OBJEXT): @POPPLER_TREE@/goo/$(am__dirstamp) \ - @POPPLER_TREE@/goo/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/goo/gmempp.$(OBJEXT): \ - @POPPLER_TREE@/goo/$(am__dirstamp) \ - @POPPLER_TREE@/goo/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/goo/grandom.$(OBJEXT): \ - @POPPLER_TREE@/goo/$(am__dirstamp) \ - @POPPLER_TREE@/goo/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/goo/gstrtod.$(OBJEXT): \ - @POPPLER_TREE@/goo/$(am__dirstamp) \ - @POPPLER_TREE@/goo/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/goo/FixedPoint.$(OBJEXT): \ - @POPPLER_TREE@/goo/$(am__dirstamp) \ - @POPPLER_TREE@/goo/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/goo/GooList.$(OBJEXT): \ - @POPPLER_TREE@/goo/$(am__dirstamp) \ - @POPPLER_TREE@/goo/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/goo/GooString.$(OBJEXT): \ - @POPPLER_TREE@/goo/$(am__dirstamp) \ - @POPPLER_TREE@/goo/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/goo/GooTimer.$(OBJEXT): \ - @POPPLER_TREE@/goo/$(am__dirstamp) \ - @POPPLER_TREE@/goo/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/fofi/$(am__dirstamp): - @$(MKDIR_P) @POPPLER_TREE@/fofi - @: > @POPPLER_TREE@/fofi/$(am__dirstamp) -@POPPLER_TREE@/fofi/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) @POPPLER_TREE@/fofi/$(DEPDIR) - @: > @POPPLER_TREE@/fofi/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/fofi/FoFiBase.$(OBJEXT): \ - @POPPLER_TREE@/fofi/$(am__dirstamp) \ - @POPPLER_TREE@/fofi/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/fofi/FoFiEncodings.$(OBJEXT): \ - @POPPLER_TREE@/fofi/$(am__dirstamp) \ - @POPPLER_TREE@/fofi/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/fofi/FoFiIdentifier.$(OBJEXT): \ - @POPPLER_TREE@/fofi/$(am__dirstamp) \ - @POPPLER_TREE@/fofi/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/fofi/FoFiTrueType.$(OBJEXT): \ - @POPPLER_TREE@/fofi/$(am__dirstamp) \ - @POPPLER_TREE@/fofi/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/fofi/FoFiType1.$(OBJEXT): \ - @POPPLER_TREE@/fofi/$(am__dirstamp) \ - @POPPLER_TREE@/fofi/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/fofi/FoFiType1C.$(OBJEXT): \ - @POPPLER_TREE@/fofi/$(am__dirstamp) \ - @POPPLER_TREE@/fofi/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/$(am__dirstamp): - @$(MKDIR_P) @POPPLER_TREE@/poppler - @: > @POPPLER_TREE@/poppler/$(am__dirstamp) -@POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) @POPPLER_TREE@/poppler/$(DEPDIR) - @: > @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/Annot.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/Array.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/BuiltinFont.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/BuiltinFontTables.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/CMap.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/CachedFile.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/Catalog.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/CharCodeToUnicode.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/DateInfo.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/Decrypt.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/Dict.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/Error.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/FileSpec.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/FlateStream.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/FontEncodingTables.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/FontInfo.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/Form.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/Function.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/Gfx.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/GfxFont.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/GfxState.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/GlobalParams.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/Hints.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/JArithmeticDecoder.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/JBIG2Stream.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/JPXStream.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/Lexer.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/Linearization.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/Link.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/MarkedContentOutputDev.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/Movie.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/NameToCharCode.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/Object.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/OptionalContent.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/Outline.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/OutputDev.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/PDFDoc.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/PDFDocEncoding.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/PDFDocFactory.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/PSTokenizer.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/Page.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/PageLabelInfo.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/PageTransition.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/Parser.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/PopplerCache.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/PreScanOutputDev.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/ProfileData.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/Rendition.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/SecurityHandler.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/SignatureInfo.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/Sound.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/StdinCachedFile.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/StdinPDFDocBuilder.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/Stream.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/StructElement.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/StructTreeRoot.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/UTF.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/UnicodeMap.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/UnicodeMapFuncs.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/UnicodeTypeTable.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/ViewerPreferences.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/XRef.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) -@POPPLER_TREE@/poppler/XpdfPluginAPI.$(OBJEXT): \ - @POPPLER_TREE@/poppler/$(am__dirstamp) \ - @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) - -libpoppler.a: $(libpoppler_a_OBJECTS) $(libpoppler_a_DEPENDENCIES) $(EXTRA_libpoppler_a_DEPENDENCIES) - $(AM_V_at)-rm -f libpoppler.a - $(AM_V_AR)$(libpoppler_a_AR) libpoppler.a $(libpoppler_a_OBJECTS) $(libpoppler_a_LIBADD) - $(AM_V_at)$(RANLIB) libpoppler.a - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -rm -f @POPPLER_TREE@/fofi/*.$(OBJEXT) - -rm -f @POPPLER_TREE@/goo/*.$(OBJEXT) - -rm -f @POPPLER_TREE@/poppler/*.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/fofi/$(DEPDIR)/FoFiBase.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/fofi/$(DEPDIR)/FoFiEncodings.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/fofi/$(DEPDIR)/FoFiIdentifier.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/fofi/$(DEPDIR)/FoFiTrueType.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/fofi/$(DEPDIR)/FoFiType1.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/fofi/$(DEPDIR)/FoFiType1C.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/goo/$(DEPDIR)/FixedPoint.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/goo/$(DEPDIR)/GooList.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/goo/$(DEPDIR)/GooString.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/goo/$(DEPDIR)/GooTimer.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/goo/$(DEPDIR)/gfile.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/goo/$(DEPDIR)/glibc.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/goo/$(DEPDIR)/gmem.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/goo/$(DEPDIR)/gmempp.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/goo/$(DEPDIR)/grandom.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/goo/$(DEPDIR)/gstrtod.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/Annot.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/Array.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/BuiltinFont.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/BuiltinFontTables.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/CMap.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/CachedFile.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/Catalog.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/CharCodeToUnicode.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/DateInfo.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/Decrypt.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/Dict.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/Error.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/FileSpec.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/FlateStream.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/FontEncodingTables.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/FontInfo.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/Form.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/Function.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/Gfx.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/GfxFont.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/GfxState.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/GlobalParams.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/Hints.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/JArithmeticDecoder.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/JBIG2Stream.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/JPXStream.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/Lexer.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/Linearization.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/Link.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/MarkedContentOutputDev.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/Movie.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/NameToCharCode.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/Object.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/OptionalContent.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/Outline.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/OutputDev.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/PDFDoc.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/PDFDocEncoding.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/PDFDocFactory.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/PSTokenizer.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/Page.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/PageLabelInfo.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/PageTransition.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/Parser.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/PopplerCache.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/PreScanOutputDev.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/ProfileData.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/Rendition.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/SecurityHandler.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/SignatureInfo.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/Sound.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/StdinCachedFile.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/StdinPDFDocBuilder.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/Stream.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/StructElement.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/StructTreeRoot.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/UTF.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/UnicodeMap.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/UnicodeMapFuncs.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/UnicodeTypeTable.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/ViewerPreferences.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/XRef.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@@POPPLER_TREE@/poppler/$(DEPDIR)/XpdfPluginAPI.Po@am__quote@ # am--include-marker - -$(am__depfiles_remade): - @$(MKDIR_P) $(@D) - @echo '# dummy' >$@-t && $(am__mv) $@-t $@ - -am--depfiles: $(am__depfiles_remade) - -.cc.o: -@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ -@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< - -.cc.obj: -@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ -@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -# This directory's subdirectories are mostly independent; you can cd -# into them and run 'make' without going through this Makefile. -# To change the values of 'make' variables: instead of editing Makefiles, -# (1) if the variable is set in 'config.status', edit 'config.status' -# (which will cause the Makefiles to be regenerated when you run 'make'); -# (2) otherwise, pass the desired values on the 'make' command line. -$(am__recursive_targets): - @fail=; \ - if $(am__make_keepgoing); then \ - failcom='fail=yes'; \ - else \ - failcom='exit 1'; \ - fi; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-recursive -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-recursive - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" -cscope: cscope.files - test ! -s cscope.files \ - || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) -clean-cscope: - -rm -f cscope.files -cscope.files: clean-cscope cscopelist -cscopelist: cscopelist-recursive - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -rm -f cscope.out cscope.in.out cscope.po.out cscope.files - -distdir: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) distdir-am - -distdir-am: $(DISTFILES) - $(am__remove_distdir) - test -d "$(distdir)" || mkdir "$(distdir)" - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - $(am__make_dryrun) \ - || test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ - $(am__relativize); \ - new_distdir=$$reldir; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook - -test -n "$(am__skip_mode_fix)" \ - || find "$(distdir)" -type d ! -perm -755 \ - -exec chmod u+rwx,go+rx {} \; -o \ - ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r "$(distdir)" -dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz - $(am__post_remove_distdir) - -dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 - $(am__post_remove_distdir) - -dist-lzip: distdir - tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz - $(am__post_remove_distdir) - -dist-xz: distdir - tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz - $(am__post_remove_distdir) - -dist-zstd: distdir - tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst - $(am__post_remove_distdir) - -dist-tarZ: distdir - @echo WARNING: "Support for distribution archives compressed with" \ - "legacy program 'compress' is deprecated." >&2 - @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 - tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__post_remove_distdir) - -dist-shar: distdir - @echo WARNING: "Support for shar distribution archives is" \ - "deprecated." >&2 - @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 - shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz - $(am__post_remove_distdir) - -dist-zip: distdir - -rm -f $(distdir).zip - zip -rq $(distdir).zip $(distdir) - $(am__post_remove_distdir) - -dist dist-all: - $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' - $(am__post_remove_distdir) - -# This target untars the dist file and tries a VPATH configuration. Then -# it guarantees that the distribution is self-contained by making another -# tarfile. -distcheck: dist - case '$(DIST_ARCHIVES)' in \ - *.tar.gz*) \ - eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ - *.tar.bz2*) \ - bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.lz*) \ - lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ - *.tar.xz*) \ - xz -dc $(distdir).tar.xz | $(am__untar) ;;\ - *.tar.Z*) \ - uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ - *.shar.gz*) \ - eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ - *.zip*) \ - unzip $(distdir).zip ;;\ - *.tar.zst*) \ - zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ - esac - chmod -R a-w $(distdir) - chmod u+w $(distdir) - mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst - chmod a-w $(distdir) - test -d $(distdir)/_build || exit 0; \ - dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ - && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && am__cwd=`pwd` \ - && $(am__cd) $(distdir)/_build/sub \ - && ../../configure \ - $(AM_DISTCHECK_CONFIGURE_FLAGS) \ - $(DISTCHECK_CONFIGURE_FLAGS) \ - --srcdir=../.. --prefix="$$dc_install_base" \ - && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ - && $(MAKE) $(AM_MAKEFLAGS) check \ - && $(MAKE) $(AM_MAKEFLAGS) install \ - && $(MAKE) $(AM_MAKEFLAGS) installcheck \ - && $(MAKE) $(AM_MAKEFLAGS) uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ - distuninstallcheck \ - && chmod -R a-w "$$dc_install_base" \ - && ({ \ - (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ - distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ - } || { rm -rf "$$dc_destdir"; exit 1; }) \ - && rm -rf "$$dc_destdir" \ - && $(MAKE) $(AM_MAKEFLAGS) dist \ - && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ - && cd "$$am__cwd" \ - || exit 1 - $(am__post_remove_distdir) - @(echo "$(distdir) archives ready for distribution: "; \ - list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' -distuninstallcheck: - @test -n '$(distuninstallcheck_dir)' || { \ - echo 'ERROR: trying to run $@ with an empty' \ - '$$(distuninstallcheck_dir)' >&2; \ - exit 1; \ - }; \ - $(am__cd) '$(distuninstallcheck_dir)' || { \ - echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ - exit 1; \ - }; \ - test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left after uninstall:" ; \ - if test -n "$(DESTDIR)"; then \ - echo " (check DESTDIR support)"; \ - fi ; \ - $(distuninstallcheck_listfiles) ; \ - exit 1; } >&2 -distcleancheck: distclean - @if test '$(srcdir)' = . ; then \ - echo "ERROR: distcleancheck can only run from a VPATH build" ; \ - exit 1 ; \ - fi - @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left in build directory after distclean:" ; \ - $(distcleancheck_listfiles) ; \ - exit 1; } >&2 -check-am: all-am -check: check-recursive -all-am: Makefile $(LIBRARIES) config.h poppler-config.h -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -rm -f @POPPLER_TREE@/fofi/$(DEPDIR)/$(am__dirstamp) - -rm -f @POPPLER_TREE@/fofi/$(am__dirstamp) - -rm -f @POPPLER_TREE@/goo/$(DEPDIR)/$(am__dirstamp) - -rm -f @POPPLER_TREE@/goo/$(am__dirstamp) - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/$(am__dirstamp) - -rm -f @POPPLER_TREE@/poppler/$(am__dirstamp) - -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am - -distclean: distclean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -f @POPPLER_TREE@/fofi/$(DEPDIR)/FoFiBase.Po - -rm -f @POPPLER_TREE@/fofi/$(DEPDIR)/FoFiEncodings.Po - -rm -f @POPPLER_TREE@/fofi/$(DEPDIR)/FoFiIdentifier.Po - -rm -f @POPPLER_TREE@/fofi/$(DEPDIR)/FoFiTrueType.Po - -rm -f @POPPLER_TREE@/fofi/$(DEPDIR)/FoFiType1.Po - -rm -f @POPPLER_TREE@/fofi/$(DEPDIR)/FoFiType1C.Po - -rm -f @POPPLER_TREE@/goo/$(DEPDIR)/FixedPoint.Po - -rm -f @POPPLER_TREE@/goo/$(DEPDIR)/GooList.Po - -rm -f @POPPLER_TREE@/goo/$(DEPDIR)/GooString.Po - -rm -f @POPPLER_TREE@/goo/$(DEPDIR)/GooTimer.Po - -rm -f @POPPLER_TREE@/goo/$(DEPDIR)/gfile.Po - -rm -f @POPPLER_TREE@/goo/$(DEPDIR)/glibc.Po - -rm -f @POPPLER_TREE@/goo/$(DEPDIR)/gmem.Po - -rm -f @POPPLER_TREE@/goo/$(DEPDIR)/gmempp.Po - -rm -f @POPPLER_TREE@/goo/$(DEPDIR)/grandom.Po - -rm -f @POPPLER_TREE@/goo/$(DEPDIR)/gstrtod.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/Annot.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/Array.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/BuiltinFont.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/BuiltinFontTables.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/CMap.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/CachedFile.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/Catalog.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/CharCodeToUnicode.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/DateInfo.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/Decrypt.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/Dict.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/Error.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/FileSpec.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/FlateStream.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/FontEncodingTables.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/FontInfo.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/Form.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/Function.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/Gfx.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/GfxFont.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/GfxState.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/GlobalParams.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/Hints.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/JArithmeticDecoder.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/JBIG2Stream.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/JPXStream.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/Lexer.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/Linearization.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/Link.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/MarkedContentOutputDev.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/Movie.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/NameToCharCode.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/Object.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/OptionalContent.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/Outline.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/OutputDev.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/PDFDoc.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/PDFDocEncoding.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/PDFDocFactory.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/PSTokenizer.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/Page.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/PageLabelInfo.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/PageTransition.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/Parser.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/PopplerCache.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/PreScanOutputDev.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/ProfileData.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/Rendition.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/SecurityHandler.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/SignatureInfo.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/Sound.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/StdinCachedFile.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/StdinPDFDocBuilder.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/Stream.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/StructElement.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/StructTreeRoot.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/UTF.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/UnicodeMap.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/UnicodeMapFuncs.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/UnicodeTypeTable.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/ViewerPreferences.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/XRef.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/XpdfPluginAPI.Po - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-hdr distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: - -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf $(top_srcdir)/autom4te.cache - -rm -f @POPPLER_TREE@/fofi/$(DEPDIR)/FoFiBase.Po - -rm -f @POPPLER_TREE@/fofi/$(DEPDIR)/FoFiEncodings.Po - -rm -f @POPPLER_TREE@/fofi/$(DEPDIR)/FoFiIdentifier.Po - -rm -f @POPPLER_TREE@/fofi/$(DEPDIR)/FoFiTrueType.Po - -rm -f @POPPLER_TREE@/fofi/$(DEPDIR)/FoFiType1.Po - -rm -f @POPPLER_TREE@/fofi/$(DEPDIR)/FoFiType1C.Po - -rm -f @POPPLER_TREE@/goo/$(DEPDIR)/FixedPoint.Po - -rm -f @POPPLER_TREE@/goo/$(DEPDIR)/GooList.Po - -rm -f @POPPLER_TREE@/goo/$(DEPDIR)/GooString.Po - -rm -f @POPPLER_TREE@/goo/$(DEPDIR)/GooTimer.Po - -rm -f @POPPLER_TREE@/goo/$(DEPDIR)/gfile.Po - -rm -f @POPPLER_TREE@/goo/$(DEPDIR)/glibc.Po - -rm -f @POPPLER_TREE@/goo/$(DEPDIR)/gmem.Po - -rm -f @POPPLER_TREE@/goo/$(DEPDIR)/gmempp.Po - -rm -f @POPPLER_TREE@/goo/$(DEPDIR)/grandom.Po - -rm -f @POPPLER_TREE@/goo/$(DEPDIR)/gstrtod.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/Annot.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/Array.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/BuiltinFont.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/BuiltinFontTables.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/CMap.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/CachedFile.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/Catalog.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/CharCodeToUnicode.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/DateInfo.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/Decrypt.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/Dict.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/Error.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/FileSpec.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/FlateStream.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/FontEncodingTables.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/FontInfo.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/Form.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/Function.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/Gfx.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/GfxFont.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/GfxState.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/GlobalParams.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/Hints.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/JArithmeticDecoder.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/JBIG2Stream.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/JPXStream.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/Lexer.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/Linearization.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/Link.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/MarkedContentOutputDev.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/Movie.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/NameToCharCode.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/Object.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/OptionalContent.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/Outline.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/OutputDev.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/PDFDoc.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/PDFDocEncoding.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/PDFDocFactory.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/PSTokenizer.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/Page.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/PageLabelInfo.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/PageTransition.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/Parser.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/PopplerCache.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/PreScanOutputDev.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/ProfileData.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/Rendition.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/SecurityHandler.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/SignatureInfo.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/Sound.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/StdinCachedFile.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/StdinPDFDocBuilder.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/Stream.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/StructElement.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/StructTreeRoot.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/UTF.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/UnicodeMap.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/UnicodeMapFuncs.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/UnicodeTypeTable.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/ViewerPreferences.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/XRef.Po - -rm -f @POPPLER_TREE@/poppler/$(DEPDIR)/XpdfPluginAPI.Po - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-compile mostlyclean-generic - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: - -.MAKE: $(am__recursive_targets) all install-am install-strip - -.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ - am--depfiles am--refresh check check-am clean clean-cscope \ - clean-generic clean-noinstLIBRARIES cscope cscopelist-am ctags \ - ctags-am dist dist-all dist-bzip2 dist-gzip dist-hook \ - dist-lzip dist-shar dist-tarZ dist-xz dist-zip dist-zstd \ - distcheck distclean distclean-compile distclean-generic \ - distclean-hdr distclean-tags distcleancheck distdir \ - distuninstallcheck dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ - ps ps-am tags tags-am uninstall uninstall-am - -.PRECIOUS: Makefile - -dist-hook: - cd "$(distdir)" && rm -rf $(NEVER_DIST) - -$(libpoppler_a_OBJECTS): $(ZLIB_DEPEND) - -$(libpoppler_a_OBJECTS): config.force - -@ZLIB_RULE@ -config.force: $(reconfig_prereq) - @if test -f $@; then :; else \ - trap 'rm -rf reconfig.lock' 1 2 13 15; \ - if mkdir reconfig.lock 2>/dev/null; then \ - echo timestamp >$@; \ - $(SHELL) ./config.status --recheck; \ - rmdir reconfig.lock; \ - else \ - while test -d rebuild.lock && test -z "$$dry"; do sleep 1; done; \ - test -f $@; \ - fi; \ - fi -rebuild.stamp: $(rebuild_target) - echo timestamp >$@ - -.PHONY: rebuild -rebuild: $(rebuild_prereq) - @dry=; for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=*|--*);; \ - *n*) dry=:;; \ - esac; \ - done; \ - if test -f rebuild.stamp; then :; else \ - $$dry trap 'rm -rf rebuild.lock' 1 2 13 15; \ - if $$dry mkdir rebuild.lock 2>/dev/null; then \ - $(MAKE) $(AM_MAKEFLAGS) rebuild.stamp; \ - $$dry rmdir rebuild.lock; \ - else \ - while test -d rebuild.lock && test -z "$$dry"; do sleep 1; done; \ - fi; \ - $$dry test -f rebuild.stamp; exit $$?; \ - fi - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/Build/source/libs/poppler/TLpatches/ChangeLog b/Build/source/libs/poppler/TLpatches/ChangeLog deleted file mode 100644 index 418de163d1c..00000000000 --- a/Build/source/libs/poppler/TLpatches/ChangeLog +++ /dev/null @@ -1,435 +0,0 @@ -2018-08-20 Akira Kakuto - - * patch-03-time: Adapted. - -2018-07-21 Akira Kakuto - - * patch-03-time: Adapted. - -2018-06-20 Akira Kakuto - - * patch-03-time: Adapted. - -2018-05-21 Akira Kakuto - - * patch-03-time: Adapted. - -2018-04-29 Akira Kakuto - - * patch-03-time: Adapted. - * patch-05-w32: Removed. - -2018-04-01 Mojca Miklavec - - * patch-03-time: Adapted. - * patch-04-ctime: Removed. - -2018-03-20 Akira Kakuto - - * patch-05-w32: Added to compile gfile.cc on Windows. - -2018-03-18 Akira Kakuto - - * Import poppler-0.63.0. - -2018-01-15 Karl Berry - - * patch-04-ctime: add. - -2018-01-08 Karl Berry - - Imported poppler-0.62.0 source tree from: - http://poppler.freedesktop.org/ - * patch-02-LLONG_MAX, patch-03-Object-functions: try removing, - seems like the source may have moved on by now, especially - what with requiring C++11. - -2017-02-17 Akira Kakuto - - Imported poppler-0.52.0 source tree from: - http://poppler.freedesktop.org/ - * patch-02-LLONG_MAX, patch-03-Object-functions: Adapted. - -2017-01-15 Akira Kakuto - - Imported poppler-0.51.0 source tree from: - http://poppler.freedesktop.org/ - * patch-02-LLONG_MAX, patch-03-Object-functions: Adapted. - -2016-12-16 Akira Kakuto - - Imported poppler-0.50.0 source tree from: - http://poppler.freedesktop.org/ - * patch-02-LLONG_MAX, patch-03-Object-functions: Adapted. - -2016-11-15 Akira Kakuto - - Imported poppler-0.49.0 source tree from: - http://poppler.freedesktop.org/ - * patch-02-LLONG_MAX, patch-03-Object-functions: Adapted. - -2016-10-08 Akira Kakuto - - Imported poppler-0.48.0 source tree from: - http://poppler.freedesktop.org/ - * patch-02-LLONG_MAX, patch-03-Object-functions: Adapted. - -2016-08-19 Akira Kakuto - - Imported poppler-0.47.0 source tree from: - http://poppler.freedesktop.org/ - * patch-02-LLONG_MAX, patch-03-Object-functions: Adapted. - -2016-07-25 Akira Kakuto - - Imported poppler-0.46.0 source tree from: - http://poppler.freedesktop.org/ - * patch-02-LLONG_MAX, patch-03-Object-functions: Adapted. - -2016-06-18 Akira Kakuto - - Imported poppler-0.45.0 source tree from: - http://poppler.freedesktop.org/ - * patch-02-LLONG_MAX, patch-03-Object-functions: Adapted. - -2016-05-22 Akira Kakuto - - Imported poppler-0.44.0 source tree from: - http://poppler.freedesktop.org/ - * patch-02-LLONG_MAX, patch-03-Object-functions: Adapted. - * patch-04-ULLONG-constants: Removed. - -2016-04-29 Akira Kakuto - - Imported poppler-0.43.0 source tree from: - http://poppler.freedesktop.org/ - * patch-02-LLONG_MAX, patch-03-Object-functions, - patch-04-ULLONG-constants: Adapted. - -2016-03-29 Akira Kakuto - - * patch-04-ULLONG-constants: new patch. - -2016-03-18 Luigi Scarso - - Imported poppler-0.42.0 source tree from: - http://poppler.freedesktop.org/ - Added @POPPLER_TREE@/poppler/SignatureInfo.cc to Makefile.am - -2016-02-17 Akira Kakuto - - Imported poppler-0.41.0 source tree from: - http://poppler.freedesktop.org/ - - * patch-02-LLONG_MAX, patch-03-Object-functions: Adapted. - -2016-01-14 Akira Kakuto - - Imported poppler-0.40.0 source tree from: - http://poppler.freedesktop.org/ - - * patch-02-LLONG_MAX, patch-03-Object-functions: Adapted. - -2015-12-28 Akira Kakuto - - Imported poppler-0.39.0 source tree from: - http://poppler.freedesktop.org/ - - * patch-02-LLONG_MAX, patch-03-Object-functions: Adapted. - -2015-10-10 Peter Breitenlohner - - Imported poppler-0.37.0 source tree from: - http://poppler.freedesktop.org/ - - * patch-02-LLONG_MAX, patch-03-Object-functions: Adapted. - -2015-09-10 Peter Breitenlohner - - Imported poppler-0.36.0 source tree from: - http://poppler.freedesktop.org/ - - * patch-02-LLONG_MAX, patch-03-Object-functions: Adapted. - -2015-09-01 Peter Breitenlohner - - * patch-03-Object-functions (new): Declare parameter of Object - member functions initCmd, isStream, and streamIs as const. - -2015-08-10 Peter Breitenlohner - - Imported poppler-0.35.0 source tree from: - http://poppler.freedesktop.org/ - - * patch-02-LLONG_MAX: Adapted. - -2015-07-09 Peter Breitenlohner - - Imported poppler-0.34.0 source tree from: - http://poppler.freedesktop.org/ - - * patch-02-LLONG_MAX: Adapted. - -2015-06-12 Peter Breitenlohner - - Imported poppler-0.33.0 source tree from: - http://poppler.freedesktop.org/ - - * patch-02-LLONG_MAX: Adapted. - -2015-03-08 Peter Breitenlohner - - Imported poppler-0.32.0 source tree from: - http://poppler.freedesktop.org/ - - * patch-02-LLONG_MAX: Adapted. - -2015-02-06 Peter Breitenlohner - - Imported poppler-0.31.0 source tree from: - http://poppler.freedesktop.org/ - - * patch-02-LLONG_MAX: Adapted. - -2015-01-07 Peter Breitenlohner - - Imported poppler-0.30.0 source tree from: - http://poppler.freedesktop.org/ - - * patch-02-LLONG_MAX: Adapted. - -2014-12-05 Peter Breitenlohner - - Imported poppler-0.29.0 source tree from: - http://poppler.freedesktop.org/ - - * patch-02-LLONG_MAX: Adapted. - -2014-11-04 Peter Breitenlohner - - Imported poppler-0.28.0 source tree from: - http://poppler.freedesktop.org/ - - * patch-02-LLONG_MAX: Adapted. - * patch-10-UTF-16BE (removed): Included upstream. - -2014-10-08 Peter Breitenlohner - - * patch-10-UTF-16BE (new): Backport from poppler git - (submitted by Luigi Scarso ). - -2014-09-29 Peter Breitenlohner - - Imported poppler-0.26.5 source tree from: - http://poppler.freedesktop.org/ - - * patch-02-LLONG_MAX: Adapted. - -2014-08-22 Peter Breitenlohner - - Imported poppler-0.26.4 source tree from: - http://poppler.freedesktop.org/ - - * patch-02-LLONG_MAX: Adapted. - -2014-07-21 Peter Breitenlohner - - Imported poppler-0.26.3 source tree from: - http://poppler.freedesktop.org/ - - * patch-02-LLONG_MAX: Adapted. - -2014-06-20 Peter Breitenlohner - - Imported poppler-0.26.2 source tree from: - http://poppler.freedesktop.org/ - - * patch-02-LLONG_MAX: Adapted. - -2014-05-24 Peter Breitenlohner - - Imported poppler-0.26.1 source tree from: - http://poppler.freedesktop.org/ - - * patch-02-LLONG_MAX: Adapted. - -2014-05-19 Peter Breitenlohner - - Imported poppler-0.26.0 source tree from: - http://poppler.freedesktop.org/ - - * patch-02-LLONG_MAX: Adapted. - - * patch-03-NOMINMAX (removed): Now included upstream. - -2014-03-27 Peter Breitenlohner - - Imported poppler-0.25.2 source tree from: - http://poppler.freedesktop.org/ - - * patch-02-LLONG_MAX: Adapted. - - * patch-03-NOMINMAX (new): Avoid to redefine NOMINMAX. - -2014-01-03 Peter Breitenlohner - - Imported poppler-0.25.1 source tree from: - http://poppler.freedesktop.org/ - - * patch-02-LLONG_MAX: Adapted. - -2013-12-12 Peter Breitenlohner - - Imported poppler-0.25.0 source tree from: - http://poppler.freedesktop.org/ - - * patch-02-LLONG_MAX: Adapted. - -2013-12-02 Peter Breitenlohner - - Imported poppler-0.24.4 source tree from: - http://poppler.freedesktop.org/ - - * patch-02-LLONG_MAX: Adapted. - -2013-10-28 Peter Breitenlohner - - Imported poppler-0.24.3 source tree from: - http://poppler.freedesktop.org/ - - * patch-02-LLONG_MAX: Adapted. - -2013-09-30 Peter Breitenlohner - - Imported poppler-0.24.2 source tree from: - http://poppler.freedesktop.org/ - - * patch-02-LLONG_MAX: Adapted. - -2013-09-10 Peter Breitenlohner - - Imported poppler-0.24.1 source tree from: - http://poppler.freedesktop.org/ - - * patch-02-LLONG_MAX: Adapted. - -2013-07-30 Peter Breitenlohner - - Imported poppler-0.24.0 source tree from: - http://poppler.freedesktop.org/ - - * patch-02-LLONG_MAX: Adapted. - -2013-07-19 Peter Breitenlohner - - Imported poppler-0.23.4 source tree from: - http://poppler.freedesktop.org/ - - * patch-02-LLONG_MAX: Adapted. - -2013-07-02 Peter Breitenlohner - - Imported poppler-0.23.3 source tree from: - http://poppler.freedesktop.org/ - - * patch-01-MINGW_PRINTF_FORMAT (removed): Now included upstream. - * patch-02-LLONG_MAX: Adapted. - -2013-06-18 Peter Breitenlohner - - Imported poppler-0.23.2 source tree from: - http://poppler.freedesktop.org/ - - * patch-01-disable-jpeg (removed): Now included upstream. - * patch-02-warnings (removed): Obsoleted by gcc-4.6. - - * patch-01-MINGW_PRINTF_FORMAT (new): MinGW32 may not define - __MINGW_PRINTF_FORMAT (and __USE_MINGW_ANSI_STDIO could be 0). - * patch-02-LLONG_MAX (new): If necessary define LLONG_MAX etc. - -2013-03-12 Peter Breitenlohner - - Imported poppler-0.22.2 source tree from: - http://poppler.freedesktop.org/ - * patch-02-warnings: Adapted. - - * patch-01-disable-jpeg (new): We build without libjpeg. - -2012-12-31 Peter Breitenlohner - - Imported poppler-0.22.0 source tree from: - http://poppler.freedesktop.org/ - * patch-02-warnings: Adapted. - -2012-10-15 Peter Breitenlohner - - Imported poppler-0.21.0 source tree from: - http://poppler.freedesktop.org/ - * patch-02-warnings: Adapted. - -2012-07-11 Peter Breitenlohner - - Imported poppler-0.20.2 source tree from: - http://poppler.freedesktop.org/ - * patch-02-warnings: Adapted. - -2012-05-11 Peter Breitenlohner - - Imported poppler-0.20.0 source tree from: - http://poppler.freedesktop.org/ - * patch-01-missing-param (removed): Obsolete. - * patch-02-warnings: Adapted. - -2012-05-09 Peter Breitenlohner - - Imported poppler-0.19.4 source tree from: - http://poppler.freedesktop.org/ - * patch-03-POPPLER_VERSION (removed): Obsolete. - * patch-01-missing-param (new): Bug fix, missing new func param. - * patch-02-warnings: Adapted. - -2012-02-23 Peter Breitenlohner - - Imported poppler-0.18.4 source tree from: - http://poppler.freedesktop.org/ - * patch-01-PDF_PARSER_ONLY (removed): Obsolete. - * patch-0[23]-*: Adapted. - -2011-10-18 Peter Breitenlohner - - * patch-04-mingw (removed): Instead add `-lgdi32'. - -2011-10-11 Peter Breitenlohner - - * patch-04-mingw (new): Split off ... - * patch-01-PDF_PARSER_ONLY: ... from here. - -2011-10-10 Peter Breitenlohner - - * patch-03-POPPLER_VERSION: Reorg definition of POPPLER_VERSION. - -2011-10-08 Peter Breitenlohner - - Imported poppler-0.18.0 source tree from: - http://poppler.freedesktop.org/ - * patch-0[123]-*: Adapted. - -2011-04-14 Peter Breitenlohner - - * patch-01-PDF_PARSER_ONLY: Fix PDF_PARSER_ONLY for MinGW. - - * patch-03-POPPLER_VERSION (new): #define POPPLER_VERSION. - -2011-04-12 Peter Breitenlohner - - * patch-02-warnings (new): - poppler/Movie.cc: Cast -1 to Gulong. - goo/PNGWriter.h: Add newline at end of file. - -2011-04-12 Taco Hoekwater - - Imported poppler-0.12.4 source tree from: - http://poppler.freedesktop.org/ - - * patch-01-PDF_PARSER_ONLY (new): Implement PDF_PARSER_ONLY. - diff --git a/Build/source/libs/poppler/TLpatches/TL-Changes b/Build/source/libs/poppler/TLpatches/TL-Changes deleted file mode 100644 index 3a36f6927f8..00000000000 --- a/Build/source/libs/poppler/TLpatches/TL-Changes +++ /dev/null @@ -1,24 +0,0 @@ -Changes applied to the poppler-0.68.0 tree as obtained from: - http://poppler.freedesktop.org/ - -Removed unused dirs: - cmake cpp glib qt5 test utils - -Removed unused files in splash: - only SplashTypes.h is used - -General idea: -update version.ac -mv poppler-src poppler-prev -tar xf poppler-*.tar.gz -mv poppler-0.67.0 poppler-src -cd poppler-src -svn status >/tmp/s -svn add # the ? lines -svn remove # the ! lines -# adapt Makefile.am for new files -# adapt configure.ac as needed -autoreconf -make -C .../Work/libs/poppler/ -# until it succeeds -# try build of everything, luatex/xetex may need updating. diff --git a/Build/source/libs/poppler/TLpatches/patch-03-time b/Build/source/libs/poppler/TLpatches/patch-03-time deleted file mode 100644 index 6b9d3d12a56..00000000000 --- a/Build/source/libs/poppler/TLpatches/patch-03-time +++ /dev/null @@ -1,23 +0,0 @@ -diff -ur poppler-0.68.0/goo/gfile.h poppler-src/goo/gfile.h ---- poppler-0.68.0/goo/gfile.h Mon Aug 20 06:37:51 2018 -+++ poppler-src/goo/gfile.h Mon Aug 20 11:17:15 2018 -@@ -51,8 +51,6 @@ - # include - # endif - #elif defined(ACORN) --#elif defined(MACOS) --# include - #else - # include - # include -diff -ur poppler-0.68.0/poppler/Form.h poppler-src/poppler/Form.h ---- poppler-0.68.0/poppler/Form.h Mon Aug 20 06:37:51 2018 -+++ poppler-src/poppler/Form.h Mon Aug 20 11:18:08 2018 -@@ -36,6 +36,7 @@ - - #include - #include -+#include - - class GooString; - class Array; diff --git a/Build/source/libs/poppler/ac/poppler.ac b/Build/source/libs/poppler/ac/poppler.ac deleted file mode 100644 index f0b0ef93fd5..00000000000 --- a/Build/source/libs/poppler/ac/poppler.ac +++ /dev/null @@ -1,9 +0,0 @@ -## libs/poppler/ac/poppler.ac: configure.ac fragment for the TeX Live subdirectory libs/poppler/ -dnl -dnl Copyright (C) 2011 Peter Breitenlohner -dnl You may freely use, modify and/or distribute this file. -dnl -## basic check of system poppler -KPSE_TRY_LIBXX([poppler], - [#include ], - [GfxFont *gfxFont; gfxFont->decRefCnt();]) diff --git a/Build/source/libs/poppler/ac/withenable.ac b/Build/source/libs/poppler/ac/withenable.ac deleted file mode 100644 index 46dfa070b8a..00000000000 --- a/Build/source/libs/poppler/ac/withenable.ac +++ /dev/null @@ -1,7 +0,0 @@ -## libs/poppler/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/poppler/ -dnl -dnl Copyright (C) 2011 Peter Breitenlohner -dnl You may freely use, modify and/or distribute this file. -dnl -## configure options and TL libraries required for poppler -KPSE_WITH_LIB([poppler], [zlib]) diff --git a/Build/source/libs/poppler/aclocal.m4 b/Build/source/libs/poppler/aclocal.m4 deleted file mode 100644 index 822debbc194..00000000000 --- a/Build/source/libs/poppler/aclocal.m4 +++ /dev/null @@ -1,1179 +0,0 @@ -# generated automatically by aclocal 1.16.2 -*- Autoconf -*- - -# Copyright (C) 1996-2020 Free Software Foundation, Inc. - -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, -[m4_warning([this file was generated for autoconf 2.69. -You have another version of autoconf. It may work, but is not guaranteed to. -If you have problems, you may need to regenerate the build system entirely. -To do so, use the procedure documented by the package, typically 'autoreconf'.])]) - -# Copyright (C) 2002-2020 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_AUTOMAKE_VERSION(VERSION) -# ---------------------------- -# Automake X.Y traces this macro to ensure aclocal.m4 has been -# generated from the m4 files accompanying Automake X.Y. -# (This private macro should not be called outside this file.) -AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.16' -dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to -dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.16.2], [], - [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl -]) - -# _AM_AUTOCONF_VERSION(VERSION) -# ----------------------------- -# aclocal traces this macro to find the Autoconf version. -# This is a private macro too. Using m4_define simplifies -# the logic in aclocal, which can simply ignore this definition. -m4_define([_AM_AUTOCONF_VERSION], []) - -# AM_SET_CURRENT_AUTOMAKE_VERSION -# ------------------------------- -# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. -# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. -AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.16.2])dnl -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) - -# AM_AUX_DIR_EXPAND -*- Autoconf -*- - -# Copyright (C) 2001-2020 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to -# '$srcdir', '$srcdir/..', or '$srcdir/../..'. -# -# Of course, Automake must honor this variable whenever it calls a -# tool from the auxiliary directory. The problem is that $srcdir (and -# therefore $ac_aux_dir as well) can be either absolute or relative, -# depending on how configure is run. This is pretty annoying, since -# it makes $ac_aux_dir quite unusable in subdirectories: in the top -# source directory, any form will work fine, but in subdirectories a -# relative path needs to be adjusted first. -# -# $ac_aux_dir/missing -# fails when called from a subdirectory if $ac_aux_dir is relative -# $top_srcdir/$ac_aux_dir/missing -# fails if $ac_aux_dir is absolute, -# fails when called from a subdirectory in a VPATH build with -# a relative $ac_aux_dir -# -# The reason of the latter failure is that $top_srcdir and $ac_aux_dir -# are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is '.', but things will broke when you -# start a VPATH build or use an absolute $srcdir. -# -# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, -# iff we strip the leading $srcdir from $ac_aux_dir. That would be: -# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` -# and then we would define $MISSING as -# MISSING="\${SHELL} $am_aux_dir/missing" -# This will work as long as MISSING is not called from configure, because -# unfortunately $(top_srcdir) has no meaning in configure. -# However there are other variables, like CC, which are often used in -# configure, and could therefore not use this "fixed" $ac_aux_dir. -# -# Another solution, used here, is to always expand $ac_aux_dir to an -# absolute PATH. The drawback is that using absolute paths prevent a -# configured tree to be moved without reconfiguration. - -AC_DEFUN([AM_AUX_DIR_EXPAND], -[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -# Expand $ac_aux_dir to an absolute path. -am_aux_dir=`cd "$ac_aux_dir" && pwd` -]) - -# AM_CONDITIONAL -*- Autoconf -*- - -# Copyright (C) 1997-2020 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_CONDITIONAL(NAME, SHELL-CONDITION) -# ------------------------------------- -# Define a conditional. -AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ([2.52])dnl - m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE])dnl -AC_SUBST([$1_FALSE])dnl -_AM_SUBST_NOTMAKE([$1_TRUE])dnl -_AM_SUBST_NOTMAKE([$1_FALSE])dnl -m4_define([_AM_COND_VALUE_$1], [$2])dnl -if $2; then - $1_TRUE= - $1_FALSE='#' -else - $1_TRUE='#' - $1_FALSE= -fi -AC_CONFIG_COMMANDS_PRE( -[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then - AC_MSG_ERROR([[conditional "$1" was never defined. -Usually this means the macro was only invoked conditionally.]]) -fi])]) - -# Copyright (C) 1999-2020 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - - -# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be -# written in clear, in which case automake, when reading aclocal.m4, -# will think it sees a *use*, and therefore will trigger all it's -# C support machinery. Also note that it means that autoscan, seeing -# CC etc. in the Makefile, will ask for an AC_PROG_CC use... - - -# _AM_DEPENDENCIES(NAME) -# ---------------------- -# See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". -# We try a few techniques and use that to set a single cache variable. -# -# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was -# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular -# dependency, and given that the user is not expected to run this macro, -# just rely on AC_PROG_CC. -AC_DEFUN([_AM_DEPENDENCIES], -[AC_REQUIRE([AM_SET_DEPDIR])dnl -AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl -AC_REQUIRE([AM_MAKE_INCLUDE])dnl -AC_REQUIRE([AM_DEP_TRACK])dnl - -m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], - [$1], [CXX], [depcc="$CXX" am_compiler_list=], - [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], - [$1], [UPC], [depcc="$UPC" am_compiler_list=], - [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) - -AC_CACHE_CHECK([dependency style of $depcc], - [am_cv_$1_dependencies_compiler_type], -[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named 'D' -- because '-MD' means "put the output - # in D". - rm -rf conftest.dir - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_$1_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` - fi - am__universal=false - m4_case([$1], [CC], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac], - [CXX], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac]) - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with - # Solaris 10 /bin/sh. - echo '/* dummy */' > sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with '-c' and '-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle '-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs. - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # After this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested. - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok '-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_$1_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_$1_dependencies_compiler_type=none -fi -]) -AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) -AM_CONDITIONAL([am__fastdep$1], [ - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) -]) - - -# AM_SET_DEPDIR -# ------------- -# Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES. -AC_DEFUN([AM_SET_DEPDIR], -[AC_REQUIRE([AM_SET_LEADING_DOT])dnl -AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl -]) - - -# AM_DEP_TRACK -# ------------ -AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE([dependency-tracking], [dnl -AS_HELP_STRING( - [--enable-dependency-tracking], - [do not reject slow dependency extractors]) -AS_HELP_STRING( - [--disable-dependency-tracking], - [speeds up one-time build])]) -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' - am__nodep='_no' -fi -AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH])dnl -_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl -AC_SUBST([am__nodep])dnl -_AM_SUBST_NOTMAKE([am__nodep])dnl -]) - -# Generate code to set up dependency tracking. -*- Autoconf -*- - -# Copyright (C) 1999-2020 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# _AM_OUTPUT_DEPENDENCY_COMMANDS -# ------------------------------ -AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[{ - # Older Autoconf quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - # TODO: see whether this extra hack can be removed once we start - # requiring Autoconf 2.70 or later. - AS_CASE([$CONFIG_FILES], - [*\'*], [eval set x "$CONFIG_FILES"], - [*], [set x $CONFIG_FILES]) - shift - # Used to flag and report bootstrapping failures. - am_rc=0 - for am_mf - do - # Strip MF so we end up with the name of the file. - am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile which includes - # dependency-tracking related rules and includes. - # Grep'ing the whole file directly is not great: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ - || continue - am_dirpart=`AS_DIRNAME(["$am_mf"])` - am_filepart=`AS_BASENAME(["$am_mf"])` - AM_RUN_LOG([cd "$am_dirpart" \ - && sed -e '/# am--include-marker/d' "$am_filepart" \ - | $MAKE -f - am--depfiles]) || am_rc=$? - done - if test $am_rc -ne 0; then - AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. If GNU make was not used, consider - re-running the configure script with MAKE="gmake" (or whatever is - necessary). You can also try re-running configure with the - '--disable-dependency-tracking' option to at least be able to build - the package (albeit without support for automatic dependency tracking).]) - fi - AS_UNSET([am_dirpart]) - AS_UNSET([am_filepart]) - AS_UNSET([am_mf]) - AS_UNSET([am_rc]) - rm -f conftest-deps.mk -} -])# _AM_OUTPUT_DEPENDENCY_COMMANDS - - -# AM_OUTPUT_DEPENDENCY_COMMANDS -# ----------------------------- -# This macro should only be invoked once -- use via AC_REQUIRE. -# -# This code is only required when automatic dependency tracking is enabled. -# This creates each '.Po' and '.Plo' makefile fragment that we'll need in -# order to bootstrap the dependency handling code. -AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], -[AC_CONFIG_COMMANDS([depfiles], - [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) - -# Do all the work for Automake. -*- Autoconf -*- - -# Copyright (C) 1996-2020 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This macro actually does too much. Some checks are only needed if -# your package does certain things. But this isn't really a big deal. - -dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. -m4_define([AC_PROG_CC], -m4_defn([AC_PROG_CC]) -[_AM_PROG_CC_C_O -]) - -# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) -# AM_INIT_AUTOMAKE([OPTIONS]) -# ----------------------------------------------- -# The call with PACKAGE and VERSION arguments is the old style -# call (pre autoconf-2.50), which is being phased out. PACKAGE -# and VERSION should now be passed to AC_INIT and removed from -# the call to AM_INIT_AUTOMAKE. -# We support both call styles for the transition. After -# the next Automake release, Autoconf can make the AC_INIT -# arguments mandatory, and then we can depend on a new Autoconf -# release and drop the old call support. -AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.65])dnl -dnl Autoconf wants to disallow AM_ names. We explicitly allow -dnl the ones we care about. -m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl -AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl -AC_REQUIRE([AC_PROG_INSTALL])dnl -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi -AC_SUBST([CYGPATH_W]) - -# Define the identity of the package. -dnl Distinguish between old-style and new-style calls. -m4_ifval([$2], -[AC_DIAGNOSE([obsolete], - [$0: two- and three-arguments forms are deprecated.]) -m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl - AC_SUBST([PACKAGE], [$1])dnl - AC_SUBST([VERSION], [$2])], -[_AM_SET_OPTIONS([$1])dnl -dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. -m4_if( - m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), - [ok:ok],, - [m4_fatal([AC_INIT should be called with package and version arguments])])dnl - AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl - AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl - -_AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) - AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl - -# Some tools Automake needs. -AC_REQUIRE([AM_SANITY_CHECK])dnl -AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) -AM_MISSING_PROG([AUTOCONF], [autoconf]) -AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) -AM_MISSING_PROG([AUTOHEADER], [autoheader]) -AM_MISSING_PROG([MAKEINFO], [makeinfo]) -AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -# For better backward compatibility. To be removed once Automake 1.9.x -# dies out for good. For more background, see: -# -# -AC_SUBST([mkdir_p], ['$(MKDIR_P)']) -# We need awk for the "check" target (and possibly the TAP driver). The -# system "awk" is bad on some platforms. -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([AC_PROG_MAKE_SET])dnl -AC_REQUIRE([AM_SET_LEADING_DOT])dnl -_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], - [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], - [_AM_PROG_TAR([v7])])]) -_AM_IF_OPTION([no-dependencies],, -[AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES([CC])], - [m4_define([AC_PROG_CC], - m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl -AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES([CXX])], - [m4_define([AC_PROG_CXX], - m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES([OBJC])], - [m4_define([AC_PROG_OBJC], - m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], - [_AM_DEPENDENCIES([OBJCXX])], - [m4_define([AC_PROG_OBJCXX], - m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl -]) -AC_REQUIRE([AM_SILENT_RULES])dnl -dnl The testsuite driver may need to know about EXEEXT, so add the -dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This -dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. -AC_CONFIG_COMMANDS_PRE(dnl -[m4_provide_if([_AM_COMPILER_EXEEXT], - [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl - -# POSIX will say in a future version that running "rm -f" with no argument -# is OK; and we want to be able to make that assumption in our Makefile -# recipes. So use an aggressive probe to check that the usage we want is -# actually supported "in the wild" to an acceptable degree. -# See automake bug#10828. -# To make any issue more visible, cause the running configure to be aborted -# by default if the 'rm' program in use doesn't match our expectations; the -# user can still override this though. -if rm -f && rm -fr && rm -rf; then : OK; else - cat >&2 <<'END' -Oops! - -Your 'rm' program seems unable to run without file operands specified -on the command line, even when the '-f' option is present. This is contrary -to the behaviour of most rm programs out there, and not conforming with -the upcoming POSIX standard: - -Please tell bug-automake@gnu.org about your system, including the value -of your $PATH and any error possibly output before this message. This -can help us improve future automake versions. - -END - if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then - echo 'Configuration will proceed anyway, since you have set the' >&2 - echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 - echo >&2 - else - cat >&2 <<'END' -Aborting the configuration process, to ensure you take notice of the issue. - -You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: . - -If you want to complete the configuration process using your problematic -'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM -to "yes", and re-run configure. - -END - AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) - fi -fi -dnl The trailing newline in this macro's definition is deliberate, for -dnl backward compatibility and to allow trailing 'dnl'-style comments -dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. -]) - -dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not -dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further -dnl mangled by Autoconf and run in a shell conditional statement. -m4_define([_AC_COMPILER_EXEEXT], -m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) - -# When config.status generates a header, we must update the stamp-h file. -# This file resides in the same directory as the config header -# that is generated. The stamp files are numbered to have different names. - -# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the -# loop where config.status creates the headers, so we can generate -# our stamp files there. -AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], -[# Compute $1's index in $config_headers. -_am_arg=$1 -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) - -# Copyright (C) 2001-2020 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_INSTALL_SH -# ------------------ -# Define $install_sh. -AC_DEFUN([AM_PROG_INSTALL_SH], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -if test x"${install_sh+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi -AC_SUBST([install_sh])]) - -# Copyright (C) 2003-2020 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# Check whether the underlying file-system supports filenames -# with a leading dot. For instance MS-DOS doesn't. -AC_DEFUN([AM_SET_LEADING_DOT], -[rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null -AC_SUBST([am__leading_dot])]) - -# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- -# From Jim Meyering - -# Copyright (C) 1996-2020 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_MAINTAINER_MODE([DEFAULT-MODE]) -# ---------------------------------- -# Control maintainer-specific portions of Makefiles. -# Default is to disable them, unless 'enable' is passed literally. -# For symmetry, 'disable' may be passed as well. Anyway, the user -# can override the default with the --enable/--disable switch. -AC_DEFUN([AM_MAINTAINER_MODE], -[m4_case(m4_default([$1], [disable]), - [enable], [m4_define([am_maintainer_other], [disable])], - [disable], [m4_define([am_maintainer_other], [enable])], - [m4_define([am_maintainer_other], [enable]) - m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) -AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) - dnl maintainer-mode's default is 'disable' unless 'enable' is passed - AC_ARG_ENABLE([maintainer-mode], - [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], - am_maintainer_other[ make rules and dependencies not useful - (and sometimes confusing) to the casual installer])], - [USE_MAINTAINER_MODE=$enableval], - [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) - AC_MSG_RESULT([$USE_MAINTAINER_MODE]) - AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) - MAINT=$MAINTAINER_MODE_TRUE - AC_SUBST([MAINT])dnl -] -) - -# Check to see how 'make' treats includes. -*- Autoconf -*- - -# Copyright (C) 2001-2020 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_MAKE_INCLUDE() -# ----------------- -# Check whether make has an 'include' directive that can support all -# the idioms we need for our automatic dependency tracking code. -AC_DEFUN([AM_MAKE_INCLUDE], -[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) -cat > confinc.mk << 'END' -am__doit: - @echo this is the am__doit target >confinc.out -.PHONY: am__doit -END -am__include="#" -am__quote= -# BSD make does it like this. -echo '.include "confinc.mk" # ignored' > confmf.BSD -# Other make implementations (GNU, Solaris 10, AIX) do it like this. -echo 'include confinc.mk # ignored' > confmf.GNU -_am_result=no -for s in GNU BSD; do - AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) - AS_CASE([$?:`cat confinc.out 2>/dev/null`], - ['0:this is the am__doit target'], - [AS_CASE([$s], - [BSD], [am__include='.include' am__quote='"'], - [am__include='include' am__quote=''])]) - if test "$am__include" != "#"; then - _am_result="yes ($s style)" - break - fi -done -rm -f confinc.* confmf.* -AC_MSG_RESULT([${_am_result}]) -AC_SUBST([am__include])]) -AC_SUBST([am__quote])]) - -# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- - -# Copyright (C) 1997-2020 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_MISSING_PROG(NAME, PROGRAM) -# ------------------------------ -AC_DEFUN([AM_MISSING_PROG], -[AC_REQUIRE([AM_MISSING_HAS_RUN]) -$1=${$1-"${am_missing_run}$2"} -AC_SUBST($1)]) - -# AM_MISSING_HAS_RUN -# ------------------ -# Define MISSING if not defined so far and test if it is modern enough. -# If it is, set am_missing_run to use it, otherwise, to nothing. -AC_DEFUN([AM_MISSING_HAS_RUN], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([missing])dnl -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --is-lightweight"; then - am_missing_run="$MISSING " -else - am_missing_run= - AC_MSG_WARN(['missing' script is too old or missing]) -fi -]) - -# Helper functions for option handling. -*- Autoconf -*- - -# Copyright (C) 2001-2020 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# _AM_MANGLE_OPTION(NAME) -# ----------------------- -AC_DEFUN([_AM_MANGLE_OPTION], -[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) - -# _AM_SET_OPTION(NAME) -# -------------------- -# Set option NAME. Presently that only means defining a flag for this option. -AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) - -# _AM_SET_OPTIONS(OPTIONS) -# ------------------------ -# OPTIONS is a space-separated list of Automake options. -AC_DEFUN([_AM_SET_OPTIONS], -[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) - -# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) -# ------------------------------------------- -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -AC_DEFUN([_AM_IF_OPTION], -[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) - -# Copyright (C) 1999-2020 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# _AM_PROG_CC_C_O -# --------------- -# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC -# to automatically call this. -AC_DEFUN([_AM_PROG_CC_C_O], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([compile])dnl -AC_LANG_PUSH([C])dnl -AC_CACHE_CHECK( - [whether $CC understands -c and -o together], - [am_cv_prog_cc_c_o], - [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) - # Make sure it works both with $CC and with simple cc. - # Following AC_PROG_CC_C_O, we do the test twice because some - # compilers refuse to overwrite an existing .o file with -o, - # though they will create one. - am_cv_prog_cc_c_o=yes - for am_i in 1 2; do - if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ - && test -f conftest2.$ac_objext; then - : OK - else - am_cv_prog_cc_c_o=no - break - fi - done - rm -f core conftest* - unset am_i]) -if test "$am_cv_prog_cc_c_o" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -AC_LANG_POP([C])]) - -# For backward compatibility. -AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) - -# Copyright (C) 2001-2020 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_RUN_LOG(COMMAND) -# ------------------- -# Run COMMAND, save the exit status in ac_status, and log it. -# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) -AC_DEFUN([AM_RUN_LOG], -[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD - ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - (exit $ac_status); }]) - -# Check to make sure that the build environment is sane. -*- Autoconf -*- - -# Copyright (C) 1996-2020 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_SANITY_CHECK -# --------------- -AC_DEFUN([AM_SANITY_CHECK], -[AC_MSG_CHECKING([whether build environment is sane]) -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[[\\\"\#\$\&\'\`$am_lf]]*) - AC_MSG_ERROR([unsafe absolute working directory name]);; -esac -case $srcdir in - *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) - AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; -esac - -# Do 'set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - am_has_slept=no - for am_try in 1 2; do - echo "timestamp, slept: $am_has_slept" > conftest.file - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken - alias in your environment]) - fi - if test "$[2]" = conftest.file || test $am_try -eq 2; then - break - fi - # Just in case. - sleep 1 - am_has_slept=yes - done - test "$[2]" = conftest.file - ) -then - # Ok. - : -else - AC_MSG_ERROR([newly created file is older than distributed files! -Check your system clock]) -fi -AC_MSG_RESULT([yes]) -# If we didn't sleep, we still need to ensure time stamps of config.status and -# generated files are strictly newer. -am_sleep_pid= -if grep 'slept: no' conftest.file >/dev/null 2>&1; then - ( sleep 1 ) & - am_sleep_pid=$! -fi -AC_CONFIG_COMMANDS_PRE( - [AC_MSG_CHECKING([that generated files are newer than configure]) - if test -n "$am_sleep_pid"; then - # Hide warnings about reused PIDs. - wait $am_sleep_pid 2>/dev/null - fi - AC_MSG_RESULT([done])]) -rm -f conftest.file -]) - -# Copyright (C) 2009-2020 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_SILENT_RULES([DEFAULT]) -# -------------------------- -# Enable less verbose build rules; with the default set to DEFAULT -# ("yes" being less verbose, "no" or empty being verbose). -AC_DEFUN([AM_SILENT_RULES], -[AC_ARG_ENABLE([silent-rules], [dnl -AS_HELP_STRING( - [--enable-silent-rules], - [less verbose build output (undo: "make V=1")]) -AS_HELP_STRING( - [--disable-silent-rules], - [verbose build output (undo: "make V=0")])dnl -]) -case $enable_silent_rules in @%:@ ((( - yes) AM_DEFAULT_VERBOSITY=0;; - no) AM_DEFAULT_VERBOSITY=1;; - *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; -esac -dnl -dnl A few 'make' implementations (e.g., NonStop OS and NextStep) -dnl do not support nested variable expansions. -dnl See automake bug#9928 and bug#10237. -am_make=${MAKE-make} -AC_CACHE_CHECK([whether $am_make supports nested variables], - [am_cv_make_support_nested_variables], - [if AS_ECHO([['TRUE=$(BAR$(V)) -BAR0=false -BAR1=true -V=1 -am__doit: - @$(TRUE) -.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then - am_cv_make_support_nested_variables=yes -else - am_cv_make_support_nested_variables=no -fi]) -if test $am_cv_make_support_nested_variables = yes; then - dnl Using '$V' instead of '$(V)' breaks IRIX make. - AM_V='$(V)' - AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' -else - AM_V=$AM_DEFAULT_VERBOSITY - AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY -fi -AC_SUBST([AM_V])dnl -AM_SUBST_NOTMAKE([AM_V])dnl -AC_SUBST([AM_DEFAULT_V])dnl -AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl -AC_SUBST([AM_DEFAULT_VERBOSITY])dnl -AM_BACKSLASH='\' -AC_SUBST([AM_BACKSLASH])dnl -_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl -]) - -# Copyright (C) 2001-2020 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_INSTALL_STRIP -# --------------------- -# One issue with vendor 'install' (even GNU) is that you can't -# specify the program used to strip binaries. This is especially -# annoying in cross-compiling environments, where the build's strip -# is unlikely to handle the host's binaries. -# Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in "make install-strip", and initialize -# STRIPPROG with the value of the STRIP variable (set by the user). -AC_DEFUN([AM_PROG_INSTALL_STRIP], -[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using 'strip' when the user -# run "make install-strip". However 'strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the 'STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. -if test "$cross_compiling" != no; then - AC_CHECK_TOOL([STRIP], [strip], :) -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" -AC_SUBST([INSTALL_STRIP_PROGRAM])]) - -# Copyright (C) 2006-2020 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# _AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- -# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. -# This macro is traced by Automake. -AC_DEFUN([_AM_SUBST_NOTMAKE]) - -# AM_SUBST_NOTMAKE(VARIABLE) -# -------------------------- -# Public sister of _AM_SUBST_NOTMAKE. -AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) - -# Check how to create a tarball. -*- Autoconf -*- - -# Copyright (C) 2004-2020 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# _AM_PROG_TAR(FORMAT) -# -------------------- -# Check how to create a tarball in format FORMAT. -# FORMAT should be one of 'v7', 'ustar', or 'pax'. -# -# Substitute a variable $(am__tar) that is a command -# writing to stdout a FORMAT-tarball containing the directory -# $tardir. -# tardir=directory && $(am__tar) > result.tar -# -# Substitute a variable $(am__untar) that extract such -# a tarball read from stdin. -# $(am__untar) < result.tar -# -AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. Yes, it's still used -# in the wild :-( We should find a proper way to deprecate it ... -AC_SUBST([AMTAR], ['$${TAR-tar}']) - -# We'll loop over all known methods to create a tar archive until one works. -_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' - -m4_if([$1], [v7], - [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], - - [m4_case([$1], - [ustar], - [# The POSIX 1988 'ustar' format is defined with fixed-size fields. - # There is notably a 21 bits limit for the UID and the GID. In fact, - # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 - # and bug#13588). - am_max_uid=2097151 # 2^21 - 1 - am_max_gid=$am_max_uid - # The $UID and $GID variables are not portable, so we need to resort - # to the POSIX-mandated id(1) utility. Errors in the 'id' calls - # below are definitely unexpected, so allow the users to see them - # (that is, avoid stderr redirection). - am_uid=`id -u || echo unknown` - am_gid=`id -g || echo unknown` - AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) - if test $am_uid -le $am_max_uid; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - _am_tools=none - fi - AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) - if test $am_gid -le $am_max_gid; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - _am_tools=none - fi], - - [pax], - [], - - [m4_fatal([Unknown tar format])]) - - AC_MSG_CHECKING([how to create a $1 tar archive]) - - # Go ahead even if we have the value already cached. We do so because we - # need to set the values for the 'am__tar' and 'am__untar' variables. - _am_tools=${am_cv_prog_tar_$1-$_am_tools} - - for _am_tool in $_am_tools; do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break - - # tar/untar a dummy directory, and stop if the command works. - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) - rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /dev/null 2>&1 && break - fi - done - rm -rf conftest.dir - - AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) - AC_MSG_RESULT([$am_cv_prog_tar_$1])]) - -AC_SUBST([am__tar]) -AC_SUBST([am__untar]) -]) # _AM_PROG_TAR - -m4_include([../../m4/ax_cxx_compile_stdcxx.m4]) -m4_include([../../m4/kpse-common.m4]) -m4_include([../../m4/kpse-visibility.m4]) -m4_include([../../m4/kpse-warnings.m4]) -m4_include([../../m4/kpse-win32.m4]) -m4_include([../../m4/kpse-zlib-flags.m4]) diff --git a/Build/source/libs/poppler/config.h.in b/Build/source/libs/poppler/config.h.in deleted file mode 100644 index 67a7e08d9a0..00000000000 --- a/Build/source/libs/poppler/config.h.in +++ /dev/null @@ -1,153 +0,0 @@ -/* config.h.in. Generated from configure.ac by autoheader. */ - -/* Use zlib instead of builtin zlib decoder. */ -#undef ENABLE_ZLIB - -/* define if the compiler supports basic C++11 syntax */ -#undef HAVE_CXX11 - -/* Do we have any DCT decoder? */ -#undef HAVE_DCT_DECODER - -/* Define to 1 if you have the header file, and it defines `DIR'. - */ -#undef HAVE_DIRENT_H - -/* Define to 1 if you have the `fseek64' function. */ -#undef HAVE_FSEEK64 - -/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ -#undef HAVE_FSEEKO - -/* Define to 1 if you have the `gettimeofday' function. */ -#undef HAVE_GETTIMEOFDAY - -/* Define to 1 if you have the `gmtime_r' function. */ -#undef HAVE_GMTIME_R - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Do we have any JPX decoder? */ -#undef HAVE_JPX_DECODER - -/* Define to 1 if you have the `localtime_r' function. */ -#undef HAVE_LOCALTIME_R - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define to 1 if you have the `mkstemp' function. */ -#undef HAVE_MKSTEMP - -/* Define to 1 if you have the header file, and it defines `DIR'. */ -#undef HAVE_NDIR_H - -/* Define to 1 if you have the `popen' function. */ -#undef HAVE_POPEN - -/* Define to 1 if you have the `rand_r' function. */ -#undef HAVE_RAND_R - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the `strtok_r' function. */ -#undef HAVE_STRTOK_R - -/* Define to 1 if `st_mtim' is a member of `struct stat'. */ -#undef HAVE_STRUCT_STAT_ST_MTIM - -/* Define to 1 if you have the header file, and it defines `DIR'. - */ -#undef HAVE_SYS_DIR_H - -/* Define to 1 if you have the header file, and it defines `DIR'. - */ -#undef HAVE_SYS_NDIR_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have the `timegm' function. */ -#undef HAVE_TIMEGM - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_ZLIB_H - -/* Enable multithreading support. */ -#undef MULTITHREADED - -/* Generate OPI comments in PS output. */ -#undef OPI_SUPPORT - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the home page for this package. */ -#undef PACKAGE_URL - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* Define to the poppler version. */ -#undef POPPLER_VERSION - -/* The size of `long long', as computed by sizeof. */ -#undef SIZEOF_LONG_LONG - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Throw exceptions to deal with not enough memory and similar problems */ -#undef USE_EXCEPTIONS - -/* Use fixed point arithmetic */ -#undef USE_FIXEDPOINT - -/* Define to 1 if declares 'z_const'. */ -#undef ZLIB_CONST - -/* Enable large inode numbers on Mac OS X 10.5. */ -#ifndef _DARWIN_USE_64_BIT_INODE -# define _DARWIN_USE_64_BIT_INODE 1 -#endif - -/* Number of bits in a file offset, on hosts where this is settable. */ -#undef _FILE_OFFSET_BITS - -/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ -#undef _LARGEFILE_SOURCE - -/* Define for large files, on AIX-style hosts. */ -#undef _LARGE_FILES - -/* Define for MinGW32 to 0x0500 to declare `GetFileSizeEx'. */ -#undef _WIN32_WINNT - -/* Define as empty if not declared in . */ -#undef z_const diff --git a/Build/source/libs/poppler/configure b/Build/source/libs/poppler/configure deleted file mode 100755 index 0ceff112896..00000000000 --- a/Build/source/libs/poppler/configure +++ /dev/null @@ -1,9278 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for poppler (TeX Live) 0.68.0. -# -# Report bugs to . -# -# -# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. -# -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -# Use a proper internal environment variable to ensure we don't fall - # into an infinite loop, continuously re-executing ourselves. - if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then - _as_can_reexec=no; export _as_can_reexec; - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -as_fn_exit 255 - fi - # We don't want this to propagate to other subprocesses. - { _as_can_reexec=; unset _as_can_reexec;} -if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : - -else - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1 -test -x / || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - as_found=: - case $as_dir in #( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : - CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi - done;; - esac - as_found=false -done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } -IFS=$as_save_IFS - - - if test "x$CONFIG_SHELL" != x; then : - export CONFIG_SHELL - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -exit 255 -fi - - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." - else - $as_echo "$0: Please tell bug-autoconf@gnu.org and tex-k@tug.org -$0: about your system, including any error possibly output -$0: before this message. Then install a modern shell, or -$0: manually run the script under such a shell if you do -$0: have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - - # If we had to re-execute with $CONFIG_SHELL, we're ensured to have - # already done that, so ensure we don't try to do so again and fall - # in an infinite loop. This has already happened in practice. - _as_can_reexec=no; export _as_can_reexec - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -test -n "$DJDIR" || exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= - -# Identity of this package. -PACKAGE_NAME='poppler (TeX Live)' -PACKAGE_TARNAME='poppler--tex-live-' -PACKAGE_VERSION='0.68.0' -PACKAGE_STRING='poppler (TeX Live) 0.68.0' -PACKAGE_BUGREPORT='tex-k@tug.org' -PACKAGE_URL='' - -ac_unique_file="poppler-src/poppler/Array.cc" -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef STDC_HEADERS -# include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif -#endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_INTTYPES_H -# include -#endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#endif" - -ac_subst_vars='am__EXEEXT_FALSE -am__EXEEXT_TRUE -LTLIBOBJS -LIBOBJS -POPPLER_TREE -build_FALSE -build_TRUE -ZLIB_RULE -ZLIB_DEPEND -ZLIB_LIBS -ZLIB_INCLUDES -MINGW32_FALSE -MINGW32_TRUE -WIN32_FALSE -WIN32_TRUE -NO_WARN_CXXFLAGS -EGREP -GREP -CPP -VISIBILITY_CXXFLAGS -VISIBILITY_CFLAGS -LN_S -RANLIB -HAVE_CXX11 -WARNING_CXXFLAGS -am__fastdepCXX_FALSE -am__fastdepCXX_TRUE -CXXDEPMODE -ac_ct_CXX -CXXFLAGS -CXX -WARNING_CFLAGS -am__fastdepCC_FALSE -am__fastdepCC_TRUE -CCDEPMODE -am__nodep -AMDEPBACKSLASH -AMDEP_FALSE -AMDEP_TRUE -am__include -DEPDIR -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -MAINT -MAINTAINER_MODE_FALSE -MAINTAINER_MODE_TRUE -AM_BACKSLASH -AM_DEFAULT_VERBOSITY -AM_DEFAULT_V -AM_V -am__untar -am__tar -AMTAR -am__leading_dot -SET_MAKE -AWK -mkdir_p -MKDIR_P -INSTALL_STRIP_PROGRAM -STRIP -install_sh -MAKEINFO -AUTOHEADER -AUTOMAKE -AUTOCONF -ACLOCAL -VERSION -PACKAGE -CYGPATH_W -am__isrc -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL -am__quote' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -enable_silent_rules -enable_maintainer_mode -enable_dependency_tracking -enable_compiler_warnings -enable_opi -enable_multithreaded -enable_exceptions -enable_fixedpoint -enable_largefile -with_system_zlib -with_zlib_includes -with_zlib_libdir -' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CXX -CXXFLAGS -CCC -CPP' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *=) ac_optarg= ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error $? "missing argument to $ac_option" -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error $? "working directory cannot be determined" -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error $? "pwd does not report name of working directory" - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures poppler (TeX Live) 0.68.0 to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root - [DATAROOTDIR/doc/poppler--tex-live-] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -Program names: - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM run sed PROGRAM on installed program names -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of poppler (TeX Live) 0.68.0:";; - esac - cat <<\_ACEOF - -Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-silent-rules less verbose build output (undo: "make V=1") - --disable-silent-rules verbose build output (undo: "make V=0") - --enable-maintainer-mode - enable make rules and dependencies not useful (and - sometimes confusing) to the casual installer - --enable-dependency-tracking - do not reject slow dependency extractors - --disable-dependency-tracking - speeds up one-time build - --enable-compiler-warnings=[no|min|yes|max|all] - Turn on compiler warnings [default: yes if - maintainer-mode, min otherwise] - --enable-opi include support for OPI comments - --enable-multithreaded include support for multithreading - --enable-exceptions use C++ exceptions - --enable-fixedpoint use fixed point (instead of floating point) - arithmetic - --disable-largefile omit support for large files - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-system-zlib use installed zlib headers and library - --with-zlib-includes=DIR - zlib headers installed in DIR - --with-zlib-libdir=DIR zlib library installed in DIR - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - CXX C++ compiler command - CXXFLAGS C++ compiler flags - CPP C preprocessor - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -Report bugs to . -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -poppler (TeX Live) configure 0.68.0 -generated by GNU Autoconf 2.69 - -Copyright (C) 2012 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi - -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## - -# ac_fn_c_try_compile LINENO -# -------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_compile - -# ac_fn_c_try_link LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_link - -# ac_fn_cxx_try_compile LINENO -# ---------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_cxx_try_compile - -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_run - -# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES -# -------------------------------------------- -# Tries to find the compile-time value of EXPR in a program that includes -# INCLUDES, setting VAR accordingly. Returns whether the value could be -# computed -ac_fn_c_compute_int () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) >= 0)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=0 ac_mid=0 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid; break -else - as_fn_arith $ac_mid + 1 && ac_lo=$as_val - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) < 0)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=-1 ac_mid=-1 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) >= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=$ac_mid; break -else - as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - ac_lo= ac_hi= -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid -else - as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in #(( -?*) eval "$3=\$ac_lo"; ac_retval=0 ;; -'') ac_retval=1 ;; -esac - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -static long int longval () { return $2; } -static unsigned long int ulongval () { return $2; } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (($2) < 0) - { - long int i = longval (); - if (i != ($2)) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ($2)) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - echo >>conftest.val; read $3 &5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_cpp - -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_compile - -# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_c_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval \${$3+:} false; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.i conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( $as_echo "## ---------------------------- ## -## Report this to tex-k@tug.org ## -## ---------------------------- ##" - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_mongrel - -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $2 - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $2 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif - -int -main () -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_func - -# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES -# ---------------------------------------------------- -# Tries to find if the field MEMBER exists in type AGGR, after including -# INCLUDES, setting cache variable VAR accordingly. -ac_fn_c_check_member () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 -$as_echo_n "checking for $2.$3... " >&6; } -if eval \${$4+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$5 -int -main () -{ -static $2 ac_aggr; -if (ac_aggr.$3) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$4=yes" -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$5 -int -main () -{ -static $2 ac_aggr; -if (sizeof ac_aggr.$3) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$4=yes" -else - eval "$4=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$4 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_member -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by poppler (TeX Live) $as_me 0.68.0, which was -generated by GNU Autoconf 2.69. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; - 2) - as_fn_append ac_configure_args1 " '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - as_fn_append ac_configure_args " '$ac_arg'" - ;; - esac - done -done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - $as_echo "## ---------------- ## -## Cache variables. ## -## ---------------- ##" - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - $as_echo "## ----------------- ## -## Output variables. ## -## ----------------- ##" - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## -## File substitutions. ## -## ------------------- ##" - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - $as_echo "## ----------- ## -## confdefs.h. ## -## ----------- ##" - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -$as_echo "/* confdefs.h */" > confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site -fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5; } - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special files - # actually), so we avoid doing that. DJGPP emulates it as a regular file. - if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - -ac_aux_dir= -for ac_dir in ../../build-aux "$srcdir"/../../build-aux; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - as_fn_error $? "cannot find install-sh, install.sh, or shtool in ../../build-aux \"$srcdir\"/../../build-aux" "$LINENO" 5 -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - - - -am__api_version='1.16' - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if ${ac_cv_path_install+:} false; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in #(( - ./ | .// | /[cC]/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac - - done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 -$as_echo_n "checking whether build environment is sane... " >&6; } -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; -esac -case $srcdir in - *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; -esac - -# Do 'set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - am_has_slept=no - for am_try in 1 2; do - echo "timestamp, slept: $am_has_slept" > conftest.file - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - as_fn_error $? "ls -t appears to fail. Make sure there is not a broken - alias in your environment" "$LINENO" 5 - fi - if test "$2" = conftest.file || test $am_try -eq 2; then - break - fi - # Just in case. - sleep 1 - am_has_slept=yes - done - test "$2" = conftest.file - ) -then - # Ok. - : -else - as_fn_error $? "newly created file is older than distributed files! -Check your system clock" "$LINENO" 5 -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -# If we didn't sleep, we still need to ensure time stamps of config.status and -# generated files are strictly newer. -am_sleep_pid= -if grep 'slept: no' conftest.file >/dev/null 2>&1; then - ( sleep 1 ) & - am_sleep_pid=$! -fi - -rm -f conftest.file - -test "$program_prefix" != NONE && - program_transform_name="s&^&$program_prefix&;$program_transform_name" -# Use a double $ so make ignores it. -test "$program_suffix" != NONE && - program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. -# By default was `s,x,x', remove it if useless. -ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' -program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` - -# Expand $ac_aux_dir to an absolute path. -am_aux_dir=`cd "$ac_aux_dir" && pwd` - -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --is-lightweight"; then - am_missing_run="$MISSING " -else - am_missing_run= - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} -fi - -if test x"${install_sh+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi - -# Installed binaries are usually stripped using 'strip' when the user -# run "make install-strip". However 'strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the 'STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 -$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } -if test -z "$MKDIR_P"; then - if ${ac_cv_path_mkdir+:} false; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext - break 3;; - esac - done - done - done -IFS=$as_save_IFS - -fi - - test -d ./--version && rmdir ./--version - if test "${ac_cv_path_mkdir+set}" = set; then - MKDIR_P="$ac_cv_path_mkdir -p" - else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - MKDIR_P="$ac_install_sh -d" - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 -$as_echo "$MKDIR_P" >&6; } - -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AWK+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -$as_echo "$AWK" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AWK" && break -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - -rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null - -# Check whether --enable-silent-rules was given. -if test "${enable_silent_rules+set}" = set; then : - enableval=$enable_silent_rules; -fi - -case $enable_silent_rules in # ((( - yes) AM_DEFAULT_VERBOSITY=0;; - no) AM_DEFAULT_VERBOSITY=1;; - *) AM_DEFAULT_VERBOSITY=1;; -esac -am_make=${MAKE-make} -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 -$as_echo_n "checking whether $am_make supports nested variables... " >&6; } -if ${am_cv_make_support_nested_variables+:} false; then : - $as_echo_n "(cached) " >&6 -else - if $as_echo 'TRUE=$(BAR$(V)) -BAR0=false -BAR1=true -V=1 -am__doit: - @$(TRUE) -.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then - am_cv_make_support_nested_variables=yes -else - am_cv_make_support_nested_variables=no -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 -$as_echo "$am_cv_make_support_nested_variables" >&6; } -if test $am_cv_make_support_nested_variables = yes; then - AM_V='$(V)' - AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' -else - AM_V=$AM_DEFAULT_VERBOSITY - AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY -fi -AM_BACKSLASH='\' - -DEPDIR="${am__leading_dot}deps" - -ac_config_commands="$ac_config_commands depfiles" - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 -$as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; } -cat > confinc.mk << 'END' -am__doit: - @echo this is the am__doit target >confinc.out -.PHONY: am__doit -END -am__include="#" -am__quote= -# BSD make does it like this. -echo '.include "confinc.mk" # ignored' > confmf.BSD -# Other make implementations (GNU, Solaris 10, AIX) do it like this. -echo 'include confinc.mk # ignored' > confmf.GNU -_am_result=no -for s in GNU BSD; do - { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5 - (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - case $?:`cat confinc.out 2>/dev/null` in #( - '0:this is the am__doit target') : - case $s in #( - BSD) : - am__include='.include' am__quote='"' ;; #( - *) : - am__include='include' am__quote='' ;; -esac ;; #( - *) : - ;; -esac - if test "$am__include" != "#"; then - _am_result="yes ($s style)" - break - fi -done -rm -f confinc.* confmf.* -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 -$as_echo "${_am_result}" >&6; } - -# Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then : - enableval=$enable_dependency_tracking; -fi - -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' - am__nodep='_no' -fi - if test "x$enable_dependency_tracking" != xno; then - AMDEP_TRUE= - AMDEP_FALSE='#' -else - AMDEP_TRUE='#' - AMDEP_FALSE= -fi - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { { ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -ac_exeext=$ac_cv_exeext - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -ac_clean_files="$ac_clean_files conftest.out" -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -if test "$cross_compiling" != yes; then - { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if { ac_try='./conftest$ac_cv_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if ${ac_cv_objext+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -struct stat; -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 -$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } -if ${am_cv_prog_cc_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF - # Make sure it works both with $CC and with simple cc. - # Following AC_PROG_CC_C_O, we do the test twice because some - # compilers refuse to overwrite an existing .o file with -o, - # though they will create one. - am_cv_prog_cc_c_o=yes - for am_i in 1 2; do - if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 - ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } \ - && test -f conftest2.$ac_objext; then - : OK - else - am_cv_prog_cc_c_o=no - break - fi - done - rm -f core conftest* - unset am_i -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 -$as_echo "$am_cv_prog_cc_c_o" >&6; } -if test "$am_cv_prog_cc_c_o" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -depcc="$CC" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if ${am_cv_CC_dependencies_compiler_type+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named 'D' -- because '-MD' means "put the output - # in D". - rm -rf conftest.dir - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with - # Solaris 10 /bin/sh. - echo '/* dummy */' > sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with '-c' and '-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle '-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs. - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # After this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested. - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok '-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -fi - - - -# Check whether --enable-compiler-warnings was given. -if test "${enable_compiler_warnings+set}" = set; then : - enableval=$enable_compiler_warnings; -fi -case $enable_compiler_warnings in #( - no | min | yes | max | all) : - ;; #( - *) : - if test "x$enable_maintainer_mode" = xyes; then : - enable_compiler_warnings=yes -else - enable_compiler_warnings=min -fi ;; -esac - -##tldbg KPSE_BASIC: Remember poppler (no-define) as Kpse_Package (for future messages). - -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - am__isrc=' -I$(srcdir)' - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi - - -# Define the identity of the package. - PACKAGE='poppler--tex-live-' - VERSION='0.68.0' - - -# Some tools Automake needs. - -ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} - - -AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} - - -AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} - - -AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} - - -MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} - -# For better backward compatibility. To be removed once Automake 1.9.x -# dies out for good. For more background, see: -# -# -mkdir_p='$(MKDIR_P)' - -# We need awk for the "check" target (and possibly the TAP driver). The -# system "awk" is bad on some platforms. -# Always define AMTAR for backward compatibility. Yes, it's still used -# in the wild :-( We should find a proper way to deprecate it ... -AMTAR='$${TAR-tar}' - - -# We'll loop over all known methods to create a tar archive until one works. -_am_tools='gnutar pax cpio none' - -am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' - - - - - - -# POSIX will say in a future version that running "rm -f" with no argument -# is OK; and we want to be able to make that assumption in our Makefile -# recipes. So use an aggressive probe to check that the usage we want is -# actually supported "in the wild" to an acceptable degree. -# See automake bug#10828. -# To make any issue more visible, cause the running configure to be aborted -# by default if the 'rm' program in use doesn't match our expectations; the -# user can still override this though. -if rm -f && rm -fr && rm -rf; then : OK; else - cat >&2 <<'END' -Oops! - -Your 'rm' program seems unable to run without file operands specified -on the command line, even when the '-f' option is present. This is contrary -to the behaviour of most rm programs out there, and not conforming with -the upcoming POSIX standard: - -Please tell bug-automake@gnu.org about your system, including the value -of your $PATH and any error possibly output before this message. This -can help us improve future automake versions. - -END - if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then - echo 'Configuration will proceed anyway, since you have set the' >&2 - echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 - echo >&2 - else - cat >&2 <<'END' -Aborting the configuration process, to ensure you take notice of the issue. - -You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: . - -If you want to complete the configuration process using your problematic -'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM -to "yes", and re-run configure. - -END - as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 - fi -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 -$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } - # Check whether --enable-maintainer-mode was given. -if test "${enable_maintainer_mode+set}" = set; then : - enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval -else - USE_MAINTAINER_MODE=no -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 -$as_echo "$USE_MAINTAINER_MODE" >&6; } - if test $USE_MAINTAINER_MODE = yes; then - MAINTAINER_MODE_TRUE= - MAINTAINER_MODE_FALSE='#' -else - MAINTAINER_MODE_TRUE='#' - MAINTAINER_MODE_FALSE= -fi - - MAINT=$MAINTAINER_MODE_TRUE - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler accepts prototypes" >&5 -$as_echo_n "checking whether the compiler accepts prototypes... " >&6; } -if ${kb_cv_c_prototypes+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -extern void foo(int i,...); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - kb_cv_c_prototypes=yes -else - kb_cv_c_prototypes=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $kb_cv_c_prototypes" >&5 -$as_echo "$kb_cv_c_prototypes" >&6; } -if test "x$kb_cv_c_prototypes" = xno; then - as_fn_error $? "Sorry, your compiler does not understand prototypes." "$LINENO" 5 -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what warning flags to pass to the C compiler" >&5 -$as_echo_n "checking what warning flags to pass to the C compiler... " >&6; } -if ${kpse_cv_warning_cflags+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "x$GCC" = xyes; then - kpse_cv_warning_cflags= -if test "x$enable_compiler_warnings" != xno; then - kpse_cv_warning_cflags="-Wimplicit -Wreturn-type" - case `$CC -dumpversion` in #( - 3.4.* | 4.* | 5.*) : - kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wdeclaration-after-statement" ;; #( - *) : - ;; -esac - case `$CC -dumpversion` in #( - 3.[234].* | 4.* | 5.*) : - kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wno-unknown-pragmas" ;; #( - *) : - ;; -esac - if test "x$enable_compiler_warnings" != xmin; then - kpse_cv_warning_cflags="-Wall -Wunused $kpse_cv_warning_cflags" - kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wmissing-prototypes -Wmissing-declarations" - if test "x$enable_compiler_warnings" != xyes; then - kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wparentheses -Wswitch -Wtrigraphs -Wpointer-arith" - kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wcast-qual -Wcast-align -Wwrite-strings" - case `$CC -dumpversion` in #( - 3.4.* | 4.* | 5.*) : - kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wold-style-definition" ;; #( - *) : - ;; -esac - if test "x$enable_compiler_warnings" != xmax; then - kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wshadow" - fi - fi - fi -fi -elif test "x$enable_compiler_warnings" = xno; then - kpse_cv_warning_cflags= -else - kpse_cv_warning_cflags= # FIXME: warning flags for non-GNU C compilers -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $kpse_cv_warning_cflags" >&5 -$as_echo "$kpse_cv_warning_cflags" >&6; } -WARNING_CFLAGS=$kpse_cv_warning_cflags - - - - - - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -struct stat; -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 -$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } -if ${am_cv_prog_cc_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF - # Make sure it works both with $CC and with simple cc. - # Following AC_PROG_CC_C_O, we do the test twice because some - # compilers refuse to overwrite an existing .o file with -o, - # though they will create one. - am_cv_prog_cc_c_o=yes - for am_i in 1 2; do - if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 - ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } \ - && test -f conftest2.$ac_objext; then - : OK - else - am_cv_prog_cc_c_o=no - break - fi - done - rm -f core conftest* - unset am_i -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 -$as_echo "$am_cv_prog_cc_c_o" >&6; } -if test "$am_cv_prog_cc_c_o" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -depcc="$CC" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if ${am_cv_CC_dependencies_compiler_type+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named 'D' -- because '-MD' means "put the output - # in D". - rm -rf conftest.dir - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with - # Solaris 10 /bin/sh. - echo '/* dummy */' > sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with '-c' and '-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle '-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs. - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # After this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested. - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok '-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -fi - - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -z "$CXX"; then - if test -n "$CCC"; then - CXX=$CCC - else - if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CXX=$ac_cv_prog_CXX -if test -n "$CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 -$as_echo "$CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CXX" && break - done -fi -if test -z "$CXX"; then - ac_ct_CXX=$CXX - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CXX"; then - ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CXX="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CXX=$ac_cv_prog_ac_ct_CXX -if test -n "$ac_ct_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 -$as_echo "$ac_ct_CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CXX" && break -done - - if test "x$ac_ct_CXX" = x; then - CXX="g++" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CXX=$ac_ct_CXX - fi -fi - - fi -fi -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 -$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if ${ac_cv_cxx_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_cxx_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 -$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GXX=yes -else - GXX= -fi -ac_test_CXXFLAGS=${CXXFLAGS+set} -ac_save_CXXFLAGS=$CXXFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 -$as_echo_n "checking whether $CXX accepts -g... " >&6; } -if ${ac_cv_prog_cxx_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_cxx_werror_flag=$ac_cxx_werror_flag - ac_cxx_werror_flag=yes - ac_cv_prog_cxx_g=no - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -else - CXXFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - -else - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cxx_werror_flag=$ac_save_cxx_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 -$as_echo "$ac_cv_prog_cxx_g" >&6; } -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -depcc="$CXX" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if ${am_cv_CXX_dependencies_compiler_type+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named 'D' -- because '-MD' means "put the output - # in D". - rm -rf conftest.dir - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CXX_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with - # Solaris 10 /bin/sh. - echo '/* dummy */' > sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with '-c' and '-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle '-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs. - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # After this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested. - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok '-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CXX_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CXX_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } -CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then - am__fastdepCXX_TRUE= - am__fastdepCXX_FALSE='#' -else - am__fastdepCXX_TRUE='#' - am__fastdepCXX_FALSE= -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what warning flags to pass to the C++ compiler" >&5 -$as_echo_n "checking what warning flags to pass to the C++ compiler... " >&6; } -if ${kpse_cv_warning_cxxflags+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "x$GXX" = xyes; then - kpse_cv_warning_cxxflags= -kpse_warn_strings="-Wno-write-strings" -if test "x$enable_compiler_warnings" != xno; then - kpse_cv_warning_cxxflags="-Wreturn-type" - case `$CXX -dumpversion` in #( - 3.* | 4.[012345].*) : - kpse_cv_warning_cxxflags="-Wimplicit $kpse_cv_warning_cxxflags" ;; #( - *) : - ;; -esac - case `$CXX -dumpversion` in #( - 3.[234].* | 4.* | 5.*) : - kpse_cv_warning_cxxflags="$kpse_cv_warning_cxxflags -Wno-unknown-pragmas" ;; #( - *) : - ;; -esac - if test "x$enable_compiler_warnings" != xmin; then - kpse_cv_warning_cxxflags="-Wall -Wunused $kpse_cv_warning_cxxflags" - if test "x$enable_compiler_warnings" != xyes; then - kpse_cv_warning_cxxflags="$kpse_cv_warning_cxxflags -Wparentheses -Wswitch -Wtrigraphs -Wpointer-arith" - kpse_cv_warning_cxxflags="$kpse_cv_warning_cxxflags -Wcast-qual -Wcast-align" - kpse_warn_strings="-Wwrite-strings" - if test "x$enable_compiler_warnings" != xmax; then - kpse_cv_warning_cxxflags="$kpse_cv_warning_cxxflags -Wshadow" - fi - fi - fi -fi -kpse_cv_warning_cxxflags="$kpse_cv_warning_cxxflags $kpse_warn_strings" -elif test "x$enable_compiler_warnings" = xno; then - kpse_cv_warning_cxxflags= -else - kpse_cv_warning_cxxflags= # FIXME: warning flags for non-GNU C++ compilers -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $kpse_cv_warning_cxxflags" >&5 -$as_echo "$kpse_cv_warning_cxxflags" >&6; } -WARNING_CXXFLAGS=$kpse_cv_warning_cxxflags - - - - - ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - ac_success=no - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5 -$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; } -if ${ax_cv_cxx_compile_cxx11+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - -// If the compiler admits that it is not ready for C++11, why torture it? -// Hopefully, this will speed up the test. - -#ifndef __cplusplus - -#error "This is not a C++ compiler" - -#elif __cplusplus < 201103L - -#error "This is not a C++11 compiler" - -#else - -namespace cxx11 -{ - - namespace test_static_assert - { - - template - struct check - { - static_assert(sizeof(int) <= sizeof(T), "not big enough"); - }; - - } - - namespace test_final_override - { - - struct Base - { - virtual void f() {} - }; - - struct Derived : public Base - { - virtual void f() override {} - }; - - } - - namespace test_double_right_angle_brackets - { - - template < typename T > - struct check {}; - - typedef check single_type; - typedef check> double_type; - typedef check>> triple_type; - typedef check>>> quadruple_type; - - } - - namespace test_decltype - { - - int - f() - { - int a = 1; - decltype(a) b = 2; - return a + b; - } - - } - - namespace test_type_deduction - { - - template < typename T1, typename T2 > - struct is_same - { - static const bool value = false; - }; - - template < typename T > - struct is_same - { - static const bool value = true; - }; - - template < typename T1, typename T2 > - auto - add(T1 a1, T2 a2) -> decltype(a1 + a2) - { - return a1 + a2; - } - - int - test(const int c, volatile int v) - { - static_assert(is_same::value == true, ""); - static_assert(is_same::value == false, ""); - static_assert(is_same::value == false, ""); - auto ac = c; - auto av = v; - auto sumi = ac + av + 'x'; - auto sumf = ac + av + 1.0; - static_assert(is_same::value == true, ""); - static_assert(is_same::value == true, ""); - static_assert(is_same::value == true, ""); - static_assert(is_same::value == false, ""); - static_assert(is_same::value == true, ""); - return (sumf > 0.0) ? sumi : add(c, v); - } - - } - - namespace test_noexcept - { - - int f() { return 0; } - int g() noexcept { return 0; } - - static_assert(noexcept(f()) == false, ""); - static_assert(noexcept(g()) == true, ""); - - } - - namespace test_constexpr - { - - template < typename CharT > - unsigned long constexpr - strlen_c_r(const CharT *const s, const unsigned long acc) noexcept - { - return *s ? strlen_c_r(s + 1, acc + 1) : acc; - } - - template < typename CharT > - unsigned long constexpr - strlen_c(const CharT *const s) noexcept - { - return strlen_c_r(s, 0UL); - } - - static_assert(strlen_c("") == 0UL, ""); - static_assert(strlen_c("1") == 1UL, ""); - static_assert(strlen_c("example") == 7UL, ""); - static_assert(strlen_c("another\0example") == 7UL, ""); - - } - - namespace test_rvalue_references - { - - template < int N > - struct answer - { - static constexpr int value = N; - }; - - answer<1> f(int&) { return answer<1>(); } - answer<2> f(const int&) { return answer<2>(); } - answer<3> f(int&&) { return answer<3>(); } - - void - test() - { - int i = 0; - const int c = 0; - static_assert(decltype(f(i))::value == 1, ""); - static_assert(decltype(f(c))::value == 2, ""); - static_assert(decltype(f(0))::value == 3, ""); - } - - } - - namespace test_uniform_initialization - { - - struct test - { - static const int zero {}; - static const int one {1}; - }; - - static_assert(test::zero == 0, ""); - static_assert(test::one == 1, ""); - - } - - namespace test_lambdas - { - - void - test1() - { - auto lambda1 = [](){}; - auto lambda2 = lambda1; - lambda1(); - lambda2(); - } - - int - test2() - { - auto a = [](int i, int j){ return i + j; }(1, 2); - auto b = []() -> int { return '0'; }(); - auto c = [=](){ return a + b; }(); - auto d = [&](){ return c; }(); - auto e = [a, &b](int x) mutable { - const auto identity = [](int y){ return y; }; - for (auto i = 0; i < a; ++i) - a += b--; - return x + identity(a + b); - }(0); - return a + b + c + d + e; - } - - int - test3() - { - const auto nullary = [](){ return 0; }; - const auto unary = [](int x){ return x; }; - using nullary_t = decltype(nullary); - using unary_t = decltype(unary); - const auto higher1st = [](nullary_t f){ return f(); }; - const auto higher2nd = [unary](nullary_t f1){ - return [unary, f1](unary_t f2){ return f2(unary(f1())); }; - }; - return higher1st(nullary) + higher2nd(nullary)(unary); - } - - } - - namespace test_variadic_templates - { - - template - struct sum; - - template - struct sum - { - static constexpr auto value = N0 + sum::value; - }; - - template <> - struct sum<> - { - static constexpr auto value = 0; - }; - - static_assert(sum<>::value == 0, ""); - static_assert(sum<1>::value == 1, ""); - static_assert(sum<23>::value == 23, ""); - static_assert(sum<1, 2>::value == 3, ""); - static_assert(sum<5, 5, 11>::value == 21, ""); - static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); - - } - - // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae - // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function - // because of this. - namespace test_template_alias_sfinae - { - - struct foo {}; - - template - using member = typename T::member_type; - - template - void func(...) {} - - template - void func(member*) {} - - void test(); - - void test() { func(0); } - - } - -} // namespace cxx11 - -#endif // __cplusplus >= 201103L - - - -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ax_cv_cxx_compile_cxx11=yes -else - ax_cv_cxx_compile_cxx11=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5 -$as_echo "$ax_cv_cxx_compile_cxx11" >&6; } - if test x$ax_cv_cxx_compile_cxx11 = xyes; then - ac_success=yes - fi - - if test x$ac_success = xno; then - for alternative in ${ax_cxx_compile_alternatives}; do - switch="-std=gnu++${alternative}" - cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 -$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; } -if eval \${$cachevar+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_CXX="$CXX" - CXX="$CXX $switch" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - -// If the compiler admits that it is not ready for C++11, why torture it? -// Hopefully, this will speed up the test. - -#ifndef __cplusplus - -#error "This is not a C++ compiler" - -#elif __cplusplus < 201103L - -#error "This is not a C++11 compiler" - -#else - -namespace cxx11 -{ - - namespace test_static_assert - { - - template - struct check - { - static_assert(sizeof(int) <= sizeof(T), "not big enough"); - }; - - } - - namespace test_final_override - { - - struct Base - { - virtual void f() {} - }; - - struct Derived : public Base - { - virtual void f() override {} - }; - - } - - namespace test_double_right_angle_brackets - { - - template < typename T > - struct check {}; - - typedef check single_type; - typedef check> double_type; - typedef check>> triple_type; - typedef check>>> quadruple_type; - - } - - namespace test_decltype - { - - int - f() - { - int a = 1; - decltype(a) b = 2; - return a + b; - } - - } - - namespace test_type_deduction - { - - template < typename T1, typename T2 > - struct is_same - { - static const bool value = false; - }; - - template < typename T > - struct is_same - { - static const bool value = true; - }; - - template < typename T1, typename T2 > - auto - add(T1 a1, T2 a2) -> decltype(a1 + a2) - { - return a1 + a2; - } - - int - test(const int c, volatile int v) - { - static_assert(is_same::value == true, ""); - static_assert(is_same::value == false, ""); - static_assert(is_same::value == false, ""); - auto ac = c; - auto av = v; - auto sumi = ac + av + 'x'; - auto sumf = ac + av + 1.0; - static_assert(is_same::value == true, ""); - static_assert(is_same::value == true, ""); - static_assert(is_same::value == true, ""); - static_assert(is_same::value == false, ""); - static_assert(is_same::value == true, ""); - return (sumf > 0.0) ? sumi : add(c, v); - } - - } - - namespace test_noexcept - { - - int f() { return 0; } - int g() noexcept { return 0; } - - static_assert(noexcept(f()) == false, ""); - static_assert(noexcept(g()) == true, ""); - - } - - namespace test_constexpr - { - - template < typename CharT > - unsigned long constexpr - strlen_c_r(const CharT *const s, const unsigned long acc) noexcept - { - return *s ? strlen_c_r(s + 1, acc + 1) : acc; - } - - template < typename CharT > - unsigned long constexpr - strlen_c(const CharT *const s) noexcept - { - return strlen_c_r(s, 0UL); - } - - static_assert(strlen_c("") == 0UL, ""); - static_assert(strlen_c("1") == 1UL, ""); - static_assert(strlen_c("example") == 7UL, ""); - static_assert(strlen_c("another\0example") == 7UL, ""); - - } - - namespace test_rvalue_references - { - - template < int N > - struct answer - { - static constexpr int value = N; - }; - - answer<1> f(int&) { return answer<1>(); } - answer<2> f(const int&) { return answer<2>(); } - answer<3> f(int&&) { return answer<3>(); } - - void - test() - { - int i = 0; - const int c = 0; - static_assert(decltype(f(i))::value == 1, ""); - static_assert(decltype(f(c))::value == 2, ""); - static_assert(decltype(f(0))::value == 3, ""); - } - - } - - namespace test_uniform_initialization - { - - struct test - { - static const int zero {}; - static const int one {1}; - }; - - static_assert(test::zero == 0, ""); - static_assert(test::one == 1, ""); - - } - - namespace test_lambdas - { - - void - test1() - { - auto lambda1 = [](){}; - auto lambda2 = lambda1; - lambda1(); - lambda2(); - } - - int - test2() - { - auto a = [](int i, int j){ return i + j; }(1, 2); - auto b = []() -> int { return '0'; }(); - auto c = [=](){ return a + b; }(); - auto d = [&](){ return c; }(); - auto e = [a, &b](int x) mutable { - const auto identity = [](int y){ return y; }; - for (auto i = 0; i < a; ++i) - a += b--; - return x + identity(a + b); - }(0); - return a + b + c + d + e; - } - - int - test3() - { - const auto nullary = [](){ return 0; }; - const auto unary = [](int x){ return x; }; - using nullary_t = decltype(nullary); - using unary_t = decltype(unary); - const auto higher1st = [](nullary_t f){ return f(); }; - const auto higher2nd = [unary](nullary_t f1){ - return [unary, f1](unary_t f2){ return f2(unary(f1())); }; - }; - return higher1st(nullary) + higher2nd(nullary)(unary); - } - - } - - namespace test_variadic_templates - { - - template - struct sum; - - template - struct sum - { - static constexpr auto value = N0 + sum::value; - }; - - template <> - struct sum<> - { - static constexpr auto value = 0; - }; - - static_assert(sum<>::value == 0, ""); - static_assert(sum<1>::value == 1, ""); - static_assert(sum<23>::value == 23, ""); - static_assert(sum<1, 2>::value == 3, ""); - static_assert(sum<5, 5, 11>::value == 21, ""); - static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); - - } - - // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae - // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function - // because of this. - namespace test_template_alias_sfinae - { - - struct foo {}; - - template - using member = typename T::member_type; - - template - void func(...) {} - - template - void func(member*) {} - - void test(); - - void test() { func(0); } - - } - -} // namespace cxx11 - -#endif // __cplusplus >= 201103L - - - -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - eval $cachevar=yes -else - eval $cachevar=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CXX="$ac_save_CXX" -fi -eval ac_res=\$$cachevar - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - if eval test x\$$cachevar = xyes; then - CXX="$CXX $switch" - if test -n "$CXXCPP" ; then - CXXCPP="$CXXCPP $switch" - fi - ac_success=yes - break - fi - done - fi - - if test x$ac_success = xno; then - for alternative in ${ax_cxx_compile_alternatives}; do - for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do - cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 -$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; } -if eval \${$cachevar+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_CXX="$CXX" - CXX="$CXX $switch" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - -// If the compiler admits that it is not ready for C++11, why torture it? -// Hopefully, this will speed up the test. - -#ifndef __cplusplus - -#error "This is not a C++ compiler" - -#elif __cplusplus < 201103L - -#error "This is not a C++11 compiler" - -#else - -namespace cxx11 -{ - - namespace test_static_assert - { - - template - struct check - { - static_assert(sizeof(int) <= sizeof(T), "not big enough"); - }; - - } - - namespace test_final_override - { - - struct Base - { - virtual void f() {} - }; - - struct Derived : public Base - { - virtual void f() override {} - }; - - } - - namespace test_double_right_angle_brackets - { - - template < typename T > - struct check {}; - - typedef check single_type; - typedef check> double_type; - typedef check>> triple_type; - typedef check>>> quadruple_type; - - } - - namespace test_decltype - { - - int - f() - { - int a = 1; - decltype(a) b = 2; - return a + b; - } - - } - - namespace test_type_deduction - { - - template < typename T1, typename T2 > - struct is_same - { - static const bool value = false; - }; - - template < typename T > - struct is_same - { - static const bool value = true; - }; - - template < typename T1, typename T2 > - auto - add(T1 a1, T2 a2) -> decltype(a1 + a2) - { - return a1 + a2; - } - - int - test(const int c, volatile int v) - { - static_assert(is_same::value == true, ""); - static_assert(is_same::value == false, ""); - static_assert(is_same::value == false, ""); - auto ac = c; - auto av = v; - auto sumi = ac + av + 'x'; - auto sumf = ac + av + 1.0; - static_assert(is_same::value == true, ""); - static_assert(is_same::value == true, ""); - static_assert(is_same::value == true, ""); - static_assert(is_same::value == false, ""); - static_assert(is_same::value == true, ""); - return (sumf > 0.0) ? sumi : add(c, v); - } - - } - - namespace test_noexcept - { - - int f() { return 0; } - int g() noexcept { return 0; } - - static_assert(noexcept(f()) == false, ""); - static_assert(noexcept(g()) == true, ""); - - } - - namespace test_constexpr - { - - template < typename CharT > - unsigned long constexpr - strlen_c_r(const CharT *const s, const unsigned long acc) noexcept - { - return *s ? strlen_c_r(s + 1, acc + 1) : acc; - } - - template < typename CharT > - unsigned long constexpr - strlen_c(const CharT *const s) noexcept - { - return strlen_c_r(s, 0UL); - } - - static_assert(strlen_c("") == 0UL, ""); - static_assert(strlen_c("1") == 1UL, ""); - static_assert(strlen_c("example") == 7UL, ""); - static_assert(strlen_c("another\0example") == 7UL, ""); - - } - - namespace test_rvalue_references - { - - template < int N > - struct answer - { - static constexpr int value = N; - }; - - answer<1> f(int&) { return answer<1>(); } - answer<2> f(const int&) { return answer<2>(); } - answer<3> f(int&&) { return answer<3>(); } - - void - test() - { - int i = 0; - const int c = 0; - static_assert(decltype(f(i))::value == 1, ""); - static_assert(decltype(f(c))::value == 2, ""); - static_assert(decltype(f(0))::value == 3, ""); - } - - } - - namespace test_uniform_initialization - { - - struct test - { - static const int zero {}; - static const int one {1}; - }; - - static_assert(test::zero == 0, ""); - static_assert(test::one == 1, ""); - - } - - namespace test_lambdas - { - - void - test1() - { - auto lambda1 = [](){}; - auto lambda2 = lambda1; - lambda1(); - lambda2(); - } - - int - test2() - { - auto a = [](int i, int j){ return i + j; }(1, 2); - auto b = []() -> int { return '0'; }(); - auto c = [=](){ return a + b; }(); - auto d = [&](){ return c; }(); - auto e = [a, &b](int x) mutable { - const auto identity = [](int y){ return y; }; - for (auto i = 0; i < a; ++i) - a += b--; - return x + identity(a + b); - }(0); - return a + b + c + d + e; - } - - int - test3() - { - const auto nullary = [](){ return 0; }; - const auto unary = [](int x){ return x; }; - using nullary_t = decltype(nullary); - using unary_t = decltype(unary); - const auto higher1st = [](nullary_t f){ return f(); }; - const auto higher2nd = [unary](nullary_t f1){ - return [unary, f1](unary_t f2){ return f2(unary(f1())); }; - }; - return higher1st(nullary) + higher2nd(nullary)(unary); - } - - } - - namespace test_variadic_templates - { - - template - struct sum; - - template - struct sum - { - static constexpr auto value = N0 + sum::value; - }; - - template <> - struct sum<> - { - static constexpr auto value = 0; - }; - - static_assert(sum<>::value == 0, ""); - static_assert(sum<1>::value == 1, ""); - static_assert(sum<23>::value == 23, ""); - static_assert(sum<1, 2>::value == 3, ""); - static_assert(sum<5, 5, 11>::value == 21, ""); - static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); - - } - - // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae - // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function - // because of this. - namespace test_template_alias_sfinae - { - - struct foo {}; - - template - using member = typename T::member_type; - - template - void func(...) {} - - template - void func(member*) {} - - void test(); - - void test() { func(0); } - - } - -} // namespace cxx11 - -#endif // __cplusplus >= 201103L - - - -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - eval $cachevar=yes -else - eval $cachevar=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CXX="$ac_save_CXX" -fi -eval ac_res=\$$cachevar - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - if eval test x\$$cachevar = xyes; then - CXX="$CXX $switch" - if test -n "$CXXCPP" ; then - CXXCPP="$CXXCPP $switch" - fi - ac_success=yes - break - fi - done - if test x$ac_success = xyes; then - break - fi - done - fi - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - if test x$ax_cxx_compile_cxx11_required = xtrue; then - if test x$ac_success = xno; then - as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5 - fi - fi - if test x$ac_success = xno; then - HAVE_CXX11=0 - { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5 -$as_echo "$as_me: No compiler with C++11 support was found" >&6;} - else - HAVE_CXX11=1 - -$as_echo "#define HAVE_CXX11 1" >>confdefs.h - - fi - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } -fi - - -echo 'tldbg:KPSE_COMPILER_VISIBILITY called.' >&5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGS for C to hide external symbols" >&5 -$as_echo_n "checking CFLAGS for C to hide external symbols... " >&6; } -if ${kpse_cv_visibility_cflags+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -kpse_cv_visibility_cflags=unknown -kpse_save_flags=$CFLAGS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - extern void foo(void); - void foo(void){printf("foo\n");} -_ACEOF -# FIXME: Add tests for non-GNU compilers -for kpse_flag in '-fvisibility=hidden -fvisibility-inlines-hidden' '-fvisibility=hidden'; do - CFLAGS="$kpse_save_flags -Werror $kpse_flag" - if ac_fn_c_try_compile "$LINENO"; then : - kpse_cv_visibility_cflags=$kpse_flag; break -fi -rm -f core conftest.err conftest.$ac_objext -done -CFLAGS=$kpse_save_flags -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $kpse_cv_visibility_cflags" >&5 -$as_echo "$kpse_cv_visibility_cflags" >&6; } -case $kpse_cv_visibility_cflags in #( - unknown) : - ;; #( - *) : - VISIBILITY_CFLAGS=$kpse_cv_visibility_cflags - ;; -esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CXXFLAGS for C++ to hide external symbols" >&5 -$as_echo_n "checking CXXFLAGS for C++ to hide external symbols... " >&6; } -if ${kpse_cv_visibility_cxxflags+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -kpse_cv_visibility_cxxflags=unknown -kpse_save_flags=$CXXFLAGS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - extern void foo(void); - void foo(void){printf("foo\n");} -_ACEOF -# FIXME: Add tests for non-GNU compilers -for kpse_flag in '-fvisibility=hidden -fvisibility-inlines-hidden' '-fvisibility=hidden'; do - CXXFLAGS="$kpse_save_flags -Werror $kpse_flag" - if ac_fn_cxx_try_compile "$LINENO"; then : - kpse_cv_visibility_cxxflags=$kpse_flag; break -fi -rm -f core conftest.err conftest.$ac_objext -done -CXXFLAGS=$kpse_save_flags -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $kpse_cv_visibility_cxxflags" >&5 -$as_echo "$kpse_cv_visibility_cxxflags" >&6; } -case $kpse_cv_visibility_cxxflags in #( - unknown) : - ;; #( - *) : - VISIBILITY_CXXFLAGS=$kpse_cv_visibility_cxxflags - ;; -esac - - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if ${ac_cv_prog_CPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if ${ac_cv_path_GREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_GREP" || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if ${ac_cv_path_EGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_EGREP" || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 -$as_echo_n "checking size of long long... " >&6; } -if ${ac_cv_sizeof_long_long+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_long_long" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (long long) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_long_long=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 -$as_echo "$ac_cv_sizeof_long_long" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long -_ACEOF - - -if test $ac_cv_sizeof_long_long -lt 8; then - as_fn_error $? "Sorry, your compiler has no \`long long' with at least 8 bytes." "$LINENO" 5 -fi - -if test "x$GXX" = xyes; then - NO_WARN_CXXFLAGS='-Wno-write-strings' -fi - - - -# Check whether --enable-opi was given. -if test "${enable_opi+set}" = set; then : - enableval=$enable_opi; if test "x$enableval" = xyes; then - -$as_echo "#define OPI_SUPPORT 1" >>confdefs.h - -fi - -fi - - -# Check whether --enable-multithreaded was given. -if test "${enable_multithreaded+set}" = set; then : - enableval=$enable_multithreaded; if test "x$enableval" != xno; then - -$as_echo "#define MULTITHREADED 1" >>confdefs.h - -fi - -fi - - -# Check whether --enable-exceptions was given. -if test "${enable_exceptions+set}" = set; then : - enableval=$enable_exceptions; if test "x$enableval" = xyes; then - -$as_echo "#define USE_EXCEPTIONS 1" >>confdefs.h - -fi - -fi - - -# Check whether --enable-fixedpoint was given. -if test "${enable_fixedpoint+set}" = set; then : - enableval=$enable_fixedpoint; if test "x$enableval" = xyes; then - -$as_echo "#define USE_FIXEDPOINT 1" >>confdefs.h - -fi - -fi - - - -# For TL, we just hardware DCT/JPX_DECODER to on. - -$as_echo "#define HAVE_DCT_DECODER 1" >>confdefs.h - - - -$as_echo "#define HAVE_JPX_DECODER 1" >>confdefs.h - - - -for ac_header in strings.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "strings.h" "ac_cv_header_strings_h" "$ac_includes_default" -if test "x$ac_cv_header_strings_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STRINGS_H 1 -_ACEOF - -fi - -done - -ac_header_dirent=no -for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do - as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 -$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } -if eval \${$as_ac_Header+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include <$ac_hdr> - -int -main () -{ -if ((DIR *) 0) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_ac_Header=yes" -else - eval "$as_ac_Header=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$as_ac_Header - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 -_ACEOF - -ac_header_dirent=$ac_hdr; break -fi - -done -# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. -if test $ac_header_dirent = dirent.h; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 -$as_echo_n "checking for library containing opendir... " >&6; } -if ${ac_cv_search_opendir+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char opendir (); -int -main () -{ -return opendir (); - ; - return 0; -} -_ACEOF -for ac_lib in '' dir; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_opendir=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_opendir+:} false; then : - break -fi -done -if ${ac_cv_search_opendir+:} false; then : - -else - ac_cv_search_opendir=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 -$as_echo "$ac_cv_search_opendir" >&6; } -ac_res=$ac_cv_search_opendir -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 -$as_echo_n "checking for library containing opendir... " >&6; } -if ${ac_cv_search_opendir+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char opendir (); -int -main () -{ -return opendir (); - ; - return 0; -} -_ACEOF -for ac_lib in '' x; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_opendir=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_opendir+:} false; then : - break -fi -done -if ${ac_cv_search_opendir+:} false; then : - -else - ac_cv_search_opendir=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 -$as_echo "$ac_cv_search_opendir" >&6; } -ac_res=$ac_cv_search_opendir -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - -fi - - -for ac_func in gettimeofday gmtime_r localtime_r mkstemp popen rand_r \ - timegm strtok_r -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - -ac_fn_c_check_member "$LINENO" "struct stat" "st_mtim" "ac_cv_member_struct_stat_st_mtim" "$ac_includes_default" -if test "x$ac_cv_member_struct_stat_st_mtim" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_MTIM 1 -_ACEOF - - -fi - - -# Check whether --enable-largefile was given. -if test "${enable_largefile+set}" = set; then : - enableval=$enable_largefile; -fi - -if test "$enable_largefile" != no; then - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 -$as_echo_n "checking for special C compiler options needed for large files... " >&6; } -if ${ac_cv_sys_largefile_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_sys_largefile_CC=no - if test "$GCC" != yes; then - ac_save_CC=$CC - while :; do - # IRIX 6.2 and later do not support large files by default, - # so use the C compiler's -n32 option if that helps. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - - ; - return 0; -} -_ACEOF - if ac_fn_c_try_compile "$LINENO"; then : - break -fi -rm -f core conftest.err conftest.$ac_objext - CC="$CC -n32" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_largefile_CC=' -n32'; break -fi -rm -f core conftest.err conftest.$ac_objext - break - done - CC=$ac_save_CC - rm -f conftest.$ac_ext - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 -$as_echo "$ac_cv_sys_largefile_CC" >&6; } - if test "$ac_cv_sys_largefile_CC" != no; then - CC=$CC$ac_cv_sys_largefile_CC - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 -$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } -if ${ac_cv_sys_file_offset_bits+:} false; then : - $as_echo_n "(cached) " >&6 -else - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_file_offset_bits=no; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define _FILE_OFFSET_BITS 64 -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_file_offset_bits=64; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cv_sys_file_offset_bits=unknown - break -done -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 -$as_echo "$ac_cv_sys_file_offset_bits" >&6; } -case $ac_cv_sys_file_offset_bits in #( - no | unknown) ;; - *) -cat >>confdefs.h <<_ACEOF -#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits -_ACEOF -;; -esac -rm -rf conftest* - if test $ac_cv_sys_file_offset_bits = unknown; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 -$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } -if ${ac_cv_sys_large_files+:} false; then : - $as_echo_n "(cached) " >&6 -else - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_large_files=no; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define _LARGE_FILES 1 -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_large_files=1; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cv_sys_large_files=unknown - break -done -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 -$as_echo "$ac_cv_sys_large_files" >&6; } -case $ac_cv_sys_large_files in #( - no | unknown) ;; - *) -cat >>confdefs.h <<_ACEOF -#define _LARGE_FILES $ac_cv_sys_large_files -_ACEOF -;; -esac -rm -rf conftest* - fi - - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5 -$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } -if ${ac_cv_sys_largefile_source+:} false; then : - $as_echo_n "(cached) " >&6 -else - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include /* for off_t */ - #include -int -main () -{ -int (*fp) (FILE *, off_t, int) = fseeko; - return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_sys_largefile_source=no; break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define _LARGEFILE_SOURCE 1 -#include /* for off_t */ - #include -int -main () -{ -int (*fp) (FILE *, off_t, int) = fseeko; - return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_sys_largefile_source=1; break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ac_cv_sys_largefile_source=unknown - break -done -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5 -$as_echo "$ac_cv_sys_largefile_source" >&6; } -case $ac_cv_sys_largefile_source in #( - no | unknown) ;; - *) -cat >>confdefs.h <<_ACEOF -#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source -_ACEOF -;; -esac -rm -rf conftest* - -# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug -# in glibc 2.1.3, but that breaks too many other things. -# If you want fseeko and ftello with glibc, upgrade to a fixed glibc. -if test $ac_cv_sys_largefile_source != unknown; then - -$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h - -fi - -ac_fn_c_check_func "$LINENO" "ftell64" "ac_cv_func_ftell64" -if test "x$ac_cv_func_ftell64" = xyes; then : - for ac_func in fseek64 -do : - ac_fn_c_check_func "$LINENO" "fseek64" "ac_cv_func_fseek64" -if test "x$ac_cv_func_fseek64" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_FSEEK64 1 -_ACEOF - -fi -done - -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for native WIN32 or MINGW32" >&5 -$as_echo_n "checking for native WIN32 or MINGW32... " >&6; } -if ${kpse_cv_have_win32+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef WIN32 - choke me -#endif -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __MINGW32__ - choke me -#endif -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - kpse_cv_have_win32=mingw32 -else - kpse_cv_have_win32=native -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - kpse_cv_have_win32=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $kpse_cv_have_win32" >&5 -$as_echo "$kpse_cv_have_win32" >&6; } - - if test "x$kpse_cv_have_win32" != xno; then - WIN32_TRUE= - WIN32_FALSE='#' -else - WIN32_TRUE='#' - WIN32_FALSE= -fi - - - if test "x$kpse_cv_have_win32" = xmingw32; then - MINGW32_TRUE= - MINGW32_FALSE='#' -else - MINGW32_TRUE='#' - MINGW32_FALSE= -fi - - - -if test "x$kpse_cv_have_win32" = xmingw32; then - -$as_echo "#define _WIN32_WINNT 0x0500" >>confdefs.h - -fi - -ac_config_headers="$ac_config_headers config.h" - - -ac_config_headers="$ac_config_headers poppler-config.h:poppler-src/poppler/poppler-config.h.in" - - - -cat >>confdefs.h <<_ACEOF -#define POPPLER_VERSION "0.68.0" -_ACEOF - - -kpse_save_CPPFLAGS=$CPPFLAGS -kpse_save_LIBS=$LIBS - -##tldbg _KPSE_INIT: Initialize TL infrastructure. -kpse_BLD=`(cd "./../../." && pwd)` -kpse_SRC=`(cd "$srcdir/../../." && pwd)` - -##tldbg _KPSE_LIB_FLAGS: Setup zlib (-lz) flags. -echo 'tldbg:_KPSE_LIB_FLAGS called: libdir=zlib, libname=z, options=, tlincl=-IBLD/libs/zlib/include, tllib=BLD/libs/zlib/libz.a, tlextra=, rebuildsrcdeps=, rebuildblddeps=${top_builddir}/../../libs/zlib/include/zconf.h.' >&5 -##tldbg _KPSE_LIB_FLAGS_TL: zlib (z) . - -# Check whether --with-system-zlib was given. -if test "${with_system_zlib+set}" = set; then : - withval=$with_system_zlib; -fi - -# Check whether --with-zlib-includes was given. -if test "${with_zlib_includes+set}" = set; then : - withval=$with_zlib_includes; -fi - -# Check whether --with-zlib-libdir was given. -if test "${with_zlib_libdir+set}" = set; then : - withval=$with_zlib_libdir; -fi -if test "x$with_system_zlib" = xyes; then - ##tldbg _KPSE_LIB_FLAGS_SYSTEM: zlib (z). -if test "x$with_zlib_includes" != x && test "x$with_zlib_includes" != xyes; then - ZLIB_INCLUDES="-I$with_zlib_includes" -fi -ZLIB_LIBS="-lz" -if test "x$with_zlib_libdir" != x && test "x$with_zlib_libdir" != xyes; then - ZLIB_LIBS="-L$with_zlib_libdir $ZLIB_LIBS" -fi -else - ZLIB_INCLUDES="-I$kpse_BLD/libs/zlib/include" - ZLIB_LIBS="$kpse_BLD/libs/zlib/libz.a" - ZLIB_DEPEND='${top_builddir}/../../libs/zlib/libz.a' - ZLIB_RULE='# Rebuild libz -$(ZLIB_DEPEND): ${top_builddir}/../../libs/zlib/include/zconf.h - cd ${top_builddir}/../../libs/zlib && $(MAKE) $(AM_MAKEFLAGS) rebuild -${top_builddir}/../../libs/zlib/include/zconf.h: - cd ${top_builddir}/../../libs/zlib && $(MAKE) $(AM_MAKEFLAGS) rebuild' -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if defines 'z_const'" >&5 -$as_echo_n "checking if defines 'z_const'... " >&6; } -if ${kpse_cv_have_decl_z_const+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval CPPFLAGS=\"$ZLIB_INCLUDES \$CPPFLAGS\" -eval LIBS=\"$ZLIB_LIBS \$LIBS\" - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -z_const char * foo(); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - kpse_cv_have_decl_z_const=yes -else - kpse_cv_have_decl_z_const=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CPPFLAGS=$kpse_save_CPPFLAGS -LIBS=$kpse_save_LIBS - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $kpse_cv_have_decl_z_const" >&5 -$as_echo "$kpse_cv_have_decl_z_const" >&6; } -case $kpse_cv_have_decl_z_const in #( - yes) : - -$as_echo "#define ZLIB_CONST 1" >>confdefs.h - ;; #( - *) : - -$as_echo "#define z_const /**/" >>confdefs.h - ;; -esac - - - if test "x$enable_build" != xno; then - build_TRUE= - build_FALSE='#' -else - build_TRUE='#' - build_FALSE= -fi - - -if test "x$enable_build" != xno || test -f config.force; then - -eval CPPFLAGS=\"$ZLIB_INCLUDES \$CPPFLAGS\" -eval LIBS=\"$ZLIB_LIBS \$LIBS\" - -ac_fn_c_check_func "$LINENO" "inflate" "ac_cv_func_inflate" -if test "x$ac_cv_func_inflate" = xyes; then : - -else - as_fn_error $? "zlib not found" "$LINENO" 5 -fi - -for ac_header in zlib.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" -if test "x$ac_cv_header_zlib_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_ZLIB_H 1 -_ACEOF - -else - as_fn_error $? "zlib not found" "$LINENO" 5 -fi - -done - -CPPFLAGS=$kpse_save_CPPFLAGS -LIBS=$kpse_save_LIBS - - -echo timestamp >config.force -fi - - -$as_echo "#define ENABLE_ZLIB 1" >>confdefs.h - - -POPPLER_TREE=poppler-src - - -ac_config_files="$ac_config_files Makefile include/Makefile include/goo/Makefile include/fofi/Makefile" - - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - if test ! -f "$cache_file" || test -h "$cache_file"; then - cat confcache >"$cache_file" - else - case $cache_file in #( - */* | ?:*) - mv -f confcache "$cache_file"$$ && - mv -f "$cache_file"$$ "$cache_file" ;; #( - *) - mv -f confcache "$cache_file" ;; - esac - fi - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -DEFS=-DHAVE_CONFIG_H - -ac_libobjs= -ac_ltlibobjs= -U= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 -$as_echo_n "checking that generated files are newer than configure... " >&6; } - if test -n "$am_sleep_pid"; then - # Hide warnings about reused PIDs. - wait $am_sleep_pid 2>/dev/null - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 -$as_echo "done" >&6; } - if test -n "$EXEEXT"; then - am__EXEEXT_TRUE= - am__EXEEXT_FALSE='#' -else - am__EXEEXT_TRUE='#' - am__EXEEXT_FALSE= -fi - -if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then - as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error $? "conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error $? "conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error $? "conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then - as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${WIN32_TRUE}" && test -z "${WIN32_FALSE}"; then - as_fn_error $? "conditional \"WIN32\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${MINGW32_TRUE}" && test -z "${MINGW32_FALSE}"; then - as_fn_error $? "conditional \"MINGW32\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${build_TRUE}" && test -z "${build_FALSE}"; then - as_fn_error $? "conditional \"build\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi - -: "${CONFIG_STATUS=./config.status}" -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by poppler (TeX Live) $as_me 0.68.0, which was -generated by GNU Autoconf 2.69. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - -case $ac_config_headers in *" -"*) set x $ac_config_headers; shift; ac_config_headers=$*;; -esac - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" -config_headers="$ac_config_headers" -config_commands="$ac_config_commands" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Configuration commands: -$config_commands - -Report bugs to ." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" -ac_cs_version="\\ -poppler (TeX Live) config.status 0.68.0 -configured by $0, generated by GNU Autoconf 2.69, - with options \\"\$ac_cs_config\\" - -Copyright (C) 2012 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -MKDIR_P='$MKDIR_P' -AWK='$AWK' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=?*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - --*=) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - '') as_fn_error $? "missing file argument" ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_HEADERS " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - as_fn_error $? "ambiguous option: \`$1' -Try \`$0 --help' for more information.";; - --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -if \$ac_cs_recheck; then - set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# -# INIT-COMMANDS -# -AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; - "poppler-config.h") CONFIG_HEADERS="$CONFIG_HEADERS poppler-config.h:poppler-src/poppler/poppler-config.h.in" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; - "include/goo/Makefile") CONFIG_FILES="$CONFIG_FILES include/goo/Makefile" ;; - "include/fofi/Makefile") CONFIG_FILES="$CONFIG_FILES include/fofi/Makefile" ;; - - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= ac_tmp= - trap 'exit_status=$? - : "${ac_tmp:=$tmp}" - { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 -ac_tmp=$tmp - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$ac_tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\)..*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\)..*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 -_ACEOF - -# VPATH may cause trouble with some makes, so we remove sole $(srcdir), -# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// -s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$ac_tmp/defines.awk" <<\_ACAWK || -BEGIN { -_ACEOF - -# Transform confdefs.h into an awk script `defines.awk', embedded as -# here-document in config.status, that substitutes the proper values into -# config.h.in to produce config.h. - -# Create a delimiter string that does not exist in confdefs.h, to ease -# handling of long lines. -ac_delim='%!_!# ' -for ac_last_try in false false :; do - ac_tt=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_tt"; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -# For the awk script, D is an array of macro values keyed by name, -# likewise P contains macro parameters if any. Preserve backslash -# newline sequences. - -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -sed -n ' -s/.\{148\}/&'"$ac_delim"'/g -t rset -:rset -s/^[ ]*#[ ]*define[ ][ ]*/ / -t def -d -:def -s/\\$// -t bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3"/p -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p -d -:bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3\\\\\\n"\\/p -t cont -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p -t cont -d -:cont -n -s/.\{148\}/&'"$ac_delim"'/g -t clear -:clear -s/\\$// -t bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/"/p -d -:bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p -b cont -' >$CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { - line = \$ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # Replace #undef with comments. This is necessary, for example, - # in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } -} -{ print } -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 -fi # test -n "$CONFIG_HEADERS" - - -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$ac_tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$ac_tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac - ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [\\/$]* | ?:[\\/]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; - esac -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -s&@MKDIR_P@&$ac_MKDIR_P&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ - >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ - "$ac_tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&2;} - - rm -f "$ac_tmp/stdin" - case $ac_file in - -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; - *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; - esac \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - ;; - :H) - # - # CONFIG_HEADER - # - if test x"$ac_file" != x-; then - { - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" - } >"$ac_tmp/config.h" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f "$ac_file" - mv "$ac_tmp/config.h" "$ac_file" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - fi - else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error $? "could not create -" "$LINENO" 5 - fi -# Compute "$ac_file"'s index in $config_headers. -_am_arg="$ac_file" -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || -$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$_am_arg" : 'X\(//\)[^/]' \| \ - X"$_am_arg" : 'X\(//\)$' \| \ - X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$_am_arg" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'`/stamp-h$_am_stamp_count - ;; - - :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Older Autoconf quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - # TODO: see whether this extra hack can be removed once we start - # requiring Autoconf 2.70 or later. - case $CONFIG_FILES in #( - *\'*) : - eval set x "$CONFIG_FILES" ;; #( - *) : - set x $CONFIG_FILES ;; #( - *) : - ;; -esac - shift - # Used to flag and report bootstrapping failures. - am_rc=0 - for am_mf - do - # Strip MF so we end up with the name of the file. - am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile which includes - # dependency-tracking related rules and includes. - # Grep'ing the whole file directly is not great: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ - || continue - am_dirpart=`$as_dirname -- "$am_mf" || -$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$am_mf" : 'X\(//\)[^/]' \| \ - X"$am_mf" : 'X\(//\)$' \| \ - X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$am_mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - am_filepart=`$as_basename -- "$am_mf" || -$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ - X"$am_mf" : 'X\(//\)$' \| \ - X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$am_mf" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { echo "$as_me:$LINENO: cd "$am_dirpart" \ - && sed -e '/# am--include-marker/d' "$am_filepart" \ - | $MAKE -f - am--depfiles" >&5 - (cd "$am_dirpart" \ - && sed -e '/# am--include-marker/d' "$am_filepart" \ - | $MAKE -f - am--depfiles) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } || am_rc=$? - done - if test $am_rc -ne 0; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. If GNU make was not used, consider - re-running the configure script with MAKE=\"gmake\" (or whatever is - necessary). You can also try re-running configure with the - '--disable-dependency-tracking' option to at least be able to build - the package (albeit without support for automatic dependency tracking). -See \`config.log' for more details" "$LINENO" 5; } - fi - { am_dirpart=; unset am_dirpart;} - { am_filepart=; unset am_filepart;} - { am_mf=; unset am_mf;} - { am_rc=; unset am_rc;} - rm -f conftest-deps.mk -} - ;; - - esac -done # for ac_tag - - -as_fn_exit 0 -_ACEOF -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit 1 -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi - diff --git a/Build/source/libs/poppler/configure.ac b/Build/source/libs/poppler/configure.ac deleted file mode 100644 index 04c0106d457..00000000000 --- a/Build/source/libs/poppler/configure.ac +++ /dev/null @@ -1,144 +0,0 @@ -dnl $Id$ -dnl Process this file with autoconf to produce a configure script. -dnl -dnl Copyright 2018 Karl Berry -dnl Copyright 2011-2013 Peter Breitenlohner -dnl -dnl This file is free software; the copyright holder -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. -dnl -m4_include([version.ac])[] dnl define poppler_version -AC_INIT([poppler (TeX Live)], poppler_version, [tex-k@tug.org]) -AC_PREREQ([2.65]) -AC_CONFIG_SRCDIR([poppler-src/poppler/Array.cc]) -AC_CONFIG_AUX_DIR([../../build-aux]) -AC_CONFIG_MACRO_DIR([../../m4]) - -KPSE_BASIC([poppler], [no-define]) - -AC_PROG_CC -AC_PROG_CXX -AX_CXX_COMPILE_STDCXX([11]) -AC_PROG_RANLIB -AC_PROG_LN_S - -KPSE_COMPILER_VISIBILITY - -AC_CHECK_SIZEOF([long long]) -if test $ac_cv_sizeof_long_long -lt 8; then - AC_MSG_ERROR([Sorry, your compiler has no `long long' with at least 8 bytes.]) -fi - -if test "x$GXX" = xyes; then - NO_WARN_CXXFLAGS='-Wno-write-strings' -fi - -AC_SUBST([NO_WARN_CXXFLAGS]) - -dnl ##### Optional features. -AC_ARG_ENABLE([opi], - AS_HELP_STRING([--enable-opi], - [include support for OPI comments]), - [if test "x$enableval" = xyes; then - AC_DEFINE([OPI_SUPPORT], 1, [Generate OPI comments in PS output.]) -fi -]) - -AC_ARG_ENABLE([multithreaded], - AS_HELP_STRING([--enable-multithreaded], - [include support for multithreading]), - [if test "x$enableval" != xno; then - AC_DEFINE([MULTITHREADED], 1, [Enable multithreading support.]) -fi -]) - -AC_ARG_ENABLE([exceptions], - AS_HELP_STRING([--enable-exceptions], - [use C++ exceptions]), - [if test "x$enableval" = xyes; then - AC_DEFINE([USE_EXCEPTIONS], 1, [Throw exceptions to deal with not enough memory and similar problems]) -fi -]) - -AC_ARG_ENABLE([fixedpoint], - AS_HELP_STRING([--enable-fixedpoint], - [use fixed point (instead of floating point) arithmetic]), - [if test "x$enableval" = xyes; then - AC_DEFINE([USE_FIXEDPOINT], 1, [Use fixed point arithmetic]) -fi -]) - - -# For TL, we just hardware DCT/JPX_DECODER to on. -AC_DEFINE([HAVE_DCT_DECODER], 1, [Do we have any DCT decoder?]) -dnl -dnl AC_ARG_ENABLE([dctdecoder], -dnl AS_HELP_STRING([--enable-dctdecoder], -dnl [use dctdecoder]), -dnl [if test "x$enableval" = xlibjpeg; then -dnl AC_DEFINE([HAVE_DCT_DECODER], 1, [Do we have any DCT decoder?]) -dnl fi -dnl ]) - -AC_DEFINE([HAVE_JPX_DECODER], 1, [Do we have any JPX decoder?]) -dnl -dnl AC_ARG_ENABLE([libopenjpeg], -dnl AS_HELP_STRING([--enable-libopenjpeg], -dnl [use openjpeg decoder]), -dnl [if test "x$enableval" = xopenjpeg2; then -dnl AC_DEFINE([HAVE_JPX_DECODER], 1, [Do we have any JPX decoder?]) -dnl fi -dnl ]) - -dnl **** Checks for header files **** - -AC_CHECK_HEADERS([strings.h]) -AC_HEADER_DIRENT - -dnl Checks for library functions (from goo/glibc.h and more). -AC_CHECK_FUNCS([gettimeofday gmtime_r localtime_r mkstemp popen rand_r \ - timegm strtok_r]) - -dnl Check for struct stat needed by goo/gfile.c -AC_CHECK_MEMBERS([struct stat.st_mtim]) - -AC_SYS_LARGEFILE -AC_FUNC_FSEEKO -AC_CHECK_FUNC([ftell64], [AC_CHECK_FUNCS([fseek64])]) - -KPSE_COND_MINGW32 - -if test "x$kpse_cv_have_win32" = xmingw32; then - AC_DEFINE([_WIN32_WINNT], [0x0500], - [Define for MinGW32 to 0x0500 to declare `GetFileSizeEx'.]) -fi - -AC_CONFIG_HEADERS([config.h]) - -AC_CONFIG_HEADERS([poppler-config.h:poppler-src/poppler/poppler-config.h.in]) - -dnl ##### Export the version -AC_DEFINE_UNQUOTED([POPPLER_VERSION], ["poppler_version"], [Define to the poppler version.]) - -KPSE_ZLIB_FLAGS - -AM_CONDITIONAL([build], [test "x$enable_build" != xno]) - -if test "x$enable_build" != xno || test -f config.force; then - -KPSE_ADD_FLAGS([zlib]) -AC_CHECK_FUNC([inflate], , [AC_ERROR([zlib not found])]) -AC_CHECK_HEADERS([zlib.h], , [AC_ERROR([zlib not found])]) -KPSE_RESTORE_FLAGS - -echo timestamp >config.force -fi - -AC_DEFINE([ENABLE_ZLIB], 1, [Use zlib instead of builtin zlib decoder.]) - -AC_SUBST([POPPLER_TREE], [poppler-src]) - -AC_CONFIG_FILES([Makefile include/Makefile include/goo/Makefile include/fofi/Makefile]) - -AC_OUTPUT diff --git a/Build/source/libs/poppler/include/Makefile.am b/Build/source/libs/poppler/include/Makefile.am deleted file mode 100644 index c5026473e5a..00000000000 --- a/Build/source/libs/poppler/include/Makefile.am +++ /dev/null @@ -1,14 +0,0 @@ -## Proxy Makefile.am to install poppler headers for TeX Live -## -## Copyright (C) 2009-2013 Peter Breitenlohner -## -## This file is free software; the copyright holder -## gives unlimited permission to copy and/or distribute it, -## with or without modifications, as long as this notice is preserved. -## -SUBDIRS = goo fofi - -hdr_links = $(top_srcdir)/$(POPPLER_TREE)/poppler/*.h ../poppler-config.h - -include $(top_srcdir)/../../am/hdr_links.am - diff --git a/Build/source/libs/poppler/include/Makefile.in b/Build/source/libs/poppler/include/Makefile.in deleted file mode 100644 index 2fff64d32cf..00000000000 --- a/Build/source/libs/poppler/include/Makefile.in +++ /dev/null @@ -1,620 +0,0 @@ -# Makefile.in generated by automake 1.16.2 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2020 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -subdir = include -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/../../m4/ax_cxx_compile_stdcxx.m4 \ - $(top_srcdir)/../../m4/kpse-common.m4 \ - $(top_srcdir)/../../m4/kpse-visibility.m4 \ - $(top_srcdir)/../../m4/kpse-warnings.m4 \ - $(top_srcdir)/../../m4/kpse-win32.m4 \ - $(top_srcdir)/../../m4/kpse-zlib-flags.m4 \ - $(top_srcdir)/version.ac $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h \ - $(top_builddir)/poppler-config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ - ctags-recursive dvi-recursive html-recursive info-recursive \ - install-data-recursive install-dvi-recursive \ - install-exec-recursive install-html-recursive \ - install-info-recursive install-pdf-recursive \ - install-ps-recursive install-recursive installcheck-recursive \ - installdirs-recursive pdf-recursive ps-recursive \ - tags-recursive uninstall-recursive -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -am__recursive_targets = \ - $(RECURSIVE_TARGETS) \ - $(RECURSIVE_CLEAN_TARGETS) \ - $(am__extra_recursive_targets) -AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ - distdir distdir-am -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -# Read a list of newline-separated strings from the standard input, -# and print each of them once, without duplicates. Input order is -# *not* preserved. -am__uniquify_input = $(AWK) '\ - BEGIN { nonempty = 0; } \ - { items[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in items) print i; }; } \ -' -# Make sure the list of sources is unique. This is necessary because, -# e.g., the same source file might be shared among _SOURCES variables -# for different programs/libraries. -am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) -am__DIST_COMMON = $(srcdir)/Makefile.in \ - $(top_srcdir)/../../am/hdr_links.am -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -GREP = @GREP@ -HAVE_CXX11 = @HAVE_CXX11@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -NO_WARN_CXXFLAGS = @NO_WARN_CXXFLAGS@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -POPPLER_TREE = @POPPLER_TREE@ -RANLIB = @RANLIB@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -VISIBILITY_CFLAGS = @VISIBILITY_CFLAGS@ -VISIBILITY_CXXFLAGS = @VISIBILITY_CXXFLAGS@ -WARNING_CFLAGS = @WARNING_CFLAGS@ -WARNING_CXXFLAGS = @WARNING_CXXFLAGS@ -ZLIB_DEPEND = @ZLIB_DEPEND@ -ZLIB_INCLUDES = @ZLIB_INCLUDES@ -ZLIB_LIBS = @ZLIB_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build_alias = @build_alias@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host_alias = @host_alias@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUBDIRS = goo fofi -hdr_links = $(top_srcdir)/$(POPPLER_TREE)/poppler/*.h ../poppler-config.h -all: all-recursive - -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/../../am/hdr_links.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign include/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; -$(top_srcdir)/../../am/hdr_links.am $(am__empty): - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -# This directory's subdirectories are mostly independent; you can cd -# into them and run 'make' without going through this Makefile. -# To change the values of 'make' variables: instead of editing Makefiles, -# (1) if the variable is set in 'config.status', edit 'config.status' -# (which will cause the Makefiles to be regenerated when you run 'make'); -# (2) otherwise, pass the desired values on the 'make' command line. -$(am__recursive_targets): - @fail=; \ - if $(am__make_keepgoing); then \ - failcom='fail=yes'; \ - else \ - failcom='exit 1'; \ - fi; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-recursive -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-recursive - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" -cscopelist: cscopelist-recursive - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) distdir-am - -distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - $(am__make_dryrun) \ - || test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ - $(am__relativize); \ - new_distdir=$$reldir; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile all-local -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic mostlyclean-am - -distclean: distclean-recursive - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-local \ - distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: - -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: - -.MAKE: $(am__recursive_targets) install-am install-strip - -.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am all-local \ - check check-am clean clean-generic cscopelist-am ctags \ - ctags-am distclean distclean-generic distclean-local \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \ - tags-am uninstall uninstall-am - -.PRECIOUS: Makefile - -all-local: - @for file in $(hdr_links); do \ - test -f $$file || continue; \ - inst=`echo $$file | sed -e 's/^.*\///'`; \ - test -f $$inst || { \ - rm -f $$inst; \ - if $(AM_V_P); then echo "$(LN_S) $$file $$inst"; \ - else echo " INST $$inst"; fi; \ - $(LN_S) $$file $$inst; } || exit 1; \ - done - -distclean-local: - rm -f *.h - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/Build/source/libs/poppler/include/fofi/Makefile.am b/Build/source/libs/poppler/include/fofi/Makefile.am deleted file mode 100644 index 6fa1c9b3412..00000000000 --- a/Build/source/libs/poppler/include/fofi/Makefile.am +++ /dev/null @@ -1,12 +0,0 @@ -## Proxy Makefile.am to install poppler/fofi headers for TeX Live -## -## Copyright (C) 2009-2013 Peter Breitenlohner -## -## This file is free software; the copyright holder -## gives unlimited permission to copy and/or distribute it, -## with or without modifications, as long as this notice is preserved. -## -hdr_links = $(top_srcdir)/$(POPPLER_TREE)/fofi/*.h - -include $(top_srcdir)/../../am/hdr_links.am - diff --git a/Build/source/libs/poppler/include/fofi/Makefile.in b/Build/source/libs/poppler/include/fofi/Makefile.in deleted file mode 100644 index a2698444968..00000000000 --- a/Build/source/libs/poppler/include/fofi/Makefile.in +++ /dev/null @@ -1,438 +0,0 @@ -# Makefile.in generated by automake 1.16.2 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2020 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -subdir = include/fofi -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/../../m4/ax_cxx_compile_stdcxx.m4 \ - $(top_srcdir)/../../m4/kpse-common.m4 \ - $(top_srcdir)/../../m4/kpse-visibility.m4 \ - $(top_srcdir)/../../m4/kpse-warnings.m4 \ - $(top_srcdir)/../../m4/kpse-win32.m4 \ - $(top_srcdir)/../../m4/kpse-zlib-flags.m4 \ - $(top_srcdir)/version.ac $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h \ - $(top_builddir)/poppler-config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -SOURCES = -DIST_SOURCES = -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -am__DIST_COMMON = $(srcdir)/Makefile.in \ - $(top_srcdir)/../../am/hdr_links.am -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -GREP = @GREP@ -HAVE_CXX11 = @HAVE_CXX11@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -NO_WARN_CXXFLAGS = @NO_WARN_CXXFLAGS@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -POPPLER_TREE = @POPPLER_TREE@ -RANLIB = @RANLIB@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -VISIBILITY_CFLAGS = @VISIBILITY_CFLAGS@ -VISIBILITY_CXXFLAGS = @VISIBILITY_CXXFLAGS@ -WARNING_CFLAGS = @WARNING_CFLAGS@ -WARNING_CXXFLAGS = @WARNING_CXXFLAGS@ -ZLIB_DEPEND = @ZLIB_DEPEND@ -ZLIB_INCLUDES = @ZLIB_INCLUDES@ -ZLIB_LIBS = @ZLIB_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build_alias = @build_alias@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host_alias = @host_alias@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -hdr_links = $(top_srcdir)/$(POPPLER_TREE)/fofi/*.h -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/../../am/hdr_links.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/fofi/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign include/fofi/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; -$(top_srcdir)/../../am/hdr_links.am $(am__empty): - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -tags TAGS: - -ctags CTAGS: - -cscope cscopelist: - - -distdir: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) distdir-am - -distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile all-local -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-local - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: all all-am all-local check check-am clean clean-generic \ - cscopelist-am ctags-am distclean distclean-generic \ - distclean-local distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic pdf pdf-am ps ps-am tags-am uninstall \ - uninstall-am - -.PRECIOUS: Makefile - -all-local: - @for file in $(hdr_links); do \ - test -f $$file || continue; \ - inst=`echo $$file | sed -e 's/^.*\///'`; \ - test -f $$inst || { \ - rm -f $$inst; \ - if $(AM_V_P); then echo "$(LN_S) $$file $$inst"; \ - else echo " INST $$inst"; fi; \ - $(LN_S) $$file $$inst; } || exit 1; \ - done - -distclean-local: - rm -f *.h - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/Build/source/libs/poppler/include/goo/Makefile.am b/Build/source/libs/poppler/include/goo/Makefile.am deleted file mode 100644 index 41f9e3a00c6..00000000000 --- a/Build/source/libs/poppler/include/goo/Makefile.am +++ /dev/null @@ -1,12 +0,0 @@ -## Proxy Makefile.am to install poppler/goo headers for TeX Live -## -## Copyright (C) 2009-2013 Peter Breitenlohner -## -## This file is free software; the copyright holder -## gives unlimited permission to copy and/or distribute it, -## with or without modifications, as long as this notice is preserved. -## -hdr_links = $(top_srcdir)/$(POPPLER_TREE)/goo/*.h - -include $(top_srcdir)/../../am/hdr_links.am - diff --git a/Build/source/libs/poppler/include/goo/Makefile.in b/Build/source/libs/poppler/include/goo/Makefile.in deleted file mode 100644 index 983bfbb0fa0..00000000000 --- a/Build/source/libs/poppler/include/goo/Makefile.in +++ /dev/null @@ -1,438 +0,0 @@ -# Makefile.in generated by automake 1.16.2 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2020 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -subdir = include/goo -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/../../m4/ax_cxx_compile_stdcxx.m4 \ - $(top_srcdir)/../../m4/kpse-common.m4 \ - $(top_srcdir)/../../m4/kpse-visibility.m4 \ - $(top_srcdir)/../../m4/kpse-warnings.m4 \ - $(top_srcdir)/../../m4/kpse-win32.m4 \ - $(top_srcdir)/../../m4/kpse-zlib-flags.m4 \ - $(top_srcdir)/version.ac $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h \ - $(top_builddir)/poppler-config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -SOURCES = -DIST_SOURCES = -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -am__DIST_COMMON = $(srcdir)/Makefile.in \ - $(top_srcdir)/../../am/hdr_links.am -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -GREP = @GREP@ -HAVE_CXX11 = @HAVE_CXX11@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -NO_WARN_CXXFLAGS = @NO_WARN_CXXFLAGS@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -POPPLER_TREE = @POPPLER_TREE@ -RANLIB = @RANLIB@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -VISIBILITY_CFLAGS = @VISIBILITY_CFLAGS@ -VISIBILITY_CXXFLAGS = @VISIBILITY_CXXFLAGS@ -WARNING_CFLAGS = @WARNING_CFLAGS@ -WARNING_CXXFLAGS = @WARNING_CXXFLAGS@ -ZLIB_DEPEND = @ZLIB_DEPEND@ -ZLIB_INCLUDES = @ZLIB_INCLUDES@ -ZLIB_LIBS = @ZLIB_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build_alias = @build_alias@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host_alias = @host_alias@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -hdr_links = $(top_srcdir)/$(POPPLER_TREE)/goo/*.h -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/../../am/hdr_links.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/goo/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign include/goo/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; -$(top_srcdir)/../../am/hdr_links.am $(am__empty): - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -tags TAGS: - -ctags CTAGS: - -cscope cscopelist: - - -distdir: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) distdir-am - -distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile all-local -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-local - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: all all-am all-local check check-am clean clean-generic \ - cscopelist-am ctags-am distclean distclean-generic \ - distclean-local distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic pdf pdf-am ps ps-am tags-am uninstall \ - uninstall-am - -.PRECIOUS: Makefile - -all-local: - @for file in $(hdr_links); do \ - test -f $$file || continue; \ - inst=`echo $$file | sed -e 's/^.*\///'`; \ - test -f $$inst || { \ - rm -f $$inst; \ - if $(AM_V_P); then echo "$(LN_S) $$file $$inst"; \ - else echo " INST $$inst"; fi; \ - $(LN_S) $$file $$inst; } || exit 1; \ - done - -distclean-local: - rm -f *.h - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/Build/source/libs/poppler/poppler-src/AUTHORS b/Build/source/libs/poppler/poppler-src/AUTHORS deleted file mode 100644 index a785e403211..00000000000 --- a/Build/source/libs/poppler/poppler-src/AUTHORS +++ /dev/null @@ -1,5 +0,0 @@ -xpdf is written by Derek Noonburg - -libpoppler is a fork of xpdf-3.00 - -Current Maintainer: Albert Astals Cid diff --git a/Build/source/libs/poppler/poppler-src/CMakeLists.txt b/Build/source/libs/poppler/poppler-src/CMakeLists.txt deleted file mode 100644 index cf3a542389e..00000000000 --- a/Build/source/libs/poppler/poppler-src/CMakeLists.txt +++ /dev/null @@ -1,767 +0,0 @@ -project(poppler) - -cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR) - -set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules) - -include(PopplerDefaults) -include(PopplerMacros) -include(MacroOptionalFindPackage) -find_package(PkgConfig) -include(MacroEnsureVersion) -include(MacroBoolTo01) -if (WIN32) - message("-- Using win32 threads") -else() - set(CMAKE_THREAD_PREFER_PTHREAD TRUE) - set(THREADS_PREFER_PTHREAD_FLAG TRUE) - find_package(Threads) -endif() -include(TestBigEndian) -test_big_endian(WORDS_BIGENDIAN) -include(CheckFileOffsetBits) -CHECK_FILE_OFFSET_BITS() - -include(GNUInstallDirs) - -find_package (ECM 1.6.0 QUIET NO_MODULE) -if (ECM_FOUND) - include("${ECM_MODULE_DIR}/ECMEnableSanitizers.cmake") -endif() - -set(POPPLER_MAJOR_VERSION "0") -set(POPPLER_MINOR_VERSION "68") -set(POPPLER_MICRO_VERSION "0") -set(POPPLER_VERSION "${POPPLER_MAJOR_VERSION}.${POPPLER_MINOR_VERSION}.${POPPLER_MICRO_VERSION}") - -set (CMAKE_CXX_STANDARD 11) -set (CMAKE_CXX_EXTENSIONS OFF) - -# command line switches -option(ENABLE_XPDF_HEADERS "Install unsupported xpdf headers." OFF) -option(BUILD_GTK_TESTS "Whether compile the GTK+ test programs." ON) -option(BUILD_QT5_TESTS "Whether compile the Qt5 test programs." ON) -option(BUILD_CPP_TESTS "Whether compile the CPP test programs." ON) -option(ENABLE_SPLASH "Build the Splash graphics backend." ON) -option(ENABLE_UTILS "Compile poppler command line utils." ON) -option(ENABLE_CPP "Compile poppler cpp wrapper." ON) -option(ENABLE_GLIB "Compile poppler glib wrapper." ON) -option(ENABLE_GOBJECT_INTROSPECTION "Whether to generate GObject introspection." ON) -option(ENABLE_GTK_DOC "Whether to generate glib API documentation." OFF) -option(ENABLE_QT5 "Compile poppler qt5 wrapper." ON) -set(ENABLE_LIBOPENJPEG "openjpeg2" CACHE STRING "Use libopenjpeg for JPX streams. Possible values: openjpeg2, unmaintained, none. 'unmaintained' gives you the internal unmaintained decoder. Use at your own risk. 'none' compiles no JPX decoder at all. Default: openjpeg2") -set(ENABLE_CMS "lcms2" CACHE STRING "Use color management system. Possible values: lcms2, none. 'none' disables color management system.") -set(ENABLE_DCTDECODER "libjpeg" CACHE STRING "Use libjpeg for DCT streams. Possible values: libjpeg, unmaintained, none. will use libjpeg if available or fail if not. 'unmaintained' gives you the internal unmaintained decoder. Use at your own risk. 'none' compiles no DCT decoder at all. Default: libjpeg") -option(ENABLE_LIBCURL "Build libcurl based HTTP support." ON) -option(ENABLE_ZLIB "Build with zlib." ON) -option(ENABLE_ZLIB_UNCOMPRESS "Use zlib to uncompress flate streams (not totally safe)." OFF) -option(SPLASH_CMYK "Include support for CMYK rasterization." OFF) -option(USE_FIXEDPOINT "Use fixed point arithmetic in the Splash backend" OFF) -option(USE_FLOAT "Use single precision arithmetic in the Splash backend" OFF) -option(BUILD_SHARED_LIBS "Build poppler as a shared library" ON) -if(WIN32) - option(ENABLE_RELOCATABLE "Do not hardcode the poppler library location (on Windows)." ON) -else() - set(ENABLE_RELOCATABLE OFF) -endif() -option(EXTRA_WARN "Enable extra compile warnings" OFF) - -set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) - -set(TESTDATADIR "${CMAKE_SOURCE_DIR}/../test" CACHE STRING "Specify test data dir.") -if(NOT (EXISTS ${TESTDATADIR} AND EXISTS ${TESTDATADIR}/test-poppler.c)) - message(WARNING " - No test data found in $testdatadir. - You will not be able to run 'make test' successfully. - - The test data is not included in the source packages - and is also not part of the main git repository. Instead, - you can checkout the test data from its own git - repository with: - - git clone git://git.freedesktop.org/git/poppler/test - - You should checkout the test data as a sibling of your - poppler source folder or specify the location of your - checkout with -DTESTDATADIR=/path/to/checkoutdir/test. - ") -endif() - -if(WIN32) - set(_default_fontconfiguration "win32") -elseif(ANDROID) - # on android we don't have fontconfig and we don't want window-specific code - set(_default_fontconfiguration "generic") -else() - set(_default_fontconfiguration "fontconfig") -endif() -set(FONT_CONFIGURATION "${_default_fontconfiguration}" CACHE STRING "The font configuration backend (win32|generic|fontconfig).") -string(TOLOWER "${FONT_CONFIGURATION}" font_configuration) -set(WITH_FONTCONFIGURATION_WIN32 OFF) -set(WITH_FONTCONFIGURATION_FONTCONFIG OFF) -if(font_configuration STREQUAL "win32") - set(WITH_FONTCONFIGURATION_WIN32 ON) -elseif(font_configuration STREQUAL "fontconfig") - set(WITH_FONTCONFIGURATION_FONTCONFIG ON) -elseif(font_configuration STREQUAL "generic") - message(STATUS "no fontconfig or win32 specific code") -else() - message(FATAL_ERROR "Invalid font configuration setting: ${FONT_CONFIGURATION}") -endif() - -if(CMAKE_USE_PTHREADS_INIT OR WIN32) - set(MULTITHREADED ON) -endif() - -# Enable these unconditionally. -set(OPI_SUPPORT ON) -set(TEXTOUT_WORD_LIST ON) - -# setting the minimum required versions for some components -set(CAIRO_VERSION "1.10.0") -set(GLIB_REQUIRED "2.41") - -macro_bool_to_01(ENABLE_SPLASH HAVE_SPLASH) -find_package(Freetype REQUIRED) -if(WITH_FONTCONFIGURATION_FONTCONFIG) - find_package(Fontconfig REQUIRED) -endif() -macro_optional_find_package(JPEG) -macro_optional_find_package(PNG) -macro_optional_find_package(TIFF) -macro_optional_find_package(NSS3) -if(ENABLE_DCTDECODER STREQUAL "libjpeg") - if(JPEG_FOUND) - set(ENABLE_LIBJPEG ${JPEG_FOUND}) - else() - message(FATAL_ERROR "Install libjpeg before trying to build poppler. You can also decide to use the internal unmaintained DCT decoder or none at all.") - endif() - set(HAVE_DCT_DECODER ON) -elseif(ENABLE_DCTDECODER STREQUAL "unmaintained") - set(ENABLE_LIBJPEG OFF) - set(HAVE_DCT_DECODER ON) -elseif(ENABLE_DCTDECODER STREQUAL "none") - set(ENABLE_LIBJPEG OFF) - set(HAVE_DCT_DECODER OFF) -else() - message(FATAL_ERROR "Invalid ENABLE_DCTDECODER value.") -endif() - -if (ENABLE_QT5) - find_package(Qt5Core) - find_package(Qt5Gui) - find_package(Qt5Xml) - find_package(Qt5Widgets) - find_package(Qt5Test) - if (NOT (Qt5Core_FOUND AND Qt5Gui_FOUND AND Qt5Xml_FOUND AND Qt5Widgets_FOUND AND Qt5Test_FOUND)) - message("-- Package Qt5Core or Qt5Gui or Qt5Xml or Qt5Widgets or Qt5Test not found") - set(ENABLE_QT5 OFF) - endif() -endif() - -macro_optional_find_package(Cairo ${CAIRO_VERSION}) -if(CAIRO_FOUND) - set(HAVE_CAIRO ${CAIRO_FOUND}) - set(CAIRO_FEATURE "#define POPPLER_HAS_CAIRO 1") - set(CAIRO_REQ "cairo") - set(POPPLER_GLIB_DISABLE_DEPRECATED "") - set(POPPLER_GLIB_DISABLE_SINGLE_INCLUDES "") - if(ENABLE_GLIB) - macro_optional_find_package(GLIB) - if(NOT GLIB_FOUND) - set(ENABLE_GLIB OFF) - endif() - endif() - if(ENABLE_GLIB) - if(ENABLE_GOBJECT_INTROSPECTION) - # Check for introspection - macro_optional_find_package(GObjectIntrospection 0.9.12) - set(HAVE_INTROSPECTION ${INTROSPECTION_FOUND}) - endif() - set(POPPLER_GLIB_DISABLE_DEPRECATED "${POPPLER_GLIB_DISABLE_DEPRECATED} -DG_DISABLE_DEPRECATED") - set(POPPLER_GLIB_DISABLE_SINGLE_INCLUDES "${POPPLER_GLIB_DISABLE_SINGLE_INCLUDES} -DG_DISABLE_SINGLE_INCLUDES") - macro_optional_find_package(GTK) - endif() -else() - set(CAIRO_FEATURE "#undef POPPLER_HAS_CAIRO") - set(ENABLE_GLIB OFF) -endif() -if(ENABLE_CPP) - macro_optional_find_package(Iconv) - set(ENABLE_CPP ${ICONV_FOUND}) - set(HAVE_ICONV ${ICONV_FOUND}) -endif() -if(ENABLE_ZLIB) - find_package(ZLIB) - set(ENABLE_ZLIB ${ZLIB_FOUND}) -endif() -if(ENABLE_ZLIB_UNCOMPRESS AND NOT ENABLE_ZLIB) - message("Warning: ENABLE_ZLIB_UNCOMPRESS requires ENABLE_ZLIB") - set(ENABLE_ZLIB_UNCOMPRESS FALSE) -endif() -set(WITH_OPENJPEG FALSE) -if(ENABLE_LIBOPENJPEG STREQUAL "openjpeg2") - find_package(OpenJPEG) - set(WITH_OPENJPEG ${OpenJPEG_FOUND}) - if(NOT OpenJPEG_FOUND OR OPENJPEG_MAJOR_VERSION VERSION_LESS 2) - message(FATAL_ERROR "Install libopenjpeg2 before trying to build poppler. You can also decide to use the internal unmaintained JPX decoder or none at all.") - endif() - set(HAVE_JPX_DECODER ON) -elseif(ENABLE_LIBOPENJPEG STREQUAL "unmaintained") - set(WITH_OPENJPEG OFF) - set(HAVE_JPX_DECODER ON) -elseif(ENABLE_LIBOPENJPEG STREQUAL "none") - set(WITH_OPENJPEG OFF) - set(HAVE_JPX_DECODER OFF) -else() - message(FATAL_ERROR "Invalid ENABLE_LIBOPENJPEG value: ${ENABLE_LIBOPENJPEG}") -endif() -set(ENABLE_LIBOPENJPEG "${WITH_OPENJPEG}") -if(ENABLE_CMS STREQUAL "lcms2") - find_package(LCMS2) - set(USE_CMS ${LCMS2_FOUND}) -elseif(NOT ENABLE_CMS STREQUAL "none") - message(FATAL_ERROR "Invalid ENABLE_CMS value: ${ENABLE_CMS}") -endif() -if(ENABLE_LIBCURL) - find_package(CURL) - if(CURL_FOUND) - include_directories(${CURL_INCLUDE_DIR}) - set(POPPLER_HAS_CURL_SUPPORT ON) - else() - set(ENABLE_LIBCURL OFF) - endif() -endif() - -if(MINGW) - # Use mingw's ansi stdio extensions - add_definitions(-D__USE_MINGW_ANSI_STDIO=1) -endif() -if(FONTCONFIG_FOUND) - add_definitions(${FONTCONFIG_DEFINITIONS}) - include_directories(${FONTCONFIG_INCLUDE_DIR}) -endif() -if(WITH_FONTCONFIGURATION_WIN32) - if(MINGW) - # Set the minimum required Internet Explorer version to 5.0 - add_definitions(-D_WIN32_IE=0x0500) - endif() -endif() -include_directories( - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/fofi - ${CMAKE_CURRENT_SOURCE_DIR}/goo - ${CMAKE_CURRENT_SOURCE_DIR}/poppler - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_CURRENT_BINARY_DIR}/poppler - ${FREETYPE_INCLUDE_DIRS} -) - -if(ENABLE_ZLIB) - include_directories(${ZLIB_INCLUDE_DIR}) -endif() - -if (NSS3_FOUND) - add_definitions(${NSS3_CFLAGS}) - set(ENABLE_NSS3 ON) -endif() -if(JPEG_FOUND) - include_directories(${JPEG_INCLUDE_DIR}) -endif() -if(PNG_FOUND) - include_directories(${PNG_INCLUDE_DIR}) - set(ENABLE_LIBPNG ON) -endif() -if(TIFF_FOUND) - include_directories(${TIFF_INCLUDE_DIR}) - set(ENABLE_LIBTIFF ON) -endif() -if(OpenJPEG_FOUND) - include_directories(${OPENJPEG_INCLUDE_DIRS}) -endif() -if(LCMS2_FOUND) - include_directories(${LCMS2_INCLUDE_DIR}) -endif() - -# Recent versions of poppler-data install a .pc file. -# Use it to determine the encoding data path, if available. -# Default to the same prefix otherwise. -pkg_check_modules(POPPLER_DATA poppler-data) -if(POPPLER_DATA_FOUND) - execute_process(COMMAND "${PKG_CONFIG_EXECUTABLE}" --variable=poppler_datadir poppler-data - RESULT_VARIABLE _result_var - OUTPUT_VARIABLE _output_var OUTPUT_STRIP_TRAILING_WHITESPACE) - if(_result_var STREQUAL "0" AND NOT _output_var STREQUAL "") - set(POPPLER_DATADIR "${_output_var}") - endif() -endif() -if(NOT DEFINED POPPLER_DATADIR) - set(POPPLER_DATADIR "${CMAKE_INSTALL_PREFIX}/share/poppler") -endif() - -if(EXTRA_WARN) - set(CMAKE_C_FLAGS "-Wall ${CMAKE_C_FLAGS}") - set(CMAKE_CXX_FLAGS "${DEFAULT_COMPILE_WARNINGS_EXTRA} ${CMAKE_CXX_FLAGS}") -else() - set(CMAKE_C_FLAGS "-Wall ${CMAKE_C_FLAGS}") - set(CMAKE_CXX_FLAGS "${DEFAULT_COMPILE_WARNINGS} ${CMAKE_CXX_FLAGS}") -endif() - - -include(ConfigureChecks.cmake) -configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h) -configure_file(poppler/poppler-config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/poppler/poppler-config.h) - - -set(poppler_SRCS - goo/gfile.cc - goo/gmempp.cc - goo/GooList.cc - goo/GooTimer.cc - goo/GooString.cc - goo/gmem.cc - goo/FixedPoint.cc - goo/NetPBMWriter.cc - goo/PNGWriter.cc - goo/TiffWriter.cc - goo/JpegWriter.cc - goo/ImgWriter.cc - goo/gstrtod.cc - goo/grandom.cc - goo/glibc.cc - goo/glibc_strtok_r.cc - fofi/FoFiBase.cc - fofi/FoFiEncodings.cc - fofi/FoFiTrueType.cc - fofi/FoFiType1.cc - fofi/FoFiType1C.cc - fofi/FoFiIdentifier.cc - poppler/Annot.cc - poppler/Array.cc - poppler/BuiltinFont.cc - poppler/BuiltinFontTables.cc - poppler/CachedFile.cc - poppler/Catalog.cc - poppler/CharCodeToUnicode.cc - poppler/CMap.cc - poppler/DateInfo.cc - poppler/Decrypt.cc - poppler/Dict.cc - poppler/Error.cc - poppler/FileSpec.cc - poppler/FontEncodingTables.cc - poppler/Form.cc - poppler/FontInfo.cc - poppler/Function.cc - poppler/Gfx.cc - poppler/GfxFont.cc - poppler/GfxState.cc - poppler/GlobalParams.cc - poppler/Hints.cc - poppler/JArithmeticDecoder.cc - poppler/JBIG2Stream.cc - poppler/Lexer.cc - poppler/Link.cc - poppler/Linearization.cc - poppler/LocalPDFDocBuilder.cc - poppler/MarkedContentOutputDev.cc - poppler/NameToCharCode.cc - poppler/Object.cc - poppler/OptionalContent.cc - poppler/Outline.cc - poppler/OutputDev.cc - poppler/Page.cc - poppler/PageTransition.cc - poppler/Parser.cc - poppler/PDFDoc.cc - poppler/PDFDocEncoding.cc - poppler/PDFDocFactory.cc - poppler/PopplerCache.cc - poppler/ProfileData.cc - poppler/PreScanOutputDev.cc - poppler/PSTokenizer.cc - poppler/SignatureInfo.cc - poppler/Stream.cc - poppler/StructTreeRoot.cc - poppler/StructElement.cc - poppler/UnicodeMap.cc - poppler/UnicodeMapFuncs.cc - poppler/UnicodeTypeTable.cc - poppler/UTF.cc - poppler/XRef.cc - poppler/PSOutputDev.cc - poppler/TextOutputDev.cc - poppler/PageLabelInfo.cc - poppler/SecurityHandler.cc - poppler/StdinCachedFile.cc - poppler/StdinPDFDocBuilder.cc - poppler/Sound.cc - poppler/ViewerPreferences.cc - poppler/XpdfPluginAPI.cc - poppler/Movie.cc - poppler/Rendition.cc -) -set(poppler_LIBS ${FREETYPE_LIBRARIES}) -if(ENABLE_SPLASH) - set(poppler_SRCS ${poppler_SRCS} - poppler/SplashOutputDev.cc - splash/Splash.cc - splash/SplashBitmap.cc - splash/SplashClip.cc - splash/SplashFTFont.cc - splash/SplashFTFontEngine.cc - splash/SplashFTFontFile.cc - splash/SplashFont.cc - splash/SplashFontEngine.cc - splash/SplashFontFile.cc - splash/SplashFontFileID.cc - splash/SplashPath.cc - splash/SplashPattern.cc - splash/SplashScreen.cc - splash/SplashState.cc - splash/SplashXPath.cc - splash/SplashXPathScanner.cc - ) -endif() -if(FONTCONFIG_FOUND) - set(poppler_LIBS ${poppler_LIBS} ${FONTCONFIG_LIBRARIES}) -endif() - -if(JPEG_FOUND) - set(poppler_SRCS ${poppler_SRCS} - poppler/DCTStream.cc - ) - set(poppler_LIBS ${poppler_LIBS} ${JPEG_LIBRARIES}) -endif() -if(ENABLE_ZLIB) - set(poppler_SRCS ${poppler_SRCS} - poppler/FlateEncoder.cc - ) - set(poppler_LIBS ${poppler_LIBS} ${ZLIB_LIBRARIES}) -endif() -if(ENABLE_ZLIB_UNCOMPRESS) - set(poppler_SRCS ${poppler_SRCS} - poppler/FlateStream.cc - ) -endif() -if(ENABLE_LIBCURL) - set(poppler_SRCS ${poppler_SRCS} - poppler/CurlCachedFile.cc - poppler/CurlPDFDocBuilder.cc - ) - set(poppler_LIBS ${poppler_LIBS} ${CURL_LIBRARIES}) -endif() -if (ENABLE_NSS3) - set(poppler_SRCS ${poppler_SRCS} - poppler/SignatureHandler.cc - ) - set(poppler_LIBS ${poppler_LIBS} ${NSS3_LIBRARIES}) -endif() -if (OpenJPEG_FOUND) - set(poppler_SRCS ${poppler_SRCS} - poppler/JPEG2000Stream.cc - ) - set(poppler_LIBS ${poppler_LIBS} openjp2) -else () - set(poppler_SRCS ${poppler_SRCS} - poppler/JPXStream.cc - ) -endif() -if(USE_CMS) - set(poppler_LIBS ${poppler_LIBS} ${LCMS2_LIBRARIES}) -endif() -if(WIN32) - # use clean APIs - add_definitions(-DWIN32_LEAN_AND_MEAN) - # gdi32 is needed under win32 - set(poppler_LIBS ${poppler_LIBS} gdi32) -endif() -if(PNG_FOUND) - set(poppler_LIBS ${poppler_LIBS} ${PNG_LIBRARIES}) -endif() -if(TIFF_FOUND) - set(poppler_LIBS ${poppler_LIBS} ${TIFF_LIBRARIES}) -endif() - -if(MSVC) -add_definitions(-D_CRT_SECURE_NO_WARNINGS) -add_library(poppler STATIC ${poppler_SRCS}) -else() -add_library(poppler ${poppler_SRCS}) -endif() -set_target_properties(poppler PROPERTIES VERSION 79.0.0 SOVERSION 79) -if(MINGW) - get_target_property(POPPLER_SOVERSION poppler SOVERSION) - set_target_properties(poppler PROPERTIES SUFFIX "-${POPPLER_SOVERSION}${CMAKE_SHARED_LIBRARY_SUFFIX}") -endif() -target_link_libraries(poppler LINK_PRIVATE ${poppler_LIBS}) -if(CMAKE_USE_PTHREADS_INIT) - target_link_libraries(poppler LINK_PRIVATE Threads::Threads) -endif() -install(TARGETS poppler RUNTIME DESTINATION bin LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) - -if(ENABLE_XPDF_HEADERS) - install(FILES - poppler/Annot.h - poppler/Array.h - poppler/BuiltinFont.h - poppler/BuiltinFontTables.h - poppler/CachedFile.h - poppler/Catalog.h - poppler/CharCodeToUnicode.h - poppler/CMap.h - poppler/DateInfo.h - poppler/Decrypt.h - poppler/Dict.h - poppler/Error.h - poppler/FileSpec.h - poppler/FontEncodingTables.h - poppler/FontInfo.h - poppler/Form.h - poppler/Function.h - poppler/Gfx.h - poppler/GfxFont.h - poppler/GfxState.h - poppler/GfxState_helpers.h - poppler/GlobalParams.h - poppler/Hints.h - poppler/JArithmeticDecoder.h - poppler/JBIG2Stream.h - poppler/Lexer.h - poppler/Link.h - poppler/Linearization.h - poppler/LocalPDFDocBuilder.h - poppler/MarkedContentOutputDev.h - poppler/Movie.h - poppler/NameToCharCode.h - poppler/Object.h - poppler/OptionalContent.h - poppler/Outline.h - poppler/OutputDev.h - poppler/Page.h - poppler/PageTransition.h - poppler/Parser.h - poppler/PDFDoc.h - poppler/PDFDocBuilder.h - poppler/PDFDocEncoding.h - poppler/PDFDocFactory.h - poppler/PopplerCache.h - poppler/ProfileData.h - poppler/PreScanOutputDev.h - poppler/PSTokenizer.h - poppler/Rendition.h - poppler/Stream-CCITT.h - poppler/Stream.h - poppler/StructElement.h - poppler/StructTreeRoot.h - poppler/UnicodeMap.h - poppler/UnicodeMapFuncs.h - poppler/UnicodeMapTables.h - poppler/UnicodeTypeTable.h - poppler/UnicodeCClassTables.h - poppler/UnicodeCompTables.h - poppler/UnicodeDecompTables.h - poppler/ViewerPreferences.h - poppler/XRef.h - poppler/CharTypes.h - poppler/CompactFontTables.h - poppler/ErrorCodes.h - poppler/NameToUnicodeTable.h - poppler/PSOutputDev.h - poppler/TextOutputDev.h - poppler/SecurityHandler.h - poppler/StdinCachedFile.h - poppler/StdinPDFDocBuilder.h - poppler/UTF.h - poppler/XpdfPluginAPI.h - poppler/Sound.h - ${CMAKE_CURRENT_BINARY_DIR}/poppler/poppler-config.h - DESTINATION include/poppler) - install(FILES - goo/GooList.h - goo/GooTimer.h - goo/GooMutex.h - goo/GooString.h - goo/gtypes.h - goo/gmem.h - goo/gfile.h - goo/FixedPoint.h - goo/ImgWriter.h - goo/GooLikely.h - goo/gstrtod.h - goo/grandom.h - DESTINATION include/poppler/goo) - if(PNG_FOUND) - install(FILES - goo/PNGWriter.h - DESTINATION include/poppler/goo) - endif() - if(TIFF_FOUND) - install(FILES - goo/TiffWriter.h - DESTINATION include/poppler/goo) - endif() - if(JPEG_FOUND) - install(FILES - goo/JpegWriter.h - DESTINATION include/poppler/goo) - endif() - install(FILES - fofi/FoFiBase.h - fofi/FoFiEncodings.h - fofi/FoFiTrueType.h - fofi/FoFiType1.h - fofi/FoFiType1C.h - fofi/FoFiIdentifier.h - DESTINATION include/poppler/fofi) - if(ENABLE_LIBCURL) - install(FILES - poppler/CurlCachedFile.h - poppler/CurlPDFDocBuilder.h - DESTINATION include/poppler) - endif() - if(OpenJPEG_FOUND) - install(FILES - poppler/JPEG2000Stream.h - DESTINATION include/poppler) - else() - install(FILES - poppler/JPXStream.h - DESTINATION include/poppler) - endif() - if(ENABLE_SPLASH) - install(FILES - poppler/SplashOutputDev.h - DESTINATION include/poppler) - install(FILES - splash/Splash.h - splash/SplashBitmap.h - splash/SplashClip.h - splash/SplashErrorCodes.h - splash/SplashFTFont.h - splash/SplashFTFontEngine.h - splash/SplashFTFontFile.h - splash/SplashFont.h - splash/SplashFontEngine.h - splash/SplashFontFile.h - splash/SplashFontFileID.h - splash/SplashGlyphBitmap.h - splash/SplashMath.h - splash/SplashPath.h - splash/SplashPattern.h - splash/SplashScreen.h - splash/SplashState.h - splash/SplashTypes.h - splash/SplashXPath.h - splash/SplashXPathScanner.h - DESTINATION include/poppler/splash) - endif() -endif() - - -if(ENABLE_UTILS) - add_subdirectory(utils) -endif() -if(ENABLE_GLIB) - add_subdirectory(glib) -endif() -add_subdirectory(test) -if(ENABLE_QT5) - add_subdirectory(qt5) -endif() -if(ENABLE_CPP) - add_subdirectory(cpp) -endif() - -set(PKG_CONFIG_VERSION_0_18 TRUE) -if(PKG_CONFIG_EXECUTABLE) - exec_program(${PKG_CONFIG_EXECUTABLE} ARGS --version RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _output_VAR) - macro_ensure_version("0.18" "${_output_VAR}" PKG_CONFIG_VERSION_0_18) -endif() -if(PKG_CONFIG_VERSION_0_18) - set(PC_REQUIRES "") - set(PC_REQUIRES_PRIVATE "Requires.private: poppler = ${POPPLER_VERSION}") -else() - set(PC_REQUIRES "poppler = ${POPPLER_VERSION}") - set(PC_REQUIRES_PRIVATE "") -endif() - -poppler_create_install_pkgconfig(poppler.pc ${CMAKE_INSTALL_LIBDIR}/pkgconfig) -if(ENABLE_SPLASH) - poppler_create_install_pkgconfig(poppler-splash.pc ${CMAKE_INSTALL_LIBDIR}/pkgconfig) -endif() -if(ENABLE_QT5) - poppler_create_install_pkgconfig(poppler-qt5.pc ${CMAKE_INSTALL_LIBDIR}/pkgconfig) -endif() -if(ENABLE_GLIB) - poppler_create_install_pkgconfig(poppler-glib.pc ${CMAKE_INSTALL_LIBDIR}/pkgconfig) -endif() -if(CAIRO_FOUND) - poppler_create_install_pkgconfig(poppler-cairo.pc ${CMAKE_INSTALL_LIBDIR}/pkgconfig) -endif() -if(ENABLE_CPP) - poppler_create_install_pkgconfig(poppler-cpp.pc ${CMAKE_INSTALL_LIBDIR}/pkgconfig) -endif() - - -message("Building Poppler with support for:") -show_end_message("font configuration" ${font_configuration}) -show_end_message_yesno("splash output" ENABLE_SPLASH) -if(SPLASH_CMYK) - message(" with CMYK support") -endif() -show_end_message_yesno("cairo output" CAIRO_FOUND) -show_end_message_yesno("qt5 wrapper" ENABLE_QT5) -show_end_message_yesno("glib wrapper" ENABLE_GLIB) -show_end_message_yesno(" introspection" INTROSPECTION_FOUND) -show_end_message_yesno(" gtk-doc" ENABLE_GTK_DOC) -show_end_message_yesno("cpp wrapper" ENABLE_CPP) -show_end_message_yesno("use libjpeg" ENABLE_LIBJPEG) -show_end_message_yesno("use libpng" ENABLE_LIBPNG) -show_end_message_yesno("use libtiff" ENABLE_LIBTIFF) -show_end_message_yesno("use zlib compress" ENABLE_ZLIB) -show_end_message_yesno("use zlib uncompress" ENABLE_ZLIB_UNCOMPRESS) -show_end_message_yesno("use nss3" ENABLE_NSS3) -show_end_message_yesno("use curl" ENABLE_LIBCURL) -show_end_message_yesno("use libopenjpeg2" WITH_OPENJPEG) -show_end_message_yesno("use lcms2" USE_CMS) -show_end_message_yesno("command line utils" ENABLE_UTILS) -show_end_message("test data dir" ${TESTDATADIR}) - -if(NOT ENABLE_SPLASH AND NOT CAIRO_FOUND) - message("Warning: There is no rendering backend enabled") -endif() - -if(USE_FIXEDPOINT AND USE_FLOAT) - message("Warning: Single precision and fixed point options should not be enabled at the same time") -endif() - -if(NOT ENABLE_LIBJPEG AND HAVE_DCT_DECODER) - message("Warning: Using libjpeg is recommended. The internal DCT decoder is unmaintained.") -endif() - -if(NOT HAVE_DCT_DECODER) - message("Warning: You're not compiling any DCT decoder. Some files will fail to display properly.") -endif() - -if(ENABLE_ZLIB_UNCOMPRESS) - message("Warning: Using zlib is not totally safe") -endif() - -if(NOT WITH_OPENJPEG AND HAVE_JPX_DECODER) - message("Warning: Using libopenjpeg2 is recommended. The internal JPX decoder is unmaintained.") -endif() - -if(NOT HAVE_JPX_DECODER) - message("Warning: You're not compiling any JPX decoder. Some files will fail to display properly.") -endif() - -set(ARCHIVE_NAME ${CMAKE_PROJECT_NAME}-${POPPLER_VERSION}) -add_custom_target(dist - COMMAND - COMMAND git log --stat | fmt --split-only > ${CMAKE_BINARY_DIR}/ChangeLog - COMMAND git archive --prefix=${ARCHIVE_NAME}/ HEAD > ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar - COMMAND tar -C ${CMAKE_BINARY_DIR} -rf ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar ChangeLog --transform='s,,${ARCHIVE_NAME}/,' --owner root:0 --group root:0 - COMMAND tar -C ${CMAKE_BINARY_DIR} -rf ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar glib/reference/html --transform='s,,${ARCHIVE_NAME}/,' --owner root:0 --group root:0 - COMMAND xz -9 ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) diff --git a/Build/source/libs/poppler/poppler-src/COPYING b/Build/source/libs/poppler/poppler-src/COPYING deleted file mode 100644 index d511905c164..00000000000 --- a/Build/source/libs/poppler/poppler-src/COPYING +++ /dev/null @@ -1,339 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/Build/source/libs/poppler/poppler-src/COPYING3 b/Build/source/libs/poppler/poppler-src/COPYING3 deleted file mode 100644 index 94a9ed024d3..00000000000 --- a/Build/source/libs/poppler/poppler-src/COPYING3 +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/Build/source/libs/poppler/poppler-src/ChangeLog b/Build/source/libs/poppler/poppler-src/ChangeLog deleted file mode 100644 index a5d852168ec..00000000000 --- a/Build/source/libs/poppler/poppler-src/ChangeLog +++ /dev/null @@ -1,70401 +0,0 @@ -commit c666833e4163a93451eab27c675af9ca82d11593 -Author: Albert Astals Cid -Date: Sun Aug 19 23:37:51 2018 +0200 - - poppler 0.68 - - CMakeLists.txt | 4 ++-- - NEWS | 25 +++++++++++++++++++++++++ - cpp/Doxyfile | 2 +- - qt5/src/Doxyfile | 2 +- - 4 files changed, 29 insertions(+), 4 deletions(-) - -commit 9492eeb6af75d691a2131fa8481556b1ac86795c -Author: Albert Astals Cid -Date: Sun Aug 19 23:29:10 2018 +0200 - - Update (C) - - utils/HtmlFonts.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 7a74c4071f001664c4383ea8e4e9d941bdb438b4 -Author: Albert Astals Cid -Date: Sun Aug 19 19:52:56 2018 +0200 - - Don't give a warning when Marked value is false - - Bug #107430 - - poppler/Catalog.cc | 11 +++++++---- - 1 file changed, 7 insertions(+), 4 deletions(-) - -commit ce0f124ae2a50c51cae32b8c4e7559a9223ea3d5 -Author: Albert Astals Cid -Date: Sat Aug 18 23:58:40 2018 +0200 - - Make sure that the openjpeg we're getting is version 2 - - CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 06106d930b18a34c18e32734b73c212b852161a5 -Author: Aleksey Nikolaev -Date: Thu Aug 16 17:20:00 2018 +0200 - - Fix build with MSVC - - cpp/poppler-page.cpp | 4 ++++ - cpp/poppler-page.h | 5 +++-- - 2 files changed, 7 insertions(+), 2 deletions(-) - -commit 04db8bd27db154e055a0d1715c0f81d4c37d6871 -Author: Albert Astals Cid -Date: Thu Aug 16 16:06:50 2018 +0200 - - LONG_LONG_MAX -> LLONG_MAX - - poppler/XRef.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 1b0b9e14e25494dfc08bbb9fe7232c7fca0d7f32 -Author: Hannah von Reth -Date: Thu Aug 16 15:39:28 2018 +0200 - - Remove wchar_t- on MSVC - - Qt is built with wchar_t so if you try to build poppler without it, - there are conflicting types and everything fails - - CMakeLists.txt | 1 - - 1 file changed, 1 deletion(-) - -commit 12bf632489587df9da416ed8303fb8aefc26bdac -Author: Albert Astals Cid -Date: Thu Aug 16 11:18:21 2018 +0200 - - Use OpenJpeg cmake config file instead of pkgconfig - - CMakeLists.txt | 16 ++++++++-------- - cmake/modules/FindLIBOPENJPEG2.cmake | 22 ---------------------- - 2 files changed, 8 insertions(+), 30 deletions(-) - -commit 0f35c2de35efa5689e4668b76a68c76de893fe7c -Author: Albert Astals Cid -Date: Thu Aug 9 17:04:38 2018 +0200 - - Fix spacing - - poppler/SignatureInfo.cc | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -commit 90ace43c5bb52854b4fa1fdd224d0273b8fd6ff0 -Author: Chinmoy Ranjan Pradhan -Date: Thu Aug 9 16:39:30 2018 +0200 - - [qt] Add Reason and Location to SignatureInfo - - Small tweaks (spacing) by Albert Astals Cid - - Bug #107299 - - qt5/src/poppler-form.cc | 17 +++++++++++++++++ - qt5/src/poppler-form.h | 13 +++++++++++++ - 2 files changed, 30 insertions(+) - -commit c9bf96aa99059ce0216a75ae2868b79d6e21bc3d -Author: Chinmoy Ranjan Pradhan -Date: Thu Aug 9 16:35:14 2018 +0200 - - Add Reason and Location to SignatureInfo - - Small tweaks (const, etc) by Albert Astals Cid - - Bug #107299 - - poppler/Form.cc | 10 ++++++++++ - poppler/SignatureInfo.cc | 29 +++++++++++++++++++++++++++++ - poppler/SignatureInfo.h | 7 +++++++ - 3 files changed, 46 insertions(+) - -commit 9f8fb7aae92268c9460434abd4d970f04a9af926 -Author: Steven Boswell -Date: Thu Aug 9 16:16:10 2018 +0200 - - HtmlFont: Fix possible uninitialized variable & dangling reference - - Bug #107316 - - utils/HtmlFonts.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 1f8ab328f1440721fe7be7615a9d965a6e3d0439 -Author: Albert Astals Cid -Date: Thu Aug 9 00:40:14 2018 +0200 - - XRef::readXRef: Fix possible integer overflow - - fixes oss-fuzz/9777 - - poppler/XRef.cc | 5 +++++ - 1 file changed, 5 insertions(+) - -commit c1e90bb19003af9ddf7a1ea88399d9ce47db233f -Author: Albert Astals Cid -Date: Mon Jul 23 23:05:14 2018 +0200 - - Always initialize SplashPipe:cSrcVal - - Fixes Use-of-uninitialized-value in oss-fuzz/9560 - - splash/Splash.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 71645d9e76f9bb075ae9b6599d281b8382e86e67 -Author: Albert Astals Cid -Date: Mon Jul 23 00:21:40 2018 +0200 - - Add (C) for the last commits - - poppler/SignatureHandler.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit f9c7d61e36bb1fb0c77681b993fe5f4c2b1cd37e -Author: Albert Astals Cid -Date: Mon Jul 23 00:19:17 2018 +0200 - - Don't free signeddata nor signerinfo - - They get freed as part of freeing CMSMessage - - poppler/SignatureHandler.cc | 4 ---- - 1 file changed, 4 deletions(-) - -commit 54a75cb091b0994290e6b398b98e3113cd61355a -Author: Albert Astals Cid -Date: Mon Jul 23 00:18:50 2018 +0200 - - Don't destroy the cert, doesn't belong to us - - poppler/SignatureHandler.cc | 3 --- - 1 file changed, 3 deletions(-) - -commit 36f317d488d8ce6efb69db89a2eca09a98553ab5 -Author: Albert Astals Cid -Date: Sun Jul 22 23:48:03 2018 +0200 - - Copy subject dn instead of storing it - - It comes deep from the cert memory so it's destroyed shorting - after and - thus is invalid if we don't copy it - - poppler/SignatureInfo.cc | 6 ++++-- - poppler/SignatureInfo.h | 4 ++-- - 2 files changed, 6 insertions(+), 4 deletions(-) - -commit 6c4eaf5642439d87dafa03391441bb3e7f3a98c4 -Author: Zsombor Hollay-Horvath -Date: Sat Jul 21 00:28:50 2018 +0200 - - cpp: Add rotation() to text_box - - Bug #106562 - - cpp/poppler-page.cpp | 7 +++++++ - cpp/poppler-page.h | 6 ++++++ - cpp/poppler-private.h | 2 ++ - 3 files changed, 15 insertions(+) - -commit bcd89bc0abb2cc05d3dc428074bb24b450ab7cf0 -Author: Thibaut Brard -Date: Sat Jul 21 00:17:58 2018 +0200 - - pdftohtml: Add option to not round coordinates - - when outputing as xml - - utils/HtmlOutputDev.cc | 22 ++++++++++++++++++---- - utils/pdftohtml.1 | 3 +++ - utils/pdftohtml.cc | 4 ++++ - 3 files changed, 25 insertions(+), 4 deletions(-) - -commit 6ef17493c7d5344aba4278017724746e63659f7f -Author: Albert Astals Cid -Date: Sat Jul 21 00:14:07 2018 +0200 - - JpegWriter: Use the C++11 cascading constructors - - goo/JpegWriter.cc | 8 ++------ - 1 file changed, 2 insertions(+), 6 deletions(-) - -commit 0b4ad184b479e24b13b0453b89859b75b699b131 -Author: Martin Packman -Date: Fri Jul 20 23:34:37 2018 +0200 - - Add -jpegopt optimize option support to utils - - New option 'optimize=y' for utils that take a -jpegopt param, - pdftocairo and pdftoppm. This corresponds to the cjpeg -optimize - flag, and slightly reduces the size of the output jpeg but uses - additional cpu and memory. - - New jpegOptimize boolean in splash/SplashBitmap WriteImgParams. - - New setOptimize method on goo/JpegWriter taking a boolean. - - Update manpages for new option. - - goo/JpegWriter.cc | 12 ++++++++++++ - goo/JpegWriter.h | 2 ++ - splash/SplashBitmap.cc | 2 ++ - splash/SplashBitmap.h | 2 ++ - utils/pdftocairo.1 | 6 ++++++ - utils/pdftocairo.cc | 11 +++++++++++ - utils/pdftoppm.1 | 6 ++++++ - utils/pdftoppm.cc | 11 +++++++++++ - 8 files changed, 52 insertions(+) - -commit 20d89699b35397f23352d0e60a3e19da2ce6b410 -Author: Albert Astals Cid -Date: Thu Jul 19 23:20:03 2018 +0200 - - poppler 0.67 - - CMakeLists.txt | 4 ++-- - NEWS | 8 ++++++++ - cpp/Doxyfile | 2 +- - qt5/src/Doxyfile | 2 +- - 4 files changed, 12 insertions(+), 4 deletions(-) - -commit 8bc5acb1c18e77e912b7d9caa7f73e6969d1dede -Author: Albert Astals Cid -Date: Thu Jul 19 17:55:13 2018 +0200 - - Splash::arbitraryTransformMask: Set clipRes to splashClipPartial in - some if branches - - If xx or yy are not in the expected bounds something went wrong so - don't assume we're still inside the valid area for the destination - either - - fixes oss-fuzz/9382 - - splash/Splash.cc | 12 ++++++++---- - 1 file changed, 8 insertions(+), 4 deletions(-) - -commit 004e3c10df0abda214f0c293f9e269fdd979c5ee -Author: Albert Astals Cid -Date: Wed Jul 18 20:31:27 2018 +0200 - - Fix crash when Object has negative number - - Spec says object number has to be > 0 and gen has to be >= 0 - - Reported by email - - poppler/Parser.cc | 5 +++++ - 1 file changed, 5 insertions(+) - -commit 155897f3cb88db5050b9d16dc50bfd8b660077b6 -Author: Albert Astals Cid -Date: Tue Jul 17 01:05:38 2018 +0200 - - JBIG2Stream::readTextRegion: Fix uninitialized memory read - - fixes oss-fuzz/9381 - - poppler/JBIG2Stream.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit eb1291f86260124071e12226294631ce685eaad6 -Author: Albert Astals Cid -Date: Wed Jul 11 00:26:01 2018 +0200 - - GfxPatchMeshShading::getParameterizedColor: Fix uninitialized - memory read - - fixes oss-fuzz/9264 - - poppler/GfxState.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 729e212f465d015959e5a64662593e5e3f8e4924 -Author: Albert Astals Cid -Date: Fri Jul 6 17:29:46 2018 +0200 - - Add some easy const to XRef - - poppler/XRef.cc | 26 +++++++++++++------------- - poppler/XRef.h | 46 +++++++++++++++++++++++----------------------- - 2 files changed, 36 insertions(+), 36 deletions(-) - -commit e607d9c4a0057c390c59e306f6dc010aea2125ee -Author: Stefan Brüns -Date: Sun May 20 19:31:53 2018 +0200 - - Small optimization for AABGR8 pipes - - Skip some computations if both src and dest alpha are zero, or if - src is fully opaque. Equivalent to Commit f47936af7508A - ("Small optimization for AAXRGB8 pipes"). - - splash/Splash.cc | 28 +++++++++++++++++++--------- - 1 file changed, 19 insertions(+), 9 deletions(-) - -commit 1b5298ebb8d76b5eee11d9cccdfffcdceb5d064b -Author: Albert Astals Cid -Date: Mon Jul 2 21:46:10 2018 +0200 - - GfxUnivariateShading::getColor: Fix uninitialized memory read - - fixes oss-fuzz/9165 - - poppler/GfxState.cc | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) - -commit d8346166d5150c1673379dcb3c658b9805f99764 -Author: Albert Astals Cid -Date: Mon Jul 2 20:10:25 2018 +0200 - - Gfx::doRadialShFill: Don't divide by zero - - fixes oss-fuzz/9133 - - poppler/Gfx.cc | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -commit 0735821ee03f9d83a9817450b12f45a502f51834 -Author: Albert Astals Cid -Date: Tue Jun 26 17:09:52 2018 +0200 - - Form: Remove return in void function - - poppler/Form.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit b317ee3ecb939b91e1f8245177defaa59f8478b7 -Author: Albert Astals Cid -Date: Tue Jun 26 15:27:48 2018 +0200 - - Form: Remove unused getContentCopy - - it's confusing to have getContent and getContentCopy that does 99% - the same - - poppler/Form.cc | 11 ----------- - poppler/Form.h | 3 --- - 2 files changed, 14 deletions(-) - -commit 664d166194bc0832fd446b354630c4c7994ae4e3 -Author: Albert Astals Cid -Date: Tue Jun 26 15:22:13 2018 +0200 - - Form: Add a few more const - - poppler/Form.cc | 8 ++++---- - poppler/Form.h | 18 +++++++++--------- - 2 files changed, 13 insertions(+), 13 deletions(-) - -commit 5ef6a845d8872f5dbc5698260ab5e12391f01f76 -Author: Albert Astals Cid -Date: Mon Jun 25 19:21:37 2018 +0200 - - Splash::arbitraryTransformImage: Fix uninitialized memory read - - fixes oss-fuzz/9066 - - splash/Splash.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 267228bb071016621c80fc8514927905164aaeea -Author: Albert Astals Cid -Date: Sun Jun 24 18:28:22 2018 +0200 - - pdfsig: Use posix basename() instead of GNU one - - So it builds on non GNU systems too - - Bug #106783 - - utils/pdfsig.cc | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -commit 459f369145a9d8f638fe123425f0e2880487640e -Author: Albert Astals Cid -Date: Sun Jun 24 11:51:20 2018 +0200 - - Move variable declarations closer to where they are used - - Allows for declaring two of them as const - - poppler/Stream.cc | 26 ++++++++++---------------- - 1 file changed, 10 insertions(+), 16 deletions(-) - -commit e8b82c4239da638ae77dfab07faaff33af4af1cc -Author: Albert Astals Cid -Date: Sun Jun 24 11:46:36 2018 +0200 - - ImageStream::getLine: Fix ubsan undefined shift - - I'm not totally sure this is the "correct" fix, but doesn't regress - any file on my test suite so seems one of those cases only happens - on bad files, and this helps oss-fuzz progress in its testing - - Fixes oss-fuzz/8432 - - poppler/Stream.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit c0e87eda688351b3caf222e5525f75a3190fd87c -Author: Albert Astals Cid -Date: Sun Jun 24 11:15:52 2018 +0200 - - AnnotBorder::parseDashArray: Fix correct calculation - - obj not being a num also means not correct - - fixes oss-fuzz/9056 - - poppler/Annot.cc | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -commit 322f8a453664fbad65c4b998034adf8df2ac0bea -Author: Albert Astals Cid -Date: Sat Jun 23 00:41:18 2018 +0200 - - GfxDeviceNColorSpace::parse: Fix leak on malformed files - - Fixes oss-fuzz/9036 - - poppler/GfxState.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit af4d5f31705dcfd65319da430f87744b5c1f3616 -Author: Albert Astals Cid -Date: Fri Jun 22 23:55:09 2018 +0200 - - SplashFTFont::makeGlyph: Bail out if constructor returned early - - fixes oss-fuzz/8811 - - splash/SplashFTFont.cc | 7 +++++-- - splash/SplashFTFont.h | 3 ++- - 2 files changed, 7 insertions(+), 3 deletions(-) - -commit 0281c02b9a1cd776c45ca1fd2f5eeea15f6827a6 -Author: Albert Astals Cid -Date: Fri Jun 22 17:33:21 2018 +0200 - - (C) update from 2 commits ago - - fofi/FoFiType1C.h | 1 + - 1 file changed, 1 insertion(+) - -commit 1b65f9eb1beef0d1a41a4d59c89e4acd193a1a3f -Author: Albert Astals Cid -Date: Fri Jun 22 17:29:26 2018 +0200 - - Gfx:Generalize protection against a pattern drawing itself - - fixes oss-fuzz/8929 - - poppler/CairoOutputDev.cc | 2 +- - poppler/Gfx.cc | 53 - ++++++++++++++++++++++++++-------------------- - poppler/Gfx.h | 4 ++-- - poppler/PSOutputDev.cc | 2 +- - poppler/SplashOutputDev.cc | 2 +- - 5 files changed, 35 insertions(+), 28 deletions(-) - -commit da349184c61034ac5818efe90d426de6af2c74d7 -Author: Albert Astals Cid -Date: Fri Jun 22 16:48:11 2018 +0200 - - FoFiType1C::readPrivateDict: Fix potential uninitialized memory read - - fixes oss-fuzz/8864 - - fofi/FoFiType1C.cc | 2 -- - fofi/FoFiType1C.h | 6 +++--- - 2 files changed, 3 insertions(+), 5 deletions(-) - -commit 877dcec7e2357991d79508a2aefc39d1510bf235 -Author: Albert Astals Cid -Date: Tue Jun 19 23:16:47 2018 +0200 - - Poppler 0.66 - - CMakeLists.txt | 4 ++-- - NEWS | 7 +++++++ - cpp/Doxyfile | 2 +- - qt5/src/Doxyfile | 2 +- - 4 files changed, 11 insertions(+), 4 deletions(-) - -commit 37d2aa88409429397a6c8801b34213f6eded8e1e -Author: Albert Astals Cid -Date: Tue Jun 19 17:42:16 2018 +0200 - - PostScriptFunction::parseCode: Fix memory leak on malformed files - - Fixes oss-fuzz/8859 - - poppler/Function.cc | 1 + - 1 file changed, 1 insertion(+) - -commit e4f4cbddd11ae6386985879187007fa5add43624 -Author: Albert Astals Cid -Date: Tue Jun 12 09:32:57 2018 +0200 - - StreamPredictor: Move pixBytes calculation after checks - - fixes oss-fuzz/8835 - - poppler/Stream.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit adb7cac1b787b35c4f5d25e0441e459ab92d0469 -Author: Albert Astals Cid -Date: Tue Jun 12 09:00:33 2018 +0200 - - GfxImageColorMap: Initialize y to prevent uninit mem use - - Fixes oss-fuzz/8839 - - poppler/GfxState.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 6b37df791731e40837fa1eba86ae740650431438 -Author: Albert Astals Cid -Date: Wed Jun 6 17:56:27 2018 +0200 - - SampledFunction: Fix divide by zero - - Actual valid values are 1, 2, 4, 8, 12, 16, 24, and 32 but this - check is easier - - fixes oss-fuzz/8713 - - poppler/Function.cc | 4 ++++ - 1 file changed, 4 insertions(+) - -commit d6a3dc3ebbc97fcdd3c45028b5741f4b99fc0279 -Author: Albert Astals Cid -Date: Wed Jun 6 17:46:17 2018 +0200 - - GfxAxialShading::parse: Fix memory leak on broken files - - fixes oss-fuzz/8742 - - poppler/GfxState.cc | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -commit 599e28433268ceaa933cf2a2492c81da4418e207 -Author: Albert Astals Cid -Date: Tue Jun 5 20:11:19 2018 +0200 - - JBIG2Stream::readSymbolDictSeg: Fix potential uninitialized memory - read - - fixes oss-fuzz/8748 - - poppler/JBIG2Stream.cc | 1 + - 1 file changed, 1 insertion(+) - -commit a231de883b438af1807726fab4265ecf4689cf50 -Author: Albert Astals Cid -Date: Tue Jun 5 20:00:03 2018 +0200 - - CMap::parse2: Initialize end - - fixes oss-fuzz/8747 - - poppler/CMap.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 2c629fefe2b2b1e2663521beeac432c808afe7c7 -Author: Albert Astals Cid -Date: Tue Jun 5 19:56:53 2018 +0200 - - JBIG2Stream::readSymbolDictSeg: Initialize dh - - fixes oss-fuzz/8751 - - poppler/JBIG2Stream.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 0053966d3ec5b5c4eb6480417b2c8a8ccd910964 -Author: Albert Astals Cid -Date: Mon Jun 4 20:38:41 2018 +0200 - - JBIG2Stream::readSymbolDictSeg: Initialize refDX - - fixes oss-fuzz/8696 - - poppler/JBIG2Stream.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 8dfe3fb37ec01e35eb22a0932fe708bc9b78cb4f -Author: Albert Astals Cid -Date: Wed May 30 17:09:16 2018 +0200 - - LONG_LONG_MAX -> LLONG_MAX - - that's the name the standard uses - - poppler/Parser.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit b4f0e2b27a0880801c7af0c82fe17894797511b2 -Author: Stefan Brüns -Date: Sat May 26 19:51:20 2018 +0200 - - Splash: Reserve space for path segments upfront - - Instead of iteratively growing the array reserve sufficient space - prior to populating the array. - - poppler/SplashOutputDev.cc | 2 ++ - splash/SplashPath.cc | 18 ++++++++++++++++++ - splash/SplashPath.h | 4 ++++ - 3 files changed, 24 insertions(+) - -commit 450a8a54e080b5bb80533b1777b3b670bea1f27a -Author: Albert Astals Cid -Date: Wed May 30 09:09:12 2018 +0200 - - JBIG2Stream::readSymbolDictSeg: Initialize refDY - - fixes oss-fuzz/8621 - - poppler/JBIG2Stream.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 1750c0155762e75d0a80ab55b50d1bfd172c2430 -Author: Stefan Brüns -Date: Tue May 29 23:49:05 2018 +0200 - - splash: Correctly manipulate spot colors if SPOT_NCOMPS != 4 - - The default number of spot colors is 4, in this case the change is - without effect, otherwise only the last 4 colors where handled. - - splash/SplashTypes.h | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -commit fb4629eb4b1787332b88b330da16353e5ade7b4d -Author: Albert Astals Cid -Date: Tue May 29 20:32:23 2018 +0200 - - SplashFTFont: Early return if face->units_per_EM is 0 - - fixes oss-fuzz/8617 - - splash/SplashFTFont.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 943a465d7b76b26de83d2038226c72bcf619c29f -Author: Albert Astals Cid -Date: Tue May 29 20:23:51 2018 +0200 - - SplashFTFont: Initialize textScale - - fixes oss-fuzz/8616 - - splash/SplashFTFont.cc | 1 + - 1 file changed, 1 insertion(+) - -commit f821faa1795c1b25104d84e9f5a7e8ad218baa61 -Author: Albert Astals Cid -Date: Tue May 29 20:18:26 2018 +0200 - - CMap::parse2: Initialize start - - fixes oss-fuzz/8611 - - poppler/CMap.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit a76c8fbd50a3a5cbe0487158e9d2b325e596d2c6 -Author: Albert Astals Cid -Date: Tue May 29 01:01:26 2018 +0200 - - GfxSeparationColorSpace::getRGB: ensure color2 doesn't have uninit - values - - if alt->getNComps() is bigger than func->getOutputSize() (which - is most - likely a faulty file) we init those indexes of color2 with 0 - - fixes oss-fuzz/8586 - - poppler/GfxState.cc | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -commit e35fdb1448b7860d697b9c2ec8bda49c7a8a3ae5 -Author: Albert Astals Cid -Date: Tue May 29 00:59:22 2018 +0200 - - JBIG2Stream::readTextRegion: Initialize ds - - fixes oss-fuzz/8594 - - poppler/JBIG2Stream.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit bb25c0d46f1f0e037805f0c6dde07f3ea9c9320c -Author: Albert Astals Cid -Date: Tue May 29 00:55:28 2018 +0200 - - Gfx::doRadialShFill: Initialize colorA, colorB and colorC - - fixes oss-fuzz/8587 - - poppler/Gfx.cc | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -commit b8cf8b04cbd1c0c5643cc77ed7b0b60525ecf080 -Author: Albert Astals Cid -Date: Mon May 28 23:51:32 2018 +0200 - - FoFiType1::parse: Don't copy to buf more than the available file - - fixes oss-fuzz/8576 - - fofi/FoFiType1.cc | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -commit 10a3dc2a9c92349e498ea36bb342b821dcfc9d76 -Author: Albert Astals Cid -Date: Mon May 28 17:44:34 2018 +0200 - - GfxState.cc: Fix undefined behaviour when compBits is 31 - - it's a technical issue since according to spec biggest - valid value for compBits is 16, but this is simpler imho - - fixes oss-fuzz/8582 - - poppler/GfxState.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 96e7bc19ffcaf46d4cb69660ed040c09d46815d6 -Author: Albert Astals Cid -Date: Sun May 27 09:42:24 2018 +0200 - - JBIG2Stream::readTextRegion: Initialize a few variables - - So if the stream is broken we don't use uninitialized variables - - fixes oss-fuzz/8547 - - poppler/JBIG2Stream.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 9c0c538e8d1aa39cd136cfb8fe0fbfe1def5174d -Author: Albert Astals Cid -Date: Sun May 27 09:34:16 2018 +0200 - - Gfx::doAxialShFill: initialize color1 - - fixes oss-fuzz/8546 - - poppler/Gfx.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 18f376c0dff184851b3ee4c05c40b4ee2c21da8c -Author: Albert Astals Cid -Date: Sun May 27 09:29:49 2018 +0200 - - FoFiType1::parse: Fix reading past font length - - fixes oss-fuzz/8545 - - fofi/FoFiType1.cc | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -commit 19d3993f3f40b5113141d5a55acea307c174f1d3 -Author: Albert Astals Cid -Date: Sun May 27 09:10:05 2018 +0200 - - XRef::fetch: Don't try to fetch objects with negative offset - - fixes oss-fuzz/8433 - - poppler/XRef.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 9a8d33246601dbd2bea98bb3404596848f71162a -Author: Albert Astals Cid -Date: Sun May 27 08:47:19 2018 +0200 - - Splash::fillGlyph2: fix buffer overflow - - Make sure xx / 8 + 1 is not out of bounds - - fixes oss-fuzz/8422 - - splash/Splash.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 1bc71245fa88dc23dc355f926f50f04896739fff -Author: Adam Reichold -Date: Sat May 26 11:54:41 2018 +0200 - - LZWStream: make inputBuf unsigned - - since shifting negative numbers is undefined according to spec - - poppler/Stream.cc | 6 +++--- - poppler/Stream.h | 4 ++-- - 2 files changed, 5 insertions(+), 5 deletions(-) - -commit 68c5977980a60b2fbac0a5938e697cf09f37b0a2 -Author: Albert Astals Cid -Date: Fri May 25 23:06:53 2018 +0200 - - BaseCryptStream: Initialize all of objKey - - fixes oss-fuzz/8493 - - poppler/Decrypt.cc | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -commit 14adecb9693345b7e3baa6dee05f5c88dde7952c -Author: Albert Astals Cid -Date: Fri May 25 22:57:29 2018 +0200 - - Decrypt::md5: initialize x - - When msgLen is small enough x would had initialized values for some - parts of the md5 calculation - - fixes oss-fuzz/8492 - - poppler/Decrypt.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 71bb82bdecccc235e15255635cab2c31cce58e0e -Author: Albert Astals Cid -Date: Fri May 25 22:52:31 2018 +0200 - - Gfx::doAxialShFill: initialize color0 - - fixes oss-fuzz/8470 - - poppler/Gfx.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit b245154fdebc9a78db163bc95959c6c8f5b4126f -Author: Albert Astals Cid -Date: Fri May 25 22:46:22 2018 +0200 - - Parser::makeStream: Don't overflow length - - fixes oss-fuzz/8499 - - poppler/Parser.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 86777478387577aee8242eb2f11932041e87eff5 -Author: Albert Astals Cid -Date: Fri May 25 19:44:50 2018 +0200 - - Splash::fillWithPattern: initialize pipe - - Makes sure if things fail we're not painting with uninitialized memory - - fixes oss-fuzz/8538 - - splash/Splash.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 97caec070090d112d4fb5b63dc433a34e214c7e5 -Author: Albert Astals Cid -Date: Fri May 25 19:38:19 2018 +0200 - - FoFiType1C::readTopDict: Return early if parsing fails - - fixes oss-fuzz/8456 - - fofi/FoFiType1C.cc | 3 +++ - 1 file changed, 3 insertions(+) - -commit 7e2189377bfaa0594e25eaba26aca47bea59f315 -Author: Albert Astals Cid -Date: Fri May 25 17:47:07 2018 +0200 - - GfxGouraudTriangleShading::parse: Add bounds check for compBits - - The spec is much more strict on what is valid, but i'm only doing - a check so that the code doesn't break - - poppler/GfxState.cc | 4 ++++ - 1 file changed, 4 insertions(+) - -commit fef32ba463a225618a967c541d939fd69e02f2dd -Author: Albert Astals Cid -Date: Fri May 25 17:42:22 2018 +0200 - - GfxPatchMeshShading::parse: Add bounds check for compBits - - The spec is much more strict on what is valid, but i'm only doing - a check so that the code doesn't break - - fixes oss-fuzz/8445 - - poppler/GfxState.cc | 4 ++++ - 1 file changed, 4 insertions(+) - -commit 3b9d8025dbdfcfac94ede20b05d86d177393cde7 -Author: Albert Astals Cid -Date: Fri May 25 17:26:37 2018 +0200 - - Splash: Fix another potential uninitialized memory use - - fixes oss-fuzz/8466 - - splash/Splash.cc | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -commit 0e3b18a48c3907a49c51a0ceded6078a2fd790eb -Author: Albert Astals Cid -Date: Fri May 25 17:06:13 2018 +0200 - - SplashUnivariatePattern::getColor: Fix potential uninitialized - memory read - - If the GfxUnivariateShading doesn't provide enough bits of color - fill them with 0 as to not have random memory read - - fixes oss-fuzz/8470 - - poppler/GfxState.cc | 5 +++-- - poppler/GfxState.h | 4 +++- - poppler/SplashOutputDev.cc | 6 +++++- - 3 files changed, 11 insertions(+), 4 deletions(-) - -commit c75500bf6b2af4b9a26467ce55d1f2879e916b79 -Author: Albert Astals Cid -Date: Fri May 25 16:41:36 2018 +0200 - - T3FontCache: change the order in which the overflow checks are done - - fixes oss-fuzz/8479 - - poppler/SplashOutputDev.cc | 6 ++---- - 1 file changed, 2 insertions(+), 4 deletions(-) - -commit 4ea7ac960d9ecb6a407d0e660312f5701d3dcd49 -Author: Albert Astals Cid -Date: Fri May 25 16:35:49 2018 +0200 - - SplashFTFont::getGlyphPath: early return if textScale == 0 - - fixes oss-fuzz/8529 - - splash/SplashFTFont.cc | 4 ++++ - 1 file changed, 4 insertions(+) - -commit c1164653bd8d6bcb7da1d959634f63592a393235 -Author: Albert Astals Cid -Date: Fri May 25 16:26:44 2018 +0200 - - GfxGouraudTriangleShading::parse: Protect against coordBits <= 0 - - fixes oss-fuzz/8524 - - poppler/GfxState.cc | 4 ++++ - 1 file changed, 4 insertions(+) - -commit a7154bcc6aba5429dc6cc024bd90dae2f1d2d0c1 -Author: Albert Astals Cid -Date: Fri May 25 16:21:45 2018 +0200 - - XRef::readXRefTable: Rewrite overflow check - - In a way that it doesn't depend on undefined behaviour - - fixes oss-fuzz/8528 - - poppler/XRef.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit f966b9096d046aaee4891de11f74207218cc929b -Author: Albert Astals Cid -Date: Thu May 24 23:58:41 2018 +0200 - - SplashOutputDev::drawSoftMaskedImage: Fix uninitialized memory read - - It can happen that maskStr->doGetChars doesn't give us the number - of chars we wanted, if that happens just set the remainder to zero - - poppler/SplashOutputDev.cc | 10 +++++++--- - 1 file changed, 7 insertions(+), 3 deletions(-) - -commit b228892adb01f978d5e6045e1e61741bca1950d2 -Author: Albert Astals Cid -Date: Thu May 24 23:49:12 2018 +0200 - - Splash::blitImageClipped: initialize pixel - - At least this way if the getPixels call we're not drawing random - memory - and thus we get a stable render which helps with regtests - - splash/Splash.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 67be3708cc4dea9e03f5d0ce5b0214fff35748f2 -Author: Albert Astals Cid -Date: Thu May 24 23:29:55 2018 +0200 - - SplashFTFont::makeGlyph: Fix use of uninitialized data - - caused by the bugfix to not divide by zero - - splash/SplashFTFont.cc | 4 ++++ - 1 file changed, 4 insertions(+) - -commit c758fc980834882528eeae82568494e46d189cc5 -Author: Albert Astals Cid -Date: Thu May 24 23:19:16 2018 +0200 - - FoFiType1::parse: Fix invalid memory access - - Make sure there's enough line left before calling strncmp - - fixes oss-fuzz/8425 - - fofi/FoFiType1.cc | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - -commit 07318f3899248f67a58148b29a9555ff47a1b083 -Author: Albert Astals Cid -Date: Thu May 24 20:15:42 2018 +0200 - - StreamReader::cmp: Fix potential undefined behaviour - - going outside an array range is technically undefined behaviour, - even if then after you go back in range with the next operation, so - we first calculate the diff and then add it to the array - - fofi/FoFiIdentifier.cc | 7 +++---- - 1 file changed, 3 insertions(+), 4 deletions(-) - -commit 6b91d37a704fb2b6fa9529d859c366c331327ab9 -Author: Albert Astals Cid -Date: Thu May 24 18:22:00 2018 +0200 - - SplashOutputDev: Fix memory leak on malformed files - - i.e. SplashOutputDev::endTextObject is not called after - SplashOutputDev::drawChar - - fixes oss-fuzz/8508 - - poppler/SplashOutputDev.cc | 1 + - 1 file changed, 1 insertion(+) - -commit c9650369c5dd74812db515d986ded898b9002ae4 -Author: Albert Astals Cid -Date: Thu May 24 18:20:12 2018 +0200 - - Splash::scaleMaskYuXu: Free internal bitmap data on error - - this way we don't try to use it later, which will be an uninitialized - memory read - - fixes oss-fuzz/8511 - - splash/Splash.cc | 1 + - 1 file changed, 1 insertion(+) - -commit f279778fe0aca610cdecb70d0a714bbaa08b0d22 -Author: Albert Astals Cid -Date: Thu May 24 13:06:00 2018 +0200 - - JBIG2Stream::readSymbolDictSeg: Fix potential uninitialized memory use - - fixes oss-fuzz/8468 - - poppler/JBIG2Stream.cc | 2 ++ - 1 file changed, 2 insertions(+) - -commit ea72a3f3dc1619482ab2502dc50fe628600f38b5 -Author: Albert Astals Cid -Date: Thu May 24 12:42:54 2018 +0200 - - gmallocn: move the operation after the checks - - fixes oss-fuzz/8423 - - goo/gmem.cc | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -commit aa39d079dc3b68b0a3512408706d053d664d557d -Author: Albert Astals Cid -Date: Thu May 24 12:40:38 2018 +0200 - - XRef::readXRefStreamSection: Add integer overflow check - - fixes oss-fuzz/8444 - - poppler/XRef.cc | 3 +++ - 1 file changed, 3 insertions(+) - -commit db73587c566f8e50f03b24628e8948a558ee7039 -Author: Albert Astals Cid -Date: Thu May 24 11:56:39 2018 +0200 - - StreamPredictor: move rowBytes calculation after overflow check - - fixes oss-fuzz/8498 - - poppler/Stream.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 76820f5ab932a9ed18913bc7d1a452ddf060c133 -Author: Albert Astals Cid -Date: Thu May 24 01:12:07 2018 +0200 - - JBIG2Stream::readPageInfoSeg: Fix memory leak on malformed documents - - fixes oss-fuzz/8463 - - poppler/JBIG2Stream.cc | 1 + - 1 file changed, 1 insertion(+) - -commit ffb0daefda688564c1456f4b8b3f5a715d228cdc -Author: Albert Astals Cid -Date: Wed May 23 19:06:51 2018 +0200 - - Apply previous optimization also to Splash::pipeRunAARGB8 - - splash/Splash.cc | 28 +++++++++++++++++++--------- - 1 file changed, 19 insertions(+), 9 deletions(-) - -commit f47936af75088c55a19fe6b1a67128fcc3f57b08 -Author: Stefan Brüns -Date: Wed May 23 19:05:50 2018 +0200 - - Small optimization for AAXRGB8 pipes - - Skip some computations if both src and dest alpha are zero, or if - src is fully opaque. For common cases (majority of pixels fully - opaque) like in fdo#81211, this reduces execution time of - pipeRunAAXBGR8 by 50% (-20% total execution time). - - splash/Splash.cc | 29 ++++++++++++++++++++--------- - 1 file changed, 20 insertions(+), 9 deletions(-) - -commit 60ec88b3ca5f109b3532dbf2f36df66aed2d7bbf -Author: Albert Astals Cid -Date: Wed May 23 19:49:29 2018 +0200 - - greallocn: move the operation to after the checks - - fixes oss-fuzz/8484 - - goo/gmem.cc | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -commit e0fb18040378659c98fedb4bdaff6a903ddd095b -Author: Albert Astals Cid -Date: Wed May 23 19:40:50 2018 +0200 - - Gfx::opSetExtGState: Fix memory leak on broken files - - doSoftMask was called just once, from opSetExtGState, but was - given the duty to delete blendingColorSpace that given doSoftMask - has various early returns is hard to do right, so i've moved - the deletion to opSetExtGState itself - - fixes oss-fuzz/8431 - - poppler/Gfx.cc | 8 ++------ - 1 file changed, 2 insertions(+), 6 deletions(-) - -commit 86991adb172fd55decdc72ec6fc34d41b19beafa -Author: Albert Astals Cid -Date: Wed May 23 19:35:27 2018 +0200 - - Gfx::doRadialShFill: Fix potential divide by zero - - fixes oss-fuzz/8476 - - poppler/Gfx.cc | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -commit 62c7a6a135aa8c70f638bac9b41a11c4e69c8452 -Author: Albert Astals Cid -Date: Wed May 23 19:29:39 2018 +0200 - - GfxImageColorMap::GfxImageColorMap: Bail out early if bits <= 0 - - fixes oss-fuzz/8478 - - poppler/GfxState.cc | 3 +++ - 1 file changed, 3 insertions(+) - -commit 6e2de368f620d2e459a4cfe6533a8c29fae6d8c9 -Author: Albert Astals Cid -Date: Wed May 23 19:21:30 2018 +0200 - - SplashFTFont::SplashFTFont: Early return if textScale is 0 - - fixes oss-fuzz/8482 - - splash/SplashFTFont.cc | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -commit 8d715bfc7c3610b823721dc26368728795baa2fe -Author: Albert Astals Cid -Date: Wed May 23 15:44:05 2018 +0200 - - GfxPatchMeshShading::parse: Error out if BitsPerCoordinate <= 0 - - poppler/GfxState.cc | 4 ++++ - 1 file changed, 4 insertions(+) - -commit f5fb32bd4b64040dc0f9b9e1555dabce804ba566 -Author: Albert Astals Cid -Date: Wed May 23 15:38:26 2018 +0200 - - Splash::scaleMaskYuXu: Also check for srcHeight <= 0 - - splash/Splash.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 0318e1667c7b137493f22be61b835eb914f68fa9 -Author: Albert Astals Cid -Date: Wed May 23 15:34:32 2018 +0200 - - GfxPatchMeshShading::parse: Fix memory leak on malformed documents - - fixes oss-fuzz/8487 - - poppler/GfxState.cc | 6 ++++++ - 1 file changed, 6 insertions(+) - -commit 3ca2d43b7ddcca08bc026c6564f89ffbe0dde506 -Author: Albert Astals Cid -Date: Wed May 23 00:27:08 2018 +0200 - - warning-- - - poppler/Decrypt.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 58e056c4b15f262b7715f8061d6885eb80044d0d -Author: Albert Astals Cid -Date: Wed May 23 00:23:19 2018 +0200 - - Revert 31c3832b996acbf04ea833e304d7d21ac4533a57 - - So shifting left negative values is undefined behaviour according - to the - spec but if we don't do it we break, so we seem to be depending - on this - undefined behaviour, will try to figure out a better fix - - poppler/Stream.cc | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -commit a6c2eb671f08beb682e086d5f6791fdb78906a7c -Author: Albert Astals Cid -Date: Tue May 22 22:12:03 2018 +0200 - - Make sure dash[i] is intialized - - even if obj is not a number - - fixes oss-fuzz/8462 - - poppler/Gfx.cc | 7 +++---- - 1 file changed, 3 insertions(+), 4 deletions(-) - -commit 083bfa59378be1c008cb6543f7e9bebde29a4079 -Author: Albert Astals Cid -Date: Tue May 22 22:01:35 2018 +0200 - - nBitsDiffObjects can only be 32 as per spec - - fixes oss-fuzz/8464 - - poppler/Hints.cc | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -commit 942a426f2844b66758b6b443234c3686d61420cc -Author: Albert Astals Cid -Date: Tue May 22 21:41:51 2018 +0200 - - Parser::makeStream: Make sure length is not negative - - fixes oss-fuzz/8469 - - poppler/Parser.cc | 3 +++ - 1 file changed, 3 insertions(+) - -commit bf03344ad26b1227b5052420feabe062441c02ed -Author: Albert Astals Cid -Date: Tue May 22 20:36:05 2018 +0200 - - StandardSecurityHandler::isUnencrypted: Fix uninitialized memory use - - fixes oss-fuzz/8426 - - poppler/SecurityHandler.cc | 3 +++ - 1 file changed, 3 insertions(+) - -commit 31c3832b996acbf04ea833e304d7d21ac4533a57 -Author: Albert Astals Cid -Date: Tue May 22 20:25:18 2018 +0200 - - LZWStream::getCode: Don't left shift negative values - - it's undefined behaviour - - poppler/Stream.cc | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -commit 2c0a0b07fdb2c76487ca4af7b2f50da9904c6c23 -Author: Albert Astals Cid -Date: Tue May 22 20:15:39 2018 +0200 - - Gfx::doImage: Fix memory leak on malformed documents - - fixes oss-fuzz/8452 - - poppler/Gfx.cc | 1 + - 1 file changed, 1 insertion(+) - -commit ace7ca3e0dd1570ef6804c0f054742b2996b9b9f -Author: Albert Astals Cid -Date: Tue May 22 20:10:01 2018 +0200 - - SplashAxialPattern: fix potential divide by zero - - poppler/SplashOutputDev.cc | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -commit 3b8634e744aa5ba3b317fd3378ba07a438826827 -Author: Albert Astals Cid -Date: Tue May 22 20:07:50 2018 +0200 - - GfxAxialShading::getParameterRange: Fix potential divide by zero - - fixes oss-fuzz/8436 - - poppler/GfxState.cc | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -commit 91079d4f482b35f190a4f2bbd9f4fb6a8ad7c2a2 -Author: Albert Astals Cid -Date: Tue May 22 20:01:56 2018 +0200 - - SampledFunction: Fix potential divide by zero - - fixes oss-fuzz/8455 - - poppler/Function.cc | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -commit 6169bfb1ecd289a8235be0b8884a550f5d1ad926 -Author: Albert Astals Cid -Date: Tue May 22 19:56:34 2018 +0200 - - GfxState.cc: Fix potential division by zero - - fixes oss-fuzz/8465 - - poppler/GfxState.cc | 20 ++++++++++++++++---- - 1 file changed, 16 insertions(+), 4 deletions(-) - -commit 0868c499a9f5f37f8df5c9fef03c37496b40fc8a -Author: Albert Astals Cid -Date: Tue May 22 19:42:38 2018 +0200 - - Parser::makeStream: Fix potential integer overflow - - poppler/Parser.cc | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -commit dbe330678766d1260d7f595d238e90aeae1194d6 -Author: Albert Astals Cid -Date: Tue May 22 19:31:34 2018 +0200 - - XRef::constructXRef: Prevent overflow when calculating newSize - - fixes oss-fuzz/8421 - - poppler/XRef.cc | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -commit 224dda4d292a097866f109a9d2cec4b3ba78eb97 -Author: Albert Astals Cid -Date: Tue May 22 19:17:20 2018 +0200 - - Fix out of bounds write in BaseCryptStream - - fixes oss-fuzz/8420 - - poppler/Decrypt.cc | 14 ++++++++------ - 1 file changed, 8 insertions(+), 6 deletions(-) - -commit 0c0c368fed70c1db64ce04b135fd5b060a1f0653 -Author: Albert Astals Cid -Date: Tue May 22 18:26:29 2018 +0200 - - LZWStream::clearTable: init newChar to 0 - - it should not be needed because on well formed streams it will be - properly initialized in processNextCode but - this solves an uninitialized memory use on malformed documents - - fixes oss-fuzz/8457 - - poppler/Stream.cc | 1 + - 1 file changed, 1 insertion(+) - -commit e7f59e39a0aca2a8a363fc0edcf25fb5aaada7a5 -Author: Albert Astals Cid -Date: Tue May 22 18:22:29 2018 +0200 - - Splash::scaleMaskYuXu: Fix crash on malformed files - - fixes oss-fuzz/8435 - fixes oss-fuzz/8441 - - splash/Splash.cc | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -commit 547f19cd420f2d579d921620545e6496adb6a9fb -Author: Albert Astals Cid -Date: Tue May 22 18:17:58 2018 +0200 - - Fix crash in "generic" GlobalParams::findSystemFontFile - - Not very important since we usually either use the fontconfig or - the windows one - - fixes oss-fuzz/8427 - - poppler/GlobalParams.cc | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -commit d1d8dea64db53fb151fede27efd5fd3308820a51 -Author: Albert Astals Cid -Date: Tue May 22 18:13:19 2018 +0200 - - Fix memory leak on malformed files - - fixes oss-fuzz/8430 - - poppler/Gfx.cc | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -commit 127d0fe3a209b04fc9efb086d423bca4ba359dca -Author: Albert Astals Cid -Date: Tue May 22 01:08:12 2018 +0200 - - Fix overflownLongLong check - - We actually want integer math here since doubles lose the precision we - want at that high long long values - - poppler/Lexer.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit c9e2dc7ea7e098875e6b93566bdb1d14451c3673 -Author: Albert Astals Cid -Date: Sat May 19 17:05:25 2018 +0200 - - Poppler 0.65.0 - - CMakeLists.txt | 4 ++-- - NEWS | 22 ++++++++++++++++++++++ - cpp/CMakeLists.txt | 2 +- - cpp/Doxyfile | 2 +- - qt5/src/CMakeLists.txt | 2 +- - qt5/src/Doxyfile | 2 +- - 6 files changed, 28 insertions(+), 6 deletions(-) - -commit 921de21733816fc6cd66c70c7a4914fbfee924d6 -Author: Albert Astals Cid -Date: Fri May 18 00:45:59 2018 +0200 - - qt5: remove duplicate code - - Create new toPopplerAdditionalActionType private function - - qt5/src/poppler-annotation.cc | 15 +-------------- - qt5/src/poppler-form.cc | 17 ++--------------- - qt5/src/poppler-private.cc | 18 ++++++++++++++++++ - qt5/src/poppler-private.h | 2 ++ - 4 files changed, 23 insertions(+), 29 deletions(-) - -commit 083139775fd4ee8dd073347bb0e2835aab334444 -Author: Andre Heinecke -Date: Wed May 2 16:20:40 2018 +0200 - - qt5: Add widget annot actions to FormFields - - This adds API to access AnnotWidget actions which - are associated with a FormField. - - qt5/src/poppler-form.cc | 31 +++++++++++++++++++++++++++++++ - qt5/src/poppler-form.h | 8 ++++++++ - 2 files changed, 39 insertions(+) - -commit 784bf432bffadf654b213caa21ec95fafb963299 -Author: Albert Astals Cid -Date: Tue May 8 01:16:06 2018 +0200 - - Fix build with -DFONT_CONFIGURATION=generic - - poppler/GlobalParams.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 07b8f838b3d8859a3ad34a3140bb24475bd6ac2c -Author: Albert Astals Cid -Date: Mon May 7 19:13:07 2018 +0200 - - cast to void * to bypass new gcc -Wclass-memaccess warning - - Yes what we're doing there is a bit nasty but it works :D - - poppler/Array.cc | 2 +- - poppler/Dict.cc | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit 2e750862ed5cba42fba2c6dd953820445d9c64cb -Author: Albert Astals Cid -Date: Mon May 7 19:02:40 2018 +0200 - - Remove useless memset - - Parent already has a proper constructor that initializes stuff and on - top of that the sizeof was of the pointer and not of the class itself - - poppler/StructTreeRoot.cc | 1 - - 1 file changed, 1 deletion(-) - -commit 030c6123c42813818fbb94717d301d4723671545 -Author: Albert Astals Cid -Date: Sun May 6 17:25:39 2018 +0200 - - Fix windows build - - poppler/GlobalParamsWin.cc | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -commit 62ed50c649670423136a49ae0fc39a6d314336a7 -Author: Albert Astals Cid -Date: Sun May 6 17:01:30 2018 +0200 - - Remove GlobalParams::getUnicodeToUnicode - - As shown by Adam in f559cc94310c149a61eb246e1aff7c093f3406b5 it was a - noop since we were not filling the hash it tried to get info from - - poppler/GfxFont.cc | 45 +-------------------------------------------- - poppler/GlobalParams.h | 1 - - 2 files changed, 1 insertion(+), 45 deletions(-) - -commit 18cc4c3006695bbebd1d99d953d555a0bb3a3a65 -Author: Adam Reichold -Date: Wed Feb 21 20:15:22 2018 +0100 - - Make UnicodeMap a move-only type to simplify the initialization of - residentUnicodeMaps s.t. it is closer to the GooHash-based version. - - poppler/GlobalParams.cc | 35 ++++++---------- - poppler/UnicodeMap.cc | 106 - +++++++++++++++++++++++++++++++++++------------- - poppler/UnicodeMap.h | 16 ++++---- - 3 files changed, 97 insertions(+), 60 deletions(-) - -commit 75cba9a1434c991534795d9185d7b755d9ed288c -Author: Adam Reichold -Date: Sun Feb 18 16:12:19 2018 +0100 - - Remove GooHash after replacing it by std::unordered_map. - - CMakeLists.txt | 2 - - goo/GooHash.cc | 403 - --------------------------------------------------------- - goo/GooHash.h | 93 ------------- - 3 files changed, 498 deletions(-) - -commit ccf5fbf898a27b02085b7b0707e5f59bee443fb3 -Author: Adam Reichold -Date: Sun Feb 18 16:23:36 2018 +0100 - - Also replace the Win32-specific usage of GooHash by std::unordered_map - on a best-effort basis. - - poppler/GlobalParams.cc | 6 ------ - poppler/GlobalParams.h | 3 ++- - poppler/GlobalParamsWin.cc | 25 ++++++++++++------------- - 3 files changed, 14 insertions(+), 20 deletions(-) - -commit 85e43288159804c57b3168fa95f955c41040bd29 -Author: Adam Reichold -Date: Sun Feb 18 16:11:55 2018 +0100 - - Replace GooHash by std::unordered_map in PSOutputDev. - - poppler/PSOutputDev.cc | 31 +++++++++++-------------------- - poppler/PSOutputDev.h | 8 +++++--- - 2 files changed, 16 insertions(+), 23 deletions(-) - -commit d5701be9c7daaf097698c0db57e004c4782450ee -Author: Adam Reichold -Date: Sun Feb 18 16:11:29 2018 +0100 - - Replace GooHash by std::unordered_map in OutputDev. - - poppler/Gfx.cc | 20 ++++---------------- - poppler/OutputDev.cc | 15 ++++----------- - poppler/OutputDev.h | 15 +++++++++------ - poppler/PSOutputDev.h | 3 ++- - poppler/ProfileData.cc | 10 +--------- - poppler/ProfileData.h | 25 ++++++++++--------------- - test/pdf-inspector.cc | 17 +++++------------ - 7 files changed, 35 insertions(+), 70 deletions(-) - -commit f559cc94310c149a61eb246e1aff7c093f3406b5 -Author: Adam Reichold -Date: Sun Feb 18 16:10:59 2018 +0100 - - Replace GooHash by std::unordered_map in GlobalParams. - - poppler/CharCodeToUnicode.cc | 9 +- - poppler/CharCodeToUnicode.h | 3 +- - poppler/GlobalParams.cc | 218 - ++++++++++++++----------------------------- - poppler/GlobalParams.h | 34 +++---- - 4 files changed, 97 insertions(+), 167 deletions(-) - -commit 41ad41d6eb726aabd3bff18db5c08422e0d18807 -Author: Adam Reichold -Date: Sun Feb 18 16:10:16 2018 +0100 - - Replace GooHash by std::unordered_map in FoFiTrueType. - - fofi/FoFiTrueType.cc | 39 +++++++++++++++------------------------ - fofi/FoFiTrueType.h | 8 +++++--- - 2 files changed, 20 insertions(+), 27 deletions(-) - -commit 55272138c3835dd9db8733850304ffe966e6478d -Author: Adam Reichold -Date: Tue Feb 20 09:07:17 2018 +0100 - - Add conversion methods between GooString and std::string. - - goo/GooString.h | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -commit 08a4ac65d202742209bca6cf3806c4d111a5522c -Author: Albert Astals Cid -Date: Fri May 4 15:51:18 2018 +0200 - - FindLIBOPENJPEG2.cmake: Remove cache code - - It wasn't working since the if mentioned LIBOPENJPEG2_INCLUDE_DIR - instead of LIBOPENJPEG2_INCLUDE_DIRS - and when fixing the typo it broke the build because we were not - defining USE_OPENJPEG2, so better just - remove the broken if code - - cmake/modules/FindLIBOPENJPEG2.cmake | 22 +++++++--------------- - 1 file changed, 7 insertions(+), 15 deletions(-) - -commit 8f94bc8e6f65420a63411ead3a7e838a9542acbd -Author: Bjarni Ingi Gislason -Date: Fri May 4 15:29:09 2018 +0200 - - pdffonts: Minor formatting changes in the man page - - Bug #105194 - - utils/pdffonts.1 | 18 ++++++++++-------- - 1 file changed, 10 insertions(+), 8 deletions(-) - -commit 7bd0f774508f543616ebb2ad1f4558fdacfca5b7 -Author: Zsombor Hollay-Horvath -Date: Fri May 4 15:23:21 2018 +0200 - - cpp: Expose more image modes, add option to select mode in renderer - - Bug #105558 - - cpp/poppler-image.cpp | 46 +++++++++++++++- - cpp/poppler-image.h | 5 +- - cpp/poppler-page-renderer.cpp | 124 - +++++++++++++++++++++++++++++++++++++++++- - cpp/poppler-page-renderer.h | 13 +++++ - 4 files changed, 184 insertions(+), 4 deletions(-) - -commit 60b4fe65bc9dc9b82bbadf0be2e3781be796a13d -Author: Albert Astals Cid -Date: Tue May 1 02:46:17 2018 +0200 - - FoFiType1C::cvtGlyph: Fix infinite recursion on malformed documents - - Bugs #104942, #103238 - - fofi/FoFiType1C.cc | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -commit 8429a67536b7c2f6d752e4a522ee98e6f76a40f9 -Author: Albert Astals Cid -Date: Tue May 1 02:44:37 2018 +0200 - - XRef: Fix runtime undefined behaviour - - Going to the position -1 of an array is undefined behaviour, so - don't do - it - - Bug #105970 - - poppler/XRef.cc | 16 ++++++++-------- - 1 file changed, 8 insertions(+), 8 deletions(-) - -commit 9d42769705180d6df4ba8415849ef8790a0e9b1d -Author: Albert Astals Cid -Date: Tue May 1 02:43:21 2018 +0200 - - Add the invisible character check to SplashOutputDev::beginType3Char - - Bug #106244 - - poppler/SplashOutputDev.cc | 7 +++++++ - 1 file changed, 7 insertions(+) - -commit 15d6519933256ffd1746eb6c7988def34228952e -Author: Albert Astals Cid -Date: Mon Apr 30 15:09:26 2018 +0200 - - cpp: add a newline after the error line - - cpp/poppler-private.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 6085b7b35b8ee6b0aab2d1b55064f79cb7e2c2fb -Author: Albert Astals Cid -Date: Fri Mar 23 16:46:09 2018 +0100 - - Make poppler_form_field_get_font_size return 0 - - It was doing that anyway but in a more complex way. - - Added a note into the docu so that people can volunteer to come - and fix it if someone is using it - - glib/poppler-form-field.cc | 5 ++++- - poppler/Annot.cc | 1 - - poppler/Annot.h | 3 --- - poppler/Form.cc | 4 ---- - poppler/Form.h | 2 -- - 5 files changed, 4 insertions(+), 11 deletions(-) - -commit a613cd32bcaabe67649536886637ad022685c402 -Author: Albert Astals Cid -Date: Thu Apr 19 17:10:23 2018 +0200 - - Fix compilation with libc++ - - qt5/src/ArthurOutputDev.cc | 2 ++ - 1 file changed, 2 insertions(+) - -commit 4d851d16aa6a2a9f00b60091a2ef810be1a571ea -Author: Albert Astals Cid -Date: Tue Apr 17 20:04:26 2018 +0200 - - poppler 0.64.0 - - CMakeLists.txt | 4 ++-- - NEWS | 33 +++++++++++++++++++++++++++++++++ - cpp/Doxyfile | 2 +- - qt5/src/CMakeLists.txt | 2 +- - qt5/src/Doxyfile | 2 +- - 5 files changed, 38 insertions(+), 5 deletions(-) - -commit 1dcf335a8e212fdfd18bad1f56a743504f653cf5 -Author: Albert Astals Cid -Date: Tue Apr 17 16:21:33 2018 +0200 - - qt5: Don't need this friend declaration - - qt5/src/poppler-link.h | 1 - - 1 file changed, 1 deletion(-) - -commit 281d5cbd33521c823f1602f3d0c1e2ad9a4ab1d2 -Author: Albert Astals Cid -Date: Fri Apr 6 15:34:57 2018 +0200 - - Object::getName return const char instead of char - - poppler/Form.cc | 2 +- - poppler/Form.h | 2 +- - poppler/Gfx.cc | 20 ++++++++++---------- - poppler/Gfx.h | 14 +++++++------- - poppler/GfxFont.cc | 4 ++-- - poppler/Link.cc | 6 +++--- - poppler/Link.h | 2 +- - poppler/MarkedContentOutputDev.cc | 2 +- - poppler/MarkedContentOutputDev.h | 2 +- - poppler/Movie.cc | 2 +- - poppler/Object.h | 2 +- - poppler/OutputDev.cc | 6 +++--- - poppler/OutputDev.h | 6 +++--- - poppler/Rendition.cc | 2 +- - poppler/Stream.cc | 2 +- - poppler/Stream.h | 2 +- - 16 files changed, 38 insertions(+), 38 deletions(-) - -commit 8fe1a5b96e5ad7dac60dd0f198b3c8b18fb3c5bb -Author: Andre Heinecke -Date: Tue Apr 17 10:02:40 2018 +0200 - - Fix parsing of focus out actions - - The key is uppercase B with lowercase L. Not I. - - poppler/Annot.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 3636ccbaece6706ef86dfab9303c3f164e68ffe2 -Author: Albert Astals Cid -Date: Tue Apr 17 10:57:06 2018 +0200 - - pdfsig: Don't use fixed buffer size for path - - utils/pdfsig.cc | 19 +++++++++++++------ - 1 file changed, 13 insertions(+), 6 deletions(-) - -commit 17c7e3b0e1801a8643712013eb3b106c802e0faa -Author: Albert Astals Cid -Date: Tue Apr 17 11:02:29 2018 +0200 - - utils: Move numberOfCharacters to shared file - - utils/numberofcharacters.h | 26 ++++++++++++++++++++++++++ - utils/pdftocairo.cc | 13 +------------ - utils/pdftoppm.cc | 13 +------------ - 3 files changed, 28 insertions(+), 24 deletions(-) - -commit 73ab9930810ae83998467ec859f3ee3984548cbd -Author: Albert Astals Cid -Date: Tue Apr 17 10:46:46 2018 +0200 - - pdfsig: Add -dump to manpage - - utils/pdfsig.1 | 3 +++ - 1 file changed, 3 insertions(+) - -commit bdece3bb0c115576d23e76dc29ee43f04aafdee0 -Author: Chinmoy Ranjan Pradhan -Date: Tue Apr 17 10:45:15 2018 +0200 - - pdfsig: Add -dump which writes signatures to disk - - Bug #104881 - - poppler/Form.cc | 8 +++++++- - poppler/Form.h | 7 +++++-- - utils/pdfsig.cc | 33 +++++++++++++++++++++++++++++++-- - 3 files changed, 43 insertions(+), 5 deletions(-) - -commit 97aa11bf135421c1f87f2a46e2f597626f503f10 -Author: Oliver Sander -Date: Fri Mar 23 22:04:11 2018 +0100 - - Document method drawImageMask - - poppler/OutputDev.h | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -commit ae4349620863a42ae569f1ce05461bb27340c4ea -Author: Albert Astals Cid -Date: Mon Apr 16 22:49:54 2018 +0200 - - Make the second parseAction variant private - - poppler/Link.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 444d9d8de5d4f8d627084405e1583b6d6d3900c7 -Author: Albert Astals Cid -Date: Mon Apr 16 22:28:18 2018 +0200 - - Simplify LinkAction::parseAction a bit - - After the discussion on the mailing list, also using unique_ptr was - wrong - - poppler/Link.cc | 22 +++++++++++----------- - poppler/Link.h | 5 +++-- - 2 files changed, 14 insertions(+), 13 deletions(-) - -commit 88c99f1f6f4faf31faabccd35d9d094958020ebc -Author: Albert Astals Cid -Date: Mon Apr 16 17:59:35 2018 +0200 - - Fix crash on malformed documents - - In GfxGouraudTriangleShading::parse - - Bug #106061 - - poppler/GfxState.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit df8a4ee51e18a39f85568c4122e5edd8c03d61df -Author: Albert Astals Cid -Date: Mon Apr 16 17:46:10 2018 +0200 - - Make it so we copy seenNextActions a bit less - - poppler/Link.cc | 20 +++++++++++--------- - poppler/Link.h | 3 ++- - 2 files changed, 13 insertions(+), 10 deletions(-) - -commit bd9fb431941916174e1c3b2201bf5f422bcf61bd -Author: Aleix Pol -Date: Mon Apr 16 16:38:09 2018 +0200 - - Make it possible to build poppler on Android without fontconfig - - Didn't manage to make fontconfig build, still nice to have poppler - available. - - CMakeLists.txt | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -commit 34a44e5b95230b1ed03bb030e9963d0187b01951 -Author: Aleix Pol -Date: Mon Apr 16 16:35:47 2018 +0200 - - Do not assume that iconv is in /usr/include - - We find it explicitly because it may be elsewhere. - - cpp/CMakeLists.txt | 1 + - 1 file changed, 1 insertion(+) - -commit bdd8db389c7b09cd9042267f36214f809e4c5f60 -Author: Andre Heinecke -Date: Mon Apr 16 17:13:05 2018 +0200 - - Add support for Next actions following an action - - Next actions are action dictionaries or an array - of action dictonaries. "Next" is an entry in the - general action dictionary. - - These actions are supposed to be performed after each other. - So that a single button press can for example - both trigger a Hide action and a JavaScript action. - - poppler/Link.cc | 72 - +++++++++++++++++++++++++++++++++++++++++- - poppler/Link.h | 18 +++++++++-- - qt5/src/poppler-link-private.h | 9 ++++++ - qt5/src/poppler-link.cc | 7 +++- - qt5/src/poppler-link.h | 11 ++++++- - qt5/src/poppler-page.cc | 14 ++++++++ - 6 files changed, 125 insertions(+), 6 deletions(-) - -commit ab72205dd14efe9c5c8d12e6b1ae538208bce168 -Author: Andre Heinecke -Date: Mon Apr 16 16:31:38 2018 +0200 - - Add support for hide action - - The hide action can be used to show / hide fields. - - poppler/Link.cc | 29 +++++++++++++++++++++++++++++ - poppler/Link.h | 35 +++++++++++++++++++++++++++++++++++ - qt5/src/poppler-annotation.cc | 6 ++++++ - qt5/src/poppler-link-private.h | 17 +++++++++++++++++ - qt5/src/poppler-link.cc | 28 ++++++++++++++++++++++++++++ - qt5/src/poppler-link.h | 39 - ++++++++++++++++++++++++++++++++++++++- - qt5/src/poppler-page.cc | 11 +++++++++++ - 7 files changed, 164 insertions(+), 1 deletion(-) - -commit 022ccd4e1c61f4e89c7ffad83d9a5a896f65dc40 -Author: Albert Astals Cid -Date: Mon Apr 16 16:22:55 2018 +0200 - - GfxGouraudTriangleShading::parse: Fix memory leak on malformed files - - Bug #106059 - - poppler/GfxState.cc | 3 +++ - 1 file changed, 3 insertions(+) - -commit 776257d0c20d4e3ae8d66683ab0f087bf6fc7b0f -Author: Albert Astals Cid -Date: Wed Apr 11 00:44:41 2018 +0200 - - Fix leaks in GfxPatchMeshShading::parse with malformed documents - - Bug #105969 - - poppler/GfxState.cc | 11 ++++++++--- - 1 file changed, 8 insertions(+), 3 deletions(-) - -commit d80e7aac3366f93865581a783751abb528c120b3 -Author: Albert Astals Cid -Date: Wed Apr 11 00:32:35 2018 +0200 - - Make GfxGouraudTriangleShading::parse more accepting of malformed - documents - - Bug #105972 - - poppler/GfxState.cc | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -commit fee13e935e4c9eaadff434436eaceeb13afcfc13 -Author: Oliver Sander -Date: Fri Mar 23 22:24:42 2018 +0100 - - Implement Type3 font support for ArthurOutputDev - - qt5/src/ArthurOutputDev.cc | 177 - ++++++++++++++++++++++++++++++++++++++++----- - qt5/src/ArthurOutputDev.h | 16 ++-- - qt5/src/poppler-page.cc | 4 +- - 3 files changed, 170 insertions(+), 27 deletions(-) - -commit 79c588912f41aa6ee81ea058e7e649199a252f90 -Author: Oliver Sander -Date: Sun Mar 25 21:38:27 2018 +0200 - - Do not make ArthurOutputDev::startPage fill the page with white - - qt5/src/ArthurOutputDev.cc | 13 +------------ - 1 file changed, 1 insertion(+), 12 deletions(-) - -commit 8c8c0034ae88c06616ace5e5ead71318f04311cf -Author: Oliver Sander -Date: Sat Apr 7 23:45:50 2018 +0200 - - Implement ArthurOutputDev::drawImageMask - - Bug #105531 - - Also temporarily disable type3 fonts since it seems they're not - properly - supported - - qt5/src/ArthurOutputDev.cc | 91 - +++++++++++++++------------------------------- - qt5/src/ArthurOutputDev.h | 2 +- - 2 files changed, 30 insertions(+), 63 deletions(-) - -commit 3e0408966ccdd713de7795ce7992888b3896b49c -Author: Andre Heinecke -Date: Thu Mar 22 14:53:19 2018 +0100 - - Qt5: Allow setting of visibility - - Extends Qt5 API to allow setting visibility flags - - qt5/src/poppler-form.cc | 11 +++++++++++ - qt5/src/poppler-form.h | 6 ++++++ - 2 files changed, 17 insertions(+) - -commit b4127fb1c45fe5dcabe3751f0b40029405224f49 -Author: Albert Astals Cid -Date: Fri Apr 6 23:08:15 2018 +0200 - - Add some more const - - const is always good :) - - cpp/poppler-embedded-file.cpp | 13 ++-- - cpp/poppler-private.cpp | 4 +- - cpp/poppler-private.h | 3 +- - cpp/poppler-toc-private.h | 4 +- - cpp/poppler-toc.cpp | 9 +-- - glib/poppler-action.cc | 50 +++++++-------- - glib/poppler-document.cc | 8 +-- - glib/poppler-layer.cc | 2 +- - glib/poppler-media.cc | 4 +- - glib/poppler-movie.cc | 2 +- - glib/poppler-private.h | 6 +- - goo/GooList.cc | 16 ++++- - goo/GooList.h | 8 +-- - poppler/FileSpec.cc | 10 +-- - poppler/FileSpec.h | 26 ++++---- - poppler/Function.h | 2 +- - poppler/Link.cc | 26 ++++---- - poppler/Link.h | 138 - ++++++++++++++++++++-------------------- - poppler/Movie.cc | 12 ++-- - poppler/Movie.h | 26 ++++---- - poppler/OptionalContent.cc | 8 +-- - poppler/OptionalContent.h | 14 ++-- - poppler/Outline.cc | 10 +-- - poppler/Outline.h | 20 +++--- - poppler/Rendition.cc | 4 +- - poppler/Rendition.h | 18 +++--- - poppler/Sound.cc | 6 +- - poppler/Sound.h | 18 +++--- - qt5/src/poppler-document.cc | 4 +- - qt5/src/poppler-embeddedfile.cc | 10 +-- - qt5/src/poppler-link.cc | 4 +- - qt5/src/poppler-media.cc | 2 +- - qt5/src/poppler-movie.cc | 4 +- - qt5/src/poppler-optcontent.cc | 4 +- - qt5/src/poppler-private.cc | 24 +++---- - qt5/src/poppler-private.h | 8 +-- - qt5/src/poppler-sound.cc | 2 +- - utils/HtmlFonts.cc | 4 +- - utils/HtmlFonts.h | 2 +- - utils/HtmlOutputDev.cc | 12 ++-- - utils/HtmlOutputDev.h | 4 +- - utils/pdfdetach.cc | 2 +- - 42 files changed, 285 insertions(+), 268 deletions(-) - -commit a8e93f46df9feb7f7241826307af51befdb25d9e -Author: Albert Astals Cid -Date: Fri Apr 6 09:02:28 2018 +0200 - - Make Object return const GooString pointer - - This helps making sure noone is changing strings that belong to - objects without us realizing. - - In fact noone was doing except an ifdef for windows, fixed it to - not modify the dict contents anymore - - glib/poppler-action.cc | 2 +- - poppler/Annot.cc | 6 +++--- - poppler/FileSpec.cc | 4 +++- - poppler/Form.cc | 6 +++--- - poppler/GfxFont.cc | 4 ++-- - poppler/GfxState.cc | 3 ++- - poppler/Link.cc | 3 ++- - poppler/Object.h | 3 ++- - poppler/Outline.cc | 3 ++- - poppler/PDFDoc.cc | 3 ++- - poppler/Parser.cc | 4 +++- - poppler/Stream.cc | 2 +- - poppler/StructElement.cc | 3 ++- - qt5/src/poppler-document.cc | 6 +++--- - qt5/src/poppler-embeddedfile.cc | 5 +++-- - qt5/src/poppler-optcontent.cc | 3 ++- - qt5/src/poppler-qt5.h | 2 +- - qt5/tests/check_dateConversion.cpp | 4 ++-- - test/pdf-fullrewrite.cc | 4 ++-- - utils/pdfinfo.cc | 7 ++++--- - utils/pdftohtml.cc | 5 +++-- - utils/pdftotext.cc | 5 +++-- - utils/pdfunite.cc | 5 +++-- - 23 files changed, 54 insertions(+), 38 deletions(-) - -commit 07180b86786cce95df4e2433a7cf3e006749a0f5 -Author: Albert Astals Cid -Date: Fri Apr 6 13:03:16 2018 +0200 - - Gfx: Make two functions take const GooString * - - poppler/Gfx.cc | 8 ++++---- - poppler/Gfx.h | 4 ++-- - 2 files changed, 6 insertions(+), 6 deletions(-) - -commit c4af5981ab2a5f42a9a1194bb5929c2151fc2674 -Author: Albert Astals Cid -Date: Fri Apr 6 13:00:12 2018 +0200 - - OutputDev: change functions taking GooString * to make it const - - People that use poppler core, beware of the signature change! - - poppler/CairoOutputDev.cc | 5 +++-- - poppler/CairoOutputDev.h | 5 +++-- - poppler/OutputDev.h | 7 ++++--- - poppler/PSOutputDev.cc | 4 ++-- - poppler/PSOutputDev.h | 2 +- - poppler/TextOutputDev.cc | 7 ++++--- - poppler/TextOutputDev.h | 7 ++++--- - utils/HtmlOutputDev.cc | 5 +++-- - utils/HtmlOutputDev.h | 5 +++-- - 9 files changed, 27 insertions(+), 20 deletions(-) - -commit 5fc6d9fcb41966b85dc67117531c81ec89f42f20 -Author: Albert Astals Cid -Date: Fri Apr 6 12:50:18 2018 +0200 - - PageAttrs and Page getLastModified return const GooString * - - poppler/Page.h | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit a801b46e1e792b5d0a34f97de870c485e0ef312a -Author: Albert Astals Cid -Date: Fri Apr 6 12:48:18 2018 +0200 - - PSOuputDev writePSString and writePSTextLine take const - - poppler/PSOutputDev.cc | 4 ++-- - poppler/PSOutputDev.h | 4 ++-- - 2 files changed, 4 insertions(+), 4 deletions(-) - -commit eb6de58de5ef8c2ddeeed386e0b8b498b945797f -Author: Albert Astals Cid -Date: Fri Apr 6 12:47:12 2018 +0200 - - PDFDoc::writeString take const GooString pointer - - poppler/PDFDoc.cc | 2 +- - poppler/PDFDoc.h | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit 853b2251d4e11f14cd891bf1b6095ee36683d161 -Author: Albert Astals Cid -Date: Fri Apr 6 12:46:06 2018 +0200 - - OCDisplayNode take const GooString pointer - - poppler/OptionalContent.cc | 4 ++-- - poppler/OptionalContent.h | 2 +- - 2 files changed, 3 insertions(+), 3 deletions(-) - -commit 0a8311929ba599d7b0a35e83b1f5dec4a3c9da06 -Author: Albert Astals Cid -Date: Fri Apr 6 12:44:43 2018 +0200 - - GfxFont::getNextChar take const char pointer - - poppler/GfxFont.cc | 4 ++-- - poppler/GfxFont.h | 6 +++--- - 2 files changed, 5 insertions(+), 5 deletions(-) - -commit 0e35441513bdce2471113b937bccb8928c7c9d9f -Author: Albert Astals Cid -Date: Fri Apr 6 12:42:29 2018 +0200 - - FormFieldText::tokenizeDA take const GooString - - poppler/Form.cc | 2 +- - poppler/Form.h | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit ba91b95f6e504cce08825e83a567a554ac846e39 -Author: Albert Astals Cid -Date: Fri Apr 6 12:41:44 2018 +0200 - - dateStringToTime take const GooString - - poppler/DateInfo.cc | 4 ++-- - poppler/DateInfo.h | 4 ++-- - 2 files changed, 4 insertions(+), 4 deletions(-) - -commit 9bfe4b43216bce4e702d7d8f61fc7cb9acdbb8f6 -Author: Albert Astals Cid -Date: Fri Apr 6 12:40:53 2018 +0200 - - CMap::getCID take const char - - poppler/CMap.cc | 4 ++-- - poppler/CMap.h | 2 +- - 2 files changed, 3 insertions(+), 3 deletions(-) - -commit 690ea9e5c900268556431df71bdac38f5e74dc36 -Author: Albert Astals Cid -Date: Fri Apr 6 12:39:35 2018 +0200 - - GooString::insert make pointer const - - goo/GooString.cc | 2 +- - goo/GooString.h | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit f3551055dab57eb0bc544070b15c6a7435585003 -Author: Albert Astals Cid -Date: Fri Apr 6 12:19:54 2018 +0200 - - Introduce AutoFreeMemStream - - This is done by turning the old MemStream implementation to a new - template implementation in BaseMemStream - and inheriting from it MemStream for const char * and - AutoFreeMemStream for char *. - - This way we make clear one frees the data and the other does not, - while also removing the ugly setNeedsFree in MemStream - - poppler/Annot.cc | 16 ++++++--------- - poppler/SplashOutputDev.cc | 3 +-- - poppler/Stream.h | 51 - +++++++++++++++++++++++++++------------------- - 3 files changed, 37 insertions(+), 33 deletions(-) - -commit 4cc89c79f58cb416aae8396190a788e1398113ff -Author: Albert Astals Cid -Date: Fri Apr 6 12:11:55 2018 +0200 - - Move MemStream implementation to header - - Will be useful in next step where we turn it into a template - - poppler/Stream.cc | 83 -------------------------------------------------- - poppler/Stream.h | 91 - +++++++++++++++++++++++++++++++++++++++++++++++++------ - 2 files changed, 81 insertions(+), 93 deletions(-) - -commit 8821c04f36cb737776cd9077a46f1a9f86ca54e7 -Author: Albert Astals Cid -Date: Wed Apr 4 10:20:52 2018 +0200 - - Workaround form field text not being drawn on broken files - - Try drawing with the form appearance instead of the field apparance - if drawing with the field appearance fails - - Bug #103245 - - poppler/Annot.cc | 88 - +++++++++++++++++++++++++++++++++++--------------------- - poppler/Annot.h | 24 +++++++++------- - 2 files changed, 68 insertions(+), 44 deletions(-) - -commit afb053d652cc1f670465d471f671652b112dbf51 -Author: Albert Astals Cid -Date: Thu Apr 5 11:48:11 2018 +0200 - - Annot: Move appearBuf construction to a new class - - Previously we had appearBuf construction functions in Annot itself - which was a bit - confusing. Some functions like writeString took appearBuf as - parameter, some - other did not. By moving it out to a new class and making all the - input parameters const - pointers we make it clear the construction of appearBuf doesn't have - any other side - effect on Annot itself or any other class - - I'm leaving the functions in their old place to minimize the diff - so it's easier to read. - I'll move them in a follow up commit - - poppler/Annot.cc | 528 - ++++++++++++++++++++++++++++--------------------------- - poppler/Annot.h | 73 +++++--- - 2 files changed, 321 insertions(+), 280 deletions(-) - -commit 0a79dc3036111e86a11bd290057da6674da3b311 -Author: Albert Astals Cid -Date: Thu Apr 5 18:15:33 2018 +0200 - - Add some more const - - glib/poppler-action.cc | 14 +++++------ - glib/poppler-annot.cc | 18 +++++++-------- - glib/poppler-document.cc | 2 +- - glib/poppler-form-field.cc | 4 ++-- - glib/poppler-private.h | 2 +- - poppler/Annot.cc | 16 ++++++------- - poppler/Annot.h | 54 - +++++++++++++++++++++---------------------- - poppler/Catalog.cc | 5 ++-- - poppler/Catalog.h | 5 ++-- - poppler/Form.cc | 6 ++--- - poppler/Form.h | 6 ++--- - poppler/Link.h | 23 +++++++++--------- - poppler/PDFDoc.h | 3 ++- - poppler/UTF.cc | 3 ++- - poppler/UTF.h | 3 ++- - qt5/src/poppler-annotation.cc | 5 ++-- - qt5/src/poppler-document.cc | 9 +++++++- - qt5/src/poppler-form.cc | 4 ++-- - qt5/src/poppler-page.cc | 2 +- - qt5/src/poppler-private.cc | 4 ++-- - qt5/src/poppler-private.h | 4 ++-- - qt5/src/poppler-qt5.h | 7 ++++++ - utils/JSInfo.cc | 7 +++--- - utils/JSInfo.h | 3 ++- - 24 files changed, 116 insertions(+), 93 deletions(-) - -commit b60de1700d95d022ec0d1676886b0442cb763473 -Author: Albert Astals Cid -Date: Thu Apr 5 16:03:54 2018 +0200 - - Introduce a const version of GfxResources::lookupFont - - poppler/Gfx.cc | 13 +++++++++++-- - poppler/Gfx.h | 5 ++++- - poppler/GfxFont.cc | 2 +- - poppler/GfxFont.h | 2 +- - 4 files changed, 17 insertions(+), 5 deletions(-) - -commit 6bb508acd9a79671e5e9defc7b92a943fb880cda -Author: Albert Astals Cid -Date: Thu Apr 5 14:19:51 2018 +0200 - - More const in GfxFont methods - - poppler/GfxFont.h | 10 +++++----- - poppler/PSOutputDev.cc | 2 +- - poppler/PSOutputDev.h | 2 +- - poppler/SplashOutputDev.cc | 11 ++++++----- - qt5/src/ArthurOutputDev.cc | 3 ++- - 5 files changed, 15 insertions(+), 13 deletions(-) - -commit 390109044bdef1ba67c2339bffaf11b38261854d -Author: Albert Astals Cid -Date: Thu Apr 5 13:00:59 2018 +0200 - - Fix windows build - - poppler/GlobalParamsWin.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit f75c0f5c3f9d63334cc21e0ab68f1af45d0037cc -Author: Albert Astals Cid -Date: Thu Apr 5 12:58:34 2018 +0200 - - Make GfxFont::getName const - - glib/poppler-structure-element.cc | 2 +- - poppler/FontInfo.cc | 3 ++- - poppler/GfxFont.h | 2 +- - poppler/GlobalParams.cc | 6 +++--- - poppler/PSOutputDev.cc | 6 ++++-- - poppler/PSOutputDev.h | 3 ++- - utils/HtmlFonts.cc | 3 ++- - 7 files changed, 15 insertions(+), 10 deletions(-) - -commit a669ad5cfb28cdfcfe38bbce39fbf8c6fc3102d9 -Author: Albert Astals Cid -Date: Thu Apr 5 12:55:39 2018 +0200 - - buildFcPattern: Don't modify the actual name of the font - - When doing the '-' to ' ' replacement to build the fc pattern - - poppler/GlobalParams.cc | 10 ++++++---- - 1 file changed, 6 insertions(+), 4 deletions(-) - -commit 4f9b3d8d8d17863873a8a399ff3fe212d247b236 -Author: Albert Astals Cid -Date: Thu Apr 5 12:37:40 2018 +0200 - - Make some GfxFont methods const - - poppler/GfxFont.cc | 8 ++++---- - poppler/GfxFont.h | 16 ++++++++-------- - 2 files changed, 12 insertions(+), 12 deletions(-) - -commit 2bf6f2275c49f94e84f935653d6c42f6b5f9b364 -Author: Albert Astals Cid -Date: Thu Apr 5 12:21:38 2018 +0200 - - Make some Form methods const - - glib/poppler-form-field.cc | 6 +++--- - poppler/Annot.cc | 4 ++-- - poppler/Form.cc | 18 +++++++++--------- - poppler/Form.h | 32 ++++++++++++++++---------------- - qt5/src/poppler-form.cc | 3 ++- - 5 files changed, 32 insertions(+), 31 deletions(-) - -commit 6f2bc64e09b7f5e5be6962840ede40369b78fd5e -Author: Albert Astals Cid -Date: Thu Apr 5 12:25:17 2018 +0200 - - Make AnnotWidget::drawText and Annot::layoutText input GooString const - - poppler/Annot.cc | 9 +++++---- - poppler/Annot.h | 5 +++-- - 2 files changed, 8 insertions(+), 6 deletions(-) - -commit 5e7931c4c9fdaba8b3343d04eda6e9eb2a2e3dcd -Author: Albert Astals Cid -Date: Thu Apr 5 12:23:21 2018 +0200 - - Make _poppler_goo_string_to_utf8 input param const - - glib/poppler-document.cc | 2 +- - glib/poppler-private.h | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit 3fdb7ea7b6a1ed4add2fbc6dca7a38b27fc79f45 -Author: Albert Astals Cid -Date: Thu Apr 5 12:21:11 2018 +0200 - - Make UnicodeParsedString input const - - qt5/src/poppler-private.cc | 5 +++-- - qt5/src/poppler-private.h | 3 ++- - 2 files changed, 5 insertions(+), 3 deletions(-) - -commit 4b96c8399102a36e542c9da3b34650c26ccdda3c -Author: Albert Astals Cid -Date: Thu Apr 5 12:19:07 2018 +0200 - - Make pdfDocEncodingToUTF16 input param const - - poppler/Form.cc | 5 +++-- - poppler/Form.h | 1 + - poppler/PDFDocEncoding.h | 2 +- - 3 files changed, 5 insertions(+), 3 deletions(-) - -commit 5804259f22d4d42ed7c37c9efb613910248cd1d4 -Author: Albert Astals Cid -Date: Thu Apr 5 11:58:50 2018 +0200 - - GfxFont::getToUnicode -> const - - And we don't need to do the inc/dec ref dance in Annot - since the GfxFont is still alive while we use it and there's - no other users to getToUnicode that may keep the CharCodeToUnicode - for longer time than the GfxFont live - - poppler/Annot.cc | 5 ++--- - poppler/GfxFont.cc | 12 ++++-------- - poppler/GfxFont.h | 7 ++++--- - 3 files changed, 10 insertions(+), 14 deletions(-) - -commit 1eb06156855758e4b1da2adc0334d84d3f857fb1 -Author: Albert Astals Cid -Date: Thu Apr 5 11:56:57 2018 +0200 - - CharCodeToUnicode::mapToCharCode -> const - - poppler/CharCodeToUnicode.cc | 3 ++- - poppler/CharCodeToUnicode.h | 3 ++- - 2 files changed, 4 insertions(+), 2 deletions(-) - -commit 2a49511517678b7e05660bb9a35a614c83229b66 -Author: Albert Astals Cid -Date: Thu Apr 5 11:50:23 2018 +0200 - - Add some const to GooHash and GooString - - goo/GooHash.cc | 7 ++++--- - goo/GooHash.h | 7 ++++--- - goo/GooString.cc | 7 ++++--- - goo/GooString.h | 7 ++++--- - 4 files changed, 16 insertions(+), 12 deletions(-) - -commit e491e935ea355d48519cf0a14e4b060655850675 -Author: Evangelos Foutras -Date: Mon Apr 2 16:09:34 2018 +0300 - - Fix PDFDoc::checkHeader() for PDFs smaller than 1 KiB - - The fix for bug 104502 made it so PDFDoc::checkHeader() would print a - warning and return immediatelly if it encounters an EOF while reading - the first 1024 bytes. - - Some PDF files can be smaller than 1024 bytes, for example those used - by pdf2djvu's test suite. The latter would fail due to the unexpected - warnings. - - Change the behavior of PDFDoc::checkHeader() when encountering an EOF - so it processes the data it has read so far instead of aborting early. - - https://bugs.freedesktop.org/show_bug.cgi?id=105674 - - poppler/PDFDoc.cc | 23 +++++++++++++++-------- - 1 file changed, 15 insertions(+), 8 deletions(-) - -commit c19469f2a80ebc09bef3fbd603034e43c4a707cd -Author: Mojca Miklavec -Date: Mon Apr 2 12:52:35 2018 +0200 - - Fix build on some platforms - - We need to include time.h in gfile.h - - Bug #105766 - - goo/gfile.cc | 6 ++---- - goo/gfile.h | 2 ++ - 2 files changed, 4 insertions(+), 4 deletions(-) - -commit c7a317635cfc6934e975e846335e37a68d6b3876 -Author: Albert Astals Cid -Date: Mon Mar 26 16:10:05 2018 +0200 - - glib: less deprecated calls - - And increate gdk pixbuf requirement to the version i think we - actually require - - cmake/modules/FindGTK.cmake | 2 +- - glib/demo/annots.c | 2 +- - glib/demo/selections.c | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - -commit 7a708ffd374cd18e9e4bfe8a8e95c02184a074ba -Author: Oliver Sander -Date: Wed Mar 28 00:00:35 2018 +0200 - - Implement ArthurOutputDev::axialShadedFill - - qt5/src/ArthurOutputDev.cc | 128 - ++++++++++++++++++++++++++++++++++++++++++++- - qt5/src/ArthurOutputDev.h | 9 +++- - 2 files changed, 135 insertions(+), 2 deletions(-) - -commit 5e7aef9df36a07c82b0ab40f80fd8464840f6424 -Author: Albert Astals Cid -Date: Fri Mar 23 15:34:56 2018 +0100 - - PSOutputDev: move i declaration to the for - - poppler/PSOutputDev.cc | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -commit 79789ed3d2798fb34f1c82d950e03a4d41e197de -Author: Albert Astals Cid -Date: Fri Mar 23 19:58:16 2018 +0100 - - Annot: setColor -> setDrawColor - - to differentiate from the setColor that actually changes the annot - color - - poppler/Annot.cc | 60 - ++++++++++++++++++++++++++++---------------------------- - poppler/Annot.h | 2 +- - 2 files changed, 31 insertions(+), 31 deletions(-) - -commit e34e187934e3654989b6af5177f345032623dd9b -Author: Albert Astals Cid -Date: Fri Mar 23 19:57:39 2018 +0100 - - SplashOutputDev: make getMatteColor static - - poppler/SplashOutputDev.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit c14dfa44a70ce32bbe1268ddff6106cab3f33bc2 -Author: Albert Astals Cid -Date: Fri Mar 23 19:56:12 2018 +0100 - - HtmlOutputDev: don't pass catalog around to not use it - - utils/HtmlOutputDev.cc | 13 ++++++------- - utils/HtmlOutputDev.h | 4 ++-- - 2 files changed, 8 insertions(+), 9 deletions(-) - -commit 92c51751a87b31c4bafa7b0146f745b3008ec9fc -Author: Albert Astals Cid -Date: Fri Mar 23 19:55:42 2018 +0100 - - JPEG2000Stream.cc: no need to store indexed - - we only use it in one function - - poppler/JPEG2000Stream.cc | 13 ++++++------- - 1 file changed, 6 insertions(+), 7 deletions(-) - -commit 46543272dbe7655821e1c794ca3cc22e8cb4cef9 -Author: Albert Astals Cid -Date: Tue Mar 20 23:44:23 2018 +0100 - - gfile: Fix windows build - - goo/gfile.cc | 4 ++++ - 1 file changed, 4 insertions(+) - -commit 327c342a932d8df731ec02a6b22792004206c2db -Author: Andre Heinecke -Date: Tue Mar 20 23:07:15 2018 +0100 - - Add read only setter for form fields - - Read only is modifiable from AcroForm scripts. - - poppler/Form.cc | 32 ++++++++++++++++++++++++++++++++ - poppler/Form.h | 4 +++- - qt5/src/poppler-form.cc | 6 ++++++ - qt5/src/poppler-form.h | 7 +++++++ - 4 files changed, 48 insertions(+), 1 deletion(-) - -commit 4798ef5298bcfcfadf8e1d66f9200e3c9eee2248 -Author: Carlos Garcia Campos -Date: Mon Mar 19 11:16:03 2018 +0100 - - build: bring back the option to disable GObject introspection - - It was available with autotools, but we lost it when switching - to cmake. - - CMakeLists.txt | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) - -commit f26285f361478219ea9d3c6de1529ecd5ff96ac9 -Author: Albert Astals Cid -Date: Sun Mar 18 19:23:49 2018 +0100 - - 0.63 - - CMakeLists.txt | 4 ++-- - NEWS | 60 - ++++++++++++++++++++++++++++++++++++++++++++++++++ - cpp/CMakeLists.txt | 2 +- - cpp/Doxyfile | 2 +- - qt5/src/CMakeLists.txt | 2 +- - qt5/src/Doxyfile | 2 +- - 6 files changed, 66 insertions(+), 6 deletions(-) - -commit 8b2079b7250e037599f6640539f8107d93314919 -Author: Albert Astals Cid -Date: Sun Mar 18 19:01:40 2018 +0100 - - Update copyrights - - poppler/CairoOutputDev.cc | 2 +- - poppler/CairoOutputDev.h | 2 +- - poppler/GfxFont.cc | 2 +- - poppler/GfxFont.h | 2 +- - poppler/Object.h | 2 +- - poppler/StructElement.cc | 1 + - poppler/StructTreeRoot.cc | 2 +- - poppler/StructTreeRoot.h | 1 + - poppler/TextOutputDev.cc | 2 +- - utils/pdfinfo.cc | 2 +- - 10 files changed, 10 insertions(+), 8 deletions(-) - -commit 41321580f0a13309e5de44eb42851e3c82a5ef8f -Author: Adam Reichold -Date: Sun Mar 4 09:17:00 2018 +0100 - - Use the detection idiom to handle the non-standard struct stat field - name for high-resolution mtime on Mac OS X. - - goo/gfile.cc | 40 +++++++++++++++++++++++++++++++++++++--- - 1 file changed, 37 insertions(+), 3 deletions(-) - -commit b14baefb406b8f08f0702edd686ebc7698cb7f15 -Author: Adam Reichold -Date: Mon Feb 12 08:09:00 2018 +0100 - - Explicitly anchor destructor of text_box_data to avoid linker errors - using Clang on Mac OS X. - - cpp/poppler-page.cpp | 3 +++ - cpp/poppler-private.h | 3 +++ - 2 files changed, 6 insertions(+) - -commit 4afe2fb10ab969bfd9895c0ba9d4990c5881b451 -Author: Carlos Garcia Campos -Date: Sun Mar 4 10:28:57 2018 +0100 - - cairo: use GOOD instead of BEST as the default cairo filter for - scaling - - The quality is good enough and the performance is much better. - - https://bugs.freedesktop.org/show_bug.cgi?id=103136 - - poppler/CairoOutputDev.cc | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -commit 41c61811fdd6efe2bef34d2ce26520fc6b3c4237 -Author: Jason Crain -Date: Fri Feb 23 23:21:03 2018 -0600 - - TextPage: Add horizontal scaling to font matrix - - Drawing the text selection sometimes draws text reversed or expanded. - This is because the while the current font transformation matrix is - saved, the horizontal scaling is not. Include the effect of the - horizontal scaling in the transformation matrix. - - https://bugs.freedesktop.org/show_bug.cgi?id=105259 - - poppler/TextOutputDev.cc | 2 ++ - 1 file changed, 2 insertions(+) - -commit 2740b3aca81a6a8c690540fc141e5923a1fff460 -Author: Albert Astals Cid -Date: Tue Feb 27 00:47:04 2018 +0100 - - cpp: Add since - - cpp/poppler-page.h | 3 +++ - 1 file changed, 3 insertions(+) - -commit 42a6b8651f040f0960802e705b1aea82a956a63b -Author: suzuki toshiya -Date: Tue Feb 27 00:46:18 2018 +0100 - - cpp: Add page::text_list - - cpp/poppler-page.cpp | 91 - ++++++++++++++++++++++++++++++++++++++++++++++ - cpp/poppler-page.h | 55 ++++++++++++++++++++++++++++ - cpp/poppler-private.h | 9 +++++ - cpp/tests/poppler-dump.cpp | 34 +++++++++++++++++ - 4 files changed, 189 insertions(+) - -commit e25d4af6ed9b254db3096a2e483798734296376d -Author: Adam Reichold -Date: Sun Feb 18 09:43:58 2018 +0100 - - Fix warnings due to unhandled link types in XML serialization of - annotations code in the Qt5 frontend. - - qt5/src/poppler-annotation.cc | 20 ++++++++++++++------ - 1 file changed, 14 insertions(+), 6 deletions(-) - -commit e015ab97c1ee3a4ea386ccc86385aad458827d96 -Author: Adam Reichold -Date: Sun Feb 18 09:42:58 2018 +0100 - - Fix warnings due to the use of deprecated overloads of - Poppler::Page::Search in tests of Qt5 frontend. - - qt5/tests/check_search.cpp | 38 - +++++++++++++++++++------------------- - qt5/tests/stress-threads-qt5.cpp | 10 +++++----- - 2 files changed, 24 insertions(+), 24 deletions(-) - -commit 732903ecf1bdb085cac36eb29d330a7970670064 -Author: Adam Reichold -Date: Sun Feb 18 09:42:04 2018 +0100 - - Fix buffer size warning due to missing space for null terminator - in pdfseparate. - - utils/pdfseparate.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 791e024656212c65d798cb69a134cdd3e30cc79e -Author: Albert Astals Cid -Date: Sun Feb 18 23:05:59 2018 +0100 - - Make it work with newer gtk-doc - - Hopefully still works with older versions - - Bug #105075 - - gtkdoc.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 948d392d9acc3d82b86a260c952095a603fe767f -Author: William Bader -Date: Sun Feb 18 22:06:02 2018 +0100 - - Add python3 support to gtkdoc.py - - gtkdoc.py | 19 +++++++++++++------ - 1 file changed, 13 insertions(+), 6 deletions(-) - -commit 73130ae1125c86ebd0ee504d0681d9911ff2cfbd -Author: Albert Astals Cid -Date: Wed Feb 14 17:40:23 2018 +0100 - - SplashGouraudPattern: Remove mode member variable - - We don't need it anymore, was introduced in the initial overprint - implementation and was forgotten to be removed when merging xpdf 3.03 - - poppler/SplashOutputDev.cc | 9 ++------- - poppler/SplashOutputDev.h | 5 ++--- - 2 files changed, 4 insertions(+), 10 deletions(-) - -commit 37efb98d77c14c27a22806ec676c13f0a8b99490 -Author: Albert Astals Cid -Date: Wed Feb 14 17:43:41 2018 +0100 - - SplashOutputDev:: Remove unused maskBitmap member - - poppler/SplashOutputDev.h | 1 - - 1 file changed, 1 deletion(-) - -commit e3cece1bfc00083637f709f7647b4711b5c6a084 -Author: Albert Astals Cid -Date: Fri Feb 2 23:17:11 2018 +0100 - - Fix some -Wshadow warnings - - More to come, -Wshadow is interesting but if we enable it we still - get too many warnings for it to be useful - - cpp/tests/poppler-dump.cpp | 6 ++-- - poppler/CachedFile.cc | 8 +++--- - poppler/CairoFontEngine.cc | 64 - +++++++++++++++++++++--------------------- - poppler/CairoOutputDev.cc | 5 ++-- - poppler/CairoOutputDev.h | 4 +-- - poppler/Decrypt.cc | 6 ++-- - poppler/FontInfo.cc | 5 ++-- - poppler/Gfx.cc | 2 +- - poppler/GfxFont.cc | 12 ++++---- - poppler/GfxState.cc | 31 +++++++++----------- - poppler/JBIG2Stream.cc | 11 ++++---- - poppler/PDFDoc.cc | 4 +-- - poppler/StructElement.cc | 6 ++-- - poppler/StructTreeRoot.cc | 8 +++--- - poppler/TextOutputDev.h | 4 +-- - poppler/XRef.cc | 4 +-- - qt5/src/ArthurOutputDev.cc | 4 +-- - qt5/src/poppler-annotation.cc | 18 ++++++------ - qt5/src/poppler-media.cc | 4 +-- - qt5/src/poppler-page.cc | 24 ++++++++-------- - qt5/tests/test-poppler-qt5.cpp | 10 ++++--- - splash/SplashFTFontFile.cc | 5 ++-- - utils/ImageOutputDev.cc | 8 +++--- - utils/pdfinfo.cc | 7 ++--- - utils/pdftocairo.cc | 22 +++++++-------- - utils/pdftoppm.cc | 20 ++++++------- - 26 files changed, 149 insertions(+), 153 deletions(-) - -commit 8cfe91ae51fa50e66217c6bbcb236ec3a267e45e -Author: Albert Astals Cid -Date: Fri Feb 2 23:22:33 2018 +0100 - - CairoOutputDev: Remove two unused member variables - - poppler/CairoOutputDev.h | 2 -- - 1 file changed, 2 deletions(-) - -commit b1016f574ac63fa269ca5125827895220e1df883 -Author: Albert Astals Cid -Date: Thu Feb 1 22:46:33 2018 +0100 - - Qt5: Add cancellation support to renderToImage and textList - - qt5/src/poppler-page.cc | 148 - ++++++++++++++++++++++++++++-------------------- - qt5/src/poppler-qt5.h | 98 +++++++++++++++++++++++++++++++- - 2 files changed, 185 insertions(+), 61 deletions(-) - -commit 248aa0f5832ce063a9ae061dfcf54596e0ea5fba -Author: Albert Astals Cid -Date: Sun Jan 28 00:25:38 2018 +0100 - - Fix build without libpng - - utils/ImageOutputDev.cc | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit f93fa48839be2937cd7ce38c14884428416bcc4b -Author: Andreas Gruenbacher -Date: Sat Jan 27 20:24:09 2018 +0100 - - Fix build without libtiff - - Bug #104813 - - utils/ImageOutputDev.cc | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -commit f65f60e5d3f5e4109a79212a9994b5096a2a2a8d -Author: Jason Crain -Date: Thu Jan 18 11:57:33 2018 -0600 - - GfxFontDict: merge reference generation from xpdf 4.00 - - The GfxFontDict constructor generates a fake indirect reference if the - font dictionary doesn't have a real indirect reference. It sometimes - assigns the same reference to two different fonts leading to a wrong - font being used. XPDF 4.00 fixes this by using the hash of the font - data to create the fake reference. - - https://bugs.freedesktop.org/show_bug.cgi?id=104565 - - poppler/GfxFont.cc | 125 - +++++++++++++++++++++++++++++++++++++++++++++++++---- - poppler/GfxFont.h | 4 ++ - 2 files changed, 120 insertions(+), 9 deletions(-) - -commit 7342327039dfc750934f3ce7ff0bdb6bc585151c -Author: Albert Astals Cid -Date: Wed Jan 17 22:33:42 2018 +0100 - - Form.h: include time.h for time_t - - poppler/Form.h | 2 ++ - 1 file changed, 2 insertions(+) - -commit a89e7474fcd9e7e6dd1330c585130346aa862598 -Author: suzuki toshiya -Date: Wed Jan 17 00:22:55 2018 +0100 - - Enable building all libs as static libs - - if the correct switch is used - - cpp/CMakeLists.txt | 2 +- - glib/CMakeLists.txt | 4 ++-- - qt5/src/CMakeLists.txt | 2 +- - 3 files changed, 4 insertions(+), 4 deletions(-) - -commit 7f550e88d86482adcfab6e054ff14588b32b692a -Author: Albert Astals Cid -Date: Sun Jan 14 20:51:19 2018 +0100 - - Remove declare but unused Object instances - - poppler/Annot.cc | 36 ------------------------------------ - poppler/CairoFontEngine.cc | 2 -- - poppler/Catalog.cc | 1 - - poppler/Form.cc | 2 +- - poppler/Lexer.cc | 1 - - poppler/Link.cc | 2 -- - poppler/PDFDoc.cc | 1 - - poppler/SplashOutputDev.cc | 2 -- - poppler/XRef.cc | 1 - - qt5/src/ArthurOutputDev.cc | 1 - - utils/JSInfo.cc | 1 - - utils/pdfinfo.cc | 1 - - utils/pdfseparate.cc | 1 - - 13 files changed, 1 insertion(+), 51 deletions(-) - -commit 4b237953b187f38c90b9a747f587cbc277db6d45 -Author: Albert Astals Cid -Date: Sun Jan 14 20:17:56 2018 +0100 - - pdfsig: Remove "int i = 0;" variable that was shadowing pevious i - - And making us access the wrong sig_widgets element - - utils/pdfsig.cc | 1 - - 1 file changed, 1 deletion(-) - -commit 08f2cddf18b6ccdc13861b52821cbbf2d3e48472 -Author: Albert Astals Cid -Date: Thu Jan 11 19:38:29 2018 +0100 - - GfxFunctionShading::parse: Fix abort in malformed document - - Bug #104581 - - poppler/GfxState.cc | 32 ++++++++++++++++++++++---------- - 1 file changed, 22 insertions(+), 10 deletions(-) - -commit 10831921281f75b4b2c05ab85f4093331788e6a8 -Author: Albert Astals Cid -Date: Thu Jan 11 00:27:50 2018 +0100 - - GfxGouraudTriangleShading::parse: Don't abort on malformed documents - - Bug #104567 - - poppler/GfxState.cc | 18 ++++++++++++------ - 1 file changed, 12 insertions(+), 6 deletions(-) - -commit a59f61641fcb36859b625749afb4561557e419f6 -Author: Albert Astals Cid -Date: Wed Jan 10 23:24:19 2018 +0100 - - PDFDoc::setup: Fail early if base stream length is 0 - - Bug #103552 - - poppler/PDFDoc.cc | 9 ++++++++- - 1 file changed, 8 insertions(+), 1 deletion(-) - -commit 00c1566e8cc0dacd899ec6dd267265f4b714eae4 -Author: Albert Astals Cid -Date: Wed Jan 10 00:49:51 2018 +0100 - - UnicodeMapFuncs: Move implementation to .cpp - - With that the last warning i got on poppler core is gone \o/ - - CMakeLists.txt | 1 + - poppler/UnicodeMapFuncs.cc | 88 - ++++++++++++++++++++++++++++++++++++++++++++++ - poppler/UnicodeMapFuncs.h | 64 +++------------------------------ - 3 files changed, 93 insertions(+), 60 deletions(-) - -commit bf6d79b5c6b5bdcc0d79b4eebd85840e8f2e30ef -Author: Albert Astals Cid -Date: Wed Jan 10 00:49:33 2018 +0100 - - Forgot C for last commit - - poppler/UTF.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit ebf33c2b0c66c456683c189af1b297fe24adcf9d -Author: Albert Astals Cid -Date: Wed Jan 10 00:40:38 2018 +0100 - - utf16CountUtf8Bytes: initialize codepoint to 0 - - Was tired of seeing the warning - - I actually think the code is a little bit fishy for invalid values, - but since we only use it for win32 builds i'm not spending much more - time looking at it. - - poppler/UTF.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 43ad7071aa126d3b6754421b544e114d87fdd82a -Author: Albert Astals Cid -Date: Tue Jan 9 23:41:01 2018 +0100 - - qt5: Implement operator= for PageTransition - - qt5/src/poppler-page-transition.cc | 10 ++++++++++ - qt5/src/poppler-page-transition.h | 5 ++++- - 2 files changed, 14 insertions(+), 1 deletion(-) - -commit c2711874a4afc00448c21e86fdaf0b7aec40b623 -Author: Albert Astals Cid -Date: Tue Jan 9 19:47:29 2018 +0100 - - Fix another clazy rule-of-three warning - - We can just use the default copy assignemnt and constructor for Parent - - poppler/StructTreeRoot.h | 6 ++---- - 1 file changed, 2 insertions(+), 4 deletions(-) - -commit 30ccee028213efcf3d3a103ae6003bdcd15e1126 -Author: Albert Astals Cid -Date: Tue Jan 9 19:42:53 2018 +0100 - - Fix more Wmissing-field-initializer - - by using the default initializer - - goo/gfile.cc | 6 +++--- - poppler/GlobalParamsWin.cc | 4 ++-- - 2 files changed, 5 insertions(+), 5 deletions(-) - -commit ef4e450c921f4373955def51a74ebffd8f7b4599 -Author: Albert Astals Cid -Date: Tue Jan 9 19:36:16 2018 +0100 - - Enable no-missing-field-initializers - - cmake/modules/PopplerMacros.cmake | 2 +- - glib/poppler-structure-element.cc | 29 +++++++++++++++-------------- - poppler/GfxFont.cc | 4 ++-- - poppler/JBIG2Stream.cc | 20 ++++++++++---------- - test/gtk-test.cc | 2 +- - test/pdf-fullrewrite.cc | 2 +- - utils/pdfdetach.cc | 3 ++- - utils/pdffonts.cc | 4 ++-- - utils/pdfimages.cc | 4 ++-- - utils/pdfinfo.cc | 4 ++-- - utils/pdfseparate.cc | 4 ++-- - utils/pdfsig.cc | 4 ++-- - utils/pdftocairo.cc | 4 ++-- - utils/pdftohtml.cc | 4 ++-- - utils/pdftoppm.cc | 4 ++-- - utils/pdftops.cc | 4 ++-- - utils/pdftotext.cc | 4 ++-- - utils/pdfunite.cc | 4 ++-- - 18 files changed, 54 insertions(+), 52 deletions(-) - -commit efd2205a0bc9e838fd2184c329f8370aa292c346 -Author: suzuki toshiya -Date: Tue Jan 9 00:03:59 2018 +0100 - - add "--owner root:0 --group root:0" options to tar command in - dist target - - Because git-archive always uses root:root in the generated tarball, - the source tarballs (since 0.60.0) have 2 uid/gids in it. - "root:root" by git-archive, and normal users/group by normal tar. - For detail, please find the analysis at:: - https://lists.freedesktop.org/archives/poppler/2017-December/012737.html - - Bug #104398 - - CMakeLists.txt | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit cbd864b74fe368c1172974c7040c67ddfbc52cf6 -Author: Albert Astals Cid -Date: Mon Jan 8 23:48:57 2018 +0100 - - Fix abort in Gfx::opBeginMarkedContent if args[1] is not a name - - Bug #104468 - - poppler/Gfx.cc | 23 ++++++++++++----------- - 1 file changed, 12 insertions(+), 11 deletions(-) - -commit 1aaf621f511ca4c235cb30a5ddbf050acd30fe91 -Author: Ben Timby -Date: Mon Jan 8 23:42:40 2018 +0100 - - Check return code of getChar(), abort reading on error. - - Bug #104502 - - poppler/PDFDoc.cc | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -commit ad7f6acd3c643b5bc0c9b7f91616f678b178a041 -Author: Albert Astals Cid -Date: Mon Jan 8 23:40:25 2018 +0100 - - (C) of last commit - - poppler/Lexer.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 582153b68e076c0f2ae71392f7553181c466e849 -Author: Albert Astals Cid -Date: Mon Jan 8 23:34:13 2018 +0100 - - Lexer: Check curStr is actually a Stream before doing Stream - operations - - Bug #104518 - - poppler/Lexer.cc | 14 +++++++++----- - 1 file changed, 9 insertions(+), 5 deletions(-) - -commit dea6e03352084361e7c89cff7adaa53110c4e91a -Author: Albert Astals Cid -Date: Mon Jan 8 23:25:39 2018 +0100 - - Fix new Object API porting bug - - When doing the XRef::readXRefTable workaround of moving entries[1] to - entries[0] set the entries[1] object back to null - - Bug #104517 - - poppler/XRef.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 4c9e1b66725051cd4726baf19d891c2d9c710868 -Author: Albert Astals Cid -Date: Mon Jan 8 23:09:13 2018 +0100 - - A few more nullptr - - poppler/Link.h | 2 +- - poppler/Object.h | 4 ++-- - poppler/OutputDev.h | 2 +- - 3 files changed, 4 insertions(+), 4 deletions(-) - -commit e428033c2d7efbbbf89bb2f84c8998521ac7ef8e -Author: Albert Astals Cid -Date: Mon Jan 8 22:55:00 2018 +0100 - - Run clang-tidy with modernize nullptr - - Also add two enum values in the qt5 frontend to representate no flags - Also mark glib/gtk/cairo system includes so that gcc doesn't report - the issues in those headers - - cmake/modules/PopplerMacros.cmake | 2 +- - cpp/poppler-document.cpp | 50 +- - cpp/poppler-image.cpp | 20 +- - cpp/poppler-page.cpp | 8 +- - cpp/poppler-private.cpp | 2 +- - cpp/poppler-toc.cpp | 4 +- - cpp/tests/poppler-dump.cpp | 2 +- - cpp/tests/poppler-render.cpp | 2 +- - fofi/FoFiBase.cc | 10 +- - fofi/FoFiEncodings.cc | 396 +- - fofi/FoFiIdentifier.cc | 2 +- - fofi/FoFiTrueType.cc | 30 +- - fofi/FoFiType1.cc | 18 +- - fofi/FoFiType1C.cc | 28 +- - glib/CMakeLists.txt | 4 + - glib/demo/info.cc | 12 +- - glib/poppler-action.cc | 54 +- - glib/poppler-annot.cc | 64 +- - glib/poppler-attachment.cc | 12 +- - glib/poppler-cached-file-loader.cc | 16 +- - glib/poppler-document.cc | 246 +- - glib/poppler-form-field.cc | 30 +- - glib/poppler-input-stream.cc | 14 +- - glib/poppler-layer.cc | 16 +- - glib/poppler-media.cc | 10 +- - glib/poppler-movie.cc | 6 +- - glib/poppler-page.cc | 124 +- - glib/poppler-structure-element.cc | 200 +- - glib/poppler.cc | 8 +- - goo/GooHash.cc | 24 +- - goo/GooString.cc | 16 +- - goo/GooTimer.cc | 6 +- - goo/PNGWriter.cc | 6 +- - goo/TiffWriter.cc | 18 +- - goo/gfile.cc | 26 +- - goo/gmem.cc | 18 +- - goo/grandom.cc | 4 +- - goo/gstrtod.cc | 10 +- - poppler/Annot.cc | 300 +- - poppler/Array.cc | 2 +- - poppler/BuiltinFont.cc | 2 +- - poppler/BuiltinFontTables.cc | 8374 - ++++++++++++++++++------------------ - poppler/CMap.cc | 22 +- - poppler/CairoFontEngine.cc | 42 +- - poppler/CairoOutputDev.cc | 108 +- - poppler/CairoRescaleBox.cc | 6 +- - poppler/Catalog.cc | 76 +- - poppler/CharCodeToUnicode.cc | 28 +- - poppler/CurlCachedFile.cc | 6 +- - poppler/DCTStream.cc | 16 +- - poppler/DateInfo.cc | 4 +- - poppler/Decrypt.cc | 4 +- - poppler/Dict.cc | 8 +- - poppler/Error.cc | 4 +- - poppler/FileSpec.cc | 18 +- - poppler/FontEncodingTables.cc | 980 ++--- - poppler/FontInfo.cc | 22 +- - poppler/Form.cc | 70 +- - poppler/Function.cc | 26 +- - poppler/Gfx.cc | 146 +- - poppler/GfxFont.cc | 134 +- - poppler/GfxState.cc | 346 +- - poppler/GlobalParams.cc | 76 +- - poppler/GlobalParamsWin.cc | 170 +- - poppler/Hints.cc | 18 +- - poppler/JArithmeticDecoder.cc | 2 +- - poppler/JBIG2Stream.cc | 202 +- - poppler/JPEG2000Stream.cc | 22 +- - poppler/Lexer.cc | 8 +- - poppler/Linearization.cc | 16 +- - poppler/Link.cc | 52 +- - poppler/MarkedContentOutputDev.cc | 22 +- - poppler/Movie.cc | 2 +- - poppler/NameToCharCode.cc | 4 +- - poppler/NameToUnicodeTable.h | 4 +- - poppler/OptionalContent.cc | 28 +- - poppler/Outline.cc | 10 +- - poppler/OutputDev.cc | 6 +- - poppler/PDFDoc.cc | 84 +- - poppler/PSOutputDev.cc | 162 +- - poppler/PSOutputDev.h | 2 +- - poppler/Page.cc | 10 +- - poppler/PageLabelInfo.cc | 2 +- - poppler/Parser.cc | 10 +- - poppler/PopplerCache.cc | 4 +- - poppler/Rendition.cc | 4 +- - poppler/SecurityHandler.cc | 26 +- - poppler/SignatureHandler.cc | 60 +- - poppler/Sound.cc | 10 +- - poppler/SplashOutputDev.cc | 186 +- - poppler/StdinCachedFile.cc | 2 +- - poppler/StdinPDFDocBuilder.cc | 2 +- - poppler/Stream.cc | 70 +- - poppler/StructElement.cc | 72 +- - poppler/StructElement.h | 30 +- - poppler/StructTreeRoot.cc | 4 +- - poppler/StructTreeRoot.h | 2 +- - poppler/TextOutputDev.cc | 224 +- - poppler/UTF.cc | 6 +- - poppler/UnicodeMap.cc | 18 +- - poppler/UnicodeTypeTable.cc | 938 ++-- - poppler/XRef.cc | 38 +- - qt5/demos/abstractinfodock.h | 2 +- - qt5/demos/documentobserver.cpp | 2 +- - qt5/demos/embeddedfiles.h | 2 +- - qt5/demos/fonts.h | 2 +- - qt5/demos/info.h | 2 +- - qt5/demos/metadata.h | 2 +- - qt5/demos/navigationtoolbar.h | 2 +- - qt5/demos/optcontent.cpp | 2 +- - qt5/demos/optcontent.h | 2 +- - qt5/demos/pageview.h | 2 +- - qt5/demos/permissions.h | 2 +- - qt5/demos/thumbnails.h | 2 +- - qt5/demos/toc.cpp | 4 +- - qt5/demos/toc.h | 2 +- - qt5/demos/viewer.cpp | 4 +- - qt5/src/ArthurOutputDev.cc | 2 +- - qt5/src/poppler-annotation.cc | 60 +- - qt5/src/poppler-base-converter.cc | 8 +- - qt5/src/poppler-document.cc | 18 +- - qt5/src/poppler-embeddedfile.cc | 14 +- - qt5/src/poppler-form.cc | 6 +- - qt5/src/poppler-link.cc | 4 +- - qt5/src/poppler-media.cc | 2 +- - qt5/src/poppler-movie.cc | 2 +- - qt5/src/poppler-optcontent.cc | 16 +- - qt5/src/poppler-optcontent.h | 2 +- - qt5/src/poppler-page.cc | 36 +- - qt5/src/poppler-pdf-converter.cc | 2 +- - qt5/src/poppler-private.cc | 16 +- - qt5/src/poppler-private.h | 2 +- - qt5/src/poppler-ps-converter.cc | 10 +- - qt5/src/poppler-qt5.h | 8 +- - qt5/src/poppler-sound.cc | 2 +- - qt5/tests/check_lexer.cpp | 2 +- - qt5/tests/check_metadata.cpp | 8 +- - qt5/tests/check_search.cpp | 2 +- - qt5/tests/stress-threads-qt5.cpp | 12 +- - qt5/tests/test-poppler-qt5.cpp | 2 +- - splash/Splash.cc | 110 +- - splash/SplashBitmap.cc | 18 +- - splash/SplashClip.cc | 12 +- - splash/SplashFTFont.cc | 8 +- - splash/SplashFTFontEngine.cc | 8 +- - splash/SplashFTFontFile.cc | 12 +- - splash/SplashFont.cc | 8 +- - splash/SplashFontEngine.cc | 22 +- - splash/SplashFontFile.cc | 4 +- - splash/SplashPath.cc | 8 +- - splash/SplashScreen.cc | 4 +- - splash/SplashState.cc | 22 +- - splash/SplashXPath.cc | 8 +- - splash/SplashXPathScanner.cc | 4 +- - test/CMakeLists.txt | 5 +- - test/gtk-test.cc | 28 +- - test/pdf-fullrewrite.cc | 14 +- - test/pdf-inspector.cc | 22 +- - test/perf-test.cc | 66 +- - utils/HtmlFonts.cc | 8 +- - utils/HtmlLinks.cc | 6 +- - utils/HtmlOutputDev.cc | 94 +- - utils/ImageOutputDev.cc | 10 +- - utils/JSInfo.cc | 4 +- - utils/Win32Console.cc | 2 +- - utils/parseargs.cc | 2 +- - utils/pdfdetach.cc | 8 +- - utils/pdffonts.cc | 6 +- - utils/pdfimages.cc | 8 +- - utils/pdfinfo.cc | 6 +- - utils/pdfseparate.cc | 14 +- - utils/pdfsig.cc | 12 +- - utils/pdftocairo-win32.cc | 22 +- - utils/pdftocairo.cc | 34 +- - utils/pdftohtml.cc | 36 +- - utils/pdftoppm.cc | 20 +- - utils/pdftops.cc | 8 +- - utils/pdftotext.cc | 10 +- - utils/pdfunite.cc | 16 +- - 179 files changed, 7929 insertions(+), 7920 deletions(-) - -commit 2e47887616155dee566083e1aac9adab69aa4386 -Author: Albert Astals Cid -Date: Mon Jan 8 22:14:34 2018 +0100 - - Seems we don't need to set this cmake policies to OLD - - builds fine without warnings - - cmake/modules/PopplerDefaults.cmake | 8 -------- - 1 file changed, 8 deletions(-) - -commit 1ae5d91467663576a5d11add69fa72a2d108f0ad -Author: Albert Astals Cid -Date: Mon Jan 8 18:45:43 2018 +0100 - - Remove useless return in a void function - - poppler/SplashOutputDev.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 8794789a72f845b009656e6d7ae6a00b709e09bc -Author: Albert Astals Cid -Date: Mon Jan 8 18:07:38 2018 +0100 - - Delete lots of copy constructors and copy assignment operators - - Fixes rule-of-three and copyable-polymorphic warnings reported - by clazy. - - The default copy constructor and copy assignment operator are - only valid for simple classes so we delete them (i.e. make then - not exist) - when we have either a virtual class or a destructor, the code still - compiles - so this doesn't fix any bug, it is more a protection for when you - think you - can copy a class and don't realize the default copy constrcutor is - not doing - what you want and you get crashes. Hopefully this helps us in the - future :) - - cpp/poppler-document-private.h | 4 ++++ - cpp/poppler-embedded-file-private.h | 4 ++++ - cpp/poppler-global.cpp | 3 +++ - cpp/poppler-image-private.h | 4 ++++ - cpp/poppler-image.cpp | 4 +++- - cpp/poppler-page-private.h | 4 ++++ - cpp/poppler-toc-private.h | 4 ++++ - fofi/FoFiBase.h | 16 ++++++++++++++ - fofi/FoFiIdentifier.cc | 4 ++++ - goo/GooMutex.h | 5 ++++- - goo/ImgWriter.h | 6 +++++- - goo/gfile.h | 5 ++++- - poppler/Annot.h | 38 - +++++++++++++++++++++++++++++++++- - poppler/Array.h | 5 ++++- - poppler/BuiltinFont.h | 18 ++++++++++++++++ - poppler/CMap.h | 8 ++++++- - poppler/CachedFile.h | 9 +++++++- - poppler/CairoFontEngine.h | 6 +++++- - poppler/CairoOutputDev.h | 4 ++++ - poppler/CairoRescaleBox.h | 4 ++++ - poppler/Catalog.h | 9 +++++++- - poppler/CharCodeToUnicode.h | 8 ++++++- - poppler/Dict.h | 5 ++++- - poppler/FileSpec.h | 8 ++++++- - poppler/FontInfo.h | 4 +++- - poppler/Form.h | 8 ++++++- - poppler/Function.h | 5 ++++- - poppler/Gfx.cc | 5 ++++- - poppler/Gfx.h | 8 ++++++- - poppler/GfxFont.h | 11 +++++++++- - poppler/GfxState.cc | 2 ++ - poppler/GfxState.h | 26 ++++++++++++++++++++++- - poppler/GlobalParams.cc | 6 +++++- - poppler/GlobalParams.h | 5 ++++- - poppler/Hints.h | 5 ++++- - poppler/JArithmeticDecoder.h | 18 ++++++++++++++++ - poppler/JBIG2Stream.cc | 4 +++- - poppler/Lexer.h | 5 ++++- - poppler/Link.h | 10 +++++++++ - poppler/MarkedContentOutputDev.h | 4 ++++ - poppler/Movie.h | 3 ++- - poppler/NameToCharCode.h | 17 +++++++++++++++ - poppler/OptionalContent.h | 11 +++++++++- - poppler/Outline.h | 8 ++++++- - poppler/PDFDoc.h | 5 ++++- - poppler/PDFDocBuilder.h | 8 +++++-- - poppler/PDFDocFactory.h | 5 ++++- - poppler/PSOutputDev.cc | 7 ++++++- - poppler/Page.h | 5 ++++- - poppler/PageLabelInfo.h | 6 +++++- - poppler/Parser.h | 5 ++++- - poppler/PopplerCache.h | 18 +++++++++++++--- - poppler/Rendition.h | 3 ++- - poppler/SecurityHandler.cc | 5 ++++- - poppler/SecurityHandler.h | 5 ++++- - poppler/Sound.h | 5 ++++- - poppler/SplashOutputDev.cc | 4 +++- - poppler/Stream.h | 14 ++++++++++++- - poppler/StructElement.h | 5 ++++- - poppler/StructTreeRoot.h | 4 ++++ - poppler/TextOutputDev.cc | 2 ++ - poppler/TextOutputDev.h | 29 +++++++++++++++++++++++++- - poppler/UnicodeMap.h | 7 +++++++ - poppler/XRef.cc | 5 ++++- - poppler/XRef.h | 9 +++++++- - qt5/demos/documentobserver.h | 3 +++ - qt5/src/poppler-annotation-private.h | 5 ++++- - qt5/src/poppler-annotation.cc | 14 ++++++++++++- - qt5/src/poppler-converter-private.h | 5 ++++- - qt5/src/poppler-embeddedfile-private.h | 5 ++++- - qt5/src/poppler-link-private.h | 5 ++++- - qt5/src/poppler-media.cc | 5 ++++- - qt5/src/poppler-movie.cc | 5 ++++- - qt5/src/poppler-optcontent-private.h | 5 ++++- - qt5/src/poppler-page-transition.cc | 3 +++ - qt5/src/poppler-page-transition.h | 3 ++- - qt5/src/poppler-private.h | 18 +++++++--------- - qt5/src/poppler-sound.cc | 5 ++++- - splash/Splash.h | 5 ++++- - splash/SplashBitmap.h | 5 ++++- - splash/SplashClip.h | 5 ++++- - splash/SplashFTFontEngine.h | 5 ++++- - splash/SplashFont.h | 5 ++++- - splash/SplashFontEngine.h | 5 ++++- - splash/SplashFontFile.h | 8 ++++++- - splash/SplashFontFileID.h | 16 ++++++++++++++ - splash/SplashPath.h | 17 +++++++++++++++ - splash/SplashPattern.h | 4 ++++ - splash/SplashScreen.h | 5 ++++- - splash/SplashState.h | 4 ++++ - splash/SplashXPath.h | 4 ++++ - splash/SplashXPathScanner.h | 4 ++++ - test/perf-test.cc | 4 ++++ - utils/HtmlFonts.h | 4 +++- - utils/HtmlLinks.h | 5 ++++- - utils/HtmlOutputDev.cc | 4 +++- - utils/HtmlOutputDev.h | 13 ++++++++++-- - 97 files changed, 626 insertions(+), 83 deletions(-) - -commit 4c7814342806b61fedbb2d45ce74462f9dbc20bc -Author: Albert Astals Cid -Date: Thu Jan 4 23:12:54 2018 +0100 - - Fix assert on malformed documents - - Bug #104354 - - poppler/GfxState.cc | 23 ++++++++++++----------- - 1 file changed, 12 insertions(+), 11 deletions(-) - -commit 6233710068e8406cb44741bdc74d1a0e2582e5cf -Author: Adrian Johnson -Date: Thu Jan 4 15:41:11 2018 +1030 - - Remove error for wrong child type for tagged pdf - - It is harmless and as a few PDFs do this it just adds noise to - the output. - - Bug #103587 - - poppler/StructTreeRoot.cc | 3 --- - 1 file changed, 3 deletions(-) - -commit 321538259a9c79a99ce846a6ea2d94dd7fa56f61 -Author: Adrian Johnson -Date: Sun Nov 26 20:43:15 2017 +1030 - - Fix some bugs in StructTreeRoot parsing of parent tree - - - Add support for parsing child nodes in the number tree - - Number tree keys do not have to be consecutive numbers. Use - map instead of vector for parentTree. - - Due to performance impact of iterating a map instead of - vector in parentTreeAdd, add a reverse mapping from Ref - to parentTree. - - Add mcid parameter to findParentElement() to enable finding - the parent when there are multiple MCIDs on the same page. - - Move RefCompare from pdfinfo.cc to Object.h so it can be - used by other files. - - Bug #103912 - - poppler/Object.h | 8 +++ - poppler/StructElement.cc | 2 +- - poppler/StructTreeRoot.cc | 121 - +++++++++++++++++++++++++++------------------- - poppler/StructTreeRoot.h | 14 ++++-- - utils/pdfinfo.cc | 6 --- - 5 files changed, 91 insertions(+), 60 deletions(-) - -commit c4cbb4fd5e062544bf34109140266d0b027a512b -Author: Adrian Johnson -Date: Mon Oct 30 19:21:41 2017 +1030 - - Fix pdfimages with flate encoded inline images - - - Remove advance strem pos to end of image code from listImage(). - getInlineImageLength() already does this. - - - Always EmbedStream in getInlineImageLength() to get size of - stored image. - The type of encoding does not matter. - - - Use same record EmbeddeStream code for all image types in - writeImage() - - - Fix some memory leaks - - Bug #103446 - - utils/ImageOutputDev.cc | 54 - ++++++++++++------------------------------------- - 1 file changed, 13 insertions(+), 41 deletions(-) - -commit f87238296f7a81f131f2525c4ea3a26d14e8a7ff -Author: Adrian Johnson -Date: Wed Jan 3 08:36:58 2018 +1030 - - Fix EmbedStream replay - - Bug #103446 - - poppler/Stream.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit e70990c5b2d95a9099b8f4a1c69ca9e5b2a559a4 -Author: Albert Astals Cid -Date: Wed Jan 3 00:46:42 2018 +0100 - - qt5: make the check for rendition a bit earlier - - qt5/src/poppler-annotation.cc | 9 +++------ - 1 file changed, 3 insertions(+), 6 deletions(-) - -commit 9f08b62ea283ea66b35cfc6dab3e7f45bc4170b9 -Author: Albert Astals Cid -Date: Wed Jan 3 00:32:23 2018 +0100 - - qt5: Do not assume all Screen annotation actions are Renditions - - Fixes KDE bug #388175 - - qt5/src/poppler-annotation.cc | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -commit 15272137daf186114d8dfeb6898d8d90b3ccfd91 -Author: Albert Astals Cid -Date: Wed Jan 3 00:14:13 2018 +0100 - - Fix undefined sanitizer warning about qsort - - Said the first parameter is defined by spec to not be null and - we where - passing null when there's no blocks, so add an if - - poppler/TextOutputDev.cc | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -commit 066e6a3e0487f9e011f7b8d1ccff62def8db1e6c -Author: Albert Astals Cid -Date: Wed Jan 3 00:15:14 2018 +0100 - - Welcome 2018 - - poppler/poppler-config.h.cmake | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit c9958ecb87de34b923a17521c8bb149569bacca8 -Author: Oliver Sander -Date: Sat Oct 28 21:16:55 2017 +0200 - - ArthurOutputDev: Rudimentary support for transparency groups - - This patch adds minimal support for transparency groups. With it, - the Arthur backend can render highlight annotations. - - qt5/src/ArthurOutputDev.cc | 46 - ++++++++++++++++++++++++++++++++++++++++++++++ - qt5/src/ArthurOutputDev.h | 15 +++++++++++++++ - 2 files changed, 61 insertions(+) - -commit bda1d76fc3c9cf69b2b67d94278e136ac50c3e3b -Author: Oliver Sander -Date: Fri Dec 29 00:14:44 2017 +0100 - - ArthurOutputDev: Replace the QPainter by a stack of QPainters - - This patch lays some groundwork for the support of transparency - groups. Transparency groups temporarily create new painters. - These get painted upon, and then the resulting new painting - will be drawn at once onto the original PaintDevice. To implement - this, we need a stack of painters rather than a single one. - The first painter on the stack is the original one. Opening a - transparency group pushes a new painter onto the stack, and - all drawing operations always go to the painter on the top - of the stack. - - qt5/src/ArthurOutputDev.cc | 88 - +++++++++++++++++++++++----------------------- - qt5/src/ArthurOutputDev.h | 7 +++- - 2 files changed, 50 insertions(+), 45 deletions(-) - -commit 71b04b79154a8edd27e73a2360d0c3a901246d8c -Author: Oliver Sander -Date: Fri Aug 11 22:23:46 2017 +0200 - - ArthurOutputDev: Implement updateBlendMode - - qt5/src/ArthurOutputDev.cc | 52 - ++++++++++++++++++++++++++++++++++++++++++++++ - qt5/src/ArthurOutputDev.h | 1 + - 2 files changed, 53 insertions(+) - -commit 9b981f9123fe8c3c8662015de341cff76aa28b07 -Author: Thomas Freitag -Date: Thu Dec 28 00:55:39 2017 +0100 - - FoFiTrueType::readPostTable() from xpdf 4.00 - - Bug #102880 - - fofi/FoFiTrueType.cc | 30 +++++++++++------------------- - 1 file changed, 11 insertions(+), 19 deletions(-) - -commit 00fc829352716b04d9ab59552daefffed20e2852 -Author: Thomas Freitag -Date: Thu Dec 28 00:55:00 2017 +0100 - - Break loop if recursionLimit is reached - - poppler/Parser.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit e41ce80a27b735df8e2ccc17e15adea012543712 -Author: Albert Astals Cid -Date: Wed Dec 27 00:18:47 2017 +0100 - - OutlineItem: Store parent and refNum - - This way when opening our children we make sure they are not also our - parent (i.e. there's a loop) - - Fixes bug #102914 - - poppler/Outline.cc | 31 +++++++++++++++++-------------- - poppler/Outline.h | 6 ++++-- - 2 files changed, 21 insertions(+), 16 deletions(-) - -commit ffefe1c038de555ed39c3d9eca6ef79ac1f97b86 -Author: Albert Astals Cid -Date: Tue Dec 26 23:57:21 2017 +0100 - - qt5: demo: don't crash if page is malformed - - qt5/demos/pageview.cpp | 7 +++++++ - 1 file changed, 7 insertions(+) - -commit 81461f4cddf6b8705e6cf24d20084fc71891bb91 -Author: Albert Astals Cid -Date: Sat Dec 23 11:20:43 2017 +0100 - - Remove another LCMS1 old ifdef - - utils/pdftocairo.cc | 9 +-------- - 1 file changed, 1 insertion(+), 8 deletions(-) - -commit 2556ec0705373a01feffe3ca0cd7147af2fdd2c9 -Author: suzuki toshiya -Date: Sat Dec 23 11:19:17 2017 +0100 - - Remove libcms1 crumbs from pdftocairo and qt5 frontend - - Bug #104358 - - qt5/src/poppler-document.cc | 5 +---- - utils/pdftocairo.cc | 6 +----- - 2 files changed, 2 insertions(+), 9 deletions(-) - -commit 48de59a92a5f88d10a1a53abf7f15f578104e1ed -Author: Carlos Garcia Campos -Date: Thu Dec 21 13:25:37 2017 +0100 - - regtest: Add an option to exit after n failures - - Note that running jobs are not cancelled when max failures is reached, - so we usually end up getting more failures than the maximum. - - regtest/HTMLReport.py | 2 ++ - regtest/Printer.py | 15 ++++++++++++++ - regtest/TestRun.py | 46 - +++++++++++++++++++++++++++++++++++++++++-- - regtest/commands/run-tests.py | 8 +++++++- - 4 files changed, 68 insertions(+), 3 deletions(-) - -commit 79a096a48c735ac301ae4d7439bddf630a559a96 -Author: Vincent Le Garrec -Date: Thu Dec 21 00:57:48 2017 +0100 - - Fix index out of bounds undefined behaviour in PSTokenizer - - Bug #103583 - - poppler/PSTokenizer.cc | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -commit c138ec620b5084348dc892bf9fd8228ed098970a -Author: Oliver Sander -Date: Tue Nov 28 16:40:40 2017 +0100 - - Arthur: 'clip' should intersect new and old clipping path - - Previously, the 'clip' method of the ArthurOutputDev class - replaced the current clipping path with the one given in - the GfxState variable. However, the expected behavior is - to intersect the new path with the old one, and use the - result as the new clipping path. - - qt5/src/ArthurOutputDev.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 7b434a7ad9333a3b2250d636a517c58d9a12bca2 -Author: Pekka Vuorela -Date: Fri Dec 15 16:56:20 2017 +0200 - - Honor configuration for building glibc copy of strtok_r - - config.h didn't get included and HAVE_STRTOK_R was never defined. - Now getting via glibc.h. - - goo/glibc_strtok_r.cc | 3 +++ - 1 file changed, 3 insertions(+) - -commit c2037af18095bb42dd43bafb42650df469e7e5ef -Author: Oliver Sander -Date: Wed Oct 18 23:23:50 2017 +0200 - - Don't let ArthurOutputDev be friend of SplashPath anymore - - Now that ArthurOutputDev uses Qt glyph rendering, there is - not need for it to be friend of SplashPath anymore. - - splash/SplashPath.h | 2 -- - 1 file changed, 2 deletions(-) - -commit 33c3b391dfc3c10b1b63b0b82df4dcb47b71c53a -Author: Fredrik Fornwall -Date: Tue Dec 19 00:37:44 2017 +0100 - - PDFDoc: use %c instead of \x to output binary - - Bug #103873 - - poppler/PDFDoc.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 15dd674a384c80a8f3d4f0647f6617ba72d9bd26 -Author: Albert Astals Cid -Date: Thu Dec 14 15:11:31 2017 +0100 - - Remove unused FindLIBOPENJPEG.cmake - - cmake/modules/FindLIBOPENJPEG.cmake | 64 - ------------------------------------- - 1 file changed, 64 deletions(-) - -commit 65dcc0b9c16c80e6718ada060d7ac0e2c0e39abf -Author: Albert Astals Cid -Date: Wed Dec 13 10:40:50 2017 +0100 - - Reset lastAbortCheck on updateLevel reset - - Otherwise we get to a point that the - if (updateLevel - lastAbortCheck > 10) { - branch is never executed because updateLevel got to 20000 but - lastAbortCheck is still at the last value - - poppler/Gfx.cc | 2 ++ - 1 file changed, 2 insertions(+) - -commit 3690e96154b226025b465ac2260cf1ff2d269abd -Author: Albert Astals Cid -Date: Wed Dec 13 00:07:20 2017 +0100 - - Remove the extern C from glib.h - - Apparently this fixes build with MSVC - - Bug #103621 - - goo/glibc.h | 5 +---- - 1 file changed, 1 insertion(+), 4 deletions(-) - -commit f5706275121409887b0e486b896b48cbcccb766a -Author: Adrian Johnson -Date: Sun Oct 22 10:26:55 2017 +1030 - - cairo: limit image size when printing - - 1 bpp image formats can have very large sizes. Even if the maximum - cairo image size is not exceeded, it still uses a huge amount - of memory - and is very slow. - - This limits the image size when printing to 8192x8192 which is - sufficient for 300ppi at A2 size. Cairo >= 1.5.10 scales mime images - to the same dimensions as the cairo image, so the original mime image - can still be embedded. - - Bug 103399 - - poppler/CairoOutputDev.cc | 35 ++++++++++++++++++++++++++++++++--- - 1 file changed, 32 insertions(+), 3 deletions(-) - -commit 3f13dd5f04984be1912b4537ffbfacd892750915 -Author: Adrian Johnson -Date: Sun Oct 22 09:37:01 2017 +1030 - - cairo: support embedding CCITT image data - - Bug 103399 - - poppler/CairoOutputDev.cc | 46 - +++++++++++++++++++++++++++++++++++++++++++--- - poppler/CairoOutputDev.h | 5 ++++- - poppler/Stream.cc | 14 ++++++++++---- - poppler/Stream.h | 6 +++++- - 4 files changed, 62 insertions(+), 9 deletions(-) - -commit 3263fa4439e1a09dae6a0332a90b983d25bc218d -Author: Thomas Freitag -Date: Tue Dec 12 00:26:37 2017 +0100 - - windows version for Error out on save if file has changed since we - opened it - - goo/gfile.cc | 14 +++++++++++++- - goo/gfile.h | 6 ++++-- - 2 files changed, 17 insertions(+), 3 deletions(-) - -commit e4ee1392136188fab0005a0bd7b30c6d9a16d97d -Author: Albert Astals Cid -Date: Tue Dec 12 00:24:31 2017 +0100 - - Error out on save if file has changed since we opened it - - In poppler we keep the fd of the file open so the XRef+FileStream can - locate objects. This is good since we save lots of memory for - not having - everything on memory all the time, but that means that when we want to - save we need the file to be exactly the same as it was when we created - the XRef otherwise we're going to be reading from the wrong part - of the - "new" file. - - Bug #103793 - - goo/gfile.cc | 18 +++++++++++++++++- - goo/gfile.h | 10 ++++++++-- - poppler/ErrorCodes.h | 16 ++++++++++++++++ - poppler/PDFDoc.cc | 11 +++++++++++ - 4 files changed, 52 insertions(+), 3 deletions(-) - -commit f10359121568409e6062a82de696fe93be615a53 -Author: Albert Astals Cid -Date: Sun Dec 3 22:41:32 2017 +0100 - - Fix memory leak on error condition - - poppler/Catalog.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 72e0a3a087f160d819f7697a8536bbee12240c7a -Author: Albert Astals Cid -Date: Sun Dec 3 20:25:06 2017 +0100 - - 0.62.0 - - CMakeLists.txt | 6 +++--- - NEWS | 26 ++++++++++++++++++++++++++ - cpp/Doxyfile | 2 +- - qt5/src/CMakeLists.txt | 2 +- - qt5/src/Doxyfile | 2 +- - 5 files changed, 32 insertions(+), 6 deletions(-) - -commit 90958363fd5e8c5e74a889e0c2140c71a0c09eb6 -Author: Albert Astals Cid -Date: Sun Dec 3 20:23:09 2017 +0100 - - Add missing (C) - - poppler/Error.cc | 2 +- - poppler/UTF.cc | 2 +- - poppler/UTF.h | 2 +- - poppler/UnicodeMapFuncs.h | 1 + - utils/JSInfo.cc | 2 +- - utils/pdfdetach.cc | 2 +- - utils/pdffonts.cc | 2 +- - utils/pdfseparate.cc | 1 + - utils/pdfsig.cc | 1 + - utils/pdftohtml.cc | 1 + - utils/pdftotext.cc | 1 + - utils/printencodings.cc | 1 + - 12 files changed, 12 insertions(+), 6 deletions(-) - -commit f007ab6beb2616850488271da5162f4ef0dbe789 -Author: Adrian Johnson -Date: Sat Dec 2 14:13:50 2017 +1030 - - INSTALL: add debug options - - also ensure cmake commands are lowercase to be consistent with our - code style. - - INSTALL | 38 +++++++++++++++++++++++++++++++++----- - 1 file changed, 33 insertions(+), 5 deletions(-) - -commit cef42ac807f4da7ae91be1b6b81b50adb9684975 -Author: Adrian Johnson -Date: Sat Dec 2 14:01:42 2017 +1030 - - Fix UTF test fail - - The buffer size was not large enough. Increase it and add an assert to - check the buffer size. - - qt5/tests/check_utf_conversion.cpp | 13 ++++++++----- - 1 file changed, 8 insertions(+), 5 deletions(-) - -commit fb4c69d270a618bb23791e52f46ec73c86574294 -Author: Albert Astals Cid -Date: Fri Dec 1 23:44:17 2017 +0100 - - Remove the Qt4 frontend - - .gitignore | 2 - - CMakeLists.txt | 17 - - cmake/modules/FindQt4.cmake | 1311 ------- - poppler-qt4.pc.cmake | 12 - - qt4/.gitignore | 4 - - qt4/CMakeLists.txt | 6 - - qt4/demos/.gitignore | 4 - - qt4/demos/CMakeLists.txt | 28 - - qt4/demos/abstractinfodock.cpp | 57 - - qt4/demos/abstractinfodock.h | 48 - - qt4/demos/documentobserver.cpp | 50 - - qt4/demos/documentobserver.h | 50 - - qt4/demos/embeddedfiles.cpp | 82 - - qt4/demos/embeddedfiles.h | 44 - - qt4/demos/fonts.cpp | 72 - - qt4/demos/fonts.h | 43 - - qt4/demos/info.cpp | 72 - - qt4/demos/info.h | 43 - - qt4/demos/main_viewer.cpp | 33 - - qt4/demos/metadata.cpp | 50 - - qt4/demos/metadata.h | 43 - - qt4/demos/navigationtoolbar.cpp | 144 - - qt4/demos/navigationtoolbar.h | 65 - - qt4/demos/optcontent.cpp | 69 - - qt4/demos/optcontent.h | 47 - - qt4/demos/pageview.cpp | 101 - - qt4/demos/pageview.h | 53 - - qt4/demos/permissions.cpp | 66 - - qt4/demos/permissions.h | 43 - - qt4/demos/thumbnails.cpp | 84 - - qt4/demos/thumbnails.h | 48 - - qt4/demos/toc.cpp | 88 - - qt4/demos/toc.h | 43 - - qt4/demos/viewer.cpp | 319 -- - qt4/demos/viewer.h | 73 - - qt4/src/.gitignore | 9 - - qt4/src/ArthurOutputDev.cc | 812 ---- - qt4/src/ArthurOutputDev.h | 170 - - qt4/src/CMakeLists.txt | 54 - - qt4/src/Doxyfile | 1637 --------- - qt4/src/Mainpage.dox | 85 - - qt4/src/poppler-annotation-helper.h | 181 - - qt4/src/poppler-annotation-private.h | 112 - - qt4/src/poppler-annotation.cc | 5089 - -------------------------- - qt4/src/poppler-annotation.h | 1375 ------- - qt4/src/poppler-base-converter.cc | 105 - - qt4/src/poppler-converter-private.h | 49 - - qt4/src/poppler-document.cc | 850 ----- - qt4/src/poppler-embeddedfile-private.h | 42 - - qt4/src/poppler-embeddedfile.cc | 135 - - qt4/src/poppler-export.h | 20 - - qt4/src/poppler-fontinfo.cc | 150 - - qt4/src/poppler-form.cc | 416 --- - qt4/src/poppler-form.h | 343 -- - qt4/src/poppler-link-extractor-private.h | 57 - - qt4/src/poppler-link-extractor.cc | 84 - - qt4/src/poppler-link-private.h | 57 - - qt4/src/poppler-link.cc | 710 ---- - qt4/src/poppler-link.h | 641 ---- - qt4/src/poppler-media.cc | 168 - - qt4/src/poppler-media.h | 100 - - qt4/src/poppler-movie.cc | 110 - - qt4/src/poppler-optcontent-private.h | 124 - - qt4/src/poppler-optcontent.cc | 456 --- - qt4/src/poppler-optcontent.h | 84 - - qt4/src/poppler-page-private.h | 57 - - qt4/src/poppler-page-transition-private.h | 28 - - qt4/src/poppler-page-transition.cc | 101 - - qt4/src/poppler-page-transition.h | 158 - - qt4/src/poppler-page.cc | 810 ---- - qt4/src/poppler-pdf-converter.cc | 115 - - qt4/src/poppler-private.cc | 296 -- - qt4/src/poppler-private.h | 241 -- - qt4/src/poppler-ps-converter.cc | 280 -- - qt4/src/poppler-qiodeviceoutstream-private.h | 47 - - qt4/src/poppler-qiodeviceoutstream.cc | 64 - - qt4/src/poppler-qt4.h | 1990 ---------- - qt4/src/poppler-sound.cc | 132 - - qt4/src/poppler-textbox.cc | 63 - - qt4/tests/.gitignore | 33 - - qt4/tests/CMakeLists.txt | 67 - - qt4/tests/README.unittest | 23 - - qt4/tests/check_actualtext.cpp | 33 - - qt4/tests/check_attachments.cpp | 157 - - qt4/tests/check_dateConversion.cpp | 142 - - qt4/tests/check_fonts.cpp | 248 -- - qt4/tests/check_goostring.cpp | 127 - - qt4/tests/check_lexer.cpp | 107 - - qt4/tests/check_links.cpp | 98 - - qt4/tests/check_metadata.cpp | 275 -- - qt4/tests/check_optcontent.cpp | 446 --- - qt4/tests/check_pagelabelinfo.cpp | 43 - - qt4/tests/check_pagelayout.cpp | 49 - - qt4/tests/check_pagemode.cpp | 73 - - qt4/tests/check_password.cpp | 88 - - qt4/tests/check_permissions.cpp | 44 - - qt4/tests/check_search.cpp | 175 - - qt4/tests/check_strings.cpp | 250 -- - qt4/tests/poppler-attachments.cpp | 39 - - qt4/tests/poppler-fonts.cpp | 89 - - qt4/tests/poppler-forms.cpp | 166 - - qt4/tests/poppler-texts.cpp | 40 - - qt4/tests/stress-poppler-dir.cpp | 67 - - qt4/tests/stress-poppler-qt4.cpp | 74 - - qt4/tests/stress-threads-qt4.cpp | 309 -- - qt4/tests/test-password-qt4.cpp | 136 - - qt4/tests/test-poppler-qt4.cpp | 235 -- - qt4/tests/test-render-to-file.cpp | 69 - - 108 files changed, 25623 deletions(-) - -commit bb0011b74093cfbf5a21b72861ac46a2b8699c0e -Author: Albert Astals Cid -Date: Fri Dec 1 23:37:38 2017 +0100 - - Make the disable for ENABLE_CMS be none - - as it is for ENABLE_LIBOPENJPEG and for ENABLE_DCTDECODER - - CMakeLists.txt | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit 0ea5ad393601f0b1c060268cf1c310b47f928f7b -Author: Albert Astals Cid -Date: Fri Dec 1 23:35:28 2017 +0100 - - Stop supporting openjpeg1, you really want to use openjpeg2 :) - - CMakeLists.txt | 54 ++--------------- - config.h.cmake | 6 -- - poppler/JPEG2000Stream.cc | 145 - ---------------------------------------------- - 3 files changed, 5 insertions(+), 200 deletions(-) - -commit ce8e17e4fa96b7dd639c72818bba5a26c16cc1cb -Author: Albert Astals Cid -Date: Fri Dec 1 23:19:39 2017 +0100 - - Stop supporting lcms1, you really want to use lcms2 :) - - CMakeLists.txt | 36 ++++++------------------------------ - config.h.cmake | 3 --- - poppler/Gfx.cc | 5 ----- - poppler/GfxState.cc | 40 ---------------------------------------- - 4 files changed, 6 insertions(+), 78 deletions(-) - -commit 42d8d7ffd8b5393dc3103a45932b70bc8ca61c2e -Author: Albert Astals Cid -Date: Wed Nov 22 21:50:24 2017 +0100 - - Open files that state 8 bits as third field of W - - Even we only really accept 32 bits since it is really strange to have - more than 2^31 generations - - Bug #103469 - - poppler/XRef.cc | 10 +++++++--- - 1 file changed, 7 insertions(+), 3 deletions(-) - -commit 6ab81a63323e8339647f883649bf74f9d96820ae -Author: Oliver Sander -Date: Tue Nov 7 17:25:27 2017 +0100 - - Document the meaning of the 'type' integer of a shading - - poppler/GfxState.h | 8 ++++++++ - 1 file changed, 8 insertions(+) - -commit 0a9d6debdb3d4e28d9125a007244bca0c1cd760a -Author: Jean Ghali -Date: Fri Nov 17 23:13:56 2017 +0100 - - Include glibc.h where needed - - at least for strtok_r - - fofi/FoFiType1.cc | 2 ++ - poppler/CharCodeToUnicode.cc | 2 ++ - poppler/GlobalParams.cc | 2 ++ - poppler/PDFDoc.cc | 2 ++ - poppler/UnicodeMap.cc | 2 ++ - 5 files changed, 10 insertions(+) - -commit e0302537ec0919d9f3dbf180ebbc6e2653b1049b -Author: Albert Astals Cid -Date: Wed Nov 15 10:44:14 2017 +0100 - - qt5: Add API to let the rendering process callback to get a partial - rendering - - Bug #103372 - - qt5/src/poppler-page.cc | 254 - +++++++++++++++++++++++++++++++++--------------- - qt5/src/poppler-qt5.h | 78 +++++++++++++++ - 2 files changed, 254 insertions(+), 78 deletions(-) - -commit 33b8e6220d06a26378d7d21c88ead6e2280c2e52 -Author: Adrian Johnson -Date: Wed Nov 15 19:58:53 2017 +1030 - - fix MSC macro - - poppler/GlobalParams.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit a6dd3f957f5979fa34a05ba963862de7d0d9df61 -Author: Adrian Johnson -Date: Sun Nov 12 10:33:07 2017 +1030 - - Support unicode on windows console - - The Win32Console should be used in programs that require unicode - support for command line arguments and stdio ouput on windows. On - windows it gets the command line arguments from GetCommandLineW and - converts to UTF-8, and redefines the stdio output functions to convert - UTF-8 to calls to WriteConsoleW. On other platforms this class is a - no-op. - - poppler/PDFDoc.cc | 9 +- - poppler/UTF.cc | 287 - ++++++++++++++++++++++++++++++++++++- - poppler/UTF.h | 39 +++++ - qt5/tests/CMakeLists.txt | 1 + - qt5/tests/check_utf_conversion.cpp | 87 +++++++++++ - utils/CMakeLists.txt | 1 + - utils/JSInfo.cc | 1 + - utils/Win32Console.cc | 167 +++++++++++++++++++++ - utils/Win32Console.h | 63 ++++++++ - utils/pdfdetach.cc | 2 + - utils/pdffonts.cc | 2 + - utils/pdfimages.cc | 2 + - utils/pdfinfo.cc | 2 + - utils/pdfseparate.cc | 2 + - utils/pdfsig.cc | 2 + - utils/pdftocairo-win32.cc | 1 + - utils/pdftocairo.cc | 2 + - utils/pdftohtml.cc | 2 + - utils/pdftoppm.cc | 2 + - utils/pdftops.cc | 2 + - utils/pdftotext.cc | 2 + - 21 files changed, 676 insertions(+), 2 deletions(-) - -commit 49107ffcd4d3c9b18fc950d37bede08f89bcfcda -Author: Adrian Johnson -Date: Sun Nov 12 10:33:07 2017 +1030 - - Fix some mingw warnings - - - Include poppler-config.h for mingw PRINTF_FORMAT - - Only redefine strcasecmp for MSVC - - Recent versions of MSVC have snprintf and vsnprintf - - poppler/Error.cc | 1 + - poppler/GlobalParams.cc | 2 +- - poppler/PDFDoc.cc | 1 + - test/perf-test.cc | 15 +++------------ - 4 files changed, 6 insertions(+), 13 deletions(-) - -commit 4f687665c39da743e802fc71ba05fb5966095293 -Author: Adrian Johnson -Date: Sun Nov 12 10:33:07 2017 +1030 - - sort encoding list - - makes it easier to find encodings listed by -listenc - - utils/printencodings.cc | 9 +++++++++ - 1 file changed, 9 insertions(+) - -commit 5c394f71f03d27507db3446ad34f299393fa3621 -Author: Adrian Johnson -Date: Sun Nov 12 10:33:07 2017 +1030 - - Move UTF8.h to UnicodeMapFuncs.h and rename UCS2 to UTF16 - - UTF8.h is not exclusively UTF-8 code. Renaming to UnicodeMapFuncs.h - identifies the file as containing maps for UnicodeMap and is - consistent with the name UnicodeMapTables.h. - - The mapUCS2 code was changed to support UTF-16 in 979ef1ca without - changing the name. - - CMakeLists.txt | 2 +- - poppler/GlobalParams.cc | 4 ++-- - poppler/{UTF8.h => UnicodeMapFuncs.h} | 6 +++--- - 3 files changed, 6 insertions(+), 6 deletions(-) - -commit 9ff60568ab420e86295bfa81cef9375d7c5600b8 -Author: Thomas Zajic -Date: Tue Nov 14 22:25:37 2017 +0100 - - pdfsig: install man page - - utils/CMakeLists.txt | 1 + - 1 file changed, 1 insertion(+) - -commit d63ddd1fb762e536dd78f24bd3e3ddbc3504e1eb -Author: Oliver Sander -Date: Tue Nov 14 20:05:33 2017 +0100 - - Use GfxLabColorSpace::transform only when USE_CMS is set - - The recent commit e84338a44f27afb9872cb108fc29683b35ac55f7 - introduced an unqualified use of GfxLabColorSpace::transform, - even though that member only exists if USE_CMS is set. - - Fix this by adding the appropriate preprocessor conditionals. - - poppler/GfxState.cc | 3 +++ - 1 file changed, 3 insertions(+) - -commit 19909998a2f1f703c9978510ae1fc3baed84de31 -Author: Adrian Johnson -Date: Sat Nov 11 05:38:25 2017 +1030 - - glib demo: fix warning - - glib/demo/selections.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit e84338a44f27afb9872cb108fc29683b35ac55f7 -Author: Albert Astals Cid -Date: Mon Nov 13 00:37:00 2017 +0100 - - GfxLabColorSpace::parse: Fix crash in broken documents - - Bug #103582 - - poppler/GfxState.cc | 28 ++++++++++++++++++---------- - 1 file changed, 18 insertions(+), 10 deletions(-) - -commit fea27db14358c8342c9f5bdbe6cb3bff02cebc2b -Author: Albert Astals Cid -Date: Sun Nov 12 19:54:52 2017 +0100 - - Fix leak if parseDA fails - - poppler/Form.cc | 1 + - 1 file changed, 1 insertion(+) - -commit faeb48920d64a776911a259bcf1bb6231ac1d24c -Author: Albert Astals Cid -Date: Sun Nov 12 19:14:32 2017 +0100 - - 0.61.1 - - CMakeLists.txt | 2 +- - NEWS | 11 +++++++++++ - cpp/Doxyfile | 2 +- - qt4/src/Doxyfile | 2 +- - qt5/src/Doxyfile | 2 +- - 5 files changed, 15 insertions(+), 4 deletions(-) - -commit 155597a09b2c7fcbd0eea2b5a2021a5b65476e4c -Author: Jeroen Ooms -Date: Sat Nov 4 05:33:09 2017 -0700 - - Fix for corrupted image files on Windows - - Bug #102494 - - cpp/poppler-image.cpp | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit c45efa2d7e0db8a4ace0e8c6955b3fa48dc6d070 -Author: Adam Sampson -Date: Sun Nov 5 11:45:00 2017 +0000 - - Fix incorrect paths in .pc files. - - The change in 67c3878ef10449b241c37d1022e2518029860335 used the - CMAKE_INSTALL_x variables instead of CMAKE_INSTALL_FULL_x; the former - contain things like "include" instead of full paths, so the resulting - .pc files break packages that depend on poppler. Use the latter. - - Also fix a missing @ in the qt5 file. - - Bug #103578 - - poppler-cairo.pc.cmake | 4 ++-- - poppler-cpp.pc.cmake | 4 ++-- - poppler-glib.pc.cmake | 4 ++-- - poppler-qt4.pc.cmake | 4 ++-- - poppler-qt5.pc.cmake | 4 ++-- - poppler-splash.pc.cmake | 4 ++-- - poppler.pc.cmake | 4 ++-- - 7 files changed, 14 insertions(+), 14 deletions(-) - -commit 7ccedf2b082e4d46257fb247e1f6e1197d66eead -Author: Adrian Johnson -Date: Wed Nov 8 21:07:45 2017 +1030 - - cairo: don't overflow y * stride when accessing image data - - poppler/CairoOutputDev.cc | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -commit 6ae4293fce77290f4fbdc643c999809d5924bf2c -Author: Roland Hieber -Date: Wed Nov 8 08:22:01 2017 +0100 - - CMake: add the custom buildtests target only once - - Make BUILDTESTS_ADDED a global property, so the `buildtests` target - gets added only once. As far as I understood, this seems to fulfil - the requirements of CMP0002. - - Bug #103003 - - cmake/modules/PopplerMacros.cmake | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -commit aaa9c5308766a88d0512b87051d7c7082f152a9f -Author: Albert Astals Cid -Date: Fri Nov 3 11:25:02 2017 +0100 - - Poppler 0.61 - - CMakeLists.txt | 6 +++--- - NEWS | 20 ++++++++++++++++++++ - cpp/Doxyfile | 2 +- - qt4/src/Doxyfile | 2 +- - qt5/src/Doxyfile | 2 +- - 5 files changed, 26 insertions(+), 6 deletions(-) - -commit 79b704b4017cf66dc3c39b49425c8b02760e5165 -Author: Albert Astals Cid -Date: Fri Nov 3 11:14:10 2017 +0100 - - Update (C) for commits since last release - - fofi/FoFiTrueType.cc | 2 +- - goo/FixedPoint.cc | 14 ++++++++++++++ - goo/FixedPoint.h | 15 +++++++++++++++ - goo/GooMutex.h | 1 + - goo/GooString.cc | 2 +- - goo/GooString.h | 1 + - goo/gfile.cc | 2 +- - goo/gfile.h | 2 +- - goo/glibc.h | 2 +- - goo/glibc_strtok_r.cc | 1 + - poppler/Annot.cc | 2 +- - poppler/Annot.h | 2 +- - poppler/Array.cc | 1 + - poppler/Array.h | 1 + - poppler/CMap.cc | 1 + - poppler/CMap.h | 2 +- - poppler/CairoFontEngine.cc | 2 +- - poppler/CairoFontEngine.h | 2 +- - poppler/CairoRescaleBox.cc | 2 +- - poppler/Catalog.cc | 2 +- - poppler/Catalog.h | 2 +- - poppler/CharCodeToUnicode.cc | 2 +- - poppler/CharCodeToUnicode.h | 1 + - poppler/DCTStream.cc | 1 + - poppler/Decrypt.cc | 2 +- - poppler/Dict.cc | 1 + - poppler/Dict.h | 1 + - poppler/FlateEncoder.cc | 1 + - poppler/FlateStream.cc | 1 + - poppler/GlobalParams.cc | 2 +- - poppler/GlobalParams.h | 2 +- - poppler/GlobalParamsWin.cc | 2 +- - poppler/Object.h | 2 +- - poppler/OutputDev.cc | 2 +- - poppler/OutputDev.h | 2 +- - poppler/PDFDoc.cc | 2 +- - poppler/PDFDoc.h | 2 +- - poppler/PDFDocFactory.cc | 1 + - poppler/PSOutputDev.cc | 2 +- - poppler/PSOutputDev.h | 2 +- - poppler/Page.cc | 2 +- - poppler/Page.h | 2 +- - poppler/SplashOutputDev.cc | 2 +- - poppler/SplashOutputDev.h | 2 +- - poppler/StructTreeRoot.cc | 1 + - poppler/TextOutputDev.cc | 2 +- - poppler/TextOutputDev.h | 2 +- - poppler/UnicodeMap.cc | 1 + - poppler/UnicodeMap.h | 14 ++++++++++++++ - poppler/XRef.cc | 2 +- - poppler/XRef.h | 2 +- - poppler/poppler-config.h.cmake | 1 + - qt4/src/ArthurOutputDev.cc | 1 + - qt4/src/poppler-document.cc | 1 + - qt4/src/poppler-page.cc | 1 + - qt5/src/ArthurOutputDev.cc | 1 + - qt5/src/poppler-document.cc | 1 + - qt5/src/poppler-page.cc | 1 + - splash/Splash.cc | 2 +- - splash/Splash.h | 2 +- - splash/SplashFTFont.cc | 1 + - splash/SplashFTFont.h | 1 + - splash/SplashFTFontEngine.cc | 1 + - splash/SplashFTFontEngine.h | 1 + - splash/SplashFTFontFile.cc | 2 +- - splash/SplashFTFontFile.h | 1 + - splash/SplashFontEngine.cc | 1 + - splash/SplashFontEngine.h | 1 + - splash/SplashMath.h | 1 + - splash/SplashState.cc | 1 + - splash/SplashState.h | 1 + - splash/SplashTypes.h | 1 + - splash/SplashXPath.cc | 1 + - utils/pdfimages.cc | 2 +- - utils/pdftocairo-win32.cc | 2 +- - utils/pdftoppm.cc | 2 +- - utils/pdftops.cc | 2 +- - 77 files changed, 117 insertions(+), 40 deletions(-) - -commit b8b6a7c9240d1b98e79463ea93245127ac56e764 -Author: Sandro Mani -Date: Fri Nov 3 10:37:25 2017 +0100 - - mingw: change library names to include the soversion - - Bug #103157 - - CMakeLists.txt | 4 ++++ - cpp/CMakeLists.txt | 4 ++++ - glib/CMakeLists.txt | 4 ++++ - qt4/src/CMakeLists.txt | 4 ++++ - qt5/src/CMakeLists.txt | 4 ++++ - 5 files changed, 20 insertions(+) - -commit f6ad64878d91cbd0c19531c7ff669af0e0fa0912 -Author: Sandro Mani -Date: Tue Oct 31 00:24:11 2017 +0100 - - Install pkg-config files also on mingw - - cmake/modules/PopplerMacros.cmake | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 67c3878ef10449b241c37d1022e2518029860335 -Author: Emilio Pozuelo Monfort -Date: Tue Oct 31 00:20:29 2017 +0100 - - cmake: support GNUInstallDirs - - This allows users to set various install directories, e.g. - libdir, includedir, mandir... - - Bug #103211 - - CMakeLists.txt | 21 ++++++++++----------- - cmake/modules/GObjectIntrospectionMacros.cmake | 4 ++-- - cpp/CMakeLists.txt | 2 +- - glib/CMakeLists.txt | 2 +- - glib/reference/CMakeLists.txt | 2 +- - poppler-cairo.pc.cmake | 5 ++--- - poppler-cpp.pc.cmake | 5 ++--- - poppler-glib.pc.cmake | 5 ++--- - poppler-qt4.pc.cmake | 5 ++--- - poppler-qt5.pc.cmake | 5 ++--- - poppler-splash.pc.cmake | 5 ++--- - poppler.pc.cmake | 5 ++--- - qt4/src/CMakeLists.txt | 2 +- - qt5/src/CMakeLists.txt | 2 +- - utils/CMakeLists.txt | 22 - +++++++++++----------- - 15 files changed, 42 insertions(+), 50 deletions(-) - -commit 4d109589e5d2ac989d4fd7ac318ddf976f3106ed -Author: Oliver Sander -Date: Sun Oct 29 20:28:52 2017 +0100 - - Fix leak in ArthurOutputDev::updateFont - - Bug #103508 - - qt5/src/ArthurOutputDev.cc | 3 +++ - 1 file changed, 3 insertions(+) - -commit b9ae2fd75c147988653093d0ecbf66188d81f8fc -Author: Adrian Johnson -Date: Sun Oct 22 18:29:31 2017 +1030 - - glib demo: correct the previous warnings fix - - Bug 103050 - - glib/demo/utils.c | 20 +++++++++++++------- - 1 file changed, 13 insertions(+), 7 deletions(-) - -commit d72f0383b959d8495a452d2d32377e588b15ad65 -Author: Kay Dohmann -Date: Mon Oct 23 23:31:13 2017 +0200 - - Tweak LZWStream::processNextCode - - Fixes file attached at bug 103174 and doesn't seem to cause any - regression in the files we have around - - Bug #103174 - - poppler/Stream.cc | 16 +++++++--------- - 1 file changed, 7 insertions(+), 9 deletions(-) - -commit e0926ca8a94bafa6d5bfd694064c5e30da2b79db -Author: Oliver Sander -Date: Thu Oct 5 18:32:40 2017 +0200 - - Properly implement saveState / restoreState - - Not all of the internal state was actually saved/restored in - those methods, which lead to inconsistencies between the - ArthurOutputDev state and the GfxState object. - - Bug #103118 - - qt5/src/ArthurOutputDev.cc | 14 ++++++++++++++ - qt5/src/ArthurOutputDev.h | 9 +++++++++ - 2 files changed, 23 insertions(+) - -commit ebf6d1ca736fecad49fbf543875c794770bd4d57 -Author: Oliver Sander -Date: Fri Sep 15 11:18:58 2017 +0200 - - Clean up the remaining Splash code in Arthur backend - - - remove some goto-style error handling - - use nullptr - - use std::unique_ptr (fixes a leak) - - remove unused data member m_currentFont - - remove some unused forward declarations - - Bug #103117 - - qt5/src/ArthurOutputDev.cc | 48 - +++++++++++++++++----------------------------- - qt5/src/ArthurOutputDev.h | 4 ---- - 2 files changed, 18 insertions(+), 34 deletions(-) - -commit 0a8174945379142348ce1006ce88cb1a75c01c96 -Author: Albert Astals Cid -Date: Sun Oct 22 12:45:05 2017 +0200 - - isfinite -> std::isfinite - - Fixes build on the travis CI - - poppler/SplashOutputDev.cc | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -commit 9c7b557da043c897292219a16f419ba9650e6dfc -Author: Adrian Johnson -Date: Mon Oct 2 20:22:02 2017 +1030 - - Fix mingw warnings - - poppler/Annot.cc | 6 +++--- - poppler/DCTStream.cc | 6 ++++-- - poppler/GlobalParams.cc | 29 +++++++++++++++++------------ - poppler/XRef.cc | 1 + - poppler/poppler-config.h.cmake | 3 +-- - 5 files changed, 26 insertions(+), 19 deletions(-) - -commit 69414f14f60c49f9e0a8243603c6330fa3d11837 -Author: Adrian Johnson -Date: Mon Oct 2 18:40:58 2017 +1030 - - mingw build fix - use win32 threads - - The cmake FindThreads detects both win32 and pthreads on mingw. - It also attempts a TryRun test for pthreads which won't work with - a cross compile. - - CMakeLists.txt | 10 +++++++--- - 1 file changed, 7 insertions(+), 3 deletions(-) - -commit ecd2b7bf71b110b0e245e2866a13f2c0a901921f -Author: Adrian Johnson -Date: Mon Oct 2 17:03:19 2017 +1030 - - Remove VC7 workaround - - VC7 (2002) does not support C++11 - - poppler/Gfx.cc | 8 -------- - 1 file changed, 8 deletions(-) - -commit 6e3e639c632f8527f9dc75061605e4a55f2faae9 -Author: Adrian Johnson -Date: Mon Oct 2 16:59:31 2017 +1030 - - Use for isfinite() - - poppler/SplashOutputDev.cc | 21 +-------------------- - 1 file changed, 1 insertion(+), 20 deletions(-) - -commit f9cef28b504445c7976baa0a51676204f95397fc -Author: Adrian Johnson -Date: Mon Oct 2 15:13:42 2017 +1030 - - c++11 has long long - - fofi/FoFiTrueType.cc | 1 + - fofi/FoFiType1.cc | 1 + - goo/GooString.cc | 36 ------------------------------------ - goo/GooString.h | 13 ------------- - poppler/Object.h | 1 + - poppler/PDFDoc.cc | 1 + - 6 files changed, 4 insertions(+), 49 deletions(-) - -commit 4f2bd307711f792f8caf93a560444e17bd98611a -Author: Adrian Johnson -Date: Mon Oct 2 13:45:38 2017 +1030 - - Remove fmax/fmin from poppler-config.h - - C++11 has fmax/fmin in so use it and remove the #ifdefs - for MSVC. - - poppler/TextOutputDev.cc | 2 +- - poppler/poppler-config.h.cmake | 6 ------ - 2 files changed, 1 insertion(+), 7 deletions(-) - -commit 555e2ea6b6f80a6f79eeaa44a39c24dc8461e78c -Author: Adrian Johnson -Date: Mon Oct 2 13:33:07 2017 +1030 - - Move strtok_r to goo/glibc - - Move strtok_r out of poppler-config.h as it is not used in any - header files - - Move strtok_r.cpp to goo/glibc_strtok_r.cc to keep it with the - other emulated - glibc functions. But keep it in a separate file due to the different - license. - - CMakeLists.txt | 2 +- - ConfigureChecks.cmake | 1 + - config.h.cmake | 3 +++ - goo/glibc.h | 4 ++++ - poppler/strtok_r.cpp => goo/glibc_strtok_r.cc | 4 +++- - poppler/poppler-config.h.cmake | 8 -------- - 6 files changed, 12 insertions(+), 10 deletions(-) - -commit 2ca32d2cfc57626bbc833d4981c7d0a071ccc985 -Author: Adrian Johnson -Date: Mon Oct 2 13:18:12 2017 +1030 - - move/remove macros from poppler-config.h that don't need to be there - - popen/pclose are not used in any .h files - move to config.h - - POPEN_READ_MODE is not used - remove - - config.h.cmake | 8 ++++++++ - poppler/poppler-config.h.cmake | 15 --------------- - 2 files changed, 8 insertions(+), 15 deletions(-) - -commit bf3931016614c434f7229e00bb75e3b113803d04 -Author: Adrian Johnson -Date: Mon Oct 2 12:55:41 2017 +1030 - - Remove unused HAVE_ZLIB_H/HAVE_LIBZ macros - - CMakeLists.txt | 3 --- - config.h.cmake | 3 --- - 2 files changed, 6 deletions(-) - -commit 82e7f4bad79d122fe8cf16be54901d1f1668ca37 -Author: Adrian Johnson -Date: Mon Oct 2 12:05:10 2017 +1030 - - Make poppler compile if threads not available - - CMakeLists.txt | 5 ++++- - goo/GooMutex.h | 6 +++++- - 2 files changed, 9 insertions(+), 2 deletions(-) - -commit 350b905537f59323a6b9a854cf019e8e95940bd6 -Author: Adrian Johnson -Date: Mon Oct 2 11:36:42 2017 +1030 - - Use -pthread flag instead of -lpthread - - The -pthread flag should be used for compiling with threads as it sets - flags for both the preprocessor and linker. - - In cmake this is achieved with the set(THREADS_PREFER_PTHREAD_FLAG - TRUE) - before find_package(Threads) and using the Threads::Threads import - target. - - Also added set(CMAKE_THREAD_PREFER_PTHREAD TRUE) as we only support - pthread on non windows platforms. - - CMakeLists.txt | 11 +++++------ - glib/CMakeLists.txt | 4 ++-- - utils/CMakeLists.txt | 4 ++-- - 3 files changed, 9 insertions(+), 10 deletions(-) - -commit e01e6db4e0643b7b318a3d7dc49442bb2d6ade00 -Author: Adrian Johnson -Date: Sun Oct 1 20:51:13 2017 +1030 - - HAVE_PTHREAD is not used - - config.h.cmake | 3 --- - 1 file changed, 3 deletions(-) - -commit 36010177e9c168d110c44407512c93b49a9cf95c -Author: Adrian Johnson -Date: Sun Oct 1 19:28:13 2017 +1030 - - Remove unused macros - - The jpeg.h HAVE_BOOLEAN is only required if the application defines - type 'boolean' to prevent jpeg.h from redefining it. - - ConfigureChecks.cmake | 6 ------ - config.h.cmake | 36 ------------------------------------ - 2 files changed, 42 deletions(-) - -commit 6658754b9b8dfd1ba692da2681d95e21e9c1c2d4 -Author: Adrian Johnson -Date: Sun Oct 1 19:09:28 2017 +1030 - - We always have config.h so drop the macro - - CMakeLists.txt | 1 - - poppler/CairoRescaleBox.cc | 2 -- - 2 files changed, 3 deletions(-) - -commit 7b0d736ccd5d3e1327684d21d6afbe2dec01188f -Author: Adrian Johnson -Date: Sun Oct 1 19:04:39 2017 +1030 - - c++11 has so we can drop the stdint.h checks and emulation - - ConfigureChecks.cmake | 1 - - config.h.cmake | 3 --- - goo/gtypes_p.h | 30 ------------------------------ - poppler/CairoOutputDev.cc | 2 +- - poppler/CairoRescaleBox.cc | 2 +- - poppler/Decrypt.cc | 2 +- - utils/pdftocairo-win32.h | 2 +- - utils/pdftocairo.cc | 2 +- - 8 files changed, 5 insertions(+), 39 deletions(-) - -commit 465edbbffcc94f9af9fac7606086a28362f92d09 -Author: Adrian Johnson -Date: Sun Oct 1 18:48:07 2017 +1030 - - Fix remaining -Wundef warnings - - and make -Wundef a default warning - - cmake/modules/PopplerMacros.cmake | 2 +- - goo/FixedPoint.h | 2 +- - goo/TiffWriter.cc | 2 +- - goo/gfile.cc | 20 ++++++++--------- - goo/gfile.h | 10 ++++----- - poppler/Annot.cc | 12 +++++----- - poppler/Annot.h | 2 +- - poppler/Array.cc | 6 ++--- - poppler/Array.h | 2 +- - poppler/CMap.cc | 14 ++++++------ - poppler/CMap.h | 4 ++-- - poppler/CairoFontEngine.cc | 10 ++++----- - poppler/CairoFontEngine.h | 2 +- - poppler/Catalog.cc | 6 ++--- - poppler/Catalog.h | 2 +- - poppler/CharCodeToUnicode.cc | 16 +++++++------- - poppler/CharCodeToUnicode.h | 4 ++-- - poppler/Dict.cc | 8 +++---- - poppler/Dict.h | 2 +- - poppler/FlateStream.cc | 2 +- - poppler/Gfx.cc | 4 ++-- - poppler/GlobalParams.cc | 12 +++++----- - poppler/GlobalParams.h | 4 ++-- - poppler/GlobalParamsWin.cc | 2 +- - poppler/OutputDev.cc | 2 +- - poppler/OutputDev.h | 2 +- - poppler/PDFDoc.cc | 6 ++--- - poppler/PDFDoc.h | 2 +- - poppler/PDFDocFactory.cc | 4 ++-- - poppler/PSOutputDev.cc | 24 ++++++++++---------- - poppler/PSOutputDev.h | 8 +++---- - poppler/Page.cc | 6 ++--- - poppler/Page.h | 2 +- - poppler/Stream.cc | 8 +++---- - poppler/Stream.h | 2 +- - poppler/TextOutputDev.cc | 14 ++++++------ - poppler/TextOutputDev.h | 14 ++++++------ - poppler/UnicodeMap.cc | 16 +++++++------- - poppler/UnicodeMap.h | 4 ++-- - poppler/XRef.cc | 10 ++++----- - poppler/XRef.h | 2 +- - utils/ImageOutputDev.cc | 4 ++-- - utils/pdfimages.cc | 4 ++-- - utils/pdftocairo.cc | 46 - +++++++++++++++++++-------------------- - utils/pdftoppm.cc | 6 ++--- - utils/pdftops.cc | 6 ++--- - 46 files changed, 171 insertions(+), 171 deletions(-) - -commit b424862bf5df75db651076c780c7242eaf887479 -Author: Adrian Johnson -Date: Sun Oct 1 18:18:42 2017 +1030 - - Remove HAVE_FREETYPE macros - - Freetype is a mandatory dependency so we can drop the macros. - - CMakeLists.txt | 1 - - config.h.cmake | 3 --- - poppler/SplashOutputDev.cc | 8 -------- - poppler/poppler-config.h.cmake | 7 +------ - qt4/src/ArthurOutputDev.cc | 2 -- - qt5/src/ArthurOutputDev.cc | 2 -- - splash/SplashFTFont.cc | 4 ---- - splash/SplashFTFont.h | 4 ---- - splash/SplashFTFontEngine.cc | 4 ---- - splash/SplashFTFontEngine.h | 4 ---- - splash/SplashFTFontFile.cc | 4 ---- - splash/SplashFTFontFile.h | 4 ---- - splash/SplashFontEngine.cc | 20 -------------------- - splash/SplashFontEngine.h | 6 ------ - utils/pdftoppm.cc | 2 -- - 15 files changed, 1 insertion(+), 74 deletions(-) - -commit e0428ef002e9c8d6e2046fcdeeedcf7462367501 -Author: Adrian Johnson -Date: Sun Oct 1 18:02:15 2017 +1030 - - Remove unused t1lib code - - CMakeLists.txt | 6 - - poppler/SplashOutputDev.cc | 3 - - poppler/poppler-config.h.cmake | 2 +- - qt4/src/ArthurOutputDev.cc | 3 - - qt5/src/ArthurOutputDev.cc | 3 - - splash/SplashFontEngine.cc | 30 ---- - splash/SplashFontEngine.h | 6 - - splash/SplashT1Font.cc | 309 - ----------------------------------------- - splash/SplashT1Font.h | 69 --------- - splash/SplashT1FontEngine.cc | 138 ------------------ - splash/SplashT1FontEngine.h | 50 ------- - splash/SplashT1FontFile.cc | 134 ------------------ - splash/SplashT1FontFile.h | 70 ---------- - 13 files changed, 1 insertion(+), 822 deletions(-) - -commit 7f01a804455dcc9d87fa17b566b8bd269b2d5489 -Author: Adrian Johnson -Date: Sun Oct 1 17:31:23 2017 +1030 - - Use _WIN32 to check for windows, not WIN32 - - These should have been fixed in #24259 but must have been missed. - - goo/gfile.cc | 4 ++-- - goo/gfile.h | 2 +- - poppler/GlobalParams.cc | 4 ++-- - splash/SplashMath.h | 6 +++--- - 4 files changed, 8 insertions(+), 8 deletions(-) - -commit e38ffea64dc9c113607168e298c7ccdf8edaa61e -Author: Adrian Johnson -Date: Sun Oct 1 17:25:19 2017 +1030 - - Fix some -Wundef warnings - - goo/FixedPoint.cc | 2 +- - poppler/GlobalParams.cc | 2 +- - poppler/PSOutputDev.cc | 8 +-- - poppler/SplashOutputDev.cc | 158 - ++++++++++++++++++++++---------------------- - poppler/SplashOutputDev.h | 2 +- - qt4/src/poppler-document.cc | 2 +- - qt4/src/poppler-page.cc | 4 +- - qt5/src/poppler-document.cc | 2 +- - qt5/src/poppler-page.cc | 4 +- - splash/Splash.cc | 76 ++++++++++----------- - splash/Splash.h | 10 +-- - splash/SplashBitmap.cc | 20 +++--- - splash/SplashBitmap.h | 2 +- - splash/SplashFTFont.cc | 6 +- - splash/SplashFontEngine.h | 4 +- - splash/SplashMath.h | 42 ++++++------ - splash/SplashState.cc | 10 +-- - splash/SplashState.h | 2 +- - splash/SplashTypes.h | 16 ++--- - splash/SplashXPath.cc | 6 +- - utils/pdftoppm.cc | 12 ++-- - utils/pdftops.cc | 6 +- - 22 files changed, 198 insertions(+), 198 deletions(-) - -commit 9bb84057624c3b2f8fc5d137e70ae34efa46fe31 -Author: Adrian Johnson -Date: Sun Oct 1 13:27:10 2017 +1030 - - glib demo: fix deprecated warnings - - glib/demo/utils.c | 16 +++++++++++++--- - 1 file changed, 13 insertions(+), 3 deletions(-) - -commit 5d954d1c4f25447f70d949e31afeeefb70c2a8d5 -Author: Adrian Johnson -Date: Sun Oct 1 12:53:38 2017 +1030 - - Fix warning: implicit declaration of function ‘localtime_r’ - - poppler/glib/demo/utils.c:488:20: warning: implicit declaration of - function ‘localtime_r’ [-Wimplicit-function-declaration] - if (time == 0 || !localtime_r (&time, &t)) return NULL; - ^~~~~~~~~~~ - - The c files also need the -D_DEFAULT_SOURCE feature macro to enable - non standard C++11 functons. - - cmake/modules/PopplerMacros.cmake | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 8ccc9efb6c5f717b8cd206a92f802c66bc0a69c7 -Author: Adrian Johnson -Date: Sun Oct 1 12:35:19 2017 +1030 - - Fix warning: comparison of unsigned expression < 0 is always false - - poppler/FlateEncoder.cc | 1 - - poppler/StructTreeRoot.cc | 4 ++-- - 2 files changed, 2 insertions(+), 3 deletions(-) - -commit 88571e7877f729eec2f7a3552b0fa6cc913ae1a6 -Author: Albert Astals Cid -Date: Thu Oct 19 18:11:49 2017 +0200 - - Move setPSCenter from GlobalParams to PSOutputDev - - poppler/GlobalParams.cc | 16 ---------------- - poppler/GlobalParams.h | 3 --- - poppler/PSOutputDev.cc | 3 ++- - poppler/PSOutputDev.h | 4 +++- - utils/pdftops.cc | 8 ++++---- - 5 files changed, 9 insertions(+), 25 deletions(-) - -commit 5b8fe4ee986673f15fcf8f58409cc85e8bf7ca12 -Author: Albert Astals Cid -Date: Thu Oct 19 17:49:06 2017 +0200 - - Remove various never called internal setters from GlobalParams.h - - TextKeepTinyChars: false, simplify if in TextOutputDev - DisableFreeTypeHinting: didn't actually have a getter :D - StrokeAdjust: true, adjust the code in Cairo/SplashOutputDev to - use gTrue - ScreenType: unset, simplify switch in SplashOutputDev - ScreenSize: -1, simplify code in SplashOutputDev - ScreenDotRadius: -1, simplify code in SplashOutputDev - ScreenGamma: 1.0, simplify code in SplashOutputDev - ScreenBlackThreshold: 0.0, simplify code in SplashOutputDev - ScreenWhiteThreshold: 1.0, simplify code in SplashOutputDev - MinLineWidth: 0.0, define it as static const in SplashOutputDev - since was used in various places - MapNumericCharNames: true, remove GfxFont.cc if guard - MapUnknownCharNames: true, remove GfxFont.cc if guard - - poppler/CairoOutputDev.cc | 2 +- - poppler/GfxFont.cc | 94 +++++++++++----------- - poppler/GlobalParams.cc | 193 - --------------------------------------------- - poppler/GlobalParams.h | 44 ----------- - poppler/SplashOutputDev.cc | 66 +++++----------- - poppler/TextOutputDev.cc | 3 +- - 6 files changed, 68 insertions(+), 334 deletions(-) - -commit 19ebd40547186a8ea6da08c8d8e2a6d6b7e84f5d -Author: Albert Astals Cid -Date: Fri Oct 13 00:55:49 2017 +0200 - - CairoOutputDev: Fix crash in broken files - - Bug #103016 - - poppler/CairoOutputDev.cc | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -commit 7ee9dadef37b20bca707a6b1e858e17d191e368b -Author: Jason Crain -Date: Thu Oct 5 15:32:13 2017 -0500 - - TextOutputDev: Fix crash in fuzzed file - - This file crashes pdftotext because it positions texts past INT_MIN, - leading to overflow in subsequent calculations. - - Bug #103116 - - poppler/TextOutputDev.cc | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -commit 369cd504e70e55378c6395355056fa8676679e56 -Author: David Tardon -Date: Fri Oct 6 08:07:35 2017 +0200 - - do not install Function.cc, as it's not a header - - CMakeLists.txt | 1 - - 1 file changed, 1 deletion(-) - -commit f09a9923bb65755e183694c5f1be6af4a50e96e6 -Author: Albert Astals Cid -Date: Thu Oct 5 19:15:44 2017 +0200 - - Poppler 0.60.1 - - CMakeLists.txt | 2 +- - NEWS | 7 +++++++ - cpp/Doxyfile | 2 +- - qt4/src/Doxyfile | 2 +- - qt5/src/Doxyfile | 2 +- - 5 files changed, 11 insertions(+), 4 deletions(-) - -commit e816c7a47caa0c3f5261d467333f8c2eb6a2ad51 -Author: Albert Astals Cid -Date: Thu Oct 5 18:51:49 2017 +0200 - - FindLIBOPENJPEG.cmake: Add CheckCXXSourceCompiles - - Since we use check_cxx_source_compiles - - cmake/modules/FindLIBOPENJPEG.cmake | 2 ++ - 1 file changed, 2 insertions(+) - -commit f538b74a38acb53b877e000a64647ce8043133ac -Author: Oliver Sander -Date: Tue Oct 3 00:04:17 2017 +0200 - - qt5: ArthurOutputDev: Add missing 'return' in error paths - - qt5/src/ArthurOutputDev.cc | 2 ++ - 1 file changed, 2 insertions(+) - -commit c2ba8fd8cf51af48a9e789d29e9fd5512d1688e3 -Author: Albert Astals Cid -Date: Mon Oct 2 23:46:49 2017 +0200 - - Poppler 0.60.0 - - CMakeLists.txt | 4 ++-- - NEWS | 28 ++++++++++++++++++++++++++++ - cpp/Doxyfile | 2 +- - qt4/src/Doxyfile | 2 +- - qt5/src/CMakeLists.txt | 2 +- - qt5/src/Doxyfile | 2 +- - 6 files changed, 34 insertions(+), 6 deletions(-) - -commit 9432e0bfc4c4f2e16b7c152aa8b04d6d19ed4898 -Author: Albert Astals Cid -Date: Mon Oct 2 23:29:21 2017 +0200 - - Add missing (C) - - cpp/poppler-private.cpp | 1 + - fofi/FoFiTrueType.cc | 2 +- - goo/GooString.cc | 2 +- - goo/GooString.h | 2 +- - goo/JpegWriter.cc | 1 + - goo/gmem.h | 2 +- - poppler/CairoOutputDev.cc | 2 +- - poppler/CurlPDFDocBuilder.cc | 2 +- - poppler/Decrypt.cc | 2 +- - poppler/GfxState.h | 2 +- - poppler/GlobalParams.cc | 2 +- - poppler/PSOutputDev.cc | 2 +- - poppler/PSOutputDev.h | 2 +- - poppler/UnicodeMap.cc | 1 + - qt4/src/poppler-link.cc | 2 +- - qt4/src/poppler-private.cc | 2 +- - qt5/src/poppler-link.cc | 2 +- - qt5/src/poppler-private.cc | 2 +- - qt5/src/poppler-qt5.h | 1 + - splash/Splash.cc | 2 +- - splash/SplashFTFontFile.cc | 1 + - splash/SplashFTFontFile.h | 1 + - utils/pdfseparate.cc | 2 +- - 23 files changed, 23 insertions(+), 17 deletions(-) - -commit da02d7c683f1788d38cccb3716edd1ba011cb94c -Author: Albert Astals Cid -Date: Mon Oct 2 23:05:59 2017 +0200 - - remove m4 gtk-doc.make and add comments to poppler-features.h.cmake - - glib/poppler-features.h.cmake | 55 ++++++++ - gtk-doc.make | 305 - ---------------------------------------- - m4/.gitignore | 5 - - m4/ax_pthread.m4 | 317 - ------------------------------------------ - m4/define-dir.m4 | 34 ----- - m4/gtk-doc.m4 | 88 ------------ - m4/iconv.m4 | 180 ------------------------ - m4/introspection.m4 | 94 ------------- - m4/libjpeg.m4 | 114 --------------- - 9 files changed, 55 insertions(+), 1137 deletions(-) - -commit f871b82edfd632f79ec7bdd0b4d560cd348d8b1a -Author: Oliver Sander -Date: Fri Sep 8 23:27:45 2017 +0200 - - qt5: ArthurOutputDev: Fix several small bugs related to dash pattern - handling - - qt5/src/ArthurOutputDev.cc | 21 ++++++++++++++++++++- - 1 file changed, 20 insertions(+), 1 deletion(-) - -commit 3ec5e86ca000653525650a99755c85e512a04bdc -Author: Oliver Sander -Date: Fri Sep 29 21:24:23 2017 +0200 - - qt5: ArthurOutputDev: Implement the drawSoftMaskedImage method - - qt5/src/ArthurOutputDev.cc | 67 - ++++++++++++++++++++++++++++++++++++++++++++++ - qt5/src/ArthurOutputDev.h | 9 +++++++ - 2 files changed, 76 insertions(+) - -commit 376ae2f8b8a92fd7bd751fbfcd0aa46530b59ca4 -Author: Albert Astals Cid -Date: Sat Sep 30 11:27:44 2017 +0200 - - Remove the gir-girs target - - It depends on the same files (subset) as the gir-typelibs target - meaning that sometimes when doing a parallel build you'd get the - two commands trying to generate the same file at once and bad - things happen - - cmake/modules/GObjectIntrospectionMacros.cmake | 1 - - 1 file changed, 1 deletion(-) - -commit 19eedc6fb693a62f305e13079501e3105f869f3c -Author: Albert Astals Cid -Date: Sat Sep 30 11:12:31 2017 +0200 - - Fix crash in broken files - - Bug #103045 - - fofi/FoFiTrueType.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 5df4a8b0ad56b11c9be3b362e33810c5af57952b -Author: Albert Astals Cid -Date: Tue Sep 26 23:49:41 2017 +0200 - - Enable libcurl support by default - - CMakeLists.txt | 10 +++++++--- - 1 file changed, 7 insertions(+), 3 deletions(-) - -commit 2c92c7b6a828c9db8a38f079ea7a3d51c12a481d -Author: Albert Astals Cid -Date: Mon Sep 25 19:33:44 2017 +0200 - - Fix infinite recursion on broken files - - Bug #102969 - - poppler/Gfx.cc | 46 ++++++++++++++++++++++++++++++++++------------ - poppler/GfxState.cc | 33 ++++++++++++++++++--------------- - poppler/GfxState.h | 15 +++++++++------ - 3 files changed, 61 insertions(+), 33 deletions(-) - -commit d3f12611b30e6421f05603a9838ed9131b1aa61e -Author: Bernd Kuhls -Date: Sun Sep 24 23:56:29 2017 +0200 - - include ctype.h for isdigit - - Bug #102951 - - poppler/Form.cc | 2 ++ - 1 file changed, 2 insertions(+) - -commit a1a4be92323ae45f1ecc16595438520309554eb0 -Author: Carlos Garcia Campos -Date: Sun Sep 24 13:21:58 2017 +0200 - - cairo: do not use the custom downscaling for rendering images when - using cairo >= 1.14 - - poppler/CairoOutputDev.cc | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - -commit 3b64fc488e7ff10634aa2dd76ad4f152ebfe7edc -Author: Carlos Garcia Campos -Date: Sun Sep 24 12:39:06 2017 +0200 - - regtest: change default value of utils dir to ../build/utils - - regtest/main.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit deba5f3c57929a96105d822c8cba46e5334694c7 -Author: Carlos Garcia Campos -Date: Sun Sep 24 12:31:43 2017 +0200 - - cairo: Do not extend the pattern in drawImageMaskRegular - - This is causing some documents with tiling patterns to take ages - to render, - since we switched to use drawImageMaskRegular in 00a536a4. This patch - applies the same changes made in 7d8dfb09 and db87dc7f for - drawImageMaskPrescaled to drawImageMaskRegular. - - poppler/CairoOutputDev.cc | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -commit cceb80b353ca748d1e04373d238195fd548319b8 -Author: Carlos Garcia Campos -Date: Sun Sep 24 08:24:44 2017 +0200 - - glib: Make g-ir-scanner always link to the libs in build directory - - It was using the installed libraries, causing a build failure when - there's new API added to the poppler core. - - glib/CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 2afde7084ab55893182c2da59c429b48eb5d5a35 -Author: Albert Astals Cid -Date: Fri Sep 22 18:18:54 2017 +0200 - - Remove GlobalParams::splashResolution - - Noone was setting or getting the variable - - poppler/GlobalParams.h | 1 - - 1 file changed, 1 deletion(-) - -commit df783c5d10490e94e911316a6f42bb2d91a22dea -Author: Albert Astals Cid -Date: Fri Sep 22 18:18:50 2017 +0200 - - Add a const to the static structure - - poppler/GlobalParamsWin.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit a309cbfdd831b37461284b95763ca5a872e6af2b -Author: Albert Astals Cid -Date: Fri Sep 22 18:18:46 2017 +0200 - - Remove GlobalParams::setPSFile - - It had a setter but not a getter so wasn't used for anything - - poppler/GlobalParams.cc | 13 ------------- - poppler/GlobalParams.h | 2 -- - 2 files changed, 15 deletions(-) - -commit 7af5f7cadbdb89e0eaab148940c2c65cb12cc6d6 -Author: Albert Astals Cid -Date: Fri Sep 22 18:18:42 2017 +0200 - - Remove GlobalParams::ccFontFiles - - it was never filled so it was basically a noop - - poppler/GfxFont.cc | 10 ---------- - poppler/GlobalParams.cc | 14 -------------- - poppler/GlobalParams.h | 3 --- - 3 files changed, 27 deletions(-) - -commit b5f8be7ede64e55d44ed484797a66ca068ba955f -Author: Albert Astals Cid -Date: Fri Sep 22 18:18:39 2017 +0200 - - Remove GlobalParams::fontDirs - - It was only read but never filled so it was basically a noop - - poppler/GlobalParams.cc | 31 +------------------------------ - poppler/GlobalParams.h | 1 - - 2 files changed, 1 insertion(+), 31 deletions(-) - -commit 3463537624a24e3bdcaa42c135d337c6cd452ea5 -Author: Albert Astals Cid -Date: Fri Sep 22 18:18:22 2017 +0200 - - Remove GlobalParams::getPSResidentFont* - - There was no way to set its contents so it's basically a noop - - poppler/GfxFont.cc | 38 ---------------------- - poppler/GlobalParams.cc | 85 - ------------------------------------------------- - poppler/GlobalParams.h | 29 ----------------- - poppler/PSOutputDev.cc | 6 ---- - 4 files changed, 158 deletions(-) - -commit 851bc59c6f4b007333d064af5c6992702b92cdf6 -Author: Albert Astals Cid -Date: Thu Sep 21 20:45:52 2017 +0200 - - Remove the autotools based build system - - .gitignore | 20 +- - INSTALL | 244 ++------ - INSTALL.cmake | 76 --- - Makefile.am | 133 ----- - autogen.sh | 117 ---- - configure.ac | 1154 - -------------------------------------- - cpp/Makefile.am | 74 --- - cpp/tests/Makefile.am | 21 - - fofi/Makefile.am | 28 - - glib/Makefile.am | 122 ---- - glib/demo/Makefile.am | 56 -- - glib/poppler-features.h.in | 88 --- - glib/reference/Makefile.am | 92 --- - glib/reference/version.xml.in | 1 - - goo/Makefile.am | 69 --- - poppler-cairo-uninstalled.pc.in | 6 - - poppler-cairo.pc.in | 9 - - poppler-cpp-uninstalled.pc.in | 7 - - poppler-cpp.pc.in | 13 - - poppler-glib-uninstalled.pc.in | 7 - - poppler-glib.pc.in | 13 - - poppler-qt4-uninstalled.pc.in | 7 - - poppler-qt4.pc.in | 13 - - poppler-qt5-uninstalled.pc.in | 7 - - poppler-qt5.pc.in | 13 - - poppler-splash-uninstalled.pc.in | 7 - - poppler-splash.pc.in | 9 - - poppler-uninstalled.pc.in | 6 - - poppler.pc.in | 11 - - poppler/Makefile.am | 348 ------------ - poppler/poppler-config.h.in | 196 ------- - qt4/Makefile.am | 1 - - qt4/demos/Makefile.am | 65 --- - qt4/src/Makefile.am | 76 --- - qt4/tests/Makefile.am | 141 ----- - qt5/Makefile.am | 1 - - qt5/demos/Makefile.am | 65 --- - qt5/src/Makefile.am | 78 --- - qt5/tests/Makefile.am | 141 ----- - splash/Makefile.am | 73 --- - test/Makefile.am | 67 --- - utils/Makefile.am | 155 ----- - 42 files changed, 43 insertions(+), 3787 deletions(-) - -commit 1a33f60da2996ea64c1b903580885697940cf046 -Author: Albert Astals Cid -Date: Thu Sep 21 20:32:25 2017 +0200 - - Add some constness to the basic classes - - goo/GooString.cc | 2 +- - goo/GooString.h | 2 +- - poppler/Array.cc | 8 +-- - poppler/Array.h | 12 ++--- - poppler/Dict.cc | 18 +++---- - poppler/Dict.h | 26 +++++----- - poppler/Object.cc | 4 +- - poppler/Object.h | 152 - +++++++++++++++++++++++++++--------------------------- - 8 files changed, 112 insertions(+), 112 deletions(-) - -commit 135843fa8398364e0559c2b0b96f9be4a44572c5 -Author: Carlos Garcia Campos -Date: Wed Sep 20 19:38:14 2017 +0200 - - Add gtk-doc support to CMake build - - CMakeLists.txt | 4 +- - glib/CMakeLists.txt | 4 + - glib/reference/CMakeLists.txt | 12 ++ - gtkdoc.py | 440 - ++++++++++++++++++++++++++++++++++++++++++ - make-glib-api-docs | 66 +++++++ - 5 files changed, 525 insertions(+), 1 deletion(-) - -commit e51db61a33cdbe6307f048b65912a85f6cd1ec5b -Author: William Bader -Date: Wed Sep 20 19:36:46 2017 +0200 - - PSOutputDev: Fix wrong text generation - - This patch moves the code to update the max valid glyph hash into its - own function and updates the max valid glyph only if the new value is - higher than the previous value. - This fixes a problem with pages that have multiple copies of the same - font with different glyph counts. If poppler processed the font - with the - smaller count last, and then the PDF wrote text in the font with the - larger count, pdftops would not show the glyphs above the maximum - of the - smaller font. - - Bug #102760 - - poppler/PSOutputDev.cc | 16 ++++++++++------ - poppler/PSOutputDev.h | 1 + - 2 files changed, 11 insertions(+), 6 deletions(-) - -commit 6665839b5ce2e4f6fb2acc682ce2f91ed2404ce8 -Author: Albert Astals Cid -Date: Wed Sep 20 19:36:29 2017 +0200 - - qt5: The tests don't need GUI - - qt5/tests/check_actualtext.cpp | 2 +- - qt5/tests/check_attachments.cpp | 2 +- - qt5/tests/check_dateConversion.cpp | 2 +- - qt5/tests/check_fonts.cpp | 2 +- - qt5/tests/check_goostring.cpp | 2 +- - qt5/tests/check_lexer.cpp | 2 +- - qt5/tests/check_links.cpp | 2 +- - qt5/tests/check_metadata.cpp | 2 +- - qt5/tests/check_optcontent.cpp | 2 +- - qt5/tests/check_pagelabelinfo.cpp | 2 +- - qt5/tests/check_pagelayout.cpp | 2 +- - qt5/tests/check_pagemode.cpp | 2 +- - qt5/tests/check_password.cpp | 2 +- - qt5/tests/check_permissions.cpp | 2 +- - qt5/tests/check_search.cpp | 2 +- - qt5/tests/check_strings.cpp | 2 +- - 16 files changed, 16 insertions(+), 16 deletions(-) - -commit 26a067d4a84f80eeb892e30a5ab608d0fbea1de5 -Author: Albert Astals Cid -Date: Wed Sep 20 10:36:04 2017 +0200 - - Remove the moc includes - - Some people are having trouble with them and automoc really should - be taking care of this so no need to have the include. Let's hope this - doesn't break some other people :D - - qt5/demos/abstractinfodock.cpp | 1 - - qt5/demos/embeddedfiles.cpp | 1 - - qt5/demos/fonts.cpp | 1 - - qt5/demos/info.cpp | 1 - - qt5/demos/metadata.cpp | 1 - - qt5/demos/navigationtoolbar.cpp | 1 - - qt5/demos/optcontent.cpp | 1 - - qt5/demos/pageview.cpp | 1 - - qt5/demos/permissions.cpp | 1 - - qt5/demos/thumbnails.cpp | 1 - - qt5/demos/toc.cpp | 1 - - qt5/demos/viewer.cpp | 1 - - qt5/src/poppler-optcontent.cc | 1 - - 13 files changed, 13 deletions(-) - -commit 939465c40902d72e0c05d4f3a27ee67e4a007ed7 -Author: Albert Astals Cid -Date: Tue Sep 19 21:19:03 2017 +0200 - - Fix crash in broken files - - Bug #102854 - - poppler/Stream.cc | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) - -commit a8aa61f774503c9ebd840e148c4fa31a6959600d -Author: Albert Astals Cid -Date: Tue Sep 19 21:17:49 2017 +0200 - - autotools: Fix build - - qt5/src/Makefile.am | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 6b82904b717994c887f33bfc72e4999363fc8e72 -Author: Albert Astals Cid -Date: Sun Sep 17 23:03:48 2017 +0200 - - Fix printf-like format warnings - - poppler/Stream.h | 2 +- - test/perf-test.cc | 2 ++ - 2 files changed, 3 insertions(+), 1 deletion(-) - -commit b26924e32128b7ba57260e9fdc54be1893bcff77 -Author: Albert Astals Cid -Date: Sun Sep 17 02:06:32 2017 +0200 - - A few more static markers - - test/perf-test.cc | 2 +- - utils/pdftocairo-win32.cc | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit 4a4e291246f238731429729e10633ee1f627eb77 -Author: Albert Astals Cid -Date: Sun Sep 17 01:58:36 2017 +0200 - - Make newer gcc happy about fallthrough - - on HtmlOutputDev.cc fixes a leak when printHtml is false - - fofi/FoFiTrueType.cc | 2 ++ - poppler/Annot.cc | 4 ++-- - poppler/SplashOutputDev.cc | 8 ++++++++ - splash/Splash.cc | 2 ++ - utils/HtmlOutputDev.cc | 9 ++++----- - 5 files changed, 18 insertions(+), 7 deletions(-) - -commit 0790dd3afb8370aebca8e7e154bbd2b5ae5cd5a2 -Author: Albert Astals Cid -Date: Sat Sep 16 18:01:49 2017 +0200 - - Fix missing-declarations warnings - - ... and add it to default warning set - - cmake/modules/PopplerMacros.cmake | 2 +- - cpp/tests/poppler-dump.cpp | 2 +- - glib/poppler-action.cc | 1 + - goo/JpegWriter.cc | 2 +- - goo/gmem.h | 2 +- - poppler/Annot.cc | 6 ++-- - poppler/Decrypt.cc | 2 +- - poppler/TextOutputDev.cc | 2 +- - qt4/src/poppler-link.cc | 2 +- - qt4/src/poppler-private.cc | 6 ++-- - qt4/tests/check_links.cpp | 4 +-- - qt4/tests/poppler-forms.cpp | 14 ++++----- - qt5/src/poppler-link.cc | 2 +- - qt5/src/poppler-private.cc | 6 ++-- - qt5/tests/check_links.cpp | 4 +-- - qt5/tests/poppler-forms.cpp | 18 ++++++------ - test/perf-test-preview-dummy.cc | 4 +++ - test/perf-test.cc | 62 - +++++++++++++++++++-------------------- - utils/pdfinfo.cc | 4 +-- - utils/pdfseparate.cc | 2 +- - utils/pdfsig.cc | 6 ++-- - utils/pdftotext.cc | 2 +- - utils/pdfunite.cc | 6 ++-- - 23 files changed, 83 insertions(+), 78 deletions(-) - -commit afd91b148d3d0ba025821740ff4c075b1de2fdc5 -Author: Albert Astals Cid -Date: Sat Sep 16 17:47:42 2017 +0200 - - Fix warning: format ‘%x’ expects argument of type ‘unsigned - int*’, but argument 3 has type ‘int*’ - - poppler/UnicodeMap.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit a0ed20f3fb8025706ad9a580f6a692316bf6df66 -Author: Albert Astals Cid -Date: Sat Sep 16 17:45:42 2017 +0200 - - -Woverflow fixes - - cpp/poppler-private.cpp | 4 ++-- - glib/poppler-document.cc | 3 +-- - goo/GooString.cc | 6 ++++++ - goo/GooString.h | 1 + - poppler/Annot.cc | 9 +++------ - poppler/Form.cc | 13 +++++-------- - qt4/src/poppler-private.cc | 4 ++-- - qt5/src/poppler-private.cc | 4 ++-- - 8 files changed, 22 insertions(+), 22 deletions(-) - -commit d51cc34d7d51b6ddb7bfba318ed12bcbe763be6a -Author: Albert Astals Cid -Date: Sat Sep 16 17:35:15 2017 +0200 - - -pedantic fixes - - glib/poppler-media.cc | 2 +- - glib/poppler-movie.cc | 2 +- - glib/poppler-structure-element.cc | 2 +- - goo/glibc.h | 2 +- - poppler/StructElement.cc | 14 +++++++------- - utils/JSInfo.cc | 2 +- - 6 files changed, 12 insertions(+), 12 deletions(-) - -commit 804a823a67fedc3e633e89f817232d3c15715b56 -Author: Adrian Johnson -Date: Sat Sep 16 20:16:58 2017 +0930 - - cmake: restructure the warnings into a "default" and "extra" group - - Most of the previous warnings are now in default. Extra warnings that - should be fixed but currently result in a lot of warnings are in the - extra group. - - The old no/yes/kde COMPILE_WARNINGS option has been replaced with the - boolean option EXTRA_WARN (default off) to enable the extra warnings. - - CMakeLists.txt | 18 +++++------------- - cmake/modules/PopplerMacros.cmake | 32 ++++++++++++++++++++++++-------- - 2 files changed, 29 insertions(+), 21 deletions(-) - -commit 6d40d4bad46ce1b53624feca7410b35e4fe0048d -Author: Albert Astals Cid -Date: Fri Sep 15 01:07:59 2017 +0200 - - CurlPDFDocBuilder don't crash if given a url that doesn't exist - - poppler/CurlPDFDocBuilder.cc | 6 ++++++ - 1 file changed, 6 insertions(+) - -commit cc43c720e857548175a9e35b0686a1a7a8957f50 -Author: Oliver Sander -Date: Fri Aug 18 11:51:06 2017 +0200 - - Replace Splash font rendering by Qt font rendering - - Previously, the Arthur backend would use Splash code to do - its font rendering. That was not a satisfactory solution: - Qt can do font rendering directly. Also, the Splash font - rendering in the Arthur code had a few bugs, which lead - to legible-but-not-pretty fonts. - - This patch replaces the Splash font rendering by Qt font - rendering. Some Splash code will have to remain, because - Qt seems unable to do the proper charcode-to-glyph-index - transformations. - - I took a lot of inspiration from Mihai Niculescu's patch at - - https://lists.freedesktop.org/archives/poppler/2013-June/010370.html - - That's why the patch adds Mihai's name in the copyright list. - - qt5/src/ArthurOutputDev.cc | 254 - +++++++++++++++++++++++++-------------------- - qt5/src/ArthurOutputDev.h | 31 +++++- - splash/SplashFTFontFile.cc | 4 + - splash/SplashFTFontFile.h | 3 + - 4 files changed, 177 insertions(+), 115 deletions(-) - -commit da63c35549e8852a410946ab016a3f25ac701bdf -Author: Albert Astals Cid -Date: Thu Sep 14 19:14:41 2017 +0200 - - FoFiType1C::convertToType0: Fix crash in broken files - - Bug #102724 - - fofi/FoFiType1C.cc | 3 +++ - 1 file changed, 3 insertions(+) - -commit 504b3590182175390f474657a372e78fb1508262 -Author: Albert Astals Cid -Date: Thu Sep 14 19:14:23 2017 +0200 - - Splash::scaleImage: Do not try to scale if srcHeight or srcWidth - are < 1 - - Bug #102719 - - splash/Splash.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 500ce88a3b5b0bd556ac6941ba66a86cae44663a -Author: Oliver Sander -Date: Wed Sep 13 12:12:29 2017 +0200 - - Fix two minor typos - - qt5/tests/test-render-to-file.cpp | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 80f9819b6233f9f9b5fd44f0e4cad026e5d048c2 -Author: Albert Astals Cid -Date: Wed Sep 13 23:09:45 2017 +0200 - - isImageInterpolationRequired: Fix divide by 0 on broken documents - - Bug #102688 - - splash/Splash.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit aaf5327649e8f7371c9d3270e7813c43ddfd47ee -Author: Albert Astals Cid -Date: Wed Sep 13 23:01:03 2017 +0200 - - Gfx::doShowText: Fix infinite recursion on broken files - - Bug #102701 - - poppler/Gfx.cc | 25 +++++++++++++++++++++++-- - poppler/Gfx.h | 1 + - poppler/GfxFont.cc | 8 ++++++++ - poppler/GfxFont.h | 1 + - 4 files changed, 33 insertions(+), 2 deletions(-) - -commit 476394e7a025e02e4897da2e765df2c895d0708f -Author: Albert Astals Cid -Date: Wed Sep 13 22:58:14 2017 +0200 - - XRef::parseEntry: Fix crash in broken file - - Bug #102687 - - poppler/XRef.cc | 3 +++ - 1 file changed, 3 insertions(+) - -commit 0f891b85169dabd3d23348aba40266547bd4bcf6 -Author: Adrian Johnson -Date: Wed Sep 13 20:12:52 2017 +0930 - - pdfinfo: don't truncate dest name - - utils/pdfinfo.cc | 1 - - 1 file changed, 1 deletion(-) - -commit 951e7b3c1f337ceaf490edce3c575f89c45cb6d4 -Author: Adrian Johnson -Date: Wed Sep 13 19:24:07 2017 +0930 - - cmake: ensure user cflags/cxxflags are appended to end - - cmake/modules/PopplerMacros.cmake | 44 - +++++++++++++++++++++------------------ - 1 file changed, 24 insertions(+), 20 deletions(-) - -commit a5c616a65a77bf597836cced6f987e5b93480ca5 -Author: Adrian Johnson -Date: Mon Sep 11 20:55:01 2017 +0930 - - cmake INSTALL file - - INSTALL.cmake | 76 - +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 76 insertions(+) - -commit a5e5649ecf16fa05770620dbbd4985935dc2bbff -Author: Albert Astals Cid -Date: Mon Sep 11 12:35:16 2017 +0200 - - Fix crash in FoFiType1C::convertToType0 in broken files - - Bug #102653 - - fofi/FoFiType1C.cc | 435 - +++++++++++++++++++++++++++-------------------------- - 1 file changed, 220 insertions(+), 215 deletions(-) - -commit 325887ebef8ea1c6ef9d3607a59d95ffea383986 -Author: Albert Astals Cid -Date: Sun Sep 10 17:41:47 2017 +0200 - - Make JBIG2Stream::readGenericBitmap return cleanly on error - - instead of causing abort - - Also fixes warning when compiled with newer gcc - - poppler/JBIG2Stream.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit f253a28f4c5bb65c363d31b8b46f984c660499ee -Author: Albert Astals Cid -Date: Fri Sep 8 19:05:36 2017 +0200 - - qt5: in development -> is stable - - The API itself is done-ish even if it gets improvements from time to - time. In development seems to imply "don't use me yet" - - qt5/src/Mainpage.dox | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 1316c7a41f4dd7276f404f775ebb5fef2d24ab1c -Author: Albert Astals Cid -Date: Fri Sep 8 18:29:42 2017 +0200 - - Annot: Fix crash on broken files - - Bug #102607 - - poppler/Annot.cc | 42 +++++++++++++++++++++++------------------- - 1 file changed, 23 insertions(+), 19 deletions(-) - -commit 2532df6060092e9fab7f041ae9598aff9cdd94bb -Author: Albert Astals Cid -Date: Fri Sep 8 18:28:15 2017 +0200 - - Annot: Fix crash on broken files - - Bug #102601 - - poppler/Annot.cc | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit 6472d8493f7e82cc78b41da20a2bf19fcb4e0a7d -Author: Albert Astals Cid -Date: Fri Sep 8 18:26:05 2017 +0200 - - SplashOutputDev: Fix crash on broken files - - Bug #102604 - - poppler/SplashOutputDev.cc | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -commit 3ab44e2a77b560198c1e1616cfb39c1ac7374e29 -Author: Albert Astals Cid -Date: Fri Sep 8 18:21:40 2017 +0200 - - Remove unmaintained TODO file - - TODO | 40 ---------------------------------------- - 1 file changed, 40 deletions(-) - -commit dfcf997e6fbca31dbe051fbd9c32aca818825e38 -Author: Hans-Ulrich Jüttner -Date: Wed Sep 6 11:03:52 2017 +0200 - - Added methods to get and set the font size of text fields - - Fixes bug #101692 - - poppler/Annot.cc | 24 +++---------- - poppler/Form.cc | 92 - +++++++++++++++++++++++++++++++++++++++++++++++++ - poppler/Form.h | 16 +++++++++ - qt5/src/poppler-form.cc | 12 ++++++- - qt5/src/poppler-form.h | 10 ++++++ - 5 files changed, 134 insertions(+), 20 deletions(-) - -commit 0bda8bb8eda838316a61238441665abfd24eb020 -Author: Oliver Sander -Date: Thu Sep 7 19:55:54 2017 +0200 - - Disable glib if cairo is not found - - CMakeLists.txt | 1 + - 1 file changed, 1 insertion(+) - -commit 118cd73a3c4eba78bbfed16cfc2996dec5491944 -Author: Albert Astals Cid -Date: Wed Sep 6 19:42:26 2017 +0200 - - cmake: Give people the option to build poppler as a static library - - CMakeLists.txt | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 766a32ff59dadd9ae4639d8a79861a17be6aec52 -Author: Adrian Johnson -Date: Tue Sep 5 20:55:45 2017 +0930 - - cmake: add options to disable glib/qt4/qt5 - - CMakeLists.txt | 54 - ++++++++++++++++++++++++++++++++++-------------------- - 1 file changed, 34 insertions(+), 20 deletions(-) - -commit 101aba9a8d6623bca419946262fea6b46a790454 -Author: Albert Astals Cid -Date: Tue Sep 5 19:34:12 2017 +0200 - - cmake: Fix build when using a cairo different than the system one - - glib/demo/CMakeLists.txt | 2 +- - test/CMakeLists.txt | 4 ++-- - 2 files changed, 3 insertions(+), 3 deletions(-) - -commit 1d3f00e8c53dbbd3a8409993b7b66667df434b5d -Author: Adrian Johnson -Date: Tue Sep 5 06:39:49 2017 +0930 - - ignore build directory - - .gitignore | 1 + - 1 file changed, 1 insertion(+) - -commit 340a99f580b9f7b6add831e9a0252574bfea66f2 -Author: Oliver Sander -Date: Fri Sep 1 22:16:49 2017 +0200 - - Control whether renderToImage shows annotations - - I'd like to control whether the renderToImage and renderToPainter - methods show annotations or not. To this end, this patch introduces - a new value 'HideAnnotations' to the Document::RenderHint enum. - - qt5/src/poppler-page.cc | 36 ++++++++++++++++++++++++++++++++++-- - qt5/src/poppler-qt5.h | 3 ++- - 2 files changed, 36 insertions(+), 3 deletions(-) - -commit dd80c182cbcb188af0dd590f222ba9bbb31e3fb7 -Author: Albert Astals Cid -Date: Mon Sep 4 19:36:06 2017 +0200 - - Fix building with old clang - - poppler/StructElement.cc | 2 ++ - 1 file changed, 2 insertions(+) - -commit a22cd0badbc177f8a2eedb0386895ddf3379c618 -Author: Albert Astals Cid -Date: Sun Sep 3 23:35:08 2017 +0200 - - Initial make dist support in cmake - - .gitattributes | 5 +++++ - CMakeLists.txt | 9 +++++++++ - 2 files changed, 14 insertions(+) - -commit 85bfedad416906b1a5dff377d470387692b5ca70 -Author: Albert Astals Cid -Date: Sun Sep 3 22:54:32 2017 +0200 - - Poppler 0.59 - - CMakeLists.txt | 4 ++-- - NEWS | 15 +++++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/Doxyfile | 2 +- - qt5/src/Doxyfile | 2 +- - 7 files changed, 22 insertions(+), 7 deletions(-) - -commit 98b4c23cf6f6eb0dbc167ed0606932b0d8de39f1 -Author: Albert Astals Cid -Date: Sun Sep 3 22:50:31 2017 +0200 - - Update (C) - - utils/pdfinfo.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 5c8dfc90603111aea36add20c88abde79a351d85 -Author: Albert Astals Cid -Date: Sun Sep 3 22:32:09 2017 +0200 - - Remove the old if/else cmake syntax - - that was weird and forced you to replicate the if clause in the - else and - endif - - CMakeLists.txt | 154 - +++++++++++++++++++++++------------------------ - cpp/tests/CMakeLists.txt | 2 +- - glib/CMakeLists.txt | 2 +- - qt4/src/CMakeLists.txt | 2 +- - qt4/tests/CMakeLists.txt | 8 +-- - qt5/src/CMakeLists.txt | 2 +- - qt5/tests/CMakeLists.txt | 8 +-- - test/CMakeLists.txt | 10 +-- - utils/CMakeLists.txt | 10 +-- - 9 files changed, 99 insertions(+), 99 deletions(-) - -commit 251bb42e9af251c86b8fec120e14972ac7c07106 -Author: Albert Astals Cid -Date: Sun Sep 3 22:23:18 2017 +0200 - - Remove the check for cmake >= 2.8.8 since we're requiring 3.1 already - - CMakeLists.txt | 25 ++++++++++--------------- - 1 file changed, 10 insertions(+), 15 deletions(-) - -commit 3ea09e735f81a2a16a204388bc474871aaa10271 -Author: Adrian Johnson -Date: Sat Sep 2 17:50:58 2017 +0930 - - Fix warning when compiling with cygwin - - ImageOutputDev.cc:532:14: warning: ‘f’ may be used uninitialized - in this function [-Wmaybe-uninitialized] - - utils/ImageOutputDev.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 6ef21aea5bb8b87f9a7e9217c316cd5e10612a62 -Author: Adrian Johnson -Date: Sat Sep 2 17:50:35 2017 +0930 - - Fix cygwin 32-bit compile - - poppler/goo/gfile.cc: In function ‘GBool openTempFile(GooString**, - FILE**, const char*)’: - poppler/goo/gfile.cc:409:37: error: ‘mkstemp’ was not declared - in this scope - fd = mkstemp((*name)->getCString()); - ^ - poppler/goo/gfile.cc:417:39: error: ‘fdopen’ was not declared - in this scope - if (fd < 0 || !(*f = fdopen(fd, mode))) { - ^ - poppler/goo/gfile.cc: In function ‘int Gfseek(FILE*, Goffset, - int)’: - poppler/goo/gfile.cc:558:34: error: ‘fseeko’ was not declared - in this scope - return fseeko(f, offset, whence); - ^ - poppler/goo/gfile.cc: In function ‘Goffset Gftell(FILE*)’: - poppler/goo/gfile.cc:572:18: error: ‘ftello’ was not declared - in this scope - return ftello(f); - ^ - - cmake/modules/PopplerMacros.cmake | 2 +- - configure.ac | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit 048237db6a7122a5769a15c7dd3ae3680e06e9bb -Author: Albert Astals Cid -Date: Sat Sep 2 22:59:32 2017 +0200 - - pdfunite: Fix API porting error that caused abort in some cases - - We need to check for xRef->getTrailerDict() existing before accessing - xRef->getDocInfo(); - - poppler/PDFDoc.cc | 14 ++++++++------ - 1 file changed, 8 insertions(+), 6 deletions(-) - -commit 4459d817194431f4f00553d5ad67b960a37e4c9d -Author: Adrian Johnson -Date: Sat Sep 2 20:16:44 2017 +0930 - - pdfinfo: use GooString.append instead of sprintf/strcat - - https://lists.freedesktop.org/archives/poppler/2017-September/012437.html - - utils/pdfinfo.cc | 46 +++++++++++++++++++++++----------------------- - 1 file changed, 23 insertions(+), 23 deletions(-) - -commit 267ff8af69ae7e8526d9bfe5063207c87a9b70b5 -Author: Albert Astals Cid -Date: Sat Sep 2 13:27:33 2017 +0200 - - Fix infinite recursion in NameTree parsing in broken files - - poppler/Catalog.cc | 16 +++++++++++++--- - poppler/Catalog.h | 2 +- - 2 files changed, 14 insertions(+), 4 deletions(-) - -commit c5487b653b1c37882af32a25296611e64d7ba867 -Author: Albert Astals Cid -Date: Sat Sep 2 11:55:17 2017 +0200 - - pdfinfo: -dests don't crash in broken documents - - That have pages that don't have ref - - utils/pdfinfo.cc | 38 ++++++++++++++++++++------------------ - 1 file changed, 20 insertions(+), 18 deletions(-) - -commit 10660b359dc960f4b0f3728243c64eec79c39851 -Author: Albert Astals Cid -Date: Sat Sep 2 11:50:00 2017 +0200 - - pdfinfo: Fix memory leaks when using -dests - - utils/pdfinfo.cc | 10 +++++++++- - 1 file changed, 9 insertions(+), 1 deletion(-) - -commit ea6174def73f7478ae76843bb88ef85c5a6150f9 -Author: Albert Astals Cid -Date: Sat Sep 2 11:31:51 2017 +0200 - - pdfinfo: Fix crash if getDest* returns nullptr - - utils/pdfinfo.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 73e12716f3e4643c2ea13421902b8220596454d7 -Author: Albert Astals Cid -Date: Fri Sep 1 20:11:27 2017 +0200 - - Poppler 0.58 - - CMakeLists.txt | 4 ++-- - NEWS | 30 ++++++++++++++++++++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/Doxyfile | 2 +- - qt5/src/Doxyfile | 2 +- - 7 files changed, 37 insertions(+), 7 deletions(-) - -commit 8a5c7be5b5772672b34638532793cf62be78e9b8 -Author: Albert Astals Cid -Date: Fri Sep 1 20:02:17 2017 +0200 - - Add missing includes - - goo/JpegWriter.cc | 2 +- - goo/JpegWriter.h | 2 +- - goo/gfile.cc | 1 + - goo/gfile.h | 1 + - poppler/CairoOutputDev.cc | 2 +- - poppler/Gfx.cc | 2 +- - poppler/GlobalParams.cc | 1 + - poppler/GlobalParamsWin.cc | 2 ++ - poppler/Outline.cc | 1 + - poppler/Stream.cc | 2 +- - poppler/Stream.h | 2 +- - splash/SplashBitmap.cc | 2 +- - splash/SplashBitmap.h | 2 +- - utils/pdftocairo.cc | 2 +- - 14 files changed, 15 insertions(+), 9 deletions(-) - -commit 26f64a2a34a9273897c34045ea7af5e8c3c603cb -Author: Albert Astals Cid -Date: Thu Aug 31 15:37:07 2017 +0200 - - cmake: enable glib for windows too - - There's no need to not having it enabled - - cmake/modules/FindGLIB.cmake | 9 +++------ - 1 file changed, 3 insertions(+), 6 deletions(-) - -commit 90bc39daf9d3276b166b4c88e1d2c1988aa41c71 -Author: Oliver Sander -Date: Mon Aug 28 10:25:12 2017 +0200 - - Document some parameters of the drawChar method - - Thanks to Adrian Johnson, who explained their meaning to me. - - poppler/OutputDev.h | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -commit 59e6e9b3e4d77229051cafeeeb65a82e9a966204 -Author: Albert Astals Cid -Date: Sun Aug 27 12:54:03 2017 +0200 - - Add missing inlcudes when compiling with cmake+mingw - - utils/pdftocairo-win32.cc | 3 +++ - 1 file changed, 3 insertions(+) - -commit 13cf327cd512ebc26c8bd31cdd80d61027634bcb -Author: Albert Astals Cid -Date: Sun Aug 27 12:51:19 2017 +0200 - - cmake: Use -std=c++11 instead of -std=gnu++11 - - CMakeLists.txt | 1 + - 1 file changed, 1 insertion(+) - -commit 1602610ce2bbab2feb0177f0876e1ed0ee40a472 -Author: Tobias C. Berner -Date: Sun Aug 27 12:16:05 2017 +0200 - - Include time.h for time_t - - qt5/src/poppler-form.h | 2 ++ - 1 file changed, 2 insertions(+) - -commit 40cb9f4bf6f35ea62bc7b9e5c23008f98ebd4b36 -Author: Albert Astals Cid -Date: Thu Aug 24 11:14:34 2017 +0200 - - Fix build with mingw - - config.h.cmake | 6 ++++++ - poppler/GlobalParamsWin.cc | 21 ++++++--------------- - poppler/Link.cc | 14 ++------------ - poppler/PDFDoc.cc | 4 +--- - 4 files changed, 15 insertions(+), 30 deletions(-) - -commit 5be33ba49071a9ffeb62be93e5dc01267318d1c2 -Author: Adrian Johnson -Date: Wed Aug 23 21:00:09 2017 +0930 - - Fix Outline title - - poppler/Outline.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 1b84a71ee2550ae4b14cb1e40576de1f022eb2e8 -Author: Oliver Sander -Date: Tue Aug 22 11:43:08 2017 +0200 - - Use Qt::SvgMiterJoin instead of Qt::MiterJoin - - The two differ in what happens when the miter limit is exceeded. - According to - - https://bugreports.qt.io/browse/QTBUG-52640 - - Qt::SvgMiterJoin is what the pdf standard requires. - - Closes: https://bugs.freedesktop.org/show_bug.cgi?id=102356 - - qt5/src/ArthurOutputDev.cc | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -commit 0793b6740121f4af07360800bebdc6238fc43087 -Author: Oliver Sander -Date: Sun Aug 13 19:47:15 2017 +0200 - - Document the updateCTM method - - poppler/OutputDev.h | 7 +++++++ - 1 file changed, 7 insertions(+) - -commit 488d28ec9507eb99c7cb4cd2cafb54995a8bc9f8 -Author: Adrian Johnson -Date: Wed Aug 16 21:01:07 2017 +0930 - - pdfimages: support listing/extracting inline images - - The difficulty with extracting inline images is that inline images do - not provide any way of determining the length or end of image data - without decoding the image. We can get the length by using ImageStream - to decode the data then check the stream position. But then we are - still unable to extract the undecoded image data because embedded - streams can only be read once. - - Since inline images tend to be small the solution implemented is to - modify EmbedStream to keep a copy of the data read from it in memory - and then allow the data to be read again. - - Two new functions have been added to EmbedStream. rewind() will cause - EmbedStream.getChar() to stop recording data and switch to replaying - the saved data, returning EOF when the end of the saved data is - reached. The restore() function will make getChar() switch back to - reading from the parent stream. - - ImageOutputDev can now extract or get the image size by first using - ImageStream to read data from the embedded stream. After calling - rewind() the undecoded image data can be read from the embedded stream - until EOF is returned. Then restore() is called so that Gfx can read - the 'EI' from the end of the embedded stream. - - Bug 25625 - - poppler/Gfx.cc | 2 +- - poppler/Stream.cc | 96 - +++++++++++++++++++++++++++++++++++++++++++------ - poppler/Stream.h | 14 ++++++-- - utils/ImageOutputDev.cc | 67 ++++++++++++++++++++++++++++++---- - utils/ImageOutputDev.h | 1 + - 5 files changed, 159 insertions(+), 21 deletions(-) - -commit b9030a069756c84669ed6f408399cc7e2ce4fd10 -Author: Adrian Johnson -Date: Sun Jul 16 12:23:28 2017 +0930 - - pdftoppm: add -jpegopt for setting jpeg compression parameters - - Bug 45727 - - splash/SplashBitmap.cc | 25 ++++++++++++---- - splash/SplashBitmap.h | 15 ++++++++-- - utils/pdftoppm.1 | 15 ++++++++++ - utils/pdftoppm.cc | 80 - ++++++++++++++++++++++++++++++++++++++++++++++---- - 4 files changed, 120 insertions(+), 15 deletions(-) - -commit dd54243f00557e84dba887403912d12463c8b1e9 -Author: Adrian Johnson -Date: Sat Jul 15 21:26:29 2017 +0930 - - pdftocairo: add -jpegopt for setting jpeg compression parameters - - Bug 45727 - - goo/JpegWriter.cc | 10 ++++++++ - goo/JpegWriter.h | 2 ++ - utils/pdftocairo.1 | 17 ++++++++++++- - utils/pdftocairo.cc | 71 - +++++++++++++++++++++++++++++++++++++++++++++++++++++ - 4 files changed, 99 insertions(+), 1 deletion(-) - -commit 00a536a455e4dd396c6b8b74d3e6a5c82d987eed -Author: Adrian Johnson -Date: Wed Aug 16 21:21:58 2017 +0930 - - cairo 1.14 now has high quality downscaling - - The filter needs to be GOOD or BEST to activate the high quality - downscaling. - - poppler/CairoOutputDev.cc | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -commit 535bc8eeaf8d354a84129fe00c3a5e3ac0a85aa3 -Author: Christoph Cullmann -Date: Wed Aug 16 21:11:36 2017 +0930 - - win32: call ANSI functions directly - - to be able to compile with different -DUNICODE variants - - Bug 100312 - - goo/gfile.cc | 14 +++++++------- - goo/gfile.h | 2 +- - poppler/GlobalParams.cc | 2 +- - poppler/GlobalParamsWin.cc | 20 ++++++++++---------- - 4 files changed, 19 insertions(+), 19 deletions(-) - -commit a8d670b59b0301040e716f3a11a78fce1177337d -Author: Adrian Johnson -Date: Tue Aug 15 21:35:27 2017 +0930 - - pdfinfo: add -dests option to print named destinations - - Bug 97262 - - utils/pdfinfo.1 | 4 ++ - utils/pdfinfo.cc | 140 - ++++++++++++++++++++++++++++++++++++++++++++++++++++++- - 2 files changed, 143 insertions(+), 1 deletion(-) - -commit 6d3239a2fd04595fecfb81a8703794877f4d8dec -Author: Adrian Johnson -Date: Tue Aug 15 20:09:25 2017 +0200 - - Fix build with autotools - - qt5/src/Makefile.am | 1 + - utils/Makefile.am | 4 ++++ - 2 files changed, 5 insertions(+) - -commit b56a697c58bcf09063827b9c109be9c04a033b8a -Author: Albert Astals Cid -Date: Tue Aug 15 12:25:26 2017 +0200 - - Improvements to the previous Signature commit - - * Remove FormWidgetSignature::setFormSignatureType, the API was - weird, - make it be an output parameter of getCheckedSignature - - * include cleanup - - * Make validation time mandatory, marking to use -1 for *now* - - * Remove setFormSignatureType noone uses - - * Fix compilation wihtout NSS3 - - * Don't static cast between NSS3 HASH_HashType and poppler-qt5 - HashAlgorithm - - * Actually pass validationTime down in FormFieldSignature::validate - - * Add since markers to poppler-qt5 functions/enums - - * Fix spacing - - * Remove SignatureValidationInfo::signingDateTime that returns - QDateTime, having two functions that return the same is a bit - confusing, - and we're not filling the timezone info anyway, so let it be a time_t - - poppler/Form.cc | 17 ++++--------- - poppler/Form.h | 20 ++++++---------- - poppler/SignatureHandler.h | 5 ++-- - poppler/SignatureInfo.cc | 7 +++++- - poppler/SignatureInfo.h | 4 ++-- - qt5/src/poppler-form.cc | 52 ++++++++++++++++++++++------------------ - qt5/src/poppler-form.h | 59 - +++++++++++++++++++++++++++++----------------- - utils/pdfsig.cc | 25 +++++--------------- - 8 files changed, 96 insertions(+), 93 deletions(-) - -commit a81700dfa638872fe9641289971ca9a2b50b42ad -Author: Hans-Ulrich Jüttner -Date: Tue Aug 15 10:27:26 2017 +0200 - - Various signature related improvements - - Export signature via Qt5 interface. - Add support for signatures of SubFilter "ETSI.CAdES.detached". - Add an optional validation time to method validateSignature(). - Print full Subject Distinguished Name, signing time, hash algorithm - and a statement wether the total document is signed in pdfsig. - - Fixes bug #99271 - - poppler/Form.cc | 178 - ++++++++++++++++++++++++++++++++++++++++++-- - poppler/Form.h | 34 ++++++++- - poppler/SignatureHandler.cc | 34 ++++++++- - poppler/SignatureHandler.h | 5 +- - poppler/SignatureInfo.cc | 33 +++++++- - poppler/SignatureInfo.h | 9 ++- - qt5/src/poppler-form.cc | 112 ++++++++++++++++++++++++++++ - qt5/src/poppler-form.h | 58 +++++++++++++++ - utils/pdfsig.1 | 6 +- - utils/pdfsig.cc | 73 ++++++++++++++++++ - 10 files changed, 523 insertions(+), 19 deletions(-) - -commit e15a0df15b89e1c7ba98cd7bbbf8ef97e541d231 -Author: Hannah von Reth -Date: Sun Aug 13 20:26:44 2017 +0200 - - Remove old/wrong cmake code for MSVC - - cpp/CMakeLists.txt | 3 --- - 1 file changed, 3 deletions(-) - -commit 236f4ff4f516cb68a2d102627b0a3da73578c67f -Author: Hannah von Reth -Date: Sun Aug 13 20:24:15 2017 +0200 - - Use WIN32_LEAN_AND_MEAN on Windows - - CMakeLists.txt | 2 ++ - 1 file changed, 2 insertions(+) - -commit 1abf98b76ba134adc44883cd2ae345f769ca0d5a -Author: Oliver Sander -Date: Sat Aug 12 16:42:40 2017 +0200 - - qt5: ArthurOutputDev: Properly set the QPainter transformation - - Previously, the code did not touch the QPainter world transformation - matrix. Rather, the code contained ad hoc coordinate transformations - scattered throughout the code. This patch does a cleanup: the - QPainter - transformation matrix is set properly, and the hand-coded - transformations are removed. This should not affect the rendering - output, but it makes the current (and future!) code simpler to - read and write. - - qt5/src/ArthurOutputDev.cc | 56 - ++++++++++++++++++++++++---------------------- - qt5/src/ArthurOutputDev.h | 4 ++++ - 2 files changed, 33 insertions(+), 27 deletions(-) - -commit 2baaa02087ef66b97bf3c4bce49785a10632178f -Author: Albert Astals Cid -Date: Sun Aug 13 12:35:39 2017 +0200 - - Revert part of last commit, we wants tests not to fail :) - - qt5/tests/check_metadata.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 3af2e18fc31f18efb36408281ca5879f284edaa4 -Author: Oliver Sander -Date: Fri Aug 11 22:55:41 2017 +0200 - - Fix copy'n'paste bugs: Qt4 -> Qt5 - - qt5/src/ArthurOutputDev.h | 2 +- - qt5/src/poppler-annotation.h | 2 +- - qt5/tests/check_metadata.cpp | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - -commit a9581e624fa62b3905b790ac10d1349b1f96048a -Author: Roland Hieber -Date: Fri Aug 11 11:44:26 2017 +0200 - - Form.h: fix error: 'vector' in namespace 'std' does not name a type - - Bug #102147 - - Original error message while compiling with - OSELAS.Toolchain-2016.06.1-arm-v7a-linux-gnueabi, - gcc-5.4.0-glibc-2.23-binutils-2.26-kernel-4.6-sanitized: - - make[5]: Entering directory - '/ptx/work/dude/WORK_B/rhi/OSELAS.BSP-Miele-PST/platform-cpu20/build-target/poppler-0.57.0/qt4/src' - CXX libpoppler_qt4_la-poppler-form.lo - In file included from poppler-form.cc:26:0: - ../../poppler/Form.h:544:14: error: 'vector' in namespace - 'std' does not name a template type - ../../poppler/Form.h:556:8: error: 'vector' in namespace - 'std' does not name a template type - Makefile:735: recipe for target - 'libpoppler_qt4_la-poppler-form.lo' failed - - configure arguments were: - - --prefix=/usr --sysconfdir=/etc --localstatedir=/var - --libdir=/usr/lib --host=arm-v7a-linux-gnueabi - --build=x86_64-host-linux-gnu --enable-option-checking - --disable-silent-rules --disable-dependency-tracking - --enable-shared --enable-fast-install --enable-libtool-lock - --enable-xpdf-headers --enable-build-type=release - --disable-single-precision --enable-fixedpoint --enable-cmyk - --disable-relocatable --enable-libopenjpeg=none - --disable-libnss - --disable-libtiff --enable-largefile --enable-zlib - --disable-zlib-uncompress --enable-libcurl - --enable-dctdecoder=libjpeg --enable-libpng - --disable-splash-output --enable-cairo-output - --enable-poppler-glib --disable-introspection - --disable-gtk-doc - --disable-gtk-doc-html --disable-gtk-doc-pdf - --enable-poppler-qt4 --disable-poppler-qt5 - --enable-poppler-cpp - --disable-gtk-test --enable-utils --disable-compile-warnings - --enable-cms=lcms1 --without-x - --with-font-configuration=fontconfig --without-libiconv-prefix - --with-testdatadir= - - Signed-off-by: Roland Hieber - - poppler/Form.h | 2 ++ - 1 file changed, 2 insertions(+) - -commit f0ecbc6f988aa19ffb2b7e583dca4e609f2f6c65 -Author: Thomas Freitag -Date: Thu Aug 10 09:17:27 2017 +0200 - - Tweak which cmap we use - - Bug #101855 - - poppler/GfxFont.cc | 20 +++++++++----------- - 1 file changed, 9 insertions(+), 11 deletions(-) - -commit 7e844eae94bc4eda1c6dcc3460840b25f4ca7898 -Author: Oliver Sander -Date: Wed Aug 9 11:09:50 2017 +0200 - - qt5: Arthur: initialize the image with the paper color - - Bug #102129 - - qt5/src/poppler-page.cc | 8 ++++++++ - 1 file changed, 8 insertions(+) - -commit d7b800933e1b57c180247708991f5c3a282f8305 -Author: Jason Alan Palmer -Date: Wed Aug 9 00:41:05 2017 +0200 - - cpp: Fix page.text() not taking page orientation into account - - Bug #94517 - - cpp/poppler-page.cpp | 10 +++++++++- - cpp/tests/poppler-dump.cpp | 3 ++- - 2 files changed, 11 insertions(+), 2 deletions(-) - -commit cd04a81343fd5cba824a891f25c01eeffee5f906 -Author: Albert Astals Cid -Date: Tue Aug 8 22:42:46 2017 +0200 - - Fix use of uninitialized value use - - Bug #102117 - - poppler/XRef.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit fe97135ffb18eaaec7d23a7394641ba103bfe48d -Author: Albert Astals Cid -Date: Tue Aug 1 19:30:28 2017 +0200 - - Make the openjpeg1 code compile with the new Object API - - poppler/JPEG2000Stream.cc | 13 ++++--------- - 1 file changed, 4 insertions(+), 9 deletions(-) - -commit e5ff049c3d11e6ea24b624807730acd21a6ef4d5 -Author: Albert Astals Cid -Date: Tue Aug 1 01:07:00 2017 +0200 - - Gfx::doImage: Simplify memory management - - of maskColorMap by using a std::unique_ptr - - Fixes a memory leak reported by Coverity - - poppler/Gfx.cc | 10 ++++------ - 1 file changed, 4 insertions(+), 6 deletions(-) - -commit 19eda068ae1866e4f46efc9534b34779007fdc16 -Author: Albert Astals Cid -Date: Tue Aug 1 00:53:52 2017 +0200 - - Fix memory leak on corner case condition - - poppler/Parser.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit dbe7a5da3dce56210bd4ca2deaf8f5ad4a9d0529 -Merge: 687474e1 c167f35b -Author: Albert Astals Cid -Date: Tue Aug 1 00:12:13 2017 +0200 - - Merge remote-tracking branch 'origin/master' into better_object - -commit c167f35b8c3fd7e94fa97385949b2c133d918ed4 -Author: Albert Astals Cid -Date: Mon Jul 31 23:39:37 2017 +0200 - - Poppler 0.57 - - CMakeLists.txt | 4 ++-- - NEWS | 14 ++++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/Doxyfile | 2 +- - qt5/src/Doxyfile | 2 +- - 7 files changed, 21 insertions(+), 7 deletions(-) - -commit be0384d2220a75d2666b1fd2228e156b1595a57f -Author: Albert Astals Cid -Date: Mon Jul 31 23:34:57 2017 +0200 - - Add missing (C) - - poppler/StructTreeRoot.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 0e7f6cb1c42db3d65395365833472ff859def87a -Author: Jannick -Date: Mon Jul 31 19:53:12 2017 +0200 - - Fix some warnings in some unusual #ifdef combinations - - Bug #101812 - - poppler/PSOutputDev.cc | 2 +- - poppler/Stream.cc | 5 ++--- - 2 files changed, 3 insertions(+), 4 deletions(-) - -commit f55d6a64dd3f69fa9c1ba984218809cc50c9b052 -Author: Albert Astals Cid -Date: Mon Jul 31 19:45:32 2017 +0200 - - Add missing (C) - - utils/pdfseparate.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 543b0ea219191122fee0583ce62c19e31de34109 -Author: Roland Hieber -Date: Mon Jul 17 11:35:32 2017 +0200 - - configure.ac: fix --disable-FEATURE actually enabling the feature - - Forwarded: https://bugs.freedesktop.org/show_bug.cgi?id=101818 - - A frequently seen antipattern is to use - AC_ARG_ENABLE(feature, help, action-if-given, action-if-not-given) as - AC_ARG_ENABLE(feature, help, action-if-enabled, action-if-disabled). - However, action-if-given is also evaluated for --disable-FEATURE (with - enableval=no), which results in --disable-FEATURE and --enable-FEATURE - doing the same in this case. - - Rewrite the single-precision, fixedpoint and cmyk arguments - accordingly - so the user is not confused if they explicitely want to disable those - options. - - Signed-off-by: Roland Hieber - - configure.ac | 32 ++++++++++++++++++++++++++------ - 1 file changed, 26 insertions(+), 6 deletions(-) - -commit 92ad743b63c3e82211ea0b2e4d4471dd3f71cebc -Author: Léonard Michelet -Date: Mon Jul 31 19:40:06 2017 +0200 - - pdfseparate: minor improvement to the documentation - - Bug #101800 - - utils/pdfseparate.1 | 7 ++++--- - utils/pdfseparate.cc | 2 +- - 2 files changed, 5 insertions(+), 4 deletions(-) - -commit 0a2096743fa749a8a7d4caa714eecbe8a9661619 -Author: Albert Astals Cid -Date: Mon Jul 31 16:52:46 2017 +0200 - - Add some more overrides - - poppler/CurlCachedFile.h | 4 ++-- - poppler/CurlPDFDocBuilder.h | 4 ++-- - 2 files changed, 4 insertions(+), 4 deletions(-) - -commit 687474e17db59482dc4538740701bdb32bc9d6bd -Author: Albert Astals Cid -Date: Mon Jul 31 16:47:31 2017 +0200 - - Build++ - - poppler/CurlPDFDocBuilder.cc | 5 +---- - poppler/Stream.cc | 2 +- - 2 files changed, 2 insertions(+), 5 deletions(-) - -commit 66e718e753a527289ce86cd206fcffd23fc28d81 -Merge: 9cecd78f 213ae24b -Author: Albert Astals Cid -Date: Mon Jul 31 16:39:53 2017 +0200 - - Merge remote-tracking branch 'origin/master' into better_object - -commit 213ae24b4df97f557e771060e37197d0e57f6f7f -Author: Jannick -Date: Sun Jul 16 19:51:49 2017 +0200 - - added override tag to function declarations - - poppler/FlateStream.h | 16 ++++++++-------- - poppler/JPXStream.h | 16 ++++++++-------- - poppler/Stream.h | 16 ++++++++-------- - 3 files changed, 24 insertions(+), 24 deletions(-) - -commit ab371fe60568947e355d89e28d489f7f9a1a7404 -Author: Jason Crain -Date: Sun Jul 16 12:07:54 2017 -0500 - - pdftohtml: skip control characters - - W3C disallows them and they cause a warning in PHP. - - https://bugs.freedesktop.org/show_bug.cgi?id=101770 - - utils/HtmlFonts.cc | 6 ++++++ - 1 file changed, 6 insertions(+) - -commit 0f4ea2f18b1953ccc88bcbd6b16ede828b44e561 -Author: Adrian Johnson -Date: Mon Jul 10 21:06:30 2017 +0930 - - Fix parsing of Type 1 fonts with newlines in encoding sequences - - Adobe Type 1 font spec states that the encoding sequences should be of - the form: - - dup index /name put - - The bug 101728 test case has the encoding sequences in the form: - - dup - index /name put - - Make the Type 1 parse handle encoding sequences split over more than - one line. - - Bug 101728 - - fofi/FoFiType1.cc | 40 +++++++++++++++++++++++++++++++++++----- - 1 file changed, 35 insertions(+), 5 deletions(-) - -commit 75fff6556eaf0ef3a6fcdef2c2229d0b6d1c58d9 -Author: Caolán McNamara -Date: Wed Jul 12 14:12:46 2017 +0100 - - CVE-2017-9865 (fdo#100774) avoid stack buffer overflow - - in GfxImageColorMap:getGray - - by passing first arg to getGray of maximum possibly required size - - and similar in HtmlOutputDev::drawPngImage - - utils/HtmlOutputDev.cc | 6 ++++-- - utils/ImageOutputDev.cc | 6 ++++-- - 2 files changed, 8 insertions(+), 4 deletions(-) - -commit 5d0c23a9f6cdc3fd216335124788958f46932158 -Author: Jan-Erik S -Date: Sat Jul 29 18:23:39 2017 +0200 - - Fix crash in broken document - - poppler/StructTreeRoot.cc | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit 852fd28674e14f25c6902c0adab19909f73f2632 -Author: David Faure -Date: Sat Jul 29 18:18:23 2017 +0200 - - Set RUNPATH for poppler shared libs - - Bug #101945 - - CMakeLists.txt | 2 ++ - 1 file changed, 2 insertions(+) - -commit 771c82623e8e1e0c92b8ca6f7c2b8a81ccbb60d3 -Author: Albert Astals Cid -Date: Mon Jul 3 22:44:42 2017 +0200 - - pdfunite: fix crash in broken documents - - Bug #101208 - - poppler/PDFDoc.cc | 70 - +++++++++++++++++++++++++++++++++++++++++-------------- - poppler/PDFDoc.h | 21 +++++++---------- - 2 files changed, 62 insertions(+), 29 deletions(-) - -commit 02d9b182b80d5745b79480b0b8d0eb49b0be304e -Author: Albert Astals Cid -Date: Wed Jun 21 22:49:26 2017 +0200 - - Poppler 0.56 - - CMakeLists.txt | 2 +- - NEWS | 8 ++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - qt4/src/Doxyfile | 2 +- - qt5/src/Doxyfile | 2 +- - 6 files changed, 13 insertions(+), 5 deletions(-) - -commit 3a2759aa2a98c2157cb35731b95e393b8882f8d3 -Author: Jose Aliste -Date: Tue May 16 18:44:49 2017 -0400 - - Check numComps is between reasonable bounds - - Before this patch, some PDF might crash because of an overflow - if numComps does not lie between 0 and 4. - This is a security fix for CVE-2017-0319. - - poppler/Stream.cc | 7 +++++++ - 1 file changed, 7 insertions(+) - -commit d9c88e1c8892c79b8865a0dabdcc0d3ffd55c195 -Author: Albert Astals Cid -Date: Wed Jun 21 00:56:38 2017 +0200 - - Fix crash in malformed documents - - poppler/GfxState.cc | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -commit 55db66c69fd56826b8523710046deab1a8d14ba2 -Author: Albert Astals Cid -Date: Wed Jun 21 00:55:20 2017 +0200 - - Fix crash in malformed documents - - poppler/JBIG2Stream.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 5266fa426d73c5dbdb3dd903d50885097833acc6 -Author: Albert Astals Cid -Date: Tue Jun 20 23:58:26 2017 +0200 - - Fix crash in malformed document - - Bug #101526 - - poppler/Stream.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 112b8ab16128c6e7f80fe7c1890f7b63abd85cce -Author: Albert Astals Cid -Date: Tue Jun 20 23:51:16 2017 +0200 - - Fix crash in broken documents - - Fixes bug #101525 - - poppler/JBIG2Stream.cc | 8 ++++++++ - 1 file changed, 8 insertions(+) - -commit 4e68bf998f886cab8a45fa315164d8ba7aa0dee4 -Author: Albert Astals Cid -Date: Tue Jun 20 23:43:23 2017 +0200 - - Fix crash on broken documents - - Fixes bug #101524 - - poppler/JBIG2Stream.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 558cdb4a4efbb2227f4009f5d87cdd94bfb40107 -Author: Albert Astals Cid -Date: Tue Jun 20 23:37:26 2017 +0200 - - Fix crash in malformed documents - - Fixes bug #101523 - - poppler/GfxFont.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit f7030a0176ed0ab484a401acc26072060e420679 -Author: Albert Astals Cid -Date: Mon Jun 19 23:45:24 2017 +0200 - - Fix crash on broken documents - - Bug #101505 - - goo/GooHash.cc | 18 ++++++++++++++++++ - 1 file changed, 18 insertions(+) - -commit e465d36b8ecf46b80af4ac6b941ae56eb4883a89 -Author: Albert Astals Cid -Date: Mon Jun 19 23:35:29 2017 +0200 - - Fix crash on malformed files - - Bug #101502 - - poppler/GfxState.cc | 9 +++++++++ - 1 file changed, 9 insertions(+) - -commit e2ab2fa9d8c41e0115b2c276a2594cd2f7c217e6 -Author: Albert Astals Cid -Date: Mon Jun 19 23:18:51 2017 +0200 - - Fix crash on malformed files - - Bug #101500 - - poppler/Function.cc | 10 +++++++--- - 1 file changed, 7 insertions(+), 3 deletions(-) - -commit 17e4111da1ae5c9798ca0c040bf75c01bbb72a8a -Author: Albert Astals Cid -Date: Sat Jun 17 17:47:23 2017 +0200 - - Break earlier on reaching recursion limit - - Bug #101379 - - poppler/Parser.cc | 15 ++++++++++++--- - 1 file changed, 12 insertions(+), 3 deletions(-) - -commit 8e1a2474c5513f7b2f4718258ca90e2d6e03f127 -Author: Albert Astals Cid -Date: Sat Jun 17 12:35:41 2017 +0200 - - pdftohmtl: Initialize rotSkewMat - - Fixes uninitialized memory read at bug #100314 - - utils/HtmlFonts.cc | 1 + - 1 file changed, 1 insertion(+) - -commit dd7b0eec87ffc389ee3ba7319442e681e19b15ba -Author: Albert Astals Cid -Date: Sat Jun 17 12:33:35 2017 +0200 - - Remove unused constructor - - utils/HtmlFonts.h | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -commit 5b05222ccd18a121ea2ae1d67b8b5d4947cdfce0 -Author: Albert Astals Cid -Date: Sat Jun 17 12:33:06 2017 +0200 - - Fix crash in malformed file - - Bug #101429 - - poppler/Annot.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit e1b5053e54b0ef7d6b09f3b9c97883db533d509a -Author: Even Rouault -Date: Fri Jun 16 00:21:53 2017 +0200 - - Fix crash on broken file - - Fixes bug #101366 - - poppler/SplashOutputDev.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 9e05af3da0ce14c48f0652e01718960c6bc7b4b0 -Author: Hans-Ulrich Jüttner -Date: Wed Jun 14 23:19:48 2017 +0200 - - FormFieldButton::setState() shouldn't check the field is readOnly - - Bug #101419 - - poppler/Form.cc | 6 +----- - 1 file changed, 1 insertion(+), 5 deletions(-) - -commit 9cecd78ff12a145fd7a61d226d54fd8f9ce19638 -Merge: b5ca57db 23a2f6a2 -Author: Albert Astals Cid -Date: Sat Jun 17 18:35:14 2017 +0200 - - Merge remote-tracking branch 'origin/master' into better_object - -commit 23a2f6a2492a0957489eac31b6700b4d68180bdb -Author: Albert Astals Cid -Date: Sat Jun 17 17:47:23 2017 +0200 - - Break earlier on reaching recursion limit - - Bug #101379 - - poppler/Parser.cc | 15 ++++++++++++--- - 1 file changed, 12 insertions(+), 3 deletions(-) - -commit 5323bc8baf9add8c28a0a6970ab94b6386f38d14 -Author: Albert Astals Cid -Date: Sat Jun 17 12:35:41 2017 +0200 - - pdftohmtl: Initialize rotSkewMat - - Fixes uninitialized memory read at bug #100314 - - utils/HtmlFonts.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 67159370014e5cb3ef296b256bf410e0468fe71e -Author: Albert Astals Cid -Date: Sat Jun 17 12:33:35 2017 +0200 - - Remove unused constructor - - utils/HtmlFonts.h | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -commit d52bba350acb3023ebdba8537854206641cd0998 -Author: Albert Astals Cid -Date: Sat Jun 17 12:33:06 2017 +0200 - - Fix crash in malformed file - - Bug #101429 - - poppler/Annot.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit db254b4b5b1ac2dae46b9fd5ad23af311e481489 -Author: Even Rouault -Date: Fri Jun 16 00:21:53 2017 +0200 - - Fix crash on broken file - - Fixes bug #101366 - - poppler/SplashOutputDev.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 9fc5ed2176da68442927127bea8c427800eb244c -Author: Hans-Ulrich Jüttner -Date: Wed Jun 14 23:19:48 2017 +0200 - - FormFieldButton::setState() should check the field isn't readOnly - - Bug #101419 - - poppler/Form.cc | 6 +----- - 1 file changed, 1 insertion(+), 5 deletions(-) - -commit 5c9b08a875b07853be6c44e43ff5f7f059df666a -Author: Albert Astals Cid -Date: Sat May 27 00:09:17 2017 +0200 - - pdfunite: Fix crash with broken documents - - Sometimes we can't parse pages so check before accessing them - - Thanks to Jiaqi Peng for the report - - Fixes bugs #101153 and #101149 - - utils/pdfunite.cc | 12 ++++++++---- - 1 file changed, 8 insertions(+), 4 deletions(-) - -commit ff05069f34a00d67cdddb033f6240a3407e90057 -Author: Albert Astals Cid -Date: Sun May 21 23:39:38 2017 +0200 - - Poppler 0.55.0 - - CMakeLists.txt | 2 +- - NEWS | 16 ++++++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - qt4/src/Doxyfile | 2 +- - qt5/src/Doxyfile | 2 +- - 6 files changed, 21 insertions(+), 5 deletions(-) - -commit 680b3f6b80e6d342a6b6e3fe8f1953857784f737 -Author: Albert Astals Cid -Date: Sun May 21 23:20:56 2017 +0200 - - Update (C) - - poppler/Object.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 0bf38541443cb8dee4d9a5197fdfcf91f6043a2d -Author: Albert Astals Cid -Date: Sun May 21 23:20:38 2017 +0200 - - Don't forget to ship this file ^_^ - - Makefile.am | 1 + - 1 file changed, 1 insertion(+) - -commit aa03a71c3a1127cffd19bb0f596c4b361a7f2269 -Author: Albert Astals Cid -Date: Sun May 21 22:37:23 2017 +0200 - - Fix abort in files with broken Decode arrays - - Fixes KDE bug #379835 - - poppler/GfxState.cc | 18 ++++++++++++------ - poppler/Object.h | 7 +++++++ - 2 files changed, 19 insertions(+), 6 deletions(-) - -commit 65c5a5266462244130f110599ac5d1011a04216e -Author: Albert Astals Cid -Date: Sun May 21 18:42:15 2017 +0200 - - Fail by default if libopenjpeg2/1 is not available - - You can "force" to use the unmaintained JPX decoder or none at all - - CMakeLists.txt | 30 +++++++++++++++++++++++++++--- - config.h.cmake | 3 +++ - configure.ac | 29 +++++++++++++++++++++++++---- - poppler/Stream.cc | 5 +++++ - 4 files changed, 60 insertions(+), 7 deletions(-) - -commit ea6d3200ae26775dcc26ed80fad18ca51e7f7f07 -Author: Albert Astals Cid -Date: Sun May 21 18:08:41 2017 +0200 - - Fix openjpeg text - - We've prefered openjpeg2 over 1 for a while - - CMakeLists.txt | 2 +- - configure.ac | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit b286a6b5b1a63563263072305da04604cb022488 -Author: Albert Astals Cid -Date: Sun May 21 17:45:00 2017 +0200 - - Fail by default if libjpeg is not available - - You can "force" to use the unmaintained DCT decoder or none at all - - CMakeLists.txt | 29 +++++++++++++++++++++++------ - config.h.cmake | 3 +++ - configure.ac | 40 +++++++++++++++++++++++++++++++--------- - poppler/Stream.cc | 7 ++++++- - 4 files changed, 63 insertions(+), 16 deletions(-) - -commit b5ca57dbfecd9e680b3bd4b293b0eac400d24cfb -Author: Albert Astals Cid -Date: Sat May 13 01:05:43 2017 +0200 - - Fix memory leak in XRef::constructXRef - - poppler/XRef.cc | 1 + - 1 file changed, 1 insertion(+) - -commit b21c5f7741bb0af47c64c042a8586d922d26b47a -Author: Albert Astals Cid -Date: Sat May 13 00:13:43 2017 +0200 - - Use initNullAfterMalloc since this is after a greallocn - - poppler/XRef.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit e98ca09fafadbf7d37b838ed2f8953dc6a53a034 -Author: Albert Astals Cid -Date: Sat May 13 00:01:05 2017 +0200 - - Forgot to add my (C) here - - poppler/Rendition.h | 1 + - 1 file changed, 1 insertion(+) - -commit 47aa71cf39764135f3e3a39cbfb8efc50de1ac28 -Author: Albert Astals Cid -Date: Fri May 12 23:38:26 2017 +0200 - - Make Dict incRef/decRef private - - poppler/Catalog.cc | 40 +++++++++++----------------------------- - poppler/Catalog.h | 2 +- - poppler/Dict.h | 9 +++++---- - poppler/PDFDoc.cc | 37 ++++++++++++++++--------------------- - poppler/PDFDoc.h | 7 +++---- - poppler/Page.cc | 17 ++++++++--------- - poppler/Page.h | 2 +- - utils/pdfunite.cc | 12 +++++------- - 8 files changed, 50 insertions(+), 76 deletions(-) - -commit 0d7aa8c8aa491e005f78b019eff78f400764a61c -Author: Albert Astals Cid -Date: Fri May 12 23:10:53 2017 +0200 - - Make Array incRef/decRef private - - poppler/Array.h | 9 +++++---- - poppler/PDFDoc.cc | 14 +++++++------- - 2 files changed, 12 insertions(+), 11 deletions(-) - -commit b1f4e35fa2da8909dee07529ce1dd9445639793b -Author: Albert Astals Cid -Date: Fri May 12 23:03:28 2017 +0200 - - Make Stream incRef/decRef private - - Object handles it for us - - Also remove incRef/decRef from OutStream - - glib/poppler-action.cc | 2 +- - glib/poppler-attachment.cc | 15 ++++--------- - glib/poppler-media.cc | 19 +++++++---------- - poppler/FileSpec.h | 1 + - poppler/Rendition.cc | 53 - +++++++++++++++++++++++----------------------- - poppler/Rendition.h | 6 ++++-- - poppler/Stream.cc | 1 - - poppler/Stream.h | 18 ++++++---------- - 8 files changed, 50 insertions(+), 65 deletions(-) - -commit d34e5304a9094d505ffce8ec4069d4ddf2ee5950 -Author: Albert Astals Cid -Date: Fri May 12 22:41:03 2017 +0200 - - Get rid of another incRef() call - - poppler/Annot.cc | 5 +---- - 1 file changed, 1 insertion(+), 4 deletions(-) - -commit a7f2baa21a09454cb393dce806896e62e548f63e -Author: Albert Astals Cid -Date: Fri May 12 22:38:41 2017 +0200 - - Pass the Object around instead of the Dict - - Saves an awkard incRef call - - poppler/Annot.cc | 198 - +++++++++++++++++++++++++++---------------------------- - poppler/Annot.h | 46 ++++++------- - poppler/Form.cc | 2 +- - 3 files changed, 122 insertions(+), 124 deletions(-) - -commit 0321bca7a3f6f5bd8b8f3e6ad13f4441e53c909b -Author: Albert Astals Cid -Date: Fri May 12 22:25:36 2017 +0200 - - SplashOutputDev::doUpdateFont - Fix crash on broken file - - poppler/SplashOutputDev.cc | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -commit 96ff78d63d2173671d07f62910b1d85c5fc509ff -Author: Albert Astals Cid -Date: Wed May 10 11:20:56 2017 +0200 - - cpp: Return nullptr if the page at index can't be fethed - - That is the same of what the glib/qt frontends do. - - Bug #100981 - - cpp/poppler-document.cpp | 13 ++++++++++++- - cpp/tests/poppler-dump.cpp | 18 +++++++++++++----- - 2 files changed, 25 insertions(+), 6 deletions(-) - -commit d83b11300386c7f0364acff06bd809e9efcbe4ca -Author: Albert Astals Cid -Date: Tue May 9 16:08:18 2017 +0200 - - JPXStreamPrivate::init2 - Fix memory leak in broken files - - poppler/JPEG2000Stream.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 270866ebac7920503c0856a5dd1e7937ab68dd5f -Author: Albert Astals Cid -Date: Tue May 9 14:34:57 2017 +0200 - - GfxDeviceNColorSpace::parse - Fix memory leak on broken files - - poppler/GfxState.cc | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -commit 22123c836b35c1e8a1feb831899aacd991597c45 -Author: Albert Astals Cid -Date: Tue May 9 10:59:21 2017 +0200 - - TextPool::addWord - Fix memory leak on broken files - - poppler/TextOutputDev.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit d7a102f49e2ea63c1cf3ed79134ce6fc2b2c6a59 -Author: Albert Astals Cid -Date: Tue May 9 10:50:27 2017 +0200 - - FoFiType1::parse - Fix memory leak on broken files - - fofi/FoFiType1.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 9773c1534668d84b8267c3e5c9d612076fa231a5 -Author: Albert Astals Cid -Date: Tue May 9 00:38:07 2017 +0200 - - New Object API - - Implement the move operators and copy construtor - - Almost all the init() functions are gone and we just have simple - constructors now - - Also made free() public since you're not supposed to call it anymore, - unless you're being evil and malloc'ing Objects like Array/Dict/XRef - - This has a huge reaction chain, most importantly we - don't get objects by passing a pointer Object parameter, we - just get the object as a return value, which is a much clearer API - - aobj->copy(&obj); - + obj = aobj->copy(); - before I was never sure what was being copied into what - - Comes with a huge diff, I probably made some mistake in the porting - since there was lots of copy & paste involved - - cpp/poppler-document.cpp | 14 +- - cpp/poppler-page.cpp | 5 +- - glib/poppler-action.cc | 27 +- - glib/poppler-attachment.cc | 4 +- - glib/poppler-document.cc | 30 +- - glib/poppler-input-stream.cc | 10 +- - glib/poppler-input-stream.h | 4 +- - glib/poppler-movie.cc | 5 +- - glib/poppler-page.cc | 13 +- - glib/poppler-structure-element.cc | 37 +- - poppler/Annot.cc | 1779 - +++++++++++++++-------------------- - poppler/Annot.h | 27 +- - poppler/Array.cc | 34 +- - poppler/Array.h | 8 +- - poppler/CMap.cc | 12 +- - poppler/CairoFontEngine.cc | 6 +- - poppler/CairoOutputDev.cc | 5 +- - poppler/Catalog.cc | 383 +++----- - poppler/Catalog.h | 2 +- - poppler/DCTStream.cc | 8 +- - poppler/Dict.cc | 49 +- - poppler/Dict.h | 12 +- - poppler/FileSpec.cc | 133 ++- - poppler/FileSpec.h | 5 +- - poppler/FontInfo.cc | 43 +- - poppler/Form.cc | 337 +++---- - poppler/Form.h | 2 +- - poppler/Function.cc | 225 ++--- - poppler/Gfx.cc | 767 ++++++--------- - poppler/Gfx.h | 14 +- - poppler/GfxFont.cc | 350 +++---- - poppler/GfxFont.h | 4 +- - poppler/GfxState.cc | 794 ++++++---------- - poppler/Hints.cc | 25 +- - poppler/JBIG2Stream.cc | 5 +- - poppler/JPEG2000Stream.cc | 17 +- - poppler/Lexer.cc | 74 +- - poppler/Lexer.h | 7 +- - poppler/Linearization.cc | 57 +- - poppler/Link.cc | 197 ++-- - poppler/Movie.cc | 112 +-- - poppler/Movie.h | 2 +- - poppler/Object.cc | 67 +- - poppler/Object.h | 153 ++- - poppler/OptionalContent.cc | 144 +-- - poppler/Outline.cc | 49 +- - poppler/PDFDoc.cc | 371 +++----- - poppler/PDFDoc.h | 8 +- - poppler/PSOutputDev.cc | 406 +++----- - poppler/Page.cc | 192 ++-- - poppler/Page.h | 17 +- - poppler/PageLabelInfo.cc | 52 +- - poppler/PageTransition.cc | 34 +- - poppler/Parser.cc | 96 +- - poppler/Parser.h | 9 +- - poppler/PopplerCache.cc | 21 +- - poppler/PopplerCache.h | 4 +- - poppler/Rendition.cc | 169 ++-- - poppler/SecurityHandler.cc | 85 +- - poppler/Sound.cc | 40 +- - poppler/Sound.h | 5 +- - poppler/SplashOutputDev.cc | 15 +- - poppler/StdinPDFDocBuilder.cc | 7 +- - poppler/Stream.cc | 133 +-- - poppler/Stream.h | 24 +- - poppler/StructElement.cc | 244 ++--- - poppler/StructTreeRoot.cc | 74 +- - poppler/ViewerPreferences.cc | 43 +- - poppler/XRef.cc | 404 +++----- - poppler/XRef.h | 16 +- - qt4/src/poppler-annotation-helper.h | 39 +- - qt4/src/poppler-document.cc | 13 +- - qt4/src/poppler-form.cc | 7 +- - qt4/src/poppler-optcontent.cc | 17 +- - qt4/src/poppler-page.cc | 18 +- - qt4/src/poppler-private.h | 6 +- - qt4/tests/check_lexer.cpp | 63 +- - qt4/tests/check_optcontent.cpp | 114 +-- - qt5/src/poppler-annotation-helper.h | 39 +- - qt5/src/poppler-document.cc | 11 +- - qt5/src/poppler-form.cc | 5 +- - qt5/src/poppler-optcontent.cc | 17 +- - qt5/src/poppler-page.cc | 16 +- - qt5/src/poppler-private.h | 6 +- - qt5/tests/check_lexer.cpp | 91 +- - qt5/tests/check_optcontent.cpp | 114 +-- - test/pdf-fullrewrite.cc | 21 +- - utils/pdfinfo.cc | 21 +- - utils/pdftohtml.cc | 13 +- - utils/pdftotext.cc | 24 +- - utils/pdfunite.cc | 208 ++-- - 91 files changed, 3539 insertions(+), 5850 deletions(-) - -commit 3c29ded4bee5eadb829ed46af2ec92be57b0077b -Author: Albert Astals Cid -Date: Fri May 5 23:32:32 2017 +0200 - - Make Object free itself on init and destruction - - Will make for a *much* easier way to code. - - Patches with more std::move coming on top. - - Most things seem to work though i'm pretty sure some things are - broken. - - NEEDS TESTING - - poppler/Annot.cc | 3 +- - poppler/Array.cc | 5 +-- - poppler/Array.h | 4 ++- - poppler/Catalog.cc | 29 ++++++++++------- - poppler/Catalog.h | 6 ++-- - poppler/DCTStream.cc | 8 ++--- - poppler/DCTStream.h | 4 +-- - poppler/Dict.cc | 29 ++++++++--------- - poppler/Dict.h | 4 ++- - poppler/Form.cc | 1 - - poppler/Gfx.cc | 25 ++++++--------- - poppler/Movie.cc | 30 +++++++++++------- - poppler/Movie.h | 2 ++ - poppler/Object.cc | 51 +++++++++++++++++++++++++++--- - poppler/Object.h | 79 - +++++++++++++++++++++++++++++----------------- - poppler/OptionalContent.cc | 2 +- - poppler/Page.cc | 4 +-- - poppler/Page.h | 6 ++-- - poppler/Parser.cc | 4 +-- - poppler/Stream.cc | 36 ++++++++++++++------- - poppler/Stream.h | 8 ++--- - poppler/StructElement.cc | 10 ++---- - poppler/XRef.cc | 19 ++++++++--- - utils/pdfunite.cc | 4 +-- - 24 files changed, 234 insertions(+), 139 deletions(-) - -commit d73bcd3721f3b53bb97241cc53a6abf807aff782 -Author: Albert Astals Cid -Date: Fri May 5 15:12:42 2017 +0200 - - auto_ptr -> unique_ptr - - cpp/poppler-document.cpp | 25 +++++++++++++------------ - cpp/poppler-image.cpp | 9 +++++---- - cpp/poppler-page.cpp | 3 ++- - cpp/tests/poppler-dump.cpp | 9 +++++---- - cpp/tests/poppler-render.cpp | 5 +++-- - qt4/tests/check_fonts.cpp | 4 ++-- - qt4/tests/check_links.cpp | 4 ++-- - qt5/tests/check_fonts.cpp | 4 ++-- - qt5/tests/check_links.cpp | 4 ++-- - 9 files changed, 36 insertions(+), 31 deletions(-) - -commit 9ad9d92591a6389f84919ff2de3668c2b6158dc9 -Author: Albert Astals Cid -Date: Fri May 5 00:57:35 2017 +0200 - - Fix memory leak in error condition - - Coverity was complaining we missed one delete in one of the error - conditions, so just made colorMap not be newer, no need to care about - deletes ;) - - poppler/Gfx.cc | 18 ++++++++---------- - 1 file changed, 8 insertions(+), 10 deletions(-) - -commit cdab9a2dc27a10c84550db28fac8dbdcdcd4d29d -Author: Albert Astals Cid -Date: Fri May 5 00:47:45 2017 +0200 - - Move the bits sanity checking a bit higher in the function - - Saves some time and makes the code simpler as we have to delete one - thing less - - poppler/Gfx.cc | 7 +++---- - 1 file changed, 3 insertions(+), 4 deletions(-) - -commit b2545e9368a58a6987614f75d39da4568a076881 -Author: Albert Astals Cid -Date: Thu May 4 21:24:23 2017 +0200 - - Fix regression in GfxIndexedColorSpace::mapColorToBase - - The bounds check was off by one, making file from bug 100931 render - incorrectly. Bug #100931 - - poppler/GfxState.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 09000ce81397eba1eed383f730e48b92b932e0b4 -Author: Albert Astals Cid -Date: Thu May 4 18:35:16 2017 +0200 - - Minor optimization - - Do not create a timer for every single operation since we hardly - run the - profileCommands if branch - - poppler/Gfx.cc | 13 +++++++++---- - 1 file changed, 9 insertions(+), 4 deletions(-) - -commit b21b041f7948680c03109f0c404400a9dbc4544c -Author: Albert Astals Cid -Date: Tue Apr 25 19:48:24 2017 +0200 - - Fix memory leak when reconstructing broken files - - Need to free the catalog variable if we're going to fetch over - it again - - Bug #100776 - - poppler/XRef.cc | 13 ++++++++----- - 1 file changed, 8 insertions(+), 5 deletions(-) - -commit 278439531b13b0b047dbe3a75aa3f1b3407c8bd4 -Author: Albert Astals Cid -Date: Tue Apr 25 19:42:15 2017 +0200 - - Fix memory leak (and probably logic bug) parsing broken XRef entries - - Don't need to get obj1 again to ask if it's an int64 instead of an int - - Bug #100775 - - poppler/XRef.cc | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -commit 478be219772a6c298baad568da3643895cd50d35 -Author: Albert Astals Cid -Date: Fri Apr 21 16:29:44 2017 +0200 - - Poppler 0.54 - - CMakeLists.txt | 2 +- - NEWS | 14 ++++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - glib/CMakeLists.txt | 2 +- - glib/Makefile.am | 2 +- - gtk-doc.make | 1 + - qt4/src/Doxyfile | 2 +- - qt5/src/Doxyfile | 2 +- - 9 files changed, 22 insertions(+), 7 deletions(-) - -commit d627a38b3a25906b356413a1de29aaad9f7a0f28 -Author: Albert Astals Cid -Date: Fri Apr 21 16:03:49 2017 +0200 - - Update (C) - - poppler/XRef.cc | 2 +- - qt5/src/poppler-private.h | 1 + - 2 files changed, 2 insertions(+), 1 deletion(-) - -commit 3a13817da1fff5244267bbc7dee178ac665de4e0 -Author: Adrian Johnson -Date: Fri Apr 21 19:23:07 2017 +0930 - - pdfimages: don't fail listing if inline image data contains 'EI' - - Normally when listing images we don't read the image data. But for - inline images we should read the image data to advance the stream - position to the end of the image data. If we don't advance the stream - position and the image data happens to contain 'EI', Gfx will resume - reading the content stream from the middle of the image data. - - Bug 100737 - - utils/ImageOutputDev.cc | 61 - ++++++++++++++++++++++++++++++++++++------------- - 1 file changed, 45 insertions(+), 16 deletions(-) - -commit e3779c849c86685c9bc294af407b364daf4b2202 -Author: Carlos Garcia Campos -Date: Sat Apr 8 09:56:59 2017 +0200 - - glib: Fix return value in API doc comment of - poppler_movie_get_play_mode - - glib/poppler-movie.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit cc7809e73c71e0e6b7db29dc8a12cfb573448b77 -Author: Albert Astals Cid -Date: Wed Apr 5 23:18:52 2017 +0200 - - Make XRef reconstruction a bit better - - Also detect streams whose endstream is on the middle of a line and - not only at the beginning - - Bug #100509 - - poppler/XRef.cc | 30 +++++++++++++++++++----------- - 1 file changed, 19 insertions(+), 11 deletions(-) - -commit 2bbd110113f789c56609b3288258f667e0f3851a -Author: Carlos Garcia Campos -Date: Sun Apr 2 15:49:48 2017 +0200 - - glib-demo: Show play mode in movie properties view - - glib/demo/utils.c | 3 +++ - 1 file changed, 3 insertions(+) - -commit dad9b36e0e91524e8e342cf924026c37fcb1730e -Author: Francesco Poli (wintermute) -Date: Sun Apr 2 15:28:20 2017 +0200 - - glib: Expose movie play mode - - With this patch the movie play mode can be queried via the glib - interface. An enum value is obtained that reports whether the movie - should be played once, in loop, and so forth... - - https://bugs.freedesktop.org/show_bug.cgi?id=99625 - - glib/poppler-movie.cc | 35 - +++++++++++++++++++++++++++++++++++ - glib/poppler-movie.h | 31 ++++++++++++++++++++++++++----- - glib/reference/poppler-sections.txt | 4 ++++ - 3 files changed, 65 insertions(+), 5 deletions(-) - -commit 0dbec24428d96ae78be8ca06b230d68cde445614 -Author: Christoph Cullmann -Date: Wed Mar 22 23:45:41 2017 +0100 - - qt5: Compile with -DQT_NO_CAST_FROM_BYTEARRAY - - Bug #100311 - - qt5/src/poppler-private.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 7ba4eb3ac3f23236e3df1ef992160d702dc5e4e9 -Author: Albert Astals Cid -Date: Wed Mar 22 23:42:57 2017 +0100 - - Poppler 0.53 - - CMakeLists.txt | 4 ++-- - NEWS | 18 ++++++++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/Doxyfile | 2 +- - qt5/src/CMakeLists.txt | 2 +- - qt5/src/Doxyfile | 2 +- - qt5/src/Makefile.am | 2 +- - 9 files changed, 27 insertions(+), 9 deletions(-) - -commit 411c963a9fe7d0d51bc96f046792688a020bfc66 -Author: Albert Astals Cid -Date: Sun Mar 19 12:40:37 2017 +0100 - - Update (C) - - goo/PNGWriter.cc | 2 +- - goo/PNGWriter.h | 2 +- - goo/TiffWriter.cc | 2 +- - goo/TiffWriter.h | 2 +- - poppler/GfxState.h | 2 +- - utils/ImageOutputDev.cc | 2 +- - utils/ImageOutputDev.h | 2 +- - 7 files changed, 7 insertions(+), 7 deletions(-) - -commit 96333f6dcd93afadea35f9301c7a919545037ed4 -Author: Albert Astals Cid -Date: Wed Mar 8 23:33:00 2017 +0100 - - Add override markers - - cmake/modules/PopplerMacros.cmake | 4 + - fofi/FoFiIdentifier.cc | 42 +-- - fofi/FoFiTrueType.h | 2 +- - fofi/FoFiType1.h | 2 +- - glib/poppler-cached-file-loader.h | 4 +- - glib/poppler-input-stream.h | 34 +-- - goo/JpegWriter.h | 10 +- - goo/NetPBMWriter.h | 8 +- - goo/PNGWriter.h | 8 +- - goo/TiffWriter.h | 10 +- - poppler/Annot.h | 50 ++-- - poppler/CairoFontEngine.h | 6 +- - poppler/CairoOutputDev.cc | 2 +- - poppler/CairoOutputDev.h | 344 +++++++++++----------- - poppler/DCTStream.h | 18 +- - poppler/Decrypt.h | 24 +- - poppler/FlateEncoder.h | 16 +- - poppler/Form.h | 18 +- - poppler/Function.h | 52 ++-- - poppler/GfxFont.h | 20 +- - poppler/GfxState.cc | 2 +- - poppler/GfxState.h | 366 - +++++++++++------------ - poppler/JBIG2Stream.cc | 16 +- - poppler/JBIG2Stream.h | 22 +- - poppler/JPEG2000Stream.h | 24 +- - poppler/Link.h | 66 ++--- - poppler/LocalPDFDocBuilder.h | 5 +- - poppler/MarkedContentOutputDev.h | 22 +- - poppler/PSOutputDev.cc | 16 +- - poppler/PSOutputDev.h | 142 ++++----- - poppler/PopplerCache.cc | 2 +- - poppler/PreScanOutputDev.h | 110 +++---- - poppler/SecurityHandler.h | 30 +- - poppler/SplashOutputDev.cc | 2 +- - poppler/SplashOutputDev.h | 210 ++++++------- - poppler/StdinCachedFile.h | 5 +- - poppler/StdinPDFDocBuilder.h | 5 +- - poppler/Stream.h | 422 - +++++++++++++-------------- - poppler/TextOutputDev.cc | 38 +-- - poppler/TextOutputDev.h | 46 +-- - poppler/XRef.cc | 2 +- - poppler/XRef.h | 12 +- - qt4/CMakeLists.txt | 3 + - qt4/src/poppler-annotation.h | 8 +- - qt4/src/poppler-link.h | 2 +- - qt5/demos/abstractinfodock.h | 6 +- - qt5/demos/embeddedfiles.h | 6 +- - qt5/demos/fonts.h | 4 +- - qt5/demos/info.h | 4 +- - qt5/demos/metadata.h | 4 +- - qt5/demos/navigationtoolbar.h | 6 +- - qt5/demos/optcontent.h | 6 +- - qt5/demos/pageview.h | 6 +- - qt5/demos/permissions.h | 4 +- - qt5/demos/thumbnails.h | 4 +- - qt5/demos/toc.h | 4 +- - qt5/demos/viewer.h | 2 +- - qt5/src/ArthurOutputDev.cc | 2 +- - qt5/src/ArthurOutputDev.h | 90 +++--- - qt5/src/poppler-annotation.cc | 56 ++-- - qt5/src/poppler-annotation.h | 84 +++--- - qt5/src/poppler-form.h | 16 +- - qt5/src/poppler-link-extractor-private.h | 10 +- - qt5/src/poppler-link.h | 24 +- - qt5/src/poppler-optcontent.h | 18 +- - qt5/src/poppler-qiodeviceoutstream-private.h | 10 +- - qt5/src/poppler-qt5.h | 6 +- - qt5/tests/stress-threads-qt5.cpp | 4 +- - qt5/tests/test-password-qt5.cpp | 4 +- - qt5/tests/test-poppler-qt5.cpp | 6 +- - splash/SplashFTFont.h | 12 +- - splash/SplashFTFontFile.h | 6 +- - splash/SplashPattern.h | 12 +- - test/gtk-test.cc | 6 +- - utils/HtmlOutputDev.h | 56 ++-- - utils/ImageOutputDev.h | 62 ++-- - utils/pdftohtml.cc | 12 +- - 77 files changed, 1404 insertions(+), 1400 deletions(-) - -commit da490581b1b4d50efdba1e25115697e17bb0ef51 -Author: Albert Astals Cid -Date: Wed Mar 8 22:07:34 2017 +0100 - - Compile in C++11 mode - - I tried using AX_CXX_COMPILE_STDCXX_11 for the autotools side but - could not get it to fill CXXFLAGS or any other variable i could find, - help welcome - - CMakeLists.txt | 4 +++- - configure.ac | 1 + - 2 files changed, 4 insertions(+), 1 deletion(-) - -commit aa8633267d1d0e2079bb4a2b82bc7b36a4d306f5 -Author: Albert Astals Cid -Date: Mon Mar 6 22:45:52 2017 +0100 - - pdfinfo: Fix memory leak when printing JS - - utils/JSInfo.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit d30e66cf39ef69a81bdd91e21203c876f38d9a09 -Author: Albert Astals Cid -Date: Mon Mar 6 22:43:27 2017 +0100 - - pdfinfo: fix leak when printing JS - - utils/JSInfo.cc | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -commit a7632c5db6875828500dce7c984ec933d5349f26 -Author: Albert Astals Cid -Date: Mon Mar 6 22:34:20 2017 +0100 - - pdftohtml: fix small memory leak when constructing some filenames - - utils/HtmlOutputDev.cc | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -commit 8ebec831c2abea9f13761474990c0d94346c1a35 -Author: Albert Astals Cid -Date: Mon Mar 6 22:24:06 2017 +0100 - - SplashOutputDev: Fix memory leak when rendering images with colormap - and matte color - - poppler/SplashOutputDev.cc | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -commit cfaeeadbc642a297486481d9efd6068fd9ef7ea3 -Author: Adrian Johnson -Date: Sat Mar 4 10:54:29 2017 +1030 - - pdfimages: support 16bpc png and tiff images - - bug 99988 - - goo/PNGWriter.cc | 4 ++++ - goo/PNGWriter.h | 3 ++- - goo/TiffWriter.cc | 6 ++++++ - goo/TiffWriter.h | 3 ++- - poppler/GfxState.h | 4 ++++ - utils/ImageOutputDev.cc | 38 +++++++++++++++++++++++++++++++++++++- - utils/ImageOutputDev.h | 1 + - 7 files changed, 56 insertions(+), 3 deletions(-) - -commit 1b0653ce395242547b2b34b99034a19cd2d3ea6b -Author: Albert Astals Cid -Date: Thu Mar 2 01:00:12 2017 +0100 - - Qt5: Expose Form additional actions - - qt5/src/poppler-form.cc | 20 ++++++++++++++++++++ - qt5/src/poppler-form.h | 19 +++++++++++++++++++ - 2 files changed, 39 insertions(+) - -commit a4c6433c423bd0dcc5056d9ee0375188fea9a0bc -Author: Albert Astals Cid -Date: Thu Mar 2 00:56:43 2017 +0100 - - Update (C) of previous commit - - poppler/Form.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 0151e6e3824a6db907d871a2e56f5c20c001b588 -Author: Albert Astals Cid -Date: Thu Mar 2 00:56:27 2017 +0100 - - Qt5: expose form calculate order - - qt5/src/poppler-document.cc | 18 +++++++++++++++++- - qt5/src/poppler-qt5.h | 9 ++++++++- - 2 files changed, 25 insertions(+), 2 deletions(-) - -commit 0ae3d40a79c25feb5cb9bce6fc8cc48c30bfd1b6 -Author: Albert Astals Cid -Date: Thu Mar 2 00:52:21 2017 +0100 - - Parse AcroForm CO (calculateOrder) - - poppler/Form.cc | 19 +++++++++++++++++++ - poppler/Form.h | 4 ++++ - 2 files changed, 23 insertions(+) - -commit bbfc56b3c9a1e613e6db008a56c9c3333ae1427a -Author: Albert Astals Cid -Date: Thu Mar 2 00:45:44 2017 +0100 - - Make FormWidget* setters ignore isReadOnly - - isReadOnly is for the user but poppler needs to be able to set the - value for example for fields whose value is autocalculated - - poppler/Form.cc | 23 +---------------------- - 1 file changed, 1 insertion(+), 22 deletions(-) - -commit f853145556a61a3d1104d6fd62261924d9fc9e50 -Author: Albert Astals Cid -Date: Sun Feb 19 23:25:47 2017 +0100 - - There's no config file - - poppler/GlobalParams.h | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) - -commit c7a7c34fcb875414eb3092df84f8e8e8e523648d -Author: Albert Astals Cid -Date: Wed Feb 15 23:26:10 2017 +0100 - - Poppler 0.52.0 - - CMakeLists.txt | 2 +- - NEWS | 16 ++++++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - qt4/src/Doxyfile | 2 +- - qt5/src/Doxyfile | 2 +- - 6 files changed, 21 insertions(+), 5 deletions(-) - -commit baad9bd0406f63cffa8054c5831ccc3cb5d207e3 -Author: Albert Astals Cid -Date: Wed Feb 15 23:05:55 2017 +0100 - - Update C years - - poppler/Annot.cc | 2 +- - poppler/OptionalContent.cc | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit 83d4d3ee56b22ef4c0899514abcfc4c220fb4031 -Author: Albert Astals Cid -Date: Mon Feb 13 20:47:05 2017 +0100 - - Properly initialize some RichMedia variables in corner cases - - Bug #99767 - - poppler/Annot.cc | 31 ++++++++++++++----------------- - 1 file changed, 14 insertions(+), 17 deletions(-) - -commit 8de4b3595a80d8880b842599cb25ab5fd5367689 -Author: Albert Astals Cid -Date: Mon Feb 13 01:15:04 2017 +0100 - - Fix assert on reading some OCGs - - Check the object is a ref before calling getRef - - Bug #99768 - - poppler/OptionalContent.cc | 4 ++++ - 1 file changed, 4 insertions(+) - -commit 0b7c235c3ebe2a7a8d7bd6bfb22e605bf770a022 -Author: Adrian Johnson -Date: Thu Feb 9 21:23:04 2017 +1030 - - pdftocairo.1: typo - - utils/pdftocairo.1 | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit e7aad35dcba3449bc8a56de070fea7e09cb64833 -Author: Hubert Figuière -Date: Tue Jan 17 23:58:00 2017 -0500 - - Qt: fix memory leaks found when running tests - - -cleanup objects in tests to fix memory leaks. - -optcontent was leaking the headers items - - Bug #99449 - - qt4/src/poppler-optcontent-private.h | 2 ++ - qt4/src/poppler-optcontent.cc | 3 +++ - qt4/tests/check_links.cpp | 2 ++ - qt5/src/poppler-optcontent-private.h | 2 ++ - qt5/src/poppler-optcontent.cc | 3 +++ - qt5/tests/check_links.cpp | 2 ++ - 6 files changed, 14 insertions(+) - -commit dc8edecc437f33305257b6cb208dc2da367b7868 -Author: Albert Astals Cid -Date: Sun Jan 15 18:27:49 2017 +0100 - - Poppler 0.51 - - CMakeLists.txt | 2 +- - NEWS | 15 ++++++++++++++- - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - qt4/src/Doxyfile | 2 +- - qt5/src/CMakeLists.txt | 2 +- - qt5/src/Doxyfile | 2 +- - qt5/src/Makefile.am | 2 +- - 8 files changed, 21 insertions(+), 8 deletions(-) - -commit c4de00a93c470020c6c96eb343854039bfc0a424 -Author: Albert Astals Cid -Date: Sat Jan 14 23:42:32 2017 +0100 - - Forgot to update the \since value - - qt5/src/poppler-form.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 0eb28e216fc45fe5ceed1c093a541ceca0dc0397 -Author: Christoph Cullmann -Date: Fri Jan 13 00:03:27 2017 +0100 - - qt5: Fix segfault/assert if LinkDestination is constructed with - invalid input string. - - Bug #99357 - - qt5/src/poppler-link.cc | 24 +++++++++++++----------- - 1 file changed, 13 insertions(+), 11 deletions(-) - -commit 4db6507320b51e060f73f7fb0eab364e8a1fee77 -Author: Sebastian Rasmussen -Date: Wed Jan 11 23:37:54 2017 +0100 - - Check for error from NSS in SignatureHandler construct. - - And cascading effects in other SignalHandler members. - - Bug #99363 - - poppler/SignatureHandler.cc | 14 ++++++++++---- - 1 file changed, 10 insertions(+), 4 deletions(-) - -commit 8bb90fc828a3400a2464a38f0ec9e592754197dd -Author: Albert Astals Cid -Date: Tue Jan 10 17:20:18 2017 +0100 - - Qt5: Minor api refinements to the new signature classes - - qt5/src/poppler-form.cc | 32 +++++++++++++++++++++----------- - qt5/src/poppler-form.h | 22 +++++++++++----------- - qt5/tests/poppler-forms.cpp | 14 +++++++------- - 3 files changed, 39 insertions(+), 29 deletions(-) - -commit aa63debdaa6001ed68333b31cd06c2f9958fd8d2 -Author: Hanno Meyer-Thurow -Date: Tue Jan 10 16:28:14 2017 +0100 - - Qt5: Implement digital signature support - - Bug #94378 - - qt5/src/poppler-form.cc | 121 - ++++++++++++++++++++++++++++++++++++++++++++ - qt5/src/poppler-form.h | 106 ++++++++++++++++++++++++++++++++++++++ - qt5/src/poppler-page.cc | 7 +++ - qt5/tests/poppler-forms.cpp | 47 ++++++++++++++++- - 4 files changed, 280 insertions(+), 1 deletion(-) - -commit 2f831d5b9481e5ab06178409f7fccf74eda6e1a2 -Author: Albert Astals Cid -Date: Mon Jan 9 00:30:42 2017 +0100 - - New year! - - poppler/poppler-config.h.cmake | 2 +- - poppler/poppler-config.h.in | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit b6c4d6d1312f63e5e6dcfa28ea48ff3e6935daa9 -Author: Albert Astals Cid -Date: Mon Jan 9 00:28:37 2017 +0100 - - Fix memory leak in PDFDoc::markAnnotations - - poppler/PDFDoc.cc | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -commit 3cae7773d2f8ad6506e2712689c56fa6975e01d3 -Author: Thomas Freitag -Date: Mon Jan 9 00:25:53 2017 +0100 - - pdfunite: add fields to AcroForm dict - - Bug #99141 - - utils/pdfunite.cc | 33 +++++++++++++++++++++++++++++++-- - 1 file changed, 31 insertions(+), 2 deletions(-) - -commit c301f6c675784a65fb2ebdf99ded5d5d3f8defdd -Author: Albert Astals Cid -Date: Mon Dec 19 22:53:47 2016 +0100 - - qt5: Add Poppler::FormField::setName - - qt5/src/poppler-form.cc | 9 ++++++++- - qt5/src/poppler-form.h | 10 ++++++++-- - 2 files changed, 16 insertions(+), 3 deletions(-) - -commit 86c99de95cd16199e0f9f1fb82999c27d54c5b76 -Author: Albert Astals Cid -Date: Mon Dec 19 22:53:10 2016 +0100 - - Add Form[Field|Widget]::setPartialName - - Useful to repair/tweak pdf files - - poppler/Form.cc | 16 ++++++++++++++++ - poppler/Form.h | 2 ++ - 2 files changed, 18 insertions(+) - -commit 56dfa44960b9ab9fb4dcc01d8e3861a9293b0ee0 -Author: Albert Astals Cid -Date: Thu Dec 15 23:32:41 2016 +0100 - - Poppler 0.50 - - CMakeLists.txt | 4 ++-- - NEWS | 25 +++++++++++++++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/CMakeLists.txt | 2 +- - qt4/src/Doxyfile | 2 +- - qt4/src/Makefile.am | 3 ++- - qt5/src/CMakeLists.txt | 2 +- - qt5/src/Doxyfile | 2 +- - qt5/src/Makefile.am | 3 ++- - 11 files changed, 38 insertions(+), 11 deletions(-) - -commit 1511523450f40b539fb1d58950a907f3712fd5c7 -Author: Albert Astals Cid -Date: Thu Dec 15 22:04:04 2016 +0100 - - Refine previous fix a bit - - Call GfxColorSpace::setupColorProfiles only when we really need it - - poppler/GfxState.cc | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -commit 9b016440725de086fa87fcbf776e27acee2c01b7 -Author: Marek Kasik -Date: Wed Sep 21 12:28:16 2016 +0200 - - Don't crash when calling cmsGetColorSpace() - - Initialize RGBProfile and displayProfile before their use - if they were not initialized in GfxState's constructor. - - https://bugs.freedesktop.org/show_bug.cgi?id=97870 - - poppler/GfxState.cc | 2 ++ - 1 file changed, 2 insertions(+) - -commit 8321b400adf6c042cd630ceea7f54fcf6862211d -Author: Albert Astals Cid -Date: Thu Dec 15 18:02:30 2016 +0100 - - Add one more const - - Makes clang happier (i.e. gives one warning less) - - fofi/FoFiEncodings.cc | 18 ++++++++++++++++-- - fofi/FoFiEncodings.h | 18 ++++++++++++++++-- - 2 files changed, 32 insertions(+), 4 deletions(-) - -commit 1a6e4b65197391b23c2163b939d4787f2058a2e1 -Author: Jason Crain -Date: Wed Dec 7 09:28:58 2016 -0600 - - cairo: initialize CairoOutputDev::antialias - - Initialize CairoOutputDev::antialias to CAIRO_ANTIALIAS_DEFAULT. - - Bug #98983 - - poppler/CairoOutputDev.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 2cf901c817fc99e1fa57745c11aa79cdfb4e8c99 -Author: William Bader -Date: Thu Dec 8 21:45:18 2016 +0100 - - Fix PS conversion for some files - - Bug #63963 - - fofi/FoFiTrueType.cc | 13 ++++++++++++- - fofi/FoFiTrueType.h | 2 ++ - poppler/PSOutputDev.cc | 26 ++++++++++++++++++++++++++ - poppler/PSOutputDev.h | 1 + - 4 files changed, 41 insertions(+), 1 deletion(-) - -commit 97b801b55b9bd33f20723c7139cf845a1cba5bd3 -Author: Albert Astals Cid -Date: Wed Dec 7 22:52:24 2016 +0100 - - Remove useless include - - utils/pdftohtml.cc | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -commit 7ac94c8f552f0db13334d4d014cfdb54de72c451 -Author: Albert Astals Cid -Date: Wed Dec 7 22:38:48 2016 +0100 - - nSharedGroups doesn't need to be a class member - - And also mark some variables as const to make it easier to see they - don't change - - poppler/Hints.cc | 20 +++++++------------- - poppler/Hints.h | 1 - - 2 files changed, 7 insertions(+), 14 deletions(-) - -commit 4c4b913802c79eb8bf9c0ce72a08842851f1c5bc -Author: Jeffrey Morlan -Date: Wed Dec 7 22:36:26 2016 +0100 - - Bail out if nBitsNumObjects or nBitsDiffGroupLength are greater - than 32 - - Bug #94941 - - poppler/Hints.cc | 6 ++++++ - 1 file changed, 6 insertions(+) - -commit 21cd08e34bd317b2ecc7c8b4e0d122d85bdf6714 -Author: Albert Astals Cid -Date: Sat Dec 3 02:18:58 2016 +0100 - - Default to libopenjpeg2 instead of libopenjpeg1 - - Tested 2.1.1 and it's better or equal than the old libopenjpeg1 - - I thought of doing a version check but i don't think it's common - someone will be building a new poppler with an old libopenjpeg2 - - CMakeLists.txt | 16 ++++++++-------- - configure.ac | 31 ++++++++++++++++--------------- - 2 files changed, 24 insertions(+), 23 deletions(-) - -commit b5f3e935c3a1f4824fcd681e291c35852966bb45 -Author: Albert Astals Cid -Date: Fri Dec 2 00:09:38 2016 +0100 - - Revert "introduced hex string as a new Object type and used it for - file identifier" - - This reverts commit debd1361f4a4cb7811677ab7a8f241b8b6fca5f9. - - poppler/Lexer.cc | 3 +-- - poppler/Object.cc | 15 ++------------- - poppler/Object.h | 16 +++------------- - poppler/PDFDoc.cc | 10 ---------- - 4 files changed, 6 insertions(+), 38 deletions(-) - -commit 3a260ba8b3db99b4c0a956cc615704168db30e56 -Author: Albert Astals Cid -Date: Fri Dec 2 00:09:31 2016 +0100 - - Revert "treat file identifier as a hex string, not a basic string" - - This reverts commit 628299bc02ef825609e1ade539f967bbf052be0c. - - poppler/PDFDoc.cc | 12 ++++++------ - poppler/PSOutputDev.cc | 5 ++--- - poppler/SecurityHandler.cc | 3 +-- - poppler/StructElement.cc | 5 ++--- - 4 files changed, 11 insertions(+), 14 deletions(-) - -commit 42ef2ac51543fabb5f5f5c3a19c79020d4fb1238 -Author: Thomas Freitag -Date: Wed Nov 30 00:14:46 2016 +0100 - - Read softmask into memstrean in case of matte - - In case of matte the softmask has to be read twice. This is not - possible when read from stdin. So this patch allocate a memstream - first and read the softmask into this memstream. - - Bug #97803 - - poppler/SplashOutputDev.cc | 18 +++++++++++++++++- - 1 file changed, 17 insertions(+), 1 deletion(-) - -commit c448e16dc4f2f3c55b06e3f1e098f45f8abacc18 -Author: William Bader -Date: Wed Nov 30 00:00:15 2016 +0100 - - patch to add -passlevel1customcolor - - Bug #97193 - - poppler/PSOutputDev.cc | 38 ++++++++++++++++---------------------- - poppler/PSOutputDev.h | 5 +++++ - utils/pdftops.cc | 6 +++++- - 3 files changed, 26 insertions(+), 23 deletions(-) - -commit 628299bc02ef825609e1ade539f967bbf052be0c -Author: Jakub Alba -Date: Sun Jul 24 22:46:23 2016 +0200 - - treat file identifier as a hex string, not a basic string - - poppler/PDFDoc.cc | 12 ++++++------ - poppler/PSOutputDev.cc | 5 +++-- - poppler/SecurityHandler.cc | 3 ++- - poppler/StructElement.cc | 5 +++-- - 4 files changed, 14 insertions(+), 11 deletions(-) - -commit debd1361f4a4cb7811677ab7a8f241b8b6fca5f9 -Author: Jakub Alba -Date: Sun Jul 24 22:30:30 2016 +0200 - - introduced hex string as a new Object type and used it for file - identifier - - File identifiers are usually written as hex strings (and this is - how the PDF - reference presents them in an example). Until now, poppler was - reading hex - strings properly, but was forgeting about the fact that a given - string is a hex - string, so e.g. file identifier was first read as a hex string and - then printed as - an ordinary string and thanks to that what was printed was actually - junk. This - commit fixes that. - - poppler/Lexer.cc | 3 ++- - poppler/Object.cc | 15 +++++++++++++-- - poppler/Object.h | 16 +++++++++++++--- - poppler/PDFDoc.cc | 10 ++++++++++ - 4 files changed, 38 insertions(+), 6 deletions(-) - -commit 484d9d46e8995f12ce941be1e080e98e2ff4b95d -Author: Albert Astals Cid -Date: Fri Nov 25 20:05:19 2016 +0100 - - Spelling fixes spotted by William Bader - - qt4/src/poppler-optcontent.h | 2 +- - qt5/src/poppler-optcontent.h | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit bc11784e143d462d62d3f63fc61e58b4b9640da7 -Author: Albert Astals Cid -Date: Fri Nov 25 17:42:27 2016 +0100 - - Qt: Support OCG state change links - - qt4/src/poppler-link-private.h | 57 +++++++++++++++++++ - qt4/src/poppler-link.cc | 33 +++++------ - qt4/src/poppler-link.h | 34 +++++++++++- - qt4/src/poppler-optcontent-private.h | 3 +- - qt4/src/poppler-optcontent.cc | 103 - +++++++++++++++++++++++------------ - qt4/src/poppler-optcontent.h | 8 +++ - qt4/src/poppler-page.cc | 11 +++- - qt5/src/poppler-link-private.h | 57 +++++++++++++++++++ - qt5/src/poppler-link.cc | 33 +++++------ - qt5/src/poppler-link.h | 34 +++++++++++- - qt5/src/poppler-optcontent-private.h | 3 +- - qt5/src/poppler-optcontent.cc | 103 - +++++++++++++++++++++++------------ - qt5/src/poppler-optcontent.h | 8 +++ - qt5/src/poppler-page.cc | 11 +++- - 14 files changed, 382 insertions(+), 116 deletions(-) - -commit b4e93c374deaaf31121a666c987a35bc9554beb3 -Author: Kenji Uno -Date: Thu Nov 3 10:19:06 2016 +0900 - - Fix pdftoppm -tiff -gray/-mono incorrect output. - - - SplashBitmap has imageWriterFormat that ImgWriter - should accept. - - splash/SplashBitmap.cc | 93 - +++++++++++++++++++++++++++++++++++++------------- - splash/SplashBitmap.h | 3 +- - 2 files changed, 71 insertions(+), 25 deletions(-) - -commit 5a04becc4940b926744e64d3b7d0355adcabf282 -Author: Jakub Alba -Date: Fri Jun 17 13:41:39 2016 +0200 - - Fix PDFDoc::saveIncrementalUpdate()'s detection of document being - modified - - Bug 96561 - - poppler/PDFDoc.cc | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -commit 0c9c2089f52de5bb08717518c439fa8bbb99011f -Author: Albert Astals Cid -Date: Wed Nov 23 20:22:17 2016 +0100 - - Fix Outline parsing on broken documents - - Broken documents in which the parent "Last" pointer is earlier than - the siblings "Next" pointer - - This mimics Adobe Reader behaviour. - - Bug #98732 - - poppler/Outline.cc | 18 ++++-------------- - poppler/Outline.h | 4 ++-- - 2 files changed, 6 insertions(+), 16 deletions(-) - -commit e59cbaf9c1ab4a575633ee3263244e03c6d21713 -Author: Jason Crain -Date: Fri Nov 18 15:44:29 2016 -0600 - - glib: Use g_slice_new0 for PopplerActionLayer - - PDFs using PopplerActionLayer will sometimes crash because they are - allocated with g_new0 but freed with g_slice_free. Change the - allocation to use g_slice_new0. - - Bug #98786 - - glib/poppler-action.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 02e2d8e2c3004c36d1f8f798e5a7a30166f48f37 -Author: Albert Astals Cid -Date: Tue Nov 15 00:10:43 2016 +0100 - - 0.49 - - CMakeLists.txt | 4 ++-- - NEWS | 5 ++++- - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/Doxyfile | 2 +- - qt5/src/Doxyfile | 2 +- - 7 files changed, 11 insertions(+), 8 deletions(-) - -commit f7f0f14e095425d171456a697804f2f34ed26426 -Author: Tor Lillqvist -Date: Tue Nov 15 00:06:26 2016 +0100 - - VS 2013 has fmin() and fmax() - - NEWS | 13 +++++++++++++ - poppler/poppler-config.h.cmake | 3 ++- - 2 files changed, 15 insertions(+), 1 deletion(-) - -commit 07ac68603552b36a2a6b8ea5982f22f24f5835b1 -Author: Albert Astals Cid -Date: Tue Nov 15 00:03:24 2016 +0100 - - Update (C) - - poppler/PSOutputDev.cc | 1 + - poppler/poppler-config.h.in | 1 + - utils/pdfseparate.cc | 2 +- - 3 files changed, 3 insertions(+), 1 deletion(-) - -commit b837ae3bc69c5c76f1a4e3abaeb22d0574d6b2c8 -Author: Thomas Freitag -Date: Thu Nov 10 00:33:17 2016 +0100 - - Continue rendering in case of 'Singular matrix in shading pattern - fill' - - Bug #98623 - - poppler/Gfx.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 6c01a48458a8b4896d606ef9bcc4af5e03393b72 -Author: Thomas Freitag -Date: Wed Nov 2 23:10:01 2016 +0100 - - merge type3 glyph handling from xpdf 3.04 - - Fixes bug #96667 - - poppler/SplashOutputDev.cc | 28 +++++++++++++++++++++++----- - poppler/SplashOutputDev.h | 1 - - 2 files changed, 23 insertions(+), 6 deletions(-) - -commit f43cb73939f85952d83afc87a6dc638dc1ae311b -Author: Albert Astals Cid -Date: Wed Nov 2 00:13:26 2016 +0100 - - Avoid UBSan warning about undefined downcast - - ...of this-ptr of in-construction FormFieldSignature while still in - the base - FormField ctor by simply casting the parent-class field member - when needed - - poppler/Form.cc | 83 - ++++++++++++++++++++++++++++++++------------------------- - poppler/Form.h | 9 +++---- - 2 files changed, 50 insertions(+), 42 deletions(-) - -commit 4539d0b002efbd19393fd55a6fb87b013acdb8f1 -Author: Caolán McNamara -Date: Thu Oct 27 14:31:20 2016 +0200 - - PSOutputDev.cc: std::max requires - - poppler/PSOutputDev.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 4619957cbab81ab0b25f3fdd3ed872f0ad93f074 -Author: Tor Lillqvist -Date: Thu Oct 27 14:27:32 2016 +0200 - - VS 2013 has fmin() and fmax() - - poppler/poppler-config.h.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit be073d39f72f625bf3d8482ead76881150695bf4 -Author: Albert Astals Cid -Date: Mon Oct 31 10:11:56 2016 +0100 - - Fix typo in disable nss help string - - Bug #98514 - - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 2a09ec47aef8870dba345f4045e691ffb5a59f4d -Author: Albert Astals Cid -Date: Mon Oct 24 20:04:22 2016 +0200 - - Fix memory leak in parametrized gouraudTriangleShadedFill - - poppler/SplashOutputDev.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 169889b8e196cfcd288e6555fb048fbbf95ba3f6 -Author: Albert Astals Cid -Date: Mon Oct 24 20:04:00 2016 +0200 - - Fix crash on broken files - - splash/Splash.cc | 38 ++++++++++++++++++++------------------ - 1 file changed, 20 insertions(+), 18 deletions(-) - -commit 269a91e3b03a19acc06fd0f72356f2e48a6368a7 -Author: Jakub Alba -Date: Tue Aug 23 13:20:44 2016 +0200 - - PDFDoc::setDocInfoStringEntry(): treat value consisting of just the - unicode marker as an empty string - - poppler/PDFDoc.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 43cfdf9de45e6833a2815b173f8cc945f1c5f9d6 -Author: Jakub Alba -Date: Tue Aug 23 13:19:07 2016 +0200 - - goo: add GooString::hasJustUnicodeMarker(void) - - goo/GooString.cc | 2 +- - goo/GooString.h | 3 ++- - 2 files changed, 3 insertions(+), 2 deletions(-) - -commit e3c5bdf4fcd29c5d180046d1c279d3f99c1027a7 -Author: Jakub Alba -Date: Fri Oct 21 23:06:23 2016 +0200 - - update copyrights - - cpp/poppler-document.cpp | 2 +- - cpp/poppler-document.h | 2 +- - cpp/poppler-embedded-file.cpp | 2 +- - cpp/poppler-global.cpp | 2 +- - cpp/poppler-private.cpp | 2 +- - cpp/poppler-private.h | 2 +- - glib/poppler-document.cc | 2 +- - glib/poppler-document.h | 2 +- - goo/GooString.cc | 2 +- - goo/GooString.h | 2 +- - poppler/Object.h | 2 +- - poppler/PDFDoc.cc | 2 +- - poppler/PDFDoc.h | 2 +- - poppler/XRef.cc | 2 +- - poppler/XRef.h | 2 +- - qt4/src/poppler-document.cc | 2 +- - qt4/src/poppler-private.cc | 2 +- - qt4/src/poppler-private.h | 2 +- - qt4/src/poppler-qt4.h | 2 +- - qt5/src/poppler-document.cc | 2 +- - qt5/src/poppler-private.cc | 2 +- - qt5/src/poppler-private.h | 2 +- - qt5/src/poppler-qt5.h | 2 +- - 23 files changed, 23 insertions(+), 23 deletions(-) - -commit 5d15a52aade68c618c356fe403ca500e74917ef7 -Author: Pino Toscano -Date: Sun Oct 9 13:04:46 2016 +0200 - - pdfseparate: remove extra '%' in error message - - utils/pdfseparate.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 036bcee237c814197af3324cd3697ea88d9ac6d3 -Author: Albert Astals Cid -Date: Sat Oct 8 17:55:31 2016 +0200 - - 0.48 - - CMakeLists.txt | 4 ++-- - NEWS | 12 ++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - poppler/Makefile.am | 2 +- - poppler/Outline.cc | 1 + - poppler/UTF.cc | 1 + - poppler/UTF.h | 1 + - qt4/src/Doxyfile | 2 +- - qt5/src/Doxyfile | 2 +- - 10 files changed, 22 insertions(+), 7 deletions(-) - -commit 3cfbc4efde1df6dcb9ef18a0fb26c7e199e6e8f5 -Author: Jason Crain -Date: Wed Sep 28 14:56:02 2016 +0000 - - TextOutputDev: Break words on all whitespace characters - - Some PDF creators like Chrome use no-break spaces or other whitespace - characters between words, causing pdftotext -bbox to not break - words as - expected. Fix this by breaking words on any character with the - Unicode - whitespace property. - - Bug #97399 - - poppler/TextOutputDev.cc | 2 +- - poppler/UTF.cc | 12 ++++++++++++ - poppler/UTF.h | 2 ++ - 3 files changed, 15 insertions(+), 1 deletion(-) - -commit 27cf7fabad27648019b36b2d6352e6767bfc8689 -Author: Albert Astals Cid -Date: Wed Sep 28 23:23:33 2016 +0200 - - Increase glib requirement - - Seems we've been requiring it for a while at least. - - See "Build fail on Ubuntu 14.04" thread on the mailing list - - CMakeLists.txt | 2 +- - configure.ac | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit 86e50e156952713f0ce3ecc7b6f03f06dc0902c1 -Author: Adrian Johnson -Date: Wed Sep 28 06:10:20 2016 +0930 - - Revert "pdfinfo: add -dests option to print named destinations" - - This reverts commit 183dbf3249e8db2398b63a749eb010bc0a89dc35. - - cmake/modules/PopplerMacros.cmake | 2 +- - configure.ac | 1 - - utils/pdfinfo.1 | 4 -- - utils/pdfinfo.cc | 140 - +------------------------------------- - 4 files changed, 2 insertions(+), 145 deletions(-) - -commit 183dbf3249e8db2398b63a749eb010bc0a89dc35 -Author: Adrian Johnson -Date: Sat Sep 17 22:08:23 2016 +0930 - - pdfinfo: add -dests option to print named destinations - - Bug 97262 - - cmake/modules/PopplerMacros.cmake | 2 +- - configure.ac | 1 + - utils/pdfinfo.1 | 4 ++ - utils/pdfinfo.cc | 140 - +++++++++++++++++++++++++++++++++++++- - 4 files changed, 145 insertions(+), 2 deletions(-) - -commit 151715976509075e9b95e0ab86d1fcacb2c1580a -Author: Masamichi Hosoda -Date: Sat Aug 20 23:16:33 2016 +0900 - - Add functions for named destination name in name-dict - - Get the number of named destinations in name-dict - int numDests(); - - Get the i'th named destination name in name-dict - char *getDestsName(int i); - - Get the i'th named destination link destination in name-dict - LinkDest *getDestsDest(int i); - - poppler/Catalog.cc | 38 ++++++++++++++++++++++++++++++++++++++ - poppler/Catalog.h | 9 +++++++++ - 2 files changed, 47 insertions(+) - -commit 99267c0b3f3aed520247dc0a5eb70df04b00df46 -Author: Masamichi Hosoda -Date: Sat Aug 20 20:40:18 2016 +0900 - - Add functions for named destination name in name-tree - - Get the number of named destinations in name-tree - int Catalog::numDestNameTree(); - - Get the i'th named destination name in name-tree - GooString *Catalog::getDestNameTreeName(int i); - - Get the i'th named destination link destination in name-tree - LinkDest *Catalog::getDestNameTreeDest(int i); - - poppler/Catalog.cc | 13 +++++++++++++ - poppler/Catalog.h | 9 +++++++++ - 2 files changed, 22 insertions(+) - -commit 09ab87a9faf552b28eb7fe3e8ffd137390be5535 -Author: Masamichi Hosoda -Date: Sat Aug 20 19:35:27 2016 +0900 - - Divide Catalog::findDest() - - In order to use constructing LinkDest from other functions, - this commit divides Catalog::findDest(). - - poppler/Catalog.cc | 24 +++++++++++++++++------- - poppler/Catalog.h | 2 ++ - 2 files changed, 19 insertions(+), 7 deletions(-) - -commit 6c84188c3ff3120c3d13f26a889df51d5be6ed87 -Author: Albert Astals Cid -Date: Wed Sep 7 23:58:42 2016 +0200 - - Refactor Hints to be less bad on broken files - - If we reach the end of the stream don't try to continue reading bits - from it - - Bug #97623 - - poppler/Hints.cc | 246 - +++++++++++++++++++++++++++++++++--------------------- - poppler/Hints.h | 16 ++-- - poppler/PDFDoc.cc | 4 + - 3 files changed, 159 insertions(+), 107 deletions(-) - -commit 0d06c871df8065e72ae54a1821ca9e872a554352 -Author: Albert Astals Cid -Date: Tue Sep 6 23:42:55 2016 +0200 - - Make some classes smaller in memory (amd64) - - Thanks to elf-dissector - - TextWord 176 -> 160 - Annot 256 -> 240 - GfxShading 200 -> 184 - - poppler/Annot.h | 6 +++--- - poppler/GfxState.h | 6 +++--- - poppler/TextOutputDev.h | 6 +++--- - 3 files changed, 9 insertions(+), 9 deletions(-) - -commit 3ccd1c34a19c81d92bff27a095cf912afecb5ef3 -Author: Albert Astals Cid -Date: Tue Sep 6 23:42:03 2016 +0200 - - Compile++ - - splash/SplashScreen.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 2ece00c84418fb8a92acc44d2bd0b001bfa10b27 -Author: Albert Astals Cid -Date: Tue Sep 6 23:41:42 2016 +0200 - - Fix warning about new enum - - utils/pdfinfo.cc | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -commit f5c34c63a64ae3a6af9aee2d2710a966b7e2d95c -Author: Jakub Kucharski -Date: Sat Aug 27 06:13:55 2016 +0200 - - goo: check at compile time if GooString has the right size - - static_assert is a C++ feature introduced in C++0x. GCC already - uses this - standard by default, so we can make use of it. In case it's compiled - without C++ - >= 0x support, the #if macro will get rid of it. - - goo/GooString.cc | 4 ++++ - 1 file changed, 4 insertions(+) - -commit 3a1a4baacf9672cd1e26a860303ba22f75c2b942 -Author: Jakub Kucharski -Date: Sat Aug 27 06:09:04 2016 +0200 - - goo: fix GooString::STR_STATIC_SIZE calculation - - Before this fix on 64-bit systems 4 bytes were left unsused (because - of memory - alignment). I've also removed unnecessary MemoryLayout class which - used to be - used to calculate GooString::STR_STATIC_SIZE, although it had only - made it - harder. - - goo/GooString.h | 8 +------- - 1 file changed, 1 insertion(+), 7 deletions(-) - -commit 1de363eecfa50f6432c5ff87c920213186815416 -Author: Albert Astals Cid -Date: Tue Sep 6 00:09:40 2016 +0200 - - Fix another ubsan warning - - splash/SplashScreen.cc | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -commit 90d0fae2b0bd713f36500f59f4bfee33ad9e13bb -Author: Albert Astals Cid -Date: Mon Sep 5 16:19:41 2016 +0200 - - Missing (C) from last commit - - fofi/FoFiBase.cc | 1 + - fofi/FoFiTrueType.cc | 2 +- - goo/GooString.cc | 2 +- - 3 files changed, 3 insertions(+), 2 deletions(-) - -commit 67df1e16d7ae87e8b05c3186063cb925a799790a -Author: Albert Astals Cid -Date: Mon Sep 5 16:10:58 2016 +0200 - - Check we don't overflow in some calculations - - Overflow is undefined behaviour - - fofi/FoFiBase.cc | 2 ++ - fofi/FoFiTrueType.cc | 7 +++++-- - 2 files changed, 7 insertions(+), 2 deletions(-) - -commit 7024b3c97df1815a4f1c9f677dc05dcf5ee72c3d -Author: Albert Astals Cid -Date: Mon Sep 5 16:09:34 2016 +0200 - - No need to do a memcpy of an empty string - - Saves some warnings about memcpy of null strings on some broken - documents - - goo/GooString.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit a902f5983e6802c9346569fcc599cf5f5042bd8d -Author: Albert Astals Cid -Date: Mon Sep 5 16:08:17 2016 +0200 - - initialize XRef::encryptAlgorithm to something - - poppler/Decrypt.cc | 12 +++++++++++- - poppler/Stream.h | 5 +++-- - poppler/XRef.cc | 3 ++- - 3 files changed, 16 insertions(+), 4 deletions(-) - -commit 7c7c35db46c0da51c09783a00484161721ea48ab -Author: Albert Astals Cid -Date: Sun Sep 4 15:40:32 2016 +0200 - - Fix memory leak in error handling - - utils/HtmlOutputDev.cc | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -commit 4552af28684e18c6153ce5598b121a73477af4d6 -Author: Albert Astals Cid -Date: Sun Sep 4 15:24:14 2016 +0200 - - Do not crash on invalid files where nStripes is 0 - - Bug #85276 - - poppler/PSOutputDev.cc | 4 ++++ - 1 file changed, 4 insertions(+) - -commit 364c15795a0508d421ca636bc7b71f93039a82b1 -Author: Albert Astals Cid -Date: Sun Sep 4 15:23:25 2016 +0200 - - Always delete aaBuf if it is there - - Doesn't matter if antialias is temporarily disabled - - splash/Splash.cc | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -commit 22c4701d5f7be0010ee4519daa546fba5ab7ac13 -Author: Albert Astals Cid -Date: Fri Aug 26 15:18:22 2016 +0200 - - Fix crash in files with broken JBIG2Streams - - poppler/JBIG2Stream.cc | 2 ++ - 1 file changed, 2 insertions(+) - -commit c46b8b99b3a2d51692d889df22136cb737d3a47f -Author: Albert Astals Cid -Date: Fri Aug 26 14:53:19 2016 +0200 - - Fix memory leak when parsing broken Forms - - poppler/Form.cc | 4 ++++ - 1 file changed, 4 insertions(+) - -commit 92175cb29450241fafc6d74170f97aee5b7a6d7a -Author: Jason Crain -Date: Sun Jul 31 00:53:24 2016 -0500 - - Fix UTF16 decoding of document outline title - - Use TextStringToUCS4 function and don't ignore astral characters. - - Bug #97156 - - poppler/Outline.cc | 18 ++---------------- - 1 file changed, 2 insertions(+), 16 deletions(-) - -commit fea7bfc3978cb962e2372df3c407114effd5f831 -Author: Jason Crain -Date: Sat Jul 30 03:38:29 2016 -0500 - - TextOutputDev: Remove null characters from PDF text - - Null characters in the PDF text cause problems with the glib - frontend's - handling of C strings. Filter them out. - - Bug #97144 - - poppler/TextOutputDev.cc | 4 ++++ - 1 file changed, 4 insertions(+) - -commit ead33cf26ab7416ae0b37f8eeb19dc231e9a31f0 -Author: Albert Astals Cid -Date: Mon Aug 22 23:40:07 2016 +0200 - - Make sure GfxICCBasedColorSpace and its alt colorspace have the same - number of nComps - - On files where this doesn't happen (only bad files i've found so far) - this is leading to crashes - - poppler/GfxState.cc | 6 ++++++ - 1 file changed, 6 insertions(+) - -commit 55e9f50deb68fb156335a5eb075b28e7b75d88ed -Author: Albert Astals Cid -Date: Thu Aug 18 23:54:15 2016 +0200 - - Poppler 0.47 - - CMakeLists.txt | 2 +- - NEWS | 10 ++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - qt4/src/Doxyfile | 2 +- - qt5/src/Doxyfile | 2 +- - 6 files changed, 15 insertions(+), 5 deletions(-) - -commit 0889366a5872316919dbb640b6cc5cda85295169 -Author: Jakub Kucharski -Date: Mon Aug 1 01:10:18 2016 +0200 - - XRef::createDocInfoIfNoneExists(): don't presume that DocInfo is - a dictionary - - In case a PDF document doesn't comply with the PDF reference and - its DocInfo - object isn't a dictionary, remove it and create a dictionary in - its place. - - poppler/XRef.cc | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -commit 7ba975630e12a3242d73372a685e016101c5e479 -Author: Jakub Kucharski -Date: Mon Aug 1 01:17:08 2016 +0200 - - PDFDoc::setDocInfoStringEntry(): free empty value string - - Normally the ownership of value is passed on to the Object class. In - case value - is an empty string, it doesn't happen, so we have to free it in - order to have - a uniform behaviour managing memory and not to introduce memory leaks. - - poppler/PDFDoc.cc | 3 +++ - 1 file changed, 3 insertions(+) - -commit f0feeed3513899558c59b65f798f294212309486 -Author: Matthias Kilian -Date: Mon Aug 1 22:50:44 2016 +0200 - - Work with non gnu grep - - configure.ac | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 3f5c84e17acfa71dfd44514384398f5a4c449630 -Author: Albert Astals Cid -Date: Sat Jul 30 17:50:42 2016 +0200 - - Check for XRefEntry existing before using it - - Bug #97005 - - poppler/Hints.cc | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - -commit 7d3aea760a14a73962e429059f73d97391660367 -Author: Albert Astals Cid -Date: Sat Jul 30 17:32:59 2016 +0200 - - Fix abort on documents where the docinfo obj is not a dict - - Bug #97134 - - poppler/PDFDoc.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 5641644f485b402cd906d3db73a22a00eb00489b -Author: Albert Astals Cid -Date: Mon Jul 25 00:14:30 2016 +0200 - - Poppler 0.46 - - CMakeLists.txt | 4 ++-- - NEWS | 33 +++++++++++++++++++++++++++++++++ - configure.ac | 2 +- - cpp/CMakeLists.txt | 2 +- - cpp/Doxyfile | 2 +- - cpp/Makefile.am | 2 +- - glib/CMakeLists.txt | 2 +- - glib/Makefile.am | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/CMakeLists.txt | 2 +- - qt4/src/Doxyfile | 2 +- - qt4/src/Makefile.am | 2 +- - qt5/src/CMakeLists.txt | 2 +- - qt5/src/Doxyfile | 2 +- - qt5/src/Makefile.am | 2 +- - 15 files changed, 48 insertions(+), 15 deletions(-) - -commit 97375143f458a9f12009d798ec43364d548051b9 -Author: Albert Astals Cid -Date: Sun Jul 24 23:59:09 2016 +0200 - - update Copyrights - - poppler/CairoOutputDev.cc | 2 +- - poppler/CairoOutputDev.h | 2 +- - poppler/Link.cc | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - -commit bc1e3df84adff679194c33ce2dc52caa70b24df8 -Author: Richard Palo -Date: Sun Jul 24 23:52:52 2016 +0200 - - Work with non gnu greps - - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit df6904366d587133760adf0d43a128aa4d35a712 -Author: Jakub Kucharski -Date: Sun Jul 24 13:14:39 2016 +0200 - - qt5: fix memory leaks in Document::modificationDate() and - Document::creationDate() - - qt5/src/poppler-document.cc | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -commit d89ea6ae0ddd70916700a402649a9e0423ae9fbb -Author: Jakub Kucharski -Date: Sun Jul 24 13:14:19 2016 +0200 - - qt4: fix memory leaks in Document::modificationDate() and - Document::creationDate() - - qt4/src/poppler-document.cc | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -commit 844ede567f188997bb49ab1fc435797b4f31f5e9 -Author: Albert Astals Cid -Date: Sun Jul 24 12:47:21 2016 +0200 - - qt5: Fix memory leak in new implementation of ::date - - qt5/src/poppler-document.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit d34ac7cedf4213020f5a4c05e09aa8d781bc6e43 -Author: Jakub Kucharski -Date: Sun Jul 24 12:43:41 2016 +0200 - - qt5: Added document property setters & getters - - Part of Bug #36653 - - qt5/src/poppler-document.cc | 234 - ++++++++++++++++++++++++++++++++++++-------- - qt5/src/poppler-private.cc | 9 ++ - qt5/src/poppler-private.h | 3 + - qt5/src/poppler-qt5.h | 118 ++++++++++++++++++++++ - 4 files changed, 321 insertions(+), 43 deletions(-) - -commit 720718739c8002304e8da33d9ca87bc0c1511425 -Author: Albert Astals Cid -Date: Sun Jul 24 12:40:04 2016 +0200 - - qt4: Fix memory leak in new implementation of ::date - - qt4/src/poppler-document.cc | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -commit e7cbc36467dfac9415d7d1cac70b77e04566e75d -Author: Jakub Kucharski -Date: Sun Jul 24 12:39:34 2016 +0200 - - qt4: Added document property setters & getters - - Part of Bug #36653 - - qt4/src/poppler-document.cc | 234 - ++++++++++++++++++++++++++++++++++++-------- - qt4/src/poppler-private.cc | 9 ++ - qt4/src/poppler-private.h | 3 + - qt4/src/poppler-qt4.h | 118 ++++++++++++++++++++++ - 4 files changed, 321 insertions(+), 43 deletions(-) - -commit 977669048b93e0561fc86e15b42ac69884e36fab -Author: Jakub Kucharski -Date: Sun Jul 24 12:20:58 2016 +0200 - - cpp: Added document property setters & getters - - Part of Bug #36653 - - cpp/poppler-document.cpp | 445 - ++++++++++++++++++++++++++++++++++++++++++++--- - cpp/poppler-document.h | 24 +++ - 2 files changed, 447 insertions(+), 22 deletions(-) - -commit 7f4a201226bc1112a121c749eb73f2a78e5149e3 -Author: Jakub Kucharski -Date: Sun Jul 24 12:19:52 2016 +0200 - - cpp: Added functions to save a document - - Part of Bug #36653 - - cpp/poppler-document.cpp | 30 ++++++++++++++++++++++++++++++ - cpp/poppler-document.h | 4 ++++ - 2 files changed, 34 insertions(+) - -commit 8d5778feeb3c6cd932ecd7abeba7d1e670d2af66 -Author: Adrian Johnson -Date: Tue Jul 19 22:58:39 2016 +0930 - - cairo: try finding glyphs in substitute fonts by unicode value - - if the glyph name can not be found in the substitute font, try - converting the name to unicode value in see of the font cmap has a - mapping for the character. - - Bug 96994 - - poppler/CairoFontEngine.cc | 5 +++++ - 1 file changed, 5 insertions(+) - -commit 954ee650047c185523f3e20e92f8fc4c67308196 -Author: Adrian Johnson -Date: Sun Jul 17 21:38:54 2016 +0930 - - pdftocairo: Use fprintf for printing errors - - utils/pdftocairo.cc | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit 92f283ba931b605935646e2c55007b75c7e82288 -Author: Jakub Kucharski -Date: Sun Jul 17 01:42:19 2016 +0200 - - glib: make document metatag gobject properties writeable - - glib/poppler-document.cc | 56 - +++++++++++++++++++++++++++++++++++++++++------- - 1 file changed, 48 insertions(+), 8 deletions(-) - -commit 13f0333a46e2a498700ee6bff9845ae0eceafe80 -Author: Adrian Johnson -Date: Tue Jul 5 06:54:54 2016 +0930 - - pdfinfo: update man page for listenc, meta, js, and struct* options - - utils/pdfinfo.1 | 2 ++ - 1 file changed, 2 insertions(+) - -commit c91483aceb1b640771f572cb3df9ad707e5cad0d -Author: Adrian Johnson -Date: Mon Jul 4 21:55:53 2016 +0930 - - pdfinfo: Don't print pdf info when printing metadata, javascript, - or structure - - Bug 96801 - - utils/pdfinfo.cc | 579 - +++++++++++++++++++++++++++---------------------------- - 1 file changed, 289 insertions(+), 290 deletions(-) - -commit 95d30fe3dd0cf265ccefd80d7deac00c7f430b14 -Author: Jakub Kucharski -Date: Tue Jul 12 23:02:35 2016 +0200 - - cpp: pass len to GooString constructor in - detail::ustring_to_unicode_GooString() - - Bug #96426 - - cpp/poppler-private.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 8a0b8b2ea57e3b9ac60e17e82aa22994f26d6213 -Author: Albert Astals Cid -Date: Tue Jul 5 23:35:57 2016 +0200 - - Be less strict when parsing FitH Link destinations - - Would need the same for other kind of destinations too but since - don't have a file that needs it i'll refrain from changing it - - Bug #96661 - - poppler/Link.cc | 24 ++++++++++++------------ - 1 file changed, 12 insertions(+), 12 deletions(-) - -commit 7f893f546dd9753967b986d3a7a56becf9b8d02f -Author: Albert Astals Cid -Date: Tue Jul 5 23:30:29 2016 +0200 - - Remove checks that are already at the beginning of the function - - poppler/Link.cc | 8 -------- - 1 file changed, 8 deletions(-) - -commit 82476b0d6967ce5e61dce4666fe556edd63c16e6 -Author: Jakub Kucharski -Date: Mon Jun 6 22:17:57 2016 +0200 - - glib: Added document property setters & simplified getters - - https://bugs.freedesktop.org/show_bug.cgi?id=36653 - - glib/poppler-document.cc | 347 - +++++++++++++++++++++++++++--------- - glib/poppler-document.h | 18 ++ - glib/reference/poppler-docs.sgml | 4 + - glib/reference/poppler-sections.txt | 8 + - 4 files changed, 288 insertions(+), 89 deletions(-) - -commit 4f7c67b59b9c55b9b896378d3adbecbb73f6eb63 -Author: Jakub Kucharski -Date: Tue Feb 23 16:46:43 2016 +0100 - - Added DocInfo setters & getters - - https://bugs.freedesktop.org/show_bug.cgi?id=36653 - - poppler/Object.h | 7 +++++- - poppler/PDFDoc.cc | 67 - +++++++++++++++++++++++++++++++++++++++++++++++++++++++ - poppler/PDFDoc.h | 41 ++++++++++++++++++++++++++++++++++ - poppler/XRef.cc | 34 ++++++++++++++++++++++++++++ - poppler/XRef.h | 7 ++++++ - 5 files changed, 155 insertions(+), 1 deletion(-) - -commit e2851dd8166fa5a1df0518959ad71c9d81bd9152 -Author: Jakub Kucharski -Date: Tue Feb 23 15:36:43 2016 +0100 - - Added XRef modification flag - - https://bugs.freedesktop.org/show_bug.cgi?id=36653 - - poppler/PDFDoc.cc | 12 +----------- - poppler/XRef.cc | 5 +++++ - poppler/XRef.h | 7 +++++++ - 3 files changed, 13 insertions(+), 11 deletions(-) - -commit 9faa9b05171e46815924b48d31a7c45a1285c403 -Author: Adrian Johnson -Date: Sun Jun 5 22:44:56 2016 +0930 - - Fix tiling patterns with BBox with non-zero x,y - - poppler/CairoOutputDev.cc | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - -commit 500fb06a23c95109547fded267a21647c8629502 -Author: Adrian Johnson -Date: Tue Jun 21 20:05:44 2016 +0930 - - Don't use -fPIC on cygwin - - it emits a warning for every file stating that -fPIC is ignored - - configure.ac | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 5f939d683a8978cdfdb65a3471296bf9e5940055 -Author: Adrian Johnson -Date: Sun Jun 19 11:07:09 2016 +0930 - - pdftocairo: revert the use of groups for blending into white page - - This was added in 853e949 but has since been found to cause - regressions eg the test case in bug 63587. - - utils/pdftocairo.cc | 14 ++++++-------- - 1 file changed, 6 insertions(+), 8 deletions(-) - -commit 5165c1a59332a0bc9da60a1a8d53dace039aae32 -Author: Adrian Johnson -Date: Sun Jun 19 11:19:24 2016 +0930 - - cairo: fix bug in setAntialias() - - Was setting the member cairo instead of cr parameter. Also rename the - function to avoid confusion with the public setAntialias() and make it - static to prevent this type of bug in future. - - poppler/CairoOutputDev.cc | 16 ++++++++-------- - poppler/CairoOutputDev.h | 2 +- - 2 files changed, 9 insertions(+), 9 deletions(-) - -commit dfbb98327cbbc173a63f5db36b6606a93e5166aa -Author: Albert Astals Cid -Date: Fri Jun 17 00:04:25 2016 +0200 - - Poppler 0.45 - - CMakeLists.txt | 4 ++-- - NEWS | 19 +++++++++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/Doxyfile | 2 +- - qt5/src/Doxyfile | 2 +- - 7 files changed, 26 insertions(+), 7 deletions(-) - -commit 3829958339b332d7ddf005d5ab98dd0ad3c8b3c6 -Author: Albert Astals Cid -Date: Thu Jun 16 23:58:07 2016 +0200 - - Add (C) - - poppler/DateInfo.cc | 1 + - poppler/DateInfo.h | 1 + - poppler/Form.cc | 2 +- - utils/pdfinfo.cc | 2 +- - 4 files changed, 4 insertions(+), 2 deletions(-) - -commit 4c7e057b0315ed37bd47e304ca191191244b2963 -Author: Albert Astals Cid -Date: Fri Jun 17 00:11:50 2016 +0200 - - dist glibc.h - - we don't install it, but we need it for building - - goo/Makefile.am | 2 ++ - 1 file changed, 2 insertions(+) - -commit 5ee67050c400daa7bc0b0a4f5dddf21be18be124 -Author: Adrian Johnson -Date: Tue Jun 14 07:32:35 2016 +0930 - - Fix windows compile - - utils/pdfinfo.cc | 1 + - 1 file changed, 1 insertion(+) - -commit df0779031d6ae0180024f92602bc2a680cf73dd5 -Author: Jakub Kucharski -Date: Thu May 19 16:11:04 2016 +0200 - - cpp: switched from detail::convert_date() to core's dateStringToTime() - - cpp/poppler-document.cpp | 4 +++- - cpp/poppler-embedded-file.cpp | 6 ++++-- - cpp/poppler-global.cpp | 6 +++++- - cpp/poppler-private.cpp | 25 +------------------------ - cpp/poppler-private.h | 3 +-- - 5 files changed, 14 insertions(+), 30 deletions(-) - -commit ff24d677c6078c3dfb54c35541369d908314bcdb -Author: Adrian Johnson -Date: Wed Feb 24 20:57:37 2016 +1030 - - pdfinfo: add -isodates for printing dates in ISO-8601 format - - utils/pdfinfo.1 | 3 +++ - utils/pdfinfo.cc | 36 +++++++++++++++++++++++++++++++++++- - 2 files changed, 38 insertions(+), 1 deletion(-) - -commit dd08f24f5e52c56546dfda70be483dc29e03c2e6 -Author: Adrian Johnson -Date: Wed Feb 24 21:10:08 2016 +1030 - - pdfinfo: convert dates to local time zone - - utils/pdfinfo.cc | 11 +++++++++-- - 1 file changed, 9 insertions(+), 2 deletions(-) - -commit e4690ee1be027dd7028e86ea6732a3f4f2680ef7 -Author: Adrian Johnson -Date: Tue Feb 23 21:01:49 2016 +1030 - - glib: return date in UTC instead of local time - - Bug 94173 - - ConfigureChecks.cmake | 1 + - config.h.cmake | 3 +++ - configure.ac | 1 + - glib/poppler-date.cc | 33 +++++++------------------------- - goo/glibc.cc | 24 ++++++++++++++++++++++++ - goo/glibc.h | 4 ++++ - poppler/DateInfo.cc | 52 - +++++++++++++++++++++++++++++---------------------- - poppler/DateInfo.h | 6 +++++- - poppler/Form.cc | 2 +- - 9 files changed, 76 insertions(+), 50 deletions(-) - -commit 7936af2eeb8f84993acabd1b306da50d49256b31 -Author: Adrian Johnson -Date: Tue Feb 23 20:52:30 2016 +1030 - - Emulate some non portable glibc functions when not available - - CMakeLists.txt | 1 + - cpp/tests/poppler-dump.cpp | 5 +---- - glib/demo/utils.c | 6 ------ - goo/Makefile.am | 3 ++- - goo/glibc.cc | 34 ++++++++++++++++++++++++++++++++++ - goo/glibc.h | 33 +++++++++++++++++++++++++++++++++ - poppler/DateInfo.cc | 7 ++----- - 7 files changed, 73 insertions(+), 16 deletions(-) - -commit 4d799cdf9b9039b003de7d3baf05d858bc507a5a -Author: Albert Astals Cid -Date: Thu Jun 2 00:22:05 2016 +0200 - - pdfinfo: Fix another leak - - Again not crucial in pdfinfo itself but nice to be clean so that if it - the leak check fails is because the core is doing something bad - - utils/JSInfo.cc | 13 ++++++++----- - utils/JSInfo.h | 3 ++- - 2 files changed, 10 insertions(+), 6 deletions(-) - -commit 4daee8a8ce40aeb658964a5902ae104549f7af75 -Author: Albert Astals Cid -Date: Wed Jun 1 18:37:57 2016 +0200 - - Fix memory leak when failing to parse thumbs or actions - - poppler/Page.cc | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -commit bc6eb28776feaa302ad93e315798cad02c1e2a54 -Author: Albert Astals Cid -Date: Wed Jun 1 18:36:17 2016 +0200 - - pdfinto: Fix memory leak - - It's not very critial that pdfinfo does not leak, but it's nice - to have no leaks so one can run ASAN over a file and see if something - is wrong or not - - utils/pdfinfo.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 66617b256acfcd98f727bf11b7d7e92bcbd16de0 -Author: Albert Astals Cid -Date: Wed Jun 1 18:35:50 2016 +0200 - - Point ucs4 to null when len is 0 - - Makes it easier for the caller than can always just free the passed - pointer - - poppler/UTF.cc | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -commit 0d70a57c7ad8a53e2462560a47b6ea5eba73d6c5 -Author: Albert Astals Cid -Date: Wed Jun 1 18:34:32 2016 +0200 - - Add docu to the get*Action methods - - Since unfortunately their behaviour is different in what you have - to do with the pointer given - - poppler/Annot.h | 12 ++++++------ - poppler/Form.h | 6 +++--- - 2 files changed, 9 insertions(+), 9 deletions(-) - -commit 3db727f9546779a8896fc30a6669751d726ab86c -Author: Albert Astals Cid -Date: Wed Jun 1 18:32:45 2016 +0200 - - Fix memory leak in RichMedia parsing - - poppler/Annot.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 8ace48fb07b81cab6ae68dc23d173e7441ad6d2e -Author: Albert Astals Cid -Date: Sun May 29 11:45:55 2016 +0200 - - SplashOutputDev: Fix iccTransform + splashModeXBGR8 - - poppler/SplashOutputDev.cc | 16 ++++++++-------- - 1 file changed, 8 insertions(+), 8 deletions(-) - -commit 46039c2ef5b666d5ee85e7f6fc6a74a5a9e69526 -Author: Albert Astals Cid -Date: Fri May 27 11:06:01 2016 +0200 - - Add braces to make it more clear to which if the else applies - - poppler/UnicodeTypeTable.cc | 21 ++++++++++++--------- - 1 file changed, 12 insertions(+), 9 deletions(-) - -commit 2d72a8bfc87c9bdcea6b617ebd4b3a3684e174e8 -Author: Albert Astals Cid -Date: Thu May 26 17:59:21 2016 +0200 - - Initialize nConfigurations and nAssets - - poppler/Annot.cc | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -commit 4e49b3af7d6f731b9da20a9d6e5aa54578f08d3f -Author: Albert Astals Cid -Date: Thu May 26 17:34:56 2016 +0200 - - Fix memory leak on error on JBIG2Stream::readHalftoneRegionSeg - - poppler/JBIG2Stream.cc | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -commit 5f51939eea5b98dcef115d18baec3179701d0292 -Author: Albert Astals Cid -Date: Tue May 24 23:34:48 2016 +0200 - - Fix stack overflow - - Bug #96027 - - poppler/Stream.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit c820826377d79438ecaf90e9b2106a8451585add -Author: Albert Astals Cid -Date: Tue May 24 00:00:57 2016 +0200 - - Fix (C) year - - utils/HtmlOutputDev.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 9ce8dd7fbd132b5f423dc3bf10fa87b973390d0b -Author: Albert Astals Cid -Date: Mon May 23 23:59:40 2016 +0200 - - Fix stack overflow on broken file - - Bug #95567 - - poppler/Stream.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 37fb37e368c659832fc1a1dfd499c42340b62f38 -Author: Vincent Le Garrec -Date: Mon May 23 23:18:40 2016 +0200 - - pdftohtml: Fix crash on broken file - - Bug #95563 - - utils/HtmlOutputDev.cc | 8 ++++++++ - 1 file changed, 8 insertions(+) - -commit 1d0251c8ab48e2e1a4873d84b4bc573b3ae2a98d -Author: Albert Astals Cid -Date: Sat May 21 20:02:26 2016 +0200 - - Fix memory leak in Splash::gouraudTriangleShadedFill - - splash/Splash.cc | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -commit eb20f8cc2c0dea281ae44336a8fac8cc86a99895 -Author: Albert Astals Cid -Date: Sat May 21 19:19:43 2016 +0200 - - 0.44 - - CMakeLists.txt | 4 ++-- - NEWS | 16 ++++++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/Doxyfile | 2 +- - qt5/src/Doxyfile | 2 +- - 7 files changed, 23 insertions(+), 7 deletions(-) - -commit 58f56a7af99b477f39e57aed74443b6851afe15f -Author: Thomas Freitag -Date: Sat May 21 18:25:22 2016 +0200 - - Fix Compile in 32bit linux - - Bug #95492 - - poppler/Decrypt.cc | 65 - +++++++++++++++++++++++++++--------------------------- - 1 file changed, 33 insertions(+), 32 deletions(-) - -commit 853e94995255591b35d9bdbeb0174476838097c0 -Author: Adrian Johnson -Date: Sun Apr 17 16:02:57 2016 +0930 - - pdftocairo: add -antialias option - - Bug 94977 - - poppler/CairoOutputDev.cc | 24 +++++++++++++++++ - poppler/CairoOutputDev.h | 4 ++- - utils/pdftocairo.1 | 26 +++++++++++++++++++ - utils/pdftocairo.cc | 66 - ++++++++++++++++++++++++++++++++++++++++++----- - 4 files changed, 112 insertions(+), 8 deletions(-) - -commit 8453966178de8535cdabac090e78ec17857f8975 -Author: Thomas Freitag -Date: Tue May 17 01:00:37 2016 +0200 - - Improve rendering of some dotted lines - - Bug #84693 - - splash/Splash.cc | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -commit 182abe4ed5c0773073c6751a26a7c4e40e99e02e -Author: Thomas Freitag -Date: Fri May 13 00:07:24 2016 +0200 - - Splash: type 3 chars. restore the current position also in output - device - - Bug #95344 - - poppler/Gfx.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 9c35dc79ec777d9495796124ac7a42bf2b4cf83f -Author: Jakub Kucharski -Date: Wed May 11 23:34:53 2016 +0200 - - goo: refactor GooString::Set() - - it is used only once to concatenate strings and it is in a GooString - constructor used specifically for that - so I think concatenation should take place in the constructor and - GooString::Set - should do exactly what it says which is setting the string. - - Bug #94201 - - goo/GooString.cc | 40 ++++++++++++++-------------------------- - goo/GooString.h | 10 +++++----- - 2 files changed, 19 insertions(+), 31 deletions(-) - -commit 0ecec576faf7e1ef644f5973f17e0b8244560912 -Author: Albert Astals Cid -Date: Wed May 4 23:23:04 2016 +0200 - - Fix typo in GfxPatchMeshShading::parse - - poppler/GfxState.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 890178f9c946931ec34b8b227493ec9f1c6109aa -Author: Albert Astals Cid -Date: Wed May 4 01:32:47 2016 +0200 - - Fix potential crash in SplashOutputDev::doUpdateFont - - If we delete fontLoc we need to set it to NULL since it's not set - to any value in all of the - branches of this code - - poppler/SplashOutputDev.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 86572d7d2835fdd77e82eeb428e3a56c2d0f271d -Author: Albert Astals Cid -Date: Wed May 4 01:27:54 2016 +0200 - - Fix memory leak in SignatureHandler::getDefaultFirefoxCertDB_Linux - - poppler/SignatureHandler.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 3707f9d17c5f8a883ddb9614b11676ad49ade5b2 -Author: Albert Astals Cid -Date: Wed May 4 00:59:01 2016 +0200 - - Fix potential crash in TextPage::coalesce - - When flows is not null flow was still pointing to an now deleted - flow that - may had made it crash in the for loop below - - poppler/TextOutputDev.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 6d26d02c39de6546f57b20c46922f8c56aad78a0 -Author: Albert Astals Cid -Date: Wed May 4 00:58:12 2016 +0200 - - Remove call that does nothing - - We don't use dict after this call and streamGetDict is a pure getter, - i.e. it doesn't change the stream at all - - poppler/GfxState.cc | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -commit 56c71fcaae71c2b3cc91bb981715541518e05684 -Author: Albert Astals Cid -Date: Wed May 4 00:55:06 2016 +0200 - - Fix memory leak in PSOutputDev::filterPSLabel - - poppler/PSOutputDev.cc | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -commit a0c3fd3f18232c126815a129158e0c4cd3a819a9 -Author: Albert Astals Cid -Date: Fri Apr 29 00:14:24 2016 +0200 - - New version and soversion - - CMakeLists.txt | 4 ++-- - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - gtk-doc.make | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/Doxyfile | 2 +- - qt5/src/Doxyfile | 2 +- - 7 files changed, 8 insertions(+), 8 deletions(-) - -commit da91593e834d4e617213466331226347f1688a53 -Author: Albert Astals Cid -Date: Fri Apr 29 00:12:59 2016 +0200 - - News - - NEWS | 20 ++++++++++++++++++++ - 1 file changed, 20 insertions(+) - -commit bdd25a2583552fe8e72dcf4bc17d9f488b7c1268 -Author: Albert Astals Cid -Date: Fri Apr 29 00:07:24 2016 +0200 - - Update Cs - - poppler/CairoFontEngine.cc | 2 +- - poppler/CairoOutputDev.cc | 2 +- - poppler/CairoOutputDev.h | 1 + - poppler/GfxFont.cc | 2 +- - utils/pdftocairo.cc | 1 + - 5 files changed, 5 insertions(+), 3 deletions(-) - -commit dbbe1590d49e620ef0743cb1b99b0b5b9a1f36ec -Author: Arseniy Lartsev -Date: Thu Apr 28 23:59:05 2016 +0200 - - qt: Fix crash on certain PDF form item activation actions - - Bug #94873 - - qt4/src/poppler-page.cc | 3 ++- - qt5/src/poppler-page.cc | 3 ++- - 2 files changed, 4 insertions(+), 2 deletions(-) - -commit 1cc93886eee3204e2ccd8bcc8b90306e809255e0 -Author: Thomas Freitag -Date: Thu Apr 28 23:53:06 2016 +0200 - - Allow newlines in ' obj' sequence - - Bug #94756 - - poppler/XRef.cc | 15 +++++++++++++-- - 1 file changed, 13 insertions(+), 2 deletions(-) - -commit a8e3399487258e53df0fd4a79c570c8d71188bed -Author: Takahiro Hashimoto -Date: Wed Apr 27 00:16:52 2016 +0200 - - Compile with C++11 compilers that don't define isinfinite - - Bug #94761 - - poppler/SplashOutputDev.cc | 8 ++++++++ - 1 file changed, 8 insertions(+) - -commit 6eafb6570765605108cf3525f78b10223439ee1d -Author: Pino Toscano -Date: Thu Apr 21 08:30:25 2016 +0200 - - configure: remove unused check for gethostbyname - - configure.ac | 5 ----- - 1 file changed, 5 deletions(-) - -commit d9408c186f9b5c992a4e1492a58dda506d8453ac -Author: Pino Toscano -Date: Sun Apr 10 10:29:05 2016 +0200 - - typo fixes - - - "indentical" -> "identical" - - "numberals" -> "numerals" - - "paremeters" -> "parameters" - - poppler/PageLabelInfo_p.h | 2 +- - qt4/src/poppler-media.cc | 8 ++++---- - qt5/src/poppler-media.cc | 8 ++++---- - utils/pdfimages.1 | 2 +- - 4 files changed, 10 insertions(+), 10 deletions(-) - -commit 5ac54db9150e949ed0e41eec1f19a7f5ec880646 -Author: Pino Toscano -Date: Sun Apr 10 10:16:36 2016 +0200 - - utils: ship pdfsig.1 if pdfsig is built - - utils/Makefile.am | 4 ++++ - 1 file changed, 4 insertions(+) - -commit 92c6799a40b0755ff2d43f33241d442cc5d4e323 -Author: Pino Toscano -Date: Sun Apr 10 09:43:29 2016 +0200 - - remove +x modes - - poppler/SecurityHandler.cc | 0 - 1 file changed, 0 insertions(+), 0 deletions(-) - -commit 9c39db64ba2eb20ca769a103d83a830f406486f0 -Author: Jason Crain -Date: Mon Jan 18 20:56:18 2016 -0600 - - Add SymbolMT as an alias for the Symbol font - - A document using the SymbolMT font will have the wrong glyphs drawn. - Add it as - an alias for the Symbol font so the correct font and encoding - are used. - - Bug #93168 - - poppler/GfxFont.cc | 4 ++++ - 1 file changed, 4 insertions(+) - -commit af332349d7a5e3737ea53608cda2f1cad6159108 -Author: Jason Crain -Date: Mon Mar 28 21:36:52 2016 -0500 - - pdftocairo: Calculate rotation before scaling - - Scaling calculation (-scale-to-x and -scale-to-y) is wrong if a - page is - rotated. Fix by moving scale calculation to after rotation - calculation. - - bug #94655 - - utils/pdftocairo.cc | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -commit db87dc7fa28537f7532328c278c05d8b60f90d6f -Author: Jason Crain -Date: Sun Feb 21 22:54:15 2016 -0600 - - cairo: save mask state and don't extend image mask - - Don't extend an image mask pattern. Save and restore the mask in - tilingPatternFill. - - bug #94234 - - poppler/CairoOutputDev.cc | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -commit b68a4ee1dcd1da5b48b2c1f0bb2b6a789ca18ea5 -Author: Jason Crain -Date: Thu Feb 18 01:59:42 2016 -0600 - - cairo: Check if PDF knows the width of 'm' in case of substituted font - - Bug #94054 - - poppler/CairoFontEngine.cc | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -commit 7d8dfb09d2b9d69d4e80838ce58fdbd091bce7ec -Author: Jason Crain -Date: Sun Feb 28 16:18:05 2016 -0600 - - cairo: fix fillToStrokePathClip crash and rendering - - The cairo backend can crash if the dash pattern changes between - calling - clipToStrokePathClip and fillToStrokePathClip because - fillToStrokePathClip - calls cairo_set_dash with the saved dash pattern but the current - dash count. - - Fixes the crash by removing the call to cairo_get_dash_count in - fillToStrokePathClip. Makes strokePathClip reference counted - because when - drawing tiling patterns it may need to be kept around for more than - one drawing - operation. Uses fillToStrokePathClip in a few more places to fix - rendering. - - bug #62905 - - poppler/CairoOutputDev.cc | 38 ++++++++++++++++++++++++++++++-------- - poppler/CairoOutputDev.h | 1 + - 2 files changed, 31 insertions(+), 8 deletions(-) - -commit 67bc280c4068ae9501053c06ee05341b95a5e6db -Author: Thomas Freitag -Date: Sun Mar 20 12:39:24 2016 +0100 - - Implement sanity check for linearization usage - - Bug #92482 - - poppler/PDFDoc.cc | 42 +++++++++++++++++++++++++++++++++++++++++- - poppler/PDFDoc.h | 7 ++++++- - 2 files changed, 47 insertions(+), 2 deletions(-) - -commit a24ac96e9f5c914c1c979319ca1043dabd334763 -Author: Albert Astals Cid -Date: Thu Mar 17 00:08:37 2016 +0100 - - meh typo - - NEWS | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit f8ff943650e7e2a4cb836be43bf04907a5e156fc -Author: Albert Astals Cid -Date: Wed Mar 16 23:40:00 2016 +0100 - - 0.42 - - CMakeLists.txt | 4 ++-- - Makefile.am | 1 + - NEWS | 28 ++++++++++++++++++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - poppler/Makefile.am | 4 ++-- - qt4/src/Doxyfile | 2 +- - qt5/src/Doxyfile | 2 +- - 8 files changed, 37 insertions(+), 8 deletions(-) - -commit ef21f651a4af801502d6b4b4f7258d54f14e7aea -Author: Albert Astals Cid -Date: Wed Mar 16 20:23:39 2016 +0100 - - Some (C) updating - - poppler/FlateStream.cc | 1 + - poppler/Gfx.cc | 2 +- - poppler/PSOutputDev.cc | 2 +- - poppler/SignatureHandler.cc | 2 +- - poppler/SplashOutputDev.cc | 2 +- - poppler/SplashOutputDev.h | 2 +- - poppler/Stream.cc | 2 +- - poppler/Stream.h | 2 +- - poppler/TextOutputDev.cc | 2 +- - poppler/TextOutputDev.h | 2 +- - 10 files changed, 10 insertions(+), 9 deletions(-) - -commit 57b7a52cc6b3675bfbff29ef20a509eadce091ac -Author: Thomas Freitag -Date: Wed Mar 16 10:36:22 2016 +0100 - - Fix rendering of some broken PDF files - - Call constructXRef if necessary xref can't be fetched and the PDF - don't use xref streams - - Bug #92508 - - poppler/XRef.cc | 8 +++++++- - poppler/XRef.h | 3 ++- - 2 files changed, 9 insertions(+), 2 deletions(-) - -commit 04f3448d73ff7a3a2f1bf885aea64e96cc29a69d -Author: Thomas Freitag -Date: Wed Mar 16 00:58:35 2016 +0100 - - Initialize gamut mapping multipliers in ::copy() functions - - Bug #90697 - - poppler/GfxState.cc | 6 ++++++ - 1 file changed, 6 insertions(+) - -commit 69ffeb71a79b686d5c79d20832c4666c498098e8 -Author: Alok Anand -Date: Mon Mar 14 20:18:32 2016 +0100 - - Add the support for version 5 + revision 6 documents. - - Bug #85368 - - poppler/Decrypt.cc | 357 - ++++++++++++++++++++++++++++++++++++++++++++- - poppler/SecurityHandler.cc | 9 +- - 2 files changed, 358 insertions(+), 8 deletions(-) - -commit 2dcfefb43c0d4ca86a4f4b2d019882e134201b27 -Author: Thomas Freitag -Date: Sat Mar 12 03:52:01 2016 +0100 - - handle SMaskInData = 0 for JPX encoded images - - Bug #93468 - - poppler/JPEG2000Stream.cc | 77 - +++++++++++++++++++++++++++++++++++++---------- - 1 file changed, 61 insertions(+), 16 deletions(-) - -commit e58d310c1802b77a6356ec0d3d0180a2a1605b41 -Author: Thomas Freitag -Date: Thu Mar 10 12:05:28 2016 +0100 - - Implement function shading in splash - - Bug #94441 - - poppler/SplashOutputDev.cc | 117 - +++++++++++++++++++++++++++++++++++++++++++++ - poppler/SplashOutputDev.h | 31 +++++++++++- - 2 files changed, 147 insertions(+), 1 deletion(-) - -commit 09e2ae234179c42ccf06b040a0f6c89d65d69713 -Author: Thomas Freitag -Date: Tue Mar 8 23:08:53 2016 +0100 - - assure line width > 0 in case of text stroke - - Bug #94038 - - poppler/SplashOutputDev.cc | 4 ++++ - 1 file changed, 4 insertions(+) - -commit 37c7469955d465e006d74eecebb766eb8513bbf3 -Author: Thomas Freitag -Date: Mon Mar 7 20:23:11 2016 +0100 - - JPXStream: Don't scale image comps to 8 bits in case of an indexed - colorspace - - Followup of bug #94371 - - poppler/JPEG2000Stream.cc | 58 - +++++++++++++++++++++++++++++++---------------- - 1 file changed, 38 insertions(+), 20 deletions(-) - -commit d4e24e5754f5a0bf335ddf83747d0dc85b7c409f -Author: Thomas Freitag -Date: Sun Mar 6 22:46:23 2016 +0100 - - implement jpx streams with depth < 8 - - Bug #94371 - - poppler/JPEG2000Stream.cc | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -commit 5f79b6485b107fb0939563837046fea6b4b89fdc -Author: Albert Astals Cid -Date: Thu Mar 3 00:45:34 2016 +0100 - - (C) here too - - qt5/src/poppler-link.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit a80a036269eb18daf0ec69c23a8bc71fb4852acb -Author: Albert Astals Cid -Date: Thu Mar 3 00:44:27 2016 +0100 - - Qt: Only check the link page for local links - - qt4/src/poppler-link.cc | 32 +++++++++++++++++--------------- - qt5/src/poppler-link.cc | 28 +++++++++++++++------------- - 2 files changed, 32 insertions(+), 28 deletions(-) - -commit a3c7f6184d1be3f2737086cf650f4012075515f8 -Author: Adrián Pérez de Castro -Date: Wed Mar 2 11:58:24 2016 +0200 - - Tagged-PDF: Document new pdfinfo flags in its manual page - - https://bugs.freedesktop.org/show_bug.cgi?id=64816 - - utils/pdfinfo.1 | 9 +++++++++ - 1 file changed, 9 insertions(+) - -commit 7cf52e56677e11b15d610017bccd0cc3f74badaf -Author: Emmanuele Bassi -Date: Wed Mar 2 04:38:52 2016 +0000 - - Use correct includes for NSPR/NSS headers - - The header files provided by NSS3 are inside versioned directories, - `$includedir/nss3` and `$includedir/nspr4`, which are provided by the - nss3 pkg-config file as include directives for the compiler. - - We can also use nspr.h as a single entry point, to avoid cherry - picking - specific headers. - - https://bugzilla.freedesktop.org/show_bug.cgi?id=94360 - - poppler/SignatureHandler.cc | 2 +- - poppler/SignatureHandler.h | 22 +++++++++------------- - 2 files changed, 10 insertions(+), 14 deletions(-) - -commit 1f7cb78f8b771bae8bfd96a7a7ca3afbaf89c749 -Author: Albert Astals Cid -Date: Wed Mar 2 09:51:46 2016 +0100 - - Fix memory leak in Matte parsing - - Also remove unneeded comment - - poppler/Gfx.cc | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -commit 36c276f1af7e0f1d8a207f6cdcaa80a24e95e044 -Author: Thomas Freitag -Date: Wed Mar 2 09:50:01 2016 +0100 - - Splash: Implementation of matte entries in softmasks of softmasked - images - - Bug #22473 - - poppler/Gfx.cc | 30 +++++++++++++++-- - poppler/GfxState.cc | 7 ++-- - poppler/GfxState.h | 7 +++- - poppler/SplashOutputDev.cc | 80 - +++++++++++++++++++++++++++++++++++++++++++++- - poppler/SplashOutputDev.h | 3 +- - 5 files changed, 120 insertions(+), 7 deletions(-) - -commit 810605dae2d7f239ce29640a31a9befe511c3190 -Author: Albert Astals Cid -Date: Wed Mar 2 00:49:00 2016 +0100 - - Compile++ - - poppler/Form.cc | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -commit 9d33825e6f6167f07b2739645b93249b2bc043da -Merge: a8853b1d f3e3ebe5 -Author: Albert Astals Cid -Date: Wed Mar 2 00:37:11 2016 +0100 - - Merge remote-tracking branch 'origin/signatureHandling' - -commit f3e3ebe51483050cfdf8773dbd0d6646521f17cb -Author: André Guerreiro -Date: Wed Mar 2 00:35:05 2016 +0100 - - Load NSS root certs module - - This change is needed to actually do certificate validation, because - as it is NSS is trying to load the module which contains all the - builtin root certs from the Firefox profile directory where it is - usually missing. This way it will load the module from a system - library directory. - - poppler/SignatureHandler.cc | 3 +++ - 1 file changed, 3 insertions(+) - -commit a8853b1df0a15570dff6ecc333769257bbf874c3 -Author: Adrian Perez de Castro -Date: Thu May 9 19:11:26 2013 +0300 - - Tagged-PDF: Modify pdfinfo to show the document structure - - https://bugs.freedesktop.org/show_bug.cgi?id=64816 - - utils/pdfinfo.cc | 96 - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 96 insertions(+) - -commit 1bf0ffdf1c68019515349262a14425c78c90ea18 -Author: Adrian Johnson -Date: Thu Feb 25 22:52:32 2016 +1030 - - Add missing files that got dropped from the previous commit - (989ceb6bd90) - - poppler/FlateEncoder.cc | 148 - ++++++++++++++++++++++++++++++++++++++++++++++++ - poppler/FlateEncoder.h | 73 ++++++++++++++++++++++++ - 2 files changed, 221 insertions(+) - -commit 989ceb6bd90cc8a79dd48c58183f1855de269c9b -Author: William Bader -Date: Thu Feb 25 21:01:16 2016 +1030 - - Add support for Flate compression in Level 3 PostScript output. - - The changes to the build variables are from Adrian Johnson's - DeflateStream - patches at https://bugs.freedesktop.org/attachment.cgi?id=89776 - - CMakeLists.txt | 21 ++++++-- - config.h.cmake | 5 +- - configure.ac | 97 +++++++++++++++++++++-------------- - poppler/FlateStream.cc | 14 +++++ - poppler/Makefile.am | 13 ++++- - poppler/PSOutputDev.cc | 122 - +++++++++++++++++++++++++++++--------------- - poppler/PSOutputDev.h | 10 +++- - poppler/Stream.cc | 4 +- - poppler/Stream.h | 2 +- - poppler/poppler-config.h.in | 6 +-- - 10 files changed, 202 insertions(+), 92 deletions(-) - -commit 91c0be60f3e7a53373ba660702358cf52f74d1b2 -Author: William Bader -Date: Thu Feb 25 20:50:10 2016 +1030 - - xpdf304: Merge xpdf-3.04 support for LZW encoding in PSOutputDev - and Stream. - - Level 2 and Level 3 PostScript now use LZW encoding instead of Run - Length encoding, which can make some images one tenth the size. - PSOutputDev provides setEnableLZW() and getEnableLZW() to control - support for LZW encoding. - - poppler/PSOutputDev.cc | 164 - ++++++++++++++++++++++++++++++++++--------------- - poppler/PSOutputDev.h | 3 + - poppler/Stream.cc | 145 +++++++++++++++++++++++++++++++++++++++++++ - poppler/Stream.h | 38 ++++++++++++ - 4 files changed, 301 insertions(+), 49 deletions(-) - -commit b88e68f9c84d987a814716aab50543bf8a5cb8f8 -Author: William Bader -Date: Thu Feb 25 20:41:48 2016 +1030 - - xpdf304: Merge change from poppler/Gfx.cc to avoid attempting a - tiling pattern fill - - with a singular transform matrix (abs(determinant) < 0.000001). - - poppler/Gfx.cc | 21 ++++++++++++++++++--- - 1 file changed, 18 insertions(+), 3 deletions(-) - -commit 3f5f0796d855cb8b8c3a038484d4ca7c6f1a55f2 -Author: Jason Crain -Date: Fri Feb 19 10:54:29 2016 -0600 - - Cache result of inner loop in visitDepthFirst - - Speeds up sorting of text blocks. - - bug #77087 - - poppler/TextOutputDev.cc | 42 ++++++++++++++++++++++++++++++++++-------- - poppler/TextOutputDev.h | 4 ++++ - 2 files changed, 38 insertions(+), 8 deletions(-) - -commit 448169bd96137e2bf0145783012276220bb0c51a -Author: Thomas Freitag -Date: Wed Feb 17 23:02:53 2016 +0100 - - Fall back to Gfx implementation of tiling pattern if repetition rate - is small - - Bug #90596 - - poppler/SplashOutputDev.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 23e4291f2545f56432b0a9c4d709048825327bc2 -Author: Thomas Freitag -Date: Wed Feb 17 22:59:30 2016 +0100 - - Check if PDF knows the witdh of 'm' in case of substituted font - - To check wether the PDF font declaration includes the width of - the letter 'm', compare it with the width of code 0. Code 0 is the - replacement glyph in a font and has the width of a blank. The width - table is initialized with this value, and the blank is always smaller - than a 'm'. - - Bug #94054 - - poppler/SplashOutputDev.cc | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -commit 88415426df363f1ef86b741cbc3587a89d31aa1f -Author: Albert Astals Cid -Date: Wed Feb 17 00:11:49 2016 +0100 - - 0.41.0 - - CMakeLists.txt | 2 +- - NEWS | 9 +++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - qt4/src/Doxyfile | 2 +- - qt5/src/Doxyfile | 2 +- - 6 files changed, 14 insertions(+), 5 deletions(-) - -commit 5689c990a187108ddc0a88b9825ba3bea644368f -Author: Thomas Freitag -Date: Tue Feb 16 01:44:31 2016 +0100 - - Adjust limit check and check in addition bitmap pointer - - Bug #94053 - - poppler/SplashOutputDev.cc | 11 +++++++++-- - 1 file changed, 9 insertions(+), 2 deletions(-) - -commit 57bc52b93e6431f0dc7762e2001dedd614383001 -Author: Jakub Wilk -Date: Sun Feb 14 11:22:31 2016 +0100 - - pdfinfo manpage: corrupted description of -js and -rawdates - - utils/pdfinfo.1 | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit ab3c9ccb630004be049cb59f303612aa2a35f408 -Author: Adrian Johnson -Date: Fri Feb 12 20:15:46 2016 +1030 - - cairo: add missing font types (fontCIDType0COT and fontTrueTypeOT) - - bug 93559 - - poppler/CairoFontEngine.cc | 41 ++++++++++++++++++++++++++++++++++++++--- - 1 file changed, 38 insertions(+), 3 deletions(-) - -commit f1c4d8ac1fe4293566285117170e8234c1be3943 -Author: Albert Astals Cid -Date: Thu Feb 4 01:08:59 2016 +0100 - - pdfseparate: Refine resource detection - - Related to bug #87637 - - poppler/PDFDoc.cc | 9 ++++++++- - 1 file changed, 8 insertions(+), 1 deletion(-) - -commit 449d45fab8e61393d858549460e61599e4dbd7eb -Author: Albert Astals Cid -Date: Wed Jan 13 23:19:12 2016 +0100 - - 0.40.0 + NEWS - - CMakeLists.txt | 2 +- - NEWS | 18 ++++++++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - qt4/src/Doxyfile | 2 +- - qt5/src/Doxyfile | 2 +- - 6 files changed, 23 insertions(+), 5 deletions(-) - -commit e9740b57324cf5a09f6f4312165da13c7b3a576b -Author: Albert Astals Cid -Date: Wed Jan 13 23:14:35 2016 +0100 - - Update copyrights - - poppler/Function.cc | 2 +- - utils/pdftocairo.cc | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit 3bfc45bfcca1a52447cedbb95afad1ef362ac6f0 -Author: Adrian Johnson -Date: Mon Jan 11 21:46:49 2016 +1030 - - pdftocairo: check for invalid use of -scale-to* and -paper[wh] options - - Bug 92195 - - utils/pdftocairo.cc | 12 +++++++++++- - 1 file changed, 11 insertions(+), 1 deletion(-) - -commit 819bea740b1fadb24833e0ecbdf4e75ddca8eb14 -Author: Adrian Johnson -Date: Mon Jan 11 19:44:14 2016 +1030 - - pdftocairo: ensure surface flushed before accessing image data - - utils/pdftocairo.cc | 1 + - 1 file changed, 1 insertion(+) - -commit f7542348b37cc881d854bbc36c3af0a4fe37d839 -Author: Adrian Johnson -Date: Mon Jan 11 19:39:34 2016 +1030 - - pdftocairo: document that -singlefile appends file type - - Bug 86254 - - utils/pdftocairo.1 | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -commit 9fa58b1ef6c97e2a30bb3197c11000fac3b059f4 -Author: Adrian Johnson -Date: Mon Jan 11 19:26:02 2016 +1030 - - pdftocairo: fix writing to stdout out with image output - - utils/pdftocairo.cc | 14 ++++++++------ - 1 file changed, 8 insertions(+), 6 deletions(-) - -commit dcefd7a232ba17af878b95efaa4ffaf147d095b7 -Author: Adrian Johnson -Date: Fri Jan 8 16:49:25 2016 +1030 - - check all byte ranges in signature dictionary - - poppler/Form.cc | 60 - +++++++++++++++++++++++++++++--------------------------- - poppler/Object.h | 12 +++++++++++- - 2 files changed, 42 insertions(+), 30 deletions(-) - -commit e5104973197c63c3a46e6d2c0f41c9de111d4686 -Author: André Guerreiro -Date: Fri Jan 8 17:02:35 2016 +1030 - - Improve robustness of SignatureHandler::validateCertificate - - poppler/SignatureHandler.cc | 18 +++++++----------- - 1 file changed, 7 insertions(+), 11 deletions(-) - -commit 4b0f6e5ec04058d12fbf7537c80b662cbea931b9 -Author: Markus Kilås -Date: Wed Jan 6 23:36:17 2016 +0100 - - Fix printf for unsigned int - - utils/pdfsig.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 01d4bb222d63eda7dc5ec903c0735179edf77c0e -Author: Albert Astals Cid -Date: Sun Jan 3 13:01:31 2016 +0100 - - Happy New Year - - poppler/poppler-config.h.cmake | 2 +- - poppler/poppler-config.h.in | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit d8f418d2f2ec5966d77caf128a52c834fdd0efcf -Author: Khaled Hosny -Date: Mon Nov 23 13:52:10 2015 +0400 - - Fix finding Arabic Presentation Forms ligatures - - PDF text containing Arabic Presentation forms ligatures is still not - found after the previous commit. - - This because the ligatures are decomposed in logical order after - normalisation, while the whole string is in visual order. For example - the RTL text ABCD in visual order will be DCBA, and assuming B is a - ligature, it will be decomposed to B1B2 so the string after - normalization will be DCB1B2A while we are expecting it to be DCB2B1A. - - This patch reverses the order of the decomposition of RTL characters - to - work around this issue. - - poppler/TextOutputDev.cc | 4 +++- - poppler/UnicodeTypeTable.cc | 20 ++++++++++++++++---- - poppler/UnicodeTypeTable.h | 7 ++++++- - 3 files changed, 25 insertions(+), 6 deletions(-) - -commit 67645087477beb618304ea34cbdbafd40b199276 -Author: Khaled Hosny -Date: Wed Nov 18 14:47:28 2015 +0400 - - Handle right-to-left text in search - - Currently right-to-left text reversal is only done during text - dumping, - but not during search. This commit applies the same reversal logic - during PDF search as well. - - poppler/TextOutputDev.cc | 191 - ++++++++++++++++++++++++++--------------------- - 1 file changed, 107 insertions(+), 84 deletions(-) - -commit 00422d0c6baaba639fa0660e3a933cdb76b28f88 -Author: Jason Crain -Date: Sun Dec 20 09:54:43 2015 -0600 - - cairo: use shape mask with soft mask - - Clear target with the shape mask whether the soft mask is set or not. - Propagate the shape up to any higher level groups and destroy the - shape pattern when done. - - Fix a memory leak by removing a call to 'cairo_reference - (cairo_shape)'. - We already keep track of the lifetime of cairo_shape using - knockoutCount. - - bug 91931 - - poppler/CairoOutputDev.cc | 49 - ++++++++++++++++++++++------------------------- - 1 file changed, 23 insertions(+), 26 deletions(-) - -commit bc4cab272e4fe28b836cb2ef1ff672f0d79d243c -Author: Carlos Garcia Campos -Date: Sat Jan 2 09:49:27 2016 +0100 - - regtest: Fix the number of worker threads spawned reported in log - of run-tests command - - regtest/TestRun.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit ea75de614e666d8235c38048585315e0d7ff5522 -Author: Adam Reichold -Date: Sat Jan 2 09:48:03 2016 +0100 - - regtest: Limit the number of worker threads to the number of documents - to create references - - The same way we do for the run-tests command. - - regtest/TestReferences.py | 27 ++++++++++++++++++--------- - 1 file changed, 18 insertions(+), 9 deletions(-) - -commit 25bb59a81de8a1b6dd23fec871a97ccb11fe9d64 -Author: Carlos Garcia Campos -Date: Fri Jan 1 12:45:42 2016 +0100 - - regtest: Allow to interrupt run-tests and create-refs commands when - multiple threads are used - - The Queue join implementation uses a non-timed wait that blocks - the main - thread, making it impossible to interrupt it with CTRL+C or sending - SIGINT signal. Using any timeout value for wait would fix the problem, - but Queue doesn't allow to pass a timeout to the join method. The - Queue implementation is actually quite simple, so we can just add our - own implementation with only the things we really need and use - a timeout - value when calling wait() in join(). - - regtest/InterruptibleQueue.py | 68 - +++++++++++++++++++++++++++++++++++++++++++ - regtest/TestReferences.py | 4 +-- - regtest/TestRun.py | 4 +-- - 3 files changed, 72 insertions(+), 4 deletions(-) - -commit ffb3ff633b124c476ab48bbcfce04d7f418df9bc -Author: Adam Reichold -Date: Fri Jan 1 11:32:14 2016 +0100 - - regtest: Do not use the log printer with the TestReferences lock held - - regtest/TestReferences.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit e3b09727ad96a03ba1250f49486948899b4df793 -Author: Adam Reichold -Date: Fri Dec 25 14:10:03 2015 +0100 - - Make detection of version one of OpenJPEG prefer a pkg-config manifest - if it exists. - - CMakeLists.txt | 1 - - cmake/modules/FindLIBOPENJPEG.cmake | 37 - +++++++++++++++++++++++-------------- - 2 files changed, 23 insertions(+), 15 deletions(-) - -commit 7c880daecfcddac2f8181d5f3d506dd409812dbe -Author: Adam Reichold -Date: Fri Dec 25 14:10:03 2015 +0100 - - Make use of LINK_PRIVATE flag to fix warning on CMake policy 0022. - - CMakeLists.txt | 3 +-- - cpp/CMakeLists.txt | 3 +-- - 2 files changed, 2 insertions(+), 4 deletions(-) - -commit 4a413b9b95d5c6815c91adb815254cce97dd5b4b -Author: Adam Reichold -Date: Fri Dec 25 14:10:03 2015 +0100 - - Make target names for Qt4 and Qt5 builds unique so they can be built - at the same time using recent CMake and Ninja versions. - - qt4/tests/CMakeLists.txt | 44 +++++++++++++++++++++--------------------- - qt5/CMakeLists.txt | 2 ++ - qt5/demos/CMakeLists.txt | 2 -- - qt5/src/CMakeLists.txt | 2 -- - qt5/tests/CMakeLists.txt | 50 - +++++++++++++++++++++++------------------------- - 5 files changed, 48 insertions(+), 52 deletions(-) - -commit b3425dd3261679958cd56c0f71995c15d2124433 -Author: Albert Astals Cid -Date: Tue Dec 22 22:50:33 2015 +0100 - - Do not crash on invalid files - - Bug #93476 - - poppler/Function.cc | 4 ++++ - 1 file changed, 4 insertions(+) - -commit 5d57c34cbf9288eec6ddb149e905268405c19450 -Author: Pino Toscano -Date: Sun Dec 20 08:42:25 2015 +0100 - - typo fix: "occurence" -> "occurrence" - - utils/pdfunite.1 | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 3eee5274abb24d5b5be05262aafe794652cdac35 -Author: Albert Astals Cid -Date: Thu Dec 17 00:09:37 2015 +0100 - - New gtk-doc stuff - - gtk-doc.make | 13 ++++++++++++- - 1 file changed, 12 insertions(+), 1 deletion(-) - -commit fb1f7b0fb037837f37be65aa23ecac711a1b4981 -Author: Albert Astals Cid -Date: Thu Dec 17 00:08:24 2015 +0100 - - Prepare for 0.39 - - CMakeLists.txt | 4 ++-- - NEWS | 21 +++++++++++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - poppler/CairoOutputDev.cc | 2 +- - poppler/CairoOutputDev.h | 2 +- - poppler/GfxState.cc | 1 + - poppler/GfxState.h | 1 + - poppler/JPEG2000Stream.cc | 1 + - poppler/Makefile.am | 2 +- - poppler/PSOutputDev.cc | 2 +- - qt4/src/Doxyfile | 2 +- - qt5/src/Doxyfile | 2 +- - utils/pdftocairo.cc | 2 +- - 14 files changed, 35 insertions(+), 11 deletions(-) - -commit 7ed7fb6d2be009c5d433338a6b3da816dd38f5ca -Author: Pino Toscano -Date: Sun Oct 12 22:43:22 2014 +0200 - - Fix typos in error messages - - Reported by Jakub Wilk, thanks! - - poppler/JPEG2000Stream.cc | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit 47ffce08e75002aa0707107c76984e7e471d8afb -Author: Adrian Johnson -Date: Thu Jan 15 21:20:05 2015 +1030 - - cairo: Implement function shading using mesh gradients - - Gfx draws function shadings by subdividing the shading until the - colors are the same or the maximum subdivision is reached then fills - each cell with the color of the mid point of the cell. The solid - colors can result in a pixelated appearance. - - This patch implements a cairo specific version of the function shading - that uses mesh gradients to draw each cell. By setting the corner of - each patch to the shading color at that point, the mesh gradient will - interpolate the colors resulting in a smooth appearance. - - Bug 88394 - - poppler/CairoOutputDev.cc | 101 - ++++++++++++++++++++++++++++++++++++++++++++++ - poppler/CairoOutputDev.h | 5 ++- - 2 files changed, 105 insertions(+), 1 deletion(-) - -commit d7717cf18d0db5663687690ccf66102e9a124025 -Author: Jason Crain -Date: Fri Aug 22 00:51:36 2014 -0500 - - cairo: Scale radial pattern - - Scale the radial pattern because cairo/pixman do not work well with a - very large or small scaled matrix. See cairo bug #81657. - - bug #22098 - - poppler/CairoOutputDev.cc | 26 ++++++++++++++++++++------ - 1 file changed, 20 insertions(+), 6 deletions(-) - -commit 9ef565d0302ad4a36c53d7cd3251bff6a53070ea -Author: Carlos Garcia Campos -Date: Fri Dec 4 11:08:45 2015 +0100 - - regtest: Pass always both the owner and user passwords to the tools - - regtest/backends/cairo.py | 2 +- - regtest/backends/postscript.py | 2 +- - regtest/backends/splash.py | 2 +- - regtest/backends/text.py | 2 +- - 4 files changed, 4 insertions(+), 4 deletions(-) - -commit 3686005cde6f0c0992498a1773b02331fce79b1c -Author: Carlos Garcia Campos -Date: Fri Dec 4 11:03:27 2015 +0100 - - pdftocairo: Fix double free when both user and owner passwords - are given - - utils/pdftocairo.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 38796894f8ab19c2cd0b996e6b1aa0be98326eac -Author: Hib Eris -Date: Mon Jun 9 22:54:54 2014 +0200 - - Remove enum PopplerOrientation from API - - This should have been removed long time ago with - 1aad886c6c19a964a3fc9e18f31acc8e115478e0 - - https://bugs.freedesktop.org/show_bug.cgi?id=93229 - - glib/poppler.h | 8 -------- - glib/reference/poppler-docs.sgml | 1 - - glib/reference/poppler-sections.txt | 11 ----------- - 3 files changed, 20 deletions(-) - -commit 921fe21d56be27c8164111577b9a848525b35508 -Author: Carlos Garcia Campos -Date: Thu Dec 3 16:23:30 2015 +0100 - - regtest: Fix testing text backend - - Fix a typo in previous commit. - - regtest/backends/text.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 3e22c678e749eda4402a7440b91b33d627705fdb -Author: Carlos Garcia Campos -Date: Thu Dec 3 15:46:58 2015 +0100 - - regtest: Add support for testing password protected documents - - Similar to how skipped file works, you can pass a passwords file from - the command line or add a Passwords file to your docs directory. This - file should be a python file containing a "passwords" dictionary where - the key is the test document and the value is the password required to - open that document. - - regtest/TestReferences.py | 7 +++++-- - regtest/TestRun.py | 11 +++++++---- - regtest/Utils.py | 13 +++++++++++++ - regtest/backends/__init__.py | 2 +- - regtest/backends/cairo.py | 7 +++++-- - regtest/backends/postscript.py | 7 +++++-- - regtest/backends/splash.py | 7 +++++-- - regtest/backends/text.py | 7 +++++-- - regtest/main.py | 3 +++ - 9 files changed, 49 insertions(+), 15 deletions(-) - -commit 50ba37c7b1aff14c73f158ff7f33d31953af512b -Author: Hib Eris -Date: Sun Jun 8 14:03:17 2014 +0200 - - doc: Move PopplerError to it's own section - - https://bugs.freedesktop.org/show_bug.cgi?id=79837 - - glib/poppler.cc | 15 +++++++++++++++ - glib/reference/poppler-docs.sgml | 1 + - glib/reference/poppler-sections.txt | 18 +++++++++++++----- - 3 files changed, 29 insertions(+), 5 deletions(-) - -commit ef518d601836fcedb8b558447f10c846e4038318 -Author: Hib Eris -Date: Mon Jun 9 15:53:57 2014 +0200 - - doc: Add poppler_orientation_get_type to poppler-sections.txt - - https://bugs.freedesktop.org/show_bug.cgi?id=79837 - - glib/reference/poppler-sections.txt | 1 + - 1 file changed, 1 insertion(+) - -commit 7f1de12da6d1128535c2e3e7dc89e29ca61b858f -Author: Hib Eris -Date: Sun Jun 8 22:27:47 2014 +0200 - - doc: Fix PopplerStructureElement documentation - - https://bugs.freedesktop.org/show_bug.cgi?id=79837 - - glib/poppler-structure-element.cc | 11 +++++------ - 1 file changed, 5 insertions(+), 6 deletions(-) - -commit d4a9da24d2c479d53ff1094e6e1d7c1d79561da4 -Author: Hib Eris -Date: Mon Jun 9 08:34:13 2014 +0200 - - doc: Do not include private headers - - https://bugs.freedesktop.org/show_bug.cgi?id=79837 - - glib/reference/Makefile.am | 6 +++++- - glib/reference/poppler-sections.txt | 1 - - 2 files changed, 5 insertions(+), 2 deletions(-) - -commit 7980727d76b29db12b468e5da19d174d42bc3b00 -Author: Adrian Johnson -Date: Tue Oct 27 22:27:22 2015 +1030 - - pdftops: fix %%PageBoundingBox - - The %%PageBoundingBox calculation did not take into account the - page transformation - (eg rotate, fit-to-page). - - Bug 87161 - - poppler/GfxState.cc | 16 +++++++++++ - poppler/GfxState.h | 5 ++++ - poppler/PSOutputDev.cc | 72 - +++++++++++++++++++++++++++++++++++++------------- - 3 files changed, 74 insertions(+), 19 deletions(-) - -commit 37840827c4073dedfd37915a74eb8fe0c44843c3 -Author: Thomas Freitag -Date: Wed Dec 2 22:15:33 2015 +0100 - - Ignore the alternateSpace and tintTransform - - As a reasonable compromise in my eyes this new patch - now also checks the alternate colorspace, and if this - is DeviceGray in case of a separation colorspace with - name black this patch treats is as if it is really a - DeviceGray and so ignore tintTransform and alternate - colorspace just in this case when using getGray() and getRGB(). - - Bug #92381 - - poppler/GfxState.cc | 64 - +++++++++++++++++++++++++++++++++++++++-------------- - 1 file changed, 48 insertions(+), 16 deletions(-) - -commit 72f0ea4f883417a920be65cb778989bf81e8f57d -Author: Carlos Garcia Campos -Date: Wed Dec 2 16:59:16 2015 +0100 - - glib-demo: Use duration_real in transitions demo - - glib/demo/transitions.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit b5c7b93cabc0d95fb3a7dc1b8104363cd04873c1 -Author: Arseniy Lartsev -Date: Wed Dec 2 16:48:05 2015 +0100 - - glib: Add duration_real to PopplerPageTransition - - https://bugs.freedesktop.org/show_bug.cgi?id=92040 - - glib/poppler-page.cc | 1 + - glib/poppler-page.h | 1 + - 2 files changed, 2 insertions(+) - -commit 38ff3736576b81be51eb11454862f83d1c3f3d0e -Author: Adrian Johnson -Date: Sun Nov 29 08:06:14 2015 +1030 - - Visual Studio 2015 now supports snprintf - - Bug 93116 - - config.h.cmake | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit c63aa0c153fc114e6457fc89a40a9aa2a5508b9a -Author: Albert Astals Cid -Date: Mon Nov 16 21:44:17 2015 +0100 - - Poppler 0.38 - - CMakeLists.txt | 4 ++-- - NEWS | 12 ++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/Doxyfile | 2 +- - qt5/src/Doxyfile | 2 +- - 7 files changed, 19 insertions(+), 7 deletions(-) - -commit 6ca4afcea790d9118af3cda4961a647485fb14e8 -Author: Albert Astals Cid -Date: Mon Nov 16 21:40:20 2015 +0100 - - Update copyright years - - utils/pdftocairo.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 0e14049bc5b85f8ae2e1a56bc09480a499343e49 -Author: Adrian Johnson -Date: Sat Oct 31 18:32:49 2015 +1030 - - pdftocairo: fix fit to page transformation - - Testing with the test case in bug 87161 revealed some bugs. - - utils/pdftocairo.cc | 42 ++++++++++++++++++++---------------------- - 1 file changed, 20 insertions(+), 22 deletions(-) - -commit 8859cebef5bb5308757505c8f2c8ca9fc12e154d -Author: Adrian Johnson -Date: Sat Oct 31 08:04:51 2015 +1030 - - gitignore - - utils/.gitignore | 1 + - 1 file changed, 1 insertion(+) - -commit 946eb417e6da11491f6409669119254c769b6945 -Author: Adrian Johnson -Date: Thu Oct 29 21:59:06 2015 +1030 - - man pages: remove final comma in see also list - - utils/pdfdetach.1 | 2 +- - utils/pdffonts.1 | 2 +- - utils/pdfimages.1 | 2 +- - utils/pdfinfo.1 | 2 +- - utils/pdfseparate.1 | 2 +- - utils/pdfsig.1 | 2 +- - utils/pdftocairo.1 | 2 +- - utils/pdftohtml.1 | 2 +- - utils/pdftoppm.1 | 2 +- - utils/pdftops.1 | 2 +- - utils/pdftotext.1 | 2 +- - utils/pdfunite.1 | 2 +- - 12 files changed, 12 insertions(+), 12 deletions(-) - -commit 1c66076bac768774e8b2b514bc0c555bc0395348 -Author: André Guerreiro -Date: Thu Oct 29 21:55:46 2015 +1030 - - pdfsig: update man page - - utils/pdfsig.1 | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -commit 3167964d70647d7b04e3ef8f415d5935990ecc9a -Author: Thomas Freitag -Date: Wed Oct 28 23:13:44 2015 +0100 - - Multiply opacity in case of pattern colorspace - - Bug #92592 - - poppler/Gfx.cc | 4 +++- - poppler/OutputDev.h | 4 +++- - poppler/SplashOutputDev.cc | 8 ++++++++ - poppler/SplashOutputDev.h | 2 ++ - splash/Splash.cc | 16 ++++++++++++++-- - splash/Splash.h | 2 ++ - splash/SplashState.cc | 11 ++++++++++- - splash/SplashState.h | 5 ++++- - 8 files changed, 46 insertions(+), 6 deletions(-) - -commit 298caa2fc52cf50e92e1afda39b77b11f2de9743 -Author: Adrian Johnson -Date: Wed Oct 28 20:54:43 2015 +1030 - - Add pdfsig reference (and other missing utils) to man pages - - utils/pdfdetach.1 | 5 ++++- - utils/pdffonts.1 | 3 +++ - utils/pdfimages.1 | 5 ++++- - utils/pdfinfo.1 | 3 +++ - utils/pdfseparate.1 | 10 ++++++++++ - utils/pdftocairo.1 | 3 +++ - utils/pdftohtml.1 | 3 +++ - utils/pdftoppm.1 | 3 +++ - utils/pdftops.1 | 3 +++ - utils/pdftotext.1 | 5 ++++- - utils/pdfunite.1 | 10 ++++++++++ - 11 files changed, 50 insertions(+), 3 deletions(-) - -commit 5a6d6f5ec8782bb69a5805d8d8379a33aa00edec -Author: Adrian Johnson -Date: Wed Oct 28 20:54:23 2015 +1030 - - Add pdfsig man page - - utils/pdfsig.1 | 46 ++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 46 insertions(+) - -commit 1f8e1a029773cefe0c31357c1e450cc4ecd5a5b5 -Author: Adrian Johnson -Date: Wed Oct 28 19:38:14 2015 +1030 - - pdfsig: rename -c to -nocert - - and make help options consistent with other tools (add -? and list - help options last) - - utils/pdfsig.cc | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -commit 9d5bf425bd82dda303362380c488559be0007d78 -Author: Adrian Johnson -Date: Wed Oct 28 19:34:26 2015 +1030 - - rename pdfsigverify to pdfsig - - utils/CMakeLists.txt | 12 ++++++------ - utils/Makefile.am | 6 +++--- - utils/{pdfsigverify.cc => pdfsig.cc} | 6 +++--- - 3 files changed, 12 insertions(+), 12 deletions(-) - -commit 1d97f708ceb7cd34ccdb1a4f85192efe83d1853c -Author: Albert Astals Cid -Date: Tue Oct 27 22:27:31 2015 +0100 - - Differentiate between unknown and untrusted issuer - - poppler/SignatureHandler.cc | 4 +++- - poppler/SignatureInfo.h | 4 +++- - utils/pdfsigverify.cc | 7 +++++-- - 3 files changed, 11 insertions(+), 4 deletions(-) - -commit 19e20dc69a631f92bf4fdc0be0dd840a460cfc92 -Author: Markus Kilås -Date: Tue Oct 27 22:23:06 2015 +0100 - - Handle untrusted issuer - - poppler/SignatureHandler.cc | 2 ++ - 1 file changed, 2 insertions(+) - -commit c20f68ce434366bbec4077824da97ce843ecdff3 -Author: Marek Kasik -Date: Thu Oct 22 16:15:23 2015 +0200 - - forms: Fix showing of some non-ASCII characters - - The &uChar is an array with just 1 member not 2. - This fixes mapping of some Unicode characters to - character codes. - - poppler/Annot.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 64735113b203bb5adaaadc65641ef6c971f82bc6 -Author: Marek Kasik -Date: Fri Oct 23 10:15:47 2015 +0200 - - forms: Find correct glyph or return 0 - - Function CharCodeToUnicode::mapToCharCode() could return - wrong character code for given unicode character because - of wrongly placed continue statement. - - poppler/CharCodeToUnicode.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 02d3564faa5d8174ed93ce66fcda975b1a898ec5 -Author: André Guerreiro -Date: Wed Oct 14 22:50:05 2015 +0200 - - Incremental hashing + large file support for digital signatures - - poppler/Form.cc | 63 - +++++++++++++++++++++++++++++++++------------ - poppler/Form.h | 1 + - poppler/SignatureHandler.cc | 34 ++++++++++++++---------- - poppler/SignatureHandler.h | 9 +++++-- - 4 files changed, 76 insertions(+), 31 deletions(-) - -commit fb906dca8b84d03267099cc3174c50e932a55236 -Author: Adrian Johnson -Date: Thu Oct 15 07:19:16 2015 +1030 - - cmake: synchronize warnings with configure - - CMakeLists.txt | 16 ++++++++++++++++ - 1 file changed, 16 insertions(+) - -commit 6329e3999d0a45b4c0cd0a8b675362e694bf1243 -Author: Adrian Johnson -Date: Thu Oct 15 07:11:13 2015 +1030 - - configure: warn that the internal DCT/JPX decoders are unmaintained - - configure.ac | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 67e1463dc65f85aec1f85b5bace9e810bf477e15 -Author: Albert Astals Cid -Date: Mon Oct 12 16:49:34 2015 +0200 - - Clarify getting a xpdf license does not allow you to use poppler in - closed source projects - - README | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -commit 44e1a2f715d0da8bb2941da296faab7ee144cfc2 -Author: Albert Astals Cid -Date: Fri Oct 9 23:28:03 2015 +0200 - - Poppler 0.37 - - CMakeLists.txt | 4 ++-- - NEWS | 13 +++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - gtk-doc.make | 20 ++++++++++++-------- - poppler/Makefile.am | 2 +- - qt4/src/CMakeLists.txt | 2 +- - qt4/src/Doxyfile | 2 +- - qt4/src/Makefile.am | 2 +- - qt5/src/CMakeLists.txt | 2 +- - qt5/src/Doxyfile | 2 +- - qt5/src/Makefile.am | 2 +- - 12 files changed, 36 insertions(+), 19 deletions(-) - -commit 5570c70a20ae62a9b3341372fafc64e916774adb -Author: André Guerreiro -Date: Mon Oct 5 16:50:30 2015 +0200 - - NSS conditional build - - CMakeLists.txt | 19 ++++++++++++++----- - config.h.cmake | 3 +++ - configure.ac | 20 +++++++++++++++++++- - poppler/Form.cc | 7 ++++++- - poppler/Makefile.am | 28 ++++++++++++++++++++++------ - utils/CMakeLists.txt | 16 +++++++++------- - utils/Makefile.am | 5 ++++- - 7 files changed, 77 insertions(+), 21 deletions(-) - -commit c7c0207b1cfe49a4353d6cda93dbebef4508138f -Author: André Guerreiro -Date: Mon Oct 5 15:57:04 2015 +0200 - - Support for adbe.pkcs7.sha1 signatures - - poppler/Form.cc | 2 +- - poppler/SignatureHandler.cc | 27 +++++++++++++++++++++++++-- - 2 files changed, 26 insertions(+), 3 deletions(-) - -commit e8cb16bff48dbe2d9efd988ddb09608406d2633b -Author: Adrian Johnson -Date: Sun Sep 27 15:34:12 2015 +0930 - - configure: fix openjpeg detection - - - configure was failing when enable_libopenjpeg="auto" and openjpeg - not found - - fix header check for pre 1.4 versions - - Bug 92135 - - configure.ac | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit a82e338b4f9639aced3201bf7639bbdf1a7974e2 -Author: Albert Astals Cid -Date: Sun Sep 27 15:41:27 2015 +0200 - - Fix memory leak on font reload - - poppler/SplashOutputDev.cc | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -commit 8639b20da3d9be62f47462ad1cdaa5c65d117dfb -Author: Thomas Freitag -Date: Sun Sep 27 15:37:51 2015 +0200 - - Try to use an external font if the internal one is invalid - - poppler/GfxFont.h | 11 +++++++++++ - poppler/SplashOutputDev.cc | 8 ++++++++ - 2 files changed, 19 insertions(+) - -commit e3225a0543d1e6fbc269094ca192879816296993 -Author: Albert Astals Cid -Date: Fri Sep 25 01:14:41 2015 +0200 - - Fix crash in GfxGouraudTriangleShading for malformed files - - poppler/GfxState.cc | 26 ++++++++++++++++---------- - 1 file changed, 16 insertions(+), 10 deletions(-) - -commit 0a33e3a740a1dbe57023d0a51077689d29d79def -Author: Albert Astals Cid -Date: Fri Sep 25 01:00:32 2015 +0200 - - Fix the fix of the fix for SplashOutputDev::beginTransparencyGroup - and malformed files - - poppler/SplashOutputDev.cc | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -commit b723e4f90c78ac972bf30d7006283042930374d7 -Author: Albert Astals Cid -Date: Fri Sep 25 00:53:10 2015 +0200 - - Fix crash in malformed document in SplashOutputDev::drawMaskedImage - - And improved the one i just did for - SplashOutputDev::beginTransparencyGroup - - poppler/SplashOutputDev.cc | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -commit fd49b3d4ecdbe04c4f51e6ab77687dc25bbc3f49 -Author: Albert Astals Cid -Date: Fri Sep 25 00:45:55 2015 +0200 - - Fix crash on Annot::layoutText for malformed documents - - poppler/Annot.cc | 3 +++ - 1 file changed, 3 insertions(+) - -commit a88be71fee8a4fd8e9a5a1d9d955addc0f3076ea -Author: Albert Astals Cid -Date: Fri Sep 25 00:42:14 2015 +0200 - - Fix crash in SplashOutputDev::beginTransparencyGroup in malformed file - - poppler/SplashOutputDev.cc | 6 ++++++ - 1 file changed, 6 insertions(+) - -commit 0fa5c17ea409c3fdfe1e3a97ff5e4bae96da1cae -Author: Albert Astals Cid -Date: Fri Sep 25 00:36:33 2015 +0200 - - Fix crash on JBIG2Stream::readHalftoneRegionSeg for malformed - documents - - poppler/JBIG2Stream.cc | 11 ++++++++--- - 1 file changed, 8 insertions(+), 3 deletions(-) - -commit 942adfc25e7a00ac3cf032ced2d8949e99099f70 -Author: Albert Astals Cid -Date: Fri Sep 25 00:30:58 2015 +0200 - - Fix crash on AnnotInk::draw for malformed documents - - poppler/Annot.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 4f7903ebc037c63683637973285bc34ea83542dc -Author: André Guerreiro -Date: Thu Sep 24 23:57:46 2015 +0200 - - Fix for Buffer overflow - - poppler/Form.cc | 13 ++++++++++++- - 1 file changed, 12 insertions(+), 1 deletion(-) - -commit 9aa19159bff4db02889cba48b9b31e40247e5314 -Author: Even Rouault -Date: Fri Sep 11 13:56:05 2015 +0200 - - Catalog::cachePageTree(): recover from out of memory condition - - poppler/Catalog.cc | 12 +++++++++--- - 1 file changed, 9 insertions(+), 3 deletions(-) - -commit 8dc9187690de10f1538764972799a39660272d1f -Author: Even Rouault -Date: Fri Sep 11 13:30:32 2015 +0200 - - Catalog::getNumPages(): validate page count - - poppler/Catalog.cc | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - -commit 7028f835a603e12dd73452a39f56ac0b633207b2 -Author: Arseniy Lartsev -Date: Sun Sep 20 18:32:36 2015 +0200 - - PageTransition D is a number not an int - - See bug #92040 - - poppler/PageTransition.cc | 5 +++-- - poppler/PageTransition.h | 5 +++-- - qt4/src/poppler-page-transition.cc | 6 ++++++ - qt4/src/poppler-page-transition.h | 14 ++++++++++++-- - qt5/src/poppler-page-transition.cc | 6 ++++++ - qt5/src/poppler-page-transition.h | 14 ++++++++++++-- - 6 files changed, 42 insertions(+), 8 deletions(-) - -commit a98f99e90aac703e648697da5c897c49645eda10 -Author: Kenji Uno -Date: Wed Sep 16 22:08:59 2015 +0200 - - SplashOuputDev: Protect calls to set/getAA with the proper #if guards - - Bug #92006 - - poppler/SplashOutputDev.cc | 7 +++++++ - 1 file changed, 7 insertions(+) - -commit 2a48cab5e66a69ed1bf3e792efc109ddcad8d5ee -Author: Jason Crain -Date: Tue Sep 15 14:43:21 2015 -0500 - - cairo: Use mask for even-odd fill - - Bug #84527 - - poppler/CairoOutputDev.cc | 10 +++++++++- - 1 file changed, 9 insertions(+), 1 deletion(-) - -commit 10693fb236ff92c6aa0c0a9f762362d2fd9ea738 -Author: Albert Astals Cid -Date: Mon Sep 14 20:19:00 2015 +0200 - - include shuffling - - poppler/PDFDoc.cc | 2 -- - poppler/PDFDoc.h | 3 --- - poppler/SignatureHandler.cc | 1 - - utils/pdfsigverify.cc | 1 + - 4 files changed, 1 insertion(+), 6 deletions(-) - -commit 6e24d374987fbba0f5a133d73dfcb3e73129b534 -Author: Albert Astals Cid -Date: Mon Sep 14 19:59:09 2015 +0200 - - Simplify biterange handling - - poppler/Form.cc | 22 +++++++--------------- - poppler/Form.h | 2 +- - 2 files changed, 8 insertions(+), 16 deletions(-) - -commit 7afa26fc389f4b2aa67cdf286e9c4ebfb3d78de5 -Author: Albert Astals Cid -Date: Mon Sep 14 19:50:56 2015 +0200 - - Disable SignatureInfo and SignatureHandler copy ctr and assignment - operator - - poppler/SignatureHandler.h | 3 +++ - poppler/SignatureInfo.h | 3 +++ - 2 files changed, 6 insertions(+) - -commit 5348f8d080ae9f0ee58d75fd7ae2bc9f23692eca -Author: Albert Astals Cid -Date: Mon Sep 14 19:46:23 2015 +0200 - - Fix some leaks in SignatureHandler - - poppler/SignatureHandler.cc | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -commit 17b3a8dc2f8ab50696dd1247c4b6dd75991ab17e -Author: Albert Astals Cid -Date: Mon Sep 14 19:40:30 2015 +0200 - - Signatures: keep Goostring and convert to uchar when needed - - poppler/Form.cc | 11 ++++++----- - poppler/Form.h | 5 ++--- - 2 files changed, 8 insertions(+), 8 deletions(-) - -commit a4ac855435325225e3d89d83870ff08ec73d86f8 -Author: Albert Astals Cid -Date: Mon Sep 14 01:52:41 2015 +0200 - - PDFDoc::getSignatureWidgets: Do not assume a given page exists - - poppler/PDFDoc.cc | 13 ++++++++----- - 1 file changed, 8 insertions(+), 5 deletions(-) - -commit 6509068cf6e4a92359bcc5402f9e9eb9649d641c -Author: Albert Astals Cid -Date: Mon Sep 14 01:45:47 2015 +0200 - - SignatureHandler initialize members on constructor - - poppler/SignatureHandler.cc | 4 ++++ - poppler/SignatureHandler.h | 8 ++++---- - 2 files changed, 8 insertions(+), 4 deletions(-) - -commit 5d8dfaa9d55932cde638880bcee063a6f084689f -Author: Albert Astals Cid -Date: Mon Sep 14 01:43:16 2015 +0200 - - SignatureInfo::setSignerName: free old signer_name - - poppler/SignatureInfo.cc | 1 + - 1 file changed, 1 insertion(+) - -commit f284cfc7394175ea675d7c76d97a1f8461cf17d2 -Author: Albert Astals Cid -Date: Mon Sep 14 01:42:11 2015 +0200 - - Start function names on lowercase - - poppler/Form.cc | 4 ++-- - poppler/SignatureHandler.cc | 5 +++-- - poppler/SignatureHandler.h | 5 +++-- - 3 files changed, 8 insertions(+), 6 deletions(-) - -commit 127ad3bb038d90ad7579e2e94cff2890869e2f43 -Author: Albert Astals Cid -Date: Mon Sep 14 01:40:31 2015 +0200 - - FormFieldSignature::parseInfo: check for isString instead !isNull - - poppler/Form.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit e428a3b8449830bf00706b4ccf86c27a55970f1f -Author: Albert Astals Cid -Date: Mon Sep 14 01:39:57 2015 +0200 - - FormFieldSignature::parseInfo: Use shorter isName version - - poppler/Form.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit ba3a4ec30fcd303e91ef41bef491c230a822bd32 -Author: Albert Astals Cid -Date: Mon Sep 14 01:36:44 2015 +0200 - - Delete the signature_info in FormFieldSignature not in pdfsigverify - - poppler/Form.cc | 1 + - utils/pdfsigverify.cc | 3 +-- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit e6b3d696adea70c79f60a67c275e23c29d2534c3 -Author: Albert Astals Cid -Date: Mon Sep 14 01:33:56 2015 +0200 - - Make signature code more resilient - - Do not abort with sign-a-pdf-with-reader-enabled.pdf - - poppler/Form.cc | 68 - +++++++++++++++++++++++++++++++-------------------------- - 1 file changed, 37 insertions(+), 31 deletions(-) - -commit 23fa84ff91666d1feb2242fe4572eb397c791c55 -Author: Albert Astals Cid -Date: Mon Sep 14 01:28:18 2015 +0200 - - cmake: No need if NSS3_FOUND if it's required - - CMakeLists.txt | 9 +++------ - 1 file changed, 3 insertions(+), 6 deletions(-) - -commit 7a1dac27d380f0b1a68383525a4ae4a0c7f3e6f5 -Author: Albert Astals Cid -Date: Mon Sep 14 01:26:31 2015 +0200 - - FormFieldSignature::validateSignature: Free to_check earlier - - poppler/Form.cc | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -commit 71cc344d85aba7a4ae79e2c4c454341096a2329b -Author: Albert Astals Cid -Date: Mon Sep 14 01:25:31 2015 +0200 - - Remove PDFDoc::countSignatures - - poppler/PDFDoc.cc | 7 +------ - poppler/PDFDoc.h | 3 +-- - utils/pdfsigverify.cc | 9 +++------ - 3 files changed, 5 insertions(+), 14 deletions(-) - -commit c68954dd73202f21b62899dc335fd74218d5b595 -Author: Albert Astals Cid -Date: Mon Sep 14 01:20:41 2015 +0200 - - pdfsigverify: move assignment before if - - utils/pdfsigverify.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 8727fe6c08b7326523d6e15c90ce89e5e9d7300e -Author: Albert Astals Cid -Date: Mon Sep 14 01:20:16 2015 +0200 - - pdfsigverify: no if before delete - - utils/pdfsigverify.cc | 7 +++---- - 1 file changed, 3 insertions(+), 4 deletions(-) - -commit eb1a6a6254fb393555d6d30b99f4ea800d8d446b -Author: André Guerreiro -Date: Mon Sep 14 01:17:30 2015 +0200 - - Core: Support for digital signatures - - Coded with André Esser - - Bug #16770 - - CMakeLists.txt | 9 ++ - cmake/modules/FindNSS3.cmake | 22 ++++ - configure.ac | 2 + - poppler/DateInfo.cc | 26 ++++ - poppler/DateInfo.h | 3 + - poppler/Form.cc | 116 ++++++++++++++++- - poppler/Form.h | 16 +++ - poppler/Makefile.am | 6 + - poppler/PDFDoc.cc | 27 ++++ - poppler/PDFDoc.h | 9 ++ - poppler/SignatureHandler.cc | 301 - +++++++++++++++++++++++++++++++++++++++++++ - poppler/SignatureHandler.h | 65 ++++++++++ - poppler/SignatureInfo.cc | 86 +++++++++++++ - poppler/SignatureInfo.h | 66 ++++++++++ - utils/CMakeLists.txt | 8 ++ - utils/Makefile.am | 4 + - utils/pdfsigverify.cc | 174 +++++++++++++++++++++++++ - 17 files changed, 938 insertions(+), 2 deletions(-) - -commit b14d4b0968f7b0ad783c3fa56ad863d7fda235fe -Author: Albert Astals Cid -Date: Thu Sep 10 00:33:15 2015 +0200 - - Post release fixlets for the NEWS file - - NEWS | 5 +---- - 1 file changed, 1 insertion(+), 4 deletions(-) - -commit de1ece5c929c3f46c04be76b4b72f6371911fd1a -Author: Albert Astals Cid -Date: Thu Sep 10 00:26:02 2015 +0200 - - Poppler 0.36 - - CMakeLists.txt | 4 ++-- - NEWS | 36 ++++++++++++++++++++++++++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/CMakeLists.txt | 2 +- - qt4/src/Doxyfile | 2 +- - qt4/src/Makefile.am | 2 +- - qt5/src/CMakeLists.txt | 2 +- - qt5/src/Doxyfile | 2 +- - qt5/src/Makefile.am | 2 +- - 11 files changed, 47 insertions(+), 11 deletions(-) - -commit d490c21fe4a60cff26f34c619d3078dcb575bf44 -Author: Albert Astals Cid -Date: Wed Sep 9 23:55:57 2015 +0200 - - Update (C) - - poppler/CairoOutputDev.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit fc69a5e7dab48636946282e5d4b7be77e650023c -Author: Albert Astals Cid -Date: Tue Sep 8 17:48:49 2015 +0200 - - Qt5: Minor optimizations - - Call reserve on containers - Use QStringLiteral/QLatin1String - - qt5/src/poppler-annotation.cc | 612 - +++++++++++++++++++++--------------------- - qt5/src/poppler-document.cc | 3 +- - qt5/src/poppler-fontinfo.cc | 3 +- - qt5/src/poppler-form.cc | 3 +- - qt5/src/poppler-optcontent.cc | 2 + - qt5/src/poppler-page.cc | 1 + - qt5/src/poppler-private.cc | 18 +- - 7 files changed, 325 insertions(+), 317 deletions(-) - -commit 9b4e908d86e78535cced9fb7ccac1f3f0e1fc5c1 -Author: Albert Astals Cid -Date: Tue Sep 8 17:48:16 2015 +0200 - - Qt4: Minor optimization - - Call reserve on containers upfront - - qt4/src/poppler-annotation.cc | 4 +++- - qt4/src/poppler-document.cc | 3 ++- - qt4/src/poppler-fontinfo.cc | 3 ++- - qt4/src/poppler-form.cc | 3 ++- - qt4/src/poppler-optcontent.cc | 2 ++ - qt4/src/poppler-page.cc | 1 + - 6 files changed, 12 insertions(+), 4 deletions(-) - -commit f8182694909c989bd65b7317f9df439c5bfabe95 -Author: Albert Astals Cid -Date: Tue Sep 8 17:13:07 2015 +0200 - - renderingIntent is always non null - - poppler/GfxState.cc | 14 ++++++-------- - 1 file changed, 6 insertions(+), 8 deletions(-) - -commit 6f69e2e35b8fe7a347367074ce36959d47fd8635 -Author: Albert Astals Cid -Date: Tue Sep 8 09:44:30 2015 +0200 - - Matrix is 48 bytes, pass it by ref instead of by value - - poppler/TextOutputDev.cc | 4 ++-- - poppler/TextOutputDev.h | 6 +++--- - 2 files changed, 5 insertions(+), 5 deletions(-) - -commit c871ae2cd6fbc8a827dfe2c4d5595d7439a4b54e -Author: Heiko Becker -Date: Sun May 3 16:06:30 2015 +0200 - - cmake: Allow configuring SHARE_INSTALL_DIR - - This is helpful on a multiarch layout where the prefix is /usr/${host} - but arch-independent files should still be installed to /usr/share. - - Bug 90293 - - CMakeLists.txt | 1 + - cmake/modules/GObjectIntrospectionMacros.cmake | 2 +- - utils/CMakeLists.txt | 22 - +++++++++++----------- - 3 files changed, 13 insertions(+), 12 deletions(-) - -commit 1e1a2d0600153c98d44f65e83a0555ab5288450b -Author: Jason Crain -Date: Sun Sep 6 22:33:02 2015 +0200 - - Fix JBIG2Decode infinite loop and stack overflow - - Creating a JBIG2Decode filter can create a stack overflow or infinite - loop. Fix stack overflow by adding 'recursion' argument to fetch - call. Fix infinite loop by removing the reference lookup loop. - Chains of references aren't allowed by the spec anyway. - - Bug #91186 - - poppler/Stream.cc | 10 +++------- - 1 file changed, 3 insertions(+), 7 deletions(-) - -commit 3c91ded21c828d3529f9cd00c417601c67c8a741 -Author: Albert Astals Cid -Date: Tue Sep 1 23:46:55 2015 +0200 - - Revert a42614284c94c6742b2343abd797657fffa80e0e - - poppler/PDFDoc.cc | 33 ++++++++++++++------------------- - poppler/PDFDoc.h | 11 +++++------ - qt4/src/poppler-pdf-converter.cc | 14 +------------- - qt4/src/poppler-qt4.h | 4 +--- - qt5/src/poppler-pdf-converter.cc | 14 +------------- - qt5/src/poppler-qt5.h | 4 +--- - utils/pdfunite.cc | 3 +-- - 7 files changed, 24 insertions(+), 59 deletions(-) - -commit 911d9fc8d85b776418039b4eebb37200a0987554 -Author: Jeremy Echols -Date: Tue Sep 1 00:22:28 2015 +0200 - - pdftotext: Add -bbox-layout option - - Adds layout information for blocks and lines in addition to words - - Bug #89941 - - utils/pdftotext.1 | 4 ++ - utils/pdftotext.cc | 115 - +++++++++++++++++++++++++++++++++++++++++++---------- - 2 files changed, 99 insertions(+), 20 deletions(-) - -commit a42614284c94c6742b2343abd797657fffa80e0e -Author: Adam Reichold -Date: Tue Sep 1 00:15:46 2015 +0200 - - Add option to strip encryption - - Adds a PDF write mode that forces a complete rewrite that ignores - the original - encryption parameters of the document and also removes the encryption - entry - from the trailer dictionary. - - poppler/PDFDoc.cc | 33 +++++++++++++++++++-------------- - poppler/PDFDoc.h | 11 ++++++----- - qt4/src/poppler-pdf-converter.cc | 14 +++++++++++++- - qt4/src/poppler-qt4.h | 4 +++- - qt5/src/poppler-pdf-converter.cc | 14 +++++++++++++- - qt5/src/poppler-qt5.h | 4 +++- - utils/pdfunite.cc | 3 ++- - 7 files changed, 59 insertions(+), 24 deletions(-) - -commit 72c0162258f2630a3bb11b9c1078ec1ec2812788 -Author: Jason Crain -Date: Tue Aug 18 01:34:10 2015 -0500 - - cairo: fix size of transparency group surface - - Under rotation cairo_surface_create_similar_clip will create a surface - with incorect width/height. Rely on cairo to do the correct - calculation. - - Bug #66229 - - poppler/CairoOutputDev.cc | 30 ++++++++---------------------- - 1 file changed, 8 insertions(+), 22 deletions(-) - -commit 06f942657ee0798d7bdc5bd180150ea0464833a5 -Author: Arthur Stavisky -Date: Sat Aug 29 15:50:45 2015 +0200 - - Fix for xref table creation - - Bug #90790 - - utils/pdfunite.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 6ccdd381b483f50f37005fd9b13f79d2f38273ff -Author: Pino Toscano -Date: Sat Aug 29 12:18:44 2015 +0200 - - typo fix, "existant" -> "existent" - - NEWS | 2 +- - poppler/Form.cc | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit 9d79f06192d176298b4c911a6702ad1cfe099112 -Author: Hib Eris -Date: Thu Aug 27 23:10:05 2015 +0200 - - Do not hardcode -fPIC in Makefile.am - - The flag -fPIC is already set on CXXFLAGS by configure. - For the mingw compiler, you should not use fPIC, see d44e7e35. - - https://bugs.freedesktop.org/show_bug.cgi?id=91466 - - qt5/src/Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 3e19bec738889ee9140379ac3f871552dbb9bf41 -Author: Thomas Freitag -Date: Thu Aug 27 23:01:21 2015 +0200 - - pdfunite: Insert embedded files in result pdf - - Bug #90066 - - poppler/PDFDoc.cc | 1 - - utils/pdfunite.cc | 156 - +++++++++++++++++++++++++++++++++++++++++++++++++++++- - 2 files changed, 154 insertions(+), 3 deletions(-) - -commit 6e469dbe239714b478488af5ff73046e6a46a908 -Author: Adam Reichold -Date: Sun Aug 16 21:05:38 2015 +0200 - - Change default Qt frontend image format - - Change the default image format used by the Qt frontends to XBGR/RGB32 - which allows efficient blending and pixmap conversion via Qt. Also use - the premultiplied conversion for IgnorePaperColor to elide a further - copy for pixmap conversion. - - qt4/src/poppler-page.cc | 46 - +++++++++++++++------------------------------- - qt5/src/poppler-page.cc | 46 - +++++++++++++++------------------------------- - 2 files changed, 30 insertions(+), 62 deletions(-) - -commit 56fc0bb2f20adfd89835f3132bfef3033fdcd80d -Author: Adam Reichold -Date: Sun Aug 16 21:01:52 2015 +0200 - - Add premultiplied alpha channel to SplashBitmap - - This extends the convertToXBGR method so that it can either - * leave the alpha channel of the bitmap data opaque, - * copy the alpha channel into the bitmap data, - * transfer the alpha channel into the bitmap data and - perform premultiplication on the bitmap data. - - qt4/src/poppler-page.cc | 6 +++++- - qt5/src/poppler-page.cc | 6 +++++- - splash/SplashBitmap.cc | 49 - ++++++++++++++++++++++++++++++++++++++----------- - splash/SplashBitmap.h | 11 +++++++++-- - 4 files changed, 57 insertions(+), 15 deletions(-) - -commit e5511b58e732f921c65e366fb4d221371b95d905 -Author: Hans-Peter Deifel -Date: Thu Aug 27 22:38:08 2015 +0200 - - cpp: Fix utf8/utf16 conversion - - The old code assumed that ustring::size() would return the number of - bytes in ustring, but it really returns the number of - characters. Since - ustring is a basic_string, these two values differ - (by a - factor of two). - - This needs to be considered when using iconv, since it operates - on byte - counts, not character counts. - - Bug #91644 - - cpp/poppler-global.cpp | 17 +++++++++-------- - 1 file changed, 9 insertions(+), 8 deletions(-) - -commit d06c27584ecf4b7ff2fe492f0133722ac461dfd6 -Author: Thomas Freitag -Date: Thu Aug 27 22:16:03 2015 +0200 - - File Saving improvements - - Refinement of the /P annotation test - - Fixes file from comment #8 in bug #87637 - - poppler/PDFDoc.cc | 21 +++++++++++++++++++-- - 1 file changed, 19 insertions(+), 2 deletions(-) - -commit 545a8f7cb0a473706858d2851f968ffadcc78ed0 -Author: Jason Crain -Date: Mon Aug 24 01:12:01 2015 +0200 - - Fix bounds check in Linearization::getPageFirst - - Make sure Linearization::pageFirst is in the interval [0, - getNumPages), - otherwise Hints::getPageObjectNum() can have an out of bounds read. - - Bug #91200 - - poppler/Linearization.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 3e61c7523416157acadec7fe59429f880a9d0310 -Author: William Bader -Date: Wed Aug 19 23:01:41 2015 +0200 - - Splash: Fix wrong memory access - - Bug #91686 - - splash/Splash.cc | 2 ++ - 1 file changed, 2 insertions(+) - -commit 431cd5afe7dc931f21f7eadd3e69406612d09a0c -Author: Jakub Wilk -Date: Mon Aug 17 19:49:51 2015 +0200 - - Update Jakub Wilk's email - - fofi/FoFiType1.cc | 2 +- - poppler/CharCodeToUnicode.cc | 2 +- - poppler/GlobalParams.cc | 2 +- - poppler/Object.h | 2 +- - poppler/PDFDoc.cc | 2 +- - poppler/UnicodeMap.cc | 2 +- - 6 files changed, 6 insertions(+), 6 deletions(-) - -commit 1745d2166dd7680d72fe4a71c1fc7a0a5379dcca -Author: Tobias Koenig -Date: Fri Aug 14 00:10:53 2015 +0200 - - Add basic support for RichMedia annotations to Qt frontends - - Bug #91548 - - qt4/src/poppler-annotation.cc | 615 - ++++++++++++++++++++++++++++++++++++++++- - qt4/src/poppler-annotation.h | 330 +++++++++++++++++++++- - qt5/src/poppler-annotation.cc | 616 - +++++++++++++++++++++++++++++++++++++++++- - qt5/src/poppler-annotation.h | 331 ++++++++++++++++++++++- - 4 files changed, 1888 insertions(+), 4 deletions(-) - -commit da5760675d75acf1883ac6f757f755222248762f -Author: Albert Astals Cid -Date: Fri Aug 14 00:04:15 2015 +0200 - - add (C) - - poppler/Annot.cc | 2 +- - poppler/Annot.h | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit bc01007d714a58fd0023594b055e0cd5fbad1f7e -Author: Tobias Koenig -Date: Thu Aug 13 23:57:44 2015 +0200 - - Patch to support RichMedia annotations in poppler core - - poppler/Annot.cc | 404 - +++++++++++++++++++++++++++++++++++++++++++++++++++++++ - poppler/Annot.h | 172 ++++++++++++++++++++++- - 2 files changed, 575 insertions(+), 1 deletion(-) - -commit 1213501882cf2ec6e3dcb3c078391040c8cb0a57 -Author: Albert Astals Cid -Date: Sun Aug 9 18:27:06 2015 +0200 - - 0.35.0 - - CMakeLists.txt | 4 ++-- - NEWS | 29 +++++++++++++++++++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/CMakeLists.txt | 2 +- - qt4/src/Doxyfile | 2 +- - qt4/src/Makefile.am | 2 +- - qt5/src/CMakeLists.txt | 2 +- - qt5/src/Doxyfile | 2 +- - qt5/src/Makefile.am | 2 +- - 11 files changed, 40 insertions(+), 11 deletions(-) - -commit a7b1151ce7a14d359d85bacfe02352cdeb8d9a8f -Author: Hib Eris -Date: Sun Jul 26 10:38:37 2015 +0200 - - glib-demo: Prefer gtk_label_set_{x,y}align() over deprecated - gtk_misc_set_alignment() - - https://bugs.freedesktop.org/show_bug.cgi?id=88788 - - glib/demo/main.c | 16 ++++++++++++---- - 1 file changed, 12 insertions(+), 4 deletions(-) - -commit e6e7d1492b518d57136031a94069a994182693cc -Author: Hib Eris -Date: Sun May 31 12:32:36 2015 +0200 - - pdftocairo: Fix cast to pointer from integer of different size - on win64 - - Fixes warning: - - [ 322s] CXX pdftocairo-pdftocairo-win32.o - [ 324s] In file included from - /usr/x86_64-w64-mingw32/sys-root/mingw/include/windows.h:72:0, - [ 324s] from - /usr/x86_64-w64-mingw32/sys-root/mingw/include/cairo/cairo-win32.h:44, - [ 324s] from pdftocairo-win32.cc:16: - [ 324s] pdftocairo-win32.cc: In function 'HWND__* - createGroupBox(HWND, HINSTANCE, int, const char*, RECT*)': - [ 324s] pdftocairo-win32.cc:170:23: warning: cast to pointer from - integer of different size [-Wint-to-pointer-cast] - [ 324s] parent, (HMENU)id, - [ 324s] ^ - [ 324s] pdftocairo-win32.cc: In function 'HWND__* - createCheckBox(HWND, HINSTANCE, int, const char*, RECT*)': - [ 324s] pdftocairo-win32.cc:186:23: warning: cast to pointer from - integer of different size [-Wint-to-pointer-cast] - [ 324s] parent, (HMENU)id, - [ 324s] ^ - [ 324s] pdftocairo-win32.cc: In function 'HWND__* - createStaticText(HWND, HINSTANCE, int, const char*, RECT*)': - [ 324s] pdftocairo-win32.cc:202:23: warning: cast to pointer from - integer of different size [-Wint-to-pointer-cast] - [ 324s] parent, (HMENU)id, - [ 324s] ^ - [ 324s] pdftocairo-win32.cc: In function 'HWND__* - createPageScaleComboBox(HWND, HINSTANCE, int, RECT*)': - [ 324s] pdftocairo-win32.cc:219:23: warning: cast to pointer from - integer of different size [-Wint-to-pointer-cast] - [ 324s] parent, (HMENU)id, - [ 324s] ^ - - https://bugs.freedesktop.org/show_bug.cgi?id=91465 - - utils/pdftocairo-win32.cc | 26 +++++++++++++------------- - 1 file changed, 13 insertions(+), 13 deletions(-) - -commit f3a0191abbf67c8b0f83739e1844a2fabe4138a4 -Author: Hib Eris -Date: Thu Jul 23 21:44:57 2015 +0200 - - Explicitly link poppler-glib against pthread - - Debian complains about missing symbols: - - dpkg-shlibdeps: warning: symbol pthread_mutexattr_destroy used by - debian/libpoppler-glib8/usr/lib/i386-linux-gnu/libpoppler-glib.so.8.6.0 - found in none of the libraries - dpkg-shlibdeps: warning: symbol pthread_mutexattr_init used by - debian/libpoppler-glib8/usr/lib/i386-linux-gnu/libpoppler-glib.so.8.6.0 - found in none of the libraries - dpkg-shlibdeps: warning: symbol pthread_mutexattr_settype used by - debian/libpoppler-glib8/usr/lib/i386-linux-gnu/libpoppler-glib.so.8.6.0 - found in none of the libraries - - https://bugs.freedesktop.org/show_bug.cgi?id=91450 - - glib/Makefile.am | 1 + - 1 file changed, 1 insertion(+) - -commit fb264bfa8bf7142cabc8d94a86594cf0e7c9f134 -Author: Hib Eris -Date: Fri Jul 24 22:18:26 2015 +0200 - - glib-demo: Remove code for no longer supported gtk versions - - https://bugs.freedesktop.org/show_bug.cgi?id=88788 - - glib/demo/annots.c | 8 -------- - glib/demo/selections.c | 16 ---------------- - 2 files changed, 24 deletions(-) - -commit dd0883649ac296c6033474fe5991c534ac2ce594 -Author: Hib Eris -Date: Fri Jul 24 22:09:57 2015 +0200 - - glib-demo: Remove use of deprecated - gtk_dialog_set_alternative_button_order() - - https://bugs.freedesktop.org/show_bug.cgi?id=88788 - - glib/demo/main.c | 4 ---- - 1 file changed, 4 deletions(-) - -commit ffc798a7fcf95d2aaf123772072ef956ceb2dff7 -Author: Hib Eris -Date: Sun Jan 25 18:16:04 2015 +0100 - - glib-demo: Remove deprecated use of gtk_misc_set_alignment() - - https://bugs.freedesktop.org/show_bug.cgi?id=88788 - - glib/demo/main.c | 10 ++++++---- - 1 file changed, 6 insertions(+), 4 deletions(-) - -commit 56915b2989fc244b58a454fe40412eb731e706bd -Author: Hib Eris -Date: Sun Jan 25 13:10:31 2015 +0100 - - glib-demo: Remove use of deprecated GtkAlignment - - https://bugs.freedesktop.org/show_bug.cgi?id=88788 - - glib/demo/annots.c | 23 +++++++++++--------- - glib/demo/forms.c | 23 +++++++++++--------- - glib/demo/info.cc | 18 +++++++++------ - glib/demo/main.c | 12 +--------- - glib/demo/page.c | 34 ++++++++++++++++++----------- - glib/demo/text.c | 18 +++++++++------ - glib/demo/utils.c | 64 - +++++++++++++++++++++++++++++++----------------------- - 7 files changed, 107 insertions(+), 85 deletions(-) - -commit 49e33e1213a7957d4814656960bf269abcabc7c3 -Author: Hib Eris -Date: Sun Jan 25 12:21:41 2015 +0100 - - glib-demo: Remove deprecated use of gtk_tree_view_set_rules_hint() - - The use of rules-hint is deprecated in gtk because it is - considered bad application API and is not really usefull. - - See - https://git.gnome.org/browse/gtk+/commit/?id=0ed766ec866a2da7e3db05b1db2fc2519d6b1cdc - - https://bugs.freedesktop.org/show_bug.cgi?id=88788 - - glib/demo/attachments.c | 1 - - glib/demo/find.c | 1 - - glib/demo/fonts.c | 1 - - glib/demo/transitions.c | 1 - - 4 files changed, 4 deletions(-) - -commit 70f3c5ff0010775e5fcd590db1b8d475694fe3a4 -Author: William Bader -Date: Sat Jul 18 16:36:30 2015 +0200 - - Updated patch to add configure --enable-build-type - - Bug #90796 - - configure.ac | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 52 insertions(+) - -commit 1aa2f6e8a41a6a86dc02bf7c5cbc62355e780961 -Author: Albert Astals Cid -Date: Fri Jul 17 00:40:56 2015 +0200 - - Silly micro optimization: Move vars inside case {} - - poppler/SplashOutputDev.cc | 19 ++++++++++++------- - 1 file changed, 12 insertions(+), 7 deletions(-) - -commit 705615f7569bbadb555bbf45c15c7c01f1690db5 -Author: Albert Astals Cid -Date: Fri Jul 17 00:38:58 2015 +0200 - - More typo fix - - poppler/Catalog.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 3b6b3fefe97b885e42966fece84a123fc4671b20 -Author: William Bader -Date: Fri Jul 17 00:37:46 2015 +0200 - - [Splash] Fix wrong writes on non rgb outputs - - Bug #90570 - - poppler/SplashOutputDev.cc | 52 - +++++++++++++++++++++++++++++++++++++++++++++- - 1 file changed, 51 insertions(+), 1 deletion(-) - -commit 885b23bfd16a3e4970a52956493e92a160b2d0a8 -Author: Dmytro Morgun -Date: Fri Jul 17 00:30:08 2015 +0200 - - GlobalParamsWin bug/fixes - - Bug #91053 - - poppler/GlobalParamsWin.cc | 57 - ++++++++++++++++++++++++++-------------------- - 1 file changed, 32 insertions(+), 25 deletions(-) - -commit 0ce4da8ab16b4a5497688a6cf86175aaec0f585f -Author: Albert Astals Cid -Date: Wed Jul 15 23:59:11 2015 +0200 - - Make sure pageRootRef is a ref before using it - - Bug #91344 - - poppler/Catalog.cc | 32 ++++++++++++++++++-------------- - 1 file changed, 18 insertions(+), 14 deletions(-) - -commit b71431513b45f8a1aa4154332dae56af241258f8 -Author: Albert Astals Cid -Date: Wed Jul 15 13:10:27 2015 +0200 - - Typo fix in warning - - poppler/Catalog.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit ccd780f9504f5b077ea12370fd5380ff7da5cd23 -Author: Dmytro Morgun -Date: Wed Jul 15 00:26:55 2015 +0200 - - [Windows] remove ifndef - - splash/SplashFontEngine.cc | 9 +-------- - 1 file changed, 1 insertion(+), 8 deletions(-) - -commit 2ed8465074c4fc2c88f745b29bdae92410751327 -Author: William Bader -Date: Wed Jul 15 00:07:48 2015 +0200 - - Allow configuring SPLASH_CMYK support from cmake/configure - - Bug #90795 - - CMakeLists.txt | 4 ++++ - config.h.cmake | 3 +++ - configure.ac | 7 +++++++ - poppler/SplashOutputDev.cc | 4 ++-- - qt4/src/poppler-document.cc | 3 ++- - qt4/src/poppler-page.cc | 4 ++-- - qt5/src/poppler-document.cc | 3 ++- - qt5/src/poppler-page.cc | 4 ++-- - splash/Splash.cc | 2 +- - splash/SplashBitmap.cc | 4 ++-- - 10 files changed, 27 insertions(+), 11 deletions(-) - -commit 334dc56f2f9adf4daa33c20ce034a5b1f8259baf -Author: Albert Astals Cid -Date: Sun Jul 12 23:29:30 2015 +0200 - - [qt] KeepAlphaChannel -> IgnorePaperColor - - qt4/src/poppler-page.cc | 13 ++++++------- - qt4/src/poppler-qt4.h | 4 ++-- - qt5/src/poppler-page.cc | 13 ++++++------- - qt5/src/poppler-qt5.h | 4 ++-- - 4 files changed, 16 insertions(+), 18 deletions(-) - -commit 2a1363a4a3129fe4b5e4fae1018dc8919a2d796a -Author: Albert Astals Cid -Date: Sun Jul 12 23:22:32 2015 +0200 - - Update (C) - - splash/SplashBitmap.cc | 1 + - splash/SplashBitmap.h | 1 + - 2 files changed, 2 insertions(+) - -commit e903b2364f55c4f6417d826ab85dcb60cd240563 -Author: Albert Astals Cid -Date: Sun Jul 12 23:20:20 2015 +0200 - - [qt] fix spacing in header - - qt4/src/poppler-qt4.h | 4 ++-- - qt5/src/poppler-qt5.h | 4 ++-- - 2 files changed, 4 insertions(+), 4 deletions(-) - -commit 810c659faea542c3bd6e9c48c9a7c60b886a9269 -Author: Adam Reichold -Date: Fri Jul 3 00:31:56 2015 +0200 - - Switch default image format of Qt frontends - - This changes the Poppler::Page::renderToImage method w.r.t. to - the image - formats used to render using Splash, i.e. the default will be RGB8. If - overprint preview is requested, DeviceN8 will be used and converted to - XBGR8 for display. If the internal alpha channel is requested, - XBGR8 will - be used and augmented by Splash's separate alpha channel. - - This yields some improvements w.r.t. to rendering including alpha - blending - with the paper colour, i.e. synthetic benchmarks using structurally - simple - documents yield more than two percent improvement. - - qt4/src/poppler-page.cc | 115 - +++++++++++++++++++++++++++++------------------- - qt5/src/poppler-page.cc | 114 - ++++++++++++++++++++++++++++------------------- - 2 files changed, 138 insertions(+), 91 deletions(-) - -commit 8fea54e48ec9ba35122c565f761e7e7f016a34f9 -Author: Adam Reichold -Date: Thu Jul 2 21:08:38 2015 +0200 - - Improve efficiency of Poppler::Page::renderToImage - - Improves the efficiency of rendering into a QImage using - the Splash output device by removing a copy of the raw bitmap data - since Qt5 will properly free this data using a function supplied - during construction, i.e. in this case gfree. - - This improves performance in synthentic rendering benchmarks - by approximately four percent and reduces the maximum working - set size. - - qt5/src/poppler-page.cc | 7 +++---- - 1 file changed, 3 insertions(+), 4 deletions(-) - -commit 09db5a71fff4b7a0ed1d5d7e76c8270e2f6e9a8d -Author: Adam Reichold -Date: Thu Jul 2 21:02:59 2015 +0200 - - Add KeepAlphaChannel render flag to Qt frontends - - Adds a new render flag which will indicate that the image return by - Poppler::Page::renderToImage will not be opaque and alpha blended with - the paper colour, but retain its actually background transparency. - - This improves performance in synthentic rendering benchmarks by almost - five percent and the additional alpha blending that is then done - by the - consuming application is often a hardware-accellerated operation. - - qt4/src/poppler-page.cc | 6 ++++-- - qt4/src/poppler-qt4.h | 3 ++- - qt5/src/poppler-page.cc | 6 ++++-- - qt5/src/poppler-qt5.h | 3 ++- - 4 files changed, 12 insertions(+), 6 deletions(-) - -commit d604a075c6b171d5c3fe26c146d3469c4bc0af3f -Author: Adam Reichold -Date: Thu Jul 2 21:00:16 2015 +0200 - - Make SplashBitmap XBGR transfer alpha channel - - Adds an option to SplashBitmap::convertToXBGR and - SplashBitmap::getXBGRLine - so that both optionally transfer Splash's internal alpha channel - into the - fourth component of the resulting bitmap data. - - splash/SplashBitmap.cc | 27 ++++++++++++++++++++++----- - splash/SplashBitmap.h | 4 ++-- - 2 files changed, 24 insertions(+), 7 deletions(-) - -commit 17adfc848f99a5c5bfad35c94289ccf03fba1a16 -Author: Adam Reichold -Date: Sun Jul 12 17:05:24 2015 +0200 - - Adjust memory layout computation of GooString - - GooString uses the small string optimization but the static buffer - size is - hard-coded and hence the final object size becomes dependent on - architecture. - This adds a helper class to compute the memory layout at compile - time so that - the target object size of e.g. 32 or another multiple of 16 is - achieved. - - This also adds an overload so that the C string returned by - GooString's - getCString method respect the constness of this and fixes a constness - issue - in the lexer tests. - - goo/GooString.h | 24 ++++++++++++++++-------- - qt4/tests/check_lexer.cpp | 2 +- - qt5/tests/check_lexer.cpp | 2 +- - 3 files changed, 18 insertions(+), 10 deletions(-) - -commit d1720740f3381f489f1ee83ce1ce53e73aafd537 -Author: Albert Astals Cid -Date: Wed Jul 8 23:22:13 2015 +0200 - - Poppler 0.34 - - CMakeLists.txt | 4 ++-- - NEWS | 13 +++++++++++++ - configure.ac | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/Doxyfile | 2 +- - qt5/src/Doxyfile | 2 +- - 6 files changed, 19 insertions(+), 6 deletions(-) - -commit 2fc1f540754391ffa87d7fe9f3438e134d821207 -Author: Thomas Freitag -Date: Tue Jul 7 18:48:51 2015 +0200 - - [Splash] Fix crash in PDF with nested softmasks - - Bug #91240 - - poppler/SplashOutputDev.cc | 20 ++++++++++++-------- - 1 file changed, 12 insertions(+), 8 deletions(-) - -commit 0b8919f19dd501c9962bca05c9b0559464e923c3 -Author: Dmytro Morgun -Date: Mon Jul 6 00:28:27 2015 +0200 - - Fix pedantic memory leak - - poppler/StructElement.cc | 15 +++++++++++++++ - 1 file changed, 15 insertions(+) - -commit 2ef22af960d3d800087209fea047009a8419134c -Author: Albert Astals Cid -Date: Sun Jul 5 16:03:57 2015 +0200 - - [cmake] Make sure ENABLE_LIBOPENJPEG is either 0 or 1 - - Otherwise if it was auto it gets translated to 1 for the cmakedefine - boolean - which is wrong when the auto ends up meaning "i din't find it" - - CMakeLists.txt | 2 ++ - 1 file changed, 2 insertions(+) - -commit 50455bcf4f1644060b2187d4e60c3798793041cc -Author: Tamas Szekeres -Date: Fri Jul 3 20:24:01 2015 +0200 - - std::max/min need - - Bug #88511 - - cpp/poppler-font.cpp | 3 +++ - cpp/poppler-global.cpp | 3 +++ - poppler/Annot.cc | 2 ++ - poppler/SplashOutputDev.cc | 2 ++ - 4 files changed, 10 insertions(+) - -commit 346fc70dbf2803e23e70b093401aa2cda216492b -Author: Albert Astals Cid -Date: Fri Jul 3 20:19:01 2015 +0200 - - Forgot the (C) - - poppler/PSOutputDev.cc | 1 + - 1 file changed, 1 insertion(+) - -commit df09c1a84dfe80d2e6cfde3308c79da5b2ea7428 -Author: Marek Kasik -Date: Fri Jul 3 20:14:23 2015 +0200 - - Embed Type1 fonts to PostScript files correctly - - Remove PFB headers from embedded Type1 fonts - before embedding them into a PostScript file. - - Bug #19747 - - poppler/PSOutputDev.cc | 57 - +++++++++++++++++++++++++++++++++++++++++++------- - 1 file changed, 50 insertions(+), 7 deletions(-) - -commit 11f117cc71641b89783b207232171f850a2b64ff -Author: Carlos Garcia Campos -Date: Thu Jun 4 10:51:36 2015 +0200 - - regtest: Disable pretty diffs for text files in HTML reports - - difflib is entering in an infinite loop with some files, so disable it - for now. We need to either fix that somehow or find a different way to - generate pretty diffs of text files. - - regtest/HTMLReport.py | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -commit 3db4cb6f07229e26405bfb512c626a272f6351f5 -Author: Thomas Freitag -Date: Sun May 24 18:41:30 2015 +0200 - - Splash: Speed up of rendering icc based images - - Bug #90171 - - poppler/SplashOutputDev.cc | 142 - +++++++++++++++++++++++++++++++++++++++++++-- - poppler/SplashOutputDev.h | 8 ++- - splash/Splash.cc | 17 ++++-- - splash/Splash.h | 9 ++- - 4 files changed, 163 insertions(+), 13 deletions(-) - -commit c50720dcc9e15516e0e19072c0df03fbdee63dec -Author: Adrian Johnson -Date: Fri May 22 21:44:55 2015 +0930 - - glib: update new symbols section - - glib/reference/poppler-docs.sgml | 8 ++++++++ - 1 file changed, 8 insertions(+) - -commit b271a19ec30b20bc11f2240ae6b96672e3cafafb -Author: Albert Astals Cid -Date: Thu May 14 21:56:47 2015 +0200 - - Poppler 0.33 - - CMakeLists.txt | 4 ++-- - NEWS | 25 +++++++++++++++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - glib/CMakeLists.txt | 2 +- - glib/Makefile.am | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/Doxyfile | 2 +- - qt5/src/Doxyfile | 2 +- - 9 files changed, 34 insertions(+), 9 deletions(-) - -commit 2b2fb719aa5ffe32fbc3fb500444b1643b1c6099 -Author: Albert Astals Cid -Date: Thu May 14 20:17:12 2015 +0200 - - Add missing (C) - - poppler/Annot.cc | 1 + - poppler/Annot.h | 2 +- - poppler/CairoFontEngine.cc | 1 + - poppler/Page.cc | 3 ++- - 4 files changed, 5 insertions(+), 2 deletions(-) - -commit ae76b75c6a5383eb52f58fba0faba69ae8698ef9 -Author: William Bader -Date: Thu May 14 20:06:22 2015 +0200 - - Fix regression in pdftops parameter passing - - Recent changes to the command line processing moved some options - from GlobalParams to PSOutputDev. - The options used to be set by calling setters in GlobalParams before - creating the PSOutputDev. - Now the options are set by calling setters in PSOutputDev after it - is created. - The problem is that PSOutputDev() calls init() which uses options - that now can not be set until later after PSOutputDev() returns. - These patches split some of the code of init() into a new postInit() - that is automatically called later after the pdftops main program - has had a chance to set the command line options. - When I was looking through the code, I also fixed a misspelling of - sanitizedTitle as sanitizedTile. - - Bug #89827 - - poppler/PSOutputDev.cc | 138 - +++++++++++++++++++++++++++++++------------------ - poppler/PSOutputDev.h | 11 ++-- - 2 files changed, 96 insertions(+), 53 deletions(-) - -commit c516b341a9c2e0c9a985bc14ad3cae73bf10fb02 -Author: Thomas Petazzoni -Date: Sun May 3 15:27:19 2015 +0200 - - Fix invalid shell comparaison in libtiff test - - Bug #115523 - - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 040b316f0cb1ac933dce616fabe24c93f96fe1cd -Author: Jason Crain -Date: Sat Apr 18 12:44:47 2015 -0500 - - glib: Fix segfault when creating PopplerAction - - Screen annotations and form fields currently pass a NULL pointer to - _poppler_action_new. Pass the PopplerDocument instead. - - Bug #90093 - - glib/poppler-annot.cc | 4 ++-- - glib/poppler-form-field.cc | 2 +- - glib/poppler-page.cc | 2 +- - glib/poppler-private.h | 2 +- - 4 files changed, 5 insertions(+), 5 deletions(-) - -commit 056ee89122385bc2df7cb2c05e1cb1770af8ecce -Author: Carlos Garcia Campos -Date: Sat Apr 18 12:16:56 2015 +0200 - - glib: Add poppler_annot_markup_set_popup_rectangle() - - It updates the popup rectangle of a markup annotation that already - has a - popup associated. - - glib/poppler-annot.cc | 31 +++++++++++++++++++++++++++++++ - glib/poppler-annot.h | 2 ++ - glib/reference/poppler-sections.txt | 1 + - 3 files changed, 34 insertions(+) - -commit 1aae63ebc6fffe9fa1a2898e4ed733c22e312015 -Author: Carlos Garcia Campos -Date: Sat Apr 18 11:46:41 2015 +0200 - - annots: Add popup annots without a markup annot associated to the - list of annots - - For consistency with Annots::createAnnot(). - - poppler/Annot.h | 2 +- - poppler/Page.cc | 6 +++++- - 2 files changed, 6 insertions(+), 2 deletions(-) - -commit 05ef3f9feee760544108c68e0d45d1de25fd8901 -Author: Philipp Reinkemeier -Date: Mon Feb 16 09:11:58 2015 +0100 - - annots: Fixed adding annotation of Subtype Popup to pdf page - - https://bugs.freedesktop.org/show_bug.cgi?id=89136 - - poppler/Annot.cc | 19 +++++++++++++++++++ - poppler/Page.cc | 11 ++++++++++- - 2 files changed, 29 insertions(+), 1 deletion(-) - -commit 8ca43bebf36f8da085917f28230e25524de4f4f4 -Author: Jason Crain -Date: Tue Mar 24 02:51:47 2015 -0500 - - cairo: Fix memory leak in CairoFreeTypeFont::create - - - Free embedded font data in _ft_done_face when the cairo font is - destroyed. - - Free embedded font data if _ft_new_face finds it's a duplicate of an - already open font. - - Free embedded font data and codeToGID array if font creation fails. - - Bug #89952 - - poppler/CairoFontEngine.cc | 16 +++++++++++----- - 1 file changed, 11 insertions(+), 5 deletions(-) - -commit edc7bb4fe7b5e718431de12bee1d95036d06efa0 -Author: Jason Crain -Date: Sat Apr 4 18:40:48 2015 +0200 - - Combine base characters and diacritical marks - - LaTeX adds base characters and diacritical marks as separate - characters. When a base character and diacritical mark are drawn over - each other, this patch converts them into a combining character - sequence. - - Bug #87215 - C# poppler-0.31.0.tar.xz - - poppler/TextOutputDev.cc | 419 - ++++++++++++++++++++++++++++++++++------------- - poppler/TextOutputDev.h | 31 +++- - 2 files changed, 336 insertions(+), 114 deletions(-) - -commit 96c35dfde6722ff8c5ef7ff59e37be90d273acab -Author: Albert Astals Cid -Date: Fri Mar 27 22:42:34 2015 +0100 - - pdftohtml: Set exit status adecuately - - Based on a patch by Matt Atkinson - Bug #83609 - - utils/pdftohtml.cc | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -commit 0969801c12a6ec0fbc079c8203cece9c70466955 -Author: Albert Astals Cid -Date: Thu Mar 26 16:08:20 2015 +0100 - - Fix previous commit about initializing on failure - - It's the nComps of the destination not of the origin we need - - poppler/SplashOutputDev.cc | 15 +++++++++++++-- - 1 file changed, 13 insertions(+), 2 deletions(-) - -commit ede6d00688fcf0e3c843b0a507304f5a98395d41 -Author: Albert Astals Cid -Date: Thu Mar 26 15:44:40 2015 +0100 - - memset on error to have reproducible outputs - - poppler/SplashOutputDev.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 4bb2c9b98299f429752b4c60820cea31ef05f7e0 -Author: Jason Crain -Date: Wed Mar 25 21:04:19 2015 +0100 - - Use width from W array for WMode positioning - - Bug #89621 - - poppler/GfxFont.cc | 36 ++++++++++++------------------------ - poppler/GfxFont.h | 2 ++ - 2 files changed, 14 insertions(+), 24 deletions(-) - -commit 033dbbd7fef8c04c7f4961455cc1cd8d6d1bd93b -Author: Albert Astals Cid -Date: Sun Mar 15 14:06:15 2015 +0100 - - Fix the previous pdfDocEncoding fix - - Since actually the previous fix didn't account for non ascii - characters as output of pdfDocEncoding - - qt4/src/poppler-private.cc | 36 +++++++++++++++--------------------- - qt5/src/poppler-private.cc | 36 +++++++++++++++--------------------- - 2 files changed, 30 insertions(+), 42 deletions(-) - -commit bc8076d8f638ccb44f8e3b94aaae96850b025deb -Author: Albert Astals Cid -Date: Sun Mar 15 13:32:41 2015 +0100 - - Fix PDF Text String -> QString conversion - - If they are not UTF16-BE they are in PDFDocEncoding (not ascii) - - Fixes KDE bug #344849 - - qt4/src/poppler-private.cc | 5 +++-- - qt5/src/poppler-private.cc | 5 +++-- - 2 files changed, 6 insertions(+), 4 deletions(-) - -commit d7cc90a8b60d7e353db6e0acdd0b789485e32972 -Author: Albert Astals Cid -Date: Sat Mar 7 15:04:52 2015 +0100 - - 0.32.0 - - CMakeLists.txt | 4 ++-- - NEWS | 16 ++++++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/Doxyfile | 2 +- - qt5/src/Doxyfile | 2 +- - 7 files changed, 23 insertions(+), 7 deletions(-) - -commit c13297d154ded11721fe7d3abdba459ca628cef8 -Author: Albert Astals Cid -Date: Sat Mar 7 14:58:10 2015 +0100 - - Update (C) - - poppler/SecurityHandler.cc | 2 +- - poppler/SplashOutputDev.cc | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit c909964bff671d5ff0d8eee5f613ded4562f8afd -Author: Albert Astals Cid -Date: Sat Mar 7 14:54:43 2015 +0100 - - Do not assert on broken document - - Bug #89422 - - poppler/SecurityHandler.cc | 14 +++++++++----- - 1 file changed, 9 insertions(+), 5 deletions(-) - -commit 3705fcee0309c50b5fecd563e8e466cbe2c5972b -Author: Thomas Freitag -Date: Fri Mar 6 15:19:58 2015 +0100 - - Fix Wrong colour shown when GouraudTriangleShFill uses a DeviceN - colorspace - - Bug #89182 - - poppler/SplashOutputDev.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit b7fde1ec83a5fff9bec73becc22e581583a30d43 -Author: Albert Astals Cid -Date: Wed Feb 25 21:51:34 2015 +0100 - - Fix last commit regression - - It seems it actually needs to be pipe->shape and not pipe->usesShape - (i.e. it seems at some point we use pipe->shape with useShape - being false) - Otherwise we had a regression on - eci_altona-test-suite-v2_technical2_x4.pdf - - splash/Splash.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 7980fe868a8ef2ee3315f0bcb606c448d6604039 -Author: William Bader -Date: Wed Feb 25 15:00:33 2015 +0100 - - Fix uninitialized variable in Splash::pipeRun - - Use useShape is actually the guard for shape, so use it in the if - - splash/Splash.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 57b6b78a0831fb31c06fd1bc6e9803de524f9d2d -Author: Thomas Freitag -Date: Tue Feb 24 23:34:57 2015 +0100 - - pdfseparate: use always an unique instance for PDFDoc for savePageAs - - utils/pdfseparate.cc | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -commit 8a30d219df71ead323649ff0dfd4a724b5e7bd18 -Author: William Bader -Date: Sat Feb 21 23:55:10 2015 +0100 - - Fix memcpy introduced in ec956ab8552dbe10fac4e649951042bddc424b7d - - goo/GooString.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit ec956ab8552dbe10fac4e649951042bddc424b7d -Author: William Bader -Date: Tue Feb 17 22:55:14 2015 +0100 - - Reduce use of gmalloc() in GooString::appendfv() - - Bug #89096 - - goo/GooString.cc | 18 ++++++++++++++---- - 1 file changed, 14 insertions(+), 4 deletions(-) - -commit 132ef18324f62c1f2a08dcd794b379fadaa4daf5 -Author: Petr Gajdos -Date: Wed Feb 11 19:37:21 2015 +0100 - - Annot BG/BC: Empty Array means no color - - poppler/Annot.cc | 15 +++++++++++++-- - 1 file changed, 13 insertions(+), 2 deletions(-) - -commit bf4aae25a244b1033a2479b9a8f633224f7d5de5 -Author: William Bader -Date: Wed Feb 11 17:35:40 2015 +0100 - - Off by one fix to the previous crash fix - - fofi/FoFiTrueType.cc | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -commit 97dd46bae5424818ca808c20506d7d96f7b85fb5 -Author: William Bader -Date: Mon Feb 9 22:30:51 2015 +0100 - - pdftops: Add aaRaster and overprint to man file - - utils/pdftops.1 | 9 +++++++++ - 1 file changed, 9 insertions(+) - -commit c114a90063d755639d2b0dbf816690a66b54bee0 -Author: Albert Astals Cid -Date: Sun Feb 8 00:24:11 2015 +0100 - - Fix crash in fuzzed file from Bug #84988 - - poppler/TextOutputDev.cc | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -commit 22895623e6cd2a5923f552421d44cc80cab77dd8 -Author: Albert Astals Cid -Date: Sat Feb 7 22:28:21 2015 +0100 - - Fix malformed file crash from bug #86854 - - poppler/PSOutputDev.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit cdb7ad95f7c8fbf63ade040d8a07ec96467042fc -Author: Albert Astals Cid -Date: Sat Feb 7 22:21:16 2015 +0100 - - Fix malformed file crash in bug #85243 - - fofi/FoFiTrueType.cc | 15 +++++++++++++-- - 1 file changed, 13 insertions(+), 2 deletions(-) - -commit 6641b935e1fc0c4151a723b6b476d987b8324ed2 -Author: Albert Astals Cid -Date: Sat Feb 7 21:58:23 2015 +0100 - - If ECM is around include the sanitizers module - - This way you can run - cmake -DECM_ENABLE_SANITIZERS='address' - and get an ASAN built poppler - - CMakeLists.txt | 5 +++++ - 1 file changed, 5 insertions(+) - -commit 92e41685dcef538a7fc669ca357ce9f448a8078e -Author: Albert Astals Cid -Date: Sat Feb 7 21:54:39 2015 +0100 - - Fix crash in malformed file from bug #85275 - - poppler/SplashOutputDev.cc | 4 ++-- - splash/Splash.cc | 10 +++++++++- - splash/SplashBitmap.cc | 4 ++-- - 3 files changed, 13 insertions(+), 5 deletions(-) - -commit 9842b3b00492eda21297d5d65f769f77a565f6ac -Author: Aleksei Volkov -Date: Sat Feb 7 20:46:26 2015 +0100 - - No need to check for hmtx, freetype does for us - - Bug #88939 - - fofi/FoFiTrueType.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 4849eb43892640062c485e48ba7a29b5a0cc9587 -Author: William Bader -Date: Sat Feb 7 16:41:53 2015 +0100 - - Make the colorpsace optimization and option and not the default - - Bug #88971 - - poppler/PSOutputDev.cc | 25 ++++++++++++++++--------- - poppler/PSOutputDev.h | 4 ++++ - utils/pdftops.1 | 10 +++++++++- - utils/pdftops.cc | 4 ++++ - 4 files changed, 33 insertions(+), 10 deletions(-) - -commit 8e16e423a718b92514885e771e31048f1ae2a766 -Author: Albert Astals Cid -Date: Thu Feb 5 20:18:13 2015 +0100 - - 0.31.0 - - And copyright updating - - CMakeLists.txt | 4 ++-- - NEWS | 17 +++++++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - poppler/CairoOutputDev.cc | 1 + - poppler/CairoOutputDev.h | 1 + - poppler/JBIG2Stream.cc | 1 + - poppler/JBIG2Stream.h | 1 + - poppler/Makefile.am | 2 +- - poppler/Stream.cc | 1 + - qt4/src/CMakeLists.txt | 2 +- - qt4/src/Doxyfile | 2 +- - qt4/src/Makefile.am | 2 +- - qt5/src/CMakeLists.txt | 2 +- - qt5/src/Doxyfile | 2 +- - qt5/src/Makefile.am | 2 +- - 16 files changed, 33 insertions(+), 11 deletions(-) - -commit f932315e559a7857d9c5642eb04efc0d2b717789 -Author: suzuki toshiya -Date: Tue Jan 20 22:05:29 2015 +1030 - - cairo: support embedding JBIG2 image data - - http://lists.freedesktop.org/archives/poppler/2014-December/011183.html - - poppler/CairoOutputDev.cc | 117 - ++++++++++++++++++++++++++++++++++++++-------- - poppler/CairoOutputDev.h | 3 ++ - poppler/JBIG2Stream.cc | 9 +++- - poppler/JBIG2Stream.h | 4 +- - poppler/Stream.cc | 13 +++++- - 5 files changed, 121 insertions(+), 25 deletions(-) - -commit 78abf540057181b708c546aee421f81a1dd58331 -Author: Adam Reichold -Date: Wed Jan 21 22:30:45 2015 +0100 - - Worlds -> Words - - qt4/src/poppler-page.cc | 4 ++-- - qt4/src/poppler-qt4.h | 2 +- - qt4/tests/check_search.cpp | 4 ++-- - qt5/src/poppler-page.cc | 4 ++-- - qt5/src/poppler-qt5.h | 2 +- - qt5/tests/check_search.cpp | 4 ++-- - 6 files changed, 10 insertions(+), 10 deletions(-) - -commit 027eac4e565576ca2e7042e21426e28abd775d98 -Author: Adam Reichold -Date: Tue Jan 20 00:09:09 2015 +0100 - - Expose whole-words search option in Qt frontends - - qt4/src/poppler-page-private.h | 5 +- - qt4/src/poppler-page.cc | 114 - +++++++++++++++++++++++++------------ - qt4/src/poppler-qt4.h | 44 +++++++++++++- - qt4/tests/check_search.cpp | 112 +++++++++++++++++++++++++++++++----- - qt5/src/poppler-page-private.h | 5 +- - qt5/src/poppler-page.cc | 116 - +++++++++++++++++++++++++------------ - qt5/src/poppler-qt5.h | 46 +++++++++++++-- - qt5/tests/check_search.cpp | 126 - +++++++++++++++++++++++++++++++++-------- - 8 files changed, 447 insertions(+), 121 deletions(-) - -commit 30a0baa353c374165e5f411efc4203746f14a74d -Author: Albert Astals Cid -Date: Sun Jan 18 15:39:53 2015 +0100 - - Move more variables from GlobalParams to PSOutputDev - - poppler/CairoFontEngine.cc | 4 +- - poppler/GfxFont.cc | 15 ++--- - poppler/GfxFont.h | 7 ++- - poppler/GlobalParams.cc | 144 - --------------------------------------------- - poppler/GlobalParams.h | 28 --------- - poppler/PSOutputDev.cc | 121 +++++++++++++++++++------------------ - poppler/PSOutputDev.h | 30 +++++++++- - poppler/SplashOutputDev.cc | 2 +- - qt4/src/ArthurOutputDev.cc | 4 +- - qt5/src/ArthurOutputDev.cc | 4 +- - utils/pdftops.cc | 36 ++++-------- - 11 files changed, 116 insertions(+), 279 deletions(-) - -commit 8fed995c3457d64669ae12901450b7c811599dba -Author: Albert Astals Cid -Date: Sun Jan 18 14:52:53 2015 +0100 - - Forgot to delete this in the previous commit - - poppler/GlobalParams.h | 1 - - 1 file changed, 1 deletion(-) - -commit 4992ff7fa062462507733494827fdad7eaaa95b3 -Author: Albert Astals Cid -Date: Sun Jan 18 13:57:36 2015 +0100 - - Move raster mono and resolution from GlobalParams to PSOutputDev - - poppler/GlobalParams.cc | 32 -------------------------------- - poppler/GlobalParams.h | 7 ------- - poppler/PSOutputDev.cc | 18 +++++++----------- - poppler/PSOutputDev.h | 6 ++++++ - utils/pdftops.cc | 7 ++++--- - 5 files changed, 17 insertions(+), 53 deletions(-) - -commit 54908f675eda96c363528198e8c530921df2f45a -Author: Albert Astals Cid -Date: Sun Jan 18 13:34:45 2015 +0100 - - Move psUncompressPreloadedImages from GlobalParams to PSOutputDev - - It belongs there and PSOutputDev is always created by the external - user - so in case someone wants to set it, it is the same amount of work - to set it in GlobalParams than in PSOutputDev - - poppler/GlobalParams.cc | 16 ---------------- - poppler/GlobalParams.h | 3 --- - poppler/PSOutputDev.cc | 9 +++++---- - poppler/PSOutputDev.h | 2 ++ - 4 files changed, 7 insertions(+), 23 deletions(-) - -commit 136d7aa5e79f153dfcb216c58598e33a8ff16630 -Author: Albert Astals Cid -Date: Sun Jan 18 13:28:26 2015 +0100 - - Remove declared but not defined function - - poppler/GlobalParams.h | 1 - - 1 file changed, 1 deletion(-) - -commit fdba9154d9a176759c765180805e608d4959c34e -Author: Adam Reichold -Date: Fri Jan 16 19:57:59 2015 +0100 - - pdftoppm: parse the flags earlier and only once - - utils/pdftoppm.cc | 42 +++++++++++++++--------------------------- - 1 file changed, 15 insertions(+), 27 deletions(-) - -commit 6b072500b5ac936631be6b29b7d5a591848a18f3 -Author: William Bader -Date: Wed Jan 14 23:28:03 2015 +0100 - - Add rasterization option to pdftops - - Also removes GlobalParams stuff \o/ - - Coded in conjuntion with Albert - - Bug #85934 - - cpp/poppler-page-renderer.cpp | 5 ++-- - poppler/GlobalParams.cc | 58 - ++----------------------------------------- - poppler/GlobalParams.h | 16 +++--------- - poppler/PSOutputDev.cc | 14 +++++------ - poppler/PSOutputDev.h | 5 +++- - poppler/SplashOutputDev.cc | 19 ++++++-------- - poppler/SplashOutputDev.h | 11 +++++--- - qt4/src/poppler-page.cc | 7 +++--- - qt5/src/poppler-page.cc | 7 +++--- - utils/pdftohtml.cc | 9 +++---- - utils/pdftoppm.cc | 49 ++++++++++++++++++++++++++---------- - utils/pdftops.cc | 14 ++++++++++- - 12 files changed, 96 insertions(+), 118 deletions(-) - -commit dc9751e6ac47a708ba6e7a68560bdce6a2e4a010 -Author: Albert Astals Cid -Date: Fri Jan 9 15:50:02 2015 +0100 - - Compile++ - - poppler/GfxState.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit d91876a0c7a936b1f6f461d80131d7586a6c1a5e -Author: Albert Astals Cid -Date: Thu Jan 8 20:13:06 2015 +0100 - - Accept malformed documents whose root is a Page instead of a Pages - - gs and Adobe Reader do it so it's "common" enough - - Bug #88172 - - poppler/Catalog.cc | 37 ++++++++++++++++++++++++++++++++----- - 1 file changed, 32 insertions(+), 5 deletions(-) - -commit 7ce86b9be058408eb567d8d0b9747853a66c116f -Author: Albert Astals Cid -Date: Thu Jan 8 17:35:28 2015 +0100 - - Remove assert in gouraudFillTriangle - - We don't *need* the assert, an error() is fine and the malformed - document - will just get rendered wrongly instead of "crashing" - - Bugs #85274 - - poppler/Gfx.cc | 28 +++++++++++++++++----------- - 1 file changed, 17 insertions(+), 11 deletions(-) - -commit 9e9df4b20d17478996780008bc9802a857d173fc -Author: Albert Astals Cid -Date: Thu Jan 8 17:01:52 2015 +0100 - - Fix crash on broken document - - Bug #85281 - - poppler/GfxState.cc | 10 +++++++--- - 1 file changed, 7 insertions(+), 3 deletions(-) - -commit 636faafcb84b856580398f7883b6406d645c85d1 -Author: Adam Reichold -Date: Tue Jan 6 22:57:20 2015 +0100 - - JPEG2000Stream: Inline doGetChar and doLookChar - - poppler/JPEG2000Stream.cc | 49 - +++++++++++++++++++++++++---------------------- - poppler/JPEG2000Stream.h | 7 ++----- - 2 files changed, 28 insertions(+), 28 deletions(-) - -commit c13bffe92963c4969037695992f4c2776bbe973f -Author: Albert Astals Cid -Date: Sun Jan 4 23:17:42 2015 +0100 - - 0.30 - - CMakeLists.txt | 4 ++-- - NEWS | 18 ++++++++++++++++++ - configure.ac | 2 +- - cpp/CMakeLists.txt | 2 +- - cpp/Doxyfile | 2 +- - cpp/Makefile.am | 2 +- - poppler/Makefile.am | 2 +- - poppler/PDFDoc.cc | 1 + - poppler/TextOutputDev.cc | 2 +- - poppler/poppler-config.h.cmake | 2 +- - poppler/poppler-config.h.in | 2 +- - qt4/src/Doxyfile | 2 +- - qt5/src/Doxyfile | 2 +- - 13 files changed, 31 insertions(+), 12 deletions(-) - -commit e499fdab2e96cb3069db7ac8ffa0df20ccccddc9 -Author: Thomas Freitag -Date: Sun Jan 4 20:23:39 2015 +0100 - - extended openjpeg2 support - - poppler/JPEG2000Stream.cc | 101 - +++++++++++++++++++++++++++++++++++----------- - 1 file changed, 78 insertions(+), 23 deletions(-) - -commit 2841f3c34dd6366a70e4d6d307a08b3fbc3e9897 -Author: Adrian Johnson -Date: Sun Jan 4 20:22:47 2015 +0100 - - Cmake support for openjpeg2 - - With some tweaks from Albert - - CMakeLists.txt | 56 - +++++++++++++++++++++++++++++------- - cmake/modules/FindLIBOPENJPEG2.cmake | 30 +++++++++++++++++++ - 2 files changed, 76 insertions(+), 10 deletions(-) - -commit 117af9c6bbd923954ef7de63adec8c22d51da1e4 -Author: Adrian Johnson -Date: Sun Jan 4 19:42:34 2015 +0100 - - Initial attempt at libopenjpeg2 support - - OpenJPEG 2 has a new pkg-config name and API. - - - Update configure.ac to find openjpeg 2 and provide V1/v2 macros - - Update JPEG2000Stream to use new API depending on openjpeg v1/v2 - macros - - OpenJPEG 2.1 changed the API so provide a version macro to make - it easier - to handle the the 2.1 change and any future changes. - - Move openjpeg.h into the .cc file - - configure.ac | 80 ++++++++---- - poppler/JPEG2000Stream.cc | 313 - +++++++++++++++++++++++++++++++++++++--------- - poppler/JPEG2000Stream.h | 41 ++---- - 3 files changed, 323 insertions(+), 111 deletions(-) - -commit 9caf7525409d699c16896653528486451123b485 -Author: Albert Astals Cid -Date: Sun Jan 4 18:48:02 2015 +0100 - - Make PSOutputDev accept a list of pages indeces - - Instead of first, last - - Bug #84833 - - Reviewed in the mailing list, see "Can anyone have a look at my - patch?" - - glib/poppler-page.cc | 10 ++++++--- - poppler/PSOutputDev.cc | 50 - ++++++++++++++++++++++++----------------- - poppler/PSOutputDev.h | 14 +++++++----- - qt4/src/poppler-ps-converter.cc | 11 ++++++--- - qt5/src/poppler-ps-converter.cc | 11 ++++++--- - utils/pdftops.cc | 15 +++++++++---- - 6 files changed, 71 insertions(+), 40 deletions(-) - -commit 173f182fb568843f97e7d45d1b16bebbd2aa7413 -Author: Li Junling -Date: Fri Jan 2 17:23:24 2015 +0100 - - Find last 'startxref' in the last 24K instead of the last 1K - - Bug #85919 - - poppler/PDFDoc.cc | 38 ++++++++++++++++++++++---------------- - 1 file changed, 22 insertions(+), 16 deletions(-) - -commit 0b1cd9403b8a240e58ec4f1832588d25f8295278 -Author: Jason Crain -Date: Sat Dec 20 03:22:23 2014 -0600 - - Free BBox object on error - - poppler/Gfx.cc | 1 + - 1 file changed, 1 insertion(+) - -commit acc33a6950031ac4a5c759d043d24df0cfa7e8b6 -Author: Jason Crain -Date: Sat Dec 20 02:24:49 2014 -0600 - - Check for invalid matrix in annotation - - Bug #84990 - - poppler/Gfx.cc | 12 ++++++++++-- - 1 file changed, 10 insertions(+), 2 deletions(-) - -commit 56aff7d78658f586e3c4cd41685f189dafb3098a -Author: Thomas Freitag -Date: Tue Dec 23 15:49:15 2014 +0100 - - pdfunite: Support output intents, optional content and acroform - - utils/pdfunite.cc | 116 - ++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 116 insertions(+) - -commit 9e734063e6a6a4b9743c9aa27d3d3127b5a960d7 -Author: Jason Crain -Date: Fri Dec 19 01:56:45 2014 -0600 - - Move array reallocation from visitLine to startLine - - Fixes potential memory corruption from writing after end of lines - array. - - https://bugs.freedesktop.org/show_bug.cgi?id=84555 - - poppler/TextOutputDev.cc | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -commit 0c47b769a77795bd866b6686b79fd20ad6f554bf -Author: Daniel Macks -Date: Sun Dec 14 18:52:48 2014 +0100 - - Only consider adding -fno-check-new if compiler supports it - - Helps compiling on old clang's - - Bug #76963 - - configure.ac | 18 ++++++++++++++++-- - 1 file changed, 16 insertions(+), 2 deletions(-) - -commit c9c90d50e3708f6fac313aa8b458aef6dba5dcfb -Author: Hans-Peter Deifel -Date: Fri Dec 12 13:09:51 2014 +0100 - - cpp: New API to set debug output function - - Adds the global function set_debug_error_function, that allows users - to install their own function to print internal poppler errors. - - cpp/poppler-global.cpp | 29 +++++++++++++++++++++++++++++ - cpp/poppler-global.h | 5 +++++ - cpp/poppler-private.cpp | 15 ++++++++++++--- - cpp/poppler-private.h | 3 +++ - 4 files changed, 49 insertions(+), 3 deletions(-) - -commit fa8f276a10911c97d2777fff3270771802bc3892 -Author: Albert Astals Cid -Date: Thu Dec 4 23:11:12 2014 +0100 - - 0.29.0 - - CMakeLists.txt | 4 ++-- - NEWS | 15 +++++++++++++++ - configure.ac | 4 ++-- - cpp/Doxyfile | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/Doxyfile | 2 +- - qt5/src/Doxyfile | 2 +- - 7 files changed, 23 insertions(+), 8 deletions(-) - -commit fee700cfecb9d7d5fa938704a5f457f15aaa4676 -Author: Albert Astals Cid -Date: Mon Dec 1 20:52:42 2014 +0100 - - Run dos2unix as suggested by Volker Grabsch - - splash/SplashState.h | 278 ++++++++++---------- - test/perf-test-preview-dummy.cc | 44 ++-- - test/perf-test-preview-win.cc | 544 - ++++++++++++++++++++-------------------- - 3 files changed, 433 insertions(+), 433 deletions(-) - -commit d3fe0661c6dc6050e14cd5cb4afa089b7d7d66b0 -Author: Richard PALO -Date: Sun Nov 30 22:46:22 2014 +0100 - - warning: "_FILE_OFFSET_BITS" redefined - - Bug #86870 - - test/perf-test.cc | 2559 - +++++++++++++++++++++++++++-------------------------- - 1 file changed, 1280 insertions(+), 1279 deletions(-) - -commit 18884065e11fee82506915095619107a43172ecb -Author: Richard PALO -Date: Sun Nov 30 22:36:29 2014 +0100 - - The isfinite macro is defined on SunOS under c99 - - Bug #86869 - - poppler/SplashOutputDev.cc | 3 +++ - 1 file changed, 3 insertions(+) - -commit bcb470064dd9f75ab0b0a0d9b7319fe8f1e558ae -Author: Adrian Johnson -Date: Tue Nov 25 05:53:38 2014 +1030 - - cofigure: print "no" instead of "auto" if lcms not found - - configure.ac | 2 ++ - 1 file changed, 2 insertions(+) - -commit 832046c57ab2909d329340f1c941b29e8246ff73 -Author: Thomas Freitag -Date: Fri Nov 28 11:08:34 2014 +0100 - - Use correct LAB byte array for lcms input - - Bug #86388 - - poppler/GfxState.cc | 51 - ++++++++++++++++++++++++++++++++++++++------------- - poppler/GfxState.h | 4 +++- - 2 files changed, 41 insertions(+), 14 deletions(-) - -commit a604bc3a2ed9f9181aa3b12d795608fcf5e08220 -Author: Thomas Freitag -Date: Fri Nov 14 11:56:50 2014 +0100 - - Solve blend mode problem in CYMK and DeviceN for separable blend modes - - Fixes part of #68986 - - poppler/SplashOutputDev.cc | 277 - +++++++++++++++++++++++++-------------------- - 1 file changed, 155 insertions(+), 122 deletions(-) - -commit b7802ff39db270dda2aa20f005fb87c22ed34137 -Author: Thomas Freitag -Date: Fri Nov 14 11:47:38 2014 +0100 - - Use Default colorspaces if present instead of Device colorspaces - - Fixes part of #68986 - - poppler/CairoOutputDev.cc | 4 +- - poppler/Gfx.cc | 40 +++++----- - poppler/GfxState.cc | 197 - ++++++++++++++++++++++++++++++++++------------ - poppler/GfxState.h | 31 ++++---- - poppler/Page.cc | 4 +- - 5 files changed, 188 insertions(+), 88 deletions(-) - -commit 07aa6f4030418883d8d45a8dfa3d80d2dadca4e7 -Author: Thomas Freitag -Date: Thu Nov 13 12:26:25 2014 +0100 - - write correct size in trailer dict - - Bug #86063 - - poppler/PDFDoc.cc | 7 ++----- - 1 file changed, 2 insertions(+), 5 deletions(-) - -commit 51e7c29cabedc72e097023e6d8d6d68ed43fa20c -Author: Carlos Garcia Campos -Date: Fri Nov 7 18:30:36 2014 +0100 - - regtest: Update references also for tests that no longer crash - - We are currently updating the refs only when we have checksums to - compare, but if a test used to crash there's no md5 file in refs. - - regtest/TestRun.py | 2 ++ - regtest/backends/__init__.py | 24 ++++++++++++++++++++++++ - 2 files changed, 26 insertions(+) - -commit d205908930d5dc4ec3a1a1a2c2b93fbb92c2c867 -Author: William Bader -Date: Wed Nov 5 20:23:49 2014 +0100 - - Make it proper C - - glib/demo/annots.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit fa1d636b00210b9c52787ab3c833fe9aa2e293fa -Author: Albert Astals Cid -Date: Tue Nov 4 20:00:08 2014 +0100 - - 0.28.1 - - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - qt4/src/Doxyfile | 2 +- - qt5/src/Doxyfile | 2 +- - 4 files changed, 4 insertions(+), 4 deletions(-) - -commit 7debbb05df18afc86df8a4fd37980728ec2e5788 -Author: Albert Astals Cid -Date: Tue Nov 4 19:29:58 2014 +0100 - - Fix typo - - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit d5489ef37742227176e800390a990f2b882d9710 -Author: Albert Astals Cid -Date: Tue Nov 4 01:27:05 2014 +0100 - - 0.28.0 - - CMakeLists.txt | 6 +++--- - NEWS | 43 +++++++++++++++++++++++++++++++++++++++++++ - configure.ac | 4 ++-- - cpp/Doxyfile | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/CMakeLists.txt | 2 +- - qt4/src/Doxyfile | 2 +- - qt4/src/Makefile.am | 2 +- - qt5/src/CMakeLists.txt | 2 +- - qt5/src/Doxyfile | 2 +- - qt5/src/Makefile.am | 2 +- - 11 files changed, 56 insertions(+), 13 deletions(-) - -commit f87115a1129e4e03802769181a3392c8dce3192a -Author: Hib Eris -Date: Tue Nov 4 01:25:18 2014 +0100 - - Don't ship the moc files - - qt4/demos/Makefile.am | 1 - - qt5/demos/Makefile.am | 1 - - 2 files changed, 2 deletions(-) - -commit 0a9c38076f1555196029372b7e08714b43c7a58d -Author: Albert Astals Cid -Date: Mon Nov 3 21:43:28 2014 +0100 - - Update (C) - - fofi/FoFiType1.cc | 1 + - poppler/PDFDoc.cc | 4 ++-- - poppler/PDFDoc.h | 2 +- - poppler/XRef.cc | 2 +- - qt4/src/poppler-annotation-private.h | 2 +- - qt4/src/poppler-annotation.cc | 2 +- - qt4/src/poppler-page.cc | 2 +- - qt4/src/poppler-qt4.h | 2 +- - qt5/src/poppler-annotation-private.h | 2 +- - qt5/src/poppler-annotation.cc | 2 +- - qt5/src/poppler-page.cc | 2 +- - qt5/src/poppler-qt5.h | 2 +- - utils/pdfdetach.cc | 1 + - utils/pdftocairo-win32.cc | 12 ++++++++++++ - utils/pdftocairo-win32.h | 12 ++++++++++++ - utils/pdftocairo.cc | 3 ++- - 16 files changed, 40 insertions(+), 13 deletions(-) - -commit 73cf1e87c9803bbe4271be297b486d9932677d46 -Author: Albert Astals Cid -Date: Mon Nov 3 21:37:13 2014 +0100 - - Need to dist this file - - utils/Makefile.am | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 2fd0cd652cfc03c9af35a59192729e4ed26e8146 -Author: Albert Astals Cid -Date: Mon Nov 3 19:20:23 2014 +0100 - - Fix memory leaks when running pdfseparate - - Bug #84768 - - poppler/PDFDoc.cc | 102 - +++++++++++++++++++++------------------------------ - poppler/PDFDoc.h | 2 +- - utils/pdfseparate.cc | 8 +++- - utils/pdfunite.cc | 4 +- - 4 files changed, 50 insertions(+), 66 deletions(-) - -commit d6ea8acbb348fdb43601a963ba5407e933565003 -Author: Adrian Johnson -Date: Mon Nov 3 19:11:25 2014 +0100 - - fix crash in Xref::getEntry - - Bug 85234 - - poppler/XRef.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit bd142810b9f66b017a58b3e1840d4d72794f1ef4 -Author: Jason Crain -Date: Thu May 15 02:22:44 2014 -0500 - - cairo: Use matrix to determine pattern size - - https://bugs.freedesktop.org/show_bug.cgi?id=33364 - - poppler/CairoOutputDev.cc | 22 ++++++++++++++++++---- - 1 file changed, 18 insertions(+), 4 deletions(-) - -commit 06dd7dc337c7db6122329e98783a126d59035aff -Author: Hib Eris -Date: Thu May 29 12:45:33 2014 +0200 - - Include windows.h, not Windows.h - - Fixes building on file systems that are case sensitive, e.g. when - cross compiling on Linux for win32. - - https://bugs.freedesktop.org/show_bug.cgi?id=79407 - - qt4/tests/stress-threads-qt4.cpp | 2 +- - qt5/tests/stress-threads-qt5.cpp | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit 76a350b11160ac203a41b27fbc85a3264bfe4735 -Author: Carlos Garcia Campos -Date: Thu Oct 30 18:25:06 2014 +0100 - - regtest: Try to fix again the paths of the resources in the generated - HTML report - - Use always relatives paths for the resources under the out directory, - and absolute paths for all other resources when no-absolute-path - command - line option is used. - - regtest/HTMLReport.py | 47 - +++++++++++++++++++++++------------------------ - 1 file changed, 23 insertions(+), 24 deletions(-) - -commit c93d6b264dc77c46c72281d966bf826274a43d15 -Author: Carlos Garcia Campos -Date: Wed Oct 29 17:37:06 2014 +0100 - - regtest: respect --no-absolute-paths when creating the pretty - diff links - - regtest/HTMLReport.py | 16 ++++++++++------ - 1 file changed, 10 insertions(+), 6 deletions(-) - -commit 9f953e47a6ea92d806aeea61e227af54c889c6be -Author: Carlos Garcia Campos -Date: Mon Oct 27 19:53:28 2014 +0100 - - regtest: Add an option to create the HTML report without absolute - paths - - It uses the paths as received from the command line attributes. - - regtest/HTMLReport.py | 15 +++++++++++---- - regtest/commands/create-report.py | 4 ++++ - 2 files changed, 15 insertions(+), 4 deletions(-) - -commit 3d840231bc6f0714da361493ef32913af2eb78d7 -Author: Carlos Garcia Campos -Date: Sun Oct 26 12:09:28 2014 +0100 - - regtest: Fix png diff generation with python-pil pillow fork - - Use from PIL import Image instead of just import Image, since pillow - only doesn't support import Image without using PIL.Image. - - regtest/backends/__init__.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 68e58ec5465efc289d85ae104941db92450a3168 -Author: Carlos Garcia Campos -Date: Sun Oct 26 11:21:23 2014 +0100 - - regtest: Limit the number of worker threads to the number of documents - to test - - We are always spawning all the threads even if the documents to - test is - less than the worker threads. Also optimize the case of running - only one - test to not spwn any thread. - - regtest/TestRun.py | 27 ++++++++++++++++++--------- - 1 file changed, 18 insertions(+), 9 deletions(-) - -commit 7c21b95852e891060cd2e276949acf0945306ab7 -Author: Carlos Garcia Campos -Date: Sun Oct 26 11:08:45 2014 +0100 - - regtest: Allow to run groups of tests individually - - Now it's possible to pass more than one argument to run-tests - command and - optionally the docs directory. When more than one test is passed - and the - docs directory is not provided, the common base path of all passed - tests - is used as docs directory. The tests passed can be documents or - directories, using absolute paths or paths relative to the docs - directory. - This also allows us to update the refs for a group of tests. - - regtest/TestRun.py | 26 ++++++++++++++++++++++++-- - regtest/Utils.py | 7 +++++-- - regtest/commands/run-tests.py | 29 ++++++++++++++++++++--------- - 3 files changed, 49 insertions(+), 13 deletions(-) - -commit 53be607edc18a861aeb0b6663bac3c05de46c84c -Author: Hib Eris -Date: Fri Oct 24 11:35:17 2014 +0200 - - Fix warning on unused variable in pdftocairo.cc - - Fixes warning: - - CXX pdftocairo-pdftocairo.o - pdftocairo.cc:130:14: warning: ‘setupdlg’ defined but not used - [-Wunused-variable] - static GBool setupdlg = gFalse; - ^ - - https://bugs.freedesktop.org/show_bug.cgi?id=85400 - - utils/pdftocairo.cc | 2 ++ - 1 file changed, 2 insertions(+) - -commit f966b8766d40b2c912e69a1e17ef8cc4bd52be95 -Author: Carlos Garcia Campos -Date: Tue Oct 21 16:42:27 2014 +0200 - - fofi: Fix a crash when parsing an invalid font due to a integer - overflow - - This fixes a crash rendering trust_metrics.f2495.f0.pdf. - - fofi/FoFiType1.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 4963332ca4db13d8a9186b06d2aa0d59abbc10ee -Author: Adrian Johnson -Date: Sun Oct 5 21:58:37 2014 +1030 - - pdftocairo: add -printdlg output option for win32 - - when set the win32 print dialog is displayed before printing - - configure.ac | 2 +- - utils/pdftocairo-win32.cc | 303 - ++++++++++++++++++++++++++++++++++++++++++++-- - utils/pdftocairo-win32.h | 14 +-- - utils/pdftocairo.1 | 14 ++- - utils/pdftocairo.cc | 31 ++++- - 5 files changed, 337 insertions(+), 27 deletions(-) - -commit d8fe025c36f555a5438677e20df803eee216bb13 -Author: Adrian Johnson -Date: Sun Oct 5 18:11:09 2014 +1030 - - pdftocairo: add a -setupdlg option that will the show printer - properties - - dialog when printing to a win32 printer. - - utils/pdftocairo-win32.cc | 22 +++++++++++++++++++--- - utils/pdftocairo-win32.h | 3 ++- - utils/pdftocairo.1 | 5 +++++ - utils/pdftocairo.cc | 24 ++++++++++++++++-------- - 4 files changed, 42 insertions(+), 12 deletions(-) - -commit c091aa14513859ab76223f5e4e6055d92082433c -Author: Adrian Johnson -Date: Sun Sep 14 20:43:47 2014 +0930 - - pdftocairo: fix a number of bugs in win32 printing - - - make origPageSizes work - - make landscape pages work - - make -noshrink option work - - return actual page size in use back to main() so fit page transform - works - - hdc should be destroyed after cairo surface - - improve option parsing and rename duplex values - - Add third call to DocumentProperties as discussed in bug 79936 - - fix error messages - - utils/pdftocairo-win32.cc | 181 - ++++++++++++++++++++++++++-------------------- - utils/pdftocairo-win32.h | 2 +- - utils/pdftocairo.1 | 5 +- - utils/pdftocairo.cc | 49 ++++++------- - 4 files changed, 132 insertions(+), 105 deletions(-) - -commit cc3b39d49c656e912a7461212f3bb4e58c6444e7 -Author: Adrian Johnson -Date: Fri Sep 12 18:17:49 2014 +0930 - - make pdftocairo-win32.cc a standalone .cc file - - instead of #including it in pdftocairo.cc - - utils/CMakeLists.txt | 1 + - utils/Makefile.am | 3 +- - utils/pdftocairo-win32.cc | 74 - +++++++++++++++++++++++------------------------ - utils/pdftocairo-win32.h | 22 ++++++++++++++ - utils/pdftocairo.cc | 24 +++++++++------ - 5 files changed, 77 insertions(+), 47 deletions(-) - -commit 700205af19ef1ae5f2c713d118ebd5dd4a0afba3 -Author: Adrian Johnson -Date: Sun Sep 7 20:18:36 2014 +0930 - - pdftocairo: Allow an output file for win32 printing to be specified - - Can be used for testing win32 print output without wasting paper. - - utils/pdftocairo-win32.cc | 12 ++++++++---- - utils/pdftocairo.1 | 4 ++++ - utils/pdftocairo.cc | 13 +++++++------ - 3 files changed, 19 insertions(+), 10 deletions(-) - -commit 40d3ae87befad489fd8c0b38ff2561a0782cae0b -Author: Rodrigo Rivas Costa -Date: Sat Sep 6 21:04:10 2014 +0930 - - Add support for printing to a Windows printer from pdftocairo - - Bug 79936 - - configure.ac | 2 +- - utils/pdftocairo-win32.cc | 219 - ++++++++++++++++++++++++++++++++++++++++++++++ - utils/pdftocairo.1 | 23 ++++- - utils/pdftocairo.cc | 61 ++++++++++--- - 4 files changed, 292 insertions(+), 13 deletions(-) - -commit ee4a389872d86b619c677888da8f13f1f6c54472 -Author: Adrian Johnson -Date: Mon Oct 20 22:32:30 2014 +1030 - - PDFDoc: fix crash when getPage() returns NULL - - Bug 85235 - - poppler/PDFDoc.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 0c3f53e34ec287dab2784e1f3411ad06b62dffc7 -Author: Adrian Johnson -Date: Mon Oct 20 22:17:20 2014 +1030 - - PDFDOC: Check for EOF when reading raw stream - - Bug 85233 - - poppler/PDFDoc.cc | 4 ++++ - 1 file changed, 4 insertions(+) - -commit 88dbd4df0998233939b4a51cedbfc65c58a315f9 -Author: Adrian Johnson -Date: Sun Oct 19 22:47:15 2014 +1030 - - pdfdetach: fix crash when getPage() returns null - - Bug 85145 - - utils/pdfdetach.cc | 2 ++ - 1 file changed, 2 insertions(+) - -commit e0179304cdef615fcf639046410d214fd5b5f276 -Author: Adrian Johnson -Date: Sun Oct 19 21:36:39 2014 +1030 - - cairo: fix crash when no group color space - - Bug 85137 - - poppler/CairoOutputDev.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 745f1241bf903969e50f0e1139641e389a9c331f -Author: Scott West -Date: Tue Oct 7 23:54:52 2014 +0200 - - Fix memory leak in Dict.remove. - - The entry was previously just overwritten now it is freed - - Small fixes by Albert oo - - Bug #84607 - - poppler/Dict.cc | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -commit b8810703ca76f0bbc8185ab87679cf18eb006d52 -Author: Luigi Scarso -Date: Tue Oct 7 22:45:05 2014 +0200 - - Make Attribute::getName() work when UTF-16BE is used - - Contains some ideas by me - Bug #84722 - - goo/GooString.h | 9 +++++---- - poppler/StructElement.cc | 17 +++++++++++------ - poppler/StructElement.h | 7 +++++-- - 3 files changed, 21 insertions(+), 12 deletions(-) - -commit 96a04336c7a6331727724125686a0d6f42f19f46 -Author: Adrian Johnson -Date: Mon Oct 6 10:21:51 2014 +1030 - - cairo: only embed mime data if image decode map is identity - - https://bugs.launchpad.net/ubuntu/+source/cairo/+bug/1317517 - - poppler/CairoOutputDev.cc | 19 ++++++++++++++++--- - poppler/CairoOutputDev.h | 3 ++- - 2 files changed, 18 insertions(+), 4 deletions(-) - -commit 18541054bebce3f9d4729629785bf140d67d2da0 -Author: Adrian Johnson -Date: Wed Sep 24 21:20:42 2014 +0930 - - cairo: Only embed mime data for gray/rgb/cmyk colorspaces - - Bug 80719 - - poppler/CairoOutputDev.cc | 39 +++++++++++++++++++++++++++++++-------- - poppler/CairoOutputDev.h | 2 +- - 2 files changed, 32 insertions(+), 9 deletions(-) - -commit cbf2652c483d7010fc36191c8b209a57eeec93d8 -Author: Adrian Johnson -Date: Thu Jan 26 00:37:17 2012 +1030 - - cairo: don't render text when text matrix is not invertable - - Emulates acroread behavior. - - Bug 78042 - - poppler/CairoOutputDev.cc | 14 +++++++++----- - poppler/CairoOutputDev.h | 1 + - 2 files changed, 10 insertions(+), 5 deletions(-) - -commit 4fe17e97a4bd7873caad771c446199b282039697 -Author: Carlos Garcia Campos -Date: Sun Oct 5 11:30:43 2014 +0200 - - glib: Build introspection linking to the uninstalled libraries - - https://bugs.freedesktop.org/show_bug.cgi?id=84526 - - glib/Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit a2477da56a4d1c534175940d7c01a9d3db6c72d4 -Author: Albert Astals Cid -Date: Wed Oct 1 22:33:11 2014 +0200 - - Fix 303287ebdad0de9fb2655c4d7eab627c0045ea04 - - It may happen that j is bigger than macGlyphNames size, so don't - try to access it - - fofi/FoFiTrueType.cc | 12 ++++++++---- - 1 file changed, 8 insertions(+), 4 deletions(-) - -commit ce95ecda450361496aedd5d5cd0bf47fd2c66703 -Author: Albert Astals Cid -Date: Tue Sep 30 19:50:20 2014 +0200 - - Fix assert in 5068.asan.0.6052.pdf - - poppler/Gfx.cc | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -commit 01723aa17e836e818158dbdc56df642a290be300 -Author: Adrian Johnson -Date: Tue Sep 30 18:48:47 2014 +0200 - - Map Standard/Expert encoding ligatures to AGLFN names - - for use with substitute fonts that are not compatible with the - Standard 14 fonts. - - Bug 80093 - - poppler/CairoFontEngine.cc | 12 +++++++++--- - poppler/GfxFont.cc | 29 ++++++++++++++++++++++++++++- - poppler/GfxFont.h | 7 ++++++- - splash/SplashFTFontFile.cc | 8 ++++++++ - 4 files changed, 51 insertions(+), 5 deletions(-) - -commit 529db4a94607c1ad909764d26f740c601bbe896f -Author: Hib Eris -Date: Mon Sep 29 22:59:15 2014 +0200 - - Fix build with --disable-utils - - Since 21b5fd655ce45b90668d1416d21c526ab7eb3ad6, building Poppler - fails when configured - with '--disable-utils'. - - Bug #84448 - - Makefile.am | 6 +----- - utils/Makefile.am | 4 ++++ - 2 files changed, 5 insertions(+), 5 deletions(-) - -commit c54f6aceed983a221d88ce5c21becbf8aab2931b -Author: Thomas Freitag -Date: Mon Sep 29 21:42:46 2014 +0200 - - use alt colorspace to get CMYK values for an ICC based CMYK colorspace - - The reason for the pale image is that GfxICCBasedColorSpace::getCMYK() - uses the cms transformation to get RGB values and the convert it - back to CMYK even for a ICC based CMYK colorspace instead of just - returning the CMYK values itself. - - Bug #79019 - - poppler/GfxState.cc | 10 ++++++---- - 1 file changed, 6 insertions(+), 4 deletions(-) - -commit 21b5fd655ce45b90668d1416d21c526ab7eb3ad6 -Author: Hib Eris -Date: Sun Sep 14 11:20:23 2014 +0200 - - Refactor Makefiles to build a noinst library for parsing args - - Prevents this automake warning about possible forward-incompatibility: - - $ ./autogen.sh - ... - cpp/tests/Makefile.am:16: warning: source file - '$(top_srcdir)/utils/parseargs.cc' is in a subdirectory, - cpp/tests/Makefile.am:16: but option 'subdir-objects' is disabled - automake: warning: possible forward-incompatibility. - automake: At least a source file is in a subdirectory, but the - 'subdir-objects' - automake: automake option hasn't been enabled. For now, the - corresponding output - automake: object file(s) will be placed in the top-level directory. - However, - automake: this behaviour will change in future Automake versions: - they will - automake: unconditionally cause object files to be placed in the - same subdirectory - automake: of the corresponding sources. - automake: You are advised to start using 'subdir-objects' option - throughout your - automake: project, to avoid future incompatibilities. - cpp/tests/Makefile.am:20: warning: source file - '$(top_srcdir)/utils/parseargs.cc' is in a subdirectory, - cpp/tests/Makefile.am:20: but option 'subdir-objects' is disabled - parallel-tests: installing './test-driver' - test/Makefile.am:58: warning: source file '../utils/parseargs.cc' - is in a subdirectory, - test/Makefile.am:58: but option 'subdir-objects' is disabled - - $ automake --version - automake (GNU automake) 1.14.1 - ... - - https://bugs.freedesktop.org/show_bug.cgi?id=83839 - - cpp/tests/Makefile.am | 3 +-- - test/Makefile.am | 8 ++++---- - utils/.gitignore | 2 ++ - utils/Makefile.am | 42 ++++++++++++++++++------------------------ - 4 files changed, 25 insertions(+), 30 deletions(-) - -commit 70a851b0cc58241d1f2f6bc48af2614595326c8f -Author: Adrian Johnson -Date: Sat Sep 6 21:16:04 2014 +0930 - - Update .gitignore - - .gitignore | 2 ++ - 1 file changed, 2 insertions(+) - -commit d44e7e3560bdc79253df98db05385dce3e8ccbb4 -Author: Adrian Johnson -Date: Sat Sep 6 21:53:21 2014 +0930 - - Don't use -fPIC on mingw - - it emits a warning for every file stating that -fPIC is ignored - - configure.ac | 12 +++++++++++- - 1 file changed, 11 insertions(+), 1 deletion(-) - -commit 2723371b2e2f7684301ea1c5272ab49851f28c03 -Author: Adrian Johnson -Date: Sat Sep 6 21:19:46 2014 +0930 - - make autogen.sh work with variables with spaces - - eg ./autogen.sh CXXFLAGS="-O0 -g3" - - autogen.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit ebc814a7e31511308bbcd8856d0356f4d7cc74be -Author: Hib Eris -Date: Sun Sep 14 11:45:12 2014 +0200 - - Add compile to .gitignore - - Automake automatically creates a wrapper script called 'compile' for - compilers which do not understand '-c -o'. - - $ automake --version - automake (GNU automake) 1.14.1 - - https://bugs.freedesktop.org/show_bug.cgi?id=83840 - - .gitignore | 1 + - 1 file changed, 1 insertion(+) - -commit 8ce31485faa26994c52f4d032cc5a8355aba23d1 -Merge: 4589ce17 303287eb -Author: Albert Astals Cid -Date: Fri Sep 26 00:40:43 2014 +0200 - - Merge remote-tracking branch 'origin/poppler-0.26' - -commit 303287ebdad0de9fb2655c4d7eab627c0045ea04 -Author: Thomas Freitag -Date: Fri Sep 26 00:25:38 2014 +0200 - - Fix rendering of file with a wrong embedded font - - Bug #84270 - - fofi/FoFiTrueType.cc | 22 ++++++++++++++-------- - 1 file changed, 14 insertions(+), 8 deletions(-) - -commit f94ba85a736b4c90c05e7782939f32506472658e -Author: Carlos Garcia Campos -Date: Fri Sep 12 19:22:20 2014 +0200 - - glib: Fix use of uninitialized members in PopplerInputStream - - https://bugs.freedesktop.org/show_bug.cgi?id=82630 - - glib/poppler-input-stream.cc | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -commit 4589ce17caf94e7c5fa856906d3a8cc08e999d73 -Author: Carlos Garcia Campos -Date: Fri Sep 12 19:22:20 2014 +0200 - - glib: Fix use of uninitialized members in PopplerInputStream - - https://bugs.freedesktop.org/show_bug.cgi?id=82630 - - glib/poppler-input-stream.cc | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -commit fe67324d450c356b7c876cf50da705156112513a -Merge: e62e18e1 f74a5964 -Author: Albert Astals Cid -Date: Thu Aug 21 21:39:52 2014 +0200 - - Merge remote-tracking branch 'origin/poppler-0.26' - -commit f74a5964078224c01bd5642aabc928d185bb0b69 -Author: Albert Astals Cid -Date: Thu Aug 21 20:07:54 2014 +0200 - - 0.26.4 - - CMakeLists.txt | 2 +- - NEWS | 12 ++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - qt4/src/Doxyfile | 2 +- - qt5/src/Doxyfile | 2 +- - 6 files changed, 17 insertions(+), 5 deletions(-) - -commit ce92e4ccefc7dad79db7f0af7a792ffa47824849 -Author: Albert Astals Cid -Date: Thu Aug 21 20:03:42 2014 +0200 - - Update (C) years - - poppler/Annot.cc | 1 + - poppler/CairoOutputDev.cc | 2 +- - 2 files changed, 2 insertions(+), 1 deletion(-) - -commit 42315c28809e62da7872add917e82853cf8c7e33 -Author: Albert Astals Cid -Date: Thu Aug 21 19:58:35 2014 +0200 - - Make sure e is always initialized - - goo/gfile.cc | 6 +----- - 1 file changed, 1 insertion(+), 5 deletions(-) - -commit e62e18e1b318d6fa664d236723de3c06ae43e86b -Author: Jehan Pagès -Date: Tue Aug 12 21:05:03 2014 +0200 - - poppler: use poppler-data pkg-config for both cmake and autotools - builds - - CMakeLists.txt | 16 ++++++++++++++++ - config.h.cmake | 2 +- - configure.ac | 7 ++++++- - 3 files changed, 23 insertions(+), 2 deletions(-) - -commit 572c60764bbbd2080bfd7a926c646ad20b467aea -Author: Hib Eris -Date: Tue Aug 12 18:12:45 2014 +0200 - - Makefile.am cleanups - - Bug #79411 - - configure.ac | 13 +++-- - cpp/Makefile.am | 66 +++++++++++++------------ - cpp/tests/Makefile.am | 13 ++--- - fofi/Makefile.am | 6 +-- - glib/Makefile.am | 29 ++++++----- - glib/demo/Makefile.am | 18 +++---- - glib/reference/Makefile.am | 3 +- - goo/Makefile.am | 38 +++++++-------- - poppler/Makefile.am | 118 - ++++++++++++++++++++++----------------------- - qt4/demos/Makefile.am | 59 +++++++++++------------ - qt4/src/Makefile.am | 31 ++++++------ - qt4/tests/Makefile.am | 97 +++++++++++++------------------------ - qt5/demos/Makefile.am | 59 +++++++++++------------ - qt5/src/Makefile.am | 27 ++++++----- - qt5/tests/Makefile.am | 98 ++++++++++++++----------------------- - splash/Makefile.am | 42 ++++++++-------- - test/Makefile.am | 68 +++++++++----------------- - utils/Makefile.am | 97 ++++++++++++++++++------------------- - 18 files changed, 405 insertions(+), 477 deletions(-) - -commit 4a4fe80d85a31b10822c7cd8eb5a0698bf306a52 -Author: Hib Eris -Date: Fri Aug 1 07:16:36 2014 +0200 - - glib-demo: Replace use of deprecated gtk stock items - - https://bugs.freedesktop.org/show_bug.cgi?id=82384 - - glib/demo/annots.c | 8 ++++---- - glib/demo/attachments.c | 4 ++-- - glib/demo/main.c | 6 +++--- - glib/demo/page.c | 6 +++--- - glib/demo/utils.c | 4 ++-- - 5 files changed, 14 insertions(+), 14 deletions(-) - -commit ec6bad36cf5e9521f35285a3295976c05a69f76a -Author: Hib Eris -Date: Fri Aug 1 07:51:10 2014 +0200 - - glib-demo: Remove use of deprecated gtk_dialog_get_action_area() - - https://bugs.freedesktop.org/show_bug.cgi?id=82385 - - glib/demo/main.c | 5 +---- - 1 file changed, 1 insertion(+), 4 deletions(-) - -commit b72a534d6c7d8bc026812b68f9d9ac6bf9a2200a -Merge: f2e4154e ef3f7585 -Author: Albert Astals Cid -Date: Sun Aug 3 01:06:57 2014 +0200 - - Merge remote-tracking branch 'origin/poppler-0.26' - -commit ef3f7585fac086de0919aa0bb0ef91a5070ac23e -Author: Jiri Slaby -Date: Sun Aug 3 01:05:00 2014 +0200 - - Improve non-latin characters in inline notes - - Preview commit had by mistake changes in these two files that - belong here - - Bug #65956 - - poppler/Annot.cc | 1 + - poppler/CharCodeToUnicode.cc | 1 + - 2 files changed, 2 insertions(+) - -commit 1b9c54286a4cdfaa284795933c20acf3c7e13bfc -Author: Ed Porras -Date: Sun Aug 3 01:01:35 2014 +0200 - - Don't check for inlineImg twice - - Bug #82059 - - poppler/Annot.cc | 2 +- - poppler/CharCodeToUnicode.cc | 2 +- - poppler/SplashOutputDev.cc | 9 ++++----- - 3 files changed, 6 insertions(+), 7 deletions(-) - -commit f2e4154eff52b86e62490a3ccba470824c9cf436 -Author: Thomas Freitag -Date: Sat Jul 26 00:12:37 2014 +0200 - - pdfseparate: additonal handling for annotations - - Bug #77549 - - poppler/PDFDoc.cc | 46 ++++++++++++++++++++++++++++------------------ - poppler/PDFDoc.h | 6 +++--- - utils/pdfunite.cc | 2 +- - 3 files changed, 32 insertions(+), 22 deletions(-) - -commit e7825f7cbbe7cc9c324fcb34c2e0dcae75f4172a -Author: Carlos Garcia Campos -Date: Fri Jul 25 15:45:55 2014 +0200 - - glib: Fix a memory leak when getting text layout and attributes - - glib/poppler-page.cc | 4 ++++ - 1 file changed, 4 insertions(+) - -commit b729bf92ea1522a1eed9579e53e7580215cb9555 -Author: Carlos Garcia Campos -Date: Fri Jul 25 15:45:55 2014 +0200 - - glib: Fix a memory leak when getting text layout and attributes - - glib/poppler-page.cc | 4 ++++ - 1 file changed, 4 insertions(+) - -commit a1ecff0f0ab81fe76f63244250d96e7ef275f402 -Author: Carlos Garcia Campos -Date: Fri Jul 25 11:25:42 2014 +0200 - - glib: Return NULL in poppler_annot_get_contents also for empty strings - - glib/poppler-annot.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit ab1113d10ef712c7c44cd4b4bb6bc79f9ca3702c -Author: Anuj Khare -Date: Thu Jul 24 19:47:22 2014 +0200 - - annots: Fix a crash when adding annot without contents - - Having no content in an annotation results in a crash when generating - its appearance, since the contents pointer is dereferenced. - For consistency, the same has been done in Annot::initialize. - - poppler/Annot.cc | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -commit f302864ed354b313ec39433f65ca3b107b55789d -Author: Carlos Garcia Campos -Date: Fri Jul 25 11:25:42 2014 +0200 - - glib: Return NULL in poppler_annot_get_contents also for empty strings - - glib/poppler-annot.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 13a5c5f4b61d05f2d18f94ad15e210a47021a576 -Author: Anuj Khare -Date: Thu Jul 24 19:47:22 2014 +0200 - - annots: Fix a crash when adding annot without contents - - Having no content in an annotation results in a crash when generating - its appearance, since the contents pointer is dereferenced. - For consistency, the same has been done in Annot::initialize. - - poppler/Annot.cc | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -commit 94ea9d8e1631abfbb8cc078100942d46b1356970 -Author: Carlos Garcia Campos -Date: Thu Jul 24 10:46:17 2014 +0200 - - cairo: Make sure we always push a transparency group in - setSoftMaskFromImageMask() - - Because that's what unsetSoftMaskFromImageMask() assumes. - - https://bugs.freedesktop.org/show_bug.cgi?id=81624 - - poppler/CairoOutputDev.cc | 64 - +++++++++++++++++++++++------------------------ - 1 file changed, 31 insertions(+), 33 deletions(-) - -commit 02c127b355bb8a98684a5d0af063c60b8bfd09dd -Author: Carlos Garcia Campos -Date: Thu Jul 24 10:46:17 2014 +0200 - - cairo: Make sure we always push a transparency group in - setSoftMaskFromImageMask() - - Because that's what unsetSoftMaskFromImageMask() assumes. - - https://bugs.freedesktop.org/show_bug.cgi?id=81624 - - poppler/CairoOutputDev.cc | 64 - +++++++++++++++++++++++------------------------ - 1 file changed, 31 insertions(+), 33 deletions(-) - -commit c841a703c4c1750fd7ac0d04c6c3e7d4af80b8fa -Author: Albert Astals Cid -Date: Mon Jul 21 00:29:28 2014 +0200 - - Improve Overprintmode and shadings - - Bug #80998 - - poppler/SplashOutputDev.cc | 6 ++++-- - poppler/SplashOutputDev.h | 8 +++++++- - splash/Splash.cc | 24 ++++++++++++++++++++++-- - splash/SplashPattern.h | 6 +++++- - 4 files changed, 38 insertions(+), 6 deletions(-) - -commit ce782112746f629a8e7be6f2daf6ece6ab19917d -Merge: 2c0cb689 26372cfa -Author: Albert Astals Cid -Date: Sun Jul 20 20:35:13 2014 +0200 - - Merge remote-tracking branch 'origin/poppler-0.26' - -commit 26372cfae029a1124e042855c58bf5b70f281c76 -Author: Ed Porras -Date: Sun Jul 20 20:33:48 2014 +0200 - - printf -> error - - Bug #81513 - - poppler/Catalog.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 87d12c09281e3d12cda0fadcd65ab78928dff283 -Author: Albert Astals Cid -Date: Sun Jul 20 18:20:57 2014 +0200 - - 0.26.3 - - CMakeLists.txt | 2 +- - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - qt4/src/Doxyfile | 2 +- - qt5/src/Doxyfile | 2 +- - 5 files changed, 5 insertions(+), 5 deletions(-) - -commit 69e5b81640c9bb31f0876fa8eb7ba28dbf38923f -Author: Albert Astals Cid -Date: Sun Jul 20 18:18:29 2014 +0200 - - News for 0.26.3 - - NEWS | 21 +++++++++++++++++++++ - 1 file changed, 21 insertions(+) - -commit c368c0714d57c089057d974908295d850a1b5108 -Author: Albert Astals Cid -Date: Sun Jul 20 18:15:22 2014 +0200 - - Update Thomas' (C) - - splash/SplashXPathScanner.cc | 2 +- - splash/SplashXPathScanner.h | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit 639179318c43a907a27e86778b720d33d481a9f9 -Author: Pino Toscano -Date: Thu Jul 17 07:33:10 2014 +0200 - - glib: use C90-style comments in public headers - - glib/poppler-media.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 2c0cb689910e8579bf428b3999bcac0cb27b0e51 -Merge: 0b639cd2 1161e728 -Author: Albert Astals Cid -Date: Sat Jul 12 17:21:07 2014 +0200 - - Merge remote-tracking branch 'origin/poppler-0.26' - -commit 1161e728de9ca7c9a5fb0e24c4a5e4a79c65a849 -Author: Thomas Freitag -Date: Sat Jul 12 17:04:42 2014 +0200 - - Error out instead of exiting if allInter grows too much - - Bug #78714 - - splash/SplashXPathScanner.cc | 25 +++++++++++++++++-------- - splash/SplashXPathScanner.h | 2 +- - 2 files changed, 18 insertions(+), 9 deletions(-) - -commit e82a24a585d251f767725f61700dc1f8fe169a52 -Author: Pino Toscano -Date: Sat Jul 12 08:35:45 2014 +0200 - - cmake: sync poppler-config.h.cmake with poppler-config.h.in - - poppler/poppler-config.h.cmake | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -commit 0b639cd2ac1071f5b741031a78d8e2bc18d2b7d7 -Merge: bb16c716 a5ad55b7 -Author: Albert Astals Cid -Date: Fri Jul 11 00:32:46 2014 +0200 - - Merge remote-tracking branch 'origin/poppler-0.26' - -commit a5ad55b7cb9dc4e62754954291e4ecb8e05b5d67 -Author: Albert Astals Cid -Date: Fri Jul 11 00:32:07 2014 +0200 - - Add Hib's (C) - - poppler/poppler-config.h.in | 1 + - 1 file changed, 1 insertion(+) - -commit 4f4ee736075d5b1d1bf4911a26c2f80a7122fe04 -Author: Aki Koskinen -Date: Fri Jul 11 00:30:52 2014 +0200 - - Fix compilation of Qt5 frontend with MinGW - - qt5/src/poppler-private.h | 7 ++----- - 1 file changed, 2 insertions(+), 5 deletions(-) - -commit ddd91675792d9d496b06223867e05d2a190b878b -Author: Hib Eris -Date: Thu May 29 16:58:55 2014 +0200 - - Include stdio.h from poppler-config.h - - In poppler-config.h there is a check for __MINGW_PRINTF_FORMAT, - which is set by stdio.h. - - This fixes this warning when compling with the mingw-w64-compiler: - - XRef.cc: In member function 'virtual void - XRef::XRefTableWriter::writeEntry(Goffset, int, XRefEntryType)': - XRef.cc:1460:94: warning: unknown conversion type character 'l' - in format [-Wformat=] - outStr->printf("%010lli %05i %c\r\n", (long long)offset, gen, - (type==xrefEntryFree)?'f':'n'); - ^ - XRef.cc:1460:94: warning: format '%i' expects argument of type 'int', - but argument 3 has type 'Goffset {aka long long int}' [-Wformat=] - XRef.cc:1460:94: warning: too many arguments for format - [-Wformat-extra-args] - - https://bugs.freedesktop.org/show_bug.cgi?id=79762 - - poppler/poppler-config.h.in | 2 ++ - 1 file changed, 2 insertions(+) - -commit bb16c7162c73b871e26f508823c0ee259b7e5420 -Author: Hib Eris -Date: Sat Jun 7 12:00:52 2014 +0200 - - Move automake version check from autogen.sh to configure.ac - - https://bugs.freedesktop.org/show_bug.cgi?id=79797 - - autogen.sh | 18 ------------------ - configure.ac | 2 +- - 2 files changed, 1 insertion(+), 19 deletions(-) - -commit 74c72223cf609e7c24594f95cab6f9865ad562ac -Merge: f8f7b3a6 47a947f1 -Author: Albert Astals Cid -Date: Fri Jul 11 00:23:04 2014 +0200 - - Merge remote-tracking branch 'origin/poppler-0.26' - -commit 47a947f1dc664793a7037888a46a297a46c79d6c -Author: Hib Eris -Date: Thu Jun 19 10:11:21 2014 +0200 - - Fix moc-qt5 detection - - https://bugs.freedesktop.org/show_bug.cgi?id=80250 - - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit f8f7b3a61bc7eb1e569c25a630b5e127b5dcae62 -Merge: 805ff761 aa6205d1 -Author: Albert Astals Cid -Date: Wed Jul 9 00:23:22 2014 +0200 - - Merge remote-tracking branch 'origin/poppler-0.26' - -commit aa6205d195c56a77e897bad125bf213aba138422 -Author: Jason Crain -Date: Mon Jul 7 23:52:39 2014 -0500 - - Increase required Qt4 version to 4.7.0 - - We use Qt::LayoutDirectionAuto, introduced in 4.7.0. - - bug #81005 - - CMakeLists.txt | 2 +- - configure.ac | 8 ++++---- - 2 files changed, 5 insertions(+), 5 deletions(-) - -commit 805ff76112ebfd57276ea78f1f0891abc61a6c03 -Author: Yaakov Selkowitz -Date: Mon Apr 11 16:26:11 2011 -0500 - - Do not dist gir_DATA - - See https://bugzilla.gnome.org/show_bug.cgi?id=621611 for rationale. - - glib/Makefile.am | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit e5862155b1c549b6774bb4f25c09c45857ff1734 -Author: Hib Eris -Date: Wed Jun 4 20:58:56 2014 +0200 - - Add Changelog to .gitignore - - https://bugs.freedesktop.org/show_bug.cgi?id=79744 - - .gitignore | 1 + - 1 file changed, 1 insertion(+) - -commit 5f22649694d64c4170db82847b599576d5377176 -Author: Hib Eris -Date: Wed Jun 4 20:56:23 2014 +0200 - - Add *.gir, *.typelib to glib/.gitignore - - https://bugs.freedesktop.org/show_bug.cgi?id=79744 - - glib/.gitignore | 2 ++ - 1 file changed, 2 insertions(+) - -commit b63f57985719c7884b67f46fc4afd4954c44c5ab -Author: Hib Eris -Date: Wed Jun 4 20:54:30 2014 +0200 - - Add poppler-undeclared.txt to .gitignore - - https://bugs.freedesktop.org/show_bug.cgi?id=79744 - - glib/reference/.gitignore | 1 + - 1 file changed, 1 insertion(+) - -commit 5e0f4e2516d5a3997ea9c9a9927e24d4f3abe136 -Author: Hib Eris -Date: Wed Jun 4 20:52:15 2014 +0200 - - Add poppler-forms, stress-threads-qt, test-render-to-file to - .gitignore - - https://bugs.freedesktop.org/show_bug.cgi?id=79744 - - qt4/tests/.gitignore | 3 +++ - qt5/tests/.gitignore | 3 +++ - 2 files changed, 6 insertions(+) - -commit 4d2400e7bb8ae9208030b9615dda7c53e571be8b -Author: Hib Eris -Date: Wed Jun 4 10:09:16 2014 +0200 - - Add test-driver to .gitignore - - https://bugs.freedesktop.org/show_bug.cgi?id=79744 - - .gitignore | 1 + - 1 file changed, 1 insertion(+) - -commit 4c35e0213be26f21b628ff8d9f170252bb0106c9 -Author: Hib Eris -Date: Wed Jun 4 10:06:20 2014 +0200 - - Add poppler-qt5.pc to .gitignore - - https://bugs.freedesktop.org/show_bug.cgi?id=79744 - - .gitignore | 2 ++ - 1 file changed, 2 insertions(+) - -commit 2b455b85168d5c9d8641d9a91bfde81ccab18e54 -Author: Pino Toscano -Date: Sun Jul 6 11:13:54 2014 +0200 - - glib: fix typo in apidox - - glib/poppler.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 266a61ab1c9f536a4fb7d68c8f285c854eb2d6e9 -Author: Albert Astals Cid -Date: Thu Jun 19 20:16:19 2014 +0200 - - 0.26.2 - - CMakeLists.txt | 2 +- - NEWS | 10 ++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - qt4/src/Doxyfile | 2 +- - qt5/src/Doxyfile | 2 +- - 6 files changed, 15 insertions(+), 5 deletions(-) - -commit 3381ee20efca2ce27733182d0d6720c1e6936a7f -Author: Albert Astals Cid -Date: Thu Jun 19 19:57:31 2014 +0200 - - Update (C) - - poppler/Lexer.cc | 2 +- - utils/pdftohtml.cc | 1 + - 2 files changed, 2 insertions(+), 1 deletion(-) - -commit 8a5e59c6ea7ccd0ecbdb4b37bf3fe4e74e1c0e8e -Merge: 1b705331 310fbeec -Author: Albert Astals Cid -Date: Wed Jun 18 00:37:03 2014 +0200 - - Merge remote-tracking branch 'origin/poppler-0.26' - -commit 310fbeec692b02d555e3e8dd6c851be11b25e26a -Author: Albert Astals Cid -Date: Wed Jun 18 00:31:48 2014 +0200 - - Make sure we have an xref before using - - KDE bug #335413 had this backtrace - XRef::getNumEntry (this=0x0, offset=-1) at XRef.cc:1300 - 0x00007f29aec1681e in Lexer::getObj (this=0x1648760, - obj=obj@entry=0x1bdf978, cmdA=cmdA@entry=0x7f29aeca66c8 "endstream", - objNum=objNum@entry=0) at Lexer.cc:594 - 0x00007f29aec20dfd in Parser::shift (this=this@entry=0x1bdf950, - cmdA=cmdA@entry=0x7f29aeca66c8 "endstream", objNum=objNum@entry=0) - at Parser.cc:323 - 0x00007f29aec20fde in Parser::makeStream (this=this@entry=0x1bdf950, - dict=dict@entry=0x7fff2541cad0, fileKey=fileKey@entry=0x0, - encAlgorithm=encAlgorithm@entry=cryptRC4, keyLength=keyLength@entry=0, - objNum=objNum@entry=0, objGen=objGen@entry=0, - recursion=recursion@entry=1, strict=strict@entry=false) at - Parser.cc:245 - 0x00007f29aec216b8 in Parser::getObj (this=this@entry=0x1bdf950, - obj=obj@entry=0x7fff2541cad0, simpleOnly=simpleOnly@entry=false, - fileKey=fileKey@entry=0x0, encAlgorithm=encAlgorithm@entry=cryptRC4, - keyLength=keyLength@entry=0, objNum=objNum@entry=0, - objGen=objGen@entry=0, recursion=recursion@entry=0, - strict=strict@entry=false) at Parser.cc:131 - 0x00007f29aec350fc in XRef::readXRef - (this=this@entry=0xfe43a0, pos=pos@entry=0xfe4438, - followedXRefStm=followedXRefStm@entry=0x7fff2541cb30, - xrefStreamObjsNum=xrefStreamObjsNum@entry=0x0) at XRef.cc:551 - 0x00007f29aec35319 in XRef::XRef (this=0xfe43a0, - strA=0x1c54ff0, pos=, mainXRefEntriesOffsetA=0, - wasReconstructed=0x7fff2541cbaf, reconstruct=) - at XRef.cc:342 - 0x00007f29aec2534f in PDFDoc::setup (this=this@entry=0x311e1b0, - ownerPassword=ownerPassword@entry=0x1165830, - userPassword=userPassword@entry=0x447f550) at PDFDoc.cc:262 - - poppler/Lexer.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 1b705331019b155f2138d4b9f5a5bd03ec59193d -Author: Hib Eris -Date: Sun Jun 8 17:07:15 2014 +0200 - - [glib] doc: Move poppler_date_parse to utility functions section - - https://bugs.freedesktop.org/show_bug.cgi?id=79798 - - glib/reference/poppler-docs.sgml | 1 + - glib/reference/poppler-sections.txt | 7 ++++++- - 2 files changed, 7 insertions(+), 1 deletion(-) - -commit d661553b0a13855aa5a1240e9c04a0e49dafd910 -Author: Hib Eris -Date: Sun Jun 8 16:11:26 2014 +0200 - - [glib] doc: Document PopplerFindFlags:POPPLER_FIND_DEFAULT - - Fixes warning: - DOC Building XML - ../../glib/poppler.h:157: warning: Value description for - PopplerFindFlags::POPPLER_FIND_DEFAULT is missing in source code - comment - block. - - https://bugs.freedesktop.org/show_bug.cgi?id=79798 - - glib/poppler.h | 1 + - 1 file changed, 1 insertion(+) - -commit 237a1402ab836d10eb5fdc1aa6ceccabea10a316 -Author: Hib Eris -Date: Sun Jun 8 16:07:14 2014 +0200 - - [glib] doc: Use instead of - - Fixes: - DOC Building HTML - Element em in namespace '' encountered in para, but no template - matches. - - https://bugs.freedesktop.org/show_bug.cgi?id=79798 - - glib/poppler-structure-element.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 66abf3992228be2559542e9d2753f45f06ae7728 -Author: Hib Eris -Date: Sun Jun 8 16:02:01 2014 +0200 - - [glib] doc: Add PopplerBackend documentation - - https://bugs.freedesktop.org/show_bug.cgi?id=79798 - - glib/poppler.h | 8 ++++++++ - 1 file changed, 8 insertions(+) - -commit a30ec8e4abe3875aad068c83265b47f9beea33d1 -Author: Hib Eris -Date: Sun Jun 8 15:05:52 2014 +0200 - - [glib] doc: Add missing POPPLER_TYPE_POINT - - And while we are here, also move poppler_point_get_type() and - poppler_quadrilateral_get_type() to private subsection. - - https://bugs.freedesktop.org/show_bug.cgi?id=79798 - - glib/reference/poppler-sections.txt | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -commit 6eb0537ac5163356c8e8f689d2408fa695e99423 -Author: Hib Eris -Date: Sun Jun 8 14:59:15 2014 +0200 - - [glib] doc: Fix typo - - https://bugs.freedesktop.org/show_bug.cgi?id=79798 - - glib/reference/poppler-sections.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 96adcad85d76409cb8ed4266a08ae776b42661e4 -Author: Hib Eris -Date: Sun Jun 8 14:53:42 2014 +0200 - - [glib] doc: Add poppler_annot_set_flags() to documentation - - https://bugs.freedesktop.org/show_bug.cgi?id=79798 - - glib/reference/poppler-sections.txt | 1 + - 1 file changed, 1 insertion(+) - -commit f3519352c70537009cc6bd660c0bd3e727db8b8a -Author: Hib Eris -Date: Sun Jun 8 14:38:13 2014 +0200 - - [glib] doc: Move PopplerFindFlags to PopplerPage section - - And also add the missing POPPLER_TYPE_FIND_FLAGS and - poppler_find_flags_get_type. - - https://bugs.freedesktop.org/show_bug.cgi?id=79798 - - glib/reference/poppler-sections.txt | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -commit 45b0d49330d9d089b2480b91e418924a490c82ce -Author: Hib Eris -Date: Sun Jun 8 14:22:28 2014 +0200 - - [glib] doc: Move PopplerPrintFlags to PopplerPage section - - https://bugs.freedesktop.org/show_bug.cgi?id=79798 - - glib/reference/poppler-sections.txt | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit ce357147d17004a2772ca3b32d106da511bba360 -Author: Hib Eris -Date: Sun Jun 8 13:22:51 2014 +0200 - - [glib] doc: Move poppler_get_{version, backend} documentation to - features section - - https://bugs.freedesktop.org/show_bug.cgi?id=79798 - - glib/reference/poppler-sections.txt | 15 +++++++++------ - 1 file changed, 9 insertions(+), 6 deletions(-) - -commit 1bfd6b69e7e98d4b3e6e891a46b58c9109b8c14c -Author: Hib Eris -Date: Sun Jun 8 12:57:25 2014 +0200 - - [glib] doc: Move PopplerColor documentation to it's own section - - https://bugs.freedesktop.org/show_bug.cgi?id=79798 - - glib/poppler-page.cc | 6 ++++++ - glib/reference/poppler-docs.sgml | 1 + - glib/reference/poppler-sections.txt | 21 +++++++++++++++------ - 3 files changed, 22 insertions(+), 6 deletions(-) - -commit 2dd9b95fd910023a7d9d23f2c2e41dcab91d3c31 -Merge: fed71ebd b36d27b4 -Author: Albert Astals Cid -Date: Fri Jun 6 21:43:49 2014 +0200 - - Merge remote-tracking branch 'origin/poppler-0.26' - -commit b36d27b42417d15866a5729409e39d6f7c2b0289 -Author: Hib Eris -Date: Fri Jun 6 21:42:10 2014 +0200 - - Fix typo in configure.ac - - Bug #79742 - - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit fed71ebd8e43e24eace9dcebe24bd318ff3d04a6 -Author: Hib Eris -Date: Thu May 29 13:22:05 2014 +0200 - - Change pagenum arguments in PDFDoc::markAnnotations from Guint to int - - Bug #79410 - Fixes compile warning: - - CXX PDFDoc.lo - PDFDoc.cc: In member function 'GBool PDFDoc::markAnnotations(Object*, - XRef*, XRef*, Guint, Guint, Guint)': - PDFDoc.cc:1607:40: warning: comparison between signed and unsigned - integer expressions [-Wsign-compare] - if (obj2.getRef().num == oldPageNum) { - ^ - PDFDoc.cc:1617:47: warning: comparison between signed and unsigned - integer expressions [-Wsign-compare] - } else if (obj2.getRef().num == newPageNum) { - - https://bugs.freedesktop.org/show_bug.cgi?id=79410 - - poppler/PDFDoc.cc | 4 ++-- - poppler/PDFDoc.h | 4 ++-- - 2 files changed, 4 insertions(+), 4 deletions(-) - -commit f5e702060a84362bfdf75260531920d4ba8b7333 -Author: Pino Toscano -Date: Sat May 24 15:59:42 2014 +0200 - - pdftohtml: exit with 0 with -v and -h - - utils/pdftohtml.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 700bf398ef7b20306f5035e423becfaa3d28fb10 -Author: Albert Astals Cid -Date: Fri May 23 20:05:41 2014 +0200 - - 0.26.1 - - CMakeLists.txt | 2 +- - NEWS | 12 ++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - qt4/src/Doxyfile | 2 +- - qt5/src/Doxyfile | 2 +- - 6 files changed, 17 insertions(+), 5 deletions(-) - -commit 93373cd113d046b65538fe983b46842d689a2112 -Author: Albert Astals Cid -Date: Sun May 11 18:31:10 2014 +0200 - - Qt: Add a new page->annotations() call that let's you specify subtypes - - This way we don't return annotations you may not be interested in - - qt4/src/poppler-annotation-private.h | 4 +-- - qt4/src/poppler-annotation.cc | 48 - ++++++++++++++++++++++++++++++++++-- - qt4/src/poppler-page.cc | 7 +++++- - qt4/src/poppler-qt4.h | 14 +++++++++++ - qt5/src/poppler-annotation-private.h | 4 +-- - qt5/src/poppler-annotation.cc | 48 - ++++++++++++++++++++++++++++++++++-- - qt5/src/poppler-page.cc | 7 +++++- - qt5/src/poppler-qt5.h | 15 +++++++++++ - 8 files changed, 137 insertions(+), 10 deletions(-) - -commit d2892cd893e4379914a08e66682ed5c423743a41 -Merge: 08442203 7e9fc61e -Author: Albert Astals Cid -Date: Wed May 7 22:27:41 2014 +0200 - - Merge remote-tracking branch 'origin/poppler-0.26' - -commit 7e9fc61e287889eefd6b08ef5991d31fed79cafd -Author: Albert Astals Cid -Date: Wed May 7 22:25:59 2014 +0200 - - Fix libopenjpeg 1.5 detection on some systems - - Someone somewhere decided the pc file will be called libopenjpeg1 - instead of libopenjpeg - - Bug #78389 - - configure.ac | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -commit 0844220347f984c3d9b04fe53e690ee0e8c74afe -Merge: 84278d8a 0a6c1ff7 -Author: Albert Astals Cid -Date: Wed May 7 21:56:07 2014 +0200 - - Merge remote-tracking branch 'origin/poppler-0.26' - -commit 0a6c1ff777aa23c7a5654b313b639e66600883b9 -Author: Thomas Freitag -Date: Wed May 7 21:54:46 2014 +0200 - - Only add annotations of the current page when splitting - - Bug #77549 - - poppler/PDFDoc.cc | 153 - +++++++++++++++++++++++++++++++++++++++++++++++++++++- - poppler/PDFDoc.h | 4 +- - utils/pdfunite.cc | 9 +++- - 3 files changed, 162 insertions(+), 4 deletions(-) - -commit 84278d8adbb1f6e9a28588fcb4db30c9ef70adde -Merge: 7b94b119 5b2cdef4 -Author: Albert Astals Cid -Date: Sun May 4 22:21:25 2014 +0200 - - Merge remote-tracking branch 'origin/poppler-0.26' - -commit 5b2cdef49a8a0a92fd323fbe45841a5098a42ece -Author: Olly Betts -Date: Sun May 4 22:20:30 2014 +0200 - - Fix extraction of text in some files - - Bug #78145 - - poppler/GfxFont.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 7b94b119f07713af7b8b9f1ac3ea3f1d35c1e240 -Merge: c859d2b8 bae836cd -Author: Albert Astals Cid -Date: Sun May 4 16:21:24 2014 +0200 - - Merge remote-tracking branch 'origin/poppler-0.26' - -commit bae836cd3dd3511ca9cf4745626142334bafd1a6 -Author: Marek Kasik -Date: Sun May 4 16:20:33 2014 +0200 - - Use field value V for radio buttons - - Turn on radio button only if its appearance state is equal to - the value - of name object "V" of the field. - - Bug #75979 - - poppler/Annot.cc | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -commit a748b3a059938e6ae98b51eb82bab7c33a5e23c7 -Author: Carlos Garcia Campos -Date: Wed Apr 30 09:25:31 2014 +0200 - - glib: Fix multiple definition of PopplerTextSpan - - https://bugs.freedesktop.org/show_bug.cgi?id=78103 - - glib/poppler-structure-element.h | 3 --- - 1 file changed, 3 deletions(-) - -commit c859d2b891a115c79d04db14463791dfb1c46a20 -Author: Carlos Garcia Campos -Date: Wed Apr 30 09:25:31 2014 +0200 - - glib: Fix multiple definition of PopplerTextSpan - - https://bugs.freedesktop.org/show_bug.cgi?id=78103 - - glib/poppler-structure-element.h | 3 --- - 1 file changed, 3 deletions(-) - -commit 9a68daee2b3c7f8a992ee47c0e9ac78b346d4348 -Author: Albert Astals Cid -Date: Fri Apr 25 01:01:08 2014 +0200 - - 0.26.0 - - CMakeLists.txt | 4 ++-- - NEWS | 13 +++++++++++++ - configure.ac | 4 ++-- - cpp/Doxyfile | 2 +- - qt4/src/Doxyfile | 2 +- - qt5/src/Doxyfile | 2 +- - 6 files changed, 20 insertions(+), 7 deletions(-) - -commit 8073852c84b71257d487aa8a46e441aa82f4b42c -Author: Fabio D'Urso -Date: Mon Apr 14 23:35:50 2014 +0200 - - qt: Fix missing ! in TextAnnotation::setInplaceIntent - - CID #16814 - - qt4/src/poppler-annotation.cc | 2 +- - qt5/src/poppler-annotation.cc | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit 1fbf98664c0879ac035a63602242a910c0c1d316 -Author: Albert Astals Cid -Date: Mon Apr 14 11:53:59 2014 +0200 - - Initialize tmpBufLen - - CID #16957 - - It isn't really needed since locateFont always returns a fontLoc - with a non null - path if fontLoc itself is not null, but it doesn't hurt either - - qt4/src/ArthurOutputDev.cc | 4 ++-- - qt5/src/ArthurOutputDev.cc | 4 ++-- - 2 files changed, 4 insertions(+), 4 deletions(-) - -commit b3e5c582a279b1b8d8309322ac3f4d0e51831f77 -Author: Albert Astals Cid -Date: Thu Apr 10 23:38:09 2014 +0200 - - Remove unused member - - cpp/poppler-font.cpp | 2 -- - 1 file changed, 2 deletions(-) - -commit b86f471c43e387cf873358cf3cbcd27470646713 -Author: Albert Astals Cid -Date: Thu Apr 10 22:50:56 2014 +0200 - - 0.25.3 - - CMakeLists.txt | 2 +- - NEWS | 19 +++++++++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - poppler/CairoOutputDev.cc | 2 +- - poppler/GfxFont.cc | 2 +- - qt4/src/Doxyfile | 2 +- - qt4/src/poppler-optcontent.cc | 2 +- - qt5/src/Doxyfile | 2 +- - qt5/src/poppler-optcontent.cc | 2 +- - qt5/src/poppler-private.cc | 2 +- - qt5/src/poppler-private.h | 2 +- - 12 files changed, 30 insertions(+), 11 deletions(-) - -commit 80107c72ac03bf4d00b2d71d6f947c139ea84ab5 -Author: Pino Toscano -Date: Sun Apr 6 20:17:31 2014 +0200 - - qt5: remove m_fontInfoIterator from Document - - it was used by the deprecated scanForFonts API, which was not provided - in poppler-qt5 - - qt5/src/poppler-private.cc | 2 -- - qt5/src/poppler-private.h | 2 -- - 2 files changed, 4 deletions(-) - -commit b8325316e41fb03eb5fac5c80d6a550fe9ce9695 -Author: Albert Astals Cid -Date: Sun Apr 6 16:05:51 2014 +0200 - - Fix memory leak - - CID #16943 - - utils/pdfseparate.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit ca9713118d6ce3fdd245f9ca4f595229a5be19c3 -Author: Albert Astals Cid -Date: Sun Apr 6 15:59:43 2014 +0200 - - Don't check twice for the same variable ^_^ - - CID #16804 - - splash/Splash.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 0ef290a7c5a8fa54d3fe0f646abdf098443a7a67 -Author: Albert Astals Cid -Date: Sun Apr 6 15:57:38 2014 +0200 - - Fix memory leak - - CID #16852 - - splash/Splash.cc | 2 ++ - 1 file changed, 2 insertions(+) - -commit 8810b8917fded340b784873a91ca025b0bb49f3d -Author: Albert Astals Cid -Date: Sun Apr 6 15:49:18 2014 +0200 - - Fix Out-of-bounds read - - CID #16844 - - poppler/PageLabelInfo_p.h | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -commit 9309907673e8557a25021dce79d9b4354640e2d0 -Author: Albert Astals Cid -Date: Sun Apr 6 15:35:00 2014 +0200 - - Fix memory leak - - Don't pass new'ed GooStrings as parameters to error() - - CID #16915 - - poppler/GfxFont.cc | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -commit a511005584a38217fed582ced6ce2c937526cf96 -Author: Albert Astals Cid -Date: Sun Apr 6 15:28:50 2014 +0200 - - Fix Uninitialized pointer read when nFucnsA is 0 - - CID #16965 - - poppler/GfxState.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 26b961a64030d91c5db2769dcd0ab8dff7b9b6a6 -Author: Albert Astals Cid -Date: Sun Apr 6 15:23:35 2014 +0200 - - gfree -> delete since it was new'ed - - CID #16786 - - poppler/JBIG2Stream.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 814ac2230b594cce3b871588804dd92f4a187e7e -Author: Albert Astals Cid -Date: Sun Apr 6 15:22:13 2014 +0200 - - delete -> gfree since it was gmaloced - - CID #16785 - - poppler/JBIG2Stream.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit b496b6665803247b10b018ae939a2a452fa4a48f -Author: Albert Astals Cid -Date: Sun Apr 6 15:17:50 2014 +0200 - - Fix memory leak - - CID #16864 - - poppler/SplashOutputDev.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 1b612f355e9f29fa93c15a9de1188049a8e086b6 -Author: Albert Astals Cid -Date: Sun Apr 6 15:14:50 2014 +0200 - - Fix memory leak - - CID #16853 - - poppler/XRef.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 07621ebbda8ab85cf4cd76a6092efc67aa14454d -Merge: 8d3a2c9d 9fcd46ac -Author: Pino Toscano -Date: Sat Apr 5 15:49:31 2014 +0200 - - Merge remote-tracking branch 'origin/poppler-0.24' - -commit 9fcd46ac4a94f138981ec5afaab3875918c6a175 -Author: Pino Toscano -Date: Sat Apr 5 15:48:27 2014 +0200 - - qt4/qt5: remove extra qDebug - - qt4/src/poppler-optcontent.cc | 1 - - qt5/src/poppler-optcontent.cc | 1 - - 2 files changed, 2 deletions(-) - -commit 37286ee2923de060ae463ac6b178ffd0e6096b90 -Author: Pino Toscano -Date: Sat Apr 5 15:46:44 2014 +0200 - - qt4/qt5: fix some kinds of OCG models - - properly pass parent and child when building the tree - - qt4/src/poppler-optcontent.cc | 2 +- - qt5/src/poppler-optcontent.cc | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit 8d3a2c9d007052bcb8719200760a1abb6314f804 -Author: Peter Breitenlohner -Date: Sun Mar 30 23:34:23 2014 +0200 - - Avoid MinGW/Cygwin warnings due to redefinition of NOMINMAX - - goo/GooMutex.h | 3 +++ - goo/GooTimer.h | 5 ++++- - goo/gfile.h | 5 ++++- - poppler/XpdfPluginAPI.h | 3 +++ - 4 files changed, 14 insertions(+), 2 deletions(-) - -commit 38dcaf96f308265ff6958e4683bcec2be0c254b9 -Author: Adrian Johnson -Date: Fri Mar 28 20:49:17 2014 +1030 - - cairo: fix segv cause by bad image stream - - bug 76445 - - poppler/CairoOutputDev.cc | 10 +++++++++- - 1 file changed, 9 insertions(+), 1 deletion(-) - -commit 07b0a038b194eb0392a1e9a4236064d37247d687 -Author: Jakub Wilk -Date: Sun Mar 30 16:12:28 2014 +0200 - - pdftohtml: Fix typo in manpage - - utils/pdftohtml.1 | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit ac3c8303396a0b8de5e4ad32f480b8da5f3b396e -Author: Thomas Liebetraut -Date: Sun Mar 30 12:25:26 2014 +0200 - - glib: Fix the first coord of the qudrilateral in - create_poppler_quads_from_annot_quads() - - https://bugs.freedesktop.org/show_bug.cgi?id=76504 - - glib/poppler-annot.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 82d69da7c2f67e774c51fb7b146fdf639a6b9616 -Author: Albert Astals Cid -Date: Fri Mar 28 15:53:22 2014 +0100 - - Fix error reported by ASAN in 3628.asan.0.3910.pdf - - ==20743== ERROR: AddressSanitizer: heap-buffer-overflow on - address 0x60040005c6ef at pc 0x7f8912ca0c90 bp 0x7fff8509ee20 sp - 0x7fff8509ee18 - READ of size 1 at 0x60040005c6ef thread T0 - #0 0x7f8912ca0c8f in expandRow(unsigned char*, unsigned char*, - int, int, int) /home/tsdgeos/devel/poppler/splash/Splash.cc:4855 - #1 0x7f8912ca1097 in Splash::scaleImageYuXuBilinear(bool - (*)(void*, unsigned char*, unsigned char*), void*, - SplashColorMode, int, bool, int, int, int, int, SplashBitmap*) - /home/tsdgeos/devel/poppler/splash/Splash.cc:4897 - #2 0x7f8912c9d2b7 in Splash::scaleImage(bool - (*)(void*, unsigned char*, unsigned char*), void*, - SplashColorMode, int, bool, int, int, int, int, bool, bool) - /home/tsdgeos/devel/poppler/splash/Splash.cc:4127 - #3 0x7f8912c98101 in Splash::drawImage(bool - (*)(void*, unsigned char*, unsigned char*), void*, - SplashColorMode, bool, int, int, double*, bool, bool) - /home/tsdgeos/devel/poppler/splash/Splash.cc:3726 - #4 0x7f8912c7056a in - SplashOutputDev::drawSoftMaskedImage(GfxState*, - Object*, Stream*, int, int, GfxImageColorMap*, - bool, Stream*, int, int, GfxImageColorMap*, bool) - /home/tsdgeos/devel/poppler/poppler/SplashOutputDev.cc:3630 - #5 0x7f8912ac7aa7 in Gfx::doImage(Object*, Stream*, bool) - /home/tsdgeos/devel/poppler/poppler/Gfx.cc:4646 - #6 0x7f8912ac4de0 in Gfx::opXObject(Object*, int) - /home/tsdgeos/devel/poppler/poppler/Gfx.cc:4179 - #7 0x7f8912a9f33a in Gfx::execOp(Object*, Object*, int) - /home/tsdgeos/devel/poppler/poppler/Gfx.cc:903 - #8 0x7f8912a9e50f in Gfx::go(bool) - /home/tsdgeos/devel/poppler/poppler/Gfx.cc:762 - #9 0x7f8912a9e163 in Gfx::display(Object*, bool) - /home/tsdgeos/devel/poppler/poppler/Gfx.cc:728 - #10 0x7f8912b80e13 in Page::displaySlice(OutputDev*, double, - double, int, bool, bool, int, int, int, int, bool, bool - (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) - /home/tsdgeos/devel/poppler/poppler/Page.cc:585 - #11 0x7f8912b8833f in PDFDoc::displayPageSlice(OutputDev*, - int, double, double, int, bool, bool, bool, int, int, int, int, - bool (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) - /home/tsdgeos/devel/poppler/poppler/PDFDoc.cc:503 - #12 0x40311e in savePageSlice(PDFDoc*, SplashOutputDev*, - int, int, int, int, int, double, double, char*) - /home/tsdgeos/devel/poppler/utils/pdftoppm.cc:222 - #13 0x404416 in main - /home/tsdgeos/devel/poppler/utils/pdftoppm.cc:521 - #14 0x7f89121a8ec4 (/lib/x86_64-linux-gnu/libc.so.6+0x21ec4) - #15 0x401d58 in _start - (/home/tsdgeos/devel/poppler/build-debug/utils/pdftoppm+0x401d58) - - splash/Splash.cc | 3 +++ - 1 file changed, 3 insertions(+) - -commit 38ec8cbeeaf69d96b9d7bcd662187c8916cf7903 -Author: Albert Astals Cid -Date: Fri Mar 28 11:18:02 2014 +0100 - - Fix error reported by ASAN in 5782.asan.0.7113.pdf - - ==32161== ERROR: AddressSanitizer: heap-buffer-overflow on - address 0x6008000e3bcf at pc 0x7f66bae0e117 bp 0x7fffcb54ea70 sp - 0x7fffcb54ea68 - READ of size 1 at 0x6008000e3bcf thread T0 - #0 0x7f66bae0e116 in GooString::getChar(int) - /home/tsdgeos/devel/poppler/goo/GooString.h:119 - #1 0x7f66bafb5dca in LinkURI::LinkURI(Object*, GooString*) - /home/tsdgeos/devel/poppler/poppler/Link.cc:562 - #2 0x7f66bafb2a05 in LinkAction::parseAction(Object*, GooString*) - /home/tsdgeos/devel/poppler/poppler/Link.cc:98 - #3 0x7f66bae69c0e in AnnotLink::initialize(PDFDoc*, Dict*) - /home/tsdgeos/devel/poppler/poppler/Annot.cc:2621 - #4 0x7f66bae698d9 in AnnotLink::AnnotLink(PDFDoc*, Dict*, Object*) - /home/tsdgeos/devel/poppler/poppler/Annot.cc:2596 - #5 0x7f66bae8d998 in Annots::createAnnot(Dict*, Object*) - /home/tsdgeos/devel/poppler/poppler/Annot.cc:6737 - #6 0x7f66bae8d269 in Annots::Annots(PDFDoc*, int, Object*) - /home/tsdgeos/devel/poppler/poppler/Annot.cc:6683 - #7 0x7f66bafc750d in Page::getAnnots(XRef*) - /home/tsdgeos/devel/poppler/poppler/Page.cc:402 - #8 0x7f66bafc8e66 in Page::displaySlice(OutputDev*, double, - double, int, bool, bool, int, int, int, int, bool, bool - (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) - /home/tsdgeos/devel/poppler/poppler/Page.cc:595 - #9 0x7f66bafd02fd in PDFDoc::displayPageSlice(OutputDev*, int, - double, double, int, bool, bool, bool, int, int, int, int, - bool (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) - /home/tsdgeos/devel/poppler/poppler/PDFDoc.cc:503 - #10 0x40311e in savePageSlice(PDFDoc*, SplashOutputDev*, - int, int, int, int, int, double, double, char*) - /home/tsdgeos/devel/poppler/utils/pdftoppm.cc:222 - #11 0x404416 in main - /home/tsdgeos/devel/poppler/utils/pdftoppm.cc:521 - #12 0x7f66ba5f0ec4 (/lib/x86_64-linux-gnu/libc.so.6+0x21ec4) - #13 0x401d58 in _start - (/home/tsdgeos/devel/poppler/build-debug/utils/pdftoppm+0x401d58) - - poppler/Link.cc | 10 ++++++---- - 1 file changed, 6 insertions(+), 4 deletions(-) - -commit 49b4eb68ee646aefe49b70f9e2831ebf93576053 -Author: Albert Astals Cid -Date: Fri Mar 28 11:08:18 2014 +0100 - - Fix error reported by ASAN in 590.asan.0.7288.pdf - - ==31898== ERROR: AddressSanitizer: heap-use-after-free on - address 0x60ae0007432c at pc 0x7f03483026aa bp 0x7fff6ec0c820 sp - 0x7fff6ec0c818 - READ of size 4 at 0x60ae0007432c thread T0 - #0 0x7f03483026a9 in SplashFTFont::getGlyphPath(int) - /home/tsdgeos/devel/poppler/splash/SplashFTFont.cc:414 - #1 0x7f034829f681 in SplashOutputDev::drawChar(GfxState*, - double, double, double, double, double, - double, unsigned int, int, unsigned int*, int) - /home/tsdgeos/devel/poppler/poppler/SplashOutputDev.cc:2239 - #2 0x7f0348100599 in Gfx::doShowText(GooString*) - /home/tsdgeos/devel/poppler/poppler/Gfx.cc:4054 - #3 0x7f03480fddb0 in Gfx::opShowSpaceText(Object*, int) - /home/tsdgeos/devel/poppler/poppler/Gfx.cc:3886 - #4 0x7f03480dc33a in Gfx::execOp(Object*, Object*, int) - /home/tsdgeos/devel/poppler/poppler/Gfx.cc:903 - #5 0x7f03480db50f in Gfx::go(bool) - /home/tsdgeos/devel/poppler/poppler/Gfx.cc:762 - #6 0x7f03480db163 in Gfx::display(Object*, bool) - /home/tsdgeos/devel/poppler/poppler/Gfx.cc:728 - #7 0x7f03481bddd1 in Page::displaySlice(OutputDev*, double, - double, int, bool, bool, int, int, int, int, bool, bool - (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) - /home/tsdgeos/devel/poppler/poppler/Page.cc:585 - #8 0x7f03481c52fd in PDFDoc::displayPageSlice(OutputDev*, int, - double, double, int, bool, bool, bool, int, int, int, int, - bool (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) - /home/tsdgeos/devel/poppler/poppler/PDFDoc.cc:503 - #9 0x40311e in savePageSlice(PDFDoc*, SplashOutputDev*, - int, int, int, int, int, double, double, char*) - /home/tsdgeos/devel/poppler/utils/pdftoppm.cc:222 - #10 0x404416 in main - /home/tsdgeos/devel/poppler/utils/pdftoppm.cc:521 - #11 0x7f03477e5ec4 (/lib/x86_64-linux-gnu/libc.so.6+0x21ec4) - #12 0x401d58 in _start - (/home/tsdgeos/devel/poppler/build-debug/utils/pdftoppm+0x401d58) - - splash/SplashFTFont.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 89a64b508e5f8445798c95fcec6c87180f6c9b73 -Author: Albert Astals Cid -Date: Fri Mar 28 00:35:17 2014 +0100 - - Fix error reported by ASAN in 2279.asan.0.1904.pdf - - ==20507== ERROR: AddressSanitizer: heap-buffer-overflow on - address 0x60420000ff04 at pc 0x7fa1492e8012 bp 0x7fff8406d900 sp - 0x7fff8406d8f8 - READ of size 4 at 0x60420000ff04 thread T0 - #0 0x7fa1492e8011 in SplashFTFont::makeGlyph(int, int, int, - SplashGlyphBitmap*, int, int, SplashClip*, SplashClipResult*) - /home/tsdgeos/devel/poppler/splash/SplashFTFont.cc:284 - #1 0x7fa1492eda32 in SplashFont::getGlyph(int, int, int, - SplashGlyphBitmap*, int, int, SplashClip*, SplashClipResult*) - /home/tsdgeos/devel/poppler/splash/SplashFont.cc:168 - #2 0x7fa1492e7c69 in SplashFTFont::getGlyph(int, int, int, - SplashGlyphBitmap*, int, int, SplashClip*, SplashClipResult*) - /home/tsdgeos/devel/poppler/splash/SplashFTFont.cc:233 - #3 0x7fa1492b3368 in Splash::fillChar(double, double, int, - SplashFont*) /home/tsdgeos/devel/poppler/splash/Splash.cc:2714 - #4 0x7fa149286a20 in SplashOutputDev::drawChar(GfxState*, - double, double, double, double, double, - double, unsigned int, int, unsigned int*, int) - /home/tsdgeos/devel/poppler/poppler/SplashOutputDev.cc:2270 - #5 0x7fa1490e7599 in Gfx::doShowText(GooString*) - /home/tsdgeos/devel/poppler/poppler/Gfx.cc:4054 - #6 0x7fa1490e4db0 in Gfx::opShowSpaceText(Object*, int) - /home/tsdgeos/devel/poppler/poppler/Gfx.cc:3886 - #7 0x7fa1490c333a in Gfx::execOp(Object*, Object*, int) - /home/tsdgeos/devel/poppler/poppler/Gfx.cc:903 - #8 0x7fa1490c250f in Gfx::go(bool) - /home/tsdgeos/devel/poppler/poppler/Gfx.cc:762 - #9 0x7fa1490c2163 in Gfx::display(Object*, bool) - /home/tsdgeos/devel/poppler/poppler/Gfx.cc:728 - #10 0x7fa1491a4dd1 in Page::displaySlice(OutputDev*, double, - double, int, bool, bool, int, int, int, int, bool, bool - (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) - /home/tsdgeos/devel/poppler/poppler/Page.cc:585 - #11 0x7fa1491ac2fd in PDFDoc::displayPageSlice(OutputDev*, - int, double, double, int, bool, bool, bool, int, int, int, int, - bool (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) - /home/tsdgeos/devel/poppler/poppler/PDFDoc.cc:503 - #12 0x40311e in savePageSlice(PDFDoc*, SplashOutputDev*, - int, int, int, int, int, double, double, char*) - /home/tsdgeos/devel/poppler/utils/pdftoppm.cc:222 - #13 0x404416 in main - /home/tsdgeos/devel/poppler/utils/pdftoppm.cc:521 - #14 0x7fa1487ccec4 (/lib/x86_64-linux-gnu/libc.so.6+0x21ec4) - #15 0x401d58 in _start - (/home/tsdgeos/devel/poppler/build-debug/utils/pdftoppm+0x401d58) - - splash/SplashFTFont.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 5055479634dc8d0cd5afb3373de600fb121357fe -Author: Albert Astals Cid -Date: Thu Mar 27 23:54:20 2014 +0100 - - Fix error reported by ASAN in 2010.asan.0.1506.pdf - - ==18859== ERROR: AddressSanitizer: unknown-crash on address - 0x7f1e4a6beb50 at pc 0x7f1e5557444d bp 0x7fff6af3c340 sp - 0x7fff6af3bb00 - WRITE of size 442216446 at 0x7f1e4a6beb50 thread T0 - #0 0x7f1e5557444c (/usr/lib/x86_64-linux-gnu/libasan.so.0+0xe44c) - #1 0x7f1e550e04ff in SplashFont::getGlyph(int, int, int, - SplashGlyphBitmap*, int, int, SplashClip*, SplashClipResult*) - /home/tsdgeos/devel/poppler/splash/SplashFont.cc:206 - #2 0x7f1e550d9c69 in SplashFTFont::getGlyph(int, int, int, - SplashGlyphBitmap*, int, int, SplashClip*, SplashClipResult*) - /home/tsdgeos/devel/poppler/splash/SplashFTFont.cc:233 - #3 0x7f1e550a5368 in Splash::fillChar(double, double, int, - SplashFont*) /home/tsdgeos/devel/poppler/splash/Splash.cc:2714 - #4 0x7f1e55078a20 in SplashOutputDev::drawChar(GfxState*, - double, double, double, double, double, - double, unsigned int, int, unsigned int*, int) - /home/tsdgeos/devel/poppler/poppler/SplashOutputDev.cc:2270 - #5 0x7f1e54ed9599 in Gfx::doShowText(GooString*) - /home/tsdgeos/devel/poppler/poppler/Gfx.cc:4054 - #6 0x7f1e54ed6db0 in Gfx::opShowSpaceText(Object*, int) - /home/tsdgeos/devel/poppler/poppler/Gfx.cc:3886 - #7 0x7f1e54eb533a in Gfx::execOp(Object*, Object*, int) - /home/tsdgeos/devel/poppler/poppler/Gfx.cc:903 - #8 0x7f1e54eb450f in Gfx::go(bool) - /home/tsdgeos/devel/poppler/poppler/Gfx.cc:762 - #9 0x7f1e54eb4163 in Gfx::display(Object*, bool) - /home/tsdgeos/devel/poppler/poppler/Gfx.cc:728 - #10 0x7f1e54f96dd1 in Page::displaySlice(OutputDev*, double, - double, int, bool, bool, int, int, int, int, bool, bool - (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) - /home/tsdgeos/devel/poppler/poppler/Page.cc:585 - #11 0x7f1e54f9e2fd in PDFDoc::displayPageSlice(OutputDev*, - int, double, double, int, bool, bool, bool, int, int, int, int, - bool (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) - /home/tsdgeos/devel/poppler/poppler/PDFDoc.cc:503 - #12 0x40311e in savePageSlice(PDFDoc*, SplashOutputDev*, - int, int, int, int, int, double, double, char*) - /home/tsdgeos/devel/poppler/utils/pdftoppm.cc:222 - #13 0x404416 in main - /home/tsdgeos/devel/poppler/utils/pdftoppm.cc:521 - #14 0x7f1e545beec4 (/lib/x86_64-linux-gnu/libc.so.6+0x21ec4) - #15 0x401d58 in _start - (/home/tsdgeos/devel/poppler/build-debug/utils/pdftoppm+0x401d58) - - splash/SplashFont.cc | 13 +++++++++---- - 1 file changed, 9 insertions(+), 4 deletions(-) - -commit 3e7779935ec2610410bc4a42e9b0174e41ca9672 -Author: Albert Astals Cid -Date: Thu Mar 27 16:49:57 2014 +0100 - - Fix error reported by ASAN in 139.asan.0.581.pdf - - ==15244== ERROR: AddressSanitizer: SEGV on unknown address - 0x605df000f3ee (pc 0x7f1087b3a22e sp 0x7fffec30ff20 bp 0x7fffec30ff80 - T0) - AddressSanitizer can not provide additional info. - #0 0x7f1087b3a22d - (/home/tsdgeos/devel/poppler/build-debug/libpoppler.so.46.0.0+0x48f22d) - #1 0x7f1087b19d92 - (/home/tsdgeos/devel/poppler/build-debug/libpoppler.so.46.0.0+0x46ed92) - #2 0x7f1087ae570b - (/home/tsdgeos/devel/poppler/build-debug/libpoppler.so.46.0.0+0x43a70b) - #3 0x7f1087ae4061 - (/home/tsdgeos/devel/poppler/build-debug/libpoppler.so.46.0.0+0x439061) - #4 0x7f1087ab9b38 - (/home/tsdgeos/devel/poppler/build-debug/libpoppler.so.46.0.0+0x40eb38) - #5 0x7f1087900989 - (/home/tsdgeos/devel/poppler/build-debug/libpoppler.so.46.0.0+0x255989) - #6 0x7f10878f733a - (/home/tsdgeos/devel/poppler/build-debug/libpoppler.so.46.0.0+0x24c33a) - #7 0x7f10878f650f - (/home/tsdgeos/devel/poppler/build-debug/libpoppler.so.46.0.0+0x24b50f) - #8 0x7f10878f6163 - (/home/tsdgeos/devel/poppler/build-debug/libpoppler.so.46.0.0+0x24b163) - #9 0x7f10879d8dd1 - (/home/tsdgeos/devel/poppler/build-debug/libpoppler.so.46.0.0+0x32ddd1) - #10 0x7f10879e02fd - (/home/tsdgeos/devel/poppler/build-debug/libpoppler.so.46.0.0+0x3352fd) - #11 0x40311e - (/home/tsdgeos/devel/poppler/build-debug/utils/pdftoppm+0x40311e) - #12 0x404416 - (/home/tsdgeos/devel/poppler/build-debug/utils/pdftoppm+0x404416) - #13 0x7f1087000ec4 (/lib/x86_64-linux-gnu/libc-2.19.so+0x21ec4) - #14 0x401d58 - (/home/tsdgeos/devel/poppler/build-debug/utils/pdftoppm+0x401d58) - - splash/SplashXPathScanner.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 23ad7fa5253a4fec6543d1435827aa1b59b62ced -Author: Albert Astals Cid -Date: Thu Mar 27 01:14:05 2014 +0100 - - 0.25.2 - - CMakeLists.txt | 4 ++-- - NEWS | 48 - +++++++++++++++++++++++++++++++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - gtk-doc.make | 33 +++++++++++++++++++--------- - m4/gtk-doc.m4 | 47 - +++++++++++++++++++++++++++------------- - poppler/CairoOutputDev.h | 2 +- - poppler/Hints.cc | 2 +- - poppler/Makefile.am | 2 +- - poppler/PSOutputDev.cc | 3 ++- - poppler/PSOutputDev.h | 2 +- - poppler/StructElement.cc | 2 +- - poppler/StructElement.h | 2 +- - poppler/StructTreeRoot.cc | 2 +- - poppler/StructTreeRoot.h | 2 +- - qt4/src/CMakeLists.txt | 2 +- - qt4/src/Doxyfile | 2 +- - qt4/src/Makefile.am | 2 +- - qt4/src/poppler-ps-converter.cc | 1 + - qt5/src/CMakeLists.txt | 2 +- - qt5/src/Doxyfile | 2 +- - qt5/src/Makefile.am | 2 +- - qt5/src/poppler-ps-converter.cc | 1 + - utils/pdftocairo.cc | 2 +- - utils/pdftops.cc | 1 + - 25 files changed, 127 insertions(+), 45 deletions(-) - -commit ec2f8bca9f48935d3180dab65ef2ca455a893afd -Author: Albert Astals Cid -Date: Wed Mar 26 18:38:13 2014 +0100 - - Fix overflow malloc - - poppler/Stream.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 322e416451b7b33cba8fb3d4702207693c3c7921 -Author: Albert Astals Cid -Date: Wed Mar 26 17:58:48 2014 +0100 - - Fix error reported by ASAN in 1195.asan.0.293.pdf - - ==31060== ERROR: AddressSanitizer: heap-buffer-overflow on - address 0x60040002a215 at pc 0x7f5614cd96c4 bp 0x7fff54a44050 sp - 0x7fff54a44048 - READ of size 1 at 0x60040002a215 thread T0 - #0 0x7f5614cd96c3 in JBIG2Stream::readGenericBitmap(bool, - int, int, int, bool, bool, JBIG2Bitmap*, int*, int*, int) - /home/tsdgeos/devel/poppler/poppler/JBIG2Stream.cc:3389 - #1 0x7f5614cce0e7 in JBIG2Stream::readSymbolDictSeg(unsigned - int, unsigned int, unsigned int*, unsigned int) - /home/tsdgeos/devel/poppler/poppler/JBIG2Stream.cc:1867 - #2 0x7f5614ccb8fe in JBIG2Stream::readSegments() - /home/tsdgeos/devel/poppler/poppler/JBIG2Stream.cc:1408 - #3 0x7f5614cca72e in JBIG2Stream::reset() - /home/tsdgeos/devel/poppler/poppler/JBIG2Stream.cc:1248 - #4 0x7f5614d1648b in ImageStream::reset() - /home/tsdgeos/devel/poppler/poppler/Stream.cc:484 - #5 0x7f5614de6578 in SplashOutputDev::drawImage(GfxState*, - Object*, Stream*, int, int, GfxImageColorMap*, bool, int*, bool) - /home/tsdgeos/devel/poppler/poppler/SplashOutputDev.cc:3158 - #6 0x7f5614c41d64 in Gfx::doImage(Object*, Stream*, bool) - /home/tsdgeos/devel/poppler/poppler/Gfx.cc:4653 - #7 0x7f5614c3ede0 in Gfx::opXObject(Object*, int) - /home/tsdgeos/devel/poppler/poppler/Gfx.cc:4179 - #8 0x7f5614c1933a in Gfx::execOp(Object*, Object*, int) - /home/tsdgeos/devel/poppler/poppler/Gfx.cc:903 - #9 0x7f5614c1850f in Gfx::go(bool) - /home/tsdgeos/devel/poppler/poppler/Gfx.cc:762 - #10 0x7f5614c18163 in Gfx::display(Object*, bool) - /home/tsdgeos/devel/poppler/poppler/Gfx.cc:728 - #11 0x7f5614cfae27 in Page::displaySlice(OutputDev*, double, - double, int, bool, bool, int, int, int, int, bool, bool - (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) - /home/tsdgeos/devel/poppler/poppler/Page.cc:585 - #12 0x7f5614d02353 in PDFDoc::displayPageSlice(OutputDev*, - int, double, double, int, bool, bool, bool, int, int, int, int, - bool (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) - /home/tsdgeos/devel/poppler/poppler/PDFDoc.cc:503 - #13 0x40311e in savePageSlice(PDFDoc*, SplashOutputDev*, - int, int, int, int, int, double, double, char*) - /home/tsdgeos/devel/poppler/utils/pdftoppm.cc:222 - #14 0x404416 in main - /home/tsdgeos/devel/poppler/utils/pdftoppm.cc:521 - #15 0x7f5614322ec4 (/lib/x86_64-linux-gnu/libc.so.6+0x21ec4) - #16 0x401d58 in _start - (/home/tsdgeos/devel/poppler/build-debug/utils/pdftoppm+0x401d58) - - poppler/JBIG2Stream.cc | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -commit 225232f6f070d17d8570108ffe39ffd4350fc6e8 -Author: Albert Astals Cid -Date: Wed Mar 26 15:00:09 2014 +0100 - - Fix error reported by ASAN in 6609.asan.0.8343.pdf - - ==8470== ERROR: AddressSanitizer: heap-buffer-overflow on - address 0x7f3b12f7b5e1 at pc 0x7f3b0f915f5e bp 0x7fff47842de0 sp - 0x7fff47842dd8 - READ of size 1 at 0x7f3b12f7b5e1 thread T0 - #0 0x7f3b0f915f5d in JBIG2Stream::readGenericBitmap(bool, - int, int, int, bool, bool, JBIG2Bitmap*, int*, int*, int) - /home/tsdgeos/devel/poppler/poppler/JBIG2Stream.cc:3628 - #1 0x7f3b0f910558 in JBIG2Stream::readGenericRegionSeg(unsigned - int, bool, bool, unsigned int) - /home/tsdgeos/devel/poppler/poppler/JBIG2Stream.cc:2849 - #2 0x7f3b0f906b33 in JBIG2Stream::readSegments() - /home/tsdgeos/devel/poppler/poppler/JBIG2Stream.cc:1443 - #3 0x7f3b0f90572e in JBIG2Stream::reset() - /home/tsdgeos/devel/poppler/poppler/JBIG2Stream.cc:1248 - #4 0x7f3b0f951459 in ImageStream::reset() - /home/tsdgeos/devel/poppler/poppler/Stream.cc:484 - #5 0x7f3b0fa21546 in SplashOutputDev::drawImage(GfxState*, - Object*, Stream*, int, int, GfxImageColorMap*, bool, int*, bool) - /home/tsdgeos/devel/poppler/poppler/SplashOutputDev.cc:3158 - #6 0x7f3b0f87cd64 in Gfx::doImage(Object*, Stream*, bool) - /home/tsdgeos/devel/poppler/poppler/Gfx.cc:4653 - #7 0x7f3b0f879de0 in Gfx::opXObject(Object*, int) - /home/tsdgeos/devel/poppler/poppler/Gfx.cc:4179 - #8 0x7f3b0f85433a in Gfx::execOp(Object*, Object*, int) - /home/tsdgeos/devel/poppler/poppler/Gfx.cc:903 - #9 0x7f3b0f85350f in Gfx::go(bool) - /home/tsdgeos/devel/poppler/poppler/Gfx.cc:762 - #10 0x7f3b0f853163 in Gfx::display(Object*, bool) - /home/tsdgeos/devel/poppler/poppler/Gfx.cc:728 - #11 0x7f3b0f935df5 in Page::displaySlice(OutputDev*, double, - double, int, bool, bool, int, int, int, int, bool, bool - (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) - /home/tsdgeos/devel/poppler/poppler/Page.cc:585 - #12 0x7f3b0f93d321 in PDFDoc::displayPageSlice(OutputDev*, - int, double, double, int, bool, bool, bool, int, int, int, int, - bool (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) - /home/tsdgeos/devel/poppler/poppler/PDFDoc.cc:503 - #13 0x40311e in savePageSlice(PDFDoc*, SplashOutputDev*, - int, int, int, int, int, double, double, char*) - /home/tsdgeos/devel/poppler/utils/pdftoppm.cc:222 - #14 0x404416 in main - /home/tsdgeos/devel/poppler/utils/pdftoppm.cc:521 - #15 0x7f3b0ef5dec4 (/lib/x86_64-linux-gnu/libc.so.6+0x21ec4) - #16 0x401d58 in _start - (/home/tsdgeos/devel/poppler/build-debug/utils/pdftoppm+0x401d58) - - poppler/JBIG2Stream.cc | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -commit 216890f1f147b25643e0d6e18e361d4d34b6c332 -Author: Albert Astals Cid -Date: Wed Mar 26 12:19:42 2014 +0100 - - Fix error reported by ASAN in 6760.asan.0.8568.pdf - - ==26566== ERROR: AddressSanitizer: SEGV on unknown address - 0x7fffbc3e5ea8 (pc 0x7fe1fa858db1 sp 0x7fffc788eb30 bp 0x7fffc788eb40 - T0) - AddressSanitizer can not provide additional info. - #0 0x7fe1fa858db0 in PSStack::index(int) - /home/tsdgeos/devel/poppler/poppler/Function.cc:1067 - #1 0x7fe1fa856fd6 in PostScriptFunction::exec(PSStack*, int) - /home/tsdgeos/devel/poppler/poppler/Function.cc:1621 - #2 0x7fe1fa854c10 in PostScriptFunction::transform(double*, - double*) /home/tsdgeos/devel/poppler/poppler/Function.cc:1266 - #3 0x7fe1fa854097 in - PostScriptFunction::PostScriptFunction(Object*, Dict*) - /home/tsdgeos/devel/poppler/poppler/Function.cc:1216 - #4 0x7fe1fa84a0c2 in Function::parse(Object*, - std::set, std::allocator >*) - /home/tsdgeos/devel/poppler/poppler/Function.cc:98 - #5 0x7fe1fa849e3c in Function::parse(Object*) - /home/tsdgeos/devel/poppler/poppler/Function.cc:63 - #6 0x7fe1fa8c1d8c in GfxDeviceNColorSpace::parse(Array*, - OutputDev*, GfxState*, int) - /home/tsdgeos/devel/poppler/poppler/GfxState.cc:2978 - #7 0x7fe1fa8a6fb7 in GfxColorSpace::parse(Object*, - OutputDev*, GfxState*, int) - /home/tsdgeos/devel/poppler/poppler/GfxState.cc:328 - #8 0x7fe1fa88440f in Gfx::doImage(Object*, Stream*, bool) - /home/tsdgeos/devel/poppler/poppler/Gfx.cc:4403 - #9 0x7fe1fa882d6c in Gfx::opXObject(Object*, int) - /home/tsdgeos/devel/poppler/poppler/Gfx.cc:4179 - #10 0x7fe1fa85d2c6 in Gfx::execOp(Object*, Object*, int) - /home/tsdgeos/devel/poppler/poppler/Gfx.cc:903 - #11 0x7fe1fa85c49b in Gfx::go(bool) - /home/tsdgeos/devel/poppler/poppler/Gfx.cc:762 - #12 0x7fe1fa85c0ef in Gfx::display(Object*, bool) - /home/tsdgeos/devel/poppler/poppler/Gfx.cc:728 - #13 0x7fe1fa93ed81 in Page::displaySlice(OutputDev*, double, - double, int, bool, bool, int, int, int, int, bool, bool - (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) - /home/tsdgeos/devel/poppler/poppler/Page.cc:585 - #14 0x7fe1fa9462ad in PDFDoc::displayPageSlice(OutputDev*, - int, double, double, int, bool, bool, bool, int, int, int, int, - bool (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) - /home/tsdgeos/devel/poppler/poppler/PDFDoc.cc:503 - #15 0x40311e in savePageSlice(PDFDoc*, SplashOutputDev*, - int, int, int, int, int, double, double, char*) - /home/tsdgeos/devel/poppler/utils/pdftoppm.cc:222 - #16 0x404416 in main - /home/tsdgeos/devel/poppler/utils/pdftoppm.cc:521 - #17 0x7fe1f9f66ec4 (/lib/x86_64-linux-gnu/libc.so.6+0x21ec4) - #18 0x401d58 in _start - (/home/tsdgeos/devel/poppler/build-debug/utils/pdftoppm+0x401d58) - - poppler/Function.cc | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -commit fb7d91435c71603697b652c70cfa76dd595ee200 -Author: Albert Astals Cid -Date: Wed Mar 26 12:08:52 2014 +0100 - - Fix ASAN in 750.asan.0.9621.pdf - - ==25876== ERROR: AddressSanitizer: heap-buffer-overflow on - address 0x60040002a10f at pc 0x7fc396c3c23e bp 0x7ffff1123d20 sp - 0x7ffff1123d18 - READ of size 1 at 0x60040002a10f thread T0 - #0 0x7fc396c3c23d in JBIG2Stream::readGenericBitmap(bool, - int, int, int, bool, bool, JBIG2Bitmap*, int*, int*, int) - /home/tsdgeos/devel/poppler/poppler/JBIG2Stream.cc:3504 - #1 0x7fc396c30073 in JBIG2Stream::readSymbolDictSeg(unsigned - int, unsigned int, unsigned int*, unsigned int) - /home/tsdgeos/devel/poppler/poppler/JBIG2Stream.cc:1867 - #2 0x7fc396c2d88a in JBIG2Stream::readSegments() - /home/tsdgeos/devel/poppler/poppler/JBIG2Stream.cc:1408 - #3 0x7fc396c2c6ba in JBIG2Stream::reset() - /home/tsdgeos/devel/poppler/poppler/JBIG2Stream.cc:1248 - #4 0x7fc396c783f7 in ImageStream::reset() - /home/tsdgeos/devel/poppler/poppler/Stream.cc:484 - #5 0x7fc396d484e4 in SplashOutputDev::drawImage(GfxState*, - Object*, Stream*, int, int, GfxImageColorMap*, bool, int*, bool) - /home/tsdgeos/devel/poppler/poppler/SplashOutputDev.cc:3158 - #6 0x7fc396ba3cf0 in Gfx::doImage(Object*, Stream*, bool) - /home/tsdgeos/devel/poppler/poppler/Gfx.cc:4653 - #7 0x7fc396ba0d6c in Gfx::opXObject(Object*, int) - /home/tsdgeos/devel/poppler/poppler/Gfx.cc:4179 - #8 0x7fc396b7b2c6 in Gfx::execOp(Object*, Object*, int) - /home/tsdgeos/devel/poppler/poppler/Gfx.cc:903 - #9 0x7fc396b7a49b in Gfx::go(bool) - /home/tsdgeos/devel/poppler/poppler/Gfx.cc:762 - #10 0x7fc396b7a0ef in Gfx::display(Object*, bool) - /home/tsdgeos/devel/poppler/poppler/Gfx.cc:728 - #11 0x7fc396c5cd93 in Page::displaySlice(OutputDev*, double, - double, int, bool, bool, int, int, int, int, bool, bool - (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) - /home/tsdgeos/devel/poppler/poppler/Page.cc:585 - #12 0x7fc396c642bf in PDFDoc::displayPageSlice(OutputDev*, - int, double, double, int, bool, bool, bool, int, int, int, int, - bool (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) - /home/tsdgeos/devel/poppler/poppler/PDFDoc.cc:503 - #13 0x40311e in savePageSlice(PDFDoc*, SplashOutputDev*, - int, int, int, int, int, double, double, char*) - /home/tsdgeos/devel/poppler/utils/pdftoppm.cc:222 - #14 0x404416 in main - /home/tsdgeos/devel/poppler/utils/pdftoppm.cc:521 - #15 0x7fc396284ec4 (/lib/x86_64-linux-gnu/libc.so.6+0x21ec4) - #16 0x401d58 in _start - (/home/tsdgeos/devel/poppler/build-debug/utils/pdftoppm+0x401d58) - - poppler/JBIG2Stream.cc | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -commit 9002b3b7cbbbc5802abfa8383ded2093a29d1746 -Author: Albert Astals Cid -Date: Wed Mar 26 00:48:15 2014 +0100 - - Fix ASAN in 784.asan.0.9671.pdf - - ================================================================= - ==24856== ERROR: AddressSanitizer: SEGV on unknown address - 0x603bfffe5804 (pc 0x7f7aa3310c6b sp 0x7fff0e656bd0 bp 0x7fff0e656e90 - T0) - AddressSanitizer can not provide additional info. - #0 0x7f7aa3310c6a in - GfxIndexedColorSpace::mapColorToBase(GfxColor*, GfxColor*) - /home/tsdgeos/devel/poppler/poppler/GfxState.cc:2509 - #1 0x7f7aa33110d2 in GfxIndexedColorSpace::getRGB(GfxColor*, - GfxRGB*) /home/tsdgeos/devel/poppler/poppler/GfxState.cc:2529 - #2 0x7f7aa3466712 in convertGfxColor(unsigned - char*, SplashColorMode, GfxColorSpace*, GfxColor*) - /home/tsdgeos/devel/poppler/poppler/SplashOutputDev.cc:117 - #3 0x7f7aa34675a9 in SplashUnivariatePattern::getColor(int, - int, unsigned char*) - /home/tsdgeos/devel/poppler/poppler/SplashOutputDev.cc:215 - #4 0x7f7aa348d2a2 in Splash::pipeRun(SplashPipe*) - /home/tsdgeos/devel/poppler/splash/Splash.cc:363 - #5 0x7f7aa34c9c29 in Splash::drawAALine(SplashPipe*, - int, int, int, bool, unsigned char) - /home/tsdgeos/devel/poppler/splash/Splash.cc:1537 - #6 0x7f7aa34c4787 in Splash::shadedFill(SplashPath*, bool, - SplashPattern*) /home/tsdgeos/devel/poppler/splash/Splash.cc:6388 - #7 0x7f7aa348b65c in - SplashOutputDev::univariateShadedFill(GfxState*, - SplashUnivariatePattern*, double, double) - /home/tsdgeos/devel/poppler/poppler/SplashOutputDev.cc:4408 - #8 0x7f7aa348b93d in SplashOutputDev::radialShadedFill(GfxState*, - GfxRadialShading*, double, double) - /home/tsdgeos/devel/poppler/poppler/SplashOutputDev.cc:4427 - #9 0x7f7aa32c7574 in Gfx::doRadialShFill(GfxRadialShading*) - /home/tsdgeos/devel/poppler/poppler/Gfx.cc:3058 - #10 0x7f7aa32c188f in Gfx::opShFill(Object*, int) - /home/tsdgeos/devel/poppler/poppler/Gfx.cc:2476 - #11 0x7f7aa32b12c6 in Gfx::execOp(Object*, Object*, int) - /home/tsdgeos/devel/poppler/poppler/Gfx.cc:903 - #12 0x7f7aa32b049b in Gfx::go(bool) - /home/tsdgeos/devel/poppler/poppler/Gfx.cc:762 - #13 0x7f7aa32b00ef in Gfx::display(Object*, bool) - /home/tsdgeos/devel/poppler/poppler/Gfx.cc:728 - #14 0x7f7aa3392dc9 in Page::displaySlice(OutputDev*, double, - double, int, bool, bool, int, int, int, int, bool, bool - (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) - /home/tsdgeos/devel/poppler/poppler/Page.cc:585 - #15 0x7f7aa339a2f5 in PDFDoc::displayPageSlice(OutputDev*, - int, double, double, int, bool, bool, bool, int, int, int, int, - bool (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) - /home/tsdgeos/devel/poppler/poppler/PDFDoc.cc:503 - #16 0x40311e in savePageSlice(PDFDoc*, SplashOutputDev*, - int, int, int, int, int, double, double, char*) - /home/tsdgeos/devel/poppler/utils/pdftoppm.cc:222 - #17 0x404416 in main - /home/tsdgeos/devel/poppler/utils/pdftoppm.cc:521 - #18 0x7f7aa29baec4 (/lib/x86_64-linux-gnu/libc.so.6+0x21ec4) - #19 0x401d58 in _start - (/home/tsdgeos/devel/poppler/build-debug/utils/pdftoppm+0x401d58) - SUMMARY: AddressSanitizer: SEGV - /home/tsdgeos/devel/poppler/poppler/GfxState.cc:2509 - GfxIndexedColorSpace::mapColorToBase(GfxColor*, GfxColor*) - - poppler/GfxState.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 8947c6bc1dcb768b9d9c03a7a5db1573abdc2e87 -Author: Albert Astals Cid -Date: Wed Mar 26 00:47:59 2014 +0100 - - Forgot my (C) in the last commit - - poppler/TextOutputDev.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 1d7095ab7bdf0f14c3bfe99d6d5985bce98abe16 -Author: Albert Astals Cid -Date: Tue Mar 25 22:29:07 2014 +0100 - - Fix Heap-buffer-overflow in TextPage::updateFont - - Bug #76442 - - poppler/TextOutputDev.cc | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -commit 37ad83d69bd1d10da6ea1eb559c4bd320917ae25 -Author: Albert Astals Cid -Date: Sat Mar 22 17:33:55 2014 +0100 - - Reorder the if check condition - - I think the previous condition was correct anyway because of the - extra -1 in the i check - but it really makes more sense to have the i check first - - Bug #76478 - - goo/gfile.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 3535d658095ffa49ef8615d69843afa9c5ada061 -Author: Albert Astals Cid -Date: Sat Mar 22 17:29:46 2014 +0100 - - Make the test rect go to xMax, yMax not xMax-1,yMax-1 - - I don't understand why the -1 is there and removing - it actually fixes bug #76387 - - splash/Splash.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 1e93c3f2d1c86edd40ca283ed422089f64886d04 -Author: William Bader -Date: Sat Mar 15 17:14:21 2014 +0100 - - Fix regression when creating level1 PS - - Bug #75241 - - poppler/PreScanOutputDev.cc | 16 ++++++++++++++-- - poppler/PreScanOutputDev.h | 3 ++- - 2 files changed, 16 insertions(+), 3 deletions(-) - -commit 1ea2eb412d12d97eaf49d1e51d7fda7abd8fbf9d -Author: Jason Crain -Date: Wed Mar 12 00:34:13 2014 +0100 - - Limit numeric parsing of character names - - Bug #38456 - - poppler/GfxFont.cc | 139 - ++++++++++++++++++++++++++++++++++-------------- - poppler/GlobalParams.cc | 4 +- - 2 files changed, 102 insertions(+), 41 deletions(-) - -commit e24cbeae22d6c8630e292897bd982a87e6290ca6 -Author: Steven Lee -Date: Tue Mar 11 21:24:59 2014 +0100 - - Fix TIFF writting in Windows - - Bug #75969 - - goo/TiffWriter.cc | 11 +++++++++++ - 1 file changed, 11 insertions(+) - -commit b984a3b5946ebcd736e0583a10eb614cede3388a -Author: Adrian Perez de Castro -Date: Wed Mar 5 11:19:48 2014 +0200 - - glib: Use flags argument in poppler_structure_element_get_text() - - Instead of accepting a boolean argument to enable recursive text - extraction, - use a flags value. Text extraction may add features in the future (for - example, allowing using alternate text as replacement for inline - figures), - and this will allow to extend the method without introducing ABI - or API - breakage. - - https://bugs.freedesktop.org/show_bug.cgi?id=75796 - - glib/poppler-structure-element.cc | 12 +++++++----- - glib/poppler-structure-element.h | 14 +++++++++++++- - glib/reference/poppler-sections.txt | 3 +++ - 3 files changed, 23 insertions(+), 6 deletions(-) - -commit 94df09de1e07d442895ec1fb5cc23cacd9826552 -Author: Adrian Perez de Castro -Date: Thu Mar 6 10:44:51 2014 +0200 - - glib: Add missing underscore in method name - - The correct name is poppler_structure_element_get_form_state(). - - https://bugs.freedesktop.org/show_bug.cgi?id=75827 - - glib/poppler-structure-element.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 7ddd03f9a00dcf505921821c55bebe6817aa3605 -Author: Carlos Garcia Campos -Date: Wed Mar 5 17:48:39 2014 +0100 - - Rename getNumElements, getElement and appendElement as getNumChildren, - getChild and appendChild - - It's more consistent with other internal API and less confusing. - - glib/poppler-structure-element.cc | 16 ++++++++-------- - poppler/StructElement.cc | 6 +++--- - poppler/StructElement.h | 8 ++++---- - poppler/StructTreeRoot.cc | 4 ++-- - poppler/StructTreeRoot.h | 8 ++++---- - 5 files changed, 21 insertions(+), 21 deletions(-) - -commit 7d6a5b65f8497537248d405177ae141f3765a419 -Author: Carlos Garcia Campos -Date: Wed Mar 5 17:40:14 2014 +0100 - - glib: Update the documentation symbols after the PopplerStructureScope - rename - - glib/reference/poppler-sections.txt | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 9282b5a26e9ce81d81d42c0cbe449543c8366b7c -Author: Carlos Garcia Campos -Date: Wed Mar 5 17:37:38 2014 +0100 - - glib: Rename PopplerStructureScope as PopplerStructureTableScope - - It's a table specific attribute - - glib/poppler-structure-element.cc | 14 +++++++------- - glib/poppler-structure-element.h | 12 ++++++------ - 2 files changed, 13 insertions(+), 13 deletions(-) - -commit 9888eb65c6fad0eabcf525a7e88941dec2a27e92 -Author: Adrian Perez de Castro -Date: Thu Sep 26 19:36:12 2013 +0300 - - glib: Implement accessors for element attributes - - Implement inspecting the standard attributes of - PopplerStructureElement - objects. - - https://bugs.freedesktop.org/show_bug.cgi?id=64821 - - glib/poppler-structure-element.cc | 1279 - ++++++++++++++++++++++++++++++++++- - glib/poppler-structure-element.h | 252 ++++++- - glib/reference/poppler-sections.txt | 84 +++ - 3 files changed, 1597 insertions(+), 18 deletions(-) - -commit b346df59ef0775f5bd74a9f7379b5f430ccd7b79 -Author: Adam Reichold -Date: Tue Mar 4 23:40:59 2014 +0100 - - Qt: Expose document-supplied text direction - - qt4/src/poppler-document.cc | 17 +++++++++++++++++ - qt4/src/poppler-qt4.h | 10 +++++++++- - qt5/src/poppler-document.cc | 17 +++++++++++++++++ - qt5/src/poppler-qt5.h | 10 +++++++++- - 4 files changed, 52 insertions(+), 2 deletions(-) - -commit 2fc38c1866243598e22be07f0177e7d9385542d5 -Author: Adrian Perez de Castro -Date: Fri Feb 28 19:14:36 2014 +0200 - - glib: Fixes in the API reference documentation - - - Remove the references to non-existent methods for - PopplerStructureElement, - and point to PopplerStructureElementIter instead to point out how to - obtain the structure tree. - - Remove a non-existent include in poppler-docs.sgml - - Add POPPLER_TYPE_TEXT_SPAN to the list of private symbols. - - https://bugs.freedesktop.org/show_bug.cgi?id=75615 - - glib/poppler-structure-element.cc | 6 +++--- - glib/reference/poppler-docs.sgml | 1 - - glib/reference/poppler-sections.txt | 1 + - 3 files changed, 4 insertions(+), 4 deletions(-) - -commit cfe47a655ec5e280168e000da85bbf13f5f5f8b8 -Author: Adrian Perez de Castro -Date: Fri Feb 28 19:17:45 2014 +0200 - - glib: Remove poppler_text_span_is_link() in header - - The method poppler_text_span_is_link() does not exist, and must - be removed from the API header. - - https://bugs.freedesktop.org/show_bug.cgi?id=75613 - - glib/poppler-structure-element.h | 1 - - 1 file changed, 1 deletion(-) - -commit 7a2db63b5f7cae4bc215baa0859c4d4f8a660951 -Author: Adrian Perez de Castro -Date: Wed Feb 26 20:16:29 2014 +0200 - - glib: Remove unneeded POPPLER_STRUCTURE_ELEMENT_UNKNOWN - - The enum value POPPLER_STRUCTURE_ELEMENT_UNKNOWN because Poppler does - not add invalid StructElements ("invalid" being nodes of type - StructElement::Unknown) to the Tagged-PDF structure tree. That means - that poppler-glib does not need to expose it in the API. An assertion - is left to aid in finding issues when using debug builds. - - https://bugs.freedesktop.org/show_bug.cgi?id=75541 - - glib/poppler-structure-element.cc | 12 +++++++----- - glib/poppler-structure-element.h | 1 - - 2 files changed, 7 insertions(+), 6 deletions(-) - -commit db909c2a14f962234a813ba9853535b9692cfd5a -Author: Albert Astals Cid -Date: Wed Feb 26 22:09:44 2014 +0100 - - Try harder to open broken files - - Bug #75232 - - poppler/PDFDoc.cc | 33 ++++++++++++++++++++++----------- - poppler/PDFDoc.h | 8 ++++---- - 2 files changed, 26 insertions(+), 15 deletions(-) - -commit b2394eee5384edf4128d598030989e66d64714ef -Author: Adrian Perez de Castro -Date: Mon Feb 10 20:29:35 2014 +0200 - - Tagged-PDF: Fix parsing of attached element attributes - - The wrong object was used as attribute dictionary, which caused - a segmentation fault when parsing PDF files in which the structure - elements included attributes attached to them. This patch fixes the - issue. - - Thanks to Joanmarie Diggs for helping in - debugging the problem. - - https://bugs.freedesktop.org/show_bug.cgi?id=74805 - - poppler/StructElement.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit c549b5e9ce2dcc8beb2511ee315bfff2fdfdf6e8 -Author: Adrian Perez de Castro -Date: Sun Feb 9 18:31:22 2014 +0200 - - glib: Add poppler_structure_element_is_grouping() - - Implement a method to check whether a structure element is a grouping - element, wrapping the StructElement::isGrouping() method. - - https://bugs.freedesktop.org/show_bug.cgi?id=74753 - - glib/poppler-structure-element.cc | 20 ++++++++++++++++++++ - glib/poppler-structure-element.h | 1 + - glib/reference/poppler-sections.txt | 1 + - 3 files changed, 22 insertions(+) - -commit 6fbd6cb85bdd32dc5a3d4c3c719556269a4488ac -Author: Adrian Perez de Castro -Date: Fri Feb 21 15:02:44 2014 +0200 - - glib: Handle missing structure element types - - Element Art (article); RB, RP, RB (Ruby text inner elements); and - WT, WP (Warichu inner elements) were not being handled. This adds - the corresponding handling in poppler-glib. Also, the "default" case - in the switch in poppler_structure_element_get_type() is removed, so - the compiler can emit warnings when enum values are not handled. - - https://bugs.freedesktop.org/show_bug.cgi?id=75323 - - glib/poppler-structure-element.cc | 25 +++++++++++++++++++------ - glib/poppler-structure-element.h | 9 +++++++-- - 2 files changed, 26 insertions(+), 8 deletions(-) - -commit 63e9c0b67fa2e64ca20258d873a849386c7eb295 -Author: Fabio D'Urso -Date: Mon Feb 17 23:58:09 2014 +0100 - - Some error() usage fixes - - poppler/Hints.cc | 3 ++- - poppler/JBIG2Stream.cc | 4 ++-- - poppler/PSOutputDev.cc | 4 ++-- - poppler/SecurityHandler.cc | 3 ++- - poppler/StructTreeRoot.cc | 3 ++- - qt4/src/poppler-annotation.cc | 6 +++--- - qt5/src/poppler-annotation.cc | 6 +++--- - utils/HtmlOutputDev.cc | 11 ++++++----- - 8 files changed, 22 insertions(+), 18 deletions(-) - -commit 8f2d847f1d0224a297e642944f8da9c1409732b6 -Author: Fabio D'Urso -Date: Mon Feb 17 23:56:49 2014 +0100 - - Clang++ plugin that checks for usage errors in GooString::format-style - calls - - goo/GooString.h | 12 +- - poppler/Error.h | 4 +- - test/goostring-format-checker/README | 16 + - .../goostring-format-checker.cc | 369 - +++++++++++++++++++++ - 4 files changed, 397 insertions(+), 4 deletions(-) - -commit d7d61dcda91910f7eb2548b19e8380d7c3232dd3 -Author: Thomas Freitag -Date: Wed Feb 12 21:50:38 2014 +0100 - - blend usage in PDF with spot colors casue random output - - The reason for the random colors is the uninitialized local variable - cBlend. The blend functions only fills offset 0 to 3, so offset 4 - up to 4 + SPOT_NCOMPS are left uninitialized, but all offsets are - stored in the bitmap. - So we need to initialize these offsets with 0! - - Bug #74883 - - splash/Splash.cc | 9 ++++++++- - 1 file changed, 8 insertions(+), 1 deletion(-) - -commit b2905a0d299cc09fcd219afe49cb370f6db61c5a -Author: Albert Astals Cid -Date: Mon Feb 10 20:19:07 2014 +0100 - - increase gtk3 dependency - - gtk_tree_view_set_activate_on_single_click was introduced in 3.8 - - cmake/modules/FindGTK.cmake | 2 +- - configure.ac | 4 ++-- - 2 files changed, 3 insertions(+), 3 deletions(-) - -commit 71d4041b061c109a965e72230640cf8ee616dac3 -Author: Albert Astals Cid -Date: Mon Feb 10 20:16:46 2014 +0100 - - Make sure number of least objects in hints table is valid - - Bug #74741 - - poppler/Hints.cc | 5 +++++ - 1 file changed, 5 insertions(+) - -commit a865f13def88153fdbe8a0a054d2005e3e2bb737 -Author: Albert Astals Cid -Date: Sun Feb 9 23:22:07 2014 +0100 - - Fix cmake build - - glib/CMakeLists.txt | 2 ++ - glib/demo/CMakeLists.txt | 1 + - 2 files changed, 3 insertions(+) - -commit d6fde0fac0120b1622942d8344d5153d9abf3e1e -Author: Adrian Perez de Castro -Date: Wed May 29 23:44:03 2013 +0300 - - glib-demo: Pane showing the document structure - - Adds a new pane in poppler-glib-demo showing the structure for - Tagged-PDF - documents. It also serves as an example on how to to use the API for - PopplerStructure and PopplerStructureElement. - - glib/demo/Makefile.am | 2 + - glib/demo/main.c | 2 + - glib/demo/taggedstruct.c | 232 - +++++++++++++++++++++++++++++++++++++++++++++++ - glib/demo/taggedstruct.h | 31 +++++++ - 4 files changed, 267 insertions(+) - -commit 0f9fa775c469c03d1613b955ee7b06b823e6e080 -Author: Adrian Perez de Castro -Date: Thu Sep 26 17:50:51 2013 +0300 - - glib: Expose inline attributes of structure elements - - Allows obtaining inline text attributes from structure elements. The - text - is divived into "spans", which are groups of consecutive glyphs - that share - their attributes. Each one of those is represented by a - PopplerTextSpan, - which gives information about the text font and color, and the - link target - for links. The list of PopplerTextSpans is created lazily when - first used. - - https://bugs.freedesktop.org/show_bug.cgi?id=64821 - - glib/poppler-structure-element.cc | 269 - ++++++++++++++++++++++++++++++++++++ - glib/poppler-structure-element.h | 16 ++- - glib/poppler.h | 1 + - glib/reference/poppler-sections.txt | 12 ++ - 4 files changed, 297 insertions(+), 1 deletion(-) - -commit 8072d4b0e3ea10b4308f8172891f769f30466133 -Author: Adrian Perez de Castro -Date: Thu May 9 12:01:59 2013 +0300 - - glib: Expose the document structure tree - - Implements a new PopplerStructureElement classe, which builds upon - StructTreeRoot and StructElement to expose the document structure of - tagged PDFs in the GLib binding. - - Navigation of the structure tree is done by an iterator-based - interface, - using PopplerStructureElementIter. - - https://bugs.freedesktop.org/show_bug.cgi?id=64821 - - glib/Makefile.am | 2 + - glib/poppler-private.h | 10 + - glib/poppler-structure-element.cc | 663 - ++++++++++++++++++++++++++++++++++++ - glib/poppler-structure-element.h | 112 ++++++ - glib/poppler.h | 3 + - glib/reference/poppler-docs.sgml | 2 + - glib/reference/poppler-sections.txt | 37 ++ - glib/reference/poppler.types | 2 + - 8 files changed, 831 insertions(+) - -commit 46b7470ae9846d7e6dbb72bbb3ff831acd954168 -Author: Germán Poo-Caamaño -Date: Thu Jan 30 14:42:51 2014 -0800 - - glib-demo: Fix performance in text markup annotations - - Fix https://bugs.freedesktop.org/show_bug.cgi?id=51487#c45 - - glib/demo/annots.c | 19 +++++++++++++------ - 1 file changed, 13 insertions(+), 6 deletions(-) - -commit 8a84b45674aed8c27a1d172b07eb0531c0ec14f1 -Author: Carlos Garcia Campos -Date: Sat Feb 8 09:17:02 2014 +0100 - - glib: Fix gobject-introspection warnings - - glib/poppler-page.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 899799df78c00fc2ca6d2d0e612536b87a871817 -Author: Adrian Perez de Castro -Date: Tue Feb 4 19:26:53 2014 +0200 - - Allow properly identifying grouping elements - - Grouping elements in the Tagged-PDF structure should be identifiable - as - such (see section 14.8.4.2 "Grouping Elements" of the PDF - standard). Those - were previously reported as inline elements, which is quite not - correct. - This patch introduces a new StructElement::isGrouping() method which - correctly reports grouping elements as such. - - https://bugs.freedesktop.org/show_bug.cgi?id=74520 - - poppler/StructElement.cc | 31 +++++++++++++++++++------------ - poppler/StructElement.h | 1 + - 2 files changed, 20 insertions(+), 12 deletions(-) - -commit 27cd9a00bfebf0602e7ed29a8ee8e16ffff67bde -Author: Adrian Perez de Castro -Date: Tue Feb 4 19:35:58 2014 +0200 - - Report LBody elements in Tagged-PDF structure as block elements - - According to section 14.8.4.3 "Block-Level Structure Elements" - (in particular subsection 14.8.4.3.3 "List Elements"), structure - elements of type LBody must be reported as block elements. This - patch changes the reported type from elementTypeUndefined to - elementTypeBlock accordingly. - - https://bugs.freedesktop.org/show_bug.cgi?id=74522 - - poppler/StructElement.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 4cda839cb489fe5cd4726109cb9ab8b0ba2fa563 -Author: Adrian Johnson -Date: Tue Jan 28 06:06:09 2014 +1030 - - pdftops: ensure there is always a page size in the output - - even if the PDF file as badly broken. - - poppler/PSOutputDev.cc | 7 +++++++ - 1 file changed, 7 insertions(+) - -commit 45a87afdf1372911aa1ba840557e61627cdc7b4f -Author: Adrian Johnson -Date: Sun Dec 29 15:16:37 2013 +1030 - - cairo: clip to crop box - - when printing the cairo surface may larger than the crop box - - fixes https://bugzilla.gnome.org/show_bug.cgi?id=649886 - - poppler/CairoOutputDev.h | 4 ++++ - 1 file changed, 4 insertions(+) - -commit 6d39a1d7b348329dd057a8e7c77bfd47921fc495 -Author: Adrian Johnson -Date: Mon Dec 30 17:59:09 2013 +1030 - - pdftocairo: ensure page size and crop box works the same as pdftops - - Bug 72312 - - utils/pdftocairo.1 | 26 +++++++++----------------- - utils/pdftocairo.cc | 20 +++++++++++++++----- - 2 files changed, 24 insertions(+), 22 deletions(-) - -commit b1da7e20dcef78ef6036418b37a47ba3f8818453 -Author: Adrian Johnson -Date: Thu Dec 19 22:18:26 2013 +1030 - - pdftops: Only change paper size when different to previous size - - Previously this check was done in the code (removed in previous - commit). - Moving this check into the pdfSetupPaper macro preserves page - independence. - - Bug 72312 - - poppler/PSOutputDev.cc | 30 +++++++++++++++++++++++++----- - 1 file changed, 25 insertions(+), 5 deletions(-) - -commit 7ac7d3bad4b868950ee96fd9c5ece88632f8827c -Author: Adrian Johnson -Date: Fri Dec 20 07:19:21 2013 +1030 - - pdftops: Remove origpagesizes mode and make -origpagesizes an alias - for -paper match - - Bug 72312 - - poppler/PSOutputDev.cc | 9 ++------- - poppler/PSOutputDev.h | 4 ++-- - utils/pdftops.1 | 30 ++++++++++-------------------- - utils/pdftops.cc | 23 ++++++++++++++--------- - 4 files changed, 28 insertions(+), 38 deletions(-) - -commit 31fc5181bc491ff2e4aee0ae05c0f611a36e585c -Author: Adrian Johnson -Date: Fri Dec 20 07:16:37 2013 +1030 - - pdftops: Use crop box as page size - - unless -nocrop is used. The fontends use the crop box as the page - size and - acroread uses the cropbox as the page size for display and printing. - - Bug 72312 - - poppler/PSOutputDev.cc | 28 +++++++--------------------- - 1 file changed, 7 insertions(+), 21 deletions(-) - -commit bf2049b17ac4706f472c59e50266f4eaf0ffaa32 -Author: Adrian Johnson -Date: Sun Dec 15 18:00:41 2013 +1030 - - pdftps: fix DocumentMedia/Page/Media/PageBBox DSC comments - - Bug 72312 - - poppler/PSOutputDev.cc | 167 - ++++++++++++++++++++++++++-------------- - poppler/PSOutputDev.h | 6 +- - qt4/src/poppler-ps-converter.cc | 1 + - qt5/src/poppler-ps-converter.cc | 1 + - utils/pdftops.cc | 1 + - 5 files changed, 119 insertions(+), 57 deletions(-) - -commit fe49033c9bd2103c13d4eb59983e06fdcdd33a8d -Author: Till Kamppeter -Date: Sat Dec 14 16:05:09 2013 +1030 - - pdftops: ensure paper size takes into account rotation - - Bug 72312 - - poppler/PSOutputDev.cc | 48 - ++++++++++++++++++++---------------------------- - 1 file changed, 20 insertions(+), 28 deletions(-) - -commit 31edf585e62f4e91b7b64295cc8b978ac466ce58 -Author: Bogdan Cristea -Date: Mon Jan 27 20:06:11 2014 +0100 - - [qt] Improve compilation under Win 8 with Visual Studio 2012 - - Bug #73111 - - goo/GooMutex.h | 3 ++- - goo/GooTimer.h | 2 ++ - goo/gfile.h | 2 ++ - poppler/PDFDoc.cc | 4 +--- - poppler/XpdfPluginAPI.h | 2 ++ - poppler/poppler-config.h.cmake | 18 ++++++++++++++++-- - poppler/poppler-config.h.in | 18 ++++++++++++++++-- - qt4/tests/stress-threads-qt4.cpp | 5 +++++ - qt5/src/poppler-private.h | 6 ++++-- - qt5/tests/stress-threads-qt5.cpp | 5 +++++ - test/perf-test.cc | 1 - - 11 files changed, 55 insertions(+), 11 deletions(-) - -commit 834cd18e3ddfda44a11316290f7eee98cd871305 -Author: Albert Astals Cid -Date: Sun Jan 26 16:10:20 2014 +0100 - - Use c99 for the c compiler - - cmake/modules/PopplerMacros.cmake | 1 + - 1 file changed, 1 insertion(+) - -commit 03674a141a96806e5e1a134dc3dec2ee61b68713 -Author: Pino Toscano -Date: Sun Jan 26 12:43:13 2014 +0100 - - qt4/qt5: add GCC visibility export attributes - - this does no actual changes to the exported symbols, but can help in - hiding symbols if the right GCC flags for symbols visibility are - specified - - qt4/src/poppler-export.h | 3 +++ - qt5/src/poppler-export.h | 3 +++ - 2 files changed, 6 insertions(+) - -commit 52b46d05219cf9898ee4adae7c8c2702adb1ba23 -Author: Pino Toscano -Date: Sun Jan 26 12:38:03 2014 +0100 - - qt4/qt5: improve naming of internal export/import macros - - use something less generic than LIB_EXPORT/LIB_IMPORT - - qt4/src/poppler-export.h | 12 ++++++------ - qt5/src/poppler-export.h | 12 ++++++------ - 2 files changed, 12 insertions(+), 12 deletions(-) - -commit 7a8bcea11ad71fccbbba2787fc442f6ba4bf7100 -Author: Pino Toscano -Date: Thu Jan 23 22:34:07 2014 +0100 - - cmake: install JpegWriter.h depending on libjpeg - - ... and not libopenjpeg - - CMakeLists.txt | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -commit 57f34f525fa2c2e62ebc7383ceba48ebc80ebba6 -Author: Andres Gomez -Date: Wed Jan 8 12:26:14 2014 +0200 - - glib-demo: Fix conding style issue in render.c - - glib/demo/render.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 3fac919eeb1ca1abfdbb4f9923a454e532256f5c -Author: Andres Gomez -Date: Wed Jan 8 12:25:52 2014 +0200 - - glib-demo: Fix trailing whitespaces in render.c - - glib/demo/render.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 92ea15642a6d3fe65d66d5c59fb6bed54e060e5d -Author: Christian Persch -Date: Fri Jan 3 23:31:56 2014 +0100 - - glib: Install error callback - - Install an error callback so that poppler error messages can be - redirected - to the GLib logging API. - - https://bugs.freedesktop.org/show_bug.cgi?id=73269 - - glib/poppler.cc | 47 +++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 47 insertions(+) - -commit f99128e38bbff43623d5cd1c1bc27fd789d0bc0c -Author: Carlos Garcia Campos -Date: Sun Jan 19 16:03:35 2014 +0100 - - glib: Make vertices a constructor parameter of line annotations - - It's a required field in the line annotation. - - glib/demo/annots.c | 4 +--- - glib/poppler-annot.cc | 12 ++++++++++-- - glib/poppler-annot.h | 4 +++- - 3 files changed, 14 insertions(+), 6 deletions(-) - -commit 587a40f90e4ac5a1b6ab9044495a1ae403bc8c58 -Author: Carlos Garcia Campos -Date: Sun Jan 19 15:58:43 2014 +0100 - - annots: Fix memory leak when setting AnnotTextMarkup quads twice - - poppler/Annot.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 69e73da1fbab9bf3365b40dced1008b0283ac931 -Author: Germán Poo-Caamaño -Date: Wed Nov 20 11:53:30 2013 -0800 - - glib-demo: Add support for PopplerTextAnnotMarkup - - * The subtypes are: Highlihght, Squiggly, StrikeOut and Underline. - * Use ScrolledWindow for annotation properties to make room to - show the Quadrilaterals of TextMarkup annotations. - - https://bugs.freedesktop.org/show_bug.cgi?id=51487 - - glib/demo/annots.c | 232 - +++++++++++++++++++++++++++++++++++++++++++++++------ - 1 file changed, 206 insertions(+), 26 deletions(-) - -commit 9a7699ebe3e644ba845ef75d9295c88d321cb934 -Author: Germán Poo-Caamaño -Date: Mon Nov 18 16:42:08 2013 -0800 - - glib: Add PopplerAnnotTextMarkup class and subtypes - - The subtypes are: Highlihght, Squiggly, StrikeOut and Underline. - It adds convenient methods to set/get/free quadrilaterals - necessaries for TextMarkup annotations. - - https://bugs.freedesktop.org/show_bug.cgi?id=51487 - - glib/poppler-annot.cc | 264 - ++++++++++++++++++++++++++++++++++++ - glib/poppler-annot.h | 23 ++++ - glib/poppler-page.cc | 6 + - glib/poppler-private.h | 1 + - glib/poppler.h | 1 + - glib/reference/poppler-sections.txt | 11 ++ - 6 files changed, 306 insertions(+) - -commit 40040b41216a3dcc833fc224f1c6f15517a88aed -Author: Germán Poo-Caamaño -Date: Mon Nov 18 16:26:27 2013 -0800 - - glib: Add PopplerQuadrilateral boxed type - - https://bugs.freedesktop.org/show_bug.cgi?id=51487 - - glib/poppler-page.cc | 53 - +++++++++++++++++++++++++++++++++++++ - glib/poppler-page.h | 33 +++++++++++++++++++++++ - glib/poppler.h | 1 + - glib/reference/poppler-sections.txt | 6 +++++ - 4 files changed, 93 insertions(+) - -commit c8a845cf7c7752d3b7dad06013d3154812c66c92 -Author: Albert Astals Cid -Date: Tue Jan 14 20:26:59 2014 +0100 - - Do not define -ansi - - We are using long long that is not defined in ansi, so forcing ansi - strictness does - not make any sense. Bug #72499 - - cmake/modules/PopplerMacros.cmake | 5 ----- - configure.ac | 15 --------------- - 2 files changed, 20 deletions(-) - -commit f0c13ee72e8a7df17bdf847f5e922c01acee1f0d -Author: Albert Astals Cid -Date: Mon Jan 6 21:55:07 2014 +0100 - - C for last commit - - poppler/Parser.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 1e1b9991a911fb610e74119979b20b179f3f2a67 -Author: Albert Astals Cid -Date: Mon Jan 6 21:51:25 2014 +0100 - - Fix rendering of pdf file from KDE bug 329600 - - It used to work and regressed with large file support (used to work - because stuff just overflowed) - - lexer->getPos needs lexer to be a stream, if it is not, just resort - to the +5000 kludge - - poppler/Parser.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 4cd5c349cfbc745688c0c38fc50d364092bc3718 -Author: Albert Astals Cid -Date: Mon Jan 6 21:48:25 2014 +0100 - - Update popplers (C) - - poppler/poppler-config.h.cmake | 2 +- - poppler/poppler-config.h.in | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit 7ca2f42b06757587dfd9521fb1c6c7d657545553 -Author: Albert Astals Cid -Date: Mon Jan 6 15:48:22 2014 +0100 - - Learn about automake 1.14 - - autogen.sh | 19 ++++++++++--------- - 1 file changed, 10 insertions(+), 9 deletions(-) - -commit de9643b6f76774ebe131c4787df82dd213181c71 -Author: Albert Astals Cid -Date: Fri Jan 3 00:53:37 2014 +0100 - - 0.25.1 - - CMakeLists.txt | 2 +- - NEWS | 19 +++++++++++++++++++ - cpp/Doxyfile | 2 +- - qt4/src/Doxyfile | 2 +- - qt5/src/Doxyfile | 2 +- - 5 files changed, 23 insertions(+), 4 deletions(-) - -commit e238c1f83fd5f667336bfbb0e9a59569ff638ecc -Author: Albert Astals Cid -Date: Fri Jan 3 00:29:28 2014 +0100 - - Fix qt5 moc detection fix - - configure.ac | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -commit 381ae2877acace4e8908b07ee5fb442bc19bf814 -Merge: 64100e7f a2f0e4b1 -Author: Albert Astals Cid -Date: Fri Jan 3 00:04:29 2014 +0100 - - Merge remote-tracking branch 'origin/poppler-0.24' - - Conflicts: - CMakeLists.txt - NEWS - configure.ac - cpp/Doxyfile - qt4/src/Doxyfile - qt5/src/Doxyfile - -commit a2f0e4b1fd8b3d9675cc00a561094bd78a63d048 -Author: Albert Astals Cid -Date: Thu Jan 2 23:48:29 2014 +0100 - - 0.24.5 - - CMakeLists.txt | 2 +- - NEWS | 4 ++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - qt4/src/Doxyfile | 2 +- - qt5/src/Doxyfile | 2 +- - 6 files changed, 9 insertions(+), 5 deletions(-) - -commit 523b2731e0489bab58e66b21016bd6f010e616ea -Author: Albert Astals Cid -Date: Thu Jan 2 22:54:42 2014 +0100 - - Update copyrights - - poppler/JBIG2Stream.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 64100e7f1f6b550e952838fce38615ec3788e17c -Author: Fabio D'Urso -Date: Sat Dec 28 12:11:47 2013 +0100 - - Simplify some calls to GooString::format-family functions - - poppler/Object.h | 4 ++-- - utils/pdftocairo.cc | 2 +- - 2 files changed, 3 insertions(+), 3 deletions(-) - -commit 0abde34d0f7ba0fc04a30dbfd78373ec9d9d0695 -Author: Fabio D'Urso -Date: Sat Dec 28 12:11:05 2013 +0100 - - Fixed some GooString format markers - - poppler/CMap.cc | 3 ++- - poppler/Function.cc | 3 ++- - poppler/StructElement.cc | 2 +- - 3 files changed, 5 insertions(+), 3 deletions(-) - -commit a7da4c6ac2b13308803806009c3437332b140586 -Author: Fabio D'Urso -Date: Fri Dec 27 17:09:39 2013 +0100 - - GooString format: fixed bug with printing LLONG_MIN - - ( -LLONG_MIN doesn't fit in a signed long long ) - - goo/GooString.cc | 19 +++++++++++++------ - 1 file changed, 13 insertions(+), 6 deletions(-) - -commit fe88f20cc565b4cf4765fed56c821989148ef454 -Author: Fabio D'Urso -Date: Fri Dec 27 17:08:50 2013 +0100 - - GooString format: Added some tests + improved documentation - - goo/GooString.h | 10 +++++-- - qt4/tests/check_goostring.cpp | 66 - +++++++++++++++++++++++++++++++++++++++++++ - qt5/tests/check_goostring.cpp | 66 - +++++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 139 insertions(+), 3 deletions(-) - -commit 5234a349adb678d267a3d8ca13176ac8abb7afd2 -Author: Thomas Freitag -Date: Fri Dec 20 20:25:26 2013 +0100 - - pdfunite: do not lose fonts when merging some files - - utils/pdfunite.cc | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -commit 8e24fcc0d296e07327e9cbe297f627bfc6471ee3 -Merge: 85efba38 b02f8731 -Author: Albert Astals Cid -Date: Wed Dec 18 21:51:57 2013 +0100 - - Merge remote-tracking branch 'origin/poppler-0.24' - - Conflicts: - poppler/GfxState.cc - -commit b02f873174865837fed3a9544b70b8b21747a3dd -Author: Fabio D'Urso -Date: Wed Dec 18 21:46:12 2013 +0100 - - Fixed some GooString format markers - - poppler/GfxState.cc | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -commit 85efba38c02b5daf7d3fc46bc85850e6842a085d -Author: Thomas Freitag -Date: Wed Dec 18 00:46:00 2013 +0100 - - Make pdfunite work even if there's a single file given - - Bug #72720 - - utils/pdfunite.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit a766c55f68db38feed91cf003a0d5710e2f925a8 -Author: Tuomas Jormola -Date: Mon Dec 16 20:43:28 2013 +0100 - - Fix detection of moc for Qt5 - - Bug #72744 - - On my Mac OS X 10.9 Mavericks system with Qt 5.2.0 installed using - Homebrew, the output of the moc command doesn't include the string - "Qt 5" which is expected by the moc version detection logic in - configure.ac of poppler 0.24.4. This patch updates the grep pattern so - that the current expected moc version output and the version output of - this installation of Qt5 are both detected as a valid moc for - Qt5. With - this patch applied, I was able to build and test poppler with Qt5 - support successfully. - - (09:26:05)(tj@gauri)(~)$ uname -a - Darwin gauri.ad.local.domain 13.0.0 Darwin Kernel Version 13.0.0: - Thu Sep 19 22:22:27 PDT 2013; root:xnu-2422.1.72~6/RELEASE_X86_64 - x86_64 i386 MacBookPro3,1 Darwin - (09:26:08)(tj@gauri)(~)$ /usr/local/opt/qt5/bin/moc -v - moc 5.2.0 - (09:26:24)(tj@gauri)(~)$ - - configure.ac | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit a43b4bf84fe4bde6649049685bf4ed6a682e8286 -Author: Carlos Garcia Campos -Date: Sun Dec 15 11:59:57 2013 +0100 - - regtest: Add a command line option to create-report command to not - launch the browser - - regtest/HTMLReport.py | 5 +++-- - regtest/commands/create-report.py | 5 ++++- - 2 files changed, 7 insertions(+), 3 deletions(-) - -commit 113958276b96d7f1aab7042e1807a9970425d234 -Author: Carlos Garcia Campos -Date: Sun Dec 15 11:48:51 2013 +0100 - - regtest: Return an exist status code depending on whether the - command succeeded - - regtest/TestRun.py | 2 ++ - regtest/commands/__init__.py | 4 ++-- - regtest/commands/create-refs.py | 2 ++ - regtest/commands/create-report.py | 2 ++ - regtest/commands/find-regression.py | 4 +++- - regtest/commands/run-tests.py | 6 ++++-- - regtest/main.py | 8 ++++---- - regtest/poppler-regtest | 2 +- - 8 files changed, 20 insertions(+), 10 deletions(-) - -commit 44cf2de0df351d5948893f6a4e2bca1168d16b70 -Author: Dominik Haumann -Date: Thu Dec 12 23:12:35 2013 +0100 - - Arthur font rendering improvements - - The patch does does the following: - - use NoPen to fill the glyphs - - since SplashPath seems to bitwise OR stop and start of path, - closing a subpath needs to happen before starting a path. - - Arthur needs serious work but this is a definite improvement in all - the files i've tried it on - - qt4/src/ArthurOutputDev.cc | 18 +++++++++--------- - qt5/src/ArthurOutputDev.cc | 18 +++++++++--------- - 2 files changed, 18 insertions(+), 18 deletions(-) - -commit 02863f683be4543a2af6c26d53be93785d2b836a -Author: Albert Astals Cid -Date: Thu Dec 12 23:09:43 2013 +0100 - - qt: Simple silly test program to save to file - - Allows us to do some quick arthur testing - - qt4/tests/CMakeLists.txt | 1 + - qt4/tests/Makefile.am | 8 ++++- - qt4/tests/test-render-to-file.cpp | 69 - +++++++++++++++++++++++++++++++++++++++ - qt5/tests/CMakeLists.txt | 1 + - qt5/tests/Makefile.am | 8 ++++- - qt5/tests/test-render-to-file.cpp | 69 - +++++++++++++++++++++++++++++++++++++++ - 6 files changed, 154 insertions(+), 2 deletions(-) - -commit 018892d4ceccd5e2994cdb74cd2d401293fc929d -Author: Albert Astals Cid -Date: Wed Dec 11 23:05:53 2013 +0100 - - 0.25.0 - - CMakeLists.txt | 6 +++--- - configure.ac | 4 ++-- - cpp/Doxyfile | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/Doxyfile | 2 +- - qt5/src/Doxyfile | 2 +- - 6 files changed, 9 insertions(+), 9 deletions(-) - -commit a1b99b26da9124fa55f773af55ae7382bd911d47 -Author: Albert Astals Cid -Date: Wed Dec 11 23:00:00 2013 +0100 - - NEWS - - NEWS | 23 +++++++++++++++++++++++ - 1 file changed, 23 insertions(+) - -commit 10a0c45676ef56bee5924e889a7e7c21244b4339 -Author: Albert Astals Cid -Date: Tue Dec 10 20:48:36 2013 +0100 - - Update copyrights - - cpp/poppler-image.cpp | 1 + - goo/PNGWriter.cc | 2 +- - poppler/MarkedContentOutputDev.cc | 2 ++ - poppler/MarkedContentOutputDev.h | 2 ++ - poppler/Object.h | 1 + - poppler/PDFDoc.h | 1 + - utils/ImageOutputDev.h | 2 +- - 7 files changed, 9 insertions(+), 2 deletions(-) - -commit 6c0e7d35f273583acc2aa818860e3120b0cab64f -Author: Thomas Freitag -Date: Tue Dec 10 20:14:39 2013 +0100 - - correction for knockout transparency groups - - Fixes test "G" in eci_altona-test-suite-v2_technical2_x4.pdf - - poppler/SplashOutputDev.cc | 18 ++++++++++--- - splash/Splash.cc | 63 - +++++++++++++++++++++++++++++++++------------ - splash/SplashFTFontEngine.h | 3 +++ - splash/SplashFontEngine.cc | 13 ++++++++++ - splash/SplashFontEngine.h | 5 ++++ - 5 files changed, 82 insertions(+), 20 deletions(-) - -commit f77bc21813ae7234ec4ce94ce4e92230fe5c174a -Merge: 06e9dc91 58e04a08 -Author: Albert Astals Cid -Date: Sat Dec 7 16:56:11 2013 +0000 - - Merge remote-tracking branch 'origin/poppler-0.24' - - Conflicts: - utils/pdfimages.cc - utils/pdfinfo.cc - utils/pdfseparate.cc - -commit 06e9dc917650f562cd6f6666190a8c25756514a3 -Author: Albert Astals Cid -Date: Sat Dec 7 16:39:02 2013 +0000 - - Compile++ - - CMakeLists.txt | 2 ++ - 1 file changed, 2 insertions(+) - -commit 58e04a08afee39370283c494ee2e4e392fd3b684 -Author: Fabio D'Urso -Date: Sat Dec 7 16:33:09 2013 +0000 - - segExtraBytes is a goffset not an int so use lld - - Fixes KDE bug #328511 - - poppler/JBIG2Stream.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 3335d5e52fd7527bba7368ad6e87f1188808582f -Author: Carlos Garcia Campos -Date: Fri Dec 6 17:28:13 2013 +0100 - - regtest: Limit the stderr files to ~1MB - - Some tests send a lot of information to stderr, usually due to parsing - errors in buggy documents. More than 1MB of stderr output is - diffcult to - hanlde and in most cases it's redundant with a lot of duplicated - messages. - This patch reduced the size of the refs dir for the complete test - suite - by 1GB. - - regtest/backends/__init__.py | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -commit 24107ac47625438837d7c29053bff795f986a6bb -Author: Carlos Garcia Campos -Date: Fri Dec 6 13:24:47 2013 +0100 - - regtest: Save checksum results sorted in md5 files - - We are using os.listdir() to get the list of test results that returns - files in arbitrary order. - - regtest/backends/__init__.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit f1c9993d58fb9d191a7b3e26bfcaf7b5eec5323d -Author: Carlos Garcia Campos -Date: Fri Dec 6 13:03:24 2013 +0100 - - regtest: Show also the tests expected to crash/fail to run but - don't fail - - regtest/TestRun.py | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -commit 64d1e79c863d12b12b87ed0e3139d364f503e026 -Author: Carlos Garcia Campos -Date: Fri Dec 6 12:51:48 2013 +0100 - - regtest: Improve readability of test results - - Show a summary of tests failed per backend with the percentages and - use a - new line for every test in the result instead of using a comma - separated - line. - - regtest/TestRun.py | 67 - ++++++++++++++++++++++++++++++++++++++---------------- - 1 file changed, 47 insertions(+), 20 deletions(-) - -commit c35bc1da9402896c88999f9cffed6962a265f32e -Author: Carlos Garcia Campos -Date: Fri Dec 6 10:04:48 2013 +0100 - - glib-demo: Increase the default size of the main window - - Some demos like annots that show a document view use more space than - they used to, requiring to manually resize the window everytime. - - glib/demo/main.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit ab7da0bf62bb5032c4683d9cd841075d26045aae -Author: Germán Poo-Caamaño -Date: Mon Oct 28 22:52:22 2013 -0700 - - glib-demo: Add Square and Circle annotations demo - - https://bugs.freedesktop.org/show_bug.cgi?id=70983 - - glib/demo/annots.c | 19 +++++++++++++++++++ - 1 file changed, 19 insertions(+) - -commit 2ec450567f27bba3ee4a08b5e69b7c9605bea4bb -Author: Germán Poo-Caamaño -Date: Mon Oct 28 22:48:39 2013 -0700 - - glib: Add implementation of Square and Circle annotations - - Square and Circle only differ in the constructor which defines - the subtype. Therefore, it uses the same name than Poppler's - Geometry class. - - https://bugs.freedesktop.org/show_bug.cgi?id=70983 - - glib/poppler-annot.cc | 263 - ++++++++++++++++++++++++++++++++---- - glib/poppler-annot.h | 23 ++++ - glib/poppler-page.cc | 6 + - glib/poppler-private.h | 2 + - glib/poppler.h | 2 + - glib/reference/poppler-sections.txt | 16 +++ - 6 files changed, 286 insertions(+), 26 deletions(-) - -commit e109cf2461d5be93d004593123d875a28fd79b61 -Author: Carlos Garcia Campos -Date: Tue Nov 26 20:12:22 2013 +0100 - - annots: Make Annot::setBorder receive an AnnotBorder object - - Instead of receiving AnnotBorderArray. Also implement writeToObject in - both AnnotBorderArray and AnnotBorderBS to make sure that - Annot::setBorder will work for both cases. - - poppler/Annot.cc | 51 +++++++++++++++++++++++++++++++++++++++++++++------ - poppler/Annot.h | 10 +++++++--- - 2 files changed, 52 insertions(+), 9 deletions(-) - -commit 3979b82982e84107d93fbbe95350bf25ce47398d -Author: Carlos Garcia Campos -Date: Tue Nov 26 14:44:57 2013 +0100 - - annots: Use a default border for annots that can have a BS entry - - According to the spec if neither the Border nor the BS entry is - present, - the border shall be drawn as a solid line with a width of 1 point. - However, acroread seems to ignore the Border entry for annots - that can't - have a BS entry. - - poppler/Annot.cc | 223 - ++++++++++++++++++++++++++++++++----------------------- - 1 file changed, 132 insertions(+), 91 deletions(-) - -commit 36c07c82bdff010695c5d615b67506922522d0e8 -Author: Carlos Garcia Campos -Date: Tue Nov 26 14:07:21 2013 +0100 - - annots: Add helper function Annot::setLineStyleForBorder - - It sets the line dash and width based on the given AnnotBorder. Use it - only when the border width is greater than 0 for FreeText annotations - and always for annotations that use the border to set the line - width and - dash, but don't draw a border. - - poppler/Annot.cc | 110 - ++++++++++++++++--------------------------------------- - poppler/Annot.h | 1 + - 2 files changed, 32 insertions(+), 79 deletions(-) - -commit e7b1ff97318fd6c3a8fed3a33d45f1cb55208b28 -Author: Carlos Garcia Campos -Date: Tue Nov 26 11:40:57 2013 +0100 - - annots: Remove unused typeUnknown AnnotBorderType from AnnotBorder - - Also make the AnnotBorder constructor protected to make sure it's not - possible to create AnnotBorder instances. - - poppler/Annot.cc | 3 --- - poppler/Annot.h | 12 ++++++++---- - 2 files changed, 8 insertions(+), 7 deletions(-) - -commit 17b2623360ed8917e94a8e5b880e92e6db70335e -Author: Adrian Perez de Castro -Date: Tue Jun 18 00:35:51 2013 +0300 - - Tagged-PDF: Text content extraction from structure elements - - Implement StructElement::getText(), by using MCOutputDev. This - output device - captures pieces of text (aka "spans") which have the same attributes - into - a list of TextSpan objects. - - https://bugs.freedesktop.org/show_bug.cgi?id=64815 - - poppler/Makefile.am | 2 + - poppler/MarkedContentOutputDev.cc | 210 - ++++++++++++++++++++++++++++++++++++++ - poppler/MarkedContentOutputDev.h | 128 +++++++++++++++++++++++ - poppler/StructElement.cc | 50 +++++++++ - poppler/StructElement.h | 28 +++++ - 5 files changed, 418 insertions(+) - -commit 2c4320c26744ea28be10eac7cc54980c9eb4fc27 -Author: Carlos Garcia Campos -Date: Tue Dec 3 19:07:09 2013 +0100 - - glib-demo: Show number of charcters and text layout units in text demo - - It helps to easily detect the cases where these values mismatch. - - glib/demo/text.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 98d75dcdb9b73feb6f35d8ad76f5d0c428289f91 -Author: Jason Crain -Date: Sat Nov 30 17:29:50 2013 +0100 - - Limit use of ZapfDingbats character names - - Some PDFs use names from ZapfDingbats (a1-a206) without intending for - them to be used for text extraction. Only use these character names - to locate glyphs or for text extraction with ZapfDingbats fonts. - - Bug #60243 - - goo/GooString.cc | 10 ++ - goo/GooString.h | 4 + - poppler/GfxFont.cc | 15 +- - poppler/GlobalParams.cc | 33 +++- - poppler/GlobalParams.h | 16 +- - poppler/NameToUnicodeTable.h | 415 - ++++++++++++++++++++++--------------------- - 6 files changed, 274 insertions(+), 219 deletions(-) - -commit 817cc333ca8009998f2099583fd0a2fc703f3db3 -Author: Carlos Garcia Campos -Date: Fri Nov 29 10:07:16 2013 +0100 - - regtest: Do not buffer stderr output - - Some buggy documents can produce a huge stderr output because - of parsing - errors or whatever. We could give a file directly to Popen to - write the - stderr file, but we only want to create the file when there's output, - because it's what we use to know whether the command produced - output or - not. So, instead of buffering the whole output and then write it - to the - file, now we read from the pipe while the command is running, writing - the output in chunks to the file. This improves a lot the memory - consumption when running some tests. - - regtest/backends/__init__.py | 40 - ++++++++++++++++++++++++++++++---------- - 1 file changed, 30 insertions(+), 10 deletions(-) - -commit f8f82f1cc3a948239a05d7762210a3f244299db6 -Author: Carlos Garcia Campos -Date: Fri Nov 29 10:03:24 2013 +0100 - - regtest: Read test results in chunks to get the md5 digest - - Some backends can generate huge results, like huge postscript - files that - we don't want to load in memory to get the md5. So, instead of - creating - thr md5 object with the entire file, we feed it with chunks of data - using the update method. This improves a lot the memory consumption - and - performance as well. - - regtest/backends/__init__.py | 19 ++++++++++++------- - 1 file changed, 12 insertions(+), 7 deletions(-) - -commit 3444a44397a890dbeb1bd10357dbc8246fd21ad0 -Author: Carlos Garcia Campos -Date: Fri Nov 29 10:01:20 2013 +0100 - - regtest: Remove unused method _check_exit_status2 - - It was used when the backends ran in parallel odd and even pages, but - it's no longer used since threads support was added. - - regtest/backends/__init__.py | 20 -------------------- - 1 file changed, 20 deletions(-) - -commit 5f825df417947c51943f1db327e1aa6c3faa15b0 -Author: Carlos Garcia Campos -Date: Fri Nov 29 09:57:57 2013 +0100 - - regtest: Do not store the current line in Printer but only its length - - We are not using the line text anymore, but only the length. - - regtest/Printer.py | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -commit 1486d93f0f6418b37ccc57568717d9349a79935b -Author: Carlos Garcia Campos -Date: Wed Nov 27 18:29:36 2013 +0100 - - regtest: Do not consider docs with no refs as skipped - - Handle them differently as new docs, and show them in the summary - suggesting to use create-refs command to include them in the test - suite. - - regtest/TestRun.py | 40 +++++++++++++++++++++++----------------- - 1 file changed, 23 insertions(+), 17 deletions(-) - -commit 5241c0cc730c380dc44c3a081e1de675e1915861 -Author: Carlos Garcia Campos -Date: Wed Nov 27 17:18:37 2013 +0100 - - regtest: Use number of tests run to show the progress - - Instead of using the number of document tested. We don't really - need to - set a number to a particular document, we only want to know the - progress - of the whole process. This ensures that the progress is shown in the - correct order. It also simplifies the code a bit. - Also improved the output formatting to make it easier to read. - - regtest/Printer.py | 44 ++++----------- - regtest/TestReferences.py | 50 +++++++++++------ - regtest/TestRun.py | 136 - +++++++++++++++++++++++++--------------------- - 3 files changed, 118 insertions(+), 112 deletions(-) - -commit 0af3e009a702d0c6ca716565ab87b386baa0a1ed -Author: Albert Astals Cid -Date: Wed Nov 27 00:53:16 2013 +0100 - - 0.24.4 - - CMakeLists.txt | 4 ++-- - NEWS | 18 ++++++++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/Doxyfile | 2 +- - qt5/src/Doxyfile | 2 +- - 7 files changed, 25 insertions(+), 7 deletions(-) - -commit a42a13be0a0cda71dc230a73f7b16eb4eb066251 -Author: suzuki toshiya -Date: Wed Nov 27 00:05:57 2013 +0100 - - Warn the user if he provides a wrong range - - utils/pdffonts.cc | 7 +++++++ - utils/pdfimages.cc | 7 +++++++ - utils/pdfinfo.cc | 7 +++++++ - utils/pdfseparate.cc | 7 +++++++ - utils/pdftocairo.cc | 7 +++++++ - utils/pdftohtml.cc | 8 +++++++- - utils/pdftoppm.cc | 7 +++++++ - utils/pdftops.cc | 7 +++++++ - utils/pdftotext.cc | 6 ++++++ - 9 files changed, 62 insertions(+), 1 deletion(-) - -commit 45552cafaeef6b883078db269437586add1dc32c -Author: Albert Astals Cid -Date: Tue Nov 26 23:36:12 2013 +0100 - - Update copyrights - - utils/pdftotext.cc | 1 + - 1 file changed, 1 insertion(+) - -commit f20fe89d4f5a8f768e2019f25cecf40cd0e4f5f8 -Author: Carlos Garcia Campos -Date: Mon Nov 25 09:05:41 2013 +0100 - - glib-demo: Add an area selector to text demo - - And use the for_area variants of the API to get the text, text layout - and text attributes. - - glib/demo/text.c | 114 - +++++++++++++++++++++++++++++++++++++++++++++++++++++-- - 1 file changed, 110 insertions(+), 4 deletions(-) - -commit bb2b7fb491fb72f0ea024d80df89680ede3457b4 -Author: Carlos Garcia Campos -Date: Mon Nov 25 09:04:30 2013 +0100 - - glib: Add API to get text, text layout and text attributes for a - given area - - glib/poppler-page.cc | 107 - ++++++++++++++++++++++++++++++++++-- - glib/poppler-page.h | 8 +++ - glib/reference/poppler-sections.txt | 3 + - 3 files changed, 113 insertions(+), 5 deletions(-) - -commit f662973b0da52da84acc3668a0e037ee72498193 -Author: Carlos Garcia Campos -Date: Sat Nov 2 14:07:07 2013 +0100 - - TextOutputDev: Honor the selection rectangle passed to - TextPage::getSelectionWords() - - Make TextPage::getSelectionWords() return a list of TextWordSelection - instead of a list of TextWord so that it's possible to know which - characters of the word are inside the given selection rectangle. - Adapt the glib frontend to the new API and use the selection bounds - instead of the whole word to build the list of characters in - poppler_page_get_text_layout() and poppler_page_get_text_attributes(), - which ensures the number of glyphs returned is in sync with the number - of characters returned by poppler_page_get_text(). - - https://bugs.freedesktop.org/show_bug.cgi?id=71160 - - glib/poppler-page.cc | 22 ++++++++++++++-------- - poppler/TextOutputDev.cc | 40 ++++++++-------------------------------- - poppler/TextOutputDev.h | 20 ++++++++++++++++++++ - 3 files changed, 42 insertions(+), 40 deletions(-) - -commit 18fab454c59b1c77c691617aaef99245eacd83b5 -Author: Germán Poo-Caamaño -Date: Mon Oct 28 22:41:41 2013 -0700 - - glib-demo: Simplify annotations list and its properties - - * Move the annotation's rectangle to properties to make the - list view of annotations cleaner. - * Remove duplicated information: flags and page are already - present in the UI. - - https://bugs.freedesktop.org/show_bug.cgi?id=70982 - - glib/demo/annots.c | 70 - ++++++++++++------------------------------------------ - 1 file changed, 15 insertions(+), 55 deletions(-) - -commit 770a7ac9833a3c4f4f0399093272d4d0bdc7923b -Merge: e7a0f2b9 9ae29c7a -Author: Albert Astals Cid -Date: Thu Nov 21 23:58:29 2013 +0100 - - Merge remote-tracking branch 'origin/poppler-0.24' - -commit 9ae29c7a07d0f372dbfc4aca17bbb646126aedb5 -Author: Thomas Freitag -Date: Thu Nov 21 23:53:53 2013 +0100 - - Don't end loop if reading from GooFile fails - - Bug #71835 - - poppler/Stream.cc | 3 +++ - 1 file changed, 3 insertions(+) - -commit e7a0f2b942fe621304275175324f7809d1c83d80 -Author: Hib Eris -Date: Wed Nov 20 00:43:27 2013 +0100 - - Fix warning on signed/unsigned comparison in GfxState.cc - - Bug #71641 - - poppler/GfxState.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit c784c4c3a582aaa4e10c223665cb876e12b7c16f -Author: Germán Poo-Caamaño -Date: Mon Nov 18 00:57:53 2013 -0800 - - glib-demo: Add support for simple line annotations - - https://bugs.freedesktop.org/show_bug.cgi?id=70981 - - glib/demo/annots.c | 99 - +++++++++++++++++++++++++++++++++++++++++++++++++----- - 1 file changed, 91 insertions(+), 8 deletions(-) - -commit 2d164e06b8a84ade6689d85bba2d606c66bf62a9 -Author: Germán Poo-Caamaño -Date: Mon Nov 18 00:48:13 2013 -0800 - - glib-demo: add color selection for new annotations - - https://bugs.freedesktop.org/show_bug.cgi?id=71727 - - glib/demo/annots.c | 34 ++++++++++++++++++++++++++++++++++ - 1 file changed, 34 insertions(+) - -commit 7127a2c705787f6f44b0852efeabe9fdeae7e2c0 -Author: Germán Poo-Caamaño -Date: Sun Nov 17 23:38:32 2013 -0800 - - glib: Add support for simple line annotations - - https://bugs.freedesktop.org/show_bug.cgi?id=70981 - - glib/poppler-annot.cc | 79 - +++++++++++++++++++++++++++++++++++++ - glib/poppler-annot.h | 12 ++++++ - glib/poppler-page.cc | 3 ++ - glib/poppler-private.h | 1 + - glib/poppler.h | 1 + - glib/reference/poppler-sections.txt | 7 ++++ - 6 files changed, 103 insertions(+) - -commit 451bac9f05bab18f3aa0392ddf6eb6b569004cb8 -Author: Germán Poo-Caamaño -Date: Sun Nov 17 23:30:14 2013 -0800 - - glib: Add PopplerPoint boxed type - - https://bugs.freedesktop.org/show_bug.cgi?id=70981 - - glib/poppler-page.cc | 54 - +++++++++++++++++++++++++++++++++++++ - glib/poppler-page.h | 20 ++++++++++++++ - glib/poppler.h | 1 + - glib/reference/poppler-sections.txt | 5 ++++ - 4 files changed, 80 insertions(+) - -commit c01cee165392ba8297e4168111a66d2acb272a99 -Merge: 07c25548 47605a8a -Author: Albert Astals Cid -Date: Mon Nov 18 22:58:28 2013 +0100 - - Merge remote-tracking branch 'origin/poppler-0.24' - - Conflicts: - poppler/Catalog.cc - poppler/Catalog.h - -commit 47605a8aaf85bee21601219b04c0c8e6cf982507 -Author: José Aliste -Date: Mon Nov 18 22:52:08 2013 +0100 - - Catalog: sort entries of NameTrees to make sure lookup works - - Bug #26049 - - poppler/Catalog.cc | 12 ++++++++++++ - poppler/Catalog.h | 2 ++ - 2 files changed, 14 insertions(+) - -commit 07c255482f7ec8a8cfd4eaeaf7b07de317bbcc7a -Author: Germán Poo-Caamaño -Date: Sun Oct 27 13:30:22 2013 -0700 - - glib-demo: Add annotations interactively - - * Prepare UI to add multiple annotations type. - * Remove dialog and button add annotations. - - https://bugs.freedesktop.org/show_bug.cgi?id=69978 - - glib/demo/annots.c | 348 - ++++++++++++++++++++++++++++++++--------------------- - 1 file changed, 213 insertions(+), 135 deletions(-) - -commit 4b7c91ea697359751f9abe9ec5e63021c90a60ed -Author: Germán Poo-Caamaño -Date: Sat Sep 28 23:18:07 2013 -0700 - - glib: Add getter and setter for annotation's rectangle - - Annotation objects contain at least two keys, Rect and Subtype. - The former has the coordinates where the annotation is placed. - The getter and setter allows to obtain and modify the position - of a given annotation. - - https://bugs.freedesktop.org/show_bug.cgi?id=70901 - - glib/poppler-annot.cc | 48 - +++++++++++++++++++++++++++++++++++++ - glib/poppler-annot.h | 4 ++++ - glib/reference/poppler-sections.txt | 2 ++ - 3 files changed, 54 insertions(+) - -commit 491f0a170c72271a7a9ce049fbcfe81f08cff162 -Author: suzuki toshiya -Date: Fri Nov 15 20:35:12 2013 +0100 - - pdftotext: Escape the text of the xml headers - - utils/pdftotext.cc | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -commit 4da94680d4d2d6b1bd3351d476a20f9c7ae565bc -Merge: 3ea3d7c6 78c407ac -Author: Albert Astals Cid -Date: Fri Nov 15 20:27:00 2013 +0100 - - Merge remote-tracking branch 'origin/poppler-0.24' - -commit 3ea3d7c6c7a0ede76428204ec11aec3a844117fc -Author: Hib Eris -Date: Fri Nov 15 19:59:52 2013 +0100 - - pdftotext: Silence warning for may be used uninitialized variable - - Bug #71640 - - utils/pdftotext.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 97910b9eb92df49757915bde02e0d54de04552d4 -Author: Hib Eris -Date: Fri Nov 15 19:55:19 2013 +0100 - - Do not close stdout in pdftotext - - Bug #71639 - - utils/pdftotext.cc | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -commit 78c407ac7e8f48ae2d2c75ad0f5960390190d2e3 -Author: Albert Astals Cid -Date: Fri Nov 15 20:25:52 2013 +0100 - - destionation -> destination - - And this is why the xml based api has to die - - Bug #71643 - Found by Hib - - qt4/src/poppler-annotation.cc | 5 +++-- - qt5/src/poppler-annotation.cc | 3 ++- - 2 files changed, 5 insertions(+), 3 deletions(-) - -commit a23c9ad4c0536d680bedc563444ce3adf6e1ee9e -Author: Hib Eris -Date: Fri Nov 15 11:38:45 2013 +0100 - - Silence warning for may be used uninitialized variable in - ImageOutputDec.cc - - Fixes warning: - - CXX ImageOutputDev.lo - ImageOutputDev.cc: In member function 'void - ImageOutputDev::writeImageFile(ImgWriter*, - ImageOutputDev::ImageFormat, const char*, Stream*, int, int, - GfxImageColorMap*)': - ImageOutputDev.cc:409:28: warning: 'imgStr' may be used uninitialized - in this function [-Wmaybe-uninitialized] - - Bug #71642 - - utils/ImageOutputDev.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit c43a80e65fc570a8017892ba111a8c48ac33d9ad -Author: Hib Eris -Date: Fri Nov 15 19:59:52 2013 +0100 - - pdftotext: Silence warning for may be used uninitialized variable - - Bug #71640 - - utils/pdftotext.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit f905d804c0d1c715d8423938f41b5a002c0ef15d -Author: Hib Eris -Date: Fri Nov 15 19:55:19 2013 +0100 - - Do not close stdout in pdftotext - - Bug #71639 - - utils/pdftotext.cc | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -commit 33e703ac9bb6cf69664d6c6fddd3bebd56336074 -Merge: 8294d18e 7c74bccd -Author: Albert Astals Cid -Date: Fri Nov 15 19:50:10 2013 +0100 - - Merge remote-tracking branch 'origin/poppler-0.24' - -commit 7c74bccdf514cce05987dde7fb1cce4ac65ff025 -Author: Albert Astals Cid -Date: Fri Nov 15 19:48:07 2013 +0100 - - Forgot to update the copyrights - - poppler/Lexer.cc | 2 +- - poppler/Lexer.h | 2 +- - poppler/Parser.cc | 2 +- - poppler/Parser.h | 2 +- - 4 files changed, 4 insertions(+), 4 deletions(-) - -commit ebe49d597a62aa94601c2e4595dbad1895ea7ef0 -Author: Albert Astals Cid -Date: Fri Nov 15 19:33:00 2013 +0100 - - Fix regression in broken endstream detection - - Rregression was caused by e1ffa9100cf6b4a444be7ed76b11698a5c5bb441 - Fixes bug #70854 - - poppler/Lexer.cc | 4 ++-- - poppler/Lexer.h | 2 +- - poppler/Parser.cc | 11 ++++------- - poppler/Parser.h | 2 +- - 4 files changed, 8 insertions(+), 11 deletions(-) - -commit 8294d18ea96bd18be076bccbdbdaa015fc48aa12 -Author: Adrian Perez de Castro -Date: Thu Sep 26 20:46:34 2013 +0300 - - Tagged-PDF: Parsing of StructElem standard types and attributes - - Parse attributes and standard types of StructElem nodes of the - document structure tree. Type name aliases are resolved via the - RoleMap (and cycles detected). Both standard attributes and user - properties are mapped to instances of the Attribute class. - Attributes are parsed both via ClassMap references and directly - referenced from the StructElem objects. - - https://bugs.freedesktop.org/show_bug.cgi?id=64815 - - poppler/StructElement.cc | 1018 - +++++++++++++++++++++++++++++++++++++++++++++- - poppler/StructElement.h | 113 ++++- - 2 files changed, 1126 insertions(+), 5 deletions(-) - -commit 4e0cbd37b964107c0fb531d48876a33ae843bf27 -Author: suzuki toshiya -Date: Mon Nov 11 22:46:07 2013 +0100 - - pdftohtml: Add -? and --help - - utils/pdftohtml.cc | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -commit 4dbd36f5b35dd0964e59d942242aecdc6b474c89 -Author: Andres Gomez -Date: Tue Nov 5 09:52:23 2013 +0200 - - glib-demo: Fix conding style issue in main.c - - https://bugs.freedesktop.org/show_bug.cgi?id=71245 - - glib/demo/main.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 02f3c235eaf60350c98e88dbe266378fccef59d7 -Author: Andres Gomez -Date: Tue Nov 5 09:52:23 2013 +0200 - - glib-demo: Fix a typo in function name - - https://bugs.freedesktop.org/show_bug.cgi?id=71245 - - glib/demo/main.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit 5620b82e69335b7f12d877a24f1a463604f0e515 -Author: Andres Gomez -Date: Tue Nov 5 09:52:23 2013 +0200 - - glib-demo: Fix trailing whitespaces in main.c - - https://bugs.freedesktop.org/show_bug.cgi?id=71245 - - glib/demo/main.c | 14 +++++++------- - 1 file changed, 7 insertions(+), 7 deletions(-) - -commit 43309d92d327b4ae8e89edb15482247045d726a4 -Author: Germán Poo-Caamaño -Date: Sat Sep 28 20:45:32 2013 -0700 - - glib-demo: Make the Remove annotation button prominent in demo - - Move out from Annotation properties to the top. This make better - use of the space. - Make the remove button active only if there is an annotation - selected. - - https://bugs.freedesktop.org/show_bug.cgi?id=69978 - - glib/demo/annots.c | 22 +++++++++++++--------- - 1 file changed, 13 insertions(+), 9 deletions(-) - -commit f4a72fd3c61091d6b455af9a881c2390da19b506 -Author: Albert Astals Cid -Date: Sat Oct 26 19:06:34 2013 +0200 - - 0.24.3 - - CMakeLists.txt | 2 +- - NEWS | 14 ++++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - qt4/src/Doxyfile | 2 +- - qt5/src/Doxyfile | 2 +- - 6 files changed, 19 insertions(+), 5 deletions(-) - -commit 33a5af32cd5769cf1b6c6344077ac4a3f407ba21 -Author: Albert Astals Cid -Date: Sat Oct 26 18:48:50 2013 +0200 - - Update copyrights - - qt4/src/poppler-document.cc | 2 +- - utils/pdfseparate.cc | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit 9f09b9596f1fc52481914019d68c8f9b85b5c438 -Merge: bd893d4a 61f79b84 -Author: Albert Astals Cid -Date: Thu Oct 24 01:03:02 2013 +0200 - - Merge remote-tracking branch 'origin/poppler-0.24' - -commit 61f79b8447c3ac8ab5a26e79e0c28053ffdccf75 -Author: Albert Astals Cid -Date: Thu Oct 24 00:54:56 2013 +0200 - - Allow only one %d in the filename - - Fixes crashes if you had %s and similar in the filename - - Inspired from patch by Pedro Ribeiro - - Bug #69434 - - utils/pdfseparate.cc | 31 ++++++++++++++++++++++++++++++- - 1 file changed, 30 insertions(+), 1 deletion(-) - -commit bd893d4a543a6cc3a525655f37def38440944f28 -Merge: 93e8b05f daa0990a -Author: Albert Astals Cid -Date: Thu Oct 10 02:19:34 2013 +0200 - - Merge remote-tracking branch 'origin/poppler-0.24' - -commit daa0990a7baf17d00d12574a4de815e070727a86 -Author: Albert Astals Cid -Date: Thu Oct 10 02:16:25 2013 +0200 - - Return empty if getXRef()->copy() fails - - Seems this can happen by looking at the backtrace in - https://bugs.kde.org/show_bug.cgi?id=325810 - - qt4/src/poppler-document.cc | 6 ++++++ - qt5/src/poppler-document.cc | 6 ++++++ - 2 files changed, 12 insertions(+) - -commit f4bfa940aa40a82a1080cdaf765da1d1615ccfb1 -Author: Carlos Garcia Campos -Date: Sat Oct 5 11:20:04 2013 +0200 - - cairo: Do not set an invalid matrix in drawImage() - - https://bugs.freedesktop.org/show_bug.cgi?id=70085 - - poppler/CairoOutputDev.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 93e8b05fb2a6d225f048db6a3a735717433a5a13 -Author: Carlos Garcia Campos -Date: Sat Oct 5 11:20:04 2013 +0200 - - cairo: Do not set an invalid matrix in drawImage() - - https://bugs.freedesktop.org/show_bug.cgi?id=70085 - - poppler/CairoOutputDev.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 3084f8f4a5ad55937094b14e30169dccf1fa4ec9 -Author: Germán Poo-Caamaño -Date: Sat Sep 21 11:59:32 2013 -0700 - - glib-demo: Expand short names for annotations used in demo - - https://bugs.freedesktop.org/show_bug.cgi?id=69978 - - glib/demo/annots.c | 10 +++++----- - glib/demo/main.c | 2 +- - 2 files changed, 6 insertions(+), 6 deletions(-) - -commit ff674f57a3587142165fd56aec089d9840ceda36 -Author: Germán Poo-Caamaño -Date: Fri Sep 27 22:33:42 2013 -0700 - - glib-demo: Merge columns Type and Color in annotations demo - - Reduce the space used by both columns, makes the color - pixbuf smaller enough to give a clue of the annotation - color. - - https://bugs.freedesktop.org/show_bug.cgi?id=69978 - - glib/demo/annots.c | 28 ++++++++++++++++------------ - 1 file changed, 16 insertions(+), 12 deletions(-) - -commit 76d6e2d385e2cbad7f44bc8aee05147efd3970a4 -Author: Germán Poo-Caamaño -Date: Fri Sep 20 23:27:20 2013 -0700 - - glib-demo: Rearrange layout for annotations in demo - - Add render area to visualize the annotations per page. - - https://bugs.freedesktop.org/show_bug.cgi?id=69978 - - glib/demo/annots.c | 130 - ++++++++++++++++++++++++++++++++++++++++++++++++----- - 1 file changed, 118 insertions(+), 12 deletions(-) - -commit a6b1fc1a2ca83b3e4c52bcaa95b99d0289354f4b -Author: Germán Poo-Caamaño -Date: Sun Sep 29 22:50:42 2013 -0700 - - glib-demo: Fix rectangle calculation for new annotations in demo - - https://bugs.freedesktop.org/show_bug.cgi?id=69978 - - glib/demo/annots.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit bd49b3c0c6f2adccc5bda561edbaf9f00ed2917a -Author: Thomas Freitag -Date: Wed Oct 2 23:32:09 2013 +0200 - - Use icc profile in OutputIntents - - Bug #34053 - - poppler/Gfx.cc | 114 +++++++++++--- - poppler/Gfx.h | 8 +- - poppler/GfxState.cc | 429 - +++++++++++++++++++++++++++++++++++++++++----------- - poppler/GfxState.h | 72 ++++++--- - poppler/Page.cc | 2 +- - 5 files changed, 490 insertions(+), 135 deletions(-) - -commit df947a0641082f530200880d46e20cd3e1fd962f -Author: Albert Astals Cid -Date: Wed Oct 2 20:53:32 2013 +0200 - - Compile++ - - CMakeLists.txt | 4 ++++ - 1 file changed, 4 insertions(+) - -commit fa83d7e4f36cfc11c7b4f81f5f5e8ed69eb6dbbe -Author: Daniel Kahn Gillmor -Date: Wed Oct 2 20:35:58 2013 +0200 - - pdfseparate: allow zero-padded pagespecs - - Bug #50914 - - utils/pdfseparate.cc | 22 +++++++++++++++++++--- - 1 file changed, 19 insertions(+), 3 deletions(-) - -commit e04cabd878a0fd84faa5178f423fd828d010b664 -Author: Adrian Perez de Castro -Date: Mon Jun 17 17:00:27 2013 +0300 - - Tagged-PDF: Implement parsing of StructTreeRoot - - Implement parsing of the StructTreeRoot entry of the Catalog. Also, - the - Catalog::getStructTreeRoot() and PDFDoc::getStructTreeRoot() - methods are - modified to return an instance of StructTreeRoot instead of an Object. - - All elements from the StructTreeRoot are parsed except for: - - - IDTree: it is a lookup tree to locate items by their ID, which would - be barely useful because the whole structure tree is to be kept in - memory, which should be fast enough to traverse. - - ParentTreeNextKey: This is needed only when the ParentTree object is - to be modified. For the moment the implementation deals only with - reading, so this has been deliberately left out. - - StructElem tree nodes from the document structure tree are parsed as a - StructElement instance. Attributes and extraction of content out from - elements are not yet handled. - - https://bugs.freedesktop.org/show_bug.cgi?id=64815 - - poppler/Catalog.cc | 36 +++--- - poppler/Catalog.h | 5 +- - poppler/Makefile.am | 4 + - poppler/PDFDoc.h | 3 +- - poppler/StructElement.cc | 322 - ++++++++++++++++++++++++++++++++++++++++++++++ - poppler/StructElement.h | 167 ++++++++++++++++++++++++ - poppler/StructTreeRoot.cc | 174 +++++++++++++++++++++++++ - poppler/StructTreeRoot.h | 83 ++++++++++++ - 8 files changed, 776 insertions(+), 18 deletions(-) - -commit 45e0fe56985f34e695c99a2f6ec1ffe14e239b9e -Author: Adrian Perez de Castro -Date: Thu Sep 26 20:56:52 2013 +0300 - - Implement Object::takeString() method - - Object::takeString() behaves like Object::getString(), but transfers - ownership of the returned string to the caller. Also, it makes - sure that - calling Object::free() afterwards won't free the string that the - Object - is holding. - - poppler/Object.h | 4 ++++ - 1 file changed, 4 insertions(+) - -commit d80eb4a34c218de34633ee2f1b9dfd65504a0ad9 -Author: Thomas Freitag -Date: Tue Oct 1 22:57:55 2013 +0200 - - cache cms values in getGray(), getRGB() and getCMYK() - - Bug #68420 - - poppler/GfxState.cc | 111 - ++++++++++++++++++++++++++++++++++++++++++++++++++++ - poppler/GfxState.h | 2 + - 2 files changed, 113 insertions(+) - -commit 9bc8f3240698d5a8ae4c0129e768840664d28c22 -Merge: a2742c8f e2fe8513 -Author: Albert Astals Cid -Date: Tue Oct 1 19:19:32 2013 +0200 - - Merge remote-tracking branch 'origin/poppler-0.24' - -commit e2fe85137ecb59eb0d177682c552febc64cda643 -Author: Adrian Johnson -Date: Tue Oct 1 19:15:08 2013 +0200 - - Fix PFB font embedding - - Bug #69717 - - poppler/PSOutputDev.cc | 52 - ++++++++++++++++++++++++++++++++++++++++++++------ - 1 file changed, 46 insertions(+), 6 deletions(-) - -commit a2742c8fce0594ccbdb036dd0c29c6e15d2229f3 -Merge: 6b30a521 06dabe1e -Author: Albert Astals Cid -Date: Mon Sep 30 19:32:41 2013 +0200 - - Merge remote-tracking branch 'origin/poppler-0.24' - -commit 06dabe1eed912e5f5c96fe9f371ab459516e5a99 -Author: Albert Astals Cid -Date: Fri Sep 27 12:41:23 2013 +0200 - - 0.24.2 - - CMakeLists.txt | 2 +- - NEWS | 8 ++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - qt4/src/Doxyfile | 2 +- - qt5/src/Doxyfile | 2 +- - 6 files changed, 13 insertions(+), 5 deletions(-) - -commit 78141da189c42a04b6a303767284de755a4a2d4d -Author: Albert Astals Cid -Date: Fri Sep 27 12:39:00 2013 +0200 - - Update copyrights - - utils/pdfseparate.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 6b30a5214e39993025cf2fb9f221e1360de7fa9c -Merge: 4966b6f4 dc344b41 -Author: Albert Astals Cid -Date: Sat Sep 21 10:38:45 2013 +0200 - - Merge remote-tracking branch 'origin/poppler-0.24' - -commit dc344b410f49410174ee902b7649ebd8c2cb0fa2 -Author: Lu Wang -Date: Sat Sep 21 10:37:30 2013 +0200 - - pdftocairo: check file opening failure in beginDocument() - - utils/pdftocairo.cc | 7 +++++++ - 1 file changed, 7 insertions(+) - -commit 4966b6f4193cc9d13f63e92bdc2aac0c8b78298d -Merge: 0f074b16 1e612d33 -Author: Albert Astals Cid -Date: Sat Sep 21 10:15:28 2013 +0200 - - Merge remote-tracking branch 'origin/poppler-0.24' - -commit 1e612d331b79dabec66ad241d7ffe66674a10bc4 -Author: Thomas Freitag -Date: Sat Sep 21 10:10:16 2013 +0200 - - Windows: Fix CreateFile fails with ERROR_SHARING_VIOLATION - - Bug #69597 - - goo/gfile.cc | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -commit 0f074b16317d874fe58d7042f8434282786ca757 -Merge: d2774325 b8682d86 -Author: Pino Toscano -Date: Mon Sep 16 19:53:10 2013 +0200 - - Merge remote-tracking branch 'origin/poppler-0.24' - - Conflicts: - utils/pdfimages.1 - -commit b8682d868ddf7f741e93b791588af0932893f95c -Author: Pino Toscano -Date: Mon Sep 16 19:46:55 2013 +0200 - - pdfseparate: improve the path building - - Make use of snprintf to limit the output to the pathName buffer; - while I'm there, expand its size to 4096 (might help longer paths), - although a better fix would be dynamically allocate its length - (and/or using GooString, maybe). - - utils/pdfseparate.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit d2774325f5248018977d3ab8f8dd7155ed972668 -Author: Adrian Johnson -Date: Sat Sep 14 14:08:11 2013 +0930 - - pdfimages.1: fix typo - - utils/pdfimages.1 | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 9b5957278c7f249fa1010e61a0ed79f0eb20e26d -Author: Adrian Johnson -Date: Sat Aug 31 17:33:25 2013 +0930 - - pdfimages: ensure dump* variables are intialized - - utils/ImageOutputDev.cc | 3 +++ - 1 file changed, 3 insertions(+) - -commit e116ef32504b589001814f0f579309ecf7ec89d9 -Author: Adrian Johnson -Date: Wed Aug 28 08:05:23 2013 +0930 - - Make cpp/poppler-image.cc use goo/NetPBMWriter - - cpp/CMakeLists.txt | 1 - - cpp/Makefile.am | 2 - - cpp/PNMWriter.cc | 119 - -------------------------------------------------- - cpp/PNMWriter.h | 43 ------------------ - cpp/poppler-image.cpp | 14 +++--- - 5 files changed, 6 insertions(+), 173 deletions(-) - -commit a87a11ee6bbd0f5707a3ac34ac2b9cc79f4e92d0 -Author: Adrian Johnson -Date: Thu Aug 29 22:42:34 2013 +0930 - - pdfimages: support cmyk tiff output - - If -tiff is specified, CMYK images will be written as CMYK TIFF files - instead of converting to RGB. If both -png and -tiff are specified (as - is the case with the -all option), CMYK images are written as TIFF and - all other types as PNG. - - utils/ImageOutputDev.cc | 32 +++++++++++++++++++++++++++++++- - utils/ImageOutputDev.h | 3 ++- - utils/pdfimages.1 | 13 ++++++++----- - utils/pdfimages.cc | 3 ++- - 4 files changed, 43 insertions(+), 8 deletions(-) - -commit 63da26f8fb0b2b5ffaa127762d4e36d995c482ee -Author: Thomas Freitag -Date: Tue Aug 27 20:40:29 2013 +0200 - - resolve copy&paste error - - poppler/GfxState.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 563da2d375c003478d398897796ecbf45ce03482 -Author: Albert Astals Cid -Date: Mon Aug 26 22:33:10 2013 +0200 - - 0.24.1 - - CMakeLists.txt | 2 +- - NEWS | 23 +++++++++++++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - qt4/src/Doxyfile | 2 +- - qt5/src/Doxyfile | 2 +- - 6 files changed, 28 insertions(+), 5 deletions(-) - -commit 2c73f1ea9116172692d8350cb7adf1b5376f795c -Author: Albert Astals Cid -Date: Mon Aug 26 21:50:51 2013 +0200 - - Fix typo - - qt5/src/poppler-qt5.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit f58e9b64d5cf62906876c5c0f8da0f3c2c6c2bac -Author: Albert Astals Cid -Date: Mon Aug 26 00:27:59 2013 +0200 - - Some more files Adrian has changed - - goo/PNGWriter.h | 2 +- - utils/HtmlOutputDev.cc | 2 +- - utils/pdftocairo.cc | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - -commit 16da389c61c495111a5a49f62539a423a0655c28 -Author: Adrian Johnson -Date: Mon Aug 26 07:50:51 2013 +0930 - - fix typo in pdfimages.1 - - utils/pdfimages.1 | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 56c0d4f3a231dca141c06493b50ab25959b5b15c -Author: Adrian Johnson -Date: Mon Aug 26 07:47:46 2013 +0930 - - fix typo in pdfimages.1 - - utils/pdfimages.1 | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit af4f2b775946815b572622bf4c4d42ad3aea1141 -Author: Adrian Johnson -Date: Sat Aug 24 21:25:51 2013 +0930 - - pdfimages: Add -all option to write all image in their native format - - utils/pdfimages.1 | 4 ++++ - utils/pdfimages.cc | 23 +++++++++++++++++------ - 2 files changed, 21 insertions(+), 6 deletions(-) - -commit 25e96b6ddbbe54a75ddb97d2e235c1bd6033fe79 -Author: Adrian Johnson -Date: Wed Aug 21 22:22:28 2013 +0930 - - pdfimages: support ccitt output - - poppler/Stream.h | 5 +++++ - utils/ImageOutputDev.cc | 35 +++++++++++++++++++++++++++++++++++ - utils/ImageOutputDev.h | 4 ++++ - utils/pdfimages.1 | 39 ++++++++++++++++++++++++++++++++++++++- - utils/pdfimages.cc | 4 ++++ - 5 files changed, 86 insertions(+), 1 deletion(-) - -commit 086413263cb63a24d9492fbe534fdcc34b45951a -Author: Adrian Johnson -Date: Sun Aug 18 20:37:01 2013 +0930 - - pdfimages: support JBIG2 output - - poppler/JBIG2Stream.h | 1 + - utils/ImageOutputDev.cc | 25 +++++++++++++++++++++++++ - utils/ImageOutputDev.h | 4 ++++ - utils/pdfimages.1 | 13 ++++++++----- - utils/pdfimages.cc | 4 ++++ - 5 files changed, 42 insertions(+), 5 deletions(-) - -commit 2845ebabd00a2755549b8db436e78a3e0e0c0713 -Author: Adrian Johnson -Date: Sun Aug 18 20:07:31 2013 +0930 - - pdfimages: add support for writing JPEG2000 files - - utils/ImageOutputDev.cc | 4 ++++ - utils/ImageOutputDev.h | 4 ++++ - utils/pdfimages.1 | 12 ++++++++---- - utils/pdfimages.cc | 4 ++++ - 4 files changed, 20 insertions(+), 4 deletions(-) - -commit 2021c8ffcb36432049c4305e85ced2ae139086f3 -Author: Adrian Johnson -Date: Sun Aug 18 17:29:00 2013 +0930 - - pdfimages: add support for png and tiff output - - utils/ImageOutputDev.cc | 67 - ++++++++++++++++++++++++++++++++++++++++++++++--- - utils/ImageOutputDev.h | 17 +++++++++++-- - utils/pdfimages.1 | 22 ++++++++++------ - utils/pdfimages.cc | 19 +++++++++++--- - 4 files changed, 110 insertions(+), 15 deletions(-) - -commit 8f466775c77b09a7114c688004317e6db05bcd3f -Author: Adrian Johnson -Date: Sun Aug 18 16:08:02 2013 +0930 - - Change PNGWriter monochrome format to be 8 pixels/byte - - to be consistent with TiffWriter and NetPBMWriter - - goo/PNGWriter.cc | 4 ---- - goo/PNGWriter.h | 2 +- - utils/HtmlOutputDev.cc | 31 +++++++++++++++++++------------ - utils/ImageOutputDev.cc | 9 ++++++--- - utils/pdftocairo.cc | 2 +- - 5 files changed, 27 insertions(+), 21 deletions(-) - -commit e53aec2c61ba42cf0635dc05f8e27e3503c1eaac -Author: Adrian Johnson -Date: Sun Aug 18 15:50:39 2013 +0930 - - Refactor ImageOutputDev to facilitate adding more output formats - - - Move PPM/PBM code into a NetPBMWriter class so PNGWriter and - TiffWritersupport be added. - - - Create generic WriteRawIMage function for writing jpeg files so - support for jpeg2000/jbig2 can be added. - - CMakeLists.txt | 1 + - goo/Makefile.am | 2 + - goo/NetPBMWriter.cc | 84 ++++++++++++++++ - goo/NetPBMWriter.h | 52 ++++++++++ - utils/ImageOutputDev.cc | 261 - +++++++++++++++++++++--------------------------- - utils/ImageOutputDev.h | 15 +-- - 6 files changed, 262 insertions(+), 153 deletions(-) - -commit 0ca0fcc9f536a57365048914cd8a8cc3eb5ed4fd -Author: Adrian Johnson -Date: Sat Aug 17 15:24:43 2013 +0930 - - pdfimages: fix bug in -list output - - Images of type /ImageMask should have type 'stencil'. - - utils/ImageOutputDev.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit f8ee5a931c795013d17f73f083b6e6f9a683d061 -Author: Adrian Johnson -Date: Sat Aug 17 15:17:11 2013 +0930 - - pdfimages: print size, ratio, and ppi - - utils/ImageOutputDev.cc | 100 - ++++++++++++++++++++++++++++++++++++++++++++---- - utils/pdfimages.1 | 12 ++++++ - utils/pdfimages.cc | 2 +- - 3 files changed, 106 insertions(+), 8 deletions(-) - -commit b5321c4f40fb56b10f75c14c5c955c5775cf2ef9 -Author: Thomas Freitag -Date: Sun Aug 25 20:13:12 2013 +0200 - - use getCMYK/DeviceNLine in CMYK mode if available - - Second part of bug 66928 - - poppler/GfxState.cc | 310 - ++++++++++++++++++++++++++++++++++++++++++++- - poppler/GfxState.h | 32 ++++- - poppler/SplashOutputDev.cc | 28 ++-- - splash/SplashTypes.h | 2 - - 4 files changed, 355 insertions(+), 17 deletions(-) - -commit d006ac567e59e82c4c6cb42c5e429a4aa516ac0b -Merge: d391af7e ed3585ef -Author: Albert Astals Cid -Date: Sun Aug 25 19:36:33 2013 +0200 - - Merge remote-tracking branch 'origin/poppler-0.24' - -commit ed3585efc8b259cb065eac361a6a499f9f26851f -Author: William Bader -Date: Sun Aug 25 19:31:11 2013 +0200 - - Fix pdftops -eps -level1sep rendering of a file - - Since 8fb243bf11a979af8bfa36427436940706c9f71d we have - case splashModeXBGR8: - + cSrcNonIso[3] = 255; - and that means splashModeDeviceN8 and splashModeCMYK8 can't - skip their breaks anymore otherwise the cSrcNonIso[3] gets - overwritten - - Bug #68321 - - splash/Splash.cc | 11 +++++++---- - 1 file changed, 7 insertions(+), 4 deletions(-) - -commit d391af7ea63c4bc884bb81895aea0cdd8f8b282a -Author: Albert Astals Cid -Date: Sat Aug 24 14:03:49 2013 +0200 - - Update copyrights - - poppler/Annot.cc | 1 + - poppler/Annot.h | 1 + - poppler/Catalog.cc | 2 ++ - poppler/Catalog.h | 2 ++ - poppler/Form.cc | 2 +- - poppler/Form.h | 1 + - poppler/Page.cc | 1 + - poppler/Page.h | 1 + - utils/pdfinfo.cc | 1 + - 9 files changed, 11 insertions(+), 1 deletion(-) - -commit a47b7f853174d6101f2b882a2db1a7dc95b33293 -Author: Adrian Johnson -Date: Sat Aug 3 10:28:20 2013 +0930 - - Add pdfinfo option to print out javascript - - poppler/Catalog.h | 1 + - utils/JSInfo.cc | 164 - +++++++++++++++++++++++++++++++++++++++++------------- - utils/JSInfo.h | 12 +++- - utils/pdfinfo.1 | 3 + - utils/pdfinfo.cc | 10 ++++ - 5 files changed, 151 insertions(+), 39 deletions(-) - -commit 8f7155e7e3180bb1966a5e7df6af6acdd479939b -Author: Adrian Johnson -Date: Sat Aug 3 09:05:21 2013 +0930 - - pdfinfo: indicate if pdf contains javascript - - poppler/Annot.cc | 27 ++++++++++ - poppler/Annot.h | 8 +++ - poppler/Catalog.cc | 26 +++++++++ - poppler/Catalog.h | 12 +++++ - poppler/Form.cc | 4 ++ - poppler/Form.h | 2 + - poppler/Page.cc | 20 +++++++ - poppler/Page.h | 10 +++- - utils/CMakeLists.txt | 4 ++ - utils/JSInfo.cc | 145 - +++++++++++++++++++++++++++++++++++++++++++++++++++ - utils/JSInfo.h | 50 ++++++++++++++++++ - utils/Makefile.am | 4 ++ - utils/pdfinfo.1 | 3 ++ - utils/pdfinfo.cc | 8 +++ - 14 files changed, 322 insertions(+), 1 deletion(-) - -commit c2453fc1307ebb222747f976e1311ecc5e99abfa -Merge: 3bb8c2e3 70298a02 -Author: Albert Astals Cid -Date: Tue Aug 20 19:53:17 2013 +0200 - - Merge remote-tracking branch 'origin/poppler-0.24' - -commit 70298a021657a72ae80389687a86247144e6d6b6 -Author: Thomas Freitag -Date: Tue Aug 20 19:46:01 2013 +0200 - - Don't copy not needed bitmap - - Speeds up rendering of fixes from bug 67105 - As example one file is down from 130s to 6.5s - - poppler/SplashOutputDev.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 3bb8c2e34039cf473bf72ed9dab55664deab3ab7 -Merge: 71c1d162 fc783300 -Author: Albert Astals Cid -Date: Tue Aug 20 00:41:13 2013 +0200 - - Merge remote-tracking branch 'origin/poppler-0.24' - -commit fc78330072b9771fa39d21896703adb4836e5398 -Author: Albert Astals Cid -Date: Tue Aug 20 00:37:56 2013 +0200 - - use getRGBLine images if available - - Speeds up greatly files from bug #66928 - - E.g. some file went from 21s to 2s in my computer - - poppler/SplashOutputDev.cc | 30 +++++++++++++++++++----------- - 1 file changed, 19 insertions(+), 11 deletions(-) - -commit 71c1d162477a243db07b62ef3c056a2946f8986e -Merge: 7d1de78a 678c7675 -Author: Albert Astals Cid -Date: Sun Aug 18 16:41:20 2013 +0200 - - Merge remote-tracking branch 'origin/poppler-0.24' - -commit 7d1de78ad79162217ee0ca6c2e99ce51017a327d -Merge: 7e0d969d fbea2241 -Author: Albert Astals Cid -Date: Sun Aug 18 16:40:34 2013 +0200 - - Merge commit 'origin/poppler-0.24~1' - - This is merging the revert commits with the "ours" strategy, so - it's virtually - doing nothing other than making the stable branch mergeable again - to master - -commit 678c767584fa80620cc58a1d8a913cb3473209d4 -Author: Albert Astals Cid -Date: Sun Aug 18 16:19:27 2013 +0200 - - Fix crash in 1026.asan.0.42.pdf - - We were not checking that bitmapOff was in bounds - - splash/Splash.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit fbea2241cccdde0106d2c34592b6ddda28a8d848 -Author: Albert Astals Cid -Date: Sat Aug 17 01:32:51 2013 +0200 - - Revert "Tagged-PDF: Accessors in Catalog for the MarkInfo dictionary" - - This reverts commit 402ee8b4e31630a42a0a38db1d39164cc5789f3c. - - No clue how this ended up in the stable branch - - poppler/Catalog.cc | 45 --------------------------------------------- - poppler/Catalog.h | 10 ---------- - 2 files changed, 55 deletions(-) - -commit 6d2771b8a8c0cb0f2288d0900fea3c9edc3dd172 -Author: Albert Astals Cid -Date: Sat Aug 17 01:32:38 2013 +0200 - - Revert "pdfinfo: Use Catalog::getMarkInfo() to show mark info - properties" - - This reverts commit 73cca518c479594e26605196d54b429fbf42dcdc. - - No clue how this ended up in the stable branch - - utils/pdfinfo.cc | 8 ++------ - 1 file changed, 2 insertions(+), 6 deletions(-) - -commit 7e0d969dc2439637ab16e609df8223504316f87d -Merge: 6efc0c7a ef642065 -Author: Albert Astals Cid -Date: Sat Aug 17 01:13:30 2013 +0200 - - Merge remote-tracking branch 'origin/poppler-0.24' - -commit ef6420656c7b88eb22a63ec2cb3e504e0bda0384 -Author: Albert Astals Cid -Date: Sat Aug 17 01:11:37 2013 +0200 - - Fix jpeg image export - - Use same logic than the one used in ImageOutputDev - Bug #48270 - - utils/HtmlOutputDev.cc | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -commit 681f52a572b08c068cb376e5b2dc8a31676aad07 -Author: Albert Astals Cid -Date: Fri Aug 16 23:58:44 2013 +0200 - - Fix exit(1) in 1026.asan.0.42.pdf - - The main crash in discussion with Thomas - - splash/Splash.cc | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -commit 9f4d7796589e4c9c1645fbbcf0cfabd79a71bde9 -Author: Thomas Freitag -Date: Thu Aug 8 20:33:54 2013 +0200 - - use copyString where memory is freed with gfree - - Bug #67666 - - poppler/Annot.cc | 2 +- - poppler/Dict.cc | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit 73cca518c479594e26605196d54b429fbf42dcdc -Author: Adrian Perez de Castro -Date: Thu Apr 25 09:52:56 2013 +0300 - - pdfinfo: Use Catalog::getMarkInfo() to show mark info properties - - utils/pdfinfo.cc | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -commit 402ee8b4e31630a42a0a38db1d39164cc5789f3c -Author: Adrian Perez de Castro -Date: Thu Apr 25 09:52:56 2013 +0300 - - Tagged-PDF: Accessors in Catalog for the MarkInfo dictionary - - poppler/Catalog.cc | 45 +++++++++++++++++++++++++++++++++++++++++++++ - poppler/Catalog.h | 10 ++++++++++ - 2 files changed, 55 insertions(+) - -commit 6efc0c7ad97a82064a1e2c47e0b063b606e56bb7 -Author: Albert Astals Cid -Date: Fri Aug 16 23:31:54 2013 +0200 - - Remove unused xref member - - poppler/OptionalContent.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit cb5160aa74f64b78a20aaed4b89fead850b42e9b -Author: Albert Astals Cid -Date: Fri Aug 16 23:31:17 2013 +0200 - - Remove usnused objectNumberFirst member - - poppler/Hints.h | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -commit a642aad68733c25f4055c268d691eedcf4e14a22 -Author: Albert Astals Cid -Date: Fri Aug 16 23:30:50 2013 +0200 - - PNGWriterPrivate is actually a struct not a class - - goo/PNGWriter.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 31947d413eae115acc147c33fc55b8ab4adccd91 -Author: Thomas Freitag -Date: Tue Aug 13 19:39:30 2013 +0200 - - pdftoppm: Add thinlinemode option setting - - utils/pdftoppm.1 | 12 ++++++++++++ - utils/pdftoppm.cc | 17 +++++++++++++++-- - 2 files changed, 27 insertions(+), 2 deletions(-) - -commit 8a1740b0b6ee4b217ecbe9d0046e4afa491e9f17 -Merge: b27588c4 c3f953dc -Author: Albert Astals Cid -Date: Mon Aug 12 22:47:44 2013 +0200 - - Merge remote-tracking branch 'origin/poppler-0.24' - -commit c3f953dc87f83ac726f99cb8f1f959c486098391 -Author: Yury G. Kudryashov -Date: Sat Aug 10 21:43:57 2013 +0300 - - Fix a typo - - qt4/src/poppler-qt4.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit b27588c4c946ef4f9a62248fbead4dffcb60b4d1 -Author: Yury G. Kudryashov -Date: Mon Aug 12 22:42:13 2013 +0200 - - Fix indentation - - utils/pdftotext.cc | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit b8b5773386ee4f57e72c2b867421cdff8a2eab5a -Merge: 5f9d385d 62d079b4 -Author: Albert Astals Cid -Date: Thu Aug 8 20:47:05 2013 +0200 - - Merge remote-tracking branch 'origin/poppler-0.24' - -commit 62d079b40a2f816f59cc533b1624ea57458331f3 -Author: Yury G. Kudryashov -Date: Thu Aug 8 20:45:08 2013 +0200 - - Fix `pdftotext -bbox in.pdf -` - - Print body text to stdout if invoked as above. - - Bug #45163 - - utils/pdftotext.cc | 15 ++++++--------- - 1 file changed, 6 insertions(+), 9 deletions(-) - -commit 5f9d385dbec3148614b84ae24cae47177e18dbfc -Merge: af450a88 86dbc5f6 -Author: Albert Astals Cid -Date: Thu Aug 8 20:41:25 2013 +0200 - - Merge remote-tracking branch 'origin/poppler-0.24' - -commit 86dbc5f6f850ba3919bed9979386e5a4d0e7dba3 -Author: Yury G. Kudryashov -Date: Thu Aug 8 20:39:30 2013 +0200 - - pdfdetach: don't mention xpdfrc - - - drop -cfg command line argument; the old code passed its value to - GlobalParams constructor which is the data dir, not a cfg file - - remove corresponding lines from pdfdetach.1 - - fix '-enc' documentation in pdfdetach.1 - - utils/pdfdetach.1 | 23 +++-------------------- - utils/pdfdetach.cc | 6 ++---- - 2 files changed, 5 insertions(+), 24 deletions(-) - -commit af450a885ede5a3eac1a12734310722963764d83 -Author: Thomas Freitag -Date: Thu Aug 8 20:33:54 2013 +0200 - - use copyString where memory is freed with gfree - - Bug #67666 - - poppler/Annot.cc | 2 +- - poppler/Dict.cc | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit 030ee12875a562f5976c5569d5c76783aadf89bd -Author: Adrian Perez de Castro -Date: Thu Apr 25 09:52:56 2013 +0300 - - pdfinfo: Use Catalog::getMarkInfo() to show mark info properties - - utils/pdfinfo.cc | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -commit 9a232273988c0d2fd752dc2016e5111227ae6646 -Author: Adrian Perez de Castro -Date: Thu Apr 25 09:52:56 2013 +0300 - - Tagged-PDF: Accessors in Catalog for the MarkInfo dictionary - - poppler/Catalog.cc | 45 +++++++++++++++++++++++++++++++++++++++++++++ - poppler/Catalog.h | 10 ++++++++++ - 2 files changed, 55 insertions(+) - -commit 2724a7b9f723789491b4991ce7fe0cfa3e5488c3 -Author: Carlos Garcia Campos -Date: Tue Jul 30 09:36:44 2013 +0200 - - glib-demo: Remove GTK_DISABLE_DEPRECATED compilation flag - - Deprecations are now compile warnings, there's no reason to make them - fatal. - - glib/demo/Makefile.am | 1 - - 1 file changed, 1 deletion(-) - -commit ef9d861486d54fb3dcf7b8bca01bd44c3b3361a9 -Author: Carlos Garcia Campos -Date: Tue Jul 30 09:36:44 2013 +0200 - - glib-demo: Remove GTK_DISABLE_DEPRECATED compilation flag - - Deprecations are now compile warnings, there's no reason to make them - fatal. - - glib/demo/Makefile.am | 1 - - 1 file changed, 1 deletion(-) - -commit eac752dc25942439de3e1c7a4ff815500a41dd2a -Author: Albert Astals Cid -Date: Mon Jul 29 19:11:55 2013 +0200 - - 0.24.0 - - CMakeLists.txt | 6 +++--- - NEWS | 7 +++++++ - configure.ac | 4 ++-- - cpp/Doxyfile | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/Doxyfile | 2 +- - qt5/src/Doxyfile | 2 +- - 7 files changed, 16 insertions(+), 9 deletions(-) - -commit 892433a068a8a11c09a7c4f57c5fc941747c4453 -Author: Albert Astals Cid -Date: Mon Jul 29 19:08:10 2013 +0200 - - Update Ed's copyright - - poppler/TextOutputDev.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 4637b1581286381c3d1c6963828d9cd8afc5b9e0 -Author: Albert Astals Cid -Date: Mon Jul 29 01:08:06 2013 +0200 - - Make some pdftops conversions *much* faster - - For example: http://ev.kde.org/resources/expense_report.pdf - - Without this patch it seems "infinite", which this patch it's a - few seconds - - The change: Instead of just remembering in xobjStack the set of - XObjects (and Patterns, - the variable name was 'wrong') we are currently setting up (i.e. the - current chain), we - remember all of them. - - This has passed the pdf->ps regression test without a single issue - - poppler/PSOutputDev.cc | 42 ++++++++++-------------------------------- - poppler/PSOutputDev.h | 6 +++--- - 2 files changed, 13 insertions(+), 35 deletions(-) - -commit e04287f2682e46831c04e0ef8d60411f521a2572 -Author: Albert Astals Cid -Date: Mon Jul 29 00:55:43 2013 +0200 - - Fallback to 1x1 bitmap If we fail to create the corrent one - - poppler/SplashOutputDev.cc | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -commit fe5ff20cb93a70fa1650ef5e00b67e35de20f0ca -Author: Albert Astals Cid -Date: Mon Jul 29 00:54:07 2013 +0200 - - Initialize t3FillColorOnly - - poppler/PSOutputDev.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 19930d9f104b63070dcd7636758eb8b90a86fc0d -Author: Ed Catmur -Date: Sun Jul 21 11:07:00 2013 +0200 - - TextOutputDev: Do not draw ligatures more than once when selected - - When the selection covers a ligature presentation form where a single - character code corresponds to multiple Unicode codepoints, the - glyph for - the ligature is drawn multiple times, once for each Unicode character. - - https://bugs.freedesktop.org/show_bug.cgi?id=9001 - - poppler/TextOutputDev.cc | 3 +++ - 1 file changed, 3 insertions(+) - -commit 6b451b2d3f785c28d98907ae338d58380db518d2 -Author: Albert Astals Cid -Date: Fri Jul 19 02:55:29 2013 +0200 - - 0.23.4 - - CMakeLists.txt | 4 +-- - NEWS | 8 ++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - gtk-doc.make | 70 - +++++++++++++++++++++++++++++++----------------- - m4/gtk-doc.m4 | 6 ++++- - poppler/CairoOutputDev.h | 2 +- - poppler/Makefile.am | 2 +- - poppler/TextOutputDev.cc | 2 +- - qt4/src/Doxyfile | 2 +- - qt5/src/Doxyfile | 2 +- - 11 files changed, 67 insertions(+), 35 deletions(-) - -commit 6cf43442e38c501b49293a28f38e06ab143852c6 -Author: Ed Catmur -Date: Thu Jul 18 10:34:29 2013 +0200 - - TextOutputDev: clip the selected text rendering to the selection box - - Sometimes with italic text or text containing ligatures, part of the - glyph falls outside the selection box. By clipping to the selection - box - we avoid drawing the whole glyph with the selection color. - - https://bugs.freedesktop.org/show_bug.cgi?id=66983 - - poppler/TextOutputDev.cc | 5 +++++ - 1 file changed, 5 insertions(+) - -commit 269b3f3d572a15f1007f8cc84f758b1a293ef8af -Author: Carlos Garcia Campos -Date: Mon Jul 8 20:19:30 2013 +0200 - - build: Make -lpthread take preference over -pthread - - This makes libpoppler link to pthreads and fixes runtime error due to - unresolved pthread symbols when running some of the utils and tests. - - m4/ax_pthread.m4 | 2 +- - test/Makefile.am | 6 ++++-- - utils/Makefile.am | 4 +++- - 3 files changed, 8 insertions(+), 4 deletions(-) - -commit 40f857d27930aa002a99c96f3892c5e240e7ecb5 -Author: Carlos Garcia Campos -Date: Mon Jul 8 19:55:10 2013 +0200 - - m4: Replace old acx_pthread.m4 with new one ax_pthread.m4 - - configure.ac | 2 +- - m4/acx_pthread.m4 | 280 ----------------------------------------------- - m4/ax_pthread.m4 | 317 - ++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 318 insertions(+), 281 deletions(-) - -commit 44b7070aa713b2e20eb97b868000d432e2f8504e -Author: Pino Toscano -Date: Mon Jul 8 19:42:15 2013 +0200 - - cmake: improve linking with pthreads - - Use the CMake-provided variable instead of hardcoding -lpthread. - - CMakeLists.txt | 6 +++--- - utils/CMakeLists.txt | 2 +- - 2 files changed, 4 insertions(+), 4 deletions(-) - -commit 69c281fdcf23520151c0eb5471a4259c73fa1273 -Author: Carlos Garcia Campos -Date: Sun Jul 7 11:51:27 2013 +0200 - - cairo: Fix the bounding box of images saved in CairoImageOutputDev - - We were using the size of the original image instead of the rendered - size and asuming the scales were always positive. - - poppler/CairoOutputDev.cc | 145 - ++++++++++++++++++---------------------------- - poppler/CairoOutputDev.h | 5 +- - 2 files changed, 59 insertions(+), 91 deletions(-) - -commit 759e0266b36c4ea9f66912f1e53ed6392dbfd6da -Author: Albert Astals Cid -Date: Tue Jul 2 00:47:13 2013 +0200 - - News for 0.23.3 - - forgot to add them to the tarball, oh well - - NEWS | 18 ++++++++++++++++++ - 1 file changed, 18 insertions(+) - -commit df1fe9dc7ade5228e37c16c6f0c9a2d4890fdc90 -Author: Albert Astals Cid -Date: Tue Jul 2 00:33:04 2013 +0200 - - 0.23.3 - - CMakeLists.txt | 4 ++-- - Makefile.am | 2 +- - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/Doxyfile | 2 +- - qt5/src/Doxyfile | 2 +- - 7 files changed, 8 insertions(+), 8 deletions(-) - -commit df9d4fee17adfe003c822175b6921a3cd93675f6 -Author: Albert Astals Cid -Date: Mon Jul 1 21:04:10 2013 +0200 - - Update copyrights - - poppler/Annot.cc | 2 +- - poppler/Annot.h | 2 +- - poppler/Page.cc | 2 +- - poppler/TextOutputDev.cc | 2 +- - poppler/TextOutputDev.h | 2 +- - qt5/src/poppler-annotation.cc | 2 +- - qt5/src/poppler-annotation.h | 2 +- - qt5/src/poppler-document.cc | 2 +- - qt5/src/poppler-link.cc | 2 +- - qt5/src/poppler-qt5.h | 2 +- - 10 files changed, 10 insertions(+), 10 deletions(-) - -commit 67129e9db88e8332907407f14d3e09ee5c49e274 -Author: Jason Crain -Date: Mon Jul 1 02:24:47 2013 -0500 - - Check for NULL in Page::getResourceDictCopy - - poppler/Page.cc | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -commit c376559bc412e90204162bb4b2d20cd586db70c1 -Author: Carlos Garcia Campos -Date: Sun Jun 30 13:14:07 2013 +0200 - - annots: Invalidate the appearance stream when annot properties change - - Make invalidateAppearance() protected and only call it when properties - that affect the appearance stream are updated. Remove all calls to - invalidateAppearance() from qt frontend, this is now handled by - the core - and fixes the appearance stream regeneration in the glib frontend too. - - poppler/Annot.cc | 36 ++++++++++++++++++++++++++++++++++++ - poppler/Annot.h | 10 ++++++---- - qt4/src/poppler-annotation.cc | 34 ---------------------------------- - qt5/src/poppler-annotation.cc | 34 ---------------------------------- - 4 files changed, 42 insertions(+), 72 deletions(-) - -commit c746e8b38e821d1ebeaf52c4c816515bc3ddaaf6 -Author: Carlos Garcia Campos -Date: Sun Jun 30 11:44:59 2013 +0200 - - annots: Remove unused variable - - poppler/Annot.cc | 1 - - 1 file changed, 1 deletion(-) - -commit 7d9d5d2518f7760e6a4317a358040ddd9164fdef -Author: Carlos Garcia Campos -Date: Sun Jun 30 11:40:15 2013 +0200 - - annots: Do not update AP and AS entries if they are not present when - invaliding the appaearance stream - - poppler/Annot.cc | 17 ++++++++++++++--- - 1 file changed, 14 insertions(+), 3 deletions(-) - -commit 347b53f7fca644564724c230fe6c0dcbffa0d6f9 -Author: Carlos Garcia Campos -Date: Sun Jun 30 11:23:54 2013 +0200 - - annots: do not set the default appearance state when invalidating - appearances - - We are setting the default appareance state to Off and then we are - updating AS dictionary to NULL in the XRef. The appearance state - is only - required when there's more than once appearance stream, but when - invalidating the apperance we remove all streams. - - poppler/Annot.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit b5e9941c145fc99e03a28d92a50840638895908d -Author: Albert Astals Cid -Date: Mon Jul 1 00:32:51 2013 +0200 - - Fix crash on malformed doc - - Where the Colorants dictionary values are not arrays - Document can be found on KDE bug #319925 - - poppler/GfxState.cc | 9 ++++++++- - 1 file changed, 8 insertions(+), 1 deletion(-) - -commit 19f8a88bba6022b8172477e6f52dfd36b2fc5e92 -Author: Fabio D'Urso -Date: Thu Mar 7 00:20:15 2013 +0100 - - qt5: Free some temporary memory in - TextAnnotationPrivate::createNativeAnnot - - There's no need to keep this buffer around after it has been flushed - - qt5/src/poppler-annotation.cc | 2 ++ - 1 file changed, 2 insertions(+) - -commit 8bac4d1e43ce9a4c66fddc8430d7bed2d9aabba1 -Author: Fabio D'Urso -Date: Tue Jun 25 20:09:00 2013 +0200 - - qt5: Some documentation about annotations - - * Removed incorrect hint "Use uniqueName to test for Annotation - equality": uniqueNames are optional and we don't actually guarantee - uniqueness - * Added "How to add annotations" and "FixedRotation flag specifics" - sections in the Annotation class page - * Added links from enum Annotation::SubType items to actual subclasses - * Added documentation for annotation flags that are known to work - * Added "see also" links between annotation flag and boundary - setters/getters - * Added warning on Annotation::setPopup to tell that it's currently - not - implemented - - qt5/src/poppler-annotation.h | 143 - ++++++++++++++++++++++++++++++++++++++++--- - 1 file changed, 135 insertions(+), 8 deletions(-) - -commit 1d5fe3f20189fd3928121e954bcc8fa7278b39fb -Author: Fabio D'Urso -Date: Sat Mar 2 19:06:49 2013 +0100 - - qt5: FixedRotation annotations' coordinate conversion - - FixedRotation(=flagNoRotate) annotations use a different coordinate - system than regular annotations. This patch implements transparent - conversion so that qt5 clients don't notice the difference. - - Important! When dealing with FixedRotation annotations, poppler-qt5 - clients will need to set geometry-related annotation properties in - the following order: - 1) flags (because we need to know if this is a FixedRotation - annotation or not) - 2) boundary (because we need to know what the topleft corner is, - so that we can construct the conversion matrix) - 3) anything else - - This requirement will be documented in the next patch - - qt5/src/poppler-annotation-private.h | 7 ++- - qt5/src/poppler-annotation.cc | 111 - +++++++++++++++++++++++++++-------- - 2 files changed, 92 insertions(+), 26 deletions(-) - -commit ab130c91492765f8be29ed112dd2e2e6f665641b -Author: Fabio D'Urso -Date: Sat Mar 2 00:55:58 2013 +0100 - - core: Remove geometry-related arguments from annotation constructors - - Removed arguments from annotation constructors related to the geometry - of the annotation. This change will make it easier to support creating - annotations with flag NoRotate in the next patch (because no special - cases will be needed: coordinate conversion code will be able - to always - assume that the underlying annotation object already exists). - - Data that used to be taken from these arguments is now replaced - by dummy - values, which can be modified using appropriate setter methods after - the annotation object is created. - - Affected annotation types: - - AnnotLine - - AnnotTextMarkup - - AnnotPolygon - - AnnotInk - - qt5/src/poppler-annotation.cc | 34 ++++++++++++++++++---------------- - 1 file changed, 18 insertions(+), 16 deletions(-) - -commit 35cfb6914e1be4c5eda2f355900b1a0a1fa69d19 -Author: Fabio D'Urso -Date: Fri Feb 15 12:24:18 2013 +0100 - - poppler_qt5viewer: Add combobox to select rotation - - qt5/demos/navigationtoolbar.cpp | 15 +++++++++++++++ - qt5/demos/navigationtoolbar.h | 4 ++++ - qt5/demos/pageview.cpp | 24 +++++++++++++++++++++++- - qt5/demos/pageview.h | 3 +++ - qt5/demos/viewer.cpp | 2 ++ - 5 files changed, 47 insertions(+), 1 deletion(-) - -commit de2a93c0bc6e92a95c687796f59780c998b90ca4 -Author: Fabio D'Urso -Date: Thu Mar 7 00:20:15 2013 +0100 - - qt4: Free some temporary memory in - TextAnnotationPrivate::createNativeAnnot - - There's no need to keep this buffer around after it has been flushed - - qt4/src/poppler-annotation.cc | 2 ++ - 1 file changed, 2 insertions(+) - -commit 738b0b4fedaa2b2b28ea1c11622dfd880180d1c9 -Author: Fabio D'Urso -Date: Thu Mar 7 20:50:52 2013 +0100 - - qt4: Some documentation about annotations - - * Removed incorrect hint "Use uniqueName to test for Annotation - equality": uniqueNames are optional and we don't actually guarantee - uniqueness - * Added "How to add annotations" and "FixedRotation flag specifics" - sections in the Annotation class page - * Added links from enum Annotation::SubType items to actual subclasses - * Added documentation for annotation flags that are known to work - * Added "see also" links between annotation flag and boundary - setters/getters - * Added warning on Annotation::setPopup to tell that it's currently - not - implemented - - qt4/src/poppler-annotation.h | 143 - ++++++++++++++++++++++++++++++++++++++++--- - 1 file changed, 135 insertions(+), 8 deletions(-) - -commit cf950a2b7e8278e70719c67b441b0d324ffd0399 -Author: Fabio D'Urso -Date: Sat Mar 2 19:06:49 2013 +0100 - - qt4: FixedRotation annotations' coordinate conversion - - FixedRotation(=flagNoRotate) annotations use a different coordinate - system than regular annotations. This patch implements transparent - conversion so that qt4 clients don't notice the difference. - - Important! When dealing with FixedRotation annotations, poppler-qt4 - clients will need to set geometry-related annotation properties in - the following order: - 1) flags (because we need to know if this is a FixedRotation - annotation or not) - 2) boundary (because we need to know what the topleft corner is, - so that we can construct the conversion matrix) - 3) anything else - - This requirement will be documented in the next patch - - poppler/Annot.cc | 8 +++ - poppler/Annot.h | 2 + - qt4/src/poppler-annotation-private.h | 7 ++- - qt4/src/poppler-annotation.cc | 111 - +++++++++++++++++++++++++++-------- - 4 files changed, 102 insertions(+), 26 deletions(-) - -commit 4b13085568df09d8b75099f6a5438f025a028fd5 -Author: Fabio D'Urso -Date: Sat Mar 2 00:55:58 2013 +0100 - - core: Remove geometry-related arguments from annotation constructors - - Removed arguments from annotation constructors related to the geometry - of the annotation. This change will make it easier to support creating - annotations with flag NoRotate in the next patch (because no special - cases will be needed: coordinate conversion code will be able - to always - assume that the underlying annotation object already exists). - - Data that used to be taken from these arguments is now replaced - by dummy - values, which can be modified using appropriate setter methods after - the annotation object is created. - - Affected annotation types: - - AnnotLine - - AnnotTextMarkup - - AnnotPolygon - - AnnotInk - - poppler/Annot.cc | 56 - +++++++++++++------------------------------ - poppler/Annot.h | 9 ++++--- - qt4/src/poppler-annotation.cc | 34 +++++++++++++------------- - 3 files changed, 39 insertions(+), 60 deletions(-) - -commit 5923cfb5f7e3a0703de17e21f4952f92a44f3c14 -Author: Fabio D'Urso -Date: Fri Feb 15 12:24:18 2013 +0100 - - poppler_qt4viewer: Add combobox to select rotation - - qt4/demos/navigationtoolbar.cpp | 15 +++++++++++++++ - qt4/demos/navigationtoolbar.h | 4 ++++ - qt4/demos/pageview.cpp | 24 +++++++++++++++++++++++- - qt4/demos/pageview.h | 3 +++ - qt4/demos/viewer.cpp | 2 ++ - 5 files changed, 47 insertions(+), 1 deletion(-) - -commit 74ea15cc454f31b772e71b3525b71045dbfa5527 -Author: Fabio D'Urso -Date: Tue Jun 25 19:56:20 2013 +0200 - - core: Support for rendering annotations with flagNoRotate - - Gfx::drawAnnot now makes a counter-rotation if flagNoRotate is set - - poppler/Annot.cc | 55 - ++++++++++++++++++++++++++++++++++++------------------- - poppler/Annot.h | 3 ++- - poppler/Gfx.cc | 41 +++++++++++++++++++++++++++++++++++++---- - poppler/Gfx.h | 3 ++- - 4 files changed, 77 insertions(+), 25 deletions(-) - -commit 2639957ba78defd2ab6282679375fb7969bad21f -Author: Fabio D'Urso -Date: Wed Jun 26 23:12:40 2013 +0200 - - Do not crash in page::removeAnnot if there are non-Ref entries - in /Annots - - poppler/Page.cc | 10 ++++++---- - 1 file changed, 6 insertions(+), 4 deletions(-) - -commit ae016aa263c218fbfbd607cc92feac1013348c7e -Author: Albert Astals Cid -Date: Wed Jun 26 11:33:55 2013 +0200 - - Fix qt5 found/not found logic - - CMakeLists.txt | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -commit e27c1057caf4d878a0dc43c92c9e0b565db8fe40 -Merge: c55b577c ee8cfbc7 -Author: Albert Astals Cid -Date: Tue Jun 25 19:17:13 2013 +0200 - - Merge remote-tracking branch 'origin/qt5' - -commit c55b577ce69ad4bb69f5261b3e120e92c9fdb3d0 -Author: Carlos Garcia Campos -Date: Tue Jun 25 10:01:38 2013 +0200 - - glib: Use TextPage::getSelectionWords to build text layout and - attributes - - This way we can make sure that the list of words used in - poppler_page_get_text_layout and poppler_page_get_text_attributes - is the - same that the one used in poppler_page_get_text. This fixes the - mismatch - between the number of characters in the text returned by - poppler_page_get_text and the number of characters returned by - poppler_page_get_text_layout in some documents. - - glib/poppler-page.cc | 168 - +++++++++++++++++++++++++++------------------------ - 1 file changed, 90 insertions(+), 78 deletions(-) - -commit fc534f571315c064005515c19d7d70ad3af1563e -Author: Carlos Garcia Campos -Date: Tue Jun 25 10:05:01 2013 +0200 - - TextOutputDev: add a method to TextPage to get the selection as a - list of words - - Returns a list of lines of words. - - poppler/TextOutputDev.cc | 36 ++++++++++++++++++++++++++++++++++++ - poppler/TextOutputDev.h | 4 ++++ - 2 files changed, 40 insertions(+) - -commit a924246b7534e86165f8e9ab6c60d56b73a17b94 -Author: Carlos Garcia Campos -Date: Tue Jun 25 09:57:48 2013 +0200 - - TextOutputDev: simplify the text selection dumper - - Build a list of lines of words and don't try to format the text when - detecting tables, simply add the words and lines in the right order. - - poppler/TextOutputDev.cc | 200 - ++++++++++++++++++++++------------------------- - 1 file changed, 92 insertions(+), 108 deletions(-) - -commit c849094a2daf896d085937adff1f7659a09da062 -Author: Carlos Garcia Campos -Date: Mon Jun 24 18:29:11 2013 +0200 - - TextOutputDev: Move TextSelection class from TextSelectionPainter - to TextSelectionVisitor - - So that it can be used by other TextSelectionVisitor implementations. - Also renamed it as TextWordSelection since it contains a word - selection. - - poppler/TextOutputDev.cc | 35 ++++++++++++++++++----------------- - 1 file changed, 18 insertions(+), 17 deletions(-) - -commit b3ff3f2c3e131556d2b27cbe52f0ddbbb4820c19 -Author: Jason Crain -Date: Thu Jun 20 21:47:13 2013 -0500 - - Draw glyphs after selection background - - When multiple lines of text are selected, TextSelectionPainter will - draw selections over each other, hiding the previous line with the - selection background of the current line. This patch changes - TextSelectionPainter so that glyphs are drawn only after the entire - background is drawn. - - https://bugs.freedesktop.org/show_bug.cgi?id=65989 - - poppler/TextOutputDev.cc | 109 - ++++++++++++++++++++++++++++++----------------- - 1 file changed, 69 insertions(+), 40 deletions(-) - -commit ee8cfbc78fe9de109abbe0727a738870f6027a73 -Author: Albert Astals Cid -Date: Tue Jun 18 23:20:01 2013 +0200 - - Fix indent - - qt5/src/poppler-optcontent.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 9d0a5b6afb25a1273504383e108bdb95ca82f099 -Author: Albert Astals Cid -Date: Tue Jun 18 23:19:30 2013 +0200 - - Bring changes from the qt4 dir - - qt5/src/Doxyfile | 2 +- - qt5/src/poppler-private.h | 2 +- - qt5/tests/CMakeLists.txt | 1 + - qt5/tests/Makefile.am | 13 +- - qt5/tests/stress-threads-qt5.cpp | 304 - +++++++++++++++++++++++++++++++++++++++ - qt5/tests/test-poppler-qt5.cpp | 2 +- - 6 files changed, 320 insertions(+), 4 deletions(-) - -commit 1adb1ab7aee026e227d25716a4b7be22b19b5b84 -Author: Albert Astals Cid -Date: Tue Jun 18 20:50:49 2013 +0200 - - Make it build with autotools - - poppler/Makefile.am | 23 +- - {poppler => qt4/src}/ArthurOutputDev.cc | 0 - {poppler => qt4/src}/ArthurOutputDev.h | 0 - qt4/src/CMakeLists.txt | 2 +- - qt4/src/Makefile.am | 5 +- - qt5/src/ArthurOutputDev.cc | 816 - ++++++++++++++++++++++++++++++++ - qt5/src/ArthurOutputDev.h | 170 +++++++ - qt5/src/CMakeLists.txt | 2 +- - qt5/src/Makefile.am | 5 +- - qt5/src/poppler-optcontent.cc | 2 + - 10 files changed, 997 insertions(+), 28 deletions(-) - -commit 93a1c2b768cc419c5bf9b3033bf85fb21326a65a -Author: Albert Astals Cid -Date: Tue Jun 18 00:33:38 2013 +0200 - - If qmake gives us a Qt5 qmake try with qmake4 and qmake-qt4 - - cmake/modules/FindQt4.cmake | 62 - ++++++++++++++++++++++++++++----------------- - 1 file changed, 39 insertions(+), 23 deletions(-) - -commit 7cc33a752ef864b595748ce7724ba553a8e3ba8e -Author: Albert Astals Cid -Date: Mon Jun 17 22:57:56 2013 +0200 - - We are not compiling an executable - - qt5/src/CMakeLists.txt | 1 - - 1 file changed, 1 deletion(-) - -commit 87cfcd41e8e970186c6ce753aa660ef86aca8878 -Author: Granger Anthony -Date: Mon Jun 17 09:17:51 2013 +0200 - - Allow to enable Qt5 support only with CMake >= 2.8.8 - - CMakeLists.txt | 26 ++++++++++++++++---------- - qt5/tests/CMakeLists.txt | 1 - - 2 files changed, 16 insertions(+), 11 deletions(-) - -commit b44c70f04758000cf0e049b06cc7864287570f7b -Author: Albert Astals Cid -Date: Mon Jun 17 22:10:05 2013 +0200 - - Bring PIC back to the toplevel, still have linking errors tohugh :-/ - - configure.ac | 1 + - 1 file changed, 1 insertion(+) - -commit be49073f5ce79f56b38197758a5cf1253b972306 -Author: Albert Astals Cid -Date: Mon Jun 17 21:50:31 2013 +0200 - - Use qtchooser if available - - configure.ac | 15 ++++++++++++--- - 1 file changed, 12 insertions(+), 3 deletions(-) - -commit b1958228d4bc6793a3606b5e31c61a57b9fac9f5 -Author: Albert Astals Cid -Date: Mon Jun 17 20:21:08 2013 +0200 - - No distro ships moc-qt5 but make it work in case someone would - - configure.ac | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -commit 06f45c7177afc67e02985be1a97cd976c530c4ae -Author: Albert Astals Cid -Date: Mon Jun 17 20:04:49 2013 +0200 - - Build fixes - - Fix moc when moc-qt4 is qt4 moc but moc is qt5 one - Do not add -fPIE everywhere, just -fPIC to qt5 - - configure.ac | 10 ++++++---- - qt5/src/Makefile.am | 2 +- - 2 files changed, 7 insertions(+), 5 deletions(-) - -commit cb617c21fba727781f46278f5475b91d528a488b -Author: Albert Astals Cid -Date: Mon Jun 17 18:12:18 2013 +0200 - - Files i forgot - - poppler-qt5-uninstalled.pc.in | 7 +++++++ - poppler-qt5.pc.cmake | 13 +++++++++++++ - poppler-qt5.pc.in | 13 +++++++++++++ - 3 files changed, 33 insertions(+) - -commit 5c521bba427eb163e4b77d936865fbdd0e07faf3 -Author: Albert Astals Cid -Date: Mon Jun 17 18:12:07 2013 +0200 - - soversion 1 - - qt5/src/CMakeLists.txt | 2 +- - qt5/src/Makefile.am | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit 43786964946b4f4c005a0526e16fead3ffa6ba4a -Author: Albert Astals Cid -Date: Mon Jun 17 00:23:31 2013 +0200 - - harmonize spaces - - CMakeLists.txt | 7 +++---- - 1 file changed, 3 insertions(+), 4 deletions(-) - -commit 2e2ea27fe3dc688c87003d170b82451a6a872b0d -Author: Albert Astals Cid -Date: Mon Jun 17 00:22:18 2013 +0200 - - Remove qt4 mentions - - qt5/src/poppler-converter-private.h | 6 +++--- - qt5/src/poppler-embeddedfile-private.h | 2 +- - qt5/src/poppler-form.cc | 2 +- - qt5/src/poppler-form.h | 6 +++--- - qt5/src/poppler-pdf-converter.cc | 2 +- - qt5/src/poppler-private.cc | 4 ++-- - qt5/src/poppler-private.h | 2 +- - qt5/src/poppler-qt5.h | 2 +- - 8 files changed, 13 insertions(+), 13 deletions(-) - -commit e2264ce82af3e971e34930f5307b7c9b43a1e346 -Author: Albert Astals Cid -Date: Mon Jun 17 00:19:27 2013 +0200 - - remove deprecated stuff - - qt5/src/poppler-annotation.cc | 19 ++------ - qt5/src/poppler-annotation.h | 18 ------- - qt5/src/poppler-document.cc | 19 -------- - qt5/src/poppler-link.cc | 5 -- - qt5/src/poppler-link.h | 10 ---- - qt5/src/poppler-page.cc | 18 ------- - qt5/src/poppler-qt5.h | 41 ---------------- - qt5/tests/check_fonts.cpp | 21 ++------- - qt5/tests/check_metadata.cpp | 1 - - qt5/tests/check_search.cpp | 107 - ++++++++++++++++++++++-------------------- - 10 files changed, 65 insertions(+), 194 deletions(-) - -commit 21808e203eed46e379954b58b7014998b3836573 -Author: Albert Astals Cid -Date: Mon Jun 17 00:03:45 2013 +0200 - - remove commented stuff - - qt5/src/CMakeLists.txt | 1 - - 1 file changed, 1 deletion(-) - -commit 16e7033f18a8da8e27aaed6f63cce156abf8837a -Author: Albert Astals Cid -Date: Mon Jun 17 00:01:27 2013 +0200 - - Initial Qt5 port - - CMakeLists.txt | 20 + - Makefile.am | 18 +- - configure.ac | 66 +- - qt5/.gitignore | 4 + - qt5/CMakeLists.txt | 3 + - qt5/Makefile.am | 1 + - qt5/demos/.gitignore | 4 + - qt5/demos/CMakeLists.txt | 38 + - qt5/demos/Makefile.am | 67 + - qt5/demos/abstractinfodock.cpp | 57 + - qt5/demos/abstractinfodock.h | 48 + - qt5/demos/documentobserver.cpp | 50 + - qt5/demos/documentobserver.h | 50 + - qt5/demos/embeddedfiles.cpp | 82 + - qt5/demos/embeddedfiles.h | 44 + - qt5/demos/fonts.cpp | 72 + - qt5/demos/fonts.h | 43 + - qt5/demos/info.cpp | 72 + - qt5/demos/info.h | 43 + - qt5/demos/main_viewer.cpp | 33 + - qt5/demos/metadata.cpp | 50 + - qt5/demos/metadata.h | 43 + - qt5/demos/navigationtoolbar.cpp | 129 + - qt5/demos/navigationtoolbar.h | 61 + - qt5/demos/optcontent.cpp | 69 + - qt5/demos/optcontent.h | 47 + - qt5/demos/pageview.cpp | 79 + - qt5/demos/pageview.h | 50 + - qt5/demos/permissions.cpp | 66 + - qt5/demos/permissions.h | 43 + - qt5/demos/thumbnails.cpp | 84 + - qt5/demos/thumbnails.h | 48 + - qt5/demos/toc.cpp | 88 + - qt5/demos/toc.h | 43 + - qt5/demos/viewer.cpp | 317 ++ - qt5/demos/viewer.h | 73 + - qt5/src/.gitignore | 9 + - qt5/src/CMakeLists.txt | 54 + - qt5/src/Doxyfile | 1637 ++++++++++ - qt5/src/Mainpage.dox | 85 + - qt5/src/Makefile.am | 73 + - qt5/src/poppler-annotation-helper.h | 198 ++ - qt5/src/poppler-annotation-private.h | 111 + - qt5/src/poppler-annotation.cc | 4394 - ++++++++++++++++++++++++++ - qt5/src/poppler-annotation.h | 921 ++++++ - qt5/src/poppler-base-converter.cc | 105 + - qt5/src/poppler-converter-private.h | 49 + - qt5/src/poppler-document.cc | 679 ++++ - qt5/src/poppler-embeddedfile-private.h | 42 + - qt5/src/poppler-embeddedfile.cc | 135 + - qt5/src/poppler-export.h | 17 + - qt5/src/poppler-fontinfo.cc | 149 + - qt5/src/poppler-form.cc | 416 +++ - qt5/src/poppler-form.h | 343 ++ - qt5/src/poppler-link-extractor-private.h | 57 + - qt5/src/poppler-link-extractor.cc | 84 + - qt5/src/poppler-link.cc | 711 +++++ - qt5/src/poppler-link.h | 612 ++++ - qt5/src/poppler-media.cc | 168 + - qt5/src/poppler-media.h | 100 + - qt5/src/poppler-movie.cc | 110 + - qt5/src/poppler-optcontent-private.h | 121 + - qt5/src/poppler-optcontent.cc | 427 +++ - qt5/src/poppler-optcontent.h | 77 + - qt5/src/poppler-page-private.h | 54 + - qt5/src/poppler-page-transition-private.h | 28 + - qt5/src/poppler-page-transition.cc | 95 + - qt5/src/poppler-page-transition.h | 148 + - qt5/src/poppler-page.cc | 744 +++++ - qt5/src/poppler-pdf-converter.cc | 115 + - qt5/src/poppler-private.cc | 292 ++ - qt5/src/poppler-private.h | 240 ++ - qt5/src/poppler-ps-converter.cc | 273 ++ - qt5/src/poppler-qiodeviceoutstream-private.h | 47 + - qt5/src/poppler-qiodeviceoutstream.cc | 64 + - qt5/src/poppler-qt5.h | 1812 +++++++++++ - qt5/src/poppler-sound.cc | 132 + - qt5/src/poppler-textbox.cc | 63 + - qt5/tests/.gitignore | 30 + - qt5/tests/CMakeLists.txt | 75 + - qt5/tests/Makefile.am | 152 + - qt5/tests/README.unittest | 23 + - qt5/tests/check_actualtext.cpp | 33 + - qt5/tests/check_attachments.cpp | 157 + - qt5/tests/check_dateConversion.cpp | 142 + - qt5/tests/check_fonts.cpp | 248 ++ - qt5/tests/check_goostring.cpp | 61 + - qt5/tests/check_lexer.cpp | 128 + - qt5/tests/check_links.cpp | 96 + - qt5/tests/check_metadata.cpp | 275 ++ - qt5/tests/check_optcontent.cpp | 484 +++ - qt5/tests/check_pagelabelinfo.cpp | 43 + - qt5/tests/check_pagelayout.cpp | 49 + - qt5/tests/check_pagemode.cpp | 73 + - qt5/tests/check_password.cpp | 88 + - qt5/tests/check_permissions.cpp | 44 + - qt5/tests/check_search.cpp | 91 + - qt5/tests/check_strings.cpp | 250 ++ - qt5/tests/poppler-attachments.cpp | 39 + - qt5/tests/poppler-fonts.cpp | 89 + - qt5/tests/poppler-forms.cpp | 166 + - qt5/tests/poppler-texts.cpp | 40 + - qt5/tests/stress-poppler-dir.cpp | 67 + - qt5/tests/stress-poppler-qt5.cpp | 74 + - qt5/tests/test-password-qt5.cpp | 136 + - qt5/tests/test-poppler-qt5.cpp | 235 ++ - 106 files changed, 21480 insertions(+), 4 deletions(-) - -commit 714ee1e61d853394818dca7155b1b882408ffc6a -Author: Albert Astals Cid -Date: Sun Jun 16 19:00:01 2013 +0200 - - Pass down the recursion param - - Fixes heap smashing in 168.pdf.SIGSEGV.598.462 - - poppler/Stream.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 1f3e3828b9a57e044b86640b9bf9ad2437cc5656 -Author: Albert Astals Cid -Date: Sat Jun 15 17:21:36 2013 +0200 - - Add quotes since use_cairo can have spaces - - BUG #65709 - - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit fe3ffab19d54326052fd0ff8ee3ee1feb9fa928c -Author: Adam Reichold -Date: Tue Jun 11 23:08:07 2013 +0200 - - Windows compile fixes - - qt4/tests/stress-threads-qt4.cpp | 13 +++++++++---- - 1 file changed, 9 insertions(+), 4 deletions(-) - -commit 99908cb0c8a784791ffa0682c8f105acdef0d5ab -Author: Peter Breitenlohner -Date: Tue Jun 11 10:02:01 2013 +0200 - - MinGW32 may or may not define __MINGW_PRINTF_FORMAT - - Moreover __USE_MINGW_ANSI_STDIO might be defined as 0 - - poppler/poppler-config.h.cmake | 2 +- - poppler/poppler-config.h.in | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit 0673f3d8024554c414f578e0770086f475e6a605 -Author: Albert Astals Cid -Date: Tue Jun 11 00:19:19 2013 +0200 - - 0.23.2 - - CMakeLists.txt | 4 ++-- - NEWS | 12 ++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/Doxyfile | 2 +- - 6 files changed, 18 insertions(+), 6 deletions(-) - -commit 7f1bf8d94302c15a2ff68debfb6fba49df526d16 -Author: Christoph Duelli -Date: Thu May 16 16:16:32 2013 +0200 - - Do not pollute global namespace with internal classes - - Bug #64680 - - fofi/FoFiIdentifier.cc | 18 ++++++++++++++++++ - 1 file changed, 18 insertions(+) - -commit 07992075a6d1d29db57f997f67d5a4a6deacbbb4 -Merge: 4a0bd6fd 25f453ef -Author: Albert Astals Cid -Date: Sun Jun 9 12:17:53 2013 +0200 - - Merge remote-tracking branch 'origin/poppler-0.22' - - Conflicts: - poppler/Catalog.cc - qt4/src/poppler-private.h - utils/HtmlOutputDev.cc - -commit 25f453ef49004452ac4c201d59d9ce2ef52ffeee -Author: Julien Nabet -Date: Sun Jun 9 12:12:06 2013 +0200 - - Prefer prefix ++/-- operators for non-primitive types - - Part of bug #80537 - - poppler/CachedFile.cc | 3 ++- - poppler/Catalog.cc | 5 +++-- - utils/HtmlFonts.cc | 3 ++- - utils/HtmlLinks.cc | 3 ++- - 4 files changed, 9 insertions(+), 5 deletions(-) - -commit ed01688a899c5e7560a93ca2424ca302ff3452f1 -Author: Julien Nabet -Date: Sun Jun 9 12:10:01 2013 +0200 - - Fix mismatched allocation and deallocation - - Part of bug #65551 - - qt4/src/poppler-private.h | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit a27890ac441fbd613ddfe6fcf404b92be371e554 -Author: Julien Nabet -Date: Sun Jun 9 12:08:06 2013 +0200 - - Fix memory leak - - utils/HtmlOutputDev.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 4a0bd6fdb2e9e3c589e1bdb282e7c2bfca8567b1 -Merge: bbd27c92 17a16a27 -Author: Albert Astals Cid -Date: Sun Jun 9 12:06:10 2013 +0200 - - Merge remote-tracking branch 'origin/poppler-0.22' - -commit 17a16a2731b1110a12c7163c139d85bccee04492 -Author: Albert Astals Cid -Date: Sun Jun 9 12:04:40 2013 +0200 - - Fix mismatched free/delete - - Bug #65553 - - poppler/UTF.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit bbd27c92b5e5034dc2899ea26b47fcb983209f82 -Author: Thomas Freitag -Date: Thu Jun 6 23:52:36 2013 +0200 - - Speed-up some tiling on a 10x factor - - Bug #64892 - - poppler/SplashOutputDev.cc | 15 ++++++++++++++- - splash/Splash.cc | 15 +++++++++++---- - splash/Splash.h | 3 ++- - 3 files changed, 27 insertions(+), 6 deletions(-) - -commit 7847769a24bd3ccf863f653bc2215e84157ccfb6 -Author: Peter Breitenlohner -Date: Tue Jun 4 15:31:06 2013 +0200 - - Use fseeko64/ftello64 for MinGW32 - - goo/gfile.cc | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -commit 0c3548087b379dd6ffa2291d03f0ea1c7e6a69d1 -Author: Peter Breitenlohner -Date: Tue Jun 4 15:31:05 2013 +0200 - - Allow to build without multithreading - - poppler/Annot.cc | 7 +++++++ - poppler/XRef.cc | 4 ++++ - 2 files changed, 11 insertions(+) - -commit 1e74ac4589daf80dcac54b094145d32c90069738 -Author: Adam Reichold -Date: Thu Jun 6 01:03:48 2013 +0200 - - [qt4] fix autotools - - qt4/tests/Makefile.am | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 342cc0d8a101e99199d447d632a1cd5ba7beb5b2 -Author: Li Junling -Date: Tue Jun 4 22:39:35 2013 +0200 - - Fix memory leak - - poppler/SplashOutputDev.cc | 2 ++ - 1 file changed, 2 insertions(+) - -commit 52945a072b6f864e80485cc4321a27530a76c452 -Author: Albert Astals Cid -Date: Tue Jun 4 22:35:32 2013 +0200 - - Move the iccColorSpaceCache from Gfx to OutputDev - - This way it's shared when doing tiling. Page 35 of - bug-poppler64963.pdf - goes down from 150 to 133 seconds - - poppler/Gfx.cc | 61 ++++++++++++++-------------------- - poppler/Gfx.h | 12 ++----- - poppler/GfxState.cc | 93 - ++++++++++++++++++++++++++-------------------------- - poppler/GfxState.h | 33 ++++++++++--------- - poppler/OutputDev.cc | 8 ++++- - poppler/OutputDev.h | 19 +++++++++-- - 6 files changed, 114 insertions(+), 112 deletions(-) - -commit 7d4bda198b8ac767bdf4e0a4fdcaae5541113f92 -Author: Albert Astals Cid -Date: Mon Jun 3 23:34:11 2013 +0200 - - Compile - - qt4/tests/stress-threads-qt4.cpp | 1 + - 1 file changed, 1 insertion(+) - -commit 395b3fa021850225e1fea66736f3a3f00571571f -Author: Albert Astals Cid -Date: Mon Jun 3 23:31:52 2013 +0200 - - Fix #end -> #endif - - poppler/poppler-config.h.cmake | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 425d1b4835389e2031631ce54cee157af39f1cb6 -Author: Adam Reichold -Date: Mon Jun 3 20:04:21 2013 +0200 - - Check for the correct number of arguments - - qt4/tests/stress-threads-qt4.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 9d3eb07a1ea01b98aabe4f32481dd4a83bc8f2a5 -Author: Hib Eris -Date: Mon Jun 3 08:49:37 2013 +0200 - - Fix cmake build to use ansi stdio extensions when using a mingw - compiler - - https://bugs.freedesktop.org/show_bug.cgi?id=65238 - - poppler/poppler-config.h.cmake | 5 +++++ - 1 file changed, 5 insertions(+) - -commit 287afe2290d64ca63cdb75fef8f3fbdc20997970 -Author: Adam Reichold -Date: Sun Jun 2 23:29:00 2013 +0200 - - Add a thread stresser in qt4 - - qt4/tests/CMakeLists.txt | 1 + - qt4/tests/Makefile.am | 9 +- - qt4/tests/stress-threads-qt4.cpp | 298 - +++++++++++++++++++++++++++++++++++++++ - 3 files changed, 307 insertions(+), 1 deletion(-) - -commit 77ecb3823c2db4a6cca5af5889c07c73f90de7f0 -Author: Adam Reichold -Date: Sat Jun 1 19:04:10 2013 +0200 - - Add a pthread option to pdftoppm - - It's mostly a developer tool only to test thread support - Not end user oriented (hence no buildsystem) - - Parts also by Thomas - - utils/pdftoppm.cc | 130 - ++++++++++++++++++++++++++++++++++++++++++++++++++++-- - 1 file changed, 126 insertions(+), 4 deletions(-) - -commit caa19f4961146915f51be6c72f60c3aa43037235 -Author: Albert Astals Cid -Date: Sat Jun 1 17:22:54 2013 +0200 - - qt4: Fix test binary name in help - - qt4/tests/test-poppler-qt4.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit a0b48b1d05f08605bca5e1a2e2518e16578f6055 -Author: Hib Eris -Date: Sat Jun 1 14:42:42 2013 +0200 - - Fix printf format warning for size_t - - Fixes: - - CXX pdfunite.o - pdfunite.cc: In function ‘int main(int, char**)’: - pdfunite.cc:142:59: warning: format ‘%d’ expects argument of type - ‘int’, but argument 3 has type ‘std::vector::size_type - {aka long unsigned int}’ [-Wformat] - - https://bugs.freedesktop.org/show_bug.cgi?id=65242 - - utils/pdfunite.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 860737c2a19c734a0c5b65ad506ba229ba439985 -Author: Hib Eris -Date: Sat Jun 1 12:05:17 2013 +0200 - - Use ansi stdio extensions when using a mingw compiler - - In the C runtime used by mingw compilers (msvcrt.dll) the printf - function does not support the C99 format-width specifier "%ll". - - Defining __USE_MINGW_ANSI_STDIO enables mingw's ansi stdio extensions - that implement a C99 compliant printf function. - - https://bugs.freedesktop.org/show_bug.cgi?id=65238 - - CMakeLists.txt | 4 ++++ - configure.ac | 3 +++ - poppler/poppler-config.h.in | 5 +++++ - 3 files changed, 12 insertions(+) - -commit dd30ce39252a3820254b43f90699849ab5a1ca58 -Author: Hib Eris -Date: Fri May 31 12:24:55 2013 +0200 - - Fix warning on narrowing conversion from int to DWORD - - Fixes warning when compiling for Windows: - - gfile.cc: In member function 'Goffset GooFile::size() const': - gfile.cc:609:30: warning: narrowing conversion of '-1' from 'int' - to 'DWORD {aka long unsigned int}' inside { } is ill-formed in C++11 - [-Wnarrowing] - LARGE_INTEGER size = {-1,-1}; - - https://bugs.freedesktop.org/show_bug.cgi?id=65239 - - goo/gfile.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 01a825f3f9f5dcf686fc123d2cf80b9c525d0d89 -Merge: a57f9378 b4b13102 -Author: Albert Astals Cid -Date: Sat Jun 1 13:47:29 2013 +0200 - - Merge remote-tracking branch 'origin/poppler-0.22' - -commit b4b13102716cd33636a94fd99c49487924761670 -Author: Albert Astals Cid -Date: Sat Jun 1 13:45:53 2013 +0200 - - Fix crash on malformed file - - Also remove outdated comment - - Bug #65221 - - poppler/Stream.cc | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -commit a57f93780de12732875e0195127a92bff835ff61 -Author: Albert Astals Cid -Date: Tue May 28 00:11:10 2013 +0200 - - 0.23.1 - - CMakeLists.txt | 4 ++-- - NEWS | 11 +++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/Doxyfile | 2 +- - 6 files changed, 17 insertions(+), 6 deletions(-) - -commit 299a1447e3d9a845b5e964f29e698046abdb63f2 -Author: Albert Astals Cid -Date: Tue May 28 00:10:43 2013 +0200 - - Build poppler-forms in the autotools buildsystem - - qt4/tests/Makefile.am | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -commit dcfaf20503868d0956ee81208265a975b480fb52 -Author: Albert Astals Cid -Date: Mon May 27 23:40:49 2013 +0200 - - Dist these two files too - - Makefile.am | 2 ++ - 1 file changed, 2 insertions(+) - -commit de7a3fb715811be6be9ed51b1c5ab1a63c523403 -Author: Albert Astals Cid -Date: Mon May 27 23:40:07 2013 +0200 - - Add missing copyright - - poppler/Hints.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 30282d3fdbbb3029d9a0f838b2cd979bb962235c -Merge: 61f66588 56044ef4 -Author: Albert Astals Cid -Date: Mon May 27 00:20:12 2013 +0200 - - Merge remote-tracking branch 'origin/poppler-0.22' - -commit 56044ef482c26f10a8a1371dace049c144659dc7 -Author: Albert Astals Cid -Date: Mon May 27 00:18:22 2013 +0200 - - Fix infinite loop while feeding wrong data in stdin - - Take into account that CachedFile::read might not always return - the number of elems we asked it to read - - Bug #64967 - - poppler/Stream.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 61f665885daeb0009ecac2cc85188f23d6addb60 -Author: Albert Astals Cid -Date: Mon May 27 00:01:24 2013 +0200 - - Fix big file support in cmake - - Tested by Fabio - - CMakeLists.txt | 2 ++ - cmake/modules/CheckFileOffsetBits.c | 14 +++++++++++ - cmake/modules/CheckFileOffsetBits.cmake | 44 - +++++++++++++++++++++++++++++++++ - config.h.cmake | 6 ++--- - 4 files changed, 63 insertions(+), 3 deletions(-) - -commit f536a4ec37246e10f03fe4de309bd31deb6a4727 -Author: Hib Eris -Date: Thu May 16 21:06:56 2013 +0200 - - Do not use deprecated gtk_scrolled_window_add_with_viewport() - - https://bugs.freedesktop.org/show_bug.cgi?id=64683 - - glib/demo/find.c | 4 ++++ - glib/demo/images.c | 4 ++++ - glib/demo/layers.c | 4 ++++ - glib/demo/render.c | 4 ++++ - glib/demo/selections.c | 4 ++++ - test/gtk-test.cc | 4 ++++ - 6 files changed, 24 insertions(+) - -commit c10f2f8777927d8cfe547941ea2f70fcce14da7a -Author: Pino Toscano -Date: Mon May 20 00:09:45 2013 +0200 - - fix typo in error message - - poppler/Hints.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 71d327194293cb3d1a0e274eaf4451c7afe81e8a -Merge: 7b2df1f9 6a98b56f -Author: Albert Astals Cid -Date: Fri May 17 23:04:12 2013 +0200 - - Merge remote-tracking branch 'origin/poppler-0.22' - -commit 6a98b56f6ded957477ddcccd4ff849a870020395 -Author: Albert Astals Cid -Date: Fri May 17 23:01:20 2013 +0200 - - Make an invalid nSharedGroupsFirst a real error - - Instead trying to recover - Fixes bug #46703 - - poppler/Hints.cc | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -commit 7b2df1f935192c89eacddd98c4bf92f38013c8e0 -Author: Albert Astals Cid -Date: Fri May 17 20:56:51 2013 +0200 - - A simple form dumper - - qt4/tests/CMakeLists.txt | 1 + - qt4/tests/poppler-forms.cpp | 166 - ++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 167 insertions(+) - -commit 54f539b4436a1a3e0eab2ef0904c302865082982 -Merge: b3d8f510 3a6e2de1 -Author: Albert Astals Cid -Date: Thu May 16 21:27:47 2013 +0200 - - Merge remote-tracking branch 'origin/poppler-0.22' - -commit 3a6e2de1d35e3ee4fd86f71713c49bec8e09e41d -Author: Albert Astals Cid -Date: Thu May 16 21:27:02 2013 +0200 - - Make sure that Title: doesn't contain \n or \n - - Bug #63862 - - poppler/PSOutputDev.cc | 11 +++++++++-- - 1 file changed, 9 insertions(+), 2 deletions(-) - -commit b3d8f510e30fb4d8da9069390d5e9bd8a283fbd6 -Author: Thomas Freitag -Date: Thu May 16 20:52:09 2013 +0200 - - Fix splashModeBGR8 rendering - - Also make SplashBitmap able to write splashModeBGR8 images - - Bug #64381 - - splash/Splash.cc | 4 ++-- - splash/SplashBitmap.cc | 24 ++++++++++++++++++++++-- - 2 files changed, 24 insertions(+), 4 deletions(-) - -commit 8640933a3aa7dbafa21765d029e97b4bba76716c -Author: Fabio D'Urso -Date: Thu Apr 25 19:18:30 2013 +0200 - - Fix printf format specifiers (Goffset is a long long, not a int) - - poppler/PDFDoc.cc | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit f8e8805bbce3e94b16b77fece0072645c66f6a31 -Author: Fabio D'Urso -Date: Thu Apr 25 19:06:09 2013 +0200 - - Re-enable commented-out printf-format attribute on OutStream::printf - - The answer to the question "2,3 because the first arg is class - instance ?" is yes. It's documented behavior: - Since non-static C++ methods have an implicit this argument, the - arguments of such methods should be counted from two, not one. - from - http://gcc.gnu.org/onlinedocs/gcc-4.3.2/gcc/Function-Attributes.html - - poppler/Stream.h | 6 ++---- - 1 file changed, 2 insertions(+), 4 deletions(-) - -commit 013b2b247268f9b8dcd8e0461580e0bbcf7554c1 -Author: Fabio D'Urso -Date: Thu Apr 25 17:58:25 2013 +0200 - - XRef stream writing: Write 32-bit offsets when possible - - For compatibility reasons: some pdf readers don't support 64-bit - offsets - yet (for example, poppler 0.22 doesn't) - - poppler/XRef.cc | 38 ++++++++++++++++++++++++++++---------- - poppler/XRef.h | 17 +++++++++++++++-- - 2 files changed, 43 insertions(+), 12 deletions(-) - -commit ea61a9dc012fbffd9bc9fe8a09264ba8744635fc -Author: Albert Astals Cid -Date: Mon May 13 23:15:55 2013 +0200 - - 0.23.0 - - Includes news, soversions, updated copyrights, etc - - CMakeLists.txt | 6 +++--- - NEWS | 12 ++++++++++++ - configure.ac | 4 ++-- - cpp/Doxyfile | 2 +- - goo/gfile.cc | 1 + - goo/gfile.h | 1 + - poppler/CairoOutputDev.h | 2 +- - poppler/Makefile.am | 2 +- - poppler/Stream.cc | 1 + - poppler/Stream.h | 1 + - poppler/XRef.cc | 1 + - qt4/src/CMakeLists.txt | 2 +- - qt4/src/Doxyfile | 2 +- - qt4/src/Makefile.am | 2 +- - 14 files changed, 28 insertions(+), 11 deletions(-) - -commit 7a5eee1cbebe241b8bd44027fc07682944686910 -Author: Albert Astals Cid -Date: Mon May 13 23:00:40 2013 +0200 - - Add check_pagelabelinfo test - - qt4/tests/Makefile.am | 1 + - 1 file changed, 1 insertion(+) - -commit 30a519f21dd5df8d41a43a58b2cbd95fe657df73 -Merge: 998a9e7c 0c0aef20 -Author: Albert Astals Cid -Date: Mon May 13 20:40:04 2013 +0200 - - Merge remote-tracking branch 'origin/poppler-0.22' - -commit 0c0aef20d9cecaee1de0badc6cd56dd6e5b5bf12 -Author: Albert Astals Cid -Date: Mon May 13 19:57:02 2013 +0200 - - 0.22.4 version - - Also increase soversion since Gfx.h got a new member - - CMakeLists.txt | 4 ++-- - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/Doxyfile | 2 +- - 5 files changed, 6 insertions(+), 6 deletions(-) - -commit 4d6662d05f6b652af97ac6e0eb1f1c1dca8e9550 -Author: Albert Astals Cid -Date: Mon May 13 19:55:21 2013 +0200 - - 0.22.4 NEWS - - NEWS | 15 +++++++++++++++ - 1 file changed, 15 insertions(+) - -commit 93e08d96867d636a70ab04ee4ad22c2214ae4b6a -Author: Albert Astals Cid -Date: Mon May 13 19:51:52 2013 +0200 - - Update copyright years - - poppler/CairoOutputDev.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 998a9e7c982a72b0e931304b719de40f30094d12 -Merge: 5e73cb05 73d09cd5 -Author: Albert Astals Cid -Date: Mon May 13 19:30:26 2013 +0200 - - Merge remote-tracking branch 'origin/poppler-0.22' - - Conflicts: - splash/Splash.cc - -commit 73d09cd55f3bd307450c2dd095e039ea39c69cea -Author: Albert Astals Cid -Date: Mon May 13 19:28:40 2013 +0200 - - Fix compilation with fixed point mode enabled - - Thanks to Andreas Müller for the tip - - splash/Splash.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 5e73cb059e27f68b329513de609d52e84d73f8af -Merge: 5e9654a3 b3e44fc5 -Author: Albert Astals Cid -Date: Tue May 7 22:00:02 2013 +0200 - - Merge remote-tracking branch 'origin/poppler-0.22' - -commit b3e44fc59a9258ad701bc67132dea0646fd8b61a -Author: Albert Astals Cid -Date: Tue May 7 21:53:31 2013 +0200 - - We need UnicodeParsedString here too - - Fixes KDE bug #307786 - - qt4/src/poppler-embeddedfile.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 5e9654a3eb28b2c8b0985545778dd0e45829f8e1 -Merge: eeecd971 a107428e -Author: Albert Astals Cid -Date: Thu Apr 25 20:45:34 2013 +0200 - - Merge remote-tracking branch 'origin/poppler-0.22' - - Conflicts: - poppler/Gfx.h - -commit a107428e7db0c420b60418a33b9f815909ac9a33 -Author: Albert Astals Cid -Date: Thu Apr 25 20:44:36 2013 +0200 - - Update my C of the last two previous commits - - poppler/Gfx.cc | 2 +- - poppler/Gfx.h | 2 +- - utils/HtmlOutputDev.cc | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - -commit eeecd9718f201dc795b2cb8469c43860aec6e07d -Author: Albert Astals Cid -Date: Thu Apr 25 20:29:24 2013 +0200 - - Do not start drawing a form we are already drawing - - Bug #63190 - - poppler/Gfx.cc | 23 +++++++++++++++++++---- - poppler/Gfx.h | 2 ++ - 2 files changed, 21 insertions(+), 4 deletions(-) - -commit 43d66e11aa9e692c1c6b3a237e7e972d317e5c4d -Author: Albert Astals Cid -Date: Thu Apr 25 20:27:43 2013 +0200 - - Make sure getKids returns != 0 before using it - - Fixes crash in bug #63909 - - utils/HtmlOutputDev.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit ec298b3b780f885464aa00880150eaa2b9b50b08 -Author: Albert Astals Cid -Date: Thu Apr 25 20:29:24 2013 +0200 - - Do not start drawing a form we are already drawing - - Bug #63190 - - poppler/Gfx.cc | 23 +++++++++++++++++++---- - poppler/Gfx.h | 2 ++ - 2 files changed, 21 insertions(+), 4 deletions(-) - -commit 11ab42e7e90099d0cebf8f02197413fd5dee044b -Author: Albert Astals Cid -Date: Thu Apr 25 20:27:43 2013 +0200 - - Make sure getKids returns != 0 before using it - - Fixes crash in bug #63909 - - utils/HtmlOutputDev.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 4ee78e77f7d6cadc8e150ceff96b546ddca329d4 -Author: Carlos Garcia Campos -Date: Sat Apr 20 16:41:56 2013 +0200 - - cairo: Always use the trasnfer function if present in setSoftMask - - "If the subtype is Alpha, the transparency group XObject G shall be - evaluated to compute a group alpha only. The colours of the - constituent - objects shall be ignored and the colour compositing computations shall - not be performed. The transfer function TR shall then be applied - to the - computed group alpha to produce the mask values." - - We were using the transfer function only for luminosity soft masks. - - https://bugs.freedesktop.org/show_bug.cgi?id=63587 - - poppler/CairoOutputDev.cc | 37 +++++++++++++++++++------------------ - 1 file changed, 19 insertions(+), 18 deletions(-) - -commit 3c2a92b06a6541071bd1e555606bb2096de17ef6 -Author: Carlos Garcia Campos -Date: Sat Apr 20 16:41:56 2013 +0200 - - cairo: Always use the trasnfer function if present in setSoftMask - - "If the subtype is Alpha, the transparency group XObject G shall be - evaluated to compute a group alpha only. The colours of the - constituent - objects shall be ignored and the colour compositing computations shall - not be performed. The transfer function TR shall then be applied - to the - computed group alpha to produce the mask values." - - We were using the transfer function only for luminosity soft masks. - - https://bugs.freedesktop.org/show_bug.cgi?id=63587 - - poppler/CairoOutputDev.cc | 37 +++++++++++++++++++------------------ - 1 file changed, 19 insertions(+), 18 deletions(-) - -commit fd648e83e60db7157b7273ffddc02308b0c5813b -Merge: 970e9f63 53b9cec6 -Author: Albert Astals Cid -Date: Sun Apr 21 23:30:16 2013 +0200 - - Merge remote-tracking branch 'origin/poppler-0.22' - -commit 53b9cec6c1334020f90b885cff6fc30293437e5f -Author: Thomas Freitag -Date: Sun Apr 21 23:28:40 2013 +0200 - - Splash: Always consider a softmask transfer function - - Fixes bug 63587 in splash - - poppler/SplashOutputDev.cc | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -commit 970e9f6304c3b59ac3e44495b90a5cfe7c7ceb8b -Author: Hib Eris -Date: Fri Apr 12 13:26:55 2013 +0200 - - Remove unused variables from Lexer::getObj() - - https://bugs.freedesktop.org/show_bug.cgi?id=63467 - - poppler/Lexer.cc | 8 +++----- - 1 file changed, 3 insertions(+), 5 deletions(-) - -commit f8bf602620b3c7570f483ac66fc4d6a76a81a882 -Merge: bbd27dc4 62a5b4d5 -Author: Albert Astals Cid -Date: Sun Apr 14 16:40:51 2013 +0200 - - Merge remote-tracking branch 'origin/poppler-0.22' - -commit 62a5b4d5c6d5c368d190b86eab63ccb07d642c01 -Author: Hib Eris -Date: Sun Apr 14 16:37:14 2013 +0200 - - Check for strcpy_s() and strcat_s() at configure time - - It is better to test for functions than to hardcode exceptions for - specific compilers. - - This fixes compiling poppler with the latest mingw-w64 compiler which - has strcpy_s() and strcat_s() build in. - - Bug #63459 - - ConfigureChecks.cmake | 2 ++ - configure.ac | 1 + - test/perf-test.cc | 6 ++++-- - 3 files changed, 7 insertions(+), 2 deletions(-) - -commit bbd27dc4ce7b24af890d80f597f74e5d7ee0215a -Merge: ea3698cf 5bc00809 -Author: Albert Astals Cid -Date: Fri Apr 12 00:10:27 2013 +0200 - - Merge remote-tracking branch 'origin/poppler-0.22' - - Conflicts: - poppler/TextOutputDev.h - -commit 5bc00809ebe560a180d5df93eb50bdf0ff0e97e6 -Author: Albert Astals Cid -Date: Thu Apr 11 23:29:00 2013 +0200 - - Increase poppler core soname - - CMakeLists.txt | 2 +- - poppler/Makefile.am | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit 115d4c1465291adde86c3c905f265ac03374441f -Author: Albert Astals Cid -Date: Thu Apr 11 23:28:17 2013 +0200 - - Increase version number to 0.22.3 - - CMakeLists.txt | 2 +- - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - qt4/src/Doxyfile | 2 +- - 4 files changed, 4 insertions(+), 4 deletions(-) - -commit ae1a3553b85e2616a339aacb6efecd15db373858 -Author: Albert Astals Cid -Date: Thu Apr 11 23:26:44 2013 +0200 - - News file - - NEWS | 20 ++++++++++++++++++++ - 1 file changed, 20 insertions(+) - -commit 1fefe98fc86cf8449346bdc230dff5758b1bb7a3 -Author: Albert Astals Cid -Date: Thu Apr 11 23:22:20 2013 +0200 - - Update copyrgihts - - poppler/CairoOutputDev.cc | 2 +- - poppler/PDFDoc.cc | 2 +- - poppler/TextOutputDev.cc | 2 +- - poppler/TextOutputDev.h | 2 +- - 4 files changed, 4 insertions(+), 4 deletions(-) - -commit ea3698cfffc9c132081f5691287ef1fd17911b2a -Merge: fcc14682 aaaea5d0 -Author: Albert Astals Cid -Date: Wed Apr 10 20:42:01 2013 +0200 - - Merge remote-tracking branch 'origin/poppler-0.22' - -commit aaaea5d0f2f427e82625a04f90c178e24892e539 -Author: Marek Kasik -Date: Wed Apr 10 16:41:48 2013 +0200 - - man pages: Fix typos - - Fix several typos in manual pages of pdftops and pdfseparate. - - utils/pdfseparate.1 | 2 +- - utils/pdftops.1 | 6 +++--- - 2 files changed, 4 insertions(+), 4 deletions(-) - -commit fcc14682899ff4981bfece74dbc8c290a625b05c -Merge: f11e2162 e6559a0d -Author: Albert Astals Cid -Date: Sun Apr 7 17:44:12 2013 +0200 - - Merge remote-tracking branch 'origin/poppler-0.22' - -commit e6559a0d836df127ed5061794dc737d435ef534c -Author: Albert Astals Cid -Date: Sun Apr 7 17:42:23 2013 +0200 - - Fix crash in KDE bug #317710 - - It is not guaranteed that the ::LinkAction passed to - PageData::convertLinkActionToLink - will be always around (e.g. Page::action deletes it) so make a copy - of the ::MediaRendition object - - qt4/src/poppler-link.h | 6 +++--- - qt4/src/poppler-media.cc | 6 ++++++ - qt4/src/poppler-media.h | 5 ++++- - qt4/src/poppler-page.cc | 4 ++-- - 4 files changed, 15 insertions(+), 6 deletions(-) - -commit f11e21627121c3ff81c0ec7f4d71936a2dd590c3 -Merge: e1ffa910 b9fdb0cb -Author: Albert Astals Cid -Date: Sat Apr 6 23:26:54 2013 +0200 - - Merge remote-tracking branch 'origin/poppler-0.22' - -commit e1ffa9100cf6b4a444be7ed76b11698a5c5bb441 -Author: Thomas Freitag -Date: Sat Apr 6 23:21:58 2013 +0200 - - Fix endstream detection - - Part 1 of bug #62985 - - the endstream search, and at least with bug-poppler16579.pdf this - doesn't work correctly: the shift(-1) with the used token mechanism - in Lexer isn't correct for a binary data stream. If there is i.e. a - "(" without corresponding ")" in the binary data, which of course can - happen and happens in that pdf, shift(-1) skips the searched endstream - and can therefore in worst case reach the end-of-file. Therefore I - implemented a shift("endstream") in Java, which I now port back to - C++, or in other words "There and Back Again" :-) - - You can test it with bug-poppler16579.pdf if You just change temporary - - if (longNumber <= INT_MAX && longNumber >= INT_MIN && - *end_ptr == '\0') { - - in XRef.cc to - - if (gFalse && longNumber <= INT_MAX && longNumber >= - INT_MIN && *end_ptr == '\0') { - - poppler/Lexer.cc | 45 +++++++++++++++++++++++++++++++++++++++++++++ - poppler/Lexer.h | 2 ++ - poppler/Parser.cc | 28 ++++++++++++++++++++++++++-- - poppler/Parser.h | 2 ++ - 4 files changed, 75 insertions(+), 2 deletions(-) - -commit b9fdb0cb767a228c56f3f0635a7f78e3e0a8c7b6 -Author: Albert Astals Cid -Date: Sat Apr 6 23:20:48 2013 +0200 - - Last commit was Thomas' forgot his (C) - - poppler/XRef.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 94bee4601cbbda0e7c6205a04650e0510f198aee -Merge: 42368fb9 b312210b -Author: Albert Astals Cid -Date: Sat Apr 6 23:19:25 2013 +0200 - - Merge remote-tracking branch 'origin/poppler-0.22' - -commit b312210b630f96baeb8b2f3b49b0b79779609d98 -Author: Albert Astals Cid -Date: Sat Apr 6 23:18:18 2013 +0200 - - Fix for complete rewrites in repaired files - - Part 2 of bug #62985 - if You save a PDF with defect xref offsets, the - - readXRefUntil(-1 /* read all xref sections */, &xrefStreamObjNums) - - in XRef::scanSpecialFlags() will destroy the already reconstructed - entries table, but this means that any modification which the user did - in the meantime get lost. This can be tested i.e. with bug168518.pdf. - - poppler/XRef.cc | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -commit 42368fb9452c3719a7bbd159f1c1421068f40653 -Author: Albert Astals Cid -Date: Sat Apr 6 18:28:35 2013 +0200 - - Add missing free() - - poppler/PDFDoc.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 2264e7a95e5dc252de1b5736a1edd6bf5de3ad1f -Author: Thomas Freitag -Date: Sat Apr 6 18:27:57 2013 +0200 - - implement Crypt filter - - Bug #62800 - - poppler/Decrypt.h | 3 ++- - poppler/PDFDoc.cc | 37 ++++++++++++++++++++++++++++++++++--- - poppler/Stream.cc | 6 ++++++ - poppler/Stream.h | 3 ++- - 4 files changed, 44 insertions(+), 5 deletions(-) - -commit a65a4e6f878ff033b780b2f1e3362f2918c93b6b -Author: Adam Reichold -Date: Sat Apr 6 18:25:21 2013 +0200 - - No need to keep the mutex attributes around all the time - - goo/GooMutex.h | 27 ++++++++++----------------- - 1 file changed, 10 insertions(+), 17 deletions(-) - -commit 73ff5ad58cfe7ec9415cc1459b6ca083fee608f4 -Author: Albert Astals Cid -Date: Sat Apr 6 18:19:28 2013 +0200 - - Pass the recursion flag - - poppler/DCTStream.cc | 6 +++--- - poppler/DCTStream.h | 2 +- - poppler/Stream.cc | 4 ++-- - poppler/Stream.h | 2 +- - 4 files changed, 7 insertions(+), 7 deletions(-) - -commit 837e3704e76ea857b3de45503840e9b855096fef -Author: Albert Astals Cid -Date: Sat Apr 6 17:01:08 2013 +0200 - - Make our mutexes recursive - - Fixes a deadlock problem found with a pdf i can't share - (411klaralv.pdf) - Reviewed by Thomas and Adam on the mailing list - - CMakeLists.txt | 3 +++ - glib/CMakeLists.txt | 3 +++ - goo/GooMutex.h | 36 ++++++++++++++++++++++-------------- - poppler/Annot.cc | 34 +++++++++++++++++----------------- - poppler/Annot.h | 4 ++-- - poppler/Catalog.cc | 24 +++++++++++------------- - poppler/Catalog.h | 8 ++++---- - poppler/XRef.cc | 2 +- - utils/CMakeLists.txt | 3 +++ - 9 files changed, 66 insertions(+), 51 deletions(-) - -commit 0a243c8c14d09a40f25338999c3ca06273277b45 -Author: Adam Reichold -Date: Fri Apr 5 00:00:07 2013 +0200 - - Add a GooFile class to encapsulate file read access using offsets - - Bug #62735 - - ConfigureChecks.cmake | 2 ++ - config.h.cmake | 6 ++++ - configure.ac | 1 + - goo/gfile.cc | 80 - ++++++++++++++++++++++++++++++++++++++++++++++ - goo/gfile.h | 30 +++++++++++++++++ - poppler/GlobalParamsWin.cc | 19 ++++------- - poppler/PDFDoc.cc | 37 ++++++--------------- - poppler/PDFDoc.h | 4 ++- - poppler/Stream.cc | 46 +++++++++----------------- - poppler/Stream.h | 17 +++------- - 10 files changed, 158 insertions(+), 84 deletions(-) - -commit 70e6af4739d2eea58e6f3200a8c9467597a12ae5 -Author: Rodrigo Rivas Costa -Date: Thu Apr 4 23:10:09 2013 +0200 - - Be pedantic about setjmp use - - Bug #63067 - - poppler/DCTStream.cc | 57 - +++++++++++++++++++++++++++------------------------- - 1 file changed, 30 insertions(+), 27 deletions(-) - -commit c7e28e3d672654f31f1a0f95245a1fba3bc9c28f -Author: Albert Astals Cid -Date: Mon Mar 25 22:55:58 2013 +0100 - - Only write the file once when saving - - Bug #62739 - - poppler/PDFDoc.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 09ddb34f202be2111c70901724d64d3b61483c7a -Author: Albert Astals Cid -Date: Mon Mar 25 22:55:58 2013 +0100 - - Only write the file once when saving - - Bug #62739 - - poppler/PDFDoc.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 75378557f409a5a2305ea0fb42c56184c74ba887 -Author: Carlos Garcia Campos -Date: Sun Mar 24 12:53:29 2013 +0100 - - glib: Always start from the beginning when starting a new search on - a page - - And start from previous match when searching the next one on the same - page. This allows to search for the same string multiple times on the - same page. - - https://bugs.freedesktop.org/show_bug.cgi?id=59972 - - glib/poppler-page.cc | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -commit 4ee6757dd7de9211faf8601531342a199225a06d -Author: Carlos Garcia Campos -Date: Sun Mar 24 12:53:29 2013 +0100 - - glib: Always start from the beginning when starting a new search on - a page - - And start from previous match when searching the next one on the same - page. This allows to search for the same string multiple times on the - same page. - - https://bugs.freedesktop.org/show_bug.cgi?id=59972 - - glib/poppler-page.cc | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -commit 83cf2d3d3ecce6340d858a2ee037cd5120ac1db5 -Author: Jason Crain -Date: Sat Mar 9 08:44:36 2013 -0600 - - TextOutputDev: Set text matrix when painting selection - - https://bugs.freedesktop.org/show_bug.cgi?id=61042 - - poppler/TextOutputDev.cc | 30 +++++++++++++++++++++++------- - poppler/TextOutputDev.h | 3 ++- - 2 files changed, 25 insertions(+), 8 deletions(-) - -commit a3bc584fdd7f74a7dab701c743df0bb0bf74a03e -Author: Jason Crain -Date: Sat Mar 9 08:44:36 2013 -0600 - - TextOutputDev: Set text matrix when painting selection - - https://bugs.freedesktop.org/show_bug.cgi?id=61042 - - poppler/TextOutputDev.cc | 30 +++++++++++++++++++++++------- - poppler/TextOutputDev.h | 3 ++- - 2 files changed, 25 insertions(+), 8 deletions(-) - -commit 8cbdbc64897a34beb226d4dc4c58095f10013f29 -Merge: 2bce2cf2 a01e2d41 -Author: Albert Astals Cid -Date: Wed Mar 20 22:37:06 2013 +0100 - - Merge remote-tracking branch 'origin/poppler-0.22' - -commit a01e2d41fcb638fe340bd3d4d22bd13db245e0fd -Author: Thomas Freitag -Date: Wed Mar 20 22:35:08 2013 +0100 - - check order bounding box values in tiling pattern - - Bug #62369 - - poppler/Gfx.cc | 20 +++++++++++++++----- - 1 file changed, 15 insertions(+), 5 deletions(-) - -commit 2bce2cf2a523f9b8db7f5e255384044b8dfe1a24 -Author: Albert Astals Cid -Date: Tue Mar 19 22:53:47 2013 +0100 - - Avoid blackboxes on weird files using the thin line mode - - Bug #61719 - - splash/Splash.cc | 35 +++++++++++++++++++++++++++++++++++ - splash/Splash.h | 1 + - 2 files changed, 36 insertions(+) - -commit b2d07cbf0c2f94bd25e1422e366ff78031815867 -Merge: 80cf78f2 32069506 -Author: Albert Astals Cid -Date: Mon Mar 18 21:06:59 2013 +0100 - - Merge remote-tracking branch 'origin/poppler-0.22' - -commit 3206950658521009b52f638cc5e712e0cef42706 -Author: Albert Astals Cid -Date: Mon Mar 18 21:06:09 2013 +0100 - - Spec says Zoom -> 0 means no zoom change - - poppler/Link.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 13ee9f8b7d42ed7d7bc0f9dbf190ff66e6ab5a81 -Author: Pino Toscano -Date: Mon Mar 18 18:15:57 2013 +0100 - - cmake: drop search of gthread-2.0 and gio-2.0 from GTK - - this matches what is done in the autoconf counterpart - - cmake/modules/FindGTK.cmake | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 47e869e60fb147caca825380eeaa2a0851d502b9 -Author: Michael Weiser -Date: Mon Mar 18 18:15:14 2013 +0100 - - cmake: search also for gio-2.0 as GLIB library - - cmake/modules/FindGLIB.cmake | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 80cf78f2020e2f4cf33ed49fe522c6861d710588 -Merge: b21780e6 72c8312d -Author: Adrian Johnson -Date: Mon Mar 18 20:02:08 2013 +1030 - - Merge remote-tracking branch 'origin/poppler-0.22' - -commit 72c8312d77704211f55c8de35b47bd811c792878 -Author: Adrian Johnson -Date: Sun Mar 17 19:39:14 2013 +1030 - - cairo: Don't change image interpolation when printing - - Bug 62418 - - poppler/CairoOutputDev.cc | 4 ++++ - 1 file changed, 4 insertions(+) - -commit b21780e69dd92f3f2bcb7851608d3e0557dc81f8 -Author: Thomas Freitag -Date: Sat Mar 16 23:20:35 2013 +0100 - - Fix typo - - poppler/XRef.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 75849a0d7c205c048714b90883695b6bebd2298c -Merge: ec7140b3 5a51812b -Author: Albert Astals Cid -Date: Tue Mar 12 20:27:59 2013 +0100 - - Merge remote-tracking branch 'origin/poppler-0.22' - - Conflicts: - poppler/Stream.h - -commit 5a51812b7c1457feb8acaa106f43d7d5252b3980 -Author: Peter Breitenlohner -Date: Tue Mar 12 20:25:50 2013 +0100 - - Fix compile when not using libjpeg - - poppler/Stream.h | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 341e863d65fdd5619a071e4fd903fa82bf33c757 -Author: Albert Astals Cid -Date: Mon Mar 11 19:20:06 2013 +0100 - - 0.22.2 - - CMakeLists.txt | 4 ++-- - NEWS | 16 ++++++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/Doxyfile | 2 +- - 6 files changed, 22 insertions(+), 6 deletions(-) - -commit ec7140b3f56b034fbbc53cb8066ba01fe9f60f47 -Merge: c86062f9 5db6585c -Author: Albert Astals Cid -Date: Fri Mar 8 16:41:21 2013 +0100 - - Merge remote-tracking branch 'origin/poppler-0.22' - - Conflicts: - poppler/Stream.cc - poppler/Stream.h - -commit 5db6585c2b02dd4071f1adabd53509506333dcf8 -Author: Albert Astals Cid -Date: Fri Mar 8 16:38:49 2013 +0100 - - Make the non jpeglib based DCTStream compile - - poppler/Stream.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 6402e291e1f9374fbaf4de3b97b21f43d38d6ab8 -Author: Thomas Freitag -Date: Fri Mar 8 16:37:11 2013 +0100 - - Workaround broken jpeg stream definitions - - Bug #61994 - - poppler/DCTStream.cc | 22 +++++++++++++++++++--- - poppler/DCTStream.h | 6 +++++- - poppler/Stream.cc | 8 ++++---- - poppler/Stream.h | 4 ++-- - 4 files changed, 30 insertions(+), 10 deletions(-) - -commit c86062f982d6eb08cb27b654b6317c71ab77c692 -Merge: 677e5b26 4e142b60 -Author: Albert Astals Cid -Date: Mon Mar 4 20:13:36 2013 +0100 - - Merge remote-tracking branch 'origin/poppler-0.22' - -commit 4e142b60790638e4495b4fd6551702470cf4c38f -Author: Albert Astals Cid -Date: Mon Mar 4 20:12:01 2013 +0100 - - Make sure we don't try to paint in x < 0 - - Fixes crash in KDE bug #315432 - - splash/Splash.cc | 2 ++ - 1 file changed, 2 insertions(+) - -commit 677e5b265a0d39a988f65d642a4f964a279fad28 -Author: Albert Astals Cid -Date: Sun Mar 3 19:07:32 2013 +0100 - - Small improvements over locker class - - * Remove the namespace (we don't use much/any namespaces in - poppler core) - * Rename the class and defines from lock to locker since lock and be - either the action "to lock" or the "thing that locks", with locker - it is more clear (i think) that is "the thing" than "the action" - * Make Annot::decRefCnt use gLockMutex since we the object itself - is being deleted in the if and not sure the locker would be happy - with that - * change the getNumPages() param to be DoNotLockMutex since - previously it was a gFalse (i guess Thomas made a c&p typo here) - * Have only one constructor like Adam suggested. - - goo/GooMutex.h | 33 +++++++++-------- - poppler/Annot.cc | 92 - +++++++++++++++++++++++----------------------- - poppler/Annot.h | 6 +-- - poppler/Array.cc | 15 ++++---- - poppler/CairoFontEngine.cc | 8 ++-- - poppler/Catalog.cc | 52 +++++++++++++------------- - poppler/Catalog.h | 10 ++--- - poppler/Dict.cc | 20 +++++----- - poppler/PDFDoc.cc | 12 +++--- - poppler/Page.cc | 16 ++++---- - poppler/Stream.cc | 8 ++-- - poppler/XRef.cc | 18 ++++----- - 12 files changed, 147 insertions(+), 143 deletions(-) - -commit d5c929fc253c2748bb8fa3642d9b5383c5fe96f8 -Author: Thomas Freitag -Date: Sun Mar 3 18:00:11 2013 +0100 - - Add a locker helper and a bool -> enum changes - - Bug #59933 - - goo/GooMutex.h | 16 +++++++ - poppler/Annot.cc | 114 - +++++++++++++++++---------------------------- - poppler/Annot.h | 4 +- - poppler/Array.cc | 22 +++------ - poppler/CairoFontEngine.cc | 10 ++-- - poppler/Catalog.cc | 79 ++++++++++--------------------- - poppler/Catalog.h | 9 ++-- - poppler/Dict.cc | 29 ++++-------- - poppler/FontInfo.cc | 2 +- - poppler/PDFDoc.cc | 21 ++------- - poppler/Page.cc | 32 ++++++------- - poppler/Page.h | 3 +- - poppler/Stream.cc | 12 ++--- - poppler/XRef.cc | 29 ++++-------- - 14 files changed, 145 insertions(+), 237 deletions(-) - -commit 1f4a012f7570ffd2120e3e8c2236de5408f3dda3 -Merge: 15d40392 a766740c -Author: Albert Astals Cid -Date: Fri Mar 1 19:16:52 2013 +0100 - - Merge remote-tracking branch 'origin/poppler-0.22' - -commit a766740cf5a5a7580935a026bf15fbd668aa0fdf -Author: Thomas Freitag -Date: Fri Mar 1 19:12:22 2013 +0100 - - Restore CTM on early exits - - Bug #61413 - - poppler/SplashOutputDev.cc | 14 ++++++++++---- - 1 file changed, 10 insertions(+), 4 deletions(-) - -commit 15d40392a29dded8a29c2dc9d7c15b402515e033 -Merge: be5d9af3 39882dfe -Author: Albert Astals Cid -Date: Thu Feb 28 19:46:59 2013 +0100 - - Merge remote-tracking branch 'origin/poppler-0.22' - -commit 39882dfecdccc00db353946a31d395582ee37022 -Author: José Aliste -Date: Wed Feb 27 01:33:38 2013 +0100 - - Correct rendering of underline and strike out annotations - - Current code assumes that the text to underline or strike out is - horizontal. - Fixes bug #61518 - - poppler/Annot.cc | 27 ++++++++++++++++----------- - 1 file changed, 16 insertions(+), 11 deletions(-) - -commit be5d9af38655496a2eaa4eb12cea84461c5aeb3f -Author: Thomas Freitag -Date: Sat Feb 23 23:41:46 2013 +0100 - - expose thin line modes in qt frontend - - qt4/src/poppler-page.cc | 5 ++++- - qt4/src/poppler-qt4.h | 6 ++++-- - 2 files changed, 8 insertions(+), 3 deletions(-) - -commit f96cbacfdbc97ace35f843854992f06e9322f485 -Author: Thomas Freitag -Date: Sat Feb 23 23:39:52 2013 +0100 - - Refine splashThinLineShape support - - splash/Splash.cc | 14 +++++++++++--- - 1 file changed, 11 insertions(+), 3 deletions(-) - -commit 47453a78e52aa43edd148aef53b67306603161f5 -Author: Thomas Freitag -Date: Wed Feb 20 23:12:17 2013 +0100 - - More threading safety - - poppler/Annot.cc | 97 - +++++++++++++++++++++++++++++++++++------ - poppler/Annot.h | 8 +++- - poppler/FontInfo.cc | 29 ++++++------ - poppler/FontInfo.h | 5 ++- - poppler/Page.cc | 11 ++++- - poppler/Page.h | 6 +-- - poppler/SplashOutputDev.cc | 7 ++- - poppler/SplashOutputDev.h | 5 ++- - poppler/XRef.cc | 4 +- - qt4/src/poppler-page.cc | 9 ++-- - qt4/src/poppler-ps-converter.cc | 3 +- - 11 files changed, 139 insertions(+), 45 deletions(-) - -commit 60c5e072d4b930507469e6e8c234971725a4aa26 -Merge: 0d42a6da 8d626256 -Author: Albert Astals Cid -Date: Wed Feb 20 21:08:53 2013 +0100 - - Merge remote-tracking branch 'origin/poppler-0.22' - -commit 8d62625610746ad70ffb88d845791fa03f5e35cc -Author: Thomas Fischer -Date: Wed Feb 20 21:07:10 2013 +0100 - - height -> maskHeight - - Bug #61168 - - utils/ImageOutputDev.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 0d42a6dab479d27de1ecb2b47ad3f7568b1ee638 -Merge: 7eb78809 8fb243bf -Author: Albert Astals Cid -Date: Wed Feb 20 00:00:09 2013 +0100 - - Merge remote-tracking branch 'origin/poppler-0.22' - -commit 8fb243bf11a979af8bfa36427436940706c9f71d -Author: Albert Astals Cid -Date: Tue Feb 19 23:59:17 2013 +0100 - - Initialize cSrcNonIso[3] in splashModeXBGR8 - - Fixes valgrind warning - - splash/Splash.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 8a0199a0247c1a03a4d64375ca8bc900570d1817 -Author: Albert Astals Cid -Date: Tue Feb 19 23:11:46 2013 +0100 - - Fix indent - - splash/Splash.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 7eb7880907cb7b6bd1032013d6ce4c49aa3525c4 -Merge: 2c84acbf 1389aa41 -Author: Albert Astals Cid -Date: Tue Feb 19 22:26:37 2013 +0100 - - Merge remote-tracking branch 'origin/poppler-0.22' - -commit 1389aa41b2984de9da7bb66c11485f6c6aeaea41 -Author: Albert Astals Cid -Date: Tue Feb 19 22:25:56 2013 +0100 - - fix indent - - splash/Splash.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 2c84acbfd02eeeaf0d20542798e907cb011c1e57 -Merge: 401c35b7 ffd33e7b -Author: Albert Astals Cid -Date: Tue Feb 19 11:32:11 2013 +0100 - - Merge remote-tracking branch 'origin/poppler-0.22' - -commit ffd33e7b5aea44bc54a74f433f6bfff859b913dd -Author: Albert Astals Cid -Date: Tue Feb 19 11:31:22 2013 +0100 - - Fix missing ) here too - - README.contributors | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 14466ecc320387c9b6568280614a96e6f56309b4 -Author: Albert Astals Cid -Date: Tue Feb 19 11:31:02 2013 +0100 - - Forgot my C here - - poppler/PageLabelInfo.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 401c35b797d3c25c734fbfb5b95be16a666a6012 -Author: Albert Astals Cid -Date: Mon Feb 18 22:33:07 2013 +0100 - - Fix closing ) as suggested by William Bader - - README.contributors | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 94364adade4dc27e5d80bc14511d4f2b7ea4ab0d -Merge: 164805b4 47f30fa9 -Author: Albert Astals Cid -Date: Mon Feb 18 20:34:34 2013 +0100 - - Merge remote-tracking branch 'origin/poppler-0.22' - -commit 47f30fa96e62fc215c0e80f42517908760ef8065 -Author: Brad Hards -Date: Mon Feb 18 20:38:10 2013 +1100 - - Minor rewording of contributor README - - README.contributors | 13 +++++++------ - 1 file changed, 7 insertions(+), 6 deletions(-) - -commit 164805b4471256d3915c5e49fff28c9cdcbf89e6 -Author: Albert Astals Cid -Date: Mon Feb 18 20:05:12 2013 +0100 - - Move the commented test to a proper one - - poppler/Makefile.am | 3 +- - poppler/PageLabelInfo.cc | 160 - +------------------------------------- - poppler/PageLabelInfo_p.h | 147 - ++++++++++++++++++++++++++++++++++ - qt4/tests/CMakeLists.txt | 1 + - qt4/tests/Makefile.am | 4 + - qt4/tests/check_pagelabelinfo.cpp | 43 ++++++++++ - 6 files changed, 198 insertions(+), 160 deletions(-) - -commit 527b91a0ef97906041ffe57e88f0d26e1c407af0 -Merge: df355624 95609be5 -Author: Albert Astals Cid -Date: Mon Feb 18 19:49:14 2013 +0100 - - Merge remote-tracking branch 'origin/poppler-0.22' - -commit 95609be551fc4413874b8980010be70fbbab112a -Author: Albert Astals Cid -Date: Mon Feb 18 19:47:19 2013 +0100 - - Use the toLatin function in PageLabelInfo::indexToLabel - - Wonder why Kristian never enabled it? - Fixes bug #61034 - - poppler/PageLabelInfo.cc | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -commit df3556240d5e4b4546b3c42b29be6d2be83a2802 -Merge: 4dacd7cd 5c7057c6 -Author: Albert Astals Cid -Date: Tue Feb 12 23:55:24 2013 +0100 - - Merge remote-tracking branch 'origin/poppler-0.22' - -commit 5c7057c61ed6e270e001c1f86632f265bebb6890 -Author: Nuno Araujo -Date: Tue Feb 12 23:54:47 2013 +0100 - - Fix the build with automake-1.13 - - autogen.sh | 17 +++++++++-------- - configure.ac | 3 +-- - 2 files changed, 10 insertions(+), 10 deletions(-) - -commit 4dacd7cdeb19d16fe7737c71e34904c7363c6b63 -Merge: 7f2c255f 9fc4b9f7 -Author: Albert Astals Cid -Date: Tue Feb 12 22:59:56 2013 +0100 - - Merge remote-tracking branch 'origin/poppler-0.22' - -commit 9fc4b9f7a7e6105a6fd85aed9c21b78742e89ddd -Author: Peter Breitenlohner -Date: Tue Feb 12 22:58:17 2013 +0100 - - true->TRUE - - Fixes compilation with jpeglib9 - - goo/JpegWriter.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 7f2c255ff28386ba992717f729f25a979f240375 -Author: Thomas Freitag -Date: Tue Feb 12 22:48:40 2013 +0100 - - Introduce option SplashThinLineMode - - More info at bug #37347 - - poppler/SplashOutputDev.cc | 9 ++++++++- - poppler/SplashOutputDev.h | 3 ++- - splash/Splash.cc | 37 ++++++++++++++++++++++++++++++------- - splash/Splash.h | 9 +++++++-- - splash/SplashClip.cc | 7 ++++--- - splash/SplashClip.h | 4 +++- - splash/SplashTypes.h | 8 +++++++- - splash/SplashXPath.cc | 14 ++++++++++++-- - splash/SplashXPath.h | 17 ++++++++++++++++- - splash/SplashXPathScanner.cc | 9 +++++---- - splash/SplashXPathScanner.h | 17 ++++++++++++++++- - 11 files changed, 110 insertions(+), 24 deletions(-) - -commit c2ebcbea2267f861c491c0cd6c1fbf2dc2aff7d2 -Merge: 48ed05d9 dca21f86 -Author: Albert Astals Cid -Date: Sun Feb 10 12:01:13 2013 +0100 - - Merge remote-tracking branch 'origin/poppler-0.22' - - Conflicts: - poppler/Parser.cc - -commit dca21f86359b6b2a925f7b05a2f36ab854cefbce -Author: Albert Astals Cid -Date: Sun Feb 10 11:47:21 2013 +0100 - - 0.22.1 - - CMakeLists.txt | 2 +- - NEWS | 9 +++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - qt4/src/Doxyfile | 2 +- - 5 files changed, 13 insertions(+), 4 deletions(-) - -commit e8e9245f6a4884da3940fc281b7ff1a42d7f5964 -Author: Albert Astals Cid -Date: Sun Feb 10 11:43:14 2013 +0100 - - Update C year here too - - poppler/poppler-config.h.cmake | 2 +- - poppler/poppler-config.h.in | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit ebbacd897e2b529d1c3637b6af438b8dcc1d7ce8 -Author: Albert Astals Cid -Date: Sun Feb 10 11:42:21 2013 +0100 - - Update C - - poppler/Parser.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 48ed05d95598b642a57456a843baf9f246502bb6 -Author: Adrian Johnson -Date: Wed Feb 6 21:56:01 2013 +1030 - - Make Goffset long long and factor out all fseek/ftell into gfile.cc - - This fixes build problems on 32-bit machines due to off_t being - defined differently depending on whether source files included - condig.h. - - Bug 60095 - - goo/gfile.cc | 38 ++++++++++++++++++++++++ - goo/gfile.h | 7 +++++ - goo/gtypes.h | 19 +----------- - poppler/Stream.cc | 67 - ++++++------------------------------------ - poppler/XRef.cc | 4 +-- - poppler/poppler-config.h.cmake | 6 ---- - poppler/poppler-config.h.in | 6 ---- - utils/pdfinfo.cc | 16 ++-------- - 8 files changed, 60 insertions(+), 103 deletions(-) - -commit fbcd64386c1b189db6e06234577261973bdc88cc -Author: Adrian Johnson -Date: Fri Jan 25 22:24:50 2013 +1030 - - cairo: support uncolored tiling patterns - - Bug 59179 - - poppler/CairoOutputDev.cc | 20 ++++++++++++++++++++ - poppler/CairoOutputDev.h | 1 + - 2 files changed, 21 insertions(+) - -commit c60ad119363c65d097dff56a68c1ab3fb2933f0b -Author: Adrian Johnson -Date: Sun Jan 27 15:50:26 2013 +1030 - - A few more missing Goffsets - - glib/poppler-input-stream.h | 2 +- - poppler/PDFDoc.cc | 16 ++++++++-------- - poppler/PDFDoc.h | 6 +++--- - poppler/Stream.cc | 4 ++-- - poppler/Stream.h | 4 ++-- - 5 files changed, 16 insertions(+), 16 deletions(-) - -commit 9b113dc86a27085693ac4bcad061780c881ea7f9 -Author: Adrian Johnson -Date: Sun Jan 27 11:32:34 2013 +1030 - - Use sys/types.h instead of stdio.h for the off_t type - - Bug 44085 - - goo/gtypes.h | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -commit f3aa5236361dca3db64f110520ebe721ba1c9464 -Author: Pino Toscano -Date: Sun Jan 27 18:50:10 2013 +0100 - - use Goffset also for length in MemStream ctor - - poppler/Stream.cc | 2 +- - poppler/Stream.h | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit eb5ce6990522bac91d8f5d0d3636c46178386d25 -Author: Pino Toscano -Date: Sun Jan 27 15:20:42 2013 +0100 - - avoid max() macro expansion - - protect against compilers defining max as macro - - poppler/XRef.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 6b716b1ab60b573b5770d8636992247387bc3513 -Author: Pino Toscano -Date: Sun Jan 27 15:18:04 2013 +0100 - - cmake: provide HAVE_FSEEK64 and HAVE_FSEEKO in poppler-config - - followup of a3cee0e7e9dd292c70fe1fa19a92e70bbc1e1b41 also for the - cmake-generated poppler-config.h - - poppler/poppler-config.h.cmake | 6 ++++++ - 1 file changed, 6 insertions(+) - -commit fe59ac914230b80aa82b314398a8a038ef083e06 -Author: Adrian Johnson -Date: Sat Jan 26 16:44:49 2013 +1030 - - Read 8 byte xref offsets when sizeof(Goffset) < 8 - - and print an error if the offset read is too large for Goffset. - - Bug 56318 - - poppler/XRef.cc | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -commit 098d98dfc3846150098f5b20f3f5a07cb565c465 -Author: Lu Wang -Date: Sat Jan 26 19:31:20 2013 +0100 - - Rename function - - Makes it say more what it does - - poppler/GfxState.cc | 3 ++- - poppler/GfxState.h | 3 ++- - poppler/SplashOutputDev.cc | 5 +++-- - 3 files changed, 7 insertions(+), 4 deletions(-) - -commit 97e93d7583f2a6a5b1c8b51474744ca05277dc28 -Author: Lu Wang -Date: Sat Jan 26 16:56:00 2013 +0100 - - Remove unused deviceHasTextClip - - poppler/CairoOutputDev.h | 1 - - poppler/OutputDev.h | 1 - - poppler/PSOutputDev.h | 1 - - poppler/SplashOutputDev.h | 1 - - utils/pdftohtml.cc | 1 - - 5 files changed, 5 deletions(-) - -commit 1bb3ddc2264cb65dffd553a952ee4518344df0de -Author: Albert Astals Cid -Date: Fri Jan 25 19:37:24 2013 +0100 - - A few Goffsets we missed - - charactersRead is returned in BaseCryptStream::getPos thus should - be a Goffset - Gfx::getPos returns Parser::getPos and thus should be a Goffset too - - poppler/Decrypt.h | 3 ++- - poppler/Gfx.cc | 4 ++-- - poppler/Gfx.h | 4 ++-- - 3 files changed, 6 insertions(+), 5 deletions(-) - -commit 5f8b1275a19b2036c6e9323a744d8bc64af31c36 -Author: Albert Astals Cid -Date: Fri Jan 25 19:32:58 2013 +0100 - - New year! - - poppler/poppler-config.h.cmake | 2 +- - poppler/poppler-config.h.in | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit 574907e6a74e62a5ee6d7f17c43fdd9bcb07e069 -Author: Albert Astals Cid -Date: Fri Jan 25 19:31:59 2013 +0100 - - Adrian C for 2013 because of the big files support - - cpp/poppler-private.cpp | 1 + - cpp/poppler-private.h | 1 + - goo/gtypes.h | 1 + - poppler/Decrypt.cc | 1 + - poppler/Decrypt.h | 1 + - poppler/Error.cc | 1 + - poppler/Error.h | 1 + - poppler/Hints.cc | 1 + - poppler/Hints.h | 1 + - poppler/JBIG2Stream.cc | 1 + - poppler/JBIG2Stream.h | 1 + - poppler/JPEG2000Stream.cc | 1 + - poppler/JPEG2000Stream.h | 1 + - poppler/Lexer.cc | 2 +- - poppler/Lexer.h | 1 + - poppler/Object.cc | 1 + - poppler/Object.h | 1 + - poppler/PDFDoc.cc | 1 + - poppler/PDFDoc.h | 1 + - poppler/PageTransition.cc | 1 + - poppler/Parser.cc | 1 + - poppler/Parser.h | 1 + - poppler/SecurityHandler.cc | 1 + - poppler/Stream.cc | 1 + - poppler/Stream.h | 1 + - poppler/XRef.cc | 1 + - poppler/XRef.h | 1 + - qt4/src/poppler-private.cc | 1 + - qt4/src/poppler-qiodeviceoutstream-private.h | 1 + - qt4/src/poppler-qiodeviceoutstream.cc | 1 + - utils/pdfinfo.cc | 2 +- - utils/pdfunite.cc | 1 + - 32 files changed, 32 insertions(+), 2 deletions(-) - -commit 95b81ae9b5a345c9caa3d658b9b543d1937c6c02 -Author: Adrian Johnson -Date: Fri Jan 25 21:37:51 2013 +1030 - - gitignore - - qt4/tests/.gitignore | 2 ++ - 1 file changed, 2 insertions(+) - -commit 576dc53c857d99bb5d81fe7c9c52fe314a6e58ee -Author: Thomas Freitag -Date: Fri Jan 25 21:27:13 2013 +1030 - - splash: fix uninitialized memory - - Bug 44085 - - poppler/SplashOutputDev.cc | 13 +++++++------ - 1 file changed, 7 insertions(+), 6 deletions(-) - -commit a9768588cd6086f4ca4e6906db038cfdbfd551d5 -Author: Adrian Johnson -Date: Fri Jan 25 21:24:29 2013 +1030 - - win32 large file support - - Bug 44085 - - goo/gtypes.h | 2 ++ - poppler/Stream.cc | 13 +++++++++++++ - utils/pdfinfo.cc | 3 +++ - 3 files changed, 18 insertions(+) - -commit a3cee0e7e9dd292c70fe1fa19a92e70bbc1e1b41 -Author: Adrian Johnson -Date: Fri Jan 25 21:23:43 2013 +1030 - - Large file support - - Create a Goffset type and use this type for all file offsets and file - sizes. - - Bug 44085 - - cpp/poppler-private.cpp | 2 +- - cpp/poppler-private.h | 2 +- - glib/poppler-input-stream.cc | 10 +- - glib/poppler-input-stream.h | 16 +-- - goo/gtypes.h | 15 +++ - poppler/Decrypt.cc | 2 +- - poppler/Decrypt.h | 2 +- - poppler/Error.cc | 10 +- - poppler/Error.h | 5 +- - poppler/Hints.cc | 4 +- - poppler/Hints.h | 6 +- - poppler/JBIG2Stream.cc | 8 +- - poppler/JBIG2Stream.h | 2 +- - poppler/JPEG2000Stream.cc | 2 +- - poppler/JPEG2000Stream.h | 2 +- - poppler/Lexer.h | 8 +- - poppler/Object.h | 8 +- - poppler/PDFDoc.cc | 54 +++++----- - poppler/PDFDoc.h | 14 +-- - poppler/Parser.cc | 10 +- - poppler/Parser.h | 2 +- - poppler/Stream.cc | 88 ++++++++--------- - poppler/Stream.h | 102 +++++++++---------- - poppler/XRef.cc | 141 - +++++++++++++++++---------- - poppler/XRef.h | 34 +++---- - poppler/poppler-config.h.in | 6 ++ - qt4/src/poppler-private.cc | 2 +- - qt4/src/poppler-qiodeviceoutstream-private.h | 2 +- - qt4/src/poppler-qiodeviceoutstream.cc | 4 +- - test/perf-test.cc | 6 +- - utils/pdfinfo.cc | 6 +- - utils/pdfunite.cc | 2 +- - 32 files changed, 320 insertions(+), 257 deletions(-) - -commit 6eebbb9c015f98b713205e56ab2f1d4d430e9206 -Author: Adrian Johnson -Date: Fri Jan 25 21:22:51 2013 +1030 - - Add Int64 object type - - Bug 44085 - - poppler/Lexer.cc | 46 - ++++++++++++++++++++-------------------------- - poppler/Object.cc | 6 +++--- - poppler/Object.h | 26 +++++++++++++++----------- - poppler/PDFDoc.cc | 4 ++-- - poppler/SecurityHandler.cc | 4 ++-- - qt4/tests/check_lexer.cpp | 24 +++++++++++++++++------- - test/pdf-fullrewrite.cc | 9 +-------- - 7 files changed, 60 insertions(+), 59 deletions(-) - -commit be495d73ce7324963a979cffc149330f5512288b -Author: Adrian Johnson -Date: Fri Jan 25 21:14:21 2013 +1030 - - use getNum instead of getReal - - poppler/PageTransition.cc | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit a5adb6738e1e191c64457e0c07ee2e3422a042dd -Author: Albert Astals Cid -Date: Sat Jan 19 18:13:33 2013 +0100 - - Don't use config.h but poppler-config.h - - That was already included but i forgot to kill the other one - - poppler/XRef.h | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -commit 8eb489c355d734a72e140ce7e32470d048362499 -Author: Thomas Freitag -Date: Sat Jan 19 17:43:08 2013 +0100 - - Make rendering thread-safe - - Bug #50992 - - glib/poppler-input-stream.cc | 4 ++ - glib/poppler-input-stream.h | 1 + - poppler/Annot.cc | 52 +++++++++---------- - poppler/Array.cc | 48 +++++++++++++++++- - poppler/Array.h | 15 ++++-- - poppler/ArthurOutputDev.cc | 3 +- - poppler/ArthurOutputDev.h | 3 +- - poppler/CairoFontEngine.cc | 33 +++++++++--- - poppler/CairoFontEngine.h | 11 ++-- - poppler/CairoOutputDev.cc | 15 ++++-- - poppler/CairoOutputDev.h | 5 +- - poppler/Catalog.cc | 84 +++++++++++++++++++++++++++---- - poppler/Catalog.h | 15 ++++-- - poppler/Dict.cc | 67 ++++++++++++++++++++++++- - poppler/Dict.h | 11 +++- - poppler/Gfx.cc | 18 ++++--- - poppler/Gfx.h | 8 +-- - poppler/GlobalParamsWin.cc | 4 +- - poppler/Object.h | 7 +-- - poppler/OutputDev.h | 4 +- - poppler/PDFDoc.cc | 66 ++++++++++++++++++------ - poppler/PDFDoc.h | 11 ++-- - poppler/PSOutputDev.cc | 12 ++--- - poppler/PSOutputDev.h | 4 +- - poppler/Page.cc | 75 ++++++++++++++++++++++++--- - poppler/Page.h | 18 +++++-- - poppler/Parser.cc | 3 +- - poppler/PreScanOutputDev.cc | 4 +- - poppler/PreScanOutputDev.h | 4 +- - poppler/SplashOutputDev.cc | 16 +++--- - poppler/SplashOutputDev.h | 5 +- - poppler/Stream.cc | 117 - ++++++++++++++++++++++++++++++++----------- - poppler/Stream.h | 35 +++++++++---- - poppler/TextOutputDev.cc | 5 +- - poppler/TextOutputDev.h | 3 +- - poppler/XRef.cc | 99 +++++++++++++++++++++++++++++++++--- - poppler/XRef.h | 16 +++++- - qt4/src/poppler-document.cc | 23 ++++----- - qt4/src/poppler-page.cc | 64 ++++++++++++++++++++--- - qt4/src/poppler-private.cc | 3 +- - qt4/src/poppler-private.h | 74 +-------------------------- - test/gtk-test.cc | 2 +- - utils/HtmlOutputDev.cc | 3 +- - utils/HtmlOutputDev.h | 3 +- - utils/ImageOutputDev.h | 3 +- - 45 files changed, 793 insertions(+), 283 deletions(-) - -commit 3db9472e2b016f1b411174273f27848193ab18e5 -Author: José Aliste -Date: Fri Jan 18 15:22:03 2013 +0100 - - Add a null check for gfxFont - - Bug #59561 - - poppler/TextOutputDev.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 4b69217f72f3fd313f73df059eb1e6294878a95e -Author: Peter Dyballa -Date: Fri Jan 11 00:32:46 2013 +0100 - - Use CPPFLAGS for CPPFLAGS not CFLAGS - - Bug #59186 - - m4/libjpeg.m4 | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 8b6dc55e530b2f5ede6b9dfb64aafdd1d5836492 -Author: Albert Astals Cid -Date: Thu Jan 10 22:31:52 2013 +0100 - - Fix invalid memory access in 1150.pdf.asan.8.69 - - splash/Splash.cc | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -commit e14b6e9c13d35c9bd1e0c50906ace8e707816888 -Author: Albert Astals Cid -Date: Thu Jan 10 20:52:02 2013 +0100 - - Fix invalid memory access in 2030.pdf.asan.69.463 - - poppler/Function.cc | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -commit 0388837f01bc467045164f9ddaff787000a8caaa -Author: Albert Astals Cid -Date: Thu Jan 10 20:29:06 2013 +0100 - - Fix another invalid memory access in 1091.pdf.asan.72.42 - - poppler/Stream.cc | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - -commit 957aa252912cde85d76c41e9710b33425a82b696 -Author: Albert Astals Cid -Date: Thu Jan 10 19:16:19 2013 +0100 - - Fix invalid memory accesses in 1091.pdf.asan.72.42 - - splash/Splash.cc | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -commit bbc2d8918fe234b7ef2c480eb148943922cc0959 -Author: Albert Astals Cid -Date: Thu Jan 10 19:07:48 2013 +0100 - - Fix invalid memory accesses in 1036.pdf.asan.23.17 - - splash/Splash.cc | 14 ++++++++++++-- - 1 file changed, 12 insertions(+), 2 deletions(-) - -commit a9b8ab4657dec65b8b86c225d12c533ad7e984e2 -Author: Albert Astals Cid -Date: Wed Jan 9 22:56:45 2013 +0100 - - Fix crash in broken file 1031.pdf.asan.48.15 - - splash/Splash.cc | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) - -commit 7266a634e01e20648cc877371edc95651d30d4fc -Author: Albert Astals Cid -Date: Wed Jan 9 22:52:45 2013 +0100 - - Forgot the C of the last commit - - splash/Splash.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit a205e71a2dbe0c8d4f4905a76a3f79ec522eacec -Author: Albert Astals Cid -Date: Wed Jan 9 22:47:28 2013 +0100 - - Do not crash in broken documents like 1007.pdf.asan.48.4 - - splash/Splash.cc | 12 +++++++++++- - 1 file changed, 11 insertions(+), 1 deletion(-) - -commit b1026b5978c385328f2a15a2185c599a563edf91 -Author: Albert Astals Cid -Date: Wed Jan 9 22:17:09 2013 +0100 - - Initialize refLine totally - - Fixes uninitialized memory read in 1004.pdf.asan.7.3 - - poppler/Stream.cc | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -commit bef2c42f381c74fdb8bbb43babe1a93a0e229fb0 -Author: Adrian Johnson -Date: Thu Jan 3 15:27:36 2013 +1030 - - Parser: return error if stream encountered when allowStreams = false - - Opening a PDF file where the first object is a stream prints a - "Command token too long" error message. This is caused by the - Linearization check in Linearization::Linearization reading objects - with allowStreams = false. The Parser ignores the "stream" token and - tries reading the next token which is usually binary data. Setting - allowStreams to true will not work since the stream length is often an - indirect object and at this point the XRef has not been created. - - Fix this by making Parser return an error object if the "stream" token - is encountered when allowStreams is false. - - Bug 58966 - - poppler/Parser.cc | 14 +++++++------- - 1 file changed, 7 insertions(+), 7 deletions(-) - -commit 801f7feea79e5bc3b5417566552e4df1e6b8a51c -Author: Albert Astals Cid -Date: Sat Dec 29 19:22:54 2012 +0100 - - 0.22.0 - - CMakeLists.txt | 6 +++--- - NEWS | 14 ++++++++++++++ - configure.ac | 4 ++-- - cpp/Doxyfile | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/Doxyfile | 2 +- - 6 files changed, 22 insertions(+), 8 deletions(-) - -commit bf5ef68c89d4189b18458b764f807cfc6599bad7 -Author: Carlos Garcia Campos -Date: Sat Dec 29 19:43:11 2012 +0100 - - regtest: Print test results when the test has finished - - To make sure the result corresponds to the test now that we are using - multiple threads. - - regtest/Printer.py | 25 +++++++++++++++++++------ - regtest/TestRun.py | 18 +++++++++--------- - 2 files changed, 28 insertions(+), 15 deletions(-) - -commit 80c7f6aa3fa83175fafc71fa8c834350d513a48f -Author: Jason Crain -Date: Fri Nov 23 23:31:01 2012 -0600 - - TextOutputDev: Use page size for max value in TextPage::visitSelection - - https://bugs.freedesktop.org/show_bug.cgi?id=50138 - - poppler/TextOutputDev.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 0d31edfa5617f4fecb04d5476de54a63b6146686 -Author: Ross Lagerwall -Date: Fri Nov 30 09:23:55 2012 +0000 - - pdf-inspector Change from the deprecated GtkTable to GtkGrid - - This fixes the problem of the description_label height changing after - its text changes which was introduced since the port to Gtk3. - - https://bugs.freedesktop.org/show_bug.cgi?id=57727 - - test/pdf-inspector.ui | 39 +++++++++++++++------------------------ - 1 file changed, 15 insertions(+), 24 deletions(-) - -commit 9977a4f26b5698b0b85ca911e7392013941944e0 -Author: Ross Lagerwall -Date: Tue Nov 13 15:49:44 2012 +0000 - - pdf-inspector: Remove deprectated has-separator property - - https://bugs.freedesktop.org/show_bug.cgi?id=57727 - - test/pdf-inspector.ui | 1 - - 1 file changed, 1 deletion(-) - -commit 806d116a38c2a6552c9bcee2c6f753d7059c17aa -Author: Ross Lagerwall -Date: Tue Nov 13 15:44:15 2012 +0000 - - pdf-inspector: Add correct title and copyright - - https://bugs.freedesktop.org/show_bug.cgi?id=57727 - - test/pdf-inspector.cc | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) - -commit 7d5bf74c19768fa3447819a4debff06d5d83900a -Author: Ross Lagerwall -Date: Tue Nov 13 15:23:36 2012 +0000 - - pdf-inspector: Fix crash by not freeing filename_g - - It is not necessary because PDFDoc takes over filename_g and destroys - it in its deconstructor. - - https://bugs.freedesktop.org/show_bug.cgi?id=57727 - - test/pdf-inspector.cc | 1 - - 1 file changed, 1 deletion(-) - -commit d61c6d4944d6f7c9e8b517dd28958124f4923d08 -Author: Thomas Freitag -Date: Fri Dec 28 01:18:48 2012 +0100 - - Repair pdfunite - - Sorry, when I implemented the support encrypted pdf files in - pdfseparate I - missed that writePageObjects of course is also used in pdfunite - for combining - pages, and even more that encrypted files are still not supported - by pdfunite, - I removed the numoffset from writing the objects itself. Therefore - there are - still all objects in the combined pdf file, but the references - missing the - numoffset and therefore were no more reachable. - The patch repairs it. - - Bug #58569 - - poppler/PDFDoc.cc | 6 ++++-- - poppler/PDFDoc.h | 4 ++-- - utils/pdfunite.cc | 4 ++-- - 3 files changed, 8 insertions(+), 6 deletions(-) - -commit be4804bff2b722ceac180da52ad436fee548f9ee -Author: Albert Astals Cid -Date: Fri Dec 28 01:17:14 2012 +0100 - - dos2unix - - poppler/PDFDoc.cc | 36 ++++++++++++++++++------------------ - 1 file changed, 18 insertions(+), 18 deletions(-) - -commit 703c77eb59aa22ab6372d56a20ee81dc7dfa6e4a -Author: Even Rouault -Date: Fri Dec 28 00:57:17 2012 +0100 - - Fix very long loop in JPXStream::getImageParams() - - poppler/JPXStream.cc | 14 ++++++++++---- - 1 file changed, 10 insertions(+), 4 deletions(-) - -commit 7e0be7854adc49e4e00c0badb0dc470fbdf6d612 -Author: Even Rouault -Date: Fri Dec 28 00:44:29 2012 +0100 - - Avoid DoS due to huge number of JPX tiles in a stream - - poppler/JPXStream.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 2017dbebd9afd4f172242ff8462fce739d911e64 -Author: Even Rouault -Date: Fri Dec 28 00:30:13 2012 +0100 - - Do not crash on 0 or negative nBits values - - poppler/Stream.cc | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -commit 858df0dc04e2f306e806fe0fc4fb5c8ec804e263 -Author: Albert Astals Cid -Date: Thu Dec 27 23:30:27 2012 +0100 - - Fix arg typo - - poppler/PDFDoc.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 1dd6280d79ad22461208702b3c929377887c99ff -Author: Albert Astals Cid -Date: Sat Dec 15 16:39:23 2012 +0100 - - 0.21.4 soversion increases - - CMakeLists.txt | 2 +- - glib/CMakeLists.txt | 2 +- - glib/Makefile.am | 2 +- - poppler/Makefile.am | 2 +- - 4 files changed, 4 insertions(+), 4 deletions(-) - -commit 99d0288bb0b6879ae5414d174939bbd9c1e90bd3 -Author: Albert Astals Cid -Date: Sat Dec 15 16:37:19 2012 +0100 - - 0.21.4 version increase - - CMakeLists.txt | 2 +- - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - qt4/src/Doxyfile | 2 +- - 4 files changed, 4 insertions(+), 4 deletions(-) - -commit 2bc48d5369f1dbecfc4db2878f33bdeb80d8d90f -Author: Albert Astals Cid -Date: Sat Dec 15 16:36:38 2012 +0100 - - 0.21.4 NEWS - - NEWS | 18 ++++++++++++++++++ - 1 file changed, 18 insertions(+) - -commit b3423d54b1254597d7ca953872211fa3aa83e29c -Author: Albert Astals Cid -Date: Sat Dec 15 16:29:54 2012 +0100 - - Updated copyrights - - goo/JpegWriter.h | 2 +- - goo/PNGWriter.cc | 1 + - goo/PNGWriter.h | 1 + - goo/TiffWriter.cc | 1 + - goo/TiffWriter.h | 1 + - poppler/GlobalParams.cc | 2 +- - poppler/TextOutputDev.cc | 1 + - splash/Splash.cc | 1 + - utils/HtmlOutputDev.cc | 1 + - 9 files changed, 9 insertions(+), 2 deletions(-) - -commit 487f20d24830a97cad4773ae27f0c2cc58df2ed0 -Author: Albert Astals Cid -Date: Thu Dec 13 20:40:39 2012 +0100 - - Check obj1 is a dict before using it - - Fixes bug #58257 - - poppler/Gfx.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 03045469206adbd797e3a38fee3a16cdd1716812 -Author: Albert Astals Cid -Date: Thu Dec 13 19:24:54 2012 +0100 - - Fix crop on EPS conversion - - Bug #30692 - Patch is half William Bader's and half mine - - poppler/OutputDev.h | 5 +++++ - poppler/PSOutputDev.h | 4 +++- - poppler/Page.cc | 3 +++ - poppler/Page.h | 2 ++ - 4 files changed, 13 insertions(+), 1 deletion(-) - -commit 5d50b2765428e5a417967be2f41452ab05917db7 -Author: Peter Breitenlohner -Date: Tue Dec 11 18:54:30 2012 +0100 - - Correct bad semantics - - Negation has higher precedence than comparison - Confirmed by Marek Kasik that wrote the code originally - - poppler/TextOutputDev.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit e306bad391a3ff49593f1f3bac0717d62599bd13 -Author: Pino Toscano -Date: Sun Dec 9 22:40:27 2012 +0100 - - pngwriter: move #include into .cc file - - Move all the private data (including the libpng types) to a private - class. - - This requires HtmlOutputDev.cc to include on its own (which - is correct, since it uses the libpng API directly). - - goo/PNGWriter.cc | 98 - +++++++++++++++++++++++++++++--------------------- - goo/PNGWriter.h | 12 ++----- - utils/HtmlOutputDev.cc | 4 +++ - 3 files changed, 64 insertions(+), 50 deletions(-) - -commit cf338551e9d031cc00d56cea0d258ec5fd96e79a -Author: Pino Toscano -Date: Sun Dec 9 22:22:03 2012 +0100 - - tiffwriter: move #include into .cc file - - Move all the private data (including the libtiff types) to a private - class. - - goo/TiffWriter.cc | 94 - ++++++++++++++++++++++++++++++++----------------------- - goo/TiffWriter.h | 12 ++----- - 2 files changed, 56 insertions(+), 50 deletions(-) - -commit 0dfa51f0bfa787ee9c865fd4f05e4bd964c260fc -Author: Albert Astals Cid -Date: Sun Dec 9 22:31:50 2012 +0100 - - Having a look at the log Marek has (C) in this file - - poppler/TextOutputDev.cc | 1 + - 1 file changed, 1 insertion(+) - -commit f1b2e29e1d5f420903085318f06c4dc83ebb24f3 -Author: Thomas Freitag -Date: Sun Dec 9 20:59:26 2012 +0100 - - Fix crash when rendering on mono1 - - poppler/SplashOutputDev.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 71bad47ed6a36d825b0d08992c8db56845c71e40 -Author: Marek Kasik -Date: Sun Dec 9 20:20:00 2012 +0100 - - Filter stuff that might end up in the shell - - Since it seems shells don't know how to filter stuff and might - causing bad things to happen - - poppler/Error.cc | 21 +++++++++++++++++---- - 1 file changed, 17 insertions(+), 4 deletions(-) - -commit c35d030472e6cb140c3dff30b91541772c992eb0 -Author: Albert Astals Cid -Date: Sat Dec 8 23:51:59 2012 +0100 - - Add private copy constructor and operator= to make sure we don't - use the default ones - - Since using them would results in bad things happening - - goo/GooHash.h | 16 ++++++++++++++++ - goo/GooList.h | 16 ++++++++++++++++ - goo/PNGWriter.h | 5 ++++- - goo/TiffWriter.h | 5 ++++- - goo/gfile.h | 4 ++++ - 5 files changed, 44 insertions(+), 2 deletions(-) - -commit f6741d9242bf2d9c13c8d534c50c8e4d404afc7f -Author: Adrian Johnson -Date: Sun Dec 2 09:34:35 2012 +1030 - - jpegwriter: move #include "jpeglib.h" into .cc file - - On cygwin pdftocairo -v shows the wrong version due to - jpeglib.h defining PACKAGE_VERSION. - - Avoid polluting our header files by moving libjpeg.h and - libjpeg types into JpegWriter.cc - - Bug 57687 - - goo/JpegWriter.cc | 120 - ++++++++++++++++++++++++++++++++----------------- - goo/JpegWriter.h | 25 ++++++----- - splash/SplashBitmap.cc | 2 +- - utils/pdftocairo.cc | 4 +- - 4 files changed, 95 insertions(+), 56 deletions(-) - -commit e78dbb1b7dbd20c3ae547b02270ab0648c1bfc61 -Author: Adrian Johnson -Date: Sun Dec 2 09:10:32 2012 +1030 - - Reformat goo/*Writer files to poppler style - - goo/ImgWriter.h | 20 ++--- - goo/JpegWriter.cc | 184 ++++++++++++++++++++++---------------------- - goo/JpegWriter.h | 38 ++++----- - goo/PNGWriter.cc | 224 - +++++++++++++++++++++++++++--------------------------- - goo/PNGWriter.h | 62 +++++++-------- - goo/TiffWriter.cc | 40 +++++----- - goo/TiffWriter.h | 58 +++++++------- - 7 files changed, 313 insertions(+), 313 deletions(-) - -commit 1bfe4b22cf893dd498d6f306ee9cf942c72fe3ed -Author: Matthias Kramm -Date: Mon Nov 19 12:39:56 2012 -0800 - - Fix linewidths in monochrome mode. - - For zoom levels that scale the page below sqrt(2) of the original - resolution, monochrome line widths were wrong (snapped back to 1 pixel - wide.) This patch fixes that issue. - - splash/Splash.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit e5008bdb26df0135edfbd30a811df2332f4e036c -Author: José Aliste -Date: Sat Dec 8 10:33:21 2012 -0300 - - glib-demo: Update the demo to modify flags of annotations - - https://bugs.freedesktop.org/show_bug.cgi?id=58015 - - glib/demo/annots.c | 65 - ++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 65 insertions(+) - -commit 8cd5cae953de374276c11711dc106de15c8dcad0 -Author: Carlos Garcia Campos -Date: Sat Dec 8 18:57:07 2012 +0100 - - regtest: Use the number of cpus as default number of worker threads - - regtest/main.py | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -commit 605c363b04ba3853883010c0a413054fe246d9aa -Author: Carlos Garcia Campos -Date: Sat Dec 8 18:45:22 2012 +0100 - - regtest: Remove trailing whitespaces - - regtest/TestReferences.py | 10 +++++----- - regtest/TestRun.py | 10 +++++----- - regtest/main.py | 6 +++--- - 3 files changed, 13 insertions(+), 13 deletions(-) - -commit 787a8438708397f0a1bf26e93726f544c91533e6 -Author: Hib Eris -Date: Sun Dec 2 08:03:10 2012 +0100 - - Fix compile warning on deprecated conversion from string constant - - Fixes (for win32): - - CXX GlobalParams.lo - GlobalParams.cc: In function 'char* get_poppler_datadir()': - GlobalParams.cc:181:12: warning: deprecated conversion from string - constant to 'char*' [-Wwrite-strings] - - poppler/GlobalParams.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit cb3a10417ae659fdb7b77132c569c93ec00bc95e -Author: Fabio D'Urso -Date: Sun Dec 2 01:41:05 2012 +0100 - - Fixed check_lexer on 32-bit systems - - qt4/tests/check_lexer.cpp | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 8550576bdf74180b62f54f9fd59213fbcd0a1be1 -Author: José Aliste -Date: Sat Dec 8 10:33:04 2012 -0300 - - glib: Add poppler_annot_set_flags - - https://bugs.freedesktop.org/show_bug.cgi?id=58015 - - glib/poppler-annot.cc | 22 ++++++++++++++++++++++ - glib/poppler-annot.h | 2 ++ - 2 files changed, 24 insertions(+) - -commit 15dcc5426ce319429e1a2c518902effb2ddf06cf -Author: Adam Reichold -Date: Thu Dec 6 18:45:46 2012 +0100 - - implement parallel testing using Python's Queue class - - regtest/Printer.py | 36 +++++++++++++++++----------- - regtest/TestReferences.py | 23 +++++++++++++++++- - regtest/TestRun.py | 58 - ++++++++++++++++++++++++++++++++++++---------- - regtest/backends/cairo.py | 5 ++-- - regtest/backends/splash.py | 5 ++-- - regtest/main.py | 11 ++++++++- - 6 files changed, 104 insertions(+), 34 deletions(-) - -commit c46646020826136b403e9aae8e2ded24c7165522 -Author: Hib Eris -Date: Sun Dec 2 10:04:28 2012 +0100 - - glib-demo: Do not use deprecated gtk_color_button_{get,set}_rgba() - - Since Gtk 3.4, gtk_color_button_get_rgba() and - gtk_color_button_set_rgba() have been deprecated. - - https://bugs.freedesktop.org/show_bug.cgi?id=57798 - - glib/demo/selections.c | 16 ++++++++++++++++ - 1 file changed, 16 insertions(+) - -commit f8c1b55e764a6e79b0530fb1be9ee11917f4237e -Author: Albert Astals Cid -Date: Sat Dec 1 22:19:17 2012 +0100 - - 0.21.3 - - CMakeLists.txt | 4 ++-- - NEWS | 17 +++++++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/Doxyfile | 2 +- - 6 files changed, 23 insertions(+), 6 deletions(-) - -commit e3716d9d735a1093399a3c5c33ea5471a6adc405 -Author: Albert Astals Cid -Date: Sat Dec 1 22:34:00 2012 +0100 - - Build on make check correctly - - qt4/tests/check_goostring.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit c7ae96b162e8a05269a54c31f8e7c411edc84553 -Merge: 1f279c32 b1dacd1e -Author: Albert Astals Cid -Date: Sat Dec 1 21:26:24 2012 +0100 - - Merge commit 'b1dacd1e6ab00eb1976491eb2b45c76671011b38' - -commit 1f279c32dcdc899b509fc00aaa57382bc8af90f3 -Author: Albert Astals Cid -Date: Sat Dec 1 20:37:52 2012 +0100 - - Update copyrights - - poppler/CairoOutputDev.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 5daa17c013be8ebe180ff48207e189bd9bd50a84 -Author: Albert Astals Cid -Date: Sat Dec 1 20:06:17 2012 +0100 - - Initialize to NULL, fixes crash - - Since the TextStringToUCS4 not always assigns to second param, - initialize uni to NULL - - poppler/TextOutputDev.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit f673be852e6564e039b5ec24e5bf583149b1d5a4 -Author: Jason Crain -Date: Sat Dec 1 20:03:00 2012 +0100 - - Allow large chars in TextPage - - poppler/TextOutputDev.cc | 1 - - 1 file changed, 1 deletion(-) - -commit aca122432951c4c0a2a5dbaba046d848f2153b84 -Author: Hib Eris -Date: Sat Jun 23 18:27:55 2012 +0200 - - Fix compile warning on unused variable filename_g - - glib/poppler-document.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit c702066961b1cc2a9c0fb16546e9db93c312813b -Author: Hib Eris -Date: Sat Jun 23 18:23:59 2012 +0200 - - Do not use 'size' uninitialized - - poppler/PDFDoc.cc | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit 14bdeacb0eb8e4a1d3995f310a1b526e4dcc96dc -Author: Hib Eris -Date: Sat Jun 23 18:09:01 2012 +0200 - - Fix compile warnings on deprecated conversion from string constant to - 'char*' - - poppler/FileSpec.cc | 3 ++- - poppler/GlobalParamsWin.cc | 4 ++-- - 2 files changed, 4 insertions(+), 3 deletions(-) - -commit 72d4a1ba998218de876e2a0e939bbec4b7795299 -Author: Hib Eris -Date: Sat Jun 23 17:52:13 2012 +0200 - - Fix compile warning on signed/unsigned comparison - - goo/gfile.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 1262111e70ff161e495505bd6a262cc0357a943c -Author: Hib Eris -Date: Sat Jun 23 17:46:54 2012 +0200 - - Remove unused variable - - goo/gfile.cc | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -commit 85572b85950ed4e4421f1e61e704e5c250ca27d9 -Author: Albert Astals Cid -Date: Sat Dec 1 01:50:25 2012 +0100 - - Silence gcc warning - - Bug #57572 - - goo/TiffWriter.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit a97aead193a927b91a4e33d7b5d2ba7179e664df -Author: Adrian Johnson -Date: Fri Nov 30 21:30:19 2012 +0100 - - Splash: Implement bilinear image scaling - - Bug #22138 - - poppler/SplashOutputDev.cc | 10 +-- - splash/Splash.cc | 183 - ++++++++++++++++++++++++++++++++++++++++++--- - splash/Splash.h | 13 +++- - 3 files changed, 188 insertions(+), 18 deletions(-) - -commit e6806d893a9a104e3f23d69d0245ad0e4948a409 -Author: Pino Toscano -Date: Wed Nov 28 17:59:36 2012 +0100 - - cmake: Enable compiler warnings for C code - - Compilation of glib/demo uses a C compiler, thus compiler warnings - should be enabled in the CFLAGS variable. - - followup of 5c5945d163fe406960ccc2e3a71882722b9e69d1 - - CMakeLists.txt | 2 ++ - 1 file changed, 2 insertions(+) - -commit bdb17da35de49b9fd1a549c3afd5e36004552080 -Author: Hib Eris -Date: Mon Nov 26 20:38:03 2012 +0100 - - cairo: Fix uninitaliazed warning in CairoOutputDev - - Fix warning: - - CXX CairoOutputDev.lo - ../../poppler/poppler/CairoOutputDev.cc: In member function 'virtual - void RescaleDrawImage::getRow(int, uint32_t*)': - ../../poppler/poppler/CairoOutputDev.cc:2813:25: warning: 'pix' - may be used uninitialized in this function [-Wuninitialized] - - https://bugs.freedesktop.org/show_bug.cgi?id=57571 - - poppler/CairoOutputDev.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit beff044e4fdf44e80ad7c75255cb71a83e70a293 -Author: Hib Eris -Date: Tue Nov 27 22:19:01 2012 +0100 - - glib-demo: Fix warning on signedness - - Fixes: - - CC attachments.o - ../../../poppler/glib/demo/attachments.c: In function - ‘attachment_save_callback’: - ../../../poppler/glib/demo/attachments.c:190:2: warning: pointer - targets in passing argument 2 of ‘g_checksum_update’ differ in - signedness [-Wpointer-sign] - /usr/include/glib-2.0/glib/gchecksum.h:69:23: note: expected ‘const - guchar *’ but argument is of type ‘const gchar *’ - - https://bugs.freedesktop.org/show_bug.cgi?id=57620 - - glib/demo/attachments.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit b484749ffa58315e4b61738d652347d7a77da982 -Author: Hib Eris -Date: Tue Nov 27 19:38:59 2012 +0100 - - glib-demo: Fix set but unused warning - - Fixes: - - CC print.o - ../../../poppler/glib/demo/print.c: In function - ‘pgd_print_draw_page’: - ../../../poppler/glib/demo/print.c:68:27: warning: variable - ‘settings’ set but not used [-Wunused-but-set-variable] - - https://bugs.freedesktop.org/show_bug.cgi?id=57620 - - glib/demo/print.c | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) - -commit 8438daf7bf7ab1b96c6899baab7e47d9c634cb3d -Author: Hib Eris -Date: Sun Jun 24 14:54:31 2012 +0200 - - glib-demo: pgd_text_view_query_tooltip(): return a gboolean - - https://bugs.freedesktop.org/show_bug.cgi?id=57620 - - glib/demo/text.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -commit ff9e211cfb60eb820b9b046da546352fa59d7df9 -Author: Hib Eris -Date: Sat Jun 23 22:56:02 2012 +0200 - - glib-demo: Remove set but unused variable textinfo - - https://bugs.freedesktop.org/show_bug.cgi?id=57620 - - glib/demo/text.c | 2 -- - 1 file changed, 2 deletions(-) - -commit 8e5ae33bc63eca5297dea12fc281ba223f5be09a -Author: Hib Eris -Date: Sat Jun 23 22:44:22 2012 +0200 - - glib-demo: Fix warning "operation on 'page' may be undefined - [-Wsequence-point]" - - https://bugs.freedesktop.org/show_bug.cgi?id=57620 - - glib/demo/text.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit c6f98d62b885e1d7f6ce1f265d4a87dca36494de -Author: Hib Eris -Date: Sat Jun 23 22:38:35 2012 +0200 - - glib-demo: Remove unused variable slice_selector - - https://bugs.freedesktop.org/show_bug.cgi?id=57620 - - glib/demo/render.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit da56d280e2a51229c93117d8b537897ba63296cf -Author: Hib Eris -Date: Sat Jun 23 22:36:29 2012 +0200 - - glib-demo: Remove unused variable region - - https://bugs.freedesktop.org/show_bug.cgi?id=57620 - - glib/demo/selections.c | 1 - - 1 file changed, 1 deletion(-) - -commit c792e59064018e0fd899f32080489419517f2bbe -Author: Hib Eris -Date: Sat Jun 23 22:34:44 2012 +0200 - - glib-demo: Do not use 'text' uninitialized - - https://bugs.freedesktop.org/show_bug.cgi?id=57620 - - glib/demo/utils.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit c5a8f7eda14030436e6905dd826e72cabbcf0e5f -Author: Hib Eris -Date: Sat Jun 23 22:26:53 2012 +0200 - - glib-demo: Fix warning on unused variable selection - - https://bugs.freedesktop.org/show_bug.cgi?id=57620 - - glib/demo/layers.c | 1 - - 1 file changed, 1 deletion(-) - -commit 4ceb3f4f4ca0092e79bb36723a7332b071491666 -Author: Hib Eris -Date: Sat Jun 23 18:36:12 2012 +0200 - - glib-demo: Fix warnings on unused variables - - https://bugs.freedesktop.org/show_bug.cgi?id=57620 - - glib/demo/annots.c | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -commit 5c5945d163fe406960ccc2e3a71882722b9e69d1 -Author: Hib Eris -Date: Tue Nov 27 19:21:34 2012 +0100 - - Enable compiler warnings for C code - - Compilation of glib/demo uses a C compiler, thus compiler warnings - should be enabled in the CFLAGS variable. - - configure.ac | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 55940e989701eb9118015e30f4f48eb654fa34c4 -Author: Pino Toscano -Date: Tue Nov 27 16:05:15 2012 +0100 - - fix my previous GooString::insert fix - - we need only to move the characters after the specified position, - not all of them - - extend qt4's check_goostring with few more checks covering this - (and the previous) fix - - goo/GooString.cc | 2 +- - qt4/tests/check_goostring.cpp | 39 - +++++++++++++++++++++++++++++++++++++++ - 2 files changed, 40 insertions(+), 1 deletion(-) - -commit dcbc9686d97f4f6596c43d1f701207278c25f8eb -Author: Pino Toscano -Date: Mon Nov 26 14:44:21 2012 +0100 - - glib/cmake: Include Gio-2.0 for introspection - - Fixes g-ir-scanner warnings: - poppler-document.cc:257: Warning: Poppler: - poppler_document_new_from_stream: argument stream: Unresolved type: - 'GInputStream*' - poppler-document.cc:257: Warning: Poppler: - poppler_document_new_from_stream: argument cancellable: Unresolved - type: 'GCancellable*' - poppler-document.cc:315: Warning: Poppler: - poppler_document_new_from_gfile: argument file: Unresolved type: - 'GFile*' - poppler-document.cc:315: Warning: Poppler: - poppler_document_new_from_gfile: argument cancellable: Unresolved - type: 'GCancellable*' - - https://bugs.freedesktop.org/show_bug.cgi?id=56218 - - folloup of c84753e12029fcc6113f80dedc9a943ce1deb214 - - glib/CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 169e4cb001fa235ca608d3d0b42ea4214161fc2d -Author: Pino Toscano -Date: Mon Nov 26 14:42:59 2012 +0100 - - glib/cmake: Show all suppressed introspection scanner warnings - - https://bugs.freedesktop.org/show_bug.cgi?id=56218 - - followup of 11a1f6f512a7d7b86defeb5963fa16bc08e3ba1c - - glib/CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 62c0dbbe9f1987c78eeb87f248d35e7fd73e968a -Author: Albert Astals Cid -Date: Mon Nov 26 00:40:57 2012 +0100 - - Check GooString::insert - - Checks we don't break what we just fixed with Pino's patch - - qt4/tests/CMakeLists.txt | 1 + - qt4/tests/Makefile.am | 7 ++++++- - qt4/tests/check_goostring.cpp | 22 ++++++++++++++++++++++ - 3 files changed, 29 insertions(+), 1 deletion(-) - -commit 01e438ca47776075c8171bda090e7d859fd9f620 -Author: Adam Reichold -Date: Mon Nov 26 00:39:05 2012 +0100 - - Don't use memcpy to copy classes - - poppler/Function.cc | 63 - +++++++++++++++++++++++++++++++++++++++++++---------- - poppler/Function.h | 11 ++++++---- - 2 files changed, 59 insertions(+), 15 deletions(-) - -commit 7ba15d11e56175601104d125d5e4a47619c224bf -Author: Pino Toscano -Date: Mon Nov 26 00:29:35 2012 +0100 - - fix GooString::insert() - - Hi, - - as reported in a Debian bug [1], it seems GooString::insert could lead - to using uninitialized memory. - The case is a simple: - GooString goo; - goo.insert(0, "."); - goo.insert(0, "This is a very long long test string"); - i.e. basically first insert a single character at position 0, and - then a - string longer than STR_STATIC_SIZE always at position 0. - - [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=693817 - - goo/GooString.cc | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) - -commit 703f85a10cf7ad61d2f2d3a5faf347fdddcb4738 -Author: Carlos Garcia Campos -Date: Sun Nov 25 12:36:33 2012 +0100 - - glib: Fix returns tag in PopplerAttachmentSaveFunc api doc - - glib/poppler-attachment.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 52896031783b28cee350ea92c8736e2c2e4e9d33 -Author: José Aliste -Date: Mon Nov 19 23:47:19 2012 +0100 - - glib: Add missing ":" at the end of some functions documentation - - New versions of gir-scanner emit a warning when the : at - the end of the function documentation is not found. - - https://bugs.freedesktop.org/show_bug.cgi?id=56218 - - glib/poppler-annot.cc | 2 +- - glib/poppler-form-field.cc | 10 +++++----- - glib/poppler-layer.cc | 12 ++++++------ - 3 files changed, 12 insertions(+), 12 deletions(-) - -commit 60dfc1a3471f824f40b0bef5b97a7b04bd78e72b -Author: Hib Eris -Date: Sat Oct 20 10:17:01 2012 +0200 - - glib: Exclude poppler-input-stream.h from introspection files - - Fixes warning: - - poppler-input-stream.h:28: Warning: Poppler: - symbol='inputStreamBufSize': Unknown namespace for symbol - 'inputStreamBufSize' - - https://bugs.freedesktop.org/show_bug.cgi?id=56218 - - glib/Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit c84753e12029fcc6113f80dedc9a943ce1deb214 -Author: Hib Eris -Date: Sat Oct 20 09:40:09 2012 +0200 - - glib: Include Gio-2.0 for introspection - - Fixes g-ir-scanner warnings: - poppler-document.cc:257: Warning: Poppler: - poppler_document_new_from_stream: argument stream: Unresolved type: - 'GInputStream*' - poppler-document.cc:257: Warning: Poppler: - poppler_document_new_from_stream: argument cancellable: Unresolved - type: 'GCancellable*' - poppler-document.cc:315: Warning: Poppler: - poppler_document_new_from_gfile: argument file: Unresolved type: - 'GFile*' - poppler-document.cc:315: Warning: Poppler: - poppler_document_new_from_gfile: argument cancellable: Unresolved - type: 'GCancellable*' - - https://bugs.freedesktop.org/show_bug.cgi?id=56218 - - glib/Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 11a1f6f512a7d7b86defeb5963fa16bc08e3ba1c -Author: Hib Eris -Date: Sat Oct 20 09:30:05 2012 +0200 - - glib: Show all suppressed introspection scanner warnings - - https://bugs.freedesktop.org/show_bug.cgi?id=56218 - - glib/Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 16812829a7d4816717731318b1aa1bc3ab5e3935 -Author: Jason Crain -Date: Mon Aug 27 22:42:11 2012 -0500 - - Update fill and stroke color in CairoOutputDev::startPage - - Keep fill_color and stroke_color from falling out of sync with - fill_pattern and stroke_pattern. - - https://bugs.freedesktop.org/show_bug.cgi?id=54526 - - glib/poppler-page.cc | 2 +- - poppler/CairoOutputDev.cc | 2 ++ - 2 files changed, 3 insertions(+), 1 deletion(-) - -commit c93702bea0718d67660f2255344dcf9b0f502d57 -Author: José Aliste -Date: Tue Nov 20 11:25:41 2012 +0100 - - glib: Ensure text is only computed on first render - - Getting the text on a page could be quite slow on - complex pages without structured text. Before this patch, - poppler_page_render would reprocess the text each time - is called. - - glib/poppler-page.cc | 9 ++++----- - 1 file changed, 4 insertions(+), 5 deletions(-) - -commit b0297110c455eb18096268b59d6095d428380de5 -Author: Jason Crain -Date: Wed Nov 21 14:15:59 2012 -0600 - - glib: check if words end with spaces - - poppler_page_get_text_layout and poppler_page_get_text_attributes - assume that each word ends with a space or newline, causing them to - become mismatched from the text. This adds a check to - TextWord::getSpaceAfter. - - https://bugs.freedesktop.org/show_bug.cgi?id=54504 - - glib/poppler-page.cc | 62 - +++++++++++++++++++++++++++++----------------------- - 1 file changed, 35 insertions(+), 27 deletions(-) - -commit b1dacd1e6ab00eb1976491eb2b45c76671011b38 -Author: Albert Astals Cid -Date: Fri Nov 23 00:12:24 2012 +0100 - - 0.21.2 - - CMakeLists.txt | 4 ++-- - NEWS | 13 +++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/Doxyfile | 2 +- - 6 files changed, 19 insertions(+), 6 deletions(-) - -commit 2d2a3af7159945c3fd54f22878e2eb09e019bbc6 -Author: Albert Astals Cid -Date: Fri Nov 23 00:06:39 2012 +0100 - - Update copyrights - - goo/TiffWriter.cc | 1 + - goo/TiffWriter.h | 1 + - poppler/CairoRescaleBox.cc | 1 + - poppler/CairoRescaleBox.h | 38 ++++++++++++++++++++++++++++++++++++++ - splash/SplashBitmap.cc | 2 +- - 5 files changed, 42 insertions(+), 1 deletion(-) - -commit e0d0177562ff546b59b3bc8eb68a08dc740d6f6c -Author: Adrian Johnson -Date: Wed Nov 14 22:44:20 2012 +1030 - - cairo: Fix crash in CairoImageOutputDev with setSoftMaskFromImageMask - - Bug 57067 - - poppler/CairoOutputDev.cc | 46 - ++++++++++++++++++++++++++++++++++++++++++++++ - poppler/CairoOutputDev.h | 5 +++++ - 2 files changed, 51 insertions(+) - -commit f050717f986a6c2833876d14083363a540fa849a -Author: Adrian Johnson -Date: Wed Nov 14 23:50:10 2012 +1030 - - cairo: fix soft mask when image resolution != smask resolution - - Both image and mask are drawn the same size (unit square) regardless - of the size of the image data. - - Bug 57070 - - poppler/CairoOutputDev.cc | 12 +++--------- - 1 file changed, 3 insertions(+), 9 deletions(-) - -commit 87fd5275514b63f13622b79a8fcfe443ccc4f45d -Author: Adrian Johnson -Date: Sun Nov 11 18:53:12 2012 +1030 - - cairo: make drawImage work with images > 32767 in width/height - - Cairo images are limited to 32767 in width and height due to the - 16.16 format used by pixman. Make drawImage work with large images - by scaling down the image before a cairo image is created. - - CairoRescaleBox.cc has been turned into a class with a virtual - function to get the next row of the source image. This allows the - rescale code to access the source data one row at a time to avoid - needing to allocate an image the size of the source image. - - A RescaleDrawImage class derived from CairoRescaleBox has been - written to create the cairo source image to be used by drawImage. The - code from drawImage that created the cairo source image has been moved - into RescaleDrawImage::getSourceImage and RescaleDrawImage::getRow. - - Bug 56858 - - poppler/CairoOutputDev.cc | 278 - ++++++++++++++++++++++++--------------------- - poppler/CairoRescaleBox.cc | 177 +++++++++++++++-------------- - poppler/CairoRescaleBox.h | 21 +++- - 3 files changed, 258 insertions(+), 218 deletions(-) - -commit d1c509c48fc422649d0c2c2d70af5e13e3472874 -Author: Adrian Johnson -Date: Sat Nov 17 10:04:55 2012 +1030 - - pdftocairo: add tiff support - - Bug 57006 - - utils/pdftocairo.1 | 23 ++++++++------ - utils/pdftocairo.cc | 88 - +++++++++++++++++++++++++++++++++++++++++------------ - 2 files changed, 83 insertions(+), 28 deletions(-) - -commit 6d3fe48cf30b298b4436462904d781ea441c1f3d -Author: Adrian Johnson -Date: Sat Nov 17 10:03:22 2012 +1030 - - tiff: remove splash dependency and add RGBA support - - Bug 57006 - - goo/TiffWriter.cc | 47 - +++++++++++++++++++---------------------------- - goo/TiffWriter.h | 13 ++++++++++--- - splash/SplashBitmap.cc | 23 +++++++++++++++++++++-- - 3 files changed, 50 insertions(+), 33 deletions(-) - -commit 15f600a5702788f7e5b91cd67bc2438179921939 -Author: Albert Astals Cid -Date: Thu Nov 15 22:17:27 2012 +0100 - - Don't do a check for sanity that then we don't use - - Fixes bugs 56753 and 51684 - - fofi/FoFiTrueType.cc | 26 -------------------------- - 1 file changed, 26 deletions(-) - -commit c7e3c2d7087e4fc36564ba7bd55e27e100e0a5e5 -Author: Albert Astals Cid -Date: Wed Nov 14 14:58:45 2012 +0100 - - Remove unused code - - fofi/FoFiTrueType.cc | 658 - ------------------------------------------- - fofi/FoFiTrueType.h | 11 +- - splash/SplashFTFontEngine.cc | 42 +-- - 3 files changed, 2 insertions(+), 709 deletions(-) - -commit 06951f529e6514a0c26d6d821ab5fab0920a7cf3 -Author: Albert Astals Cid -Date: Tue Nov 13 23:37:22 2012 +0100 - - Simplify >= 0 ifs for unsigned - - cpp/poppler-global.cpp | 8 ++------ - 1 file changed, 2 insertions(+), 6 deletions(-) - -commit fa813adc3f7b7ee3cc819f1e0cb85e01f13c2c01 -Author: Albert Astals Cid -Date: Tue Nov 13 23:37:01 2012 +0100 - - Remove < 0 ifs for unsigned - - splash/SplashFTFont.cc | 8 -------- - 1 file changed, 8 deletions(-) - -commit 1969bcd693289eba1138fcaa74a684cb3ff2aefc -Author: Albert Astals Cid -Date: Tue Nov 13 23:36:40 2012 +0100 - - Remove unused members - - poppler/Gfx.cc | 3 --- - poppler/Gfx.h | 5 +---- - 2 files changed, 1 insertion(+), 7 deletions(-) - -commit 3a6e5ed5e28b6113696a7ae60b0b85d7097eb731 -Author: Albert Astals Cid -Date: Tue Nov 13 23:35:53 2012 +0100 - - Remove >= 0 checks for unsigned variables - - utils/HtmlFonts.cc | 6 +++--- - utils/HtmlFonts.h | 4 ++-- - 2 files changed, 5 insertions(+), 5 deletions(-) - -commit 0dcc2d711810dd64aa8d8721ce53a6b72e12c47c -Author: Albert Astals Cid -Date: Tue Nov 13 23:35:10 2012 +0100 - - Remove unused var - - utils/pdfinfo.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 1fc97862d30bf723135310bfc8701e6788bfd284 -Author: Albert Astals Cid -Date: Tue Nov 13 23:24:19 2012 +0100 - - size can't be smaller than 0 because it's a size_t - - goo/gmem.cc | 22 +--------------------- - 1 file changed, 1 insertion(+), 21 deletions(-) - -commit bb801a9b889bc0e62cf8b853c26cc6636b4af9a1 -Author: Albert Astals Cid -Date: Tue Nov 13 22:51:17 2012 +0100 - - Removed unused var - - utils/pdfinfo.cc | 1 - - 1 file changed, 1 deletion(-) - -commit fd651fb49653e89d96b032e010a7d8e891536bb0 -Author: Albert Astals Cid -Date: Mon Nov 12 00:42:49 2012 +0100 - - Parse the args (so that -v says vesion only) - - Fixes bug #56817 - - utils/pdfunite.cc | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -commit 7e2e9567f51d01be9a88848e1141c6d4f0f768a1 -Author: Albert Astals Cid -Date: Fri Nov 9 20:02:25 2012 +0100 - - 0.21.1 - - CMakeLists.txt | 4 ++-- - NEWS | 14 ++++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/CMakeLists.txt | 2 +- - qt4/src/Doxyfile | 2 +- - qt4/src/Makefile.am | 2 +- - 8 files changed, 22 insertions(+), 8 deletions(-) - -commit 98b7cfd289abb53a745a88d6ec99e95df477fc8f -Merge: 40efa729 d254174e -Author: Albert Astals Cid -Date: Fri Nov 9 00:38:19 2012 +0100 - - Merge remote-tracking branch 'origin/poppler-0.20' - - Conflicts: - poppler/Form.cc - -commit 40efa72987ebf62cbf2c761c10a209e2e6be612e -Author: Fabio D'Urso -Date: Sun Nov 4 11:20:29 2012 +0100 - - Replaced forward declaration of enum CryptAlgorithm with a proper - #include - - Forward-declaring enums is illegal. It hasn't caused problems so far - because XRef.h includes Object.h, which in turn includes Stream.h, - where - the enum is defined. - Therefore, enum is alreadly defined when the compiler reaches - that line. - - To avoid future issues, I've replaced it with a proper #include - "Stream.h" - (which expands to nothing as Stream.h has already been included - at that - point). - - I've also added a #include in XRef.h because it references enum - CryptAlgorithm too. Also in this case, it expands to nothing. - - poppler/PDFDoc.h | 2 +- - poppler/XRef.h | 1 + - 2 files changed, 2 insertions(+), 1 deletion(-) - -commit 0f7c17d7f92d4cdfbd8816dba666aeed924d8bc2 -Author: Fabio D'Urso -Date: Fri Nov 2 10:54:17 2012 +0100 - - qt4: Export information about the document form type - - This patch also wraps the code that checks the form type and moves it - from pdfinfo to the Catalog class. - - poppler/Catalog.cc | 19 +++++++++++++++++++ - poppler/Catalog.h | 9 +++++++++ - qt4/src/poppler-document.cc | 16 ++++++++++++++++ - qt4/src/poppler-qt4.h | 18 ++++++++++++++++++ - utils/pdfinfo.cc | 19 ++++++++++--------- - 5 files changed, 72 insertions(+), 9 deletions(-) - -commit f3f5a166bcd16b6f2cb516cceb2b3f41b6faf0b4 -Author: Fabio D'Urso -Date: Fri Nov 2 01:53:24 2012 +0100 - - Editable FormFieldChoice: Clear editedChoice when one of the - predefined option is selected - - This patch clears the user-entered text when the user interacts with - predefined options. - - poppler/Form.cc | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -commit ddcd5dc0ceecc02f0d4f740cb6c9b557dfd33c74 -Author: Fabio D'Urso -Date: Thu Nov 1 00:58:51 2012 +0100 - - FormFieldChoice ctor: Added support to recognize user strings as - /V value - - Fixes - http://lists.freedesktop.org/archives/poppler/2012-October/009688.html - - poppler/Form.cc | 5 +++++ - 1 file changed, 5 insertions(+) - -commit 1302bf52bba7e6446f01358240a4b5b583e196a9 -Author: Fabio D'Urso -Date: Wed Oct 31 19:56:37 2012 +0100 - - FormFieldChoice ctor: Stop scanning if /V is a string and the - corresponding option has been identified - - poppler/Form.cc | 11 +++++++++-- - 1 file changed, 9 insertions(+), 2 deletions(-) - -commit d254174e08146115ad04ac1f1bf82bb26e56c684 -Author: Fabio D'Urso -Date: Wed Oct 31 16:57:56 2012 +0100 - - FormFieldChoice::updateSelection: Fixed wrong loop condition - - poppler/Form.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 401de95f5ab42ab0f5d8fd92d76b5def50f84a2b -Author: Fabio D'Urso -Date: Wed Oct 31 19:43:51 2012 +0100 - - FormFieldChoice ctor: Look for selected options in /I instead of /V - if /I is available - - Since /I stores the indices of the selected options, it can - distinguish - duplicate option (i.e. options with the same name/export value). - - poppler/Form.cc | 71 - ++++++++++++++++++++++++++++++++++----------------------- - 1 file changed, 42 insertions(+), 29 deletions(-) - -commit cfd3a46a857100cb634e18192b762e7342165348 -Author: Fabio D'Urso -Date: Wed Oct 31 15:44:32 2012 +0100 - - FormFieldChoice: Handle /V values containing the export value instead - of the option name - - According to the PDF spec, /V should always contain an "option - name" and - never an "export value" if /Opt is an array of couples. However, it - seems that acroread works the other way round: it is able to identify - selected options only if they are referred by their export value - instead of the option name. - With this patch, we mimic this behavior. - - poppler/Form.cc | 49 ++++++++++++++++++++++++++++++++++--------------- - 1 file changed, 34 insertions(+), 15 deletions(-) - -commit ce99940bcac0447f32ee2ad46efb09af93989c12 -Author: Fabio D'Urso -Date: Sat Oct 13 00:13:33 2012 +0200 - - FormFieldChoice::updateSelection: Write /I too - - This improves handling of choice fields containing two or more entries - with the same name, and also makes sure that the previous value of /I - gets updated (failing to update it results in acroread still showing - the old selection). - - poppler/Form.cc | 50 ++++++++++++++++++++++++++++++++++++-------------- - 1 file changed, 36 insertions(+), 14 deletions(-) - -commit 102553e2104a1b223c8ac924aa6702829adebbdb -Author: Fabio D'Urso -Date: Wed Oct 31 16:57:56 2012 +0100 - - FormFieldChoice::updateSelection: Fixed wrong loop condition - - poppler/Form.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit d7522ea1d2e66beef64f705e8986142f15fcf613 -Author: Fabio D'Urso -Date: Wed Oct 31 15:26:37 2012 +0100 - - FormFieldChoice ctor: Don't convert "human-readable" option names - to unicode - - Despite that comment, they're not meant to be read by humans only, - but they - are also used as option identifiers. - - This patch stops poppler from forcing them to be unicode. Instead, - they now stay the same encoding as their corresponding /Opt entry. - - This fixes poppler not being able to recognize selected entries - in documents produced by poppler itself: previously, the /V value was - always written in Unicode encoding, and therefore it was very - often not - binary-equal to the corresponding /Opt entry. - Now the /V value is always binary-equal to the corresponding /Opt - entry. - - poppler/Form.cc | 16 +--------------- - 1 file changed, 1 insertion(+), 15 deletions(-) - -commit da08ebeee241198907378c6461721fddb5106875 -Author: Adrian Johnson -Date: Sun Oct 28 12:13:22 2012 +1030 - - Don't allow invalid unicode to be passed to backends - - poppler/CharCodeToUnicode.cc | 11 +++++++++-- - poppler/UTF.cc | 11 +++++++++++ - poppler/UTF.h | 4 ++++ - 3 files changed, 24 insertions(+), 2 deletions(-) - -commit 9f92feda5eff9b2542c64349f33ae3cf250e7f4b -Author: Thomas Freitag -Date: Fri Nov 2 23:05:55 2012 +0100 - - Memory leak in CharCodeToUnicode - - Bug #54702 - - poppler/CharCodeToUnicode.cc | 2 ++ - 1 file changed, 2 insertions(+) - -commit ef11b4f0e642dff0be02bf3327eb56bf0b364847 -Author: Thomas Freitag -Date: Fri Nov 2 22:44:27 2012 +0100 - - Implement overprint in qt interface - - With minor api fixes by me (Albert Astals Cid) - - qt4/src/poppler-document.cc | 23 ++++++++++++--- - qt4/src/poppler-page.cc | 38 +++++++++++++----------- - qt4/src/poppler-private.h | 69 - ++++++++++++++++++++++++++++---------------- - qt4/src/poppler-qt4.h | 11 ++++++- - splash/SplashBitmap.cc | 70 - +++++++++++++++++++++++++++++++++++++++++++++ - splash/SplashBitmap.h | 5 +++- - 6 files changed, 169 insertions(+), 47 deletions(-) - -commit ae8fc0cbfc6123189e17b3cf1286e0540f181646 -Author: Adrian Johnson -Date: Tue Oct 30 21:22:04 2012 +1030 - - cairo: support parameterized Gouraud shading - - Bug 56463 - - poppler/CairoOutputDev.cc | 19 +++++++++++++++---- - 1 file changed, 15 insertions(+), 4 deletions(-) - -commit 3be4e835d765f2f060e2a2e07dd23905c3212cdd -Author: Pino Toscano -Date: Wed Oct 24 18:37:06 2012 +0200 - - dos2unix - - utils/pdftoppm.cc | 876 - +++++++++++++++++++++++++++--------------------------- - 1 file changed, 438 insertions(+), 438 deletions(-) - -commit 77a980472e76b568346a49057b0217111a14a4cd -Merge: 74d6217b 46fb3653 -Author: Albert Astals Cid -Date: Tue Oct 23 00:23:53 2012 +0200 - - Merge remote-tracking branch 'origin/poppler-0.20' - -commit 46fb3653c7ae44c34d12d799df8f70d649eaa995 -Author: Albert Astals Cid -Date: Tue Oct 23 00:22:55 2012 +0200 - - Fix the or-ing of flags - - qt4/src/poppler-document.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 74d6217ba164fdfe263b4edac8047b60506e39a6 -Author: Carlos Garcia Campos -Date: Sun Oct 21 17:48:57 2012 +0200 - - regstest: Add print_test_result_ln() and use it for failed test - results - - To make sure they are always shown. - - regtest/Printer.py | 3 +++ - regtest/TestRun.py | 10 +++++----- - 2 files changed, 8 insertions(+), 5 deletions(-) - -commit 4e9b8d2cca44241a501bb8095b3980d17fcda6c5 -Author: Carlos Garcia Campos -Date: Sun Oct 21 17:48:22 2012 +0200 - - regtest: Do not rewrite lines in verbose mode - - regtest/Printer.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 2a25264afe3c59931f6a3638e2d6c6c2e0e5dfba -Author: Albert Astals Cid -Date: Fri Oct 19 17:22:56 2012 +0200 - - make static - - because i can - - qt4/tests/check_fonts.cpp | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit bc4a54c0a4430216c9aeaf2c3bddbaeef5a004e4 -Author: Albert Astals Cid -Date: Fri Oct 19 17:22:13 2012 +0200 - - Compile with clang - - qt4/tests/check_fonts.cpp | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -commit f38194cfae8f8690bc3767cbdcf140519564366c -Merge: 80cf4347 5312984b -Author: Albert Astals Cid -Date: Fri Oct 19 00:02:02 2012 +0200 - - Merge remote-tracking branch 'origin/poppler-0.20' - -commit 5312984b40355b067001704e9c688ea0a72b1159 -Author: Albert Astals Cid -Date: Fri Oct 19 00:00:53 2012 +0200 - - Define the numbers a bit better so gcc in i386 understands them better - - qt4/tests/check_lexer.cpp | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 80cf43472e5913f5f64bf73cb4a8ac5a53063f2e -Author: Adam Reichold -Date: Wed Oct 17 08:27:13 2012 +0200 - - added accessors for FormWidgetChoice::editChoice property to qt4 - frontend - - qt4/src/poppler-form.cc | 23 +++++++++++++++++++++++ - qt4/src/poppler-form.h | 15 +++++++++++++++ - 2 files changed, 38 insertions(+) - -commit 0b3ff2dc4e1ba37dd66f5913b10a9d69e31c40ce -Merge: fb5cb0fb 528b64bb -Author: Albert Astals Cid -Date: Wed Oct 17 00:28:40 2012 +0200 - - Merge remote-tracking branch 'origin/poppler-0.20' - - Conflicts: - CMakeLists.txt - NEWS - configure.ac - cpp/Doxyfile - poppler/Annot.cc - poppler/Form.h - qt4/src/Doxyfile - -commit 528b64bb077ed37c0d8fc7ae2ef3dc2c0dbb26ca -Author: Fabio D'Urso -Date: Tue Sep 4 23:10:17 2012 +0200 - - Free entries in the xref form a linked list: terminate it properly - when writing the XRef - - The last entry must point back to object 0. Previously it was left - unitialized and resulted in "-000000001 00000 f" being written in the - XRef table. - - poppler/XRef.cc | 1 + - 1 file changed, 1 insertion(+) - -commit fb5cb0fbdfcd06556661b38b0c598922fff2d759 -Author: Fabio D'Urso -Date: Thu Oct 4 11:20:42 2012 +0200 - - Create the 24x24 rectangle for text annotation icons from the top-left - corner instead of bottom-left - - poppler/Annot.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 35c07fe40d7b18e19f6ef0f5615f9f5ac8195cf7 -Author: Fabio D'Urso -Date: Tue Oct 9 15:24:02 2012 +0200 - - AnnotWidget: Avoid repeatedly deleting and creating xref entries - for appearance streams - - Previously updating the appearance stream always involved deleting - the old - stream's xref entry and creating a new one. - Since xref entry deletion causes the generation number to be - incremented, this - behavior caused the generation number to quickly rise during user - input. - - This patch stops it by reusing the same entry as the old appearance - stream in - case of repeated modifications. - - poppler/Annot.cc | 40 ++++++++++++++++++++++++++++------------ - poppler/Annot.h | 1 + - 2 files changed, 29 insertions(+), 12 deletions(-) - -commit 2127a977bbe9985aa58561116508ad4f08430a2c -Author: Fabio D'Urso -Date: Tue Oct 9 12:49:26 2012 +0200 - - Generate and write the appearance stream in - AnnotWidget::updateWidgetApperance() - - Note: At the moment the old appearance is deleted and a *new* xref - entry is - created every time AnnotWidget::updateWidgetApperance() is called. - - poppler/Annot.cc | 30 +++++++++++++++++++++++++----- - 1 file changed, 25 insertions(+), 5 deletions(-) - -commit 0446e2cc1073f4579a90284d28bc5872e46e0536 -Author: Fabio D'Urso -Date: Tue Oct 9 10:47:40 2012 +0200 - - Killed FormField::isModified() in favor of a new AnnotWidget callback - - Instead of having to ask FormField from AnnotWidget::draw if the - widget's appearance needs to be rebuilt, now AnnotWidget gets notified - of changes via the new AnnotWidget::updateAppearanceStream() callback. - - poppler/Annot.cc | 16 ++++++++++------ - poppler/Annot.h | 1 + - poppler/Form.cc | 52 - ++++++++++++++++++++++++++++++++++++++-------------- - poppler/Form.h | 12 +++++++++--- - 4 files changed, 58 insertions(+), 23 deletions(-) - -commit 68d732ab2d55ae15e194ececfffa753977fae84c -Author: Fabio D'Urso -Date: Tue Oct 9 15:24:02 2012 +0200 - - AnnotWidget: Avoid repeatedly deleting and creating xref entries - for appearance streams - - Previously updating the appearance stream always involved deleting - the old - stream's xref entry and creating a new one. - Since xref entry deletion causes the generation number to be - incremented, this - behavior caused the generation number to quickly rise during user - input. - - This patch stops it by reusing the same entry as the old appearance - stream in - case of repeated modifications. - - poppler/Annot.cc | 40 ++++++++++++++++++++++++++++------------ - poppler/Annot.h | 1 + - 2 files changed, 29 insertions(+), 12 deletions(-) - -commit e2993cc9551dc7521528904646f941c9747473f7 -Author: Fabio D'Urso -Date: Tue Oct 9 12:49:26 2012 +0200 - - Generate and write the appearance stream in - AnnotWidget::updateWidgetApperance() - - Note: At the moment the old appearance is deleted and a *new* xref - entry is - created every time AnnotWidget::updateWidgetApperance() is called. - - poppler/Annot.cc | 30 +++++++++++++++++++++++++----- - 1 file changed, 25 insertions(+), 5 deletions(-) - -commit df924493922e8c0f7b1e19c2847d33b28a098913 -Author: Fabio D'Urso -Date: Tue Oct 9 10:47:40 2012 +0200 - - Killed FormField::isModified() in favor of a new AnnotWidget callback - - Instead of having to ask FormField from AnnotWidget::draw if the - widget's appearance needs to be rebuilt, now AnnotWidget gets notified - of changes via the new AnnotWidget::updateAppearanceStream() callback. - - poppler/Annot.cc | 16 ++++++++++------ - poppler/Annot.h | 1 + - poppler/Form.cc | 52 - ++++++++++++++++++++++++++++++++++++++-------------- - poppler/Form.h | 12 +++++++++--- - 4 files changed, 58 insertions(+), 23 deletions(-) - -commit 0a5bda01ace9f8576d687c5a28feb5cf09b48a92 -Author: Albert Astals Cid -Date: Sun Oct 14 23:05:27 2012 +0200 - - New/old header for cmake buildsystem - - CMakeLists.txt | 1 + - 1 file changed, 1 insertion(+) - -commit 6d46f0b477143eb0df09f718e96dd2ff2a7dd61b -Author: Hib Eris -Date: Sat Sep 22 20:50:07 2012 +0200 - - Split our UTF.h into xpdf based UTF8.h and a poppler specific UTF.h - - poppler/GlobalParams.cc | 2 +- - poppler/Makefile.am | 1 + - poppler/UTF.h | 79 - +--------------------------------------------- - poppler/UTF8.h | 84 - +++++++++++++++++++++++++++++++++++++++++++++++++ - 4 files changed, 87 insertions(+), 79 deletions(-) - -commit 03cbba935c90ce9a6d9ad44f7cda4901c2f81f2e -Author: Hib Eris -Date: Sat Sep 22 19:58:40 2012 +0200 - - Do not use mapUTF8() directly in CairoOutputDev - - poppler/CairoOutputDev.cc | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -commit f219bdbcadcb0334d595bbd9afd01f00c37d1978 -Author: Hib Eris -Date: Sun Oct 14 22:59:55 2012 +0200 - - Make sure array index is >= 0 - - Fixes this warning on array subscript type: - UTF.cc: In function 'int TextStringToUCS4(GooString*, Unicode**)': - UTF.cc:99:33: warning: array subscript has type 'char' - [-Wchar-subscripts] - - poppler/UTF.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 65a2555607e03c94d77ae9ebdb34ab6d4f8844b6 -Author: Fabio D'Urso -Date: Fri Oct 12 23:54:57 2012 +0200 - - FormFieldChoice ctor: Fixed wrong index variable - - It caused a crash if multiple items are initially selected. - - poppler/Form.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 710bb3383306a9aa6debbfe1364029ee12a15576 -Author: Fabio D'Urso -Date: Fri Oct 12 23:54:57 2012 +0200 - - FormFieldChoice ctor: Fixed wrong index variable - - It caused a crash if multiple items are initially selected. - - poppler/Form.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit ce18c9b3d5251305eb76d294fdf4b4de9382b3a4 -Author: Albert Astals Cid -Date: Wed Oct 10 19:54:57 2012 +0200 - - 0.20.5 - - CMakeLists.txt | 2 +- - NEWS | 15 +++++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - qt4/src/Doxyfile | 2 +- - 5 files changed, 19 insertions(+), 4 deletions(-) - -commit b112602334a5de84ae30c2e90d9bc6d4609f7f96 -Author: Tobias Koening -Date: Mon Oct 8 22:32:34 2012 +0200 - - [qt4] make LinkRendition properties available - - Bug #55378 - - poppler/Link.cc | 34 +++++++++++++++++++----- - poppler/Link.h | 17 +++++++++--- - qt4/src/poppler-annotation.cc | 2 -- - qt4/src/poppler-annotation.h | 1 + - qt4/src/poppler-link.cc | 60 - ++++++++++++++++++++++++++++++++++++++++--- - qt4/src/poppler-link.h | 57 - +++++++++++++++++++++++++++++++++++++--- - qt4/src/poppler-page.cc | 8 +++++- - 7 files changed, 158 insertions(+), 21 deletions(-) - -commit 6d6bd660dbb652f2f3e87c81c55a87d1fc11ec70 -Author: Carlos Garcia Campos -Date: Sat Oct 6 10:26:55 2012 +0200 - - glib: chain up finalize to the parent class - - This was missing in some of the classes. - - https://bugs.freedesktop.org/show_bug.cgi?id=55521 - - glib/poppler-document.cc | 6 ++++++ - glib/poppler-page.cc | 2 ++ - 2 files changed, 8 insertions(+) - -commit ac3875a9e7f2f4f31881d3d1b3081f2adaef65a1 -Author: Carlos Garcia Campos -Date: Sat Oct 6 10:26:55 2012 +0200 - - glib: chain up finalize to the parent class - - This was missing in some of the classes. - - https://bugs.freedesktop.org/show_bug.cgi?id=55521 - - glib/poppler-document.cc | 6 ++++++ - glib/poppler-page.cc | 2 ++ - 2 files changed, 8 insertions(+) - -commit 042d332c1c9f628e3bfaabf3da9e04436a8677b5 -Merge: 7b9a9f80 e044814c -Author: Albert Astals Cid -Date: Thu Oct 4 00:53:01 2012 +0200 - - Merge remote-tracking branch 'origin/poppler-0.20' - -commit e044814c0657a6c5b44939a01dcbdc8d83396d43 -Author: Thomas Freitag -Date: Thu Oct 4 00:51:04 2012 +0200 - - Do not render invalid outlines - - Bug #55573 - - splash/SplashFTFont.cc | 4 ++++ - 1 file changed, 4 insertions(+) - -commit 7b9a9f809d07303fe5adff9210731613df8b2adf -Merge: 3b0962cd 9451b7a6 -Author: Albert Astals Cid -Date: Wed Oct 3 01:24:04 2012 +0200 - - Merge remote-tracking branch 'origin/poppler-0.20' - -commit 9451b7a61b6dcaa6c4a76f3efda82f1ebd408654 -Author: Albert Astals Cid -Date: Wed Oct 3 01:21:45 2012 +0200 - - Fix crash when parsing some unknown colorspaces - - Can't do csObj->getName if csObj is a dict - - poppler/GfxState.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 3b0962cd14b15ce92c0916f58ed5ba00aebe80b0 -Merge: a9d7ea2e 42908e6e -Author: Albert Astals Cid -Date: Tue Oct 2 19:51:48 2012 +0200 - - Merge remote-tracking branch 'origin/poppler-0.20' - -commit 42908e6e72d95cec0f70b202c4b1c23f7e47c2a4 -Author: Lu Wang -Date: Tue Oct 2 19:31:04 2012 +0200 - - support automake-1.12 in autogen.sh - - Bug #55541 - - autogen.sh | 15 ++++++++------- - 1 file changed, 8 insertions(+), 7 deletions(-) - -commit a9d7ea2eb549acbf6ca7e2a299ffed46ff3d8758 -Merge: 397d7b45 9bb68456 -Author: Albert Astals Cid -Date: Wed Sep 26 15:31:29 2012 +0200 - - Merge remote-tracking branch 'origin/poppler-0.20' - - Conflicts: - poppler/XRef.cc - -commit 9bb68456de41d24db7acf61204bc3f4e36e98505 -Author: Albert Astals Cid -Date: Wed Sep 26 15:13:47 2012 +0200 - - Initilize rootNum - - Fixes valgrind warnings about uninitialized uses - - poppler/XRef.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 397d7b4597ad4bc8ab41fd7a99078473a3c93eb0 -Merge: 6013d49d 2c0f70af -Author: Albert Astals Cid -Date: Wed Sep 26 15:00:04 2012 +0200 - - Merge remote-tracking branch 'origin/poppler-0.20' - -commit 2c0f70afff03798165c2b609e115dc7e9c034c57 -Author: Thomas Freitag -Date: Wed Sep 26 14:58:05 2012 +0200 - - More crash fixes for broken documents - - poppler/JPXStream.cc | 97 - ++++++++++++++++++++++++++++++++++++++++++++-------- - 1 file changed, 82 insertions(+), 15 deletions(-) - -commit 78558d24692c68212da35a88deb68069c5a06d81 -Author: Thomas Freitag -Date: Wed Sep 26 14:32:05 2012 +0200 - - Fix more crashes in broken files - - solves 1258.pdf.SIGSEGV.dee.288 and 1255.pdf.asan.38.285, extends - 1043.pdf.asan.47.50 and 557.pdf.asan.47.894 - - poppler/GfxState.cc | 26 +++++++++++++++++++++++--- - 1 file changed, 23 insertions(+), 3 deletions(-) - -commit e8822c0f3a46195ec7c6e55c556dd0c5716be742 -Author: Albert Astals Cid -Date: Wed Sep 26 14:21:46 2012 +0200 - - Add unlikelys - - poppler/Stream.cc | 32 ++++++++++++++++---------------- - 1 file changed, 16 insertions(+), 16 deletions(-) - -commit 31874f2e065b0d68f726ef404de98f42489c80c7 -Author: Thomas Freitag -Date: Wed Sep 26 14:17:00 2012 +0200 - - Less crashes in broken files - - rebased patch for 1001.pdf.asan.2a.4, extends patch for - 100.pdf.asan.38.2 - - poppler/Stream.cc | 100 - ++++++++++++++++++++++++++++++++++++++++++++++++++++-- - 1 file changed, 98 insertions(+), 2 deletions(-) - -commit 81b1d9207840ec1e66eef469b29a36a8556b7265 -Author: Albert Astals Cid -Date: Wed Sep 26 13:38:54 2012 +0200 - - Add some unlikelys - - poppler/JBIG2Stream.cc | 28 ++++++++++++++-------------- - 1 file changed, 14 insertions(+), 14 deletions(-) - -commit 9ae1184e3049cabc695c8645a10eaef748b6e641 -Author: Thomas Freitag -Date: Wed Sep 26 12:32:26 2012 +0200 - - More fixes against broken files - - solves 121.pdf.asan.6f.235, extends 682.pdf.SIGFPE.f3.1033 and - 569.pdf.SIGSEGV.c1.907, extends Patch for 829. and 839. asan and - sigsegv series - - poppler/JBIG2Stream.cc | 105 - +++++++++++++++++++++++++++++++++++++++++++------ - 1 file changed, 93 insertions(+), 12 deletions(-) - -commit 1d72c14b3877ae730ac0aa92f36923269e8a2004 -Author: Thomas Freitag -Date: Wed Sep 26 11:48:14 2012 +0200 - - Fix crash in 158.pdf.asan.d.451 - - poppler/SplashOutputDev.cc | 8 ++++++++ - 1 file changed, 8 insertions(+) - -commit 6013d49d852c58c4c23f787fd7dd64731c0918f1 -Merge: b97c28c4 671df5da -Author: Albert Astals Cid -Date: Wed Sep 26 00:53:28 2012 +0200 - - Merge remote-tracking branch 'origin/poppler-0.20' - -commit 671df5dad0732882ceb9e053c3f947dfe0597f3d -Author: Lu Wang -Date: Wed Sep 26 00:52:32 2012 +0200 - - Don't close the stream if it's not a stream - - poppler/PSOutputDev.cc | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -commit b97c28c42a18d1c2a8fabea52c092d948811d582 -Merge: 32bb8741 f8c116f1 -Author: Albert Astals Cid -Date: Tue Sep 25 23:22:23 2012 +0200 - - Merge remote-tracking branch 'origin/poppler-0.20' - - Conflicts: - qt4/src/Makefile.am - -commit f8c116f1e0fbf3516ce228fbb34c33d6b618bed0 -Author: Albert Astals Cid -Date: Tue Sep 25 23:07:55 2012 +0200 - - Add LCMS_FLAGS - - Fixes compilation when lcms is on non standard locations - Bug #55326 - - qt4/src/Makefile.am | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 32bb87419c360a3b14c717c0f385198b70a1b2e7 -Author: Carlos Garcia Campos -Date: Sun Sep 23 18:15:13 2012 +0200 - - regtest: Reduce the noise of the default output when running tests - - Show permanent information only about failed tests, without the - details - about the failing pages. Previous verbose output is available passing - --verbose command line output. - - regtest/Printer.py | 96 - +++++++++++++++++++++++++++++++++++++ - regtest/TestReferences.py | 8 ++-- - regtest/TestRun.py | 35 +++++++------- - regtest/backends/__init__.py | 13 +++-- - regtest/commands/create-refs.py | 3 +- - regtest/commands/find-regression.py | 5 +- - regtest/commands/run-tests.py | 3 +- - regtest/main.py | 3 ++ - 8 files changed, 137 insertions(+), 29 deletions(-) - -commit ca6afce24aac2ef9d88e215177b11760f7468a6d -Author: Lu Wang -Date: Fri Sep 21 21:33:05 2012 +0200 - - Do not call drawing routines if we don't need non text - - Bug #54617 - - poppler/Gfx.cc | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -commit 70030b91ce2280f23c3e5adf863f1d336c9c5faf -Author: Albert Astals Cid -Date: Fri Sep 21 08:18:29 2012 +0200 - - Increase sonames - - CMakeLists.txt | 2 +- - glib/CMakeLists.txt | 2 +- - glib/Makefile.am | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/CMakeLists.txt | 2 +- - qt4/src/Makefile.am | 2 +- - 6 files changed, 6 insertions(+), 6 deletions(-) - -commit 2323e38f1a54cb58ec31b4cf15e6c2b1db742ca5 -Author: Albert Astals Cid -Date: Fri Sep 21 08:12:52 2012 +0200 - - Version increase - - CMakeLists.txt | 4 ++-- - configure.ac | 4 ++-- - cpp/Doxyfile | 2 +- - qt4/src/Doxyfile | 2 +- - 4 files changed, 6 insertions(+), 6 deletions(-) - -commit 11a9a620276d199701be5811eb63687ace85ace1 -Author: Albert Astals Cid -Date: Fri Sep 21 08:10:15 2012 +0200 - - Drop the s from AdditionalActionsType - - qt4/src/poppler-annotation-private.h | 5 +++-- - qt4/src/poppler-annotation.cc | 6 +++--- - qt4/src/poppler-annotation.h | 6 +++--- - 3 files changed, 9 insertions(+), 8 deletions(-) - -commit 028e0e7ddf8c30d311feb937385ef21acd34a52d -Author: Albert Astals Cid -Date: Thu Sep 20 18:13:08 2012 +0200 - - 0.21.0 news - - NEWS | 39 +++++++++++++++++++++++++++++++++++++++ - 1 file changed, 39 insertions(+) - -commit 2f2d053352e04e434d83dd93dfdbd08ab5b23f2e -Author: Albert Astals Cid -Date: Thu Sep 20 18:12:57 2012 +0200 - - Update copyrights - - poppler/Annot.cc | 3 ++- - poppler/Annot.h | 1 + - poppler/TextOutputDev.cc | 2 +- - poppler/UTF.h | 1 + - 4 files changed, 5 insertions(+), 2 deletions(-) - -commit 9fad83913791478b63fc76360f1a13e955cdcf4a -Author: Albert Astals Cid -Date: Mon Sep 17 23:15:10 2012 +0200 - - Move to init - - poppler/XRef.cc | 11 +++-------- - 1 file changed, 3 insertions(+), 8 deletions(-) - -commit c470a3929c0a02b8a543fcada22138ab1fc18176 -Author: Thomas Freitag -Date: Mon Sep 17 23:13:48 2012 +0200 - - Support encrypted pdf files in pdfseparate - - poppler/PDFDoc.cc | 35 ++++++++++++++++++++++++++++++++--- - poppler/XRef.cc | 15 +++++++++++++++ - poppler/XRef.h | 2 ++ - utils/pdfseparate.cc | 4 ---- - 4 files changed, 49 insertions(+), 7 deletions(-) - -commit 9b613dcf3c77bc2801d1125dc9bbc5a4dd04e16b -Author: Albert Astals Cid -Date: Mon Sep 17 23:12:43 2012 +0200 - - Compile - - goo/TiffWriter.cc | 5 +++++ - 1 file changed, 5 insertions(+) - -commit fb5c383bd5be7090fc78380b4bb3244c3316c0cd -Author: William Bader -Date: Mon Sep 17 00:03:49 2012 +0200 - - Make pdftoppm -tiff -overprint work - - Bug #54896 - - goo/TiffWriter.cc | 13 ++++++++++++- - goo/TiffWriter.h | 4 +++- - 2 files changed, 15 insertions(+), 2 deletions(-) - -commit 3794916572a0531b10ee57c9f189497489b90bc8 -Author: Albert Astals Cid -Date: Sun Sep 16 17:53:47 2012 +0200 - - Fix the siblings field correctly - - Fixes KDE bug #302334 - - poppler/Form.cc | 45 - +++++++++++++++++++++++++-------------------- - poppler/Form.h | 24 +++++++++++++----------- - qt4/src/poppler-form.cc | 13 ++++++++++--- - 3 files changed, 48 insertions(+), 34 deletions(-) - -commit e8b6d2ac3a874dd5de166b52625fa628004ea5fe -Merge: 7cb40726 9f51baaf -Author: Albert Astals Cid -Date: Sun Sep 16 14:08:34 2012 +0200 - - Merge remote-tracking branch 'origin/poppler-0.20' - -commit 9f51baaf7a86680f2195ecdb978f1eb59a8aa734 -Author: Albert Astals Cid -Date: Sun Sep 16 14:07:45 2012 +0200 - - Rework the #ifdef so that i don't get a gcc warning - - poppler/strtok_r.cpp | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit b63049f97629a93ec346033e0ec56fc11f34c4fe -Author: Albert Astals Cid -Date: Sun Sep 16 14:05:01 2012 +0200 - - Forgot to add the new test to autotools - - qt4/tests/Makefile.am | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -commit 7cb40726f9e80ee2b2f27ca6ce151b46c6ec091d -Merge: e980d110 c6d7084d -Author: Albert Astals Cid -Date: Sun Sep 16 13:50:19 2012 +0200 - - Merge remote-tracking branch 'origin/poppler-0.20' - -commit c6d7084d316e94b5b042b086f5440f8543ff5947 -Author: Albert Astals Cid -Date: Sun Sep 16 13:48:51 2012 +0200 - - Fix parsing of numbers - - -2147483648 is an integer - -2147483649 is a real - - poppler/Lexer.cc | 14 +++++- - qt4/tests/CMakeLists.txt | 1 + - qt4/tests/check_lexer.cpp | 118 - ++++++++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 131 insertions(+), 2 deletions(-) - -commit e980d11061c19f13c75f93506e07903b4d1c7f97 -Merge: b72c02d1 36580883 -Author: Albert Astals Cid -Date: Sat Sep 15 20:41:50 2012 +0200 - - Merge remote-tracking branch 'origin/poppler-0.20' - -commit 365808837080574080b4f8da079124c172fb2123 -Author: Alexey Pavlov -Date: Sat Sep 15 20:38:10 2012 +0200 - - Fix build using mingw64 with winpthread - - strtok_r in winpthread is declared as a macro, that is why - the error happens. Therefore, it is necessary to check whether - the macro - __WINPTHREADS_VERSION is declared. - - Bug #54851 - - poppler/poppler-config.h.cmake | 2 +- - poppler/poppler-config.h.in | 2 +- - poppler/strtok_r.cpp | 16 +++++++++++++++- - 3 files changed, 17 insertions(+), 3 deletions(-) - -commit b72c02d1a2ec8180b3ddfd2bb2b462c0189377d5 -Author: Albert Astals Cid -Date: Thu Sep 13 19:56:45 2012 +0200 - - Remove the fonts loop - - sometimes it's very slow and doesn't really add much - - qt4/tests/test-poppler-qt4.cpp | 4 ---- - 1 file changed, 4 deletions(-) - -commit cb93d51ccb6b1f6938946ae5d38fb9817005fd7a -Author: Albert Astals Cid -Date: Wed Sep 12 00:12:07 2012 +0200 - - Make gcc happy - - It is stupid and can't see that we only use them when we init them - and complains - they might be used un-initialized - - poppler/TextOutputDev.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 3349a8dd7e0469cc5b5aaa8dd929c6078183ef86 -Author: Thomas Freitag -Date: Wed Sep 12 00:04:45 2012 +0200 - - Splash: Avoid bogus memory error for tilingPattern - - just return gFalse if the resulting - tiling pattern bitmap reaches a memory limit and so the Gfx - implemention of - tiling patterns will be used. I think that this is an acceptable - approach also - concerning performance, because it would take also a while to paint - such a huge - bitmap and then draw it to splash. - - poppler/SplashOutputDev.cc | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -commit 2e77799a1668f949612f551425d0665c59ff1d93 -Author: Thomas Freitag -Date: Tue Sep 11 23:33:25 2012 +0200 - - Splash: Implement DeviceN support - - Bug #53140 - - Some copying from the bug tracker - - To explain - it a little bit more I copy a few lines from "Patch 8.01 — DeviceN - Support (6 - colors)" of the Ghent PDF workgroup: - "This patch tests the DeviceN capabilities of a workflow. If DeviceN - is not - handled correctly the colors are converted to CMYK. Instead of the - check marks - an X will appear in the lower left corner of each image and in - the gradient. - In addition you could inspect the color separations. The objects - should appear - only in the Black, Pantone 265C and GWG Green separations as indicated - in the - captions." - Without the patch all DeviceN colors are immediately converted to CMYK - (with - SPLASH_CMYK). This leads especially to problems, if overprint is - used: in - overprint mode a CMYK color will knockout the underlying CMYK - components, BUT - neither any spot colors. But if underlying spot colors are immediately - converted to CMYK colors, they will be kocked out then, too! - The patch now spends up to four (or up to SPOT_NCOMPS) additional - spot colors - in the splash bitmap, so the order in the bitmap will be - CMYKSTUVCMYKSTUVCMYKSTUV... where S, T, U, V are spot colors (I - would use - S1,S2, S3, S4 if it's possible to use indexes), and all painting - operations are - done now in this new device. Only at the end, when we want to store - the bitmap - in a CMYK or RGB color, the spot colors are converted and their - alternate CMYK - components are added to the normal CMYK components. - According to the PDF spec are PDF writer should use different spot - color names - if they have a different appearance in their alternate CMYK - colorspace. - "hasDifferntResultSet" (sorry for the typo) proofs that: if the same - spot color - name is reused BUT has a different appearance in the alternate - colorspace, it - will be converted immediately to its alternate colorspace. - "createMapping" is used so that getDeviceN (color) returns the - components in - the correct order according their appearance in the splash bitmap, - i.e. the - fourth detected spot color must be placed in index 7 of the color - array. - updateFill- and updateStrokeColorspace are needed to create this - mapping at the - appropriate place. And they are not called once but everytime the - colorspace - changed in the PDF (but of course only once in Gfx). - The GooList *getSeparationList() is used to store the functions - for converting - the spot colors to their alternate colorspace in order of their - appearance in - the splash bitmap. The functions are needed to compare if a spot - color with the - same name has really the same appearance and at the end when the - splash bitmap - has to be converted to a CMYK or RGB bitmap (s. ahead). - deviceNTransfer is needed simular to rgbTransferX or cmykTransferX - if a - transfer function is specified in the ExtGState and splash uses - the DeviceN8. - "Do we really need splashModeDeviceN8?": Do we really need - splashModeXBGR8? But - kidding aside: splashModeDeviceN8 needs four more components than - splashModeCMYK8, so the bitmap size in memory doubles the size of - a pure CMYK - bitmap, and it is only needed if the PDF uses spot colors. So I - think it's a - good idea to spend an additional mode and let it up to the calling - application - and the cirumstances if it wants to use this new mode or not. - - poppler/Function.cc | 14 + - poppler/Function.h | 4 + - poppler/GfxState.cc | 341 +++++++++++++++++- - poppler/GfxState.h | 41 ++- - poppler/SplashOutputDev.cc | 173 ++++++++- - poppler/SplashOutputDev.h | 3 + - splash/Splash.cc | 255 ++++++++++++- - splash/Splash.h | 7 +- - splash/SplashBitmap.cc | 115 +++++- - splash/SplashBitmap.h | 8 +- - splash/SplashState.cc | 30 +- - splash/SplashState.h | 3 + - splash/SplashTypes.h | 30 +- - utils/pdftoppm.cc | 878 - ++++++++++++++++++++++----------------------- - 14 files changed, 1415 insertions(+), 487 deletions(-) - -commit cb2ed646c4ef4161e443ee0a377d1111b3be28ff -Merge: f3a1b765 3ce4d213 -Author: Albert Astals Cid -Date: Tue Sep 11 19:29:19 2012 +0200 - - Merge remote-tracking branch 'origin/poppler-0.20' - -commit f3a1b765bd6a58d327a80feedbe30e1c0792076e -Author: Jason Crain -Date: Tue Sep 11 19:28:28 2012 +0200 - - Allow multiple fonts in a TextWord - - Bug #6923 - - glib/poppler-page.cc | 49 ++++++----- - poppler/TextOutputDev.cc | 224 - ++++++++++++++++++++++------------------------- - poppler/TextOutputDev.h | 21 ++--- - 3 files changed, 145 insertions(+), 149 deletions(-) - -commit 3ce4d213480471dfd8e307c24c99bf3c6308cd6f -Author: Albert Astals Cid -Date: Tue Sep 11 19:24:58 2012 +0200 - - Do not use isnan as it is C99 - - poppler/TextOutputDev.cc | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit 4d7a64a23fd4b4b5ee0d47ead8677f374aaaf6c9 -Author: Jason Crain -Date: Tue Sep 11 19:24:11 2012 +0200 - - Check for NaN in TextPage::addChar - - poppler/TextOutputDev.cc | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -commit e79b70ec13ab4d2cce8f245d150fa9329b436658 -Author: Tobias Koenig -Date: Tue Sep 11 16:39:55 2012 +0200 - - Make 'additional actions' available in Annotation API of Qt4 frontend - - Bug #53589 - - qt4/src/poppler-annotation-private.h | 3 ++ - qt4/src/poppler-annotation.cc | 99 - +++++++++++++++++++++++++++++++++++- - qt4/src/poppler-annotation.h | 68 ++++++++++++++++++++++++- - 3 files changed, 168 insertions(+), 2 deletions(-) - -commit 5f338ea7d01cabc0f8c50690d0bc262d85baa0ed -Author: Albert Astals Cid -Date: Mon Sep 10 19:47:20 2012 +0200 - - Fix typo - - NEWS | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 5fd691dc58aac817bca81c87c4820afcf53989d1 -Author: Albert Astals Cid -Date: Mon Sep 10 19:29:01 2012 +0200 - - 0.20.40.20.40.20.40.20.4 - - CMakeLists.txt | 4 ++-- - NEWS | 13 +++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/Doxyfile | 2 +- - 6 files changed, 19 insertions(+), 6 deletions(-) - -commit 1b40cdd9f863cd3868db85b5ccfa77a8350c56d6 -Merge: 6c40a553 b3e86dbd -Author: Albert Astals Cid -Date: Mon Sep 10 18:49:52 2012 +0200 - - Merge remote-tracking branch 'origin/poppler-0.20' - -commit b3e86dbdba82956f125e37f69176072e2d0127f2 -Author: Thomas Freitag -Date: Sun Sep 9 23:35:45 2012 +0200 - - Try to find another rootNum if actual rootNum doesn't point to a dict - - Bug #14303 - - poppler/XRef.cc | 14 ++++++++++++-- - poppler/XRef.h | 4 ++-- - 2 files changed, 14 insertions(+), 4 deletions(-) - -commit 6c40a553a3c8825931c59797059392fd110531cc -Merge: 17fc1bfa 558a7d9b -Author: Albert Astals Cid -Date: Sun Sep 9 23:27:40 2012 +0200 - - Merge remote-tracking branch 'origin/poppler-0.20' - -commit 558a7d9b046bbbe185dea263b48a3cb2664378fc -Author: Thomas Freitag -Date: Sun Sep 9 23:25:47 2012 +0200 - - Fix invalid memory access in solves 1066.pdf.asan.38.75 - - splash/SplashClip.cc | 23 +++++++++++++++++++++++ - splash/SplashXPathScanner.cc | 3 +++ - 2 files changed, 26 insertions(+) - -commit d0df8e54512f584ca2b3edbae1c19e167948e5c3 -Author: Thomas Freitag -Date: Sun Sep 9 23:21:38 2012 +0200 - - Fix invalid memory access in 1106.pdf.asan.30.120.patch - - poppler/Function.cc | 5 +++++ - 1 file changed, 5 insertions(+) - -commit 86b89864396a1dcf027e5793e6ac75411977bcf9 -Author: Thomas Freitag -Date: Sun Sep 9 23:08:49 2012 +0200 - - Fix crash in 1255.pdf.SIGSEGV.56f.285 - - poppler/XRef.cc | 6 ++++++ - 1 file changed, 6 insertions(+) - -commit 96931732f343d2bbda9af9488b485da031866c3b -Author: Thomas Freitag -Date: Sun Sep 9 22:47:57 2012 +0200 - - Fix invalid memory access in 61.pdf.asan.13.95 - - fofi/FoFiType1C.cc | 25 +++++++++++++++++-------- - fofi/FoFiType1C.h | 2 ++ - 2 files changed, 19 insertions(+), 8 deletions(-) - -commit 26917d69c4da6a110db02b120133c36579fbb17c -Author: Albert Astals Cid -Date: Sun Sep 9 22:23:36 2012 +0200 - - Add unlikely - - poppler/Gfx.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit e6a3c797c01aa343f640f2e6f45de5bf379aa8ad -Author: Thomas Freitag -Date: Sun Sep 9 22:22:59 2012 +0200 - - Fix wrong memory access in 68.pdf.asan.7.1030 - - poppler/Gfx.cc | 4 ++++ - 1 file changed, 4 insertions(+) - -commit 48fe18cf277cd2a4e665c74b3a594482f762f4b6 -Author: Albert Astals Cid -Date: Sun Sep 9 22:09:44 2012 +0200 - - Fix memory leak - - poppler/Gfx.cc | 1 + - 1 file changed, 1 insertion(+) - -commit b87aafc0cdb36c3555053f2684c45f1a9d7b2f94 -Author: Albert Astals Cid -Date: Sun Sep 9 21:42:48 2012 +0200 - - Add unlikelys to the ifs - - poppler/DCTStream.cc | 4 ++-- - poppler/JBIG2Stream.cc | 2 +- - 2 files changed, 3 insertions(+), 3 deletions(-) - -commit a019eef2f8ca53addd7ccab7f9c47657f4e52286 -Author: Thomas Freitag -Date: Sun Sep 9 21:41:09 2012 +0200 - - Fix crash in 1162.pdf.SIGSEGV.28e.182 - - poppler/DCTStream.cc | 4 ++++ - 1 file changed, 4 insertions(+) - -commit ad7c6ac88f2315c9ce003308d1b4988592d4434b -Author: William Bader -Date: Sun Sep 9 21:31:58 2012 +0200 - - Fix crash in 1028.pdf.SIGSEGV.ae6.33 - - poppler/JBIG2Stream.cc | 8 ++++++++ - 1 file changed, 8 insertions(+) - -commit b861af714daee4125e54b250dddf82106f5a8ce8 -Author: Albert Astals Cid -Date: Sun Sep 9 21:15:06 2012 +0200 - - Fix memory leak - - poppler/Form.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 17fc1bfa8013cafe3b348f0cc07ef08bf9c7dd9a -Merge: e0118be3 a4f59113 -Author: Albert Astals Cid -Date: Sun Sep 9 12:52:49 2012 +0200 - - Merge remote-tracking branch 'origin/poppler-0.20' - -commit a4f59113574a8d7460c6ce5000cb09d20fe52b74 -Author: Albert Astals Cid -Date: Sun Sep 9 12:49:43 2012 +0200 - - Fix memory leak - - poppler/Annot.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 28240046f8fe37ca96f9a80cb1ea3a59af9c66f3 -Author: Thomas Freitag -Date: Sun Sep 9 12:48:26 2012 +0200 - - Fix crash in 589.pdf.SIGSEGV.8b1.929 - - poppler/Annot.cc | 8 ++++++++ - 1 file changed, 8 insertions(+) - -commit e0118be3ba38bd00fa2a9c20c5b4cd82e820ba0b -Merge: 2c414307 ccd3db5a -Author: Albert Astals Cid -Date: Sat Sep 8 18:15:43 2012 +0200 - - Merge remote-tracking branch 'origin/poppler-0.20' - - Conflicts: - glib/poppler-document.cc - poppler/PDFDoc.cc - poppler/XRef.h - utils/HtmlFonts.cc - -commit ccd3db5a7723ddb692f6dc85ed9d0f5e3dde189f -Author: Albert Astals Cid -Date: Sat Sep 8 18:10:14 2012 +0200 - - Only complain when the malloc really failed - - poppler/JBIG2Stream.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 2c41430732f517d4d57e914a315ba315a2545541 -Author: Albert Astals Cid -Date: Thu Sep 6 22:12:38 2012 +0200 - - Add missing licenses - - goo/grandom.cc | 2 ++ - goo/grandom.h | 2 ++ - splash/SplashScreen.cc | 1 + - utils/pdfinfo.cc | 1 + - 4 files changed, 6 insertions(+) - -commit be88963a5955ac033e7a7d224bdcc4049085a9dc -Author: Fabio D'Urso -Date: Thu Aug 9 13:18:22 2012 +0200 - - pdf-fullrewrite: Added support for encrypted documents, checks on - output documents, incremental update mode - - test/CMakeLists.txt | 1 + - test/Makefile.am | 3 +- - test/pdf-fullrewrite.cc | 354 - ++++++++++++++++++++++++++++++++++++++++++++++-- - 3 files changed, 342 insertions(+), 16 deletions(-) - -commit 381be58e9e0d0e323acbd975a2334eca6d9018fd -Author: Fabio D'Urso -Date: Sat Aug 4 13:00:06 2012 +0200 - - pdfinfo: Show info about the encryption algorithm - - utils/pdfinfo.cc | 24 ++++++++++++++++++++++-- - 1 file changed, 22 insertions(+), 2 deletions(-) - -commit 273e8c896e95b548093159dc8bb14d48ce447053 -Author: Fabio D'Urso -Date: Wed Aug 15 18:09:02 2012 +0200 - - Mark object streams as DontRewrite - - So that they don't get copied in full rewrite mode, because they're - not referenced from the XRef table we build, and we already - individually write each object they contain. - - poppler/XRef.cc | 13 +++++++++++++ - 1 file changed, 13 insertions(+) - -commit 59db8deaa7b1907831b526de3011dc22d0ffb333 -Author: Fabio D'Urso -Date: Thu Aug 9 20:08:44 2012 +0200 - - Mark XRef streams as Unencrypted and DontRewrite - - - Unencrypted because they are stored in unencrypted form - - DontRewrite because they must not be copied in full rewrite mode, - because we always build a new XRef table, and existing XRef streams - are not referenced any more (ie they become "leaked" objects). - Furthermore, since readers know that XRef streams' objects are - unencrypted from the fact that they are XRef streams, but these - leaked objects are no longer referred as XRef streams, readers would - think that they are regularly encrypted objects, resulting in - currupt objects. - - poppler/PDFDoc.cc | 5 +++ - poppler/XRef.cc | 126 - +++++++++++++++++++++++++++++++++++------------------- - poppler/XRef.h | 9 ++-- - 3 files changed, 94 insertions(+), 46 deletions(-) - -commit 116722cc74e267ac44dd5a70924557cdf6f25d02 -Author: Fabio D'Urso -Date: Sat Aug 4 12:47:22 2012 +0200 - - Encrypt strWeird streams before writing them in PDFDoc::writeObject - - poppler/Decrypt.cc | 9 ++++++++- - poppler/Decrypt.h | 2 ++ - poppler/PDFDoc.cc | 10 ++++++++++ - 3 files changed, 20 insertions(+), 1 deletion(-) - -commit 695889c1330ca5b37338b8363dbf233fce936bc6 -Author: Fabio D'Urso -Date: Sat Aug 4 12:24:25 2012 +0200 - - Encrypt strings before writing them in PDFDoc::writeString - - poppler/PDFDoc.cc | 20 ++++++++++++++++++++ - 1 file changed, 20 insertions(+) - -commit 4ab8e7be536db40db8a1a4af50dad3ba59c49f14 -Author: Fabio D'Urso -Date: Sat Aug 4 02:06:11 2012 +0200 - - Propagate encryption parameters to PDFDoc's write functions - - poppler/PDFDoc.cc | 54 - ++++++++++++++++++++++++++++++++++++------------------ - poppler/PDFDoc.h | 20 +++++++++++++------- - poppler/XRef.cc | 14 ++++++++++++++ - poppler/XRef.h | 2 ++ - utils/pdfunite.cc | 2 +- - 5 files changed, 66 insertions(+), 26 deletions(-) - -commit 9e43f9a8bcbee9060309b9679dbcc6b501a79cfb -Author: Fabio D'Urso -Date: Wed Aug 1 16:14:22 2012 +0200 - - Separated header and footer write commands from the rest of - PDFDoc::writeObject - - Because in next patch I'll need to pass the object's num and gen - always, - not only if the object's header and footer need to be written. - - poppler/PDFDoc.cc | 51 - +++++++++++++++++++++++++++++++++------------------ - poppler/PDFDoc.h | 11 +++++++---- - utils/pdfunite.cc | 2 +- - 3 files changed, 41 insertions(+), 23 deletions(-) - -commit 4d19a002801531b07f11382daaf9880e4691a10e -Author: Fabio D'Urso -Date: Sat Aug 4 01:36:06 2012 +0200 - - Do not change encrypted documents' ID, not even in case of full - rewrite - - Because we will raw-copy encrypted streams, and the ID is part of the - decryption key. - - poppler/PDFDoc.cc | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -commit 800b2e37d3c4c73147bf9e11d9f38afe2183ab9d -Author: Fabio D'Urso -Date: Wed Aug 1 14:07:10 2012 +0200 - - Initial support for saving encrypted documents - - - Do not refuse to save encrypted documents - - Copy the /Encrypt value in the new document's trailer dictionary - - Mark indirect objects referred from /Encrypt as not encrypted - in XRef::scanSpecialFlags - - poppler/PDFDoc.cc | 49 ++++++++++++++++++------------------------- - poppler/XRef.cc | 62 - ++++++++++++++++++++++++++++++++++++++++++++++++++++++- - poppler/XRef.h | 16 +++++++++++++- - 3 files changed, 96 insertions(+), 31 deletions(-) - -commit 6647153d47b1d67d2a4d6b90dce2184ab6c7dda6 -Author: Fabio D'Urso -Date: Thu Aug 9 12:26:53 2012 +0200 - - Added field XRefEntry::flags, and turned XRefEntry::updated into - a flag - - In next patches I'll add other flags - - poppler/PDFDoc.cc | 4 ++-- - poppler/XRef.cc | 18 +++++++++--------- - poppler/XRef.h | 20 +++++++++++++++++++- - 3 files changed, 30 insertions(+), 12 deletions(-) - -commit a284c6c6623587abb7da7e4c171c42e006ea477b -Author: Fabio D'Urso -Date: Sat Aug 4 01:57:41 2012 +0200 - - Be able to output overflown integers back - - Because Lexer.cc:241 can read them, and we must be able to write them - back (especially in full rewrite mode). - - poppler/PDFDoc.cc | 3 +++ - 1 file changed, 3 insertions(+) - -commit 53baea19658a27f15c7ed870a24be82b8219ddfe -Author: Fabio D'Urso -Date: Sat Aug 4 01:32:08 2012 +0200 - - FlateStream::unfilteredReset should call str->unfilteredReset() - - Just like any other FilterStream-derived class does - - poppler/Stream.cc | 14 +++++++++++--- - poppler/Stream.h | 2 ++ - 2 files changed, 13 insertions(+), 3 deletions(-) - -commit 4e5fee4e9156480173f05e7b3d0bdf604127d481 -Author: Fabio D'Urso -Date: Mon Aug 6 02:08:27 2012 +0200 - - Initialize AES encryption with random CBC IV data - - poppler/Decrypt.cc | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -commit 1b008f273359b8df6b64ffa94bb2828e42ffa63e -Author: Fabio D'Urso -Date: Mon Aug 6 02:08:40 2012 +0200 - - Replaced srand/rand calls in SplashScreen with grandom calls - - splash/SplashScreen.cc | 7 ++----- - 1 file changed, 2 insertions(+), 5 deletions(-) - -commit faff947d8106048b19ba74dd483b90b8cebb16c7 -Author: Fabio D'Urso -Date: Mon Aug 6 02:06:47 2012 +0200 - - Added goo/grandom.[cc|h] with POSIX implementation - - CMakeLists.txt | 2 ++ - ConfigureChecks.cmake | 1 + - config.h.cmake | 3 +++ - configure.ac | 1 + - goo/Makefile.am | 6 +++-- - goo/grandom.cc | 68 - +++++++++++++++++++++++++++++++++++++++++++++++++++ - goo/grandom.h | 32 ++++++++++++++++++++++++ - 7 files changed, 111 insertions(+), 2 deletions(-) - -commit af8d05d1ab89b74e307e90aaf19c750528f5f561 -Author: Fabio D'Urso -Date: Fri Aug 3 12:46:06 2012 +0200 - - Added encryption support in Decrypt.cc/.h - - poppler/Decrypt.cc | 222 - +++++++++++++++++++++++++++++++++++++++++++++++++++++ - poppler/Decrypt.h | 21 ++++- - 2 files changed, 242 insertions(+), 1 deletion(-) - -commit ba6ff179aa78a42a384166ace2df80101cfbe7b9 -Author: Fabio D'Urso -Date: Thu Aug 2 18:56:29 2012 +0200 - - Refactoring of Decrypt.cc/.h in preparation for encryption support - - poppler/Decrypt.cc | 219 - +++++++++++++++++++++++++++-------------------------- - poppler/Decrypt.h | 35 ++++++--- - 2 files changed, 133 insertions(+), 121 deletions(-) - -commit cd1ab1e34032d5620140bd0b6b6ec4b74f89ae19 -Author: Albert Astals Cid -Date: Thu Aug 30 22:36:14 2012 +0200 - - Update Adrian's copyrights - - goo/GooString.cc | 1 + - poppler/CharCodeToUnicode.cc | 1 + - poppler/TextOutputDev.cc | 2 +- - poppler/UTF.cc | 23 +++++++++++++++++++++++ - utils/HtmlOutputDev.cc | 2 +- - 5 files changed, 27 insertions(+), 2 deletions(-) - -commit ce8a579f339507da3fd7802e1531fbf6849c0c98 -Author: Adrian Johnson -Date: Tue Aug 28 22:16:34 2012 +0930 - - Move text to unicode conversion into a separate function - - This also ensures UTF-16 ActualText strings are converted to UCS-4 - before calling addChar. - - goo/GooString.cc | 2 +- - poppler/TextOutputDev.cc | 32 ++++---------------------------- - poppler/UTF.cc | 34 ++++++++++++++++++++++++++++++++++ - poppler/UTF.h | 8 ++++++++ - utils/pdfinfo.cc | 37 ++++++------------------------------- - 5 files changed, 53 insertions(+), 60 deletions(-) - -commit cac13e782cf4413703cfd1fa23e76133dfbe5ef9 -Author: Adrian Johnson -Date: Tue Aug 28 21:48:16 2012 +0930 - - text: increase the tolerance for overlapping glyphs - - TextOutputDev will start a new line when encountering consecutive - glyphs with overlapping bounding boxes. This can occur when drawing - diacritics with a separate glyph. In this case, due to the diacritic - having a different baseline, the lines may be output in the wrong - order. - - This patch increases the tolerance for overlapping bounding boxes to - prevent diacritics from splitting lines. - - poppler/TextOutputDev.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 6f6386219449e70c2c3bc3559fdde3df4a57a809 -Author: Adrian Johnson -Date: Thu Mar 8 20:52:28 2012 +1030 - - Convert UTF-16 to UCS-4 when reading toUnicode cmap - - to ensure only UCS-4 values are used with the "Unicode" type. - - CMakeLists.txt | 3 ++- - poppler/CairoOutputDev.cc | 2 +- - poppler/CharCodeToUnicode.cc | 12 ++++++----- - poppler/GlobalParams.cc | 2 +- - poppler/Makefile.am | 3 ++- - poppler/TextOutputDev.cc | 19 +----------------- - poppler/UTF.cc | 47 - ++++++++++++++++++++++++++++++++++++++++++++ - poppler/{UTF8.h => UTF.h} | 23 ++++++++++++++++++++-- - utils/HtmlOutputDev.cc | 14 +------------ - 9 files changed, 83 insertions(+), 42 deletions(-) - -commit b3b0f5abe4fdcc39d884670e4a998d39324659f6 -Author: Albert Astals Cid -Date: Thu Aug 30 00:57:51 2012 +0200 - - qt4: unbreak spacing - - qt4/src/poppler-embeddedfile.cc | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit 6356c0bbae47db291a3585d31c7727bc3f8d97a4 -Author: Albert Astals Cid -Date: Thu Aug 30 00:57:51 2012 +0200 - - qt4: unbreak spacing - - qt4/src/poppler-embeddedfile.cc | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit 46948868dee6d4e68b658c68d7df482590e34da3 -Author: Albert Astals Cid -Date: Thu Aug 30 00:43:45 2012 +0200 - - Accept FileSpec as Dict too and not only as Ref - - File to try in KDE bug #306008 - - poppler/Catalog.cc | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -commit debc8fb497bc22c0f9f34d785852981a87475c30 -Author: Albert Astals Cid -Date: Thu Aug 30 00:35:40 2012 +0200 - - Take into account the embFile returned by the core may be NULL - - qt4/src/poppler-embeddedfile-private.h | 4 +++- - qt4/src/poppler-embeddedfile.cc | 19 ++++++++++++------- - 2 files changed, 15 insertions(+), 8 deletions(-) - -commit 3ca67a59fc15782abb1e479eb2b8916de5b1b6ed -Author: Albert Astals Cid -Date: Thu Aug 30 00:34:06 2012 +0200 - - Return NULL EmbFile if the FileSpec is not ok - - Otherwise we might end up asserting - - poppler/FileSpec.cc | 4 ++++ - 1 file changed, 4 insertions(+) - -commit 9264b375eec19e639c524b677f770ad750b1cb43 -Author: Albert Astals Cid -Date: Thu Aug 30 00:43:45 2012 +0200 - - Accept FileSpec as Dict too and not only as Ref - - File to try in KDE bug #306008 - - poppler/Catalog.cc | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -commit 01528eaedc77d5559f6dc4229b66f1a819678fb7 -Author: Albert Astals Cid -Date: Thu Aug 30 00:35:40 2012 +0200 - - Take into account the embFile returned by the core may be NULL - - qt4/src/poppler-embeddedfile-private.h | 4 +++- - qt4/src/poppler-embeddedfile.cc | 19 ++++++++++++------- - 2 files changed, 15 insertions(+), 8 deletions(-) - -commit c1fba45be106dc30a5136efe41493b1cf6d2a1b5 -Author: Albert Astals Cid -Date: Thu Aug 30 00:34:06 2012 +0200 - - Return NULL EmbFile if the FileSpec is not ok - - Otherwise we might end up asserting - - poppler/FileSpec.cc | 4 ++++ - 1 file changed, 4 insertions(+) - -commit 1881486e9817304d0817ce24b177c1bc79587138 -Author: Tobias Koenig -Date: Fri Aug 24 19:12:20 2012 +0200 - - annots: Unify parsing of additional actions entries - - https://bugs.freedesktop.org/show_bug.cgi?id=53586 - - poppler/Annot.cc | 58 - ++++++++++++++++++++++++++++++++++++++++++++------------ - poppler/Annot.h | 24 +++++++++++++++++++---- - 2 files changed, 66 insertions(+), 16 deletions(-) - -commit 686ec0cc92e25f74eaa9e09a328724cbdf939bca -Author: Albert Astals Cid -Date: Wed Aug 15 20:02:05 2012 +0200 - - Remove declared but not implemented function - - poppler/XRef.h | 1 - - 1 file changed, 1 deletion(-) - -commit 0b3259c1d5679cb8d59d770e5fbe7e1bc141a025 -Author: Albert Astals Cid -Date: Wed Aug 15 20:02:05 2012 +0200 - - Remove declared but not implemented function - - poppler/XRef.h | 1 - - 1 file changed, 1 deletion(-) - -commit 5fd2a35227c22dbddedfb397eff0e0a09c3d1b03 -Author: Pino Toscano -Date: Wed Aug 15 19:51:43 2012 +0200 - - poppler-config.h: remove WITH_FONTCONFIGURATION_* macros - - no public header uses them anymore, so need to expose them - - poppler/poppler-config.h.cmake | 10 ---------- - poppler/poppler-config.h.in | 10 ---------- - 2 files changed, 20 deletions(-) - -commit edd0ea4847c143adb1d15a57b42b0ce2b2c80b0e -Author: Pino Toscano -Date: Wed Aug 15 19:31:50 2012 +0200 - - ignore more qt4 tests - - qt4/tests/.gitignore | 3 +++ - 1 file changed, 3 insertions(+) - -commit 2df57857000c5adbee6b029ff7a79acc707786a0 -Author: Pino Toscano -Date: Wed Aug 15 18:59:15 2012 +0200 - - build: remove extra fontconfig CFLAGS and LIBS - - fontconfig is used only in .cpp sources inside the 'poppler' - subdirectory, so there is no need to add the include paths for it - in other directories; - likewise, do not to link to it if not needed - - glib/Makefile.am | 4 +--- - qt4/demos/Makefile.am | 2 -- - qt4/src/Makefile.am | 2 -- - qt4/tests/Makefile.am | 2 -- - test/Makefile.am | 6 ++---- - utils/CMakeLists.txt | 3 --- - utils/Makefile.am | 4 +--- - 7 files changed, 4 insertions(+), 19 deletions(-) - -commit 3e802949264d9310df057daff891a3fccb2eb8d3 -Author: Albert Astals Cid -Date: Wed Aug 15 00:02:23 2012 +0200 - - PSOutputDev: Always write HiResBoundingBox - - Makes some people happier and it doesn't hurt us much - Bug #53159 - - poppler/PSOutputDev.cc | 7 ++----- - 1 file changed, 2 insertions(+), 5 deletions(-) - -commit e83568065f77ba722b147b3b10faed1ff66f22dc -Author: Pino Toscano -Date: Sat Aug 11 01:38:08 2012 +0200 - - remove extra execution permissions - - (cherry picked from commit 9a5a19ee2f9cd536c3527b30c0256ca9dce3638c) - - goo/GooTimer.h | 0 - 1 file changed, 0 insertions(+), 0 deletions(-) - -commit 9a5a19ee2f9cd536c3527b30c0256ca9dce3638c -Author: Pino Toscano -Date: Sat Aug 11 01:38:08 2012 +0200 - - remove extra execution permissions - - goo/GooTimer.h | 0 - 1 file changed, 0 insertions(+), 0 deletions(-) - -commit 1b2903c104012fdd3c982d57898910945dff9a15 -Author: Albert Astals Cid -Date: Sat Aug 11 00:05:10 2012 +0200 - - 0.20.3 - - CMakeLists.txt | 4 ++-- - NEWS | 16 ++++++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/Doxyfile | 2 +- - 6 files changed, 22 insertions(+), 6 deletions(-) - -commit 40e7b744d32152ab4c6201b8bda7fb7caf6bfd4e -Author: Albert Astals Cid -Date: Sun Aug 5 15:07:16 2012 +0200 - - If NULL, NULL fails as password try EMPTY, EMPTY before failing - - Reviewed by Jose Aliste - Bug #3498 - - poppler/SecurityHandler.cc | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -commit a53e0641365608f832b455404f1ee584d278e0c4 -Author: Albert Astals Cid -Date: Sun Aug 5 15:07:16 2012 +0200 - - If NULL, NULL fails as password try EMPTY, EMPTY before failing - - Reviewed by Jose Aliste - Bug #3498 - - poppler/SecurityHandler.cc | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -commit 3ca2bc0d3abdf92741b7921ea402c9de09e531f6 -Author: Markus Trippelsdorf -Date: Fri Aug 3 00:48:12 2012 +0200 - - Fix segfault when scaleImage returns NULL - - Bug 52488 - - splash/Splash.cc | 7 +++++++ - 1 file changed, 7 insertions(+) - -commit 31fe12c63f0133d124e2115aba607857aaff0978 -Author: Markus Trippelsdorf -Date: Fri Aug 3 00:48:12 2012 +0200 - - Fix segfault when scaleImage returns NULL - - Bug 52488 - - splash/Splash.cc | 7 +++++++ - 1 file changed, 7 insertions(+) - -commit d3c339017857cd762d8419260e33e1cc4e197743 -Author: Thomas Freitag -Date: Thu Aug 2 00:22:19 2012 +0200 - - PSOutputDev: Fix Bitmaps in level2sep or level3sep - - Bug #52384 - - poppler/PSOutputDev.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 768cf5877f48f8cee80fe96e2ee52f42f230dfdf -Author: Thomas Freitag -Date: Thu Aug 2 00:22:19 2012 +0200 - - PSOutputDev: Fix Bitmaps in level2sep or level3sep - - Bug #52384 - - poppler/PSOutputDev.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit d0e55aa49484263882345fa648e1e907d2b172f2 -Author: Thomas Freitag -Date: Wed Aug 1 22:56:49 2012 +0200 - - Splash: Blend mode enhancements for CMYK - - poppler/SplashOutputDev.cc | 76 - ++++++++++++++++++++++++++++++++-------------- - splash/Splash.cc | 22 -------------- - 2 files changed, 54 insertions(+), 44 deletions(-) - -commit 315447843a368556a8536bc30e579c9bf338682e -Author: Thomas Freitag -Date: Wed Aug 1 22:56:49 2012 +0200 - - Splash: Blend mode enhancements for CMYK - - poppler/SplashOutputDev.cc | 76 - ++++++++++++++++++++++++++++++++-------------- - splash/Splash.cc | 22 -------------- - 2 files changed, 54 insertions(+), 44 deletions(-) - -commit 78c6a5615013d26b8a2babb13b3c4f7d6a1d70a4 -Author: Albert Astals Cid -Date: Tue Jul 31 23:32:19 2012 +0200 - - Replace c++ style includes with c style ones - - Fixes build in Solaris 10 - Bug #52426 - - goo/gstrtod.cc | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -commit c0c88b3707fc7337e814ae4252d80002641a19ee -Author: Albert Astals Cid -Date: Tue Jul 31 23:32:19 2012 +0200 - - Replace c++ style includes with c style ones - - Fixes build in Solaris 10 - Bug #52426 - - goo/gstrtod.cc | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -commit dcbc923bd3592a81876f84005fbaddcea18641cc -Author: Thomas Freitag -Date: Sun Jul 22 18:40:46 2012 +0200 - - Make sure xScale and yScale are always initialized - - Bug #52215 - - poppler/PSOutputDev.cc | 5 +---- - 1 file changed, 1 insertion(+), 4 deletions(-) - -commit 36481939e3064de920e49d9d1742a85473a50963 -Author: Thomas Freitag -Date: Sun Jul 22 18:40:46 2012 +0200 - - Make sure xScale and yScale are always initialized - - Bug #52215 - - poppler/PSOutputDev.cc | 5 +---- - 1 file changed, 1 insertion(+), 4 deletions(-) - -commit ef7c2418e12d3e6a79f1d89a0051b005fadbc344 -Author: Thomas Freitag -Date: Sat Jul 21 00:01:49 2012 +0200 - - Fix conversion to ps when having multiple strips - - Bug 51982 - - poppler/PSOutputDev.cc | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -commit 6b567565b7b9d591fbd7441592096960a303bd39 -Author: Thomas Freitag -Date: Sat Jul 21 00:01:49 2012 +0200 - - Fix conversion to ps when having multiple strips - - Bug 51982 - - poppler/PSOutputDev.cc | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -commit 349b21acc249c130fb053bc4a0c75019f75bd35b -Author: Torsten Kasch -Date: Thu Jul 19 00:18:14 2012 +0200 - - Unify poppler-config.h includes in core "installed" headers - - Bug 52193 - - goo/FixedPoint.h | 2 +- - goo/GooTimer.h | 2 +- - goo/JpegWriter.h | 2 +- - goo/PNGWriter.h | 2 +- - goo/TiffWriter.h | 2 +- - goo/gfile.h | 2 +- - goo/gmem.h | 2 +- - splash/SplashFTFont.h | 2 +- - splash/SplashMath.h | 2 +- - 9 files changed, 9 insertions(+), 9 deletions(-) - -commit 34327b2c201392f96e3449941411b7ad4b3e8bcb -Author: Torsten Kasch -Date: Thu Jul 19 00:18:14 2012 +0200 - - Unify poppler-config.h includes in core "installed" headers - - Bug 52193 - - goo/FixedPoint.h | 2 +- - goo/GooTimer.h | 2 +- - goo/JpegWriter.h | 2 +- - goo/PNGWriter.h | 2 +- - goo/TiffWriter.h | 2 +- - goo/gfile.h | 2 +- - goo/gmem.h | 2 +- - splash/SplashFTFont.h | 2 +- - splash/SplashMath.h | 2 +- - 9 files changed, 9 insertions(+), 9 deletions(-) - -commit 8fe700217ab6ce786a8272f2c338e3dab434c56e -Author: Torsten Kasch -Date: Thu Jul 19 00:06:45 2012 +0200 - - autoconf: Do not assume the shell is bash compatible - - Bug 52197 - - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 15c6ae699f083ea6c9716c1098ae9833a56eeb3e -Author: Torsten Kasch -Date: Thu Jul 19 00:06:45 2012 +0200 - - autoconf: Do not assume the shell is bash compatible - - Bug 52197 - - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit f5311da76ec7cd7c1e6cdfc4e18df6dd56e8398b -Author: Albert Astals Cid -Date: Thu Jul 19 00:01:49 2012 +0200 - - pdfseparate: Return 0 on success - - utils/pdfseparate.cc | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -commit dc8833a36b514c13cfd6b1fd4665d2fddd71f357 -Author: Albert Astals Cid -Date: Thu Jul 19 00:01:49 2012 +0200 - - pdfseparate: Return 0 on success - - utils/pdfseparate.cc | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -commit 51f22ca0badfc41c19cba66cabd63184244f81c7 -Author: Thomas Freitag -Date: Mon Jul 16 23:32:23 2012 +0200 - - PSOutputDev: Fix DeviceN images with alternate Lab colorspace in - level 3 PostScript - - Bug #51822 - - poppler/PSOutputDev.cc | 54 - +++++++++++++++++++++++++++++++++++++++++++------- - poppler/PSOutputDev.h | 2 +- - 2 files changed, 48 insertions(+), 8 deletions(-) - -commit 31ef967033407de91109ff46db9c60cb8748bc55 -Author: Thomas Freitag -Date: Mon Jul 16 23:32:23 2012 +0200 - - PSOutputDev: Fix DeviceN images with alternate Lab colorspace in - level 3 PostScript - - Bug #51822 - - poppler/PSOutputDev.cc | 54 - +++++++++++++++++++++++++++++++++++++++++++------- - poppler/PSOutputDev.h | 2 +- - 2 files changed, 48 insertions(+), 8 deletions(-) - -commit f9f5238d32615f93d07afa3aa7384a8b30737203 -Author: Thomas Freitag -Date: Fri Jul 13 00:56:48 2012 +0200 - - Fix Splash::arbitraryTransformImage causes bogus memory allocation - size - - Bug #49523 - - poppler/SplashOutputDev.cc | 2 +- - splash/Splash.cc | 79 - ++++++++++++++++++++++++++-------------------- - splash/Splash.h | 4 +-- - 3 files changed, 48 insertions(+), 37 deletions(-) - -commit 950d5f3dec4bff5d3c523d55689d7b70215dc110 -Author: Thomas Freitag -Date: Fri Jul 13 00:56:48 2012 +0200 - - Fix Splash::arbitraryTransformImage causes bogus memory allocation - size - - Bug #49523 - - poppler/SplashOutputDev.cc | 2 +- - splash/Splash.cc | 79 - ++++++++++++++++++++++++++-------------------- - splash/Splash.h | 4 +-- - 3 files changed, 48 insertions(+), 37 deletions(-) - -commit e09be3bc6ba1290fd31bde0c3d19c4ffcbadbf00 -Author: Albert Astals Cid -Date: Tue Jul 10 23:06:53 2012 +0200 - - 0.20.2 - - CMakeLists.txt | 2 +- - NEWS | 11 +++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - qt4/src/Doxyfile | 2 +- - 5 files changed, 15 insertions(+), 4 deletions(-) - -commit e15fe0e1e6accf779caeb1179a8d62161c0aa650 -Author: Thomas Freitag -Date: Thu Jul 5 17:44:02 2012 +0200 - - Fix handling of DeviceN images in level 3 PostScript - - bug #51548 - - poppler/PSOutputDev.cc | 14 -------------- - 1 file changed, 14 deletions(-) - -commit 31837201cf5b3db735c89ef4969105b7a6ab465d -Author: Thomas Freitag -Date: Thu Jul 5 17:44:02 2012 +0200 - - Fix handling of DeviceN images in level 3 PostScript - - bug #51548 - - poppler/PSOutputDev.cc | 14 -------------- - 1 file changed, 14 deletions(-) - -commit 262203bd86403e43034fbfbbeef5a5894a62ecb2 -Author: Albert Astals Cid -Date: Sat Jun 30 14:36:28 2012 +0200 - - [qt4] Refactor part of ::search() functions - - qt4/src/poppler-page-private.h | 7 ++++- - qt4/src/poppler-page.cc | 61 - +++++++++++++++++++----------------------- - 2 files changed, 34 insertions(+), 34 deletions(-) - -commit bd71f80c409dbb47231088c3c6661946ccde6e67 -Author: Adam Reichold -Date: Thu Jun 28 17:42:17 2012 +0200 - - [qt4] add whole-page search method to Poppler::Page - - qt4/src/poppler-page.cc | 39 +++++++++++++++++++++++++++++++++++++++ - qt4/src/poppler-qt4.h | 14 ++++++++++++++ - 2 files changed, 53 insertions(+) - -commit 46ebe7dc84b14ce8dda7b3b1da516b9d99ac3344 -Author: Albert Astals Cid -Date: Fri Jun 29 01:56:55 2012 +0200 - - PSOutputDev: Correct %%DocumentCustomColors - - Bug 51479 - - poppler/PSOutputDev.cc | 20 ++++++++++++++++++++ - 1 file changed, 20 insertions(+) - -commit 02c4e6bf4cc0f5535946fe31815081a40b1de986 -Author: Albert Astals Cid -Date: Fri Jun 29 01:56:55 2012 +0200 - - PSOutputDev: Correct %%DocumentCustomColors - - Bug 51479 - - poppler/PSOutputDev.cc | 20 ++++++++++++++++++++ - 1 file changed, 20 insertions(+) - -commit 2b8d95aeede56c75699bb83ca3b23ea199b81c2c -Author: Albert Astals Cid -Date: Thu Jun 28 00:18:07 2012 +0200 - - Add some security checks to JPXStream decoding - - Fixes crash in broken/fuzzed pdf sent by Mateusz "j00ru" Jurczyk - and Gynvael Coldwind - - poppler/JPXStream.cc | 14 ++++++++++++-- - 1 file changed, 12 insertions(+), 2 deletions(-) - -commit f7990386d268a444c297958e9c50ed27a0825a00 -Author: Albert Astals Cid -Date: Thu Jun 28 00:18:07 2012 +0200 - - Add some security checks to JPXStream decoding - - Fixes crash in broken/fuzzed pdf sent by Mateusz "j00ru" Jurczyk - and Gynvael Coldwind - - poppler/JPXStream.cc | 14 ++++++++++++-- - 1 file changed, 12 insertions(+), 2 deletions(-) - -commit c5c6eed1623506e1206e89cee0b7c887d815ba62 -Author: Albert Astals Cid -Date: Sun Jun 24 23:43:03 2012 +0200 - - Change SplashBitmap gmallocn to gmallocn_checkoverflow - - Fixes abort in KDE bug #302372 - - splash/Splash.cc | 37 +++++++++++++++++++++++-------------- - splash/SplashBitmap.cc | 18 +++++++++++------- - 2 files changed, 34 insertions(+), 21 deletions(-) - -commit f48eb669ae5c729c026554802e666e64399c0900 -Author: Albert Astals Cid -Date: Sun Jun 24 23:43:03 2012 +0200 - - Change SplashBitmap gmallocn to gmallocn_checkoverflow - - Fixes abort in KDE bug #302372 - - splash/Splash.cc | 37 +++++++++++++++++++++++-------------- - splash/SplashBitmap.cc | 18 +++++++++++------- - 2 files changed, 34 insertions(+), 21 deletions(-) - -commit c87738ee234aafc6eda5a263ad789205037020e1 -Author: Thomas Freitag -Date: Sun Jun 24 20:20:38 2012 +0200 - - copy resources content defined in the pages dict - - Fixes bug #51369 - - poppler/PDFDoc.cc | 16 ++++++++++++++-- - 1 file changed, 14 insertions(+), 2 deletions(-) - -commit ff48a5d67a130211fbbb98aa0011bca0c1185114 -Author: Thomas Freitag -Date: Sun Jun 24 20:20:38 2012 +0200 - - copy resources content defined in the pages dict - - Fixes bug #51369 - - poppler/PDFDoc.cc | 16 ++++++++++++++-- - 1 file changed, 14 insertions(+), 2 deletions(-) - -commit 6cdf879e389f05abba30b3fad8083b7fff23056e -Author: Fabio D'Urso -Date: Sun Jun 24 11:48:04 2012 +0200 - - qt4: Do not hang on malformed /Annots objects - - Don't recurse infinitely if the /Annots object contains annotation - dictionaries (according to specs, /Annots must contain *references* - to annotation dictionaries). - - Fixes bug #51361 - - qt4/src/poppler-annotation.cc | 5 +++++ - 1 file changed, 5 insertions(+) - -commit bd1dab39a857b852c09d21f64254ffc1f24c2df0 -Author: Fabio D'Urso -Date: Sun Jun 24 11:48:04 2012 +0200 - - qt4: Do not hang on malformed /Annots objects - - Don't recurse infinitely if the /Annots object contains annotation - dictionaries (according to specs, /Annots must contain *references* - to annotation dictionaries). - - Fixes bug #51361 - - qt4/src/poppler-annotation.cc | 5 +++++ - 1 file changed, 5 insertions(+) - -commit 31db47d077825045edd1a2d229e873a6f8e09fb1 -Author: Carlos Garcia Campos -Date: Sun Jun 17 12:00:43 2012 +0200 - - Simplify AnnotAppearance::getAppearanceStream() - - - Use a switch instead of if to get the stream object - - Use the return value of dictLookupNF to check whether the object is - null - - Don't fetch the stream to check the reference is valid, this is - already done when used - - poppler/Annot.cc | 50 ++++++++++++++++++-------------------------------- - 1 file changed, 18 insertions(+), 32 deletions(-) - -commit b15d02b92aca1348564e70d0245064bc27eefce8 -Author: Maciej Mrozowski -Date: Fri May 18 01:47:55 2012 +0200 - - Add the possibility of using lcms1 even if lcms2 is installed - - CMakeLists.txt | 20 +++++++++++++------- - configure.ac | 31 +++++++++++++++---------------- - 2 files changed, 28 insertions(+), 23 deletions(-) - -commit 0cc2738737ed411159c8c8045eff5d1a4463ed16 -Author: Mark Brand -Date: Thu Jun 14 20:31:26 2012 +0200 - - fix typo to compile in Windows - - poppler/GlobalParamsWin.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 3575becd60585324bcefc0631b1bac47c1db3c5c -Author: Mark Brand -Date: Thu Jun 14 20:31:26 2012 +0200 - - fix typo to compile in Windows - - poppler/GlobalParamsWin.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 2e1410ea62fe99e52c94f878d02181f0b59f1cd5 -Author: Albert Astals Cid -Date: Mon Jun 11 15:17:59 2012 +0200 - - Add some security checks to JBIG2Stream decoding - - Fixes crash in broken/fuzzed pdf sent by Mateusz "j00ru" Jurczyk - and Gynvael Coldwind - - poppler/JBIG2Stream.cc | 58 - ++++++++++++++++++++++++++++++++++++++------------ - 1 file changed, 44 insertions(+), 14 deletions(-) - -commit 06618065c8a97a5bec125560546b98edfc1210f3 -Author: Albert Astals Cid -Date: Mon Jun 11 15:17:59 2012 +0200 - - Add some security checks to JBIG2Stream decoding - - Fixes crash in broken/fuzzed pdf sent by Mateusz "j00ru" Jurczyk - and Gynvael Coldwind - - poppler/JBIG2Stream.cc | 58 - ++++++++++++++++++++++++++++++++++++++------------ - 1 file changed, 44 insertions(+), 14 deletions(-) - -commit 6a76d21661add4f84ee0859c4e7a4c23e7a63bc4 -Author: Hib Eris -Date: Sun Jun 10 19:44:18 2012 +0200 - - Check value of first page in linearization table - - Fixes crash in broken/fuzzed pdf sent by Mateusz "j00ru" Jurczyk - and Gynvael Coldwind - - poppler/Linearization.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit e3fe88df3646a80945210ba426eb4681a98b55e9 -Author: Hib Eris -Date: Sun Jun 10 19:44:18 2012 +0200 - - Check value of first page in linearization table - - Fixes crash in broken/fuzzed pdf sent by Mateusz "j00ru" Jurczyk - and Gynvael Coldwind - - poppler/Linearization.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 1240eee8c0d0d01113443e0fda87721775a76da9 -Author: Albert Astals Cid -Date: Sun Jun 10 20:42:55 2012 +0200 - - 0.20.1 - - CMakeLists.txt | 4 ++-- - NEWS | 25 +++++++++++++++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/Doxyfile | 2 +- - 6 files changed, 31 insertions(+), 6 deletions(-) - -commit d483436517c5d9679fd6f4ec5544128ffcc2188e -Author: Albert Astals Cid -Date: Sun Jun 10 20:15:01 2012 +0200 - - Update copyrights - - poppler/GlobalParamsWin.cc | 1 + - 1 file changed, 1 insertion(+) - -commit c783037619e2b4c101e8ecd7e61c94ee077b4be2 -Author: Albert Astals Cid -Date: Sun Jun 10 20:15:01 2012 +0200 - - Update copyrights - - poppler/GlobalParamsWin.cc | 1 + - 1 file changed, 1 insertion(+) - -commit d791101fbdebf7a3b3f333939f9bbff6bbecf45f -Author: Albert Astals Cid -Date: Sun Jun 10 19:09:17 2012 +0200 - - Do use NULL function - - Fixes crash in broken/fuzzed pdf sent by Mateusz "j00ru" Jurczyk - and Gynvael Coldwind - - poppler/Gfx.cc | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -commit f3f9d8f28a97338da92c842d5668b0ef3495ef13 -Author: Albert Astals Cid -Date: Sun Jun 10 19:09:17 2012 +0200 - - Do use NULL function - - Fixes crash in broken/fuzzed pdf sent by Mateusz "j00ru" Jurczyk - and Gynvael Coldwind - - poppler/Gfx.cc | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -commit 8b3fa65f293804dab7ae2fd069132d0d6f44bbb2 -Author: Tobias Koenig -Date: Sun Jun 10 17:48:08 2012 +0200 - - [qt4] Add accessor methods for poster information - - qt4/src/poppler-movie.cc | 15 +++++++++++++++ - qt4/src/poppler-qt4.h | 15 +++++++++++++++ - 2 files changed, 30 insertions(+) - -commit e8aa8266254bfd2189d5b5105e3d76caa4cc6713 -Author: Thomas Freitag -Date: Sun Jun 10 16:58:54 2012 +0200 - - use setoverprintmode only if rip knows it - - poppler/PSOutputDev.cc | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit 92ef16e3699da949c80716c3fd4b438fe79c134d -Author: Thomas Freitag -Date: Sun Jun 10 16:58:54 2012 +0200 - - use setoverprintmode only if rip knows it - - poppler/PSOutputDev.cc | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit 6e3503b5591b105fa92e6cc6568b8819f6acd625 -Author: Fabio D'Urso -Date: Thu May 24 23:17:27 2012 +0200 - - qt4: Keep page rotation into account when normalizing annotation - coords - - If the page is rotated by 90 or 270 degrees, width and height need - to be swapped - - qt4/src/poppler-annotation.cc | 16 ++++++++++++++-- - 1 file changed, 14 insertions(+), 2 deletions(-) - -commit 99aa734ae2d3ba51f840d4c8ef450488fb702a31 -Author: Fabio D'Urso -Date: Thu May 24 23:17:27 2012 +0200 - - qt4: Keep page rotation into account when normalizing annotation - coords - - If the page is rotated by 90 or 270 degrees, width and height need - to be swapped - - qt4/src/poppler-annotation.cc | 16 ++++++++++++++-- - 1 file changed, 14 insertions(+), 2 deletions(-) - -commit 4f2ac544f36aa11747c3e13ff69fc19bdd0136dc -Author: Fabio D'Urso -Date: Sat Jun 9 01:31:29 2012 +0200 - - Fix saving to xml - - The default icon is Note not comment - - qt4/src/poppler-annotation.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit bde31ce7b223abc86d25e06f3d73668b792c70df -Author: Fabio D'Urso -Date: Sat Jun 9 01:31:29 2012 +0200 - - Fix saving to xml - - The default icon is Note not comment - - qt4/src/poppler-annotation.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 0df0aa439eed1d9838a80942e00af08e9acabb8d -Author: Carlos Garcia Campos -Date: Sat Jun 2 17:33:23 2012 +0200 - - glib-demo: Add find options to find demo - - glib/demo/find.c | 61 - +++++++++++++++++++++++++++++++++++++++++++++++++++++++- - 1 file changed, 60 insertions(+), 1 deletion(-) - -commit 52b3ede4bfd1e2288a0efca34da5d6239d3563e9 -Author: Carlos Garcia Campos -Date: Sat Jun 2 16:25:06 2012 +0200 - - glib-demo: Show search matches in a document view - - glib/demo/find.c | 253 - +++++++++++++++++++++++++++++++++++++++++++++++-------- - 1 file changed, 218 insertions(+), 35 deletions(-) - -commit ed0c761c2190a3c1959a60ae9b7961f58a43c939 -Author: Thomas Schenker -Date: Sat Jun 2 11:54:21 2012 +0200 - - glib: Add poppler_page_find_text_with_options - - To be able to search text with options like case sensitive, search - backwards and whole words only. - - https://bugs.freedesktop.org/show_bug.cgi?id=2951 - - glib/poppler-page.cc | 52 - +++++++++++++++++++++++++++---------- - glib/poppler-page.h | 3 +++ - glib/poppler.h | 18 +++++++++++++ - glib/reference/poppler-sections.txt | 2 ++ - 4 files changed, 62 insertions(+), 13 deletions(-) - -commit 126b55c9a44ccb0dba55e758843e9ee4aa43ee2b -Author: Carlos Garcia Campos -Date: Sat Jun 2 17:19:30 2012 +0200 - - Implement whole words only option to search text - - It seems we missed it in the xpdf303 merge. - - poppler/TextOutputDev.cc | 144 - ++++++++++++++++++++++++----------------------- - 1 file changed, 74 insertions(+), 70 deletions(-) - -commit 20210fbb6117649b20f6930031f24b8fc97b773d -Author: Luis Parravicini -Date: Mon May 28 23:44:17 2012 +0200 - - pdftohtml: Add -fontfullname - - Outputs the font name without any substitutions. Bug #49872 - - utils/HtmlFonts.cc | 4 +++- - utils/pdftohtml.1 | 3 +++ - utils/pdftohtml.cc | 4 ++++ - 3 files changed, 10 insertions(+), 1 deletion(-) - -commit 03f979a7e59c4eb5ecb8acc324c7faf700144589 -Author: Gerald Schmidt -Date: Sat May 26 17:46:59 2012 +0200 - - Make the output more xhtml compliant - - utils/HtmlOutputDev.cc | 105 - +++++++++++++++++++++++++------------------------ - 1 file changed, 53 insertions(+), 52 deletions(-) - -commit ba6406222f828e354323223fc4bdb01c1726fb49 -Author: Fabio D'Urso -Date: Mon May 21 18:16:06 2012 +0200 - - Added Annot::removeReferencedObjects + Always set annotations' - page field - - - Now Page::removeAnnot calls Annot::removeReferencedObjects, which - takes care of - removing referenced objects (such as the annot popup and the - appearance streams). - - Previously, Annot's page field was set only if the annotation - dictionary - contained /P - - poppler/Annot.cc | 40 - ++++++++++++++++++++++++++++++++++------ - poppler/Annot.h | 13 +++++++++---- - poppler/Page.cc | 7 ++++--- - poppler/Page.h | 2 +- - qt4/src/poppler-annotation.cc | 8 -------- - 5 files changed, 48 insertions(+), 22 deletions(-) - -commit 9904b8f10abf068a7816bd90976ccbb320387645 -Author: Adrian Johnson -Date: Thu May 24 18:24:48 2012 +0930 - - glib docs: fix typo - - glib/poppler-document.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 028f580056f99719cfb8af7bbe8184ceac02cb16 -Author: Adrian Johnson -Date: Sun May 13 21:36:36 2012 +0930 - - add sustitute font name to GlobalParamsWin32 to fix compilation - - poppler/GlobalParamsWin.cc | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -commit 1916d000a86336213ffd6e9bd44ce873e8955895 -Author: Adrian Johnson -Date: Sat May 12 16:31:38 2012 +0930 - - Include substitute font name in system font cache - - Bug 49826 - - poppler/FontInfo.cc | 1 + - poppler/GlobalParams.cc | 58 - +++++++++++++++++++++++++++---------------------- - 2 files changed, 33 insertions(+), 26 deletions(-) - -commit b47d38e2ccd8563394df89765e277bde95730052 -Author: Adrian Johnson -Date: Thu May 24 18:24:48 2012 +0930 - - glib docs: fix typo - - glib/poppler-document.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 14a29dbff585cbe55247431a346c2ac3e12473fe -Author: Adrian Johnson -Date: Sun May 13 21:36:36 2012 +0930 - - add sustitute font name to GlobalParamsWin32 to fix compilation - - poppler/GlobalParamsWin.cc | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -commit 7436b2c8a853f5121eb7dd13168ab997f1cf7d80 -Author: Adrian Johnson -Date: Sat May 12 16:31:38 2012 +0930 - - Include substitute font name in system font cache - - Bug 49826 - - poppler/FontInfo.cc | 1 + - poppler/GlobalParams.cc | 58 - +++++++++++++++++++++++++++---------------------- - 2 files changed, 33 insertions(+), 26 deletions(-) - -commit 1c6e84555572a6bf3a2e3fbe9a54b40f11c122ad -Author: Fabio D'Urso -Date: Fri May 18 16:22:46 2012 +0200 - - qt4: Make TextAnnotation ctor public - - qt4/src/poppler-annotation.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit fe28614e7aab6e029f4b420353b67a7eea24de36 -Author: Fabio D'Urso -Date: Fri May 18 16:22:46 2012 +0200 - - qt4: Make TextAnnotation ctor public - - qt4/src/poppler-annotation.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 8e504bf2543621973fdaddbd29055ce435540146 -Author: Ville Skyttä -Date: Wed May 16 23:49:01 2012 +0300 - - pdfseparate.1: Syntax fixes. - - utils/pdfseparate.1 | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit 918456372548810c9efbf0533fa155034dd081f2 -Author: Ville Skyttä -Date: Wed May 16 23:49:01 2012 +0300 - - pdfseparate.1: Syntax fixes. - - utils/pdfseparate.1 | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit 892e486addcbcad619613c7be1ca692a0d36d6e5 -Author: Albert Astals Cid -Date: Mon May 21 20:28:42 2012 +0200 - - Compile++ - - cmake/modules/FindGTK.cmake | 8 ++++---- - glib/demo/CMakeLists.txt | 6 +++--- - test/CMakeLists.txt | 6 +++--- - 3 files changed, 10 insertions(+), 10 deletions(-) - -commit 794e89ed41d03997778fc4c59b7f1ba557b5e6b7 -Author: Albert Astals Cid -Date: Mon May 21 20:18:42 2012 +0200 - - Compile - - glib/CMakeLists.txt | 2 ++ - 1 file changed, 2 insertions(+) - -commit 78e6c9905a52c0cd4bfc1e56874f50689f04a1c6 -Author: Carlos Garcia Campos -Date: Sun May 20 12:11:27 2012 +0200 - - glib-demo: Make text characters list fill and expand in text demo - - glib/demo/text.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 610eb24426d9b36ac7da40a2fceb3dbeeec19a5c -Author: Carlos Garcia Campos -Date: Sun May 20 12:08:09 2012 +0200 - - glib-demo: Add a button to remove annots from the annot view - - glib/demo/annots.c | 48 +++++++++++++++++++++++++++++++++++++++++------- - 1 file changed, 41 insertions(+), 7 deletions(-) - -commit 11a3093e093319e88f14af0ab6c15009104d17ee -Author: Carlos Garcia Campos -Date: Sun May 20 11:22:49 2012 +0200 - - glib: Add poppler_page_remove_annot() - - https://bugs.freedesktop.org/show_bug.cgi?id=40473 - - glib/poppler-page.cc | 19 +++++++++++++++++++ - glib/poppler-page.h | 2 ++ - glib/reference/poppler-sections.txt | 1 + - 3 files changed, 22 insertions(+) - -commit 0dd157ae7f19cd91ea425a607b968f08addc3a40 -Author: Carlos Garcia Campos -Date: Sun May 20 10:37:47 2012 +0200 - - glib: Take a reference of the core annotation when creating a - PopplerAnnot - - This way if the annotation is removed from the page, the core - annotation - object is not destroyed. Also, a new PopplerAnnot that is never - added to - a page doesn't leak the core annotation anymore. - - glib/poppler-annot.cc | 53 - +++++++++++++++++++++------------------------------ - 1 file changed, 22 insertions(+), 31 deletions(-) - -commit f818b842f54d6860920b39778228e8b247b4e761 -Author: Carlos Garcia Campos -Date: Sat May 19 12:32:33 2012 +0200 - - glib-demo: Fix runtime warning - - glib/demo/selections.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit a24e326425e198eeb70c4d9205bb7a0a3a9db297 -Author: Carlos Garcia Campos -Date: Sat May 19 12:09:45 2012 +0200 - - gtk-tests: Port to GTK+ 3.0 - - configure.ac | 4 +- - glib/demo/annots.c | 74 +++++++------- - glib/demo/attachments.c | 4 +- - glib/demo/find.c | 4 +- - glib/demo/fonts.c | 4 +- - glib/demo/forms.c | 64 ++++++------ - glib/demo/images.c | 21 ++-- - glib/demo/info.cc | 67 ++++++------ - glib/demo/layers.c | 22 ++-- - glib/demo/links.c | 6 +- - glib/demo/main.c | 31 ++---- - glib/demo/outline.c | 2 +- - glib/demo/page.c | 23 ++--- - glib/demo/print.c | 14 +-- - glib/demo/render.c | 263 - ++++++++++++++---------------------------------- - glib/demo/selections.c | 77 ++++++-------- - glib/demo/text.c | 22 ++-- - glib/demo/transitions.c | 4 +- - glib/demo/utils.c | 101 +++++++++---------- - glib/demo/utils.h | 6 +- - test/gtk-test.cc | 48 +++++---- - 21 files changed, 350 insertions(+), 511 deletions(-) - -commit 9f7d919e68a26bb7dd809986d8394fe20b750bd0 -Author: Anthony Wesley -Date: Thu May 17 19:54:47 2012 +0200 - - Fix logic on SplashBitmap::writeImgFile - - splash/SplashBitmap.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 87093d1250807f660042295747a012032f84c034 -Author: Anthony Wesley -Date: Thu May 17 19:54:47 2012 +0200 - - Fix logic on SplashBitmap::writeImgFile - - splash/SplashBitmap.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 7e7997e12faccf4c0513811b324a2fd0fa960a96 -Author: Igor Slepchin -Date: Tue May 15 23:16:27 2012 +0200 - - Determine if font is bold or italic based on FontDescriptor. - - Bug #49758 - - utils/HtmlFonts.cc | 24 ++++++++++++++++++------ - utils/HtmlFonts.h | 3 ++- - utils/HtmlOutputDev.cc | 4 +--- - 3 files changed, 21 insertions(+), 10 deletions(-) - -commit 3a249aa8ad5e9f7511bcafd0416ce51c7efe5f4d -Author: Igor Slepchin -Date: Tue May 15 23:16:27 2012 +0200 - - Determine if font is bold or italic based on FontDescriptor. - - Bug #49758 - - utils/HtmlFonts.cc | 24 ++++++++++++++++++------ - utils/HtmlFonts.h | 3 ++- - utils/HtmlOutputDev.cc | 4 +--- - 3 files changed, 21 insertions(+), 10 deletions(-) - -commit ff2c251dbaef9b964af48f51ebb517626ac3145c -Author: Carlos Garcia Campos -Date: Sun May 13 20:13:32 2012 +0200 - - glib-demo: Use poppler_document_new_from_gfile to load the given uri - - glib/demo/main.c | 9 ++------- - 1 file changed, 2 insertions(+), 7 deletions(-) - -commit a7629331ab4ba5b256213af1f1b2954a49953c34 -Author: Carlos Garcia Campos -Date: Sun May 13 20:13:03 2012 +0200 - - glib: Add poppler_document_new_from_gfile - - glib/poppler-document.cc | 46 - +++++++++++++++++++++++++++++++++++++ - glib/poppler-document.h | 4 ++++ - glib/reference/poppler-sections.txt | 1 + - 3 files changed, 51 insertions(+) - -commit 95277b1f481e274ab0ce22ffb44b40437bffa3c8 -Author: Carlos Garcia Campos -Date: Sun May 13 20:11:12 2012 +0200 - - glib Add missing cancellable param in poppler_document_new_from_stream - doc - - glib/poppler-document.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 329bb1e2b4f4b58832847bcf805d19ac0fd5ef02 -Author: Carlos Garcia Campos -Date: Sun May 13 19:45:55 2012 +0200 - - glib: Make sure password is always converted to latin1 - - Remove the utf8 validation since glib API is supposed to always - receive - utf8 strings. - - glib/poppler-document.cc | 38 +++++++++++++++++++------------------- - 1 file changed, 19 insertions(+), 19 deletions(-) - -commit c4bf7b162028a2f9ffcd2baba2759bdb14fae51f -Author: Carlos Garcia Campos -Date: Sun May 13 19:45:55 2012 +0200 - - glib: Make sure password is always converted to latin1 - - Remove the utf8 validation since glib API is supposed to always - receive - utf8 strings. - - glib/poppler-document.cc | 43 ++++++++++++++++++++----------------------- - 1 file changed, 20 insertions(+), 23 deletions(-) - -commit 7714b4e319c48ee915061a172208245ae7c4141b -Author: Carlos Garcia Campos -Date: Sun May 13 19:30:17 2012 +0200 - - glib: Fix memory leak when document fails to load - - glib/poppler-document.cc | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -commit 4d0786a97e061a752686968bd7976bdda01b1f84 -Author: Carlos Garcia Campos -Date: Sun May 13 19:30:17 2012 +0200 - - glib: Fix memory leak when document fails to load - - glib/poppler-document.cc | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -commit 1d1c8175c57ebe6518f4252ab92a20286b7d4c6f -Author: Carlos Garcia Campos -Date: Sun May 13 18:41:25 2012 +0200 - - glib: Add poppler_document_new_from_stream - - A PopplerInputStream has been added to handle GMemoryInputStream and - GLocalFileInputStream, since we don't want to cache the contents in - those cases. A PopplerCachedFileLoader has been added to handle all - other cases. - - configure.ac | 10 +-- - glib/Makefile.am | 4 + - glib/poppler-cached-file-loader.cc | 108 +++++++++++++++++++++++++++ - glib/poppler-cached-file-loader.h | 44 +++++++++++ - glib/poppler-document.cc | 69 ++++++++++++++++++ - glib/poppler-document.h | 6 ++ - glib/poppler-input-stream.cc | 141 - ++++++++++++++++++++++++++++++++++++ - glib/poppler-input-stream.h | 74 +++++++++++++++++++ - glib/reference/poppler-docs.sgml | 4 + - glib/reference/poppler-sections.txt | 1 + - poppler-glib-uninstalled.pc.in | 2 +- - poppler-glib.pc.in | 2 +- - 12 files changed, 458 insertions(+), 7 deletions(-) - -commit 13d2aa303eb1fd900f1045efec14af8002477b02 -Author: Thomas Freitag -Date: Sun May 13 17:25:15 2012 +0200 - - remove unnecesary transparency group handling in splash - - Bug #13487 - - poppler/Gfx.cc | 64 - +++++++++++++++++++++++++++++++++++++++++++++- - poppler/Gfx.h | 4 ++- - poppler/GfxState.cc | 4 ++- - poppler/OutputDev.h | 1 + - poppler/SplashOutputDev.cc | 11 ++++++++ - poppler/SplashOutputDev.h | 1 + - 6 files changed, 82 insertions(+), 3 deletions(-) - -commit b477443e8a4c52500529aaf3be76f01a61e85f28 -Author: Thomas Freitag -Date: Sun May 13 17:25:15 2012 +0200 - - remove unnecesary transparency group handling in splash - - Bug #13487 - - poppler/Gfx.cc | 64 - +++++++++++++++++++++++++++++++++++++++++++++- - poppler/Gfx.h | 4 ++- - poppler/GfxState.cc | 4 ++- - poppler/OutputDev.h | 1 + - poppler/SplashOutputDev.cc | 11 ++++++++ - poppler/SplashOutputDev.h | 1 + - 6 files changed, 82 insertions(+), 3 deletions(-) - -commit a76867003a7bff5ab03016156c75b4c928788d50 -Author: Albert Astals Cid -Date: Sun May 13 13:10:40 2012 +0200 - - Distribute cmake/modules/FindLCMS2.cmake - - Bug #49818 - - Makefile.am | 1 + - 1 file changed, 1 insertion(+) - -commit 8f040dec2ce2eae24dd1eb15900d4d284e4b3848 -Author: Albert Astals Cid -Date: Sun May 13 13:10:40 2012 +0200 - - Distribute cmake/modules/FindLCMS2.cmake - - Bug #49818 - - Makefile.am | 1 + - 1 file changed, 1 insertion(+) - -commit 7f47630a7fc19214cd48dbd164ecf577ba35cc46 -Author: Albert Astals Cid -Date: Thu May 10 23:12:04 2012 +0200 - - Compile with the unsupported ENABLE_PLUGINS defined - - poppler/GlobalParams.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 22264cb230fc5902aea14ab43fa013a8ebdbf812 -Author: Albert Astals Cid -Date: Thu May 10 23:04:33 2012 +0200 - - Make it compile - - Sorry :-/ - - goo/gfile.cc | 82 - -------------------------------------------------- - goo/gfile.h | 4 --- - poppler/GlobalParams.h | 2 +- - 3 files changed, 1 insertion(+), 87 deletions(-) - -commit 44bf99a7b8683a077f2a5db50541099c109aa069 -Author: Albert Astals Cid -Date: Thu May 10 22:59:18 2012 +0200 - - Kill the concept of "base dir" - - We are a library so having a "common configuration folder" does - not really - make much sense at a library level, and even less if it's called - .xpdf :D - - Fixes bug 49448 - - goo/gfile.cc | 46 - ---------------------------------------------- - goo/gfile.h | 3 --- - poppler/GfxState.cc | 16 ++-------------- - poppler/GlobalParams.cc | 21 --------------------- - poppler/GlobalParams.h | 3 --- - test/perf-test.cc | 1 - - 6 files changed, 2 insertions(+), 88 deletions(-) - -commit bb091e38a1c0248ba24b0711b4afc0b0524cce10 -Author: Albert Astals Cid -Date: Thu May 10 22:38:41 2012 +0200 - - Make it be something closer to real english - - utils/pdftohtml.1 | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 67f3c3e0d03ec63df7c6028cbd626e384d231c2b -Author: Fabio D'Urso -Date: Wed May 9 16:48:15 2012 +0200 - - GooString formatting: add support for uppercase hexadecimal + Use - it in Annot::layoutText - - goo/GooString.cc | 61 - ++++++++++++++++++++++++++++++++++++++++++++++---------- - goo/GooString.h | 17 ++++++++-------- - poppler/Annot.cc | 2 +- - 3 files changed, 61 insertions(+), 19 deletions(-) - -commit 1f7f8a78409e6bcc90bd32ea2aaa75ed3a7b6218 -Author: Fabio D'Urso -Date: Wed May 9 16:18:05 2012 +0200 - - Use error() instead of fprintf(stderr, ...) in Annot::layoutText - - poppler/Annot.cc | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -commit a7a2e72f9ba43816a81278e0565d31807ac5ceb5 -Author: Albert Astals Cid -Date: Thu May 10 22:31:24 2012 +0200 - - More gs cleanup and forgot the (C) on modification - - goo/gfile.cc | 2 +- - goo/gfile.h | 2 +- - utils/pdftohtml.cc | 4 ---- - 3 files changed, 2 insertions(+), 6 deletions(-) - -commit ad36d22d1f11339be90403534b921cce120fdbad -Author: Albert Astals Cid -Date: Thu May 10 22:24:40 2012 +0200 - - pdftohtml: Remove the option to invoke gs - - goo/gfile.cc | 8 --- - goo/gfile.h | 3 -- - utils/pdftohtml.1 | 8 +-- - utils/pdftohtml.cc | 149 - ++++++++++++----------------------------------------- - 4 files changed, 36 insertions(+), 132 deletions(-) - -commit 4114c928fa2560937e02319f57937f1c267a9817 -Author: Albert Astals Cid -Date: Thu May 10 21:09:14 2012 +0200 - - 0.20.0 - - CMakeLists.txt | 6 +++--- - NEWS | 16 ++++++++++++++++ - configure.ac | 4 ++-- - cpp/Doxyfile | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/Doxyfile | 2 +- - 6 files changed, 24 insertions(+), 8 deletions(-) - -commit df05d084cb26807c39695280cd8ea52d13aa1255 -Author: Albert Astals Cid -Date: Thu May 10 20:54:13 2012 +0200 - - Bring back the begin/endMarkedContent virtuals - - For those evil people that keep using poppler internals - - poppler/Gfx.cc | 8 ++++++++ - poppler/OutputDev.cc | 8 +++++++- - poppler/OutputDev.h | 4 +++- - 3 files changed, 18 insertions(+), 2 deletions(-) - -commit b6159fea4a13ecfd1c38b3a666a797c5147dd952 -Author: William Bader -Date: Thu May 10 20:02:19 2012 +0200 - - splash uses cmykTransferC for M, Y and K in two places - - splash/Splash.cc | 14 +++++++------- - 1 file changed, 7 insertions(+), 7 deletions(-) - -commit c2146219d555cab277906daefd2589f9056f536c -Author: Peter Breitenlohner -Date: Thu May 10 13:26:18 2012 +0200 - - Add missing function parameter - - poppler/GlobalParams.cc | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -commit 753f6ab9347f972223ec21b7ed4b4f7ebed3d420 -Author: Albert Astals Cid -Date: Thu May 3 15:29:57 2012 -0700 - - Compile with ENABLE_PLUGINS defined - - poppler/SecurityHandler.cc | 4 ++-- - poppler/SecurityHandler.h | 16 ++++++++++++++++ - poppler/XpdfPluginAPI.cc | 35 +---------------------------------- - poppler/XpdfPluginAPI.h | 34 +++++++++++++++------------------- - 4 files changed, 34 insertions(+), 55 deletions(-) - -commit 23df93aaf495428b580bafd0fd1f41515828b08d -Author: Albert Astals Cid -Date: Thu May 3 14:50:09 2012 -0700 - - We don't support the keyBinding concept - - remove wrong merge - - poppler/GlobalParams.cc | 1 - - 1 file changed, 1 deletion(-) - -commit e55838b41959acc311e9b00dc390c9816a9afac2 -Author: Jason -Date: Wed May 2 19:35:26 2012 +0200 - - glib: Use delete[] to free array allocated with new[] - - https://bugs.freedesktop.org/show_bug.cgi?id=48447 - - glib/poppler-document.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit dec873463b06bfe76ff48e36282877e6ac11b59d -Author: Albert Astals Cid -Date: Sun Apr 29 23:36:57 2012 +0200 - - Add the objUint type - - poppler/Object.cc | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -commit 50c0b294d08114920a5db711876e20d991f474a6 -Author: Albert Astals Cid -Date: Sun Apr 29 22:33:09 2012 +0200 - - Make sure the index to dcHuffTables and acHuffTables is in bounds - - Found in a fuzzed pdf sent by Mateusz "j00ru" Jurczyk and Gynvael - Coldwind - - poppler/Stream.cc | 3 +++ - 1 file changed, 3 insertions(+) - -commit 9e36206465289c96cb189c648a6f5121714c647b -Author: Albert Astals Cid -Date: Sun Apr 29 22:18:12 2012 +0200 - - include for memcpy - - splash/SplashBitmap.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 931051fe0bb445545355027d999515bc3d4b32ef -Author: Albert Astals Cid -Date: Sun Apr 29 22:07:34 2012 +0200 - - Make sure the index for refLine is in bounds - - Found in a fuzzed pdf sent by Mateusz "j00ru" Jurczyk and Gynvael - Coldwind - - poppler/Stream.cc | 10 ++++++---- - 1 file changed, 6 insertions(+), 4 deletions(-) - -commit 53b9c2e2806320d0d0e35134b75da5da72514742 -Author: Albert Astals Cid -Date: Sun Apr 29 22:00:18 2012 +0200 - - Just call getNum if isNum is true - - Found in a fuzzed pdf sent by Mateusz "j00ru" Jurczyk and Gynvael - Coldwind - - poppler/Link.cc | 17 ++++++++++------- - 1 file changed, 10 insertions(+), 7 deletions(-) - -commit da8d858c4fc610718a5f14b14dc3a4a11564a73d -Author: Albert Astals Cid -Date: Sun Apr 29 20:28:37 2012 +0200 - - Do not access args[-1] - - Found in a fuzzed pdf sent by Mateusz "j00ru" Jurczyk and Gynvael - Coldwind - - poppler/Gfx.cc | 10 ++++++---- - 1 file changed, 6 insertions(+), 4 deletions(-) - -commit 934b1a7cd502fe5537a350cdfc650989992693f7 -Author: Albert Astals Cid -Date: Sun Apr 29 19:59:15 2012 +0200 - - Do not access invalid lookup indexes - - Found by Mateusz "j00ru" Jurczyk and Gynvael Coldwind - - poppler/GfxState.cc | 13 ++++++++++--- - 1 file changed, 10 insertions(+), 3 deletions(-) - -commit e80fd082914fe29fad7e60c321a747eb8634e413 -Author: Albert Astals Cid -Date: Sun Apr 29 18:27:41 2012 +0200 - - [qt4] the qualified name may be unicode encoded - - qt4/src/poppler-form.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 251be1787a2a003862691f5a825eb3468eceb6a2 -Author: Albert Astals Cid -Date: Sun Apr 29 18:26:42 2012 +0200 - - Fix getFullyQualifiedName with unicode field names - - Based on a patch from Mark Riedesel. - Bug #49256 - - poppler/Form.cc | 71 - +++++++++++++++++++++++++++++++++++++++++++++++++-------- - 1 file changed, 61 insertions(+), 10 deletions(-) - -commit be41f1c7905d695d17e19ced83a1018531d00199 -Author: Albert Astals Cid -Date: Sun Apr 29 16:02:45 2012 +0200 - - SplashOutputDev: Fix rendering of knockout groups - - Bug #12185 - - poppler/SplashOutputDev.cc | 31 ++++++++++++++++++++++++++++--- - splash/Splash.cc | 21 ++++++++++++++++++--- - splash/Splash.h | 6 ++++-- - splash/SplashBitmap.cc | 22 +++++++++++++++++++++- - splash/SplashBitmap.h | 2 ++ - 5 files changed, 73 insertions(+), 9 deletions(-) - -commit 800cb9ec7189a539d64b99fa181cd4126496c1ec -Author: Thomas Freitag -Date: Sat Apr 28 17:15:30 2012 +0200 - - Reconstruct xref table if xref needed but missing - - Bug #40719 - - poppler/XRef.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 410822d7013ce1f61325afdb61d75ea64666755e -Author: Albert Astals Cid -Date: Fri Apr 27 01:10:22 2012 +0200 - - 0.19.4 - - CMakeLists.txt | 4 ++-- - NEWS | 17 +++++++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/Doxyfile | 2 +- - 6 files changed, 23 insertions(+), 6 deletions(-) - -commit b1d5c6c0a20a4a24b42de66db23e0f63d10ca52d -Author: Fabio D'Urso -Date: Tue Apr 24 21:00:11 2012 +0200 - - Output XRef stream when incrementally updating if there's already - a XRef stream - - poppler/PDFDoc.cc | 45 ++++++++++++++++++++++++++++++-- - poppler/XRef.cc | 76 - +++++++++++++++++++++++++++++++++++++++++++++++-------- - poppler/XRef.h | 34 +++++++++++++++++++++++++ - 3 files changed, 142 insertions(+), 13 deletions(-) - -commit 2ecf3b2e49a4c35e995d25016b810592260edfeb -Author: Fabio D'Urso -Date: Tue Apr 24 18:10:15 2012 +0200 - - Refactoring of XRef table write support (in preparation for XRef - stream write support) - - - Trailer dictionary creation now lives in its own function - "createTrailerDict" - (that will be used by XRef stream creation too) - - writeXRefTableTrailer (WAS writeTrailer) now takes care of writing - the XRef - table too (previously it was demanded to the caller) - - poppler/PDFDoc.cc | 61 - +++++++++++++++++++++++++++---------------------------- - poppler/PDFDoc.h | 14 ++++++++++--- - poppler/XRef.cc | 2 +- - poppler/XRef.h | 2 +- - utils/pdfunite.cc | 10 +++++---- - 5 files changed, 49 insertions(+), 40 deletions(-) - -commit cf7a20adbd15f901d414ce06825459c33eeef3f5 -Author: Thomas Freitag -Date: Wed Apr 25 18:51:23 2012 +0200 - - Fix slow rendering of pdf with a lot of image masks in pattern - colorspace - - Makes it around 8 times faster - - poppler/CairoOutputDev.cc | 6 +++--- - poppler/CairoOutputDev.h | 6 +++--- - poppler/Gfx.cc | 4 ++-- - poppler/OutputDev.cc | 5 +++-- - poppler/OutputDev.h | 6 +++--- - poppler/PSOutputDev.cc | 4 ++-- - poppler/PSOutputDev.h | 4 ++-- - poppler/SplashOutputDev.cc | 35 +++++++++++------------------------ - poppler/SplashOutputDev.h | 4 ++-- - 9 files changed, 31 insertions(+), 43 deletions(-) - -commit 26fd142a3608283fd41e07b54067a51a9db76e93 -Author: Fabio D'Urso -Date: Sat Apr 21 18:16:46 2012 +0200 - - Preserve z-index after annotation removal - - poppler/Annot.cc | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -commit 7b10014c1fe9ef1cba57fd6b01c63129ac31386a -Author: Fabio D'Urso -Date: Sat Apr 21 17:53:22 2012 +0200 - - Do not remove appearance stream if it's shared with other annotations - - poppler/Annot.cc | 78 - +++++++++++++++++++++++++++++++++++++++++++++++++++++--- - poppler/Annot.h | 6 +++++ - 2 files changed, 80 insertions(+), 4 deletions(-) - -commit 7684c325929493ad9de01a891de0aef197e176dd -Author: Fabio D'Urso -Date: Sat Apr 21 20:26:49 2012 +0200 - - AnnotText: Always force 24x24 size with custom stamps, not only on - first rendering - - poppler/Annot.cc | 21 ++++++++++++--------- - 1 file changed, 12 insertions(+), 9 deletions(-) - -commit 44cd46a6e04a87bd702dab4a662042f69f16c4ad -Author: Albert Astals Cid -Date: Mon Apr 23 20:02:55 2012 +0200 - - Do not try to access nPatches - 1 if nPatches is 0 - - Found by Mateusz "j00ru" Jurczyk and Gynvael Coldwind - - poppler/GfxState.cc | 20 +++++++++++++++++++- - 1 file changed, 19 insertions(+), 1 deletion(-) - -commit a92f87b83e3c6c9078508c644aa09f4f2b14e9cc -Author: Albert Astals Cid -Date: Mon Apr 23 00:06:18 2012 +0200 - - Do not complain if the entry is missing - - Since we are actually looking for non existing entries :D - - poppler/XRef.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 114e113e3278d02baaffd6c0da7fda266283c176 -Author: Fabio D'Urso -Date: Sat Apr 21 21:08:55 2012 +0200 - - Do not allocate XRef entries whose generation number is 65535 - - poppler/XRef.cc | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -commit ad8785b053aa115b593b2f20073e2989d59a77c9 -Author: Albert Astals Cid -Date: Wed Apr 18 22:51:33 2012 +0200 - - Remove duplicate call - - utils/pdftohtml.cc | 1 - - 1 file changed, 1 deletion(-) - -commit 80d4e1843c56801508f476fed64ecb3201ba18c8 -Author: Fabio D'Urso -Date: Tue Apr 17 20:25:57 2012 +0200 - - Do not draw border in AnnotText::draw - - poppler/Annot.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit a1e3d868ccd7fb84d52d94754d8681c97119fb6e -Author: Fabio D'Urso -Date: Fri Mar 30 21:52:04 2012 +0200 - - Save/restore gfx state when drawing annot border - - poppler/Gfx.cc | 3 +++ - 1 file changed, 3 insertions(+) - -commit 7fbeaac5c0d0240564add6c252c1ba7c14639d98 -Author: Albert Astals Cid -Date: Tue Apr 17 20:36:51 2012 +0200 - - Be sure we are checking a non free entry - - poppler/XRef.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit d1254c7e8e995302542093968a0c2967f3c0b5ff -Author: Thomas Freitag -Date: Tue Apr 17 20:36:03 2012 +0200 - - Do not complain if the entry does not exist - - XRef::getNumEntry is only trying to find which entry a given stream - pos belongs so no need to cry if the entry is not there - Bug 48679 - - poppler/XRef.cc | 10 ++++++---- - poppler/XRef.h | 2 +- - 2 files changed, 7 insertions(+), 5 deletions(-) - -commit bcbe9497a4fa50b41852abd538ad139c7b6693e5 -Author: suzuki toshiya -Date: Tue Apr 17 20:21:58 2012 +0200 - - Copying graphics library CFLAGS to cpp frontend Makefile.am. - - Because poppler-image.cpp includes PNGWriter.h, JpegWriter.h, - TiffWriter.h, - CFLAGS to include libpng, libjpeg and libtiff headers are expected. - - cpp/Makefile.am | 22 +++++++++++++++++++++- - 1 file changed, 21 insertions(+), 1 deletion(-) - -commit 44c9df8277877ee1021317a3b6c253f80310f826 -Author: suzuki toshiya -Date: Tue Apr 17 20:21:00 2012 +0200 - - Do not clear FREETYPE_CFLAGS, FREETYPE_LIBS before PKG_CHECK_MODULES() - - Although configure --help says as if environmental variables - FREETYPE_CFLAGS and FREETYPE_LIBS will overwrite the values obtained - by pkg-config. But it is not. These help messages are automatically - given - by pkg-config macro (so I guess no poppler developer designed so - intentionally). - - In current configure, FREETYPE_CFLAGS, FREETYPE_LIBS are cleared - before - PKG_CONFIG_MODULES(), like: - - dnl Check for freetype headers - FREETYPE_LIBS= - FREETYPE_CFLAGS= - - PKG_CHECK_MODULES(FREETYPE, freetype2, - [freetype_pkgconfig=yes], - [freetype_pkgconfig=no]) - - if test "x$freetype_pkgconfig" = "xyes"; then - - AC_DEFINE(HAVE_FREETYPE_H, 1, [Have FreeType2 include - files]) - - else - - AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no) - [...] - - Checking the history why these values are cleared, it seems that - the initial revision of poppler did not use pkg-config to detect - FREETYPE_CFLAGS, _LIBS. At that time, only freetype-config is used. - In later, when PKG_CHECK_MODULES is introduced, it was accidentally - introduced AFTER the clearning of FREETYPE_CFLAGS,_LIBS. As a result, - the inconsistency between "configure --help" and what configure does - really. I propose to move the clearance of FREETYPE_CFLAGS,_LIBS - just before AC_PATH_PROG, to make PKG_CHECK_MODULES catch the - environmental - values. - - configure.ac | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -commit 9e0f0368e543df46b40cbd7bed6fdc1abf846e7d -Author: suzuki toshiya -Date: Tue Apr 17 20:19:41 2012 +0200 - - Do not append "-ansi" to CXXFLAG, if "-std=XXX" is already specified. - - SplashOutputDev.cc uses isfinite() function (defined by math.h). - isfinite() was standardized in C99, and imported to C++0x in later. - - In QNX header file system, isfinite() is disabled by default, - the definition of __STDC_VERSION__ > 199901 is required to enable it. - In the case of GCC, "-std=c99" (for C) or "-std=gnu++0x" (for C++) - is expected. - - But, current configure of poppler appends "-ansi" flag for CXXFLAGS, - if the compiler is known to be GNU. "-ansi" is C89 or C++98, - so isfinite() - is unavailable. I propose a patch NOT to "-ansi" flag, if CXXFLAGS - includes "-std=XXX" already. - - configure.ac | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -commit 2f1e7ef252b8d1f7ee6004825c2926f0f5e181a5 -Author: Albert Astals Cid -Date: Thu Apr 12 23:11:41 2012 +0200 - - Do not crash in broken documents - - They might trigger an xref reconstruct and then i could not be in - bounds anymore - Crash found by Joel Voss of Leviathan Security Group - - poppler/XRef.cc | 11 +++++++++++ - 1 file changed, 11 insertions(+) - -commit 19fb9caecb1b265a8b8651e9bcf4b779f593fefd -Author: Albert Astals Cid -Date: Thu Apr 12 22:24:50 2012 +0200 - - Fix crash when the destination file does not exist - - Issue found by Joel Voss of Leviathan Security Group - - utils/HtmlOutputDev.cc | 18 ++++++++++-------- - 1 file changed, 10 insertions(+), 8 deletions(-) - -commit fa4848eae370437ab1b9863124e9a340830f66c7 -Author: Adrian Johnson -Date: Fri Apr 13 22:11:01 2012 +0930 - - man pages: add missing section heading - - utils/pdftotext.1 | 1 + - 1 file changed, 1 insertion(+) - -commit 08a14aa37b177bb4586869857ae678cb4bcd4039 -Author: Albert Astals Cid -Date: Thu Apr 12 21:52:30 2012 +0200 - - 0.19.3 - - CMakeLists.txt | 4 ++-- - NEWS | 26 +++++++++++++++++++++++++- - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/CMakeLists.txt | 2 +- - qt4/src/Doxyfile | 2 +- - qt4/src/Makefile.am | 2 +- - 8 files changed, 33 insertions(+), 9 deletions(-) - -commit 52227b59d1fa2a2029bfff2f8a167efd81faebbb -Author: Albert Astals Cid -Date: Thu Apr 12 20:52:55 2012 +0200 - - Update (C) - - poppler/CairoFontEngine.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 40cb3f27f4dcad4fe8c48f0b638eac7913fc3722 -Author: Albert Astals Cid -Date: Thu Apr 12 20:50:38 2012 +0200 - - Do not pass those params to createGfx since they aren't used - - glib/poppler-page.cc | 4 ++-- - poppler/Page.cc | 9 +++------ - poppler/Page.h | 5 ++--- - 3 files changed, 7 insertions(+), 11 deletions(-) - -commit 9a10d31fca7f060f24bae9efe15662f02a9684ca -Author: Fabio D'Urso -Date: Thu Apr 12 20:31:23 2012 +0200 - - qt4: Remove unimplemented revision setters from public API - - qt4/src/poppler-annotation-private.h | 2 ++ - qt4/src/poppler-annotation.cc | 62 - ++++++++---------------------------- - qt4/src/poppler-annotation.h | 13 -------- - 3 files changed, 16 insertions(+), 61 deletions(-) - -commit 0531329aeb8783c48f056929e6e81cebda33500f -Author: Albert Astals Cid -Date: Thu Apr 12 20:07:13 2012 +0200 - - [qt4] Mark the dummy stuff as deprecated - - qt4/src/poppler-annotation.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 67b7b2bdd0943680437d96349c3415aa40082cbb -Author: Albert Astals Cid -Date: Thu Apr 12 20:06:52 2012 +0200 - - [qt4] initialize the dummy members here too - - qt4/src/poppler-annotation.cc | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -commit bf171382afb6b50284c3855e3a1815a15ec34366 -Author: Albert Astals Cid -Date: Thu Apr 12 19:24:42 2012 +0200 - - Add since markers - - qt4/src/poppler-annotation.h | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -commit e36fd775394ee752c0f62f789359c72b52094975 -Author: Albert Astals Cid -Date: Thu Apr 12 18:58:29 2012 +0200 - - Remove unneeded forward declaration - - qt4/src/poppler-qt4.h | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -commit c1aa4a8c0aa9d46757e3849776acac42731e02d1 -Author: Fabio D'Urso -Date: Thu Apr 12 00:39:33 2012 +0200 - - qt4: Annotation appearance invalidation - - Call Annot::invalidateAppearance every time the visual aspect - is changed - - qt4/src/poppler-annotation.cc | 34 ++++++++++++++++++++++++++++++++++ - 1 file changed, 34 insertions(+) - -commit 4338ae354c66e4df8d7d70a156517e27b3b80539 -Author: Fabio D'Urso -Date: Sun Mar 25 22:58:33 2012 +0200 - - qt4: Added HideAnnotations option to PSConverter - - qt4/src/poppler-ps-converter.cc | 23 ++++++++++++++++++++++- - qt4/src/poppler-qt4.h | 3 ++- - 2 files changed, 24 insertions(+), 2 deletions(-) - -commit e50993b3b47a759c93ccdeeaef289d6985b05bb1 -Author: Fabio D'Urso -Date: Thu Mar 22 19:58:12 2012 +0100 - - qt4: DOM annotation store - Black color is different than invalid - color - - qt4/src/poppler-annotation.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 4739a6a02097f110c37defdfa616351459902806 -Author: Fabio D'Urso -Date: Mon Mar 19 19:17:33 2012 +0100 - - qt4: Annotation removal - - qt4/src/poppler-annotation-private.h | 3 +++ - qt4/src/poppler-annotation.cc | 29 +++++++++++++++++++++++++++++ - qt4/src/poppler-page.cc | 5 +++++ - qt4/src/poppler-qt4.h | 8 ++++++++ - 4 files changed, 45 insertions(+) - -commit 25a64d69aaab61c8cf944107e649e19920244a2b -Author: Fabio D'Urso -Date: Tue Mar 20 01:46:07 2012 +0100 - - qt4: TextAnnotation write support + basic textFont getter - - Also makes inplaceText a synoym for contents - - qt4/src/poppler-annotation.cc | 159 - ++++++++++++++++++++++++++++++++---------- - 1 file changed, 124 insertions(+), 35 deletions(-) - -commit a31a8118ba07aa7f90c69130476fb7d86f8614ad -Author: Fabio D'Urso -Date: Sun Mar 11 23:57:51 2012 +0100 - - qt4: GeomAnnotation, InkAnnotation and CaretAnnotation write support - - qt4/src/poppler-annotation.cc | 103 - ++++++++++++++++++++++++++++++++++++++---- - qt4/src/poppler-annotation.h | 6 +-- - 2 files changed, 96 insertions(+), 13 deletions(-) - -commit e4052b52002447772e24571fd13f0f22fd2bfb16 -Author: Fabio D'Urso -Date: Sat Mar 10 17:48:56 2012 +0100 - - qt4: HighlightAnnotation and StampAnnotation write support - - qt4/src/poppler-annotation.cc | 96 - +++++++++++++++++++++++++++++++++++++++---- - qt4/src/poppler-annotation.h | 4 +- - 2 files changed, 91 insertions(+), 9 deletions(-) - -commit b5e948b6130cdb04387a8244179337c7904dcd03 -Author: Fabio D'Urso -Date: Wed Mar 14 17:44:50 2012 +0100 - - qt4: Annotation insertion and LineAnnotation support - - This patch adds Page::addAnnotation to insert new annotations in - a page. - The only annotation type that can be added is LineAnnotation. Support - for other - types will be added in the next patches. - - qt4/src/poppler-annotation-private.h | 12 ++ - qt4/src/poppler-annotation.cc | 297 - +++++++++++++++++++++++++++++++++-- - qt4/src/poppler-annotation.h | 4 +- - qt4/src/poppler-page.cc | 5 + - qt4/src/poppler-qt4.h | 9 ++ - 5 files changed, 316 insertions(+), 11 deletions(-) - -commit 20b4feec612448be8a800173ddadbf257657477e -Author: Fabio D'Urso -Date: Fri Mar 9 19:31:16 2012 +0100 - - qt4: Basic setters to edit annotations - - qt4/src/poppler-annotation-helper.h | 15 ++++ - qt4/src/poppler-annotation-private.h | 1 + - qt4/src/poppler-annotation.cc | 128 - ++++++++++++++++++++++++++++++++--- - 3 files changed, 135 insertions(+), 9 deletions(-) - -commit 0e8c35b59f0fba926b30c9a87823c92ae03bf116 -Author: Fabio D'Urso -Date: Fri Mar 9 01:04:28 2012 +0100 - - qt4: Changes to Annotation API (part 2/2) - - 1) Moved annotation data retrieval logic to getters for types of - annotations - that will be made editable in next patches. - Others (Link, FileAttachment, Sound, Movie and Screen) are still - entirely filled - at creation time. - - 2) TextAnnotation's callout points setter now takes an array, not just - individual points. - - 3) AnnotationPrivate::pdfObjectReference replaced with a getter - method that - directly queries the tied Annot object (if any) - - qt4/src/poppler-annotation-helper.h | 31 +- - qt4/src/poppler-annotation-private.h | 23 +- - qt4/src/poppler-annotation.cc | 1254 - +++++++++++++++++++++++++++++++--- - qt4/src/poppler-annotation.h | 58 +- - qt4/src/poppler-link.cc | 2 +- - qt4/src/poppler-page.cc | 778 +-------------------- - qt4/src/poppler-qt4.h | 4 +- - 7 files changed, 1217 insertions(+), 933 deletions(-) - -commit 73b91207649a81740183e2288809d3b84b52f595 -Author: Fabio D'Urso -Date: Wed Mar 7 17:05:50 2012 +0100 - - qt4: Changes to Annotation API (part 1/2) - - This is part 1/2 of a change in annotation API. It breaks both source - and binary - compatibility. - - Note that, even though DOM methods are partially modified by this - patch, their - output is 100% backward compatible. Therefore code relying only on - DOM methods - (i.e. AnnotationUtils methods) will keep working. - - 1) Style and Popup container classes - - Style and Popup (previously known as Window) properties are now - wrapped in - container classes. In both of them, private data is implicitly shared. - The old Window structure is removed, but an undocumented window - field is still - exported to make Okular 4.8.0 compile. It must not be used. - - 2) Revisions - - The Annotation::Revision structure was removed, because it added an - extra layer - of indirection that can be avoided. Now revision scope and type - are stored - directly in the target Annotation, and Annotation::revisions() - returns a list - of pointers to child annotations. - - 3) All constructors are temporarily made private - - This patch hides all constructors from user code. Subsequent - patches will - restore them in the same patch as their type-specific creation - support. - - 4) Minor fixes - - Popup size was incorrectly stored as an integer value, now - it's part of - a QRectF. - - Typo: LinkAnnotation::linkDestionation() --> linkDestination - - Dash array is now exported as QVector instead of - a marks/spaces - integer pair - - GeomAnnotation's geometricalPointWidth removed, because it - was never - referenced and it doesn't exist in PDF specs - - 5) AnnotationPrivate data is now explicitly shared - Annotation private data has been rearranged so that it's now - possible to - uniformly give ownership of all Annotation objects to the caller. - Previously Page::annotations() did leave ownership to user, but - Annotation::revisions() didn't. Now both of them give ownership - to user. - - qt4/src/poppler-annotation-private.h | 19 +- - qt4/src/poppler-annotation.cc | 1022 - ++++++++++++++++++++++++---------- - qt4/src/poppler-annotation.h | 292 +++++++--- - qt4/src/poppler-page.cc | 92 ++- - qt4/src/poppler-qt4.h | 6 + - 5 files changed, 997 insertions(+), 434 deletions(-) - -commit 7f0f080277d35f6f2e426ca2a3ff76c2856daeaf -Author: Adrian Johnson -Date: Tue Apr 10 00:08:49 2012 +0930 - - cairo: fix stroke pattern with transparency group - - Cairo copy path/append path with device offsets is broken. Use GfxPath - instead. - - Bug 48468 - - poppler/CairoOutputDev.cc | 15 ++++++--------- - poppler/CairoOutputDev.h | 4 ++-- - 2 files changed, 8 insertions(+), 11 deletions(-) - -commit 5ea305c3924cead302092378ab67300c3099afd9 -Author: Adrian Johnson -Date: Sun Apr 8 23:11:30 2012 +0930 - - cairo: only align stroke coords for horizontal and vertical lines - - Bug 48318 - - poppler/CairoOutputDev.cc | 80 - ++++++++++++++++++++++++++++++++++++----------- - poppler/CairoOutputDev.h | 2 +- - 2 files changed, 62 insertions(+), 20 deletions(-) - -commit 8414d8f621b8abb018e80f2255cfb511a1e558d4 -Author: Adrian Johnson -Date: Mon Apr 9 12:08:20 2012 +0930 - - cairo: ensure 0 width lines with stroke_adjust are aligned - - Previously the code path for 0 width lines ignored the stroke_adjust - setting. Rearrange the code so the code path for stroke_adjust == TRUE - is performed first (this will also set 0 width lines to 1 pixel wide). - - poppler/CairoOutputDev.cc | 42 +++++++++++++++++++++--------------------- - 1 file changed, 21 insertions(+), 21 deletions(-) - -commit af1a84eb90656de68bb14f2c4ae4f813c51bc3a3 -Author: Adrian Johnson -Date: Mon Apr 9 17:17:29 2012 +0930 - - cairo: fix paintTransparencyGroup when both mask and fill opacity - are required - - Bug 48453 - - poppler/CairoOutputDev.cc | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -commit 46b3a70cae3b37cb4270a83afaddd6734442b752 -Author: Fabio D'Urso -Date: Mon Apr 9 19:32:24 2012 +0200 - - Caption text rendering in AnnotLine - - poppler/Annot.cc | 262 - ++++++++++++++++++++++++++++++++++++++----------------- - poppler/Annot.h | 2 + - 2 files changed, 183 insertions(+), 81 deletions(-) - -commit 855607828447ecec2c8444650d015e21bd17d2e2 -Author: Fabio D'Urso -Date: Mon Apr 9 16:45:50 2012 +0200 - - AnnotFreeText rendering improvements (auto word-wrap, quadding, - border style, font/border color) - - poppler/Annot.cc | 146 - +++++++++++++++++++++++++++++++++++++++++++------------ - poppler/Annot.h | 1 + - 2 files changed, 115 insertions(+), 32 deletions(-) - -commit 80f662162698c1ec27771d9cf5e2e6bc3d21c4df -Author: Ihar Filipau -Date: Thu Apr 12 00:19:26 2012 +0200 - - Fix the mask inversion - - utils/HtmlOutputDev.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 06591d848e53598973f7d5fddac50785a46e8027 -Author: Thomas Freitag -Date: Wed Apr 11 23:49:29 2012 +0200 - - Fix Splash CMYK merge error - - Mail says - ****** - Hi, - - playing around with the attached PDF to get a better CMYK support for - the blend mode soft light, I encountered that I made a big mistake - during merge in the CMYK part of splash. I fixed that. The attached - patch also includes the small enhancement I made in soft light - routine. - ****** - - poppler/SplashOutputDev.cc | 9 +++++++++ - splash/Splash.cc | 2 +- - 2 files changed, 10 insertions(+), 1 deletion(-) - -commit 1f45afde6410f03c79fcf4b66d5834079879d38f -Author: Ihar Filipau -Date: Mon Apr 9 19:17:41 2012 +0200 - - Add producer and version to xml output - - utils/HtmlOutputDev.cc | 2 +- - utils/pdf2xml.dtd | 4 ++++ - 2 files changed, 5 insertions(+), 1 deletion(-) - -commit cef6ac0ebbf8451beaadb3ddb6c991bbb7239432 -Author: Fabio D'Urso -Date: Sun Apr 8 23:15:15 2012 +0200 - - FIX: Do not append a NUL character to Unicode page labels - - poppler/PageLabelInfo.cc | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -commit 3d4985f14e54ddcc64ea654b23e931b7e6acfbdc -Author: Fabio D'Urso -Date: Sat Apr 7 11:28:36 2012 +0200 - - Do not trust the rect of AnnotTextMarkup when drawing - - poppler/Annot.cc | 43 +++++++++++++++++++++++++++++-------------- - 1 file changed, 29 insertions(+), 14 deletions(-) - -commit c6296cd8c1ca398beac20f1e88c87b9082386247 -Author: Fabio D'Urso -Date: Sat Apr 7 00:30:54 2012 +0200 - - Do not trust the rect of AnnotLine, AnnotPolygon and AnnotInk - when drawing - - poppler/Annot.cc | 126 - ++++++++++++++++++++++++++++++++++++++++++++----------- - poppler/Annot.h | 27 ++++++++++++ - 2 files changed, 128 insertions(+), 25 deletions(-) - -commit 503620ae74d719da52e3374725e490c62f7be7a3 -Author: Fabio D'Urso -Date: Thu Mar 29 19:07:05 2012 +0200 - - Do not recreate Annots when writing to PS, Export poppler-generated - Annot appearance resource dict - - 1) With previous code each Annot object was reconstructed from the - pdf object when - writing to PS, leading to the fact that writeDocSetup couldn't see the - generated appearance. - This patch makes writeDocSetup use the same Annots object returned by - Page::getAnnots. - - 2) This patch also enables each Annot subtype to control the exported - resources. AnnotFreeText uses this new method to export font - information. - - 3) Comment fixed in Page.h: Page::getAnnots does *not* give away - ownership, in - fact the returned object is destroyed by ~Page. - - poppler/Annot.cc | 28 ++++++++++++++++++++++++++++ - poppler/Annot.h | 5 +++-- - poppler/FontInfo.cc | 11 ++++------- - poppler/PSOutputDev.cc | 12 +++--------- - poppler/Page.h | 2 +- - 5 files changed, 39 insertions(+), 19 deletions(-) - -commit 2733504890333b0925d95e01310726d11fed44d8 -Author: Fabio D'Urso -Date: Fri Mar 23 20:54:58 2012 +0100 - - Basic AnnotFreeText rendering (hardcoded font, WinAnsi characters - only) - - This patch also moves layoutText and writeString from AnnotWidget - to Annot - - poppler/Annot.cc | 137 - ++++++++++++++++++++++++++++++++++++++++++++++++++++++- - poppler/Annot.h | 11 +++-- - 2 files changed, 142 insertions(+), 6 deletions(-) - -commit 3023a59c0a1a5974b232f6f8cb629eabb6797616 -Author: Fabio D'Urso -Date: Sun Mar 25 22:04:11 2012 +0200 - - AnnotTextMarkup rendering improvements - - 1) FIX: Wrong coords in typeUnderline and typeStrikeout - 2) Implementation of typeSquiggly - 3) FIX: Form creation is common to all markup types - - poppler/Annot.cc | 92 - ++++++++++++++++++++++++++++++++++---------------------- - 1 file changed, 56 insertions(+), 36 deletions(-) - -commit 8927ddc448edc016043107e88e3bc3b2b8b03269 -Author: Fabio D'Urso -Date: Thu Mar 22 17:33:01 2012 +0100 - - Improvements to AnnotLine::draw - - poppler/Annot.cc | 50 ++++++++++++++++++++++++++++++++++++++++++++++---- - 1 file changed, 46 insertions(+), 4 deletions(-) - -commit bd7a40fd0312c753d1871558b566376304f1ff35 -Author: Fabio D'Urso -Date: Wed Mar 21 22:48:05 2012 +0100 - - AnnotInk rendering - - poppler/Annot.cc | 62 - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - poppler/Annot.h | 2 ++ - 2 files changed, 64 insertions(+) - -commit 6a8794abe639db8284db079e028cbcd66e138884 -Author: Fabio D'Urso -Date: Wed Mar 21 22:33:13 2012 +0100 - - AnnotPolygon rendering - - poppler/Annot.cc | 87 - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - poppler/Annot.h | 2 ++ - 2 files changed, 89 insertions(+) - -commit f389c50458079f24164b1c12b1151c8617485acb -Author: Fabio D'Urso -Date: Wed Mar 21 21:12:59 2012 +0100 - - Do not fill AnnotGeometry with transparent color - - Previously it was filled with black. - - poppler/Annot.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit c63cc22dd82f827305ad57f241ad49998f2a1c23 -Author: Albert Astals Cid -Date: Sun Apr 8 12:28:17 2012 +0200 - - Remove extra copy() (memleak) - - poppler/GlobalParams.cc | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -commit ed0c9640abcbea459e3a276ee0b27631b01c32c4 -Author: Albert Astals Cid -Date: Sun Apr 8 12:24:20 2012 +0200 - - Do not crash if mallocing too much memory - - Fixes crash in - https://ritdml.rit.edu/bitstream/handle/1850/11220/TYehThesis1992.pdf?sequence=1 - even though the page is still unrendered - - poppler/JBIG2Stream.cc | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -commit f1e621adbbb74ec709022b2a31195331651c83fa -Author: Adrian Johnson -Date: Sun Apr 8 19:42:05 2012 +0930 - - cairo: use correct userfont font bbox - - cairo 1.12 started clipping text to the font bbox - - Bug 48399 - - poppler/CairoFontEngine.cc | 24 ++++++++++++++++++++++++ - 1 file changed, 24 insertions(+) - -commit f5b708c3e04ba50756cd9f9530cf82f547443ce9 -Author: Suzuki Toshiya -Date: Fri Apr 6 15:22:36 2012 +0200 - - ttc<->ttf fallback is expected for CJK font list in GlobalParamsWin.cc - - Bug 48046 - - poppler/GlobalParamsWin.cc | 224 - ++++++++++++++++++++++++++------------------- - 1 file changed, 128 insertions(+), 96 deletions(-) - -commit 4e940b14a6fddde9a1714976ff8045e26cbf7d40 -Author: Adrian Johnson -Date: Mon Apr 2 20:03:11 2012 +0930 - - cairo: fix regression caused by mesh gradients - - poppler/CairoOutputDev.cc | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -commit 74a7d963de75c0097eedcf4224d13cf275a64757 -Author: Carlos Garcia Campos -Date: Sun Apr 1 19:35:48 2012 +0200 - - regtest: remove debug print to show bisect exit status in Bisect.py - - regtest/Bisect.py | 1 - - 1 file changed, 1 deletion(-) - -commit 2749db77eb8ccdbc4b0771163c8942f882f259f4 -Author: Carlos Garcia Campos -Date: Sun Apr 1 19:20:37 2012 +0200 - - regtest: Fix crash when creating HTML report for a single test - - regtest/commands/create-report.py | 5 +---- - 1 file changed, 1 insertion(+), 4 deletions(-) - -commit 1c8e1bb637347d0d31945f9d265b29e7b49396e2 -Author: Carlos Garcia Campos -Date: Sun Apr 1 19:11:57 2012 +0200 - - regtest: Don't show results for crashed or failed to run tests in - HTML report - - regtest/HTMLReport.py | 2 ++ - 1 file changed, 2 insertions(+) - -commit a5f4936dfb3e60ca37f932cc066aa10765f3cbc9 -Author: Fabio D'Urso -Date: Sat Mar 24 23:13:48 2012 +0100 - - Fix: annotDisplayDecideCbk was not propagated - - poppler/OutputDev.h | 6 +++++- - poppler/PSOutputDev.cc | 11 ++++++++--- - poppler/PSOutputDev.h | 5 ++++- - poppler/Page.cc | 3 ++- - utils/HtmlOutputDev.h | 5 ++++- - 5 files changed, 23 insertions(+), 7 deletions(-) - -commit aab8c9a026f781da47ecedd453e225f906361444 -Author: Albert Astals Cid -Date: Thu Mar 29 21:49:38 2012 +0200 - - Increase version - - CMakeLists.txt | 4 ++-- - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/Doxyfile | 2 +- - 5 files changed, 6 insertions(+), 6 deletions(-) - -commit f7e65b62480631d0485167a81a588a176630dd8d -Author: Albert Astals Cid -Date: Thu Mar 29 21:48:11 2012 +0200 - - 0.19.2 news - - NEWS | 23 ++++++++++++++++++++++- - 1 file changed, 22 insertions(+), 1 deletion(-) - -commit 627e072eb1edbfabf549656e9abf10100ed7340c -Author: Albert Astals Cid -Date: Thu Mar 29 21:40:13 2012 +0200 - - Update copyrights - - poppler/TextOutputDev.cc | 1 + - 1 file changed, 1 insertion(+) - -commit e9ad888b003d343d8ca60f044c7cf10a8df81cf4 -Author: Albert Astals Cid -Date: Thu Mar 29 19:49:34 2012 +0200 - - Add quotes to the poppler version define - - poppler/poppler-config.h.cmake | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 8172bb03b6e8f1c16e1a152fb251b10446f54129 -Author: Peter Breitenlohner -Date: Mon Mar 26 11:13:34 2012 +0200 - - define POPPLER_VERSION as C string - - Signed-off-by: Peter Breitenlohner - - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 4a38d933d06d189317b1b9028c3fa4ae2a1551af -Author: Suzuki Toshiya -Date: Thu Mar 29 19:34:25 2012 +0200 - - per-collection fallback for missing CID-keyed fonts on Win32 - - poppler/GlobalParamsWin.cc | 38 ++++++++++++++++++++++++++++++++++---- - 1 file changed, 34 insertions(+), 4 deletions(-) - -commit a0b3e0938e08847d10c5d7b7528c7c5d43a7a3b8 -Author: Hib Eris -Date: Thu Mar 29 07:52:30 2012 +0200 - - Fix help message - - Partial credit goes to suzuki toshiya - - configure.ac | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 631224dc0c721119c91984f1940c9e51edf17eca -Author: Fabio D'Urso -Date: Tue Mar 20 00:56:50 2012 +0100 - - Annotation removal - - poppler/Annot.cc | 17 +++++++++++++++++ - poppler/Annot.h | 1 + - poppler/Page.cc | 36 ++++++++++++++++++++++++++++++++++++ - poppler/Page.h | 3 +++ - 4 files changed, 57 insertions(+) - -commit 20476370a445a26f1fae9db6ad58727ee3c63550 -Author: Fabio D'Urso -Date: Wed Mar 28 23:16:37 2012 +0200 - - Basic support for Annot appearance stream removal and invalidation - - poppler/Annot.cc | 190 - +++++++++++++++++++++++++++++++++++++++++-------------- - poppler/Annot.h | 29 +++++++-- - 2 files changed, 168 insertions(+), 51 deletions(-) - -commit e9a066c3a53cc1cb73dd43a243390ae4e3c76ca3 -Author: Albert Astals Cid -Date: Wed Mar 28 23:33:37 2012 +0200 - - Fix another typo in macGlyphNames - - fofi/FoFiTrueType.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 3d277b230e806a648fcc6d9e7af39370aa89c2ae -Author: Adrian Johnson -Date: Sat Feb 18 09:19:51 2012 +1030 - - Fix typo in "mu" glyph name in truetype 'post' table standard mac - ordering - - The standard mac ordering table is at: - - https://developer.apple.com/fonts/ttrefman/rm06/Chap6post.html - - fofi/FoFiTrueType.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 47b910d35b2cf5914ed4c07f751c5e8c304be7fc -Author: suzuki toshiya -Date: Wed Mar 28 20:21:44 2012 +0200 - - Add quotes - - this is quite small fix. In poppler's configure, basically the shell - variables are not enclosed, and not quoted, aslike - if test x$use_glib = x; then - This syntax make the test command confused when use_glib is multi-word - value, as, "no (required cairo output)". In such case, test cannot - know - how to evaluate the token "no" "(required" "cairo", so some "syntax - error" - messages are given. Thus, quoting of the variable would be safer. - - configure.ac | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 78224609f6c1d87deee72b60a8f8f9f6c36ac75f -Author: Albert Astals Cid -Date: Wed Mar 28 20:21:11 2012 +0200 - - Workaround Windows problem with libjpeg - - In libjpeg6b, there is a type definition conflict issue in jmorecfg.h. - jmorecfg.h typedefs INT16 as short, INT32 as long. The latter conflict - with basetsd.h of Microsoft Windows SDK or MinGW that typedefs INT32 - as int. basetsd.h is included by windows.h, so, if the users work with - ANSI C features only, the conflict does not appear, it would be the - background why such fundamental error has been preserved. - Anyway, jmorecfg.h designer was aware about the conflict with - X11 headers - (Xmd.h defines INT16, INT32, etc), so if we pretend as if Xmd.h were - included (by defining XMD_H), this issue can be bypassed. Attached - patch - checks the conflict, then, if there is a conflict, tries XMD_H - trick, and - uses it if it works. If jmorecfg.h or basetsd.h was manually fixed to - prevent this issue, this trick is not used. - - configure.ac | 42 ++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 42 insertions(+) - -commit d8cf31f8c7e190939525ad68cd4617fb48fea60e -Author: suzuki toshiya -Date: Wed Mar 28 20:20:43 2012 +0200 - - update Makefile.am to reflect LIBJPEG_CFLAGS, LIBTIFF_CFLAGS, - LIBPNG_CFLAGS for related sources. - - goo/Makefile.am | 15 +++++++++++++++ - poppler/Makefile.am | 6 ++++++ - splash/Makefile.am | 16 ++++++++++++++++ - utils/Makefile.am | 6 ++++++ - 4 files changed, 43 insertions(+) - -commit f0c13f5efc641c63627b8f0b0815b6b511d8d196 -Author: suzuki toshiya -Date: Wed Mar 28 20:20:06 2012 +0200 - - Configure improvements for libs in non default paths - - evaluate pkg-config-like environmental variables like LIBJPEG_CFLAGS, - LIBJPEG_LIBS, LIBTIFF_CFLAGS and LIBTIFF_LIBS in configuration. - - configure.ac | 50 ++++++++++++++++++++++++++++++++++++++++++++------ - 1 file changed, 44 insertions(+), 6 deletions(-) - -commit e55f485d803cb1f82e0d8a53d1998e1887c7920f -Author: suzuki toshiya -Date: Wed Mar 28 20:19:08 2012 +0200 - - Improve m4/libjpeg.m4 - - m4/libjpeg.m4 uses USER_INCLUDES and USER_LDFLAGS in it, but - USER_INCLUDES is not reflected when jpeglib.h is searched. - this patch modifies m4/libjpeg.m4 to reflect USER_INCLUDES - when jpeglib.h is searched. - - m4/libjpeg.m4 | 6 ++++++ - 1 file changed, 6 insertions(+) - -commit e88c17d45220eea60a3dd7fab26a067616388c5f -Author: Albert Astals Cid -Date: Wed Mar 28 20:05:45 2012 +0200 - - Fix compile in windows - - poppler/GlobalParamsWin.cc | 35 ++++++++++++++++++++++++++++++----- - 1 file changed, 30 insertions(+), 5 deletions(-) - -commit ee0eaabe24019d2af226ef03e3f456787525e040 -Author: Fabio D'Urso -Date: Mon Mar 19 00:05:49 2012 +0100 - - Added Array::remove (and Object::arrayRemove) - - poppler/Array.cc | 13 +++++++++++++ - poppler/Array.h | 4 ++++ - poppler/Object.h | 5 +++++ - 3 files changed, 22 insertions(+) - -commit d6a1b7dcaeac1e49533519b9f8a279fd64d04c67 -Author: Thomas Freitag -Date: Tue Mar 27 00:00:05 2012 +0200 - - Some regression fixes/improvements - - I just finished the patch for these regressions, they had differents - reasons - 1. In CharCodeToUnicode::mapToUnicode the identity support was missing - 2. The new algorithms for axial and radial shading caused problems in - cairo. I revert these changes but removed the examination of hidden - content (this is already done in the calling function) - 3. The examination of optional hidden content in showing text - was wrong: - of course hidden text should not be shown, but text parameters - like text - position in the state must be changed! - 4. Searching and finding fonts especially with base14 fonts should be - more exact than just looking at the base14 name (i.e. fixed width - and so - on) when using fontconfig. I implement that to find the best font - fitting to the needs. - - poppler/CharCodeToUnicode.cc | 5 + - poppler/Gfx.cc | 329 - ++++++++++++++++++++----------------------- - poppler/GfxFont.cc | 3 +- - poppler/GlobalParams.cc | 78 +++++++--- - poppler/GlobalParams.h | 6 +- - 5 files changed, 218 insertions(+), 203 deletions(-) - -commit a5257efe00d0fe850b1abe5c552f7581027ac64c -Author: Fabio D'Urso -Date: Mon Mar 26 19:28:55 2012 +0200 - - Re-added forceRasterize to PSOutputDev (and qt4 fix too)†- - The patch restores the forceRasterize argument in PSOutputDev ctors. - Commit 6ee907f291427b8751a872b31210bf32e8d2b722 had removed it, - turning it - into a global param. - As a side effect, this patch also fixes qt4/poppler-ps-converter, - which had - not been updated to the new signature, and thus produced corrupted - output if - forceRasterization was set. - - glib/poppler-page.cc | 2 +- - poppler/GlobalParams.cc | 16 ---------------- - poppler/GlobalParams.h | 3 --- - poppler/PSOutputDev.cc | 6 +++++- - poppler/PSOutputDev.h | 3 +++ - 5 files changed, 9 insertions(+), 21 deletions(-) - -commit 55d039ada063a9427de6dd59846ce1570ab26e9f -Author: Suzuki Toshiya -Date: Mon Mar 26 22:31:29 2012 +0200 - - CJK improvements - - More info in the mailing list threads - * script names for vertical writing mode should be differentiated - for CJK - * 2 workarounds for a Korean font on Microsoft Windows - - fofi/FoFiTrueType.cc | 47 ++++++++++++++++++++++++++++++++++++----------- - fofi/FoFiTrueType.h | 8 +++++++- - poppler/GfxFont.cc | 14 ++++++++------ - 3 files changed, 51 insertions(+), 18 deletions(-) - -commit a8b0fa4d07480242afba7751995e38eaf3147ac5 -Author: Horst Prote -Date: Mon Mar 26 21:04:32 2012 +1030 - - don't add newline to last line extracted by TextSelectionDumper - - Bug 45955 - - poppler/TextOutputDev.cc | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -commit c40e2315cd796ba928969d13a761f5f19d8438fc -Author: Adrian Johnson -Date: Fri Mar 23 21:49:42 2012 +1030 - - cairo: use a transparency group with - setSoftMaskFromImageMask/unsetSoftMaskFromImageMask - - Drawing a tiling pattern between setSoftMaskFromImageMask and - unsetSoftMaskFromImageMask clears the softmask. - - Similar to Splash, create a transparency group in - setSoftMaskFromImageMask. Pop and paint the group in - unsetSoftMaskFromImageMask. The saveState/restoreState is to ensure - the softmask is restored before painting the group. - - Bug 47739 - - poppler/CairoOutputDev.cc | 16 ++++++++++++++++ - 1 file changed, 16 insertions(+) - -commit 7b57afea2e433fc7b6f359a62b1289f0e1da3267 -Author: Adrian Johnson -Date: Sat Mar 24 08:27:34 2012 +1030 - - cairo: update cairo mesh pattern to 1.12 api - - Now that a stable version of cairo with mesh gradient support is - released update poppler to use this api. - - poppler/CairoOutputDev.cc | 40 ++++++++++++++++++++-------------------- - poppler/CairoOutputDev.h | 4 ++-- - 2 files changed, 22 insertions(+), 22 deletions(-) - -commit 2f156b34fc8755ddd2a32cac830f3073d6b2c481 -Author: Suzuki Toshiya -Date: Fri Mar 23 20:00:18 2012 +0100 - - Fix compile in mingw-gcc - - poppler/GlobalParamsWin.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 06b6db92dd1ec32f9a55347073f8b533aa074ee1 -Author: Fabio D'Urso -Date: Sun Mar 18 23:58:05 2012 +0100 - - Added XRef::removeIndirectObject - - poppler/PDFDoc.cc | 15 ++++++++++----- - poppler/XRef.cc | 15 +++++++++++++++ - poppler/XRef.h | 2 ++ - 3 files changed, 27 insertions(+), 5 deletions(-) - -commit a2e9b7c02ffa0e5edc4da18cc726993bc92fc684 -Author: Fabio D'Urso -Date: Mon Mar 19 19:17:09 2012 +0100 - - Fix in AnnotMarkup's popup window handling - - AnnotPopup's ref was previously set to the *parent* annot, now - it's correctly - set to the *popup* annot's own. - - poppler/Annot.cc | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit 05641304df67beae546a2fe18071f3be52707aa8 -Author: Fabio D'Urso -Date: Mon Mar 19 20:56:45 2012 +0100 - - Basic Annot border editing support - - poppler/Annot.cc | 23 +++++++++++++++++++++++ - poppler/Annot.h | 9 +++++++++ - 2 files changed, 32 insertions(+) - -commit 3e6275a05066c152b265cc27275d9e4107c089e9 -Author: Fabio D'Urso -Date: Fri Mar 16 21:47:02 2012 +0100 - - Yet new setters to AnnotFreeText - - poppler/Annot.cc | 45 +++++++++++++++++++++++++++++++++++++++++++++ - poppler/Annot.h | 2 ++ - 2 files changed, 47 insertions(+) - -commit f69f41056fc8cd8a70b38024f255e9074af20bdc -Author: Pino Toscano -Date: Tue Mar 20 15:18:33 2012 +0100 - - cmake: reset CMAKE_REQUIRED_INCLUDES/CMAKE_REQUIRED_LIBRARIES - - cmake/modules/FindLIBOPENJPEG.cmake | 3 +++ - 1 file changed, 3 insertions(+) - -commit 4a9238441a5317c3304296e4e6430cccefe8322c -Author: Ihar Filipau -Date: Fri Mar 16 00:07:45 2012 +0100 - - Flip images if they need to - - Bug 32340 - - utils/HtmlOutputDev.cc | 50 - ++++++++++++++++++++++++++++++++++++++++++++++++-- - 1 file changed, 48 insertions(+), 2 deletions(-) - -commit 6d68d0d3acc8c8e0d9d310b2e1ba2b07d6bfe942 -Author: Ihar Filipau -Date: Thu Mar 15 22:56:10 2012 +0100 - - pdftohtml: extract mask images even if they are not JPEG - - Bug #47186 - - utils/HtmlOutputDev.cc | 203 - +++++++++++++++++++++++++++++++------------------ - utils/HtmlOutputDev.h | 3 + - 2 files changed, 131 insertions(+), 75 deletions(-) - -commit 60155e0fc7224a6b479bf62133f72c460fe48078 -Author: Albert Astals Cid -Date: Thu Mar 15 20:46:53 2012 +0100 - - Install poppler-media.h - - qt4/src/Makefile.am | 1 + - 1 file changed, 1 insertion(+) - -commit 6a173844d5ca6f32e188406ab14cae6a7548fc1d -Author: Albert Astals Cid -Date: Thu Mar 15 20:44:12 2012 +0100 - - Add the export - - qt4/src/poppler-media.h | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -commit e401f8e6ba3e18d5a3a4920cd111b2174c75f415 -Author: Albert Astals Cid -Date: Thu Mar 15 20:32:12 2012 +0100 - - Increase version and sonames - - CMakeLists.txt | 4 ++-- - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - glib/CMakeLists.txt | 2 +- - glib/Makefile.am | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/CMakeLists.txt | 2 +- - qt4/src/Doxyfile | 2 +- - qt4/src/Makefile.am | 2 +- - 9 files changed, 10 insertions(+), 10 deletions(-) - -commit ce059698e8c5097f75e7a0f828af0936aa104af0 -Author: Albert Astals Cid -Date: Thu Mar 15 20:27:45 2012 +0100 - - 0.19.1 news - - Also inclusing 0.18.x ones - - NEWS | 110 - +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 110 insertions(+) - -commit 2041d5721871adb2a23999c16ecbdc60abb7b1c4 -Author: Albert Astals Cid -Date: Thu Mar 15 20:20:31 2012 +0100 - - Update C years - - poppler/CMap.h | 1 + - poppler/GfxFont.h | 2 +- - poppler/Rendition.cc | 1 + - 3 files changed, 3 insertions(+), 1 deletion(-) - -commit 95d684aa2a87d01296f5e93516f2ac3f54adbec8 -Author: Guillermo Amaral -Date: Thu Mar 15 20:13:20 2012 +0100 - - Remove the QIODevice and go with a not so good but more safer - QByteArray - - Bug #47336 - - qt4/src/CMakeLists.txt | 1 - - qt4/src/Makefile.am | 1 - - qt4/src/poppler-media.cc | 35 ++++++++++----- - qt4/src/poppler-media.h | 4 +- - qt4/src/poppler-page.cc | 1 - - qt4/src/poppler-streamsequentialdevice-private.h | 51 - --------------------- - qt4/src/poppler-streamsequentialdevice.cc | 56 - ------------------------ - 7 files changed, 26 insertions(+), 123 deletions(-) - -commit 9fee12f9bee7252db0974ef69870b69ff1452053 -Author: Albert Astals Cid -Date: Thu Mar 15 19:23:47 2012 +0100 - - Compile++ - - qt4/src/Makefile.am | 2 ++ - 1 file changed, 2 insertions(+) - -commit aa1e6d12d063a64a22841f7996101b45aa680ec7 -Author: Guillermo Amaral -Date: Thu Mar 15 00:35:31 2012 +0100 - - Added media rendition support for Qt4 - - qt4/src/CMakeLists.txt | 3 + - qt4/src/poppler-annotation.cc | 66 ++++++++++ - qt4/src/poppler-annotation.h | 47 ++++++- - qt4/src/poppler-link.cc | 44 +++++++ - qt4/src/poppler-link.h | 38 +++++- - qt4/src/poppler-media.cc | 149 - +++++++++++++++++++++++ - qt4/src/poppler-media.h | 94 ++++++++++++++ - qt4/src/poppler-page.cc | 32 ++++- - qt4/src/poppler-qt4.h | 2 + - qt4/src/poppler-streamsequentialdevice-private.h | 51 ++++++++ - qt4/src/poppler-streamsequentialdevice.cc | 56 +++++++++ - 11 files changed, 579 insertions(+), 3 deletions(-) - -commit 258e2197afa49e60b0b13a05408fc8d484dd8147 -Author: Fabio D'Urso -Date: Wed Mar 14 23:25:00 2012 +0100 - - Added some new setters to AnnotFreeText - - poppler/Annot.cc | 39 +++++++++++++++++++++++++++++++++++++++ - poppler/Annot.h | 4 ++++ - 2 files changed, 43 insertions(+) - -commit 84a62ac157e03880c1c1eda60c3927bd4414640e -Author: Fabio D'Urso -Date: Wed Mar 14 23:24:28 2012 +0100 - - Added some new setters to AnnotGeometry, AnnotInk and AnnotCaret - - poppler/Annot.cc | 116 - +++++++++++++++++++++++++++++++++++++++++-------------- - poppler/Annot.h | 10 +++++ - 2 files changed, 96 insertions(+), 30 deletions(-) - -commit 233c9a097bdc382f6a2eb6319ee15528c72e9632 -Author: Fabio D'Urso -Date: Wed Mar 14 23:23:59 2012 +0100 - - Added some new setters to AnnotTextMarkup and AnnotStamp - - poppler/Annot.cc | 61 - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - poppler/Annot.h | 11 ++++++++-- - 2 files changed, 70 insertions(+), 2 deletions(-) - -commit 8fb3ac6cf66233b80959ba99a2c706111050f5f1 -Author: Fabio D'Urso -Date: Wed Mar 14 23:23:23 2012 +0100 - - Added Page::getDoc() - - poppler/Page.h | 2 ++ - 1 file changed, 2 insertions(+) - -commit dc4cb07c1e735006d5168e0e65f5143d7fc53e12 -Author: Fabio D'Urso -Date: Wed Mar 14 23:22:10 2012 +0100 - - Added some new setters to AnnotLine and AnnotPolygon - - poppler/Annot.cc | 201 - +++++++++++++++++++++++++++++++++++++++++++++++++++++-- - poppler/Annot.h | 16 +++++ - 2 files changed, 211 insertions(+), 6 deletions(-) - -commit 4931018eecc37dbbe0df1a456347ab200f1b057a -Author: Fabio D'Urso -Date: Wed Mar 14 23:21:07 2012 +0100 - - Make Dict::set remove the entry if object is Null - - poppler/Dict.cc | 5 +++++ - 1 file changed, 5 insertions(+) - -commit 13ac2c0bed3fa5515a3c068488cb6a0b17410a97 -Author: Fabio D'Urso -Date: Wed Mar 14 23:20:13 2012 +0100 - - Added some new setters to Annot and AnnotMarkup - - poppler/Annot.cc | 94 - ++++++++++++++++++++++++++++++++++++++++++++++++++++---- - poppler/Annot.h | 8 +++++ - 2 files changed, 96 insertions(+), 6 deletions(-) - -commit aa2b5ffa7961aac0aea33ae9a42bf1f38a756b1b -Author: Pino Toscano -Date: Wed Mar 14 16:25:35 2012 +0100 - - qt4: replace ObjectReference with simplier Ref - - instead of roll out a new (still private) version of Ref, just use - it for private annotation and link data; - this needed a couple of explicit initializations of Ref (since it's - a simple struct with no methods) and a private operator== for it - - qt4/src/CMakeLists.txt | 1 - - qt4/src/poppler-annotation-private.h | 4 +- - qt4/src/poppler-annotation.cc | 1 + - qt4/src/poppler-link.cc | 16 ++++--- - qt4/src/poppler-link.h | 5 +- - qt4/src/poppler-objectreference.cc | 89 - ------------------------------------ - qt4/src/poppler-objectreference_p.h | 77 ------------------------------- - qt4/src/poppler-page.cc | 7 ++- - 8 files changed, 21 insertions(+), 179 deletions(-) - -commit e5b914b2bfbb5e95ecde5f1ce148374b1d58dadd -Author: Ihar Filipau -Date: Tue Mar 13 23:54:26 2012 +0100 - - Add possibilty of controlling word breaks percentage - - Bug #47022 - - utils/HtmlOutputDev.cc | 7 +++++-- - utils/pdftohtml.1 | 5 +++++ - utils/pdftohtml.cc | 7 +++++++ - 3 files changed, 17 insertions(+), 2 deletions(-) - -commit 4388cb69114e406ec29e8b6976d1a900e4ab1b7d -Author: Albert Astals Cid -Date: Sun Mar 11 23:37:39 2012 +0100 - - Make doUpdateFont protected - - So that people inheriting from SplashOutputDev *yuck* can use it - more easily - Bug 46622 - - poppler/SplashOutputDev.h | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -commit 448cfc431b7067af38da51e725ac0f1b2a0bc8f8 -Author: Tobias Koenig -Date: Sun Mar 11 23:22:18 2012 +0100 - - support for LinkMovie object in Qt4 frontend - - Bug #40561 - - qt4/src/CMakeLists.txt | 1 + - qt4/src/poppler-annotation-private.h | 4 ++ - qt4/src/poppler-annotation.h | 4 ++ - qt4/src/poppler-link.cc | 42 +++++++++++++---- - qt4/src/poppler-link.h | 43 +++++++++++++++-- - qt4/src/poppler-objectreference.cc | 89 - ++++++++++++++++++++++++++++++++++++ - qt4/src/poppler-objectreference_p.h | 77 +++++++++++++++++++++++++++++++ - qt4/src/poppler-page.cc | 39 ++++++++++++---- - 8 files changed, 276 insertions(+), 23 deletions(-) - -commit a0d151deabf8243c98ff9953f8a43bb56fbf95a9 -Author: Carlos Garcia Campos -Date: Sun Mar 11 16:05:15 2012 +0100 - - regtest: Add find-regression command to run git bisect automatically - - regtest/Bisect.py | 113 - ++++++++++++++++++++++++++++++++++++ - regtest/builder/__init__.py | 86 +++++++++++++++++++++++++++ - regtest/builder/autotools.py | 63 ++++++++++++++++++++ - regtest/commands/find-regression.py | 77 ++++++++++++++++++++++++ - 4 files changed, 339 insertions(+) - -commit 856768c380ecea30ce9727b81c4c44b4f9489626 -Author: Carlos Garcia Campos -Date: Sat Mar 10 18:15:58 2012 +0100 - - regtest: Add information about skipped tests in the summary - - regtest/TestRun.py | 12 +++++++++--- - 1 file changed, 9 insertions(+), 3 deletions(-) - -commit 508c7c3ef1f22459daa822f8287cab382119e753 -Author: Tobias Koenig -Date: Wed Mar 7 18:35:05 2012 +0100 - - Fix logic error in Rendition parsing code - - Make the rendition object invalid when both P an C entries are not - present or are invalid in Media Rendition dictionary. - - https://bugs.freedesktop.org/show_bug.cgi?id=47063 - - poppler/Rendition.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 68625258ab3cfc3e8e10a727e397f80bed0d1f5c -Author: Adrian Johnson -Date: Sun Mar 4 18:37:53 2012 +1030 - - glib demo: make ctrl-q quit the demo - - glib/demo/main.c | 9 +++++++++ - 1 file changed, 9 insertions(+) - -commit 684b47727ba810ad6bf239e2838aa65b6f6cec36 -Author: Adrian Johnson -Date: Sun Mar 4 18:10:49 2012 +1030 - - glib demo: show font encoding in font demo - - glib/demo/fonts.c | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -commit 48c08d28645d82ab9d67433a0150f6e1ba24b7c6 -Author: Adrian Johnson -Date: Sun Mar 4 17:49:56 2012 +1030 - - glib: add poppler_fonts_iter_get_encoding - - glib/poppler-document.cc | 26 ++++++++++++++++++++++++++ - glib/poppler-document.h | 1 + - glib/reference/poppler-sections.txt | 1 + - 3 files changed, 28 insertions(+) - -commit 8d935569a977675afac35cf1bd5f2611b6a771b6 -Author: Albert Astals Cid -Date: Mon Mar 5 21:59:09 2012 +0100 - - Fix regression in some PSOutputDev array sizing - - poppler/PSOutputDev.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 2484bc0f29aef74c45ea39ef1e24804ed736154c -Author: Albert Astals Cid -Date: Sun Mar 4 23:47:24 2012 +0100 - - Fix mismatch in some functions declarations - - goo/GooString.h | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit 35c960d198d2efa97d15e962662114c5c31b8d20 -Author: Even Rouault -Date: Sun Mar 4 20:32:42 2012 +0100 - - Do not crash on malformed files with 0 bits in the color map of - an image - - poppler/Gfx.cc | 4 ++++ - 1 file changed, 4 insertions(+) - -commit dae29c6c201cd69cbf4f008de865cc19a36f29b3 -Author: Thomas Freitag -Date: Sun Mar 4 15:22:02 2012 +0100 - - CJK substitute implementation on WIndows platforms. - - When You install ghostscript on WIndows You're able to switch on CJK - support. This will create a cidfmap file in the gs-lib directory. The - ps file which creates it (mkcidfm.ps) runs over the windows font - directory and tries to create a suitable substitution table for - missing - CJK fonts. The cidfmap file is more or less PDF like, so it's - quite easy - to parse it with our parser and create a substitution table in - GlobalParamsWin and use that table. But I expect it in the poppler - data - dir instead of searching for ghostscript installation. If it is not - there, it always returns the default CID font of point 2. - You can either copy it from the gs lib directory or create it with the - ghostscript tool calling - - gswin32c -q -dBATCH -sFONTDIR= - -sCIDFMAP=/cidfmap mkcidfm.ps - - poppler/GlobalParams.cc | 5 +++ - poppler/GlobalParams.h | 2 + - poppler/GlobalParamsWin.cc | 106 - ++++++++++++++++++++++++++++++++++++++++----- - 3 files changed, 103 insertions(+), 10 deletions(-) - -commit 32e47ee03840cc8f21c00497025864d77edb75f5 -Author: Thomas Freitag -Date: Sun Mar 4 15:21:13 2012 +0100 - - Improve CJK suport in PSOutputDev - - 1. Adapt bug fix for bug 11413 to the postscript device - 2. A small bug fix when locateFont doesn't find a suitable font and - returns a null pointer - - to 1.: - Adapting the implementation of the bug fix for splash and cairo to the - postscript device was quite easy. But my first proofs of the - output with - ghostscript 8.71 shows some regressions where the CJK chars have a - smaller height than the default square of the font. But the "48" - in the - output of bug-poppler11413.pdf which is set in a "normal" font but - rotated was at the right position. Then I stepped to ghostscript 9.04, - and now the CJK chars were shown correctly, but the 48 was positioned - wrong. But because of these different tests I think that it is still a - problem in ghostscript when using a mix of CJK fonts and "normal" - fonts. - BTW, also Acrobat X distiller has problems with the position of the - "48"! - - to 2.: - On my first tests with PDF which uses non embedded CJK fonts on - Windows - I got crashes. Reason for it was that GlobalParamWin returns - Helvetica, - which is not a CID font, but locateFont accepts here only CID - fonts and - therefore returns a NULL pointer. I first fixed that and then - decided to - return as default MS Mincho if a CID font is expected. - - poppler/PSOutputDev.cc | 203 - ++++++++++++++++++++++--------------------------- - 1 file changed, 92 insertions(+), 111 deletions(-) - -commit 61037a6de157e39331ae7a8b12ee5a115fd7e936 -Author: Adrian Johnson -Date: Sun Mar 4 17:40:40 2012 +1030 - - glib demo: fix typo - - glib/demo/selections.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit aff5b0a4f04c12ad7733aedbc9997367f5873aa1 -Author: Carlos Garcia Campos -Date: Sat Mar 3 20:10:17 2012 +0100 - - regtest: Ignore backends with no results when creating html report - - regtest/HTMLReport.py | 5 +++++ - 1 file changed, 5 insertions(+) - -commit 9d28b8db3561845f4ca94c29479a259ceaf78bc5 -Author: Carlos Garcia Campos -Date: Sat Mar 3 14:42:51 2012 +0100 - - regtest: Add --pretty-diff option to create-report command - - It includes a pretty-diff link to make a bit easier to check - differences - in test results. For images it creates a html with javascript that - toggles actual and expected image, using the same code than WebKit - layout test results. For text files it uses HtmlDiff class from python - difflib. It's an option disabled by default because pretty diff - for text - files is very slow. - - regtest/HTMLReport.py | 128 - +++++++++++++++++++++++++++++++++++++- - regtest/commands/create-report.py | 4 ++ - 2 files changed, 129 insertions(+), 3 deletions(-) - -commit 670ea176495b8b580daba061840c914714bf422d -Author: Adrian Johnson -Date: Fri Mar 2 22:22:16 2012 +1030 - - pdffonts: list the encoding of each font - - Bug 46888 - - poppler/CMap.h | 2 ++ - poppler/FontInfo.cc | 3 +++ - poppler/FontInfo.h | 2 ++ - poppler/GfxFont.cc | 26 ++++++++++++++++++++++++++ - poppler/GfxFont.h | 4 ++++ - utils/pdffonts.1 | 3 +++ - utils/pdffonts.cc | 7 ++++--- - 7 files changed, 44 insertions(+), 3 deletions(-) - -commit 3ab6b5ebf3b6c0d59bcb2ec68eae1aa95cab1d0e -Author: William Bader -Date: Fri Mar 2 19:40:44 2012 +0100 - - Fix pdftops -passfonts regression - - This patch fixes pdftops -passfonts by using the new psFontPassthrough - variable - consistently and removing the old psSubstFonts and its setter and - getter in - GlobalParams. - - Bug 46744 - - poppler/GlobalParams.cc | 9 +-------- - poppler/GlobalParams.h | 4 +--- - utils/pdftops.cc | 10 +++++----- - 3 files changed, 7 insertions(+), 16 deletions(-) - -commit 6c1ee34424b1122c0a2222b776d8d475f7c555cd -Author: Adrian Johnson -Date: Fri Mar 2 18:41:58 2012 +1030 - - Update poppler copyright - - poppler/poppler-config.h.cmake | 2 +- - poppler/poppler-config.h.in | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit cdb1350d1e28cf3bceda75736ca91e13d193de84 -Author: Albert Astals Cid -Date: Thu Mar 1 18:58:02 2012 +0100 - - Increase versions - - CMakeLists.txt | 4 ++-- - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - glib/CMakeLists.txt | 2 +- - glib/Makefile.am | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/CMakeLists.txt | 2 +- - qt4/src/Doxyfile | 2 +- - qt4/src/Makefile.am | 2 +- - 9 files changed, 10 insertions(+), 10 deletions(-) - -commit 2c9e6fa5b3bc6cd01618c3fb4f46533bfce97466 -Author: Albert Astals Cid -Date: Thu Mar 1 18:48:17 2012 +0100 - - 0.19.0 news file - - NEWS | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 48 insertions(+) - -commit 14f6abfcb83f91755e6de05cd33870934bba3cfb -Author: Albert Astals Cid -Date: Thu Mar 1 17:53:25 2012 +0100 - - Update copyrights - - goo/JpegWriter.cc | 2 +- - poppler/CairoFontEngine.cc | 1 + - poppler/CairoOutputDev.cc | 3 ++- - poppler/CairoOutputDev.h | 2 +- - poppler/CairoRescaleBox.cc | 15 +++++++++++++++ - poppler/FontInfo.cc | 2 +- - poppler/FontInfo.h | 1 + - poppler/Gfx.cc | 2 +- - poppler/GfxFont.cc | 1 + - poppler/GlobalParams.cc | 2 ++ - poppler/GlobalParams.h | 1 + - poppler/Lexer.cc | 1 + - poppler/NameToUnicodeTable.h | 2 +- - utils/ImageOutputDev.cc | 1 + - utils/ImageOutputDev.h | 1 + - utils/parseargs.cc | 1 + - utils/parseargs.h | 1 + - utils/pdffonts.cc | 1 + - utils/pdfimages.cc | 1 + - utils/pdftocairo.cc | 2 +- - utils/pdftoppm.cc | 2 +- - 21 files changed, 37 insertions(+), 8 deletions(-) - -commit e63ca8184168f824575be9bbb64e9b1eac1eff94 -Author: Adrian Johnson -Date: Thu Mar 1 21:46:12 2012 +1030 - - pdftocairo: document that -scale-to will preserve aspect ratio - - based on pdftpppm patch 7ec31b8dc40ec8a3534fbb89964aa011aeb81f5e - - utils/pdftocairo.1 | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -commit fa82a7ce1372e5976ad95624115fcd7a4d9bd22c -Author: Adrian Johnson -Date: Thu Mar 1 21:43:32 2012 +1030 - - pdftocairo: allow one of -scale-to-[xy] = -1 to mean the aspect - ratio is to be preserved - - based on pdftoppm patch 38ace7db5de0b2b247fd520e48a8f26e5d28c9d7 - - utils/pdftocairo.1 | 8 ++++++-- - utils/pdftocairo.cc | 8 ++++++-- - 2 files changed, 12 insertions(+), 4 deletions(-) - -commit a2b008223ad6887f00d76c535f2b0b0f13f52b76 -Author: Adrian Johnson -Date: Tue Feb 28 21:38:19 2012 +1030 - - glib: add copy button to selections demo - - glib/demo/selections.c | 20 ++++++++++++++++++++ - 1 file changed, 20 insertions(+) - -commit b666d19308a043206e405c7e9d4ad709d68d331b -Author: Adrian Johnson -Date: Tue Feb 28 21:07:06 2012 +1030 - - glib: show substitute font name in demo - - glib/demo/fonts.c | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -commit 18bc59fcf5a59b1fd51a631c02e900790c3a6dc0 -Author: Adrian Johnson -Date: Tue Feb 28 21:06:38 2012 +1030 - - glib: add poppler_fonts_iter_get_substitute_name - - glib/poppler-document.cc | 27 +++++++++++++++++++++++++++ - glib/poppler-document.h | 1 + - glib/reference/poppler-docs.sgml | 4 ++++ - glib/reference/poppler-sections.txt | 1 + - 4 files changed, 33 insertions(+) - -commit 4eaafe67de79fb63ebf61f031a97bbc0ed6a8891 -Author: Albert Astals Cid -Date: Wed Feb 29 23:22:34 2012 +0100 - - Change nnnnnn to number - - This way people won't expect it to be six fixed digits - Bug #46708 - - utils/pdftoppm.1 | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit aec6cb67951e56e4557a11c4fdf301e585268fe4 -Author: William Bader -Date: Wed Feb 29 23:18:16 2012 +0100 - - Fix stuff lost when merging xpdf303 - - restore the implementation of -binary - restore the fix that level2sep and level3sep must write cmyk instead - of rgb - restore the conversion of bitmaps with all gray to mono8 - fixed the CMYK misspelling in Stream. - - poppler/PSOutputDev.cc | 284 - +++++++++++++++++++++++++++++++++++++++++-------- - poppler/Stream.cc | 55 ++++++++-- - poppler/Stream.h | 39 ++++++- - 3 files changed, 320 insertions(+), 58 deletions(-) - -commit e977925a1eb15083e6b020b31da77ddef9d5df02 -Author: William Bader -Date: Wed Feb 29 23:12:24 2012 +0100 - - Fix double alloc - - xpdf303 merge glitch - - poppler/PSOutputDev.cc | 1 - - 1 file changed, 1 deletion(-) - -commit e13efe04facdc10f3acffece3b057544f018f40c -Author: William Bader -Date: Wed Feb 29 23:10:43 2012 +0100 - - Fix memory leak - - Wrong merge from xpdf303 - - poppler/GfxState.cc | 3 +++ - 1 file changed, 3 insertions(+) - -commit adfc03e441b2a86dab5216dc560fd79343dfbe4f -Author: Hib Eris -Date: Wed Feb 29 21:10:56 2012 +0100 - - Only use Hints table when there are no parse errors - - Fixes bug #46459. - - poppler/Hints.cc | 6 ++++-- - poppler/Parser.cc | 30 ++++++++++++++++++++++++------ - poppler/Parser.h | 7 +++++-- - 3 files changed, 33 insertions(+), 10 deletions(-) - -commit 7ec31b8dc40ec8a3534fbb89964aa011aeb81f5e -Author: Adrian Johnson -Date: Mon Feb 27 21:15:39 2012 +1030 - - pdftoppm: document that -scale-to will preserve aspect ratio - - utils/pdftoppm.1 | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -commit 38ace7db5de0b2b247fd520e48a8f26e5d28c9d7 -Author: Adrian Johnson -Date: Sat Feb 25 20:02:22 2012 +1030 - - pdftoppm: allow one of -scale-to-[xy] = -1 to mean the aspect ratio - is to be preserved - - bug 43393 - - utils/pdftoppm.1 | 8 ++++++-- - utils/pdftoppm.cc | 8 ++++++-- - 2 files changed, 12 insertions(+), 4 deletions(-) - -commit 738b879ebb536cc84d7ec96543d484023b69e6d3 -Author: Carlos Garcia Campos -Date: Sat Feb 25 20:53:58 2012 +0100 - - regtest: Add create-report command to generate html report of - test results - - regtest/HTMLReport.py | 197 - ++++++++++++++++++++++++++++++++++++++ - regtest/backends/__init__.py | 20 +++- - regtest/commands/create-report.py | 57 +++++++++++ - 3 files changed, 273 insertions(+), 1 deletion(-) - -commit d5faabd509c2860ab199ee89b8ef9d4c14fa5118 -Author: Carlos Garcia Campos -Date: Sat Feb 25 20:50:53 2012 +0100 - - regtest: Use diff.png extension for image diff files - - So that they are recognized as images - - regtest/backends/__init__.py | 16 ++++++++++++++-- - regtest/backends/cairo.py | 2 +- - regtest/backends/splash.py | 2 +- - regtest/backends/text.py | 2 +- - 4 files changed, 17 insertions(+), 5 deletions(-) - -commit 2a5f1594a23cf521497f904b502fbadf56a9e780 -Author: William Bader -Date: Sat Feb 25 16:32:33 2012 +0100 - - Fix PSOutputDev regression with -level1 - - poppler/PSOutputDev.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 6a5deb0a86ad227cce3f85b1f58a9b86755cd812 -Author: Adrian Johnson -Date: Sat Feb 25 19:39:02 2012 +1030 - - autoconf: PKG_CHECK_EXISTS should not have the variable prefix in - the first argument - - configure.ac | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 8f4566c14a727fb75c4c353989cf5eb96516c2e3 -Author: Adrian Johnson -Date: Wed Feb 22 21:21:52 2012 +1030 - - autoconf: replace openjpeg compile test with a version test - - Now that openjpeg 1.5 is released and supports pkg-config the compile - test can be replaced with a pkg-config version check. - - configure.ac | 11 +++-------- - 1 file changed, 3 insertions(+), 8 deletions(-) - -commit 30f38bf425e2f76b3f6cc4c080137ac7219a9dbe -Author: Adrian Johnson -Date: Wed Feb 22 21:01:59 2012 +1030 - - autoconf: Use pkgconfig to check for libopenjpeg - - and if not found fallback to using AC_CHECK_LIB/AC_CHECK_HEADERS - - openjpeg >= 1.4 installs a pkgconfig file - - Bug 21789 - - configure.ac | 28 +++++++++++++++++----------- - 1 file changed, 17 insertions(+), 11 deletions(-) - -commit 466340d257ff0fe7e3a88a4e013e3feec3f7b70a -Author: Albert Astals Cid -Date: Thu Feb 23 23:47:15 2012 +0100 - - Combine UTF16 surrogate pairs - - Bug 46521 - - utils/HtmlOutputDev.cc | 14 +++++++++++++- - 1 file changed, 13 insertions(+), 1 deletion(-) - -commit 675ef2bda3c4e06b39e2ba09b3b19d99cfb001b6 -Author: Oliver Sander -Date: Thu Feb 23 23:22:50 2012 +0100 - - Compile - - poppler/Stream.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 7705e65c231cc3af296bf19f5cba110cabb72e7d -Author: Albert Astals Cid -Date: Thu Feb 23 23:09:23 2012 +0100 - - Generate outlines in pdftohtml in -xml mode. - - Bug 56993 - - utils/HtmlOutputDev.cc | 130 - ++++++++++++++++++++++++++++++++++++------------- - utils/HtmlOutputDev.h | 7 ++- - utils/pdf2xml.dtd | 7 ++- - utils/pdftohtml.cc | 5 +- - 4 files changed, 108 insertions(+), 41 deletions(-) - -commit 30446bdd7e202eed88d131e04477c76861fd145c -Author: Albert Astals Cid -Date: Thu Feb 23 22:56:17 2012 +0100 - - Use an Identity CharCodeToUnicode for Adobe-Identity and Adobe-UCS - collections - - Also fix Identity CharCodeToUnicode code - - Bug #35468 - - poppler/CharCodeToUnicode.cc | 18 +++++++++++++----- - poppler/CharCodeToUnicode.h | 7 +++++-- - poppler/GfxFont.cc | 13 +++++++------ - 3 files changed, 25 insertions(+), 13 deletions(-) - -commit 71104f1ec55d3be999afaa1b62405454b31066a9 -Author: Albert Astals Cid -Date: Thu Feb 23 19:34:57 2012 +0100 - - Remove unneded CharCodeToUnicode includes - - poppler/ArthurOutputDev.cc | 3 +-- - poppler/CairoFontEngine.cc | 3 +-- - poppler/CairoOutputDev.cc | 3 +-- - poppler/SplashOutputDev.cc | 3 +-- - 4 files changed, 4 insertions(+), 8 deletions(-) - -commit c0c8cc1592ee6aa13157e34f8083b951d487a413 -Author: Adrian Johnson -Date: Thu Feb 23 21:13:23 2012 +1030 - - glib docs: fix typo - - glib/poppler.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit fde3bed0f400a50f31f1f6bcee44ac1b2c17ddc6 -Author: Albert Astals Cid -Date: Wed Feb 22 00:03:37 2012 +0100 - - pdfinfo: decode utf-16 surrogate pairs - - Based on a patch by Adrian Johnson - Bug 23075 - - utils/pdfinfo.cc | 14 ++++++++++++-- - 1 file changed, 12 insertions(+), 2 deletions(-) - -commit 3361564364a1799fc3d6c6df9f208c5531c407dc -Author: Adrian Johnson -Date: Tue Feb 21 22:20:02 2012 +0100 - - Expand glyph name ligatures such as "ff", "ffi" etc to normal form - - Bug 7002 - - poppler/GfxFont.cc | 14 +++++++++++++- - poppler/UnicodeTypeTable.cc | 9 +++++++++ - poppler/UnicodeTypeTable.h | 3 +++ - 3 files changed, 25 insertions(+), 1 deletion(-) - -commit d0186c558f4a84a9317687ad50b460d34fb5fdf0 -Author: Pino Toscano -Date: Mon Feb 20 22:18:00 2012 +0100 - - cmake: support for lcms2 - - followup of e48c22d3b70412015b9cc07a9a6ce07845274e13 also for the - CMake build system, - importing the FindLCMS2.cmake from kdelibs - - CMakeLists.txt | 26 +++++++++++++-- - cmake/modules/FindLCMS2.cmake | 73 - +++++++++++++++++++++++++++++++++++++++++++ - config.h.cmake | 3 ++ - utils/CMakeLists.txt | 3 ++ - 4 files changed, 102 insertions(+), 3 deletions(-) - -commit e48c22d3b70412015b9cc07a9a6ce07845274e13 -Author: Koji Otani -Date: Mon Feb 20 22:04:01 2012 +0100 - - Add support for lcms2 - - configure.ac | 24 ++++++- - poppler/GfxState.cc | 159 - +++++++++++++++++++++++++++----------------- - qt4/src/poppler-document.cc | 5 ++ - utils/pdftocairo.cc | 17 +++++ - 4 files changed, 143 insertions(+), 62 deletions(-) - -commit 1bcae7aa8f87cc85ee6b477bf0abb49452e46505 -Author: Igor Slepchin -Date: Sun Feb 19 23:40:50 2012 +0100 - - Consistently check if pdftohtml needs to generate outlines. - - utils/pdftohtml.cc | 9 ++++++++- - 1 file changed, 8 insertions(+), 1 deletion(-) - -commit 126bf08105e319f9216654782e5a63f99f1d1825 -Author: Albert Astals Cid -Date: Sun Feb 19 23:18:25 2012 +0100 - - Update glyph names to Unicode values mapping - - Added Zapf Dingbat names and fixed copyrightsans, copyrightserif, - registersans, registerserif, trademarksans, trademarkserif - Kudos to Adrian Johnson for find what was missing :-) - Bug #13131 - - poppler/NameToUnicodeTable.h | 213 - +++++++++++++++++++++++++++++++++++++++++-- - 1 file changed, 207 insertions(+), 6 deletions(-) - -commit c0fec84312a37f62bdbfdee7c8e9b520af28330a -Author: Pino Toscano -Date: Sun Feb 19 14:47:24 2012 +0100 - - fix typo, GString -> GooString - - goo/GooString.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit aaae8996766f259dcc329755c7cccde7c916c1fb -Author: Adrian Johnson -Date: Thu Feb 16 22:22:15 2012 +1030 - - cairo: set mask matrix before drawing an image with a mask - - Bug 40828 - - poppler/CairoOutputDev.cc | 1 + - 1 file changed, 1 insertion(+) - -commit fff439f25d9bbd199db5646deccd80733138898e -Author: Adrian Johnson -Date: Sun Feb 19 15:45:31 2012 +1030 - - update .gitignore - - utils/.gitignore | 1 + - 1 file changed, 1 insertion(+) - -commit 1cc3e152d6e879eb13fbdf2964ede3e01d13d097 -Author: Adrian Johnson -Date: Sun Feb 19 15:43:09 2012 +1030 - - glib docs: fix typo - - glib/poppler-page.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 4f4db591276ec156c55b3a3c2020a1cf82f1519b -Author: Adrian Johnson -Date: Sun Feb 19 15:37:04 2012 +1030 - - cairo: fix pdftocairo crash when pdf document uses actualText - - poppler/CairoOutputDev.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 9b72ee4e4c8658b2f7cd542d601a5c3be621d3fc -Author: Thomas Freitag -Date: Sat Feb 18 17:34:12 2012 +0100 - - Make some of the unfilteredResets be really unfiltered - - poppler/Stream.cc | 26 ++++++++++++++++++++------ - poppler/Stream.h | 3 +++ - 2 files changed, 23 insertions(+), 6 deletions(-) - -commit 33aded82fbd98832eaab7cb7487fe6a1c7ef15f5 -Author: Albert Astals Cid -Date: Sat Feb 18 17:21:10 2012 +0100 - - Rework XRef getNumObjects and getSize - - Kill XRef::last since we do not maintain it correctly, now - getNumObjects returns size as it did - Kill getSize as it just returns the same as getNumObjects - - poppler/PDFDoc.cc | 10 +++++----- - poppler/XRef.cc | 12 +----------- - poppler/XRef.h | 6 ++---- - 3 files changed, 8 insertions(+), 20 deletions(-) - -commit 521d3740e9b7d2cfacf29f089a4a8f6c962de807 -Author: Adrian Johnson -Date: Mon Feb 13 22:05:18 2012 +1030 - - pdfimages: add -list option to list all images - - Bug 46066 - - utils/ImageOutputDev.cc | 204 - ++++++++++++++++++++++++++++++++++++++++++------ - utils/ImageOutputDev.h | 20 ++++- - utils/pdfimages.1 | 101 ++++++++++++++++++++++++ - utils/pdfimages.cc | 12 ++- - 4 files changed, 307 insertions(+), 30 deletions(-) - -commit 119b6b752314c9b13440eddf5bd1d5cef2966e80 -Author: Adrian Johnson -Date: Mon Feb 6 16:50:11 2012 +1030 - - cairo: don't read inline image streams twice - - Bug 45668 - - poppler/CairoOutputDev.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit a76135391555145ec740d49a7141e60da0ea5dee -Author: Hib Eris -Date: Tue Feb 14 20:11:19 2012 +0100 - - Add a configuration option for the test data dir - - This makes 'make distcheck' run succesfully. - - CMakeLists.txt | 20 ++++++++++++++++++++ - Makefile.am | 2 +- - configure.ac | 42 - +++++++++++++++++++++++++++++++++++++++++ - qt4/tests/CMakeLists.txt | 1 + - qt4/tests/Makefile.am | 1 + - qt4/tests/check_actualtext.cpp | 2 +- - qt4/tests/check_attachments.cpp | 14 +++++++------- - qt4/tests/check_fonts.cpp | 18 +++++++++--------- - qt4/tests/check_links.cpp | 6 +++--- - qt4/tests/check_metadata.cpp | 32 +++++++++++++++---------------- - qt4/tests/check_optcontent.cpp | 12 ++++++------ - qt4/tests/check_pagelayout.cpp | 6 +++--- - qt4/tests/check_pagemode.cpp | 10 +++++----- - qt4/tests/check_password.cpp | 12 ++++++------ - qt4/tests/check_permissions.cpp | 2 +- - qt4/tests/check_search.cpp | 4 ++-- - 16 files changed, 124 insertions(+), 60 deletions(-) - -commit 59946e0c34e762eb5f5a13b4ae8c9ec7fb21379a -Author: Thomas Freitag -Date: Tue Feb 14 19:37:21 2012 +0100 - - Overprint implementation in postscript and splash device - - It is an enhancement patch, a - merge fix and a bug fix in one: an enhancement, because it now - completes - the implementation overprint mode and devicen in postscript, a merge - fix, because it fixes some bugs in the overprint implementation in - splash of xpdf 3.0.3 and has now the complete functionality (and - more!) - of my implementation back again and a bug fix, because it fixes - the use - of splash cmyk in postscript which never had worked. - - 1. Overprint implementation in postscript - To have a complete overprint implementation in the (pure) postscript - device there were just two things missing: overprint mode and the - implementation of the DeviceN colorspace in PostScript. I double - checked - my implementation with the Ghent Test Suite with GhostScript (device - pdfwrite) and Acrobat X distiller, and all the tests now succeeds, - either in Acrobat X distiller or in GhostScript. As overprint is a - device dependent feature, it is up to the output device if it supports - overprint and what features of overprint are supported, and often You - have various configuration possibilities there. Nearly all PostScript - output of the Ghent tests show now the desired results if converting - it - back to PDF with ghostscript pdfwrite, the implementation in - ghostscript - is complete. On the other hand a few tests failed when using Acrobat X - distiller, all of them with the overprint mode switch. Funny, because - overprint mode 1 is often also called the illustrator overprint mode - because it was introduced by illustrator, but probably the destiller - only handles EPS correctly which comes from illustrator - - 2. Overprint implementation in postscript if using splash - rasterization - Of course the postscript overprint implementation will only work if - pdftops doesn't decide to use splash to rasterize it because of - the use - of transparencies in the PDF. But because overprint is device - dependent - I decided to spend an additional parameter "overprint" to pdftops - (simular to pdftoppm). Switching it on (only available if compiled - with - SPLASH_CMYK, because overprint is only in CMYK colorspace showable) - will - use the overprint implementation in splash also if rasterizing - the PDF. - - 3. Overprint implementation in splash - The overprint implementation in splash now uses the better designed - interface of xpdf and therefore now also works in transparency groups. - Thanks to the developper team of xpdf. I just fixed a small bug in it, - where it defies the technical specification. Of course it is still in - the nature of the splash implementation that it fails if CMYK values - should overprint spot colors, because spot colors are converted - immediately in their CMYK alternates. And in the implementation of - overprinting spot colors over CMYK colors I made a small assumption to - get it running which causes undesired results if this assumption - fails, - but I didn't want to implement more and more configuration switches. I - still plan to implement a DeviceN output in splash and make a complete - implementation there, but this is of course a bigger task (but - doable). - The overprint switch in pdftoppm is still only available if compiled - with the SPLASH_CMYK directive. - - poppler/PSOutputDev.cc | 67 ++++++++++-- - poppler/PSOutputDev.h | 3 +- - poppler/SplashOutputDev.cc | 62 ++++++++++-- - poppler/SplashOutputDev.h | 4 +- - splash/Splash.cc | 70 +++++++++---- - splash/Splash.h | 4 +- - splash/SplashState.cc | 5 +- - splash/SplashState.h | 247 - +++++++++++++++++++++++---------------------- - utils/pdftops.cc | 13 +++ - 9 files changed, 308 insertions(+), 167 deletions(-) - -commit b505920db6d3dac58c7e9f4f8917f4c4449b08a0 -Merge: 9250449a a6312817 -Author: Albert Astals Cid -Date: Tue Feb 14 19:18:54 2012 +0100 - - Merge remote-tracking branch 'origin/xpdf303merge' - - Conflicts: - utils/HtmlOutputDev.cc - utils/HtmlOutputDev.h - -commit 9250449aaa279840d789b3a7cef75d06a0fd88e7 -Author: Hib Eris -Date: Sun Feb 12 23:16:41 2012 +0100 - - Improve moc detection when cross compiling - - configure.ac | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -commit 66cf1fdb3ba6894f61d9078f5c30046b464347ae -Author: Pino Toscano -Date: Sun Feb 12 22:27:58 2012 +0100 - - qt4: remove non-existing 'qt' include dirs - - qt4/demos/Makefile.am | 1 - - qt4/src/Makefile.am | 1 - - qt4/tests/Makefile.am | 1 - - 3 files changed, 3 deletions(-) - -commit 53d8fc4d2978b70e8926e3df71facd1f39de9348 -Author: Pino Toscano -Date: Sun Feb 12 17:36:55 2012 +0100 - - man pages: fix minor issues with hypens and % - - utils/pdfseparate.1 | 6 +++--- - utils/pdftocairo.1 | 4 ++-- - 2 files changed, 5 insertions(+), 5 deletions(-) - -commit a63128179c65b5d9d6d9d41fa601a593b0a05d94 -Author: Thomas Freitag -Date: Thu Feb 9 22:02:52 2012 +0100 - - [xpdf303] Fix merge issue - - utils/pdftoppm.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit cd5a6a4d02e579e543067d1847164aff90363f16 -Author: Thomas Freitag -Date: Thu Feb 9 22:01:42 2012 +0100 - - [xpdf303] Fix merge bug - - poppler/GfxState.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 597fa37cacec928c40d0491174ce843fe01f26d9 -Author: Igor Slepchin -Date: Wed Feb 8 19:22:13 2012 -0500 - - Close li tags in generated outlines. - - Also, add newlines after ul tags for better readability. - Bug #45807 - (cherry picked from commit bf81250ff7d0968852fc7559fafb6389cd695b91) - - utils/HtmlOutputDev.cc | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) - -commit 2fc36dba5f63703896722adb5127896e4c2840e7 -Author: Igor Slepchin -Date: Thu Feb 9 00:15:13 2012 +0100 - - Get rid of static data members; merge duplicated jpeg dumping code. - - HtmlPage::pgNum is never used; - imgNum is always equal to imgList->getLength()+1 - imgList is now maintained in HtmlPage. - - utils/HtmlOutputDev.cc | 143 - +++++++++++++++++++------------------------------ - utils/HtmlOutputDev.h | 15 ++++-- - 2 files changed, 65 insertions(+), 93 deletions(-) - -commit f655efe327ddd3b6a68353a62589d4e4f8a318a8 -Author: Albert Astals Cid -Date: Wed Feb 8 23:58:27 2012 +0100 - - Fix memory leak when using HtmlOutputDev::mapEncodingToHtml - - Bug #45805 - (cherry picked from commit 53a0c2043dfd56f6da7780f1a049f75af368b84b) - - utils/HtmlOutputDev.cc | 47 - ++++++++++++++++++++++++----------------------- - utils/HtmlOutputDev.h | 7 ++++--- - 2 files changed, 28 insertions(+), 26 deletions(-) - -commit 68f02d19c571fce956c7f4af6ccd0ff9ba8b1b03 -Author: Albert Astals Cid -Date: Wed Feb 8 23:47:46 2012 +0100 - - Fix leak in pdftohtml getInfoString - - Bug #45805 - (cherry picked from commit 4afe4d827a342a847e8b89aba5b4164ed3b4cc32) - - utils/pdftohtml.cc | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -commit 2b7ba166c28e32653db4ae7acf90e06e0dd5975b -Author: Albert Astals Cid -Date: Wed Feb 8 19:12:52 2012 +0100 - - [xpdf303] Compile fixes - - poppler/GlobalParamsWin.cc | 2 +- - poppler/SplashOutputDev.cc | 10 ---------- - 2 files changed, 1 insertion(+), 11 deletions(-) - -commit b8c9b179c9491cf6755b07bfdec4174e78b7d241 -Author: Albert Astals Cid -Date: Mon Feb 6 19:55:07 2012 +0100 - - [xpdf303] Adapt better to what we did and what xpdf303 does - - poppler/ArthurOutputDev.cc | 1 - - poppler/GlobalParams.cc | 10 ---------- - poppler/GlobalParams.h | 1 - - poppler/SplashOutputDev.cc | 3 --- - poppler/SplashOutputDev.h | 1 - - splash/SplashFTFont.cc | 40 - +++++++++++++++++++--------------------- - splash/SplashFTFont.h | 1 - - splash/SplashFTFontEngine.cc | 7 +++---- - splash/SplashFTFontEngine.h | 5 ++--- - splash/SplashFontEngine.cc | 3 +-- - splash/SplashFontEngine.h | 1 - - utils/pdftoppm.cc | 2 +- - 12 files changed, 26 insertions(+), 49 deletions(-) - -commit ea6bc19564865e04431d9154802ae7fba975a716 -Merge: e17f0956 92ce79f4 -Author: Albert Astals Cid -Date: Mon Feb 6 01:18:25 2012 +0100 - - Merge branch 'master' into xpdf303merge - - Conflicts: - poppler/CairoOutputDev.cc - poppler/CairoOutputDev.h - poppler/FontInfo.cc - poppler/GfxFont.cc - poppler/GfxState.cc - poppler/GlobalParams.cc - poppler/GlobalParams.h - poppler/Lexer.cc - -commit e17f09563276ee25b6acfc127b6ea360da650030 -Author: Albert Astals Cid -Date: Mon Feb 6 00:25:53 2012 +0100 - - [xpdf303] TextOutputDev and associated changes - - cpp/poppler-page.cpp | 10 +- - glib/poppler-page.cc | 5 +- - poppler/ArthurOutputDev.cc | 1 + - poppler/CairoOutputDev.cc | 2 +- - poppler/Gfx.cc | 6 +- - poppler/PSOutputDev.cc | 6 +- - poppler/TextOutputDev.cc | 360 - ++++++++++++++++++++++++++++----------------- - poppler/TextOutputDev.h | 18 ++- - qt4/src/poppler-page.cc | 12 +- - test/perf-test.cc | 2 +- - utils/pdftotext.1 | 4 + - utils/pdftotext.cc | 10 +- - 12 files changed, 270 insertions(+), 166 deletions(-) - -commit 548648bf29dc1551443eb1925814342e7aadee46 -Author: Albert Astals Cid -Date: Sun Feb 5 23:08:44 2012 +0100 - - [xpdf303] Merge PDFDoc encryption related code - - poppler/PDFDoc.cc | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -commit 6ee907f291427b8751a872b31210bf32e8d2b722 -Author: Albert Astals Cid -Date: Sun Feb 5 22:57:25 2012 +0100 - - [xpdf303] More merges from Thomas, basically PSOutputDev and some - other small stuff - - poppler/GfxFont.cc | 4 +- - poppler/GlobalParams.cc | 95 ++- - poppler/GlobalParams.h | 18 +- - poppler/GlobalParamsWin.cc | 16 +- - poppler/Hints.cc | 2 +- - poppler/PSOutputDev.cc | 1814 - ++++++++++++++++++++++--------------------- - poppler/PSOutputDev.h | 51 +- - poppler/Parser.cc | 13 +- - poppler/Parser.h | 7 +- - poppler/PreScanOutputDev.cc | 70 +- - poppler/PreScanOutputDev.h | 16 +- - poppler/XRef.cc | 91 ++- - poppler/XRef.h | 3 +- - utils/pdftops.cc | 2 +- - 14 files changed, 1231 insertions(+), 971 deletions(-) - -commit 92ce79f47f929392f48737612a9690088573f63d -Author: Igor Slepchin -Date: Sun Feb 5 15:55:39 2012 +0100 - - Proper unicode support when dumping PDF outline. - - Also use of already existing Outline class rather than parsing the - outline anew. - - Bug 45572 - (cherry picked from commit 40f7289ab04787734b856c53d5c0139445b52635) - - Conflicts: - - utils/HtmlOutputDev.cc - - utils/HtmlOutputDev.cc | 197 - ++++++++++++++++++++++++++----------------------- - utils/HtmlOutputDev.h | 6 +- - utils/pdftohtml.cc | 3 +- - 3 files changed, 112 insertions(+), 94 deletions(-) - -commit 38ec58ed1cb54722aece875287b847643aa2c4b8 -Author: Adrian Johnson -Date: Sat Feb 4 17:13:30 2012 +1030 - - Lexer: convert integer to real when overflow occurs - - Bug 45605 - - poppler/Lexer.cc | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -commit df89de61b7d01f0f816e773cdb809faa3053e962 -Author: Hib Eris -Date: Tue Jan 31 20:01:30 2012 +0100 - - glib: Exclude poppler-private.h from introspection files - - Fixes bug #45455. - - glib/CMakeLists.txt | 2 +- - glib/Makefile.am | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit 88cb6d9360bc943fc2cdda262dc46bf831641541 -Author: Carlos Garcia Campos -Date: Sat Feb 4 12:04:03 2012 +0100 - - glib: Update gtk-doc makefile and m4 file - - gtk-doc.make | 112 - +++++++++++++++++++++++++++++++++------------------------- - m4/gtk-doc.m4 | 6 ++++ - 2 files changed, 70 insertions(+), 48 deletions(-) - -commit 3f4164f84bbf748a2f919741669ef20db0fbda9f -Author: Hib Eris -Date: Wed Feb 1 10:44:17 2012 +0100 - - gtk-doc: Fix build when builddir != srcdir - - Bug #45549. - - glib/reference/Makefile.am | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -commit 8daeb82f982eba25fe8c7d07358f0a6593ddc89a -Author: Hib Eris -Date: Thu Feb 2 13:01:45 2012 +0100 - - gtk-doc: Fix API documentation for poppler_page_free_annot_mapping() - - Remove reference to non existent method poppler_annot_free() and use - ref/unref instead of copy/free. - - Bug #45549. - - glib/poppler-page.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit f8ce9966e4f480949799a26c01bd861f4011b587 -Author: Carlos Garcia Campos -Date: Sat Feb 4 11:51:34 2012 +0100 - - gtk-doc: Remove reference to non existent method poppler_layer_free() - - Bug #45549. - - glib/poppler-document.cc | 7 +++---- - 1 file changed, 3 insertions(+), 4 deletions(-) - -commit f58f3525f135bc47e89c23c33e96e43db10d4853 -Author: Hib Eris -Date: Thu Feb 2 15:59:47 2012 +0100 - - gtk-doc: Add more glib API documentation for poppler-document - - Fixes several gtk-doc warnings. - - Bug #45549. - - glib/poppler-document.h | 26 +++++++++++++------------- - 1 file changed, 13 insertions(+), 13 deletions(-) - -commit 080247f6a47bc929b25f6e000f4474801af74b1f -Author: Hib Eris -Date: Thu Feb 2 15:45:37 2012 +0100 - - gtk-doc: remove references to removed pixbuf functions - - Bug #45549. - - glib/poppler-page.cc | 6 ++---- - glib/reference/poppler-sections.txt | 4 ---- - 2 files changed, 2 insertions(+), 8 deletions(-) - -commit 47780d9ed1fd69068fdb9b9782e2cb37e2a5b217 -Author: Hib Eris -Date: Thu Feb 2 15:43:30 2012 +0100 - - gtk-doc: do not build doc for glib-demo - - Fixes glib-demo symbols in poppler-unused.txt - - Bug #45549. - - glib/reference/Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit e320f335cc6e54c60bd2436799dd1f05beb060ba -Author: Hib Eris -Date: Sat Feb 4 11:32:50 2012 +0100 - - gtk-doc: Fix typo's - - Bug #45549. - - glib/poppler-annot.cc | 6 +++--- - glib/poppler-annot.h | 2 +- - glib/poppler-document.cc | 2 +- - glib/poppler-media.cc | 2 +- - glib/poppler-page.cc | 3 +-- - glib/poppler-page.h | 4 ++-- - glib/reference/poppler-sections.txt | 4 +++- - 7 files changed, 12 insertions(+), 11 deletions(-) - -commit 1fe27b07975e9a9455708563118fb73cce696f81 -Author: Hib Eris -Date: Tue Jan 31 12:49:01 2012 +0100 - - cairo: Remove unused variable in CairoFontEngine.cc - - Fixes bug #45442. - - poppler/CairoFontEngine.cc | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -commit e3d80c79815ce46daf3c3f2b944f49eaf19bfea5 -Author: Hib Eris -Date: Tue Jan 31 14:42:04 2012 +0100 - - Fix return value of downscale_box_filter() - - Fixes bug #45441. - - poppler/CairoRescaleBox.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit e074e526fa206403b84da5ce0f27d7357223c7ac -Author: Hib Eris -Date: Tue Jan 31 13:02:16 2012 +0100 - - Fix return value of poppler_attachment_save - - Fixes bug #45440. - - glib/poppler-attachment.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit bc389cff91c350d7da186d4cf707c389c77bbc29 -Author: Hib Eris -Date: Tue Jan 31 14:03:08 2012 +0100 - - glib-demo: Do not use deprecated gtk_dialog_set_has_separator() - - Bug #45439 - - glib/demo/main.c | 2 ++ - 1 file changed, 2 insertions(+) - -commit e52e3c24663edaa630d9187e832223b474b74089 -Author: Hib Eris -Date: Tue Jan 31 13:39:05 2012 +0100 - - glib-demo: Do not use deprecated GtkComboBox API - - Bug #45439. - - glib/demo/annots.c | 6 ++++++ - glib/demo/print.c | 9 ++++++++- - glib/demo/render.c | 16 ++++++++++++++++ - glib/demo/selections.c | 8 ++++++++ - 4 files changed, 38 insertions(+), 1 deletion(-) - -commit 165ab4ec122d0e1a6f30dcfba80aefc422cd83b7 -Author: Hib Eris -Date: Tue Jan 31 12:15:51 2012 +0100 - - Fix build for builddir != srcdir - - Fixes bug #45434. - - glib/Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit e424a13bb516464d59ad76fd0933e92f3307b21b -Author: Thomas Freitag -Date: Fri Feb 3 00:12:10 2012 +0100 - - pdfseparate fixes by Thomas after his last commit - - poppler/PDFDoc.cc | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -commit 4fcd42cfa4424992cd4b36af38bc6230ce0706c9 -Author: Albert Astals Cid -Date: Wed Feb 1 22:53:03 2012 +0100 - - [xpdf303] More merges from Thomas (with minor fixes from me) - - Basically fonts related and some other small stuff - - poppler/Annot.cc | 6 +- - poppler/ArthurOutputDev.cc | 47 +-- - poppler/CMap.cc | 153 ++++++++ - poppler/CMap.h | 16 + - poppler/CairoFontEngine.cc | 43 +-- - poppler/CharCodeToUnicode.h | 1 + - poppler/FontInfo.cc | 8 +- - poppler/Gfx.cc | 363 +++++++++++-------- - poppler/GfxFont.cc | 831 - +++++++++++++++++++++++++++++--------------- - poppler/GfxFont.h | 34 +- - poppler/GfxState.cc | 81 +++-- - poppler/GfxState.h | 2 + - poppler/GlobalParams.cc | 738 ++++++++++++++++++++++----------------- - poppler/GlobalParams.h | 112 +++--- - poppler/GlobalParamsWin.cc | 180 ++++++++-- - poppler/PSOutputDev.cc | 591 +++++++++++++++---------------- - poppler/PSOutputDev.h | 12 +- - poppler/PreScanOutputDev.cc | 10 +- - poppler/SplashOutputDev.cc | 59 ++-- - poppler/XRef.cc | 16 +- - 20 files changed, 2008 insertions(+), 1295 deletions(-) - -commit 0089357de8ea96f3e394ea9cb37e8182ccf15ae2 -Author: Thomas Freitag -Date: Wed Feb 1 19:17:38 2012 +0100 - - pdfseparate: Produce PDF/X conformant pdf pages if the original PDF - was PDF/X conformant. - - poppler/PDFDoc.cc | 63 - ++++++++++++++++++++++++++++++++++--------------------- - poppler/XRef.cc | 9 +++++++- - poppler/XRef.h | 5 ++++- - 3 files changed, 51 insertions(+), 26 deletions(-) - -commit be62a4f2e7d5db3b6d85d1b3026979f9561e6e15 -Author: Hib Eris -Date: Mon Jan 30 17:07:28 2012 +0100 - - Fix build with latest mingw-w64 headers - - Fixes bug #45407. - (cherry picked from commit 58c17c3a61f18a6808ec9ba37e82734a655090ac) - - glib/poppler-annot.cc | 1 + - glib/poppler-document.cc | 1 + - 2 files changed, 2 insertions(+) - -commit acbc63348ce5e279e4d66ed4f240dc8d61df4e57 -Author: Suzuki Toshiya -Date: Mon Jan 30 20:46:04 2012 +1030 - - pdftocairo/automake: link with lcms - - utils/Makefile.am | 5 +++++ - 1 file changed, 5 insertions(+) - -commit 9548573a16629fecdbd44c9aac8b626ec6f53b81 -Author: Pino Toscano -Date: Mon Jan 30 00:32:52 2012 +0100 - - glib/cmake: various minor introspection improvements - - "port" to CMake of the automake equivalents of - 4765c3289635fe4fb006e7df4f83d7056eb42855 - - glib/CMakeLists.txt | 3 +++ - 1 file changed, 3 insertions(+) - -commit bf2ffb1cc76bcf569419ac495f524c41bb6f1650 -Author: Pino Toscano -Date: Mon Jan 30 00:21:31 2012 +0100 - - cmake: support $(gir_name)_EXPORT_PACKAGES for g-ir-scanner - - cmake/modules/GObjectIntrospectionMacros.cmake | 2 ++ - 1 file changed, 2 insertions(+) - -commit cbe7131e63c5896010e7e1ad5c0c3aa91611704d -Author: Albert Astals Cid -Date: Fri Jan 27 00:36:18 2012 +0100 - - Set OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG if you have it - - Fixes/workarounds bug 43414 with openjpeg 1.5 (unreleased) - (cherry picked from commit de6415af1a39ec7dfa4f149c6c5e311b86352cec) - - cmake/modules/FindLIBOPENJPEG.cmake | 13 +++++++++++++ - config.h.cmake | 3 +++ - configure.ac | 8 ++++++++ - poppler/JPEG2000Stream.cc | 7 ++++++- - 4 files changed, 30 insertions(+), 1 deletion(-) - -commit 641526d1a7e8032ea8f7b8ac42c5ad8c20448d9b -Author: Adrian Johnson -Date: Wed Jan 25 22:44:27 2012 +1030 - - jpeg: set image parameters after jpeg_set_defaults() - - so the resolution does not get overwritten by the defaults. - - The libjpeg documentation for jpeg_set_defaults() states: "This - routine sets all JPEG parameters to reasonable defaults, using only - the input image's color space (field in_color_space, which must - already be set in cinfo)" - - Bug 45224 - - goo/JpegWriter.cc | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -commit f7356a88fe983c2ddd7d5a50400768310a26c4d2 -Author: Adrian Johnson -Date: Thu Jan 26 11:33:28 2012 +1030 - - glib: add section in docs for new symbols in 0.18 - - glib/reference/poppler-docs.sgml | 4 ++++ - 1 file changed, 4 insertions(+) - -commit b42c171de93dba56859beb21cfe5312d825fedd6 -Author: Alexander Saprykin -Date: Mon Jan 23 22:07:15 2012 +0100 - - Do not use 50Kb of stack in SplashXPath::addCurve - - Bug 44905 - - splash/SplashXPath.cc | 69 - ++++++++++++++++++++++++++++++++++++--------------- - 1 file changed, 49 insertions(+), 20 deletions(-) - -commit a04fca6266bda6d04068f38f16fe492cb6b8677b -Author: Adrian Johnson -Date: Sat Jan 21 09:41:12 2012 +1030 - - cairo: use fabs when comparing the transformed line width - - as the transform may cause a negative width. - - Bug 43441 - - poppler/CairoOutputDev.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit ce1b6c7ca16847f07eeafc29c6503be6fa5a9a3d -Author: Patrick Pfeifer -Date: Thu Jan 19 14:54:48 2012 +0100 - - cairo: Fix test for rotation - - Fixes bug #14619. - - poppler/CairoOutputDev.cc | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -commit 4765c3289635fe4fb006e7df4f83d7056eb42855 -Author: Evan Nemerson -Date: Sun Jan 15 11:02:50 2012 -0800 - - glib: various minor introspection and documentation improvements - - Bug 44790 - - glib/Makefile.am | 4 +++- - glib/poppler-annot.cc | 8 ++++---- - glib/poppler-attachment.h | 7 ++++--- - glib/poppler-document.cc | 6 ++++-- - glib/poppler-media.h | 7 ++++--- - glib/poppler-page.cc | 23 +++++++++++++++-------- - 6 files changed, 34 insertions(+), 21 deletions(-) - -commit e8e42988c5cebab2ffa5fe020f30a3a645e90b5f -Author: Adrian Johnson -Date: Mon Jan 16 21:25:19 2012 +1030 - - cairo: ensure paintTransparencyGroup uses same ctm as - beginTransparencyGroup - - Bug 29968 - - poppler/CairoOutputDev.cc | 8 ++++++-- - poppler/CairoOutputDev.h | 1 + - 2 files changed, 7 insertions(+), 2 deletions(-) - -commit f6c7aa752f9455bba1aa3c72e0998e7911c1d43e -Author: Adrian Johnson -Date: Wed Jan 18 21:19:43 2012 +1030 - - configure.ac: print the glib version required if not found - - configure.ac | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - -commit 100488ec7db2d1f3e25bfda42c1603ca86696195 -Author: Adrian Johnson -Date: Sun Jan 15 23:52:28 2012 +1030 - - cairo: restore temporary clip used in CairoOutputDev::fill when - painting a mask - - The clip is only used to clip the paint to the fill path so it should - be moved inside the save/restore. - - poppler/CairoOutputDev.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 9c092e17e8f0cf0335b431a223e6e44bddc27e64 -Author: Albert Astals Cid -Date: Sun Jan 15 23:28:51 2012 +0100 - - [xpdf] More Splash and Gfx changes from Thomas - - 1. merge of blend changes - Here I had not only merged the changed in blend modes, I made also - a few - changes in the SPLASH_CMYK area, so that the already sent PDF now also - be rendered correctly with the -jpegcmyk option - 2. merge of font handling in SplashOutputDev.cc - There were a few changes left in font handling, I took them over - 3. merge of getcolor-changes - The getcolor changes win a price for well defined C++ code. I wouldn't - have merged them, if there were not a lot of other things to merge. - 4. merge of image handling in SplashOutputDev.cc - I merged the left changes in image handling including colorizing masks - in pattern colorspace - 5. cleanup of overprint - I tested the overprint implementation of Derek. They succeed only - in 70 - % percent of the PDF where my solution had success, but Derek's - solution - is much cleaner, and I'm sure that I could also fix the rest in - it. BUT: - as I already considered, when I implemented overprint, there are some - overprint situations, which can not be solved in a CMYK colorspace, we - have to implement a DeviceN colorpace when also overprint from CMYK - colors over spot colors should work. Therefore I decided to remove my - overprint implementation completely from the code and let Derek's - solution in, even if there could be done some enhancements in it. - 6. colorizing text in pattern colorspace - When I saw Derek's implementation with a clean interface only at one - place in Gfx.cc, I first was very surprised. My solution had a lot of - places in Gfx.cc, where I looked if the current colorspace is - a pattern - colorspace. Therefore I first had a look into the PDF specification - again, and really, it can be done in the way of Derek. Therefore I - merged it and removed the fragments of my code. - - On this step I started a regtest against the version after the fourth - patch. There were a lot of enhancements, especially in texts with - symbolic chars like mathematical and so on, but there was one - (and ONLY - one) regression, shown in bug-poppler27482.pdf - I examined that (that is also the reason for the delay) and - encountered - that on merging I removed my solution for this bug, therefore - - 7. insert enhancements for colorizing masks in pattern colorspace - I adapt the bug fix from bug 27482 to the merge. - - poppler/CairoOutputDev.cc | 101 ++-- - poppler/CairoOutputDev.h | 21 +- - poppler/Gfx.cc | 705 +++++++++++++++----------- - poppler/Gfx.h | 22 +- - poppler/GfxState.cc | 208 +++++--- - poppler/GfxState.h | 37 +- - poppler/GlobalParams.cc | 17 + - poppler/GlobalParams.h | 3 + - poppler/OutputDev.cc | 13 +- - poppler/OutputDev.h | 25 +- - poppler/PSOutputDev.cc | 87 ++-- - poppler/PSOutputDev.h | 21 +- - poppler/PreScanOutputDev.cc | 2 +- - poppler/SplashOutputDev.cc | 1179 - +++++++++++++++++++++---------------------- - poppler/SplashOutputDev.h | 80 +-- - poppler/TextOutputDev.cc | 8 + - poppler/TextOutputDev.h | 8 + - splash/Splash.cc | 11 +- - splash/Splash.h | 122 ++--- - splash/SplashPattern.cc | 14 - - splash/SplashPattern.h | 7 - - utils/pdftoppm.cc | 1 + - 22 files changed, 1390 insertions(+), 1302 deletions(-) - -commit 69df13c49cea2390f2c5036f3d450f134f7a2656 -Author: Thomas Freitag -Date: Sun Jan 15 15:07:18 2012 +0100 - - Fix stack overflow in PDFDoc::markObject() - - Bug 44660 - - poppler/PDFDoc.cc | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -commit cdb56567c60b492ad08befff54f2ff70620b86fe -Author: Thomas Freitag -Date: Sun Jan 15 15:04:51 2012 +0100 - - Correctly initialize globalParams - - utils/pdfseparate.cc | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -commit 4e205a6625431dcf95375de009b4354746a4f0b7 -Author: Adrian Johnson -Date: Sun Jan 15 22:18:30 2012 +1030 - - parseargs: don't use arg->size with GooString argument - - 40b56994 added GooString arguments but incorrectly used arg->size as - the string length. arg->size is always 0 for GooString arguments. This - worked because the arg->size - 1 string length passed to - GooString::Set() just happened to be the the same value as the - CALC_STRING_LEN default argument indicating the string length is to be - calculated with strlen. - - utils/parseargs.cc | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -commit a7210a7ebc3d3ca88643bfbc2f0d660a5553a668 -Author: Arseny Solokha -Date: Fri Jan 13 18:52:17 2012 +0100 - - Properly initialize globalParams - - Bug 44659 - - utils/pdfunite.cc | 4 ++++ - 1 file changed, 4 insertions(+) - -commit baaf93f0e47a1978f9ea80e9394543a25b763d77 -Author: Adrian Johnson -Date: Thu Jan 12 01:05:07 2012 +1030 - - configure.ac: print the cairo version required if not found - - Bug 44619 - - configure.ac | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -commit 9b8b4232587831fdada37de033c272a3c5049c34 -Author: Adrian Johnson -Date: Thu Jan 12 00:26:03 2012 +1030 - - cairo: avoid setting huge clip area when printing - - Bug 44002 - - poppler/CairoOutputDev.cc | 21 ++++++++++++--------- - 1 file changed, 12 insertions(+), 9 deletions(-) - -commit efe115f22f8f00a2863ef265ad6f4e7cc2e0336c -Author: Albert Astals Cid -Date: Tue Jan 10 23:41:54 2012 +0100 - - compile - - poppler/ArthurOutputDev.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 52d190d8ff962a57a59218f6871c3a63a443ea53 -Author: Albert Astals Cid -Date: Tue Jan 10 23:33:40 2012 +0100 - - [xpdf303] tiling "merges" from Thomas, using mostly our "old" code - instead of xpdf's - - poppler/CairoOutputDev.cc | 2 +- - poppler/CairoOutputDev.h | 4 ++-- - poppler/Gfx.cc | 45 - +++++++++++++++++++++++++++++++++------------ - poppler/Gfx.h | 15 +++++++++------ - poppler/GfxState.cc | 5 ++++- - poppler/GfxState.h | 7 ++++--- - poppler/OutputDev.h | 3 ++- - poppler/PSOutputDev.cc | 2 +- - poppler/PSOutputDev.h | 2 +- - poppler/PreScanOutputDev.cc | 15 +++++++-------- - poppler/PreScanOutputDev.h | 2 +- - poppler/SplashOutputDev.cc | 8 ++++++-- - poppler/SplashOutputDev.h | 3 ++- - splash/Splash.cc | 32 ++++++++++++++++++++++++-------- - utils/ImageOutputDev.cc | 2 +- - utils/ImageOutputDev.h | 2 +- - 16 files changed, 99 insertions(+), 50 deletions(-) - -commit bf75a957650dd5208ecf1f6db1555a3d00b7949c -Author: Albert Astals Cid -Date: Tue Jan 10 23:31:27 2012 +0100 - - [xpdf303] Splash::blitTransparent merges from Thomas - - splash/Splash.cc | 10 +++++++--- - 1 file changed, 7 insertions(+), 3 deletions(-) - -commit 296244ab74e56b2781daae0a664617d1da30527c -Author: Albert Astals Cid -Date: Tue Jan 10 23:30:34 2012 +0100 - - [xpdf303] Merge xpath Splash stuff from Thomas - - splash/SplashXPath.cc | 22 +++++++++++++--------- - 1 file changed, 13 insertions(+), 9 deletions(-) - -commit e1ae7b900b01db7c7703da68ad94aa9bda1938f6 -Author: Albert Astals Cid -Date: Tue Jan 10 23:29:38 2012 +0100 - - [xpdf303] Merge splash font stuff from Thomas - - poppler/GlobalParams.cc | 17 +++++++++++++++++ - poppler/GlobalParams.h | 3 +++ - poppler/SplashOutputDev.cc | 3 +++ - poppler/SplashOutputDev.h | 1 + - splash/SplashFTFont.cc | 34 ++++++++++++++++++++++++++++------ - splash/SplashFTFont.h | 1 + - splash/SplashFTFontEngine.cc | 7 ++++--- - splash/SplashFTFontEngine.h | 5 +++-- - splash/SplashFontEngine.cc | 3 ++- - splash/SplashFontEngine.h | 1 + - 10 files changed, 63 insertions(+), 12 deletions(-) - -commit d46b673c46a72132fb3918b64733be552e35952f -Author: Albert Astals Cid -Date: Tue Jan 10 23:28:43 2012 +0100 - - [xpdf303] More merges from Thomas - - splash/Splash.cc | 2800 - ++++++++++++++++++++++++++++++++++++------------------ - splash/Splash.h | 60 ++ - 2 files changed, 1943 insertions(+), 917 deletions(-) - -commit 2cb40bab3b8c49d54c2a49554b30268ccb32899b -Author: Adrian Johnson -Date: Sun Jan 8 21:35:41 2012 +1030 - - Fix typo in pdffonts man page - - utils/pdffonts.1 | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 34ae382915d9d9b2b3c015fee3c24907a6b52b8b -Author: Albert Astals Cid -Date: Sat Jan 7 17:14:05 2012 +0100 - - xpdf303: Merge some stuff in Splash [Thomas Freitag] - - 1. merge the complete pipe changes - a) including the overprint implementation from Derek used by pipe - b) including the transfer function implementation - 2. Two changes (not really a merge) to get it compiled under windows - (in - GlobalParams.cc & PDFDoc.cc) - 3. merge fill and stroke changes - a) including merge of SplashClip.cc - b) including merge of SplashXPathScanner.cc - - poppler/GfxState.cc | 94 ++- - poppler/GfxState.h | 17 +- - poppler/GlobalParams.cc | 7 + - poppler/GlobalParams.h | 3 + - poppler/GlobalParamsWin.cc | 2 +- - poppler/PDFDoc.cc | 2 +- - poppler/SplashOutputDev.cc | 134 +++- - poppler/SplashOutputDev.h | 8 +- - splash/Splash.cc | 1658 - ++++++++++++++++++++++++++++++------------ - splash/Splash.h | 42 +- - splash/SplashClip.cc | 57 +- - splash/SplashState.cc | 49 ++ - splash/SplashState.h | 12 + - splash/SplashXPathScanner.cc | 474 +++++++----- - splash/SplashXPathScanner.h | 24 +- - 15 files changed, 1845 insertions(+), 738 deletions(-) - -commit c2378609ae52523beb64e0f040fc79dce4877e03 -Author: Thomas Freitag -Date: Sat Jan 7 11:47:19 2012 +0100 - - regtest: read stderr output before calling wait to fix a possible - deadlock - - In the way the scripts starts it subprocesses, stderr becomes buffered - for the subprocesses. And unforunately, when the buffer limit is - reached, the subprocess suspends it work until it can print again on - stderr. That's why the python script runs into a deadlock when the - subprocess produces a lot of error messages. A small rearrange of the - commands, first read the stderr output and then wait that the - subprocess - ends, will remove this deadlock. - - regtest/backends/__init__.py | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -commit da6bfacb0f858f27bd47f247a25d6bc9ab778411 -Author: Adrian Johnson -Date: Sat Jan 7 10:35:17 2012 +1030 - - Add -subst option to pdffonts to list the substitute font name - and filename - - Bug 44416 - - poppler/FontInfo.cc | 8 ++++-- - poppler/FontInfo.h | 2 ++ - poppler/GlobalParams.cc | 29 +++++++++++++++++++-- - poppler/GlobalParams.h | 3 ++- - utils/pdffonts.1 | 3 +++ - utils/pdffonts.cc | 67 - +++++++++++++++++++++++++++++++++++-------------- - 6 files changed, 88 insertions(+), 24 deletions(-) - -commit 9979b1b3e36dc8085d8c684692fece463fa474b1 -Author: Yi Yang -Date: Sat Jan 7 09:44:42 2012 +1030 - - Include .otf fonts when finding substitute fonts - - Bug 44412 - - poppler/GfxFont.cc | 2 +- - poppler/GlobalParams.cc | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit ebfab832ab4f2642b9ab2ededd25de670a3c7147 -Author: Adrian Johnson -Date: Fri Dec 23 09:55:20 2011 +1030 - - autoconf: Check for cairo-ft and other cairo backends - - so that CAIRO_LIBS includes the freetype dependency and pdftocairo - includes the dependencies for optional cairo backends. - - Bug 43969 - - configure.ac | 14 ++++++++++++-- - utils/Makefile.am | 4 ++-- - 2 files changed, 14 insertions(+), 4 deletions(-) - -commit 51ca2b7c7dec5430d29860fd887ad5c5d9b3f574 -Author: Albert Astals Cid -Date: Thu Dec 15 00:26:09 2011 +0100 - - [xpdf303] Some more changes in TextOutputDev - - poppler/TextOutputDev.cc | 23 ++++++++++++++++------- - 1 file changed, 16 insertions(+), 7 deletions(-) - -commit c5ce12993a4d2bcd3b3e95b1f08d00dc8960678c -Author: Albert Astals Cid -Date: Wed Dec 14 22:49:33 2011 +0100 - - [xpdf303] Merge some stuff from TextOutputDev - - Yes, this is the best commit log i could think of - - poppler/TextOutputDev.cc | 268 - ++++++++++++++++++++++++++++++----------------- - poppler/TextOutputDev.h | 19 ++-- - 2 files changed, 180 insertions(+), 107 deletions(-) - -commit 388d72ac27ae98fe3a1ebd21760f2b0fa0249a9b -Author: Albert Astals Cid -Date: Tue Dec 6 23:21:15 2011 +0100 - - include strings.h as we use memcpy - - Fixes bug 43558 - - goo/PNGWriter.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 743f70f594bf3c9a58d1ff0738b9a2bc3ea03382 -Author: Albert Astals Cid -Date: Tue Dec 6 20:27:03 2011 +0100 - - xpdf303: Use xpdf method against recursion while parsing - - Ours detected loops correctly, but not "valid" files containing lots - of arrays one inside the other [[[[[[[[[[[[[[[[[[[ - So go to this more crude "fix" used in xpdf - - poppler/Dict.cc | 4 ++-- - poppler/Dict.h | 2 +- - poppler/Object.cc | 4 ++-- - poppler/Object.h | 8 ++++---- - poppler/Parser.cc | 32 +++++++++++++++----------------- - poppler/Parser.h | 10 +++------- - poppler/XRef.cc | 33 +++++++-------------------------- - poppler/XRef.h | 2 +- - 8 files changed, 35 insertions(+), 60 deletions(-) - -commit 63c942a45227ef28fb94ef4765171d9812fffafa -Author: Albert Astals Cid -Date: Sun Dec 4 17:29:45 2011 +0100 - - Do not fail if we are trying to save a file with Encrypt but that - we have not modified at all - - Fixes KDE bug #288045 - - poppler/PDFDoc.cc | 49 +++++++++++++++++++++++++++++-------------------- - 1 file changed, 29 insertions(+), 20 deletions(-) - -commit 0937d775e59a963b72fa7924e0f7be484f8345fc -Author: Albert Astals Cid -Date: Sun Dec 4 15:37:20 2011 +0100 - - update name and copyright - (cherry picked from commit 22601c2a64f094ede8085a3ccca3de9daaa556e7) - - utils/pdftocairo.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit bdb439ac5a751d6146204ae0d61fdbf7828c89c3 -Author: Axel Strübing -Date: Thu Nov 24 22:32:57 2011 +0100 - - Fix typo/regression introduced in - f6d026bfa18624ccd321e102bb39ba744998de1e - - poppler/Gfx.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 74e11d8c912dd95d235e44e7b34b8ea1be082b9f -Author: Albert Astals Cid -Date: Thu Nov 24 18:54:27 2011 +0100 - - Fix typo - - qt4/src/poppler-qt4.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit ec2a1c3fca92a28c56911729927838f7aacf1078 -Author: Albert Astals Cid -Date: Wed Nov 16 23:13:52 2011 +0100 - - xpdf303: Use the correct sizeof() for the greallocn - - poppler/XRef.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 544440b9d19ce99f3a7fcacdea70999b1efc217f -Author: Albert Astals Cid -Date: Wed Nov 16 23:09:23 2011 +0100 - - xpdf303: Add XRef::getPermFlags - - poppler/XRef.h | 1 + - 1 file changed, 1 insertion(+) - -commit b2e43e531edcecaeacf02a627c98cf7ef57f3e3c -Author: Albert Astals Cid -Date: Wed Nov 16 23:04:04 2011 +0100 - - xpdf303: make strToUnsigned "safer" - - poppler/PDFDoc.cc | 11 +++++++---- - 1 file changed, 7 insertions(+), 4 deletions(-) - -commit bd1513742182ed4c80d21401dd30180981879f24 -Author: Albert Astals Cid -Date: Wed Nov 16 22:59:12 2011 +0100 - - xpdf303: Check xrefEntryCompressed entries to be of correct type - and in bounds - - poppler/XRef.cc | 5 +++++ - 1 file changed, 5 insertions(+) - -commit 3bf3e82d1f3eb19a454239d8c7641fc68ff4e462 -Author: Albert Astals Cid -Date: Wed Nov 16 22:54:17 2011 +0100 - - xpdf303: Adobe apparently ignores the generation number on compressed - objects - - poppler/XRef.cc | 2 ++ - 1 file changed, 2 insertions(+) - -commit 73e6f19c4e76762eb5131b168e3b24167ba126cb -Author: Albert Astals Cid -Date: Wed Nov 16 22:29:11 2011 +0100 - - xpdf303: Add PDFDoc::fileNameU to windows builds - - poppler/PDFDoc.cc | 43 +++++++++++++++++++++++++++++++++++-------- - poppler/PDFDoc.h | 6 ++++++ - 2 files changed, 41 insertions(+), 8 deletions(-) - -commit 65388b1aaf9a78efcf9486d5e2d4bdce76f11194 -Author: Igor Slepchin -Date: Tue Nov 15 21:53:40 2011 +0100 - - Output images in pdftohtml -xml mode if no -i option is specified. - - Comes with an attached update to pdf2xml.dtd - - utils/HtmlOutputDev.cc | 48 - ++++++++++++++++++++++++++++++++++++++++-------- - utils/pdf2xml.dtd | 22 +++++++++++++++++----- - 2 files changed, 57 insertions(+), 13 deletions(-) - -commit a4c78946bc1fc3d52152af2e319051050ab05e28 -Author: Albert Astals Cid -Date: Mon Nov 14 13:22:53 2011 +0100 - - Make GfxColorSpace::parse accept dicts too - - poppler/GfxState.cc | 14 +++++++++++++- - 1 file changed, 13 insertions(+), 1 deletion(-) - -commit f6d026bfa18624ccd321e102bb39ba744998de1e -Author: Albert Astals Cid -Date: Fri Nov 11 16:37:27 2011 +0100 - - Do not crash if failing to parse the colorspace - - Fixes bug 42793 - - poppler/Gfx.cc | 52 +++++++++++++++++++++++++++++----------------------- - 1 file changed, 29 insertions(+), 23 deletions(-) - -commit c9da140bb476dcbb3928950ae9b506de82695cd2 -Author: David King -Date: Thu Oct 20 11:31:10 2011 +0200 - - glib-demo: Conditionally initialise threading - - In GLib 2.24.0 and above, threading is enabled by default, and the - thread initialization functions are deprecated since GLib 2.31.0. - - Fixes bug #42036. - - glib/demo/main.c | 3 +++ - 1 file changed, 3 insertions(+) - -commit a0db250bbdefff6361551cf9db344bd5268fea11 -Author: Vittal Aithal -Date: Wed Nov 9 20:07:58 2011 +0100 - - pdfinfo: report page rotation - - utils/pdfinfo.cc | 8 ++++++++ - 1 file changed, 8 insertions(+) - -commit e7dbd17ff07afa465636a90f526cd7ac8c731862 -Author: Kenji Uno -Date: Wed Nov 9 12:39:41 2011 +0100 - - Fix leak in GooString when resizing - - If resizing from "long" to shorter - - goo/GooString.cc | 3 +++ - 1 file changed, 3 insertions(+) - -commit 6a4f0c32b6723b127034d59a34bf076942e9935f -Author: Carlos Garcia Campos -Date: Sun Nov 6 15:44:06 2011 +0100 - - regtest: Skip tests with results when creating refs - - Not only tests that have md5, but also crashed or failed tests. - - regtest/TestReferences.py | 4 ++-- - regtest/backends/__init__.py | 3 +++ - 2 files changed, 5 insertions(+), 2 deletions(-) - -commit eab952d121c7ab88a0d41587cfa449c0978bea04 -Author: Pino Toscano -Date: Thu Nov 3 21:58:11 2011 +0100 - - qt4: remove unused variable - - qt4/src/poppler-embeddedfile.cc | 1 - - 1 file changed, 1 deletion(-) - -commit 85615f04e040dd38792533a4522e437644e97548 -Author: Pino Toscano -Date: Thu Nov 3 16:15:40 2011 +0100 - - qt4: get rid of the own F and Ff flags reading - - no more useful now, as they are available either directly or as - parsed values in both Annot and FormField - - qt4/src/poppler-form.cc | 16 ---------------- - qt4/src/poppler-private.h | 4 +--- - 2 files changed, 1 insertion(+), 19 deletions(-) - -commit 43347b43eeb66b5c8dc9637c36436baacc626bc4 -Author: Pino Toscano -Date: Thu Nov 3 16:10:57 2011 +0100 - - qt4: use the flags of the associated Annot object - - qt4/src/poppler-form.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 6c9492202de9b3b43da9eac3e40dc7fe218f21da -Author: Pino Toscano -Date: Thu Nov 3 16:03:11 2011 +0100 - - qt4: remove old commented code - - qt4/src/poppler-form.cc | 1 - - 1 file changed, 1 deletion(-) - -commit f0eca54131f7cdf6c1e0e78a18be0bf642567af4 -Author: Pino Toscano -Date: Thu Nov 3 15:46:33 2011 +0100 - - qt4: use the quadding read already in FormField - - ... instead of reading it again - - qt4/src/poppler-form.cc | 24 ++++++++---------------- - 1 file changed, 8 insertions(+), 16 deletions(-) - -commit d92bce1ae87d2f351bb1b972c64466502fb212aa -Author: Pino Toscano -Date: Thu Nov 3 15:30:45 2011 +0100 - - qt4: include - - qt4/src/poppler-private.h | 1 + - 1 file changed, 1 insertion(+) - -commit 955cd0c7bd3a72340deba098f4242a4904adc60f -Author: Albert Astals Cid -Date: Wed Nov 2 20:20:41 2011 +0100 - - Compile with MSVC needed for last change in the qt4 frontend - - CMakeLists.txt | 1 + - 1 file changed, 1 insertion(+) - -commit e0f5bc1deebaa9861baffd7c9ba31ea31585cd1d -Author: Hib Eris -Date: Tue Nov 1 14:15:09 2011 +0100 - - qt4: Use PDFDoc(wchar_t *, ...) on Windows - - Bug 35378 - - qt4/src/poppler-document.cc | 6 +++--- - qt4/src/poppler-private.h | 17 +++++++++++++++-- - 2 files changed, 18 insertions(+), 5 deletions(-) - -commit 52c1e9c5109299255d13b5b1e7d3eedaab512084 -Author: Carlos Garcia Campos -Date: Tue Nov 1 14:13:10 2011 +0100 - - regtest: Add --update-refs command line option to run-tests command - - It allows to update the references of failing tests. - - regtest/TestRun.py | 2 +- - regtest/backends/__init__.py | 34 ++++++++++++++++++++++++++++++++-- - regtest/commands/run-tests.py | 4 ++++ - 3 files changed, 37 insertions(+), 3 deletions(-) - -commit b4896a416b1df14a81b944b3c577fec85c9c7f7d -Author: Rex Dieter -Date: Tue Nov 1 09:40:53 2011 +0100 - - Fix pkg-config files - - We were using $FOO_REQUIRED instead of @FOO_REQUIRED@ - - configure.ac | 1 + - poppler-glib-uninstalled.pc.in | 2 +- - poppler-glib.pc.cmake | 2 +- - poppler-glib.pc.in | 2 +- - 4 files changed, 4 insertions(+), 3 deletions(-) - -commit 53f1b0c5edfdbef817bff31566893ac4e111516a -Author: Carlos Garcia Campos -Date: Sun Oct 30 16:02:19 2011 +0100 - - pdftocairo: Make sure beginDocument() is always called - - This fixes a crash when rendering only odd/even pages in a printing - format. - - utils/pdftocairo.cc | 4 ++++ - 1 file changed, 4 insertions(+) - -commit 8b0dfe9537082eaccd982530f1eddc2fcfc92f8e -Author: Albert Astals Cid -Date: Thu Oct 27 19:58:31 2011 +0200 - - xpdf303: Use splashDist instead of splashSqrt and USE_FIXEDPOINT - enhacements - - splash/SplashFTFont.cc | 70 - +++++++++++++++++++++++++++++++++++++++++++++----- - splash/SplashFTFont.h | 2 +- - 2 files changed, 65 insertions(+), 7 deletions(-) - -commit b021bce2583c8e1e3a4c129106d80e7a4e223600 -Author: Albert Astals Cid -Date: Thu Oct 27 19:54:22 2011 +0200 - - xpdf303: wops, make it compile - - poppler/Lexer.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 76295f4d401c36bdef3b2a20d18ac57a3b976410 -Author: Albert Astals Cid -Date: Thu Oct 27 19:42:42 2011 +0200 - - xpdf303: Adopt xpdf solution for the name too long problem - - poppler/Lexer.cc | 37 +++++++++++++++++-------------------- - 1 file changed, 17 insertions(+), 20 deletions(-) - -commit be6d4c19b8ce1515ce995eee408dc5752012c649 -Author: Albert Astals Cid -Date: Thu Oct 27 19:34:38 2011 +0200 - - xpdf303: Add brackets - - poppler/Lexer.cc | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -commit 904ae1385e93155a55008977c89aa664b7c8cb9b -Author: Albert Astals Cid -Date: Wed Oct 26 14:22:28 2011 +0200 - - Expose POPPLER_VERSION in poppler-config.h - - configure.ac | 3 +++ - poppler/poppler-config.h.cmake | 5 +++++ - poppler/poppler-config.h.in | 5 +++++ - 3 files changed, 13 insertions(+) - -commit aa83d4fe942ef0685c5990ddf3eccc2fbdf82292 -Author: Albert Astals Cid -Date: Thu Oct 20 00:59:57 2011 +0200 - - xpdf303: Add readFromStream - - poppler/GfxFont.cc | 6 ++++++ - 1 file changed, 6 insertions(+) - -commit 74d771d58a4d1868669117709eb6811ec28bf840 -Author: Albert Astals Cid -Date: Thu Oct 20 00:56:58 2011 +0200 - - xpdf303: Add base14SubstFonts - - poppler/GfxFont.cc | 24 ++++++++++++++++++++++++ - 1 file changed, 24 insertions(+) - -commit 71260f987161d5b122caced6af14e9d64be46e4d -Author: Albert Astals Cid -Date: Thu Oct 20 00:55:42 2011 +0200 - - xpdf303: GfxFontLoc implementation - - poppler/GfxFont.cc | 20 ++++++++++++++++++++ - 1 file changed, 20 insertions(+) - -commit 586430137985fd303ce87bdb9b902ee9a01341e8 -Author: Albert Astals Cid -Date: Thu Oct 20 00:54:09 2011 +0200 - - xpdf303: More stuff into base14FontMap - - poppler/GfxFont.cc | 16 +++++++++++++++- - 1 file changed, 15 insertions(+), 1 deletion(-) - -commit c0affb1845c339f89ca67608cb9fd9134ff902f5 -Author: Albert Astals Cid -Date: Thu Oct 20 00:51:31 2011 +0200 - - xpdf303: GfxFont::getOrignName/getName rework - - poppler/FontInfo.cc | 4 ++-- - poppler/GfxFont.cc | 4 ---- - poppler/GfxFont.h | 6 +----- - poppler/PSOutputDev.cc | 8 ++++---- - poppler/TextOutputDev.cc | 5 ++--- - 5 files changed, 9 insertions(+), 18 deletions(-) - -commit c5c513b5b72e03f6f0a94d04f7d8a22fe9bdaa80 -Author: Albert Astals Cid -Date: Thu Oct 20 00:45:30 2011 +0200 - - xpdf303: GfxFontLoc - - poppler/GfxFont.h | 35 +++++++++++++++++++++++++++++++++++ - 1 file changed, 35 insertions(+) - -commit 4ec5e5e6d4785eb7a60744ae7e33c7ba3f603e8e -Author: Albert Astals Cid -Date: Thu Oct 20 00:34:10 2011 +0200 - - xpdf303: StdFontMapEntry renaming - - poppler/GfxFont.cc | 26 +++++++++++--------------- - poppler/GfxFont.h | 2 ++ - 2 files changed, 13 insertions(+), 15 deletions(-) - -commit e71088dc5087303b1ae5f3e72af287ec4e0a1342 -Author: Albert Astals Cid -Date: Mon Oct 17 13:42:06 2011 +0200 - - remove useless #if - - poppler/Page.cc | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -commit 40b56994dda79653c902977423f349efa55cf21e -Author: Adrian Johnson -Date: Mon Oct 17 20:33:03 2011 +1030 - - utils: Add GooString arg to parseargs and use for paths in pdftocairo - - and MAXPATHLEN is not available on windows. Avoid the - need to know the max path length by using GooString for the path. - - utils/parseargs.cc | 12 ++++++++++++ - utils/parseargs.h | 2 ++ - utils/pdftocairo.cc | 17 ++++++++--------- - 3 files changed, 22 insertions(+), 9 deletions(-) - -commit 4bb34757dbbff780baba053371274c05b29771e1 -Author: Adrian Johnson -Date: Mon Sep 19 21:11:44 2011 +0930 - - cairo: fix setSoftMask bugs - - - Getting the clip extents in device space requires transforming all - four corners of the clip extents and translating by the group device - offset other wise the device extents will not be correct for rotated - ctm. - - - Adjust matrix to include translation of the clip extents origin - since the mask surface does not start at (0,0). - - - the ctm when called cairo_mask() needs to be the same as the - ctm when - the mask was created. - - - implement transfer function in setSoftMask - - Bug 41005 - - poppler/CairoOutputDev.cc | 97 - +++++++++++++++++++++++++++++------------------ - poppler/CairoOutputDev.h | 6 ++- - 2 files changed, 65 insertions(+), 38 deletions(-) - -commit 50adbed183e9bf70eb4c41e8858cf464c3042e45 -Author: Carlos Garcia Campos -Date: Sun Oct 16 12:40:27 2011 +0200 - - Remove poppler-cairo dependency from poppler-glib pkg-config file - - poppler-glib links to poppler-cairo statically, so it doesn'tm - depend on - the dynamic library. - - CMakeLists.txt | 1 - - configure.ac | 2 -- - poppler-glib-uninstalled.pc.in | 2 +- - poppler-glib.pc.cmake | 2 +- - poppler-glib.pc.in | 2 +- - 5 files changed, 3 insertions(+), 6 deletions(-) - -commit acd8ecc9121db58851f73764f046a4f54bd80581 -Author: Adrian Johnson -Date: Sat Oct 8 15:03:24 2011 +1030 - - ps: fix uncolored tiling patterns - - Uncolored patterns and type 3 chars must not use color setting - operators. When emitting an uncolored pattern: - - disable the update color space functions - - disable the update color functions - - set pdfLastFill and pdfLastStroke to true to ensure the the sCol - and fCol procedures that is used by some of the PS procedures that - emulate PDF operators do not update the color. - - Bug 41462 - - poppler/PSOutputDev.cc | 41 +++++++++++++++++++++++++++++++++++++++++ - poppler/PSOutputDev.h | 1 + - 2 files changed, 42 insertions(+) - -commit 6e1326b11f98f2b277e53a6cdbcb373ce6c29958 -Author: Adrian Johnson -Date: Fri Oct 7 20:29:36 2011 +1030 - - ps: emit non repeating patterns in PSOutput with inType3Char = true - - instead of falling back to Gfx. This avoids emitting the image data - twice. - - poppler/PSOutputDev.cc | 23 +++++++++++++++++++++++ - 1 file changed, 23 insertions(+) - -commit ed05fcb8c442b716c5e382c98f2625701926c86a -Author: Adrian Johnson -Date: Sat Oct 1 20:19:19 2011 +0930 - - ps: fix tiling pattern fill matrix - - In PS the pattern matrix maps the pattern space to user space. In PDF - the pattern matrix maps the pattern space to the default ctm of the - content stream (baseMatrix in Gfx). The matrix mat already contains - the - correct pattern->baseMatrix so use it instead of pmat. - - Bug 41374 - - poppler/PSOutputDev.cc | 9 ++------- - 1 file changed, 2 insertions(+), 7 deletions(-) - -commit 087757866de13b6164967a1d241d3c0e47065f1a -Author: Albert Astals Cid -Date: Thu Oct 13 12:18:52 2011 +0200 - - xpdf303: Merge SplashT1Font::getGlyphPath changes - - splash/SplashT1Font.cc | 39 +++++++++++++++++++++------------------ - 1 file changed, 21 insertions(+), 18 deletions(-) - -commit c84f46ee16a8dcc6e2cad2359df621cc6cdb8fa5 -Author: Albert Astals Cid -Date: Thu Oct 13 12:16:14 2011 +0200 - - xpdf303: Add GBool type1 to SplashFTFontFile - - splash/SplashFTFontFile.cc | 9 +++++---- - splash/SplashFTFontFile.h | 3 ++- - 2 files changed, 7 insertions(+), 5 deletions(-) - -commit d845da2c3c1acbeaa4b9bb3125f9143e785210ff -Author: Yury G. Kudryashov -Date: Thu Oct 6 14:49:19 2011 +0200 - - Okular moved to git, fix docs - - Fix URLs in poppler-qt4 documentation - - qt4/src/Mainpage.dox | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit bb40c980f7ab7a6eb9735af17103f87bc65893d6 -Author: Yury G. Kudryashov -Date: Thu Oct 6 14:49:08 2011 +0200 - - Explicitly include fontconfig include dir - - This fixes cmake-driven build on systems where fontconfig is - installed in - non-standard location. - - CMakeLists.txt | 1 + - 1 file changed, 1 insertion(+) - -commit 776ca137984556530ba938265714934bdc3d6443 -Author: Yury G. Kudryashov -Date: Thu Oct 6 14:48:46 2011 +0200 - - Fix typo in cmake option documentation - - Relocatable build does *not* (was missing in docs) hardcode library - location. - - CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit ab8616dcb637ac1aeb4d5f142c3c4bff9aecd041 -Author: Adrian Johnson -Date: Thu Oct 6 14:21:10 2011 +0200 - - close the file or flush stdout - - utils/pdftocairo.cc | 2 ++ - 1 file changed, 2 insertions(+) - -commit 72c2d563684ab6937a98a0c1c79be3639d29c9ce -Author: Albert Astals Cid -Date: Tue Oct 4 17:46:11 2011 +0200 - - xpdf303: Make sure array length is > 0 - - This is not scritcly necessary since Array::get already returns a - null object in case - the index is out of range but let's merge it for the sake of being - more closer to xpdf - - poppler/GfxState.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit c814c2452c7f60623fdd0fee6f915adeaf5b49e3 -Author: Albert Astals Cid -Date: Tue Oct 4 17:40:27 2011 +0200 - - xpdf303: Limit recursion in GfxColorSpace parsing - - I think we could do it better, but it'd take more time and it's not - what we are doing in this branch anyway - - poppler/GfxState.cc | 43 +++++++++++++++++++++++++++---------------- - poppler/GfxState.h | 14 +++++++------- - 2 files changed, 34 insertions(+), 23 deletions(-) - -commit 0e53ba5709296dc2ba1399f885af200d2041f0cd -Author: Glad Deschrijver -Date: Sat Oct 1 15:41:51 2011 +0200 - - qt4: Add the option of PSConverter creating EPS - - qt4/src/poppler-ps-converter.cc | 3 ++- - qt4/src/poppler-qt4.h | 6 ++++-- - 2 files changed, 6 insertions(+), 3 deletions(-) - -commit 04e271a0c10807c9c3967daa1f656e87b97b9901 -Author: Albert Astals Cid -Date: Sat Oct 1 14:34:50 2011 +0200 - - Fix typo in documentation - - Reported by Glad Deschrijver - (cherry picked from commit 1346caac6c564035d368617a329b361d0253fbf6) - - qt4/src/poppler-qt4.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 9855529e8e1a83c6d77a9e4221ea2132d44e9fb1 -Author: Albert Astals Cid -Date: Sat Oct 1 14:27:44 2011 +0200 - - Remove space after % as it confuses libspectre - - Discussed with Adrian Johnson - Problem found by Glad Deschrijver - - poppler/PSOutputDev.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 8e8cde6f374b59222d834e2e7f08fb4a6a4d55a5 -Author: Albert Astals Cid -Date: Wed Sep 28 23:32:24 2011 +0200 - - xpdf303: More manpage merging - - utils/pdftotext.1 | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -commit f798f00c9ec55bff2eb93938424c436ba2663e7a -Author: Albert Astals Cid -Date: Wed Sep 28 23:30:55 2011 +0200 - - xpdf303: mention pdfdetach in non xpdf tools - - utils/pdftocairo.1 | 1 + - utils/pdftohtml.1 | 1 + - 2 files changed, 2 insertions(+) - -commit 3fc46ac1c046460ccf46ba4b8a92f728e775694a -Author: Albert Astals Cid -Date: Wed Sep 28 23:30:00 2011 +0200 - - xpdf303: Fix pdfdetach man page references - - utils/pdfdetach.1 | 14 ++++++-------- - 1 file changed, 6 insertions(+), 8 deletions(-) - -commit 79e1d77fb00a7c7f0bda4ae76328c4211c7f16e6 -Author: Albert Astals Cid -Date: Wed Sep 28 23:27:53 2011 +0200 - - xpdf303: Merge some more manpages - - utils/pdfinfo.1 | 15 +++++++++++---- - utils/pdftoppm.1 | 9 +++++---- - 2 files changed, 16 insertions(+), 8 deletions(-) - -commit 841c96be59ddad32f51d4d114ba1dcc42285ab55 -Author: Albert Astals Cid -Date: Wed Sep 28 23:23:25 2011 +0200 - - xpdf303: Merge some man pages - - utils/pdffonts.1 | 9 +++++---- - utils/pdfimages.1 | 9 +++++---- - utils/pdftops.1 | 9 +++++---- - 3 files changed, 15 insertions(+), 12 deletions(-) - -commit d2706a05513134f961e2500e0e596f2769707ce5 -Author: Adrian Johnson -Date: Wed Sep 28 21:20:23 2011 +0930 - - cairo: fix crash when using poppler_page_get_image() - - poppler/CairoOutputDev.h | 1 + - 1 file changed, 1 insertion(+) - -commit 0c0591fa23441c54c9443072615273ea65482d76 -Author: Albert Astals Cid -Date: Tue Sep 27 00:45:59 2011 +0200 - - 0.18.0 - - CMakeLists.txt | 6 ++-- - NEWS | 14 ++++++++ - configure.ac | 4 +-- - cpp/Doxyfile | 2 +- - gtk-doc.make | 102 - ++++++++++++++++++++++------------------------------ - poppler/Makefile.am | 2 +- - qt4/src/Doxyfile | 2 +- - 7 files changed, 64 insertions(+), 68 deletions(-) - -commit 19f5db7acd64330d198f18695175df02141794d7 -Author: Albert Astals Cid -Date: Tue Sep 27 00:15:15 2011 +0200 - - Update Carlos (C) year - - poppler/Gfx.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 6d34d4af90b8b41360de4dabb000bbcc894775d0 -Author: Albert Astals Cid -Date: Tue Sep 27 00:09:54 2011 +0200 - - Rename pdfmerge and pdfextract - - To pdfunite and pdfseparate, the old names were taken - - utils/.gitignore | 4 ++-- - utils/CMakeLists.txt | 28 ++++++++++++++-------------- - utils/Makefile.am | 16 ++++++++-------- - utils/{pdfextract.1 => pdfseparate.1} | 16 ++++++++-------- - utils/{pdfextract.cc => pdfseparate.cc} | 6 +++--- - utils/{pdfmerge.1 => pdfunite.1} | 14 +++++++------- - utils/{pdfmerge.cc => pdfunite.cc} | 6 +++--- - 7 files changed, 45 insertions(+), 45 deletions(-) - -commit baf54c2876edd476ffc68da6518598847bb7ec8a -Author: Albert Astals Cid -Date: Mon Sep 26 15:54:46 2011 +0200 - - Remove getRawStream - - Since it does exactly the same as getNextStream - - poppler/DCTStream.h | 1 - - poppler/Stream.h | 1 - - utils/HtmlOutputDev.cc | 7 ++----- - utils/ImageOutputDev.cc | 9 +++------ - 4 files changed, 5 insertions(+), 13 deletions(-) - -commit bba57e588fd1ee3a61f18405d1d1bf89fceb5b96 -Author: Carlos Garcia Campos -Date: Sun Sep 25 12:21:02 2011 +0200 - - xpdf303: Added the pdfdetach tool - - I haven't merged xpdf code for embedded files, I think our - implementation is better and more complete. I've adapated pdfdetach - code to use our code and return also embedded files of file attachment - annotations to match what xpdf does. - - poppler/FileSpec.cc | 22 ++++ - poppler/FileSpec.h | 3 + - utils/CMakeLists.txt | 9 ++ - utils/Makefile.am | 6 + - utils/pdfdetach.1 | 105 +++++++++++++++++ - utils/pdfdetach.cc | 318 - +++++++++++++++++++++++++++++++++++++++++++++++++++ - 6 files changed, 463 insertions(+) - -commit f62c2f002c782d3a7887525f031d266aca6eb582 -Author: Carlos Garcia Campos -Date: Sat Sep 24 11:20:13 2011 +0200 - - xpdf303: Parse ActualText in Gfx instead of output devices - - Remove beginMarkedContent and endMarkedcontent and add beginActualText - and endActualText. ActualText is parsed in Gfx, that already - handles the - marked content stack, so that text output dev doesn't need to - handle it - too. The text string is passed to beginActualText(). This change - is not - an exact merge of xpdf code, I've tried to keep our implementation. - - poppler/CairoOutputDev.cc | 8 +-- - poppler/CairoOutputDev.h | 6 +- - poppler/Gfx.cc | 40 +++++++++---- - poppler/OutputDev.cc | 6 -- - poppler/OutputDev.h | 4 +- - poppler/TextOutputDev.cc | 145 - +++++++++++++++++++--------------------------- - poppler/TextOutputDev.h | 21 ++++--- - 7 files changed, 108 insertions(+), 122 deletions(-) - -commit a097447ed13cb021003425f85597e2628935feb2 -Author: Carlos Garcia Campos -Date: Sat Sep 24 09:43:05 2011 +0200 - - Use new error syntax in pdfextract - - utils/pdfextract.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 718c735aed540aa49b8dde250ca886c6ad93f5b6 -Merge: 6721916c 69707f0a -Author: Carlos Garcia Campos -Date: Sat Sep 24 09:38:52 2011 +0200 - - Merge branch 'master' into xpdf303merge - -commit 69707f0a9b5a94c80817039db943fb4f26e743e3 -Author: Adrian Johnson -Date: Mon Sep 19 22:00:34 2011 +0930 - - Update .gitignore - - regtest/.gitignore | 1 + - utils/.gitignore | 2 ++ - 2 files changed, 3 insertions(+) - -commit 0de477817e424078cfcfcae114e7745809f0848d -Author: Adrian Johnson -Date: Mon Sep 19 21:57:07 2011 +0930 - - utils: Add Glyph & Cog copyright to pdfmerge and pdfextract man pages - - utils/pdfextract.1 | 3 ++- - utils/pdfmerge.1 | 3 ++- - 2 files changed, 4 insertions(+), 2 deletions(-) - -commit ce7372db64ee807dc2b491e121fbe557dbf697e8 -Author: Adrian Johnson -Date: Mon Sep 19 22:04:27 2011 +0930 - - regtest: render cairo at 72ppi - - For consistency with splash. It is faster and easier to compare with - splash results. - - regtest/backends/cairo.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 6cf7330089c4dcc1099906d9c37c3607a2a1eeba -Author: Carlos Garcia Campos -Date: Mon Sep 19 18:42:35 2011 +0200 - - regtest: Ignore checksums of crashed, failed and stderr files - - They shouldn't have a checksum, but it might happen with md5 files - generated with previous versions. - - regtest/backends/__init__.py | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit 6512bf1c5dab37058460882fec3407b396830981 -Author: Albert Astals Cid -Date: Sun Sep 18 18:38:32 2011 +0200 - - Render at 72 instead of 150, it's faster :D - - regtest/backends/splash.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit b828f63ed3896a22f3fe7ddbe2ec2f549d7a2c62 -Author: Albert Astals Cid -Date: Sun Sep 18 18:20:47 2011 +0200 - - install pdfextract and pdfmerge manpages - - utils/CMakeLists.txt | 2 ++ - 1 file changed, 2 insertions(+) - -commit 986759dfbe85998c85ee9b0825c7522395567531 -Author: Thomas Freitag -Date: Sun Sep 18 18:19:30 2011 +0200 - - pdfextract and pdfmerge man pages - - utils/Makefile.am | 2 ++ - utils/pdfextract.1 | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ - utils/pdfmerge.1 | 32 ++++++++++++++++++++++++++++++++ - 3 files changed, 82 insertions(+) - -commit 90da1af542fd7f3cecef31b15da6971345b38209 -Author: Thomas Freitag -Date: Sun Sep 18 18:19:04 2011 +0200 - - Complain if %d is not present and it should - - utils/pdfextract.cc | 4 ++++ - 1 file changed, 4 insertions(+) - -commit 40e066a84ddb3a5c41805c095659af5f5704d6d8 -Author: suzuki toshiya -Date: Sun Sep 18 18:16:14 2011 +0200 - - qt_subdir is unneeded - - Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 6721916c92d720947b3285c85fdbe6610c6bf013 -Merge: 8456a6e1 e23f6b9c -Author: Carlos Garcia Campos -Date: Sun Sep 18 16:31:10 2011 +0200 - - Merge branch 'master' into xpdf303merge - - Conflicts: - poppler/Gfx.cc - -commit e23f6b9cade804136bd4bb58182f4fe0b072fbf2 -Author: Carlos Garcia Campos -Date: Sun Sep 18 16:27:50 2011 +0200 - - regtest: Do not create checksums for crashed, failed and stderr files - - regtest/backends/__init__.py | 12 +++++++++++- - 1 file changed, 11 insertions(+), 1 deletion(-) - -commit 110b8be1d9f2694b42bd12dcb6af02bfca9866dd -Author: Carlos Garcia Campos -Date: Sun Sep 18 16:26:58 2011 +0200 - - Fix memory leak - - poppler/Gfx.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 8456a6e1354126dc98357fb806595bd3bc198522 -Author: Carlos Garcia Campos -Date: Sun Sep 18 16:07:54 2011 +0200 - - xpdf303: Add OCDisplayNode - - It's not used by poppler yet, but we might want to use it from the - frontends after the merge. - - poppler/OptionalContent.cc | 127 - +++++++++++++++++++++++++++++++++++++++++++++ - poppler/OptionalContent.h | 36 ++++++++++++- - 2 files changed, 162 insertions(+), 1 deletion(-) - -commit 06c6660dc9fe326f185ff323e643af6714b32ec8 -Author: Carlos Garcia Campos -Date: Sun Sep 18 15:08:44 2011 +0200 - - xpdf303: Parse usage dictionary of optional content groups - - poppler/OptionalContent.cc | 28 ++++++++++++++++++++++++++++ - poppler/OptionalContent.h | 14 +++++++++++++- - 2 files changed, 41 insertions(+), 1 deletion(-) - -commit 528d5b0d40302b3fee3aec69b85bdd1daa4db568 -Author: Carlos Garcia Campos -Date: Sun Sep 18 14:03:36 2011 +0200 - - xpdf303: Image XObjects can have a OC entry too - - poppler/Gfx.cc | 11 ++++++++++- - 1 file changed, 10 insertions(+), 1 deletion(-) - -commit c40353d3bb761f5be8ddbd2bf5341e83901fb132 -Author: Carlos Garcia Campos -Date: Sun Sep 18 13:32:07 2011 +0200 - - xpdf303: OC entry is specific to form XObjects - - poppler/Gfx.cc | 17 +++++++++-------- - 1 file changed, 9 insertions(+), 8 deletions(-) - -commit 6ddb51d81b064346dc85d2ae72570a956a184d74 -Author: Carlos Garcia Campos -Date: Sun Sep 18 12:59:28 2011 +0200 - - xpdf303: The spec doesn't say OC must be null or ref - - poppler/Annot.cc | 5 +---- - poppler/Gfx.cc | 22 +++++++--------------- - 2 files changed, 8 insertions(+), 19 deletions(-) - -commit 434bb9b38319edc7282be22044bd7761403a38a6 -Author: Carlos Garcia Campos -Date: Sun Sep 18 12:45:12 2011 +0200 - - xpdf303: OC entry can be an optional content group too - - Not only an optional content membership dictionary. - - poppler/OptionalContent.cc | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -commit 56410b80fdabb99e2de0c6589de6ee745936c523 -Author: Carlos Garcia Campos -Date: Sun Sep 18 12:44:02 2011 +0200 - - xpdf303: Not finding an oc group is not necessarily a syntax error - - poppler/OptionalContent.cc | 2 -- - 1 file changed, 2 deletions(-) - -commit 4bb4439450e342479375cb56d10561457475bd13 -Author: Carlos Garcia Campos -Date: Sun Sep 18 12:42:15 2011 +0200 - - xpdf303: Fix check of OptionalContentGroup::getState() - - We use an enum, not a boolean. - - poppler/OptionalContent.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit d737e3098e02e46525c0edf2165462e03ac7a0e6 -Author: Carlos Garcia Campos -Date: Sun Sep 18 11:36:11 2011 +0200 - - xpdf303: Add support for visibility expressions in OptContent - - poppler/OptionalContent.cc | 113 - +++++++++++++++++++++++++++++++++++---------- - poppler/OptionalContent.h | 3 +- - 2 files changed, 91 insertions(+), 25 deletions(-) - -commit 258d56ba85902a8ab50eec3fe66dd6425226fa59 -Merge: 72a77363 12c6239c -Author: Carlos Garcia Campos -Date: Sun Sep 18 11:12:38 2011 +0200 - - Merge branch 'master' into xpdf303merge - -commit 12c6239ca4f1f6a5de72aebd755f9d1354ea5837 -Author: Carlos Garcia Campos -Date: Sun Sep 18 11:08:06 2011 +0200 - - regtest: Fix checksum check for tests containing spaces in filename - - regtest/backends/__init__.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 72a7736389cbe36c1f8a526f1a659cae1a3f85a3 -Author: Carlos Garcia Campos -Date: Sun Sep 18 10:47:51 2011 +0200 - - xpdf303: No need to cache optContentConfig object in Annot - - poppler/Annot.cc | 2 +- - poppler/Annot.h | 2 -- - 2 files changed, 1 insertion(+), 3 deletions(-) - -commit 93ba92db0a3af35f197a4faa5a528af98ea0f624 -Author: Albert Astals Cid -Date: Wed Sep 14 00:58:44 2011 +0200 - - Make it work with Python3 - - regtest/Config.py | 4 ++-- - regtest/TestReferences.py | 8 ++++---- - regtest/TestRun.py | 32 ++++++++++++++++---------------- - regtest/Timer.py | 8 ++++---- - regtest/backends/__init__.py | 12 ++++++------ - regtest/commands/__init__.py | 6 +++--- - regtest/commands/create-refs.py | 2 +- - regtest/commands/run-tests.py | 2 +- - regtest/main.py | 2 +- - 9 files changed, 38 insertions(+), 38 deletions(-) - -commit da1b5437148e1e6317246b16f7235c8bc280be97 -Author: Carlos Garcia Campos -Date: Tue Sep 13 20:09:56 2011 +0200 - - regtest: Add a way to skip files - - A new command line option --skip has been added to give a file - with the - list of test to skip. When --skip is not used, it look for a file - named - Skipped in the tests dir. Lines starting with '#' are considered - comments and are ignored. - - regtest/TestReferences.py | 9 +++++++-- - regtest/TestRun.py | 9 +++++++-- - regtest/Utils.py | 20 ++++++++++++++++++++ - regtest/main.py | 6 +++++- - 4 files changed, 39 insertions(+), 5 deletions(-) - -commit b730b2c1d9666f62f940762663c8318e64049d61 -Author: Carlos Garcia Campos -Date: Tue Sep 13 19:04:04 2011 +0200 - - regtest: Limit the number of arguments to 1 - - It's easier to run poppler-regtest more than once if you need to run - different tests. - - regtest/commands/create-refs.py | 24 ++++++++++++------------ - regtest/commands/run-tests.py | 26 +++++++++++++------------- - regtest/main.py | 2 +- - 3 files changed, 26 insertions(+), 26 deletions(-) - -commit 5ce045d0358318859c844340c639483485b69c58 -Author: Carlos Garcia Campos -Date: Tue Sep 13 18:18:21 2011 +0200 - - regtest: Sort tests before create-refs/run-tests and show progress - - regtest/TestReferences.py | 20 ++++++++------------ - regtest/TestRun.py | 21 ++++++++++----------- - regtest/Utils.py | 35 +++++++++++++++++++++++++++++++++++ - 3 files changed, 53 insertions(+), 23 deletions(-) - -commit 10801b6faee9037af054fe74cc4a03620ea41d45 -Author: Carlos Garcia Campos -Date: Mon Sep 12 20:13:17 2011 +0200 - - Add initial poppler regressions test program - - regtest/Config.py | 32 ++++++ - regtest/TestReferences.py | 73 +++++++++++++ - regtest/TestRun.py | 156 ++++++++++++++++++++++++++++ - regtest/Timer.py | 73 +++++++++++++ - regtest/backends/__init__.py | 220 - ++++++++++++++++++++++++++++++++++++++++ - regtest/backends/cairo.py | 39 +++++++ - regtest/backends/postscript.py | 35 +++++++ - regtest/backends/splash.py | 39 +++++++ - regtest/backends/text.py | 48 +++++++++ - regtest/commands/__init__.py | 93 +++++++++++++++++ - regtest/commands/create-refs.py | 65 ++++++++++++ - regtest/commands/run-tests.py | 69 +++++++++++++ - regtest/main.py | 77 ++++++++++++++ - regtest/poppler-regtest | 6 ++ - 14 files changed, 1025 insertions(+) - -commit 245e331a14e11a615bf47abbeb34a3561e393b41 -Author: Albert Astals Cid -Date: Mon Sep 12 13:43:49 2011 +0200 - - 0.17.4 - - CMakeLists.txt | 2 +- - NEWS | 5 +++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - qt4/src/Doxyfile | 2 +- - 5 files changed, 9 insertions(+), 4 deletions(-) - -commit 194b2413eb2c6a1641508aec63336aaf89ec3b51 -Author: Albert Astals Cid -Date: Mon Sep 12 13:43:35 2011 +0200 - - gir 0.18 - - glib/CMakeLists.txt | 12 ++++++------ - glib/Makefile.am | 12 ++++++------ - 2 files changed, 12 insertions(+), 12 deletions(-) - -commit 61c06d2efad20880e1e0b399cf797dd55f6c8dab -Author: Albert Astals Cid -Date: Mon Sep 12 00:32:38 2011 +0200 - - xpdf303: Useless NULL assignments - - poppler/SplashOutputDev.cc | 2 ++ - 1 file changed, 2 insertions(+) - -commit 4fbcbf1ffb8a98fe8c12643fdab2cbd90b4e60f9 -Author: Albert Astals Cid -Date: Mon Sep 12 00:30:52 2011 +0200 - - xpdf303: Set size to 64 instead of 100 - - poppler/SplashOutputDev.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 1c7203e57e9c7c264f5cada6362a6b449dd8689c -Author: Albert Astals Cid -Date: Mon Sep 12 00:21:03 2011 +0200 - - xpdf303: Avoid calling a "slow" function - - poppler/PSOutputDev.cc | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) - -commit db4c5789bf95af9f45a7911153acc20a26a447f1 -Author: Albert Astals Cid -Date: Mon Sep 12 00:19:49 2011 +0200 - - xpdf303: fix spacing - - poppler/PSOutputDev.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 10c3d15f841865929d2f66353cb01d0d321e8b82 -Author: Albert Astals Cid -Date: Mon Sep 12 00:03:13 2011 +0200 - - xpdf303: make limit smaller - - poppler/PSOutputDev.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 1d4e6e739701ba817576752ced169b24c5e95156 -Author: Albert Astals Cid -Date: Sun Sep 11 23:57:22 2011 +0200 - - xpdf303: Remove 512 limit in pdftoppm - - utils/pdftoppm.cc | 13 ++++++------- - 1 file changed, 6 insertions(+), 7 deletions(-) - -commit e4e843f1115d95c54967f0386bfb28f685d6c88d -Author: Albert Astals Cid -Date: Sun Sep 11 22:49:34 2011 +0200 - - xpdf303: Rework nComps != colorSpace->getNComps() handling - - poppler/GfxState.cc | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -commit dda45b6a67f3f97705e5d806eaf7d37171789e66 -Author: Albert Astals Cid -Date: Sun Sep 11 22:46:51 2011 +0200 - - xpdf303: NULL GfxICCBasedColorSpace if array does not have 2 elements - - poppler/GfxState.cc | 4 ++++ - 1 file changed, 4 insertions(+) - -commit 760e814a6d26db8eba567520aad771002e11357a -Author: Albert Astals Cid -Date: Sun Sep 11 22:21:40 2011 +0200 - - xpdf303: increase formDepth limit - - poppler/Gfx.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 59442e5994f3b94d5221cbc90f79fad235fe2611 -Author: Albert Astals Cid -Date: Sun Sep 11 22:10:41 2011 +0200 - - xpdf303: Remove flags that were never used - - splash/Splash.cc | 6 +----- - splash/SplashXPath.cc | 34 ++++------------------------------ - splash/SplashXPath.h | 13 ++++--------- - 3 files changed, 9 insertions(+), 44 deletions(-) - -commit 41a620ef60507ceda42a14d06d6587ed10016468 -Author: Albert Astals Cid -Date: Thu Sep 8 16:18:01 2011 +0200 - - xpdf303: Adapt use of getBlock to our use of getChars - - poppler/Stream.cc | 58 - +++++++++++++++++++++++++++++++++---------------------- - poppler/Stream.h | 2 ++ - 2 files changed, 37 insertions(+), 23 deletions(-) - -commit 2f7701fe730a648d0a1d181c5b20e4802640dc52 -Author: Albert Astals Cid -Date: Thu Sep 8 15:59:27 2011 +0200 - - xpdf303: Adapt xpdf getBlock to our getChars - - poppler/JBIG2Stream.cc | 17 ++++++++ - poppler/JBIG2Stream.h | 2 + - poppler/Stream.cc | 113 - ++++++++++++++++++++++++++++++++++++++++++++----- - poppler/Stream.h | 55 +++++++++++++----------- - 4 files changed, 152 insertions(+), 35 deletions(-) - -commit 3a1988db40def1655ec638cd521ed40eadc0acca -Author: Carlos Garcia Campos -Date: Thu Sep 8 15:40:12 2011 +0200 - - xpdf303: empty pages need to call dump to do any setup required by - the OutputDev - - poppler/Page.cc | 4 ++++ - 1 file changed, 4 insertions(+) - -commit 4cddaed21592ac491519a81a003035bc4e618705 -Author: Carlos Garcia Campos -Date: Thu Sep 8 15:35:33 2011 +0200 - - xpdf303: Don't clip the other page boxes to the MediaBox at the - intermediate nodes - - only do it at the leaf (Page) nodes - the other boxes can be specified - before the MediaBox is specified. - I think we already had that change, we checked isPage before clipping, - I've merged this way just to make future merges a bit easier. - - poppler/Page.cc | 16 ++++++++-------- - poppler/Page.h | 3 +++ - 2 files changed, 11 insertions(+), 8 deletions(-) - -commit 3538ac89bfea750de8907847d1d5e3515d0b8be7 -Author: Albert Astals Cid -Date: Thu Sep 8 15:07:21 2011 +0200 - - xpdf303: compile - - poppler/ArthurOutputDev.cc | 12 +++++++++++- - 1 file changed, 11 insertions(+), 1 deletion(-) - -commit 89d95d0f254a828d28d943b698eeaec51f03686f -Author: Carlos Garcia Campos -Date: Thu Sep 8 12:38:36 2011 +0200 - - xpdf303: Add codeToGID and codeToGIDLen params to - loadOpenTypeCFFFont() - - poppler/SplashOutputDev.cc | 12 +++++++++++- - splash/SplashFTFontEngine.cc | 29 +++++++++++++++++------------ - splash/SplashFTFontEngine.h | 3 ++- - splash/SplashFontEngine.cc | 6 ++++-- - splash/SplashFontEngine.h | 3 ++- - 5 files changed, 36 insertions(+), 17 deletions(-) - -commit d768204e51e6bdbcac4d6b43537297616cbedbf3 -Author: Albert Astals Cid -Date: Tue Sep 6 21:56:43 2011 +0200 - - xpdf303: Revert b36d150931cd555b84ee996d505e8b91e2afde19 - - Breaks bug164568-2.pdf so our fix was better :-) - - poppler/JBIG2Stream.cc | 91 - ++++++++++++++++++++++---------------------------- - poppler/JBIG2Stream.h | 1 - - 2 files changed, 40 insertions(+), 52 deletions(-) - -commit 2230b8f2128edf4994d8a742f562e1b5acf96b74 -Author: Albert Astals Cid -Date: Tue Sep 6 00:05:53 2011 +0200 - - xpdf303: Merge JPXStream changes - - poppler/JPXStream.cc | 1000 - +++++++++++++++++++++++++++++++------------------- - poppler/JPXStream.h | 43 +-- - 2 files changed, 632 insertions(+), 411 deletions(-) - -commit 35bb53feaa2e469253368f03a9835d73aeb1a240 -Author: Albert Astals Cid -Date: Mon Sep 5 23:20:09 2011 +0200 - - xpdf303: Add BufStream - - poppler/Stream.cc | 46 ++++++++++++++++++++++++++++++++++++++++++++++ - poppler/Stream.h | 25 +++++++++++++++++++++++++ - 2 files changed, 71 insertions(+) - -commit 8a9d92fcf05285c1f06bc153aa79d0200d05bbd9 -Author: Albert Astals Cid -Date: Mon Sep 5 22:57:02 2011 +0200 - - xpdf303: CCITTFaxStream header misc fixes - - poppler/Stream.h | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit 22d370c0a1f8c016ebc5a6d8320fe55bfd31c8a7 -Author: Albert Astals Cid -Date: Mon Sep 5 22:53:45 2011 +0200 - - xpdf303: DCTStream misc fixes - - poppler/Stream.cc | 32 ++++++++++++++++++++++++++------ - 1 file changed, 26 insertions(+), 6 deletions(-) - -commit 36d3057546b5a1d717c71b8dcb9773f91e3b5960 -Author: Albert Astals Cid -Date: Mon Sep 5 22:46:59 2011 +0200 - - xpdf303: Add some {} - - poppler/Stream.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 308654eb5dfbb783f29bd645f60c79d5b5fe42c9 -Author: Albert Astals Cid -Date: Mon Sep 5 22:45:50 2011 +0200 - - xpdf303: code1 changed to int in CCITTFaxStream::reset - - poppler/Stream.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit f097dc1f9d580eb1cdc8180d3920fe795493cf89 -Author: Albert Astals Cid -Date: Mon Sep 5 22:43:16 2011 +0200 - - xpdf303: Use 32 bits in CCITTFaxStream::lookBits - - poppler/Stream.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit b5417659042c95891aa549cae396ba4cc6604030 -Author: Albert Astals Cid -Date: Mon Sep 5 22:40:02 2011 +0200 - - xpdf303: Check against lookBits returning EOF - - poppler/Stream.cc | 17 ++++++++++------- - 1 file changed, 10 insertions(+), 7 deletions(-) - -commit eaf9d31c97a3cc06f4ce94d9190ae1a337634749 -Author: Albert Astals Cid -Date: Mon Sep 5 22:38:05 2011 +0200 - - xpdf303: Set endOfLine to true if code1 is 1 - - poppler/Stream.cc | 1 + - 1 file changed, 1 insertion(+) - -commit a654a77e26a6c7d76c318636303f8c636a3d2495 -Author: Albert Astals Cid -Date: Mon Sep 5 22:36:58 2011 +0200 - - xpdf303: Tweaks to CCITTFaxStream::lookChar - - poppler/Stream.cc | 55 - +++++++++++++++++++++++++++++++++++++++++++------------ - 1 file changed, 43 insertions(+), 12 deletions(-) - -commit abdf828449cd543e66f326ba862efcb3ca6d342d -Author: Albert Astals Cid -Date: Mon Sep 5 22:19:30 2011 +0200 - - xpdf303: Remove cygwin workaround - - poppler/Stream.cc | 4 ---- - 1 file changed, 4 deletions(-) - -commit 05ef4227d09381e3a9e8050e447770f44d532386 -Author: Albert Astals Cid -Date: Mon Sep 5 22:18:33 2011 +0200 - - xpdf303: Return false if getLine fails - - poppler/Stream.cc | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -commit c2d6158bd56328754d77ab8f1bf84d46e6ede773 -Author: Albert Astals Cid -Date: Mon Sep 5 22:14:39 2011 +0200 - - xpdf303: Return NULL if size < 0 - - poppler/Stream.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 04947e1dca858b890302a5a1005b84b34255d670 -Author: Albert Astals Cid -Date: Mon Sep 5 22:11:24 2011 +0200 - - xpdf303: Add -rawdates and print Form information - - utils/pdfinfo.cc | 30 +++++++++++++++++++++++++++--- - 1 file changed, 27 insertions(+), 3 deletions(-) - -commit 9529e776e53e71069ba4215cdb8b84592d37b555 -Author: Carlos Garcia Campos -Date: Mon Sep 5 21:19:58 2011 +0200 - - xpdf303: Other fixes in PostScriptFunction - - poppler/Function.cc | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -commit 071f983f461ba0b872dd93d7f1a24d325312799d -Author: Carlos Garcia Campos -Date: Mon Sep 5 21:19:13 2011 +0200 - - xpdf303: Fixed a bug in the PostScript-type function parser - - Real numbers that start with a decimal point weren't being handled - correctly. - - poppler/Function.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit da0eff1aaa31c2bf357a64b6275645100c9629d4 -Author: Carlos Garcia Campos -Date: Mon Sep 5 21:12:02 2011 +0200 - - xpdf303: Fixes in StitchingFunction - - poppler/Function.cc | 6 ++---- - 1 file changed, 2 insertions(+), 4 deletions(-) - -commit b655316706ec394fa6c8ad076d9d9d96ac8ed563 -Author: Albert Astals Cid -Date: Mon Sep 5 21:05:55 2011 +0200 - - xpdf303: Rework LinkURI decoding - - poppler/Link.cc | 35 +++++++++++++++++++---------------- - 1 file changed, 19 insertions(+), 16 deletions(-) - -commit abad9b4e44d81a206bccff8a109ceb9a7effa2ad -Author: Carlos Garcia Campos -Date: Mon Sep 5 21:00:31 2011 +0200 - - xpdf303: Cache the last transform for PostScript-type functions - - poppler/Function.cc | 37 ++++++++++++++++++++++++++++++++++--- - poppler/Function.h | 2 ++ - 2 files changed, 36 insertions(+), 3 deletions(-) - -commit e1c6b4c6e6df0854b040c9af9ef2d3f6789e24b2 -Author: Albert Astals Cid -Date: Mon Sep 5 21:02:31 2011 +0200 - - xpdf303: Only call getNum if isNum - - poppler/Link.cc | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -commit e5661e1a08c38d4c8d69976a8c1c02c1102bc88c -Author: Carlos Garcia Campos -Date: Mon Sep 5 20:49:13 2011 +0200 - - Optimize SampledFunction - - Pull index computation code out of the transform function; cache the - last transform. - - poppler/Function.cc | 87 - ++++++++++++++++++++++++++++++++++++++++++++--------- - poppler/Function.h | 4 ++- - 2 files changed, 75 insertions(+), 16 deletions(-) - -commit b36d150931cd555b84ee996d505e8b91e2afde19 -Author: Albert Astals Cid -Date: Mon Sep 5 20:52:05 2011 +0200 - - xpdf303: Take xpdf way of handling bug 6500 - - poppler/JBIG2Stream.cc | 91 - ++++++++++++++++++++++++++++---------------------- - poppler/JBIG2Stream.h | 1 + - 2 files changed, 52 insertions(+), 40 deletions(-) - -commit 065565a67c7826b64d89fac9719049d0a57da721 -Author: Albert Astals Cid -Date: Mon Sep 5 20:39:50 2011 +0200 - - xpdf303: Merge ¿speed? improvements in JBIG2Stream::readGenericBitmap - - poppler/JBIG2Stream.cc | 586 - +++++++++++++++++++++++++++++++++++++++---------- - 1 file changed, 471 insertions(+), 115 deletions(-) - -commit 28adb3884dafcf1d36aae1ec05855b10b22aa4ae -Author: Albert Astals Cid -Date: Mon Sep 5 20:26:57 2011 +0200 - - xpdf303: Change bpp calculation - - poppler/JBIG2Stream.cc | 16 +++++++++++----- - 1 file changed, 11 insertions(+), 5 deletions(-) - -commit c163a82f45d869b7c35a1a7141ab237507671f82 -Author: Albert Astals Cid -Date: Mon Sep 5 20:25:04 2011 +0200 - - xpdf303: Change symCodeLen calculation - - poppler/JBIG2Stream.cc | 16 +++++++++++----- - 1 file changed, 11 insertions(+), 5 deletions(-) - -commit 1d1a985101c26f90bde8340dcfae3d6a1e0a08ba -Author: Albert Astals Cid -Date: Mon Sep 5 20:20:03 2011 +0200 - - xpdf303: symCodeLen calculation fix - - poppler/JBIG2Stream.cc | 12 ++++++++---- - 1 file changed, 8 insertions(+), 4 deletions(-) - -commit 5c0274572c65972434293a30f3ba5afd3905005f -Author: Albert Astals Cid -Date: Mon Sep 5 20:07:54 2011 +0200 - - xpdf303: add line accessor - - poppler/JBIG2Stream.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 7b77a264b5c21ba693677b1249a2122743e4e395 -Author: Albert Astals Cid -Date: Mon Sep 5 19:46:16 2011 +0200 - - xpdf303: segments with unspecified length - - poppler/JBIG2Stream.cc | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -commit 23066e8e8309babd61ade9f50ef7d82c9e275055 -Author: Albert Astals Cid -Date: Mon Sep 5 19:41:16 2011 +0200 - - xpdf303: More EOF detection - - poppler/JBIG2Stream.cc | 12 +++++++++--- - 1 file changed, 9 insertions(+), 3 deletions(-) - -commit bc6eded798d6e5dc7a58f88afbe4ab2904698db5 -Author: Albert Astals Cid -Date: Mon Sep 5 19:38:29 2011 +0200 - - xpdf303: Comment++ - - poppler/JBIG2Stream.cc | 2 ++ - 1 file changed, 2 insertions(+) - -commit adb98856a745340b4ffb34ffd2ed701600cfc82f -Author: Albert Astals Cid -Date: Mon Sep 5 19:38:02 2011 +0200 - - xpdf303: Exit loop in case of EOF - - poppler/JBIG2Stream.cc | 11 ++++++++--- - 1 file changed, 8 insertions(+), 3 deletions(-) - -commit 112154567ebcab63959294533b00075d6ca6ea65 -Author: Albert Astals Cid -Date: Mon Sep 5 19:33:27 2011 +0200 - - xpdf303: Initialize to NULL - - poppler/JBIG2Stream.cc | 5 +++++ - 1 file changed, 5 insertions(+) - -commit b9ecfdf4cb27a19e65817af51c048e8030825035 -Author: Albert Astals Cid -Date: Mon Sep 5 19:27:36 2011 +0200 - - xpdf303: Delay memory allocation up to when it is really needed - - poppler/CMap.cc | 58 - ++++++++------------------------------------------------- - poppler/CMap.h | 2 -- - 2 files changed, 8 insertions(+), 52 deletions(-) - -commit 7af7b4b2d1941ee9dcd575535d4fc31f29026d8d -Author: Carlos Garcia Campos -Date: Mon Sep 5 19:05:31 2011 +0200 - - xpdf303: Rework initialization of appearance state - - Merged a slightly different patch, adding an error when the AS - entry is - missing and the AP contains one or more subdictionaries. - - poppler/Annot.cc | 62 - +++++++++++++++++++++++++++++++------------------------- - 1 file changed, 34 insertions(+), 28 deletions(-) - -commit f7d307b818bca9553a05b5d43deb429abbf04824 -Author: Carlos Garcia Campos -Date: Sun Sep 4 13:56:35 2011 +0200 - - xpdf303: Rewrote the code that handles annotation transforms - - It was not handling non-rectangular transforms correctly. - - poppler/Gfx.cc | 143 - ++++++++++++++++++++++++++++++--------------------------- - 1 file changed, 75 insertions(+), 68 deletions(-) - -commit 4609f9feeca22620c6e143962a3717784a843a68 -Author: Carlos Garcia Campos -Date: Sun Sep 4 13:09:50 2011 +0200 - - xpdf303: Implement rotation in the form field appearance regeneration - - poppler/Annot.cc | 51 ++++++++++++++++++++++++++++++++++++++------------- - 1 file changed, 38 insertions(+), 13 deletions(-) - -commit ca7d77a27e2f3a692842968f08dcb9fa5379bf0f -Author: Carlos Garcia Campos -Date: Sun Sep 4 11:53:40 2011 +0200 - - Create forms with a PDFDoc instead of XRef too - - poppler/Form.cc | 79 - +++++++++++++++++++++++++++++---------------------------- - poppler/Form.h | 28 ++++++++++---------- - 2 files changed, 55 insertions(+), 52 deletions(-) - -commit ec52e46e309a0307fdf12113a1b7d41a760f9d6c -Author: Carlos Garcia Campos -Date: Sun Sep 4 11:32:38 2011 +0200 - - xpdf303: Create annots with a doc instead of xref + catalog - - glib/poppler-action.cc | 2 +- - glib/poppler-annot.cc | 4 +- - poppler/Annot.cc | 364 - +++++++++++++++++++++++++------------------------ - poppler/Annot.h | 128 ++++++++--------- - poppler/Catalog.cc | 9 +- - poppler/Form.cc | 22 +-- - poppler/Form.h | 11 +- - poppler/PSOutputDev.cc | 2 +- - poppler/Page.cc | 2 +- - 9 files changed, 274 insertions(+), 270 deletions(-) - -commit ce5e620f07e984927610866467705bb526f9ad8d -Author: Carlos Garcia Campos -Date: Sat Sep 3 11:05:42 2011 +0200 - - xpdf303: Handle the case where sid < 0 - - fofi/FoFiType1C.cc | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -commit 9d77f999de973f3c547245bca0568f8984faa5d7 -Author: Carlos Garcia Campos -Date: Sat Sep 3 11:02:55 2011 +0200 - - xpdf303: Initialize nFDs in FoFiType1C::parse() - - fofi/FoFiType1C.cc | 1 + - 1 file changed, 1 insertion(+) - -commit d9594c95713ac79b46e313ecf2875196ea076ef4 -Author: Carlos Garcia Campos -Date: Sat Sep 3 11:01:28 2011 +0200 - - xpdf303: Check whether fdSelect is NULL before using it - - fofi/FoFiType1C.cc | 10 ++++++---- - 1 file changed, 6 insertions(+), 4 deletions(-) - -commit 4e4a8ec52c5662e21036f219636a39fc97a32353 -Author: Carlos Garcia Campos -Date: Sat Sep 3 10:52:14 2011 +0200 - - xpdf303: Add writePSString() helper function to FoFiType1C - - fofi/FoFiType1C.cc | 68 - +++++++++++++++++++++++++++++++++++++++--------------- - fofi/FoFiType1C.h | 1 + - 2 files changed, 51 insertions(+), 18 deletions(-) - -commit ff03811db1ef833df4bab12fe3bf3a8c1534c174 -Author: Carlos Garcia Campos -Date: Sat Sep 3 10:40:15 2011 +0200 - - xpdf303: More checks in GooString - - goo/GooString.cc | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -commit 0029efbe2a8a97ff34353f8028ac649b2fd07013 -Author: Carlos Garcia Campos -Date: Sat Sep 3 10:32:14 2011 +0200 - - xpdf303: Use a double instead of an int with a cast - - goo/GooString.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 419ee8c30ba0df02e9f0281b321fbe38387e5a21 -Author: Carlos Garcia Campos -Date: Fri Sep 2 18:44:04 2011 +0200 - - xpdf303: Add more formats to GooString - - goo/GooString.cc | 102 - ++++++++++++++++++++++++++++++++++++++++++++++++++----- - goo/GooString.h | 21 ++++++++++-- - 2 files changed, 111 insertions(+), 12 deletions(-) - -commit 738a6954da01fd3fc8c1cd5baa49fc7b8c959169 -Author: Carlos Garcia Campos -Date: Fri Sep 2 18:24:04 2011 +0200 - - xpdf303: Add getGlyphName() to FoFiType1C - - fofi/FoFiType1C.cc | 12 ++++++++++++ - fofi/FoFiType1C.h | 4 ++++ - 2 files changed, 16 insertions(+) - -commit 39b77a193996b0916690a246f4a9874dad596b2f -Author: Carlos Garcia Campos -Date: Fri Sep 2 18:17:51 2011 +0200 - - xpdf303: Improvements in FoFiType1 parser - - fofi/FoFiType1.cc | 75 - ++++++++++++++++++++++++++----------------------------- - 1 file changed, 35 insertions(+), 40 deletions(-) - -commit 44dbb28a07125f92a0835aea7ad3403310bc451d -Author: Carlos Garcia Campos -Date: Fri Sep 2 18:08:39 2011 +0200 - - xpdf303: Handle PFB headers in Type 1 font files - - fofi/FoFiType1.cc | 36 ++++++++++++++++++++++++++++++++++++ - fofi/FoFiType1.h | 1 + - 2 files changed, 37 insertions(+) - -commit 9531a52b227a994ab8e0d66aeaff2b21358ca73e -Author: Carlos Garcia Campos -Date: Fri Sep 2 18:01:35 2011 +0200 - - xpdf303: New signature of methods convertToCIDType0() and - convertToType0() - - fofi/FoFiTrueType.cc | 8 ++--- - fofi/FoFiTrueType.h | 4 +-- - fofi/FoFiType1C.cc | 84 - +++++++++++++++++++++++++++++++++++--------------- - fofi/FoFiType1C.h | 19 +++++++++--- - poppler/PSOutputDev.cc | 13 ++++++-- - 5 files changed, 91 insertions(+), 37 deletions(-) - -commit 830d2b40770333489a08f23a3b16a372770a8d19 -Author: Albert Astals Cid -Date: Thu Sep 1 23:23:57 2011 +0200 - - xpdf303: Use openFile - - poppler/CharCodeToUnicode.cc | 4 ++-- - poppler/GlobalParams.cc | 10 +++++----- - 2 files changed, 7 insertions(+), 7 deletions(-) - -commit ddf9d6e35b40b902519cbaa8cb664ba6dfdfd510 -Author: Albert Astals Cid -Date: Thu Sep 1 23:21:26 2011 +0200 - - xpdf303: openFile + minor fixes for openTempFile in Windows - - goo/gfile.cc | 108 - +++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- - goo/gfile.h | 13 +++++++ - 2 files changed, 118 insertions(+), 3 deletions(-) - -commit 68e8fa9ff4f13b6703148b3eb6ea628418211243 -Author: Albert Astals Cid -Date: Thu Sep 1 23:17:59 2011 +0200 - - xpdf303: make gcc happy - - fofi/FoFiType1C.cc | 2 ++ - 1 file changed, 2 insertions(+) - -commit 876021b1aa16ad38767a91e1be31c392f368fde2 -Author: Carlos Garcia Campos -Date: Thu Sep 1 19:07:01 2011 +0200 - - xpdf303: Add getFontMatrix() - - fofi/FoFiTrueType.cc | 76 - +++++++++++++++++++++++++++++++--------------------- - fofi/FoFiTrueType.h | 9 +++++++ - fofi/FoFiType1.cc | 37 +++++++++++++++++++++++++ - fofi/FoFiType1.h | 4 +++ - fofi/FoFiType1C.cc | 29 ++++++++++++++++++++ - fofi/FoFiType1C.h | 3 +++ - 6 files changed, 127 insertions(+), 31 deletions(-) - -commit 1369862ed61ef8b0f81c52fce36f6c1602d82ddb -Author: Carlos Garcia Campos -Date: Thu Sep 1 18:27:51 2011 +0200 - - xpdf303: Ignore entries that have an invalid tag too - - fofi/FoFiTrueType.cc | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -commit 0fe7cc82e84dc2a3b79248b111656e5e7df9fdc2 -Author: Carlos Garcia Campos -Date: Thu Sep 1 18:21:33 2011 +0200 - - xpdf303: Update cmap, name, post and os2 tables in FoFiTrueType - - fofi/FoFiTrueType.cc | 29 ++++++++++++++++------------- - 1 file changed, 16 insertions(+), 13 deletions(-) - -commit 0feebf5f3c9da8d7a1154456a00492a623340cec -Author: Carlos Garcia Campos -Date: Thu Sep 1 18:16:59 2011 +0200 - - xpdf303: Ignore any bogus entries in the table directory - - It's a different approach to fix the same issue we had already fixed, - added just to make future merge easier. We were also reallocating the - tables array, I've kept that but doing it only when the size actually - changes. - - fofi/FoFiTrueType.cc | 25 +++++++++++++------------ - 1 file changed, 13 insertions(+), 12 deletions(-) - -commit 68c6ebc78b89eec94a9c3538fe6e27561a21b680 -Author: Carlos Garcia Campos -Date: Thu Sep 1 17:49:46 2011 +0200 - - xpdf303: codeToGID items can be < 0 now - - fofi/FoFiTrueType.cc | 12 ++++++++++-- - poppler/PSOutputDev.cc | 2 +- - splash/SplashFTFont.cc | 2 +- - 3 files changed, 12 insertions(+), 4 deletions(-) - -commit 19204ed5cd5cb64809f1a1f51dd5ffdef2b9417a -Author: Albert Astals Cid -Date: Thu Sep 1 17:28:39 2011 +0200 - - xpdf303: CMap::getCID signature change - - poppler/CMap.cc | 47 +++++++++++++++++++++++++++++++---------------- - poppler/CMap.h | 8 +++++--- - poppler/GfxFont.cc | 6 ++++-- - 3 files changed, 40 insertions(+), 21 deletions(-) - -commit 9c74bef77e7e1d7a8464dff43cae16bb1206665e -Author: Albert Astals Cid -Date: Thu Sep 1 17:04:04 2011 +0200 - - xpdf303: Use splashDist instead of splashSqrt - - splash/SplashT1Font.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 0568d0dc3c42b68b715226e5ce0ff98d73a94ac7 -Author: Albert Astals Cid -Date: Thu Sep 1 17:01:30 2011 +0200 - - xpdf303: Do the multiplication the other way around - - No idea why :-D - - splash/SplashFTFont.cc | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -commit 3c0da502aa1d5b1acae01cf1e43fb96f5ecc11da -Author: Albert Astals Cid -Date: Thu Sep 1 17:00:31 2011 +0200 - - xpdf303: Use splashCheckDet isntead of splashAbs - - splash/SplashFontEngine.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 2b4303c66f8de9a267413465898897fd6b0ebb17 -Author: Albert Astals Cid -Date: Thu Sep 1 16:51:53 2011 +0200 - - xpdf303: Bigger fileKey - - poppler/XRef.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 53060857e31a01413936fbe33b7032a0a325b384 -Author: Albert Astals Cid -Date: Thu Sep 1 16:50:08 2011 +0200 - - xpdf303: Merge JArithmeticDecoder.* - - poppler/JArithmeticDecoder.cc | 47 - ++++++++++++++++++++++++++++++++++++------- - poppler/JArithmeticDecoder.h | 4 ++++ - 2 files changed, 44 insertions(+), 7 deletions(-) - -commit 0722960b4cf4ce40b6bd278ac7287d64a1d70bf2 -Author: Albert Astals Cid -Date: Thu Sep 1 16:48:31 2011 +0200 - - xpdf303: Do not crash if imgStr->getLine() is NULL - - utils/ImageOutputDev.cc | 21 ++++++++++++++------- - 1 file changed, 14 insertions(+), 7 deletions(-) - -commit f848edab849910b8291c7974e484ef5d02b2234c -Author: Albert Astals Cid -Date: Thu Sep 1 16:42:30 2011 +0200 - - xpdf303: Do not extract the million tiles of a pattern - - utils/ImageOutputDev.cc | 9 +++++++++ - utils/ImageOutputDev.h | 12 ++++++++++++ - 2 files changed, 21 insertions(+) - -commit 01adb7ef6a524d7313a45e7c5f441da4fd0250bd -Author: Albert Astals Cid -Date: Thu Sep 1 16:31:50 2011 +0200 - - xpdf303: Assembler for some functions - - splash/SplashMath.h | 110 - ++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 110 insertions(+) - -commit 4f87a3163f133565e8774ef416e67d05f906723d -Author: Albert Astals Cid -Date: Thu Sep 1 16:25:19 2011 +0200 - - xpdf303: Add splashAvg - - splash/SplashMath.h | 8 ++++++++ - 1 file changed, 8 insertions(+) - -commit 64cf42f89939763d105be4948a20e9ecb81a64c1 -Author: Albert Astals Cid -Date: Thu Sep 1 16:23:08 2011 +0200 - - xpdf303: Add getters to SplashClip - - splash/SplashClip.h | 6 ++++++ - 1 file changed, 6 insertions(+) - -commit 28c6a55742f55a719ef63b8e0eff7c242653cf36 -Author: Albert Astals Cid -Date: Thu Sep 1 16:17:56 2011 +0200 - - xpdf303: unneeded forward declare - - poppler/Page.h | 1 - - 1 file changed, 1 deletion(-) - -commit 38ebe8c568aafbe5f248f9e0a654f46829e0b659 -Author: Albert Astals Cid -Date: Thu Sep 1 16:13:53 2011 +0200 - - xpdf303: Page functions do not need Catalog * anymore - - glib/poppler-document.cc | 2 +- - glib/poppler-page.cc | 11 ++++------ - poppler/FontInfo.cc | 2 +- - poppler/OutputDev.h | 4 ++-- - poppler/PDFDoc.cc | 8 +++---- - poppler/PSOutputDev.cc | 6 +++--- - poppler/PSOutputDev.h | 2 +- - poppler/Page.cc | 36 - ++++++++++++++++---------------- - poppler/Page.h | 16 +++++++------- - poppler/TextOutputDev.cc | 2 +- - poppler/TextOutputDev.h | 2 +- - qt4/src/poppler-link-extractor-private.h | 2 +- - qt4/src/poppler-link-extractor.cc | 4 ++-- - qt4/src/poppler-page.cc | 4 ++-- - utils/HtmlOutputDev.cc | 9 ++++---- - utils/HtmlOutputDev.h | 7 +++---- - utils/pdftohtml.cc | 2 +- - 17 files changed, 58 insertions(+), 61 deletions(-) - -commit 7d794f6411499fb8f26778bf2b54cb9734d004af -Author: Albert Astals Cid -Date: Thu Sep 1 15:47:32 2011 +0200 - - xpdf303: API rework, Gfx wants a PDFDoc instead of an XRef - - cpp/poppler-page-renderer.cpp | 2 +- - glib/poppler-document.cc | 2 +- - glib/poppler-page.cc | 2 -- - poppler/CairoFontEngine.cc | 28 ++++++++++++---------------- - poppler/CairoFontEngine.h | 13 ++++++------- - poppler/CairoOutputDev.cc | 12 +++++------- - poppler/CairoOutputDev.h | 6 +++--- - poppler/Catalog.cc | 8 +++++--- - poppler/Catalog.h | 4 +++- - poppler/Gfx.cc | 15 +++++++++------ - poppler/Gfx.h | 6 ++++-- - poppler/PDFDoc.cc | 6 +++--- - poppler/PSOutputDev.cc | 29 +++++++++++++++-------------- - poppler/PSOutputDev.h | 9 ++++----- - poppler/Page.cc | 8 +++++--- - poppler/Page.h | 4 +++- - poppler/PreScanOutputDev.cc | 6 +++--- - poppler/PreScanOutputDev.h | 4 ++-- - poppler/SplashOutputDev.cc | 13 +++++++------ - poppler/SplashOutputDev.h | 5 +++-- - qt4/src/poppler-private.h | 2 +- - qt4/src/poppler-ps-converter.cc | 2 -- - test/gtk-test.cc | 2 +- - test/pdf-inspector.cc | 2 +- - test/perf-test.cc | 2 +- - utils/pdftocairo.cc | 2 +- - utils/pdftohtml.cc | 6 +++--- - utils/pdftoppm.cc | 2 +- - utils/pdftops.cc | 4 ++-- - 29 files changed, 105 insertions(+), 101 deletions(-) - -commit 52fb80a7b3f98eb8322a7ba84e2900f044b3a18a -Author: Albert Astals Cid -Date: Thu Sep 1 13:27:01 2011 +0200 - - xpdf303: compile++ - - poppler/ArthurOutputDev.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 37ca8dc4215693ec657d165ebdb6c315a0ae92c9 -Author: Carlos Garcia Campos -Date: Thu Sep 1 12:34:32 2011 +0200 - - xpdf303: Use int instead of Gushort for gid/cid maps - - fofi/FoFiTrueType.cc | 18 +++++++++--------- - fofi/FoFiTrueType.h | 14 +++++++------- - fofi/FoFiType1C.cc | 8 ++++---- - fofi/FoFiType1C.h | 2 +- - poppler/CairoFontEngine.cc | 22 +++++++++++----------- - poppler/CairoFontEngine.h | 8 ++++---- - poppler/GfxFont.cc | 22 +++++++++++----------- - poppler/GfxFont.h | 10 +++++----- - poppler/PSOutputDev.cc | 14 +++++++------- - poppler/SplashOutputDev.cc | 6 +++--- - splash/SplashFTFontEngine.cc | 6 +++--- - splash/SplashFTFontEngine.h | 2 +- - splash/SplashFTFontFile.cc | 12 ++++++------ - splash/SplashFTFontFile.h | 8 ++++---- - splash/SplashFontEngine.cc | 2 +- - splash/SplashFontEngine.h | 2 +- - 16 files changed, 78 insertions(+), 78 deletions(-) - -commit df942e25bff9b014bde0ff69c8a01fa3c1963015 -Author: Albert Astals Cid -Date: Thu Sep 1 01:08:10 2011 +0200 - - xpdf303: More parsing flexibility - - poppler/CharCodeToUnicode.cc | 18 ++++++------------ - 1 file changed, 6 insertions(+), 12 deletions(-) - -commit 5305dfc5702e8004e5ae35697c6aebd0b1a5c96e -Author: Albert Astals Cid -Date: Thu Sep 1 01:05:02 2011 +0200 - - xpdf303: Make sure codes are inside the range - - poppler/CharCodeToUnicode.cc | 17 ++++++++++++++++- - 1 file changed, 16 insertions(+), 1 deletion(-) - -commit 45212483572c68abd612b5c62b21cbb545e10143 -Author: Albert Astals Cid -Date: Thu Sep 1 01:01:13 2011 +0200 - - xpdf303: change mapLen growing stragegy - - poppler/CharCodeToUnicode.cc | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -commit 75d70f190e97f69047cdbe97a872a936788392d9 -Author: Albert Astals Cid -Date: Thu Sep 1 01:00:23 2011 +0200 - - xpdf303: Limit code to 0xffffff - - poppler/CharCodeToUnicode.cc | 5 +++++ - 1 file changed, 5 insertions(+) - -commit b4180a187f9246b6390df112e5536ead9ef9bcbe -Author: Albert Astals Cid -Date: Thu Sep 1 00:59:09 2011 +0200 - - xpdf303: Use parseHex instead of sscanf - - poppler/CharCodeToUnicode.cc | 18 ++++++++---------- - 1 file changed, 8 insertions(+), 10 deletions(-) - -commit 121f648f233adcdc631c7e29d67b60baa922e29a -Author: Albert Astals Cid -Date: Thu Sep 1 00:28:40 2011 +0200 - - Add helper parseHex function - - poppler/CharCodeToUnicode.cc | 35 +++++++++++++++++++++++++++++++++++ - 1 file changed, 35 insertions(+) - -commit be0436ace671070bab4304efee607f40c959bc55 -Author: Albert Astals Cid -Date: Thu Sep 1 00:26:57 2011 +0200 - - xpdf303: CharCodeToUnicode::makeIdentityMapping & friends - - poppler/CharCodeToUnicode.cc | 25 +++++++++++++++++++++++++ - poppler/CharCodeToUnicode.h | 4 ++++ - 2 files changed, 29 insertions(+) - -commit 5dd94447b14db1894f06ad0590187dae7575e33a -Author: Albert Astals Cid -Date: Thu Sep 1 00:15:59 2011 +0200 - - xpdf303: Remove unused constructor - - splash/SplashXPath.cc | 5 ----- - splash/SplashXPath.h | 1 - - 2 files changed, 6 deletions(-) - -commit d00d56e4a46e8534378534de0d94ce0551d75d84 -Author: Albert Astals Cid -Date: Thu Sep 1 00:11:49 2011 +0200 - - xpdf303: Speedup SplashScreen - - By using << instead of * and by putting some functions on the header - so they can be inlined - - splash/SplashScreen.cc | 89 - +++++++++++++++++--------------------------------- - splash/SplashScreen.h | 14 ++++++-- - 2 files changed, 42 insertions(+), 61 deletions(-) - -commit 5e8debf96ab1bb9db31a0332a482d08c181d52ea -Author: Albert Astals Cid -Date: Wed Aug 31 23:56:52 2011 +0200 - - xpdf303: Add splashCheckDet helper - - splash/SplashMath.h | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -commit 4cef5a52b33b1afba28d890bbe48000b734ac357 -Author: Albert Astals Cid -Date: Wed Aug 31 21:09:50 2011 +0200 - - xpdf303: Protect against NULL from lexer->getStream() - - poppler/Parser.cc | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -commit 2547ec60db6d954e5c8318e30fcc54f70bcfa95c -Author: Albert Astals Cid -Date: Wed Aug 31 21:05:11 2011 +0200 - - xpdf303: Add GBool force = gFalse to SplashPath::close - - splash/SplashPath.cc | 5 +++-- - splash/SplashPath.h | 6 ++++-- - 2 files changed, 7 insertions(+), 4 deletions(-) - -commit 9370f9640a24c7b944f3da7c10e070a960bdd8f9 -Author: Albert Astals Cid -Date: Wed Aug 31 21:01:32 2011 +0200 - - xpdf303: Add guards to the header - - poppler/Stream-CCITT.h | 5 +++++ - 1 file changed, 5 insertions(+) - -commit ab9dea663a4df5af8f54c1ff5149254adfd72ce9 -Author: Albert Astals Cid -Date: Wed Aug 31 20:34:17 2011 +0200 - - xpdf303: Add SplashBitmap::writeAlphaPGMFile and - SplashBitmap::takeData - - splash/SplashBitmap.cc | 22 ++++++++++++++++++++++ - splash/SplashBitmap.h | 6 ++++++ - 2 files changed, 28 insertions(+) - -commit 6558d735c65a3dca9b9e16de5588c8b8c482f04f -Author: Albert Astals Cid -Date: Wed Aug 31 20:30:27 2011 +0200 - - xpdf303: Write faster - - splash/SplashBitmap.cc | 14 ++------------ - 1 file changed, 2 insertions(+), 12 deletions(-) - -commit a9b26d9c35fccc7b46a96acdb2064a9976bd49bd -Author: Albert Astals Cid -Date: Wed Aug 31 20:29:58 2011 +0200 - - xpdf303: Only free data if there is data to free - - splash/SplashBitmap.cc | 11 ++++++----- - 1 file changed, 6 insertions(+), 5 deletions(-) - -commit 8f6e0285d7e80d8c1a8defaad9d0f87a2e054151 -Author: Albert Astals Cid -Date: Wed Aug 31 20:20:47 2011 +0200 - - xpdf303: PDFDocEncoding changes - - This overwrites Michael Vrable's changes of using U+FFFD to actually - using the order, i'm taking Derek's change here - - poppler/PDFDocEncoding.cc | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit 9c8f30fb4a2a0dd2cf359610e33749e1682921c7 -Author: Albert Astals Cid -Date: Wed Aug 31 20:17:38 2011 +0200 - - xpdf303: comment changes - - poppler/Link.h | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -commit b78046057657b44c5cc9353d9e3dde356eb7fcbd -Author: Albert Astals Cid -Date: Wed Aug 31 19:32:03 2011 +0200 - - xpdf303: Introduce unicodeTypeNum and unicodeTypeAlphaNum - - poppler/UnicodeTypeTable.cc | 11 +++++++++++ - poppler/UnicodeTypeTable.h | 4 ++++ - 2 files changed, 15 insertions(+) - -commit 0ec4b390ddb7fa7d028b8f0515ecd3e61c488c9f -Author: Albert Astals Cid -Date: Wed Aug 31 19:30:55 2011 +0200 - - xpdf303: UnicodeTypeTable tables changes - - poppler/UnicodeTypeTable.cc | 28 ++++++++++++++-------------- - 1 file changed, 14 insertions(+), 14 deletions(-) - -commit f331c009f94703d6007fce9570ee19c6e4822339 -Author: Albert Astals Cid -Date: Wed Aug 31 19:20:12 2011 +0200 - - xpdf303: Remove warning() from Error.h - - poppler/CairoOutputDev.cc | 6 +++--- - poppler/Error.cc | 7 ------- - poppler/Error.h | 1 - - 3 files changed, 3 insertions(+), 11 deletions(-) - -commit 53f94df2ce21793914ccc153ba6b2fe5cbeb8371 -Author: Albert Astals Cid -Date: Wed Aug 31 19:17:13 2011 +0200 - - Port to setErrorCallback - - cpp/poppler-document.cpp | 2 +- - cpp/poppler-private.cpp | 6 ++---- - cpp/poppler-private.h | 3 ++- - qt4/src/poppler-private.cc | 8 +++----- - test/perf-test.cc | 4 ++-- - 5 files changed, 10 insertions(+), 13 deletions(-) - -commit 95a52f06a98f49f7c8f2b92634b75af96b4eee1d -Author: Albert Astals Cid -Date: Wed Aug 31 19:07:22 2011 +0200 - - xpdf303: Forgot this when doing the char * -> const char * - - poppler/JPXStream.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 00549400f155d8e36b4ac718603fc945858fe50d -Author: Albert Astals Cid -Date: Wed Aug 31 19:04:14 2011 +0200 - - xpdf303: error() changes, new param and formatting - - fofi/FoFiBase.cc | 8 +-- - fofi/FoFiTrueType.cc | 2 +- - fofi/FoFiType1.cc | 4 +- - goo/JpegWriter.cc | 2 +- - goo/PNGWriter.cc | 16 ++--- - poppler/Annot.cc | 40 +++++------ - poppler/ArthurOutputDev.cc | 16 ++--- - poppler/CMap.cc | 26 +++---- - poppler/CachedFile.cc | 2 +- - poppler/CairoFontEngine.cc | 10 +-- - poppler/Catalog.cc | 50 ++++++------- - poppler/CharCodeToUnicode.cc | 54 +++++++------- - poppler/CurlCachedFile.cc | 2 +- - poppler/DCTStream.cc | 2 +- - poppler/Decrypt.cc | 2 +- - poppler/Error.cc | 55 ++++++++++----- - poppler/Error.h | 23 +++++- - poppler/FileSpec.cc | 8 +-- - poppler/Form.cc | 44 ++++++------ - poppler/Function.cc | 107 ++++++++++++++-------------- - poppler/Gfx.cc | 161 - +++++++++++++++++++++--------------------- - poppler/GfxFont.cc | 102 ++++++++++++++------------- - poppler/GfxState.cc | 128 ++++++++++++++++----------------- - poppler/GfxState.h | 8 +-- - poppler/GlobalParams.cc | 38 +++++----- - poppler/GlobalParamsWin.cc | 4 +- - poppler/Hints.cc | 22 +++--- - poppler/JBIG2Stream.cc | 88 +++++++++++------------ - poppler/JPEG2000Stream.cc | 10 +-- - poppler/JPXStream.cc | 164 - ++++++++++++++++++++++--------------------- - poppler/Lexer.cc | 24 +++---- - poppler/Linearization.cc | 20 +++--- - poppler/Link.cc | 77 ++++++++++---------- - poppler/Movie.cc | 2 +- - poppler/Object.h | 8 +-- - poppler/OptionalContent.cc | 14 ++-- - poppler/PDFDoc.cc | 43 ++++++------ - poppler/PDFDocFactory.cc | 2 +- - poppler/PSOutputDev.cc | 45 ++++++------ - poppler/Page.cc | 12 ++-- - poppler/Parser.cc | 10 +-- - poppler/Rendition.cc | 6 +- - poppler/SecurityHandler.cc | 12 ++-- - poppler/SplashOutputDev.cc | 28 ++++---- - poppler/Stream.cc | 116 ++++++++++++++++-------------- - poppler/TextOutputDev.cc | 2 +- - poppler/UnicodeMap.cc | 15 ++-- - poppler/XRef.cc | 32 ++++----- - splash/Splash.cc | 2 +- - splash/SplashBitmap.cc | 6 +- - test/perf-test.cc | 4 +- - utils/HtmlOutputDev.cc | 18 ++--- - utils/ImageOutputDev.cc | 10 +-- - utils/pdfextract.cc | 4 +- - utils/pdfimages.cc | 2 +- - utils/pdfinfo.cc | 6 +- - utils/pdfmerge.cc | 6 +- - utils/pdftocairo.cc | 6 +- - utils/pdftohtml.cc | 6 +- - utils/pdftops.cc | 6 +- - utils/pdftotext.cc | 12 ++-- - 61 files changed, 912 insertions(+), 842 deletions(-) - -commit cd0764921064bfd455e9df52dc9bda6fbd2c2db2 -Author: Carlos Garcia Campos -Date: Wed Aug 31 17:23:28 2011 +0200 - - xpdf303: Always define at least 256 glyphs for Type 0 fonts - - fofi/FoFiTrueType.cc | 41 ++++++++++++++++++++++++++++++++++------- - fofi/FoFiTrueType.h | 3 ++- - 2 files changed, 36 insertions(+), 8 deletions(-) - -commit 4d4318e258fb68704b1a51a14fa89134606e2aa7 -Author: Carlos Garcia Campos -Date: Wed Aug 31 17:07:25 2011 +0200 - - xpdf303: Different growing strategy for vmtxTab in FoFiTrueType - - fofi/FoFiTrueType.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit c8c7fcef9bc8f802be2d376c9d2099971f159317 -Author: Carlos Garcia Campos -Date: Wed Aug 31 17:05:16 2011 +0200 - - xpdf303: Fix memory leak in FoFiTrueType - - fofi/FoFiTrueType.cc | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -commit 655b1a97db5449c009e5b63fc7c12233e6fae450 -Author: Carlos Garcia Campos -Date: Wed Aug 31 16:54:05 2011 +0200 - - xpdf303: Check for an invalid loca format field in the head table - in FoFiTrueType - - fofi/FoFiTrueType.cc | 7 +++++++ - 1 file changed, 7 insertions(+) - -commit 9710ab96f1cf26394cc473952a3331d60c149451 -Author: Carlos Garcia Campos -Date: Wed Aug 31 16:49:54 2011 +0200 - - Fix the build - - fofi/FoFiIdentifier.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 36b733a3165fd26aa8c25ba57faa5d2277aa31ec -Author: Carlos Garcia Campos -Date: Tue Aug 30 16:31:52 2011 +0200 - - xpdf303: Handle bogus loca table entries in FoFiTrueType - - where the offset is past the end of the glyf table. This part was - missing in previous commit. - - fofi/FoFiTrueType.cc | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -commit a288bdb417582f07a5a0cb13d5218946a1d0ccc8 -Author: Albert Astals Cid -Date: Tue Aug 30 21:55:43 2011 +0200 - - xpdf303: Increase max keyLength to 32 - - poppler/XRef.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 12e0acd9d393df76e297bb3fde323092c428be21 -Author: Albert Astals Cid -Date: Tue Aug 30 21:03:05 2011 +0200 - - xpdf303: GfxXXXpath different growing strategy - - poppler/GfxState.cc | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -commit 7c5e496715f56498fb1aa08371d2b8d4d0e73d25 -Author: Albert Astals Cid -Date: Tue Aug 30 20:59:36 2011 +0200 - - xpdf303: No need for 4 Guint when 1 is enough - - poppler/GfxState.cc | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit e7e8082901e108130d5c98cc7648f143978c9562 -Author: Albert Astals Cid -Date: Tue Aug 30 20:50:17 2011 +0200 - - xpdf303: GooList::copy, GooList::reverse and GooList::put - - goo/GooList.cc | 22 ++++++++++++++++++++++ - goo/GooList.h | 10 ++++++++++ - 2 files changed, 32 insertions(+) - -commit 8a119cf205467c20269e7beffde9497ffd277c15 -Author: Albert Astals Cid -Date: Tue Aug 30 20:48:40 2011 +0200 - - xpdf303: Inserting with a negative i means prepending - - goo/GooList.cc | 3 +++ - 1 file changed, 3 insertions(+) - -commit 95142a8e63e476324e368785001a23d4f1d462b9 -Author: Albert Astals Cid -Date: Tue Aug 30 20:47:12 2011 +0200 - - xpdf303: If size is 0 reserve 8 anyway - - goo/GooList.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit bd1076da03f76fb62998a9409d366412f4aa5d13 -Author: Albert Astals Cid -Date: Tue Aug 30 20:45:36 2011 +0200 - - xpdf303: Complain for gmalloc and grealloc < 0 - - goo/gmem.cc | 28 ++++++++++++++++++++++++---- - 1 file changed, 24 insertions(+), 4 deletions(-) - -commit 5a42b3693a9e501a27d790d4aeafcb68f63cb950 -Author: Albert Astals Cid -Date: Tue Aug 30 20:38:39 2011 +0200 - - xpdf303: Honor the deleteKeys setting - - goo/GooHash.cc | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -commit d584b54eff52c47f983947b2aff0967dfed0ccf9 -Author: Albert Astals Cid -Date: Tue Aug 30 20:36:03 2011 +0200 - - xpdf303: set to NULL on failure - - goo/gfile.cc | 2 ++ - 1 file changed, 2 insertions(+) - -commit bf2cb5c9c47b4a61192101f0a48771657228e383 -Author: Adrian Johnson -Date: Tue Aug 30 19:08:40 2011 +0930 - - Fix compile error with libpng >= 1.5.0 - - libpng 1.5.0 changed one of the types in the png_set_iCCP() function - prototype. - - goo/PNGWriter.cc | 9 ++++++++- - 1 file changed, 8 insertions(+), 1 deletion(-) - -commit 6364c50ffb4053cc30cecbefff7a3142cab8c50b -Author: Albert Astals Cid -Date: Tue Aug 30 18:27:09 2011 +0200 - - xpdf303: Support for aes256 et all in Decrypt/SecurityHandler - - poppler/Decrypt.cc | 488 - +++++++++++++++++++++++++++++++++++++++------ - poppler/Decrypt.h | 19 +- - poppler/PDFDoc.cc | 2 +- - poppler/SecurityHandler.cc | 238 ++++++++++++---------- - poppler/SecurityHandler.h | 7 +- - poppler/Stream.h | 3 +- - 6 files changed, 595 insertions(+), 162 deletions(-) - -commit 39ce4575f96953b499d09074e847d492d18379fa -Author: Albert Astals Cid -Date: Tue Aug 30 17:39:30 2011 +0200 - - xpdf303: Add FoFiIdentifier - - CMakeLists.txt | 2 + - fofi/FoFiIdentifier.cc | 630 - +++++++++++++++++++++++++++++++++++++++++++++++++ - fofi/FoFiIdentifier.h | 42 ++++ - fofi/Makefile.am | 2 + - 4 files changed, 676 insertions(+) - -commit 33e7d54b4a29d297108ef3dc6008190625125ec8 -Author: Albert Astals Cid -Date: Tue Aug 30 17:36:22 2011 +0200 - - xpdf303: Also check against INT_MAX in FoFiBase - - fofi/FoFiBase.cc | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -commit fb1f56f091e5329b30279916b182f64134f3b2e6 -Author: Albert Astals Cid -Date: Tue Aug 30 17:34:50 2011 +0200 - - xpdf303: Introduce FoFiBase::getU32LE - - fofi/FoFiBase.cc | 15 +++++++++++++++ - fofi/FoFiBase.h | 1 + - 2 files changed, 16 insertions(+) - -commit a79bc3359586cbc2c235d20dfa934dab1f475561 -Author: Carlos Garcia Campos -Date: Tue Aug 30 16:59:08 2011 +0200 - - xpdf303: Check for a zero-entry cmap table in FoFiTrueType - - fofi/FoFiTrueType.cc | 28 +++++++++++++++++----------- - 1 file changed, 17 insertions(+), 11 deletions(-) - -commit efce014e39d0d13157b21a10ff8d483b5cfc561a -Author: Albert Astals Cid -Date: Tue Aug 30 17:02:16 2011 +0200 - - xpdf303: upddate xpdfCopyright - - poppler/poppler-config.h.cmake | 4 ++-- - poppler/poppler-config.h.in | 4 ++-- - 2 files changed, 4 insertions(+), 4 deletions(-) - -commit 2eb388ccc6c7526e66da804d9d800cf29a027914 -Author: Albert Astals Cid -Date: Tue Aug 30 16:50:39 2011 +0200 - - xpdf303: Merge README - - README | 2 +- - README-XPDF | 153 - +++++++++++++++++++++++++++++++++++++++--------------------- - 2 files changed, 101 insertions(+), 54 deletions(-) - -commit 331b0f1c16c4f636fc616569bab030969aa848f2 -Author: Carlos Garcia Campos -Date: Tue Aug 30 16:42:33 2011 +0200 - - xpdf303: Check for entries in the table directory with bogus tags - in FoFiTrueType - - This handles the case where the number of tables given in the - header is - too high. - - fofi/FoFiTrueType.cc | 30 +++++++++++++++++++++++++----- - 1 file changed, 25 insertions(+), 5 deletions(-) - -commit faaba717046ba87ef5ded614e2bcab6260a9f7c2 -Author: Albert Astals Cid -Date: Tue Aug 30 16:36:24 2011 +0200 - - xpdf303: FixedPoint improvements - - goo/FixedPoint.cc | 51 - ++++++++++++++++++++++++++++++++------------------ - goo/FixedPoint.h | 15 +++++++++++++-- - splash/Splash.cc | 12 ++++++++++++ - splash/SplashFTFont.cc | 16 ++++++++-------- - splash/SplashMath.h | 8 +++++--- - splash/SplashXPath.cc | 9 +++++++++ - 6 files changed, 80 insertions(+), 31 deletions(-) - -commit 73efc96eef6bd32a7c058b7dda8101f4f23c454f -Author: Carlos Garcia Campos -Date: Tue Aug 30 16:31:52 2011 +0200 - - xpdf303: Handle bogus loca table entries in FoFiTrueType - - where the offset is past the end of the glyf table. - - fofi/FoFiTrueType.cc | 4 ++++ - 1 file changed, 4 insertions(+) - -commit 1df3489392a77e2b75adbafcc2fa10de829c172e -Author: Carlos Garcia Campos -Date: Tue Aug 30 16:21:40 2011 +0200 - - xpdf303: Use std::sort (with functors) in place of qsort - - It can be significantly faster. Not included changes in - SplashXPathScanner.cc since they depend on other changes not yet - merged. - - fofi/FoFiTrueType.cc | 55 - +++++++++++++++++++++++--------------------------- - poppler/GfxFont.cc | 24 ++++++++++++++-------- - splash/SplashScreen.cc | 12 +++++++---- - splash/SplashXPath.cc | 44 ++++++++++++++++++---------------------- - 4 files changed, 69 insertions(+), 66 deletions(-) - -commit f298e7f844105f2d9a36144e59be86c341e37507 -Merge: 2a6bd7aa 0ca5453f -Author: Albert Astals Cid -Date: Tue Aug 30 16:21:58 2011 +0200 - - Merge branch 'master' into xpdf303merge - -commit 0ca5453fea9e5342188f772acd6f31af1778f236 -Author: Albert Astals Cid -Date: Tue Aug 30 16:20:17 2011 +0200 - - Compile when defining USE_FIXEDPOINT - - splash/Splash.cc | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -commit bd7a53bc2f27fc3979f8de306e2dcaca53d4570a -Author: Albert Astals Cid -Date: Tue Aug 30 16:20:08 2011 +0200 - - match function definition - - poppler/SplashOutputDev.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 2a6bd7aae37f73a94bf1a84f699f310177661611 -Author: Albert Astals Cid -Date: Tue Aug 30 15:13:17 2011 +0200 - - xpdf303: Expand latin1UnicodeMapRanges and ascii7UnicodeMapRanges - - poppler/UnicodeMapTables.h | 10 +++++++--- - 1 file changed, 7 insertions(+), 3 deletions(-) - -commit 4d31785409e464d0e96dcf11167ecdffd64026d1 -Author: Albert Astals Cid -Date: Tue Aug 30 15:09:01 2011 +0200 - - xpdf303: More entries for nameToUnicodeTab - - poppler/NameToUnicodeTable.h | 3159 - ++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 3159 insertions(+) - -commit 2658030836f3a15dadadd7f1989dfaa858bf876f -Author: Albert Astals Cid -Date: Tue Aug 30 14:49:23 2011 +0200 - - xpdf303: char * -> const char * - - cmake/modules/PopplerMacros.cmake | 2 +- - configure.ac | 2 +- - cpp/poppler-private.cpp | 2 +- - cpp/poppler-private.h | 2 +- - fofi/FoFiBase.h | 2 +- - fofi/FoFiEncodings.cc | 6 ++--- - fofi/FoFiEncodings.h | 6 ++--- - fofi/FoFiTrueType.cc | 10 ++++----- - fofi/FoFiTrueType.h | 4 ++-- - fofi/FoFiType1.cc | 4 ++-- - fofi/FoFiType1.h | 2 +- - fofi/FoFiType1C.cc | 14 ++++++------ - fofi/FoFiType1C.h | 6 ++--- - goo/GooHash.cc | 16 +++++++------- - goo/GooHash.h | 12 +++++----- - goo/GooString.cc | 22 +++++++++---------- - goo/GooString.h | 16 +++++++------- - goo/gfile.cc | 4 ++-- - goo/gfile.h | 4 ++-- - goo/gmem.cc | 2 +- - goo/gmem.h | 2 +- - poppler/Annot.cc | 8 +++---- - poppler/Annot.h | 6 ++--- - poppler/ArthurOutputDev.cc | 6 ++--- - poppler/BuiltinFont.cc | 6 ++--- - poppler/BuiltinFont.h | 10 ++++----- - poppler/DCTStream.cc | 2 +- - poppler/DCTStream.h | 2 +- - poppler/Dict.cc | 14 ++++++------ - poppler/Dict.h | 14 ++++++------ - poppler/Error.cc | 10 ++++----- - poppler/Error.h | 6 ++--- - poppler/FileSpec.cc | 2 +- - poppler/FlateStream.cc | 2 +- - poppler/FlateStream.h | 2 +- - poppler/FontEncodingTables.cc | 14 ++++++------ - poppler/FontEncodingTables.h | 14 ++++++------ - poppler/FontInfo.cc | 2 +- - poppler/Form.cc | 6 ++--- - poppler/Form.h | 4 ++-- - poppler/Gfx.cc | 2 +- - poppler/Gfx.h | 2 +- - poppler/GfxFont.cc | 46 - +++++++++++++++++++-------------------- - poppler/GfxFont.h | 8 +++---- - poppler/GfxState.cc | 6 ++--- - poppler/GfxState.h | 2 +- - poppler/GlobalParams.cc | 21 +++++++++--------- - poppler/GlobalParams.h | 8 +++---- - poppler/GlobalParamsWin.cc | 6 ++--- - poppler/JBIG2Stream.cc | 2 +- - poppler/JBIG2Stream.h | 2 +- - poppler/JPEG2000Stream.cc | 2 +- - poppler/JPEG2000Stream.h | 2 +- - poppler/JPXStream.h | 2 +- - poppler/NameToCharCode.cc | 8 +++---- - poppler/NameToCharCode.h | 6 ++--- - poppler/NameToUnicodeTable.h | 2 +- - poppler/Object.cc | 4 ++-- - poppler/Object.h | 28 ++++++++++++------------ - poppler/PDFDoc.cc | 2 +- - poppler/PSOutputDev.cc | 24 ++++++++++---------- - poppler/PSOutputDev.h | 8 +++---- - poppler/Page.cc | 2 +- - poppler/Page.h | 2 +- - poppler/SplashOutputDev.cc | 6 ++--- - poppler/Stream.cc | 16 +++++++------- - poppler/Stream.h | 28 ++++++++++++------------ - poppler/TextOutputDev.cc | 2 +- - poppler/TextOutputDev.h | 2 +- - poppler/UnicodeMap.cc | 4 ++-- - poppler/UnicodeMap.h | 4 ++-- - poppler/UnicodeTypeTable.cc | 4 ++-- - qt4/src/poppler-private.cc | 2 +- - qt4/src/poppler-ps-converter.cc | 2 +- - splash/SplashFTFontEngine.cc | 8 +++---- - splash/SplashFTFontEngine.h | 6 ++--- - splash/SplashFTFontFile.cc | 6 ++--- - splash/SplashFTFontFile.h | 2 +- - splash/SplashFontEngine.cc | 6 ++--- - splash/SplashFontEngine.h | 6 ++--- - splash/SplashT1FontEngine.cc | 6 ++--- - splash/SplashT1FontEngine.h | 4 ++-- - splash/SplashT1FontFile.cc | 10 ++++----- - splash/SplashT1FontFile.h | 6 ++--- - test/pdf-operators.c | 4 ++-- - test/perf-test.cc | 4 ++-- - utils/HtmlFonts.cc | 4 ++-- - utils/HtmlOutputDev.cc | 12 +++++----- - utils/HtmlOutputDev.h | 4 ++-- - utils/parseargs.cc | 4 ++-- - utils/parseargs.h | 6 ++--- - utils/pdffonts.cc | 2 +- - utils/pdfinfo.cc | 12 +++++----- - utils/pdftocairo.cc | 4 ++-- - utils/pdftohtml.cc | 10 ++++----- - utils/pdftotext.cc | 12 +++++----- - 96 files changed, 337 insertions(+), 338 deletions(-) - -commit c899d26e0f7a61db99925179330c28df015a676b -Author: Albert Astals Cid -Date: Tue Aug 30 00:31:00 2011 +0200 - - Add COPYING3 from xpdf3.03 - - COPYING3 | 674 - +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 674 insertions(+) - -commit 508517a35cb3bc5195682a9cd89fb50a801eddc2 -Author: Albert Astals Cid -Date: Mon Aug 29 23:55:42 2011 +0200 - - 0.17.3 - - CMakeLists.txt | 4 ++-- - NEWS | 32 ++++++++++++++++++++++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - glib/CMakeLists.txt | 2 +- - glib/Makefile.am | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/CMakeLists.txt | 2 +- - qt4/src/Doxyfile | 2 +- - qt4/src/Makefile.am | 2 +- - 10 files changed, 42 insertions(+), 10 deletions(-) - -commit 1431564f3363a63a8669c8dd15970db814f4969f -Author: Thomas Freitag -Date: Mon Aug 29 22:22:02 2011 +0200 - - Add pdfextract and pdfmerge - - See "Creating PDF with poppler ?" thread for more info - - utils/CMakeLists.txt | 15 +++++ - utils/Makefile.am | 10 +++ - utils/pdfextract.cc | 111 ++++++++++++++++++++++++++++++++ - utils/pdfmerge.cc | 176 - +++++++++++++++++++++++++++++++++++++++++++++++++++ - 4 files changed, 312 insertions(+) - -commit 8ca2f41089bc6402baf9b24428af04314c037b54 -Author: Thomas Freitag -Date: Mon Aug 29 22:20:52 2011 +0200 - - Rework writing of PDF files - - Makes it more compatible with other PDF readers - See "Creating PDF with poppler ?" thread in the mailing list for - more info - - poppler/PDFDoc.cc | 389 - ++++++++++++++++++++++++++++++++++++++++++++++++------ - poppler/PDFDoc.h | 30 ++++- - 2 files changed, 375 insertions(+), 44 deletions(-) - -commit 33da7e270431e8e4c500e7573b3ca0dddd9f237e -Author: suzuki toshiya -Date: Sun Aug 28 22:07:38 2011 +0200 - - Fix building static-linked pdftocairo - - utils/Makefile.am | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -commit 91fafce028ca6620c0eb22e370fb4c6fd3404e3c -Author: Adrian Johnson -Date: Tue Aug 23 21:02:02 2011 +0930 - - cairo: align strokes when Stroke Adjust is true and line width <= 1 - - If the stroke coordinates are not aligned, lines in cairo may be up to - 1 pixel wider than the requested width. This is most obvious when the - line width is 1 and the rendered line is 2 pixels. - - When Stroke Adjust is true, the PDF standard requires that stroke - coordinates be adjusted to ensure the stroke width is within half a - pixel of the requested width. - - If Stroke Adjust is enabled and the width is <= 1 pixel (the previous - commit adjusts the width to be at least 1 pixel), use the method - documented at http://www.cairographics.org/FAQ/#sharp_lines to align - the coordinates to ensure the rendered width is 1 pixel. - - Fixes bug #4536. - - poppler/CairoOutputDev.cc | 40 +++++++++++++++++++++++++++++++++++----- - poppler/CairoOutputDev.h | 3 +++ - 2 files changed, 38 insertions(+), 5 deletions(-) - -commit cfc67afe80b963ba662018674cadf3085466bb9f -Author: Adrian Johnson -Date: Tue Aug 23 20:46:24 2011 +0930 - - cairo: fix stroking of very thin lines - - Lines with a width less than 1.0 are almost invisible in cairo output - due to antialising. The PDF standard states that when the Stroke - Adjust graphics parameter is true, all lines must be at least one - pixel wide. - - Add a stroke_adjust flag to the CairoOuputDev. Like splash, use the - globalParam strokeAdjust setting (which defaults to true) to - initialize the flag and ignore the Stroke Adjust settng in PDF - files. This emulates Acrobat behavior. - - When stroke_adjust is true, find the line width in device pixels and - if less than 0.5 set the line width to 0.5 device pixels. The value - 0.5 pixels seems to make horizontal and vertical lines look better - because integer aligned 1.0 wide lines in cairo are rendered two - pixels wide which looks too fat. - - poppler/CairoOutputDev.cc | 20 +++++++++++++++++++- - poppler/CairoOutputDev.h | 1 + - 2 files changed, 20 insertions(+), 1 deletion(-) - -commit 7a7c932e09796b944dda69df1b339c889ee1d63a -Author: Albert Astals Cid -Date: Thu Aug 25 00:23:40 2011 +0200 - - Add a way to get the fully qualified name - - qt4/src/poppler-form.cc | 12 +++++++++++- - qt4/src/poppler-form.h | 8 +++++++- - 2 files changed, 18 insertions(+), 2 deletions(-) - -commit e001871d927f9cc86b4327d64e4c66ad00172ad0 -Author: Albert Astals Cid -Date: Wed Aug 24 23:44:18 2011 +0200 - - Clarify ownership - - qt4/src/poppler-qt4.h | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 87c48fdc175be4d852b953778f915ea93cd50194 -Author: Adrian Johnson -Date: Wed Aug 24 19:53:48 2011 +0930 - - cairo: fix unique id mime data - - The unique id string was copied before the object number was appended - resulting in all images in pdf output being the same. - - poppler/CairoOutputDev.cc | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -commit 08a2ba6f1603246651f0d5e697b88d38363d7df2 -Author: Pino Toscano -Date: Tue Aug 23 20:20:32 2011 +0200 - - pdftocairo/cmake: need to link to freetype - - utils/CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 82496b18dc4aff66cc29f2b6607c8f894afe8b49 -Author: Albert Astals Cid -Date: Mon Aug 22 16:42:28 2011 +0200 - - Update Adrian (C) - - poppler/GfxFont.h | 1 + - 1 file changed, 1 insertion(+) - -commit 2576e3a6d9746e2272c620a775e11295932eb5f2 -Author: Adrian Johnson -Date: Mon Aug 22 21:41:36 2011 +0930 - - update SEE ALSO section of man pages - - - ensure each man page references all other utils - - sort list of utils in alphabetical order - - utils/pdffonts.1 | 8 +++++--- - utils/pdfimages.1 | 8 +++++--- - utils/pdfinfo.1 | 8 +++++--- - utils/pdftocairo.1 | 2 +- - utils/pdftohtml.1 | 8 ++++++++ - utils/pdftoppm.1 | 8 +++++--- - utils/pdftops.1 | 8 +++++--- - utils/pdftotext.1 | 9 +++++---- - 8 files changed, 39 insertions(+), 20 deletions(-) - -commit 23ec5c8d394beb632ee45f6308215646cd1a0195 -Author: Adrian Johnson -Date: Mon Aug 22 21:26:24 2011 +0930 - - cairo: only use show_text_glyphs if the surface supports it and the - font has toUnicode - - When generating pdf output, fonts that do not have toUnicode cause an - excessive number of empty text ActualText entries to be written due to - glyphs that do not have have a mapping. - - poppler/CairoOutputDev.cc | 12 ++++++++---- - poppler/CairoOutputDev.h | 1 + - poppler/GfxFont.h | 3 +++ - 3 files changed, 12 insertions(+), 4 deletions(-) - -commit 3a574f13fa22b7c31eda0d0437f4094a5a39ff34 -Author: Adrian Johnson -Date: Fri Aug 19 23:23:24 2011 +0930 - - cairo: fix stroke patterns - - Since cairo still does not yet have cairo_stroke_to_path(), this - implements a workaround for stroke patterns. In clipToStrokePath, the - stroke path and stroke parameters are saved. In tilingPatternFill and - fill (used to draw shading patterns) if a stroke path clip has been - saved, the current pattern is stroked instead of filled using the - saved stroke. - Fixes bug #11719. - - poppler/CairoOutputDev.cc | 52 - ++++++++++++++++++++++++++++++++++++++++++++++- - poppler/CairoOutputDev.h | 17 ++++++++++++++-- - 2 files changed, 66 insertions(+), 3 deletions(-) - -commit eb740dac838d2a1e32899327ca6d25c3dca641df -Author: Carlos Garcia Campos -Date: Mon Aug 22 13:41:56 2011 +0200 - - glib-demo: Add text attributes information to text demo - - glib/demo/text.c | 103 - +++++++++++++++++++++++++++++++++++++++++++++++++++---- - 1 file changed, 97 insertions(+), 6 deletions(-) - -commit cda4aefaa136ae07778de3b1593808a5aaa2db5b -Author: Carlos Garcia Campos -Date: Mon Aug 22 13:40:49 2011 +0200 - - glib-demo: Add pgd_pixbuf_new_for_color() to utils - - To get a pixbuf for a given poppler color. - - glib/demo/annots.c | 22 +--------------------- - glib/demo/utils.c | 27 +++++++++++++++++++++++++++ - glib/demo/utils.h | 1 + - 3 files changed, 29 insertions(+), 21 deletions(-) - -commit 2a11b2963a548186654722a393db1e19d57828f1 -Author: danigm -Date: Mon Aug 22 12:51:50 2011 +0200 - - glib: Add poppler_page_get_text_attributes() - - It returns a list of text attributes that apply to a range of text as - returned by poppler_page_get_text(). Text attributes are represented - by - a PopplerTextAttributes struct that contains font name, font size, - whether text is undrlined and foreground color for a range of text. - Fixes bug #33269. - - glib/poppler-page.cc | 202 - ++++++++++++++++++++++++++++++++++++ - glib/poppler-page.h | 33 ++++++ - glib/poppler.h | 1 + - glib/reference/poppler-sections.txt | 7 ++ - 4 files changed, 243 insertions(+) - -commit 15f99157cf3900bf20cf619e204ae53085af497d -Author: Carlos Garcia Campos -Date: Mon Aug 22 12:43:12 2011 +0200 - - textoutputdev: Add TextFontInfo::matches() - - It checks whether two TextFontInfo objects contain the same font. - - poppler/TextOutputDev.cc | 4 ++++ - poppler/TextOutputDev.h | 1 + - 2 files changed, 5 insertions(+) - -commit 5b554b39fca634c8ba58915c14522cb2920fe280 -Author: Pino Toscano -Date: Mon Aug 22 13:16:23 2011 +0200 - - pdftocairo/cmake: link to lcms library if available - - utils/CMakeLists.txt | 3 +++ - 1 file changed, 3 insertions(+) - -commit f7cd236fea8740ef05635d1fd7917a778cc373f0 -Author: Albert Astals Cid -Date: Mon Aug 22 00:00:32 2011 +0200 - - Ship HtmlUtils.h - - utils/Makefile.am | 1 + - 1 file changed, 1 insertion(+) - -commit a128a858c50287cfba74c69996276ea44370dc26 -Author: Albert Astals Cid -Date: Sun Aug 21 23:52:06 2011 +0200 - - Update Adrian's (C) - - goo/PNGWriter.cc | 2 +- - goo/PNGWriter.h | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit b78134314107d8344360c3313478115ed291630d -Author: Albert Astals Cid -Date: Sun Aug 21 23:46:09 2011 +0200 - - Fix copyright - - c&p is evil - - goo/gtypes_p.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit ade53277546cef4ba19d982518c0cd83a4bb9c12 -Author: Albert Astals Cid -Date: Sun Aug 21 23:42:53 2011 +0200 - - Move HAVE_STDINT_H use to a private header - - This way we do not need to expose it in poppler-config.h since - gtypes.h is a half public header - - goo/Makefile.am | 1 + - goo/gtypes.h | 18 ------------------ - goo/gtypes_p.h | 30 ++++++++++++++++++++++++++++++ - poppler/CairoOutputDev.cc | 1 + - poppler/CairoRescaleBox.cc | 1 + - utils/pdftocairo.cc | 1 + - 6 files changed, 34 insertions(+), 18 deletions(-) - -commit 6166c3a37a4d6307d4f23ee272ea07c95bbba74a -Author: Albert Astals Cid -Date: Sun Aug 21 23:31:30 2011 +0200 - - Silence silly gcc - - goo/PNGWriter.cc | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -commit eb5b228c4c24152e632c931b63c64ffb1e10d45d -Author: Adrian Johnson -Date: Sat Aug 20 21:13:18 2011 +0930 - - pdftocairo: fix writing to stdout for ps/pdf/svg - - utils/pdftocairo.cc | 23 ++++++++++++++++++++--- - 1 file changed, 20 insertions(+), 3 deletions(-) - -commit 1beac5896a301be68de22240017fef11e7d27d40 -Author: Adrian Johnson -Date: Sat Aug 13 00:23:23 2011 +0930 - - Add poppler version to PSOutputDev ouput - - poppler/PSOutputDev.cc | 1 + - 1 file changed, 1 insertion(+) - -commit b35fd3651fd3dbaa876fc64b8c5cfe77ae67335f -Author: Adrian Johnson -Date: Fri Aug 5 23:01:51 2011 +0930 - - cairo: use cairo_show_text_glyphs() when printing - - This will allow cairo to setup the correct toUnicode or glyph names to - ensure text can be extracted. - - poppler/CairoOutputDev.cc | 41 ++++++++++++++++++++++++++++++++++++++--- - poppler/CairoOutputDev.h | 5 +++++ - 2 files changed, 43 insertions(+), 3 deletions(-) - -commit 51ade078bc1fa737e20120ae4cb3bf693a219823 -Author: Stefan Thomas -Date: Thu Jul 15 16:24:55 2010 +0100 - - pdftocairo: Added to CMake build system. - - utils/CMakeLists.txt | 20 ++++++++++++++++++++ - 1 file changed, 20 insertions(+) - -commit 5a8745cdf428e22641937977eedfc1d605f6ff07 -Author: Adrian Johnson -Date: Fri Aug 12 23:57:01 2011 +0930 - - Add pdftocairo man page - - utils/Makefile.am | 5 +- - utils/pdftocairo.1 | 254 - +++++++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 258 insertions(+), 1 deletion(-) - -commit b67a12b2b26692e2ccec7ff2e6df18fee05be535 -Author: Adrian Johnson -Date: Thu Aug 11 21:34:11 2011 +0930 - - pdftocairo - utility for creating png/jpeg/ps/eps/pdf/svg using - CairoOutputDev - - utils/.gitignore | 2 +- - utils/Makefile.am | 20 +- - utils/pdftocairo.cc | 970 - ++++++++++++++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 989 insertions(+), 3 deletions(-) - -commit 4f2d774826bf7bb7b3825e02c5ca4c2928643950 -Author: Adrian Johnson -Date: Thu Aug 11 21:32:53 2011 +0930 - - png: add support for embedding ICC profile - - goo/PNGWriter.cc | 28 ++++++++++++++++++++++++++++ - goo/PNGWriter.h | 8 ++++++++ - 2 files changed, 36 insertions(+) - -commit 1091f47310bf0fc71bac5dd4ec81dad50b2f2537 -Author: Adrian Johnson -Date: Wed Aug 10 18:48:15 2011 +0930 - - png: Add additional pixel formats - - RGBA is required for images with transparency. GRAY and MONOCHROME - allow PNGWriter write more compact PNG files when the images is known - to be all gray or monochrome. - - goo/PNGWriter.cc | 30 ++++++++++++++++++++++++++---- - goo/PNGWriter.h | 11 ++++++++++- - 2 files changed, 36 insertions(+), 5 deletions(-) - -commit c6f26915db568f12892d48005746ad2922c19000 -Author: Adrian Johnson -Date: Wed Aug 10 18:45:24 2011 +0930 - - png: use PNG_RESOLUTION_METER instead of PNG_RESOLUTION_UNKNOWN to - set resolution - - gimp does not show the correct resolution unless PNG_RESOLUTION_METER - is used - - goo/PNGWriter.cc | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -commit 2667d2a5b34e1bbf322aea42876e7e81aa06dc29 -Author: Adrian Johnson -Date: Tue Aug 9 22:05:53 2011 +0930 - - Use stdint.h instead of assuming the size of types - - configure.ac | 1 + - goo/gtypes.h | 18 ++++++++++++++++++ - poppler/CairoOutputDev.cc | 2 -- - poppler/CairoRescaleBox.cc | 2 -- - 4 files changed, 19 insertions(+), 4 deletions(-) - -commit c043f298e68bdfffcb7505ec354ec7487b5bd7b2 -Author: Adrian Johnson -Date: Fri Jul 8 21:13:36 2011 +0930 - - cairo: assume printer pixel size is 1/600" when stroking 0 width lines - - Fixes bug #39067. - - poppler/CairoOutputDev.cc | 5 +++++ - 1 file changed, 5 insertions(+) - -commit 961adf0b767be78d3556b7315de3761d3d46b107 -Author: Adrian Johnson -Date: Thu Aug 18 17:44:35 2011 +0930 - - cairo: set mime data for soft masked images - - Fixes bug #40192. - - poppler/CairoOutputDev.cc | 3 +++ - 1 file changed, 3 insertions(+) - -commit 86271e4810f714d4ba7a2a6651a9b1d04f653262 -Author: Joshua Richardson -Date: Thu Aug 18 18:48:40 2011 +0200 - - pdftohtml: Support text rotation - - Includes a few other fixlets. - See bug 38586 for more info - - utils/HtmlFonts.cc | 64 ++++++++++--------- - utils/HtmlFonts.h | 10 ++- - utils/HtmlOutputDev.cc | 170 - ++++++++++++++++++++++++++++++++++--------------- - utils/HtmlOutputDev.h | 8 ++- - utils/HtmlUtils.h | 51 +++++++++++++++ - 5 files changed, 218 insertions(+), 85 deletions(-) - -commit 56248b84e2185483dd54704c13838e8f78029d49 -Author: Albert Astals Cid -Date: Thu Aug 18 12:40:51 2011 +0200 - - Only declare overprint if we are going to use it - - utils/pdftoppm.cc | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -commit a1093aae9f64cb6768164551d50cafaef52876c1 -Author: Albert Astals Cid -Date: Thu Aug 18 12:30:29 2011 +0200 - - Fix Adrian's (C) - - poppler/PSOutputDev.cc | 2 +- - poppler/PSOutputDev.h | 3 ++- - poppler/PreScanOutputDev.cc | 1 + - poppler/PreScanOutputDev.h | 1 + - poppler/SplashOutputDev.cc | 1 + - poppler/SplashOutputDev.h | 1 + - 6 files changed, 7 insertions(+), 2 deletions(-) - -commit 7741b24d05f50c134cf15361d52f5df7ae3c3115 -Author: Adrian Johnson -Date: Sun Aug 14 22:06:22 2011 +0930 - - ps: Avoid using /PatternType if only one instance of the pattern - is used - - this optimization makes pages print faster on my LaserJet - - poppler/PSOutputDev.cc | 3 +++ - 1 file changed, 3 insertions(+) - -commit a60e61ac64634dc59c80d8e6b0288c1269fc0154 -Author: Adrian Johnson -Date: Sun Aug 14 21:55:24 2011 +0930 - - ps: use PS Patterns for tiling fill when PS level >= 2 - - poppler/CairoOutputDev.cc | 2 +- - poppler/CairoOutputDev.h | 4 +-- - poppler/Gfx.cc | 4 +-- - poppler/OutputDev.h | 2 +- - poppler/PSOutputDev.cc | 59 - +++++++++++++++++++++++++++++++++++++++++---- - poppler/PSOutputDev.h | 13 +++++++++- - poppler/PreScanOutputDev.cc | 2 +- - poppler/PreScanOutputDev.h | 2 +- - poppler/SplashOutputDev.cc | 2 +- - poppler/SplashOutputDev.h | 2 +- - 10 files changed, 76 insertions(+), 16 deletions(-) - -commit 9938770e737b2fcec8269147e70663517f848925 -Author: Albert Astals Cid -Date: Mon Aug 15 13:17:24 2011 +0200 - - 0.17.2 - - CMakeLists.txt | 4 ++-- - NEWS | 37 +++++++++++++++++++++++++++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - glib/CMakeLists.txt | 2 +- - glib/Makefile.am | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/CMakeLists.txt | 2 +- - qt4/src/Doxyfile | 2 +- - qt4/src/Makefile.am | 5 +++-- - 10 files changed, 49 insertions(+), 11 deletions(-) - -commit 378fc06c574b85b5c003ca842aa743f0ffe5587e -Author: Albert Astals Cid -Date: Mon Aug 1 22:14:12 2011 +0200 - - Only assume the OC is not visible if it exists and is set to no - - Similar to commit e2def20a45c1d8307fd62fabb9769121af975abf - but in the other branch of the if, fixes bug 39637 - - poppler/OptionalContent.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 861a7bfb9431609e1e148240447f23c8e83b9d0f -Author: Thomas Freitag -Date: Fri Jul 29 00:30:58 2011 +0200 - - Implement overprint in Splash - - See the "Implementing overprint in Splash" thread in the mailing - list for more info - - goo/ImgWriter.h | 2 + - goo/JpegWriter.cc | 54 ++++++-- - goo/JpegWriter.h | 7 +- - poppler/Gfx.cc | 98 +++++++++++++-- - poppler/GfxState.cc | 1 + - poppler/GfxState.h | 4 + - poppler/OutputDev.h | 1 + - poppler/SplashOutputDev.cc | 307 - +++++++++++++++++++++++++++++++++++++++------ - poppler/SplashOutputDev.h | 51 +++++++- - splash/Splash.cc | 86 +++++++++---- - splash/Splash.h | 9 +- - splash/SplashBitmap.cc | 64 +++++++++- - splash/SplashBitmap.h | 1 + - splash/SplashPattern.cc | 16 ++- - splash/SplashPattern.h | 7 ++ - splash/SplashState.cc | 11 +- - splash/SplashState.h | 22 ++++ - splash/SplashTypes.h | 5 +- - utils/pdftoppm.cc | 36 +++++- - 19 files changed, 686 insertions(+), 96 deletions(-) - -commit e2fa8a2ca8459d19c0f9dca445a2399b9a3d483d -Author: Koji Otani -Date: Thu Jul 28 12:43:57 2011 +0200 - - Parse the "Medium" modifier when asking fontconfig for a font - - poppler/GlobalParams.cc | 2 ++ - 1 file changed, 2 insertions(+) - -commit 0a677dd8dc9c55936530ea1fee901cab831c52af -Author: Koji Otani -Date: Thu Jul 28 12:42:16 2011 +0200 - - Improve selection of CJK fonts - - Seems we need to do some more fontconfig magic for some special - fontconfig configurations - More info at bug 36474 - - poppler/GlobalParams.cc | 137 - +++++++++++++++++++++++++++++++----------------- - 1 file changed, 89 insertions(+), 48 deletions(-) - -commit e78aff6796a5d5a0a4f2fe8c7ceb33c506e2c8f5 -Author: William Bader -Date: Tue Jul 26 00:10:34 2011 +0200 - - make -level1sep write gray instead of cmyk - - If it is a gray only image - Bug 39012 - - poppler/PSOutputDev.cc | 63 - +++++++++++++++++++++++++++++++++++++++++++++++--- - 1 file changed, 60 insertions(+), 3 deletions(-) - -commit ea31309487aab6ed407a086dff1f350b6e4bdbc9 -Author: Albert Astals Cid -Date: Tue Jul 26 00:09:27 2011 +0200 - - Update (C) - - poppler/PDFDoc.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit a945641497946a825dc880f94200ea1d5409332b -Author: Hib Eris -Date: Sat Jul 23 08:44:06 2011 +0200 - - Handle missing startxref properly - - Bug 38209 - - poppler/PDFDoc.cc | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -commit 2c1b25ef2592367f4c18e204ab5d102f15cf272f -Author: William Bader -Date: Mon Jul 25 23:43:27 2011 +0200 - - Fix a bad memory access - - When not using antialias and the character starts to the left/top - of the image - Bug 37189 - - splash/Splash.cc | 14 ++++++++++---- - 1 file changed, 10 insertions(+), 4 deletions(-) - -commit 300900afa2140141748a7571270be5d850274072 -Author: Daniel Glöckner -Date: Sat Jul 23 19:49:15 2011 +0200 - - Fix numerical overflow in libopenjpeg JPXStream::doLookChar() - - It also includes a speed optimization. Bug 39361 - - poppler/JPEG2000Stream.cc | 37 ++++++++++++++++++++++++++++++++++++- - poppler/JPEG2000Stream.h | 36 +++++++++++------------------------- - 2 files changed, 47 insertions(+), 26 deletions(-) - -commit ec6ea621b066a3b332a8099341664889d2ff3743 -Author: Axel Struebing -Date: Thu Jul 21 23:12:36 2011 +0200 - - Fix calculation of startXRefPos - - Reviewed by Hib Eris - See "another problem with saving linearized files" in the mailing - list for more info - - poppler/PDFDoc.cc | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) - -commit ce97cfcd6373c98fb8c63e9b3ef6c51738f22a50 -Author: Albert Astals Cid -Date: Wed Jul 20 00:24:52 2011 +0200 - - Render dots for 0 length dashed lines - - Bug 34150 - - splash/Splash.cc | 13 +++++++++++++ - 1 file changed, 13 insertions(+) - -commit 42c1b1c4af6b07f488d1b2b02a4700f19b0ab0ef -Author: Tomas Hoger -Date: Wed Jul 20 00:23:15 2011 +0200 - - Fix crash on truncated JPEG/DCT stream - - Bug 36693 - - poppler/DCTStream.cc | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit 091b570c63694e475c24bb8805638ac70c654892 -Author: Albert Astals Cid -Date: Wed Jul 20 00:19:43 2011 +0200 - - Make sure the dict is a page dict - - Fixes second part of 35925 and 39072 - - poppler/PDFDoc.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit ac566c887ffae9d384587f7587609642aef7a016 -Author: Albert Astals Cid -Date: Wed Jul 20 00:17:49 2011 +0200 - - Do not crash if can not get page 0 for some reason - - qt4/tests/test-poppler-qt4.cpp | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -commit 6ad95e7b8b9766aa19f01f06f02eb430e4a4a899 -Author: Albert Astals Cid -Date: Mon Jul 11 15:04:49 2011 +0100 - - Complete the list of preprocessor defines that we never define - - When using any of the two sanctioned build systems - - poppler/poppler-config.h.cmake | 6 ++++-- - poppler/poppler-config.h.in | 6 ++++-- - 2 files changed, 8 insertions(+), 4 deletions(-) - -commit edcc84ef0137a733cf3fab79b919af309d87325c -Author: Albert Astals Cid -Date: Mon Jul 11 15:00:39 2011 +0100 - - Harmonize all SPLASH_CMYK to use #if - - poppler/SplashOutputDev.cc | 24 ++++++++++++------------ - 1 file changed, 12 insertions(+), 12 deletions(-) - -commit a8fca630d592941c033ca6a380bf46b6e733a748 -Author: Albert Astals Cid -Date: Mon Jul 11 14:57:33 2011 +0100 - - Sanitize headers a big - - * Remove includes to config.h as that file does not exist - * Add to poppler-config.h all the defines we define in the - configure/cmake process and are used in headers - * Include poppker-config.h where needed - - goo/GooTimer.h | 2 ++ - goo/ImgWriter.h | 3 +- - goo/JpegWriter.h | 3 +- - goo/PNGWriter.h | 4 +-- - goo/TiffWriter.h | 3 +- - goo/gfile.h | 3 +- - poppler/DCTStream.h | 5 ++-- - poppler/FlateStream.h | 5 ++-- - poppler/Gfx.h | 3 +- - poppler/GfxState.h | 2 ++ - poppler/Stream.h | 3 +- - poppler/poppler-config.h.cmake | 63 - ++++++++++++++++++++++++++++++++++++++++++ - poppler/poppler-config.h.in | 63 - ++++++++++++++++++++++++++++++++++++++++++ - splash/SplashFTFont.h | 4 ++- - splash/SplashMath.h | 4 ++- - 15 files changed, 153 insertions(+), 17 deletions(-) - -commit 214322f3c66a9aad4e2a46f6e305a3dacaa4f8b1 -Author: Albert Astals Cid -Date: Sun Jul 10 01:20:21 2011 +0100 - - And 3 years later, Ed has answered :-) - - Now all our changes are GPLv2+ - - poppler/GfxFont.cc | 3 +++ - poppler/GlobalParams.cc | 3 +++ - poppler/TextOutputDev.cc | 3 +++ - poppler/TextOutputDev.h | 3 +++ - poppler/UnicodeTypeTable.cc | 3 +++ - poppler/UnicodeTypeTable.h | 3 +++ - 6 files changed, 18 insertions(+) - -commit 37cc1344672f480d4062aafbd2f3245ca1392279 -Author: Albert Astals Cid -Date: Sun Jul 10 01:15:44 2011 +0100 - - Fix header - - The file was modified in 2009 and README.contributors stating - everything is GPLv2+ is from 2008 - - poppler/XpdfPluginAPI.cc | 3 +++ - 1 file changed, 3 insertions(+) - -commit 230ab66f52a992557464e325d18f88573ec52423 -Author: Albert Astals Cid -Date: Sun Jul 10 01:06:41 2011 +0100 - - make files easier to include by themselves - - fofi/FoFiTrueType.h | 2 ++ - splash/Splash.h | 3 ++- - splash/SplashFontEngine.h | 3 ++- - 3 files changed, 6 insertions(+), 2 deletions(-) - -commit 866c6d1b0daa8b28f259e1faba075026cf9007e0 -Author: Albert Astals Cid -Date: Sun Jul 10 00:55:25 2011 +0100 - - Name most of the classes in poppler/ includable by themselves - - poppler/Annot.h | 4 +++- - poppler/Catalog.h | 2 ++ - poppler/CharCodeToUnicode.h | 4 +++- - poppler/CompactFontTables.h | 16 ++++++++++++++++ - poppler/FontInfo.h | 6 +++++- - poppler/GfxState_helpers.h | 4 +++- - poppler/NameToUnicodeTable.h | 18 ++++++++++++++++++ - 7 files changed, 50 insertions(+), 4 deletions(-) - -commit 6b62fb7e9bd7de7f79b9b9a6fe36a5f5da099133 -Author: William Bader -Date: Mon Jun 27 19:38:52 2011 +0100 - - Remove unused variable - - poppler/PSOutputDev.cc | 5 +---- - 1 file changed, 1 insertion(+), 4 deletions(-) - -commit 4bc6c5bd3a001bb4eb9f61488e3d4f356638e391 -Author: Adrian Bunk -Date: Tue Jul 5 15:21:06 2011 +0300 - - .gitignore tests additions - - The following files were missing in .gitignore: - - cpp/tests/poppler-render - - qt4/tests/poppler-texts - - test/gtk-test - - cpp/tests/.gitignore | 1 + - qt4/tests/.gitignore | 1 + - test/.gitignore | 1 + - 3 files changed, 3 insertions(+) - -commit 00076bc308ae320244c47777fe351c1c2bef2da8 -Author: Albert Astals Cid -Date: Fri Jun 24 22:51:55 2011 +0100 - - Forgot William's (C) here - - poppler/Stream.cc | 1 + - poppler/Stream.h | 1 + - 2 files changed, 2 insertions(+) - -commit 7e244fde4ec03da08d81af3402b21646c803bd31 -Author: William Bader -Date: Fri Jun 24 22:39:13 2011 +0100 - - patch to make -level2sep and -level3sep write gray instead of cmyk - - If they are only gray of course :D - - poppler/PSOutputDev.cc | 34 ++++++++++++++++++++++++++++++---- - poppler/Stream.cc | 43 +++++++++++++++++++++++++++++++++++++++++++ - poppler/Stream.h | 29 +++++++++++++++++++++++++++++ - 3 files changed, 102 insertions(+), 4 deletions(-) - -commit abba8140a9972197faaca96ec590af7dc9408fb0 -Author: William Bader -Date: Fri Jun 24 22:38:33 2011 +0100 - - patch to make -level2sep and -level3sep write cmyk instead of rgb - - poppler/PSOutputDev.cc | 59 - +++++++++++++++++++++++++++++++++++++++++++++----- - 1 file changed, 54 insertions(+), 5 deletions(-) - -commit 706007431325b1e8c9bf4cba35c89511b10ebf0c -Author: Albert Astals Cid -Date: Mon Jun 20 23:30:50 2011 +0100 - - (C) for Jim - - fofi/FoFiBase.cc | 1 + - 1 file changed, 1 insertion(+) - -commit e23384fbb3542941d2cf59ce6560913255ca2b01 -Author: Jim Meyering -Date: Mon Jun 20 11:09:01 2011 +0200 - - don't gmalloc(-1) upon ftell failure - - * fofi/FoFiBase.cc: Diagnose ftell failure. - - fofi/FoFiBase.cc | 5 +++++ - 1 file changed, 5 insertions(+) - -commit c5601bde9d8f3f56e558a6f63e563c9d337810eb -Author: Steven Murdoch -Date: Mon Jun 20 23:25:43 2011 +0100 - - Fix encoding of PDF document metadata in output of pdftohtml - - pdftohtml simply copies the PDF document title into the HTML - tag, which fails when the title is UCS-2 encoded, or if it contains - characters which are in pdfDocEncoding (a ISO 8859-1 superset), - but not - in ISO 8859-1. This patch fixes the problem by decoding UCS-2 or - pdfDocEncoding into Unicode, then encoding this in the desired output - encoding. HTML escaping wasn't being done either, so I have used the - existing function HtmlFont::HtmlFilter to perform both HTML escaping - and character set encoding. This static method had to be made public - to call it from pdftohtml. See bug #37900. - - utils/HtmlFonts.h | 3 ++- - utils/pdftohtml.cc | 41 ++++++++++++++++++++++++++++++++++++++--- - 2 files changed, 40 insertions(+), 4 deletions(-) - -commit d4af1c4ef46abf1f11b7215c7b144ce7bb7912eb -Author: Joshua Richardson <joshuarbox-junk1@yahoo.com> -Date: Sat Jun 18 13:39:54 2011 +0100 - - Fix vertical spacing issues in pdftohtml output. - - Bug 38019 - - utils/HtmlFonts.cc | 3 ++- - utils/HtmlOutputDev.cc | 21 +++++++++++++++++++-- - 2 files changed, 21 insertions(+), 3 deletions(-) - -commit 589933ef105b60e8d48854cce15a7548c2850116 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Jun 13 21:24:39 2011 +0100 - - Forgot my (C) - - poppler/PreScanOutputDev.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit f5d2ddd13d27078355dee63207671885bf9b0926 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Jun 13 18:57:29 2011 +0100 - - We need to include config.h here - - Fixes crash after patch to fix bug 13518 - - poppler/PreScanOutputDev.cc | 2 ++ - 1 file changed, 2 insertions(+) - -commit 147ae4bf76a85768c9ed729ca10ee3dae93b8876 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Jun 8 23:36:14 2011 +0100 - - Do not crash if link does not have an action - - utils/HtmlOutputDev.cc | 2 ++ - 1 file changed, 2 insertions(+) - -commit 5d9489bf566b700ef38e5e33665a2648b535e1e7 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Jun 4 21:46:10 2011 +0100 - - forgot to update the C - - utils/pdftotext.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 7b123bf2b11ac81f24a966186a06de739d3c8f02 -Author: Steven Murdoch <Steven.Murdoch@cl.cam.ac.uk> -Date: Sat Jun 4 20:22:52 2011 +0100 - - Fix pdftotext -htmlmeta to correctly output U+2019 in PDF metadata - - In PDF documents, right single quotation mark (U+2019) may be - encoded as - 0x90 because PDFDocEncoding uses some of the reserved characters in - ISO 8859-1. However, pdftotext -htmlmeta assumes that characters - are either - UCS-2 or ISO 8859-1. Thus when a right single quotation mark is - encoded as - 0x90, it is output as unicode 0x90 (which is a control - character). pdfinfo - does the right thing by first converting from PDFDocEncoding to - Unicode - with pdfDocEncoding[], before encoding it in the desired character - set. - This patch applies the same logic to pdftotext. pdftohtml is broken - in the - same way, but this patch does not attempt to fix it. - - Bug 37900 - - utils/pdftotext.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit db2ae1bdbb7fcb64ba4c91dfc574d9f970bebdf6 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Jun 4 13:23:11 2011 +0100 - - Make sure catDict is a dict - - poppler/Catalog.cc | 5 +++++ - 1 file changed, 5 insertions(+) - -commit 58915affbdf1b5780f25d172a582c69fb2413230 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Jun 4 13:20:02 2011 +0100 - - Make sure catDict is a dict before using it - - KDE Bug 274888 shows it's possible to get aborts because of that - - poppler/Catalog.cc | 26 ++++++++++++++++---------- - 1 file changed, 16 insertions(+), 10 deletions(-) - -commit 4ebc7e364409fe303e7a5729b568913e3c92e7d4 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Jun 4 13:19:34 2011 +0100 - - We need to free catDict on failure - - poppler/Catalog.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 335a7fc6d98f5facc1ff098a91ac968387473cb3 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue May 31 23:18:26 2011 +0100 - - Make parse() private - - poppler/Catalog.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 311d69ef2222409859817737c44b8e741289d897 -Author: Axel Strübing <axel.struebing@freenet.de> -Date: Sun May 29 16:12:29 2011 +0100 - - Needs to be freed - - As i said in my last commit comment :D - - poppler/PDFDoc.cc | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -commit 66c7d0199b45bc7c81c88a9989c9515398d30d43 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat May 28 17:32:02 2011 +0100 - - No need to check for NULL - - We probably need to free obj4 but i don't have the stamina to properly - test it - - poppler/PDFDoc.cc | 21 ++++++++++----------- - 1 file changed, 10 insertions(+), 11 deletions(-) - -commit 450934619a1c5b2a58f65649f567274af8d24ea7 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat May 28 12:37:08 2011 +0100 - - Parse that as unicode - - Fixes KDE Bug #274055 - - qt4/src/poppler-page.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 04dfb2c984b3c9949466e2b70e26b58029c5a7d3 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat May 7 12:55:34 2011 +0200 - - Make FileSpec a class and move EmbFile from Catalog to FileSpec - - Qt and cpp frontends adapted by Pino Toscano - - cpp/poppler-document.cpp | 4 +- - cpp/poppler-embedded-file-private.h | 10 +-- - cpp/poppler-embedded-file.cpp | 42 +++++++---- - glib/poppler-annot.cc | 6 +- - glib/poppler-attachment.cc | 33 +++++---- - glib/poppler-document.cc | 5 +- - glib/poppler-private.h | 3 +- - poppler/Catalog.cc | 118 - +++--------------------------- - poppler/Catalog.h | 55 +------------- - poppler/FileSpec.cc | 128 - +++++++++++++++++++++++++++++++++ - poppler/FileSpec.h | 51 ++++++++++++- - qt4/src/poppler-embeddedfile-private.h | 6 +- - qt4/src/poppler-embeddedfile.cc | 34 +++++---- - qt4/src/poppler-page.cc | 5 +- - qt4/src/poppler-private.h | 4 +- - qt4/tests/check_attachments.cpp | 12 ++-- - 16 files changed, 284 insertions(+), 232 deletions(-) - -commit 74f9befddd4b5848c4af0c1b2848a1322f8cd0a2 -Author: Pino Toscano <pino@kde.org> -Date: Wed May 25 16:46:15 2011 +0200 - - [qt4] Page needs to be a friend of EmbeddedFile, too - - qt4/src/poppler-qt4.h | 1 + - 1 file changed, 1 insertion(+) - -commit 74853614d617486b7b62e9c08be39a6e58bc7d9b -Author: Pino Toscano <pino@kde.org> -Date: Wed May 25 16:40:49 2011 +0200 - - update copyrights - - qt4/src/poppler-embeddedfile-private.h | 2 +- - qt4/src/poppler-embeddedfile.cc | 2 +- - qt4/src/poppler-qt4.h | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - -commit e6b2dec502c02f9fbaed480f227cf7145249a98e -Author: Pino Toscano <pino@kde.org> -Date: Wed May 25 16:39:09 2011 +0200 - - [qt4] one more usage of the new EmbeddedFile ctor - - followup of a264e5385b2d0fee5126b3d0e57d42d34cafa45d - - qt4/src/poppler-page.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit a264e5385b2d0fee5126b3d0e57d42d34cafa45d -Author: Pino Toscano <pino@kde.org> -Date: Wed May 25 16:12:02 2011 +0200 - - [qt4] create EmbeddedFile by EmbeddedFileData only - - - create the private class and pass it to the EmbeddedFile ctor, - reducing the amount of poppler code API exposed to the outside - - turn the old private EmbeddedFile(EmbFile*) ctor in a death machine - - qt4/src/poppler-embeddedfile-private.h | 3 +++ - qt4/src/poppler-embeddedfile.cc | 21 ++++++++++++++++++--- - qt4/src/poppler-private.h | 3 ++- - qt4/src/poppler-qt4.h | 2 ++ - 4 files changed, 25 insertions(+), 4 deletions(-) - -commit 232bfa1c59013637fd7e858e22194becb636ad21 -Author: Pino Toscano <pino@kde.org> -Date: Wed May 25 15:55:48 2011 +0200 - - [Qt4] split EmbeddedFileData in an own file - - qt4/src/poppler-embeddedfile-private.h | 37 - ++++++++++++++++++++++++++++++++++ - qt4/src/poppler-embeddedfile.cc | 7 +------ - 2 files changed, 38 insertions(+), 6 deletions(-) - -commit a7242b78b3c9a64cf38ac150e6a914d7abce3355 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat May 7 11:10:11 2011 +0100 - - Do not free a shallow copy of an object we'll free later - - Make sure we have our own copy we can free - Fixes KDE BUG #268816 - (cherry picked from commit dab9cdf795d6caead555326958e86e844ace067b) - - poppler/Catalog.cc | 12 +++++------- - poppler/Catalog.h | 2 +- - 2 files changed, 6 insertions(+), 8 deletions(-) - -commit 4db2452b3d345d9531987998e6b5532a59137e1d -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri May 6 14:57:51 2011 +0200 - - glib: Add poppler_document_get_n_attachments() - - glib/poppler-document.cc | 34 - ++++++++++++++++++++++++---------- - glib/poppler-document.h | 1 + - glib/reference/poppler-sections.txt | 1 + - 3 files changed, 26 insertions(+), 10 deletions(-) - -commit 3e3284de3fe1916d7f8161ede7bf49c76d01f303 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri May 6 14:49:05 2011 +0200 - - glib: Update gtk-doc.make - - gtk-doc.make | 151 - ++++++++++++++++++++++++++++++++++++++--------------------- - 1 file changed, 98 insertions(+), 53 deletions(-) - -commit 9a77bd7706a08d9aeabe600e3500c14493ac8519 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri May 6 14:48:38 2011 +0200 - - glib-demo: Add missing permission flags to info demo - - glib/demo/info.cc | 39 ++++++++++++++++++++++++++++++++++++--- - 1 file changed, 36 insertions(+), 3 deletions(-) - -commit 091c155f8a7bc79da84cd21877be389de1f2b1a3 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri May 6 14:47:36 2011 +0200 - - glib: Add missing permissions flags to PopplerPermissions - - glib/poppler-document.cc | 6 ++++++ - glib/poppler-document.h | 10 +++++++++- - 2 files changed, 15 insertions(+), 1 deletion(-) - -commit 632d6a40ce3a5d3d8e10bf7e93e8eb578beae907 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue May 3 21:54:59 2011 +0100 - - 0.17.1 - - CMakeLists.txt | 4 ++-- - NEWS | 12 ++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/Doxyfile | 2 +- - 6 files changed, 18 insertions(+), 6 deletions(-) - -commit ecb136b9927a454df9360a307ccd741eaea3ca93 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue May 3 21:42:45 2011 +0100 - - remove unused vars - - poppler/Annot.cc | 9 ++------- - poppler/ArthurOutputDev.cc | 12 ++---------- - 2 files changed, 4 insertions(+), 17 deletions(-) - -commit ad131763640b2e27dde75c42b514386284b6a60d -Author: Pino Toscano <pino@kde.org> -Date: Wed Apr 27 22:36:13 2011 +0200 - - [qt4/tests] turn some assignments to bool into QVERIFY checks - - qt4/tests/check_optcontent.cpp | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit be08dd69d9dd4fcb22400f2f0aea331222e88e4a -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Apr 27 20:45:36 2011 +0100 - - update copyright years - (cherry picked from commit 2fbd493197309de5700f71f09967c9d23add88d3) - - poppler/Annot.cc | 1 + - utils/pdftotext.cc | 1 + - 2 files changed, 2 insertions(+) - -commit 39bcce0c8ed378aafb1019ffd1ae40330f6bb63f -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Apr 27 19:39:01 2011 +0100 - - Remove more variables that are set but then unused - - poppler/SplashOutputDev.cc | 11 +------ - utils/HtmlOutputDev.cc | 75 - +--------------------------------------------- - 2 files changed, 2 insertions(+), 84 deletions(-) - -commit 6656cf657b62d626910a02dfae9b6a1eb77772dd -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Apr 27 08:46:37 2011 +0100 - - Remove unused vars - - poppler/TextOutputDev.cc | 6 +----- - 1 file changed, 1 insertion(+), 5 deletions(-) - -commit ce55510f4dd10dfec2fc5b1c211c4a546c6ebc98 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Apr 27 08:42:34 2011 +0100 - - Remove unused vars - - splash/Splash.cc | 5 ++--- - splash/SplashFTFontEngine.cc | 4 +--- - splash/SplashXPath.cc | 6 ++---- - 3 files changed, 5 insertions(+), 10 deletions(-) - -commit 49d199fd1ea14383638739d95d019adb33b17768 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Apr 27 08:38:17 2011 +0100 - - Fix page_transition::operator= - - cpp/poppler-page-transition.cpp | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 807c1df2bf79c7c6378390b41dc230d80533ae3f -Author: Tom Gleason <tom@buildadam.com> -Date: Tue Apr 26 17:06:07 2011 +0100 - - bbox coordinates are relative to MediaBox size, not CropBox size - - utils/pdftotext.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 813f41367a681702ae7a155d5c2f3195124a9096 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Apr 3 20:40:15 2011 +0200 - - forms: fix mem leak in case of error - - poppler/Form.cc | 2 ++ - 1 file changed, 2 insertions(+) - -commit 722baf8baf42e2c7a49e1560aae5235677d1ddee -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Apr 3 20:17:57 2011 +0200 - - forms: check form field is actually terminal before creating the - widget - - poppler/Form.cc | 4 ++++ - 1 file changed, 4 insertions(+) - -commit 5f6f7fc569d1c891956a3c37b3e328504635ab33 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Apr 3 15:06:45 2011 +0100 - - Properly initialize pageObjectNum to 0 - - Bug 35925 - - poppler/Hints.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit d6786edc2549164214342a50782b72c2fd904b63 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Apr 3 13:11:18 2011 +0200 - - forms: Remove unused parameter - - poppler/Form.cc | 2 +- - poppler/Form.h | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit 62692ff381f3b7907b330bfc2019416ed058ea46 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Apr 3 13:01:42 2011 +0200 - - forms: rework the way form fields tree is built - - Now we build the tree as described by the doc, without ignoring - container fields and always creating a child widget for composed - (field - + annot) dictionaries. The way check and radio buttons are set - has been - reworked too, since now it's possible to have a set of buttons where - children are not widgets, but form fields with a child widget. - - poppler/Annot.cc | 4 +- - poppler/Form.cc | 237 - +++++++++++++++++++++++++++++-------------------------- - poppler/Form.h | 17 ++-- - 3 files changed, 137 insertions(+), 121 deletions(-) - -commit a6802301d9c3ab8bf68bd8821f562f8ecced8491 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Mar 28 17:42:37 2011 +0200 - - forms: Add debug methods to print the forms tree - - poppler/Form.cc | 78 - +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - poppler/Form.h | 25 ++++++++++++++++++ - 2 files changed, 103 insertions(+) - -commit 46f87da04700cdd1afa634f9c554e376f6f6f752 -Author: José Aliste <jaliste@src.gnome.org> -Date: Thu Mar 31 08:09:41 2011 -0400 - - Fix a memleak in AnnotScreen::initialize - - poppler/Annot.cc | 1 + - 1 file changed, 1 insertion(+) - -commit b64178eaa5dd01f914649d6faa870fa140ddaf9b -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Wed Mar 30 15:17:54 2011 +0200 - - glib: docs: Add PopplerActionJavascript to poppler-sections.txt - - glib/reference/poppler-sections.txt | 1 + - 1 file changed, 1 insertion(+) - -commit 3d777181ddee8f7ab2cc9e4684879cb5b52b065c -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Wed Mar 30 15:16:04 2011 +0200 - - glib: Use Javascript instead of JavaScript for consistency - - glib/poppler-action.h | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit c4774fecfe3d523f32d5980f50e31daa798c9692 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Wed Mar 30 15:08:59 2011 +0200 - - glib-demo: show javascript actions in actions view - - glib/demo/utils.c | 25 +++++++++++++++++++++++++ - 1 file changed, 25 insertions(+) - -commit 68bbbe1a3f68d242b35027ae41f5751b02a2a700 -Author: José Aliste <jaliste@src.gnome.org> -Date: Tue Mar 29 04:56:37 2011 -0400 - - glib: add JavaScript actions - - glib/poppler-action.cc | 24 ++++++++++++++++++++++++ - glib/poppler-action.h | 14 +++++++++++++- - 2 files changed, 37 insertions(+), 1 deletion(-) - -commit 3dd934088a06f246718382601030c9b093d04160 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Mar 30 00:03:58 2011 +0100 - - Need to create the globalParams - - qt4/tests/check_optcontent.cpp | 5 +++++ - 1 file changed, 5 insertions(+) - -commit ce0d4278a32b3ba19c2002ed0c481c58b1854d59 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Mar 29 23:47:33 2011 +0100 - - Long gone - - Makefile.am | 2 -- - 1 file changed, 2 deletions(-) - -commit 12337026533aa59bb66022ce8a119f37aafd4fad -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Mar 29 23:40:57 2011 +0100 - - increase sonames - - CMakeLists.txt | 2 +- - glib/CMakeLists.txt | 2 +- - glib/Makefile.am | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/CMakeLists.txt | 2 +- - qt4/src/Makefile.am | 2 +- - 6 files changed, 6 insertions(+), 6 deletions(-) - -commit a6e613b01698c6b38deff5248fcf7c0b17d041c3 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Mar 29 23:40:38 2011 +0100 - - more typos - - NEWS | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit e3ee037ede67212836be158b935deb7ea974b7f7 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Mar 29 23:38:24 2011 +0100 - - typo - - NEWS | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 8bcd94964f0af17a3f5b6edf71127df3daa00b1a -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Mar 29 23:30:30 2011 +0100 - - typo - - NEWS | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit a05b9dacbe5dbd4337fdbb3e7d7d364ad5fbaeab -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Mar 29 23:28:49 2011 +0100 - - 0.17.0 version number - - CMakeLists.txt | 2 +- - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - qt4/src/Doxyfile | 2 +- - 4 files changed, 4 insertions(+), 4 deletions(-) - -commit 4637b737b4735c70017b46a3ed6c0ee069c02c9b -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Mar 29 23:28:41 2011 +0100 - - 0.17.0 news - - NEWS | 108 - +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 108 insertions(+) - -commit a55cc5d9c67ede1d96f6e5a58179ddd9f563c53f -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Mar 29 22:51:40 2011 +0100 - - Update years - - poppler/Catalog.cc | 2 +- - poppler/Catalog.h | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit d96efb6c1af621be78e998ba1a228022c3c076fc -Author: Pino Toscano <pino@kde.org> -Date: Tue Mar 29 11:13:03 2011 +0200 - - fix comment - - poppler/ViewerPreferences.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 74ec81d66d4d5bc45cccc4aa8794df1c517f2d74 -Author: Pino Toscano <pino@kde.org> -Date: Tue Mar 29 11:07:36 2011 +0200 - - viewer preferences: read PrintScaling and Duplex - - poppler/ViewerPreferences.cc | 24 ++++++++++++++++++++++++ - poppler/ViewerPreferences.h | 14 ++++++++++++++ - 2 files changed, 38 insertions(+) - -commit b41bcd484dd7a93a339270926c57caa524059d8f -Author: Pino Toscano <pino@kde.org> -Date: Tue Mar 29 10:58:46 2011 +0200 - - free the viewerPreferences Object - - poppler/Catalog.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 1dd88d0b6b7cbfda76e81902a351c89457a061a8 -Author: Pino Toscano <pino@kde.org> -Date: Tue Mar 29 09:58:10 2011 +0200 - - read the ViewerPreferences dict once, and construct ViewerPreferences - on demand - - this way it is possible to know whether the ViewerPreferences - dictionary is present in the Catalog - - poppler/Catalog.cc | 24 +++++++++--------------- - poppler/Catalog.h | 3 ++- - 2 files changed, 11 insertions(+), 16 deletions(-) - -commit f10b0b8c88a7df83ada09f32b6cb6fd930fcb748 -Author: Pino Toscano <pino@kde.org> -Date: Tue Mar 29 09:57:46 2011 +0200 - - assume the prefDict is not null - - poppler/ViewerPreferences.cc | 4 ---- - 1 file changed, 4 deletions(-) - -commit d4a5ea45057cad531a8979cf9861ac05cdd56613 -Author: Pino Toscano <pino@kde.org> -Date: Tue Mar 29 09:54:22 2011 +0200 - - fix variable name for DisplayDocTitle - - poppler/ViewerPreferences.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit cf84a05ae524aa9b266463cc23cccc3860ff1ba3 -Author: Pino Toscano <pino@kde.org> -Date: Mon Mar 28 23:18:02 2011 +0200 - - viewer preferences: read NonFullScreenPageMode and Direction - - poppler/ViewerPreferences.cc | 26 ++++++++++++++++++++++++++ - poppler/ViewerPreferences.h | 15 +++++++++++++++ - 2 files changed, 41 insertions(+) - -commit 460253a6705a227ff7c36e9c31cceb93cce4d78b -Author: Pino Toscano <pino@kde.org> -Date: Mon Mar 28 22:37:54 2011 +0200 - - read some boolean viewer preferences - - - HideToolbar - - HideMenubar - - HideWindowUI - - FitWindow - - CenterWindow - - DisplayDocTitle - - poppler/ViewerPreferences.cc | 41 - +++++++++++++++++++++++++++++++++++++++++ - poppler/ViewerPreferences.h | 13 +++++++++++++ - 2 files changed, 54 insertions(+) - -commit 9fa9ac3546674120532bb512b82af6471cbebf01 -Author: Pino Toscano <pino@kde.org> -Date: Mon Mar 28 19:58:16 2011 +0200 - - add skeleton for ViewerPreferences - - a small class for handling the ViewerPreferences dictionary of - a Catalog, - created on demand and in any occasion (so defaults are in one - place only) - - CMakeLists.txt | 2 ++ - poppler/Catalog.cc | 23 +++++++++++++++++++++++ - poppler/Catalog.h | 4 ++++ - poppler/Makefile.am | 2 ++ - poppler/ViewerPreferences.cc | 30 ++++++++++++++++++++++++++++++ - poppler/ViewerPreferences.h | 34 ++++++++++++++++++++++++++++++++++ - 6 files changed, 95 insertions(+) - -commit c6081f0bf00d7dcdfa1d09e91e4c9a1fe5a54ad6 -Author: Pino Toscano <pino@kde.org> -Date: Mon Mar 28 19:55:00 2011 +0200 - - delete the temporary buffers created by pdfDocEncodingToUTF16() - - poppler/Form.cc | 2 ++ - 1 file changed, 2 insertions(+) - -commit d94d5056d5570e2f5cb578736eba12317ea63fa4 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Mar 28 18:20:31 2011 +0200 - - glib-demo: show the activation action of form fields if there's one - - glib/demo/forms.c | 21 ++++++++++++++++----- - 1 file changed, 16 insertions(+), 5 deletions(-) - -commit ba0f36b76d0c2fd4ef39f3013fc125a53747c03f -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Mar 28 18:17:52 2011 +0200 - - glib: Add poppler_form_field_get_action() - - Fixes bug #33174. - - glib/poppler-form-field.cc | 34 - ++++++++++++++++++++++++++++++++++ - glib/poppler-form-field.h | 1 + - glib/poppler-private.h | 1 + - glib/reference/poppler-sections.txt | 1 + - 4 files changed, 37 insertions(+) - -commit ae5b9cf884ce38dde409c3e5b0f6c46f7d6327d2 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Mar 28 17:43:53 2011 +0200 - - Revert "Patch for embedding videos in to the pdf" - - This reverts commit 66575c990f379871e4b796befc899de178332670. - - It introduces new API to glib frontend that is wrong and will be - changed soon. - - glib/poppler-annot.cc | 33 ----- - glib/poppler-annot.h | 5 - - poppler/Annot.cc | 377 - -------------------------------------------------- - poppler/Annot.h | 2 - - 4 files changed, 417 deletions(-) - -commit b7edd4c93539585652961ecf2db9c4462415c8bc -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Mar 27 12:31:19 2011 +0200 - - annot: Always create appearance streams when NeedAppearances is true - - Fixes regression in document example_054.pdf - - poppler/Annot.cc | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit e9350899e77c28452c48b56349ad7758b3fd47ba -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Mar 24 20:09:18 2011 +0000 - - Introduce splash-friendly getRGBLine functions - - So it does not need to pack and unpack the color again and again - - poppler/GfxState.cc | 248 - ++++++++++++++++++++++++++++++++++++++++++--- - poppler/GfxState.h | 22 +++- - poppler/SplashOutputDev.cc | 43 ++------ - 3 files changed, 265 insertions(+), 48 deletions(-) - -commit 7b08795a9541e9fa01836b4c7fd63f6fe295ad80 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Mar 24 12:16:07 2011 +0100 - - glib: Add g_return macros to make sure index is correct in form - field choice methods - - glib/poppler-form-field.cc | 4 ++++ - 1 file changed, 4 insertions(+) - -commit f1102fccd2899bc7f97414b1e2a295c59f03da22 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Mar 24 12:15:30 2011 +0100 - - glib-demo: Fix a crash when a choice form field has no items selected - - glib/demo/forms.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit b3971ee6bca6b14b75f046c831a31ac1e5e3241e -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Mar 22 22:08:27 2011 +0000 - - kill this TODO, n is too small - - poppler/SplashOutputDev.cc | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit 1064d75817401fe24f728c189b450e9e906beb56 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Mar 22 20:43:05 2011 +0000 - - kill unmaintained abiword backend - - CMakeLists.txt | 16 - - configure.ac | 16 - - poppler/ABWOutputDev.cc | 1179 - ----------------------------------------------- - poppler/ABWOutputDev.h | 141 ------ - poppler/Makefile.am | 17 - - utils/CMakeLists.txt | 10 - - utils/Makefile.am | 18 +- - utils/pdftoabw.cc | 201 -------- - 8 files changed, 2 insertions(+), 1596 deletions(-) - -commit abf167af8b15e5f3b510275ce619e6fdb42edd40 -Author: Thomas Freitag <Thomas.Freitag@alfa.de> -Date: Mon Mar 21 21:34:46 2011 +0000 - - Implement tiling/patterns in SplashOutputDev - - Fixes bug 13518 - - poppler/CairoOutputDev.cc | 5 +- - poppler/CairoOutputDev.h | 10 +- - poppler/Gfx.cc | 6 +- - poppler/OutputDev.h | 6 +- - poppler/PSOutputDev.cc | 8 +- - poppler/PSOutputDev.h | 6 +- - poppler/PreScanOutputDev.cc | 22 +++- - poppler/PreScanOutputDev.h | 16 ++- - poppler/SplashOutputDev.cc | 265 - ++++++++++++++++++++++++++++++++++++++++++++ - poppler/SplashOutputDev.h | 12 ++ - 10 files changed, 334 insertions(+), 22 deletions(-) - -commit 66575c990f379871e4b796befc899de178332670 -Author: Srinivas Adicherla <srinivas.adicherla@gmail.com> -Date: Thu Mar 17 20:14:05 2011 +0000 - - Patch for embedding videos in to the pdf - - glib/poppler-annot.cc | 33 +++++ - glib/poppler-annot.h | 5 + - poppler/Annot.cc | 377 - ++++++++++++++++++++++++++++++++++++++++++++++++++ - poppler/Annot.h | 2 + - 4 files changed, 417 insertions(+) - -commit ec1917968d2f1c7a00772a0829b3fcc6957d8f3c -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Mar 14 00:13:26 2011 +0000 - - Only build gtk-test if we have to build gtk-test - - test/Makefile.am | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit 1acbb01e72a22f70f00dc058ff206e3bc05bc0ab -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Mar 13 14:49:48 2011 +0000 - - (C) years - - poppler/CachedFile.cc | 2 +- - poppler/CurlCachedFile.cc | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit bc8aeb269aa92406081f749064ceff75bb3145e7 -Author: Hib Eris <hib@hiberis.nl> -Date: Sat Mar 12 23:17:59 2011 +0100 - - Check response code of libcurl call - - poppler/CachedFile.cc | 8 +++++++- - poppler/CurlCachedFile.cc | 12 +++++++++--- - 2 files changed, 16 insertions(+), 4 deletions(-) - -commit 0268cedee5b460835a4747d0ea41bbe12269310d -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Mar 12 15:24:30 2011 +0100 - - cairo: Fix typo - - poppler/CairoFontEngine.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 5aa369e68e5c9f14efc888c7b26da06aa8bd2a78 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Mar 12 13:47:34 2011 +0000 - - Remove unused variable - - poppler/CurlCachedFile.cc | 2 -- - 1 file changed, 2 deletions(-) - -commit c0dffbe28f91b30b36310ab0b9a9b948610550ae -Author: Pino Toscano <pino@kde.org> -Date: Sat Mar 12 12:15:58 2011 +0100 - - update copyright years - - cpp/poppler-document-private.h | 2 +- - cpp/poppler-document.cpp | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit b8fab173ffdd1e62a34b530228d08bc5ec6725ac -Author: Pino Toscano <pino@kde.org> -Date: Sat Mar 12 12:13:05 2011 +0100 - - [cpp] init the globalParams early in the document loading - - introduce a small RAII class to init/deinit the globalParams, and - make document_private inherit from it - - cpp/poppler-document-private.h | 17 +++++++++----- - cpp/poppler-document.cpp | 52 - +++++++++++++++++++++++------------------- - 2 files changed, 39 insertions(+), 30 deletions(-) - -commit a97a54cb22def2a9fc381fb81842dad9e5c3931f -Author: Pino Toscano <pino@kde.org> -Date: Sat Mar 12 12:12:11 2011 +0100 - - forms: delete tmp_str after being converted to GooString - - poppler/Form.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 9671fe07f8c9ade956742cb141b99518c3b12bad -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Mar 11 00:05:52 2011 +0000 - - getForm can return NULL, do not crash if that happens - - poppler/Annot.cc | 10 ++++++---- - 1 file changed, 6 insertions(+), 4 deletions(-) - -commit bd32672899f5ca4509ec9311de8092d14bec8ab1 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Mar 10 23:33:15 2011 +0000 - - update copyright years - - poppler/Catalog.cc | 2 +- - qt4/src/poppler-form.cc | 1 + - 2 files changed, 2 insertions(+), 1 deletion(-) - -commit 841f3bbca37015ec2c58d7b85a73cef5681294f8 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Mar 10 23:30:51 2011 +0000 - - Do not infinite loop - - poppler/Form.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit f2fcafdc2b982d9bbed3c01bc7d45c8bd0603f19 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Mar 10 23:27:41 2011 +0000 - - Create the globalParams before the pdfdoc - - qt4/src/poppler-private.cc | 5 +---- - qt4/src/poppler-private.h | 12 ++++++++---- - 2 files changed, 9 insertions(+), 8 deletions(-) - -commit f956b03604b195623ab034a06942a39547adf905 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Mar 10 00:01:18 2011 +0000 - - compile - - qt4/src/poppler-form.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit f0ec3bedc5490aa35e54563019fcf2c3f8b7647d -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Wed Mar 9 20:54:15 2011 +0100 - - forms: Remove unused method FormWidget::updateField() - - poppler/Form.cc | 22 ---------------------- - poppler/Form.h | 2 -- - 2 files changed, 24 deletions(-) - -commit 93c25e100ae2564b9a866b95bed16d2fac619bd7 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Wed Mar 9 20:49:32 2011 +0100 - - forms: Rename FormField::createActivationAction() to - FormField::getActivationAction() - - And use the existing action from the AnnotWidget instead of creating a - new one. - - poppler/Form.cc | 11 ++--------- - poppler/Form.h | 2 +- - qt4/src/poppler-form.cc | 3 +-- - 3 files changed, 4 insertions(+), 12 deletions(-) - -commit 59fb0489bfabfd8acccafdcd0361ce005664962a -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Wed Mar 9 20:19:24 2011 +0100 - - annots: Check whether we need to create an appearance stream in - AnnotWidget::draw() - - And never modify the AP entry since it breaks check and radio buttons - that doesn't have an appearance for the Off state. - - poppler/Annot.cc | 79 - ++++++++++---------------------------------------------- - poppler/Annot.h | 1 - - 2 files changed, 13 insertions(+), 67 deletions(-) - -commit f3b00ef51ceef6d9b7a1aa7e0f19249abf8ca6f3 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Wed Mar 9 18:19:12 2011 +0100 - - annots: Add Annot::setAppearanceState() and use it from FormWidget - - This method not only updates the current appearance state, but - also the - appearance stream corresponding to the new state. - - poppler/Annot.cc | 43 ++++++++++++++++++++++++++++++++++++------- - poppler/Annot.h | 2 ++ - poppler/Form.cc | 7 +++---- - 3 files changed, 41 insertions(+), 11 deletions(-) - -commit d59561212253302d4dcb23392bb8306b8e5c68d1 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Wed Mar 9 17:35:28 2011 +0100 - - forms: Make FormWidget use a real widget annotation instead of - duplicating code - - When creating annotations, if it's a widget annotation, look first - whether it has already been created by a FormWidget and reuse - it instead - of duplicating it. - - poppler/Annot.cc | 42 +++++++++++++-------- - poppler/Annot.h | 2 +- - poppler/Catalog.cc | 2 +- - poppler/Form.cc | 107 - +++++++++++++++++++++++++---------------------------- - poppler/Form.h | 23 ++++++------ - 5 files changed, 89 insertions(+), 87 deletions(-) - -commit 2dd7e1ba09d4501adf9d10ab4cb8ee003cace74a -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Wed Mar 9 10:25:00 2011 +0100 - - forms: Move modified flag from FormWidget to FormField - - poppler/Form.cc | 16 ++++++++-------- - poppler/Form.h | 6 ++++-- - 2 files changed, 12 insertions(+), 10 deletions(-) - -commit b04f03be7e43e309af5f164ef71788e7b8915841 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Wed Mar 9 10:17:57 2011 +0100 - - forms: Move field names handling from FormWidget to FormField - - poppler/Form.cc | 149 - +++++++++++++++++++++++++++++++------------------------- - poppler/Form.h | 20 +++++--- - 2 files changed, 95 insertions(+), 74 deletions(-) - -commit abe1e0d5a37bcdb4376901306d3adccfb33ff3b4 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Mar 8 21:39:00 2011 +0100 - - annots: Make sure no border is drawn for invalid border arrays - - Fixes regression on ClassSchedule_2091_ENGL.pdf - - poppler/Annot.cc | 8 ++++++-- - poppler/Annot.h | 2 +- - 2 files changed, 7 insertions(+), 3 deletions(-) - -commit 14d145371e86ccb92f09b1ca750ced52171b2885 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Mar 8 20:14:57 2011 +0100 - - forms: Remove loadDefaults method - - Moving the code to initialize form field stuff to form field - constructors and widget stuff to form widget constructors. Clean up an - simplify the code. - - poppler/Form.cc | 227 - +++++++++++++++++++++----------------------------------- - poppler/Form.h | 21 ++---- - 2 files changed, 91 insertions(+), 157 deletions(-) - -commit 0585d7820455c93fe5b732b7a9a20d423df47075 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Mar 8 15:36:45 2011 +0100 - - forms: Handle field values (V entry) by field objects - - Rather than AnnotWidget or FormWidget, and use the form field object - from AnnotWidget to get the values. - - poppler/Annot.cc | 52 ++++---- - poppler/Form.cc | 400 - +++++++++++++++++++++++++++---------------------------- - poppler/Form.h | 21 +-- - 3 files changed, 230 insertions(+), 243 deletions(-) - -commit dc100eb9080fb58164fc94c86bfb1728cecd21c3 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Mar 7 20:14:27 2011 +0100 - - annots: Use the field object to get MaxLen instead of parsing the - field dict - - poppler/Annot.cc | 10 ++++------ - 1 file changed, 4 insertions(+), 6 deletions(-) - -commit 7149634f184dc3f07f2a70c296aac207ef24952c -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Mar 7 19:55:45 2011 +0100 - - forms: Parse the default resources dictionary in Form - - And use it in AnnotWidget instead of parsing the dictionary again. - - poppler/Annot.cc | 65 - ++++++++++++++++++++++---------------------------------- - poppler/Annot.h | 12 +++++------ - poppler/Form.cc | 16 ++++++++++++++ - poppler/Form.h | 5 +++++ - 4 files changed, 52 insertions(+), 46 deletions(-) - -commit 2e73f17975811177c0b3c16b8bd97c7eb912bc44 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Mar 7 18:41:48 2011 +0100 - - forms: Parse field variable text entries (DA, Q) in FormField() - - And use them from AnnotWidget instead of parsing the field dictionary - again. - - poppler/Annot.cc | 28 +++++----------------------- - poppler/Form.cc | 17 +++++++++++++++++ - poppler/Form.h | 9 +++++++++ - 3 files changed, 31 insertions(+), 23 deletions(-) - -commit 8677a34911563a712b2dcf0b6e411cee0bad9c44 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Mar 7 18:24:07 2011 +0100 - - forms: Parse default variable text entries (DA, Q) on Form - construction - - And use them from AnnotWidget instead of parsing the acroForm - dictionary - again. - - poppler/Annot.cc | 99 - +++++++++++++++++++++++++++----------------------------- - poppler/Form.cc | 11 +++++++ - poppler/Form.h | 12 +++++++ - 3 files changed, 70 insertions(+), 52 deletions(-) - -commit 41420bfd88685d9b1ac44dc7444ea3abee92097c -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Mar 7 09:18:25 2011 +0100 - - annots: Only parse the dash array for dashed borders - - poppler/Annot.cc | 16 +++++++++------- - 1 file changed, 9 insertions(+), 7 deletions(-) - -commit c198a3f83d8508ddaf84564871d9202ffba8096c -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Mar 6 17:52:01 2011 +0100 - - annots: Use the field object to get the top index of a form field - choice - - Instead of parsing the field dictionary again. - - poppler/Annot.cc | 14 ++------------ - poppler/Annot.h | 1 - - 2 files changed, 2 insertions(+), 13 deletions(-) - -commit 5cf803ec181dbf1112f67b4f4a9c77b88d102e3b -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Mar 6 17:47:18 2011 +0100 - - forms: Add FormFieldChoice::getTopIndex() - - poppler/Form.cc | 5 +++++ - poppler/Form.h | 5 ++++- - 2 files changed, 9 insertions(+), 1 deletion(-) - -commit 1248f59e2045749ece1f5a5e579b866b8330a752 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Mar 6 17:41:33 2011 +0100 - - annots: Draw widget background using the existing appearance - characteristics - - Instead of parsing the appearance characteristics dictionary again - - poppler/Annot.cc | 23 +++++++---------------- - 1 file changed, 7 insertions(+), 16 deletions(-) - -commit dc249ad4529997001ae1f96dcfd7351766ca8e8d -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Mar 6 17:34:33 2011 +0100 - - annots: Factor out generateFieldAppearance() - - Adding methods to render every form field type and using the field - object when possible instead of parsing the field dictionary again. - - poppler/Annot.cc | 312 - +++++++++++++++++++++++-------------------------------- - poppler/Annot.h | 8 +- - 2 files changed, 138 insertions(+), 182 deletions(-) - -commit f98b3540db731026e0febf1f010548f0f0ef9142 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Mar 6 15:57:22 2011 +0100 - - annots: Move code to draw the border of an AnnotWidget to a new method - - And use the field object instead of parsing the field dictionary - again. - - poppler/Annot.cc | 242 - +++++++++++++++++++++++++++---------------------------- - poppler/Annot.h | 3 + - 2 files changed, 124 insertions(+), 121 deletions(-) - -commit 9854f3173f994bbe3f57d33bd1d0e045833859c2 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Mar 6 15:56:06 2011 +0100 - - annots: Add AnnotColor::adjustColor() to be able to adjust an - existing AnnotColor - - poppler/Annot.cc | 7 +++++++ - poppler/Annot.h | 2 ++ - 2 files changed, 9 insertions(+) - -commit 2bf82f27bd9c8f97e5484ea97be661f65221163d -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Mar 5 15:30:01 2011 +0100 - - annots: Remove unused class AnnotBorderStyle - - poppler/Annot.cc | 22 ---------------------- - poppler/Annot.h | 36 ------------------------------------ - 2 files changed, 58 deletions(-) - -commit 128dcaf282f418d8c45cea4df6ad4d3167b3e39c -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Mar 5 13:12:49 2011 +0100 - - annots: Add AnnotBorder::parseDashArray() to parse dash arrays - - The code was duplicated in AnnotBorderArray and AnnotBorderBS - - poppler/Annot.cc | 91 - +++++++++++++++++++------------------------------------- - poppler/Annot.h | 4 ++- - 2 files changed, 34 insertions(+), 61 deletions(-) - -commit ec2643d311e0ce55f0ff5309c0c420140d053a50 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Mar 1 19:50:55 2011 +0000 - - fix copyright years - - poppler/Annot.cc | 2 +- - poppler/Annot.h | 2 +- - poppler/ArthurOutputDev.cc | 2 +- - poppler/ArthurOutputDev.h | 2 +- - poppler/FontInfo.cc | 1 + - poppler/Form.cc | 4 ++-- - poppler/Form.h | 3 ++- - poppler/GlobalParams.cc | 1 + - poppler/GlobalParams.h | 1 + - poppler/Link.cc | 2 +- - poppler/Link.h | 2 +- - poppler/OutputDev.h | 2 +- - poppler/PDFDoc.cc | 2 +- - poppler/Page.cc | 2 +- - poppler/Page.h | 2 +- - poppler/TextOutputDev.cc | 2 +- - poppler/TextOutputDev.h | 2 +- - qt4/src/poppler-form.cc | 2 +- - qt4/src/poppler-link-extractor-private.h | 2 +- - qt4/src/poppler-link-extractor.cc | 2 +- - qt4/src/poppler-page.cc | 2 +- - qt4/src/poppler-private.h | 2 +- - utils/HtmlOutputDev.cc | 2 +- - utils/HtmlOutputDev.h | 4 ++-- - 24 files changed, 27 insertions(+), 23 deletions(-) - -commit 900974ebfbe6ab7ae21ed151ff79f9578d2bdae2 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Mar 1 19:42:22 2011 +0000 - - Fix years - - poppler/poppler-config.h.cmake | 2 +- - poppler/poppler-config.h.in | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit c804db4d8261274b013f8c340abfc921c77bb3cf -Author: Pino Toscano <pino@kde.org> -Date: Tue Mar 1 19:22:31 2011 +0100 - - move the fontconfig.h inclusion from GlobalParams.h to GlobalParams.cc - - this avoids a dependency on the fontconfig headers to the users of - the core - - poppler/GlobalParams.cc | 4 ++++ - poppler/GlobalParams.h | 3 --- - 2 files changed, 4 insertions(+), 3 deletions(-) - -commit 2d77c7f9c41f1121354413bcdc3beded35a247f9 -Author: Pino Toscano <pino@kde.org> -Date: Tue Mar 1 16:51:04 2011 +0100 - - create the GooString on stack, not in heap - - poppler/Annot.cc | 5 ++--- - poppler/Form.cc | 5 ++--- - 2 files changed, 4 insertions(+), 6 deletions(-) - -commit 5dc2ef0e27ac48c81739cdfe8e8070ebbc410c87 -Author: Pino Toscano <pino@kde.org> -Date: Tue Mar 1 16:39:36 2011 +0100 - - annots: avoid temporary GooString's just for comparisons, just - use strcmp - - other than reducing few GooString allocations, strcmp should be much - faster than GooString::cmp - - poppler/Annot.cc | 128 - ++++++++++++++++++++++++------------------------------- - 1 file changed, 56 insertions(+), 72 deletions(-) - -commit 535e48ab764ee4e377451ddd032044b51b842c4a -Author: Pino Toscano <pino@kde.org> -Date: Tue Mar 1 16:07:34 2011 +0100 - - [qt4] ignore "Widget" annotations - - they usually are forms or something else we do not support, so do - not complain about them for now - - qt4/src/poppler-page.cc | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -commit f0e5c36e7f1c5d0f0f51e3a6a6acd6c423f86df7 -Author: Pino Toscano <pino@kde.org> -Date: Tue Mar 1 16:02:54 2011 +0100 - - annots: avoid a temporary GooString just for comparisons, just - use strcmp - - other than reducing few GooString allocations, strcmp should be much - faster than GooString::cmp - - poppler/Annot.cc | 54 - ++++++++++++++++++++++++++---------------------------- - 1 file changed, 26 insertions(+), 28 deletions(-) - -commit 58a3b83a8fbd8b13eb98c4f677f4ed19b6ae44cd -Author: Pino Toscano <pino@kde.org> -Date: Tue Mar 1 15:35:45 2011 +0100 - - fix appendAnnot() invocation on annotations reading - - 1) check that the annot is actually a non-NULL pointer (otherwise - doing anything else is pointless) - 2) call appendAnnot() only if the annotation isOk() (that will - increase the annot refcount), but always decrement the refcount - (so valid annotation will have it at 1, while invalid will be deleted) - - poppler/Annot.cc | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -commit 664865a2ddca9c20ac36a41aef52ebf12eab838d -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Mar 1 10:56:40 2011 +0100 - - Merge Link and AnnotLink code - - Annotations now belong to the Page and are created only once on - demand. - Annots are now ref counted and Links is a list of AnnotLink objects, - Link object has been removed. The AnnotLink API is mostly the - same than - Link and frontends APIs are not affected. - Qt4 changes made by Pino Toscano. - - glib/poppler-document.cc | 2 +- - glib/poppler-page.cc | 29 ++++---- - glib/poppler-private.h | 1 - - poppler/Annot.cc | 79 +++++++++++++------- - poppler/Annot.h | 24 ++++-- - poppler/ArthurOutputDev.cc | 4 - - poppler/ArthurOutputDev.h | 3 - - poppler/CairoOutputDev.cc | 3 - - poppler/CairoOutputDev.h | 6 -- - poppler/FontInfo.cc | 4 +- - poppler/Form.cc | 36 ++++----- - poppler/Form.h | 5 +- - poppler/Link.cc | 124 - +++++-------------------------- - poppler/Link.h | 43 ++--------- - poppler/OutputDev.h | 4 +- - poppler/PDFDoc.cc | 4 +- - poppler/Page.cc | 63 ++++++++-------- - poppler/Page.h | 11 +-- - poppler/TextOutputDev.cc | 9 ++- - poppler/TextOutputDev.h | 10 +-- - qt4/src/poppler-link-extractor-private.h | 2 +- - qt4/src/poppler-link-extractor.cc | 3 +- - qt4/src/poppler-page.cc | 12 ++- - utils/HtmlOutputDev.cc | 7 +- - utils/HtmlOutputDev.h | 4 +- - 25 files changed, 188 insertions(+), 304 deletions(-) - -commit 1f6573e949aaba0eb0a4c2f9cd73d7ad45ba67be -Author: Pino Toscano <pino@kde.org> -Date: Sun Feb 27 21:53:32 2011 +0100 - - small fixes to the pdftohtml manpage - - - capitalize HTML, PDF, XML, PNG - - dont -> do not - - fix UTF-8 character - - fix hypens used as minus - - utils/pdftohtml.1 | 18 +++++++++--------- - 1 file changed, 9 insertions(+), 9 deletions(-) - -commit e927384897595f1bda5f7e41b552602f9cc8ed95 -Author: Pino Toscano <pino@kde.org> -Date: Sun Feb 27 16:39:59 2011 +0100 - - [qt4] fix caption of push button fields - - instead of asking the 'onStr' of the underlying form widget, - take (if available) the 'MK' entry, i.e. the appearance - characteristics dictionary, - and use the normal caption of that - - qt4/src/poppler-form.cc | 25 +++++++++++++++++++++++-- - 1 file changed, 23 insertions(+), 2 deletions(-) - -commit 5b24ee2c934feea1b7d46c8ec423d1c547258be2 -Author: Pino Toscano <pino@kde.org> -Date: Sun Feb 27 16:24:22 2011 +0100 - - annots: 'CA', 'RC' and 'AC' are strings, not names - - poppler/Annot.cc | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -commit e64f6cb23e9a564b3f80daea9abcfe8bb29189eb -Author: Pino Toscano <pino@kde.org> -Date: Sun Feb 27 15:22:32 2011 +0100 - - make getOnStr() return the GooString* instead of its char* - - ... and modify its use accordingly - this way it is easier to check for a numm onStr, without the risk - of dereferencing a NULL pointer - - poppler/Form.cc | 6 +++--- - poppler/Form.h | 2 +- - qt4/src/poppler-form.cc | 7 ++----- - 3 files changed, 6 insertions(+), 9 deletions(-) - -commit f9c978fc2ab8a1f901f2136ae95deb9d41076155 -Author: Pino Toscano <pino@kde.org> -Date: Sun Feb 27 14:39:52 2011 +0100 - - [qt4] directly use the dict - - qt4/src/poppler-form.cc | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit 071966e48577c515b17a424baeae85ae4fc80a20 -Author: Pino Toscano <pino@kde.org> -Date: Sun Feb 27 14:21:11 2011 +0100 - - [qt4] move textAlignment() as a private function - - qt4/src/poppler-form.cc | 33 +++++++++++++++++++++++++++++++-- - qt4/src/poppler-private.h | 25 ------------------------- - 2 files changed, 31 insertions(+), 27 deletions(-) - -commit adc236771f11eeb4197064747836e8ed3fbfeba9 -Author: Pino Toscano <pino@kde.org> -Date: Sun Feb 27 14:13:50 2011 +0100 - - [qt4] use FormWidget::getAlternateUiName() - - ... instead of read the value on our own - - qt4/src/poppler-form.cc | 9 ++------- - 1 file changed, 2 insertions(+), 7 deletions(-) - -commit 9f111483cf6196dedf3cee380c3e5224776203ea -Author: Pino Toscano <pino@kde.org> -Date: Sun Feb 27 14:12:16 2011 +0100 - - forms: read the TU field as alternateUiName - - poppler/Form.cc | 8 ++++++++ - poppler/Form.h | 2 ++ - 2 files changed, 10 insertions(+) - -commit cfaadaa9e4a857fcea3b5a2cadacd352de6c469d -Author: Pino Toscano <pino@kde.org> -Date: Sun Feb 27 14:07:35 2011 +0100 - - [qt4] use FormWidget::getPartialName() - - ... instead of read the value on our own - - qt4/src/poppler-form.cc | 9 ++------- - 1 file changed, 2 insertions(+), 7 deletions(-) - -commit 2478896a0c1f6e5842f3d8b172e4cc7e6bd58cd8 -Author: Pino Toscano <pino@kde.org> -Date: Sun Feb 27 13:24:09 2011 +0100 - - [qt4] use the new FormWidget::createActivationAction() - - qt4/src/poppler-form.cc | 13 +++---------- - 1 file changed, 3 insertions(+), 10 deletions(-) - -commit 1dcb683a5c2dd6a1de654e90a4394f65d63dc296 -Author: Pino Toscano <pino@kde.org> -Date: Sun Feb 27 13:22:48 2011 +0100 - - add FormWidget::createActivationAction() - - used to get and create a new activation action object of a form widget - - poppler/Form.cc | 12 ++++++++++++ - poppler/Form.h | 3 +++ - 2 files changed, 15 insertions(+) - -commit bd4cc73e438a7d4d4a10c50c69e65b5bdc63ddf2 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Feb 27 11:04:45 2011 +0000 - - Some more missing copyrights - - poppler/CairoOutputDev.cc | 2 +- - poppler/CairoOutputDev.h | 2 +- - poppler/Gfx.cc | 2 +- - poppler/OutputDev.h | 2 +- - poppler/TextOutputDev.cc | 1 + - 5 files changed, 5 insertions(+), 4 deletions(-) - -commit 6c2ed4781d8ecfffdf24e1459aafd554b3527686 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Feb 27 10:55:22 2011 +0000 - - Add 2011 years - - poppler/Annot.cc | 2 +- - poppler/CairoFontEngine.cc | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit b297fb9de0779ac84d5b7ef68c792afefe598320 -Author: William Bader <williambader@hotmail.com> -Date: Sun Feb 27 01:48:55 2011 +0000 - - access the pixels directly - - Faster, bug 34005 - - splash/Splash.cc | 21 +++++++++++---------- - 1 file changed, 11 insertions(+), 10 deletions(-) - -commit de77e26759f1c33698abe248ad29b75c329a043c -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Feb 27 01:39:23 2011 +0000 - - Fix crash in some pdf - - Has to be 3 and not nComps since it's a output buffer, a the input one - Bug 34357 - - poppler/GfxState.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 4f82a2e08cb2c930956c6b38030fa7b015a0de5a -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Feb 27 01:38:33 2011 +0000 - - Implement GfxDeviceCMYKColorSpace::getRGBLine - - poppler/GfxState.cc | 22 +++++++++++++++++++++- - poppler/GfxState.h | 12 +++++++++++- - 2 files changed, 32 insertions(+), 2 deletions(-) - -commit 4980b99214281dcab8f82b5b618aadc24de371f4 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Feb 26 14:00:33 2011 +0100 - - annots: Don't assume y1 > y3 for quad points of a highlight annotation - - Fixes https://bugzilla.gnome.org/show_bug.cgi?id=643028 - - poppler/Annot.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit e6ae0f8609cd66e9e124af59adefdff9d610dcd4 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Feb 26 13:23:47 2011 +0100 - - cairo: Handle font type fontCIDType2OT when creating freetype font - - Fixes https://bugzilla.gnome.org/show_bug.cgi?id=643273 - - poppler/CairoFontEngine.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 22eb01d305ea2560d26417ca8df9c0465d4e9a82 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Feb 26 12:17:49 2011 +0100 - - cairo: Fix a crash when rendering a document with inline images - - poppler/CairoOutputDev.cc | 28 ++++++++++++++++------------ - poppler/CairoOutputDev.h | 2 +- - 2 files changed, 17 insertions(+), 13 deletions(-) - -commit a6599dd1fda37186b876b5b2de80be1731dd5946 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Feb 26 11:59:03 2011 +0100 - - glib: Add some more introspection annotations - - glib/poppler-attachment.cc | 2 +- - glib/poppler-document.cc | 4 ++-- - glib/poppler-media.cc | 2 +- - glib/poppler-page.cc | 6 +++--- - 4 files changed, 7 insertions(+), 7 deletions(-) - -commit 89c66f236c85ac5a53ae12b01cdebc30e27b78d3 -Author: Peter Ward <peteraward@gmail.com> -Date: Sat Feb 26 11:39:58 2011 +0100 - - glib: Add missing "out" annotation to poppler_page_get_size() - - glib/poppler-page.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 7a68199b342eb3f33733f7d7446ede8f94130fba -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Feb 26 11:09:27 2011 +0100 - - cairo: Check if cairo version is == 1.11.2 to use mesh gradients api - - Cairo API has changed in 1.11.3. - - poppler/CairoOutputDev.cc | 4 ++-- - poppler/CairoOutputDev.h | 4 ++-- - 2 files changed, 4 insertions(+), 4 deletions(-) - -commit 97e7ab1a4eea2160f3f0847d10f6c16f2d66ef11 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Feb 25 20:33:39 2011 +0000 - - Do not ask freetype for a font of size 0x0 - - Fixes rendering bug at 34602 - - splash/SplashFTFont.cc | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -commit 3590a2d38082fc705040cdb31bf0b22ff12dd3e4 -Author: Adrian Johnson <ajohnson@redneon.com> -Date: Thu Feb 24 18:47:35 2011 +0000 - - Fix rendering of some substituted fonts - - More info in bug 34522 - - poppler/GfxFont.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 384753f1f9f780687bdead99a6548ef8598b898a -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Feb 21 19:19:48 2011 +0000 - - Use gfree since we allocate with gmalloc - - Bug 34512 - - goo/GooString.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit d775420c3c6cb5a29ff74712d3fc210fcb4b4627 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Feb 19 11:19:57 2011 +0000 - - Do not delete textOut twice when using -bbox - - utils/pdftotext.cc | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -commit e1a56d73b066e7152ccf6ccf36206def7956cb00 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Feb 16 00:06:45 2011 +0000 - - Lots of rendering improvements by Thomas and Andrea - - Function.cc: Stitching functions incorrectly reported 0 as output - size. - Function.cc: Remove cache from PostScriptFunction - Function.cc: Make PSStack stack allocated - GfxState.cc & GfxState.h: Abstract GfxSimpleShading, add Matrix::norm - method, add simple caching, parameter range computation - SplashOutputDev.cc & SplashOutputDev..h & Splash.cc & SplashPattern.h: - Improve splash rendering, implement radial and abstract simple - shadings - in splash - - And maybe something more, look at the - Followup Bug 32349 & Poppler: More shading fun ;-) - thread for more info - - poppler/Function.cc | 122 +-------- - poppler/Function.h | 3 +- - poppler/GfxState.cc | 634 - +++++++++++++++++++++++++++++++++++++++------ - poppler/GfxState.h | 90 +++++-- - poppler/SplashOutputDev.cc | 253 +++++++++++++++--- - poppler/SplashOutputDev.h | 67 ++++- - splash/Splash.cc | 126 ++++++--- - splash/SplashPattern.h | 7 +- - 8 files changed, 1006 insertions(+), 296 deletions(-) - -commit 675b3505f963a0110dac7f865654232cbb865ef5 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Feb 13 16:21:52 2011 +0100 - - tests: Merge splash and cairo tests into a single gtk-test tool - - With a command line option to use cairo or splash backends. - - test/CMakeLists.txt | 20 +-- - test/Makefile.am | 29 ++-- - test/gtk-cairo-test.cc | 190 ----------------------- - test/gtk-splash-test.cc | 311 ------------------------------------- - test/gtk-test.cc | 397 - ++++++++++++++++++++++++++++++++++++++++++++++++ - 5 files changed, 412 insertions(+), 535 deletions(-) - -commit 728c022cdc1ea12aa54077d44276f9d7714930d4 -Author: Pino Toscano <pino@kde.org> -Date: Sun Feb 13 13:25:51 2011 +0100 - - remove more references to the qt3 frontend - - followup of d82f98a274bfa008c218e265a080c4af7ce95131 - - Makefile.am | 3 --- - 1 file changed, 3 deletions(-) - -commit 15e5b3f16015361754fdc14da4a0dde5af887568 -Author: Pino Toscano <pino@kde.org> -Date: Sun Feb 13 13:23:06 2011 +0100 - - remove more GDK-related stuff - - followup of 149b7fec472beda9d1538e0f26607c9498d504c2 - - Makefile.am | 1 - - cmake/modules/FindGDK.cmake | 22 ---------------------- - config.h.cmake | 3 --- - glib/reference/Makefile.am | 1 - - glib/reference/poppler-sections.txt | 1 - - 5 files changed, 28 deletions(-) - -commit 50aa15a0bd7100fc9b9243de1d6e6f4b59df1488 -Author: Pino Toscano <pino@kde.org> -Date: Sun Feb 13 13:07:19 2011 +0100 - - remove GDK API here too - - followup of 149b7fec472beda9d1538e0f26607c9498d504c2 - - glib/poppler-features.h.cmake | 1 - - 1 file changed, 1 deletion(-) - -commit f410cd11268254b9d0422201c9860d775f73fdd8 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Feb 13 12:55:37 2011 +0100 - - gtk-splash-test: Don't use GDK deprecated API - - test/gtk-splash-test.cc | 28 +++++++++++++++------------- - 1 file changed, 15 insertions(+), 13 deletions(-) - -commit a0568e449061d6b6af5485e340cd6f9d3e54ef7c -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Feb 13 12:27:22 2011 +0100 - - glib: remove gdk referenes from pkg-config files - - poppler-glib-uninstalled.pc.in | 2 +- - poppler-glib.pc.cmake | 2 +- - poppler-glib.pc.in | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - -commit 149b7fec472beda9d1538e0f26607c9498d504c2 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Feb 13 11:51:57 2011 +0100 - - glib: Remove deprecated GDK API - - It removes the GDK dependency so that poppler-glib now only depends on - glib and cairo. - - CMakeLists.txt | 9 -- - configure.ac | 44 +------ - glib/CMakeLists.txt | 14 +-- - glib/Makefile.am | 8 +- - glib/poppler-features.h.in | 6 - - glib/poppler-page.cc | 296 - --------------------------------------------- - glib/poppler-page.h | 34 ------ - 7 files changed, 4 insertions(+), 407 deletions(-) - -commit a5482d64472a81206dd8d0c5bb80007f6d5bb893 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Feb 13 11:40:23 2011 +0100 - - glib: Remove test-poppler-glib, poppler-glib-demo does the same - and more - - glib/CMakeLists.txt | 8 - - glib/Makefile.am | 14 - - glib/test-poppler-glib.cc | 657 - ---------------------------------------------- - 3 files changed, 679 deletions(-) - -commit cab0cf028a192772dcb5c3f4aefa0a421e73e9e7 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Feb 11 19:42:34 2011 +0000 - - Do not infinite loop in some broken files - - poppler/JBIG2Stream.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 1125cc8ccf386d8e0a0679aa73614bc2cb8037b0 -Author: William Bader <williambader@hotmail.com> -Date: Tue Feb 8 20:27:16 2011 +0000 - - Allow setting the rasterization resolution - - More info at bug 34001 - - poppler/GlobalParams.cc | 15 +++++++++++++++ - poppler/GlobalParams.h | 3 +++ - poppler/PSOutputDev.cc | 7 ++++++- - utils/pdftops.1 | 6 ++++++ - utils/pdftops.cc | 6 ++++++ - 5 files changed, 36 insertions(+), 1 deletion(-) - -commit 96e169b0eca31891f3cd564365d4a2a5c6e2a2c0 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Feb 8 19:58:31 2011 +0000 - - Make really sure the uMap static pointer is valid - - It might happen you are extremely unlucky and get the same - globalParams after a new delete/creation - - qt4/src/poppler-private.cc | 51 - +++++++++++++++++++++++++++++++++++++++------- - qt4/src/poppler-private.h | 34 +++---------------------------- - 2 files changed, 47 insertions(+), 38 deletions(-) - -commit c3470145f95791167c19a438934a923eab8a93cf -Author: William Bader <williambader@hotmail.com> -Date: Tue Feb 8 19:54:48 2011 +0000 - - Add PS level1 non standard binary output option - - More info at bug 34003 - - poppler/GlobalParams.cc | 18 +++- - poppler/GlobalParams.h | 5 +- - poppler/PSOutputDev.cc | 227 - ++++++++++++++++++++++++++++++++++-------------- - utils/pdftops.1 | 7 ++ - utils/pdftops.cc | 8 +- - 5 files changed, 198 insertions(+), 67 deletions(-) - -commit 37077aa475d2dee81f87daa05297b201eeb99c87 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Feb 7 19:48:28 2011 +0000 - - Make sure tx is inside the bitmap - - Seems to be what the code tried to do, fixes crash in bug 33948 - depending on - the resolution you render it - - poppler/SplashOutputDev.cc | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -commit 5aa854f70c8f563efe56dafa8bd6b3cdd5c95451 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Feb 6 13:24:35 2011 +0100 - - cairo: Use the new cairo unique id to set the surface id when printing - - Set the unique surface id when attaching jpeg images to the surface so - that cairo can reuse the mime data even when a new surface is created - with the same mime data. This reduces the size of the output file when - printing. - - poppler/CairoOutputDev.cc | 18 ++++++++++++++++-- - poppler/CairoOutputDev.h | 2 +- - 2 files changed, 17 insertions(+), 3 deletions(-) - -commit fe7b8aa4fc78aacf3226d019db74146ceaebd63c -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Feb 2 22:35:40 2011 +0000 - - Workaround bug when converting pdf to ps with level1 - - See bug 31926 for more info - - poppler/PSOutputDev.cc | 2 +- - poppler/PreScanOutputDev.cc | 7 +++++++ - poppler/PreScanOutputDev.h | 7 +++++++ - 3 files changed, 15 insertions(+), 1 deletion(-) - -commit 5984ad081cd609f3146e0da5e22097ef073eb519 -Author: William Bader <williambader@hotmail.com> -Date: Sun Jan 30 17:02:02 2011 +0000 - - Increase precision - - Fixes some issues with pdf from bug 27482 - - poppler/PSOutputDev.cc | 200 - ++++++++++++++++++++++++------------------------- - 1 file changed, 100 insertions(+), 100 deletions(-) - -commit c60d5afbeb986c1b335357202c5f551a3c146a76 -Author: Jim Meyering <meyering@redhat.com> -Date: Mon Jan 24 15:51:20 2011 +0100 - - demo: don't use an uninitialized local variable - - * text.c (pgd_text_get_text): Before this change, when - poppler_page_get_text returned NULL, we'd use "n_recs" uninitialized. - - glib/demo/text.c | 1 + - 1 file changed, 1 insertion(+) - -commit a3bdc56e2f086444419eddfcda5d2010a9a6b5c0 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Jan 29 11:23:33 2011 +0100 - - glib-demo: Add a tooltip with current selected character in text demo - - To make sure that the offset of the text returned by - poppler_page_get_text() matches - the list of rectangles returned by poppler_page_get_text_layout(). - - glib/demo/text.c | 60 - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 60 insertions(+) - -commit bf2d86c8db430595fb3c55edd3f6c8d289bdaeb5 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Jan 28 20:34:08 2011 +0000 - - Make sure uMap is still valid before using it - - Fixes KDE bug 264667 - - qt4/src/poppler-private.cc | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -commit e6fb20d7b3bf8ea8aedc1bcd910e035059835b5f -Author: Axel Strübing <axel.struebing@freenet.de> -Date: Fri Jan 28 19:20:15 2011 +0000 - - Extract text of a pdf correctly - - See "[poppler] text extraction does not work" in the mailing list - for more info - - poppler/GfxFont.cc | 14 +++++++++++++- - poppler/GfxFont.h | 2 ++ - 2 files changed, 15 insertions(+), 1 deletion(-) - -commit 4829d36a3b005585db8c8115f7ee81a4e2384780 -Author: Simon Kellner <kellner@kit.edu> -Date: Wed Jan 26 22:59:49 2011 +0000 - - fix labelToIndex on multiple prefixes - - A PDF document can use page label prefixes, for example, to label - only inside a chapter ("A-1" .. "A-<n>", "B-1" .. "B-<m>" et cetera). - When calculating a page index for a given label, poppler would - disregard the page range for all preceding prefixes that do not - match the given prefix. - - poppler/PageLabelInfo.cc | 7 +++---- - 1 file changed, 3 insertions(+), 4 deletions(-) - -commit e57c75fbd95ef8399b0785500f6893465bc808c3 -Author: Adrian Johnson <ajohnson@redneon.com> -Date: Mon Jan 24 19:48:09 2011 +1030 - - cairo: Implement Type 4,5,6,7 shadings using cairo mesh gradients - - Fixes bugs #19076 and #32791. - - poppler/CairoOutputDev.cc | 139 - ++++++++++++++++++++++++++++++++++++++++++++++ - poppler/CairoOutputDev.h | 12 ++++ - poppler/Gfx.cc | 10 +++- - poppler/OutputDev.h | 2 + - 4 files changed, 161 insertions(+), 2 deletions(-) - -commit 5081356fcc69012e9df95dbf1e3c36e7c1e751c4 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Jan 25 20:26:25 2011 +0000 - - Fix leak in SplashOutputDev::axialShadedFill - - poppler/SplashOutputDev.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 19dc283c3af597deab297341a37495c06988948b -Author: Thomas Klausner <wiz@danbala.tuwien.ac.at> -Date: Mon Jan 24 19:05:08 2011 +0000 - - Include zlib header since we use things defined there - - goo/PNGWriter.cc | 3 +++ - 1 file changed, 3 insertions(+) - -commit 5056e33e01ce0f7db1a5401b7b38d30e84eedf69 -Author: Sam Liao <phyomh@gmail.com> -Date: Mon Jan 17 13:07:22 2011 +0800 - - Poppler: Fix line selection, dont check y for Line selection - - When a line is selected while the Y values of selection is - not in the y range of words, the render will render the - line with reverse color while the words does not show up. - - This fix neglect the Y vaules to make sure that the words - also displayed when line is selected. - - poppler/TextOutputDev.cc | 16 ++++++++-------- - 1 file changed, 8 insertions(+), 8 deletions(-) - -commit 88812e716c1a0c87a504118d47eb4cc6f52962fa -Author: Andreas Hartmetz <ahartmetz@gmail.com> -Date: Fri Jan 21 23:33:47 2011 +0000 - - Add Hinting API to ArthurOutputDev - - poppler/ArthurOutputDev.cc | 11 +++++++++-- - poppler/ArthurOutputDev.h | 15 ++++++++++++++- - 2 files changed, 23 insertions(+), 3 deletions(-) - -commit dc5ec4668bdfe3b6ba41f0a2e551bbc07f8839ba -Author: Andreas Hartmetz <ahartmetz@gmail.com> -Date: Fri Jan 21 23:32:50 2011 +0000 - - support slight hinting in Splash backend - - cpp/poppler-page-renderer.cpp | 2 +- - poppler/SplashOutputDev.cc | 6 +++++- - poppler/SplashOutputDev.h | 4 +++- - qt4/src/poppler-private.h | 3 ++- - qt4/src/poppler-qt4.h | 4 +++- - splash/SplashFTFont.cc | 27 ++++++++++++++++++--------- - splash/SplashFTFont.h | 2 ++ - splash/SplashFTFontEngine.cc | 10 +++++++--- - splash/SplashFTFontEngine.h | 6 ++++-- - splash/SplashFontEngine.cc | 4 +++- - splash/SplashFontEngine.h | 2 ++ - 11 files changed, 50 insertions(+), 20 deletions(-) - -commit 0c5b1bef9f3f98001cee20061b1eaf20b965c5a9 -Author: William Bader <williambader@hotmail.com> -Date: Fri Jan 21 19:01:45 2011 +0000 - - Fix rendering for some pdf with -level1sep - - Also some speed improvemensts. Bug #32365 - - poppler/PSOutputDev.cc | 207 - ++++++++++++++++++++++++++++++++++++++----------- - poppler/PSOutputDev.h | 13 +++- - 2 files changed, 170 insertions(+), 50 deletions(-) - -commit 6cb8965fb8bce6da2a4460e86f592c1ea3a84a5c -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Jan 21 18:43:21 2011 +0000 - - fix (C) years - - poppler/CairoOutputDev.cc | 2 +- - poppler/CairoOutputDev.h | 2 +- - qt4/src/poppler-private.cc | 2 +- - qt4/tests/check_strings.cpp | 2 +- - 4 files changed, 4 insertions(+), 4 deletions(-) - -commit 24f9c8924b2135da616386d0fa691fe790b4e7a4 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Jan 21 08:43:34 2011 +0000 - - Access the correct variable - - Fixes asert on bug 33063 - - poppler/Annot.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 07a8808c22445c421f3064da7e5227dcbf40358b -Author: Pino Toscano <pino@kde.org> -Date: Mon Jan 17 21:34:23 2011 +0100 - - fix unicodeToQString() to correctly decode the Unicode sequence - - Use a UnicodeMap to convert the sequence to UTF-8, and convert from - that to QString. - Also, ignore the last character of the Unicode sequence if it is 0x0. - - Add a couple of testcases for it. - - qt4/src/poppler-private.cc | 30 ++++++++++++++++++++++++------ - qt4/tests/check_strings.cpp | 21 +++++++++++++++++++++ - 2 files changed, 45 insertions(+), 6 deletions(-) - -commit ed367c08d788c88c49de770019bf826cfebb3e2c -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Jan 16 17:25:02 2011 +0000 - - Don't need this either - - configure.ac | 1 - - 1 file changed, 1 deletion(-) - -commit 76ab657dc81ed0af7d9f2efaca2e68d570063001 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Jan 16 17:22:56 2011 +0000 - - And this is the last bit of qt3 cleaning? - - configure.ac | 1 - - 1 file changed, 1 deletion(-) - -commit 9a02856c2762e65b8f03e443e728e05e5a86f65b -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Jan 16 17:21:00 2011 +0000 - - Another qt3 unused file - - m4/qt.m4 | 16 ---------------- - 1 file changed, 16 deletions(-) - -commit 26da7a52d31eb677ab6399de2c07140aa272b35e -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Jan 16 17:17:59 2011 +0000 - - Yet more qt3 cleaning - - configure.ac | 2 -- - 1 file changed, 2 deletions(-) - -commit 8dc9c693abb0033247a338d0f7d1f3f7a57c1a55 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Jan 16 17:14:34 2011 +0000 - - Some more qt3 thigs i forgot to kill - - CMakeLists.txt | 5 - - Makefile.am | 1 - - cmake/modules/FindQt3.cmake | 319 - -------------------------------------------- - 3 files changed, 325 deletions(-) - -commit d82f98a274bfa008c218e265a080c4af7ce95131 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Jan 16 17:13:06 2011 +0000 - - Kill qt3 frontend - - CMakeLists.txt | 5 - - Makefile.am | 5 - - configure.ac | 18 -- - poppler-qt-uninstalled.pc.in | 7 - - poppler-qt.pc.cmake | 13 -- - poppler-qt.pc.in | 13 -- - qt/.gitignore | 7 - - qt/CMakeLists.txt | 34 ---- - qt/Makefile.am | 48 ----- - qt/poppler-document.cc | 344 - --------------------------------- - qt/poppler-fontinfo.cc | 83 -------- - qt/poppler-link-qt3.h | 188 ------------------ - qt/poppler-link.cc | 267 -------------------------- - qt/poppler-page-transition-private.h | 28 --- - qt/poppler-page-transition.cc | 95 ---------- - qt/poppler-page-transition.h | 146 -------------- - qt/poppler-page.cc | 357 - ----------------------------------- - qt/poppler-private.cc | 147 --------------- - qt/poppler-private.h | 102 ---------- - qt/poppler-qt.h | 311 ------------------------------ - qt/test-poppler-qt.cpp | 122 ------------ - 21 files changed, 2340 deletions(-) - -commit 301352e5585d4ab6e7b609b4ab79b4d8b8656092 -Author: Daiki Ueno <ueno@unixuser.org> -Date: Sun Jan 9 18:48:50 2011 +0000 - - Do not crash in case jpeg_create_decompress fails - - Bug 32890 - - poppler/DCTStream.cc | 21 ++++++++++++--------- - poppler/DCTStream.h | 8 ++++++-- - 2 files changed, 18 insertions(+), 11 deletions(-) - -commit 17baf0498485720b4ea5952bb46287f533139d0a -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Jan 8 13:03:31 2011 +0000 - - Remove declaration of function without implementation - - poppler/XRef.h | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -commit a9e280508f5d669c8b6e1a6bb888b9369d868ab3 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Jan 8 10:39:41 2011 +0100 - - glib: Fix memory leak when calling poppler_page_get_text_layout() - for pages with no text - - glib/poppler-page.cc | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -commit 5d62d18941810ef7d668eafa8b001085133fb169 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Jan 8 10:33:32 2011 +0100 - - glib: Use NULL instead of FALSE in g_return_val_if_fail() for - functions returning a pointer - - glib/poppler-page.cc | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -commit 1324ae13f1fc2fa28951c2c7f7d63d4756537229 -Author: Pino Toscano <pino@kde.org> -Date: Thu Jan 6 01:15:30 2011 +0100 - - [cpp/apidox] advertize the 'pnm' image format - - cpp/poppler-image.cpp | 1 + - 1 file changed, 1 insertion(+) - -commit b192363960c26111167b1b08db9910e5f39dcf8b -Author: Pino Toscano <pino@kde.org> -Date: Thu Jan 6 01:09:09 2011 +0100 - - [cpp] Add PNM (PBM/PGM/PPM) exporting to 'image'. - - Introduce a custom ImgWriter (PNMWriter) for exporting in the PNM - variants, - and use it choosing the output format matching as close as possible - the format of the image. - - cpp/CMakeLists.txt | 1 + - cpp/Makefile.am | 2 + - cpp/PNMWriter.cc | 119 - ++++++++++++++++++++++++++++++++++++++++++++++++++ - cpp/PNMWriter.h | 43 ++++++++++++++++++ - cpp/poppler-image.cpp | 22 +++++++++- - 5 files changed, 186 insertions(+), 1 deletion(-) - -commit bebc530cbde7898759e1bd3629d2836ce0fb1d08 -Author: Adrian Johnson <ajohnson@redneon.com> -Date: Fri Dec 31 12:11:40 2010 +1030 - - cairo: Don't set JPX mime data if the stream specifies a colorspace - - The stream colorspace overides, and may be different to, the - colorspace in the JPX data. - - https://bugs.freedesktop.org/show_bug.cgi?id=32746 - - poppler/CairoOutputDev.cc | 46 - +++++++++++++++++++++++++++++++--------------- - poppler/CairoOutputDev.h | 1 + - 2 files changed, 32 insertions(+), 15 deletions(-) - -commit 1399b9ab14b19f25583c75af2b36f63a6a01129a -Author: Pino Toscano <pino@kde.org> -Date: Wed Dec 29 15:56:45 2010 +0100 - - [cpp] add TIFF output to 'image' - - cpp/poppler-image.cpp | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - -commit 1c7937dbc3c577ffc12cacc8de33d320e2f30ce9 -Author: William Bader <williambader@hotmail.com> -Date: Wed Dec 29 14:47:06 2010 +0000 - - Make pdftoppm be able of writing tif files - - BUG 32027 - - CMakeLists.txt | 15 ++++ - config.h.cmake | 3 + - configure.ac | 32 ++++++++ - goo/Makefile.am | 2 + - goo/TiffWriter.cc | 202 - +++++++++++++++++++++++++++++++++++++++++++++++++ - goo/TiffWriter.h | 53 +++++++++++++ - poppler/Makefile.am | 11 +++ - splash/SplashBitmap.cc | 18 ++++- - splash/SplashBitmap.h | 5 +- - splash/SplashTypes.h | 4 +- - utils/pdftoppm.1 | 6 ++ - utils/pdftoppm.cc | 14 +++- - 12 files changed, 358 insertions(+), 7 deletions(-) - -commit bae91ecb638fcfee001e5c9a86a754610da796e4 -Author: William Bader <williambader@hotmail.com> -Date: Tue Dec 28 11:53:54 2010 +0000 - - Add -singlefile option to pdftoppm - - Bug 32025 - - utils/pdftoppm.1 | 3 +++ - utils/pdftoppm.cc | 26 +++++++++++++++++++++++--- - 2 files changed, 26 insertions(+), 3 deletions(-) - -commit ff58ee66c27da09a370a3000ab55eb1a24921852 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Dec 27 20:07:21 2010 +0000 - - bump soname just in case the getPage change is not BC - - qt/CMakeLists.txt | 2 +- - qt/Makefile.am | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit 453df02e195a96d0210f297c21c8ffba646659da -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Dec 27 19:51:13 2010 +0000 - - Make distcheck work - - glib/Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 6a34cec72c1a1b6576858a7836aae4a902fb5ed7 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Dec 27 19:29:52 2010 +0000 - - increase core soname - - CMakeLists.txt | 2 +- - poppler/Makefile.am | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit 8c11e9d68dceb609d04b3b383d22c307b5981d86 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Dec 27 19:23:29 2010 +0000 - - 0.16.0 project version increase - - CMakeLists.txt | 4 ++-- - configure.ac | 4 ++-- - cpp/Doxyfile | 2 +- - qt4/src/Doxyfile | 2 +- - 4 files changed, 6 insertions(+), 6 deletions(-) - -commit 8c1fd83c6061279af00c1172fe41cee61f19d917 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Dec 27 19:22:22 2010 +0000 - - 0.16.0 NEWS - - NEWS | 24 ++++++++++++++++++++++++ - 1 file changed, 24 insertions(+) - -commit 0294d6e50691a3e40fad0d6e4fa9056944a91efd -Author: Thomas Freitag <Thomas.Freitag@alfa.de> -Date: Thu Dec 23 15:56:32 2010 +0000 - - Be more correct when drawing radial shadings - - Fixes 32349 - - poppler/Gfx.cc | 25 ++++++++++++++++--------- - 1 file changed, 16 insertions(+), 9 deletions(-) - -commit 3aa08e378927889b35b6fa858d6da568250ba6ec -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Dec 19 22:36:47 2010 +0000 - - Seems to work with this version, so enable it - - CMakeLists.txt | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 93cf184b7573980bf2e56342e64f9b99c5d0b415 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Dec 19 14:16:25 2010 +0000 - - Fix last commit - - Applying patches by hand is bad - - poppler/PDFDoc.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit ebb580d756a8321de87814f05ab572564732c15e -Author: Philip Lorenz <lorenzph+freedesktop@gmail.com> -Date: Sun Dec 19 14:08:31 2010 +0000 - - Windows fixes - - poppler/PDFDoc.cc | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -commit 88a4154420e016d93c5ce05b5b8e09b6bddcadc9 -Author: Philip Lorenz <lorenzph+freedesktop@gmail.com> -Date: Sun Dec 19 13:03:01 2010 +0000 - - build on newer MSVC - - qt4/src/poppler-annotation.h | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -commit 18cd9f6aeb48266c551952c395eb9cd662bc27f5 -Author: Thomas Freitag <Thomas.Freitag@alfa.de> -Date: Sat Dec 18 17:59:54 2010 +0000 - - compile in windows - - poppler/FontInfo.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 471102ef68b439dfa13e20e3b0f2e143f8d0dc85 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Dec 17 00:36:36 2010 +0000 - - Remove -resolution - - Actually use -zoom that is there for a reason - - utils/pdftohtml.1 | 3 --- - utils/pdftohtml.cc | 15 ++++++--------- - 2 files changed, 6 insertions(+), 12 deletions(-) - -commit edf6c47feb5b7658e585bcce196e465245e1dc98 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Dec 16 22:56:40 2010 +0000 - - kill useless code - - utils/pdftohtml.cc | 8 -------- - 1 file changed, 8 deletions(-) - -commit 185a2f81485e19f96393a431be5523a277747b94 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Dec 16 22:56:15 2010 +0000 - - static-ify some vars - - utils/HtmlOutputDev.cc | 9 --------- - utils/pdftohtml.cc | 8 ++++---- - 2 files changed, 4 insertions(+), 13 deletions(-) - -commit e4dfc548c57b690db9122d1db3342ed0a785c8bb -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Dec 14 19:45:46 2010 +0000 - - We need this to make the define really be defined - - config.h.cmake | 3 +++ - 1 file changed, 3 insertions(+) - -commit 06da4b46c442778c67b788b747f04b386b5247ac -Author: Adrian Johnson <ajohnson@redneon.com> -Date: Tue Dec 14 09:06:57 2010 +1030 - - cairo: Use A1 instead of A8 for imagemask - - The cairo PDF surface now optimizes the case of cairo_mask() with - solid source and A1 mask to use a PDF stencil mask. - - Fixes https://bugs.launchpad.net/ubuntu/+source/libcairo/+bug/680628 - where a 65K PDF printed to PDF using poppler-cairo turns into an 8MB - PDF. - - CMakeLists.txt | 2 ++ - configure.ac | 1 + - poppler/CairoOutputDev.cc | 25 ++++++++++++++++++------- - 3 files changed, 21 insertions(+), 7 deletions(-) - -commit 6ef457dc818e7e241e5d2e264bc2d78b132ae638 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Dec 13 14:08:29 2010 +0000 - - Move -fno-exceptions -fno-check-new to default flags - - Makes sense since we decided not to support the exception path in - gmem a - while ago - - cmake/modules/PopplerMacros.cmake | 2 +- - configure.ac | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit 86e469600b58ae05cb6ede1b4017fbdac99cc556 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Dec 13 14:04:00 2010 +0000 - - More gcc flags movement - - -Wchar-subscripts is part of -Wall so remove it - Move -fno-common to default options since it makes sense to use it - - cmake/modules/PopplerMacros.cmake | 4 ++-- - configure.ac | 4 ++-- - 2 files changed, 4 insertions(+), 4 deletions(-) - -commit 2b74241d8b1fd1ec9fab4f6f673bbaaa1cb3d949 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Dec 13 13:56:52 2010 +0000 - - Promote -Wcast-align to the general warnings we ask gcc to give - - cmake/modules/PopplerMacros.cmake | 2 +- - configure.ac | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit 7313e0a4de6f2146c1dcb3d235f18a3c844d12d5 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Dec 12 23:28:18 2010 +0000 - - Do not return 99 (or 1) with -h, -v and -printenc - - Bug 32149 - - utils/pdffonts.cc | 2 ++ - utils/pdfimages.cc | 2 ++ - utils/pdfinfo.cc | 3 +++ - utils/pdftoppm.cc | 2 ++ - utils/pdftops.cc | 5 ++++- - utils/pdftotext.cc | 3 +++ - 6 files changed, 16 insertions(+), 1 deletion(-) - -commit 669cbfc9fd78a22d4f14b0af43143e1f5dc28cd5 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Dec 11 19:04:22 2010 +0000 - - Fix the preliminary bbox/clip calculation - - Code based in code posted by Suzuki Toshiya in the freetype mailing - list - - splash/SplashFTFont.cc | 15 +++++++++------ - 1 file changed, 9 insertions(+), 6 deletions(-) - -commit 2984002a64acca7014edeadd900dd52cdf7d9eac -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Dec 11 18:57:52 2010 +0000 - - Remove the * we just need to increase the pointer - - Gives a warning with newer gcc's - - splash/Splash.cc | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit 9b45fa072198da4a5032004ac943cf2227aa97ea -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Dec 10 12:05:58 2010 +0000 - - Make PreScanOutputDev be less agressive when deciding to rasterize - - BUG 30107 - - poppler/PreScanOutputDev.cc | 14 +++++++++++++- - poppler/PreScanOutputDev.h | 4 ++++ - 2 files changed, 17 insertions(+), 1 deletion(-) - -commit f96f6a06cdc33b4654669ac74d5abd0d546a127d -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Dec 5 12:06:21 2010 +0000 - - Adapt the zlib-base FlateStream code to API changes - - Bug 32065 - - poppler/FlateStream.cc | 9 ++++++--- - poppler/FlateStream.h | 9 +++++++++ - 2 files changed, 15 insertions(+), 3 deletions(-) - -commit 7b1f83990a1f68306daf5f7dbeabcd38f4382e3b -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Nov 29 22:27:46 2010 +0000 - - 0.15.3 - - CMakeLists.txt | 4 ++-- - NEWS | 18 ++++++++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/Doxyfile | 2 +- - 6 files changed, 24 insertions(+), 6 deletions(-) - -commit 7c23a993193aaaa4d4b5b6d1161a0455d1e2a8c0 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Nov 29 21:33:31 2010 +0000 - - Add some more isNum before calling getNum - - poppler/GfxState.cc | 48 ++++++++++++++++++++++++++++++++---------------- - 1 file changed, 32 insertions(+), 16 deletions(-) - -commit 62ec4f591c258e702ee79b519919a931517220bf -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Nov 29 20:50:43 2010 +0000 - - pass fetchOriginatorNums in some more calls - - Fixes some more crashes in broken files - - poppler/Parser.cc | 7 ++++++- - poppler/Parser.h | 1 + - poppler/XRef.cc | 6 +++--- - 3 files changed, 10 insertions(+), 4 deletions(-) - -commit d2a0e2ca723142478858f7edfb7c98807d554578 -Author: Hib Eris <hib@hiberis.nl> -Date: Thu Nov 25 10:36:38 2010 +0000 - - Skip over loops in Pages tree - - poppler/Catalog.cc | 15 ++++++++++----- - 1 file changed, 10 insertions(+), 5 deletions(-) - -commit 7abd371364e6e4aaef932f26b0664f7f9d760c42 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Nov 28 13:57:50 2010 +0000 - - this var is not about xobjects only anymroe - - poppler/FontInfo.cc | 6 +++--- - poppler/FontInfo.h | 2 +- - 2 files changed, 4 insertions(+), 4 deletions(-) - -commit 1ac14df61d711097837e44d80a9332f0a854b95e -Author: Adrian Johnson <ajohnson@redneon.com> -Date: Sun Nov 28 13:49:41 2010 +0000 - - find fonts inside patterns - - Bug 31948 - - poppler/FontInfo.cc | 50 - +++++++++++++++++++++++++++----------------------- - 1 file changed, 27 insertions(+), 23 deletions(-) - -commit d30dd8c6f6491beac9750447126930168394cd9f -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Nov 28 13:25:39 2010 +0000 - - Use sets instead of arrays - - poppler/FontInfo.cc | 46 ++++++++-------------------------------------- - poppler/FontInfo.h | 11 +++-------- - 2 files changed, 11 insertions(+), 46 deletions(-) - -commit 4c20bf14c0b1d7f1d5e530ded890186487da32b5 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Nov 28 12:50:24 2010 +0000 - - Use FontInfoScanner - - No idea why we didn't do this before, duplicate code is evil and now - pdffonts doesn't crash on pdf from bug 20486 - - utils/pdffonts.cc | 185 - ++++++++---------------------------------------------- - 1 file changed, 26 insertions(+), 159 deletions(-) - -commit d915f3d5a9e9e2e5dcd6be4cf8fac1b5849a13e9 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Nov 24 21:51:46 2010 +0000 - - protect against null ref here - - poppler/Catalog.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit cf32faaa16d763561fb9dfc4469345e4b3ba2369 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Nov 24 21:48:54 2010 +0000 - - Protect against NULL values here - - poppler/JPEG2000Stream.h | 2 ++ - 1 file changed, 2 insertions(+) - -commit 46a6cc5952c59504863baed3ad2870093c462f12 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Nov 24 19:42:59 2010 +0000 - - Check the objects are numbers before using them - - Bug 31895 - - poppler/GfxState.cc | 26 ++++++++++++++++++-------- - 1 file changed, 18 insertions(+), 8 deletions(-) - -commit 52e25cca7e75a8b8eac95a3cec258f1cd9f8ecaa -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Nov 23 20:31:14 2010 +0000 - - If it is not a Page but has no Kids either let's just pretend it's - a page - - Fixes broken PDF at bug 31861 - - poppler/Catalog.cc | 2 +- - poppler/Dict.cc | 4 ++++ - poppler/Dict.h | 2 ++ - 3 files changed, 7 insertions(+), 1 deletion(-) - -commit c6127898b13311197971b1c6b1b306b91e28cf0e -Author: Hib Eris <hib@hiberis.nl> -Date: Mon Nov 22 13:08:48 2010 +0000 - - Use gmallocn_checkoverflow when parsing Hints table - - Prevents running out of memory with malicious documents. - - poppler/Hints.cc | 26 +++++++++++++------------- - 1 file changed, 13 insertions(+), 13 deletions(-) - -commit 6a17cc89eda52f08cbacbf9bfaaeda22cf041e82 -Author: Thomas Freitag <Thomas.Freitag@alfa.de> -Date: Mon Nov 22 19:20:56 2010 +0000 - - Improve rendering of radial shadings - - Improves the duck rendering in bug 22098 - - poppler/Gfx.cc | 71 - ++++++++++++++++++++++++++++------------------------------ - 1 file changed, 34 insertions(+), 37 deletions(-) - -commit 9093adede4f9ad6fb2962dcefcb09c1d8c357715 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Nov 21 23:49:12 2010 +0000 - - pedantic ; - - poppler/CurlPDFDocBuilder.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 61445f5af749510fb647059af01abf1faf664195 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Nov 20 22:19:35 2010 +0000 - - forgot to upadte year here - - poppler/Parser.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 3628837febb21bcd1b54f3fb737628ea59e5d95d -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Nov 20 22:15:08 2010 +0000 - - And now generalize the previous fix - - Works for loops of more than one item as in bug 28784 - - poppler/Dict.cc | 4 ++-- - poppler/Dict.h | 2 +- - poppler/Object.cc | 4 ++-- - poppler/Object.h | 9 +++++---- - poppler/Parser.cc | 19 +++++++++++++------ - poppler/Parser.h | 7 ++++++- - poppler/XRef.cc | 30 +++++++++++++++++++++++++----- - poppler/XRef.h | 2 +- - 8 files changed, 55 insertions(+), 22 deletions(-) - -commit b0555189a7fbd7f6a899e582783b9e0df44d5d6a -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Nov 20 21:32:24 2010 +0000 - - Protect against more loops when parsing - - poppler/Dict.cc | 4 ++-- - poppler/Dict.h | 2 +- - poppler/Object.cc | 4 ++-- - poppler/Object.h | 8 ++++---- - poppler/Parser.cc | 2 +- - poppler/XRef.cc | 4 ++-- - poppler/XRef.h | 2 +- - 7 files changed, 13 insertions(+), 13 deletions(-) - -commit 555fa897b275ca7195f22a727b049c8c4f2d74cd -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Nov 20 19:14:38 2010 +0000 - - Detect loops in FormField creation - - poppler/Form.cc | 88 - ++++++++++++++++++++++++++++++++------------------------- - poppler/Form.h | 14 +++++---- - 2 files changed, 58 insertions(+), 44 deletions(-) - -commit 1802ddef374cb1451975480b2427e5d23ee2c737 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Nov 20 18:58:17 2010 +0000 - - Forgot to port this away from GooVector :-S - - poppler/CurlCachedFile.cc | 3 +-- - poppler/CurlCachedFile.h | 2 +- - 2 files changed, 2 insertions(+), 3 deletions(-) - -commit 32e53c5436b8c3654e7043f1d86596a79511a4cf -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Nov 20 18:54:59 2010 +0000 - - fix spacing - - poppler/Form.cc | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -commit 1cb3d5d94a1d89ccded96d977bcabfbe438fb81f -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Nov 20 18:08:45 2010 +0000 - - fix the memset - - Fixes crash in broken pdf - - poppler/Hints.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 22e8cebaa15adb4b19c9556cdca43cc3e77832b7 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Nov 20 17:20:34 2010 +0000 - - Ensure the obj are num before reading them - - poppler/GfxState.cc | 32 ++++++++++++++++++++++---------- - 1 file changed, 22 insertions(+), 10 deletions(-) - -commit 08b2db36db4e011ebe36d2d945cb1a0498f1c5fb -Author: Pino Toscano <pino@kde.org> -Date: Sat Nov 20 14:00:36 2010 +0100 - - add my copyright here - - poppler/Hints.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 91aa4b02aa93ffe3828479194067de42d52be465 -Author: Pino Toscano <pino@kde.org> -Date: Sat Nov 20 13:13:46 2010 +0100 - - [cpp] include <ios> for std::hex() and std::left() - - cpp/poppler-global.cpp | 1 + - cpp/tests/poppler-dump.cpp | 1 + - 2 files changed, 2 insertions(+) - -commit 1c924412923cb01f2cb95b0943cb7bbaf7e8cfb6 -Author: Pino Toscano <pino@kde.org> -Date: Sat Nov 20 13:02:36 2010 +0100 - - [cpp] include <iterator> for std::back_inserter() - - cpp/poppler-document.cpp | 1 + - 1 file changed, 1 insertion(+) - -commit 95b551025a34f3a7bcff2852eac6d186bc8a7cb0 -Author: Pino Toscano <pino@kde.org> -Date: Sat Nov 20 12:54:21 2010 +0100 - - use a std::vector<char> instead of a var-length-array of char's - - poppler/Hints.cc | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit 4faaff893515c80cb69b02e431a0f8483274a497 -Author: Hib Eris <hib@hiberis.nl> -Date: Fri Nov 19 23:53:35 2010 +0000 - - [win32] Simplify strtok_r implementation - - The previous implementation did not compile with mingw64. - - poppler/strtok_r.cpp | 137 - +-------------------------------------------------- - 1 file changed, 1 insertion(+), 136 deletions(-) - -commit 255f84927a649d980f047fe755c9c308535a3779 -Author: Hib Eris <hib@hiberis.nl> -Date: Fri Nov 19 23:45:33 2010 +0000 - - Correct parsing of linearization table - - Fixes bug #31627 - - poppler/Linearization.cc | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -commit 9d05138f0b7d15945f546564036bc67815593db0 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Nov 14 16:05:28 2010 +0000 - - 0.15.2 - - CMakeLists.txt | 4 ++-- - NEWS | 22 ++++++++++++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/Doxyfile | 2 +- - 6 files changed, 28 insertions(+), 6 deletions(-) - -commit 2d18543bd6b3a5a9ff2dfab63339d5bfcccd0b2f -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Nov 14 15:41:56 2010 +0000 - - This does actually work now :D - - qt4/tests/check_metadata.cpp | 1 - - 1 file changed, 1 deletion(-) - -commit d772364b8a5858cbd98e256547d319260fa9d084 -Author: Pino Toscano <pino@kde.org> -Date: Thu Nov 11 21:52:25 2010 +0100 - - [Qt4] New function setDebugErrorFunction(). - - This new function + typedef can be useful to direct the ebug/error - messages - to a different place than the default qDebug()'s one. - - Base on an idea of Albert, added closure and polish by me. - - qt4/src/poppler-private.cc | 20 +++++++++++++++++++- - qt4/src/poppler-qt4.h | 24 ++++++++++++++++++++++++ - 2 files changed, 43 insertions(+), 1 deletion(-) - -commit ce929cf33f4b6b6421f9d327b4bb792816d47aac -Author: Jakob Voss <jakob.voss@gbv.de> -Date: Wed Nov 10 23:41:44 2010 +0000 - - Add -p flag to pdfimages - - Adds the page the image is in to the image filename - - utils/ImageOutputDev.cc | 25 ++++++++++++++++++------- - utils/ImageOutputDev.h | 19 +++++++++++++++---- - utils/pdfimages.1 | 3 +++ - utils/pdfimages.cc | 6 +++++- - 4 files changed, 41 insertions(+), 12 deletions(-) - -commit 6296c28968613aadb7ea084092945a54005eca9b -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Nov 10 23:28:45 2010 +0000 - - Kill GooVector - - std::vector does the same and GooVector is not part of xpdf so - we don't - need to maintain it in case we ever get a new xpdf release we want to - merge with - - CMakeLists.txt | 1 - - goo/GooVector.h | 159 - --------------------------------------------- - goo/Makefile.am | 1 - - poppler/CachedFile.cc | 19 +++--- - poppler/CachedFile.h | 15 +++-- - poppler/Catalog.cc | 12 ++-- - poppler/Catalog.h | 10 +-- - poppler/Form.h | 3 +- - poppler/Gfx.h | 7 +- - poppler/Hints.cc | 5 +- - poppler/Hints.h | 6 +- - poppler/StdinCachedFile.cc | 2 +- - poppler/StdinCachedFile.h | 2 +- - poppler/Stream.h | 1 - - poppler/XRef.cc | 10 +-- - poppler/XRef.h | 7 +- - utils/HtmlFonts.cc | 8 +-- - utils/HtmlFonts.h | 12 ++-- - utils/HtmlLinks.cc | 8 +-- - utils/HtmlLinks.h | 4 +- - 20 files changed, 66 insertions(+), 226 deletions(-) - -commit 5934c320aa136c1a6e97fb9bf54bdfdccfcab521 -Author: Hib Eris <hib@hiberis.nl> -Date: Wed Nov 10 22:50:36 2010 +0000 - - Linearization improvements - - Read - http://lists.freedesktop.org/archives/poppler/2010-November/006642.html - for the detailed patch description - - CMakeLists.txt | 4 + - glib/poppler-action.cc | 4 +- - glib/poppler-document.cc | 17 +- - glib/poppler-page.cc | 1 + - poppler/CachedFile.h | 2 +- - poppler/Catalog.cc | 352 +++++++++++++++++++++----------- - poppler/Catalog.h | 14 +- - poppler/FontInfo.cc | 5 +- - poppler/Hints.cc | 439 - ++++++++++++++++++++++++++++++++++++++++ - poppler/Hints.h | 95 +++++++++ - poppler/Linearization.cc | 224 ++++++++++++++++++++ - poppler/Linearization.h | 45 ++++ - poppler/Makefile.am | 4 + - poppler/PDFDoc.cc | 284 ++++++++++++++++++++++---- - poppler/PDFDoc.h | 38 +++- - poppler/PSOutputDev.cc | 39 ++-- - poppler/PSOutputDev.h | 14 +- - poppler/Stream.cc | 13 +- - poppler/Stream.h | 11 +- - poppler/XRef.cc | 351 +++++++++++++++++++------------- - poppler/XRef.h | 25 ++- - qt/poppler-document.cc | 14 +- - qt/poppler-page.cc | 19 +- - qt/poppler-private.h | 14 +- - qt/poppler-qt.h | 3 +- - qt4/src/poppler-document.cc | 12 +- - qt4/src/poppler-link.cc | 7 +- - qt4/src/poppler-page.cc | 3 +- - qt4/src/poppler-ps-converter.cc | 2 + - utils/HtmlOutputDev.cc | 2 +- - utils/HtmlOutputDev.h | 3 + - utils/pdffonts.cc | 6 +- - utils/pdfinfo.cc | 22 +- - utils/pdftohtml.cc | 2 +- - utils/pdftops.cc | 3 +- - 35 files changed, 1690 insertions(+), 403 deletions(-) - -commit abb1313ae40ab7efb073406f47fa53bf7afe0b88 -Author: Pino Toscano <pino@kde.org> -Date: Mon Nov 8 01:54:03 2010 +0100 - - [cpp/apidox] add the minimum version of 'image' - - cpp/poppler-image.cpp | 2 ++ - 1 file changed, 2 insertions(+) - -commit f559e77cb7d76c5fe6a79be9086667a29613c912 -Author: Pino Toscano <pino@kde.org> -Date: Mon Nov 8 01:52:48 2010 +0100 - - [cpp] add image::bytes_per_row() - - cpp/poppler-image.cpp | 8 ++++++++ - cpp/poppler-image.h | 1 + - 2 files changed, 9 insertions(+) - -commit 14dea4d74698d5d7d994e687f8176652d790dba7 -Author: Pino Toscano <pino@kde.org> -Date: Sun Nov 7 22:57:31 2010 +0100 - - [arthur] use the untransformed line width, not the transformed one - - ... as the painter will do the transformation itself already; - seems to product better results - - poppler/ArthurOutputDev.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit f077e82af0724be88d28c896a3c208f1d50ccff9 -Author: Pino Toscano <pino@kde.org> -Date: Sun Nov 7 21:50:48 2010 +0100 - - [qt4] New Page::renderToPainter() - - This new painter-based painting function ican be used for painting - (with Arthur only for now) without getting an image first. - Also add a new flag type for it, with a single item telling whether - do not save+restore the provided painter. - - Mostly based on a patch by Matthias Fauconneau - (matthias.fauconneau@gmail.com), thanks! - - qt4/src/poppler-page.cc | 62 - +++++++++++++++++++++++++++++++--------------- - qt4/src/poppler-qt4.h | 65 - ++++++++++++++++++++++++++++++++++++++++++++++++- - 2 files changed, 107 insertions(+), 20 deletions(-) - -commit df02d1fc9e65422121e5e8f493c13229552ec0e7 -Author: Pino Toscano <pino@kde.org> -Date: Sun Nov 7 19:47:56 2010 +0100 - - [arthur] remove unused 'm_image' attribute - - poppler/ArthurOutputDev.cc | 1 - - poppler/ArthurOutputDev.h | 2 +- - 2 files changed, 1 insertion(+), 2 deletions(-) - -commit b29582cd0d542a3e70dbca3fb75770daa4cc91ca -Author: Matthias Fauconneau <matthias.fauconneau@gmail.com> -Date: Sun Nov 7 19:44:11 2010 +0100 - - [arthur] small fixes and memory leaks - - - fix font rendering (transforming the glyph path and not only the - glyph origin) - - fix image rendering (alpha was set to zero) - - poppler/ArthurOutputDev.cc | 122 - ++++++++++++++++++++------------------------- - 1 file changed, 54 insertions(+), 68 deletions(-) - -commit 970f075569bf9be5e5ddc3a9ad1fabec5435dfaf -Author: Pino Toscano <pino@kde.org> -Date: Sun Nov 7 16:31:02 2010 +0100 - - [cpp/tests] add a simple poppler-render test - - ... to ease testing the render capabilities of poppler-cpp. - quite minimal at the moment. - - cpp/tests/CMakeLists.txt | 3 ++ - cpp/tests/Makefile.am | 9 +++- - cpp/tests/poppler-render.cpp | 113 - +++++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 124 insertions(+), 1 deletion(-) - -commit bfe4139c742cb0a669f5504df7e22e3e57243d9a -Author: Pino Toscano <pino@kde.org> -Date: Sun Nov 7 16:23:26 2010 +0100 - - [cpp] Add page_renderer, to render pages over images. - - This new class introduces a very simple way to render a page, using - the Splash backend, - giving an 'image' as result. - It can hold a color for the "paper" of the pages, and some hints - for the actual rendering. - - cpp/CMakeLists.txt | 2 + - cpp/Makefile.am | 2 + - cpp/poppler-page-renderer.cpp | 212 - ++++++++++++++++++++++++++++++++++++++++++ - cpp/poppler-page-renderer.h | 66 +++++++++++++ - 4 files changed, 282 insertions(+) - -commit 91e3f7b4ea42a5821fd78e1edf55e95250c9bc68 -Author: Pino Toscano <pino@kde.org> -Date: Sun Nov 7 16:19:34 2010 +0100 - - [cpp] add an internal way to get a 'page_private' of a 'page' - - useful for getting a 'page_private' in the implementation of other - cpp classes - without the need to add friends to 'page' - - cpp/poppler-page-private.h | 5 +++++ - 1 file changed, 5 insertions(+) - -commit fa7c41cb9c52ecd3d7c574455b1258a3021b8c75 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Nov 4 20:55:34 2010 +0000 - - Improvements to the splash backend - - Antialias and shadings. - Code by Thomas Freitag <Thomas.Freitag@alfa.de> and Christian - Feuersänger <cfeuersaenger@googlemail.com> - More info at bug 30436 - - poppler/CairoOutputDev.h | 5 +- - poppler/Function.cc | 4 +- - poppler/Function.h | 2 + - poppler/Gfx.cc | 12 +- - poppler/OutputDev.h | 16 +- - poppler/PSOutputDev.h | 4 +- - poppler/SplashOutputDev.cc | 182 ++++++++++++++++++++- - poppler/SplashOutputDev.h | 68 +++++++- - splash/Splash.cc | 395 - ++++++++++++++++++++++++++++++++++++++++++++- - splash/Splash.h | 11 +- - splash/SplashBitmap.cc | 4 +- - splash/SplashBitmap.h | 3 + - splash/SplashPattern.cc | 17 +- - splash/SplashPattern.h | 36 ++++- - 14 files changed, 735 insertions(+), 24 deletions(-) - -commit 0aa040163741ab8ba093a742e556bba2a5ab7edf -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Nov 3 20:40:24 2010 +0000 - - Do not add sibling children as parents - - Fixes c2ff94b1600b8a5841a5e4627f014560ac460f1a - - poppler/Function.cc | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -commit c2ff94b1600b8a5841a5e4627f014560ac460f1a -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Nov 3 00:02:02 2010 +0000 - - Do not loop forever in broken documents - - StitchingFunctions that have themselves up in the parent chain - are wrong - - poppler/Function.cc | 22 +++++++++++++++++++--- - poppler/Function.h | 6 ++++-- - 2 files changed, 23 insertions(+), 5 deletions(-) - -commit cad66a7d25abdb6aa15f3aa94a35737b119b2659 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Nov 2 19:14:34 2010 +0000 - - Fix crash in broken documents - - mapLen = (code + 256) & ~255; can wrap and you end up with mapLen - < code - that is not what you wanted - - poppler/CharCodeToUnicode.cc | 16 +++++++++++----- - 1 file changed, 11 insertions(+), 5 deletions(-) - -commit 7e5f31c1c41193c6e49355970e6d027b91d45825 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Nov 2 00:32:01 2010 +0000 - - make some more fields private - - splash/SplashFontFile.h | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -commit 6751eb48dc49890f7ad8b732b3fc29a2db746ec4 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Nov 2 00:26:08 2010 +0000 - - Make the destructor private - - You are not supposed to call it, you should call unref - - splash/SplashFontFile.h | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -commit b718e821d5f21ea5b0c44c6c2b59769c9b94892a -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Oct 28 08:46:09 2010 +0100 - - Revert fdfffc9c68314d3f64dee7e0ef8617105e3198dd - - It is not a leak and makes things crash :D - - poppler/SplashOutputDev.cc | 1 - - 1 file changed, 1 deletion(-) - -commit 15b9aeac5a20c544db1aebe00113ebc2f7ba52c7 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Oct 28 00:37:29 2010 +0100 - - if reallocn fails, free p - - goo/gmem.cc | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -commit 561c0567a5741d7c49903c51c8020187dccaa0d9 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Oct 27 22:43:51 2010 +0100 - - fix comment - - poppler/SplashOutputDev.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 4ef38cc99a879202e717447a422272cf85eeccfc -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Oct 27 22:36:07 2010 +0100 - - Fix memory leaks that can happen with broken documents - - poppler/SplashOutputDev.cc | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -commit fdfffc9c68314d3f64dee7e0ef8617105e3198dd -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Oct 27 20:40:19 2010 +0100 - - Fix memory leak - - poppler/SplashOutputDev.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 90d479d9d5c947175e60ab689f440ae9c24f0b2b -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Oct 27 20:39:48 2010 +0100 - - Do not crash if bitmap->alpha == NULL - - Happens in broken files - - splash/Splash.cc | 6 ++++++ - 1 file changed, 6 insertions(+) - -commit 6ad36277971ec46d4a4ef0c45625e60f8c5f1247 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Oct 25 18:59:49 2010 +0100 - - Initialze movie to NULL on broken pdf files - - poppler/Annot.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 2d0b6e2956a81164bca6adc9aacad0e620480957 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Oct 24 00:23:21 2010 +0100 - - Here the chars to read is the increment size not the initialSize - - Fixes crash in file provided by Robert Święcki - - poppler/Stream.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit dcb02d2100136b6035485be3be214ce3d9f1c102 -Author: Vincent Torri <vtorri@univ-evry.fr> -Date: Sat Oct 23 23:45:05 2010 +0100 - - remove -ansi flag for cywin and mingw - - configure.ac | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -commit 17cdc81224c72f7b58de61734c9ead337ff7b42b -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Oct 23 23:37:59 2010 +0100 - - update my C year - - poppler/SplashOutputDev.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit e09ddce7e21bbd62b384d9d59fbd1e0f14f7d05f -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Oct 23 23:33:00 2010 +0100 - - Fix crash in malformed documents - - poppler/SplashOutputDev.cc | 5 +++++ - 1 file changed, 5 insertions(+) - -commit 906e4e15421d8f3f0a825ca767e5eac3169853d6 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Oct 23 23:12:44 2010 +0100 - - Do not leak attrs1 - - poppler/Catalog.cc | 1 + - 1 file changed, 1 insertion(+) - -commit ec32bb45a57a8a839156c946fcde1270aa6019d9 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Oct 23 23:00:03 2010 +0100 - - Do not crash if n is 0 - - poppler/Function.cc | 3 +++ - 1 file changed, 3 insertions(+) - -commit 9edf7e4fefb37989af9a2558aaa83d7cd4694ec6 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Oct 23 22:59:50 2010 +0100 - - add unlikely marker - - poppler/Decrypt.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit c46e863b7b94dc2f83a7d89f4afb8fe3bc8ec35c -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Oct 23 22:55:49 2010 +0100 - - Do not divide by 0 in rc4InitKey - - poppler/Decrypt.cc | 4 ++++ - 1 file changed, 4 insertions(+) - -commit bcb13ed5828e2a855efd5e38b2acd15ca37a9991 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Oct 23 22:40:17 2010 +0100 - - Check obj2 is a num before reading it - - poppler/Gfx.cc | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -commit c64a49307782299cb7a950a66419f9d59707f38b -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Oct 20 22:29:29 2010 +0100 - - 0.15.1 - - CMakeLists.txt | 4 ++-- - NEWS | 46 ++++++++++++++++++++++++++++++++++++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/Doxyfile | 2 +- - 6 files changed, 52 insertions(+), 6 deletions(-) - -commit 3b45c66de91243d7419657512cf726c9e1c26dfb -Author: Kenneth Berland <ken@hero.com> -Date: Sun Oct 17 14:24:16 2010 +0100 - - Add -bbox option to pdftotext - - utils/pdftotext.1 | 4 ++ - utils/pdftotext.cc | 125 - ++++++++++++++++++++++++++++++++++++++++++----------- - 2 files changed, 103 insertions(+), 26 deletions(-) - -commit 71ec4c7a6715a40d536d1e4b911dae48d1bba7b9 -Author: Pino Toscano <pino@kde.org> -Date: Sun Oct 17 14:57:43 2010 +0200 - - [CMake] update MacroOptionalFindPackage.cmake from KDE SVN - - no radical changes, just a minor improvement for the "explicitly - disabled" case - - cmake/modules/MacroOptionalFindPackage.cmake | 40 - +++++++++++++++++++++------- - 1 file changed, 30 insertions(+), 10 deletions(-) - -commit ab0049d8be5dfe1989c4aa33c2732915c62fecb2 -Author: Pino Toscano <pino@kde.org> -Date: Sun Oct 17 14:29:22 2010 +0200 - - [CMake] Cairo package: make the version check really working - - cmake/modules/FindCairo.cmake | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -commit 1cea33717c92631ee9c417d9f89e32b03695c75a -Author: Pino Toscano <pino@kde.org> -Date: Sun Oct 17 13:55:58 2010 +0200 - - [CMake] Bump cairo dependency to 1.10 - - followup of fc9b85894754d175af916eaf6cb127efd601df7e - - CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit d6f49aa2da15cd2e9cf775d6b1d2d04a005c8cdd -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Oct 17 14:22:57 2010 +0200 - - [cairo] Fix a crash when redering documents with invalid type 3 fonts - - poppler/CairoFontEngine.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit e2fad550c3cbf86541730582151e1bb6470ed9c1 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Oct 17 13:47:33 2010 +0200 - - [glib-demo] Use poppler_page_get_selected_region() in selections demo - - glib/demo/selections.c | 73 - +++++++++++++++----------------------------------- - 1 file changed, 22 insertions(+), 51 deletions(-) - -commit 88013458e141de58ed801480707ae0dfe92b9aa2 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Oct 17 13:46:26 2010 +0200 - - [glib] Add poppler_page_get_selected_region() - - that returns a cairo_region_t, and deprecate - poppler_page_get_selection_region(). - - glib/poppler-page.cc | 81 - +++++++++++++++++++++++++++++++++++++ - glib/poppler-page.h | 4 ++ - glib/reference/poppler-sections.txt | 1 + - 3 files changed, 86 insertions(+) - -commit fc9b85894754d175af916eaf6cb127efd601df7e -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Oct 17 12:54:18 2010 +0200 - - [configure] Bump cairo dependency to 1.10 - - configure.ac | 2 +- - poppler/CairoOutputDev.cc | 4 ---- - 2 files changed, 1 insertion(+), 5 deletions(-) - -commit dd14ef6b211ac1c8a4f16bb6094dbfd6a09cbef9 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Oct 17 12:46:55 2010 +0100 - - Improve dict lookup speed for big dicts - - Based on a patch by Paweł Wiejacha <pawel.wiejacha@gmail.com> - - poppler/Dict.cc | 98 - +++++++++++++++++++++++++++++++++++++++++++++------------ - poppler/Dict.h | 2 ++ - 2 files changed, 80 insertions(+), 20 deletions(-) - -commit bb38a0c71434413f2728109c73278de1b8a58571 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Oct 17 12:52:01 2010 +0200 - - [glib-demo] Make glib demo program installable - - It's a useful tool for testing and debugging not only for people who - install from sources. - - glib/demo/Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit d26d0fab2ddfff853f6681a3518813a2d65a4112 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Oct 17 12:36:46 2010 +0200 - - [glib-demo] Use printing options in print demo - - glib/demo/print.c | 96 - +++++++++++++++++++++++++++++++++++++++++++++++++++++-- - 1 file changed, 93 insertions(+), 3 deletions(-) - -commit 4a71dcdd350d0c0515ca349f0b875b33289d25ee -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Oct 17 12:31:41 2010 +0200 - - [glib] Add poppler_page_render_for_printing_with_options() - - It allows to print with the same options acroread has: - - - Print document - - Print document and markup - - Print document and stamps - - glib/poppler-page.cc | 77 - ++++++++++++++++++++++++++++++++----- - glib/poppler-page.h | 3 ++ - glib/poppler.h | 19 +++++++++ - glib/reference/poppler-sections.txt | 4 ++ - 4 files changed, 94 insertions(+), 9 deletions(-) - -commit 0b3b2ebc3930bd46fb13fb2158fc695b0962f7c5 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Oct 16 15:09:05 2010 +0100 - - Add a callback to know which page has been printed - - qt4/src/poppler-ps-converter.cc | 16 ++++++++++++++-- - qt4/src/poppler-qt4.h | 10 ++++++++++ - 2 files changed, 24 insertions(+), 2 deletions(-) - -commit 4bd25223c4d15dfa91965a6e86eaa444a5a81f71 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Oct 16 15:08:05 2010 +0100 - - Do not omit this character - - Mimics Cairo backend and Adode Reader behaviour - - splash/SplashFTFont.cc | 4 ---- - 1 file changed, 4 deletions(-) - -commit b604a008a2a379a21e5fdfa0799886f80d893a08 -Author: Christian Feuersänger <cfeuersaenger@googlemail.com> -Date: Thu Oct 14 23:56:36 2010 +0100 - - Improve rendering of Shading Type 6 and 7 - - poppler/Gfx.cc | 214 - +++++++++++++++++++++++++++++++++++++++++----------- - poppler/Gfx.h | 9 ++- - poppler/GfxState.cc | 96 ++++++++++++++++++++++- - poppler/GfxState.h | 127 ++++++++++++++++++++++++++++++- - 4 files changed, 398 insertions(+), 48 deletions(-) - -commit c6bb63b31c268e4e842532e6839b15edb31cf25c -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Oct 14 23:33:13 2010 +0100 - - Only clip boxes to mediabox if we are at the page level - - Fixes bug 30784 - - poppler/Page.cc | 19 +++++++++++-------- - 1 file changed, 11 insertions(+), 8 deletions(-) - -commit 4a248b3f523209ec16ace587229412653b2276d0 -Author: Pino Toscano <pino@kde.org> -Date: Thu Oct 14 18:32:05 2010 +0200 - - [cpp] make it compile also when there are no image formats available - - including the ImgWirter.h is enough to get the definition of ImgWriter - - cpp/poppler-image.cpp | 1 + - 1 file changed, 1 insertion(+) - -commit de1501d87549269f9214c9e3fba4cbf39960826e -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Oct 13 19:18:36 2010 +0100 - - remove windows eol - - poppler/Gfx.cc | 38 +++++++++++++++++++------------------- - 1 file changed, 19 insertions(+), 19 deletions(-) - -commit 12e68b49feef10b654944dd71eab0852cfeceb89 -Author: Pino Toscano <pino@kde.org> -Date: Sun Oct 10 23:04:57 2010 +0200 - - [cpp] Add a new 'image' class. - - This implicitely shared class represents the data buffer of an - "image", - with direct access to the data. - It also has a function to save to file (png/jpeg). - - Still a FIXME in the copy() method and in the save() (for mono - images only). - - cpp/CMakeLists.txt | 2 + - cpp/Makefile.am | 3 + - cpp/poppler-image-private.h | 48 +++++ - cpp/poppler-image.cpp | 431 - ++++++++++++++++++++++++++++++++++++++++++++ - cpp/poppler-image.h | 70 +++++++ - 5 files changed, 554 insertions(+) - -commit db31687ba476e272b72625a8a78b50780522ee7d -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Oct 9 10:33:06 2010 +0200 - - [glib] docs: Document poppler_annot_markup_get_date() - - glib/poppler-annot.cc | 9 +++++++++ - 1 file changed, 9 insertions(+) - -commit a7cf8d322a4a687c9810a577cc92ff6b9725ecdc -Author: Fernando Herrera <fherrera@onirica.com> -Date: Thu Oct 7 17:28:31 2010 +0200 - - [glib] Fix introspection annotations for poppler_document_get_page*() - - Return value should be transfer full since the caller owns the only - reference. - - glib/poppler-document.cc | 6 ++---- - 1 file changed, 2 insertions(+), 4 deletions(-) - -commit d690bea929553d1a4392d42d949843e9467ba8cb -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Oct 5 22:18:22 2010 +0100 - - Make sure obj is a num before reading it - - Not sure if using a 0 is correct otherwise, but if your matrix is - broken you're probably going to get a wrong rendering anyway, so who - cares. Bug #30590 - - poppler/Gfx.cc | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -commit b17be2bc32cf71bac0473bf4ac16359e3027b4fc -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Oct 3 12:14:11 2010 +0200 - - [annots] Fix a crash when drawing square/circle annots without - a border - - Fixes bug #30580 - - poppler/Annot.cc | 121 - ++++++++++++++++++++++++++++--------------------------- - 1 file changed, 61 insertions(+), 60 deletions(-) - -commit e3d3944c1988343704e3ba3a5d60609719466afb -Author: Tomas Hoger <thoger@redhat.com> -Date: Wed Sep 29 20:03:45 2010 +0100 - - Fix uninitialized uses on DCTScanInfo - - poppler/Stream.cc | 3 +++ - 1 file changed, 3 insertions(+) - -commit f380647f09d88339c936184bbe86c70c0d47de4b -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Sep 29 20:02:10 2010 +0100 - - Free names - - poppler/Catalog.cc | 1 + - 1 file changed, 1 insertion(+) - -commit aa0fd32a8501473832bce1b8b804dd3f9a45735b -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Sep 27 22:39:09 2010 +0100 - - Consider render value when colorizing text - - Fixes bug 2807 - - poppler/CairoOutputDev.cc | 18 +++--------------- - poppler/CairoOutputDev.h | 2 -- - poppler/Gfx.cc | 21 +++++++++++++++++---- - poppler/PSOutputDev.cc | 26 ++++++++++---------------- - poppler/PSOutputDev.h | 3 +-- - poppler/SplashOutputDev.cc | 18 +++--------------- - poppler/SplashOutputDev.h | 4 +--- - 7 files changed, 35 insertions(+), 57 deletions(-) - -commit cf710b999b510203e9348ea9f04360be1fe957b8 -Author: Pino Toscano <pino@kde.org> -Date: Fri Sep 24 00:50:37 2010 +0200 - - [Qt4] enable the generation of the QCH file - - ... usable in Qt Assistant - - qt4/src/Doxyfile | 14 +++++++------- - 1 file changed, 7 insertions(+), 7 deletions(-) - -commit be6d933071c9ab043f01f374a884472c4ce3007e -Author: Pino Toscano <pino@kde.org> -Date: Thu Sep 23 15:55:45 2010 +0200 - - update Doxyfile's for qt4 and cpp - - no changes in the actual configuration values - - cpp/Doxyfile | 155 ++++-- - qt4/src/Doxyfile | 1469 - +++++++++++++++++++++++++++++++++--------------------- - 2 files changed, 1018 insertions(+), 606 deletions(-) - -commit 721da3d542ab9b234b058f3c14ea9303d748107e -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Sep 23 14:09:11 2010 +0200 - - [glib] Use g_memdup instead of g_strdup in poppler_document_get_id() - - Ids are not null-terminated strings, but fixed size byte arrays. - - glib/demo/info.cc | 8 ++++++-- - glib/poppler-document.cc | 33 ++++++++++++++------------------- - 2 files changed, 20 insertions(+), 21 deletions(-) - -commit 4ffc0ed73397e4e58f04c3577b093a3fd39c22bd -Author: Pino Toscano <pino@kde.org> -Date: Thu Sep 23 02:21:12 2010 +0200 - - [cpp] small clarification in document::load_from_data() apidox - - cpp/poppler-document.cpp | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 9491dc4a10706109d0f2b4d15f21b9a1db51d8c9 -Author: Pino Toscano <pino@kde.org> -Date: Thu Sep 23 02:18:07 2010 +0200 - - [cpp] add document::load_from_raw_data() - - ... to be able to load a document from an external data buffer, - with no need to copy the data. - - add as well a new document_private constructor to handle the new - situation, - and make sure to properly use the raw data when unlocking the document - - cpp/poppler-document-private.h | 5 ++++ - cpp/poppler-document.cpp | 53 - ++++++++++++++++++++++++++++++++++++++++++ - cpp/poppler-document.h | 4 ++++ - 3 files changed, 62 insertions(+) - -commit a3c1f2d5ea1de969e9aaaa84ee38866938b4ce0c -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Sep 22 20:14:27 2010 +0100 - - fix copyright - - poppler/Form.cc | 1 + - poppler/Form.h | 1 + - 2 files changed, 2 insertions(+) - -commit 1aad013e353a9e59bdab8a1b4ce93f2ad7aaf4f2 -Author: Pino Toscano <pino@kde.org> -Date: Wed Sep 22 17:07:38 2010 +0200 - - update copyrights - - cpp/poppler-document.h | 2 +- - cpp/poppler-page-transition.cpp | 2 +- - cpp/poppler-private.cpp | 2 +- - cpp/poppler-rectangle.cpp | 2 +- - 4 files changed, 4 insertions(+), 4 deletions(-) - -commit 2d6d66ebe0215df66e33cb5974c58c324fab50b6 -Author: Pino Toscano <pino@kde.org> -Date: Wed Sep 22 17:07:13 2010 +0200 - - [cpp/tests] poppler-dump: show the PDF IDs, if available - - cpp/tests/poppler-dump.cpp | 6 ++++++ - 1 file changed, 6 insertions(+) - -commit e39fde1b62544b90e73a2fc3609a260991db3a47 -Author: Pino Toscano <pino@kde.org> -Date: Wed Sep 22 16:52:08 2010 +0200 - - [cpp] add document::get_pdf_id() - - ... to get the IDs of a PDF document, if present. - - cpp/poppler-document.cpp | 29 +++++++++++++++++++++++++++++ - cpp/poppler-document.h | 1 + - 2 files changed, 30 insertions(+) - -commit 299a1849a148fa0a7b3171c45ec68b9901aa93bb -Author: Pino Toscano <pino@kde.org> -Date: Wed Sep 22 16:36:30 2010 +0200 - - [Qt4] add Document::getPdfId() - - ... to get the IDs of a PDF document, if present. - - also, add two test cases for it in the metadata unit test - - qt4/src/poppler-document.cc | 16 ++++++++++++++ - qt4/src/poppler-qt4.h | 14 +++++++++++++ - qt4/tests/check_metadata.cpp | 50 - ++++++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 80 insertions(+) - -commit dd9bcdb720ac1bf8a022635bcbb3b56e4b75bb15 -Author: Pino Toscano <pino@kde.org> -Date: Wed Sep 22 16:29:46 2010 +0200 - - Make the internal get_id() not fail because of null bytes in the ID. - - Passing the const char* of the byte string to convert is not enough - if its length must be checked, - as it might fail when the string of the ID contains null bytes. - Instead, pass the original GooString so its size is properly checked. - - Also, remove an hardcoded 16 and make it dependent on pdfIdLength, - as used elsewhere in get_id() function. - - poppler/PDFDoc.cc | 11 ++++++----- - 1 file changed, 6 insertions(+), 5 deletions(-) - -commit 9554cbc3cb4fc0cd7ad2295f5d27a18e030c6aee -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Wed Sep 22 12:54:25 2010 +0200 - - [glib-demo] Show form field names in forms demo - - glib/demo/forms.c | 26 ++++++++++++++++++++------ - 1 file changed, 20 insertions(+), 6 deletions(-) - -commit 257634b26b682628dba5ee5f94cb0bad030bcb4f -Author: Mark Riedesel <mark@klowner.com> -Date: Wed Sep 22 12:52:49 2010 +0200 - - [glib] Add methods to get mapping, partial an fully qualified form - field names - - See bug #28780. - - glib/poppler-form-field.cc | 68 - +++++++++++++++++++++++++++++++++++++ - glib/poppler-form-field.h | 3 ++ - glib/reference/poppler-sections.txt | 3 ++ - 3 files changed, 74 insertions(+) - -commit 6db98abc59c154dcb18d69fc37e44ce804c3ccc9 -Author: Mark Riedesel <mark@klowner.com> -Date: Wed Sep 22 12:41:16 2010 +0200 - - Add getLabel method to FormWidget - - See bug #28780. - - poppler/Form.cc | 64 - +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - poppler/Form.h | 8 ++++++++ - 2 files changed, 72 insertions(+) - -commit bcdca66fd57439735e0b9aa182ab7cfce29e9ed0 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Sep 21 11:49:37 2010 +0200 - - [glib] Fix minimum value of creation and modification date properties - - It should be -1 which means there's no date specified - - glib/poppler-document.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit d2578bd66129466b2dd114b6407c147598e09d2b -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Sep 21 19:19:27 2010 +0100 - - Avoid loops in Form::fieldLookup - - Fixes crash in broken pdf provided by Joel Voss of Leviathan - Security Group - - poppler/Dict.h | 3 +++ - poppler/Form.cc | 27 ++++++++++++++++++++++++--- - 2 files changed, 27 insertions(+), 3 deletions(-) - -commit 2fe825deac055be82b220d0127169cb3d61387a8 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Sep 21 19:15:25 2010 +0100 - - Make sure obj1 is a num before reading it - - Fixes crash in broken pdf provided by Joel Voss of Leviathan - Security Group - - poppler/Gfx.cc | 20 ++++++++++++++++---- - 1 file changed, 16 insertions(+), 4 deletions(-) - -commit 473de6f88a055bb03470b4af5fa584be8cb5fda4 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Sep 21 19:11:42 2010 +0100 - - Fix memory leak if obj2 is not a dict - - Found thanks to PDF provided by Joel Voss of Leviathan Security Group - - poppler/Form.cc | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -commit 9706e28657ff7ea52aa69d9efb3f91d0cfaee70b -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Sep 21 19:09:37 2010 +0100 - - Fix crash when idx is out of range - - Found thanks to PDF provided by Joel Voss of Leviathan Security Group - - poppler/Function.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 26a5817ffec9f05ac63db6c5cd5b1f0871d271c7 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Sep 21 19:08:54 2010 +0100 - - Fix crash when idx is out of range - - Fixes crash in broken pdf provided by Joel Voss of Leviathan - Security Group - - poppler/Function.cc | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -commit dfdf3602bde47d1be7788a44722c258bfa0c6d6e -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Sep 21 19:07:12 2010 +0100 - - Give a value to color.c[i] - - Might not be the better solution but it's better than having a random - value there - - Found thanks to PDF provided by Joel Voss of Leviathan Security Group - - poppler/Gfx.cc | 8 ++++++++ - 1 file changed, 8 insertions(+) - -commit 01c85c08305bae16242f5979ab107fa5bb5f5100 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Sep 21 19:04:37 2010 +0100 - - Forgot my (C) here - - poppler/Decrypt.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit bf2055088a3a2d3bb3d3c37d464954ec1a25771f -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Sep 21 19:03:19 2010 +0100 - - Properly initialize stack - - Fixes crash in broken pdf provided by Joel Voss of Leviathan - Security Group - - poppler/Function.cc | 1 + - 1 file changed, 1 insertion(+) - -commit e853106b58d6b4b0467dbd6436c9bb1cfbd372cf -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Sep 21 19:01:36 2010 +0100 - - Properly initialize parser - - Fixes crash in broken pdf provided by Joel Voss of Leviathan - Security Group - - poppler/Gfx.cc | 2 ++ - 1 file changed, 2 insertions(+) - -commit 3422638b2a39cbdd33a114a7d7debc0a5f688501 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Sep 21 18:58:43 2010 +0100 - - Fix crash in broken pdf (parser->getStream() is 0) - - Found thanks to PDF provided by Joel Voss of Leviathan Security Group - - poppler/Gfx.cc | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -commit a2dab0238a69240dad08eca2083110b52ce488b7 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Sep 21 18:55:51 2010 +0100 - - Initialize properly charactersRead - - It is possible that there are calls to getPos before reset - Found thanks to PDF provided by Joel Voss of Leviathan Security Group - - poppler/Decrypt.cc | 2 ++ - 1 file changed, 2 insertions(+) - -commit 39d140bfc0b8239bdd96d6a55842034ae5c05473 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Sep 21 18:54:31 2010 +0100 - - Fix crash in broken pdf (code < 0) - - Found thanks to PDF provided by Joel Voss of Leviathan Security Group - - fofi/FoFiType1.cc | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -commit c6a091512745771894b54a71613fd6b5ca1adcb3 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Sep 21 18:50:25 2010 +0100 - - Fix memory leak - - Found thanks to PDF provided by Joel Voss of Leviathan Security Group - - poppler/Stream.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 9b6ddb68b80ef19cd2615900bd24da76374003d9 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Sep 20 19:47:47 2010 +0100 - - Fix copyright - - poppler/PDFDoc.cc | 1 + - poppler/PDFDoc.h | 1 + - 2 files changed, 2 insertions(+) - -commit fa3abc23656204eedd022ee1c73d9e5af758cdac -Author: Pino Toscano <pino@kde.org> -Date: Fri Sep 17 22:20:09 2010 +0200 - - [cpp] More bits of API documentation. - - cpp/poppler-global.cpp | 124 - ++++++++++++++++++++++++++++++++++++++++ - cpp/poppler-page-transition.cpp | 32 +++++++++++ - cpp/poppler-rectangle.cpp | 19 ++++++ - 3 files changed, 175 insertions(+) - -commit c5f7b5becc9993c05b67a470d5a1e431806b98d6 -Author: Pino Toscano <pino@kde.org> -Date: Fri Sep 17 20:26:37 2010 +0200 - - update copyrights - - qt4/src/poppler-private.cc | 2 +- - qt4/tests/check_strings.cpp | 18 ++++++++++++++++++ - 2 files changed, 19 insertions(+), 1 deletion(-) - -commit ae517042570327b860c1db6b68f9697d5c104657 -Author: Pino Toscano <pino@kde.org> -Date: Fri Sep 17 19:39:10 2010 +0200 - - [cpp] improve a bit the Unicode* -> ustring conversion - - (although IMHO not yet solved) - - cpp/poppler-private.cpp | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -commit f4c6ef88f01f6763943a3e6e006e52dbea0b149c -Author: Pino Toscano <pino@kde.org> -Date: Fri Sep 17 16:07:05 2010 +0200 - - [Qt4/tests] check_strings: add a new test case for - QStringToUnicodeGooString - - not much test data at the moment though - - qt4/tests/check_strings.cpp | 37 +++++++++++++++++++++++++++++++++++++ - 1 file changed, 37 insertions(+) - -commit ffd227b7669895325d752009d5185973cf86ce5b -Author: Pino Toscano <pino@kde.org> -Date: Fri Sep 17 14:25:57 2010 +0200 - - [Qt4] optimize UnicodeParsedString using less memory from QString - - - reserve() the right number of chars in the result string, so there - is less possibility to make it gr - ow its buffer - - do not call unicodeToQString() just to create a 1 character string, - but directly append a QChar crea - ted with the resulting unicode value (always belonging to the BMP) - - this should reduce of a very little bit the memory usage, while give - a sensible speedup of UnicodeParsedString invocations - - qt4/src/poppler-private.cc | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -commit 6180890008f2b1814f092f50b8f75376399905ba -Author: Pino Toscano <pino@kde.org> -Date: Fri Sep 17 13:23:25 2010 +0200 - - [Qt4/tests] check_strings: add a test case for UnicodeParsedString - - very simple test data for it, at the moment - - qt4/tests/check_strings.cpp | 48 - +++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 48 insertions(+) - -commit c5f78d7d3953d62a746c6f5a90085ea020fe5ec7 -Author: Pino Toscano <pino@kde.org> -Date: Fri Sep 17 12:54:32 2010 +0200 - - [Qt4/tests] check_string: use a pool of GooString - - this way we can reuse the GooString in a data set even after a test - run (eg in benchmarks), - making sure they all are properly freed - - qt4/tests/check_strings.cpp | 35 ++++++++++++++++++++++++++++++----- - 1 file changed, 30 insertions(+), 5 deletions(-) - -commit 0cd5a256bdf7778c0c720941a611ad8ab56fa2e9 -Author: Pino Toscano <pino@kde.org> -Date: Fri Sep 17 00:27:53 2010 +0200 - - [Qt4/tests] first version of a unit test for strings - - this is used for testing the various string conversions: - - unicodeToQString - - UnicodeParsedString - - QStringToUnicodeGooString - - QStringToGooString - the 1st and the 4th have basic tests - - given private symbols are used, this unit test is not compiled on - windows (at least, it supposed to be so) - - qt4/tests/CMakeLists.txt | 3 ++ - qt4/tests/Makefile.am | 7 ++- - qt4/tests/check_strings.cpp | 101 - ++++++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 110 insertions(+), 1 deletion(-) - -commit c6e8b21c9829672e6ca42e6cdc0ca631a06af73f -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri Sep 17 13:44:38 2010 +0200 - - [glib] docs: Document PopplerDocument properties - - glib/poppler-document.cc | 380 - +++++++++++++++++++++++++++-------------------- - 1 file changed, 223 insertions(+), 157 deletions(-) - -commit d4a6c17255821925906c17b79b88eebed9edfee1 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri Sep 17 13:04:33 2010 +0200 - - [glib] Add accessor for all PopplerDocument properties - - PopplerDocument:linearized is now a boolean value rather than string, - so this commit breaks the API again. - - glib/demo/info.cc | 8 +- - glib/poppler-document.cc | 532 - +++++++++++++++++++++++++++++------- - glib/poppler-document.h | 74 +++-- - glib/reference/poppler-sections.txt | 16 ++ - 4 files changed, 498 insertions(+), 132 deletions(-) - -commit a5fec843dbb40fdd2007b926405b96789b21496d -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri Sep 17 10:38:14 2010 +0200 - - [glib-demo] Show permanent/update ID in document info demo - - glib/demo/info.cc | 9 +++++++++ - 1 file changed, 9 insertions(+) - -commit bfaf8f3cc62f28c6255d42680b9464ab9973737e -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri Sep 17 10:37:32 2010 +0200 - - [glib] Add poppler_document_get_id() to get the PDF file identifier - - glib/poppler-document.cc | 52 - +++++++++++++++++++++++++++++++++++++ - glib/poppler-document.h | 3 +++ - glib/reference/poppler-sections.txt | 1 + - 3 files changed, 56 insertions(+) - -commit b15641677447b2e89853a667fc34bcca1383a97a -Author: srinivas adicherla <srinivas.adicherla@gmail.com> -Date: Fri Sep 17 10:36:22 2010 +0200 - - Add a method to get the PDF file identifier - - poppler/PDFDoc.cc | 65 - +++++++++++++++++++++++++++++++++++++++++++++++++++++++ - poppler/PDFDoc.h | 3 +++ - 2 files changed, 68 insertions(+) - -commit 3b4a901a4431814590449b6cd5ea418f4d6c1172 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Sep 16 23:23:03 2010 +0100 - - Add -s option - - Writes a single html file - Since git does not allow multiple authors i'm adding them here - OSSD CDAC Mumbai by Leena Chourey (leenac@cdacmumbai.in) and Onkar - Potdar (onkar@cdacmumbai.in) - - utils/HtmlFonts.cc | 11 +++++-- - utils/HtmlFonts.h | 18 +++++++++-- - utils/HtmlOutputDev.cc | 84 - +++++++++++++++++++++++++++++++------------------- - utils/pdftohtml.1 | 3 ++ - utils/pdftohtml.cc | 15 +++++++-- - 5 files changed, 93 insertions(+), 38 deletions(-) - -commit 2792330f6caeeb42e2996271456b562489215c4c -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Sep 15 22:42:09 2010 +0100 - - new soversions - - CMakeLists.txt | 2 +- - cpp/CMakeLists.txt | 2 +- - cpp/Makefile.am | 2 +- - glib/CMakeLists.txt | 2 +- - glib/Makefile.am | 4 ++-- - poppler/Makefile.am | 2 +- - qt4/src/CMakeLists.txt | 2 +- - qt4/src/Makefile.am | 2 +- - 8 files changed, 9 insertions(+), 9 deletions(-) - -commit 1cf56c732b63d0a310bc45b8e4b3f3f357a42cb1 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Sep 15 20:56:42 2010 +0100 - - 0.15.0 in the versions - - CMakeLists.txt | 2 +- - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - qt4/src/Doxyfile | 2 +- - 4 files changed, 4 insertions(+), 4 deletions(-) - -commit 4ec0be498b557c3cf631e43823c6d7004304dff3 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Sep 15 20:56:34 2010 +0100 - - 0.15.0 NEWS - - NEWS | 90 - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 90 insertions(+) - -commit c01a17745c04aef3e6f2225679c867a03e731e83 -Author: Pino Toscano <pino@kde.org> -Date: Thu Sep 16 20:55:56 2010 +0200 - - [CMake] disable the GObject introspection system - - it cannot complete the scanning propecure correctly without libtool - it seems - - CMakeLists.txt | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 9be7d3143b12f291409f88f3d725a239934b205e -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Sep 15 19:19:30 2010 +0100 - - update copyright - - poppler/OptionalContent.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit b9333529bba43a71655fdbf1919ba515f7df9ca3 -Author: Pino Toscano <pino@kde.org> -Date: Wed Sep 15 17:23:54 2010 +0200 - - [cpp/tests] poppler-dump: convert out_ustring() to an - operator<<(std::ostream&) - - so we have a chance to better output the bytearray of a string to - the stream - - cpp/tests/poppler-dump.cpp | 26 ++++++++++++++++++-------- - 1 file changed, 18 insertions(+), 8 deletions(-) - -commit a44f711b4412332875337e9fb7509f18db806ddc -Author: Pino Toscano <pino@kde.org> -Date: Wed Sep 15 16:44:30 2010 +0200 - - [cpp/tests] poppler-dump: add a "--show-text <physical|raw>" option - - ... to show the text of a page in the specified layout - - cpp/tests/poppler-dump.cpp | 29 +++++++++++++++++++++++++++++ - 1 file changed, 29 insertions(+) - -commit 0094c9372b5b439af2564d83d6fb7439f4bdba88 -Author: Pino Toscano <pino@kde.org> -Date: Wed Sep 15 13:19:13 2010 +0200 - - [cpp] add a new page::text() for specifying a layout mode - - add a new text_layout_enum enum for the layout mode, used by the - new text() - make the old text() implementation call the new one with the old value - (= physical) - add & adapt the apidox accordingly - - cpp/poppler-page.cpp | 27 +++++++++++++++++++++++++-- - cpp/poppler-page.h | 5 +++++ - 2 files changed, 30 insertions(+), 2 deletions(-) - -commit 4ec3e7784cdba5c0720b1992ba500e97a7e0ed2b -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Wed Sep 15 11:24:07 2010 +0200 - - Set initial state of optional content groups based on BaseState field - - There's a test case using BaseState attached to bug #30106 - - poppler/OptionalContent.cc | 14 +++++++++----- - 1 file changed, 9 insertions(+), 5 deletions(-) - -commit f49aa86812ed8ad91d41c675bc670b3d88d3444a -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Sep 13 14:37:10 2010 +0200 - - [glib] doc: Document PopplerPage:label property - - glib/poppler-page.cc | 5 +++++ - 1 file changed, 5 insertions(+) - -commit f41fe7ae6e374100574c49d1bb7a3ddc646786c8 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Sep 13 14:36:43 2010 +0200 - - [glib] doc: Add poppler_page_get_label to poppler-sections.txt - - glib/reference/poppler-sections.txt | 1 + - 1 file changed, 1 insertion(+) - -commit 91b8246766a8e5d9cca385b5854667d7967a9d71 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Sep 13 14:22:56 2010 +0200 - - [glib-demo] Use poppler_page_get_label() instead of g_object_get() - - glib/demo/page.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit b82412ef86091f4d249c818cebf00e4c59bae311 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Sep 13 14:22:03 2010 +0200 - - [glib] Add poppler_page_get_label() - - It's just an accessor for the property label - - glib/poppler-page.cc | 47 ++++++++++++++++++++++++++++++++++------------- - glib/poppler-page.h | 1 + - 2 files changed, 35 insertions(+), 13 deletions(-) - -commit ff88abf61f4bf90ad276a8593be1818d39c8ecac -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Sep 13 10:05:45 2010 +0200 - - [glib] Avoid core headers to be parsed by the g-i scanner - - glib/poppler-document.cc | 2 ++ - glib/poppler-page.cc | 2 ++ - glib/poppler-private.h | 3 +++ - 3 files changed, 7 insertions(+) - -commit 53324502898ae5fbbb21a4fb819e4a84acdc1a64 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Sep 12 11:42:03 2010 +0200 - - [glib] Fix a crash when building layer actions - - Some layers are just the parent of others, but not actually a layer so - they don't have an optional content object. Fixes bug #30106. - - glib/poppler-action.cc | 15 +++++++++------ - 1 file changed, 9 insertions(+), 6 deletions(-) - -commit dfc6ea7877635212aa7c5f7ade07af4aa9467e96 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Sep 12 11:36:58 2010 +0200 - - [glib] Fix layers array generation when it contains multiple arrays - - Fixes layers for document attached to bug #30106. - - glib/poppler-document.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 7574912b6c0ff0421c69b6e8c6835957d5126d7d -Author: Jonathan Liu <net147@gmail.com> -Date: Thu Sep 9 20:34:03 2010 +0100 - - Fix checking whether _WIN32 is defined - - Bug 29329 - - poppler/StdinCachedFile.cc | 2 +- - utils/pdftoppm.cc | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit 2fc83068c32e09fa3de03a157a420490431ea706 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Sep 5 14:26:27 2010 +0100 - - Increase the number of cached glyphs for small sizes - - Should not increase memory usage much and gives me a 17% speed - increase - in the firefox nytimes advertisment pdf - - splash/SplashFont.cc | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -commit 0d96f74f31171c58a55e4ac36d492ce36dd5e7c5 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Sep 5 12:31:57 2010 +0100 - - Use std::sort instead of qsort - - Gives a nice speed improvement without any real code change - Passes regression tests - Based on Paweł Wiejacha patches - - poppler/GfxFont.cc | 17 +++++++--------- - splash/SplashXPath.cc | 48 - ++++++++++++++++++++++++++++---------------- - splash/SplashXPathScanner.cc | 10 +++++---- - 3 files changed, 44 insertions(+), 31 deletions(-) - -commit 3b4816b2b8caa0e2baafbe4c0eb1e45e452d01ce -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Sep 1 20:43:35 2010 +0100 - - forgot the file - - qt4/tests/poppler-texts.cpp | 40 ++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 40 insertions(+) - -commit b0db93c71a83946aa3e02bae6b396223dcca19d1 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Sep 1 20:43:14 2010 +0100 - - add since and rename enum - - qt4/src/poppler-page.cc | 2 +- - qt4/src/poppler-qt4.h | 5 ++++- - 2 files changed, 5 insertions(+), 2 deletions(-) - -commit a86f9d90be99a36c41c6932fb4d9a202c4ff6d05 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Sep 1 20:20:48 2010 +0100 - - Clarify the ownership - - qt4/src/poppler-qt4.h | 2 ++ - 1 file changed, 2 insertions(+) - -commit 33ad3a17ac26879fcd6a7fad2023dd219bc5919f -Author: Suzuki Toshiya <mpsuzuki@hiroshima-u.ac.jp> -Date: Wed Sep 1 20:19:54 2010 +0100 - - Add a way to access the raw text - - poppler/TextOutputDev.cc | 23 ++++++++++++++++++++--- - qt4/src/poppler-page.cc | 11 +++++++++-- - qt4/src/poppler-qt4.h | 19 +++++++++++++++++++ - qt4/tests/CMakeLists.txt | 1 + - qt4/tests/Makefile.am | 7 ++++++- - 5 files changed, 55 insertions(+), 6 deletions(-) - -commit 46e89248b3c5b1789baa3bd9bfa012570720ddb5 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Sep 1 19:54:02 2010 +0100 - - quadding is not a GBool but an int - - poppler/Annot.cc | 2 +- - poppler/Annot.h | 4 ++-- - 2 files changed, 3 insertions(+), 3 deletions(-) - -commit ae79fc504c5424be2fa21dbc5498ced4db6e5dd3 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Aug 31 22:14:57 2010 +0100 - - Make GBool a bool instead of an int - - Passes the regression tests and might make things faster and use a bit - less memory - - cpp/tests/CMakeLists.txt | 2 +- - cpp/tests/Makefile.am | 2 +- - goo/gtypes.h | 7 ++++--- - utils/CMakeLists.txt | 2 +- - utils/Makefile.am | 2 +- - utils/{parseargs.c => parseargs.cc} | 0 - 6 files changed, 8 insertions(+), 7 deletions(-) - -commit d3f32f2c4f9f46620c0287c44bef686f340461f3 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Aug 31 18:51:17 2010 +0100 - - Read from the correct variable - - Fixes crash on KDE bug 249586 - - poppler/Movie.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 681bb38eafc720b309172ed7c650439c559663a0 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Aug 26 23:55:58 2010 +0100 - - Make declaration match what there is in the .cc file - - poppler/TextOutputDev.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit c91e869304fc263c52f21ee484a57a6f1900f6b2 -Author: Suzuki Toshiya <mpsuzuki@hiroshima-u.ac.jp> -Date: Thu Aug 26 19:40:46 2010 +0100 - - Add -r option to pdftohtml - - Fixes bug 29551 - - utils/pdftohtml.1 | 3 +++ - utils/pdftohtml.cc | 18 +++++++++++++----- - 2 files changed, 16 insertions(+), 5 deletions(-) - -commit 9b4be586640b4ad344b1b3ed4c9cda8351257f0c -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Aug 25 19:26:30 2010 +0100 - - Use 3 not nComps - - poppler/GfxState.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 218f67c527fb41babf2703ba068d072f8326e37b -Author: Paweł Wiejacha <pawel.wiejacha@gmail.com> -Date: Tue Aug 24 23:47:06 2010 +0100 - - Make SplashOutputDev::imageSrc faster - - By using getRGBLine when possible - - poppler/SplashOutputDev.cc | 39 ++++++++++++++++++++++++++++++--------- - 1 file changed, 30 insertions(+), 9 deletions(-) - -commit 868f4a1f22051b7978f47a0614f23fd66dbb7ca8 -Author: Paweł Wiejacha <pawel.wiejacha@gmail.com> -Date: Tue Aug 24 23:35:21 2010 +0100 - - Make GfxICCBasedColorSpace::getRGBLine faster - - By calling doTransform less - - poppler/GfxState.cc | 15 +++++++-------- - poppler/GfxState.h | 4 +++- - 2 files changed, 10 insertions(+), 9 deletions(-) - -commit 46e37c54c6365cf37dc1e223a3c146e7b96a56af -Author: Paweł Wiejacha <pawel.wiejacha@gmail.com> -Date: Tue Aug 24 21:23:34 2010 +0100 - - Do not call pow three times when one is enough - - poppler/GfxState.cc | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -commit 8591c804598576556c6d24a66b6648de8ed1c4eb -Author: Mike Slegeir <tehpola@yahoo.com> -Date: Sun Aug 22 22:01:03 2010 +0100 - - Use splash instead of external gs invocation to render the background - - Patch in bug 19404, should fix 9746 too - - utils/pdftohtml.1 | 8 +- - utils/pdftohtml.cc | 210 - ++++++++++++++++++++++++++++++++++++++--------------- - 2 files changed, 158 insertions(+), 60 deletions(-) - -commit 7fc3c21a8c5d6cf8517100427b182887a9569ed0 -Author: Ilya Gorenbein <igorenbein@finjan.com> -Date: Fri Aug 20 20:24:31 2010 +0100 - - Fix failure to parse PDF with damaged internal structure - - Patch in bug 29189, fixes bug 3870 - - poppler/PDFDoc.cc | 24 +++++++++++++---- - poppler/XRef.cc | 80 - ++++++++++++++++++++++++++++++++----------------------- - poppler/XRef.h | 5 ++-- - 3 files changed, 68 insertions(+), 41 deletions(-) - -commit bedf48d4397ae412a6d28fc8fea16cc23a29f07c -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Aug 17 22:02:59 2010 +0100 - - use memset instead of a for - - splash/Splash.cc | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -commit 03ca5b4a5c9964d9c0e9913eb2061692848c4b95 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Aug 10 19:55:31 2010 +0100 - - Update copyrights - - goo/GooTimer.cc | 1 + - goo/GooTimer.h | 1 + - goo/gfile.cc | 2 +- - poppler/DCTStream.cc | 1 + - poppler/DCTStream.h | 1 + - poppler/GfxState.cc | 2 +- - poppler/Page.cc | 2 +- - qt4/src/poppler-annotation.cc | 2 +- - 8 files changed, 8 insertions(+), 4 deletions(-) - -commit 3bca8ddc10bf4291bf0c0e39c67341a05953e949 -Author: Jonathan Liu <net147@gmail.com> -Date: Tue Aug 10 19:42:40 2010 +0100 - - Tell windows we are writing/reading binary data - - Bug #29329 - - poppler/StdinCachedFile.cc | 9 +++++++++ - utils/pdftoppm.cc | 9 +++++++++ - 2 files changed, 18 insertions(+) - -commit bdd617f2177a7836f6b6686fde892664513a32a7 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Aug 3 13:05:26 2010 +0200 - - [glib] Fix a crash when a layer doesn't have a name - - Fixes bug #28842. - - glib/poppler-layer.cc | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -commit e9f0646ca664cc27825f7e084f8419fe0de1fcfc -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Aug 3 13:02:52 2010 +0200 - - Catalog page array might contain NULL for some pages in invalid - documents - - Fixes a crash reproducible with gtk-splash-test when opening document - attached to bug #28842. - - poppler/PDFDoc.cc | 27 +++++++++++++++------------ - 1 file changed, 15 insertions(+), 12 deletions(-) - -commit 842209782ca3ba8c1c783cccf565372a18b3fda5 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Jul 30 19:29:12 2010 +0100 - - Do not crash when using pdftops in some files - - Fixes crash in file in kde bug 246269. The output is still wrong - though - - fofi/FoFiType1C.cc | 12 +++++++----- - 1 file changed, 7 insertions(+), 5 deletions(-) - -commit 0dd7c80b7baf2622eb4780a867c4dc6291773f3b -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Jul 26 23:58:26 2010 +0100 - - Do not overwrite the rgb values - - Recommended by Koji Otani in Re: [poppler] Question about code - Passed the regression testing in my files - - poppler/GfxState.cc | 1 - - 1 file changed, 1 deletion(-) - -commit 627edf88c8f5c073a68bd05990df56e1af547292 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Jul 25 13:56:03 2010 +0200 - - [annots] Fix a crash when adding a new annotation and annots object - is an array - - When annots object is an array instead of a ref, the modified - object is - actually de page object. - - poppler/Page.cc | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -commit 5d86f9b600b1e10de93bcaf1b925fadbc2a47522 -Author: mpsuzuki <mpsuzuki@hiroshima-u.ac.jp> -Date: Sat Jul 24 15:12:05 2010 +0100 - - reindent correctly - - poppler/TextOutputDev.cc | 34 +++++++++++++++++----------------- - 1 file changed, 17 insertions(+), 17 deletions(-) - -commit d0a6f9abdab88ec43004b6766337db304cbf6a25 -Author: Pino Toscano <pino@kde.org> -Date: Thu Jul 22 21:28:55 2010 +0200 - - [CMake] improve the way include dirs and cflags for gdk and gtk - are set - - correctly include_directories() for the include dirs, while add the - cflags which are not include dirs as definitions - - glib/CMakeLists.txt | 5 +++-- - glib/demo/CMakeLists.txt | 5 ++++- - 2 files changed, 7 insertions(+), 3 deletions(-) - -commit 02d85dd2cc154dbb6caa04a349532033d833edd1 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Jul 20 13:53:56 2010 +0200 - - [glib-demo] Add support for adding annots in annot demo - - glib/demo/annots.c | 114 - +++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 114 insertions(+) - -commit 969cb850f5c2bc31de82c591b2b3210b5cfabf5f -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Jul 20 13:53:29 2010 +0200 - - [glib] docs: Add new symbols to poppler-sections.txt - - glib/reference/poppler-sections.txt | 18 ++++++++++++++++++ - 1 file changed, 18 insertions(+) - -commit 251959438b6257fe71ed58e79eec60cda68a66cf -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Jul 20 13:53:00 2010 +0200 - - [glib] Add poppler_page_add_annot() - - glib/poppler-document.cc | 7 ++++--- - glib/poppler-page.cc | 19 +++++++++++++++++++ - glib/poppler-page.h | 2 ++ - 3 files changed, 25 insertions(+), 3 deletions(-) - -commit 78a4f6976e708f2cc23aac49fbff0faf00e74bc3 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Jul 20 13:51:16 2010 +0200 - - [glib] annots: Add several setter methods - - glib/poppler-annot.cc | 278 - ++++++++++++++++++++++++++++++++++++++++++++----- - glib/poppler-annot.h | 26 +++++ - glib/poppler-private.h | 6 ++ - 3 files changed, 285 insertions(+), 25 deletions(-) - -commit fee488c9db60ab691ce9ff5eef284be2af897aee -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Jul 18 11:26:59 2010 +0200 - - [annots] Add AnnotMarkup::setOpacity - - poppler/Annot.cc | 8 ++++++++ - poppler/Annot.h | 1 + - 2 files changed, 9 insertions(+) - -commit d15a355ede2d8510c4df847ea0b92b5357b29914 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Jul 18 09:57:35 2010 +0200 - - Set the page reference (P in annot dict) when adding a new annot to - a page - - poppler/Annot.cc | 9 +++++++++ - poppler/Annot.h | 3 +++ - poppler/Page.cc | 2 ++ - 3 files changed, 14 insertions(+) - -commit 49ffb46db3118db874d2d9830bb034762d625c61 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Jul 19 16:31:54 2010 +0100 - - Remove exception support - - We don't use it and don't even support it properly - - CMakeLists.txt | 1 - - config.h.cmake | 3 --- - configure.ac | 4 --- - goo/gmem.cc | 56 - ++++++++++++------------------------------ - goo/gmem.h | 38 +++++++++------------------- - poppler/poppler-config.h.cmake | 5 ---- - poppler/poppler-config.h.in | 5 ---- - 7 files changed, 27 insertions(+), 85 deletions(-) - -commit dd2e9399868e3dbf2fa4ede050f8d74d29ebbbb4 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Jul 19 16:31:43 2010 +0100 - - add uninstalled.pc to ignore - - .gitignore | 7 +++++++ - 1 file changed, 7 insertions(+) - -commit d1033006aae381a0f075e02d54638a1af997caf3 -Author: Pino Toscano <pino@kde.org> -Date: Sat Jul 17 21:46:14 2010 +0200 - - add FindGObjectIntrospection.cmake and - GObjectIntrospectionMacros.cmake to the dist - - Makefile.am | 2 ++ - 1 file changed, 2 insertions(+) - -commit ce8d03950736cc35d035a44a7d88e5f2a9defa74 -Author: Pino Toscano <pino@kde.org> -Date: Sat Jul 17 21:39:08 2010 +0200 - - [CMake/glib] add support for gobject-introspection - - other than a module to find (using pkg-config) gobject-introspection, - this adds a macro (gir_add_introspections) to add new introspections - in a directory. - its working is much similar (even the variable names used) to - the Makefile version provided by gobject-repository itself, with - the notable difference of a disabled libtool in the g-ir-scanner - invocation. - the only additional step needed is adding two custom targets, compiled - by ALL, which have the gir and the typelib files as dependencies, - to make them build with the usual `make all'. - - CMakeLists.txt | 5 +- - cmake/modules/FindGObjectIntrospection.cmake | 61 +++++++++++++++++ - cmake/modules/GObjectIntrospectionMacros.cmake | 94 - ++++++++++++++++++++++++++ - glib/CMakeLists.txt | 36 ++++++++++ - 4 files changed, 194 insertions(+), 2 deletions(-) - -commit 78bf43d8e11aa52db9862af118c597e117d31083 -Author: Pino Toscano <pino@kde.org> -Date: Sat Jul 17 20:28:58 2010 +0200 - - [CMake] properly use the glib2 include dirs - - properly use GLIB2_INCLUDE_DIRS (pkg-config result) for the glib - include dirs, - while turn GLIB2_CFLAGS into GLIB2_CFLAGS_OTHERS to add the remaining - CFLAGS as definitions - - glib/CMakeLists.txt | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 6f3082d677bc62aa3f8124132e3e337c01be2629 -Author: Pino Toscano <pino@kde.org> -Date: Sat Jul 17 19:28:09 2010 +0200 - - [CMake] split the generated sources of poppler_glib_SRCS in an own - poppler_glib_generated_SRCS - - glib/CMakeLists.txt | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -commit 2a252dd9b05857bbd10dee235e873886fc74ec17 -Author: Pino Toscano <pino@kde.org> -Date: Sat Jul 17 14:57:38 2010 +0200 - - [CMake] add stub message and TODO for the gobject-introspection - support - - CMakeLists.txt | 3 +++ - 1 file changed, 3 insertions(+) - -commit 8a3d1794a8ef5d525bb454755fec018e3fcb3816 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Jul 16 14:00:32 2010 +0100 - - update - - TODO | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 31ac578942b82cbd16b064abca586ccb89dfa7ce -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Jul 15 15:05:10 2010 +0200 - - Rework ChangeLog generation to fix make distcheck - - Makefile.am | 22 +++++++++++++++++++--- - 1 file changed, 19 insertions(+), 3 deletions(-) - -commit 5da5825ecab63089a19aac694826271019a94e6d -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Jul 15 15:03:20 2010 +0200 - - [glib] docs: Add version.xml to content_files var - - glib/reference/Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit fe69b474ae63c9d5d2538db9e51e666dd6ea9fb3 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Jul 15 10:51:21 2010 +0100 - - Fix padding of names - - The previous method returned 2 for documents with 100 pages, which - is wrong as 100 needs 3 - characters, not 2 - - utils/pdftoppm.cc | 14 +++++++++++++- - 1 file changed, 13 insertions(+), 1 deletion(-) - -commit e265ae2d8a46df00ab1bbd863f01f652068d265f -Author: Brian Cameron <brian.cameron@oracle.com> -Date: Wed Jul 14 20:26:25 2010 +0100 - - Add uninstalled .pc file for poppler when using autoconf - - Makefile.am | 9 ++++++++- - configure.ac | 9 ++++++++- - poppler-cairo-uninstalled.pc.in | 6 ++++++ - poppler-cpp-uninstalled.pc.in | 7 +++++++ - poppler-glib-uninstalled.pc.in | 7 +++++++ - poppler-qt-uninstalled.pc.in | 7 +++++++ - poppler-qt4-uninstalled.pc.in | 7 +++++++ - poppler-splash-uninstalled.pc.in | 7 +++++++ - poppler-uninstalled.pc.in | 6 ++++++ - 9 files changed, 63 insertions(+), 2 deletions(-) - -commit 552ab99e60fe4068be8e4e415924e4be289e47cd -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Jul 13 10:18:01 2010 +0200 - - Handle ColorTransform in DCT streams when using libjpeg - - Fixes bug #28873. - - poppler/DCTStream.cc | 30 ++++++++++++++++++++++++++++++ - poppler/DCTStream.h | 1 + - 2 files changed, 31 insertions(+) - -commit 8a6697f89625106f3c373dbc7b4dc521e22502f7 -Author: Hib Eris <hib@hiberis.nl> -Date: Sat Jul 3 16:42:04 2010 +0200 - - Only define findModifier() when used - - Prevents a warning when building with win32 font backend. - - poppler/GlobalParams.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit b1fdb87a4ebb5079c731256cce1870de8c54c65d -Author: Hib Eris <hib@hiberis.nl> -Date: Fri Jul 2 10:53:20 2010 +0200 - - Fix compile warnings on auto imports for mingw compiler - - cpp/Makefile.am | 2 +- - cpp/tests/Makefile.am | 2 ++ - glib/Makefile.am | 2 ++ - poppler/Makefile.am | 2 +- - qt4/demos/Makefile.am | 2 ++ - qt4/src/Makefile.am | 2 +- - qt4/tests/Makefile.am | 2 ++ - 7 files changed, 11 insertions(+), 3 deletions(-) - -commit 9e577110134eb1e093e697b7504efca759000086 -Author: Hib Eris <hib@hiberis.nl> -Date: Fri Jul 2 10:51:24 2010 +0200 - - Check for declaration of gettimeofday() - - The function gettimeofday() is not declared in ansi mode with the - mingw compiler, even though the function exists. Therefore, - configure must - not only check with AC_CHECK_FUNC, but also with AC_CHECK_DECL. - - Also, the checks must run in a C++ context because that is where - gettimeofday() is used. - - configure.ac | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -commit 58c8430ac584f3ba5e97aceb148e6287bfc45f95 -Author: Hib Eris <hib@hiberis.nl> -Date: Wed Jun 30 15:06:44 2010 +0200 - - Set -ansi compiler flag early in configure.ac - - The -ansi compiler flag does not enable warnings, but turns of certain - features of GCC. To force feature tests to use this flag, it should be - set early in configure.ac - - This is important for the mingw compiler where header files refrain - from declaring certain function (e.g. gettimeofday()) when the -ansi - flag is set. - - configure.ac | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -commit e3663a855a9c86f0a3988a7a50fa40d37d0ea069 -Author: Hib Eris <hib@hiberis.nl> -Date: Fri Jul 2 14:45:15 2010 +0200 - - Use MAX_PATH instead of _MAX_PATH everywhere - - _MAX_PATH is compiler specific and not availble with the mingw - compiler - in ansi mode. MAX_PATH is in the Windows api and thus always available - when windows.h is included. - - goo/gfile.cc | 4 ++-- - poppler/GlobalParams.cc | 2 +- - poppler/PDFDoc.cc | 4 ++-- - 3 files changed, 5 insertions(+), 5 deletions(-) - -commit 7227c407d23a37f5d95e6c01cb7411be2f82ca85 -Author: Hib Eris <hib@hiberis.nl> -Date: Wed Jun 30 16:15:06 2010 +0200 - - Check for _WIN32 instead of _MSC_VER - - goo/GooTimer.cc | 6 +++--- - goo/GooTimer.h | 4 ++-- - 2 files changed, 5 insertions(+), 5 deletions(-) - -commit 34e727e011529be312313a1f4d4fa1ba9c545888 -Author: Hib Eris <hib@hiberis.nl> -Date: Tue Jun 29 16:43:31 2010 +0200 - - Fix cross compiling for Windows with autotools - - When cross compiling for Windows with autotools, libtool creates - libpoppler_qt4_la-poppler-optcontent.lo instead of - poppler-optcontent.lo. Thus, explicitly using poppler-optcontent.lo to - create poppler-optcontent.moc does not work well. - - qt4/src/Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 1bc2f4501ea4e56ca99ae4d94d6cf34cf33c2c7a -Author: Hib Eris <hib@hiberis.nl> -Date: Tue Jun 29 15:34:22 2010 +0200 - - define poppler_qt4_EXPORTS when building with autotools - - Lets you build the qt4 bindings for Windows with automake/autoconf. - - qt4/src/Makefile.am | 3 +++ - 1 file changed, 3 insertions(+) - -commit 5825114a26cc6eece2e556063f640dda53ea1e11 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Jul 11 12:24:20 2010 +0100 - - Compile++ - - glib/demo/CMakeLists.txt | 1 + - 1 file changed, 1 insertion(+) - -commit 5e4d8eeea0b9dba68420c164975418c76a53be85 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Jul 10 15:54:28 2010 +0200 - - [pdf-inspector] Do not render for printing - - test/pdf-inspector.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit e6824972a213a888ca0185b7ae0a75fc23f75797 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Jul 10 15:52:15 2010 +0200 - - [annots] Use a transparency group for markup annots without AP and - opacity != 1 - - Fixes bug #623616. - - poppler/Annot.cc | 346 - +++++++++++++++++++++++++------------------------------ - poppler/Annot.h | 3 + - poppler/Gfx.cc | 9 +- - poppler/Gfx.h | 2 +- - 4 files changed, 165 insertions(+), 195 deletions(-) - -commit 70ce0b6ea1a0d61f5048d2ae49c639d74a643b29 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri Jul 9 17:04:00 2010 +0200 - - [annots] Clamp QuadPoints coords to annot rectangle instead of - ignore points - - Fixes appearance stream generation for document attached to bug - #623616. - - poppler/Annot.cc | 38 +++++++++++++++++++++----------------- - 1 file changed, 21 insertions(+), 17 deletions(-) - -commit 8a9e561bfe64f71e9f38c43e5c6be7e5069b2349 -Author: Hib Eris <hib@hiberis.nl> -Date: Fri Jul 2 21:07:53 2010 +0200 - - Nicer autogen.sh output - - autogen.sh | 1 + - 1 file changed, 1 insertion(+) - -commit ce4d328294cea73f4b7368691dc1fed6bd45d569 -Author: Hib Eris <hib@hiberis.nl> -Date: Fri Jul 2 20:51:47 2010 +0200 - - Add option for autogen.sh to skip configure - - If you do not want to automatically run configure when calling - autogen.sh, run it with: - - $ NOCONFIGURE=1 ./autogen.sh - - This feature is modeled after gnome-autogen.sh behaviour. - - autogen.sh | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -commit d7ee87c5d0a35c8d4fcc88bde4b8496c49f397c6 -Author: Hib Eris <hib@hiberis.nl> -Date: Tue Jul 6 15:16:08 2010 +0100 - - warnings-=2 - - poppler/GfxFont.cc | 3 ++- - utils/HtmlOutputDev.cc | 3 ++- - 2 files changed, 4 insertions(+), 2 deletions(-) - -commit 1e7f457ca1617fd8c958feef8dd7e694476dedd9 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri Jul 9 12:29:14 2010 +0200 - - [cairo] Use ceil to convert double to int in tilingPatternFill() - - Fixes rendering of page 2 of document attached to bug #28954. - - poppler/CairoOutputDev.cc | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -commit 91a7605eb51144f2e7dea69aa9454fff47c49bd2 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri Jul 9 11:42:56 2010 +0200 - - [glib] Fix build when GDK is enabled - - glib/test-poppler-glib.cc | 8 +------- - 1 file changed, 1 insertion(+), 7 deletions(-) - -commit 09e3e0e9c5134688c4ed2af5cd3a12aa2986474c -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Jul 8 18:56:38 2010 +0200 - - [glib] Fix poppler_page_find_tex() when called more than once - - Fixes bug #27927 - - glib/poppler-page.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 25427bdecb219ffe6f0592d2ac36de60c247bfd9 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Jul 8 17:46:22 2010 +0200 - - Fix build when compiling without glib frontend - - configure.ac | 1 + - 1 file changed, 1 insertion(+) - -commit 550684731356a66753ec19f5a8ca4b572db6d2d5 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Jul 8 17:16:02 2010 +0200 - - [glib-demo] Add selections demo - - glib/demo/Makefile.am | 2 + - glib/demo/main.c | 4 +- - glib/demo/selections.c | 687 - +++++++++++++++++++++++++++++++++++++++++++++++++ - glib/demo/selections.h | 31 +++ - 4 files changed, 723 insertions(+), 1 deletion(-) - -commit b257428150e2c13dcc24fd8f75e4ee2c679ab414 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Jul 8 14:45:29 2010 +0200 - - [glib] Add poppler_page_get_selected_text() - - And change poppler_page_get_text() to return the text of the whole - page. For consistency with poppler_page_get_selection_region() - get_seletect_text() doesn't invert the y coords as get_text() - did. This - change breaks the API. Users of poppler_page_get_text should: - - - Use the new poppler_page_get_text() if they want the text of the - whole page - - - Use poppler_page_get_selected_text() if they want the text of the - selected area. In this case they shouldn't invert the y coords - anymore - before calling the method. - - glib/demo/text.c | 9 +------- - glib/poppler-page.cc | 43 - +++++++++++++++++++++++++++---------- - glib/poppler-page.h | 3 ++- - glib/reference/poppler-sections.txt | 1 + - 4 files changed, 36 insertions(+), 20 deletions(-) - -commit bedc88225c948ad1288b69c6c106adce36233442 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Wed Jul 7 11:55:47 2010 +0200 - - [cairo] Fix warning on signed/unsigned comparison - - poppler/CairoFontEngine.cc | 12 ++++++------ - poppler/CairoFontEngine.h | 8 ++++---- - 2 files changed, 10 insertions(+), 10 deletions(-) - -commit 092aa901b9ec35a48bc1fb229ad16a3b00eef5f2 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Jul 5 11:16:49 2010 +0200 - - [glib] docs: add some more introspection annotations - - glib/poppler-attachment.cc | 4 ++-- - glib/poppler-document.cc | 12 ++++++------ - glib/poppler-media.cc | 4 ++-- - glib/poppler-page.cc | 4 ++-- - 4 files changed, 12 insertions(+), 12 deletions(-) - -commit 6c4e14fd90d5ef2d6670a980ab2476b6fab58df7 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Jul 5 10:49:59 2010 +0200 - - [glib] docs: fix POPPLER_CHECK_VERSION() docs - - glib/poppler-features.h.in | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -commit ed324a867ecf1f616c4b2dc575f01d5cf1b67c38 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri Jul 2 18:28:45 2010 +0200 - - [glib] Rename instrospection files as 0.16 instead of 0.14 - - glib/Makefile.am | 14 +++++++------- - 1 file changed, 7 insertions(+), 7 deletions(-) - -commit a55f567ff1ea0858eda13a024ed765a016f3bff0 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri Jul 2 18:23:03 2010 +0200 - - [glib] docs: Remove unneeded empty line in doc comment - - glib/poppler-features.h.in | 1 - - 1 file changed, 1 deletion(-) - -commit f16015303422280eaa21c3144eca0f1a330dce8a -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri Jul 2 18:19:13 2010 +0200 - - [glib] docs: Add GObject introspection annotations - - glib/poppler-annot.cc | 45 - ++++++++++++++++++++-------------------- - glib/poppler-document.cc | 8 +++---- - glib/poppler-page.cc | 23 +++++++++++++------- - glib/reference/poppler-docs.sgml | 2 ++ - 4 files changed, 43 insertions(+), 35 deletions(-) - -commit 60242038e4dce7f0c90f2bfa0e771120247dbc9d -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Wed Jun 30 09:35:29 2010 +0200 - - [glib] Add GObject introspection support - - configure.ac | 5 +++ - glib/Makefile.am | 29 +++++++++++++++++ - m4/introspection.m4 | 94 - +++++++++++++++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 128 insertions(+) - -commit 3160950a7d7161457405c9084c31af230329b3f0 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri Jul 2 12:47:04 2010 +0200 - - [glib] docs: Add index of deprecated symbols - - glib/reference/poppler-docs.sgml | 4 ++++ - 1 file changed, 4 insertions(+) - -commit 593db7acf6edce1267f69d12310bf4098ff24c97 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri Jul 2 12:44:39 2010 +0200 - - [glib] docs: deprecate GDK API - - glib/poppler-page.cc | 8 ++++++++ - 1 file changed, 8 insertions(+) - -commit 6facefb3fa8f97a9d330545308fb2d89c7f57fa0 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Jul 1 18:01:45 2010 +0200 - - [glib] docs: Add index of new symbols for versions 0.12, 0.14 and 0.16 - - glib/poppler-action.h | 10 +++++++--- - glib/poppler-annot.cc | 17 +++++++++++++++++ - glib/poppler-date.cc | 2 ++ - glib/poppler-document.cc | 16 +++++++++++++++- - glib/poppler-layer.cc | 12 ++++++++++++ - glib/poppler-media.cc | 14 ++++++++++++-- - glib/poppler-media.h | 3 +++ - glib/poppler-movie.cc | 6 ++++++ - glib/poppler-page.cc | 2 ++ - glib/reference/poppler-docs.sgml | 12 ++++++++++++ - 10 files changed, 88 insertions(+), 6 deletions(-) - -commit 166b78c0ce8a4536873c4f60b392c24c8a68e7aa -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Jul 1 17:25:03 2010 +0200 - - [glib] docs: document PopplerMediaSaveFunc - - glib/poppler-media.h | 18 +++++++++++++++++- - 1 file changed, 17 insertions(+), 1 deletion(-) - -commit 5cc0a51f88580c65ac2d5c6ff02b8cf14697b70c -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Jul 1 17:20:13 2010 +0200 - - [glib] Use the same name for parameter in function prototype - - glib/poppler-media.h | 10 +++++----- - glib/poppler-movie.h | 6 +++--- - 2 files changed, 8 insertions(+), 8 deletions(-) - -commit 6793fd8fd2d33d3d58c6556b5dbe6d0497e56646 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Jul 1 15:49:49 2010 +0200 - - [glib] docs: document some enums in poppler-action - - glib/poppler-action.h | 92 - +++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 92 insertions(+) - -commit 8e139696dbe19f54ad54364a711b929146f11080 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Jul 1 15:02:58 2010 +0200 - - [glib] docs: mark structures in poppler-private.h as private - - glib/poppler-private.h | 7 +++++++ - 1 file changed, 7 insertions(+) - -commit ccae7e574047d66c638003cc36fa1edeef4d35ed -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Jul 1 14:59:50 2010 +0200 - - [glib] docs: document PopplerDocument enums - - glib/poppler-document.h | 65 - +++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 65 insertions(+) - -commit 4fbff172693c38cdc4ae8070a55ceb706aa213cd -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Jul 1 14:26:53 2010 +0200 - - [glib] docs: document PopplerFontInfo - - glib/poppler-document.cc | 106 - +++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 106 insertions(+) - -commit 465dd4897ff603a6fd96503cf4746fc808b0f827 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Jul 1 12:59:39 2010 +0200 - - [glib] docs: document some enums - - glib/poppler.h | 55 - +++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 55 insertions(+) - -commit de3d599ea9e948867cfe395f42ed659670110c4c -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Jul 1 12:31:10 2010 +0200 - - [glib] docs: document boxed types defined in poppler-page - - glib/poppler-page.cc | 147 - +++++++++++++++++++++++++++++++++++++++++++++++++++ - glib/poppler-page.h | 79 +++++++++++++++++++++++++++ - 2 files changed, 226 insertions(+) - -commit 34c52190e1dbf4d3effa44b4408faa1fbae0d12d -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Jul 1 09:33:08 2010 +0200 - - [glib] Remove splash header file - - glib/poppler-page.cc | 1 - - 1 file changed, 1 deletion(-) - -commit 6910545a487f206ccd059bb295d2312228dbf2ba -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Wed Jun 30 19:03:04 2010 +0200 - - [glib] docs: Remove invalid symbol from poppler-sections.txt - - glib/reference/poppler-sections.txt | 1 - - 1 file changed, 1 deletion(-) - -commit 65ea3b636cb5a38660e526a483a4d95f5acdf8db -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Wed Jun 30 19:02:32 2010 +0200 - - [glib] docs: fix typo - - glib/poppler-form-field.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 689bfec40b5b3030c2819cb4aac42c3ab6279278 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Wed Jun 30 19:01:47 2010 +0200 - - [glib] docs: Add missing doc for parameter - - glib/poppler-document.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 0b3d77627f255a4bf3da6ee875ad8d9eb931c96e -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Wed Jun 30 19:00:59 2010 +0200 - - [glib] Use the same name for parameter in function prototype - - glib/poppler-page.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 19e1944c00ac2da6b18b015721fc3a8d1898a23a -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Wed Jun 30 18:01:52 2010 +0200 - - [glib] docs: Add media and movie to docs - - glib/poppler-media.cc | 6 ++++++ - glib/poppler-movie.cc | 6 ++++++ - glib/reference/poppler-docs.sgml | 3 ++- - 3 files changed, 14 insertions(+), 1 deletion(-) - -commit ca48bee07e6b4a20ea7b40b472a335e75feb4739 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Wed Jun 30 17:56:50 2010 +0200 - - [glib] docs: Add missing types to poppler.types - - glib/reference/poppler.types | 4 ++++ - 1 file changed, 4 insertions(+) - -commit 613ccf81317a007ed5017ee788466613a6699bb5 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Wed Jun 30 17:54:22 2010 +0200 - - [glib] docs: rework poppler-sections.txt - - - Better organization of sections and contents - - Use of Standard and Private subsections - - Add missing sections - - Remove enums section - - glib/reference/poppler-sections.txt | 424 - +++++++++++++++++++++++++----------- - 1 file changed, 295 insertions(+), 129 deletions(-) - -commit b37556a32b79f8711ed7eca24abf19511872a70a -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Wed Jun 30 12:01:44 2010 +0200 - - [glib] docs: Add index of symbols - - glib/reference/poppler-docs.sgml | 5 +++++ - 1 file changed, 5 insertions(+) - -commit 7f5fa4e19b4e324a396d64261b9125c1a557ac84 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Wed Jun 30 12:00:35 2010 +0200 - - [glib] docs: Add version information - - configure.ac | 1 + - glib/reference/Makefile.am | 2 +- - glib/reference/poppler-docs.sgml | 7 ++++++- - glib/reference/version.xml.in | 1 + - 4 files changed, 9 insertions(+), 2 deletions(-) - -commit 848d5e158fa9eadd19a658db314ba3fff9d026e8 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Wed Jun 30 11:30:41 2010 +0200 - - [glib] docs: do not use gtk-doc templates - - configure.ac | 2 +- - glib/poppler-action.cc | 6 + - glib/poppler-annot.cc | 6 + - glib/poppler-attachment.cc | 6 + - glib/poppler-attachment.h | 16 + - glib/poppler-document.cc | 8 + - glib/poppler-features.h.in | 59 ++++ - glib/poppler-form-field.cc | 6 + - glib/poppler-layer.cc | 6 + - glib/poppler-page.cc | 6 + - glib/reference/tmpl/poppler-action.sgml | 216 ------------ - glib/reference/tmpl/poppler-annot.sgml | 377 --------------------- - glib/reference/tmpl/poppler-attachment.sgml | 68 ---- - glib/reference/tmpl/poppler-document.sgml | 410 - ----------------------- - glib/reference/tmpl/poppler-enums.sgml | 246 -------------- - glib/reference/tmpl/poppler-features.sgml | 83 ----- - glib/reference/tmpl/poppler-form-field.sgml | 318 ------------------ - glib/reference/tmpl/poppler-layer.sgml | 83 ----- - glib/reference/tmpl/poppler-page.sgml | 483 - --------------------------- - glib/reference/tmpl/poppler-private.sgml | 148 -------- - glib/reference/tmpl/poppler-unused.sgml | 8 - - glib/reference/tmpl/poppler.sgml | 285 ---------------- - glib/reference/tmpl/stamp-poppler-enums.sgml | 22 -- - gtk-doc.make | 78 +++-- - m4/gtk-doc.m4 | 2 +- - 25 files changed, 171 insertions(+), 2777 deletions(-) - -commit 16e15ac845206217086e2adac9f220e75c0c630d -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Jun 29 21:44:02 2010 +0100 - - bitmap can be null at this stage, check it isn't - - poppler/JBIG2Stream.cc | 3 +++ - 1 file changed, 3 insertions(+) - -commit 38e5d28a184d0ca8df71a7ea910ce85d7a225e4e -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Jun 21 20:38:00 2010 +0100 - - more pow 0.5 -> sqrt - - poppler/GfxState.cc | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -commit 58a53ca0a4e8434e8478f8fe121067dcf05c017d -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Jun 21 19:24:20 2010 +0100 - - sqrt is much faster than pow 0.5 - - poppler/GfxState.cc | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit bf86a9fc464aca57ebec207a213dcc2cc6031940 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Jun 21 19:20:47 2010 +0100 - - introduce getChars to save some method calls - - Can give us a decent speedup when we go a lot though this methods - - poppler/Catalog.cc | 12 +---- - poppler/DCTStream.cc | 51 ++++++++++++++------ - poppler/DCTStream.h | 3 ++ - poppler/GfxFont.cc | 22 ++------- - poppler/GfxState.cc | 30 ++++-------- - poppler/JPEG2000Stream.cc | 67 +++++++------------------- - poppler/JPEG2000Stream.h | 38 ++++++++++++++- - poppler/Link.cc | 14 ++---- - poppler/Object.h | 4 ++ - poppler/Stream.cc | 90 +++++++++++++++++++---------------- - poppler/Stream.h | 118 - +++++++++++++++++++++++++++++++++++++++++++++- - 11 files changed, 279 insertions(+), 170 deletions(-) - -commit 65c14073a3b1035ca5fe3bd6667abd315272841e -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Jun 21 17:19:22 2010 +0200 - - Reduce pow operations in GfxCalRGBColorSpace::getXYZ() - - We were doing the same pow operation 3 times!. It makes document - attached to bug #28591 render a little faster. - - poppler/GfxState.cc | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -commit 9365c05c1f66b3000febf32c45cef2ffe79e041a -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Jun 19 10:36:39 2010 +0200 - - [glib] Fix links/annots area for rotated documents with page CropBox - not starting at 0,0 - - Fixes bug #28588. - - glib/poppler-page.cc | 25 ++++++++++--------------- - 1 file changed, 10 insertions(+), 15 deletions(-) - -commit d9504c0a288c84b68a516f715505d6bc94b911f5 -Author: Pino Toscano <pino@kde.org> -Date: Fri Jun 18 23:59:04 2010 +0200 - - [autotools] link the 'cpp' tests against libpoppler as well - - ... this way gatof() can be found correctly - should fix bug #28605 - - cpp/tests/Makefile.am | 1 + - 1 file changed, 1 insertion(+) - -commit 62975737bcaa6e0a2ecab981aa3e0c8f2ff10571 -Author: Brian Cameron <brian.cameron@oracle.com> -Date: Fri Jun 18 19:22:17 2010 +0100 - - Compile with Sun Studio - - goo/ImgWriter.h | 3 ++- - goo/JpegWriter.h | 3 ++- - poppler/SplashOutputDev.cc | 6 ++++++ - 3 files changed, 10 insertions(+), 2 deletions(-) - -commit 7cbe3d1521aea8b484efb8663e75684e05b6fb61 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Jun 17 23:01:21 2010 +0100 - - Optimize Splash::compositeBackground - - Optimization takes into account the two most common cases, the - pixel not - being painted at all (alpha == 0) meaning we just copy the paperColor - and the pixel being opage meaning we have to do nothing - - splash/Splash.cc | 34 ++++++++++++++++++++++++++-------- - 1 file changed, 26 insertions(+), 8 deletions(-) - -commit f323e5e4cdcc20075ee7c722f7adc088c0772249 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Jun 17 22:59:37 2010 +0100 - - Check the objects are num before reading them - - Might have caused the kde bug #241995 - - poppler/GfxState.cc | 11 +++++++---- - 1 file changed, 7 insertions(+), 4 deletions(-) - -commit 35e87d2062b1d82db0d765de5a6187122a0fa99c -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Wed Jun 16 11:52:25 2010 +0200 - - [gib-demo] Add demo for poppler_page_get_text_layout() - - glib/demo/text.c | 182 - +++++++++++++++++++++++++++++++++++++++++++++++++------ - 1 file changed, 164 insertions(+), 18 deletions(-) - -commit ddcea568b3a7334e062d6214f43d0a2c2ec95be4 -Author: Daniel Garcia <danigm@yaco.es> -Date: Tue Jun 15 16:57:32 2010 +0200 - - [glib] Add poppler_page_get_text_layout() - - Returns an array of PopplerRectangle items and each Rectangle is a - text character position. - - The position in this array represent the offset in text returned by - poppler_page_get_text - - glib/poppler-page.cc | 91 - ++++++++++++++++++++++++++++++++++++++++++++++++++++ - glib/poppler-page.h | 4 ++- - 2 files changed, 94 insertions(+), 1 deletion(-) - -commit 6e9fe8832c37b560ac4d0b0e32d618bde70ee117 -Author: Pino Toscano <pino@kde.org> -Date: Wed Jun 16 00:22:59 2010 +0200 - - [Qt4] and support 'Print' named action here too... - - qt4/src/poppler-annotation.cc | 2 ++ - 1 file changed, 2 insertions(+) - -commit 53c003f36af5d77f50fe238eaec4c5f7c3a485c7 -Author: Pino Toscano <pino@kde.org> -Date: Wed Jun 16 00:18:13 2010 +0200 - - [CMake] install the new goo/GooLikely.h - - CMakeLists.txt | 1 + - 1 file changed, 1 insertion(+) - -commit 2ba752aabc8dad4bb35a351697b1590795c54ca4 -Author: Pino Toscano <pino@kde.org> -Date: Wed Jun 16 00:06:30 2010 +0200 - - update copyrights - - qt4/src/poppler-link.h | 3 ++- - qt4/src/poppler-page.cc | 1 + - 2 files changed, 3 insertions(+), 1 deletion(-) - -commit 38bf54bbad40288be763c6a1a89d90477c9ef89d -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Jun 15 23:05:43 2010 +0100 - - move the declaration of likely/unlikely to an own file in goo/ - - goo/GooLikely.h | 22 ++++++++++++++++++++++ - goo/Makefile.am | 1 + - poppler/Object.h | 9 +-------- - splash/Splash.cc | 4 +--- - 4 files changed, 25 insertions(+), 11 deletions(-) - -commit 9838edf8c7497858e3bac2743784a3259f61cfdd -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Jun 15 22:54:34 2010 +0100 - - Protect us against negative y coordinates - - Happens very rarely, like in bug 28480 - - splash/Splash.cc | 6 ++++++ - 1 file changed, 6 insertions(+) - -commit 8b32c3e9826d4462fd9d16fab4200ebb23251046 -Author: Pino Toscano <pino@kde.org> -Date: Tue Jun 15 23:55:01 2010 +0200 - - [Qt4/apidox] ok, now the *proper* version for 'Print'... - - qt4/src/poppler-link.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit b54e5ac49f69bd1c906e517edcb436e042199cd5 -Author: Pino Toscano <pino@kde.org> -Date: Tue Jun 15 23:53:50 2010 +0200 - - [Qt4/apidox] add the proper version for the new 'Print' - - qt4/src/poppler-link.h | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 71ad18c3b6b73e23d71600d07ce00bdfaf0bef60 -Author: Pino Toscano <pino@kde.org> -Date: Tue Jun 15 23:51:01 2010 +0200 - - [Qt4] recognize the 'Print' named action here too - - qt4/src/poppler-annotation.cc | 3 +++ - 1 file changed, 3 insertions(+) - -commit 96f60f2748ba76de0d296a9838dbd7181f506e36 -Author: Guillermo Amaral <gamaral@kdab.com> -Date: Tue Jun 15 23:47:46 2010 +0200 - - [Qt4] recognize 'Print' as name in named actions - - qt4/src/poppler-link.h | 3 ++- - qt4/src/poppler-page.cc | 2 ++ - 2 files changed, 4 insertions(+), 1 deletion(-) - -commit 25494311c5b8eb88d43df420ec91a1aedad20d05 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Jun 15 17:44:23 2010 +0200 - - [glib] Add some G_UNLIKELY() - - glib/poppler-document.cc | 12 ++++++------ - glib/poppler-page.cc | 17 ++++++++++------- - 2 files changed, 16 insertions(+), 13 deletions(-) - -commit 52f133fb962256edb577b7f639c5c13221c6365d -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Jun 15 14:20:49 2010 +0200 - - [glib] Use g_slice for actions and destinations - - glib/poppler-action.cc | 21 +++++++++------------ - 1 file changed, 9 insertions(+), 12 deletions(-) - -commit f035c94d8b5b34c0c3bb47b8cfc2f9c720a4fc71 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Jun 15 14:01:07 2010 +0200 - - [glib] Use g_slice_dup in _copy() function for iterators - - glib/poppler-document.cc | 9 +++------ - 1 file changed, 3 insertions(+), 6 deletions(-) - -commit c84f69681828c7e3b969f666f9b84f1531976c6f -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Jun 15 13:57:18 2010 +0200 - - [glib] Use g_slice for mappings and PopplerRectangle - - glib/poppler-page.cc | 50 - ++++++++++++++++++-------------------------------- - 1 file changed, 18 insertions(+), 32 deletions(-) - -commit e12b9ab105f3b56b47ded871693b939ed421c853 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Jun 15 13:49:27 2010 +0200 - - [glib] Use poppler_image_mapping_free() instead of g_free() - - glib/poppler-page.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit fb791a15f7472042fb2174e6f5df6924dd4eeb9b -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Jun 15 13:37:52 2010 +0200 - - [glib] Remove poppler_mapping_free and use poppler_link_mapping_free - instead - - glib/poppler-page.cc | 9 +-------- - 1 file changed, 1 insertion(+), 8 deletions(-) - -commit 6186d7220e545eb89597626933a10acd0cd25173 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Jun 15 13:16:59 2010 +0200 - - [glib] Use _new() methods instead of g_new() to create boxed structs - - glib/poppler-page.cc | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit 44639cb7b10ab6d66122ae2b6b7f3e5745f933bd -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Jun 15 10:39:00 2010 +0200 - - [glib-demo] Use poppler_rectangle_free() instead of g_free() - - glib/demo/find.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 3ca304f3837af27ae49541a5f441d8729264a945 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Jun 14 19:16:41 2010 +0100 - - Add more caching to ObjectStreams - - Makes opening of file from bug 26759 ten times faster - - poppler/XRef.cc | 62 - ++++++++++++++++++++++++++++++++++++++++++++++++--------- - poppler/XRef.h | 4 ++-- - 2 files changed, 55 insertions(+), 11 deletions(-) - -commit cc2e5f190e19ee8169f67df2541302a2816873d3 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Jun 14 18:17:01 2010 +0200 - - [glib-demo] Support password protected documents - - glib/demo/main.c | 175 - +++++++++++++++++++++++++++++++++++++++++++++++++++++-- - 1 file changed, 170 insertions(+), 5 deletions(-) - -commit 34b2dbb6bbaf0189c92eea6b7924999ab2b6ad11 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Jun 14 17:41:51 2010 +0200 - - [glib-demo] Remove GLIB_CHECK_VERSION(), we already depend on - glib 2.18 - - glib/demo/attachments.c | 5 ----- - glib/demo/main.c | 32 +------------------------------- - 2 files changed, 1 insertion(+), 36 deletions(-) - -commit a52670a46c0561025d8b86cd2865603f0720c695 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Jun 13 15:31:15 2010 +0100 - - do not distribute these two files - - they are generated on configure/cmake time and depend on the machine - - glib/Makefile.am | 7 +++---- - poppler/Makefile.am | 4 ++-- - 2 files changed, 5 insertions(+), 6 deletions(-) - -commit eb0206ba8458f1dba004ac7bef856dcbb2ccbba5 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Jun 9 18:56:16 2010 +0100 - - we need to ship these two files - - Bug 28458 - - Makefile.am | 2 ++ - 1 file changed, 2 insertions(+) - -commit 7dfdf1ee293b7d36a049a90d8a17462ed0e50f2c -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Jun 8 21:54:52 2010 +0100 - - Typo-- - - utils/pdftoppm.1 | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 57cc04ee1a122794b338c0d9818dbdaea46a42d6 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Jun 8 21:49:40 2010 +0100 - - Add cropbox to the manpage - - utils/pdftoppm.1 | 3 +++ - 1 file changed, 3 insertions(+) - -commit f9e6cb9647981f7afbb20261b3ccedaf003657d2 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Jun 8 20:43:11 2010 +0100 - - 0.14.0 - - CMakeLists.txt | 4 ++-- - NEWS | 18 ++++++++++++++++++ - configure.ac | 4 ++-- - cpp/Doxyfile | 2 +- - qt4/src/Doxyfile | 2 +- - 5 files changed, 24 insertions(+), 6 deletions(-) - -commit 963afdc39153fee69ecb939c98deeef4f64638de -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Jun 8 20:29:58 2010 +0100 - - libpoppler-qt4.so.3.2.0 -> libpoppler-qt4.so.3.3.0 - - qt4/src/CMakeLists.txt | 2 +- - qt4/src/Makefile.am | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit c1629be8011f3bddbf619246090640d62136d521 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Jun 8 20:23:00 2010 +0100 - - Increase soname as _PopplerActionMovie struct grew - - glib/CMakeLists.txt | 2 +- - glib/Makefile.am | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit 5ef45b1e72aed88ece0905b1204edee641f3c8fc -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Jun 8 19:35:20 2010 +0100 - - Do not exit when trying to allocate memory for the XRef fails - - See bug 28406 - - poppler/XRef.cc | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -commit e7a5e9f70ee1283a2ca6734552d905279c97989b -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Jun 4 08:46:33 2010 +0100 - - a bit of docu - - poppler/Object.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 9ff4dab2558f7c2700fd7fcaccacdad9619dbdda -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Jun 4 08:44:34 2010 +0100 - - Add support for unsigned integer numbers - - So files store their P as a 32 bit unsigned instead of as a 32 bit - signed, making us to overflow our objInt parsing and rejecting to open - the file, this patch introduces objUint that only happens when the - number is not real, does not fit in a 32 bit integer but still fits - in a - 32 bit unsigned integer - - poppler/Lexer.cc | 32 +++++++++++++++++++++++++------- - poppler/Object.cc | 5 ++++- - poppler/Object.h | 14 +++++++++++--- - poppler/SecurityHandler.cc | 22 ++++++++++++++++++++++ - 4 files changed, 62 insertions(+), 11 deletions(-) - -commit 41e9af7f505dbfbda36f6ac97df90f2a42ab3160 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Jun 1 21:40:07 2010 +0100 - - If the document is not encrypted it is ok to print - - poppler/XRef.cc | 16 ++++++++++------ - 1 file changed, 10 insertions(+), 6 deletions(-) - -commit b15c793a8a58b17a7fe7b32c1037726e1e0e1bf0 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Jun 1 20:57:16 2010 +0100 - - Check it is a stream, not that it is not none - - People is reporting aborts, e.g. KDE bug 240208 - but can not check if this really fixes it since he can not share the - document - - poppler/Lexer.h | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -commit a72c68117ba05f3934e2df227cdcaf53a375f0ce -Author: Pino Toscano <pino@kde.org> -Date: Fri May 28 18:11:02 2010 +0200 - - [cpp apidox] add a start of API documentation for the 'page' class - - cpp/poppler-page.cpp | 68 - ++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 68 insertions(+) - -commit acf7729e8e270e1b4b2a552272dc280ae6d7b352 -Author: Pino Toscano <pino@kde.org> -Date: Fri May 28 17:38:35 2010 +0200 - - [cpp] fix the font_iterator current page status - - cpp/poppler-font.cpp | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -commit 4e017ff24a01cbbf1b39eedc3d7697f8b180fdd9 -Author: Pino Toscano <pino@kde.org> -Date: Fri May 28 17:15:28 2010 +0200 - - [cpp apidox] add API documentation for the 'font_info' and - 'font_iterator' classes - - cpp/poppler-font.cpp | 71 - ++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 71 insertions(+) - -commit 2ff840b62e41e2fc98e9fcff7330f40216de58a5 -Author: Pino Toscano <pino@kde.org> -Date: Fri May 28 14:34:37 2010 +0200 - - [cpp] move the actual convert_date(const char*) implementation in - the detail - - this way it is possible to call it from inside poppler-cpp without - an implicit conversion to std::string - - cpp/poppler-document.cpp | 2 +- - cpp/poppler-embedded-file.cpp | 4 ++-- - cpp/poppler-global.cpp | 23 ++--------------------- - cpp/poppler-private.cpp | 25 +++++++++++++++++++++++++ - cpp/poppler-private.h | 2 ++ - 5 files changed, 32 insertions(+), 24 deletions(-) - -commit 8112e9111313eaded4cd2e89d0e67efb0f3e29db -Author: Pino Toscano <pino@kde.org> -Date: Fri May 28 13:13:50 2010 +0200 - - [cpp] add a time_type typedef - - ... defined as unsigned int, and use it all around - (it changes nothing for client code) - - cpp/poppler-document.cpp | 8 ++++---- - cpp/poppler-document.h | 2 +- - cpp/poppler-embedded-file.cpp | 4 ++-- - cpp/poppler-embedded-file.h | 4 ++-- - cpp/poppler-global.cpp | 4 ++-- - cpp/poppler-global.h | 4 +++- - 6 files changed, 14 insertions(+), 12 deletions(-) - -commit bc5bdb43b12437e00aaddc27a74b9ac4b6498446 -Author: Pino Toscano <pino@kde.org> -Date: Fri May 28 13:01:53 2010 +0200 - - use the proper type for iterating on a GooVector - - poppler/XRef.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 87128ab0dfec6be1a034361512ee41301b078831 -Author: Maciej Mrozowski <reavertm@gmail.com> -Date: Thu May 27 17:31:00 2010 +0200 - - [CMake] Do not force -O2, preserve compiler flags instead. - - cmake/modules/PopplerMacros.cmake | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 241c338facb45641ef1a271c904355a014bbf28d -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu May 27 20:37:55 2010 +0100 - - Allow quality & progressive mode to be utilised in JpegWriter - - goo/JpegWriter.cc | 15 +++++++++++++-- - goo/JpegWriter.h | 4 ++++ - splash/SplashBitmap.cc | 18 +++++++++--------- - splash/SplashBitmap.h | 4 ++++ - 4 files changed, 30 insertions(+), 11 deletions(-) - -commit 9eda6e8aaae412a9882141d1b5b8c7bf0c823c68 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue May 25 23:44:30 2010 +0100 - - Do not follow loops blindly - - Fixes crash in pdf in bug 28172 - - poppler/XRef.cc | 21 +++++++++++++++------ - poppler/XRef.h | 7 ++++--- - 2 files changed, 19 insertions(+), 9 deletions(-) - -commit bbee6e0c8c9b181f8d19c167c867d74a765685fb -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue May 25 23:13:38 2010 +0100 - - update copyright - - poppler/JBIG2Stream.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 80b72b9f2fd70395580205b8b176e0576e132cf5 -Author: Hib Eris <hib@hiberis.nl> -Date: Wed May 26 13:07:57 2010 +0200 - - [autotools] sync autotool build with cmake build - - In addition to commit 69c2cf76cef9c190ac07726f60f1dccd3df5cb6d - - poppler/poppler-config.h.in | 4 ++++ - 1 file changed, 4 insertions(+) - -commit 30ea3ab8a1eecafb3366aef193910098fdb7ccc8 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue May 25 23:07:56 2010 +0100 - - Fix crash when parsing pdf in bug 28170 - - This code is a can of crashing worms :-7 - - poppler/JBIG2Stream.cc | 23 ++++++++++++++++------- - 1 file changed, 16 insertions(+), 7 deletions(-) - -commit b5a9021037c4e6cbbfd622433f3de693d1f47671 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue May 25 20:00:57 2010 +0100 - - 0.13.4 - - CMakeLists.txt | 2 +- - NEWS | 16 ++++++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - glib/reference/tmpl/poppler-action.sgml | 5 +++++ - glib/reference/tmpl/poppler-annot.sgml | 18 ++++++++++++++++++ - glib/reference/tmpl/poppler-attachment.sgml | 3 +++ - glib/reference/tmpl/poppler-document.sgml | 5 +++++ - glib/reference/tmpl/poppler-enums.sgml | 17 +++++++++++++++++ - glib/reference/tmpl/poppler-features.sgml | 3 +++ - glib/reference/tmpl/poppler-form-field.sgml | 3 +++ - glib/reference/tmpl/poppler-layer.sgml | 4 ++++ - glib/reference/tmpl/poppler-page.sgml | 13 +++++++++++++ - glib/reference/tmpl/poppler-private.sgml | 3 +++ - glib/reference/tmpl/poppler.sgml | 6 ++++++ - glib/reference/tmpl/stamp-poppler-enums.sgml | 3 +++ - qt4/src/Doxyfile | 2 +- - 17 files changed, 103 insertions(+), 4 deletions(-) - -commit 57ab0ebe993d79fe551bba58e0a70d55d32828f8 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed May 12 20:49:31 2010 +0100 - - better copyright - - poppler/strtok_r.cpp | 23 +++++++++++++++++++++++ - 1 file changed, 23 insertions(+) - -commit 69c2cf76cef9c190ac07726f60f1dccd3df5cb6d -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed May 12 20:47:25 2010 +0100 - - mingw does not provide strtok_r - - Copy the glibc implementation - - CMakeLists.txt | 1 + - poppler/Makefile.am | 1 + - poppler/poppler-config.h.cmake | 4 + - poppler/strtok_r.cpp | 189 - +++++++++++++++++++++++++++++++++++++++++ - 4 files changed, 195 insertions(+) - -commit 9e9b5e0d87a7450bd2223538673321ecec720c36 -Author: Marek Kasik <mkasik@redhat.com> -Date: Tue May 11 12:06:17 2010 +0200 - - Better check of overlapping of table cells when selecting text - - Add check for overlapping of upper right cell with lower left cell - of assumed table (related to #3188). - - poppler/TextOutputDev.cc | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -commit a3e40b460b7690ef73ccf143b10da07e91d9ee7f -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon May 10 17:41:04 2010 +0200 - - [annots] Adjust bbox for line annots when y1 = y2 - - Some documents like pdf_commenting_new.pdf, have y1 = y2 but - line_width > 0, acroread renders the lines in such cases even - though the - annot bbox is empty. - - poppler/Annot.cc | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -commit e30d24c506a9ff742f8af5d6c71273abeddaa265 -Author: Pino Toscano <pino@kde.org> -Date: Tue May 4 15:19:26 2010 +0200 - - [cpp] ustring::{from,to}_utf8(): fix in/out buffer sizes - - cpp/poppler-global.cpp | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit aaa19a673020e12dbfceb4d25ade0ece7875fd83 -Author: Pino Toscano <pino@kde.org> -Date: Tue May 4 12:07:43 2010 +0200 - - [cpp] make the pkg-config files really working - - poppler-cpp.pc.cmake | 6 +++++- - poppler-cpp.pc.in | 6 +++++- - 2 files changed, 10 insertions(+), 2 deletions(-) - -commit 8f963ccde41ef1faa719254fccc5bdfe75e9fa87 -Author: Patrick Spendrin <ps_ml@gmx.de> -Date: Sun May 2 18:42:10 2010 +0200 - - Windows: define strtok_r as strtok_s - - poppler/poppler-config.h.cmake | 4 ++++ - poppler/poppler-config.h.in | 4 ++++ - 2 files changed, 8 insertions(+) - -commit c9d8df51c96e50ad72f7954baba2254259fc894c -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat May 1 19:52:51 2010 +0100 - - 2010 in these copyrights - - poppler/poppler-config.h.cmake | 2 +- - poppler/poppler-config.h.in | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit 9ce71fb35fdd66c55872956432160a5c76a62080 -Author: Jakub Wilk <ubanus@users.sf.net> -Date: Sat May 1 19:50:54 2010 +0100 - - Use strtok_r instead strtok - - strtok is not thread safe - - fofi/FoFiType1.cc | 8 +++++--- - poppler/CharCodeToUnicode.cc | 6 ++++-- - poppler/GlobalParams.cc | 6 ++++-- - poppler/PDFDoc.cc | 4 +++- - poppler/UnicodeMap.cc | 21 ++++++++++++++++++--- - 5 files changed, 34 insertions(+), 11 deletions(-) - -commit 6b2983f89e87792a393880dab6dc1fedb748db2c -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri Apr 30 14:48:50 2010 +0200 - - [cairo] Set device offset and matrix to smask depending on the - group target - - It seems to fix all of my test cases. Fixes bug #27208. - - poppler/CairoOutputDev.cc | 21 +++++++++++++++------ - 1 file changed, 15 insertions(+), 6 deletions(-) - -commit ac32021704178721ee007a6b6831283e323e500f -Author: Pino Toscano <pino@kde.org> -Date: Fri Apr 30 01:14:14 2010 +0200 - - demote the #warning to a simple FIXME comment - - poppler/ArthurOutputDev.cc | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -commit 8c1bc17552c989c15f318d9d109607a9a594ca6b -Author: Pino Toscano <pino@kde.org> -Date: Fri Apr 30 01:12:19 2010 +0200 - - MSVC: define fmax() and fmin() - - MSVC does not provide those functions, so we need to define them to - the existing max()/mix() macros. - Thanks to Patrick Spendrin for the hint! - - poppler/poppler-config.h.cmake | 5 +++++ - poppler/poppler-config.h.in | 5 +++++ - 2 files changed, 10 insertions(+) - -commit 71063d51a45835b0267a7e3f823ef49689cfd06f -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Apr 29 20:28:07 2010 +0200 - - Make sure we are drawing text before calling endTextObject() - - This is actually the right fix for the previous commit. - - poppler/Gfx.cc | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -commit e909219d8e92994bd52976f9676015fa6ca9fc91 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Apr 29 18:34:22 2010 +0200 - - Set textHaveCSPattern=false again before filling the pattern in - opEndText() - - Fixes cairo backend regressions caused by commit - ccf238b32e236f69c0507a5421ac2649dfa8d865. - - poppler/Gfx.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 29572d6ac7829b60efce2d8e489473c55e370f26 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Apr 27 23:39:23 2010 +0100 - - fabs for doubles - - poppler/TextOutputDev.cc | 24 ++++++++++++------------ - 1 file changed, 12 insertions(+), 12 deletions(-) - -commit 4905e2bd764ea601e3bf9c5195c740e5bf186af5 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Apr 27 23:34:34 2010 +0100 - - fix include - - splash/SplashBitmap.cc | 1 + - 1 file changed, 1 insertion(+) - -commit f9f0e4b747a1527bd6354897cdba7954d58651de -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Apr 27 14:26:23 2010 +0200 - - Fix first color stop offset of linear gradients - - Fixes bug #27837. - - poppler/Gfx.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 5b822011029f3721fbafd4a7bf01b9d6fee35d25 -Author: Pino Toscano <pino@kde.org> -Date: Sat Apr 24 18:18:08 2010 +0200 - - include standard float.h instead of unportable values.h - - poppler/TextOutputDev.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit dee7cb8691528293bb5b8f266970cdb6771e301b -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Apr 24 15:39:23 2010 +0100 - - 0.13.3 - - CMakeLists.txt | 2 +- - NEWS | 31 +++++++++++++++++++++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - qt4/src/Doxyfile | 2 +- - 5 files changed, 35 insertions(+), 4 deletions(-) - -commit 07864c9e2a7a32b48bdbab92c8b2f79bce1d9f5b -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Apr 24 13:07:02 2010 +0100 - - minor cleanups - - utils/HtmlLinks.cc | 15 ++------------- - utils/HtmlLinks.h | 16 ++++++++++++++-- - 2 files changed, 16 insertions(+), 15 deletions(-) - -commit e501eabb2f0775444a2bf64005a3a3f1ffa281b4 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Apr 24 13:06:12 2010 +0100 - - Do not assume the parameter will have more than 5 chars - - utils/pdftohtml.cc | 30 ++++++++++++++++++------------ - 1 file changed, 18 insertions(+), 12 deletions(-) - -commit 6cc4d571339214e9eeeb682ba48fb220cef905f9 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Apr 24 13:04:05 2010 +0100 - - Fix end() to return the correct last valid value - - goo/GooVector.h | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -commit 4ed53e30e735b79c46eab9d54883531c6e187b17 -Author: William Bader <williambader@hotmail.com> -Date: Fri Apr 23 22:52:24 2010 +0100 - - Silence some Illegal entry in bfrange block in ToUnicode CMap - - Fixes #27728 - - poppler/CharCodeToUnicode.cc | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -commit 16a004784043e2a8587c0c3c6d23889df8a80470 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Apr 22 19:39:01 2010 +0100 - - Avoid the usage of std:: - - poppler/TextOutputDev.cc | 25 +++++++++++-------------- - 1 file changed, 11 insertions(+), 14 deletions(-) - -commit a7dcb2b4ffee57b7f78529cbaeaab647ab93de86 -Author: Pino Toscano <pino@kde.org> -Date: Thu Apr 22 13:31:41 2010 +0200 - - Windows: include config.h in GlobalParamsWin.cc only if not included - already - - GlobalParamsWin.cc is not compiled standalone but only #include'd by - GlobalParams.cc (on Windows only), so config.h has already included - already - as safety check, check for PACKAGE_NAME (#define'd in config.h) - before #include'ing it again - - poppler/GlobalParamsWin.cc | 2 ++ - 1 file changed, 2 insertions(+) - -commit fba076e17af24a9c9883504282316bba119a908c -Author: Pino Toscano <pino@kde.org> -Date: Thu Apr 22 13:24:04 2010 +0200 - - avoid accidental max() macro replacement with some compilers (eg MSVC) - - defining an empty macro and using it between "max" and "(", such - compilers won't try to replace their macro max(a, b) there; in any - case, empty spaces are just fine - - poppler/TextOutputDev.cc | 11 +++++++---- - 1 file changed, 7 insertions(+), 4 deletions(-) - -commit ccf238b32e236f69c0507a5421ac2649dfa8d865 -Author: Thomas Freitag <Thomas.Freitag@alfa.de> -Date: Wed Apr 21 19:21:37 2010 +0100 - - Improve colorizing text and masks in pattern colorspace - - Bug #27482 - - poppler/Gfx.cc | 137 - ++++++++++++++++++++++----------------------- - poppler/Gfx.h | 4 +- - poppler/SplashOutputDev.cc | 41 ++++++++++++-- - poppler/SplashOutputDev.h | 3 +- - 4 files changed, 106 insertions(+), 79 deletions(-) - -commit 8e86dfb328d94939ecf390d34af533b831b2837b -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Apr 21 19:19:53 2010 +0100 - - Add copyright - - poppler/TextOutputDev.cc | 1 + - poppler/TextOutputDev.h | 1 + - 2 files changed, 2 insertions(+) - -commit 6f9f3d33ff8058e28243ba45b8547e21ad0d088a -Author: Andre Klapper <a9016009@gmx.de> -Date: Wed Apr 21 19:57:15 2010 +0200 - - [glib-demo] Compile with -DGSEAL_ENABLE - - Fixes bug #27579. - - glib/demo/images.c | 2 +- - glib/demo/layers.c | 4 ++-- - glib/demo/render.c | 8 ++++---- - 3 files changed, 7 insertions(+), 7 deletions(-) - -commit 6b14c18d60cae130869f9a5c7688dfe880602224 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Wed Apr 21 19:56:49 2010 +0200 - - [cairo] Make sure we always use a new path in doPath() - - Fixes document - http://acroeng.adobe.com/Test_Files/images/transparency/Untitled-2.pdf - when rendering with cairo backend. - - poppler/CairoOutputDev.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 4f71d64c69500ed78daf4d797c8af6cfbd3d970e -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Wed Apr 21 11:44:49 2010 +0200 - - [cairo] Fix pattern size when bbox is not at 0,0 - - poppler/CairoOutputDev.cc | 11 +++++++++-- - 1 file changed, 9 insertions(+), 2 deletions(-) - -commit 9c5612f6e013a8698eff6531ec388a7e6c1fb89a -Author: Marek Kasik <mkasik@redhat.com> -Date: Fri Feb 12 14:31:01 2010 +0100 - - Distinguish between columns and tables when selecting text - - This commit add ability to detect tables in text by checking borders - of 4 neighbouring text blocks for arrangement (to the left, to - the right, - center, ...). Detected border of whole table is then stored in - ExMin, ExMax, - EyMin and EyMax of each block together with id of detected - table. Sorting - of blocks is then performed on the these borders to be able to - distinguish - tables from columns. - Pasting of selected text was modified so that tables are pasted - correctly - (even with multi line cells). - - poppler/TextOutputDev.cc | 490 - +++++++++++++++++++++++++++++++++++++++++------ - poppler/TextOutputDev.h | 5 + - 2 files changed, 437 insertions(+), 58 deletions(-) - -commit db014ffb357e760d9397544c5a8fe747cdb497ab -Author: Brian Ewins <brian.ewins@gmail.com> -Date: Mon Nov 23 08:58:19 2009 +0000 - - Select top right to bottom left in RTL mode - - This makes pure RTL selection work. Bidi is not handled at all. - Rendering of the selection is poor and the dumped text appears - to still be in reverse order to me. - - poppler/TextOutputDev.cc | 57 - ++++++++++++++++++++++++++++++++++++------------ - 1 file changed, 43 insertions(+), 14 deletions(-) - -commit b1d43fa052d9160c4f319a67415ecf3ebf2cf9b3 -Author: Brian Ewins <brian.ewins@gmail.com> -Date: Sun Nov 22 09:47:40 2009 +0000 - - Make pdftotext newlines match copy and paste - - The output of pdftotext didn't insert line breaks, - resulting in jumbled text. Change the rules to - emit a newline at the end of each line unless - a hyphenation is being supressed, and an extra - newline at the end of each flow. - - poppler/TextOutputDev.cc | 17 +++-------------- - 1 file changed, 3 insertions(+), 14 deletions(-) - -commit f83b677a8eb44d65698b77edb13a5c7de3a72c0f -Author: Brian Ewins <brian.ewins@gmail.com> -Date: Thu Nov 12 02:50:29 2009 +0000 - - Use a reading-order sort to order blocks - - This switches the block sort from XY to reading order, - using the rules from T. Breuel's "High Performance - Document Layout Analysis". - - Signed-off-by: Brian Ewins <brian.ewins@gmail.com> - - poppler/TextOutputDev.cc | 164 - +++++++++++++++++++++++++++++++++++++++++++++-- - poppler/TextOutputDev.h | 8 +++ - 2 files changed, 167 insertions(+), 5 deletions(-) - -commit a2191a4d45e0abaec97c19aacae37c4c5824bd36 -Author: Brian Ewins <brian.ewins@gmail.com> -Date: Mon Nov 9 06:24:51 2009 +0000 - - Separate flow construction from reading order - - If the blocks were already in reading order, then - constructing flows is simplified, since blocks - cannot be picked out-of-order. Make this change - first in preparation for adding a reading-order - sort. - - Signed-off-by: Brian Ewins <brian.ewins@gmail.com> - - poppler/TextOutputDev.cc | 96 - +++++++++--------------------------------------- - 1 file changed, 17 insertions(+), 79 deletions(-) - -commit 345ed51af9b9e7ea53af42727b91ed68dcc52370 -Author: Brian Ewins <brian.ewins@gmail.com> -Date: Thu Oct 29 01:46:29 2009 +0000 - - Fix bug 3188, text selection across table cells - - Bug 3188. When selecting text, poppler goes across the whole - page then down, rather than across each cell, down that cell, - then across to the next cell. This leads to illegible paste - results. - - Teach TextPage to visit the selection in flow order rather than - block order. - - Signed-off-by: Brian Ewins <brian.ewins@gmail.com> - - poppler/TextOutputDev.cc | 334 - +++++++++++++++++++++++++---------------------- - 1 file changed, 178 insertions(+), 156 deletions(-) - -commit 12d83931ae1b899b70c7ea5c01f03f123b1bb9a8 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Apr 18 17:53:48 2010 +0200 - - [cairo] Check pattern status after setting matrix when rendering - images - - Fixes rendering of document attached to kde bug - http://bugs.kde.org/show_bug.cgi?id=135417. - - poppler/CairoOutputDev.cc | 34 ++++++++++++++++++++++++++++++++++ - 1 file changed, 34 insertions(+) - -commit ff6d501a2fc887fd49a985161f756d6d6b8e6c0d -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Apr 18 17:51:42 2010 +0200 - - [cairo] Fix a crash when rendering 0x0 images - - See kde bug http://bugs.kde.org/show_bug.cgi?id=135417 - - poppler/CairoOutputDev.cc | 3 +++ - 1 file changed, 3 insertions(+) - -commit 84cd2186861436fbaa7c29aa691e69fcd543a1c2 -Author: Hib Eris <hib@hiberis.nl> -Date: Tue Apr 13 23:42:28 2010 +0200 - - Properly initialize variable - - poppler/CachedFile.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 24f244f486f332b0bd76c6525c5d9d03168a76e6 -Author: Hib Eris <hib@hiberis.nl> -Date: Tue Apr 13 23:54:28 2010 +0200 - - pdftops: require output filename when reading from stdin - - utils/pdftops.cc | 3 +++ - 1 file changed, 3 insertions(+) - -commit 955f9f53ff225f6794a494fdd0f0fe5ee1a41d88 -Author: Hib Eris <hib@hiberis.nl> -Date: Tue Apr 13 23:47:40 2010 +0200 - - pdftotext: require output filename when reading from stdin - - utils/pdftotext.cc | 3 +++ - 1 file changed, 3 insertions(+) - -commit 31388aa8b5117619878431b7fed2d033000af541 -Author: Hib Eris <hib@hiberis.nl> -Date: Tue Apr 13 23:27:20 2010 +0200 - - pdftohtml: require output filename when reading from stdin - - utils/pdftohtml.cc | 3 +++ - 1 file changed, 3 insertions(+) - -commit a8d43ec1c7f5448a7f63d9bbd9062d56ee1c7c58 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Apr 14 19:21:33 2010 +0100 - - update XOPEN_SOURCE to 600 in non standard compile options - - it seems helps compiling on some BSD - - cmake/modules/PopplerMacros.cmake | 2 +- - configure.ac | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit 4cce1f14e964edf1bf2d9fb8286ee002a67dc212 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Apr 13 21:57:16 2010 +0100 - - include strings.h on non windows platforms - - poppler/GlobalParams.cc | 2 ++ - test/perf-test.cc | 2 ++ - 2 files changed, 4 insertions(+) - -commit 55c76069c52f9f51c6b8c60fe1aa8de499012ea8 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Apr 12 19:32:46 2010 +0200 - - [glib] Use existing cairo api when rendering to a pixbuf - - I should fix bug #5589 for the GDK api too. - - glib/poppler-page.cc | 227 - +++++++++++++++++++++------------------------------ - 1 file changed, 93 insertions(+), 134 deletions(-) - -commit 51aefe1423a068e8c119c21a8791d265aecbeaf5 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri Apr 9 12:50:00 2010 +0200 - - [cairo] Implement colorizing image masks with pattern colorspace - - poppler/CairoOutputDev.cc | 9 +++++++++ - 1 file changed, 9 insertions(+) - -commit bd8f44289770175a17ac45e4788b0d374cc93d5a -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri Apr 9 12:02:38 2010 +0200 - - Partially revert "[cairo] Do not change device offset of mask surface" - - This partially reverts commit - a32f6f9ebaed3e4827b9dc6cb37e307c2798f521. - It fixed bug #27208, but it's causing regressions on other documents. - - poppler/CairoOutputDev.cc | 11 ++++++++++- - 1 file changed, 10 insertions(+), 1 deletion(-) - -commit bcb405c43fb7140f5d601d00de4d30913a0050ef -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Apr 8 12:02:48 2010 +0200 - - Pages were always created without forms by Catalog - - Use getForm() instead of form when creating a page object. - - poppler/Catalog.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit d46581c574b3088a82555cbc3b76e95e2571b9c0 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Apr 7 20:25:23 2010 +0100 - - Fix destructor - - poppler/Catalog.cc | 19 +++++++------------ - poppler/Catalog.h | 3 +-- - 2 files changed, 8 insertions(+), 14 deletions(-) - -commit ab14433f8b3d7c67f279cece65dfdd40c6675ac0 -Author: Hib Eris <hib@hiberis.nl> -Date: Thu Mar 25 15:33:33 2010 +0100 - - Parse Form on demand - - poppler/Catalog.cc | 21 +++++++++++++-------- - poppler/Catalog.h | 2 +- - 2 files changed, 14 insertions(+), 9 deletions(-) - -commit c72a2c7f70b13a7b7b531b3c983d9a9bc104bac7 -Author: Hib Eris <hib@hiberis.nl> -Date: Thu Mar 25 17:33:11 2010 +0100 - - Parse Names on demand - - poppler/Catalog.cc | 112 - +++++++++++++++++++++++++++++++++++++++++++---------- - poppler/Catalog.h | 18 ++++++--- - 2 files changed, 104 insertions(+), 26 deletions(-) - -commit 32053360c93607cf9bdc092257cefad5d4df9ec5 -Author: Hib Eris <hib@hiberis.nl> -Date: Thu Mar 25 16:32:22 2010 +0100 - - Parse Dests on demand - - poppler/Catalog.cc | 27 +++++++++++++++++++++------ - poppler/Catalog.h | 2 +- - 2 files changed, 22 insertions(+), 7 deletions(-) - -commit da0f8e69eecb944e128474f62829f729eeabd189 -Author: Hib Eris <hib@hiberis.nl> -Date: Thu Mar 25 16:48:07 2010 +0100 - - Parse Outline on demand in PDFDoc - - poppler/PDFDoc.cc | 17 ++++++++++++----- - poppler/PDFDoc.h | 2 +- - 2 files changed, 13 insertions(+), 6 deletions(-) - -commit d7a69c8cad112cb6616d0192d8a4028fdaee2f73 -Author: Hib Eris <hib@hiberis.nl> -Date: Thu Mar 25 16:05:02 2010 +0100 - - Parse Outline on demand - - poppler/Catalog.cc | 23 ++++++++++++++++++++--- - poppler/Catalog.h | 2 +- - 2 files changed, 21 insertions(+), 4 deletions(-) - -commit c149e027fa76824221a78fe6d3bf9bfe953491d4 -Author: Hib Eris <hib@hiberis.nl> -Date: Thu Mar 25 15:51:51 2010 +0100 - - Parse StructTreeRoot on demand - - poppler/Catalog.cc | 22 +++++++++++++++++++--- - poppler/Catalog.h | 2 +- - 2 files changed, 20 insertions(+), 4 deletions(-) - -commit 3c6effe44d6d97f175c2ee7f3913d8c4ba34d612 -Author: Hib Eris <hib@hiberis.nl> -Date: Thu Mar 25 14:55:22 2010 +0100 - - Parse Metadata on demand - - poppler/Catalog.cc | 16 +++++++++++++--- - 1 file changed, 13 insertions(+), 3 deletions(-) - -commit 749d67ea2346a3453ef41dc37ba59d419ad900b0 -Author: Hib Eris <hib@hiberis.nl> -Date: Thu Mar 25 15:09:58 2010 +0100 - - Parse PageLabelInfo on demand - - poppler/Catalog.cc | 37 +++++++++++++++++++++++++++++-------- - poppler/Catalog.h | 3 +++ - 2 files changed, 32 insertions(+), 8 deletions(-) - -commit 78f7d106714fa489a66c39410163a6902ba24856 -Author: Hib Eris <hib@hiberis.nl> -Date: Sat Mar 27 14:43:57 2010 +0100 - - Parse PageMode and PageLayout on demand - - poppler/Catalog.cc | 109 - ++++++++++++++++++++++++++++++++++++----------------- - poppler/Catalog.h | 11 ++++-- - 2 files changed, 81 insertions(+), 39 deletions(-) - -commit f5dd5be64d09186ee289632c1a61979d15edd605 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Wed Apr 7 19:48:39 2010 +0200 - - Fix saving update docs that have a compressed xref table - - - Use the original xref table size as Size field in the trailer - dictionary to make sure size = maxObjId + 1 - - - Use the right generation number for compressed objects that which - must be 0. gen field in xref entry for compressed objects is the - index of the object in the stream, not the generation number. - - Fixes bug #27450. - - poppler/PDFDoc.cc | 9 ++++----- - 1 file changed, 4 insertions(+), 5 deletions(-) - -commit 3f302fdd78cd78873bf5376af84e83741a8daadb -Author: Pino Toscano <pino@kde.org> -Date: Tue Apr 6 23:58:46 2010 +0200 - - use a GooVector<bool> instead of a non-standard variable-length-array - - poppler/CachedFile.cc | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit 425a62b5fa8e4e69bfc1c64ed126b5baac06d78a -Author: Hib Eris <hib@hiberis.nl> -Date: Tue Apr 6 10:57:30 2010 +0200 - - pdfutils: fix deleting fileName - - utils/pdfinfo.cc | 2 +- - utils/pdftoabw.cc | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit 198c9d61ba93ba62ea2da44a23cd948d43556c3e -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Apr 6 22:00:14 2010 +0100 - - Use the topleft of the Rect of text annots to draw - - Not use the full rect when we are drawing "our" notes - - poppler/Annot.cc | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -commit 1422802f029483ad3e62a3a13e66b2d3990ac58f -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Apr 6 12:32:12 2010 +0200 - - [cairo] Use current fill_opacity when drawing soft masked images - - Fixes GNOME Bug https://bugzilla.gnome.org/show_bug.cgi?id=614915 - - poppler/CairoOutputDev.cc | 27 ++++++++++++++++++++------- - 1 file changed, 20 insertions(+), 7 deletions(-) - -commit c152d30f879e6cde45de58bb9249035e127e84e7 -Author: Hib Eris <hib@hiberis.nl> -Date: Mon Apr 5 18:55:29 2010 +0200 - - delete fileName in utils - - utils/pdftohtml.cc | 1 + - utils/pdftops.cc | 1 + - utils/pdftotext.cc | 1 + - 3 files changed, 3 insertions(+) - -commit f091c83414ab32a4ecf1fa2bd15f13a3cf113a86 -Author: Hib Eris <hib@hiberis.nl> -Date: Mon Apr 5 20:12:01 2010 +0100 - - add some docu - - poppler/CachedFile.h | 30 ++++++++++++++++++++++++++++++ - poppler/CurlPDFDocBuilder.h | 2 ++ - poppler/LocalPDFDocBuilder.h | 2 ++ - poppler/PDFDocBuilder.h | 9 +++++++++ - poppler/PDFDocFactory.h | 12 ++++++++++++ - poppler/StdinPDFDocBuilder.h | 2 ++ - 6 files changed, 57 insertions(+) - -commit fc071d800cb4329a3ccf898d7bf16b4db7323ad8 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Apr 5 19:11:26 2010 +0100 - - Rework DCTStream error handling, should work better now - - Fixes bug 26280 - - poppler/DCTStream.cc | 35 ++++++++++++++--------------------- - poppler/DCTStream.h | 5 +++-- - utils/HtmlOutputDev.cc | 4 ++-- - 3 files changed, 19 insertions(+), 25 deletions(-) - -commit a9d801b2db20ecb08734ee5cdb703abf11994b6e -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Apr 5 16:55:02 2010 +0100 - - Make some paremeters const & to clearly show we just read them - - poppler/CachedFile.cc | 18 ++++++++++-------- - poppler/CachedFile.h | 8 +++++--- - poppler/CurlCachedFile.cc | 9 +++++---- - poppler/CurlCachedFile.h | 3 ++- - poppler/CurlPDFDocBuilder.cc | 9 +++++---- - poppler/CurlPDFDocBuilder.h | 5 +++-- - poppler/LocalPDFDocBuilder.cc | 15 ++++++++------- - poppler/LocalPDFDocBuilder.h | 5 +++-- - poppler/PDFDocBuilder.h | 5 +++-- - poppler/PDFDocFactory.cc | 7 ++++--- - poppler/PDFDocFactory.h | 3 ++- - poppler/StdinCachedFile.cc | 3 ++- - poppler/StdinCachedFile.h | 3 ++- - poppler/StdinPDFDocBuilder.cc | 7 ++++--- - poppler/StdinPDFDocBuilder.h | 5 +++-- - utils/pdffonts.cc | 4 ++-- - utils/pdfimages.cc | 4 ++-- - utils/pdfinfo.cc | 4 ++-- - utils/pdftoabw.cc | 4 ++-- - utils/pdftohtml.cc | 4 ++-- - utils/pdftoppm.cc | 2 +- - utils/pdftops.cc | 4 ++-- - utils/pdftotext.cc | 4 ++-- - 23 files changed, 76 insertions(+), 59 deletions(-) - -commit a04ee3ea6066c97d41fc40d5d97c600a1870855a -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Apr 5 16:50:58 2010 +0100 - - forgot my (C) - - poppler/Form.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit ed723c8ac4a21a50d7d236cdcf7a635defd8dffb -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Apr 5 16:50:15 2010 +0100 - - The copy constructor of GooString never worked, so do not use it - - poppler/Form.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit a28be8e4009b86fdfd92da928def194225a736c6 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Apr 5 16:49:06 2010 +0100 - - Add some const correctnes to GooString - - goo/GooString.cc | 12 ++++++------ - goo/GooString.h | 21 ++++++++++++--------- - 2 files changed, 18 insertions(+), 15 deletions(-) - -commit 46aee9e4d225b88a3dfd4afbe57259f337bb15d3 -Author: Hib Eris <hib@hiberis.nl> -Date: Mon Apr 5 14:36:09 2010 +0200 - - Use PDFDocFactory in utils - - utils/pdffonts.cc | 16 ++++++++-------- - utils/pdfimages.cc | 11 ++++++++++- - utils/pdfinfo.cc | 31 +++++++------------------------ - utils/pdftoabw.cc | 10 +++++++++- - utils/pdftohtml.cc | 10 +++++++++- - utils/pdftoppm.cc | 17 +++++++++++------ - utils/pdftops.cc | 9 ++++++++- - utils/pdftotext.cc | 14 +++++++------- - 8 files changed, 69 insertions(+), 49 deletions(-) - -commit d487a90688c4431075c9e4db040b3b02625e208f -Author: Hib Eris <hib@hiberis.nl> -Date: Mon Apr 5 14:35:52 2010 +0200 - - Add PDFDocFactory - - CMakeLists.txt | 2 ++ - poppler/Makefile.am | 2 ++ - poppler/PDFDocFactory.cc | 71 - ++++++++++++++++++++++++++++++++++++++++++++++++ - poppler/PDFDocFactory.h | 42 ++++++++++++++++++++++++++++ - 4 files changed, 117 insertions(+) - -commit 869135920831fb0d15db734f3dcd7a67146cc241 -Author: Hib Eris <hib@hiberis.nl> -Date: Wed Feb 24 15:24:26 2010 +0100 - - Add CurlPDFDocBuilder - - CMakeLists.txt | 2 ++ - poppler/CurlPDFDocBuilder.cc | 46 - ++++++++++++++++++++++++++++++++++++++++++++ - poppler/CurlPDFDocBuilder.h | 30 +++++++++++++++++++++++++++++ - poppler/Makefile.am | 6 ++++-- - 4 files changed, 82 insertions(+), 2 deletions(-) - -commit ec5c6117a64f9cb03560091c4d7948d4287b6975 -Author: Hib Eris <hib@hiberis.nl> -Date: Thu Feb 25 11:23:28 2010 +0100 - - Add LocalPDFDocBuilder and StdinPDFDocBuilder - - CMakeLists.txt | 4 ++++ - poppler/LocalPDFDocBuilder.cc | 45 - +++++++++++++++++++++++++++++++++++++++++++ - poppler/LocalPDFDocBuilder.h | 30 +++++++++++++++++++++++++++++ - poppler/Makefile.am | 4 ++++ - poppler/StdinPDFDocBuilder.cc | 42 - ++++++++++++++++++++++++++++++++++++++++ - poppler/StdinPDFDocBuilder.h | 30 +++++++++++++++++++++++++++++ - 6 files changed, 155 insertions(+) - -commit 919b735d1c0b99bf72280aff8db87ba503954498 -Author: Hib Eris <hib@hiberis.nl> -Date: Sun Apr 4 11:05:35 2010 +0200 - - Add PDFDocBuilder - - CMakeLists.txt | 1 + - poppler/Makefile.am | 1 + - poppler/PDFDocBuilder.h | 32 ++++++++++++++++++++++++++++++++ - 3 files changed, 34 insertions(+) - -commit 1ab07faf05661d6d92186974c4b1c279b6178747 -Author: Hib Eris <hib@hiberis.nl> -Date: Sun Apr 4 11:29:53 2010 +0200 - - Add PDFDoc::ErrorPDFDoc - - poppler/PDFDoc.cc | 14 ++++++++++++++ - poppler/PDFDoc.h | 3 +++ - 2 files changed, 17 insertions(+) - -commit efc7e5efeddd8f70b7c74573d3194aba0a7d4631 -Author: Hib Eris <hib@hiberis.nl> -Date: Sun Apr 4 11:17:37 2010 +0200 - - Cleanup PDFDoc - - poppler/PDFDoc.cc | 40 +++++++++++++++------------------------- - poppler/PDFDoc.h | 3 ++- - 2 files changed, 17 insertions(+), 26 deletions(-) - -commit 08a3435e67ebf21beac2fefcbd21ad65f9293fd1 -Author: Hib Eris <hib@hiberis.nl> -Date: Tue Feb 23 02:29:26 2010 +0100 - - Add HTTP support using libcurl - - With libcurl, poppler can handle documents over http. - - CMakeLists.txt | 18 ++++++++ - config.h.cmake | 6 +++ - configure.ac | 16 +++++++ - poppler/CurlCachedFile.cc | 95 - ++++++++++++++++++++++++++++++++++++++++++ - poppler/CurlCachedFile.h | 39 +++++++++++++++++ - poppler/Makefile.am | 20 +++++++++ - poppler/poppler-config.h.cmake | 5 +++ - poppler/poppler-config.h.in | 5 +++ - utils/pdfinfo.cc | 16 ++++++- - 9 files changed, 219 insertions(+), 1 deletion(-) - -commit a87abf6ad9fb66d35a70c9412adc5d8ba2889b96 -Author: Hib Eris <hib@hiberis.nl> -Date: Wed Feb 24 14:46:59 2010 +0100 - - Use cached files to read from stdin in pdfinfo - - This fixes reading from stdin. - - utils/pdfinfo.cc | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -commit 958b04b14baf03c07492fa1cbd225d9968b9efc1 -Author: Hib Eris <hib@hiberis.nl> -Date: Tue Feb 23 02:02:10 2010 +0100 - - Add support for reading a cached file from stdin - - CMakeLists.txt | 2 ++ - poppler/Makefile.am | 2 ++ - poppler/StdinCachedFile.cc | 37 +++++++++++++++++++++++++++++++++++++ - poppler/StdinCachedFile.h | 26 ++++++++++++++++++++++++++ - 4 files changed, 67 insertions(+) - -commit 9539f75bd06150a3868209c5b04a75f5253722cc -Author: Hib Eris <hib@hiberis.nl> -Date: Sat Apr 3 15:08:20 2010 +0200 - - Add support for cached files - - CMakeLists.txt | 2 + - poppler/CachedFile.cc | 246 - ++++++++++++++++++++++++++++++++++++++++++++++++++ - poppler/CachedFile.h | 113 +++++++++++++++++++++++ - poppler/Makefile.am | 2 + - poppler/Stream.cc | 102 +++++++++++++++++++++ - poppler/Stream.h | 58 ++++++++++++ - 6 files changed, 523 insertions(+) - -commit 8c6aefb8aa8929b9c47791d3062ed3ac8512626f -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Apr 4 16:08:12 2010 +0200 - - [lexer] Correctly parse numbers with '+' sign - - See GNOME Bug: https://bugzilla.gnome.org/show_bug.cgi?id=614549 - - poppler/Lexer.cc | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -commit ab5044e451e3714d385295f0b4ce9a15c8f2562c -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Apr 4 12:32:42 2010 +0100 - - Add the -o[dd] and -e[ven] options to pdftoppm - - I've been using this patch forever and it's a pain to apply and - unapply - it each time - - utils/pdftoppm.1 | 6 ++++++ - utils/pdftoppm.cc | 8 ++++++++ - 2 files changed, 14 insertions(+) - -commit 0e371fb628a7e7d0cc1656e6405af4c97dbebf5d -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Apr 4 12:30:34 2010 +0100 - - Fix my roll optimization - - Thanks Carlos for noticing - - poppler/Function.cc | 12 +++++++----- - 1 file changed, 7 insertions(+), 5 deletions(-) - -commit a32f6f9ebaed3e4827b9dc6cb37e307c2798f521 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Mar 28 18:43:14 2010 +0200 - - [cairo] Do not change device offset of mask surface - - Also call cairo_paint() after set_source_rgb() to paint the - background. - Fixes bug #27208. - - poppler/CairoOutputDev.cc | 13 ++----------- - 1 file changed, 2 insertions(+), 11 deletions(-) - -commit efa5d9544d29252e3df36cc4e65c3d880b3c5172 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Mar 27 22:11:49 2010 +0000 - - remove empty section - - NEWS | 2 -- - 1 file changed, 2 deletions(-) - -commit 5722df7a5387e43ec73f659ca58d2d07b9c4be3b -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Mar 27 22:04:43 2010 +0000 - - poppler 0.13.2 - - CMakeLists.txt | 2 +- - NEWS | 39 +++++++++++++++++++++++++++++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - qt4/src/Doxyfile | 2 +- - 5 files changed, 43 insertions(+), 4 deletions(-) - -commit b82fd707747b9d87ebf3c8f7ce5ab70ccdf82809 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Mar 27 22:00:58 2010 +0000 - - gtk-doc changes - - glib/reference/tmpl/poppler-action.sgml | 7 +++---- - glib/reference/tmpl/poppler-annot.sgml | 9 --------- - glib/reference/tmpl/poppler-private.sgml | 10 ++++++++++ - glib/reference/tmpl/poppler-unused.sgml | 8 ++++++++ - glib/reference/tmpl/poppler.sgml | 10 ++++++++++ - 5 files changed, 31 insertions(+), 13 deletions(-) - -commit ed0354be4eac615b80e7a868984cc527853788b4 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Mar 27 21:44:59 2010 +0000 - - some forgotten copyrights - - qt/poppler-page.cc | 2 +- - qt4/src/poppler-document.cc | 2 +- - qt4/src/poppler-movie.cc | 3 ++- - qt4/src/poppler-page.cc | 2 +- - 4 files changed, 5 insertions(+), 4 deletions(-) - -commit 2aedeedf9ef2e2d3eb17bc36d728e68c2f7af762 -Author: Hib Eris <hib@hiberis.nl> -Date: Sat Mar 27 14:38:27 2010 +0000 - - Correctly initialize actualText - - poppler/TextOutputDev.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit b53f9b203598555d6d706c3804aba013b8566921 -Author: Jan Engelhardt <jengelh@medozas.de> -Date: Sat Mar 27 13:23:42 2010 +0000 - - make qt3 detection use pkgconfig - - m4/qt.m4 | 101 - +++++---------------------------------------------------- - qt/Makefile.am | 4 +-- - 2 files changed, 10 insertions(+), 95 deletions(-) - -commit 320d4cee46e108498440179d8f9eab22cd5383d9 -Author: Pino Toscano <pino@kde.org> -Date: Wed Mar 24 21:51:58 2010 +0100 - - Revert "no more needed" - - This reverts commit 24d6bc8c78cb3148db2098ae4d69bd744340cf52. - It is actually needed. - - cpp/tests/CMakeLists.txt | 1 + - 1 file changed, 1 insertion(+) - -commit af21b5ab366bfdda203c26a77f4ae6ed0e70f64e -Author: Pino Toscano <pino@kde.org> -Date: Tue Mar 23 00:13:21 2010 +0100 - - [CMake] remove the (now) unneeded stuff from Find{GLIB,GDK,GTK}.cmake, - and search for them - - this way each bit (GLIB, GDK, and GTK) can be enabled/disabled - independently from the others - - CMakeLists.txt | 4 +++- - cmake/modules/FindGDK.cmake | 14 +------------- - cmake/modules/FindGLIB.cmake | 14 +------------- - cmake/modules/FindGTK.cmake | 14 +------------- - 4 files changed, 6 insertions(+), 40 deletions(-) - -commit 9b93ed5ce6712ec4cdf58148628e95685c289ef5 -Author: Pino Toscano <pino@kde.org> -Date: Tue Mar 23 00:02:27 2010 +0100 - - [CMake] copy FindGTK.cmake as FindGLIB.cmake and FindGDK.cmake - - this way FindGTK.cmake can be split in the various parts - - cmake/modules/FindGDK.cmake | 34 ++++++++++++++++++++++++++++++++++ - cmake/modules/FindGLIB.cmake | 34 ++++++++++++++++++++++++++++++++++ - 2 files changed, 68 insertions(+) - -commit 0ec21cae0b4623644c3efca1d2836a9f38f25737 -Author: Pino Toscano <pino@kde.org> -Date: Mon Mar 22 22:11:04 2010 +0100 - - [Qt] add the unhandled cases for 'actionOCGState' - - qt/poppler-page.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 5211e09595135b8e6c68efd1b8b689b518092b84 -Author: Pino Toscano <pino@kde.org> -Date: Mon Mar 22 22:07:44 2010 +0100 - - [CMake/cpp] move the BUILD_CPP_TESTS option to the main CMakeLists.txt - - CMakeLists.txt | 1 + - cpp/tests/CMakeLists.txt | 3 --- - 2 files changed, 1 insertion(+), 3 deletions(-) - -commit 24d6bc8c78cb3148db2098ae4d69bd744340cf52 -Author: Pino Toscano <pino@kde.org> -Date: Mon Mar 22 22:00:55 2010 +0100 - - no more needed - - cpp/tests/CMakeLists.txt | 1 - - 1 file changed, 1 deletion(-) - -commit a07ef8f703ab896f89ed211a5780e4a669b04fc7 -Author: Pino Toscano <pino@kde.org> -Date: Mon Mar 22 22:00:15 2010 +0100 - - [CMake] revert addition of "-Wl,--no-add-needed" to the link flags, - if available - - for now it is safer without it - - cmake/modules/PopplerMacros.cmake | 6 ------ - 1 file changed, 6 deletions(-) - -commit 86debcc9bba28a7c86f01ca9e63bde5fcd541846 -Author: Pino Toscano <pino@kde.org> -Date: Mon Mar 22 21:49:22 2010 +0100 - - [CMake] add "-ansi" to the CXXFLAGS only on Linux - - cmake/modules/PopplerMacros.cmake | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -commit 0819acd52a2ce74f0e176626d7b2233e10232d53 -Merge: c4ddbe89 92738ebb -Author: Pino Toscano <pino@kde.org> -Date: Mon Mar 22 21:43:01 2010 +0100 - - Merge branch 'master' of ssh://git.freedesktop.org/git/poppler/poppler - -commit 92738ebb8a9c7cfc879aae59c2cbdf3159f03cd3 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Mar 22 20:28:15 2010 +0000 - - Add a search overload that takes doubles - - QRectF is evil and is float in some arch and causes search to loop - infinitely because of double->float conversion - - qt4/src/poppler-page.cc | 22 +++++++++++++++------- - qt4/src/poppler-qt4.h | 16 ++++++++++++++-- - 2 files changed, 29 insertions(+), 9 deletions(-) - -commit 0a895f14c8125c5de7b97e8e799459c431eb51cb -Author: Thomas Freitag <Thomas.Freitag@alfa.de> -Date: Mon Mar 22 19:03:54 2010 +0000 - - correctly initialize the grayscale softmask color - - Fixes file with sha1sum e6e1576803a1bd74ad822eebbd750ee7b8357d25 - - poppler/SplashOutputDev.cc | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -commit c4ddbe89df9e48343a9606728b7c182080d87ece -Author: Patrick Spendrin <ps_ml@gmx.de> -Date: Sat Mar 20 21:55:17 2010 +0100 - - [CMake] when the conf configuration backend is "win32", set the - required Internet Explorer version to 5.0 - - ... as done with autotools as well - - CMakeLists.txt | 6 ++++++ - 1 file changed, 6 insertions(+) - -commit 97da1f9d060493d9fb54a20e980c3f6e2b82c97e -Author: Pino Toscano <pino@kde.org> -Date: Sat Mar 20 17:51:07 2010 +0100 - - [CMake] check whether a link flag is supported before adding it to - the link flags - - this way we can add -Wl,--as-needed and -Wl,--no-add-needed only if - the current GCC/LD supports them - - cmake/modules/PopplerMacros.cmake | 23 ++++++++++++++++++++--- - 1 file changed, 20 insertions(+), 3 deletions(-) - -commit 223bce6d14e632f457a81b2ec091fe16369d2eb6 -Author: Pino Toscano <pino@kde.org> -Date: Sat Mar 20 14:08:58 2010 +0100 - - [CMake] with GCC, pass --as-needed and --no-add-needed to the linker - - --as-needed allows to avoid overlinking, linking only to the libraries - whose symbols are actually used - --no-add-needed makes the linker not use the NEEDED libraries - automatically, so we have to always make sure we specify all the - libraries actually used in a exe/lib - - cmake/modules/PopplerMacros.cmake | 4 ++++ - 1 file changed, 4 insertions(+) - -commit fc761f0d385708daaef1b95968532795b04f11b0 -Author: Pino Toscano <pino@kde.org> -Date: Sat Mar 20 14:05:59 2010 +0100 - - [CMake] poppler-dump uses parseargs.c which uses the poppler core API, - so it must link to it - - cpp/tests/CMakeLists.txt | 1 + - 1 file changed, 1 insertion(+) - -commit a210440b05d14efc53224a10e8b3ac7d508043b5 -Author: Pino Toscano <pino@kde.org> -Date: Sat Mar 20 14:04:02 2010 +0100 - - [CMake] poppler-glib uses the freetype API, so it must explicitly - link to it - - glib/CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit f5d352666b92cee0390470d7b892ec8dcbf046a5 -Author: Pino Toscano <pino@kde.org> -Date: Sat Mar 20 14:03:19 2010 +0100 - - [CMake] pdftoabw uses the libxml2 API, so it must explicitly link - to it - - utils/CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 3fc2c4affe825f4aabcee161ec794338bd359403 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Mar 18 13:52:52 2010 +0100 - - [glib] Use g_slice_new/free instead of g_new/free to alloc/free - iterators - - glib/poppler-document.cc | 27 +++++++++++++-------------- - 1 file changed, 13 insertions(+), 14 deletions(-) - -commit 7bd6a8558646983669ce699f83d5ed42d7fce476 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Mar 18 13:34:03 2010 +0100 - - [glib] Move find_annot_movie_for_action() from page to action - - And remove _poppler_action_movie_set_movie(). - - glib/poppler-action.cc | 93 - ++++++++++++++++++++++++++++++++++++++++++++------ - glib/poppler-page.cc | 79 ------------------------------------------ - glib/poppler-private.h | 2 -- - 3 files changed, 82 insertions(+), 92 deletions(-) - -commit e5e3d310aa488638431dd85ac3383a12056674bf -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Mar 18 12:20:26 2010 +0100 - - Update copyright header - - poppler/Link.cc | 2 +- - poppler/Link.h | 1 + - 2 files changed, 2 insertions(+), 1 deletion(-) - -commit c76870178a031e437de3f9ed7baa64efb96955d6 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Mar 18 12:13:36 2010 +0100 - - [glib-demo] OCG State Actions demo - - glib/demo/utils.c | 64 - +++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 64 insertions(+) - -commit 456e42f91dfbf73b71a5dbdde13d7ccdb5637d79 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Mar 18 12:12:51 2010 +0100 - - [glib] Add support for OCG State actions - - glib/poppler-action.cc | 125 - +++++++++++++++++++++++++++++++++++++++++++++++++ - glib/poppler-action.h | 25 +++++++++- - glib/poppler.h | 1 + - 3 files changed, 150 insertions(+), 1 deletion(-) - -commit 4b109899e0732bbf65cacd875829e869e61eda48 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Mar 18 12:10:19 2010 +0100 - - [glib] Make get_layer_rbgroup() and get_layers() doc funcs public - for internal use - - glib/poppler-document.cc | 12 ++++++------ - glib/poppler-private.h | 3 +++ - 2 files changed, 9 insertions(+), 6 deletions(-) - -commit 38a55f6118debf994ce1fc41e987b0e3766047ba -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Mar 18 12:08:30 2010 +0100 - - Add support for Set-OCG-State actions - - Fixes bug #23522. - - poppler/Link.cc | 80 - +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - poppler/Link.h | 31 ++++++++++++++++++++++ - 2 files changed, 111 insertions(+) - -commit bf398e53b0823d0a6272679858b67c5ffd704425 -Author: Pino Toscano <pino@kde.org> -Date: Wed Mar 17 23:06:44 2010 +0100 - - [CMake] fix pkg-config executable variable name - - CMakeLists.txt | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit ab1a37666704d6b15c19b694ee191327847c23da -Author: Pino Toscano <pino@kde.org> -Date: Wed Mar 17 23:04:01 2010 +0100 - - [CMake] proper way of looking for pkg-config - - cmake/modules/FindGTK.cmake | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 7f07a7dcea031f99a9a6d7c424184a2e69ee0062 -Author: Pino Toscano <pino@kde.org> -Date: Wed Mar 17 22:58:08 2010 +0100 - - [CMake] update FindFontconfig.cmake with a more recent version - - ... present in KDE (as before) - - cmake/modules/FindFontconfig.cmake | 15 +++++++++------ - 1 file changed, 9 insertions(+), 6 deletions(-) - -commit beee143ffbdc699ab19f10a01e5747200ea1927a -Author: Pino Toscano <pino@kde.org> -Date: Wed Mar 17 18:36:32 2010 +0100 - - [CMake] set the LINK_INTERFACE_LIBRARIES for the poppler and - poppler-cpp libraries - - this should reduce the libraries linked by frontends and utility - applications - - CMakeLists.txt | 1 + - cpp/CMakeLists.txt | 1 + - 2 files changed, 2 insertions(+) - -commit 5ab791cb2a029edcde84b00a47165adfe4d98a98 -Author: Pino Toscano <pino@kde.org> -Date: Wed Mar 17 16:39:38 2010 +0100 - - [CMake] small cleanups in FindGTK.cmake - - - update the header will all the stuff found and the variables set - - add my copyright for this year - - remove no more useful UsePkgConfig inclusion - - cmake/modules/FindGTK.cmake | 17 ++++++++++++----- - 1 file changed, 12 insertions(+), 5 deletions(-) - -commit fcbc76d82e3059c8288fbdc8da117ac9b38a70f2 -Author: Pino Toscano <pino@kde.org> -Date: Wed Mar 17 16:36:41 2010 +0100 - - [CMake] switch gtk2 (gtk+, gdk-pixbuf, gthread, gio) search to use - the new pkg_check_modules() way - - cmake/modules/FindGTK.cmake | 27 ++------------------------- - 1 file changed, 2 insertions(+), 25 deletions(-) - -commit 5b8135e0899aa3578045eca40940a3495c48d895 -Author: Pino Toscano <pino@kde.org> -Date: Wed Mar 17 16:27:40 2010 +0100 - - [CMake] link poppler-glib to the gdk2 libraries, if gdk2 was found - - glib/CMakeLists.txt | 3 +++ - 1 file changed, 3 insertions(+) - -commit 3dc4979d72048e81ae3b2d60dab11e791ac95696 -Author: Pino Toscano <pino@kde.org> -Date: Wed Mar 17 16:26:04 2010 +0100 - - [CMake] switch gdk2 search to use the new pkg_check_modules() way - - cmake/modules/FindGTK.cmake | 13 +------------ - 1 file changed, 1 insertion(+), 12 deletions(-) - -commit 0ef3d899cb8dea75c97ae1038cac5006f97bc0d2 -Author: Pino Toscano <pino@kde.org> -Date: Wed Mar 17 16:05:07 2010 +0100 - - [CMake] switch glib2 search to use the new pkg_check_modules() way - - cmake/modules/FindGTK.cmake | 18 ++---------------- - 1 file changed, 2 insertions(+), 16 deletions(-) - -commit d2dc83cb8de481e44ea584eee77881978af920fa -Author: Pino Toscano <pino@kde.org> -Date: Wed Mar 17 15:56:16 2010 +0100 - - [CMake] rename GLIB_VERSION to GLIB_REQUIRED - - this way it matches autotools, and it is going to not conflict with - my next changes - - CMakeLists.txt | 4 ++-- - cmake/modules/FindGTK.cmake | 2 +- - 2 files changed, 3 insertions(+), 3 deletions(-) - -commit 34accfe27305cae18e09243ab2a607287b86fa47 -Author: Pino Toscano <pino@kde.org> -Date: Wed Mar 17 13:55:09 2010 +0100 - - [CMake] set all the definitions for poppler-glib in a single place - - glib/CMakeLists.txt | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 3d93daf50c61019ca70f42e7ccf33897800b262a -Author: Pino Toscano <pino@kde.org> -Date: Wed Mar 17 13:49:22 2010 +0100 - - [CMake] no need to check for BUILD_GTK_TESTS for single tests - - poppler_add_test(... BUILD_GTK_TESTS ...) takes care of that already - - glib/CMakeLists.txt | 4 ++-- - test/CMakeLists.txt | 4 ++-- - 2 files changed, 4 insertions(+), 4 deletions(-) - -commit 946a11345d01d39538d22114e50aa3e179059883 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Mar 15 20:24:25 2010 +0100 - - [build] Update cmake files - - CMakeLists.txt | 2 ++ - glib/CMakeLists.txt | 4 ++++ - 2 files changed, 6 insertions(+) - -commit 922c0fe392ba439453edb5b2e88b74f0caa586b3 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Mar 15 20:08:23 2010 +0100 - - [glib-demo] Rendition actions demo - - glib/demo/utils.c | 112 - ++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 112 insertions(+) - -commit 163b3f79d67543bc37b64875e30dcc9b7053e1d5 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Mar 15 20:08:00 2010 +0100 - - [glib] Add support for rendition actions - - glib/poppler-action.cc | 22 ++++++++++++++++++++++ - glib/poppler-action.h | 14 +++++++++++++- - 2 files changed, 35 insertions(+), 1 deletion(-) - -commit d9b1e40751beddf48a8694b20bfcc4b4cb41060a -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Mar 15 20:06:45 2010 +0100 - - [glib] Add PopplerMedia representing a Rendition Media Clip - - glib/Makefile.am | 2 + - glib/poppler-media.cc | 302 - +++++++++++++++++++++++++++++++++++++++++++++++++ - glib/poppler-media.h | 53 +++++++++ - glib/poppler-private.h | 2 + - glib/poppler.h | 2 + - 5 files changed, 361 insertions(+) - -commit 0224b81c4729a98a56b7a68054422ea655018d6a -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Mar 15 17:54:03 2010 +0100 - - [glib-demo] Add page number to annots demo - - glib/demo/annots.c | 4 ++++ - 1 file changed, 4 insertions(+) - -commit 0153b892c63e4fccd0819150cf7b4213857a11c5 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Mar 15 17:49:51 2010 +0100 - - [glib] Add poppler_annot_get_page_index() to get the page associated - to annot - - glib/poppler-annot.cc | 19 +++++++++++++++++++ - glib/poppler-annot.h | 1 + - 2 files changed, 20 insertions(+) - -commit b47337ea91696fea8f42a68a6fa160681ab284b2 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Mar 15 17:49:17 2010 +0100 - - [annots] Checks screen annots associated with a rendition action - have a valid page ref - - poppler/Annot.cc | 6 ++++++ - 1 file changed, 6 insertions(+) - -commit 9417fd793ec8d806822669aa614193073e7dfe50 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Mar 15 16:52:30 2010 +0100 - - [annots] Save page index of the page associated with the annot - - poppler/Annot.cc | 14 +++++--------- - poppler/Annot.h | 4 ++-- - 2 files changed, 7 insertions(+), 11 deletions(-) - -commit 36b76a5d01b74c6381433b6f6f7ffb9f02696a60 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Mar 15 14:12:11 2010 +0100 - - Rework LinkRendition to follow the spec - - poppler/Link.cc | 68 - +++++++++++++++++++++++++++++++++++---------------------- - poppler/Link.h | 12 ++++++---- - 2 files changed, 50 insertions(+), 30 deletions(-) - -commit 7b5885ee7d2026df9a6e87327b6d02f37d79b8b2 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Mar 15 12:25:12 2010 +0100 - - [glib-demo] Annot screen demo - - glib/demo/annots.c | 17 +++++++++++++++++ - 1 file changed, 17 insertions(+) - -commit bdb76c7cb89bcb6fb139b0ef348d96b7780d57ed -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Mar 15 12:24:19 2010 +0100 - - [glib] Add support for screen annotation - - Based on patch by Sam Kaplan. - - glib/poppler-annot.cc | 75 - ++++++++++++++++++++++++++++++++++++++++++++++++++ - glib/poppler-annot.h | 8 ++++++ - glib/poppler-page.cc | 3 ++ - glib/poppler-private.h | 1 + - glib/poppler.h | 1 + - 5 files changed, 88 insertions(+) - -commit 54892b1375e360113432b07c6ba058f861d21fe8 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Mar 15 12:21:30 2010 +0100 - - [annots] Save the action already parsed in AnnotScreen - - poppler/Annot.cc | 9 +++++++-- - poppler/Annot.h | 5 +++-- - 2 files changed, 10 insertions(+), 4 deletions(-) - -commit 5a84a2d749478f19631dbfad2be06ec4ea85038c -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Mar 15 11:16:17 2010 +0100 - - [glib-demo] Annot and links movie demo - - glib/demo/annots.c | 20 ++++++++++ - glib/demo/utils.c | 115 - ++++++++++++++++++++++++++++++++++++++++++++++++++++- - glib/demo/utils.h | 3 ++ - 3 files changed, 137 insertions(+), 1 deletion(-) - -commit 2cf5ee4f62089df099f78cd4d39a4eb7589d1b47 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Mar 15 11:04:17 2010 +0100 - - [glib] Add support for movie actions - - Based on patch by Hugo Mercier. - - glib/poppler-action.cc | 35 ++++++++++++++++++---- - glib/poppler-action.h | 15 ++++++++-- - glib/poppler-page.cc | 81 - +++++++++++++++++++++++++++++++++++++++++++++++++- - glib/poppler-private.h | 2 ++ - 4 files changed, 125 insertions(+), 8 deletions(-) - -commit 132b6f072fefd231d42f31626f1b5009c4e8319e -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Mar 15 10:56:23 2010 +0100 - - [glib] Add support for movie annotations - - Based on patch by Hugo Mercier. - - glib/poppler-annot.cc | 97 - ++++++++++++++++++++++++++++++++++++++++++++++++++ - glib/poppler-annot.h | 10 ++++++ - glib/poppler-page.cc | 3 ++ - glib/poppler-private.h | 1 + - glib/poppler.h | 1 + - 5 files changed, 112 insertions(+) - -commit aecad2bb12be44825d273e364ec6a0444dac5605 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Mar 15 10:48:03 2010 +0100 - - [glib] Add PopplerMovie class - - glib/Makefile.am | 2 + - glib/poppler-movie.cc | 140 - +++++++++++++++++++++++++++++++++++++++++++++++++ - glib/poppler-movie.h | 42 +++++++++++++++ - glib/poppler-private.h | 2 + - glib/poppler.h | 2 + - 5 files changed, 188 insertions(+) - -commit 5b3234a16e0d465bff2b5e277cb64b4f4b0a8dbd -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Mar 14 16:10:26 2010 +0100 - - Split Movie class into Rendition and Movie classes to follow the spec - - poppler/Annot.cc | 16 +- - poppler/Link.cc | 10 +- - poppler/Link.h | 6 +- - poppler/Makefile.am | 2 + - poppler/Movie.cc | 438 - +++++------------------------------------------ - poppler/Movie.h | 138 +++------------ - poppler/Rendition.cc | 400 - +++++++++++++++++++++++++++++++++++++++++++ - poppler/Rendition.h | 157 +++++++++++++++++ - qt4/src/poppler-movie.cc | 9 +- - 9 files changed, 657 insertions(+), 519 deletions(-) - -commit f9c163730478e3b6d8a1e73dbae6c52c28ae1e84 -Author: Pino Toscano <pino@kde.org> -Date: Mon Mar 8 14:49:12 2010 +0100 - - [Qt4] include Object.h and Annot.h, now needed - - qt4/src/poppler-movie.cc | 2 ++ - 1 file changed, 2 insertions(+) - -commit a00532f509c19c5455e0db5068db95dd4583e8dd -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Mar 8 14:22:53 2010 +0100 - - Check for Null instead of None to know whether a dict entry is present - - Dict::lookup returns obj->initNull() when the key is not found. - - poppler/Movie.cc | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit b51e66c9a7e2f7f39ae1edf8bda02a7bc1ad4ebd -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Mar 8 14:15:22 2010 +0100 - - [annots] Create appearance stream for Movie Annotations when not - defined - - See bug #23108 - - poppler/Annot.cc | 103 - ++++++++++++++++++++++++++++++++++++++++++++++++++++++- - poppler/Annot.h | 4 ++- - 2 files changed, 105 insertions(+), 2 deletions(-) - -commit fae59411852e5c2c45825c5ea963318f1ed5dc6a -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Mar 8 14:07:09 2010 +0100 - - Fix handling of poster in Movie - - Poster is not always a stream, it can be a boolean too. Also, get the - reference when available instead of fetching the stream. - - poppler/Movie.cc | 25 ++++++++++++------------- - poppler/Movie.h | 6 ++++-- - 2 files changed, 16 insertions(+), 15 deletions(-) - -commit a451f83d101bf265a1e7e2a17c0b320895e70f4e -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Mar 7 12:22:57 2010 +0100 - - Save width, height (aspect) in Movie object and provide getAspect() - method - - poppler/Movie.cc | 3 ++- - poppler/Movie.h | 4 ++++ - 2 files changed, 6 insertions(+), 1 deletion(-) - -commit f88d469f860da17055fc4b98b64aef241fcf0185 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Mar 6 12:33:40 2010 +0100 - - Move Movie objects parsing code from Annot to Movie - - poppler/Annot.cc | 244 - ++------------------------------------------- - poppler/Annot.h | 73 +------------- - poppler/Link.cc | 4 +- - poppler/Movie.cc | 255 - +++++++++++++++++++++++++++++++++++++++-------- - poppler/Movie.h | 25 +++-- - qt4/src/poppler-movie.cc | 11 +- - 6 files changed, 246 insertions(+), 366 deletions(-) - -commit ec9138b574c7226ad733880d3d43b86bb72073f4 -Author: Pino Toscano <pino@kde.org> -Date: Sun Mar 7 23:17:50 2010 +0100 - - [autotools] add also cpp/tests/CMakeLists.txt to the "dist files" - - Makefile.am | 1 + - 1 file changed, 1 insertion(+) - -commit ef3258d6fc57e7a62d951cc826804e50e8e1b526 -Author: Pino Toscano <pino@kde.org> -Date: Sun Mar 7 23:14:12 2010 +0100 - - [autotools] fix location of poppler-config.h.cmake - - Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit fd1d9c882997ff35acd5a458e9dfeba3ad6c8b25 -Author: Pino Toscano <pino@kde.org> -Date: Sun Mar 7 22:42:06 2010 +0100 - - [CMake] just enable what needed each time - - CMakeLists.txt | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 476bde472a7e694afde96a04ea335fe9582d6fad -Author: Pino Toscano <pino@kde.org> -Date: Sun Mar 7 22:39:45 2010 +0100 - - [CMake] add small description for the zlib option - - taken from two bits in configure.ac - - CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 1267d7e0c36e262984070a3b55fea46e7289a4b4 -Author: Pino Toscano <pino@kde.org> -Date: Sun Mar 7 19:34:03 2010 +0100 - - [CMake] add a note about gtk-doc not supported yet - - CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 201b18ad0837e84d874b56e1b0469d1b2d45378b -Author: Pino Toscano <pino@kde.org> -Date: Sun Mar 7 19:30:36 2010 +0100 - - [CMake] sync with poppler-config.h.in: add - WITH_FONTCONFIGURATION_{FONTCONFIG,WIN32} - - poppler/poppler-config.h.cmake | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -commit 0d0044e8cc2d406f066338102ec73e1b56214cc3 -Author: Pino Toscano <pino@kde.org> -Date: Sun Mar 7 19:25:27 2010 +0100 - - [CMake] move poppler-config.h.cmake in the poppler subdirectory, - where poppler-config.h.in is - - CMakeLists.txt | 2 +- - poppler-config.h.cmake => poppler/poppler-config.h.cmake | 0 - 2 files changed, 1 insertion(+), 1 deletion(-) - -commit f785e29a901d2c76204dd26e9585446fdd817ebd -Author: Pino Toscano <pino@kde.org> -Date: Sun Mar 7 18:35:34 2010 +0100 - - [CMake] remove the generated poppler-enums.{c,h} in the clean target - - ie usually when doing `make clean' - - glib/CMakeLists.txt | 4 ++++ - 1 file changed, 4 insertions(+) - -commit 369604603375dbe3516136b6f8f9d0c26e0b744f -Author: Pino Toscano <pino@kde.org> -Date: Sun Mar 7 18:26:45 2010 +0100 - - [CMake] use the --template option of glib-mkenums (like done with - autotools) - - glib/CMakeLists.txt | 24 ++++-------------------- - 1 file changed, 4 insertions(+), 20 deletions(-) - -commit bbcbb34fec10c90edd5960bdbcc6849bc8f39526 -Author: Pino Toscano <pino@kde.org> -Date: Sun Mar 7 17:34:40 2010 +0100 - - [CMake] set POPPLER_GLIB_DISABLE_DEPRECATED and - POPPLER_GLIB_DISABLE_SINGLE_INCLUDES as done with autotools - - CMakeLists.txt | 6 ++++++ - glib/CMakeLists.txt | 6 +++++- - 2 files changed, 11 insertions(+), 1 deletion(-) - -commit 190fa971c12ca1b3007f6ba349a77a7c15c47490 -Author: Pino Toscano <pino@kde.org> -Date: Sun Mar 7 17:24:25 2010 +0100 - - reorder to match what's in the correspondent .in - - glib/poppler-features.h.cmake | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit ff46def8b178420a86a974ec2ce767a538bba8be -Author: Pino Toscano <pino@kde.org> -Date: Sun Mar 7 17:23:16 2010 +0100 - - [CMake] GDK_FEATURE is no more needed here - - glib/CMakeLists.txt | 1 - - 1 file changed, 1 deletion(-) - -commit 1eb8026a3060ef61a88c535177510f7ac7e7fc25 -Author: Pino Toscano <pino@kde.org> -Date: Sun Mar 7 17:19:58 2010 +0100 - - [CMake] set in one place whether to build the glib frontend - - CMakeLists.txt | 11 ++++++----- - 1 file changed, 6 insertions(+), 5 deletions(-) - -commit a1a6f23e2345814e147a72211ce9139555385223 -Author: Pino Toscano <pino@kde.org> -Date: Sun Mar 7 17:09:58 2010 +0100 - - [CMake] correctly set the GLIB_REQ stuff - - CMakeLists.txt | 1 + - poppler-glib.pc.cmake | 2 +- - 2 files changed, 2 insertions(+), 1 deletion(-) - -commit 0f2e5d6925c5938281d9bafc297a43867c4a915b -Author: Pino Toscano <pino@kde.org> -Date: Sun Mar 7 17:03:21 2010 +0100 - - [CMake] move the minimum GLib version to the main CMakeLists.txt - - CMakeLists.txt | 1 + - cmake/modules/FindGTK.cmake | 2 +- - 2 files changed, 2 insertions(+), 1 deletion(-) - -commit efdffba45d15b538dbfb294403e99f3a6470b4d9 -Author: Pino Toscano <pino@kde.org> -Date: Sun Mar 7 16:58:27 2010 +0100 - - [CMake] align the GDK stuff (GDK_{FEATURE,REQ}) to what done with - autotools - - CMakeLists.txt | 6 +++++- - poppler-glib.pc.cmake | 2 +- - 2 files changed, 6 insertions(+), 2 deletions(-) - -commit cfecc69b7f05920f543ee7e9aafeafaa4c3506fb -Author: Pino Toscano <pino@kde.org> -Date: Sun Mar 7 16:49:14 2010 +0100 - - [CMake] apparently there's not a minimum version requirement for GDK, - so drop the check - - cmake/modules/FindGTK.cmake | 5 +---- - 1 file changed, 1 insertion(+), 4 deletions(-) - -commit 8ff1cf03d2607b0f13bbbbf272f2b03d8927bd24 -Author: Pino Toscano <pino@kde.org> -Date: Sun Mar 7 16:47:21 2010 +0100 - - [CMake] first look for Cairo, then for GLib/GDK/GTK - - this starts to align to the searches done with autotools - also, move the CAIRO_FEATURE to the main CMakeLists.txt - - CMakeLists.txt | 19 +++++++++++-------- - glib/CMakeLists.txt | 1 - - 2 files changed, 11 insertions(+), 9 deletions(-) - -commit bcaf62b8e252594530d3050761ba563cf3b1fb6e -Author: Pino Toscano <pino@kde.org> -Date: Sun Mar 7 16:00:03 2010 +0100 - - [CMake] enhance/rewrite a bit the FindCairo module - - make use of some features of CMake 2.6 (as we require it): - - newer pkg-config handling (aka pkg_check_modules()) - - version checking for modules (PACKAGE_FIND_VERSION*) - - find_package_handle_standard_args() - also, after the pkg-config search to win32, search for cairo again - (double-check plus real search for win32) - furthermore, introduce CAIRO_INCLUDE_DIRS with the include paths - requires (kind of "obsoletes" CAIRO_CFLAGS, left there in case it - is used again) - - apply the changes to the rest of the build system (specify the - version needed, use the correct variable for includes) - - CMakeLists.txt | 2 +- - cmake/modules/FindCairo.cmake | 64 - +++++++++++++++++++++++++++---------------- - glib/CMakeLists.txt | 2 +- - 3 files changed, 43 insertions(+), 25 deletions(-) - -commit c96aa0f5fc74ae04f483485b787aaf65f1791991 -Author: Pino Toscano <pino@kde.org> -Date: Sun Mar 7 02:01:13 2010 +0100 - - add Patrick's copyright notices - - cpp/poppler-global.h | 1 + - goo/gtypes.h | 14 ++++++++++++++ - poppler/GlobalParams.cc | 1 + - poppler/SplashOutputDev.cc | 1 + - 4 files changed, 17 insertions(+) - -commit 3311bedd2eb831ef1fd553f3f50960331cf6885f -Author: Patrick Spendrin <ps_ml@gmx.de> -Date: Sun Mar 7 01:56:15 2010 +0100 - - MSVC: disable for the 'ustring' class the warning C4251 (which does - not apply) - - cpp/poppler-global.h | 8 ++++++++ - 1 file changed, 8 insertions(+) - -commit 9efa18397bd05fbd27c7811fa6e0f34ce94012e0 -Author: Patrick Spendrin <ps_ml@gmx.de> -Date: Sun Mar 7 01:48:03 2010 +0100 - - MSVC: disable warning C4800, which is of no use for now - - goo/gtypes.h | 4 ++++ - 1 file changed, 4 insertions(+) - -commit 3a88d1bf8d2c5a9e8014e0d46e24c9ec06556469 -Author: Patrick Spendrin <ps_ml@gmx.de> -Date: Sun Mar 7 01:26:10 2010 +0100 - - MSVC: no isfinite(), so provide it using _finite() - - poppler/SplashOutputDev.cc | 5 +++++ - 1 file changed, 5 insertions(+) - -commit 7774912c46f832f25c51b4cfc0e9430b1cd7fa1f -Author: Patrick Spendrin <ps_ml@gmx.de> -Date: Sun Mar 7 01:22:31 2010 +0100 - - MSVC: do not force constness here, so the right overload will - be chosen - - poppler/GlobalParams.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit cf07a5d85b402b6956c9605fbdc88bddcb94a3cf -Author: Pino Toscano <pino@kde.org> -Date: Sun Mar 7 00:49:07 2010 +0100 - - [CMake] show end yes/no message about the GDK usage - - just like done with autotools - - CMakeLists.txt | 1 + - 1 file changed, 1 insertion(+) - -commit 42c98f8eabe304d5e3dc8c1ebdd5b0b6c221e696 -Author: Pino Toscano <pino@kde.org> -Date: Sat Mar 6 17:18:08 2010 +0100 - - [CMake] make the font configuration backend selection take a string - (like with autotools) - - this way it is possible to set the cmake variable FONT_CONFIGURATION - to either "win32" (default on windows) or "fontconfig" (default - elsewhere) to the font backend to use - as a consequence, make fontconfig a requirement only if the font - backend chosen is "fontconfig" - - CMakeLists.txt | 39 +++++++++++++++++++++++++++++---------- - 1 file changed, 29 insertions(+), 10 deletions(-) - -commit bda6e7cd089f2970af2e9540b4415633ffcf0ebb -Author: Pino Toscano <pino@kde.org> -Date: Sat Mar 6 17:13:30 2010 +0100 - - [CMake] add a show_end_message() macro to show a generic string - as value - - make show_end_message_yesno() call it with the proper "yes" or - "no" string - - cmake/modules/PopplerMacros.cmake | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -commit d313c0f508711b3b7166b84608c43ebf1f07194b -Author: Pino Toscano <pino@kde.org> -Date: Sat Mar 6 17:08:59 2010 +0100 - - [CMake] rename the show_end_message() macro to - show_end_message_yesno() - - CMakeLists.txt | 26 +++++++++++++------------- - cmake/modules/PopplerMacros.cmake | 4 ++-- - 2 files changed, 15 insertions(+), 15 deletions(-) - -commit 0425ff835fa26df5e25e628a6c56f3a180713905 -Author: Pino Toscano <pino@kde.org> -Date: Fri Mar 5 22:21:56 2010 +0100 - - update copyright - - poppler/ArthurOutputDev.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit c5ea135ca58e112110be3ae10d887f3188172765 -Author: Pino Toscano <pino@kde.org> -Date: Fri Mar 5 22:14:57 2010 +0100 - - [arthur] update the miter limit - - poppler/ArthurOutputDev.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 552f344b3e3df7c796afa6946149b0a5590cc4f7 -Author: Pino Toscano <pino@kde.org> -Date: Fri Mar 5 22:04:39 2010 +0100 - - [arthur] update the line dash style - - poppler/ArthurOutputDev.cc | 12 +++++++++++- - 1 file changed, 11 insertions(+), 1 deletion(-) - -commit bc42ee05fceef0d0dd2ab0587c184dfc37cf29bf -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Mar 5 18:54:32 2010 +0000 - - fix copyright year - - poppler/CairoOutputDev.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit b21461e91ed671ef29fd3cf4780fda44f82a0679 -Author: Adrian Johnson <ajohnson@redneon.com> -Date: Fri Mar 5 15:14:08 2010 +0100 - - [cairo] Close image stream before resetting it again - - poppler/CairoOutputDev.cc | 2 ++ - 1 file changed, 2 insertions(+) - -commit 866bcc7edb47fe11355081045e2d316a4d530649 -Author: Pino Toscano <pino@kde.org> -Date: Thu Mar 4 14:19:50 2010 +0100 - - [Qt4] no need to save&restore on a newly created painter - - qt4/src/poppler-page.cc | 2 -- - 1 file changed, 2 deletions(-) - -commit 654698b556eb53eab7c2d55fc6b3fdd9e35173bb -Author: Pino Toscano <pino@kde.org> -Date: Thu Mar 4 13:16:11 2010 +0100 - - [Qt4] use Arthur unconditionally - - arthur is no more tied to splash, so can be used in an occasion - - qt4/src/poppler-document.cc | 2 +- - qt4/src/poppler-page.cc | 4 +--- - 2 files changed, 2 insertions(+), 4 deletions(-) - -commit 41931b6310d2ae81e622db904246f019ceb8410d -Author: Pino Toscano <pino@kde.org> -Date: Thu Mar 4 13:13:11 2010 +0100 - - [Qt4] compile Arthur unconditionally - - as the arthur output dev does not require splash anymore, we can - always compile it with poppler-qt4 - - poppler/Makefile.am | 4 ++-- - qt4/src/CMakeLists.txt | 6 +----- - qt4/src/Makefile.am | 6 +----- - 3 files changed, 4 insertions(+), 12 deletions(-) - -commit 48a29e2bbc9aa9bd0cb2775a2365c0ffdeb6ce87 -Author: Pino Toscano <pino@kde.org> -Date: Thu Mar 4 13:11:43 2010 +0100 - - [Arthur] make ArthurOutputDev compile even with Splash disabled - - text rendering is disabled in that case for now - - poppler/ArthurOutputDev.cc | 11 ++++++++++- - 1 file changed, 10 insertions(+), 1 deletion(-) - -commit 2013a19b6457753890affad8c4049f2ce4627df7 -Author: Pino Toscano <pino@kde.org> -Date: Thu Mar 4 13:02:43 2010 +0100 - - [CMake/tests] compile gtk-splash-test only if splash is enabled - - test/CMakeLists.txt | 14 +++++++++----- - 1 file changed, 9 insertions(+), 5 deletions(-) - -commit ae740c5cfefbae13f82b750e39fa3dbbdc94858b -Author: Pino Toscano <pino@kde.org> -Date: Tue Mar 2 23:22:06 2010 +0100 - - [cpp] update the copyrights - - cpp/poppler-document-private.h | 2 +- - cpp/poppler-document.cpp | 2 +- - cpp/poppler-embedded-file.cpp | 2 +- - cpp/poppler-embedded-file.h | 2 +- - cpp/poppler-global.cpp | 3 ++- - cpp/poppler-global.h | 2 +- - cpp/poppler-page.cpp | 2 +- - cpp/poppler-page.h | 2 +- - cpp/poppler-rectangle.h | 2 +- - cpp/poppler-toc.cpp | 2 +- - cpp/poppler-version.cpp | 2 +- - cpp/tests/poppler-dump.cpp | 2 +- - 12 files changed, 13 insertions(+), 12 deletions(-) - -commit 24b1d8d0b4ae7cea9fbc331f19cd5ce3917b8b4d -Author: Pino Toscano <pino@kde.org> -Date: Tue Mar 2 23:15:56 2010 +0100 - - [cpp] {from,to}_utf_8() -> {from,to}_utf8() - - cpp/poppler-global.cpp | 4 ++-- - cpp/poppler-global.h | 4 ++-- - cpp/poppler-page.cpp | 2 +- - 3 files changed, 5 insertions(+), 5 deletions(-) - -commit 690af1bc58de1ebe710c5e599f1cb635e4838fc8 -Author: Hib Eris <hib@hiberis.nl> -Date: Tue Mar 2 16:33:04 2010 +0100 - - [cpp] define poppler_cpp_EXPORTS when building with autotools as well - - fixes building on Windows - - cpp/Makefile.am | 3 +++ - 1 file changed, 3 insertions(+) - -commit 7492a376e7e5ec35534276ac15485123645617b0 -Author: Pino Toscano <pino@kde.org> -Date: Tue Mar 2 22:16:07 2010 +0100 - - [cpp/tests] use gmtime() when gmtime_r() is not available - - cpp/tests/poppler-dump.cpp | 9 ++++++++- - 1 file changed, 8 insertions(+), 1 deletion(-) - -commit de013cc14a0621782c53f481ed7e559f241855a3 -Author: Pino Toscano <pino@kde.org> -Date: Tue Mar 2 22:05:25 2010 +0100 - - [cpp] include config.h _after_ the other includes - - cpp/poppler-global.cpp | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 388e5d6aebcabbfc90894c86248159c63701cb0a -Author: Hib Eris <hib@hiberis.nl> -Date: Tue Mar 2 15:51:23 2010 +0100 - - Use ICONV_CONST when necessary - - cpp/poppler-global.cpp | 10 ++++++---- - 1 file changed, 6 insertions(+), 4 deletions(-) - -commit aaa58b26733a2f7c778632da4942b588050cf33f -Author: Pino Toscano <pino@kde.org> -Date: Tue Mar 2 21:53:55 2010 +0100 - - [CMake] properly define ICONV_CONST - - CMakeLists.txt | 1 - - cmake/modules/FindIconv.cmake | 3 +++ - config.h.cmake | 2 +- - 3 files changed, 4 insertions(+), 2 deletions(-) - -commit 6304b0d8959fccf96b030c757d78e845d04757e4 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Feb 28 15:33:53 2010 +0100 - - poppler 0.13.1 - - CMakeLists.txt | 2 +- - NEWS | 33 +++++++++++++++++++++++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - qt4/src/Doxyfile | 2 +- - 5 files changed, 37 insertions(+), 4 deletions(-) - -commit 9eac71862915c851c07075e3ca3af82eb9e4e775 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Feb 28 15:33:19 2010 +0100 - - Make sure the private headers end up in the tarball on make dist - - cpp/Makefile.am | 5 +++++ - 1 file changed, 5 insertions(+) - -commit b488172311c2921ab4c365d71ad8b1ab7f596c71 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Feb 28 14:25:36 2010 +0100 - - Add copyright notices - - poppler/CairoFontEngine.cc | 3 ++- - poppler/CairoFontEngine.h | 2 +- - 2 files changed, 3 insertions(+), 2 deletions(-) - -commit 5453cff5b7cb47cadfdae585a58409117af8c1f1 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Feb 28 13:51:22 2010 +0100 - - [cairo] Select filter for images based on scale factor - - When rendering images and interpolate flag is disabled or missing, we - always interpolate unless scale factor is >= 400% - - See bugs #25268, #9860 - - poppler/CairoOutputDev.cc | 64 - ++++++++++++++++++++++++++++++++++------------- - poppler/CairoOutputDev.h | 2 ++ - 2 files changed, 49 insertions(+), 17 deletions(-) - -commit e65456cbd5cae2750426aabeb2d66a10537616f0 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Feb 28 13:13:13 2010 +0100 - - [cairo] Refactor scaled size computation into a new method - - poppler/CairoOutputDev.cc | 52 - +++++++++++++++++++++++------------------------ - poppler/CairoOutputDev.h | 2 ++ - 2 files changed, 28 insertions(+), 26 deletions(-) - -commit 32aa9ae7d0087298661829265de00e93398272b3 -Author: Jan Kümmel <jan+freedesktop@snorc.org> -Date: Sat Feb 27 17:58:46 2010 +0100 - - [cairo] Omit writing of embedded fonts into tempary files - - Fixes bug #26694. - - poppler/CairoFontEngine.cc | 146 - +++++++++++++++++++++++++-------------------- - 1 file changed, 80 insertions(+), 66 deletions(-) - -commit 7ba52a32343ca73730a80b64c136e3f03348e7d9 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Feb 27 17:42:46 2010 +0100 - - [cairo] Remove unused 'face' from CairoFreeTypeFont class - - poppler/CairoFontEngine.cc | 6 ++---- - poppler/CairoFontEngine.h | 3 +-- - 2 files changed, 3 insertions(+), 6 deletions(-) - -commit 7c3140c88c00282e10888143fffe3c402d48fb05 -Author: Adrian Johnson <ajohnson@redneon.com> -Date: Sat Feb 27 13:13:47 2010 +0100 - - Don't use '\' character in PostScript names - - poppler/PSOutputDev.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 8e354a15a1861719c00799937ad9f9bb1bb71e9f -Author: Thomas Freitag <Thomas.Freitag@alfa.de> -Date: Wed Feb 24 18:58:11 2010 +0000 - - Fix remaining part of 26243 - - Thomas says: The "gn" is colored with a shading pattern, but the - shading has a bbox, - so it is clipped to this bbox, too. But when coloring text or masks in - pattern colorspace, this is definely wrong. - - poppler/Gfx.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit fcbc571a98775b1daa8f562fc8674fb2d15b6626 -Author: Pino Toscano <pino@kde.org> -Date: Tue Feb 23 17:02:47 2010 +0100 - - [cpp] make checksum() return an array of data, instead of a string - - a checksum is a sequence of values after all, so just return it as - such instead of pretending it is a string - accordingly adapt the mini dump application - - cpp/poppler-embedded-file.cpp | 10 ++++++++-- - cpp/poppler-embedded-file.h | 2 +- - cpp/tests/poppler-dump.cpp | 4 ++-- - 3 files changed, 11 insertions(+), 5 deletions(-) - -commit fbefb9bef9f7a099d51919255a98f412d1e1d696 -Author: Pino Toscano <pino@kde.org> -Date: Tue Feb 23 16:56:47 2010 +0100 - - [cpp apidox] add API documentation for the 'embedded_file' class - - cpp/poppler-embedded-file.cpp | 43 - +++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 43 insertions(+) - -commit 6d39cca0a035fc656d3b86ba66dedaccee532fcb -Author: Pino Toscano <pino@kde.org> -Date: Tue Feb 23 16:41:56 2010 +0100 - - [cpp apidox] add API documentation for the 'toc' and 'toc_item' - classes - - cpp/poppler-toc.cpp | 57 - +++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 57 insertions(+) - -commit 857e4ceb26d959c48c7af6bff53ca1bfe5307236 -Author: Pino Toscano <pino@kde.org> -Date: Tue Feb 23 15:39:58 2010 +0100 - - [cpp] when the loading of the document fails, put back the data - where it was before - - cpp/poppler-document-private.h | 2 +- - cpp/poppler-document.cpp | 10 +++++++--- - 2 files changed, 8 insertions(+), 4 deletions(-) - -commit 7838b182143086192ac8dcf571da0ce1743619e2 -Author: Pino Toscano <pino@kde.org> -Date: Tue Feb 23 00:04:09 2010 +0100 - - [cpp] add the directory of the generated html apidox to the ignore - list - - cpp/.gitignore | 1 + - 1 file changed, 1 insertion(+) - -commit 71a38a23a9db5cac872c666283b7abcb1462210c -Author: Pino Toscano <pino@kde.org> -Date: Mon Feb 22 23:43:34 2010 +0100 - - [cpp] add page::text() to get the text inside a page region - - cpp/poppler-page.cpp | 16 ++++++++++++++++ - cpp/poppler-page.h | 1 + - 2 files changed, 17 insertions(+) - -commit 4c75360233bc67f097551980a46ecce976927220 -Author: Pino Toscano <pino@kde.org> -Date: Mon Feb 22 23:05:53 2010 +0100 - - [cpp] add page::search() - - cpp/poppler-page.cpp | 51 - +++++++++++++++++++++++++++++++++++++++++++++++++++ - cpp/poppler-page.h | 8 ++++++++ - 2 files changed, 59 insertions(+) - -commit 8932c53a084083eb42d109dd17bac3ad41ce65b5 -Author: Pino Toscano <pino@kde.org> -Date: Mon Feb 22 22:39:36 2010 +0100 - - [cpp] add getters and setters for left/top/right/bottom - - cpp/poppler-rectangle.h | 18 ++++++++++++++++++ - 1 file changed, 18 insertions(+) - -commit 8e1ea57f558fa3a1702a17d79b5aaffc486c6a56 -Author: Pino Toscano <pino@kde.org> -Date: Mon Feb 22 22:19:51 2010 +0100 - - [cpp] add a global enum for case sensitivity - - cpp/poppler-global.h | 2 ++ - 1 file changed, 2 insertions(+) - -commit ae41b087de8f0a7d525320dcf1d64ff22fe982b6 -Author: Pino Toscano <pino@kde.org> -Date: Mon Feb 22 19:06:21 2010 +0100 - - [cpp apidox] doxygen configuration for poppler-cpp - - cpp/Doxyfile | 1551 - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 1551 insertions(+) - -commit 1a36a7bcc684065478a3ade2c2938f0e3672140a -Author: Pino Toscano <pino@kde.org> -Date: Mon Feb 22 19:05:49 2010 +0100 - - [cpp apidox] very small start of intro page - - cpp/Mainpage.dox | 9 +++++++++ - 1 file changed, 9 insertions(+) - -commit 85e052ab7a4c462143325ecf60eebba35411b790 -Author: Pino Toscano <pino@kde.org> -Date: Mon Feb 22 18:53:20 2010 +0100 - - [cpp apidox] start adding API documentation for the global 'poppler' - namespace - - ... including the 'convert_date' function and faking the 'noncopyable' - class - - cpp/poppler-global.cpp | 16 ++++++++++++++++ - 1 file changed, 16 insertions(+) - -commit b01608f91fb6cf6e9c4fb6e6ee3cb57517a766bf -Author: Pino Toscano <pino@kde.org> -Date: Mon Feb 22 18:52:24 2010 +0100 - - [cpp apidox] exclude the 'detail' namespace from apidox extraction - - this includes also the 'noncopyable' typedef, but that will be - handled differently - - cpp/poppler-global.h | 2 ++ - 1 file changed, 2 insertions(+) - -commit f17a7a8cfdeabb3ced3ba8d42c869d892c528e13 -Author: Pino Toscano <pino@kde.org> -Date: Mon Feb 22 18:51:30 2010 +0100 - - [cpp apidox] add API documentation for the version functions - - cpp/poppler-version.cpp | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - -commit f6c4bbddc7d04c0b1a6b25c41cbf6d81ae40cc0c -Author: Pino Toscano <pino@kde.org> -Date: Mon Feb 22 18:50:54 2010 +0100 - - [cpp apidox] start adding API documentation for 'document' - - cpp/poppler-document.cpp | 182 - +++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 182 insertions(+) - -commit cbb7519904d9b6395d0128e16a79324e4b8bfcc0 -Author: Pino Toscano <pino@kde.org> -Date: Mon Feb 22 13:15:11 2010 +0100 - - [CMake] no more need to build system check for the Cairo blend modes - - followup of 880890c14e99a954b365a3a6b59deeffa5304d30 for the cmake - build system - - cmake/modules/FindCairo.cmake | 18 ------------------ - config.h.cmake | 3 --- - 2 files changed, 21 deletions(-) - -commit 80f47bbf45faf751c661c1d0931e8e1da622b8ca -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Feb 22 12:43:06 2010 +0100 - - [cairo] Use cairo_surface_set_mime_data() when printing - - When rendering a jpeg image for printing, using - cairo_surface_set_mime_data() to attach the jpeg stream to the - surface reduces drastically the size of the output file. - - poppler/CairoOutputDev.cc | 42 ++++++++++++++++++++++++++++++++++++++++++ - poppler/CairoOutputDev.h | 1 + - 2 files changed, 43 insertions(+) - -commit d63293af6dbff65f160be0118b1580c03a1aab56 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri Nov 27 09:52:23 2009 +0100 - - [cairo] Turn EXTEND_PAD off when printing - - poppler/CairoOutputDev.cc | 98 - ++++++++++++++++++++++++++++++++--------------- - 1 file changed, 67 insertions(+), 31 deletions(-) - -commit 880890c14e99a954b365a3a6b59deeffa5304d30 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Feb 22 11:01:05 2010 +0100 - - [cairo] Use CAIRO_VERSION macros to check whether blend modes are - available - - configure.ac | 24 ------------------------ - poppler/CairoOutputDev.cc | 4 ++-- - 2 files changed, 2 insertions(+), 26 deletions(-) - -commit 5c300ce00b5c59da767ca1ffec12f96f0ebbe701 -Author: Pino Toscano <pino@kde.org> -Date: Sun Feb 21 21:20:10 2010 +0100 - - [Qt4/apidox] fix typo - - qt4/src/poppler-qt4.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 3f89ccf871e2f4a14129ad3e986b8cd19cdf129c -Author: Pino Toscano <pino@kde.org> -Date: Sun Feb 21 21:06:31 2010 +0100 - - [CMake] set the CXXFLAGS in a better way - - CMakeLists.txt | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit a18dab9e53a20a76eb46fa3a868fffdd3c754ce2 -Merge: fa098929 f3862f7d -Author: Pino Toscano <pino@kde.org> -Date: Sun Feb 21 19:56:38 2010 +0100 - - Merge remote branch 'origin/cpp-frontend' - - * origin/cpp-frontend: (34 commits) - [cpp/tests] poppler-dump: show a string for the font type - [cpp/tests] poppler-dump: show the orientation of the pages - [cpp/tests] poppler-dump: a bit less output in permissions lines - [cpp/tests] poppler-dump: add --show-all to show all the information - [cpp] use iconv for the utf8 <-> utf16 conversions - [cpp] add the build system stuff for iconv, mandatory for cpp - [cpp] fixup unicode GooString <-> ustring conversions - [cpp] fix installation of poppler-version.h with autotools and - builddir != srcdir - simplify - [cpp/tests] add a simple poppler-dump test - [cpp] use the correct index (instead of an uninitialized variable) - [cpp] properly delete the children of a toc item - [cpp] actually implement toc::root() - [cpp] fix the reference to the vector data - [cpp] fix the reference to the vector data - [cpp] add destructor for 'rectangle' - [cpp] add out stream operators for rect and rectf - [cpp] add namespace to namespace functiond to link properly - [cpp] add default empty parameters for the passwords of the document - loading functions - [cpp] add "human friendly" output representation for byte_array - ... - - Conflicts: - config.h.cmake - -commit fa0989297e95b6adebed71336ea206d1b279ab24 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Feb 21 16:59:57 2010 +0000 - - Detect the need for nanosleep in solaris - - Fixes bug 26650 - - ConfigureChecks.cmake | 5 +++++ - test/CMakeLists.txt | 17 +++++++++++------ - 2 files changed, 16 insertions(+), 6 deletions(-) - -commit d074485aa9d9fac6b715382002f53e3303bbc519 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Feb 20 10:08:33 2010 +0000 - - Do not call getPixel if we know how to access the data - - Gives a 20% speed increase in some pdf - - splash/Splash.cc | 19 ++++++++++--------- - 1 file changed, 10 insertions(+), 9 deletions(-) - -commit d4cafe357bd86feb4b56e5dfbf5b7822e237a2ee -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Feb 20 10:07:20 2010 +0000 - - Only call getPixel when really needed - - Gives a 8% speed increase in some pdf - - splash/Splash.cc | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit c3122cfbe090f3a4045269222f941cd5ce77c171 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Feb 20 10:04:37 2010 +0000 - - Move test code to the header to it can be inlined - - Gives a 10% speed increase in some documents - - splash/SplashClip.cc | 40 ++++++++++++++-------------------------- - splash/SplashClip.h | 43 +++++++++++++++++++++++++++++++++++++++++-- - 2 files changed, 55 insertions(+), 28 deletions(-) - -commit d987fb9b77e6da454eb898cc6c8baaf747b7ac4f -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Feb 19 23:59:03 2010 +0000 - - implement writeImgFile for splashModeXBGR8 - - splash/SplashBitmap.cc | 25 +++++++++++++++++++++++-- - 1 file changed, 23 insertions(+), 2 deletions(-) - -commit f9425c0b5b112ac673d0499f79a743afce719593 -Author: Hib Eris <hib@hiberis.nl> -Date: Fri Feb 19 20:18:13 2010 +0000 - - use pkgconfig to detect libpng on autotools too - - configure.ac | 12 ++++--- - goo/Makefile.am | 7 +++- - m4/libpng.m4 | 99 - ----------------------------------------------------- - poppler/Makefile.am | 3 ++ - 4 files changed, 17 insertions(+), 104 deletions(-) - -commit 0cb07d645527f25997f5e1b104a6be92441d8ffa -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Feb 18 23:27:20 2010 +0000 - - Only swap w with h if rotation is 90 or 270 - - utils/pdftoppm.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 35015ed11090d67cab69443e607d4d80ca03c619 -Author: Nils Höglund <nils.hoglund@gmail.com> -Date: Thu Feb 18 23:14:51 2010 +0000 - - Match the number of calls to beginMarkedContent and endMarkedContent - - poppler/Gfx.cc | 3 +++ - 1 file changed, 3 insertions(+) - -commit ee265760e6ecec93fe26fb8e02848872555daefd -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Feb 18 23:13:48 2010 +0000 - - make sure properties exists before using it - - poppler/TextOutputDev.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit eab7a55815c06525c7aeba254b66498ab147a958 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Feb 17 21:54:31 2010 +0000 - - if malloc failed return false - - splash/SplashFTFont.cc | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -commit e2def20a45c1d8307fd62fabb9769121af975abf -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Feb 16 23:31:05 2010 +0000 - - Only assume the OC is not visible if it exists and is set to no - - Fixes bug 26532 and a small line that was not drawn in 15899 - - poppler/OptionalContent.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 5edd175bdd0f7c2fc3aecb72384de4cb0788fc4e -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Feb 16 20:57:22 2010 +0000 - - Add and fix copyright years - - poppler/CairoOutputDev.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 0f0fba1b04589061449f98b9dcd8a0c4e7ad2d74 -Author: Pino Toscano <pino@kde.org> -Date: Tue Feb 16 22:00:51 2010 +0100 - - make the descriptions specify they refer to the Splash backend - - config.h.cmake | 4 ++-- - configure.ac | 4 ++-- - 2 files changed, 4 insertions(+), 4 deletions(-) - -commit 39b4699020b5cfa1a10e5ef00f0e355e27b21c9f -Author: Pino Toscano <pino@kde.org> -Date: Tue Feb 16 21:56:30 2010 +0100 - - [CMake] reflect that poppler-glib needs cairo now - - poppler-glib.pc.cmake | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 5c66c775bcd686c61ea136bcd8f261fb631c5e71 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Feb 16 20:52:15 2010 +0000 - - We don't need to pass anything to FontConfig - - Makes it much easier to manage and also fixes bug 26544 - - poppler/GlobalParams.cc | 11 +++-------- - poppler/GlobalParams.h | 6 +----- - 2 files changed, 4 insertions(+), 13 deletions(-) - -commit 582b5259b3c65ee1bef99dbdfccf00f37269b76f -Author: Pino Toscano <pino@kde.org> -Date: Tue Feb 16 16:36:24 2010 +0100 - - [CMake] find the system threads, and define in the config.h if we - have pthreads - - CMakeLists.txt | 4 ++++ - config.h.cmake | 3 +++ - 2 files changed, 7 insertions(+) - -commit 1dff9d440556a155fb5ca7bed15fc6a1f77a1c97 -Author: Pino Toscano <pino@kde.org> -Date: Tue Feb 16 16:10:44 2010 +0100 - - [CMake] add the HAVE_LIBOPENJPEG and HAVE_OPENJPEG_H defines, to - match autotools' ones - - CMakeLists.txt | 1 + - config.h.cmake | 6 ++++++ - 2 files changed, 7 insertions(+) - -commit 4a0bcaa83e6e6533cd48c63449a08467d51c13ea -Author: Pino Toscano <pino@kde.org> -Date: Tue Feb 16 16:01:53 2010 +0100 - - [CMake] config.h.cmake: change some comments to match autotools' ones - - config.h.cmake | 10 ++++++---- - 1 file changed, 6 insertions(+), 4 deletions(-) - -commit 9e38082c3e571d035f0152d65661e5dd97fdd5d8 -Author: Pino Toscano <pino@kde.org> -Date: Tue Feb 16 15:58:30 2010 +0100 - - [CMake] add the Win32-specific ENABLE_RELOCATABLE option, matching - autotools' one - - CMakeLists.txt | 5 +++++ - config.h.cmake | 3 +++ - 2 files changed, 8 insertions(+) - -commit eb03020893ed591c18817d75d427a1296cb1f233 -Author: Pino Toscano <pino@kde.org> -Date: Tue Feb 16 15:49:50 2010 +0100 - - [CMake] config.h.cmake: move POPPLER_WITH_GDK in the same place of - autotools' generated one, and with the same comment - - config.h.cmake | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit ba65b3af047b758094b999b2939065c5127508dd -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Feb 10 23:08:04 2010 +0000 - - Wrap #include <jpeglib.h> in extern "C" to fix build - - Fixes bug 26351 - - goo/JpegWriter.h | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -commit d3d2a3ee0a3505f44d1196823716b768d434ba73 -Author: Pino Toscano <pino@kde.org> -Date: Wed Feb 10 23:16:27 2010 +0100 - - [CMake] fix typo: "MULTITHREAD" -> "MULTITHREADED" - - CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 0dae2294cf8a2f312d8e6504be4e1be516b34b1b -Author: Thomas Freitag <Thomas.Freitag@alfa.de> -Date: Tue Feb 9 21:44:07 2010 +0000 - - Fix regression in painting. Fixes bug 26243 - - poppler/Gfx.cc | 9 ++++++++- - 1 file changed, 8 insertions(+), 1 deletion(-) - -commit aa9c3acbc73bafb33c8a797701ed0488a4a74263 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Jan 28 17:23:18 2010 +0100 - - [cairo] Add clipToStrokePath() method - - It's unimplemented, it just contains a log message to help when - debugging. - - poppler/CairoOutputDev.cc | 4 ++++ - poppler/CairoOutputDev.h | 1 + - 2 files changed, 5 insertions(+) - -commit 41a450c8db45fd064798d15c3d8fe5ab536a7b30 -Author: David Benjamin <davidben@mit.edu> -Date: Fri Jan 22 00:26:59 2010 -0500 - - [cairo] Avoid leaving pointers to free'd memory - - Fixes potential free'd memory access introduced by - 3a94e8ce90c0a4d11c5c5aa8805c167c8a0434e5. I don't think this is - actually - possible in the current code; we push/pop before and after rendering a - PDF, so the bottom state should never have a mask. - - Still, better to clean this up. - - poppler/CairoOutputDev.cc | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) - -commit 309228404710debee4337cc53c641dfef64ad86c -Author: David Benjamin <davidben@mit.edu> -Date: Wed Jan 27 22:41:16 2010 +0000 - - Allow commands to abort the current stream - - In many instances, the sensible response (and what acroread does) in - case of an error is abort the PDF stream. To avoid changing the return - value of every function and using C++ exceptions, we communicate via a - commandAborted variable. - - This patch, matching acroread's behavior aborts the current stream - when - there are too few arguments or we pop too many times. Implementation - note 39 in Appendix H of the PDF reference contradicts the former, but - hand-crafted test PDFs as well as the file in #24575 suggest - otherwise. - - Unlike all the other attempts, this patch actually fixes the PDF in - bug #24575. - - poppler/Gfx.cc | 11 +++++++++++ - poppler/Gfx.h | 1 + - 2 files changed, 12 insertions(+) - -commit 8284008aa8230a92ba08d547864353d3290e9bf9 -Author: David Benjamin <davidben@mit.edu> -Date: Wed Jan 27 22:40:33 2010 +0000 - - Add a stack of stateGuards to Gfx - - While a stack of states is a good way to maintain graphics contexts, - if - the command stream you are interpreting is untrusted, we must place - appropriate guards to be sure that, not only do we not pop past - the end - of the stack, but we do not pop past the stack as it was when we began - rendering. - - poppler/Gfx.cc | 30 +++++++++++++++++++++++++++++- - poppler/Gfx.h | 11 +++++++++++ - 2 files changed, 40 insertions(+), 1 deletion(-) - -commit 4ae84c830f842d100cbb702b32970951a5a5769f -Author: David Benjamin <davidben@mit.edu> -Date: Wed Jan 27 22:39:20 2010 +0000 - - Maintain the height of the stack in Gfx - - Introduces a new variable Gfx::stackHeight that maintains up-to-date - information about the current height of the stack. - - poppler/Gfx.cc | 4 ++++ - poppler/Gfx.h | 1 + - 2 files changed, 5 insertions(+) - -commit 120fe6ef673c648ae7b19ad2a7e9aef22ee25810 -Author: David Benjamin <davidben@mit.edu> -Date: Wed Jan 27 22:38:43 2010 +0000 - - Do not use objects just after deleting them - - The error condition in GfxCIDFont::GfxCIDFont references cMapName and - collection, so they should not be deleted yet. - - poppler/GfxFont.cc | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -commit 3375fa96c7a7dbbb98f5a7b3df9e840a5f30bc80 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Jan 27 22:32:29 2010 +0000 - - GooVector rewrite, old version had "unknown" origins/license - - goo/GooVector.h | 237 - +++++++++++++++++++++++++++++++++----------------------- - 1 file changed, 141 insertions(+), 96 deletions(-) - -commit a945fe64e16ac9aa2577c5db05fc7f3fd4955b7b -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Wed Jan 27 16:15:40 2010 +0100 - - [cairo] Fix downscaling images when document is rotated - - Fixes bug #26264. - - poppler/CairoOutputDev.cc | 37 +++++++++++++++++++++++++++++++++++-- - 1 file changed, 35 insertions(+), 2 deletions(-) - -commit 428cc965c17f167ea00540beeaeaac5c3e426686 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Jan 26 21:01:32 2010 +0000 - - Add POPPLER_WITH_GDK in cmake build system - - Bug 26247 - - glib/CMakeLists.txt | 1 + - glib/poppler-features.h.cmake | 1 + - 2 files changed, 2 insertions(+) - -commit 0af1ae75fd4c8031343f668bed5d8ca6588ee652 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Jan 26 20:49:17 2010 +0100 - - [cairo] Use the right matrix for the mask in drawMaskedImage() - - Fixes bug #16906. - - poppler/CairoOutputDev.cc | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -commit d8ceaff39f5b80624b6bdc703c2a180dfc3d73ee -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Jan 26 11:57:06 2010 +0100 - - [cairo] Add some more LOG messages - - poppler/CairoOutputDev.cc | 18 +++++++++++++++--- - 1 file changed, 15 insertions(+), 3 deletions(-) - -commit 778e764b3cb77526260c3c8b46acf19ad06fc61d -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Jan 25 22:40:20 2010 +0000 - - poppler 0.13.0 - - CMakeLists.txt | 4 +-- - NEWS | 99 - +++++++++++++++++++++++++++++++++++++++++++++++++++++ - configure.ac | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/Doxyfile | 2 +- - 5 files changed, 104 insertions(+), 5 deletions(-) - -commit 1b5333f2685b8ab85bb1f5b899332c5a0ac99a3d -Author: Pino Toscano <pino@kde.org> -Date: Mon Jan 25 02:19:00 2010 +0100 - - [CMake] allow multiple targets with the same name - - this is needed for building the unit tests later without explicitly - having - enabling them at configure time (thus compile them on-demand) - for this, set the cmake policy 0003 as OLD (allow), and consecuently - 0011 for - setting the former from an include()d script - - cmake/modules/PopplerDefaults.cmake | 7 +++++++ - 1 file changed, 7 insertions(+) - -commit 92e1f46866c063c370ef1d6324f6a6c01aed6680 -Author: Pino Toscano <pino@kde.org> -Date: Mon Jan 25 02:15:27 2010 +0100 - - [CMake] do not add the fake buildtests target for the MSVC IDE - - cmake/modules/PopplerMacros.cmake | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit dea5aa37de079196fa916b1db9af782cf25045f9 -Author: Maciej Mrozowski <reavertm@gmail.com> -Date: Mon Jan 25 00:51:20 2010 +0000 - - Install some more goo files - - CMakeLists.txt | 9 +++++++++ - 1 file changed, 9 insertions(+) - -commit 671a971c45a1e8ce8f6daade82117a9a137034d6 -Author: Maciej Mrozowski <reavertm@gmail.com> -Date: Mon Jan 25 00:48:31 2010 +0000 - - do not install a private header - - qt4/src/Makefile.am | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit 54c86e53a143a8f9d196e4bef2a733c6f00f6026 -Author: Maciej Mrozowski <reavertm@gmail.com> -Date: Mon Jan 25 00:33:07 2010 +0000 - - Only build tests if told to - - test/CMakeLists.txt | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit eb082274694aadb80dd16caea65d7f0a1adf8b46 -Author: Maciej Mrozowski <reavertm@gmail.com> -Date: Mon Jan 25 00:29:55 2010 +0000 - - Only build demos and test if told so. Install poppler-layer.h - - glib/CMakeLists.txt | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -commit 73fcc310cd7d6ef435b453485c1c99a33f77212a -Author: Maciej Mrozowski <reavertm@gmail.com> -Date: Mon Jan 25 00:29:09 2010 +0000 - - install man pages - - utils/CMakeLists.txt | 7 +++++++ - 1 file changed, 7 insertions(+) - -commit 8672217af4cf88d5506572c2b40fbb0d1d0dbd87 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Jan 25 00:11:50 2010 +0000 - - Make the poppler object cache params be a ref - - And make sure what we was is a ref, otherwise we abort - - poppler/Gfx.cc | 14 ++++++++------ - poppler/PopplerCache.cc | 12 ++++++------ - poppler/PopplerCache.h | 6 +++--- - 3 files changed, 17 insertions(+), 15 deletions(-) - -commit 9567fd8d3d905897d0abacd77885102ae86ba8a9 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Jan 24 20:15:49 2010 +0000 - - ImgWriter is a header too - - goo/Makefile.am | 1 + - 1 file changed, 1 insertion(+) - -commit 735e8a690d0bd3ab4bec90bdad975d19ac3d4689 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Jan 24 19:51:19 2010 +0000 - - noone maintains this either - - msvc/config.h | 62 ---------------------------------- - msvc/poppler/poppler-config.h | 77 - ------------------------------------------- - 2 files changed, 139 deletions(-) - -commit d485564f0dc86f62b996380bfbd570cf3f543e4f -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Jan 24 19:22:33 2010 +0000 - - remove files noone maintains - - README.windows | 63 ------------------------ - makefile.vc | 150 - --------------------------------------------------------- - 2 files changed, 213 deletions(-) - -commit 38467f2738c88f060ae1d30332e34da743a888a5 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Jan 24 19:18:44 2010 +0000 - - only compile glib frontend if cairo is found - - CMakeLists.txt | 4 ++-- - glib/CMakeLists.txt | 25 +++++++------------------ - 2 files changed, 9 insertions(+), 20 deletions(-) - -commit cf045acf46307d51fb6d9959451b53681e6cac03 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Jan 24 19:01:52 2010 +0000 - - compile - - glib/CMakeLists.txt | 1 + - 1 file changed, 1 insertion(+) - -commit 0397cf4f193015286464ae70ab202ed400110e30 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Jan 24 19:00:09 2010 +0000 - - Add and fix copyright years - - poppler/CairoFontEngine.cc | 1 + - poppler/CairoOutputDev.cc | 2 +- - poppler/CairoOutputDev.h | 2 +- - poppler/Gfx.cc | 2 +- - poppler/Gfx.h | 2 +- - poppler/PopplerCache.cc | 1 + - poppler/PopplerCache.h | 1 + - 7 files changed, 7 insertions(+), 4 deletions(-) - -commit 9c9f18b6ceea546dfb21ef0aab29ba99733dcb52 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Jan 24 19:27:29 2010 +0100 - - [glib-demo] Remove #ifdef HAVE_CAIRO macros from several demos - - glib/demo/images.c | 2 -- - glib/demo/layers.c | 71 - +++--------------------------------------------------- - glib/demo/render.c | 29 ++++------------------ - 3 files changed, 9 insertions(+), 93 deletions(-) - -commit 4e938c1f81add2162ced0e97b24fe588f15f178d -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Jan 24 19:15:06 2010 +0100 - - [glib] Make glib frontend unconditionally use cairo output device - - Splash support has been removed. - - configure.ac | 74 ++++++++------- - glib/Makefile.am | 20 +--- - glib/poppler-document.cc | 9 -- - glib/poppler-page.cc | 237 - +--------------------------------------------- - glib/poppler-page.h | 7 -- - glib/poppler-private.h | 14 --- - glib/poppler.cc | 6 -- - glib/test-poppler-glib.cc | 6 +- - poppler-glib.pc.in | 2 +- - 9 files changed, 51 insertions(+), 324 deletions(-) - -commit 59ff9d66fc3b0c9612b1c12fc1ae4dbb8dc85b39 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Jan 24 17:57:48 2010 +0100 - - Use a small object cache in GfxResources to cache GState objects - - It drastically improves performance with some documents like page - 742 of - PDF32000_2008.pdf - - poppler/Gfx.cc | 19 +++++++++++++++++-- - poppler/Gfx.h | 2 ++ - 2 files changed, 19 insertions(+), 2 deletions(-) - -commit 880a4a9a60a10f7aa7d3dc7c2802b31b7ef01e06 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Jan 24 17:56:35 2010 +0100 - - Add a generic cache to store objects by its reference - - poppler/PopplerCache.cc | 60 - +++++++++++++++++++++++++++++++++++++++++++++++++ - poppler/PopplerCache.h | 16 +++++++++++++ - 2 files changed, 76 insertions(+) - -commit 5ad492df75c0c2394719e85db4c8b43f15b52110 -Author: mpsuzuki <mpsuzuki@hiroshima-u.ac.jp> -Date: Sun Jan 24 13:34:41 2010 +0100 - - [cairo] Fix memory leak - - poppler/CairoFontEngine.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 3160464b4b70c714c36234320878acab81b866cc -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Nov 26 13:17:19 2009 +0100 - - [cairo] Use our own implementation to scale down images instead - of cairo - - This is a workaround for the low quality downscaling of pixman. - Rescaler implementation is a box filter that supports non-integer box - sizes written by Jeff Muizelaar. - Fixes bug #5589. - - poppler/CairoOutputDev.cc | 89 ++++++++++++ - poppler/CairoOutputDev.h | 1 + - poppler/CairoRescaleBox.cc | 352 - +++++++++++++++++++++++++++++++++++++++++++++ - poppler/CairoRescaleBox.h | 12 ++ - poppler/Makefile.am | 4 +- - 5 files changed, 457 insertions(+), 1 deletion(-) - -commit 6825a219f0bc0ac6fd469fb8a6ebb86df774375f -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Jan 23 11:24:15 2010 +0100 - - [glib] Use TextOutputDev to get TextPage when we haven't rendered - the page - - glib/poppler-page.cc | 27 ++++++++++++++++++--------- - 1 file changed, 18 insertions(+), 9 deletions(-) - -commit 6c61a457e9a8ec10945bc1e0700c8e4d121faa58 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Jan 20 21:59:05 2010 +0000 - - Fix GfxRadialShading::GfxRadialShading - - Fixes crash in KDE bug 223359 - - poppler/GfxState.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 442894d371879a6bf2adb5a39b9dd0a49e76e4ac -Author: Pino Toscano <pino@kde.org> -Date: Fri Jan 15 21:28:42 2010 +0100 - - [glib-demo/cmake] compile print.c - - followup of b64d4bd46b052feb0b143f1348773afbd93e5e33 - - glib/demo/CMakeLists.txt | 1 + - 1 file changed, 1 insertion(+) - -commit b64d4bd46b052feb0b143f1348773afbd93e5e33 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri Nov 27 11:47:22 2009 +0100 - - [glib-demo] Add print demo - - glib/demo/Makefile.am | 2 + - glib/demo/main.c | 4 +- - glib/demo/print.c | 135 - ++++++++++++++++++++++++++++++++++++++++++++++++++ - glib/demo/print.h | 31 ++++++++++++ - 4 files changed, 171 insertions(+), 1 deletion(-) - -commit ba2c746f358a5785d8cbaaf03d8628ee3754c388 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri Nov 27 09:52:50 2009 +0100 - - [glib-demo] Add render for printing option to render demo - - glib/demo/render.c | 47 ++++++++++++++++++++++++++++++++++++++--------- - 1 file changed, 38 insertions(+), 9 deletions(-) - -commit 9a478008ccb61641f09bd77eaa55033cca266c43 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri Jan 15 12:03:11 2010 +0100 - - Add FONTCONFIGURATION macros to poppler-config.h - - They are used in a header file (GlobalParams.h). It fixes a crash - when opening any document. - - poppler/poppler-config.h.in | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -commit 1f80f874d8e132411816302465f04bc59d404d89 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Jan 14 08:43:11 2010 +0000 - - Fix Uncover and Fade to return correct values - - Bug 26034 - - poppler/PageTransition.cc | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -commit 350ff407e06a961f2a5b9d203cb8e78ce09313a0 -Author: Hib Eris <hib@hiberis.nl> -Date: Wed Jan 13 22:20:41 2010 +0000 - - Make poppler (optionally) relocatable on Windows - - configure.ac | 26 ++++++++++++++++++++++ - poppler/GlobalParams.cc | 57 - +++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 83 insertions(+) - -commit 36b67b002db802bfad553720e2114b76b07bb614 -Author: Hib Eris <hib@hiberis.nl> -Date: Wed Jan 13 22:17:03 2010 +0000 - - Make fontconfig optional with mingw compiler - - CMakeLists.txt | 8 +++++++- - config.h.cmake | 6 ++++++ - configure.ac | 39 ++++++++++++++++++++++++++++++++++++++- - makefile.vc | 2 +- - poppler/GlobalParams.cc | 10 +++++++--- - poppler/GlobalParams.h | 7 ++++--- - poppler/GlobalParamsWin.cc | 5 +++++ - 7 files changed, 68 insertions(+), 9 deletions(-) - -commit 9c0b20ab8c104c2f5398a5a3b8409ca554f5fa39 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Jan 12 22:55:06 2010 +0000 - - Add the possibility of using float for splash variables instead - of double - - Based on a patch by Marius Vollmer marius.vollmer@nokia.com - See bug 25578 for more info - - CMakeLists.txt | 7 ++++++- - config.h.cmake | 5 ++++- - configure.ac | 10 +++++++++- - splash/SplashMath.h | 14 ++++++++++++-- - splash/SplashTypes.h | 4 +++- - 5 files changed, 34 insertions(+), 6 deletions(-) - -commit 30e5f76e372114339fa1d37c335e6bbade8b6d8a -Author: Pino Toscano <pino@kde.org> -Date: Thu Jan 7 11:18:36 2010 +0100 - - [CMake] followup recent glib/gtk+ version requirements - - - glib to 2.18, see ce9404b1999f81b3f9e5a89bcd6e715463f89024 - - gtk+ to 2.14, see e338643f2cebb1203f7ff0646f87b3dea8318757 - - cmake/modules/FindGTK.cmake | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit e338643f2cebb1203f7ff0646f87b3dea8318757 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Jan 7 11:08:31 2010 +0100 - - [tests] Bump GTK+ requirements to 2.14 - - Fixes bug #22090. - - configure.ac | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit ce9404b1999f81b3f9e5a89bcd6e715463f89024 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Jan 7 11:06:19 2010 +0100 - - Bump glib requirements to 2.18 - - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 526c8871cbdfbc119e013ee96887a79f65403790 -Author: Hib Eris <hib@hiberis.nl> -Date: Thu Dec 31 17:52:33 2009 +0100 - - [glib] Use PDFDoc(wchar_t *, ...) on Windows - - Fixes bug #25032 - - glib/poppler-document.cc | 22 +++++++++++++++++++--- - 1 file changed, 19 insertions(+), 3 deletions(-) - -commit e0c8188136958b853269179079efefdd3488dc22 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Jan 4 18:36:01 2010 +0000 - - Require Qt 4.4 - - This updates the requirement to real requirement - - CMakeLists.txt | 2 +- - configure.ac | 8 ++++---- - 2 files changed, 5 insertions(+), 5 deletions(-) - -commit f9accdb878b23ebd2152dd05d61cfcc71d46cd03 -Author: Pino Toscano <pino@kde.org> -Date: Mon Jan 4 14:13:13 2010 +0100 - - [Qt4/tests] use getPdfVersion() instead of the deprecated pdfVersion() - - qt4/tests/stress-poppler-dir.cpp | 3 ++- - qt4/tests/stress-poppler-qt4.cpp | 3 ++- - qt4/tests/test-password-qt4.cpp | 4 +++- - qt4/tests/test-poppler-qt4.cpp | 4 +++- - 4 files changed, 10 insertions(+), 4 deletions(-) - -commit 898e939d8c0ac74cc7ee3f5d42d83083ed31036e -Author: Adrian Johnson <ajohnson@redneon.com> -Date: Sat Jan 2 02:33:58 2010 +0100 - - Make pdftoppm embed correct resolution in PNG and JPEG files - - goo/ImgWriter.h | 3 ++- - goo/JpegWriter.cc | 6 +++++- - goo/JpegWriter.h | 3 ++- - goo/PNGWriter.cc | 6 +++++- - goo/PNGWriter.h | 3 ++- - splash/SplashBitmap.cc | 9 +++++---- - splash/SplashBitmap.h | 5 +++-- - utils/HtmlOutputDev.cc | 4 +++- - utils/pdftoppm.cc | 9 +++++---- - 9 files changed, 32 insertions(+), 16 deletions(-) - -commit df569dc2fb89d7e0780bbf7a687ce2464ff5cb43 -Author: Adrian Johnson <ajohnson@redneon.com> -Date: Sat Jan 2 01:19:50 2010 +0100 - - enable AM_SILENT_RULES by default - - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit f3862f7d987aae52a1fd2bb0af27d1cd803a5b84 -Author: Pino Toscano <pino@kde.org> -Date: Thu Dec 31 00:20:11 2009 +0100 - - [cpp/tests] poppler-dump: show a string for the font type - - cpp/tests/poppler-dump.cpp | 23 ++++++++++++++++++++++- - 1 file changed, 22 insertions(+), 1 deletion(-) - -commit 9c343c821593ebae51ac47b58ad007a82f198652 -Author: Pino Toscano <pino@kde.org> -Date: Thu Dec 31 00:13:09 2009 +0100 - - [cpp/tests] poppler-dump: show the orientation of the pages - - cpp/tests/poppler-dump.cpp | 16 ++++++++++++++++ - 1 file changed, 16 insertions(+) - -commit bc91fe3824f37cd17a38aac85c817e8ada1b2f43 -Author: Pino Toscano <pino@kde.org> -Date: Wed Dec 30 23:53:31 2009 +0100 - - [cpp/tests] poppler-dump: a bit less output in permissions lines - - cpp/tests/poppler-dump.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 1199de8f097a78edb831313841ac0ed3f9ec9905 -Author: Pino Toscano <pino@kde.org> -Date: Wed Dec 30 23:50:36 2009 +0100 - - [cpp/tests] poppler-dump: add --show-all to show all the information - - cpp/tests/poppler-dump.cpp | 13 +++++++++++++ - 1 file changed, 13 insertions(+) - -commit 9522f830b59942adfc91d5f03c274415a4737ccc -Author: Pino Toscano <pino@kde.org> -Date: Wed Dec 30 23:38:40 2009 +0100 - - [cpp] use iconv for the utf8 <-> utf16 conversions - - cpp/poppler-global.cpp | 92 - +++++++++++++++++++++++++++++++++++--------------- - 1 file changed, 64 insertions(+), 28 deletions(-) - -commit b156b4031f5daf658f40db8efa2a3016d95b98b5 -Author: Pino Toscano <pino@kde.org> -Date: Wed Dec 30 23:24:23 2009 +0100 - - [cpp] add the build system stuff for iconv, mandatory for cpp - - CMakeLists.txt | 6 ++ - Makefile.am | 1 + - cmake/modules/FindIconv.cmake | 57 +++++++++++++ - config.h.cmake | 6 ++ - configure.ac | 6 ++ - cpp/CMakeLists.txt | 2 +- - cpp/Makefile.am | 3 +- - m4/iconv.m4 | 180 - ++++++++++++++++++++++++++++++++++++++++++ - 8 files changed, 259 insertions(+), 2 deletions(-) - -commit a0cffb8b69e0595a2afe15ecc4928e0df1eeb063 -Author: Pino Toscano <pino@kde.org> -Date: Wed Dec 30 18:57:09 2009 +0100 - - [cpp] fixup unicode GooString <-> ustring conversions - - better make them use the "hand-made" code, it is more correct for them - - cpp/poppler-private.cpp | 44 +++++++++++++++++++++++++++++++++++++++++--- - 1 file changed, 41 insertions(+), 3 deletions(-) - -commit 3b6e3605209d5db453725b9ce4e6e54679d9c5da -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Dec 27 15:30:22 2009 +0100 - - Do not crop the transformation matrix at an arbitrary value - - Fixes bug 25763 and gave no regression on my test suite - - poppler/GfxState.cc | 21 --------------------- - poppler/SplashOutputDev.cc | 15 +++++++++++++++ - 2 files changed, 15 insertions(+), 21 deletions(-) - -commit ea44c60645001ffea7d297f8549aaa4f5ce5e16c -Author: Ilya Gorenbein <igorenbein@finjan.com> -Date: Sun Dec 27 15:27:00 2009 +0100 - - Try to work on streams without Length - - We have code that finds the Length if it's wrong so let that code - do its job - instead of returning a NULL stream - - poppler/Parser.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 283dd326a00c804b6332ee3ca1aaa0d86377b3f3 -Author: Pino Toscano <pino@kde.org> -Date: Sat Dec 19 12:50:10 2009 +0100 - - [cpp] fix installation of poppler-version.h with autotools and - builddir != srcdir - - cpp/Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit df0ccddb7f784b4a8564beda51b3047cb9e3611a -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Dec 18 20:23:48 2009 +0000 - - move the retrieval of the bitmap after rendering the page as it can - change on render time - - utils/pdftoppm.cc | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -commit ab88a02f7efefc950a316d7a5edf88dad8f3e4d0 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Dec 17 18:24:20 2009 +0100 - - [annots] QuadPoints is required in Text Markup annotations - - Show an error message and mark annotation as invalid when it's - missing. - - poppler/Annot.cc | 2 ++ - 1 file changed, 2 insertions(+) - -commit 39dc99431b3ea9e00f6f645dd7169c0319571dc9 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Dec 17 18:17:20 2009 +0100 - - [annots] Create appearance stream for Sound Annotations when not - defined - - See bug #23108. - - poppler/Annot.cc | 112 - +++++++++++++++++++++++++++++++++++++++++++++++++++++++ - poppler/Annot.h | 2 + - 2 files changed, 114 insertions(+) - -commit e4f5a78a853b88b1586ef59fc8893a321ea23736 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Dec 17 17:39:39 2009 +0100 - - [annots] Add Tag and Graph icons for File Attachment annotations - - See bug #23108. - - poppler/Annot.cc | 70 - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 70 insertions(+) - -commit 752b14857cfb0669fd6d7dfef2ea73c13a2369fc -Author: Pino Toscano <pino@kde.org> -Date: Thu Dec 17 17:16:01 2009 +0100 - - simplify - - cpp/poppler-toc.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit a26e4b7903fabc667d7d16c23ca2c7a535dd05fa -Author: Pino Toscano <pino@kde.org> -Date: Thu Dec 17 17:09:35 2009 +0100 - - [cpp/tests] add a simple poppler-dump test - - this small test executable can dump various features of the document, - like the general info, permissions, metadata, toc, fonts, - embedded files, pages, etc - - also add the necessary autotools+cmake machinery to compile it - - configure.ac | 1 + - cpp/CMakeLists.txt | 2 + - cpp/Makefile.am | 1 + - cpp/tests/.gitignore | 1 + - cpp/tests/CMakeLists.txt | 24 ++++ - cpp/tests/Makefile.am | 17 +++ - cpp/tests/poppler-dump.cpp | 293 - +++++++++++++++++++++++++++++++++++++++++++++ - 7 files changed, 339 insertions(+) - -commit 86c871cc625d00b8ee7f93dc8c0f9ef8462bba5a -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Dec 17 17:05:45 2009 +0100 - - [annots] Create appearance stream for Text Markup Annotations when - not defined - - Highlight annotations are an exception, we always ignore the - appearance stream to use our own, since for most of the documents the - appearance stream provided by the annotation is not enough. That's why - it's currently broken. This is what acroread does indeed and Leonard - Rosenthol recommended us to do the same. - See bug #23108. - - poppler/Annot.cc | 199 - +++++++++++++++++++++++++++++++++++++++++++++++++++++++ - poppler/Annot.h | 2 + - 2 files changed, 201 insertions(+) - -commit 904ecd929c6acbbad6d782b950c53c0a80e1f39c -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Dec 17 12:49:20 2009 +0100 - - [annots] Fix memory leaks - - poppler/Annot.cc | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -commit ef7954b86f9b1a762c4f77a48d5f42f8db4bbed7 -Author: Pino Toscano <pino@kde.org> -Date: Tue Dec 15 02:20:18 2009 +0100 - - [cpp] use the correct index (instead of an uninitialized variable) - - cpp/poppler-page.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 2547b5e53e7799cf7299838ae9bd882c21a228ae -Author: Pino Toscano <pino@kde.org> -Date: Tue Dec 15 02:14:57 2009 +0100 - - [cpp] properly delete the children of a toc item - - cpp/poppler-toc.cpp | 1 + - 1 file changed, 1 insertion(+) - -commit 771bd3594740fe16bd030dbe73928a8b1d4d113f -Author: Pino Toscano <pino@kde.org> -Date: Tue Dec 15 02:04:24 2009 +0100 - - [cpp] actually implement toc::root() - - cpp/poppler-toc.cpp | 5 +++++ - 1 file changed, 5 insertions(+) - -commit ca1d2ec4588b2437b58b4448ae2fc5ebd0f130d3 -Author: Pino Toscano <pino@kde.org> -Date: Tue Dec 15 00:54:29 2009 +0100 - - [cpp] fix the reference to the vector data - - cpp/poppler-global.cpp | 2 +- - cpp/poppler-private.cpp | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit 16c946e7658b0e9cff701ce1d6bbf7d3828cbe08 -Author: Pino Toscano <pino@kde.org> -Date: Tue Dec 15 00:35:25 2009 +0100 - - [cpp] fix the reference to the vector data - - cpp/poppler-document.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 9bb90c99b65e0e9d9b65c7dbeb5b4d66377ceb21 -Author: Pino Toscano <pino@kde.org> -Date: Mon Dec 14 23:43:12 2009 +0100 - - [cpp] add destructor for 'rectangle' - - cpp/poppler-rectangle.h | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 61ccdc9ab3b816174896fcae0899ff34f11eee80 -Author: Pino Toscano <pino@kde.org> -Date: Mon Dec 14 23:40:51 2009 +0100 - - [cpp] add out stream operators for rect and rectf - - cpp/CMakeLists.txt | 1 + - cpp/Makefile.am | 1 + - cpp/poppler-rectangle.cpp | 35 +++++++++++++++++++++++++++++++++++ - cpp/poppler-rectangle.h | 5 +++++ - 4 files changed, 42 insertions(+) - -commit 69dd51fed3de41f8b799b811ae5ee59c0d5f59c2 -Author: Pino Toscano <pino@kde.org> -Date: Mon Dec 14 22:24:07 2009 +0100 - - [cpp] add namespace to namespace functiond to link properly - - cpp/poppler-global.cpp | 4 ++-- - cpp/poppler-version.cpp | 8 ++++---- - 2 files changed, 6 insertions(+), 6 deletions(-) - -commit 3923fa4890984d8616d86016f4f4a94e8ef3e992 -Author: Pino Toscano <pino@kde.org> -Date: Mon Dec 14 22:23:15 2009 +0100 - - [cpp] add default empty parameters for the passwords of the document - loading functions - - cpp/poppler-document.h | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -commit 1d23cc677e9b0a9f61c53e0ea365537f33abe5bf -Author: Pino Toscano <pino@kde.org> -Date: Mon Dec 14 21:44:56 2009 +0100 - - [cpp] add "human friendly" output representation for byte_array - - cpp/poppler-global.cpp | 23 +++++++++++++++++++++++ - cpp/poppler-global.h | 3 +++ - 2 files changed, 26 insertions(+) - -commit 82954ea5f8ba880276328765f104690a05adbd9e -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Dec 7 12:05:54 2009 +0100 - - [annot] Create appearance stream for Attachment Annotations when - not defined - - See bug #23108. - - poppler/Annot.cc | 94 - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - poppler/Annot.h | 2 ++ - 2 files changed, 96 insertions(+) - -commit c6195472326c183fcfd8a3e9da1ee7f6fa8b7c3d -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Dec 6 17:09:23 2009 +0100 - - [annots] Use opacity when drawing Markup Annotations - - According to the spec: - - "The constant opacity value that shall be used in painting the - annotation. This value shall apply to all visible elements of the - annotation in its closed state (including its background and border) - but - not to the pop-up window that appears when the annotation is opened. - - The specified value shall not used if the annotation has an appearance - stream in that case, the appearance stream shall specify any - transparency. - - If no explicit appearance stream is defined for the annotation, it may - be painted by implementation-dependent means that do not necessarily - conform to the PDF imaging model; in this case, the effect of - this entry - is implementation-dependent as well." - - poppler/Annot.cc | 21 +++++++++++++++------ - poppler/Gfx.cc | 9 ++++++++- - poppler/Gfx.h | 2 +- - 3 files changed, 24 insertions(+), 8 deletions(-) - -commit a337c1d757d52c1c238229d2f0cd3a41694b0e08 -Author: Pino Toscano <pino@kde.org> -Date: Mon Dec 14 16:18:22 2009 +0100 - - [cpp] add document metadata reading - - cpp/poppler-document.cpp | 9 +++++++++ - cpp/poppler-document.h | 1 + - 2 files changed, 10 insertions(+) - -commit 6c4fa513e60dbdd5ab693434f239d82d95756994 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Dec 6 16:56:22 2009 +0100 - - [annot] Create appearance stream for Geometry Annotations when - not defined - - See bug #23108. - - poppler/Annot.cc | 120 - +++++++++++++++++++++++++++++++++++++++++++++++++++++++ - poppler/Annot.h | 2 + - 2 files changed, 122 insertions(+) - -commit eed94b8bd2855dce1fd39b835e3280cbd0ccd1cf -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Dec 6 16:51:37 2009 +0100 - - [annot] Create appearance stream for Line Annotations when not defined - - See bug #23108. - - poppler/Annot.cc | 62 - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - poppler/Annot.h | 2 ++ - 2 files changed, 64 insertions(+) - -commit 1c7a5f5e89c4c51e31b6de345d4862ef8dcc2bc0 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Dec 6 16:40:14 2009 +0100 - - [annot] Create appearance stream for Text Annotations when not defined - - Streams have been created by using the svg icons created by mac_v and - ulisse. See bug #23108. - - poppler/Annot.cc | 305 - +++++++++++++++++++++++++++++++++++++++++++++++++++++++ - poppler/Annot.h | 2 + - 2 files changed, 307 insertions(+) - -commit c9cb6353ad5279d09615eb2c944b2b053cdf5ccc -Author: Pino Toscano <pino@kde.org> -Date: Mon Dec 14 15:52:25 2009 +0100 - - [cpp] add function to query for document "permissions" - - cpp/poppler-document.cpp | 23 +++++++++++++++++++++++ - cpp/poppler-document.h | 1 + - cpp/poppler-global.h | 4 ++++ - 3 files changed, 28 insertions(+) - -commit 30e90c7c1b41c62ddc21905e7ccdea4c95547e80 -Author: Pino Toscano <pino@kde.org> -Date: Mon Dec 14 15:33:36 2009 +0100 - - [cpp] add is_encrypted and is_linearized for document - - cpp/poppler-document.cpp | 10 ++++++++++ - cpp/poppler-document.h | 2 ++ - 2 files changed, 12 insertions(+) - -commit 93fd588c519958a1f66231c111ea8a6b0a759be1 -Author: Pino Toscano <pino@kde.org> -Date: Mon Dec 14 13:19:24 2009 +0100 - - [cpp] add the possibility to load a document from raw data - - cpp/poppler-document-private.h | 5 +++++ - cpp/poppler-document.cpp | 35 ++++++++++++++++++++++++++++++++++- - cpp/poppler-document.h | 3 +++ - 3 files changed, 42 insertions(+), 1 deletion(-) - -commit 53996365b159cf84adf2cac56c76b8bda8dfb12e -Author: Pino Toscano <pino@kde.org> -Date: Mon Dec 14 12:57:41 2009 +0100 - - [cpp] use the byte_array typedef - - cpp/poppler-embedded-file.cpp | 6 +++--- - cpp/poppler-embedded-file.h | 2 +- - 2 files changed, 4 insertions(+), 4 deletions(-) - -commit e4969c1aaed4a8eb770d8b54920f2476129bbcb7 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Dec 6 16:19:36 2009 +0100 - - [annots] Refactor Annot::setColor to receive an AnnotColor - - Removes duplicated code since color arrays are already parsed in - AnnotColor - - poppler/Annot.cc | 136 - +++++++++++++++++++++++++++++-------------------------- - poppler/Annot.h | 4 +- - 2 files changed, 73 insertions(+), 67 deletions(-) - -commit cfb4f5dfabf31de22d68aa0d5796cb7a33d8b462 -Author: Pino Toscano <pino@kde.org> -Date: Mon Dec 14 11:06:36 2009 +0100 - - [cpp] add a byte_array typedef, and use it for utf8 string data - - cpp/poppler-global.cpp | 12 +++--------- - cpp/poppler-global.h | 5 ++++- - cpp/poppler-private.cpp | 5 ++--- - 3 files changed, 9 insertions(+), 13 deletions(-) - -commit 2d13ac31671b2007e44a90f45a82cb3adfa9c80c -Author: Pino Toscano <pino@kde.org> -Date: Mon Dec 14 02:30:06 2009 +0100 - - update ignore files - - .gitignore | 1 + - cpp/.gitignore | 1 + - 2 files changed, 2 insertions(+) - -commit 01e902e40ca15acf0319e37d39a271d6875bfce9 -Author: Pino Toscano <pino@kde.org> -Date: Mon Dec 14 02:02:47 2009 +0100 - - [cpp] add a version header+functions - - this way, it is possible to get (either at build time and at runtime) - the version of the current poppler-cpp library - - poppler-config.h is generated by the build system (autotools or cmake) - with the correct version information - - configure.ac | 2 ++ - cpp/CMakeLists.txt | 5 +++++ - cpp/Makefile.am | 6 ++++-- - cpp/poppler-version.cpp | 41 +++++++++++++++++++++++++++++++++++++++++ - cpp/poppler-version.h.in | 39 +++++++++++++++++++++++++++++++++++++++ - 5 files changed, 91 insertions(+), 2 deletions(-) - -commit b3f5e5d60bc9109da961940f6216722f9db4a87b -Author: Pino Toscano <pino@kde.org> -Date: Mon Dec 14 00:56:15 2009 +0100 - - [CMake] add the configure check for the Cairo blend modes support - (as in autotools) - - cmake/modules/FindCairo.cmake | 18 ++++++++++++++++++ - config.h.cmake | 3 +++ - 2 files changed, 21 insertions(+) - -commit f6ba877e0c22538cfe34d32d69814f660de59d2c -Author: Pino Toscano <pino@kde.org> -Date: Mon Dec 14 00:44:55 2009 +0100 - - [CMake] add configure check for sys/mman.h (as in autotools) - - ConfigureChecks.cmake | 1 + - config.h.cmake | 3 +++ - 2 files changed, 4 insertions(+) - -commit e12801320ae030628fc62c073983c06b39ee13d7 -Author: Pino Toscano <pino@kde.org> -Date: Mon Dec 14 00:42:20 2009 +0100 - - minor spello - - config.h.cmake | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 6428907ebcf33d4391673aadcfa71c3061f6d352 -Author: Pino Toscano <pino@kde.org> -Date: Mon Dec 14 00:41:49 2009 +0100 - - [CMake] add configure check for fcntl.h (as in autotools) - - ConfigureChecks.cmake | 1 + - config.h.cmake | 3 +++ - 2 files changed, 4 insertions(+) - -commit 916ab7163249e23bd5ba00922fdcad9caaf92c75 -Author: Pino Toscano <pino@kde.org> -Date: Mon Dec 14 00:34:59 2009 +0100 - - [CMake] oops, those should have been '#cmakedefine' and not '#define' - - config.h.cmake | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit ea655d8c7e24e97ee710110a783ed9c209cf76e3 -Author: Pino Toscano <pino@kde.org> -Date: Mon Dec 14 00:33:51 2009 +0100 - - [CMake] move and rename to match more the autotools output - - config.h.cmake | 21 ++++++++++++++------- - 1 file changed, 14 insertions(+), 7 deletions(-) - -commit 9f0146c5b2f9326e834104b89791f66b18f85adc -Author: Pino Toscano <pino@kde.org> -Date: Mon Dec 14 00:28:04 2009 +0100 - - [CMake] add checks for gmtime_r and localtime_r - - ConfigureChecks.cmake | 2 ++ - config.h.cmake | 6 ++++++ - 2 files changed, 8 insertions(+) - -commit 9d0cf201e96044dd679c26bea6255d986a6cd246 -Author: Pino Toscano <pino@kde.org> -Date: Sun Dec 13 23:45:39 2009 +0100 - - [cpp] add ignore file - - cpp/.gitignore | 6 ++++++ - 1 file changed, 6 insertions(+) - -commit d783e92b863d8b22de6ca326328115fec63193ed -Author: Pino Toscano <pino@kde.org> -Date: Sun Dec 13 23:42:33 2009 +0100 - - [cpp] don't forget the cmake stuff when packing with the autotools - - Makefile.am | 2 ++ - 1 file changed, 2 insertions(+) - -commit 0105caefe860e7a45fc7d3a1bd1162fe56bcfe6a -Author: Pino Toscano <pino@kde.org> -Date: Sun Dec 13 23:40:55 2009 +0100 - - [cpp] add the pkg-config stuff - - CMakeLists.txt | 3 +++ - Makefile.am | 7 +++++-- - configure.ac | 3 ++- - poppler-cpp.pc.cmake | 9 +++++++++ - poppler-cpp.pc.in | 9 +++++++++ - 5 files changed, 28 insertions(+), 3 deletions(-) - -commit d5a74f78df0dca24fd537b30424fd2ebb3efe3e2 -Author: Pino Toscano <pino@kde.org> -Date: Sun Dec 13 23:35:06 2009 +0100 - - [cpp] add the (rest of the) CMake build system for it - - CMakeLists.txt | 5 +++++ - 1 file changed, 5 insertions(+) - -commit 0e41f937946e4e4c1b660406bd74e4afe8825b5f -Author: Pino Toscano <pino@kde.org> -Date: Sun Dec 13 23:31:46 2009 +0100 - - [cpp] add the autotools buildsystem for it - - Makefile.am | 6 +++++- - configure.ac | 15 +++++++++++++++ - cpp/Makefile.am | 32 ++++++++++++++++++++++++++++++++ - 3 files changed, 52 insertions(+), 1 deletion(-) - -commit 9727fdc0c682742335e44ddc2f32d60e4c59983a -Author: Pino Toscano <pino@kde.org> -Date: Sun Dec 13 22:55:28 2009 +0100 - - Start of a pure C++ frontend for Poppler. - - This initial version (called 'poppler-cpp') includes preliminary - support for: - - document (loading from file name, some query methods, unlocking, - font listing, embedded files) - - page (some query methods) with page transitions - - TOC - - Modelled a bit on the Qt4 API, it provides also an own "ustring" - typedef representing UTF-16 strings, - with methods to convert back/to UTF-8 and Latin 1. - - Most probably it has bugs, but nevertheless worth testing and - developing. - - cpp/CMakeLists.txt | 34 ++++ - cpp/poppler-document-private.h | 55 +++++++ - cpp/poppler-document.cpp | 316 - ++++++++++++++++++++++++++++++++++++ - cpp/poppler-document.h | 92 +++++++++++ - cpp/poppler-embedded-file-private.h | 40 +++++ - cpp/poppler-embedded-file.cpp | 116 +++++++++++++ - cpp/poppler-embedded-file.h | 55 +++++++ - cpp/poppler-font.cpp | 166 +++++++++++++++++++ - cpp/poppler-font.h | 91 +++++++++++ - cpp/poppler-global.cpp | 162 ++++++++++++++++++ - cpp/poppler-global.h | 86 ++++++++++ - cpp/poppler-page-private.h | 44 +++++ - cpp/poppler-page-transition.cpp | 95 +++++++++++ - cpp/poppler-page-transition.h | 82 ++++++++++ - cpp/poppler-page.cpp | 121 ++++++++++++++ - cpp/poppler-page.h | 62 +++++++ - cpp/poppler-private.cpp | 70 ++++++++ - cpp/poppler-private.h | 66 ++++++++ - cpp/poppler-rectangle.h | 60 +++++++ - cpp/poppler-toc-private.h | 62 +++++++ - cpp/poppler-toc.cpp | 136 ++++++++++++++++ - cpp/poppler-toc.h | 74 +++++++++ - 22 files changed, 2085 insertions(+) - -commit 62854051f4e47028147cc93a5faac39e2fa2c9fd -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Dec 12 17:22:08 2009 +0100 - - Initialize profileCommands in Gfx constructor - - poppler/Gfx.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 4e6af25a028d16608111634c5467420e31fa399b -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Wed Dec 9 19:45:40 2009 +0100 - - [cairo] Update font of TextPage in CairoOutputDev::updateAll() - - Fixes a crash with some documents, see Evince bug - https://bugzilla.gnome.org/show_bug.cgi?id=603934 - - poppler/CairoOutputDev.cc | 2 ++ - 1 file changed, 2 insertions(+) - -commit 6798d3e52e36e91bceff3a1a96372e9d9c6f3813 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Dec 6 15:34:36 2009 +0100 - - Use fixed size array in AnnotColor - - glib/poppler-annot.cc | 2 +- - poppler/Annot.cc | 24 +++++------------------- - poppler/Annot.h | 5 ++--- - poppler/Gfx.cc | 2 +- - qt4/src/poppler-annotation.cc | 2 +- - 5 files changed, 10 insertions(+), 25 deletions(-) - -commit 92fab93bee3748a73c09429cc8a105c16f21fed0 -Author: Axel Struebing <axel.struebing@freenet.de> -Date: Sat Dec 5 22:31:29 2009 +0000 - - Add a empty space after null - - Fixes bug 25465 - - poppler/PDFDoc.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 32103f45d0193b31e95269ea9123b8011d93e994 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Dec 5 10:14:18 2009 +0100 - - [annots] Add isVisible() to check whether annot is visible before - drawing it - - It takes into account annot flags and optional content. - - poppler/Annot.cc | 29 ++++++++++++++--------------- - poppler/Annot.h | 1 + - 2 files changed, 15 insertions(+), 15 deletions(-) - -commit c14dfc7102341f5e1ed67a05c0738d55befab1ec -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Dec 5 10:07:46 2009 +0100 - - [annots] Do not check if annot is a link in Annot::draw() - - AnnotLink already implements draw() - - poppler/Annot.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit ddf85d4a51f605eed998c633857b8bb5c74ab590 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Dec 4 14:59:41 2009 +0100 - - Make the code a bit more resilient - - By checking the GooString we are going to use really exists - - poppler/PSOutputDev.cc | 24 ++++++++++++++++-------- - 1 file changed, 16 insertions(+), 8 deletions(-) - -commit 78b4afa0a44048b8d40438d400652dbae4cb99b1 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Dec 4 14:57:10 2009 +0100 - - Accept Fontname if FontName is not present - - Fixes KDE bug 217013 - - poppler/GfxFont.cc | 9 +++++++++ - 1 file changed, 9 insertions(+) - -commit fee5cb0eec2ddb8d596289e9a6285cf04d97632e -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri Dec 4 13:26:42 2009 +0100 - - [annots] Remove redundant flags definition - - poppler/Annot.cc | 22 +++++++++------------- - 1 file changed, 9 insertions(+), 13 deletions(-) - -commit 3a94e8ce90c0a4d11c5c5aa8805c167c8a0434e5 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri Nov 27 15:23:11 2009 +0100 - - [cairo] Revert commit 77c2e154c2cb57300116ecd4295f1e67b06b411f - - And fix bug #24575 jut by checking pointer is not null before - using it. - - poppler/CairoOutputDev.cc | 12 +++++------- - 1 file changed, 5 insertions(+), 7 deletions(-) - -commit a093b768e64d477ebdd5f6b519d80a6c45706e7e -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Nov 22 20:23:49 2009 +0100 - - Add copyrights - - poppler/CairoFontEngine.cc | 2 +- - poppler/CairoOutputDev.cc | 4 ++-- - poppler/CairoOutputDev.h | 2 +- - 3 files changed, 4 insertions(+), 4 deletions(-) - -commit 77c2e154c2cb57300116ecd4295f1e67b06b411f -Author: David Benjamin <davidben@mit.edu> -Date: Sun Nov 22 20:19:29 2009 +0100 - - Do not crash on malformed files - - bug 24575 - - poppler/CairoOutputDev.cc | 5 +++++ - 1 file changed, 5 insertions(+) - -commit 1d0cb9b2cfd4d4d9aa9b0ad83ad6408544263a09 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Nov 22 19:59:34 2009 +0100 - - [cairo] Initialize fill_color and stroke_color - - poppler/CairoOutputDev.cc | 2 ++ - 1 file changed, 2 insertions(+) - -commit 32de2ac62fb87570e1a59152f37b86e571a01180 -Author: Ilya Gorenbein <igorenbein@finjan.com> -Date: Sun Nov 22 19:51:54 2009 +0100 - - Improve the reconstruction of the XRef - - Makes load a file Ilya can't share - - poppler/XRef.cc | 165 - ++++++++++++++++++++++++++++++++------------------------ - 1 file changed, 95 insertions(+), 70 deletions(-) - -commit 039c6dffbfbed46a11e207048a3247d6921d6b02 -Author: Ilya Gorenbein <igorenbein@finjan.com> -Date: Sun Nov 22 15:14:20 2009 +0100 - - Correctly initialize fileName - - poppler/Link.cc | 2 ++ - 1 file changed, 2 insertions(+) - -commit b905caf1785ee207cc0480953da69be302d3d4e9 -Author: David Benjamin <davidben@mit.edu> -Date: Sat Nov 21 02:43:21 2009 +0100 - - Be more lenient with /Decode key on images - - The spec requires the field be [1 0] or [0 1]. Adobe accepts - floating point - values as well. This fixes bug #17439. - - poppler/Gfx.cc | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -commit d99e7a88845a5f4b35e2c538c597316b2ad541ca -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Nov 20 22:09:44 2009 +0100 - - Check for openjpeg in the C++ part as it uses bool in the header - - Bug 25103 - - configure.ac | 61 - ++++++++++++++++++++++++++++++------------------------------ - 1 file changed, 30 insertions(+), 31 deletions(-) - -commit 55261a2dc86241c8d132e590e76e7398b3ca5090 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Nov 18 22:26:01 2009 +0100 - - replace floor with a cast to int for numbers > 0 - - bug-poppler13487.pdf gets a 15% faster rendering - - splash/SplashMath.h | 19 +++++++++++++++++-- - 1 file changed, 17 insertions(+), 2 deletions(-) - -commit 28df9fb323f14dc632c9502655abf69984b7d67e -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Nov 18 21:57:02 2009 +0100 - - Remove unused label - - poppler/Catalog.cc | 1 - - 1 file changed, 1 deletion(-) - -commit 037979a01a6fcafc61360e758dbc4a5eb056825e -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Nov 17 19:12:30 2009 +0100 - - [cairo] If there's a soft mask available when filling, apply the - mask instead of filling - - Fixes bug #8474. - - poppler/CairoOutputDev.cc | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -commit 46380d36f004d71dd2c2e7bc82836af248684b51 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Nov 17 20:48:22 2009 +0100 - - i didn't want to commit this - - configure.ac | 60 - +++++++++++++++++++++++++++-------------------------- - splash/SplashMath.h | 5 ++--- - utils/pdftoppm.cc | 8 ------- - 3 files changed, 33 insertions(+), 40 deletions(-) - -commit 1844e0927ae89824f59b2b3378bf5e00a51a251c -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Nov 17 20:34:24 2009 +0100 - - do not use setAttribute with doubles - - it is evil and locale dependant, we do NOT want that so use - QString::number - - configure.ac | 60 +++++++++++++++---------------- - qt4/src/poppler-annotation.cc | 82 - +++++++++++++++++++++---------------------- - splash/SplashMath.h | 5 +-- - utils/pdftoppm.cc | 8 +++++ - 4 files changed, 81 insertions(+), 74 deletions(-) - -commit 572d79f4b8a7bf1717b88dbd2609d8fa9b036dee -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Nov 15 20:40:56 2009 +0100 - - Only calculate the matrix when it is really needed - - That only happens when outputting to 1 bit images - Speeds out rendering on some pdf up to 40% - - splash/SplashScreen.cc | 35 +++++++++++++++++++++++++++++++++-- - splash/SplashScreen.h | 16 ++++++++++++++++ - 2 files changed, 49 insertions(+), 2 deletions(-) - -commit 1c3113361fa376093e6fedfbf48feee7dcbc46b7 -Author: Adrian Johnson <ajohnson@redneon.com> -Date: Sun Nov 15 19:43:18 2009 +0100 - - Write out fixed-content portion of Type 1 fonts in PSOutputDev - - If /Length3 of a Type 1 FontFile is > 0 the fixed-content from the - FontFile should be used instead of adding the generic 512 zeros and - cleartomark. - - poppler/PSOutputDev.cc | 18 +++++++++++++----- - 1 file changed, 13 insertions(+), 5 deletions(-) - -commit 2d30dc605cd984f6c32124af9aa7b877d416d141 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Nov 15 17:31:36 2009 +0100 - - [glib-demo] Show attachment name in FileAttachment annot properties - table - - glib/demo/annots.c | 5 +++++ - 1 file changed, 5 insertions(+) - -commit 6c8ae140256818401351a331787c83e043fdba09 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Nov 15 17:31:13 2009 +0100 - - [glib] Add poppler_annot_file_attachment_get_name() - - glib/poppler-annot.cc | 36 +++++++++++++++++++++++++++++------- - glib/poppler-annot.h | 1 + - 2 files changed, 30 insertions(+), 7 deletions(-) - -commit ecf5173eb288187a1f076fd4b116f1212fa9e203 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Nov 15 17:14:29 2009 +0100 - - [glib-demo] Add properties of FileAttachment annotations - - glib/demo/annots.c | 67 - ++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 67 insertions(+) - -commit 8f4fdd864d79e4fa83951a3eb006ea8287c3a1ba -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Nov 15 17:12:43 2009 +0100 - - [glib-demo] Add pgd_table_add_property_with_custom_widget() - - To be able to add properties to a table that are not labels - - glib/demo/utils.c | 31 +++++++++++++++++++++---------- - glib/demo/utils.h | 30 +++++++++++++++++------------- - 2 files changed, 38 insertions(+), 23 deletions(-) - -commit 061b85f7a442107cda67e385bd772ec8565a936e -Author: Thomas Viehmann <tv@beamnet.de> -Date: Sun Nov 15 17:11:43 2009 +0100 - - [glib] Add support for file attachment annotations - - glib/poppler-annot.cc | 69 - +++++++++++++++++++++++++++++++++++++++++++++++--- - glib/poppler-annot.h | 8 ++++++ - glib/poppler-page.cc | 3 +++ - glib/poppler-private.h | 1 + - glib/poppler.h | 49 +++++++++++++++++------------------ - 5 files changed, 102 insertions(+), 28 deletions(-) - -commit 189c45332991bce51e40bcaf65da67d2d644045a -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Nov 15 16:42:21 2009 +0100 - - [glib] Remove PopplerDocument from PopplerAttachment - - Since we are duplicating the stream we don't need to hold a - reference of - PopplerDocument anymore. - - glib/poppler-attachment.cc | 13 +------------ - glib/poppler-document.cc | 2 +- - glib/poppler-private.h | 3 +-- - 3 files changed, 3 insertions(+), 15 deletions(-) - -commit e55bfeb1ddc60053c5ee5fef840c409891781ce6 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Nov 13 00:55:37 2009 +0100 - - jpeg_start_decompress can fail, check it - - Fixes KDE bug #214317 - - poppler/DCTStream.cc | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -commit c59d93061cf71d13916872a20aed37ecfbb3bfa4 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Nov 9 18:32:55 2009 +0100 - - [cairo] Do nothing when image mask is 1x1 and the pixel is 0 - - poppler/CairoOutputDev.cc | 14 ++++++++++++++ - 1 file changed, 14 insertions(+) - -commit 448f03cfc429d33bfa5527e3dc964ef5da10ee94 -Author: Adrian Johnson <ajohnson@redneon.com> -Date: Mon Nov 9 22:52:39 2009 +1030 - - Don't render the color white in type 3 glyphs in the cairo backend - - PDF allows the "g" operator in Type 3 charprocs but cairo user fonts - will render any stroke or fill in the font color. - - As the only PDFs I've seen with "g" in the charprocs are only using - the gray values 0 or 1, a workaround is to disable strokes and fills - of the charproc when the gray level is > 0.5. - - poppler/CairoOutputDev.cc | 14 ++++++++++++++ - 1 file changed, 14 insertions(+) - -commit 3fead2a3b53681ef95116f18f17f1a9febec6e48 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Nov 9 11:25:24 2009 +0100 - - Transitions dictionary can be a Ref too - - poppler/Page.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit ac4955d03a532cab1933698aeb667d44300e52d0 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Nov 9 11:12:48 2009 +0100 - - [glib-demo] Explicitely add gio as dependency for GTK+ tests - - configure.ac | 4 ++-- - glib/demo/main.c | 1 + - 2 files changed, 3 insertions(+), 2 deletions(-) - -commit 32ea667ec8f18311539123c7b80c7ab4767070cb -Author: Chris Wilson <chris@chris-wilson.co.uk> -Date: Tue Aug 11 19:17:52 2009 +0100 - - [cairo] Mark images dirty - - After directly manipulating the pixel values we need to mark the - surface - as dirty. This means that cairo will refresh any caches it may - have taken - of the surface will the new data. - - poppler/CairoOutputDev.cc | 8 ++++++++ - 1 file changed, 8 insertions(+) - -commit 10a41150c4067bb3ab85e25dae76e0968a6cd586 -Author: Chris Wilson <chris@chris-wilson.co.uk> -Date: Tue Aug 11 19:17:06 2009 +0100 - - [cairo] Use colToDbl() to avoid rounding error. - - poppler/CairoOutputDev.cc | 37 +++++++++++++++++++------------------ - 1 file changed, 19 insertions(+), 18 deletions(-) - -commit c9491319689f04edd57adda7ee85f84f17fd1c47 -Author: Chris Wilson <chris@chris-wilson.co.uk> -Date: Tue Aug 11 18:07:17 2009 +0100 - - [cairo] Reduce the number of redundant pattern creations - - poppler/CairoOutputDev.cc | 84 - ++++++++++++++++++++++++++++------------------- - 1 file changed, 51 insertions(+), 33 deletions(-) - -commit ead78d9f703c8b2d556c94be3c47dbae7469eda8 -Author: Reece Dunn <msclrhd@gmail.com> -Date: Thu Nov 5 22:25:14 2009 +0100 - - fontpos is never set to -1, so remove the checks in HtmlOutputDev. - - utils/HtmlOutputDev.cc | 11 +++-------- - 1 file changed, 3 insertions(+), 8 deletions(-) - -commit 55dd6024a4672a1787e8b1a8276bd78fff94e2cd -Author: Ilya Gorenbein <igorenbein@finjan.com> -Date: Wed Nov 4 22:07:18 2009 +0100 - - Do not error on files without "Count" and "Kids" - - It is not spec compliant not to have those fields but Adobe Reader and - FoxIt seems to allow it so try to behave like them. See bug 24720 - to see why one would want such file - - poppler/Catalog.cc | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -commit 58a1d42aed7352c008d201b8f355f6e4146f71e5 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Oct 29 18:38:22 2009 +0100 - - [cairo] Don't render patterns when using CairoImageOutputDev - - poppler/CairoOutputDev.h | 15 +++++++++++++-- - 1 file changed, 13 insertions(+), 2 deletions(-) - -commit 7670cc48dcf3ffd77e3ffa29056a3e13b2926709 -Author: Ilya Gorenbein <igorenbein@finjan.com> -Date: Wed Oct 28 19:20:41 2009 +0100 - - There are some pdf where Aspect values are reals, use getNum - - Fixes bug 24733 - - poppler/Annot.cc | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -commit 4fe89e520a04a6ab6d6ec6a8294896b2f427c7da -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Oct 25 21:55:55 2009 +0100 - - do not accept negative interval lengths in the page labels tree - - See bug 24721 - - poppler/PageLabelInfo.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit b174ebd6b323c7a58a19d59c1a9e4ac4e6cba7d9 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Oct 23 21:57:42 2009 +0200 - - Move the iccColorSpaceCache from a static in GfxState to a member - of Gfx - - Fixes the problem that the keys are per document but we had a static - that lived as much as the library. Now the cache only lives the - rendering - of a page so it's a bit slower but at least it's correct. Fixes - bug 24686 - - poppler/Gfx.cc | 49 ++++++++++++++++++---------- - poppler/Gfx.h | 13 ++++++-- - poppler/GfxState.cc | 94 - ++++++++++++++++++++++++++--------------------------- - poppler/GfxState.h | 33 +++++++++---------- - poppler/Page.cc | 4 +-- - 5 files changed, 107 insertions(+), 86 deletions(-) - -commit 4a9bdd30dc353865685e03eb1c1ac6093797695a -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Oct 22 21:26:29 2009 +0200 - - initialize len at 0 when reading the font fails - - See bug 24525 for more info - - poppler/GfxFont.cc | 1 + - 1 file changed, 1 insertion(+) - -commit c839b706092583f6b12ed3cc634bf5af34b7a2bb -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Oct 20 10:09:13 2009 +0200 - - [glib] Fix CVE-2009-3607 - - glib/poppler-page.cc | 20 ++++++++++---------- - 1 file changed, 10 insertions(+), 10 deletions(-) - -commit 44462e0ca39392e5629020226b901e4026089b46 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Oct 19 23:33:58 2009 +0200 - - fix memory leak - - poppler/PSOutputDev.cc | 1 + - 1 file changed, 1 insertion(+) - -commit d701aaa9eaa62567210070129f5feffe24bf1936 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Oct 18 01:22:16 2009 +0200 - - This include is needed as this file uses Ref - - poppler/OutputDev.h | 1 + - 1 file changed, 1 insertion(+) - -commit d4202536e1b62c326c301d5088fa0e176c523e85 -Author: Pino Toscano <pino@kde.org> -Date: Sat Oct 17 01:35:11 2009 +0200 - - SplashGlyphBitmap is a struct and not a class - - poppler/ArthurOutputDev.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 654176dee7c9325aa5a24a2de3c070faa16e8a9c -Author: Michael Jansen <kde@michael-jansen.biz> -Date: Sat Oct 17 01:30:40 2009 +0200 - - CMake: add the possibility to pass LIB_SUFFIX. - - This allows to tune the installation libdir by adding a suffix for it - (making it eg lib, lib32, or lib64) - - CMakeLists.txt | 16 +++++++++------- - glib/CMakeLists.txt | 2 +- - poppler-cairo.pc.cmake | 2 +- - poppler-glib.pc.cmake | 2 +- - poppler-qt.pc.cmake | 2 +- - poppler-qt4.pc.cmake | 2 +- - poppler-splash.pc.cmake | 2 +- - poppler.pc.cmake | 2 +- - qt/CMakeLists.txt | 2 +- - qt4/src/CMakeLists.txt | 2 +- - 10 files changed, 18 insertions(+), 16 deletions(-) - -commit 43829ae4b25a88ace06f05fa6750e5732539f4be -Author: Pino Toscano <pino@kde.org> -Date: Sat Oct 17 01:21:39 2009 +0200 - - put a space so MSVC won't try to see it as comment - - poppler/GfxState.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit f64086ea22a4e8cb3d4e7116db2a9541ac2fb19f -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Oct 17 00:48:58 2009 +0200 - - check the document is not locked when printing - - qt4/src/poppler-ps-converter.cc | 6 ++++++ - 1 file changed, 6 insertions(+) - -commit 85d1015480b7ab3f21cc5f78dc53d4c5efdc6e60 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Oct 17 00:48:27 2009 +0200 - - fix file name comment - - qt4/src/poppler-ps-converter.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 270764ad1bf2cfe95aed0b6850d2347361b4268d -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Oct 17 00:47:34 2009 +0200 - - Add a way for converters to return more exact errors they had when - converting - - qt4/src/poppler-base-converter.cc | 8 +++++++- - qt4/src/poppler-converter-private.h | 3 ++- - qt4/src/poppler-pdf-converter.cc | 11 ++++++++++- - qt4/src/poppler-ps-converter.cc | 6 +++++- - qt4/src/poppler-qt4.h | 14 ++++++++++++++ - 5 files changed, 38 insertions(+), 4 deletions(-) - -commit 1082e1671afd8ab91583dabc876304008acb021c -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Oct 16 23:17:22 2009 +0200 - - Some "security" fixes based on newly released Xpdf 3.02pl4 - - poppler/Stream.cc | 4 ++++ - poppler/XRef.cc | 19 +++++++++++++++---- - splash/Splash.cc | 7 +++++++ - splash/SplashBitmap.cc | 37 ++++++++++++++++++++++++++++++------- - splash/SplashErrorCodes.h | 4 +++- - 5 files changed, 59 insertions(+), 12 deletions(-) - -commit c2458275e02f56226779b82d73c13defcbbda563 -Author: Glenn Ganz <glenn.ganz@uptime.ch> -Date: Fri Oct 16 20:54:32 2009 +0200 - - fix constructor of DCTStream - - poppler/Stream.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit fd91b79c053bb5cd01a766032b90981dbc5e5dd3 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Oct 10 14:53:42 2009 +0200 - - fix compiling with automake - - goo/Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit c3031b4318af6f85256f2478c8678dedd0d6acd1 -Author: Pino Toscano <pino@kde.org> -Date: Fri Oct 9 16:17:16 2009 +0200 - - cmake: simplify the linking to libpng - - CMakeLists.txt | 7 +++---- - 1 file changed, 3 insertions(+), 4 deletions(-) - -commit 96688dd7a091f8fa141fad2b3d05bae04b0b86fb -Author: Patrick Spendrin <ps_ml@gmx.de> -Date: Fri Oct 9 16:09:46 2009 +0200 - - MSVC: add _CRT_SECURE_NO_WARNINGS to the define's - - CMakeLists.txt | 1 + - 1 file changed, 1 insertion(+) - -commit f346c1f6b55f87ebd6bb0b0932462d5514aa40ff -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Oct 9 00:29:06 2009 +0200 - - add -ansi flag to default warnings - - cmake/modules/PopplerMacros.cmake | 2 +- - configure.ac | 2 +- - utils/parseargs.c | 30 +++++++++++++++--------------- - utils/parseargs.h | 26 +++++++++++++------------- - 4 files changed, 30 insertions(+), 30 deletions(-) - -commit 53e0016b772f1b78d998506e2f3106011d32cef3 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Oct 9 00:15:52 2009 +0200 - - Add virtual destructor to ImgWriter - - CMakeLists.txt | 1 + - goo/ImgWriter.cc | 15 +++++++++++++++ - goo/ImgWriter.h | 2 ++ - goo/Makefile.am | 1 + - 4 files changed, 19 insertions(+) - -commit 699dcacced7be05b788c414c231dc2b5c07de06e -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Oct 9 00:13:11 2009 +0200 - - Add -Wnon-virtual-dtor flag - - cmake/modules/PopplerMacros.cmake | 4 ++-- - configure.ac | 2 +- - 2 files changed, 3 insertions(+), 3 deletions(-) - -commit d1e4fca4a8602994b010fae4f4fea5cd4df9276e -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Oct 9 00:10:03 2009 +0200 - - build on cmake too - - CMakeLists.txt | 1 + - 1 file changed, 1 insertion(+) - -commit d67511c92022121066f43003f01b955962ddcd33 -Author: Stefan Thomas <thomas@eload24.com> -Date: Fri Oct 9 00:09:23 2009 +0200 - - Add -jpeg to pdftoppm - - goo/ImgWriter.h | 28 +++++++++++++++ - goo/JpegWriter.cc | 92 - ++++++++++++++++++++++++++++++++++++++++++++++++++ - goo/JpegWriter.h | 42 +++++++++++++++++++++++ - goo/Makefile.am | 2 ++ - goo/PNGWriter.cc | 5 +-- - goo/PNGWriter.h | 10 +++--- - splash/SplashBitmap.cc | 46 +++++++++++++++++-------- - splash/SplashBitmap.h | 5 +-- - splash/SplashTypes.h | 11 ++++++ - utils/pdftoppm.1 | 3 ++ - utils/pdftoppm.cc | 22 +++++++++--- - 11 files changed, 239 insertions(+), 27 deletions(-) - -commit 388196df1fb05fb2d88ae82bd81e823a23588ec1 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Wed Oct 7 17:11:58 2009 +0200 - - [glib-demo] Show some of the annot flags in annots treeview - - glib/demo/annots.c | 35 +++++++++++++++++++++++++++++++++-- - 1 file changed, 33 insertions(+), 2 deletions(-) - -commit 034907c6582c1f50782ec9c58a29b140c6fc0688 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Oct 6 00:52:10 2009 +0200 - - Forgot to update the year here - - qt4/src/poppler-private.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit fef89acebf5312324c104fb52e629563fbc2de76 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Oct 6 00:42:52 2009 +0200 - - Add the possibility of enabling hinting - - qt4/src/poppler-document.cc | 2 +- - qt4/src/poppler-private.h | 1 + - qt4/src/poppler-qt4.h | 3 ++- - 3 files changed, 4 insertions(+), 2 deletions(-) - -commit 485252844b5e0964ee724b74e2a7ba2b820b259e -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Oct 6 00:41:57 2009 +0200 - - rework how hinting is used in the splash backend - - Basically we default to no hinting now with the possibility to - enable it - - poppler/ArthurOutputDev.cc | 2 +- - poppler/GlobalParams.cc | 19 ------------- - poppler/GlobalParams.h | 3 --- - poppler/SplashOutputDev.cc | 8 +++++- - poppler/SplashOutputDev.h | 3 +++ - splash/SplashFTFont.cc | 64 - ++++++++++---------------------------------- - splash/SplashFTFont.h | 4 +-- - splash/SplashFTFontEngine.cc | 8 +++--- - splash/SplashFTFontEngine.h | 7 ++--- - splash/SplashFontEngine.cc | 5 ++-- - splash/SplashFontEngine.h | 3 ++- - 11 files changed, 40 insertions(+), 86 deletions(-) - -commit 8194c156cf2167834779e1690a89b5068baf8d58 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Oct 5 00:55:55 2009 +0200 - - Fix includes for those using internal headers - - goo/FixedPoint.h | 2 +- - goo/gmem.h | 2 +- - poppler/OutputDev.h | 2 +- - poppler/PSOutputDev.h | 2 +- - poppler/PageLabelInfo.h | 2 +- - utils/ImageOutputDev.h | 2 +- - 6 files changed, 6 insertions(+), 6 deletions(-) - -commit 091f68ccd59413d6890dfbfcf8911f112e690b50 -Author: Kovid Goyal <kovid@kovidgoyal.net> -Date: Mon Oct 5 00:39:36 2009 +0200 - - Use _WIN32 instead of WIN32 - - More info at http://bugs.freedesktop.org/show_bug.cgi?id=24259 - - goo/GooMutex.h | 16 +++++++++++++++- - goo/gfile.cc | 33 +++++++++++++++++---------------- - goo/gfile.h | 5 +++-- - msvc/poppler/poppler-config.h | 2 +- - poppler-config.h.cmake | 2 +- - poppler/ABWOutputDev.h | 3 ++- - poppler/FileSpec.cc | 7 ++++--- - poppler/GlobalParams.cc | 37 +++++++++++++++++++------------------ - poppler/GlobalParams.h | 4 ++-- - poppler/Link.cc | 3 ++- - poppler/PDFDoc.cc | 4 ++-- - poppler/PDFDoc.h | 3 ++- - poppler/PSOutputDev.cc | 5 +++-- - poppler/TextOutputDev.cc | 5 +++-- - poppler/XpdfPluginAPI.cc | 13 ++++++++++++- - poppler/poppler-config.h.in | 2 +- - splash/SplashFontEngine.cc | 9 +++++---- - test/perf-test.cc | 24 ++++++++++++------------ - utils/HtmlOutputDev.h | 3 ++- - 19 files changed, 108 insertions(+), 72 deletions(-) - -commit 7fd8bdfa450db4e323e4e5d12159359fbc47f9ed -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Oct 5 00:21:15 2009 +0200 - - Remove spurious ; - - Found by -Wextra i think we should add more warnings to our default - flags - - qt4/src/poppler-annotation.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit d46f7343e446331489d3fe6711a7cf778e0bd902 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Oct 2 22:04:46 2009 +0200 - - Strings can have 0 inside so use the length - - Fixes saving some files - - poppler/PDFDoc.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 2bc2040081919340415f576ce8266356deadbfcd -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Oct 2 22:04:03 2009 +0200 - - Increase decimals from 5 to 10, a double has that precision - - Makes saving more faithful for some files - - poppler/PDFDoc.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 05eb7342d5234732f27c9c67b7fc1f9e40a4e075 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Oct 2 22:03:40 2009 +0200 - - If the stream was wrongly formed save the correct length - - Fixes saving of some files - - poppler/PDFDoc.cc | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - -commit b98faa4c162392d9416a5a93c9042b41f82d8657 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Oct 2 22:02:13 2009 +0200 - - Return the save status as program status - - test/pdf-fullrewrite.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit f73f59f2c7bb7c7d57eb70cdc1bc30b80a92d0b7 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Oct 2 22:01:45 2009 +0200 - - If the Length entry of the stream is wrong, fix it - - Fixes saving some files - - poppler/Parser.cc | 5 +++++ - 1 file changed, 5 insertions(+) - -commit 91135c7e788bc32e414e1a9c9ab43b326a07e970 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Oct 2 22:00:12 2009 +0200 - - increase the range of characters we sanitize - - Fixes saving of some files - - goo/GooString.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 9dcb3e8be2cd52a795605548e43d6bfc149b2ea5 -Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> -Date: Sun Sep 27 17:17:32 2009 +0200 - - Fix the linking not to use the .so directly but the lib - - Fixes check on cygwin - - m4/qt.m4 | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit ed4a6f1cfc7ccd2717d939841c092347c3307547 -Author: Kovid Goyal <kovid@kovidgoyal.net> -Date: Sat Sep 26 19:26:19 2009 +0200 - - Do not crash when saving files that come from a stream without name - - Bug 24090 - - poppler/PDFDoc.cc | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -commit 04b232d48930af9bc614d7fef47f79ce247713a4 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Sep 26 18:30:41 2009 +0200 - - Write the Info into the trailer dict if there is one - - Bug 24091 - - poppler/PDFDoc.cc | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -commit 343e4f9aceb935eb393ad94bbef4dbb1b1a450ee -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Sep 26 18:28:40 2009 +0200 - - Plug leak - - test/pdf-fullrewrite.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 2ea0032283c4717f1bb285fab7956fc38f375e87 -Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> -Date: Sat Sep 26 15:01:35 2009 +0200 - - Patch to make poppler work on Cygwin - - Bug 4195 - - configure.ac | 3 +++ - qt/Makefile.am | 2 +- - qt4/src/Makefile.am | 2 +- - 3 files changed, 5 insertions(+), 2 deletions(-) - -commit 074dc5e5e39cebc1fbe9bf6a15b2cae2391006c1 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Sep 26 14:56:38 2009 +0200 - - Improve realibility for Streams with broken Length - - Fixes bug 6841 - - poppler/Parser.cc | 17 +++++++++++++---- - 1 file changed, 13 insertions(+), 4 deletions(-) - -commit b7702820245fb6cdbf77afba37c53c03d4362a25 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Sep 21 21:58:26 2009 +0200 - - Print with a . and not with a , in all locales - - This is a regression after the removal of setting LC_NUMERIC - - poppler/PDFDoc.cc | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -commit d31080d8195694cef740d4e77484179bb38d1f26 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Sep 20 17:21:13 2009 +0200 - - CharCodeToUnicode is not mandatory in fonts, don't crash one fonts - that do not have it - - Fixes bug #24036 - - poppler/Annot.cc | 33 ++++++++++++++++++++------------- - 1 file changed, 20 insertions(+), 13 deletions(-) - -commit a729d005a7204791fa8415de5aa0834136073ce8 -Author: Pino Toscano <pino@kde.org> -Date: Thu Sep 17 20:12:20 2009 +0200 - - Windows32/MSVC: initialize the font list once per GlobalParams, - instead of once at all - - this fixes the font list being empty at the second (and following) - GlobalParams creation - thanks for Christian Ehrlicher for reporting the bug and testing - its fix - - poppler/GlobalParams.cc | 1 + - poppler/GlobalParams.h | 1 + - poppler/GlobalParamsWin.cc | 1 - - 3 files changed, 2 insertions(+), 1 deletion(-) - -commit 68711d8494e2765c4a24ea59ce8d904981f0f917 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Sep 9 23:24:22 2009 +0200 - - uint -> Guint - - some compilers don't know about uint - - poppler/Gfx.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 943a13c9354dec18cb023642aebbe5d3bb920ed7 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Sep 9 20:04:06 2009 +0200 - - poppler 0.12.0 - - CMakeLists.txt | 4 ++-- - NEWS | 18 ++++++++++++++++++ - configure.ac | 4 ++-- - msvc/config.h | 6 +++--- - qt4/src/Doxyfile | 2 +- - 5 files changed, 26 insertions(+), 8 deletions(-) - -commit e8ed7210346cb18f6e4588ad557f993c6d42f4a3 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Sep 9 19:21:21 2009 +0200 - - increase library to 3.2.0 - - qt4/src/CMakeLists.txt | 2 +- - qt4/src/Makefile.am | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit e950107006a3b1889646d3705323c1b3d41eaa49 -Author: David Benjamin <davidben@mit.edu> -Date: Wed Sep 9 01:19:38 2009 +0200 - - Fix infinite loop in JBIG2Decoder - - Bug 23025 - Also fixes problems in bug-poppler6881-2.pdf and bug-poppler6500.pdf - - poppler/JBIG2Stream.cc | 13 ++++++++----- - 1 file changed, 8 insertions(+), 5 deletions(-) - -commit 1cb25a4adaaf3e2da50724312a3db6928991f425 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Sep 6 10:45:56 2009 +0200 - - [glib] Ignore attachments with an invalid embedded file - - Fixes bug #10386 - - glib/poppler-document.cc | 4 ++++ - 1 file changed, 4 insertions(+) - -commit 842e00f3114666609ef4dec6fa613d46f330a40c -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Sep 5 15:20:35 2009 +0200 - - Add EmbeddedFile::isValid - - Also do not crash if data() is called on an invalid file - - qt4/src/poppler-embeddedfile.cc | 10 +++++++++- - qt4/src/poppler-qt4.h | 9 ++++++++- - 2 files changed, 17 insertions(+), 2 deletions(-) - -commit 9d40b268f5a9a9a0fb79da0e1627dd8eebc4db6a -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Sep 5 15:19:27 2009 +0200 - - Add EmbFile::isOk - - At the moment returns false if the object stream is not really - a stream - - poppler/Catalog.h | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 642650b6f70425c8fff2df978ae71249a5ae07f3 -Author: David Benjamin <davidben@mit.edu> -Date: Sat Sep 5 01:12:49 2009 +0200 - - Better fallback when there's a type mismatch - - Bug #17252 - - poppler/GfxFont.cc | 38 ++++++++++++++++++++++++++++++++------ - 1 file changed, 32 insertions(+), 6 deletions(-) - -commit bf5811f5331292ccf30f1b0f089fe43d351d96be -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Aug 26 00:43:46 2009 +0200 - - Improve shading color rendering - - Shading is not necessarily lineal so require another bisection to - assume all the area in between have the same color. Fixes bug #20238 - - poppler/Gfx.cc | 17 ++++++++++++++++- - 1 file changed, 16 insertions(+), 1 deletion(-) - -commit e94430b790fde6ce7b7cb163c2e0adf2d071c81d -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Aug 26 00:42:49 2009 +0200 - - Make code a bit more readable - - poppler/Gfx.cc | 23 +++++++++++------------ - 1 file changed, 11 insertions(+), 12 deletions(-) - -commit 465212780557705fd939dfe54f96913505bfc96e -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Aug 25 21:55:45 2009 +0200 - - forgot to update my copyright - - poppler/JPEG2000Stream.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 4f6016d01ced32002bef22b9b5d5426a74e55842 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Aug 25 21:10:07 2009 +0200 - - Fix format security warnings - - Don't just directly print strings of unknown content; use "%s". - - poppler/JPEG2000Stream.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 4616b23382b5d155f8b2f1942733037cf5730844 -Author: Christian Persch <chpe@gnome.org> -Date: Tue Aug 25 21:09:40 2009 +0200 - - Fix format security warnings - - Don't just directly print strings of unknown content; use "%s". - - poppler/GfxState.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 6c5c8d008456d1e4f3d60bc182209747c2a175dc -Author: Christian Persch <chpe@gnome.org> -Date: Tue Aug 25 21:03:16 2009 +0200 - - Support AM_SILENT_RULES - - When using automake 1.11, should support silent build rules. - - Makefile.am | 2 +- - configure.ac | 1 + - glib/Makefile.am | 4 ++-- - qt4/demos/Makefile.am | 2 +- - qt4/src/Makefile.am | 2 +- - qt4/tests/Makefile.am | 2 +- - 6 files changed, 7 insertions(+), 6 deletions(-) - -commit e7dd1c47b01d8f31599ee686eafbe7c54d7c023a -Author: Christian Persch <chpe@gnome.org> -Date: Tue Aug 25 21:01:13 2009 +0200 - - Fix automake check, and add automake 1.11 support - - Fix the automake checks to take the *newest* version available, - not the - oldest one. Add support for automake 1.11. FDO#23473. - - autogen.sh | 13 +++++++------ - 1 file changed, 7 insertions(+), 6 deletions(-) - -commit 493d2c5aa78a3241e70108c5d7eccba9ac72f834 -Author: Rex Dieter <rdieter@math.unl.edu> -Date: Mon Aug 24 20:08:46 2009 +0200 - - Use Requires.private if available - - The following patch minimizes pkg-config deps similar to how the - glib-related pkg-config deps are done. - - poppler-qt.pc.cmake | 3 ++- - poppler-qt.pc.in | 3 ++- - poppler-qt4.pc.cmake | 3 ++- - poppler-qt4.pc.in | 3 ++- - 4 files changed, 8 insertions(+), 4 deletions(-) - -commit 341cd3ecd08a39cd146c1c57f356b50a2881c03f -Author: Jakub Wilk <ubanus@users.sf.net> -Date: Mon Aug 24 19:51:34 2009 +0200 - - common options for pdftoabw - - The attached patch fixes command line handling for pdftoabw and - implements some - common options (e.g., --help) that are already found in other - pdftosomething - utilities. - - utils/pdftoabw.cc | 39 ++++++++++++++++++++++++++++++++------- - 1 file changed, 32 insertions(+), 7 deletions(-) - -commit 365683d5faea6e0a7570b139d1f3366c22271f8e -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Aug 18 21:18:13 2009 +0200 - - 0.11.3 - - CMakeLists.txt | 2 +- - NEWS | 22 ++++++++++++++++++++++ - configure.ac | 2 +- - msvc/config.h | 6 +++--- - qt4/src/Doxyfile | 2 +- - 5 files changed, 28 insertions(+), 6 deletions(-) - -commit cb28bc8a637d300664b3c7569263445275333878 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Aug 17 14:14:03 2009 +0200 - - [glib] Add FORMAT_MAJOR/MINOR properties to get the PDF version - - See bug #23076. - - glib/poppler-document.cc | 26 ++++++++++++++++++++++++++ - 1 file changed, 26 insertions(+) - -commit 1b5612841b0c663f6d391d4581f65f68a2975db0 -Author: Pino Toscano <pino@kde.org> -Date: Mon Aug 17 01:04:04 2009 +0200 - - [Qt] add Document::getPdfVersion(int *major, int *minor) for the - document PDF version numbers - - This new function reads the version of the PDF specification of the - document, putting major and minor numbers in own variables. - - qt/poppler-document.cc | 8 ++++++++ - qt/poppler-qt.h | 12 ++++++++++++ - 2 files changed, 20 insertions(+) - -commit aef8ecda1e80b921228f415a53c9c5a52df87d94 -Author: Pino Toscano <pino@kde.org> -Date: Mon Aug 17 00:57:08 2009 +0200 - - [Qt4] deprecate Document::pdfVersion() - - ... in favour of getPdfVersion() - - qt4/src/poppler-qt4.h | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -commit 830140f70e48e8033ad4411b6bd405d5ad7358a3 -Author: Pino Toscano <pino@kde.org> -Date: Mon Aug 17 00:51:13 2009 +0200 - - [Qt4] add Document::getPdfVersion(int *major, int *minor) for the - document PDF version numbers - - This new function reads the version of the PDF specification of the - document, putting major and minor numbers in own variables. - Add them to the relative unit test. - - qt4/src/poppler-document.cc | 8 ++++++++ - qt4/src/poppler-qt4.h | 13 +++++++++++++ - qt4/tests/check_metadata.cpp | 4 ++++ - 3 files changed, 25 insertions(+) - -commit 5491d16dfbd73f0256c62e49d02622dc3185012e -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Aug 17 00:24:41 2009 +0200 - - Move poppler core away from using a double as PDF file version - - Frontends are yet to come - - glib/poppler-document.cc | 2 +- - poppler/PDFDoc.cc | 7 ++++--- - poppler/PDFDoc.h | 8 +++++--- - qt/poppler-document.cc | 4 ++-- - qt4/src/poppler-document.cc | 4 ++-- - utils/pdfinfo.cc | 4 ++-- - 6 files changed, 16 insertions(+), 13 deletions(-) - -commit efd5dd63a5b08249529d9a9f5906aefe806fb3aa -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Aug 17 00:21:22 2009 +0200 - - Forgot to update copyright info - - fofi/FoFiType1C.cc | 14 ++++++++++++++ - poppler/PDFDoc.cc | 2 +- - utils/parseargs.c | 2 +- - 3 files changed, 16 insertions(+), 2 deletions(-) - -commit 25ff4be0b4521cc3d2de386cdeb589beb245d435 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Aug 17 00:15:10 2009 +0200 - - No need to change the locale since we use gatof that does the - right thing - - poppler/PDFDoc.cc | 6 +----- - 1 file changed, 1 insertion(+), 5 deletions(-) - -commit a6f698b4edc42c0414dd4690e1e037088321db2c -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Aug 17 00:14:35 2009 +0200 - - Use gatof instead of atof - - fofi/FoFiType1C.cc | 3 ++- - poppler/Annot.cc | 5 +++-- - poppler/Function.cc | 3 ++- - poppler/PDFDoc.cc | 3 ++- - utils/parseargs.c | 4 +++- - 5 files changed, 12 insertions(+), 6 deletions(-) - -commit 807b121cae45832d2e5832bad19c31e77420bfec -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Aug 17 00:10:30 2009 +0200 - - Add a custom strtod that comes from libspectre - - Works over C locale integers without changing locale settings - - CMakeLists.txt | 2 + - goo/Makefile.am | 6 ++- - goo/gstrtod.cc | 147 - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - goo/gstrtod.h | 43 +++++++++++++++++ - 4 files changed, 196 insertions(+), 2 deletions(-) - -commit 914bf7677a14494b69857b1d8070092a9999fe79 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Aug 16 20:50:02 2009 +0200 - - When writing the cm matrix write 4 significant digits not 4 decimals - - This fixes bug 23332 - Maybe we want to make this the default behaviour of 'g' instead of - a new 'gs' case, but i prefer to be on the safe side for the moment - - goo/GooString.cc | 27 +++++++++++++++++++++++++-- - goo/GooString.h | 4 +++- - poppler/PSOutputDev.cc | 4 ++-- - 3 files changed, 30 insertions(+), 5 deletions(-) - -commit b7dfca1aa52b825eb3b8f1cc0470398c31615b30 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Aug 16 19:28:37 2009 +0200 - - [cairo] CairoImageOutputDev doesn't implement patterns - - poppler/CairoOutputDev.h | 13 +++++++++++++ - 1 file changed, 13 insertions(+) - -commit d20d65111aee2ee4b8cdea2962ed1bb149122ba9 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Aug 16 17:36:14 2009 +0200 - - [cairo] Implement tiling patterns in cairo backend - - Fixes bug #13518 for the cairo backend. - - poppler/CairoOutputDev.cc | 56 - +++++++++++++++++++++++++++++++++++++++++++++++ - poppler/CairoOutputDev.h | 10 +++++++++ - 2 files changed, 66 insertions(+) - -commit e965d0686d979c775b64a93f8e2f775f81885417 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Aug 13 14:48:10 2009 +0200 - - Change OutputDev::tilingPatternFill to return a GBool - - It allows outputdevs to decide whether render the pattern or not - depending - on the parameters, like shaded patterns currently do. - - poppler/Gfx.cc | 37 +++++++++++++++++++------------------ - poppler/OutputDev.h | 11 ++++++----- - poppler/PSOutputDev.cc | 12 +++++++----- - poppler/PSOutputDev.h | 10 +++++----- - 4 files changed, 37 insertions(+), 33 deletions(-) - -commit ce70ef7d6afc800e24031dae43da301e9e542f0e -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Aug 15 17:45:57 2009 +0200 - - Fix backwards search - - qt4/src/poppler-page.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 5b7b1cdc5c3b8652d3ae583b4d7b8b6de625adc2 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Aug 15 17:45:05 2009 +0200 - - Add an autotest showing previousresult fails - - qt4/tests/check_search.cpp | 51 - ++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 51 insertions(+) - -commit 2484b0dcb8eb62f8e2c147498c58871ec04630b5 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Aug 14 11:47:11 2009 +0200 - - Implement the alpha path - - I wonder if this is the correct fix why it was not implemented - but if fixes rendering of files in KDE bug 145868, KDE bug 193657, - poppler bug 17473.pdf, poppler bug 21651, poppler bug 22143 and - poppler bug 22152 and causes no regression in all the other files - i have in my test dir so i'm commiting it - - poppler/SplashOutputDev.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 03970d8b6d7624444664320470baa6d1b1299622 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Aug 11 12:01:07 2009 +0200 - - [build] Fix build with autotools - - utils/Makefile.am | 1 + - 1 file changed, 1 insertion(+) - -commit 15752b7cd5c94620e3ad3b6afd9c70ccc754c9b3 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Aug 10 20:02:13 2009 +0200 - - [cairo] Add empty updateBlendMode to CairoImageOutputDev - - Fixes a crash when using CairoImageOutputDev with a document with - blend - modes. - - poppler/CairoOutputDev.h | 1 + - 1 file changed, 1 insertion(+) - -commit 45dae4e66b2b833f95656850b5f1b0ffd1d96f1d -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Aug 10 20:00:04 2009 +0200 - - [cairo] Use current fill_opacity when drawing images - - Fixes launchpad bug #342282 (page 2 of the attached document) - - poppler/CairoOutputDev.cc | 16 +++++++++++++--- - 1 file changed, 13 insertions(+), 3 deletions(-) - -commit b1cd54546844f2f7cd6bf7cc14b7584c84c3fc14 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Aug 10 19:55:44 2009 +0200 - - [cairo] Do not save the font file twice for FreeType fonts - - Fixes bug #20491. - - poppler/CairoFontEngine.cc | 19 ++----------------- - 1 file changed, 2 insertions(+), 17 deletions(-) - -commit 4181a0ff11195eb7a56d76be23994b843e20b483 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Aug 10 19:58:09 2009 +0200 - - this branch is unlikely to happen - - poppler/Lexer.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 2a3025f32951ce7b7343aeef111902615d71595e -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Aug 10 19:55:40 2009 +0200 - - fix overflow calculation not to depend on the variable overflowing - - poppler/Lexer.cc | 12 ++++++++---- - 1 file changed, 8 insertions(+), 4 deletions(-) - -commit a38001f724f78231c2fdadd28e647a35b41bab74 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Aug 9 23:26:02 2009 +0200 - - Check for overflow when parsing integers - - Fixes bug 23078 - - poppler/Lexer.cc | 28 ++++++++++++++++++++++------ - 1 file changed, 22 insertions(+), 6 deletions(-) - -commit 4c4c0e44452d07bea88d98b7df0c01fadd7693cc -Author: Jakub Wilk <ubanus@users.sf.net> -Date: Sat Aug 8 17:26:14 2009 +0200 - - Silence some warnings when using internal headers and not compiling - with -Wno-write-strings - - People should not be using internal headers but it's just two lines - - poppler/Object.h | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -commit e2c319ba18ab473fd969db9519a9231be67538c3 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Aug 8 00:48:18 2009 +0200 - - Also implement mono so that -mono in pdftoppm -png works - - Totally not optimized - - splash/SplashBitmap.cc | 23 ++++++++++++++++++++++- - 1 file changed, 22 insertions(+), 1 deletion(-) - -commit c669e7f3ca421265e78161cc3fdecd2a0c7510c9 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Aug 8 00:38:50 2009 +0200 - - Support splashModeMono8 in writePNGFile - - Works though is non optimal - - splash/SplashBitmap.cc | 55 - +++++++++++++++++++++++++++++++++++--------------- - 1 file changed, 39 insertions(+), 16 deletions(-) - -commit 92744b72df9084fd2d69ba78406898378884aed8 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Aug 8 00:20:52 2009 +0200 - - Add the -png flag to pdftoppm to output to PNG - - Based on a patch by Shen Liang <shenzhuxi@gmail.com> - Also factored common PNG code from HtmlOutputDev to PNGWriter - - CMakeLists.txt | 5 +++ - goo/Makefile.am | 9 +++- - goo/PNGWriter.cc | 110 - ++++++++++++++++++++++++++++++++++++++++++++++ - goo/PNGWriter.h | 43 ++++++++++++++++++ - poppler/Makefile.am | 8 ++++ - splash/SplashBitmap.cc | 70 +++++++++++++++++++++++++++++ - splash/SplashBitmap.h | 5 +++ - splash/SplashErrorCodes.h | 4 +- - utils/CMakeLists.txt | 4 -- - utils/HtmlOutputDev.cc | 66 +++++----------------------- - utils/Makefile.am | 4 -- - utils/pdftoppm.1 | 3 ++ - utils/pdftoppm.cc | 21 +++++++-- - 13 files changed, 283 insertions(+), 69 deletions(-) - -commit e4439ff527bb202d0239f78e647452983b733411 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri Aug 7 15:23:57 2009 +0200 - - [cairo] Don't apply masks when fill color space mode is csPattern - - In that case the mask is used for clipping when drawing images. Fixes - bug #22216. - - poppler/CairoOutputDev.cc | 59 - ++++++++++++++++++++++++++++++----------------- - 1 file changed, 38 insertions(+), 21 deletions(-) - -commit 7194f59a18e4f6997ae560af3db1bd101d6f726e -Author: Chris Wilson <chris@chris-wilson.co.uk> -Date: Thu Aug 6 11:24:22 2009 +0100 - - [cairo] Use FT_New_Memory_Face() for mmapped fonts - - If we hold a mapping for the font, then we can pass that memory to - FreeType for it to use as well. This saves on FreeType having to - read the - file into a fresh block of memory. - - poppler/CairoFontEngine.cc | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -commit 7e2bbcf6f85111d1006b0d5bc1503cadaba83c9f -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Aug 4 00:10:58 2009 +0200 - - Set KDAB via gamaral copyright - - poppler/Form.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit ed5918e16dafebc9ecf6db8ce0186f407ecbf7d5 -Author: Pino Toscano <pino@kde.org> -Date: Sat Aug 1 20:00:22 2009 +0200 - - [Qt4 apidox] make example for FontIterator... not leak ;) - - qt4/src/poppler-qt4.h | 2 ++ - 1 file changed, 2 insertions(+) - -commit f3b36d9c992491e614e88dbf1a84b5433a7647f4 -Author: Pino Toscano <pino@kde.org> -Date: Sat Aug 1 19:54:52 2009 +0200 - - [Qt4] Add color management API. - - Add few wrapper functions to get/set color profiles. - Add a function to know whether the color management functions actually - do anything (ie support compiled or not). - Add few basic API docs for the new functions. - Based on an initial patch by Hal V. Engel <hvengel@astound.net>, - heavily reindented, polished and massaged in its API by me. - - qt4/src/poppler-document.cc | 52 - +++++++++++++++++++++++++++++++++++++++++++++ - qt4/src/poppler-qt4.h | 50 - +++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 102 insertions(+) - -commit 78a1969d040018c0c2bb74c94f5507f786e4666e -Author: Pino Toscano <pino@kde.org> -Date: Sat Aug 1 18:00:06 2009 +0200 - - [Qt] add unhandled cases and remove unused code - - qt/poppler-page.cc | 12 ++---------- - 1 file changed, 2 insertions(+), 10 deletions(-) - -commit bddebec0712e92e13b57d3d05d652673fe737866 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Aug 1 17:12:22 2009 +0200 - - 0.11.2 - - CMakeLists.txt | 2 +- - NEWS | 30 ++++++++++++++++++++++++++++++ - configure.ac | 2 +- - msvc/config.h | 6 +++--- - qt4/src/Doxyfile | 2 +- - 5 files changed, 36 insertions(+), 6 deletions(-) - -commit 87e2af3454348f5568d155c15af5d85268e47f1b -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Aug 1 15:48:02 2009 +0200 - - [glib-demo] Add cast to make sure the comparison is always valid - - glib/demo/attachments.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 464e95ef451103daddc9a30cd26b986291f02176 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Aug 1 15:47:25 2009 +0200 - - [glib-demo] Add missing return - - glib/demo/attachments.c | 2 ++ - 1 file changed, 2 insertions(+) - -commit 7f48369e4d29b2a71abffa9e1966e3a2252de895 -Author: Guillermo Antonio Amaral Bastidas <gamaral@amaral.com.mx> -Date: Sat Aug 1 15:41:34 2009 +0200 - - Call fillChildrenSiblingsID in fillChildrenSiblingsID instaed of - loadChildrenDefaults - - poppler/Form.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit e21a3e40bf6f4365064cea751ae186580d8f81f5 -Author: William Bader <williambader@hotmail.com> -Date: Sat Aug 1 15:23:03 2009 +0200 - - Add the possibility of disabling font substitution in pdftops - - Bug #23030 - - poppler/GlobalParams.cc | 17 ++++++++++++++ - poppler/GlobalParams.h | 4 ++++ - poppler/PSOutputDev.cc | 59 - +++++++++++++++++++++++++++---------------------- - poppler/PSOutputDev.h | 2 ++ - utils/pdftops.1 | 8 ++++++- - utils/pdftops.cc | 7 ++++++ - 6 files changed, 70 insertions(+), 27 deletions(-) - -commit bd68c90338cbf16f468e5db59722610300a629e1 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Aug 1 15:19:48 2009 +0200 - - Forgot to add my copyright - - poppler/GfxState.h | 1 + - 1 file changed, 1 insertion(+) - -commit 173451730948c320f16a0f5924a58302603eca0b -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Aug 1 15:13:35 2009 +0200 - - Try to workaround some incorrect PDF - - Fixes rendering of PDF where forms/patterns have more q than Q. Fixes - rendering in splash of pdf in bugs #22835, #21899 and #16402 - - poppler/Gfx.cc | 13 +++++++++++++ - poppler/GfxState.h | 1 + - 2 files changed, 14 insertions(+) - -commit 35c408ca49be08144bcf14aa112505fd556725d2 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Jul 31 23:27:02 2009 +0200 - - add the overloaded virtual warning also the autotools based build - - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 1c32bd2d101e5dfb37e28276ecad699f121b27b7 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Jul 31 23:22:25 2009 +0200 - - Add my copyright to files i just edited - - poppler/OutputDev.cc | 1 + - poppler/OutputDev.h | 1 + - utils/HtmlOutputDev.h | 2 +- - 3 files changed, 3 insertions(+), 1 deletion(-) - -commit 10717a48c85f1dbeff1c6bcd094006a9ecc92efc -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Jul 31 23:22:10 2009 +0200 - - Add -Woverloaded-virtual as default CXX flag - - cmake/modules/PopplerMacros.cmake | 1 + - 1 file changed, 1 insertion(+) - -commit db5f736655f01575ac5d7c524cbf131924ae91fa -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Jul 31 23:12:00 2009 +0200 - - rename the function - - That way the name is different from the OutputDev function and does - not seem like a wrong overload - - utils/HtmlOutputDev.cc | 4 ++-- - utils/HtmlOutputDev.h | 2 +- - 2 files changed, 3 insertions(+), 3 deletions(-) - -commit 4be87f87509b93c4fe4025f9bd788e9412416663 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Jul 31 23:11:32 2009 +0200 - - Remove Outputdev::beginMarkedContent as noone uses it - - poppler/Gfx.cc | 2 -- - poppler/OutputDev.cc | 3 --- - poppler/OutputDev.h | 1 - - 3 files changed, 6 deletions(-) - -commit 6ab2ec8a89519d2bd1576c8d62f8aec51b04479a -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Jul 31 23:10:56 2009 +0200 - - Warning-- - - poppler/PSOutputDev.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 53c3d636ad645a350b576160e1498726238a7bd1 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri Jul 31 18:23:57 2009 +0200 - - [cairo] Implement radialShadedFill in cairo backend using cairo - gradients - - Fixes bugs #10942, #14160 - - poppler/CairoOutputDev.cc | 28 +++++++++ - poppler/CairoOutputDev.h | 2 + - poppler/Gfx.cc | 141 - +++++++++++++++++++++++++++------------------- - poppler/OutputDev.h | 2 +- - poppler/PSOutputDev.cc | 3 +- - poppler/PSOutputDev.h | 2 +- - 6 files changed, 117 insertions(+), 61 deletions(-) - -commit 2ba937545d1a2b9fa798f04fee755ccdf0e74ec7 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri Jul 31 17:49:18 2009 +0200 - - [cairo] Use cairo_pattern_set_extend for linear gradients - - poppler/CairoOutputDev.cc | 9 +++++++++ - poppler/CairoOutputDev.h | 1 + - poppler/Gfx.cc | 34 ++++++++++++++++++++++++++++------ - poppler/OutputDev.h | 4 ++++ - 4 files changed, 42 insertions(+), 6 deletions(-) - -commit b054756113f0df6b59935823882f412486e96db5 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Wed Jun 17 11:10:15 2009 +0200 - - [cairo] Implement blend mdoes in cairo backend - - It requires cairo from git master to work at the moment. Fixes bugs - #22384, #12979, #13603, #17919, #22255 - - configure.ac | 27 ++++++++++++++++++++++ - poppler/CairoOutputDev.cc | 59 - +++++++++++++++++++++++++++++++++++++++++++++++ - poppler/CairoOutputDev.h | 1 + - 3 files changed, 87 insertions(+) - -commit bf8964726c9311e7e82b1faf49cc2272e5c1e339 -Author: William Bader <williambader@hotmail.com> -Date: Thu Jul 30 22:08:43 2009 +0200 - - Fix some double to int warnings by explicit casting - - poppler/Gfx.cc | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -commit fdbd0c548e963461b2bc4bdf1beaa1577cafcea7 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Jul 30 21:05:18 2009 +0200 - - Update gtk-doc build files - - gtk-doc.make | 102 - +++++++++++++++++++++++++++++++++++++++------------------- - m4/gtk-doc.m4 | 74 +++++++++++++++++++++++------------------- - 2 files changed, 110 insertions(+), 66 deletions(-) - -commit ae84dce5cea4d249526a6ed5b2feb2d3f241da1b -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Jul 30 20:45:39 2009 +0200 - - Revert "Remove unneeded files from repo" - - This reverts commit 4cc9dee35e03d7b295a476f937ec0f2c43bb6592. - - See bug #22697. - - configure.ac | 2 +- - glib/reference/Makefile.am | 4 +- - gtk-doc.make | 155 - +++++++++++++++++++++++++++++++++++++++++++++ - m4/gtk-doc.m4 | 53 ++++++++++++++++ - 4 files changed, 211 insertions(+), 3 deletions(-) - -commit 7e14516a78b16453c747eb92b08665632e5f6844 -Author: Sanjoy Mahajan <sanjoy@mit.edu> -Date: Mon Jul 27 23:20:50 2009 +0200 - - Fix displayPages call - - Parameters are outputdev, first, last, dpi, dpi, rotate, usemediabox, - crop, printing - and we were doing - usemediabox = !noCrop - crop = gFasle - the correct is - usemediabox = noCrop - crop = !noCrop - - utils/pdftops.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 3d53a0eb14420d54c0ebf8590e34c018b8da105d -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Jul 19 16:02:33 2009 +0200 - - Copy byte_lookup in copy constructor - - poppler/GfxState.cc | 6 ++++++ - 1 file changed, 6 insertions(+) - -commit 8f7271acf17c46e663cd48d90c382b04a834fba2 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Jul 19 15:53:49 2009 +0200 - - Don't use byte_lookup table when color space doesn't support getLine - methods - - For color spaces that don't implement getRGBLine or getGrayLine - methods, - getRGB or getGray are called for every pixel, however we were - allocating - the byte_lookup table and converting colors in those cases - too. Instead - of falling back to generic methods in the base class, the new methods - useGetRGBLine and useGetGrayLine have been added to he base class, - so that - when they are not suopported in the current color space byte_lookup - table is - not used at all. - - Fixes bug #11027. - - poppler/GfxState.cc | 125 - ++++++++++++++++++++++++++++++---------------------- - poppler/GfxState.h | 21 +++++++-- - 2 files changed, 91 insertions(+), 55 deletions(-) - -commit 1bc737796bef1c65289a101b2d4c367267b9c974 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Jul 19 15:51:43 2009 +0200 - - Remove unused variable - - poppler/GfxState.h | 1 - - 1 file changed, 1 deletion(-) - -commit 512b2c654fd80c83b82e7adc828a478a18de17ab -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Jul 26 19:35:06 2009 +0200 - - [cairo] Use CAIRO_EXTEND_PAD in drawImageMaskPrescaled too - - poppler/CairoOutputDev.cc | 32 +++++++++++++++----------------- - 1 file changed, 15 insertions(+), 17 deletions(-) - -commit ad26e34bede53cb6300bc463cbdcc2b5adf101c2 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Jul 26 18:36:06 2009 +0200 - - [cairo] Use rectangle + clip instead of invert + tranform - - This is just for consistency of drawImage methods - - poppler/CairoOutputDev.cc | 30 ++++++++++++++---------------- - 1 file changed, 14 insertions(+), 16 deletions(-) - -commit ee6b761a55baef4c3bbe4614b0c3b3d761a3111f -Author: Chris Wilson <chris@chris-wilson.co.uk> -Date: Sun Jul 26 16:19:15 2009 +0200 - - [cairo] Apply a clip for masked drawImage - - In order to use EXTEND_PAD with a mask, we need to apply a clip (to - constrain the image to the appropriate region). The complicating - factor for - drawSoftImage() is that mask size is independent of the image size, - so we - need to compute the intersection of the mask with in the image - in userspace. - - poppler/CairoOutputDev.cc | 21 ++++++++++++++------- - 1 file changed, 14 insertions(+), 7 deletions(-) - -commit 499c6c972bac14936b5370276da723a6e98861b3 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Jul 26 11:30:08 2009 +0200 - - [cairo] Use CAIRO_EXTEND_PAD when drawing images - - poppler/CairoOutputDev.cc | 306 - +++++++++++++++++++++------------------------- - 1 file changed, 140 insertions(+), 166 deletions(-) - -commit f91eb7d01cef0897727c63267db309bc92297d37 -Author: Koji Otani <sho@bbr.jp> -Date: Sat Jul 25 16:34:12 2009 +0200 - - Fix generation of ps for some files - - For example fixes second pdf in bug 18908 - - poppler/PSOutputDev.cc | 68 - +++++++++++++++++++++++++++++++++++++------------- - 1 file changed, 51 insertions(+), 17 deletions(-) - -commit f93f5e17d8f23f3e2862f3411f43a95b334e6c91 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Jul 20 17:10:37 2009 +0200 - - [cairo] Improve performance when rendering one-channel images - - It implements the same idea already used in SplashOutputDev, for - one-channel (monochrome/gray/separation) images we build a lookup - table - so that we won't need to call colorMap->getRGBLine when filling the - image buffer. Fixes bug #18017. - - poppler/CairoOutputDev.cc | 36 ++++++++++++++++++++++++++++++++++-- - 1 file changed, 34 insertions(+), 2 deletions(-) - -commit e7475062b6ae5c495fa72faaf8fb3d97391f8544 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Jul 14 17:22:52 2009 +0200 - - [cairo] Handle fontType1COT fonts in CairoFontEngine - - poppler/CairoFontEngine.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit d42b9425fb2f98fa79e7a60e4f71ef14f5bacfe9 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Jul 12 19:55:14 2009 +0200 - - glade is not used anymore - - cmake/modules/FindGTK.cmake | 9 ++++----- - 1 file changed, 4 insertions(+), 5 deletions(-) - -commit 454f7468c6a6a442a5064b5daa24d65ebf4fc6b6 -Author: Chris Wilson <chris@chris-wilson.co.uk> -Date: Thu Jul 9 10:43:00 2009 +0100 - - [cairo] Fix drawImage() for non-1x1 images - - Carlos noticed a nasty bug with converting drawImage() to use PAD - + fill, - instead of NONE + paint. That is the image was being padded out - far beyond - the correct output extents. The cause is that the caller pre-scales - the - context for the image, so the output rectangle was many times the true - image size - obliterating large amounts of the page. The temporary - fix is - to counter-act the scaling on the context. Longer term, after - fixing all - painters to use PAD correctly, we need to review the callers to remove - unnecessary pre-scaling. - - poppler/CairoOutputDev.cc | 16 ++++++++++++---- - 1 file changed, 12 insertions(+), 4 deletions(-) - -commit f8d93eae3c7b9388feabac71f2380d0b42a855e7 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Wed Jul 8 20:14:35 2009 +0200 - - Lookup UF and F entries before Unix, MAC and DOS in getFileSpec - - poppler/FileSpec.cc | 24 ++++++++++++------------ - 1 file changed, 12 insertions(+), 12 deletions(-) - -commit 767c534f5fdf6ccbccfd85a0086d72c215c278f1 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Wed Jul 8 19:13:54 2009 +0200 - - Use UF entry when present in dict in getFileSpecName() too - - poppler/FileSpec.cc | 5 +++++ - 1 file changed, 5 insertions(+) - -commit 569627ac4d56ddd58e109ce2a37179a85e042030 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Wed Jul 8 13:02:16 2009 +0200 - - Implement axialShadedFill in cairo backend using cairo gradients - - See bug #10942. - - poppler/CairoOutputDev.cc | 29 +++++++++++++++++++++++++++++ - poppler/CairoOutputDev.h | 10 ++++++++++ - poppler/Gfx.cc | 29 ++++++++++++++++++++--------- - poppler/OutputDev.h | 6 +++++- - poppler/PSOutputDev.cc | 2 +- - poppler/PSOutputDev.h | 2 +- - 6 files changed, 66 insertions(+), 12 deletions(-) - -commit 6ae0a6c0044713affa23eb1ee6a070785ed6c2f3 -Author: Chris Wilson <chris@chris-wilson.co.uk> -Date: Wed Jul 8 16:48:26 2009 +0100 - - [cairo] premultiply image mask - - Cairo uses a premultiplied colour-space, so when creating the - image mask - in drawImage() we need to remember to multiply by the alpha. In - this case - it just requires zeroing out the masked pixels. - - poppler/CairoOutputDev.cc | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -commit 646e5884e748ecce7094c673400484aa1d902bdd -Author: Chris Wilson <chris@chris-wilson.co.uk> -Date: Wed Jul 8 17:00:34 2009 +0100 - - [cairo] maskColors is an array of ints, no scaling required - - drawImage() was erroneously scaling the maskColors from what it - believed - to be [0:1] to [0:255]. However maskColors is already an integer - array, - [0:255]. - - poppler/CairoOutputDev.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit d75feb1ee84385a9f94308cf47a43f4583092ddf -Author: Chris Wilson <chris@chris-wilson.co.uk> -Date: Wed Jul 8 16:37:19 2009 +0100 - - [cairo] cleanse DrawImage() - - Just a small bit of code rearrangement to reduce repetition and - invalid checks. - - poppler/CairoOutputDev.cc | 102 - +++++++++++++++++++--------------------------- - 1 file changed, 41 insertions(+), 61 deletions(-) - -commit 52f3704fed16cfc1e9dd85f72dde7922371e4099 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Wed Jul 8 11:40:52 2009 +0200 - - [TODO] Update TODO file - - TODO | 6 ++++++ - 1 file changed, 6 insertions(+) - -commit ef261f5f72d37a0aa2709611ee2bad7d55340ed8 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Jul 7 10:57:31 2009 +0200 - - Do not use F and UF entries if Unix or DOS are present in FileSpec - dict - - poppler/FileSpec.cc | 114 - +++++++++++++++++++++++----------------------------- - 1 file changed, 51 insertions(+), 63 deletions(-) - -commit cafd4653dc6c7574214e80aa09489dcd24e347a6 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Wed Jul 1 11:41:32 2009 +0200 - - [glib-demo] Fix a typo - - glib/demo/utils.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit a3c9c6d0c0ee55dccd2d03f20d5683ae300cdc6b -Author: Pino Toscano <pino@kde.org> -Date: Wed Jul 8 02:01:39 2009 +0200 - - start updating the TODO file - - TODO file had quite some rust and dust in it, making quite "difficult" - for others to understand what can be done for helping. - First step has been removing all the items done. - Next is grouping items by areas, so it is more clear what should be - done in what area; current areas are: - - general items: for general stuff to be done, not specific to some - area; an example could have been "use littlecms for color management?" - - core: stuff which is specific to the core library - - Qt4/Qt/glib/etc frontend: stuff specific for that frontend - - new frontends: ideas for possible new frontends - - I was not sure about some items and Jeff Muizelaar's TODO, so I left - them there. - - TODO | 47 +++++++++++++++-------------------------------- - 1 file changed, 15 insertions(+), 32 deletions(-) - -commit 92ad0ef89fe7690d83854b4821178dfdb2e22897 -Author: Pino Toscano <pino@kde.org> -Date: Sat Jul 4 00:19:23 2009 +0200 - - [Qt4 demo] hopefully fix the page size on zoom change - - qt4/demos/pageview.cpp | 5 +---- - 1 file changed, 1 insertion(+), 4 deletions(-) - -commit 97094d13bc0f144b25e13c1de7a5328608ab13e3 -Author: Pino Toscano <pino@kde.org> -Date: Sat Jul 4 00:07:12 2009 +0200 - - [Qt4 demo] show a list of checked/unchecked items for the document - permissions - - qt4/demos/permissions.cpp | 25 ++++++++----------------- - qt4/demos/permissions.h | 6 +++--- - 2 files changed, 11 insertions(+), 20 deletions(-) - -commit 0d8f2ee0f03a14e7b8477c4b787c3441a758f26b -Author: Pino Toscano <pino@kde.org> -Date: Fri Jul 3 23:55:42 2009 +0200 - - [Qt4 demo] show page numbers in the toolbar as 1..n - - qt4/demos/navigationtoolbar.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit b0d48df9121c55f8162ddf0ee63832f9adebf37b -Author: Pino Toscano <pino@kde.org> -Date: Fri Jul 3 17:55:31 2009 +0200 - - [Qt4 demo] correctly use DPI values for the page sizes - - qt4/demos/pageview.cpp | 12 +++++++++--- - qt4/demos/pageview.h | 2 ++ - 2 files changed, 11 insertions(+), 3 deletions(-) - -commit dcc3c384919f1562b8f312ad3ac847e23f3e83ab -Author: Sebastien Bacher <seb128@ubuntu.com> -Date: Wed Jul 1 10:09:12 2009 +0200 - - [test] Use gtkbuilder rather than libglade - - Fixes bug #21673 - - cmake/modules/FindGTK.cmake | 1 - - configure.ac | 4 +- - test/Makefile.am | 2 +- - test/pdf-inspector.cc | 34 ++-- - test/pdf-inspector.glade | 434 - -------------------------------------------- - test/pdf-inspector.ui | 416 - ++++++++++++++++++++++++++++++++++++++++++ - 6 files changed, 439 insertions(+), 452 deletions(-) - -commit 28208d1c9b8afbb769a5f4d9b0655b99fd4af16e -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Wed Jul 1 09:52:12 2009 +0200 - - [glib-demo] Do not use gio if glib < 2.15 - - Fixes bug #22530. - - glib/demo/main.c | 33 +++++++++++++++++++++++++++++++-- - 1 file changed, 31 insertions(+), 2 deletions(-) - -commit 6ef83414ab55294cf46b6b05813927bb04066986 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Jun 30 23:07:00 2009 +0200 - - Check getFileSpecNameForPlatform succeeded before using it's return - value - - Fixes crash on bug 22551 - - poppler/Annot.cc | 7 ++++--- - poppler/Link.cc | 30 +++++++++++++++++------------- - poppler/Sound.cc | 8 +++++--- - 3 files changed, 26 insertions(+), 19 deletions(-) - -commit 4b9db83841a8b97df1e0991c1b853897b7095777 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Jun 30 11:24:29 2009 +0200 - - [glib-demo] Do not fill the surface before rendering - - The surface is guaranteed to be cleared - - glib/demo/render.c | 11 ++--------- - 1 file changed, 2 insertions(+), 9 deletions(-) - -commit 5deb6db5d340c08f337d2ba67aa1fd690e4eedd8 -Author: William Bader <williambader@hotmail.com> -Date: Mon Jun 29 21:55:49 2009 +0200 - - Fix interpolate parameter position - - poppler/SplashOutputDev.cc | 3 ++- - utils/ImageOutputDev.cc | 5 +++-- - 2 files changed, 5 insertions(+), 3 deletions(-) - -commit e1e9ae2826eff1665d798b4b50b5c63e8282246b -Author: Pino Toscano <pino@kde.org> -Date: Sun Jun 28 20:11:42 2009 +0200 - - [Qt4 demo] do not crash when changing the zoom with no document - - qt4/demos/pageview.cpp | 3 +++ - 1 file changed, 3 insertions(+) - -commit a98de97137cb343182bd03c443fc08ff4e0fd9a5 -Author: Pino Toscano <pino@kde.org> -Date: Sun Jun 28 19:08:02 2009 +0200 - - [Qt4 demo] add a zoom combobox - - qt4/demos/navigationtoolbar.cpp | 33 ++++++++++++++++++++++++++++++++- - qt4/demos/navigationtoolbar.h | 7 ++++++- - qt4/demos/pageview.cpp | 14 ++++++++++++-- - qt4/demos/pageview.h | 6 +++++- - qt4/demos/viewer.cpp | 2 ++ - 5 files changed, 57 insertions(+), 5 deletions(-) - -commit 40002d2c765398869a3b7d8d92715f0608e39ab3 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Jun 28 16:45:19 2009 +0200 - - Make sure the array is big enough to read from it - - poppler/Gfx.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 0a1b41ff6de5a41e3450ecbcb1ba754dc06c29d9 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Jun 26 19:31:22 2009 +0200 - - Do not crash when we can't find onStr - - Fixes crash in bug #22485 - Not sure this is the best solution, but Adobe doesn't even open - the file - - poppler/Form.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 6cb846664e57b02c99f1e6ad2b4e9128c9622e0a -Author: Ilya Gorenbein <igorenbein@finjan.com> -Date: Thu Jun 25 20:13:29 2009 +0200 - - Initilize AnnotColot properly when the Array is not correct - - poppler/Annot.cc | 3 +++ - 1 file changed, 3 insertions(+) - -commit 5fdc3acb8dded2e7d08e6ef30f4c5ae1a4a11b5e -Author: Till Kamppeter <till.kamppeter@gmail.com> -Date: Mon Jun 22 21:38:23 2009 +0200 - - Only change the page size when it really changes, otherwise duplex - commands are lost - - poppler/PSOutputDev.cc | 10 +++++++++- - poppler/PSOutputDev.h | 4 ++++ - 2 files changed, 13 insertions(+), 1 deletion(-) - -commit bf69beeb257cfd750c6ddc8b68aeb859b36380b2 -Author: David Benjamin <davidben@mit.edu> -Date: Sat Jun 20 23:51:09 2009 +0200 - - Make DecryptStream return sane values for getPos() - - Many streams (notably JBIG2Stream) expect wrapped streams to return - correct - values for getPos(), i.e. increments by 1 when readChar() called, etc. - Fixes bug #19706. - - poppler/Decrypt.cc | 8 ++++++++ - poppler/Decrypt.h | 3 +++ - 2 files changed, 11 insertions(+) - -commit 5ee4ff2aaf98e2eaa1ec2dc9f7e659b3b01ba7bf -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Jun 20 15:00:16 2009 +0200 - - [glib-demo] Allow using relative paths in demo application - - glib/demo/main.c | 17 +++++------------ - 1 file changed, 5 insertions(+), 12 deletions(-) - -commit a568248d3255407fcaa7368c4925c20e95619d20 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Jun 19 21:07:39 2009 +0200 - - 0.11.1 - - CMakeLists.txt | 2 +- - NEWS | 50 ++++++++++++++++++++++++++++++++++++++++++++++++-- - configure.ac | 2 +- - msvc/config.h | 6 +++--- - qt4/src/Doxyfile | 2 +- - 5 files changed, 54 insertions(+), 8 deletions(-) - -commit ac99e239f2726db32617ff03174a6ce74361ea1b -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Jun 19 21:03:29 2009 +0200 - - ship PopplerCache.h - - CMakeLists.txt | 1 + - 1 file changed, 1 insertion(+) - -commit 84984d2aa25917d68c9971cefe636e626eada13d -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Jun 19 20:54:15 2009 +0200 - - Ship PopplerCache.h too - - poppler/Makefile.am | 1 + - 1 file changed, 1 insertion(+) - -commit 3a52d46e5df8eb926b550d7f7a82f316dbf6808f -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri Jun 19 17:45:44 2009 +0200 - - [glib-demo] Destroy pattern after using it - - glib/demo/render.c | 1 + - 1 file changed, 1 insertion(+) - -commit 2e97524e5d82a4c33a4e6410fead444681db6749 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri Jun 19 14:20:16 2009 +0200 - - [glib-demo] Use a transparent surface and fill it in white after - rendering - - glib/demo/render.c | 12 +++++++++--- - 1 file changed, 9 insertions(+), 3 deletions(-) - -commit 009937842d5a8bfc12394e9e3ab71b7c33340a85 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri Jun 19 14:10:05 2009 +0200 - - [glib-demo] Use cairo_paint instead of rectangle + fill - - glib/demo/render.c | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -commit 7248da095f67d57c3999cee7d980e62fd8a7cf49 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri Jun 19 09:37:02 2009 +0200 - - Use Interpolate flag to decide whether applying image interpolation - during rendering - - Fixes bug #9860 - - poppler/ArthurOutputDev.cc | 4 +- - poppler/ArthurOutputDev.h | 5 ++- - poppler/CairoOutputDev.cc | 92 - ++++++++++++++++++++++++++------------------- - poppler/CairoOutputDev.h | 48 ++++++++++++----------- - poppler/Gfx.cc | 49 ++++++++++++++++++++---- - poppler/OutputDev.cc | 17 ++++++--- - poppler/OutputDev.h | 13 ++++--- - poppler/PSOutputDev.cc | 8 ++-- - poppler/PSOutputDev.h | 8 ++-- - poppler/PreScanOutputDev.cc | 25 ++++++++++-- - poppler/PreScanOutputDev.h | 25 ++++++++++-- - poppler/SplashOutputDev.cc | 16 +++++--- - poppler/SplashOutputDev.h | 12 ++++-- - utils/HtmlOutputDev.cc | 16 ++++---- - utils/HtmlOutputDev.h | 7 ++-- - utils/ImageOutputDev.cc | 20 +++++----- - utils/ImageOutputDev.h | 12 ++++-- - 17 files changed, 248 insertions(+), 129 deletions(-) - -commit 37e3f877ee725648734ff41e1e83870a210bcbd7 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Jun 19 00:37:21 2009 +0200 - - Handle Streams in CMap definitions - - Fixes bug 22334 - - poppler/CMap.cc | 50 - ++++++++++++++++++++++++++++++------------------- - poppler/CMap.h | 17 ++++++++++++----- - poppler/GfxFont.cc | 41 +++++++++++++++++++++++++++------------- - poppler/GlobalParams.cc | 6 +++--- - poppler/GlobalParams.h | 5 +++-- - 5 files changed, 77 insertions(+), 42 deletions(-) - -commit 47de8eef46300832556ce5ed869e391e477fd843 -Author: David Benjamin <davidben@mit.edu> -Date: Fri Jun 19 00:30:35 2009 +0200 - - Fix some bugs in JBIG2Stream handling - - For more info see bug 12014 and [poppler] Bug in JBIG2Stream from - 08-June-2009 - - poppler/JBIG2Stream.cc | 88 - +++++++++++++++++++++++++++----------------------- - poppler/JBIG2Stream.h | 15 +++++++++ - 2 files changed, 63 insertions(+), 40 deletions(-) - -commit d30b1013ea3ce45b5ea942fe7357c0fd07ff47f4 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Jun 2 11:44:08 2009 +0200 - - Add setOpen() and setIcon() in AnnotText - - poppler/Annot.cc | 25 +++++++++++++++++++++++++ - poppler/Annot.h | 3 +++ - 2 files changed, 28 insertions(+) - -commit 287feffc1c1c0aa42a398fc071b489acef9ef22e -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Jun 2 11:26:40 2009 +0200 - - Add setLabel() and setPopup() to AnnotMarkup - - poppler/Annot.cc | 36 ++++++++++++++++++++++++++++++++++++ - poppler/Annot.h | 4 ++++ - 2 files changed, 40 insertions(+) - -commit 2a938af5624fbc79316dd6bee5e550f2b4270a76 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Jun 2 10:59:44 2009 +0200 - - Add setParent() and setOpen() to AnnotPopup - - poppler/Annot.cc | 19 +++++++++++++++++++ - poppler/Annot.h | 4 ++++ - 2 files changed, 23 insertions(+) - -commit 0af5464352dfa51f0458c57a3590c847a45964c7 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Jun 2 10:37:49 2009 +0200 - - Save parent reference of popup annotations - - poppler/Annot.cc | 16 +++++----------- - poppler/Annot.h | 4 ++-- - 2 files changed, 7 insertions(+), 13 deletions(-) - -commit fc4bc43dcd6f6871a47b9198e8c2571a5d448c3e -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Jun 1 14:52:21 2009 +0200 - - Fix a crash in pdf-inspector - - test/pdf-inspector.cc | 11 +++++++++++ - 1 file changed, 11 insertions(+) - -commit 3da7a2657892fde52b62e1f73476cb33d6c75e96 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri May 29 13:35:39 2009 +0200 - - Add Annot::setColor() - - poppler/Annot.cc | 19 ++++++++++++++++++- - poppler/Annot.h | 6 +++++- - 2 files changed, 23 insertions(+), 2 deletions(-) - -commit 3eabdf57729852205855cf74ff2d2f9d7bc03f73 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri May 29 13:23:26 2009 +0200 - - Add construtors to create AnnotColor objects directly from color - values - - poppler/Annot.cc | 26 ++++++++++++++++++++++++++ - poppler/Annot.h | 3 +++ - 2 files changed, 29 insertions(+) - -commit 8045e7a1a84a3d54a1c9415ac63b5b9df5ecc349 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri May 29 13:06:40 2009 +0200 - - Add Page::addAnnot() to add a new annotation to the page - - poppler/Page.cc | 28 ++++++++++++++++++++++++++++ - poppler/Page.h | 2 ++ - 2 files changed, 30 insertions(+) - -commit fe80eb84ec711b7400cef95e791a74c8fd259af7 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri May 29 13:00:19 2009 +0200 - - Add getRef() to get the annotation reference - - poppler/Annot.h | 1 + - 1 file changed, 1 insertion(+) - -commit 1c92657be72c44dba7185808ffb00dd85c5ab289 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri May 29 12:14:02 2009 +0200 - - Save page object and ref in Page class - - This is needed to be able to modify the page object. - - poppler/Catalog.cc | 2 +- - poppler/Page.cc | 6 +++++- - poppler/Page.h | 4 +++- - 3 files changed, 9 insertions(+), 3 deletions(-) - -commit 4ad2d663262008e4b97342c4ed67c686ff5abd13 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri May 29 11:43:30 2009 +0200 - - Add annot constructors to create annot objects without a dict - - This allows to create annotation objects to be added to the document. - Required fields on the annotation dictionary are constructor - arguments, - setters will be added for the other fields. - - poppler/Annot.cc | 300 - +++++++++++++++++++++++++++++++++++++++++++++++++++++-- - poppler/Annot.h | 22 +++- - 2 files changed, 315 insertions(+), 7 deletions(-) - -commit e5c4862b0c1b08a0fab47070cb9c862026e93567 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Jun 10 23:28:03 2009 +0200 - - ignore++ - - m4/.gitignore | 5 +++++ - 1 file changed, 5 insertions(+) - -commit 572779f8037763c1e0ee64c47a3dad6df0d3b693 -Author: Koji Otani <sho@bbr.jp> -Date: Wed Jun 10 22:55:26 2009 +0200 - - Fix dashed line in page 1 of bug 20011 - - poppler/Gfx.cc | 6 ++---- - 1 file changed, 2 insertions(+), 4 deletions(-) - -commit b97591672e0d9c31a3d044fe52e34cc80a491221 -Author: Koji Otani <sho@bbr.jp> -Date: Wed Jun 10 22:54:57 2009 +0200 - - Fix "Conditional jump or move depends on uninitialised value" - - When stroking with a pattern, set strokeColor with a copy of - fillColor. - This is wrong and the fillColor may be uninitialized. - See bug 20011 - - poppler/Gfx.cc | 13 +++++++++++-- - 1 file changed, 11 insertions(+), 2 deletions(-) - -commit a92b38836b1e4475d5a7a1b9cb8f3e9429cef275 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Jun 9 22:39:19 2009 +0200 - - Correctly duplicate the cache on PostScriptFunction(PostScriptFunction - *func) - - poppler/Function.cc | 28 ++++++++++++++++++++++++++++ - poppler/PopplerCache.cc | 20 ++++++++++++++++++++ - poppler/PopplerCache.h | 14 ++++++++++++++ - 3 files changed, 62 insertions(+) - -commit 2cecdf922f4c8178b0e55d3ddf86c31f8be3313a -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Jun 9 11:04:39 2009 +0200 - - [glib] Fix a crash when a destination points to an invalid page - - glib/poppler-action.cc | 21 +++++++++++++-------- - 1 file changed, 13 insertions(+), 8 deletions(-) - -commit 831288c13c3a7502bbccd1313c6e376283be367c -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Jun 7 18:37:20 2009 +0200 - - Optimize roll() a bit - - If the number of times to roll is > than half the number of items - rotate in the reverse direction - Makes it be 33% of exec() instead of 42% - - poppler/Function.cc | 19 ++++++++++++++----- - 1 file changed, 14 insertions(+), 5 deletions(-) - -commit 3d40dcad850a2bc0e28845a15722db0c79920135 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Jun 7 13:38:50 2009 +0200 - - Move the GfxState cache to the new poppler cache class - - poppler/GfxState.cc | 97 - +++++++++++++++++++++++++---------------------------- - poppler/GfxState.h | 19 ++--------- - 2 files changed, 49 insertions(+), 67 deletions(-) - -commit 2619e09833f421fb3d8cc68d41d15081ae6824e4 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Jun 7 13:37:40 2009 +0200 - - Implement a cache for PostscriptFunction transforms - - Makes time of rendering of bug 21562 go down from 24 to 8 seconds - - poppler/Function.cc | 76 - +++++++++++++++++++++++++++++++++++++++++++++++++++++ - poppler/Function.h | 2 ++ - 2 files changed, 78 insertions(+) - -commit 588bfe3c14f42be492066c2a98e30482475a6926 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Jun 7 13:36:39 2009 +0200 - - Add a code to a generic cache based on Koji's code for GfxState cache - - CMakeLists.txt | 1 + - poppler/Makefile.am | 1 + - poppler/PopplerCache.cc | 82 - +++++++++++++++++++++++++++++++++++++++++++++++++ - poppler/PopplerCache.h | 47 ++++++++++++++++++++++++++++ - 4 files changed, 131 insertions(+) - -commit d09478fcc44b5c594f1803fc24654af5e10fa129 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Jun 7 01:34:01 2009 +0200 - - Move index and pop to class definition too - - poppler/Function.cc | 32 +++++++++++++++----------------- - 1 file changed, 15 insertions(+), 17 deletions(-) - -commit 2083264e8ab0fd9976294de08a18de615d5a1168 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Jun 7 01:21:19 2009 +0200 - - Move the implementations to the class definition - - Make gcc inline the functions and time to render a heavy PSFunction - doc goes from 28 to 20 secs - - poppler/Function.cc | 151 - ++++++++++++++++++++++++---------------------------- - 1 file changed, 71 insertions(+), 80 deletions(-) - -commit 24580fcd2be74db5f3140bdb2ebff8431b7d3f1e -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Jun 6 16:17:26 2009 +0200 - - Add a debug saying how much rendering took - - qt4/tests/test-poppler-qt4.cpp | 2 ++ - 1 file changed, 2 insertions(+) - -commit 50cf7cffff760e41774957ad8f1f92803142438e -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Jun 6 16:04:54 2009 +0200 - - Use g_path_get_basename instead of g_basename in gtk-cairo-test - - Fixes bug #21361. - - test/gtk-cairo-test.cc | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -commit 4cc9dee35e03d7b295a476f937ec0f2c43bb6592 -Author: Christian Persch <chpe@gnome.org> -Date: Sat Jun 6 12:13:48 2009 +0200 - - Remove unneeded files from repo - - See bug #22094 - - configure.ac | 2 +- - glib/reference/Makefile.am | 4 +- - gtk-doc.make | 155 - --------------------------------------------- - m4/gtk-doc.m4 | 53 ---------------- - 4 files changed, 3 insertions(+), 211 deletions(-) - -commit c94e476dbff9e527c72e52377d830f35f29ba3d6 -Author: Pino Toscano <pino@kde.org> -Date: Fri Jun 5 11:09:44 2009 +0200 - - when showing the tooltip for a text rect, show also its index in - the page text boxes list - - qt4/tests/test-poppler-qt4.cpp | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -commit 2298acac267257b1916c802bdb902428e69e683b -Author: Pino Toscano <pino@kde.org> -Date: Fri Jun 5 11:08:51 2009 +0200 - - [Qt4 apidox] FontInterator is new in 0.12 - - qt4/src/poppler-qt4.h | 2 ++ - 1 file changed, 2 insertions(+) - -commit 37c48c2521c623c485841472c4a174a1841aea33 -Author: Pino Toscano <pino@kde.org> -Date: Fri Jun 5 10:54:30 2009 +0200 - - [CMake] Add poppler version defines and version check macro - - Add POPPLER_[MAJOR|MINOR|MICRO]_VERSION defines and - POPPLER_CHECK_VERSION macro. FDO bug #22091. - - CMakeLists.txt | 5 ++++- - glib/poppler-features.h.cmake | 9 +++++++++ - 2 files changed, 13 insertions(+), 1 deletion(-) - -commit 26f6fb1d79c2589829cd896d57da63d16641f307 -Author: Pino Toscano <pino@kde.org> -Date: Fri Jun 5 10:51:26 2009 +0200 - - [CMake] switch poppler-features.h.cmake to a more autotools-like - syntax - - glib/CMakeLists.txt | 2 +- - glib/poppler-features.h.cmake | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit 89704635b727db42f6c72ba101091eb7eddb967a -Author: Pino Toscano <pino@kde.org> -Date: Fri Jun 5 10:39:17 2009 +0200 - - [Qt4 demo] compile the new thumbnail module with autotools as well - - qt4/demos/Makefile.am | 3 +++ - 1 file changed, 3 insertions(+) - -commit 291bafe64c8755fe5f85a51b184ac6e3d3170e1d -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri Jun 5 10:07:16 2009 +0200 - - [glib] Use g_strerror instead of strerror - - Fixes bug #22095. - - glib/poppler-document.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 0ca7e214fb5f9c9fb59792149bd23c1617d38cac -Author: Christian Persch <chpe@gnome.org> -Date: Thu Jun 4 22:35:40 2009 +0200 - - Add poppler version defines and version check macro - - Add POPPLER_[MAJOR|MINOR|MICRO]_VERSION defines and - POPPLER_CHECK_VERSION macro. FDO bug #22091. - - configure.ac | 11 ++++- - glib/poppler-features.h.in | 9 ++++ - glib/reference/poppler-docs.sgml | 1 + - glib/reference/poppler-sections.txt | 10 ++++ - glib/reference/tmpl/poppler-features.sgml | 80 - +++++++++++++++++++++++++++++++ - 5 files changed, 110 insertions(+), 1 deletion(-) - -commit 4ce04da0040e5a2626c110f94a128e2d272401b9 -Author: Matthias Drochner <M.Drochner@fz-juelich.de> -Date: Thu Jun 4 23:05:22 2009 +0200 - - Use the correct value when creating the V field - - PDF Spec says: - For items represented in the Opt array by a two-element array, - the name string is the second of the two array elements. - - poppler/Form.cc | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -commit 7e01e37a834bfdd75d739ea2b48e9127ca7f259e -Author: Till Kamppeter <till.kamppeter@gmail.com> -Date: Thu Jun 4 20:25:55 2009 +0200 - - Add part of fix for bug 20420, the other part was checked in with - Thomas patches - - poppler/PSOutputDev.cc | 3 +++ - 1 file changed, 3 insertions(+) - -commit 50a7b4bcaa6e5f56cc25fe6936f9dc537a1b4b37 -Author: Jeremy C. Reed <reed@reedmedia.net> -Date: Thu Jun 4 20:19:03 2009 +0200 - - [glib] Hyphenate UTF-8 and UTF-16BE - - Fixes bug #21953. - - where iconv() is called to fill in a text field, use "UTF-8" and - "UTF-16BE" as encoding names rather than the less portable - "UTF8" and "UTF16BE" -- this makes it work on NetBSD. - - glib/poppler-annot.cc | 2 +- - glib/poppler-form-field.cc | 4 ++-- - 2 files changed, 3 insertions(+), 3 deletions(-) - -commit 2cf9e6a2318b770ae62572944c687576d1801d31 -Author: Till Kamppeter <till.kamppeter@gmail.com> -Date: Thu Jun 4 19:48:42 2009 +0200 - - Support multiple page sizes when converting to PS - - Fixes byg #19777 - - poppler/PSOutputDev.cc | 31 +++++++++++++++++++++++++++++-- - poppler/PSOutputDev.h | 4 +++- - utils/pdftops.1 | 26 +++++++++++++++++++++----- - utils/pdftops.cc | 17 ++++++++++++----- - 4 files changed, 65 insertions(+), 13 deletions(-) - -commit 30fb7cb7e47cf6a8008c5083c8d0978fdfdf8e62 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Jun 4 19:25:22 2009 +0200 - - Add missing { } - - poppler/Gfx.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 1beec21ed3a016998fee3849d460166895db9047 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Jun 3 22:37:43 2009 +0200 - - Give an error when using level1sep without having CMYK support - - Fixes bug #22026 - - poppler/PSOutputDev.cc | 4 ++++ - 1 file changed, 4 insertions(+) - -commit e80d645c34c7d44d1f35da0a25669d1c4cde6e7f -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Jun 3 22:00:49 2009 +0200 - - Also accept tokens with to leading 00 - - Fixes bug 22025, based on a patch by William Bader - - poppler/CharCodeToUnicode.cc | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) - -commit e521c1efaeba3f35d10e46bca3d9650dabd2d889 -Author: Adrian Johnson <ajohnson@redneon.com> -Date: Wed Jun 3 22:08:57 2009 +0930 - - Implement text in pattern colorspace for the cairo backend - - poppler/CairoOutputDev.cc | 47 - +++++++++++++++++++++++++++++++++++++++++++++++ - poppler/CairoOutputDev.h | 19 +++++++++++++++++++ - 2 files changed, 66 insertions(+) - -commit a87978b09a026b2db6b0f80271d87b44b336a121 -Author: Pino Toscano <pino@kde.org> -Date: Wed Jun 3 13:49:56 2009 +0200 - - [Qt4 demo] show the checksum for embedded files - - qt4/demos/embeddedfiles.cpp | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -commit db5102842494a124d813db1696bb60820db3442b -Author: Pino Toscano <pino@kde.org> -Date: Wed Jun 3 13:21:22 2009 +0200 - - [Qt4 demo] remove checks for Qt >= 4.2 - - poppler-qt4 requires Qt 4.3, so checking for 4.2 is no more needed - - qt4/demos/embeddedfiles.cpp | 2 -- - qt4/demos/fonts.cpp | 2 -- - qt4/demos/info.cpp | 2 -- - qt4/demos/optcontent.cpp | 2 -- - qt4/demos/permissions.cpp | 2 -- - qt4/demos/toc.cpp | 2 -- - 6 files changed, 12 deletions(-) - -commit e8d897581656ee4a20e9bb87dd999425663ace3b -Author: Pino Toscano <pino@kde.org> -Date: Wed Jun 3 02:54:29 2009 +0200 - - [Qt4 demo] simplier way to change page from the thumbnail view - - qt4/demos/pageview.cpp | 5 ----- - qt4/demos/pageview.h | 3 --- - qt4/demos/thumbnails.cpp | 2 +- - qt4/demos/thumbnails.h | 3 --- - qt4/demos/viewer.cpp | 1 - - 5 files changed, 1 insertion(+), 13 deletions(-) - -commit f69a4fe47d3478cccbc03e4ac0929c7eada681c0 -Author: Pino Toscano <pino@kde.org> -Date: Wed Jun 3 01:24:21 2009 +0200 - - [Qt4 demo] Add a thumbnail dock widget - - Useful to show the embedded page thumbnails in the document, if any. - Based on a patch by Shawn Rutledge <shawn.t.rutledge@gmail.com>, - reworked by me to be a QListWidget showing the page items at their - full size. - - qt4/demos/CMakeLists.txt | 1 + - qt4/demos/thumbnails.cpp | 84 - ++++++++++++++++++++++++++++++++++++++++++++++++ - qt4/demos/thumbnails.h | 51 +++++++++++++++++++++++++++++ - qt4/demos/viewer.cpp | 11 ++++++- - 4 files changed, 146 insertions(+), 1 deletion(-) - -commit 2f24ac0f4bbd6de1c9f137110b3ac2bd3b23b0b9 -Author: Shawn Rutledge <shawn.t.rutledge@gmail.com> -Date: Wed Jun 3 01:22:31 2009 +0200 - - [Qt4 demo] add a public slot to set the current page - - qt4/demos/pageview.cpp | 5 +++++ - qt4/demos/pageview.h | 3 +++ - 2 files changed, 8 insertions(+) - -commit 1f1baf186f9e37606765e51ec5b9893ddfbfa893 -Author: Shawn Rutledge <shawn.t.rutledge@gmail.com> -Date: Wed Jun 3 01:19:16 2009 +0200 - - [Qt4] Add Page::thumbnail() - - This function can be used to get the embedded thumbnail of the page, - present in the document. - Reindented by me, and avoid a memory leak because of non-freed data. - - qt4/src/poppler-page.cc | 21 ++++++++++++++++++++- - qt4/src/poppler-qt4.h | 11 +++++++++++ - 2 files changed, 31 insertions(+), 1 deletion(-) - -commit 5cc24be1e9af0a27ab88ffa719bcabc2378868e4 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Jun 3 00:05:54 2009 +0200 - - Remove unused variables - - poppler/SplashOutputDev.cc | 3 --- - 1 file changed, 3 deletions(-) - -commit 45823bf8f4abacbbf257f6708264de074eda3cf4 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Jun 3 00:02:54 2009 +0200 - - Make it compile :-/ - - poppler/SplashOutputDev.cc | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -commit f5ae14907261a46c121f3ed7aea9d7ad9b9c55de -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Jun 2 23:52:59 2009 +0200 - - Really fix the typo - - README | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 5d4b1995cdd57db7cef3d88704850aaf66ed7fff -Author: William Bader <williambader@hotmail.com> -Date: Tue Jun 2 23:10:53 2009 +0200 - - Fix three typos in README - - README | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit 104f9286ceb5fcb5f4795bca7633029142d5f6a4 -Author: Thomas Freitag <Thomas.Freitag@alfa.de> -Date: Tue Jun 2 22:59:42 2009 +0200 - - Support colorizing text in pattern colorspace - - This implements commits the final patches for bug 19670 and 19994 - Also fixes bugs 15819 and 2807 - Also implements blending for SPLASH_CMYK in Splash - It's a quite big change but i've done regression testing over my whole - pdf suite and did not fit anything that went worse, just improvements - Missing the Cairo support - - CMakeLists.txt | 1 + - poppler/Gfx.cc | 135 ++++++++++++--- - poppler/Gfx.h | 7 + - poppler/GfxState.cc | 58 +------ - poppler/GfxState_helpers.h | 80 +++++++++ - poppler/Makefile.am | 1 + - poppler/OutputDev.h | 14 ++ - poppler/PSOutputDev.cc | 285 +++++++++++++++++++------------- - poppler/PSOutputDev.h | 18 ++ - poppler/SplashOutputDev.cc | 404 - ++++++++++++++++++++++++++++++++++++++------- - poppler/SplashOutputDev.h | 19 +++ - 11 files changed, 766 insertions(+), 256 deletions(-) - -commit d3e4563146cbff4cb507522783e60462461c7524 -Author: Thomas Freitag <Thomas.Freitag@alfa.de> -Date: Sun May 31 23:23:07 2009 +0200 - - Set memory to 0 after allocation, fixes problems on Sun machines, - should not hurt for others - - poppler/GfxState.cc | 5 +++++ - 1 file changed, 5 insertions(+) - -commit 78a58931b4347ecb505bad5a51104382ef5f91c7 -Author: Thomas Freitag <Thomas.Freitag@alfa.de> -Date: Sun May 31 22:52:23 2009 +0200 - - Add splashClearColor that assigns white to the given colorptr - - splash/SplashTypes.h | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -commit 47c26747b32c242ec8ac60e7b93150a67eb22e31 -Author: Thomas Freitag <Thomas.Freitag@alfa.de> -Date: Sun May 31 22:51:22 2009 +0200 - - Fix splashColorModeNComps to correctly include all values for each - SplashColorMode - - splash/SplashState.cc | 17 +++++++++++++++++ - 1 file changed, 17 insertions(+) - -commit 41775d8c0b44bf591d8ff5ede7fad276e8fa9eef -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Jun 1 15:24:24 2009 +0200 - - [glib-demo] Use poppler_annot_markup_has_popup() - - glib/demo/annots.c | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -commit f542c5294394e837298cb7e7d1d94bb336bfd09d -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Jun 1 15:24:04 2009 +0200 - - [glib] Add poppler_annot_markup_has_popup() - - glib/poppler-annot.cc | 20 ++++++++++++++++++++ - glib/poppler-annot.h | 1 + - 2 files changed, 21 insertions(+) - -commit af32d56af779edcc539b680e634755941d1bf45c -Author: Petr Gajdos <pgajdos@novell.com> -Date: Thu May 21 00:37:18 2009 +0200 - - Add the possibility of forcing no hinting of fonts - - poppler/ArthurOutputDev.cc | 2 ++ - poppler/GlobalParams.cc | 20 ++++++++++++ - poppler/GlobalParams.h | 4 +++ - poppler/SplashOutputDev.cc | 2 ++ - splash/SplashFTFont.cc | 76 - +++++++++++++++++++++++++++----------------- - splash/SplashFTFont.h | 2 ++ - splash/SplashFTFontEngine.cc | 8 +++-- - splash/SplashFTFontEngine.h | 6 ++-- - splash/SplashFontEngine.cc | 4 ++- - splash/SplashFontEngine.h | 2 ++ - 10 files changed, 91 insertions(+), 35 deletions(-) - -commit 1a69d9638214943b3c2278f570694d9722a5de15 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed May 20 23:58:44 2009 +0200 - - Do not create the GfxColorTransform if the lcms could not be created - - Fixes crash on pdf from bug 20108 - - poppler/GfxState.cc | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -commit 95246d39c1289111a4ba3eb2ffbec50d7702e5eb -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed May 20 23:20:20 2009 +0200 - - Check Mask entries are int before using them, also if they are real - cast to int and try to use them - - Fixes bug #21841 - - poppler/Gfx.cc | 11 ++++++++++- - 1 file changed, 10 insertions(+), 1 deletion(-) - -commit 0c3517bfb4e1e1a28962f8d490ad69ec5766b6a1 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed May 20 23:08:41 2009 +0200 - - Fix pdftops crash on file from KDE bug 174899 - - Still does not generate a correct ps file, but at least the program - does not crash now - - fofi/FoFiTrueType.cc | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -commit 548c72600b8a5e076647041660ed5031feedc7cc -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed May 20 22:43:11 2009 +0200 - - Do not exit(1) on a pdf i have lying around - - PDF is 0f03b3539a436a9f18d7e4e29d410f89 6607907.pdf - - poppler/JBIG2Stream.cc | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -commit f78d3a7ff5ef4b500d76d84ebc45aac3be162dab -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon May 18 20:44:40 2009 +0200 - - Move lcms.h include to GfxState.cc, replace lcms typedefs by void * - - poppler/GfxState.cc | 70 - ++++++++++++++++++++++++++++++++++++++++++++++------- - poppler/GfxState.h | 64 +++++++++++------------------------------------- - 2 files changed, 75 insertions(+), 59 deletions(-) - -commit ec2467f9981b7e7c23d5dcd8eabf2e7c8cdf8930 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun May 17 20:00:53 2009 +0200 - - Use the lcms include dir - - CMakeLists.txt | 3 +++ - poppler/Makefile.am | 2 ++ - 2 files changed, 5 insertions(+) - -commit e0fcf7055af480498a81a000dcd9f977a783df66 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun May 17 12:07:05 2009 +0200 - - Use pkgconfig for autotools cms check - - configure.ac | 12 +++++++----- - poppler/Makefile.am | 2 +- - 2 files changed, 8 insertions(+), 6 deletions(-) - -commit 657734c19274ab281328cba9297eca45e48777aa -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun May 17 12:06:47 2009 +0200 - - Better lcms check comming from kdelibs - - cmake/modules/FindLCMS.cmake | 95 - +++++++++++++++++++++++++++++++++----------- - 1 file changed, 71 insertions(+), 24 deletions(-) - -commit 0974b7b4bfe3f8cf3a1408741ddf01c667c28044 -Author: Patrick Spendrin <ps_ml@gmx.de> -Date: Thu May 14 16:15:22 2009 +0200 - - [Win32] Build fix for MSVC. - - poppler-config.h.cmake | 2 +- - poppler/poppler-config.h.in | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit d1c0e8a6c63361304cd453bb4c51e84a1aab7efa -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu May 14 00:29:18 2009 +0200 - - Kill support for specifying extension in openTmpFile - - We don't use it and it would not work anyway, see bug #21713 - - goo/gfile.cc | 58 - ++++++++++---------------------------------- - goo/gfile.h | 3 ++- - poppler/CairoFontEngine.cc | 6 ++--- - splash/SplashFTFontEngine.cc | 3 ++- - splash/SplashT1FontEngine.cc | 3 ++- - splash/SplashT1FontFile.cc | 3 ++- - 6 files changed, 24 insertions(+), 52 deletions(-) - -commit e237d8b5c2ae8805487a0790d9fb218263686712 -Author: Pino Toscano <pino@kde.org> -Date: Wed May 13 18:37:07 2009 +0200 - - [Qt4] we don't need an output device anymore (since long, even) - for resolving destinations - - qt4/src/poppler-document.cc | 3 --- - 1 file changed, 3 deletions(-) - -commit 9a2a851da93ef1a0c291fc9523a468e808ffd08e -Author: Pino Toscano <pino@kde.org> -Date: Wed May 13 18:19:11 2009 +0200 - - [Qt4] Do not try to resolve named destinations for GoTo links pointing - to external documents. - - In such cases, the named destination is a destination in the external - document, so we would try to look up a destination which is not in - the current document (thus the look up is unuseful). - It is task of the users of poppler-qt4 detect such - situations, and resolve the named when necessary, using - Document::linkDestination(QString). - - qt4/src/poppler-document.cc | 2 +- - qt4/src/poppler-link.cc | 2 +- - qt4/src/poppler-page.cc | 6 ++++-- - qt4/src/poppler-private.cc | 4 ++-- - qt4/src/poppler-private.h | 5 +++-- - 5 files changed, 11 insertions(+), 8 deletions(-) - -commit 51f6cc26fc5fdccce1ba4d4816dec374ce85d67a -Author: Pino Toscano <pino@kde.org> -Date: Wed May 13 17:38:00 2009 +0200 - - [Qt4] start a (basic) unit test for links & destinations - - qt4/tests/CMakeLists.txt | 1 + - qt4/tests/Makefile.am | 5 +++ - qt4/tests/check_links.cpp | 96 - +++++++++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 102 insertions(+) - -commit 174f8087f5e09c5d1915de128b7a15acf47c1e13 -Author: Pino Toscano <pino@kde.org> -Date: Wed May 13 16:44:59 2009 +0200 - - [Qt4] set the destination name only when it is not resolved - - qt4/src/poppler-link.cc | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -commit fb0cb2add9443992f166acdf744fbec875faaabf -Author: Pino Toscano <pino@kde.org> -Date: Tue May 12 01:53:43 2009 +0200 - - [Qt4] Add LinkDestination::destinationName() that returns the name - of the current destination. - - qt4/src/poppler-link.cc | 10 ++++++++++ - qt4/src/poppler-link.h | 7 +++++++ - 2 files changed, 17 insertions(+) - -commit b8bd44f1302f7b6a6923d41c98ec74c118a5abb8 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon May 11 20:49:34 2009 +0200 - - Poppler 0.11.0 aka 0.12 Alpha 1 - - CMakeLists.txt | 4 +- - NEWS | 142 - ++++++++++++++++++++++++++++++++++++++++++++++++++++ - configure.ac | 2 +- - msvc/config.h | 6 +-- - poppler/Makefile.am | 2 +- - qt4/src/Doxyfile | 2 +- - 6 files changed, 150 insertions(+), 8 deletions(-) - -commit 79bcedd5602729b959f21aed222445de621e7ecb -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon May 11 19:59:57 2009 +0200 - - Update copyright headers for previous patches - - poppler/ArthurOutputDev.cc | 1 + - poppler/CairoOutputDev.cc | 2 +- - poppler/Page.cc | 2 +- - poppler/Stream.cc | 1 + - poppler/Stream.h | 1 + - utils/HtmlOutputDev.cc | 1 + - utils/ImageOutputDev.cc | 1 + - 7 files changed, 7 insertions(+), 2 deletions(-) - -commit f16e36df3a74e1adf14513a6340be2e8665f8d65 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun May 10 19:24:32 2009 +0200 - - Don't include popups annots with a parent in annots list - - poppler/Annot.cc | 13 +++++++++++++ - 1 file changed, 13 insertions(+) - -commit 5051ebed1477ff3f7721606f79d66d56a80c1145 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun May 10 19:10:51 2009 +0200 - - Make sure ImageStream::close() is called after ImageStream::reset() - - poppler/ArthurOutputDev.cc | 1 + - poppler/CairoOutputDev.cc | 20 +++++++++++++++++--- - poppler/Page.cc | 1 + - poppler/Stream.cc | 4 ++++ - poppler/Stream.h | 3 +++ - utils/HtmlOutputDev.cc | 1 + - utils/ImageOutputDev.cc | 1 + - 7 files changed, 28 insertions(+), 3 deletions(-) - -commit 829ed964374676ddfa4a9048c940dc20a309ca47 -Author: M Joonas Pihlaja <jpihlaja@cc.helsinki.fi> -Date: Sun May 10 23:39:11 2009 +0200 - - Fix axial shading fix to ensure the painting passes by the four - edges of the bbox - - When j and teoricalj are the same, just change the value of ta[] - not the next[] ones - - poppler/Gfx.cc | 23 ++++++++++++++++------- - 1 file changed, 16 insertions(+), 7 deletions(-) - -commit 68d9644499676ed1553b2bfcdbfc9a5677c75345 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat May 9 22:25:12 2009 +0200 - - Hidden property depends on parent being hidden, not only yourself - - Fixes bug #16093 - - poppler/Gfx.cc | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -commit 810a71ea66f0e07d9849a5e9bf28911472482d1b -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri May 8 09:36:31 2009 +0200 - - [glib] Add poppler_annot_markup_get_popup_rectangle - - glib/demo/annots.c | 8 ++++++++ - glib/poppler-annot.cc | 35 +++++++++++++++++++++++++++++++++++ - glib/poppler-annot.h | 2 ++ - 3 files changed, 45 insertions(+) - -commit 5d328282da4713356fbe4283bd992ac2fc9010a2 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu May 7 23:11:55 2009 +0200 - - bitmap->h can be 0, move to _checkoverflow variant, code already - knows how to deal with NULL - - splash/SplashFTFont.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 5b0fb6f94d6d54b1b0c97762db61e2ab0dd07c85 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed May 6 22:59:55 2009 +0200 - - Fix format printing - - poppler/JBIG2Stream.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit c21b08a254f42f53d4b59ad4fb308c7c68c32d15 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Wed May 6 15:56:21 2009 +0200 - - [glib] Several fixes in poppler_annot_get_color() - - PopplerColor is compatible with GdkColor where every component is - in the - range of 0 to 65535, we were returning values between 0 and 1 but - converted to guint16. - We were also showing a warning when AnnotColor::colorTransparent is - used, but we decided to return a PopplerColor * to be able to - represent - transparent color returning NULL, so it's actually supported. - - glib/demo/annots.c | 25 +++++++++++-------------- - glib/poppler-annot.cc | 36 +++++++++++++++++++++--------------- - 2 files changed, 32 insertions(+), 29 deletions(-) - -commit 63cc40ec02498e1ec249d5f74e23f574c665872e -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat May 2 14:08:23 2009 +0200 - - Link pdftoabw to abiword libs - - Fixes bug #21520 - - utils/Makefile.am | 22 ++++++++++++---------- - 1 file changed, 12 insertions(+), 10 deletions(-) - -commit 70e06e9ae28d08bb7495a7f2eb03b0b5714a1e54 -Author: Kouhei Sutou <kou@cozmixng.org> -Date: Wed Apr 29 09:52:21 2009 +0900 - - PopplerAttachment refers its document. - - glib/poppler-attachment.cc | 41 +++++++++++++++++++++++++++++++++++------ - 1 file changed, 35 insertions(+), 6 deletions(-) - -commit 977a13f1091700bf7e7b31859e0e6632dc323462 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Apr 25 19:07:01 2009 +0200 - - [glib] Only create checksum string for valid checksums - - glib/poppler-attachment.cc | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -commit fb6e7141e3008ae230ae5819e2c7a0425296d8d2 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri Apr 24 10:13:53 2009 +0200 - - Update copyright headers - - glib/poppler-annot.cc | 1 + - glib/poppler-annot.h | 1 + - poppler/Annot.cc | 2 +- - poppler/Annot.h | 2 +- - poppler/DateInfo.cc | 1 + - poppler/DateInfo.h | 1 + - 6 files changed, 6 insertions(+), 2 deletions(-) - -commit fc7e52fef0317f9c85ead2c4f8a0e9b688decca3 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri Apr 24 09:53:41 2009 +0200 - - Fix typos in Annot::setContents() documentation - - poppler/Annot.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit df0032cf5f6e5dc44bad056c659180e4065d32e2 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Apr 23 13:19:25 2009 +0200 - - Document Annot::setContents() method - - poppler/Annot.h | 2 ++ - 1 file changed, 2 insertions(+) - -commit 86a37a8f3f93e3378b446f8d81d80571267c7660 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Apr 23 13:16:04 2009 +0200 - - Update the annotation last modified time when it's modified - - poppler/Annot.cc | 26 ++++++++++++++++---------- - poppler/Annot.h | 7 ++++--- - 2 files changed, 20 insertions(+), 13 deletions(-) - -commit 9662bfa2b4b2282d0fc29d2a327b62d8bde56ff2 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Apr 23 13:13:07 2009 +0200 - - Add timeToDateString() to DateInfo - - This function converts a time_t into a string in PDF date format. - - configure.ac | 1 + - poppler/DateInfo.cc | 47 +++++++++++++++++++++++++++++++++++++++++++++++ - poppler/DateInfo.h | 7 +++++++ - 3 files changed, 55 insertions(+) - -commit dc4cf0c29b53cda5c1c2badc5026af3429502e3a -Author: Pino Toscano <pino@kde.org> -Date: Tue Apr 21 21:51:52 2009 +0200 - - add poppler-date.{cc,h} - - glib/CMakeLists.txt | 2 ++ - 1 file changed, 2 insertions(+) - -commit 0750c6502faeabff571f5730b567097e793dca64 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Apr 21 20:04:27 2009 +0200 - - [glib-demo] Fix dates handling in annots demo - - glib/demo/annots.c | 69 - +++++++++++------------------------------------------- - 1 file changed, 14 insertions(+), 55 deletions(-) - -commit fe73bf9771e8294af4c8a11ec4c2891ff8f8d859 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Apr 21 20:02:25 2009 +0200 - - [glib-demo] GTime is deprecated, use time_t instead - - glib/demo/utils.c | 2 +- - glib/demo/utils.h | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit 6d468cfa0cb89760e5d6cca43521cde6d99aa52e -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Apr 21 20:00:20 2009 +0200 - - [glib-demo] Use format_date from utils and remove duplicated code - - glib/demo/info.cc | 27 ++------------------------- - 1 file changed, 2 insertions(+), 25 deletions(-) - -commit e5f5ea01d0da4c4d877b93755523dc2a7f2ec049 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Apr 21 19:57:11 2009 +0200 - - [glib] Fix poppler_annot_markup_get_date() - - Date field in Markup annots is also a PDF format date string, so it - should be parsed and the resulting time_t used to create a correct - GDate. - - glib/poppler-annot.cc | 22 +++++++++++----------- - 1 file changed, 11 insertions(+), 11 deletions(-) - -commit 876ad1bcc8a7b2f37656bf15cee7eb888fd46ed4 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Apr 21 19:36:33 2009 +0200 - - [glib] Add info about the return value in poppler_annot_get_modified() - doc - - glib/poppler-annot.cc | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -commit 8c54a15e1715721ee7af7e82c90b8dda3689c65f -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Apr 21 19:35:14 2009 +0200 - - [glib] Fix a typo in poppler_date_parse documentation - - glib/poppler-date.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 39d09fa237d06fa93b02eb916d2c0242c4e8fe85 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Apr 21 19:29:32 2009 +0200 - - [glib] Add poppler_date_parse to parse PDF format date strings - - We need to make this public because the field M in the Annot - dictionary - might be a Date string (in PDF date format) or a text - string. According - to the PDF spec: "The preferred format is a date string as described - in - Section 3.8.3, “Dates,†but viewer applications should be - prepared to - accept and display a string in any format". The only way to know - whether - it's a PDF date string or not, is by trying to parse it. For this - reason - poppler_annot_get_modified() returns a gchar * instead of a - time_t. So, - viewers should try to parse the string in order to convert it to a - time_t, and if it fails to parse, use the date string as provided - by the - document. - - glib/Makefile.am | 2 ++ - glib/poppler-attachment.cc | 4 +-- - glib/poppler-date.cc | 66 - ++++++++++++++++++++++++++++++++++++++++++++++ - glib/poppler-date.h | 30 +++++++++++++++++++++ - glib/poppler-document.cc | 45 ++++++------------------------- - glib/poppler-private.h | 2 +- - glib/poppler.h | 1 + - 7 files changed, 110 insertions(+), 40 deletions(-) - -commit 9c2714a3e1c02f445661618e24bcd27f1392b2b7 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Apr 21 18:08:06 2009 +0200 - - [glib] Implement poppler_annot_set_contents() - - glib/poppler-annot.cc | 25 +++++++++++++++++++++++++ - glib/poppler-annot.h | 2 ++ - 2 files changed, 27 insertions(+) - -commit eec550e8b3cf96aefed9b03a78d365c2848fb8f2 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Apr 21 18:06:34 2009 +0200 - - Add setContents() to modify the annot contents - - poppler/Annot.cc | 26 +++++++++++++++++++++++++- - poppler/Annot.h | 4 ++++ - 2 files changed, 29 insertions(+), 1 deletion(-) - -commit 047a8870a8cea9b680080e0d3bf68d0685431233 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Apr 20 23:38:53 2009 +0200 - - In case of err3 or err2 in readPageTree we need to free kidRef too - - poppler/Catalog.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit cb61b555f2c4db8685dec5491ca86570c962aab6 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Apr 18 18:30:04 2009 +0200 - - Extend test-poppler-glib to show more page annotations and actions - - Based on path by Thomas Viehmann <tv@beamnet.de> - - glib/test-poppler-glib.cc | 68 - +++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 68 insertions(+) - -commit 2221b8a9ae5e986c79ea3f6c9f3b0246d328c7ab -Author: Matthias Franz <matthias@ktug.or.kr> -Date: Sun Apr 19 23:29:18 2009 +0200 - - Fix decryption using owner password on some pdf - - See bug #21270 - - poppler/Decrypt.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit e20efbf6cc676758b8ef7d2ad607560fcdbbf89e -Author: Peter Kerzum <kerzum@yandex-team.ru> -Date: Fri Apr 17 22:14:26 2009 +0200 - - Fix typo in GfxFont.cc - - poppler/GfxFont.cc | 11 ++++++----- - 1 file changed, 6 insertions(+), 5 deletions(-) - -commit b760debea03380280d72cd39d792cbc1a380a87c -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Apr 17 21:04:26 2009 +0200 - - Fix rendering of axial shadings - - Fixes bug #19896 - - poppler/Gfx.cc | 102 - +++++++++++++++++++++++++++++++++++---------------------- - 1 file changed, 62 insertions(+), 40 deletions(-) - -commit 9f1312f3d7dfa7e536606a7c7296b7c876b11c00 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Apr 16 22:13:26 2009 +0200 - - Fix problems that happen when parsing broken JBIG2 files - - Fixes - CVE-2009-0799 xpdf OOB Read - CVE-2009-0800 xpdf Multiple Input Validation Flaws - CVE-2009-1179 xpdf Integer Overflow - CVE-2009-1180 xpdf Invalid free() - CVE-2009-1181 xpdf NULL dereference DoS - CVE-2009-1182 xpdf MMR Decoder Buffer Overflows - CVE-2009-1183 xpdf MMR Infinite Loop DoS - - Patch based on a patch by Derek Noonburg - Some files still hit the exit(1) in goo.c but at least none is - really crashing - - poppler/JBIG2Stream.cc | 447 - +++++++++++++++++++++++++++++++++++-------------- - poppler/JBIG2Stream.h | 4 + - 2 files changed, 324 insertions(+), 127 deletions(-) - -commit 284a92899602daa4a7f429e61849e794569310b5 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Apr 13 21:51:12 2009 +0200 - - Did a mistake in the gmalloc -> gmallocn commit, it's a 4 here not a 3 - - poppler/SplashOutputDev.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 9cf2325fb22f812b31858e519411f57747d39bd8 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Apr 11 00:31:57 2009 +0200 - - More gmalloc → gmallocn - - glib/poppler-page.cc | 2 +- - splash/Splash.cc | 8 ++++---- - splash/SplashBitmap.cc | 6 +++--- - splash/SplashFTFont.cc | 2 +- - 4 files changed, 9 insertions(+), 9 deletions(-) - -commit c399b2d512aa073b0d7cd8eb5413a4b43f0d6aef -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Apr 11 00:26:23 2009 +0200 - - Revert part of last commit, i need more math classes :D - - poppler/JBIG2Stream.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 7b2d314a61fd0e12f47c62996cb49ec0d1ba747a -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Apr 11 00:23:04 2009 +0200 - - Be paranoid, use gmallocn or gmallocn3 in all gmalloc with * - - poppler/ArthurOutputDev.cc | 4 ++-- - poppler/CairoOutputDev.cc | 14 +++++++------- - poppler/GfxState.cc | 8 ++++---- - poppler/JBIG2Stream.cc | 4 ++-- - poppler/PSOutputDev.cc | 6 +++--- - poppler/SplashOutputDev.cc | 20 ++++++++++---------- - 6 files changed, 28 insertions(+), 28 deletions(-) - -commit 0131f0a01cba8691d10a18de1137a4744988b346 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Apr 11 00:20:55 2009 +0200 - - Add gmallocn3 that does the same as gmallocn but with 3 arguments - - goo/gmem.cc | 22 ++++++++++++++++++++++ - goo/gmem.h | 2 ++ - 2 files changed, 24 insertions(+) - -commit 75c3466ba2e4980802e80b939495981240261cd5 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Apr 10 18:05:54 2009 +0200 - - Make it compile in Solaris - - See bug #21080 - - poppler/CairoFontEngine.cc | 14 ++++++++++++++ - 1 file changed, 14 insertions(+) - -commit 3210970dc1d6faf51bce59bb7ecb6b881f9c0fe6 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri Apr 10 13:09:37 2009 +0200 - - [glib] Print annotations with the print flag enabled - - glib/poppler-page.cc | 2 ++ - 1 file changed, 2 insertions(+) - -commit b0b9798c85c7c6d6f336f73135a98974897b9f60 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Mar 30 23:26:39 2009 +0200 - - Fix clip test for fonts - - Fixes bug 20950 - I really don't remember why i put that -1 maybe i got mislead by - SplashClip::testRect - having a +1, but the idea of the +1 is correct because it's ints - vs floats - - splash/SplashFTFont.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 5c08f57aa80092954746d722bb13655aee3f162c -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Mar 29 23:52:31 2009 +0200 - - Forgot Ross copyright - - poppler/TextOutputDev.cc | 1 + - 1 file changed, 1 insertion(+) - -commit c6d3e7884010ebdcc961d81ca8c692870fc9b139 -Author: Ross Moore <ross@maths.mq.edu.au> -Date: Sun Mar 29 23:46:09 2009 +0200 - - Fix extraction of some ActualText content - - Fixes bug #20013 - - poppler/TextOutputDev.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit e4b3f7cbcb6ccdfa8b18d8da5f7074f4140b776a -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Mar 25 22:16:07 2009 +0100 - - Fix getGlyphAdvance to behave correctly on font size changes - - Fixes bug #20769 - - splash/SplashFTFont.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 4acde05ac4d0b03466c949138321cc3445a14158 -Author: Eric Toombs <ewtoombs@uwaterloo.ca> -Date: Wed Mar 25 21:11:03 2009 +0100 - - Remove case-insensitive matching of filenames in PDFDoc constructor - - poppler/PDFDoc.cc | 39 ++++++++++----------------------------- - 1 file changed, 10 insertions(+), 29 deletions(-) - -commit 120c7f6697ed1edaff6e17ae1ed202c69f03a73c -Author: Pino Toscano <pino@kde.org> -Date: Tue Mar 24 22:56:33 2009 +0100 - - declare the matrix at the beginning - - poppler/ArthurOutputDev.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 441a9cd56935bfe2d8fddc5d3bc2c0104aeffaca -Author: Eric Toombs <ewtoombs@uwaterloo.ca> -Date: Sun Mar 22 22:50:14 2009 +0100 - - Improved error reporting of ErrOpenFile errors - - See bug #20660 for more information - - glib/poppler-document.cc | 14 ++++++++++--- - poppler/PDFDoc.cc | 54 - ++++++++++++++++++++++++++++-------------------- - poppler/PDFDoc.h | 8 +++++++ - 3 files changed, 51 insertions(+), 25 deletions(-) - -commit 16af0ced4a0762f2f538135bd8dd72b469f6fdca -Author: Michael K. Johnson <a1237@danlj.org> -Date: Sat Mar 21 16:14:06 2009 +0100 - - Support rendering non-square pixels in pdftoppm - - Bug #20702 - - utils/pdftoppm.1 | 16 ++++++++++++++-- - utils/pdftoppm.cc | 37 ++++++++++++++++++++++++++++++++----- - 2 files changed, 46 insertions(+), 7 deletions(-) - -commit a103c60abd5fe4c721b099c005daf22d6350c355 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Mar 21 15:47:12 2009 +0100 - - Update version we need of Qt4 - - CMakeLists.txt | 2 +- - configure.ac | 8 ++++---- - 2 files changed, 5 insertions(+), 5 deletions(-) - -commit c4b1754fdd3a4649551556de2655c8291daafddf -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Mar 21 13:29:38 2009 +0100 - - Bump cairo dependency to 1.8.4 - - Cairo 1.8.4 fixes and important bug that affects the Type 3 font - rendering - - CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 50c4ee413929e5a70133839e3cde039da738fab2 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Mar 18 22:00:05 2009 +0100 - - Add more _checkoverflow variants, rework internals - - goo/gmem.cc | 92 - ++++++++++++++++++++++++++++++------------------------------- - goo/gmem.h | 4 ++- - 2 files changed, 48 insertions(+), 48 deletions(-) - -commit 121c44db0884f0d70ba1470a66aa78441257c421 -Author: Adrian Johnson <ajohnson@redneon.com> -Date: Fri Mar 20 23:25:19 2009 +1030 - - Fix cairo luminosity smask when cairo ctm != identity - - poppler/CairoOutputDev.cc | 16 +++++++++++++++- - 1 file changed, 15 insertions(+), 1 deletion(-) - -commit 3f55aff56a1d2002ba79f3efba5eb77e94575439 -Author: Adrian Johnson <ajohnson@redneon.com> -Date: Thu Mar 19 22:34:23 2009 +1030 - - Fix bug in cairo backend with nested masks - - The previous smask was not restored after a q/Q pair or form xobject. - - poppler/CairoOutputDev.cc | 18 +++++++++++++++++- - poppler/CairoOutputDev.h | 5 +++++ - 2 files changed, 22 insertions(+), 1 deletion(-) - -commit 4cc3cb8992ac554352d68e97563823b9bbd556ce -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri Mar 20 12:38:28 2009 +0100 - - Bump cairo dependency to 1.8.4 - - Cairo 1.8.4 fixes and important bug that affects the Type 3 font - rendering - - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit da94fe717a1ab60fb074fae61d582d1ee7151fc2 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Mar 16 22:54:27 2009 +0100 - - Fix parsing of border arrays - - Fixes 19761 - - poppler/Annot.cc | 54 - ++++++++++++++++++++++++++++++++++++------------------ - 1 file changed, 36 insertions(+), 18 deletions(-) - -commit 8df0323f1ca4548a5d5824ece8736b356ce7ca42 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Mar 12 00:09:03 2009 +0100 - - Really fix jpeg lib init order? - - poppler/DCTStream.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 12aac6774fc6f92def3d5567051117951cc32223 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Mar 11 23:00:37 2009 +0100 - - fontCIDType2OT fonts can also have a CIDToGIDMap - - Fixes bug #20605 - - poppler/GfxFont.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 0ca9ae2848808d15e7a2b00f5eb33bb8f990c887 -Author: Vincent Torri <vtorri@univ-evry.fr> -Date: Wed Mar 11 00:39:59 2009 +0100 - - remove the fortran check during the initialisation of libtool - - configure.ac | 1 + - 1 file changed, 1 insertion(+) - -commit 710e329a3a6a9ee2eed997c9eeaea21c44237423 -Author: Vincent Torri <vtorri@univ-evry.fr> -Date: Wed Mar 11 00:37:11 2009 +0100 - - Add AC_CONFIG_MACRO_DIR([m4]) - - It is used by autoreconf to trace changes in m4 macros that are in - the m4/ subdirectory. - - configure.ac | 1 + - 1 file changed, 1 insertion(+) - -commit d15e47158ae31909212d3875159046afb208de97 -Author: Vincent Torri <vtorri@univ-evry.fr> -Date: Wed Mar 11 00:36:27 2009 +0100 - - Better check for pkg-config - - configure.ac | 5 +---- - 1 file changed, 1 insertion(+), 4 deletions(-) - -commit b3f569f9a6c117c097acac52ae6552209fcd2101 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Mar 11 00:25:07 2009 +0100 - - Check there is an optional content config before using it - - Fixes bug #20587 - - poppler/Gfx.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 7a5d1e57b2757c986da17f7238415b927e73127f -Author: Brian Ewins <Brian.Ewins@gmail.com> -Date: Mon Mar 9 22:54:58 2009 +0100 - - Check for pkgconfig before using it - - At the moment if pkgconfig is not installed, an unhelpful syntax - error appears when testing for freetype. Identify the problem - earlier on - - configure.ac | 6 ++++++ - 1 file changed, 6 insertions(+) - -commit 8dc9e4d57a4759de2b56a87d9bace80d5d563fef -Author: Marc Kleine-Budde <mkl@pengutronix.de> -Date: Sun Mar 8 15:29:02 2009 +0100 - - use AC_CHECK_HEADER to find headers - - The original m4/libjpeg.m4 used AC_FIND_FILE to look for jpeg - header file. - This test is not cross-compiling save. This patch uses the autoconf - function - AC_CHECK_HEADER to look for the jpeg header, which works in the - native and - the cross compiling scenaria. - Bug #20538 - - m4/libjpeg.m4 | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -commit bf2e2f056cadbc488cd3e9576b44beb34689ec81 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Mar 8 13:44:44 2009 +0100 - - Add the new croptting options explanations - - utils/pdftotext.1 | 15 +++++++++++++++ - 1 file changed, 15 insertions(+) - -commit 663d9e5a448641421d290dd228be692a0f236b9c -Author: Jan Jockusch <jan@jockusch.de> -Date: Sun Mar 8 13:44:20 2009 +0100 - - Make pdftotext to accept cropping options like pdftoppm - - Bug #20331 - - utils/pdftotext.cc | 29 ++++++++++++++++++++++++++++- - 1 file changed, 28 insertions(+), 1 deletion(-) - -commit cc4b61f19b69c31d9a73ae7361c4b6a94345d1c2 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Mar 8 12:55:45 2009 +0100 - - Fix the previous fix - - I should stop listening to people without checking that what they - say is - correct - - poppler/DCTStream.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit a4a73cd9f9ee9767d74fbb44ffe083d2057a9d61 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Mar 8 12:44:06 2009 +0100 - - I should compile before commiting :-/ - - poppler/DCTStream.cc | 1 - - 1 file changed, 1 deletion(-) - -commit 6a6b3cc91053e771a67dffa979076d130f87ff11 -Author: Ryszard Trojnacki <rysiek@menel.com> -Date: Sun Mar 8 12:38:42 2009 +0100 - - set up the error-manager before calling jpeg_create_decompress - - Bug #20484 - - poppler/DCTStream.cc | 11 +++++++---- - 1 file changed, 7 insertions(+), 4 deletions(-) - -commit 4dfa7460ddc4b5684d5ef8db17efa50b95b7b735 -Author: Nick Jones <nick.jones@network-box.com> -Date: Tue Mar 3 00:55:53 2009 +0100 - - Do not blindly follow loops parsing OutlineItem - - More details in bug 18364 - - poppler/Outline.cc | 15 ++++++++++++++- - 1 file changed, 14 insertions(+), 1 deletion(-) - -commit de3131ae38fc9442b198d4d7b0c57c6939ad66ce -Author: Pino Toscano <pino@kde.org> -Date: Mon Mar 2 15:20:07 2009 +0100 - - [Qt4] adapt to the new PDFDoc saving API - - store the error code instead of the bool - - qt4/src/poppler-pdf-converter.cc | 12 +++++++----- - 1 file changed, 7 insertions(+), 5 deletions(-) - -commit dac0542eb793603090416f1b7712ca08253f1e7f -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Mar 2 09:54:22 2009 +0100 - - [glib] Correctly handle doc->saveAs() error code. - - Fixes bug #19915. - - glib/poppler-document.cc | 37 +++++++++++++++++++++++++++++++++---- - 1 file changed, 33 insertions(+), 4 deletions(-) - -commit bfc6572614727565d883b9545d4b6665f3c2fdfe -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Feb 28 13:16:49 2009 +0100 - - Return an error code instead of a GBool when saving - - poppler/PDFDoc.cc | 22 +++++++++++----------- - poppler/PDFDoc.h | 8 ++++---- - 2 files changed, 15 insertions(+), 15 deletions(-) - -commit f7c88148fdb671736d81dd5f01a3fb68f944510c -Author: Koji Otani <sho@bbr.jp> -Date: Wed Feb 25 23:38:35 2009 +0100 - - Fix cache shifting - - poppler/GfxState.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 305af8cdb6822858e152e1f930bba2ce3904bf1b -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Feb 25 22:40:24 2009 +0100 - - Make JBIG2Stream not crash in 2009-41414141.pdf - - poppler/JBIG2Stream.cc | 151 - ++++++++++++++++++++++++++++--------------------- - 1 file changed, 85 insertions(+), 66 deletions(-) - -commit 26a8217160c1eaeeadb92023b27e68f402e38dd0 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Feb 22 18:14:15 2009 +0100 - - Check if cairo_shape is not NULL before using it. - - We were checking shape instead. It fixes a crash with some documents. - See bug #17337. - - poppler/CairoOutputDev.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 5e68e52da65b4d8c3817e5fbb6f1a937da321d48 -Author: Pino Toscano <pino@kde.org> -Date: Sat Feb 21 18:03:15 2009 +0100 - - [Qt4] do not assume the destination file name for links is ASCII - - qt4/src/poppler-page.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 439cb397fed33df627a09c70788d72bef20dc872 -Author: Pino Toscano <pino@kde.org> -Date: Sat Feb 21 18:02:36 2009 +0100 - - [Qt] do not assume the destination file name for links is ASCII - - qt/poppler-page.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 3ea5f45ad3e5a55e577a2e45f61b55932ed17013 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Feb 21 17:46:30 2009 +0100 - - [glib] Make sure filename is valid utf-8 for remote dests - - glib/poppler-action.cc | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -commit b5989e4ffece6c1831610ee163d05fd80386a001 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Feb 21 17:45:18 2009 +0100 - - Use the UF entry when present in Filespec dictionary - - poppler/FileSpec.cc | 14 +++++++------- - 1 file changed, 7 insertions(+), 7 deletions(-) - -commit 943fca42b5fa815fad650e42da4ad6e806adc3b1 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Feb 21 12:08:00 2009 +0100 - - [glib] Add a macro to define boxed types - - glib/poppler-action.cc | 26 +------------ - glib/poppler-annot.cc | 15 ++------ - glib/poppler-document.cc | 44 +++++---------------- - glib/poppler-page.cc | 99 - ++++++++++-------------------------------------- - glib/poppler-private.h | 20 ++++++++++ - 5 files changed, 53 insertions(+), 151 deletions(-) - -commit 7406337ed2d38a86308f20f8273a152538e524de -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Feb 21 11:11:20 2009 +0100 - - [glib] Use template files to create poppler-enums - - glib/Makefile.am | 43 - +++++++++++++----------------------------- - glib/poppler-enums.c.template | 44 - +++++++++++++++++++++++++++++++++++++++++++ - glib/poppler-enums.h.template | 25 ++++++++++++++++++++++++ - 3 files changed, 82 insertions(+), 30 deletions(-) - -commit 29bc9d1dd115b5d400975533c3924993c3adae30 -Author: Thomas Viehmann <tv@beamnet.de> -Date: Sat Jan 17 13:16:38 2009 +0100 - - glib small doc comment corrections - - glib/poppler-attachment.cc | 2 +- - glib/poppler-layer.cc | 2 ++ - glib/poppler.cc | 2 -- - 3 files changed, 3 insertions(+), 3 deletions(-) - -commit a06e715d89a99b909b8e7b73b733066c67b1ade3 -Author: Thomas Viehmann <tv@beamnet.de> -Date: Sat Jan 17 12:58:20 2009 +0100 - - Make glib API reference more complete - - glib/reference/poppler-docs.sgml | 2 + - glib/reference/poppler-sections.txt | 55 +++++ - glib/reference/tmpl/poppler-action.sgml | 9 +- - glib/reference/tmpl/poppler-annot.sgml | 368 - ++++++++++++++++++++++++++++++++ - glib/reference/tmpl/poppler-layer.sgml | 79 +++++++ - 5 files changed, 511 insertions(+), 2 deletions(-) - -commit 3a21dafa46d42d86daec440a85b9d63b292a3c88 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Feb 3 21:33:00 2009 +0100 - - Fix cache shifting - - If we do - for (i = 0;i < GFX_ICCBASED_CACHE_SIZE-1 && cache[i].num > 0;i++) { - cache[i+1] = cache[i]; - what we do at the end is copy position 0 to all others so - we need to do it in the reverse order - - poppler/GfxState.cc | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -commit 0ed3fd52bb2d3375ed302285b18f076721b8028e -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Feb 1 10:37:25 2009 +0100 - - [glib-demo] Fix a typo in format string - - glib/demo/page.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 2df6d530cd9acd8648a6196031218ef10e7b3891 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Jan 29 00:51:13 2009 +0100 - - Add line that for some reason was not imported from xpdf file - - Fixes bug 19789 - - utils/ImageOutputDev.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 1fc342eadcbbb41302f190b215c5daf23c9ec9b1 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Jan 28 22:53:43 2009 +0100 - - Fix crash on unexepcted Form Opt value - - Fixes crash on bug 19790 - - poppler/Form.cc | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -commit b1d4efb082ac3dadd7752a557e5aeb6651e17471 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Jan 27 00:26:08 2009 +0100 - - PostScriptFunction::transform optimization - - Do not create and destroy a PSStack each time - PostScriptFunction::transform is called gives a 7% speedup on heavy - PostScriptFunction::transform pdf like nytimes firefox ad - - poppler/Function.cc | 12 ++++++++---- - poppler/Function.h | 15 +++++++++++++++ - 2 files changed, 23 insertions(+), 4 deletions(-) - -commit 90f95127d8d89cfcadeb7d701437ab07ce4a8a61 -Author: Koji Otani <sho@bbr.jp> -Date: Sun Jan 25 23:17:39 2009 +0100 - - Cache last 5 GfxICCBasedColorSpace - - poppler/GfxState.cc | 60 - +++++++++++++++++++++++++++++++++++++++++++++++++++++ - poppler/GfxState.h | 15 ++++++++++++++ - 2 files changed, 75 insertions(+) - -commit d3f04f537fb3e963c149a7e2d8d83c7cb19da8c0 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Jan 23 23:08:46 2009 +0100 - - Do not crash in some PDF we don't parse correctly - - Fixes bug 19702 - - poppler/JBIG2Stream.cc | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -commit 3990c9e52da7b17215506857c792c90a37ebac79 -Author: Koji Otani <sho@bbr.jp> -Date: Mon Jan 19 09:53:00 2009 +0100 - - Fix a problem in cairo backend when using a CMYK Profile - - poppler/GfxState.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 6e51ae7fe8b9dc8ad52b735f2fe056f8ea8f1dcb -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Jan 15 22:33:04 2009 +0100 - - calculate the limit in a way that one does not access an invalid - index of the matrix - - poppler/DCTStream.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit ea2aa7bd1ceb0e3282398f52683e4f52ef401f74 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Jan 15 22:18:48 2009 +0100 - - Forgot my copyrights - - poppler/DCTStream.cc | 2 +- - poppler/DCTStream.h | 2 +- - poppler/Stream.cc | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - -commit d65dd23752ec14635d0d224afa7dd605f98a10a4 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Jan 15 22:17:14 2009 +0100 - - Minor optimizations - - poppler/DCTStream.cc | 17 ++++++++--------- - poppler/DCTStream.h | 3 ++- - poppler/Stream.cc | 3 ++- - 3 files changed, 12 insertions(+), 11 deletions(-) - -commit d3d2910f757dfc3e141aed62aa970136f9d7186f -Author: Pino Toscano <pino@kde.org> -Date: Sun Jan 11 00:40:46 2009 +0100 - - fix a (relatively small) memory leak when asking for a document-level - JS - - poppler/Catalog.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 869584a84eed507775ff1c3183fe484c14b6f77b -Author: Jonathan Kew <jonathan_kew@sil.org> -Date: Sat Jan 10 18:28:47 2009 +0100 - - Add the possibility of setting the datadir on runtime - - poppler/GlobalParams.cc | 27 ++++++++++++++++++++------- - poppler/GlobalParams.h | 5 ++++- - 2 files changed, 24 insertions(+), 8 deletions(-) - -commit cf112dceb1d6653beae73ce2fac6fb5eee48ff33 -Author: Koji Otani <sho@bbr.jp> -Date: Sat Jan 10 18:11:20 2009 +0100 - - Fix some problems with color management in CMYK Color Profile. - - Fixes bug 19483 - - poppler/GfxState.cc | 106 - ++++++++++++++++++++++++++-------------------------- - 1 file changed, 53 insertions(+), 53 deletions(-) - -commit 6dd77338d16f80760ae32ff9f3e2be9768fc0c49 -Author: Pino Toscano <pino@kde.org> -Date: Thu Jan 8 11:49:45 2009 +0100 - - [Qt4] use the cropbox for the annotations coordinates - - Fixes bug #18558. - - qt4/src/poppler-page.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 69c07c031159d36dde52609bffa6d48c3c56cef5 -Author: Pino Toscano <pino@kde.org> -Date: Thu Jan 8 00:59:19 2009 +0100 - - update Poppler copyright to 2009 - - msvc/poppler/poppler-config.h | 2 +- - poppler-config.h.cmake | 2 +- - poppler/poppler-config.h.in | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - -commit 79e0eea85cf063c6323caafbec97f3d71fc04ca2 -Author: Pino Toscano <pino@kde.org> -Date: Thu Jan 8 00:57:03 2009 +0100 - - remove old cmake modules, add a new one - - Makefile.am | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -commit 0e6420ece2d6fcc046d5814b48a2754fb86771e2 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Jan 7 23:33:02 2009 +0100 - - Require cmake 2.6.0, remove two cmake files provided upstream - - CMakeLists.txt | 4 +- - cmake/modules/FindFreetype.cmake | 74 - ----------------------- - cmake/modules/FindPackageHandleStandardArgs.cmake | 58 ------------------ - glib/CMakeLists.txt | 2 +- - 4 files changed, 3 insertions(+), 135 deletions(-) - -commit a69add73bf7bef17c677c735db77934ba67188a5 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Jan 7 19:06:13 2009 +0100 - - Update copyright notices - - poppler/FontInfo.cc | 1 + - poppler/FontInfo.h | 1 + - qt4/src/poppler-document.cc | 2 +- - qt4/src/poppler-fontinfo.cc | 2 +- - qt4/src/poppler-form.cc | 1 + - qt4/src/poppler-form.h | 1 + - qt4/src/poppler-private.h | 2 +- - qt4/src/poppler-qt4.h | 2 +- - 8 files changed, 8 insertions(+), 4 deletions(-) - -commit 18d584158a781fecb4f696b01fb4d17803ce7d7a -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Jan 7 17:55:48 2009 +0100 - - Add lcms option to cmake buildsystem - - CMakeLists.txt | 9 +++++++++ - cmake/modules/FindLCMS.cmake | 37 +++++++++++++++++++++++++++++++++++++ - config.h.cmake | 3 +++ - 3 files changed, 49 insertions(+) - -commit 140b8ed97416f9c2ec02eb749ca45ca50bd651a8 -Author: Koji Otani <sho@bbr.jp> -Date: Wed Jan 7 17:43:44 2009 +0100 - - Add initial support for color management - - configure.ac | 19 ++ - poppler/GfxState.cc | 697 - ++++++++++++++++++++++++++++++++++++++++++++++++---- - poppler/GfxState.h | 74 +++++- - poppler/Makefile.am | 5 + - 4 files changed, 738 insertions(+), 57 deletions(-) - -commit bdc76dc811a6e4d5fd929bbdc8cd3300aeaea31f -Author: Pino Toscano <pino@kde.org> -Date: Tue Jan 6 15:45:37 2009 +0100 - - [Qt4] apidox improvements for the font functions of Document; mark - scanForFonts() as deprecated - - qt4/src/poppler-qt4.h | 22 ++++++++++++++++++---- - 1 file changed, 18 insertions(+), 4 deletions(-) - -commit 6630e715714161cd803fc064f5d3cf880f42b0a5 -Author: Pino Toscano <pino@kde.org> -Date: Tue Jan 6 15:36:19 2009 +0100 - - tell Doxygen to consider Q_DECL_DEPRECATED as empty - - qt4/src/Doxyfile | 1 + - 1 file changed, 1 insertion(+) - -commit d748d430b106580b8be29ca3ec75caf05b55812e -Author: Pino Toscano <pino@kde.org> -Date: Tue Jan 6 15:24:25 2009 +0100 - - [Qt4] Add a FontIterator for iterating through the fonts of the - document, page by page. - - This new iterator class is the new preferred way for getting the - fonts of a document in a page-by-page mode. - * Document::fonts() is adapted to use it, instead of relying on - scanForFonts() - * scanForFonts() is ported to FontIterator, but keeping the old - behaviour ("i can scan the document only once") - * added unit tests for fonts(), scanForFonts() and FontIterator - - qt4/src/poppler-document.cc | 27 +++++--- - qt4/src/poppler-fontinfo.cc | 36 +++++++++++ - qt4/src/poppler-private.h | 27 ++++++-- - qt4/src/poppler-qt4.h | 65 +++++++++++++++++++ - qt4/tests/check_fonts.cpp | 149 - ++++++++++++++++++++++++++++++++++++++++++++ - 5 files changed, 291 insertions(+), 13 deletions(-) - -commit b9804542bb50216786dc11ca16efd84304f4b832 -Author: Pino Toscano <pino@kde.org> -Date: Tue Jan 6 15:16:53 2009 +0100 - - Add the possibility to set the first page to scan. - - The default value is 0 (= first page), so it should be compatible - with any usage so far. - - poppler/FontInfo.cc | 4 ++-- - poppler/FontInfo.h | 2 +- - 2 files changed, 3 insertions(+), 3 deletions(-) - -commit af74fef03bfbd79334da5612c63c7793952542f9 -Author: Warren Toomey <poppler@tuhs.org> -Date: Tue Jan 6 01:36:31 2009 +0100 - - Add forgotten file to let the autotools based system build - - m4/libpng.m4 | 99 - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 99 insertions(+) - -commit ae588500f62bab5666174ff3b1564c414c5a76c5 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Jan 6 01:35:38 2009 +0100 - - Fix the cmake buildsystem - - CMakeLists.txt | 6 ++++++ - config.h.cmake | 3 +++ - utils/CMakeLists.txt | 4 ++++ - 3 files changed, 13 insertions(+) - -commit 940d060a14712c09da427e2fac4ec579f7291b0f -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Jan 6 01:27:06 2009 +0100 - - do not leak fName if fopen fails - - utils/HtmlOutputDev.cc | 3 +++ - 1 file changed, 3 insertions(+) - -commit 7be9198adb940ad7c5fffc6db0158cf7042e1b8f -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Jan 6 01:24:15 2009 +0100 - - Do not leak pgNum and imgnum if fopen fails - - utils/HtmlOutputDev.cc | 16 +++++++++------- - 1 file changed, 9 insertions(+), 7 deletions(-) - -commit dfba6c022b150553cb2b18b027e661b3b4625ce7 -Author: Warren Toomey <poppler@tuhs.org> -Date: Tue Jan 6 01:16:31 2009 +0100 - - Make pdftohtml output png images when the image stream is not a jpeg - - configure.ac | 14 ++++++ - utils/HtmlOutputDev.cc | 126 - ++++++++++++++++++++++++++++++++++++++++++++++--- - utils/HtmlOutputDev.h | 3 +- - utils/Makefile.am | 4 ++ - 4 files changed, 140 insertions(+), 7 deletions(-) - -commit 0963c276ba972a36c2895e4fe1c7475acd489738 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Jan 4 16:54:32 2009 +0100 - - Fix some checked checkboxes not rendering correctly - - If we are forcing ZaDb/ZapfDingbats to correctly draw a checkmark - in the checkbox, but the file does not have such font defined we - need to create a fake one so the system really renders it - Fixes bug 19359 - - poppler/Annot.cc | 49 +++++++++++++++++++++++++++++++++++++++++++++++-- - poppler/Annot.h | 2 ++ - poppler/Gfx.h | 7 ++++--- - 3 files changed, 53 insertions(+), 5 deletions(-) - -commit 46128cf83b322c112eb0c409c20052bdb2ea4a37 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Jan 4 14:21:15 2009 +0100 - - Remove wrong and unused FormWidget(FormWidget *dest) contructor - - poppler/Form.cc | 11 ----------- - poppler/Form.h | 3 +-- - 2 files changed, 1 insertion(+), 13 deletions(-) - -commit 5203aefc41fa47c461812cc46f28281edd226515 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Jan 4 14:03:16 2009 +0100 - - Plug some memory leaks - - poppler/Annot.cc | 5 ++++- - poppler/Form.cc | 4 +++- - 2 files changed, 7 insertions(+), 2 deletions(-) - -commit 5fb7ec7e6af4cfb2b256a5b9b9752e68330b4aec -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Dec 30 23:46:59 2008 +0100 - - If Length2 is zero just write until we find EOF of the stream - - Fixes exporting to PS of the two pdf i have that have fonts with - Length2 set to 0 - - poppler/PSOutputDev.cc | 26 +++++++++++++++++++++----- - 1 file changed, 21 insertions(+), 5 deletions(-) - -commit ca35fdbc7c31dae432d775b6c087a83fa9b897fc -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Dec 30 23:03:57 2008 +0100 - - We need spaces here too to satify other consumer parsers - - poppler/PDFDoc.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 3c07c73e07a9cb59ee4c23ca60d2adce92de45f7 -Author: Pino Toscano <pino@kde.org> -Date: Tue Dec 30 22:21:27 2008 +0100 - - [Qt4-demo] load a document when passed via command line - - qt4/demos/main_viewer.cpp | 4 ++++ - 1 file changed, 4 insertions(+) - -commit aba0aaa896d634a51fbb3a3e6eae411be462f930 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Dec 29 00:31:18 2008 +0100 - - More improvements in document writing - - Dictionary keys are names so need to be sanitized - Add a space after num gen obj - - poppler/PDFDoc.cc | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -commit e5b93a847ae4e20a77fecef0938da4f14dfbe3eb -Author: Hib Eris <hib@hiberis.nl> -Date: Sun Dec 28 22:59:14 2008 +0100 - - Let compiler figure out CDECL - - CDECL is a compiler specific macro to specify C calling convention. - - On Windows, some functions must be forced to use this calling - convention. - To do this, you can use the macro CDECL, which is defined in windef.h. - - Poppler should not try to be smarter than the compiler and try - to guess - the correct definition for CDECL. Instead it should rely on the - definitions in the windef.h file provided by the compiler. - - On Unix, specifying a calling convention is not nescessary, so - CDECL can - be an empty definition. - - poppler-config.h.cmake | 8 ++------ - poppler/poppler-config.h.in | 8 ++------ - 2 files changed, 4 insertions(+), 12 deletions(-) - -commit de70c0aeb37d788f595b0574796844f51ddedec1 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Dec 28 21:21:12 2008 +0100 - - [qt4] improve doc a bit - - qt4/src/poppler-form.h | 2 +- - qt4/src/poppler-qt4.h | 4 ++-- - 2 files changed, 3 insertions(+), 3 deletions(-) - -commit effb32658019e09dc86c017e39154fd554fc94f8 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Dec 28 02:56:30 2008 +0100 - - Form Rects are against the cropbox, not the media box - - Fixes second pdf at kde bug 161327 - - qt4/src/poppler-form.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 0f10561f3b1c90acc030d973399316bfca5f495e -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Dec 28 01:44:25 2008 +0100 - - Fix my last commit, copy&paste is really evil - - goo/GooString.cc | 9 +++++---- - goo/GooString.h | 2 +- - 2 files changed, 6 insertions(+), 5 deletions(-) - -commit 217b46484ff56bfd5906b293ebee70b82cc0263d -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Dec 28 01:29:41 2008 +0100 - - Move PSOutputDev::filterPSName to GooString::sanitizedName so i can - use it from PDFDoc::writeObject - - goo/GooString.cc | 36 ++++++++++++++++++++++++++++++++++++ - goo/GooString.h | 7 +++++++ - poppler/PDFDoc.cc | 7 ++++++- - poppler/PSOutputDev.cc | 49 - +++++++++---------------------------------------- - poppler/PSOutputDev.h | 3 +-- - 5 files changed, 59 insertions(+), 43 deletions(-) - -commit f41fa9ee71aef5539cf9976c79b32bf1713c8167 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Dec 26 22:56:12 2008 +0100 - - Change the overflow check to the same used in gmem.cc, much more - easy to understand - - poppler/XRef.cc | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -commit b8ae7d91dedc9a75200b6050628ec2740af84b98 -Author: Hib Eris <hib@hiberis.nl> -Date: Fri Dec 26 22:28:09 2008 +0100 - - Fix compile warnings on auto imports for mingw32 - - configure.ac | 3 +++ - glib/Makefile.am | 2 +- - glib/demo/Makefile.am | 2 ++ - test/Makefile.am | 2 ++ - utils/Makefile.am | 2 ++ - 5 files changed, 10 insertions(+), 1 deletion(-) - -commit ba47bd2ba05f883306606eda30bff17bd4a8eec6 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Dec 26 19:47:42 2008 +0100 - - BaseFile.h has never been used and it fact it's not part of xpdf - sources - - Fixes bug 19298 - - CMakeLists.txt | 1 - - poppler/BaseFile.h | 82 - ----------------------------------------------------- - poppler/Makefile.am | 1 - - 3 files changed, 84 deletions(-) - -commit 84366d9e63b0d6a5ee1aae2463648cfc2ff5e1b8 -Author: Hib Eris <hib@hiberis.nl> -Date: Wed Dec 24 19:27:19 2008 +0100 - - Let libtool build DLLs on windows too - - configure.ac | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -commit 08cef528f2e51cc62cff4125f179021ad9555317 -Author: Hib Eris <hib@hiberis.nl> -Date: Wed Dec 24 17:48:46 2008 +0100 - - Fix compile warning on string literal format - - test/pdf-inspector.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 0606b4bba8e889204c7b7c9d376f63b659f83a4f -Author: Hib Eris <hib@hiberis.nl> -Date: Wed Dec 24 17:48:10 2008 +0100 - - Fix compile warnings on parentheses and/or - - poppler/CairoOutputDev.cc | 13 +++++++------ - 1 file changed, 7 insertions(+), 6 deletions(-) - -commit eba2232cabd5fb1e177db2a6053f0d1a0aee882b -Author: Hib Eris <hib@hiberis.nl> -Date: Wed Dec 24 17:46:32 2008 +0100 - - Fix some more warnings - - test/gtk-cairo-test.cc | 11 ----------- - test/pdf-inspector.cc | 9 +++++---- - 2 files changed, 5 insertions(+), 15 deletions(-) - -commit c80431eb1626d89e7b615e5a5149d3436b554b66 -Author: Hib Eris <hib@hiberis.nl> -Date: Mon Dec 22 09:28:47 2008 +0100 - - Fix compile warning on format type - - glib/test-poppler-glib.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit fda181c35b7c7500b6d3c6ca9d454addd54929c5 -Author: Pino Toscano <pino@kde.org> -Date: Mon Dec 22 00:53:44 2008 +0100 - - group condition within brackets - - poppler/ArthurOutputDev.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit c1beeecbd6cbf82811d70c75cb24059b4b492abe -Author: Pino Toscano <pino@kde.org> -Date: Mon Dec 22 00:46:49 2008 +0100 - - [demo] use the proper format field for gsize types - - glib/demo/attachments.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit bfb975466f0ff78e9e292b6af7cac66e4c331456 -Merge: 3e278925 ea3546f8 -Author: Pino Toscano <pino@kde.org> -Date: Mon Dec 22 00:29:38 2008 +0100 - - Merge branch 'master' of - ssh://pino@git.freedesktop.org/git/poppler/poppler - -commit 3e2789257f5fc4ae0573a0c62ea380d8e83a5bb5 -Author: Pino Toscano <pino@kde.org> -Date: Mon Dec 22 00:24:23 2008 +0100 - - [Qt] deserialize also the value of 'right' - - qt/poppler-link.cc | 11 ++++++----- - 1 file changed, 6 insertions(+), 5 deletions(-) - -commit 7c053ab7623cea1ac650d3e960d2d91a1ef21557 -Author: Pino Toscano <pino@kde.org> -Date: Mon Dec 22 00:19:02 2008 +0100 - - [Qt] move in a .cc file the implementation of the QString<->GooString - functions and DocumentData::addTocChildren() - - qt/CMakeLists.txt | 1 + - qt/Makefile.am | 1 + - qt/poppler-document.cc | 10 ---- - qt/poppler-page.cc | 1 + - qt/poppler-private.cc | 147 - +++++++++++++++++++++++++++++++++++++++++++++++++ - qt/poppler-private.h | 106 +++-------------------------------- - 6 files changed, 157 insertions(+), 109 deletions(-) - -commit ea3546f84c5335c58cdb2906b1a1a4656be9c8ea -Author: Hib Eris <hib@hiberis.nl> -Date: Sun Dec 21 23:33:49 2008 +0100 - - Fix compile warnings on signed/unsigned comparison - - goo/gfile.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit ca672ae51d2c1fa59a891717b418ba86b5e7345c -Author: Hib Eris <hib@hiberis.nl> -Date: Sun Dec 21 23:33:00 2008 +0100 - - Fix compile warnings on ignored pragma with mingw compiler - - poppler/Gfx.cc | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -commit 86cfe8ab2b4e0b600f3f6682701c2fcfbe5d0ca9 -Author: Hib Eris <hib@hiberis.nl> -Date: Sun Dec 21 23:08:56 2008 +0100 - - Fix compile warnings on signed/unsigned comparison - - poppler/GfxFont.cc | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -commit e34af7ffe0a4024e2eb39314bdb09eb9a662e53e -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Dec 21 22:16:39 2008 +0100 - - Update copyright of last commits - - poppler/TextOutputDev.cc | 1 + - poppler/TextOutputDev.h | 2 +- - qt4/src/poppler-page.cc | 1 + - 3 files changed, 3 insertions(+), 1 deletion(-) - -commit f6d84dcfc9cc587c7408af79b1ee7658d456f8d8 -Author: Hib Eris <hib@hiberis.nl> -Date: Sun Dec 21 22:09:00 2008 +0100 - - Fix compile warning to suggest parentheses and/or - - poppler/TextOutputDev.cc | 14 ++++++++------ - 1 file changed, 8 insertions(+), 6 deletions(-) - -commit 15205403eaa95d6fba0e36983de993877dd3a983 -Author: Hib Eris <hib@hiberis.nl> -Date: Sun Dec 21 21:59:45 2008 +0100 - - Fix warning to suggest parentheses inside shift - - poppler/PSOutputDev.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit cc24f37e582bfc0069faf286da97a48fe4794db1 -Author: Hib Eris <hib@hiberis.nl> -Date: Sun Dec 21 21:35:29 2008 +0100 - - Fix compile warning on ambiguous else - - test/perf-test.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit a8cc4ad8c2da804f25db8cca1c85433d5a63307c -Author: Hib Eris <hib@hiberis.nl> -Date: Sun Dec 21 21:34:28 2008 +0100 - - Fix compile warning on format not a string literal - - test/perf-test.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 3cbbf8226730aa7ee6273e154e4a9d58670a3cda -Author: Hib Eris <hib@hiberis.nl> -Date: Sun Dec 21 21:30:54 2008 +0100 - - Fix compile warning about uninitialized variable - - poppler/ABWOutputDev.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit f675916277cb76cd1293225a1271f835a02148fb -Author: Pino Toscano <pino@kde.org> -Date: Sat Dec 20 23:23:10 2008 +0100 - - reset to NULL after being deleted - - found with poppler-qt4 unit tests =) - - poppler/TextOutputDev.cc | 1 + - 1 file changed, 1 insertion(+) - -commit c976770c64e4c991fff27e413414473583b6fd86 -Author: Pino Toscano <pino@kde.org> -Date: Sat Dec 20 22:25:55 2008 +0100 - - [Qt4] use QHash instead of QMap where applicable - - using a hash table instead of a map mapes lookup faster; - in these cases we don't need the sorting a map gives - - qt4/src/poppler-page.cc | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -commit 944f6049a50eb3be9fb29174d67adc4ad1d0b9fe -Author: Pino Toscano <pino@kde.org> -Date: Sat Dec 20 20:13:43 2008 +0100 - - add find.c and text.c - - glib/demo/CMakeLists.txt | 2 ++ - 1 file changed, 2 insertions(+) - -commit ba91b889c3b50239e339938f3c9d31fffcd87d44 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Dec 20 19:29:40 2008 +0100 - - Make destructor private in TextPage - - poppler/TextOutputDev.h | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -commit 0da16537aa83f6ed6d8895c7e54266263a71c1cf -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri Dec 19 19:08:21 2008 +0100 - - Refactor actual text code adding a new ActualText class - - It's used by both Text and Cairo ouput devices avoiding duplicated - code - in such classes. - - poppler/CairoOutputDev.cc | 108 +++--------------------- - poppler/CairoOutputDev.h | 7 +- - poppler/TextOutputDev.cc | 206 - ++++++++++++++++++++++++++-------------------- - poppler/TextOutputDev.h | 34 ++++++-- - 4 files changed, 160 insertions(+), 195 deletions(-) - -commit 0f8ab301c633133eea3dbd4f2254f31c50e3c4a9 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Dec 14 13:12:34 2008 +0100 - - [glib-demo] Add find demo - - glib/demo/Makefile.am | 2 + - glib/demo/find.c | 282 - ++++++++++++++++++++++++++++++++++++++++++++++++++ - glib/demo/find.h | 31 ++++++ - glib/demo/main.c | 4 +- - 4 files changed, 318 insertions(+), 1 deletion(-) - -commit 88df9e9aa9adb53f0a9714ea404d46f111495df3 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Dec 14 11:54:35 2008 +0100 - - [glib-demo] Add Text demo - - glib/demo/Makefile.am | 2 + - glib/demo/main.c | 4 +- - glib/demo/text.c | 175 - ++++++++++++++++++++++++++++++++++++++++++++++++++ - glib/demo/text.h | 31 +++++++++ - 4 files changed, 211 insertions(+), 1 deletion(-) - -commit 5b0f2355d55a5104820fd0bf16b4e76b25959de4 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Dec 14 11:49:00 2008 +0100 - - [glib] Use TextPage instead of TextOutputDev when cairo is enabled - - glib/poppler-page.cc | 148 - ++++++++++++++++++++++++++++++++++--------------- - glib/poppler-private.h | 4 ++ - 2 files changed, 107 insertions(+), 45 deletions(-) - -commit 3ced71fb68d62308db7b9535367eafefb55d1cde -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Dec 14 11:18:00 2008 +0100 - - Add optionally text support to CairoOutputDev - - If a TextPage is set, it'll be used when rendering so that we - don't need - to use TextOutputDev and render again. - - poppler/CairoOutputDev.cc | 144 - ++++++++++++++++++++++++++++++++++++++++++++-- - poppler/CairoOutputDev.h | 19 +++++- - 2 files changed, 155 insertions(+), 8 deletions(-) - -commit 0bdad35cc4cfdb8da5acaf44678920b7a0025f99 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Dec 14 11:14:12 2008 +0100 - - Add refcount support to TextPage - - poppler/TextOutputDev.cc | 12 +++++++++++- - poppler/TextOutputDev.h | 5 +++++ - qt4/src/poppler-page.cc | 2 +- - 3 files changed, 17 insertions(+), 2 deletions(-) - -commit f86514c3fbc867fc6457feacba23451e89993524 -Author: Koji Otani <sho@bbr.jp> -Date: Wed Dec 17 00:36:39 2008 +0100 - - Fix wrong PS generation when a large image is in Patterns - - Bug 18908 - - poppler/PSOutputDev.cc | 114 - +++++++++++++++++++++++++++++++------------------ - 1 file changed, 72 insertions(+), 42 deletions(-) - -commit fc395eb90b418e43453acefb42cd04baf0b7ad40 -Author: Richard Airlie <richard.airlie@maglabs.net> -Date: Tue Dec 16 21:11:53 2008 +0100 - - Allow the use of cropbox in pdftoppm - - utils/pdftoppm.cc | 16 +++++++++++++--- - 1 file changed, 13 insertions(+), 3 deletions(-) - -commit 80f415176952635a485356cf36048eee53396c25 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Dec 16 20:37:39 2008 +0100 - - Make destructors private/protected since you are not supposed to - use them - - poppler/GfxFont.cc | 2 +- - poppler/GfxFont.h | 11 +++++------ - 2 files changed, 6 insertions(+), 7 deletions(-) - -commit dbcebda953cb36a45a125aada68e85249fb73f43 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Dec 15 20:10:31 2008 +0100 - - Do not leak on AnnotScreen destructor - - Fixes bug 19095 - - poppler/Annot.cc | 4 ++++ - 1 file changed, 4 insertions(+) - -commit aaeb0d137232bf1cb11dc5e37b8b45b50c6f9c6a -Author: Pino Toscano <pino@kde.org> -Date: Fri Dec 12 00:43:19 2008 +0100 - - update the xpdf headers installation - - CMakeLists.txt | 32 +++++++++++++++++++++----------- - 1 file changed, 21 insertions(+), 11 deletions(-) - -commit 7c6527fa05389f705872aaaaff12e739b5d1577e -Author: Pino Toscano <pino@kde.org> -Date: Fri Dec 12 00:41:21 2008 +0100 - - don't install Function.cc, as it is not an header - - poppler/Makefile.am | 1 - - 1 file changed, 1 deletion(-) - -commit 0179e21b128ffccb5afd13203137ab8435197609 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Dec 12 00:16:38 2008 +0100 - - Be more helpful with bad boys that want to use poppler core directly - - fofi/Makefile.am | 10 ++++++++++ - splash/SplashClip.h | 2 +- - splash/SplashPath.h | 2 +- - splash/SplashXPath.h | 2 +- - 4 files changed, 13 insertions(+), 3 deletions(-) - -commit 401632e4eeb4b10b1183a820f32461da77e8e4f2 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Dec 12 00:14:04 2008 +0100 - - Try harder to look for openjpeg - - cmake/modules/FindLIBOPENJPEG.cmake | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit ab539f46089702f60b96b1ba2b2bc1544173c264 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Dec 11 23:15:45 2008 +0100 - - Fix crash when reading outline - - Fixes bug 19024. Last as reference is required if the item has - children (Table 8.4) so if there is no last reference, don't try to - read children. - - poppler/Outline.cc | 4 ++++ - 1 file changed, 4 insertions(+) - -commit c9a755f9fd14511f43a2ca7fcda36bdd64bb1d87 -Author: Ilya Gorenbein <igorenbein@finjan.com> -Date: Sun Dec 7 17:59:19 2008 +0100 - - Fix memory leak - - Bug 18924 - - poppler/Page.cc | 4 ++++ - 1 file changed, 4 insertions(+) - -commit 4cd364c179ae91ed383a8237ba1ad263952fd7aa -Author: Pino Toscano <pino@kde.org> -Date: Sun Nov 30 16:57:52 2008 +0100 - - add my copyright here - - qt4/src/poppler-private.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 6b1676deb773675d90469adc84c3de8dcdaf174c -Author: Pino Toscano <pino@kde.org> -Date: Sun Nov 30 16:56:43 2008 +0100 - - [Qt4] support URI actions for TOC items - - qt4/src/poppler-private.cc | 5 +++++ - 1 file changed, 5 insertions(+) - -commit b5cd58b5565055fd0c13771461245ddcd80edfcf -Author: Pino Toscano <pino@kde.org> -Date: Sun Nov 30 16:34:57 2008 +0100 - - extract the LinkAction "serialization" in an own function, and make - it more safe - - qt4/src/poppler-private.cc | 85 - ++++++++++++++++++++++++++++++++-------------- - 1 file changed, 59 insertions(+), 26 deletions(-) - -commit ee191363e22940ae7b06945e68c4738b17c78348 -Author: Pino Toscano <pino@kde.org> -Date: Sun Nov 30 16:17:32 2008 +0100 - - move the addTocChildren() implementation in the cpp - - qt4/src/poppler-form.cc | 1 + - qt4/src/poppler-page.cc | 1 + - qt4/src/poppler-private.cc | 65 - ++++++++++++++++++++++++++++++++++++++++++++++ - qt4/src/poppler-private.h | 64 - ++------------------------------------------- - 4 files changed, 69 insertions(+), 62 deletions(-) - -commit f8eaabf1aa7e384619129a7509be85d0c3bfb825 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Nov 30 13:33:12 2008 +0100 - - Update copyrights of the last commits - - poppler/TextOutputDev.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 5f4fedfae6098e25644ffe5d4b1ed0bac043841d -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Nov 29 19:51:27 2008 +0100 - - Use the Length specified in the Stream as initial bufSize - - This is a optimization to save a few reallocations, if the Length - value is incorrect it will still work - - poppler/JPEG2000Stream.cc | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - -commit 12f6d6ba2052fbdc8ea4ba7c7c9277e75bf170a5 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Nov 23 18:20:14 2008 +0100 - - Fix a crash when the second argument of opMarkPoint is not a - dictionary - - According to the spec "If any of the values are indirect references to - objects outside the content stream, the property list dictionary must - instead be defined as a named resource. - - poppler/Gfx.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 817e123a28e9f6b7e5be23f7ac2ba3bcec5e3f3f -Author: Adrian Johnson <ajohnson@redneon.com> -Date: Sat Nov 22 21:48:37 2008 +1030 - - Don't compare print flag for non Type 3 fonts in cairo font cache - - poppler/CairoFontEngine.cc | 7 ++++++- - poppler/CairoFontEngine.h | 4 +++- - 2 files changed, 9 insertions(+), 2 deletions(-) - -commit 68f8ade28764855d4f663607c50c8202b1268296 -Author: Albert Astals Cid <tsdgeos@samsung.localdomain> -Date: Sun Nov 23 10:54:46 2008 +0100 - - Compile with -pedantic - - Thanks to Bernard Leak for notifying - - test/pdf-inspector.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 4a4fa7ed44a87e47a6078a1f7bb6f41071672ea7 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Nov 18 20:11:07 2008 +0100 - - Fix a crash when selecting text in word mode - - poppler/TextOutputDev.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit a6f5032ab0d6edbf3879f39efff7916b1f7233da -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Nov 16 18:24:06 2008 +0100 - - optContentConfig is not actually stored in PDFDoc but in Catalog - - poppler/PDFDoc.h | 1 - - 1 file changed, 1 deletion(-) - -commit b843ac34c6c4ca1580f99fa2220c59dfcd91f026 -Author: Pino Toscano <pino@kde.org> -Date: Sat Nov 15 14:49:02 2008 +0100 - - [Qt4] deserialize the value of the 'right' coordinate, too - - qt4/src/poppler-link.cc | 11 ++++++----- - 1 file changed, 6 insertions(+), 5 deletions(-) - -commit 03061fdae49842556c9ff48e61914fc88502e1d8 -Author: Tim Mooney <enchanter@users.sourceforge.net> -Date: Thu Nov 13 22:32:22 2008 +0100 - - Fix build on Solaris 10 + Sun Studio 12. - - Fixes bug 17496 - - configure.ac | 14 ++++++++++++++ - test/Makefile.am | 6 ++++-- - 2 files changed, 18 insertions(+), 2 deletions(-) - -commit 17b18be4fd25f2ca2b4ed7382d9fda50410c44f1 -Author: Adrian Johnson <ajohnson@redneon.com> -Date: Wed Nov 12 20:40:57 2008 +1030 - - Ensure cairo font matrix is invertable - - Fixes bugs #18254 and #18429 - - poppler/CairoOutputDev.cc | 15 ++++++++++++++- - 1 file changed, 14 insertions(+), 1 deletion(-) - -commit e2257e6916cd1067d43db9ed45f944413c61ed64 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Nov 9 22:44:48 2008 +0100 - - Update copyrights of the last commits - - poppler/CairoFontEngine.cc | 1 + - poppler/CairoFontEngine.h | 1 + - poppler/Form.cc | 2 +- - poppler/Gfx.h | 1 + - poppler/OptionalContent.h | 1 + - qt4/src/poppler-optcontent.cc | 1 + - 6 files changed, 6 insertions(+), 1 deletion(-) - -commit 069f8ad9453e612e907b561aa50983c34400193d -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Nov 9 20:36:06 2008 +0100 - - MakeItBuild - - glib/CMakeLists.txt | 1 + - glib/demo/CMakeLists.txt | 1 + - 2 files changed, 2 insertions(+) - -commit 04025c4f65bbb7e4330f6d17d917a035c0906f3d -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Nov 9 17:03:20 2008 +0100 - - Fix a crash when initializing an Annot with a null catalog - - Forms crate a temp annot just to get the font size of the form field - passing a NULL catalog. - - poppler/Annot.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 471255c5a3850984997d91c7850759eb0c7e8a9c -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Nov 8 20:58:57 2008 +0100 - - [glib-demo] Add Optional Content demo - - glib/demo/Makefile.am | 2 + - glib/demo/layers.c | 511 - ++++++++++++++++++++++++++++++++++++++++++++++++++ - glib/demo/layers.h | 31 +++ - glib/demo/main.c | 4 +- - 4 files changed, 547 insertions(+), 1 deletion(-) - -commit 7363c25e1d83332932d9b4fe16d7fb4e364da628 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Oct 26 19:47:35 2008 +0100 - - [glib] Add Optional Content support - - glib/Makefile.am | 2 + - glib/poppler-document.cc | 377 - ++++++++++++++++++++++++++++++++++++++++++++++ - glib/poppler-document.h | 12 ++ - glib/poppler-layer.cc | 201 ++++++++++++++++++++++++ - glib/poppler-layer.h | 43 ++++++ - glib/poppler-private.h | 21 +++ - glib/poppler.h | 3 + - glib/test-poppler-glib.cc | 52 ++++++- - 8 files changed, 710 insertions(+), 1 deletion(-) - -commit c674566f458b54097f21aae0d4bf8637146565c5 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Oct 26 19:42:53 2008 +0100 - - Fix memory leaks in OptionalContent - - poppler/OptionalContent.cc | 13 +++---------- - poppler/OptionalContent.h | 10 ++++++---- - 2 files changed, 9 insertions(+), 14 deletions(-) - -commit 06ca313b8ecb8abb8dec3b418d118525b7bb0fdf -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Oct 26 19:11:45 2008 +0100 - - Check annotation optional content properties before drawing it - - poppler/Annot.cc | 20 ++++++++++++-------- - poppler/Annot.h | 4 ++-- - 2 files changed, 14 insertions(+), 10 deletions(-) - -commit a6d58927b048aa043cb6b6ed3ee9aeb213578924 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Nov 8 20:50:40 2008 +0100 - - Do not show hidden optional content - - Before any draw operation we first check whether we are inside an - optional marked content element that is currently hidden. - - poppler/Gfx.cc | 113 - ++++++++++++++++++++++++++++++++++++++++----------------- - poppler/Gfx.h | 7 +++- - 2 files changed, 84 insertions(+), 36 deletions(-) - -commit 5f168f991477e291290350a28f4a60a565e187b9 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Oct 20 17:56:11 2008 +0200 - - [glib] Show action titles when printing the index in test program - - glib/test-poppler-glib.cc | 13 ++++++++----- - 1 file changed, 8 insertions(+), 5 deletions(-) - -commit a906d12e16748d9a40c0db4043a576fd3d004341 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Nov 8 20:20:00 2008 +0100 - - Minor code cleanup and consistency issues - - poppler/OptionalContent.cc | 22 +++++++++++----------- - poppler/OptionalContent.h | 8 ++++---- - qt4/src/poppler-optcontent.cc | 6 +++--- - qt4/tests/check_optcontent.cpp | 8 ++++---- - 4 files changed, 22 insertions(+), 22 deletions(-) - -commit e73c2ce906b7e1f06d641f7e0733aad6336b4091 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Oct 19 12:44:13 2008 +0200 - - Delete the optContent object if it's invalid - - poppler/Catalog.cc | 4 ++++ - poppler/OptionalContent.cc | 3 +++ - poppler/OptionalContent.h | 5 +++++ - 3 files changed, 12 insertions(+) - -commit 2900e7e4c920d735d5a727e9e39f71df97bd7b93 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Nov 8 18:12:47 2008 +0100 - - A new cairo is needed - - CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit aaaecd2e86769d3a99e21577448a193711985958 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Nov 5 22:47:30 2008 +0100 - - Do not abort if indexHighA is 'invalid', move it to the closest - valid value and try with it - - For the bug 18374 it works and does not seem a security problem - - poppler/GfxState.cc | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -commit 82f4228a50efe6447c68f7f6d34a7805b7e4b75e -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Nov 5 20:57:17 2008 +0100 - - Add myself here - - qt4/demos/viewer.cpp | 1 + - 1 file changed, 1 insertion(+) - -commit 8df7d83439f0e9ab200840f912f1c08bbf44bd6e -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Nov 5 20:49:01 2008 +0100 - - [Qt4Demo] Fix leak - - qt4/demos/viewer.cpp | 1 + - 1 file changed, 1 insertion(+) - -commit d3c424e0362f53bda5c4e2e415823d78ace76253 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Nov 5 20:14:17 2008 +0100 - - Rename i to j so that code is more clear by not shadowing the - function parameter - - poppler/Catalog.cc | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -commit 9d12de9b59de4336eabb423f7bf0363b6a35e2a8 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Nov 5 20:00:01 2008 +0100 - - Fix crash in case indices is NULL - - Putting more than one "logical line" per "real line" is evil, we - think if will group it, but does not - - poppler/UnicodeTypeTable.cc | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -commit fc61dad9daa15f83802ffa5c3cd9b59d80bb310b -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Nov 5 19:52:00 2008 +0100 - - [Qt] Fix leak - - qt/poppler-link.cc | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -commit 981fb857b0afb1cda7836744dcf37906285512b4 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Nov 5 19:49:18 2008 +0100 - - [Qt] Fix memory leak - - qt/poppler-document.cc | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -commit e925e92d5cbfc009c138ece117227a3b0894ead6 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Nov 5 19:44:40 2008 +0100 - - Do not leak uBuf in the error case - - poppler/CharCodeToUnicode.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 0741a402632ec5a8641ff11707142bf2731c1833 -Author: Adrian Johnson <ajohnson@redneon.com> -Date: Sat Nov 1 22:27:48 2008 +1030 - - Restore the cairo Type3 font image prescaling funtionality - - poppler/CairoFontEngine.cc | 49 - +++++++++++++++++++++++++++------------------- - poppler/CairoFontEngine.h | 20 +++++++++++-------- - poppler/CairoOutputDev.cc | 2 +- - poppler/CairoOutputDev.h | 2 +- - 4 files changed, 43 insertions(+), 30 deletions(-) - -commit 91a7c3fdd44f30b0b50ed05a3313bbb1b5c86e71 -Author: Adrian Johnson <ajohnson@redneon.com> -Date: Sat Nov 1 20:57:24 2008 +1030 - - Remove cairo font matrix y flip when inside a Type 3 char - - Not sure why this was previously required but it now produces - incorrect results. - - poppler/CairoOutputDev.cc | 5 ----- - 1 file changed, 5 deletions(-) - -commit 3bf4d7d75b455a9a0b5ee3a8c78b218e5af5185a -Author: Adrian Johnson <ajohnson@redneon.com> -Date: Sat Nov 1 20:50:07 2008 +1030 - - Transform the glyph advance by the font matrix - - poppler/CairoFontEngine.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 4aa32bad61d008a854fdc9e902d6834bb1687d7e -Author: Adrian Johnson <ajohnson@redneon.com> -Date: Sat Nov 1 20:49:04 2008 +1030 - - Use the font BBox, not the font matrix to set the Gfx BBox - - poppler/CairoFontEngine.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 987955440c7711f440c3d2b5cc8c05ec07228a77 -Author: Adrian Johnson <ajohnson@redneon.com> -Date: Sat Nov 1 20:47:05 2008 +1030 - - Ensure both the font matrix and y-axis flip are in the matrix - - we use for transforming the glyph metrics. - - poppler/CairoFontEngine.cc | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit 5c051aa117477cba5d350adfc539acb4b5f2a56a -Author: Adrian Johnson <ajohnson@redneon.com> -Date: Sat Nov 1 01:59:07 2008 +1030 - - Require cairo 1.8.2 for user-font support - - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit a3edfa30680864b95a5196c5619846de42980857 -Author: Adrian Johnson <ajohnson@redneon.com> -Date: Sat Nov 1 01:57:32 2008 +1030 - - Implement Type 3 fonts in cairo backend using cairo user-fonts - - poppler/CairoFontEngine.cc | 174 - +++++++++++++++++++++++++++++++++++++++++++-- - poppler/CairoFontEngine.h | 18 +++++ - poppler/CairoOutputDev.cc | 9 ++- - poppler/CairoOutputDev.h | 4 +- - 4 files changed, 194 insertions(+), 11 deletions(-) - -commit feab1e982a2ee39bb372d593633a06b6a499822f -Author: Adrian Johnson <ajohnson@redneon.com> -Date: Sat Nov 1 01:21:39 2008 +1030 - - Add CairoOutputDev functions for getting Type 3 glyph metrics - - poppler/CairoOutputDev.cc | 10 ++++++++++ - poppler/CairoOutputDev.h | 7 +++++++ - 2 files changed, 17 insertions(+) - -commit a75efe208d899d4a23d5e2fcef200e4225721636 -Author: Adrian Johnson <ajohnson@redneon.com> -Date: Sat Nov 1 00:26:40 2008 +1030 - - Make the catalog available to CairoFontEngine - - glib/poppler-document.cc | 3 ++- - poppler/CairoFontEngine.cc | 2 +- - poppler/CairoFontEngine.h | 3 ++- - poppler/CairoOutputDev.cc | 7 +++++-- - poppler/CairoOutputDev.h | 3 ++- - test/pdf-inspector.cc | 2 +- - 6 files changed, 13 insertions(+), 7 deletions(-) - -commit 941d3976c496b75a3c5a9d19b80044fc2b57bd98 -Author: Adrian Johnson <ajohnson@redneon.com> -Date: Fri Oct 31 22:44:41 2008 +1030 - - Allow multiple instances of CairoOutputDev to be created - - for the same document that shares the same CairoFontEngine. - - poppler/CairoOutputDev.cc | 16 +++++++++++----- - poppler/CairoOutputDev.h | 4 +++- - 2 files changed, 14 insertions(+), 6 deletions(-) - -commit 94cff513d8589f51b243fcb078f82cb931bb6d35 -Author: Adrian Johnson <ajohnson@redneon.com> -Date: Fri Oct 31 21:11:01 2008 +1030 - - Use correct return type in _ft_new_face - - poppler/CairoFontEngine.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 0b5ee897a24ce1edfca19a3b843f9b7ee7026d07 -Author: Adrian Johnson <ajohnson@redneon.com> -Date: Fri Oct 31 20:55:14 2008 +1030 - - Refactor CairoFont - - Create a CairoFreeType subclass and move the FreeType specific code - into it. - - poppler/CairoFontEngine.cc | 197 - +++++++++++++++++++++++++-------------------- - poppler/CairoFontEngine.h | 26 ++++-- - 2 files changed, 131 insertions(+), 92 deletions(-) - -commit a5865dae5b414de5f6dbda2a512101050c374e06 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Oct 28 10:30:59 2008 +0100 - - [glib] Add DISABLE_SINGLE_INCLUDES flags and fix glib-demo - - configure.ac | 4 ++++ - glib/Makefile.am | 3 ++- - glib/demo/Makefile.am | 3 ++- - glib/demo/annots.h | 2 +- - glib/demo/attachments.h | 2 +- - glib/demo/fonts.h | 2 +- - glib/demo/forms.h | 2 +- - glib/demo/images.h | 2 +- - glib/demo/info.h | 2 +- - glib/demo/links.h | 2 +- - glib/demo/outline.h | 2 +- - glib/demo/page.h | 2 +- - glib/demo/render.h | 2 +- - glib/demo/transitions.h | 2 +- - glib/demo/utils.h | 2 +- - 15 files changed, 20 insertions(+), 14 deletions(-) - -commit e07bfb54b77430e10e50c33151cf0afc9854006c -Author: Christian Persch <chpe@gnome.org> -Date: Tue Oct 28 10:29:51 2008 +0100 - - [glib] Fix build when compiling with GTK_DISABLE_SINGLE_INCLUDES - - glib/poppler-page.h | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -commit a84d272ffd2b593ac98148e71b83fba299c60fea -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Oct 28 10:01:00 2008 +0100 - - [glib] Add disable deprecated compile flags and fix compile warnings - - configure.ac | 6 ++++++ - glib/Makefile.am | 3 ++- - glib/demo/Makefile.am | 4 +++- - glib/demo/attachments.c | 4 ++-- - 4 files changed, 13 insertions(+), 4 deletions(-) - -commit 43f2b84a81625abee84c93cdced7fb92c99cd944 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Oct 21 23:00:55 2008 +0200 - - [Qt4] Small docu improvement - - qt4/src/poppler-qt4.h | 3 +++ - 1 file changed, 3 insertions(+) - -commit 00f9995b4960575cd1f392474c585f2140c8e587 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Oct 12 14:20:01 2008 +0200 - - Do not crash if there is not font - - See bug 18023 for more info - - poppler/TextOutputDev.cc | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -commit 084cc4335cfe2c0e66219eba4c1177ee7ff018c5 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Oct 10 23:15:35 2008 +0200 - - obj4 should be the index 1 on the Array, not the 0, that's already - obj3 - - poppler/Form.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit d7442c90206d4b7a8ebc58f995647eb87ac35f42 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Oct 9 22:53:00 2008 +0200 - - If Name is a Ref we want to get the String it references, not the Ref - - poppler/OptionalContent.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 93f8dd9e837557bbfc0f058a664c356e3d6e82c0 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Oct 9 21:28:27 2008 +0200 - - Poppler 0.10.0 - - CMakeLists.txt | 2 +- - NEWS | 16 ++++++++++++++++ - configure.ac | 2 +- - msvc/config.h | 6 +++--- - qt4/src/Doxyfile | 2 +- - 5 files changed, 22 insertions(+), 6 deletions(-) - -commit cdd9bf016de0d3f96b1d5e304c9d02f2bf71ff18 -Author: Mark Kaplan <mkaplan@finjan.com> -Date: Wed Oct 8 22:29:11 2008 +0200 - - Initialize properly OptionalContentGroup::m_name - - poppler/OptionalContent.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit c7b87f3b8cbbcca29a1974debc2233f621a2e33b -Author: Carlo Bramini <carlo.bramix@libero.it> -Date: Mon Oct 6 19:32:27 2008 +0200 - - Fix link on Mingw+Msys - - test/Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit e92255296511cae9cbbac8de800d8b26e5f681f1 -Author: Pino Toscano <pino@kde.org> -Date: Sun Oct 5 15:57:06 2008 +0200 - - [Qt4] when the PDF exporting fails, delete the file if it was - created by - the (failed) exporting - - qt4/src/poppler-pdf-converter.cc | 13 +++++++++++++ - 1 file changed, 13 insertions(+) - -commit 360f470b852e37d400949343763a18bf598820e8 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Oct 4 20:04:44 2008 +0200 - - Remove unused var - - poppler/Annot.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit df7317f1320513b4f66cb6618d753b82042671f5 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Oct 4 19:48:57 2008 +0200 - - free the object - - poppler/PDFDoc.cc | 4 ++++ - 1 file changed, 4 insertions(+) - -commit 9946d9af9dd5d5b96d5c777413a3e253dfd1f291 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Oct 4 19:39:46 2008 +0200 - - If we try saving a document that was encrypted, we break everything, - so just fail early - - poppler/PDFDoc.cc | 7 +++++++ - 1 file changed, 7 insertions(+) - -commit 108959432af7714cb8ffe42d98d40c97f936a2e6 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Oct 4 19:39:24 2008 +0200 - - Correctly return wheter it was saved or not - - qt4/src/poppler-pdf-converter.cc | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -commit 4c6cb1c204d782e2ac2113b57f6d372b4716017d -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Oct 4 01:46:58 2008 +0200 - - Remove spurious // - - fofi/FoFiType1.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit e8e7809ab4b115cbe67251da12989fc024912514 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Oct 4 01:43:02 2008 +0200 - - There are files that have more than one encoding definition per line, - make them work - - Fixes bug 17018, while at it, i've added some comments and some - error() to make things a bit clearer - - fofi/FoFiType1.cc | 28 ++++++++++++++++++++++++---- - 1 file changed, 24 insertions(+), 4 deletions(-) - -commit 7604e025038fee24c2cb3001f2100d5d1e48efe1 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Oct 4 00:35:46 2008 +0200 - - Fix Poppler::Link::linkArea for rotated pages - - we suck :-( Fixes kde bug 172105 - - qt4/src/poppler-link-extractor.cc | 3 +++ - 1 file changed, 3 insertions(+) - -commit 450b21e4528a8e890d3dda37ecb0a68602f8efaa -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Oct 1 00:46:29 2008 +0200 - - I've changed these files this year too, update copyright - - goo/gmem.cc | 2 +- - goo/gmem.h | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit 98310ca24841789cf53b10d34e271ceb4e054001 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Sep 30 23:59:43 2008 +0200 - - Fix StitchingFunction(StitchingFunction *func) and - GfxAxialShading(GfxAxialShading *shading) - - Fixes bug 17852 - - poppler/Function.cc | 2 ++ - poppler/GfxState.cc | 2 +- - 2 files changed, 3 insertions(+), 1 deletion(-) - -commit d12f5f4395eb18f8d29182e24acddd3e2b5cfe88 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Sep 30 23:20:26 2008 +0200 - - 0.9.3 - - CMakeLists.txt | 2 +- - NEWS | 17 +++++++++++++++++ - configure.ac | 2 +- - msvc/config.h | 6 +++--- - qt4/src/Doxyfile | 2 +- - 5 files changed, 23 insertions(+), 6 deletions(-) - -commit d61e464754521555a06ed0901955f49be4def29a -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Sep 30 19:26:17 2008 +0200 - - Timothy also agreed, now Ed Catmur is the last one missing to answer - - utils/ImageOutputDev.cc | 3 +++ - utils/ImageOutputDev.h | 3 +++ - 2 files changed, 6 insertions(+) - -commit 3225f54fea7cbb6b25d7223268cdeccfdd823375 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Sep 30 00:27:49 2008 +0200 - - And Marco said yes to GPLv2+ - - Only Timothy Lee and Ed Catmur left :-) - - poppler/Catalog.cc | 3 +++ - poppler/Outline.cc | 3 +++ - poppler/Outline.h | 3 +++ - splash/Splash.cc | 3 +++ - splash/Splash.h | 3 +++ - 5 files changed, 15 insertions(+) - -commit 268d803c9dd67b7f78f8dcdc3c7653c8b2c2d08f -Author: Warren Toomey <wkt@tuhs.org> -Date: Mon Sep 29 21:14:40 2008 +0200 - - Let HmtlOutputDev process images - - utils/HtmlOutputDev.h | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit a29984ab777c64a1cb286b667a6a91ad9b191f40 -Merge: f399afe6 68658721 -Author: Pino Toscano <pino@kde.org> -Date: Sun Sep 28 23:39:08 2008 +0200 - - Merge branch 'master' of - ssh://pino@git.freedesktop.org/git/poppler/poppler - -commit f399afe6f6b9c250327d0e4c5b3f2839889d7095 -Author: Pino Toscano <pino@kde.org> -Date: Sun Sep 28 23:38:34 2008 +0200 - - [Qt4] various apidox improvements - - qt4/src/Mainpage.dox | 10 +--- - qt4/src/poppler-link.h | 92 +++++++++++++++++++++++++++++++++---- - qt4/src/poppler-qt4.h | 121 - +++++++++++++++++++++++++++++++++---------------- - 3 files changed, 168 insertions(+), 55 deletions(-) - -commit 68658721583b05ebacb1165ac36e91d49735bbd9 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Sep 28 19:29:06 2008 +0200 - - If tables is null, don't try to write to file as it'll crash, fixes - crash on 17811 when using cairooutputdev - - fofi/FoFiTrueType.cc | 4 ++++ - 1 file changed, 4 insertions(+) - -commit 3cb5b7fc5ae168ef58fd1905f61c1b9abe6cb86c -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Sep 28 19:25:53 2008 +0200 - - Introduce greallocn_checkoverflow and use it in FoFiTrueType::parse - - Fixes the other part of bug 17811 - - fofi/FoFiTrueType.cc | 4 ++-- - goo/gmem.cc | 21 +++++++++++++++++++++ - goo/gmem.h | 1 + - 3 files changed, 24 insertions(+), 2 deletions(-) - -commit aa7ef03af49f74ed558dcbab8ad4c594bb2b7d53 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Sep 28 19:24:43 2008 +0200 - - If libjpeg tells us to abort, let's abort :D - - Fixes part of bug 17811 - - poppler/DCTStream.cc | 1 + - 1 file changed, 1 insertion(+) - -commit e2461c9aa4d74b5511621d7222979948e31541ad -Author: Pino Toscano <pino@kde.org> -Date: Sun Sep 28 18:07:25 2008 +0200 - - [Qt4] Activate the 'printing' flag by default in the PSConverter. - - qt4/src/poppler-ps-converter.cc | 2 +- - qt4/src/poppler-qt4.h | 2 ++ - 2 files changed, 3 insertions(+), 1 deletion(-) - -commit 957d7acb66635e9748c6bc7a31cdbbcbb8da9011 -Author: Carlo Bramini <carlo.bramix@libero.it> -Date: Sat Sep 27 17:23:20 2008 +0200 - - Misc mingw fixes - - configure.ac | 2 +- - glib/Makefile.am | 2 +- - glib/demo/info.cc | 1 + - m4/libjpeg.m4 | 2 +- - 4 files changed, 4 insertions(+), 3 deletions(-) - -commit b3828203c4e594754957033ea826e8e22164fd5b -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Sep 26 23:08:14 2008 +0200 - - Carl agreed too, so CairoOutputDev.cc is done - - Only miss, Marco Pesenti Gritti, Timothy Lee and Ed Catmur - - poppler/CairoOutputDev.cc | 3 +++ - 1 file changed, 3 insertions(+) - -commit a197a07728d19abc2708979c95b4ef53e88fcb55 -Author: Carlo Bramini <carlo.bramix@libero.it> -Date: Fri Sep 26 18:42:05 2008 +0200 - - Compile where localtime_r is not available - - glib/demo/info.cc | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - -commit 38884e1722ac7e15c62cece20035c5fb0020f4b3 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Sep 24 14:18:38 2008 +0200 - - Do what Jeff really want to do, mark the font as invalid if it matches - any of the known collections that Identity is not a good fallback - - Fixes pdf on KDE bug 171365 - - poppler/GfxFont.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 0e080aaf44816e5d5b9008f3c2fb54868932f0ac -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Sep 24 13:12:13 2008 +0200 - - Remove non-needed X includes - - Spotted by Carlo Bramini - - test/gtk-cairo-test.cc | 3 --- - test/pdf-inspector.cc | 3 --- - 2 files changed, 6 deletions(-) - -commit 6888b023fdb199d3c5fb705bd928aedf68eeffdb -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Sep 23 23:28:04 2008 +0200 - - Only do the scale to 'm' size trick on non embedded fonts as it was - meant to be - - Fixes bug 17744 - - poppler/SplashOutputDev.cc | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -commit 539d29f4f3b24b98c9fc5f88d3477e427fbe409d -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Sep 23 22:39:50 2008 +0200 - - 0.9.2 - - CMakeLists.txt | 2 +- - NEWS | 19 +++++++++++++++++++ - configure.ac | 2 +- - msvc/config.h | 6 +++--- - qt4/src/Doxyfile | 2 +- - 5 files changed, 25 insertions(+), 6 deletions(-) - -commit abd070a79d8345bda3853395a39e4e2882c4ff8a -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Sep 22 20:23:11 2008 +0200 - - Check the types here too - - Benchmarking in release mode, both in "human feel" and callgrind - the benefit/lost is almost inexistant - - poppler/Object.h | 36 ++++++++++++++++++++++-------------- - 1 file changed, 22 insertions(+), 14 deletions(-) - -commit df47e4c441e4ec79b1bb40de7044c9501f243b76 -Author: Chris Wilson <chris@chris-wilson.co.uk> -Date: Tue Sep 16 12:56:04 2008 +0100 - - Check for duplicate open fonts. - - Before creating a new FT_Face for a font, check to see if there is a - duplicate amongst the list of open fonts, kept alive by either - Poppler's - or Cairo's font cache . - - A quick example of the benefit of this check is that it reduces the - RSS of - the Poppler converter in the Cairo test suite from over 900 MiB to - just 90 - MiB. - - configure.ac | 1 + - poppler/CairoFontEngine.cc | 214 - +++++++++++++++++++++++++++++++++++++++------ - 2 files changed, 190 insertions(+), 25 deletions(-) - -commit 41d1edddcf84ca23c0fc39c5f4f3a49e408a9f1a -Author: Kouhei Sutou <kou@cozmixng.org> -Date: Sun Sep 21 16:33:33 2008 +0200 - - [glib-demo] Fix a crash in forms demo - - glib/demo/forms.c | 12 +++++++----- - 1 file changed, 7 insertions(+), 5 deletions(-) - -commit fe26075353226be9a02c8cf1a6a29586de15ce86 -Author: Pino Toscano <pino@kde.org> -Date: Sun Sep 21 12:03:21 2008 +0200 - - really use the key passed to it - - poppler/Form.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 8aa531cb478d6ae838a94f9f31e6a0bbd0dd957c -Author: Pino Toscano <pino@kde.org> -Date: Sun Sep 21 11:18:22 2008 +0200 - - Read the 'readOnly' attribute directly in the FormField constructor. - - poppler/Form.cc | 12 +++--------- - 1 file changed, 3 insertions(+), 9 deletions(-) - -commit b56f64d676bdabd4a3ebe0eb2237f4c202a3707d -Author: Pino Toscano <pino@kde.org> -Date: Sun Sep 21 00:53:54 2008 +0200 - - Handle streams as entries for the catalog JS name tree. - - poppler/Catalog.cc | 18 +++++++++++++----- - 1 file changed, 13 insertions(+), 5 deletions(-) - -commit 93386d67b3d7adbd87547e9742e4df1c10eadbc1 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Sep 20 16:20:03 2008 +0200 - - Compile with -pedantic - - poppler/Form.h | 4 ++-- - qt4/src/poppler-embeddedfile.cc | 4 ++-- - qt4/src/poppler-movie.cc | 3 ++- - qt4/src/poppler-sound.cc | 3 ++- - qt4/src/poppler-textbox.cc | 2 +- - 5 files changed, 9 insertions(+), 7 deletions(-) - -commit 6961fd8efe3db6ee7077dc2ed072498696dae31a -Author: Tomas Are Haavet <tomasare@gmail.com> -Date: Sat Sep 20 16:13:37 2008 +0200 - - Remove some warnings and errors when compiling with gcc and -pedantic - - fofi/FoFiTrueType.cc | 3 ++- - glib/poppler-annot.cc | 8 ++++---- - glib/poppler-attachment.cc | 2 +- - glib/poppler-document.cc | 6 +++--- - glib/poppler-form-field.cc | 2 +- - glib/poppler-page.cc | 2 +- - poppler/Annot.h | 5 +++-- - splash/SplashTypes.h | 3 ++- - 8 files changed, 17 insertions(+), 14 deletions(-) - -commit 4e9a04da358b1527a08102e601a52f07930532f2 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Sep 20 16:10:50 2008 +0200 - - Add mention of GPLv2 or later in poppler changes to all files except - Splash.cc and Splash.h, i've still no answer from Marco :-( - - splash/SplashBitmap.cc | 3 +++ - splash/SplashBitmap.h | 3 +++ - splash/SplashErrorCodes.h | 3 +++ - splash/SplashFTFont.cc | 3 +++ - splash/SplashFTFont.h | 3 +++ - splash/SplashFTFontEngine.cc | 3 +++ - splash/SplashFTFontEngine.h | 3 +++ - splash/SplashFTFontFile.cc | 3 +++ - splash/SplashFTFontFile.h | 3 +++ - splash/SplashFont.cc | 3 +++ - splash/SplashFont.h | 3 +++ - splash/SplashFontEngine.cc | 3 +++ - splash/SplashFontEngine.h | 3 +++ - splash/SplashFontFile.cc | 3 +++ - splash/SplashFontFile.h | 3 +++ - splash/SplashT1Font.cc | 3 +++ - splash/SplashT1Font.h | 3 +++ - splash/SplashT1FontEngine.cc | 3 +++ - splash/SplashT1FontFile.cc | 3 +++ - splash/SplashT1FontFile.h | 3 +++ - splash/SplashTypes.h | 3 +++ - splash/SplashXPathScanner.cc | 3 +++ - 22 files changed, 66 insertions(+) - -commit beb87362072d5b480cf6b2c02445ec17c119ff56 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Sep 20 15:47:25 2008 +0200 - - Add Tomas' Copyright - - utils/HtmlFonts.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 8ccb1bb651b129875ef802356c4a229b2ce31973 -Author: Tomas Are Haavet <tomasare@gmail.com> -Date: Sat Sep 20 15:45:47 2008 +0200 - - Initialize pos the correct value to not have crashes - - utils/HtmlFonts.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 77bf8ec94e36fef7e120f1dc4bb1390be71cfb97 -Author: Tomas Are Haavet <tomasare@gmail.com> -Date: Sat Sep 20 14:17:06 2008 +0200 - - Fix memory leak - - utils/HtmlOutputDev.cc | 1 + - 1 file changed, 1 insertion(+) - -commit b22be54dc2205269974315ca748d835d0990d6da -Author: Tomas Are Haavet <tomasare@gmail.com> -Date: Sat Sep 20 14:16:26 2008 +0200 - - Fix mismatched free/delete - - utils/HtmlOutputDev.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit ac16174da1d6f19445f78e7cd7c4a18cb9524dde -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Sep 20 00:52:19 2008 +0200 - - make sure the image is setup before using it, otherwise some things - don't print correctly like PDF from bug 17645 - - poppler/PSOutputDev.cc | 6 ++++++ - 1 file changed, 6 insertions(+) - -commit ffa4ffdf7fe83035c72addd8c4c8ee566621ba06 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Sep 17 23:27:30 2008 +0200 - - 0.9.1 - - CMakeLists.txt | 2 +- - NEWS | 13 +++++++++++++ - configure.ac | 2 +- - msvc/config.h | 6 +++--- - qt4/src/Doxyfile | 2 +- - 5 files changed, 19 insertions(+), 6 deletions(-) - -commit f57cbe32bcde0808943b9be2456dd69fa5b6dd27 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Sep 14 22:18:38 2008 +0200 - - If when looking for an object we get objSomeNumberAfter assume it - was an int of SomeNumberAfter - - Fixes bug 17568 and i don't see how it can break existing things - because it's already on an error path - - poppler/XRef.cc | 25 +++++++++++++++++++++++++ - 1 file changed, 25 insertions(+) - -commit 1a852064ff5a1a15bc315ddca472a0ad74292581 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Sep 13 12:11:41 2008 +0200 - - [glib-demo] Do not try to get info about remote destinations - - glib/demo/utils.c | 11 ++++++----- - 1 file changed, 6 insertions(+), 5 deletions(-) - -commit 951cffeb2cbff4e179043033b5ac7f5eb764d6dc -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Sep 12 12:05:53 2008 +0200 - - Make sure DecryptAESState::bufIdx is never bigger than 16, otherwise - we crash - - I am not sure this is the correct fix, but fixes crash on files of - bugs 13972, 16092 and 17523 and they seem to work ok - - poppler/Decrypt.cc | 6 ++++++ - 1 file changed, 6 insertions(+) - -commit 491109edbe827860e764b5fcb67456867923858d -Author: Haruyuki Kawabe <Haruyuki.Kawabe@unisys.co.jp> -Date: Wed Sep 10 23:00:32 2008 +0200 - - Generate the outline file at the same place the other files are - generated - - Fixes bug 17504 - - utils/HtmlOutputDev.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 7dfc1e4c9348d537896bda7b0f2ae591afc72866 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Sep 10 00:03:50 2008 +0200 - - we want to distribute this file too - - qt4/src/Makefile.am | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit ddb73e8dc1ccbddf3b170e12c7153ccaf716d7cc -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Sep 9 23:47:33 2008 +0200 - - We want to distribute cmake/modules/FindLIBOPENJPEG.cmake too - - Makefile.am | 1 + - 1 file changed, 1 insertion(+) - -commit 646ccc2bb8563d411dc25bdbab53725ae08572ba -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Sep 9 23:22:17 2008 +0200 - - m_doc->doc->getOptContentConfig() can be null, so check for it - - qt4/src/poppler-document.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit d7f0bce67101f37f8d3e69d7d701388bcdc7200f -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Sep 9 23:18:49 2008 +0200 - - Qt4 frontend had timezone parsing that got lost when moving to the - common function, i suck - - glib/poppler-document.cc | 6 ++++-- - poppler/DateInfo.cc | 20 ++++++++++++++------ - poppler/DateInfo.h | 2 +- - qt/poppler-document.cc | 6 ++++-- - qt4/src/poppler-document.cc | 22 +++++++++++++++++++--- - utils/pdfinfo.cc | 6 ++++-- - utils/pdftohtml.cc | 6 ++++-- - 7 files changed, 50 insertions(+), 18 deletions(-) - -commit 0af8609e6c932de2d85168cc9147854ee84b3a1b -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Sep 9 20:55:27 2008 +0200 - - i want this packaged too - - utils/Makefile.am | 2 ++ - 1 file changed, 2 insertions(+) - -commit dd0f4c1510382e17cf33d3fe163e384da1d6d289 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Sep 9 20:48:04 2008 +0200 - - Fix includepath - - fofi/FoFiTrueType.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 16c0842c3e01608a72709af55cc5cb8b567efedf -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Sep 9 20:36:18 2008 +0200 - - API changed, so increase soname - - glib/CMakeLists.txt | 2 +- - glib/Makefile.am | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit 217c0d1f80a78713977a7bfbe680fce90f1c6b36 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Sep 8 23:56:28 2008 +0200 - - change version to 0.9.0 - - Now only need to wait for Carlos and Iñigo's answer to a BIC change - in glib/ and we'll have 0.9.0 :-) - - CMakeLists.txt | 2 +- - configure.ac | 2 +- - msvc/config.h | 6 +++--- - qt4/src/Doxyfile | 2 +- - 4 files changed, 6 insertions(+), 6 deletions(-) - -commit e34022a8fcfb9fe211dd6b561377d855972b2087 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Sep 8 23:36:04 2008 +0200 - - Increase soname for libpoppler, i'm almost sure we broke BC there - - CMakeLists.txt | 2 +- - poppler/Makefile.am | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit bc275049d6ef083daf71a043ccf23fd0634f5c4d -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Sep 8 23:33:24 2008 +0200 - - soname 3.1.0 for qt4 libs, we are BC/SC but got new API - - qt4/src/CMakeLists.txt | 2 +- - qt4/src/Makefile.am | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit 06743a25a73adc3fba95f7b4ad74a6dde1a54ead -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Sep 8 23:23:06 2008 +0200 - - added news for 0.9.0 - - NEWS | 115 - +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 115 insertions(+) - -commit d35ca2ce5df12d40e295873e44b1f18ea40ba897 -Author: Pino Toscano <pino@kde.org> -Date: Sun Sep 7 01:13:33 2008 +0200 - - [Qt4] apidox improvements - - qt4/src/poppler-annotation.h | 70 - +++++++++++++++++++++++++++++++++++++++++--- - qt4/src/poppler-link.h | 12 +++++--- - qt4/src/poppler-qt4.h | 22 ++++++++++++-- - 3 files changed, 93 insertions(+), 11 deletions(-) - -commit 796d4c002d47c85716775d173eddfb2ae8866eaf -Author: Pino Toscano <pino@kde.org> -Date: Sat Sep 6 22:48:13 2008 +0200 - - no more need for including the qt3 paths - - qt4/demos/CMakeLists.txt | 1 - - qt4/src/CMakeLists.txt | 1 - - qt4/tests/CMakeLists.txt | 1 - - 3 files changed, 3 deletions(-) - -commit db7ee3b3ae0f42155f9245691e4bfdef98a8ed6f -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Sep 6 23:16:05 2008 +0200 - - [Qt4] Fix docu - - qt4/src/poppler-qt4.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 3366059a25611f19ab592cda18c5efe0b9359771 -Author: Pino Toscano <pino@kde.org> -Date: Sat Sep 6 16:34:58 2008 +0200 - - [Qt4] add option flags for the PS converter - - - map the 'strictMargins' and 'forceRasterize' bool options as flags - - add a flag for setting the "printing" mode - - qt4/src/poppler-ps-converter.cc | 34 ++++++++++++++++++++++++++-------- - qt4/src/poppler-qt4.h | 26 ++++++++++++++++++++++++++ - 2 files changed, 52 insertions(+), 8 deletions(-) - -commit afa26d5c9ac9feb61aad30eb65dc00c9854d7f2e -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Sep 6 15:46:12 2008 +0200 - - we are printing so pass the print flag as true - - qt/poppler-document.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit f5d1eb5eaabaf3ab4bb87b8b4b901bbf30b20b29 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Sep 6 15:43:32 2008 +0200 - - We are pringint here, so pass the printing flag as true - - Fixes KDE bug 170459, you'd wonder how many times i've made the - same mistake... - - qt4/src/poppler-ps-converter.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 58e828d732f06bae9133dd518d89fa4348f1cca8 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Sep 5 18:45:23 2008 +0200 - - Only like QtTest to the tests, not to the lib itself - - configure.ac | 13 +++++++++++-- - qt4/tests/Makefile.am | 22 +++++++++++----------- - 2 files changed, 22 insertions(+), 13 deletions(-) - -commit 49b3e4560f62a9a7db350d94d50e229f5e1208bf -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri Sep 5 18:17:45 2008 +0200 - - Movie filename is not a string, but a File Specification - - Fixes a crash when filename is a dictionary - - poppler/Annot.cc | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -commit 996d2e176057e22acbc374cff7a712ce6fd92d93 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri Sep 5 18:17:25 2008 +0200 - - Unify multiple File Specification parsers - - CMakeLists.txt | 2 + - poppler/FileSpec.cc | 146 - +++++++++++++++++++++++++++++++++++++++++++++++++ - poppler/FileSpec.h | 24 ++++++++ - poppler/Link.cc | 104 +++++------------------------------ - poppler/Link.h | 4 -- - poppler/Makefile.am | 2 + - poppler/PSOutputDev.cc | 35 +----------- - poppler/PSOutputDev.h | 1 - - poppler/Sound.cc | 7 ++- - 9 files changed, 197 insertions(+), 128 deletions(-) - -commit 31f3eb2d6b43f7fbf4d978730d109b08b1563989 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Sep 3 21:49:23 2008 +0200 - - Only set the state to true if the AS value is the same as parent's V - - Fixes bug 16121 and 15535 - - poppler/Form.cc | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -commit c75abac7ba07990ef54a46fa0d429eea580a71ef -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Sep 2 19:16:55 2008 +0200 - - Kjartan was missing and just agreed - - utils/HtmlOutputDev.cc | 3 +++ - 1 file changed, 3 insertions(+) - -commit 630aa133017d15ddc7bf96c79f43c5b60fa9749a -Merge: b2bc9b3f de822554 -Author: Pino Toscano <pino@kde.org> -Date: Tue Sep 2 01:25:55 2008 +0200 - - Merge branch 'master' of - ssh://pino@git.freedesktop.org/git/poppler/poppler - -commit b2bc9b3f59ef8e5fea18f0bc91b71fc9eb9a4157 -Author: Pino Toscano <pino@kde.org> -Date: Tue Sep 2 01:24:39 2008 +0200 - - [Qt4] small apidox improvements - - mostly the start of the \since marker addition, plus few other - documentation addition/improvements - - qt4/src/poppler-annotation.h | 9 +++++++ - qt4/src/poppler-form.h | 8 ++++++ - qt4/src/poppler-link.h | 14 ++++++++--- - qt4/src/poppler-optcontent.h | 11 +++++++++ - qt4/src/poppler-qt4.h | 59 - ++++++++++++++++++++++++++++++++++++++------ - 5 files changed, 90 insertions(+), 11 deletions(-) - -commit 6bc4881477ea15d70d420e57b5663052f2f9df76 -Author: Pino Toscano <pino@kde.org> -Date: Tue Sep 2 00:47:56 2008 +0200 - - expand the macros, extract poppler-optcontent.h - - enable the macro expansion and define POPPLER_QT4_EXPORT to be - empty, so - we don't have it in the apidox - - qt4/src/Doxyfile | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -commit de822554acdb1b2bc9e70c0668c43a10c0ec129a -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Sep 1 23:50:37 2008 +0200 - - Initialize widget to null before calling initialize not after :-( - - poppler/Annot.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 1a7b7199112d97e816a099cbc1a5672c83e64156 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Sep 1 20:42:06 2008 +0200 - - Add my copyright - - poppler/Dict.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 1fef34782a003f46fceab0d3bed36212bbf32c4c -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Sep 1 20:35:37 2008 +0200 - - Find reverse way in Dict - - This fixes Greg Stolze - Marriage Of Virtue & Viciousness.pdf - The issue with this pdf is that has a Dict with two entries with - the same key - The pdf spec says if that happens, results are undefined, but Acroread - uses the - second key while we were using the first, searching backwards we - use the second now too and the pdf works - - poppler/Dict.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit bb7996eaaad6a70404891bb2ff530160737ea3d7 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Sep 1 20:29:25 2008 +0200 - - Do not crash on documents with no pages - - qt4/tests/test-poppler-qt4.cpp | 6 ++++++ - 1 file changed, 6 insertions(+) - -commit 0c11d390e4b0e3765ae20968359c7562c9857db7 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Sep 1 20:13:33 2008 +0200 - - All poppler commiters to these files agreed to GPLv2+ - - Still missing to answer - Marco Pesenti Gritti - Catalog.cc - Outline.cc - Outline.h - - Kjartan Maraas - HtmlOutputDev.cc - - Timothy Lee - ImageOutputDev.h - ImageOutputDev.cc - - Carl Worth - CairoOutputDev.cc - - Ed Catmur - GfxFont.cc - GlobalParams.cc - TextOutputDev.cc - TextOutputDev.h - UnicodeTypeTable.cc - UnicodeTypeTable.h - - poppler/Annot.cc | 3 +++ - poppler/Annot.h | 3 +++ - poppler/Array.cc | 3 +++ - poppler/Array.h | 3 +++ - poppler/ArthurOutputDev.cc | 3 +++ - poppler/ArthurOutputDev.h | 3 +++ - poppler/CMap.cc | 3 +++ - poppler/CMap.h | 3 +++ - poppler/CairoFontEngine.cc | 3 +++ - poppler/CairoFontEngine.h | 3 +++ - poppler/CairoOutputDev.h | 3 +++ - poppler/Catalog.h | 3 +++ - poppler/CharCodeToUnicode.cc | 3 +++ - poppler/CharCodeToUnicode.h | 3 +++ - poppler/Decrypt.cc | 3 +++ - poppler/Decrypt.h | 3 +++ - poppler/Dict.cc | 3 +++ - poppler/Dict.h | 3 +++ - poppler/Error.cc | 3 +++ - poppler/Error.h | 3 +++ - poppler/Function.cc | 3 +++ - poppler/Gfx.cc | 3 +++ - poppler/Gfx.h | 3 +++ - poppler/GfxFont.h | 3 +++ - poppler/GfxState.cc | 3 +++ - poppler/GfxState.h | 3 +++ - poppler/GlobalParams.h | 3 +++ - poppler/JBIG2Stream.cc | 3 +++ - poppler/JPXStream.cc | 3 +++ - poppler/Lexer.cc | 3 +++ - poppler/Lexer.h | 3 +++ - poppler/Link.cc | 3 +++ - poppler/Link.h | 3 +++ - poppler/Object.cc | 3 +++ - poppler/Object.h | 3 +++ - poppler/OutputDev.cc | 3 +++ - poppler/OutputDev.h | 3 +++ - poppler/PDFDoc.cc | 3 +++ - poppler/PDFDoc.h | 3 +++ - poppler/PDFDocEncoding.cc | 3 +++ - poppler/PDFDocEncoding.h | 3 +++ - poppler/PSOutputDev.cc | 3 +++ - poppler/PSOutputDev.h | 3 +++ - poppler/PSTokenizer.cc | 3 +++ - poppler/PSTokenizer.h | 3 +++ - poppler/Page.cc | 3 +++ - poppler/Page.h | 3 +++ - poppler/Parser.cc | 3 +++ - poppler/Parser.h | 3 +++ - poppler/SplashOutputDev.cc | 3 +++ - poppler/SplashOutputDev.h | 3 +++ - poppler/Stream-CCITT.h | 3 +++ - poppler/Stream.cc | 3 +++ - poppler/Stream.h | 3 +++ - poppler/UTF8.h | 3 +++ - poppler/XRef.cc | 3 +++ - poppler/XRef.h | 3 +++ - utils/HtmlFonts.cc | 3 +++ - utils/HtmlLinks.cc | 3 +++ - utils/HtmlOutputDev.h | 3 +++ - utils/parseargs.c | 3 +++ - utils/parseargs.h | 3 +++ - utils/pdffonts.cc | 3 +++ - utils/pdfimages.cc | 3 +++ - utils/pdfinfo.cc | 3 +++ - utils/pdftohtml.cc | 3 +++ - utils/pdftoppm.cc | 3 +++ - utils/pdftops.cc | 3 +++ - utils/pdftotext.cc | 3 +++ - 69 files changed, 207 insertions(+) - -commit 8670bfed7900586725b30e3af67f6849acc6efda -Author: Vasile Gaburici <gaburici@cs.umd.edu> -Date: Sat Aug 30 12:47:13 2008 +0200 - - Fix extraction of images - - See bug 16999 for more info - - utils/ImageOutputDev.cc | 12 +++++++++++- - 1 file changed, 11 insertions(+), 1 deletion(-) - -commit 1c98f197664b1a2c06e2caf32116a8487f4054bf -Author: Vasile Gaburici <gaburici@cs.umd.edu> -Date: Sat Aug 30 12:44:02 2008 +0200 - - Read sMap reverse so CMap entries take precedence - - See bug 17321 for a more in depth explanation - - poppler/CharCodeToUnicode.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 8f1deb3f8000bdeb845a6c786a654bc7eb684f0a -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Aug 29 23:06:19 2008 +0200 - - Are we a lib or aren't we? Unify String to Date parsing so we all - behave the same way - - CMakeLists.txt | 2 ++ - glib/poppler-document.cc | 29 ++--------------- - poppler/DateInfo.cc | 62 - +++++++++++++++++++++++++++++++++++++ - poppler/DateInfo.h | 27 ++++++++++++++++ - poppler/Makefile.am | 2 ++ - qt/poppler-document.cc | 22 ++----------- - qt4/src/poppler-annotation-helper.h | 16 ++-------- - qt4/src/poppler-document.cc | 52 +++---------------------------- - utils/pdfinfo.cc | 16 ++-------- - utils/pdftohtml.cc | 9 ++---- - 10 files changed, 111 insertions(+), 126 deletions(-) - -commit c39f23dca98d3efe8d094c9a3e1bd460ba57d1ce -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Aug 29 20:50:57 2008 +0200 - - Add a readme for contributors with licensing and misc info - - README.contributors | 20 ++++++++++++++++++++ - 1 file changed, 20 insertions(+) - -commit 35a72590ffd3284e63601af79599e5fa025e567f -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Aug 28 00:58:11 2008 +0200 - - Be more protective against huge font sizes in bogus documents like - the one in http://bugs.freedesktop.org/show_bug.cgi?id=17326 - - 10 MB in size is a font of 3200x3200, huge enough to be discarted - - poppler/SplashOutputDev.cc | 20 +++++++++++++++++++- - 1 file changed, 19 insertions(+), 1 deletion(-) - -commit 33727cf6773b12d736ba245fdd146559ce93102d -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Aug 24 20:36:13 2008 +0200 - - fix location of the comment - - fofi/FoFiType1.cc | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit abe29b4fdb33f449649fdea5d7af2deeb702f0bb -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Aug 24 20:24:35 2008 +0200 - - All changes made to fofi/ files under the poppler project are by - people that accepts to license the code under GPLv2+ - - fofi/FoFiBase.cc | 3 +++ - fofi/FoFiTrueType.cc | 3 +++ - fofi/FoFiTrueType.h | 3 +++ - fofi/FoFiType1.cc | 3 +++ - fofi/FoFiType1C.h | 3 +++ - 5 files changed, 15 insertions(+) - -commit 6346d7050a03935c71336c65d5f8f0fe2860d321 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Aug 24 20:23:50 2008 +0200 - - All changes made to goo/ files under the poppler project are by - people that accepts to license the code under GPLv2+ - - goo/GooString.cc | 3 +++ - goo/GooString.h | 3 +++ - goo/gfile.cc | 3 +++ - goo/gfile.h | 3 +++ - goo/gmem.cc | 3 +++ - goo/gmem.h | 3 +++ - 6 files changed, 18 insertions(+) - -commit d6e1f1fb4e83527d3ece51d98fa20262713b7da1 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Aug 24 20:22:06 2008 +0200 - - .cc -> .h - - poppler/FontInfo.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 9f0ac70f7ad806cadce379d4fabb90eff697ad52 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Aug 24 19:25:27 2008 +0200 - - Add missing addresses - - poppler/ABWOutputDev.cc | 4 ++-- - poppler/ABWOutputDev.h | 2 +- - poppler/FlateStream.cc | 2 +- - poppler/FlateStream.h | 2 +- - 4 files changed, 5 insertions(+), 5 deletions(-) - -commit 22f6af73961686895f207fe13022a21333455862 -Merge: 12a9e427 6d6913a7 -Author: Pino Toscano <pino@kde.org> -Date: Sun Aug 24 19:03:24 2008 +0200 - - Merge branch 'master' of - ssh://pino@git.freedesktop.org/git/poppler/poppler - -commit 12a9e427fb487165b1797f81d52d733c27bfa2e1 -Author: Pino Toscano <pino@kde.org> -Date: Sun Aug 24 18:57:52 2008 +0200 - - [Qt4] add showControl and playMode properties of MovieObject's - - qt4/src/poppler-movie.cc | 14 ++++++++++++++ - qt4/src/poppler-qt4.h | 20 ++++++++++++++++++++ - 2 files changed, 34 insertions(+) - -commit c444c652859b6e52160e5571e84f8eb1292d65f1 -Author: Pino Toscano <pino@kde.org> -Date: Sun Aug 24 18:47:58 2008 +0200 - - [Qt4] make the MovieObject ctor private, with only Page able to use it - - qt4/src/poppler-qt4.h | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -commit 6d6913a79779769ce0fe2f0b516a90a50e51b947 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Aug 24 18:45:45 2008 +0200 - - fix Jeff's entry - - poppler/DCTStream.cc | 2 +- - poppler/DCTStream.h | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit 25bd5967f9f550a32e20eea91cd00cbeff98249e -Author: Pino Toscano <pino@kde.org> -Date: Sun Aug 24 18:45:25 2008 +0200 - - [Qt4] initialize the MovieObject from an AnnotMovie - - the annotation has all the data we need, so just init from that - - qt4/src/poppler-movie.cc | 8 ++++---- - qt4/src/poppler-page.cc | 4 +--- - qt4/src/poppler-qt4.h | 4 ++-- - 3 files changed, 7 insertions(+), 9 deletions(-) - -commit 47f54ad4de111f62a5b8c25520ef6b2bca6026d2 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Aug 24 18:18:13 2008 +0200 - - Add more correct copyright statements on fofi, goo, poppler and - util directories to be more compliant with GPL that requires such - modification statements to be present. Meanwhile i did that, i did - qt and qt4 dirs too, glib is missing if someone wants to fix it, - but it's not crucial as it's not a fork of some other GPL software - - AUTHORS | 4 +++- - fofi/FoFiBase.cc | 11 +++++++++++ - fofi/FoFiTrueType.cc | 14 ++++++++++++++ - fofi/FoFiTrueType.h | 12 ++++++++++++ - fofi/FoFiType1.cc | 12 ++++++++++++ - fofi/FoFiType1C.h | 11 +++++++++++ - goo/GooString.cc | 13 +++++++++++++ - goo/GooString.h | 12 ++++++++++++ - goo/GooTimer.cc | 3 +++ - goo/GooTimer.h | 8 ++++++-- - goo/GooVector.h | 12 ++++++++++++ - goo/gfile.cc | 13 +++++++++++++ - goo/gfile.h | 11 +++++++++++ - goo/gmem.cc | 13 +++++++++++++ - goo/gmem.h | 13 +++++++++++++ - poppler/ABWOutputDev.cc | 3 ++- - poppler/ABWOutputDev.h | 2 +- - poppler/Annot.cc | 19 +++++++++++++++++++ - poppler/Annot.h | 17 +++++++++++++++++ - poppler/Array.cc | 11 +++++++++++ - poppler/Array.h | 11 +++++++++++ - poppler/ArthurOutputDev.cc | 14 +++++++++++++- - poppler/ArthurOutputDev.h | 13 ++++++++++++- - poppler/CMap.cc | 12 ++++++++++++ - poppler/CMap.h | 11 +++++++++++ - poppler/CairoFontEngine.cc | 17 +++++++++++++++++ - poppler/CairoFontEngine.h | 17 +++++++++++++++++ - poppler/CairoOutputDev.cc | 19 +++++++++++++++++++ - poppler/CairoOutputDev.h | 16 ++++++++++++++++ - poppler/Catalog.cc | 19 +++++++++++++++++++ - poppler/Catalog.h | 16 ++++++++++++++++ - poppler/CharCodeToUnicode.cc | 14 ++++++++++++++ - poppler/CharCodeToUnicode.h | 13 +++++++++++++ - poppler/DCTStream.cc | 5 ++++- - poppler/DCTStream.h | 6 +++++- - poppler/Decrypt.cc | 12 ++++++++++++ - poppler/Decrypt.h | 11 +++++++++++ - poppler/Dict.cc | 13 +++++++++++++ - poppler/Dict.h | 13 +++++++++++++ - poppler/Error.cc | 13 +++++++++++++ - poppler/Error.h | 13 +++++++++++++ - poppler/FlateStream.cc | 2 ++ - poppler/FlateStream.h | 2 ++ - poppler/FontInfo.cc | 22 ++++++++++++++++++++++ - poppler/FontInfo.h | 21 +++++++++++++++++++++ - poppler/Form.cc | 10 +++++++++- - poppler/Form.h | 6 +++++- - poppler/Function.cc | 12 ++++++++++++ - poppler/Gfx.cc | 23 +++++++++++++++++++++++ - poppler/Gfx.h | 13 +++++++++++++ - poppler/GfxFont.cc | 19 +++++++++++++++++++ - poppler/GfxFont.h | 16 ++++++++++++++++ - poppler/GfxState.cc | 14 ++++++++++++++ - poppler/GfxState.h | 13 +++++++++++++ - poppler/GlobalParams.cc | 19 +++++++++++++++++++ - poppler/GlobalParams.h | 15 +++++++++++++++ - poppler/JBIG2Stream.cc | 13 +++++++++++++ - poppler/JPXStream.cc | 11 +++++++++++ - poppler/Lexer.cc | 12 ++++++++++++ - poppler/Lexer.h | 12 ++++++++++++ - poppler/Link.cc | 14 ++++++++++++++ - poppler/Link.h | 12 ++++++++++++ - poppler/Movie.cc | 17 ++++++++++++++++- - poppler/Object.cc | 11 +++++++++++ - poppler/Object.h | 12 ++++++++++++ - poppler/OptionalContent.cc | 5 ++++- - poppler/Outline.cc | 11 +++++++++++ - poppler/Outline.h | 11 +++++++++++ - poppler/OutputDev.cc | 13 +++++++++++++ - poppler/OutputDev.h | 14 ++++++++++++++ - poppler/PDFDoc.cc | 15 +++++++++++++++ - poppler/PDFDoc.h | 15 +++++++++++++++ - poppler/PDFDocEncoding.cc | 13 ++++++++++++- - poppler/PDFDocEncoding.h | 11 +++++++++++ - poppler/PSOutputDev.cc | 15 +++++++++++++++ - poppler/PSOutputDev.h | 14 ++++++++++++++ - poppler/PSTokenizer.cc | 12 ++++++++++++ - poppler/PSTokenizer.h | 11 +++++++++++ - poppler/Page.cc | 20 ++++++++++++++++++++ - poppler/Page.h | 16 ++++++++++++++++ - poppler/PageLabelInfo.cc | 12 ++++++++++++ - poppler/PageLabelInfo.h | 12 ++++++++++++ - poppler/PageTransition.h | 18 ++++++++++++++++++ - poppler/Parser.cc | 12 ++++++++++++ - poppler/Parser.h | 11 +++++++++++ - poppler/SplashOutputDev.cc | 16 ++++++++++++++++ - poppler/SplashOutputDev.h | 11 +++++++++++ - poppler/Stream-CCITT.h | 11 +++++++++++ - poppler/Stream.cc | 14 ++++++++++++++ - poppler/Stream.h | 13 +++++++++++++ - poppler/TextOutputDev.cc | 18 ++++++++++++++++++ - poppler/TextOutputDev.h | 15 +++++++++++++++ - poppler/UTF8.h | 11 +++++++++++ - poppler/UnicodeTypeTable.cc | 13 +++++++++++++ - poppler/UnicodeTypeTable.h | 11 +++++++++++ - poppler/XRef.cc | 17 ++++++++++++++++- - poppler/XRef.h | 14 ++++++++++++++ - qt/poppler-document.cc | 3 +++ - qt/poppler-fontinfo.cc | 3 +-- - qt/poppler-page.cc | 7 ++++++- - qt/poppler-private.h | 4 ++++ - qt/poppler-qt.h | 5 ++++- - qt4/src/poppler-annotation-helper.h | 1 + - qt4/src/poppler-annotation.cc | 3 ++- - qt4/src/poppler-annotation.h | 4 +++- - qt4/src/poppler-document.cc | 4 +++- - qt4/src/poppler-embeddedfile.cc | 1 + - qt4/src/poppler-fontinfo.cc | 5 ++++- - qt4/src/poppler-form.cc | 2 +- - qt4/src/poppler-form.h | 2 +- - qt4/src/poppler-link-extractor-private.h | 2 +- - qt4/src/poppler-link-extractor.cc | 2 +- - qt4/src/poppler-link.cc | 3 ++- - qt4/src/poppler-link.h | 1 + - qt4/src/poppler-optcontent-private.h | 1 + - qt4/src/poppler-optcontent.cc | 1 + - qt4/src/poppler-optcontent.h | 1 + - qt4/src/poppler-page-private.h | 2 ++ - qt4/src/poppler-page.cc | 4 ++++ - qt4/src/poppler-private.h | 4 +++- - qt4/src/poppler-ps-converter.cc | 1 + - qt4/src/poppler-qt4.h | 5 ++++- - qt4/src/poppler-textbox.cc | 2 ++ - splash/Splash.cc | 12 ++++++++++++ - splash/Splash.h | 12 ++++++++++++ - splash/SplashBitmap.cc | 12 ++++++++++++ - splash/SplashBitmap.h | 11 +++++++++++ - splash/SplashErrorCodes.h | 11 +++++++++++ - splash/SplashFTFont.cc | 12 ++++++++++++ - splash/SplashFTFont.h | 11 +++++++++++ - splash/SplashFTFontEngine.cc | 11 +++++++++++ - splash/SplashFTFontEngine.h | 11 +++++++++++ - splash/SplashFTFontFile.cc | 11 +++++++++++ - splash/SplashFTFontFile.h | 11 +++++++++++ - splash/SplashFont.cc | 11 +++++++++++ - splash/SplashFont.h | 11 +++++++++++ - splash/SplashFontEngine.cc | 11 +++++++++++ - splash/SplashFontEngine.h | 11 +++++++++++ - splash/SplashFontFile.cc | 12 ++++++++++++ - splash/SplashFontFile.h | 12 ++++++++++++ - splash/SplashT1Font.cc | 11 +++++++++++ - splash/SplashT1Font.h | 11 +++++++++++ - splash/SplashT1FontEngine.cc | 11 +++++++++++ - splash/SplashT1FontFile.cc | 11 +++++++++++ - splash/SplashT1FontFile.h | 11 +++++++++++ - splash/SplashTypes.h | 11 +++++++++++ - splash/SplashXPathScanner.cc | 11 +++++++++++ - utils/HtmlFonts.cc | 24 ++++++++++++++++++++++++ - utils/HtmlFonts.h | 12 ++++++++++++ - utils/HtmlLinks.cc | 23 +++++++++++++++++++++++ - utils/HtmlLinks.h | 12 ++++++++++++ - utils/HtmlOutputDev.cc | 13 +++++++++++++ - utils/HtmlOutputDev.h | 11 +++++++++++ - utils/ImageOutputDev.cc | 13 +++++++++++++ - utils/ImageOutputDev.h | 12 ++++++++++++ - utils/parseargs.c | 13 +++++++++++++ - utils/parseargs.h | 11 +++++++++++ - utils/pdffonts.cc | 12 ++++++++++++ - utils/pdfimages.cc | 11 +++++++++++ - utils/pdfinfo.cc | 12 ++++++++++++ - utils/pdftoabw.cc | 26 +++++++++++++++++++------- - utils/pdftohtml.cc | 11 +++++++++++ - utils/pdftoppm.cc | 11 +++++++++++ - utils/pdftops.cc | 12 ++++++++++++ - utils/pdftotext.cc | 12 ++++++++++++ - 165 files changed, 1795 insertions(+), 37 deletions(-) - -commit 0dfbb8996ee91aa044eb2bdf2859ef64005116f8 -Author: Loïc Minier <lool@dooz.org> -Date: Wed Aug 20 22:10:07 2008 +0200 - - Fixes escaping of hyphens in man pages - - utils/pdfinfo.1 | 2 +- - utils/pdftops.1 | 16 ++++++++-------- - 2 files changed, 9 insertions(+), 9 deletions(-) - -commit 6cfa0e598a81460e5d0a7d60d8584366d2a70165 -Author: Loïc Minier <lool@dooz.org> -Date: Wed Aug 20 19:57:42 2008 +0200 - - Fix synopsis of pdftops in man page to clarify that a PDF file is - required in all cases - - utils/pdftops.1 | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 48a73cc709a8bed9d2d0f9cbd2a9d2b6c0dad05b -Author: Pino Toscano <pino@kde.org> -Date: Sat Aug 23 19:26:01 2008 +0200 - - [Qt4] convert the title of movie annotations - - qt4/src/poppler-page.cc | 6 ++++++ - 1 file changed, 6 insertions(+) - -commit 419ec15ac825f2e0052b411462f00ac57fed030e -Author: Pino Toscano <pino@kde.org> -Date: Sat Aug 23 19:25:04 2008 +0200 - - [Qt4] get/set the title for movie annotations - - qt4/src/poppler-annotation.cc | 13 +++++++++++++ - qt4/src/poppler-annotation.h | 3 +++ - 2 files changed, 16 insertions(+) - -commit 63bcaf113fcb5a4a9e5c120df2c3dafb2977c90a -Author: Pino Toscano <pino@kde.org> -Date: Sat Aug 23 01:58:30 2008 +0200 - - [Qt4] convert the movie annotation from the core type to the Qt4 one - - qt4/src/poppler-page.cc | 18 +++++++++++++++--- - 1 file changed, 15 insertions(+), 3 deletions(-) - -commit 5cc490de74af12726bdeb9b5a6a0f0d1d79383b5 -Author: Pino Toscano <pino@kde.org> -Date: Sat Aug 23 01:55:41 2008 +0200 - - [Qt4] first version of a MovieAnnotation - - right mow it just holds the movie object - - qt4/src/poppler-annotation.cc | 74 - +++++++++++++++++++++++++++++++++++++++++++ - qt4/src/poppler-annotation.h | 26 ++++++++++++++- - 2 files changed, 99 insertions(+), 1 deletion(-) - -commit 3d5c2e22d790d7c139e1cd28aebb21cfe76b8b6b -Author: Pino Toscano <pino@kde.org> -Date: Sat Aug 23 01:54:30 2008 +0200 - - compile the new poppler-movie.cc - - qt4/src/CMakeLists.txt | 1 + - qt4/src/Makefile.am | 1 + - 2 files changed, 2 insertions(+) - -commit 599698a9b133999f1f0bb0548489111e9d7b6f05 -Author: Pino Toscano <pino@kde.org> -Date: Sat Aug 23 01:52:58 2008 +0200 - - [Qt4] first version of a MovieObject object for movies - - slightly differs from the version in core - - qt4/src/poppler-movie.cc | 73 - ++++++++++++++++++++++++++++++++++++++++++++++++ - qt4/src/poppler-qt4.h | 34 ++++++++++++++++++++++ - 2 files changed, 107 insertions(+) - -commit 820f15009845870701e1f4e7f4fc4fb93312ab3e -Author: Pino Toscano <pino@kde.org> -Date: Sat Aug 23 01:45:07 2008 +0200 - - fix Movie::copy() - - the default copy ctor already does the vertbatim copies, so no need to - do them on our own; what needs to be done is checking whether - an object - is valid before either doing a "smart copy" or "postprocessing" it - - poppler/Movie.cc | 14 ++++++++------ - 1 file changed, 8 insertions(+), 6 deletions(-) - -commit c3a006ae35250e9a5638c2ce713b7470380751c7 -Author: Pino Toscano <pino@kde.org> -Date: Sat Aug 23 01:04:34 2008 +0200 - - compile attachments.c in the demo with cmake as well - - glib/demo/CMakeLists.txt | 1 + - 1 file changed, 1 insertion(+) - -commit b5a7987a50b3d28fbfa219e2cef85b9e53aaf079 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Aug 21 20:40:18 2008 +0200 - - [glib-demo] Fix attachments demo with documents that don't contain - attachments - - glib/demo/attachments.c | 27 ++++++++++++++++++++------- - 1 file changed, 20 insertions(+), 7 deletions(-) - -commit a2b0aefedbdb20ce0ef8398a700202021fcf00db -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Aug 21 20:14:50 2008 +0200 - - [glib-demo] Fix typo - - glib/demo/attachments.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 9e563d6d877624b1caf82ac30c5ae30a1eb48f21 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Aug 21 20:12:33 2008 +0200 - - [glib-demo] Add checksum validation to attachments demo - - glib/demo/attachments.c | 101 - ++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 101 insertions(+) - -commit e233325e6f13d8b232bf68a2812fe755e7fccd4d -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Aug 21 19:03:32 2008 +0200 - - [glib-demo] Add demo for attachments - - glib/demo/Makefile.am | 2 + - glib/demo/attachments.c | 242 - ++++++++++++++++++++++++++++++++++++++++++++++++ - glib/demo/attachments.h | 31 +++++++ - glib/demo/main.c | 4 +- - glib/demo/utils.c | 23 +++++ - glib/demo/utils.h | 1 + - 6 files changed, 302 insertions(+), 1 deletion(-) - -commit 0e2efa0fce5bf059ce85d3e3bec2293b405ec3c9 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Aug 21 19:02:24 2008 +0200 - - [glib] Make sure name and descripction are valid utf8 strings - - glib/poppler-attachment.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 15a73704ab6b009ca5e07c08f0b12d970adc387d -Author: Chris Wilson <chris@chris-wilson.co.uk> -Date: Tue Aug 19 09:18:03 2008 +0100 - - Memleak and invalid free. - - CairoOutputDev::setSoftMask() fails to free the cairo_t and mask - it uses - to draw the opaque soft mask and attempts to destroy a reference to a - surface it does not own (this bug was masked by the fact that - a reference - was still being held by the unfreed cairo_t). - - poppler/CairoOutputDev.cc | 11 ++++++++--- - 1 file changed, 8 insertions(+), 3 deletions(-) - -commit d3110e392097db54e9ee59300213e490dee39126 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Aug 19 19:19:09 2008 +0200 - - Fix include so it can be used in the unsupported way of installing - internal poppler/ headers - - Notified by Caolan McNamara <caolanm@redhat.com> - - poppler/PreScanOutputDev.h | 2 +- - poppler/SecurityHandler.h | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit 303249e5548bfbf6823e97850e498970d802b4a0 -Author: Albert Astals Cid <tsdgeos@samsung.localdomain> -Date: Fri Aug 15 01:52:52 2008 +0200 - - Revert 123a87aff2e35b10efe6a1d715585b427e4a9afa it creates problems - with some pdf files - - poppler/Gfx.cc | 14 ++------------ - poppler/Gfx.h | 3 --- - 2 files changed, 2 insertions(+), 15 deletions(-) - -commit 27ddf3c5e839358c8553d41743faa8ee304767bf -Author: Pino Toscano <pino@kde.org> -Date: Wed Aug 13 13:55:57 2008 +0200 - - [Qt4] make sure to use the correct page width/height for form - widgets coordinates - - qt4/src/poppler-form.cc | 12 +++++++++--- - 1 file changed, 9 insertions(+), 3 deletions(-) - -commit 2e7b0eb4af8cf5938833e5659d01b77096e7b7f7 -Author: Pino Toscano <pino@kde.org> -Date: Tue Aug 12 13:49:52 2008 +0200 - - [Qt4] add a method to get the activation action of a FormField - - qt4/src/poppler-form.cc | 19 +++++++++++++++++++ - qt4/src/poppler-form.h | 8 ++++++++ - 2 files changed, 27 insertions(+) - -commit f9e679adbd6830da26eb9909bcb16e3bdf0da6b4 -Author: Pino Toscano <pino@kde.org> -Date: Tue Aug 12 13:47:15 2008 +0200 - - create a static version of PageData::convertLinkActionToLink() - - qt4/src/poppler-page-private.h | 2 ++ - qt4/src/poppler-page.cc | 5 +++++ - 2 files changed, 7 insertions(+) - -commit a6ecc864ea3e94d7232cff6a2e8f49919d8f24ff -Author: Albert Astals Cid <tsdgeos@samsung.localdomain> -Date: Tue Aug 12 01:23:21 2008 +0200 - - initialize widget, fixes crash on EC2006.pdf - - poppler/Annot.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 123a87aff2e35b10efe6a1d715585b427e4a9afa -Author: Albert Astals Cid <tsdgeos@samsung.localdomain> -Date: Tue Aug 12 00:37:09 2008 +0200 - - Cache the last created GfxResource, very useful because some pdf - created by pstopdf push and pop the same GfxResource all the time - - This brings us a speedup of 16 times (from 11 seconds to about 600 - msec) in kde bug 168663 - - poppler/Gfx.cc | 14 ++++++++++++-- - poppler/Gfx.h | 3 +++ - 2 files changed, 15 insertions(+), 2 deletions(-) - -commit 5ad1a12183f4b8e328f32386a74b5616e7e59070 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Aug 4 20:34:42 2008 +0200 - - Be less strict when parsing TTF tables - - With this change and freetype from CVS i can render Bug 16940 using - the splash renderer - - fofi/FoFiTrueType.cc | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -commit d322720428fa416b7d5f23acc72d1d4b4f74d041 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Aug 4 20:16:50 2008 +0200 - - Report an error when FoFiTrueType::load or FoFiTrueType::make fail - - poppler/SplashOutputDev.cc | 5 +++++ - 1 file changed, 5 insertions(+) - -commit 901ebc84ff7c0872c3f9f5e6eaf418ba6400fa10 -Author: Pino Toscano <pino@kde.org> -Date: Sun Aug 3 10:54:09 2008 +0200 - - [Qt4] Make the paper color setting working as it should. - - A BGR colorspace means that colors should be set as blue,green,red, - and - not red,green,blue. - - qt4/src/poppler-private.h | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -commit 66b34c78943be598778a3ef438b0cefac668c6a2 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Aug 2 13:54:34 2008 +0200 - - This should not be here, breaks jpeg rendering when not using libjpeg - - That was included erroneously when the file writing code was added - - poppler/Stream.cc | 1 - - 1 file changed, 1 deletion(-) - -commit fd8d71ea8b12393201ece9c09372fd69c7573025 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Aug 1 23:47:51 2008 +0200 - - These defines are unneeded too - - msvc/poppler/poppler-config.h | 30 ------------------------------ - poppler-config.h.cmake | 30 ------------------------------ - poppler/poppler-config.h.in | 30 ------------------------------ - 3 files changed, 90 deletions(-) - -commit 391b5d5cdd9f63fe90229f88cdad628fb63c0206 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Aug 1 23:36:09 2008 +0200 - - Get rid of more defines, say our version on command line tools, - also say our copyright - - Did not modify PSOutputDev.cc output as PS is too fragile - - msvc/poppler/poppler-config.h | 9 +-------- - poppler-config.h.cmake | 9 +-------- - poppler/PSOutputDev.cc | 2 +- - poppler/poppler-config.h.in | 9 +-------- - utils/pdffonts.cc | 3 ++- - utils/pdfimages.cc | 3 ++- - utils/pdfinfo.cc | 3 ++- - utils/pdftohtml.cc | 3 ++- - utils/pdftoppm.cc | 3 ++- - utils/pdftops.cc | 3 ++- - utils/pdftotext.cc | 3 ++- - 11 files changed, 18 insertions(+), 32 deletions(-) - -commit d14fb1513be045363f7edec21cee04fd4937ede2 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Aug 1 23:14:28 2008 +0200 - - Add GooList *getEncodingNames(); - - Forgot to commit this earlier :-( - - poppler/GlobalParams.cc | 19 +++++++++++++++++++ - poppler/GlobalParams.h | 2 ++ - 2 files changed, 21 insertions(+) - -commit 9fd34443d765ccd61864d18bceadc049d905b957 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Aug 1 23:09:39 2008 +0200 - - remove defines we don't use at all - - msvc/poppler/poppler-config.h | 4 ---- - poppler-config.h.cmake | 4 ---- - poppler/poppler-config.h.in | 4 ---- - 3 files changed, 12 deletions(-) - -commit 0f13013dc3079915572b6b002dac8d01d2dbde04 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Aug 1 23:06:50 2008 +0200 - - xpdfrc has been dead for a while - - msvc/poppler/poppler-config.h | 25 ------------------------- - poppler-config.h.cmake | 25 ------------------------- - poppler/poppler-config.h.in | 25 ------------------------- - 3 files changed, 75 deletions(-) - -commit 96392667d1331d2f8750f27c116e34bbf9282dca -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Aug 1 22:20:55 2008 +0200 - - Provide a default constructor for FontInfo so you can use it as - metatype for qvariant - - qt4/src/poppler-fontinfo.cc | 5 +++++ - qt4/src/poppler-private.h | 7 +++++++ - qt4/src/poppler-qt4.h | 5 +++++ - 3 files changed, 17 insertions(+) - -commit 9fd1077e63d97a316380b8df4821bf4c9434fb52 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Aug 1 17:47:51 2008 +0200 - - Build with cmake too - - utils/CMakeLists.txt | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit d8d6a3f46620d45c279b7ca1a4a2fa3a36285cde -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Aug 1 17:44:07 2008 +0200 - - Improve manpages and add -listenc to pdfinfo and pdftotext in the way - - Our manpages listed things like xpdfrc and -cfg options we don't - support at all. - Also some options were missing from the man pages - Finally there was the -enc option you completely had to guess which - string to pass, - so i've added the -listenc option to get the user the list of - encodings he can use - - utils/Makefile.am | 2 ++ - utils/pdffonts.1 | 18 ------------------ - utils/pdfimages.1 | 14 -------------- - utils/pdfinfo.1 | 28 ++++------------------------ - utils/pdfinfo.cc | 16 ++++++++++++++-- - utils/pdftoppm.1 | 42 +++++++++++++++++++++--------------------- - utils/pdftops.1 | 41 +++-------------------------------------- - utils/pdftotext.1 | 32 ++++---------------------------- - utils/pdftotext.cc | 16 ++++++++++++++-- - utils/printencodings.cc | 34 ++++++++++++++++++++++++++++++++++ - utils/printencodings.h | 24 ++++++++++++++++++++++++ - 11 files changed, 120 insertions(+), 147 deletions(-) - -commit f5b0ca794b0879e3d239bf1d6138b15ead27d9ca -Author: Adrian Johnson <ajohnson@redneon.com> -Date: Tue Jul 29 20:18:33 2008 +0930 - - Fix ActualText string length check in TextOutputDev.cc - - poppler/TextOutputDev.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 21bbdc9d663995336900f1ce97cf294f04464e01 -Author: Boris Toloknov <tlknv@yandex.ru> -Date: Mon Jul 28 21:02:07 2008 +0200 - - make xml output valid xml - - utils/HtmlLinks.cc | 33 ++++++++++++++++++-- - utils/HtmlOutputDev.cc | 85 - ++++++++++++++++++++++++++++++++------------------ - 2 files changed, 85 insertions(+), 33 deletions(-) - -commit dccfc4c2910b47a77cd7b6019d9365f1684ffd0c -Author: Boris Toloknov <tlknv@yandex.ru> -Date: Mon Jul 28 20:58:13 2008 +0200 - - Limit ascent and descent are to reasonable values. - - See bug 16592 to cases where this helps - - utils/HtmlOutputDev.cc | 14 ++++++++++++-- - 1 file changed, 12 insertions(+), 2 deletions(-) - -commit 0fd5a3db1ddad447d44b64eff9abfb077a7853a0 -Author: Boris Toloknov <tlknv@yandex.ru> -Date: Mon Jul 28 20:52:19 2008 +0200 - - Make html output to keep all the spaces with   - - utils/HtmlFonts.cc | 2 ++ - utils/HtmlOutputDev.cc | 2 +- - 2 files changed, 3 insertions(+), 1 deletion(-) - -commit 650c73fa0f570f699d907e33060fb23290940b42 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Jul 28 20:44:13 2008 +0200 - - findDest crashes on null goostrings so rework the ifs a bit - - utils/HtmlOutputDev.cc | 16 +++++++++------- - 1 file changed, 9 insertions(+), 7 deletions(-) - -commit adee9c0e9e8b2de20309b3ae6eb8e6d6ed05cf85 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Jul 26 00:04:03 2008 +0200 - - We are not storing the ctu, so decref and leak-- :-) - - poppler/Annot.cc | 1 + - 1 file changed, 1 insertion(+) - -commit e7b3e3ae3080bd6f239f7d96761729ad30b075ae -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Jul 25 23:52:28 2008 +0200 - - Fix leak - - qt4/src/poppler-form.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 006b974d4faae53e6bd51a4281dd923ab1c2d4e8 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Jul 25 23:15:11 2008 +0200 - - Fix memory leak - - poppler/Annot.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 3a549d75acceedfa25dcf79074d0cdfb643c746e -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Jul 25 23:08:21 2008 +0200 - - Free the previous modified object in case it exists - - poppler/XRef.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 040d244b97a554342061c777a286e99dbb9acabd -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Jul 25 21:31:55 2008 +0200 - - Need this or otherwise it crashes on complete overwrite - - poppler/PDFDoc.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 11ebceeef938a7e6fa9b5437e65b5b4b822f3018 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Jul 25 21:30:24 2008 +0200 - - Fix my last fix about saving, i think this is the correct one - - - One incremental update only write the modified entries xref, - not all - - Update gen to 0 when resizing entries - - On XRef::add correctly initialize all newly allocated entries - - poppler/PDFDoc.cc | 4 ++-- - poppler/XRef.cc | 57 - ++++++++++++++++++++++++++++++++++++++++++++----------- - poppler/XRef.h | 2 +- - 3 files changed, 49 insertions(+), 14 deletions(-) - -commit 03d445f485f90972ab1c05d79b2999b763ab7377 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Jul 25 20:16:54 2008 +0200 - - Fix XRef::writeToFile after my change - - poppler/XRef.cc | 10 +++------- - 1 file changed, 3 insertions(+), 7 deletions(-) - -commit 136fa97576f2df0d7a7563b34651ca222927ea57 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Jul 25 20:12:51 2008 +0200 - - Fix XRef::add and XRef::addIndirectObject, also remove num from - XRefEntry - - Previous code was under some incorrect assumptions: - * our XRef does not maintain the free link list so if you want to - find a free entry you have to go though all of them - * our XRefEntry does not need a num because the index itself is - the num - - Conflicts: - - poppler/XRef.cc - - poppler/XRef.cc | 70 - +++++++++++++++++++++------------------------------------ - poppler/XRef.h | 1 - - 2 files changed, 25 insertions(+), 46 deletions(-) - -commit 55572b77da95c47393b78f3aff804ea9c5ae17e5 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Jul 22 22:50:00 2008 +0200 - - Really do what the comment says and also init changeLeft, changeTop - and changeZoom - - poppler/Link.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 8dc7afaeea08183de331ecfd41ce1971e7772fd0 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Jul 22 21:05:03 2008 +0200 - - Some documents have loops in XObject dictionaries, make sure we - don't get in an infinite loop while traversing them - - Fixes infinite loop on http://bugs.kde.org/show_bug.cgi?id=166145 - - poppler/FontInfo.cc | 44 ++++++++++++++++++++++++++++++++++++-------- - poppler/FontInfo.h | 4 ++++ - 2 files changed, 40 insertions(+), 8 deletions(-) - -commit 9fb17c952dcff798e45280eeb9c718680147e766 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Jul 20 13:47:11 2008 +0200 - - Fix condition, we want thumb to be a Stream, not to be non null - - Fixes bug 16579 - - glib/poppler-page.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 3696025977fd345b12767f75a2de6ed7e9467365 -Author: Pino Toscano <pino@kde.org> -Date: Fri Jul 18 23:32:25 2008 +0200 - - initialize pageWidgets, otherwise it can be a rubbish pointer - is Annots - is not a valid object - - poppler/Page.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 0189ff8b86de18486f7397076f7a0fbf133a1a33 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Jul 1 20:16:50 2008 +0200 - - Fix condition, we want fetched_thumb to be a Stream, not to be - non null - - Fixes bug 16579 - - poppler/Page.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 5bd77dcdd5220d63934f4b3e78d85a936947a53d -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Jul 1 00:49:01 2008 +0200 - - forgot about we use autofoo too - - qt4/tests/Makefile.am | 5 +++++ - 1 file changed, 5 insertions(+) - -commit 5ed2503003d973b5461594af15485af49591451d -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Jul 1 00:43:26 2008 +0200 - - unittesting about ActualText - - qt4/tests/CMakeLists.txt | 1 + - qt4/tests/check_actualtext.cpp | 33 +++++++++++++++++++++++++++++++++ - 2 files changed, 34 insertions(+) - -commit f3bb2eb556f5248242f6db85052ef045fcb697c6 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Jul 1 00:41:35 2008 +0200 - - Unbreak ActualText extraction - - poppler/Gfx.cc | 10 +--------- - 1 file changed, 1 insertion(+), 9 deletions(-) - -commit 9e9543b105b39f8b0048c00fc94741e43ad615e9 -Author: Pino Toscano <pino@kde.org> -Date: Thu Jun 26 20:19:06 2008 +0200 - - use FindPackageHandleStandardArgs - - cmake/modules/FindLIBOPENJPEG.cmake | 11 ++--------- - 1 file changed, 2 insertions(+), 9 deletions(-) - -commit fec41ceddebe194f139bcc5b2f3fa74e7d1ae502 -Author: Pino Toscano <pino@kde.org> -Date: Thu Jun 26 20:18:27 2008 +0200 - - need to use LIBOPENJPEG_FOUND, as it really represents whether - libopenjpeg was found or not - - CMakeLists.txt | 18 +++++++++--------- - 1 file changed, 9 insertions(+), 9 deletions(-) - -commit 5498d93e59a0b79e5add3dc6181d5e98ba689217 -Author: Michael Vrable <mvrable@cs.ucsd.edu> -Date: Fri Jun 20 21:42:34 2008 -0700 - - Use a single global FT_Library in CairoOutputDev - - Cairo may internally keep references to the FreeType fonts loaded in - CairoFontEngine even after poppler is done with them. Commit - 42db4890e829 - ("Do not call FT_Done_Face on a live cairo_font_face_t") introduced - a fix - for one use-after-free bug, by delaying deleting an FT_Face objects - until - cairo is done with it. - - That fix doesn't correct all the bugs. An FT_Library object is - created for - each CairoOutputDev object, and deleted when the CairoOutputDev - goes away. - But the FT_Library object should not be deleted while fonts loaded - using it - are still in use. And cairo can keep references to fonts around - more or - less indefinitely. - - To more fully fix the problem, we can either: - 1. Keep a count of not-yet-deleted fonts associated with each - FT_Library, - and wait to call FT_Done_FreeType until it drops to zero. - 2. Never call FT_Done_FreeType. - - The second option is the simplest. To avoid leaking memory FT_Library - objects, use a single global FT_Library instead of a - per-CairoOutputDev - copy. - - poppler/CairoOutputDev.cc | 18 +++++++++++++++--- - poppler/CairoOutputDev.h | 4 +++- - 2 files changed, 18 insertions(+), 4 deletions(-) - -commit c75632d62a052d3c3739b96f5586f97c68baf25b -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Jun 24 02:31:43 2008 +0200 - - Open in WriteOnly mode, fixes the fact that when writing to an - existing file, the contents beyond what we wrote were still there - - qt4/src/poppler-base-converter.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 9810fdfc54aac80aa99561a9d820d11b062e4637 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Jun 24 02:12:21 2008 +0200 - - the entry is not updated here either, fix uninitialized variable use - - poppler/XRef.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 2da15db4751d3cb93d40b48e348dbc51f6e7a29f -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri Jun 20 11:39:08 2008 +0200 - - Do not create an OCGs object if there isn't an OCProperties dictionary - in the Catalog - - poppler/Catalog.cc | 5 +++-- - poppler/Gfx.cc | 12 +++++++++++- - poppler/OptionalContent.cc | 25 +++++-------------------- - 3 files changed, 19 insertions(+), 23 deletions(-) - -commit d6fb5dcb7b7596961800d9744d17b6adb8d9a2ad -Author: Michael Vrable <mvrable@cs.ucsd.edu> -Date: Wed Jun 18 11:24:05 2008 -0700 - - Fix a crash in the cairo backend with Type 3 glyphs - - Commit 86b7e8a3bee7 ("Ensure cairo renders Type 3 glyphs with only - the fill - color") introduced a bug into the Cairo backend, causing evince - to crash - with the message - evince: cairo-pattern.c:679: cairo_pattern_destroy: Assertion - `((*&(&pattern->ref_count)->ref_count) > 0)' failed. - Fix this by updating reference counts to the fill and stroke - patterns when - modifying them in beginType3Char. - - Simplify the code as well by not saving the old stroke pattern before - overriding it; this is already done since beginType3Char/endType3Char - is - wrapped by calls to saveState/restoreState in Gfx::doShowText. - - poppler/CairoOutputDev.cc | 4 ++-- - poppler/CairoOutputDev.h | 2 +- - 2 files changed, 3 insertions(+), 3 deletions(-) - -commit c3a00c83f1d24c1f88e7ed3b3f772460e578f3cc -Author: Pino Toscano <pino@kde.org> -Date: Sun Jun 15 02:39:31 2008 +0200 - - poppler-page-transition.h is here now - - qt4/src/Doxyfile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 2affed0fc97b958ae46f531c471a3cf0b04c0f55 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Jun 14 01:24:49 2008 +0200 - - Give warnings if the build configuration for stream decoders is - different from default one - - configure.ac | 20 +++++++++++++++++--- - 1 file changed, 17 insertions(+), 3 deletions(-) - -commit 8e74bc612cb4102891324ffdbfcdb47293ecb95e -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Jun 14 01:13:53 2008 +0200 - - Warn the user if he does not have any enabled rendering backend - - configure.ac | 3 +++ - 1 file changed, 3 insertions(+) - -commit 99d2361032cbaafd69bd796170757ed6482f208d -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Jun 14 00:53:38 2008 +0200 - - Add a JPEG2000 decoder based on OpenJPEG - - Enabled by default since it's generally better than xpdf one - See - http://lists.freedesktop.org/archives/poppler/2008-June/003874.html - for more information - - CMakeLists.txt | 30 +++++- - cmake/modules/FindLIBOPENJPEG.cmake | 44 +++++++++ - configure.ac | 33 +++++++ - poppler/JPEG2000Stream.cc | 181 - ++++++++++++++++++++++++++++++++++++ - poppler/JPEG2000Stream.h | 48 ++++++++++ - poppler/Makefile.am | 22 ++++- - poppler/Stream.cc | 7 +- - 7 files changed, 360 insertions(+), 5 deletions(-) - -commit e368838d7f9691c7b1adf7d7f62f65abed91eea7 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Jun 11 00:48:53 2008 +0200 - - [Qt4] Add the possibility of getting a QByteArray with the data of - an embedded font - - qt4/src/poppler-document.cc | 23 +++++++++++++++++++++++ - qt4/src/poppler-private.h | 3 +++ - qt4/src/poppler-qt4.h | 5 +++++ - 3 files changed, 31 insertions(+) - -commit 184292ffb8fef5aa5a72bdbfcc0c95b663f452bd -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Jun 10 23:00:11 2008 +0200 - - Make the fontRef and the embRef accessible to FontInfo users - - poppler/FontInfo.cc | 2 +- - poppler/FontInfo.h | 3 +++ - 2 files changed, 4 insertions(+), 1 deletion(-) - -commit 86b7e8a3bee74c5b89c451137cf9c2758ba6913f -Author: Adrian Johnson <ajohnson@redneon.com> -Date: Sun Jun 8 18:00:05 2008 +0930 - - Ensure cairo renders Type 3 glyphs with only the fill color - - poppler/CairoOutputDev.cc | 3 +++ - poppler/CairoOutputDev.h | 2 +- - 2 files changed, 4 insertions(+), 1 deletion(-) - -commit 99e2d95728f41c91ab59a01c62d82b19a7a2e083 -Author: Adrian Johnson <ajohnson@redneon.com> -Date: Sun Jun 1 00:49:32 2008 +0930 - - glib: save/restore cairo state when rendering a page - - glib/poppler-page.cc | 2 ++ - 1 file changed, 2 insertions(+) - -commit 6f40ee4af6b59f9d2c326adc8d2574e45f4d4d29 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Jun 8 23:46:04 2008 +0200 - - Make sure we use Qt4 moc to generate moc files of the qt4 frontend - - configure.ac | 20 ++++++++++++++++++++ - qt4/demos/Makefile.am | 2 +- - qt4/src/Makefile.am | 2 +- - qt4/tests/Makefile.am | 2 +- - 4 files changed, 23 insertions(+), 3 deletions(-) - -commit 86aa8fc0708f7da4a907a8bdb1845e53d29892b7 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Jun 5 19:21:08 2008 +0200 - - Fix leak on ABWOutputDev.cc - - poppler/ABWOutputDev.cc | 2 ++ - 1 file changed, 2 insertions(+) - -commit 979ef1cafa968d776a2b804ce555b11212212397 -Author: Koji Otani <sho@bbr.jp> -Date: Tue Jun 3 21:07:15 2008 +0200 - - Support for surrogates outside the BMP plane - - poppler/TextOutputDev.cc | 19 ++++++++++++++++++- - poppler/UTF8.h | 14 ++++++++++++++ - 2 files changed, 32 insertions(+), 1 deletion(-) - -commit 1614ab3036cf25c9b94967163996678d386ce0ac -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Jun 1 16:32:55 2008 +0200 - - Do not limit CharCodeToUnicodeString to 8 characters - - poppler/Annot.cc | 10 +++++----- - poppler/CharCodeToUnicode.cc | 37 +++++++++++++++++++++---------------- - poppler/CharCodeToUnicode.h | 2 +- - poppler/Gfx.cc | 8 ++++---- - poppler/GfxFont.cc | 43 - ++++++++++++++++++++++++------------------- - poppler/GfxFont.h | 6 +++--- - poppler/PSOutputDev.cc | 4 ++-- - 7 files changed, 60 insertions(+), 50 deletions(-) - -commit bf95c6970dacaa62512de858cf60ff6cf0c1bf7c -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Jun 1 00:07:11 2008 +0200 - - [Qt] Fix leak when calling Poppler::Document::scanForFonts - - qt/poppler-document.cc | 1 + - 1 file changed, 1 insertion(+) - -commit d21d7271fc74ab78cd157549138d0027cf179471 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat May 31 23:57:31 2008 +0200 - - Make sure file exists before printing it - - utils/HtmlOutputDev.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 0480a788c0f25af1bc09360b599debb37f831e10 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue May 27 23:20:32 2008 +0200 - - require gthread-2.0 - - cmake/modules/FindGTK.cmake | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -commit 2e40ef652eb9fca7fe947acb2adfecc96ad3c50e -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon May 26 22:13:38 2008 +0200 - - Do not shadow a paramer with a local variable name - - qt4/src/poppler-page.cc | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -commit 1fd856aa1fb48869111e5b86f263bfd94fa7af17 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon May 26 20:52:53 2008 +0200 - - Do not leak tSplash if transpGroupStack->blendingColorSpace is NULL - - poppler/SplashOutputDev.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 492209ec8648342a3a5447611f3f1ce63b63e8e9 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon May 26 20:51:06 2008 +0200 - - Move variables only used inside the loop inside the loop, fix delete - of uninitialized data due to my previous patch - - poppler/Page.cc | 16 ++++++---------- - 1 file changed, 6 insertions(+), 10 deletions(-) - -commit 79ab8cceb318f3bb5ebad431824e3ae593aea340 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon May 26 20:38:59 2008 +0200 - - Do not leak memory if data_out is NULL - - poppler/Page.cc | 35 ++++++++++++++++++----------------- - 1 file changed, 18 insertions(+), 17 deletions(-) - -commit f44c33344d4af31ee008826179bcd92db445f35a -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun May 25 19:16:12 2008 +0200 - - [glib] Init glib threads in demo app as required by g_timer - - configure.ac | 4 ++-- - glib/demo/main.c | 4 ++++ - 2 files changed, 6 insertions(+), 2 deletions(-) - -commit 58d5b7b9ab9ac245481299c4765f3bd305580d2e -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed May 21 22:18:29 2008 +0200 - - [Qt4] Fix text() method - - I'm not sure this is the real and correct fix, but it works more - than previous code so it's and improvement - - qt4/src/poppler-page.cc | 6 +----- - 1 file changed, 1 insertion(+), 5 deletions(-) - -commit e3e4113c73128f49f99289b592446d4382b5d65c -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon May 12 15:39:43 2008 +0200 - - Add getters to some TextBlock members. - - Needed by some reader using poppler internals, bad you! - - poppler/TextOutputDev.h | 5 +++++ - 1 file changed, 5 insertions(+) - -commit ff699e64bd1de78915aad4ddb79d6f529aef2b87 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun May 11 23:44:50 2008 +0200 - - Check the OC we found exists before using it - - Fixes crash http://bugs.freedesktop.org/show_bug.cgi?id=15899 - - poppler/OptionalContent.cc | 33 ++++++++++++++++++--------------- - 1 file changed, 18 insertions(+), 15 deletions(-) - -commit ac26ba5148b99a03a56e37ba201ad420b8619943 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri May 9 20:17:37 2008 +0200 - - Do not crash on unlock with wrong password - - qt/poppler-private.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 19ec5a531cb03a7bee1cfcc9c7d5c4390fbd069d -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu May 8 23:15:58 2008 +0200 - - Fix build with --enable-fixedpoint - - splash/Splash.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 1cf5f0fda542efef575a123622637d81b9c42053 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed May 7 18:49:28 2008 +0200 - - [Qt] Fix Document::unlock - - qt/poppler-document.cc | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -commit b5041924eb023cc095f2445935ff713cf65dacce -Author: Pino Toscano <pino@kde.org> -Date: Wed May 7 16:44:03 2008 +0200 - - do not delete the GooString owned by an Object - - poppler/Annot.cc | 4 ---- - 1 file changed, 4 deletions(-) - -commit 546a7b700862db00240de9fd50bdba1dd347765b -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun May 4 15:26:26 2008 +0200 - - Fix leaks on error conditions - - poppler/Annot.cc | 6 ++++++ - poppler/ArthurOutputDev.cc | 1 + - poppler/JBIG2Stream.cc | 1 + - 3 files changed, 8 insertions(+) - -commit 914f1b1d814ab3d958aa0ca21ad73ef5aed20b89 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat May 3 18:21:28 2008 +0200 - - A widget annot does not always belong to a form, so check before - accessing the widget member - - poppler/Annot.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit c907e41ab18dda10cd3c9789bd0e7fe71b6402a8 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Apr 30 00:42:34 2008 +0200 - - findSegment can return NULL check for it - - poppler/JBIG2Stream.cc | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit 8b7f29b577bca3295e99fea4a5cf4a6bb7ba2617 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Apr 30 00:26:28 2008 +0200 - - new[] implies delete[] - - poppler/ABWOutputDev.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 926c13825d5f7364286975db8ffa507b92f4b3ab -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Apr 29 23:44:51 2008 +0200 - - add lost return when adding kees patch - - poppler/Object.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit ba9283f6bc78e97006e52ef5de20c958ee9e1a37 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Apr 29 23:42:00 2008 +0200 - - make the function static - - utils/pdftoppm.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 931a8272f556ba8a35342f0c5bf53bdb57ea7a31 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Apr 29 23:41:31 2008 +0200 - - make the variable static - - utils/pdftoabw.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 1887d2910d2006c7fc3ecc95db0150f1537e9d0a -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Apr 29 23:35:17 2008 +0200 - - constify some static arrays - - poppler/CompactFontTables.h | 2 +- - poppler/Decrypt.cc | 8 ++++---- - poppler/Function.cc | 2 +- - poppler/GfxFont.cc | 6 +++--- - poppler/GfxState.cc | 4 ++-- - poppler/JBIG2Stream.cc | 10 +++++----- - poppler/JPXStream.cc | 4 ++-- - poppler/Lexer.cc | 2 +- - poppler/PSOutputDev.cc | 6 +++--- - poppler/PSTokenizer.cc | 2 +- - poppler/SplashOutputDev.cc | 2 +- - poppler/Stream-CCITT.h | 12 ++++++------ - poppler/Stream.cc | 10 +++++----- - poppler/UnicodeTypeTable.cc | 2 +- - 14 files changed, 36 insertions(+), 36 deletions(-) - -commit 51140e2d9490696d716f77d3225da0bfdfc212b4 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Apr 29 23:14:59 2008 +0200 - - more static markers - - poppler/Annot.cc | 2 +- - poppler/DCTStream.cc | 2 +- - poppler/Object.cc | 2 +- - poppler/SplashOutputDev.cc | 2 +- - 4 files changed, 4 insertions(+), 4 deletions(-) - -commit 893703cb9eee879f728db329f7ee1fc19e7f980e -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Apr 29 23:03:51 2008 +0200 - - add static - - poppler/XRef.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 7333bc913111e56ee241b7ef2bf6e9fea68b7da2 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Apr 29 23:01:13 2008 +0200 - - add static - - poppler/JBIG2Stream.cc | 30 +++++++++++++++--------------- - 1 file changed, 15 insertions(+), 15 deletions(-) - -commit 1ea36507f9c9f163b6772268046e7560d0c00dbc -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Apr 29 22:47:19 2008 +0200 - - make findModifier static - - poppler/GlobalParams.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit be9961571dbfabb982e6f69abd3bbc98fa971864 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Apr 29 21:48:09 2008 +0200 - - make variables not used outside static - - utils/pdftohtml.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit b157064a85350da6ea9c4f46e965e45ebc59d227 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Apr 29 21:43:23 2008 +0200 - - constify setPSPaperSize - - utils/pdftops.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit ee57ead8a6f34fa8de044399e5912395e0f3a425 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Apr 29 21:37:57 2008 +0200 - - constify argDesc arrays - - Gives me binaries 2KB smaller (in total) in release build - - utils/parseargs.c | 18 +++++++++--------- - utils/parseargs.h | 4 ++-- - utils/pdffonts.cc | 2 +- - utils/pdfimages.cc | 2 +- - utils/pdfinfo.cc | 2 +- - utils/pdftoabw.cc | 2 +- - utils/pdftohtml.cc | 2 +- - utils/pdftoppm.cc | 2 +- - utils/pdftops.cc | 2 +- - utils/pdftotext.cc | 2 +- - 10 files changed, 19 insertions(+), 19 deletions(-) - -commit 9f93d9eb464877e0d23dcf205295da9162f03253 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Apr 29 20:45:01 2008 +0200 - - make psOpNames static - - Makes my release build 64 bytes smaller - - poppler/Function.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 29e3e779c68371b7c4aadcf68ee0712046f39c6d -Author: Pino Toscano <pino@kde.org> -Date: Sat Apr 26 23:47:01 2008 +0200 - - remember to call the base implementation here - - qt4/demos/optcontent.cpp | 1 + - 1 file changed, 1 insertion(+) - -commit a188f3cd36775d78ace5b5d62c8ab7c059b3b2b1 -Author: Pino Toscano <pino@kde.org> -Date: Sat Apr 26 23:42:09 2008 +0200 - - reset the current page to 0, when closing a document - - qt4/demos/viewer.cpp | 1 + - 1 file changed, 1 insertion(+) - -commit 7eca6da6436ffc1c41cfed1a07be4dafa1172463 -Author: Pino Toscano <pino@kde.org> -Date: Sat Apr 26 23:41:45 2008 +0200 - - no need to manually disconnect from the model, as it will be deleted - by the document anyway - - qt4/demos/optcontent.cpp | 1 - - 1 file changed, 1 deletion(-) - -commit 6cddda7f3c3b8ddb95e6aba1b234a27c4454c23d -Author: Pino Toscano <pino@kde.org> -Date: Sat Apr 26 22:41:59 2008 +0200 - - sync updateFont() with SplashOutputDev - - poppler/ArthurOutputDev.cc | 75 - ++++++++++++++++++++++++++++++++++++---------- - 1 file changed, 59 insertions(+), 16 deletions(-) - -commit ddc7c1f8c24762bae615e7dec92e92a58c827478 -Author: Pino Toscano <pino@kde.org> -Date: Sat Apr 26 18:12:51 2008 +0200 - - construct AnnotPolygon for Polygon and PolyLine annotations - - poppler/Annot.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit f9c7e8037b7165b6271ce7aea0d315053c4d66a5 -Merge: 59d33d8e f5fec4fd -Author: Pino Toscano <pino@kde.org> -Date: Sat Apr 26 18:09:59 2008 +0200 - - Merge branch 'master' of - ssh://pino@git.freedesktop.org/git/poppler/poppler - -commit 59d33d8e99673f73ccf2ad9a62bd25fca51f0eb8 -Author: Pino Toscano <pino@kde.org> -Date: Sat Apr 26 17:56:42 2008 +0200 - - use the base implementation to update all the states - - poppler/ArthurOutputDev.cc | 11 +---------- - 1 file changed, 1 insertion(+), 10 deletions(-) - -commit 45d2a9529bf241554c59437118cb8c705554dc27 -Author: Pino Toscano <pino@kde.org> -Date: Sat Apr 26 17:55:39 2008 +0200 - - Set the font antialiasing from the painter settings, instead of the - global settings. - - poppler/ArthurOutputDev.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 5faa72fd70e0d85268e807a8b870d80dda9189a9 -Author: Pino Toscano <pino@kde.org> -Date: Sat Apr 26 17:53:28 2008 +0200 - - Get the font and painter matrices, and reenable the font drawing. - - poppler/ArthurOutputDev.cc | 28 +++++++++++++++++++++------- - 1 file changed, 21 insertions(+), 7 deletions(-) - -commit f5fec4fdedd8d316b19968545e447e2036a1bb47 -Author: Kees Cook <kees@outflux.net> -Date: Wed Apr 23 19:53:03 2008 +0200 - - provide type-checking for union pointer accesses - - poppler/Object.h | 68 - +++++++++++++++++++++++++++++++++++--------------------- - 1 file changed, 43 insertions(+), 25 deletions(-) - -commit a567c921ce538616f4ba0b7933086ef5a8ab0f55 -Author: Iñigo Martínez <inigomartinez@gmail.com> -Date: Tue Apr 22 23:09:10 2008 +0200 - - Little change to avoid AnnotWidget crashing when they aren't related - to FormWidgets. - - Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com> - - poppler/Annot.cc | 19 ++++++++++--------- - 1 file changed, 10 insertions(+), 9 deletions(-) - -commit 73798c95b8a4c0504e9246e6f73fd31f812ad6fa -Author: Albert Astals Cid <tsdgeos@bluebox.(none)> -Date: Mon Apr 21 19:56:52 2008 +0200 - - Link to pthread when needed - - Should fix bug 15625 - - configure.ac | 2 + - m4/acx_pthread.m4 | 280 - ++++++++++++++++++++++++++++++++++++++++++++++++++++ - poppler/Makefile.am | 4 + - 3 files changed, 286 insertions(+) - -commit 6c248bdad77235a45402d9693a0b822cc208b6b9 -Author: Pino Toscano <pino@kde.org> -Date: Sun Apr 20 18:32:59 2008 +0200 - - the dtor should be virtual - - qt4/src/poppler-converter-private.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 68dba1a452ca70add5b05ab8e2adab838bc2cb73 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Apr 20 16:21:10 2008 +0200 - - if ncand is a Guint cand should be one too - - poppler/CMap.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 0b91eb19f5a3d07b625ee5188f1fcb4b4b1544ea -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Apr 20 16:17:50 2008 +0200 - - Unused var-- - - poppler/GfxFont.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 1ed3cc40987b691319fd9f1a30296d80de5732fd -Author: Pino Toscano <pino@kde.org> -Date: Wed Apr 16 15:45:45 2008 +0200 - - fix border style conversion - - qt4/src/poppler-page.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 7c8feb4e3627bde2052a7e536d2d49d1cbbce8ee -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Apr 15 21:57:31 2008 +0200 - - Hack to "support" 16 bits images - - Everywhere we assume a component fits in 8 bits, with this hack - we treat 16 bit images as 8 bit ones until it's fixed correctly. - Fixes http://bugs.kde.org/show_bug.cgi?id=158165 - - poppler/GfxState.cc | 6 ++++++ - poppler/Stream.cc | 9 +++++++++ - 2 files changed, 15 insertions(+) - -commit f338a9ded5d42dd65853c5c7bbe27f6724096416 -Author: Pino Toscano <pino@kde.org> -Date: Sun Apr 13 21:41:51 2008 +0200 - - [Qt4] convert the sound annotations - - qt4/src/poppler-page.cc | 16 ++++++++++++++-- - 1 file changed, 14 insertions(+), 2 deletions(-) - -commit 733d51fca04ee682fed2242f868edd545f3755fa -Author: Pino Toscano <pino@kde.org> -Date: Sun Apr 13 21:38:25 2008 +0200 - - [Qt4] First version of a SoundAnnotation. - - qt4/src/poppler-annotation.cc | 87 - +++++++++++++++++++++++++++++++++++++++++++ - qt4/src/poppler-annotation.h | 30 ++++++++++++++- - 2 files changed, 116 insertions(+), 1 deletion(-) - -commit feb1ea091111bd7292879c465590acfd7671c876 -Author: Pino Toscano <pino@kde.org> -Date: Sun Apr 13 21:36:26 2008 +0200 - - First version of AnnotSound. - - poppler/Annot.cc | 37 ++++++++++++++++++++++++++++++++++++- - poppler/Annot.h | 26 ++++++++++++++++++++++++++ - 2 files changed, 62 insertions(+), 1 deletion(-) - -commit ec2cf81edf1b2c6707de4d30316ff5f5e24534d4 -Author: Pino Toscano <pino@kde.org> -Date: Sun Apr 13 18:31:21 2008 +0200 - - [Qt4] convert the file attachment annotations - - qt4/src/poppler-page.cc | 15 +++++++++++++-- - 1 file changed, 13 insertions(+), 2 deletions(-) - -commit 9fa2e96c96d365ae67859545ebd635d726784fca -Author: Pino Toscano <pino@kde.org> -Date: Sun Apr 13 18:29:00 2008 +0200 - - [Qt4] Initial version of FileAttachmentAnnotation - - qt4/src/poppler-annotation.cc | 88 - +++++++++++++++++++++++++++++++++++++++++++ - qt4/src/poppler-annotation.h | 29 +++++++++++++- - 2 files changed, 116 insertions(+), 1 deletion(-) - -commit 5899aff11f94e707654574e830e0757b1df558d4 -Author: Pino Toscano <pino@kde.org> -Date: Sun Apr 13 10:50:39 2008 +0200 - - [Qt4] Read the annotations from the core, instead of own parsing. - - Almost all the data are converted correctly, the results seem to be - the same. - Added TODOs in the few parts (not essential) I was not able to figure - out how to convert, yet. - Covert also the Caret annotations. - - qt4/src/poppler-annotation-helper.h | 2 +- - qt4/src/poppler-page.cc | 851 - +++++++++++++++++------------------- - 2 files changed, 393 insertions(+), 460 deletions(-) - -commit 40a12793c5ccea206d79e0c17e2f2d0cf74bb4f3 -Author: Pino Toscano <pino@kde.org> -Date: Sun Apr 13 02:21:55 2008 +0200 - - add getters for the AnnotPolygon properties - - poppler/Annot.h | 6 ++++++ - 1 file changed, 6 insertions(+) - -commit 9311f75d4c3da991efb8afd00701a0ce1cbae1b0 -Author: Iñigo Martínez <inigomartinez@gmail.com> -Date: Sun Apr 13 01:52:36 2008 +0200 - - Almost full AnnotPolygon support. - - Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com> - - poppler/Annot.cc | 99 - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - poppler/Annot.h | 37 +++++++++++++++++++++ - 2 files changed, 136 insertions(+) - -commit 01aa052ed761a4ada471d196985825986bb58627 -Author: Iñigo Martínez <inigomartinez@gmail.com> -Date: Sun Apr 13 01:13:49 2008 +0200 - - Extend AnnotPath behaviour to include cooordinate array parsing. - - Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com> - - poppler/Annot.cc | 96 - ++++++++++++++++++++++++++++++-------------------------- - poppler/Annot.h | 4 ++- - 2 files changed, 55 insertions(+), 45 deletions(-) - -commit ca52830e9519ae7b778f98e5c2547daef7da5f09 -Author: Iñigo Martínez <inigomartinez@gmail.com> -Date: Sun Apr 13 00:54:13 2008 +0200 - - Added OptionalContent support to Annots. - - Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com> - - poppler/Annot.cc | 9 +++------ - poppler/Annot.h | 5 +++-- - 2 files changed, 6 insertions(+), 8 deletions(-) - -commit 4b87196b7829c87d15af4e8b4138ca97548fb519 -Author: Pino Toscano <pino@kde.org> -Date: Sun Apr 13 00:18:24 2008 +0200 - - Isolate the embedded file reading logic into a new EmbFile - constructor. - - This way, it can be shared and reused in various places (Catalog, - AnnotFileAttachment, etc). - - poppler/Catalog.cc | 205 - +++++++++++++++++++++++++++++------------------------ - poppler/Catalog.h | 1 + - 2 files changed, 112 insertions(+), 94 deletions(-) - -commit 45b407e51905948690065749085a4af1cbb29a8e -Author: Pino Toscano <pino@kde.org> -Date: Sun Apr 13 00:14:38 2008 +0200 - - correctly get the FileSpec dictionary - - poppler/Annot.cc | 4 +++- - poppler/Annot.h | 2 +- - 2 files changed, 4 insertions(+), 2 deletions(-) - -commit c3aa3a97d9c553ea7976741d798901352fb5381c -Author: Pino Toscano <pino@kde.org> -Date: Sat Apr 12 22:45:57 2008 +0200 - - properly initialize an AnnotPath - - poppler/Annot.cc | 9 ++------- - 1 file changed, 2 insertions(+), 7 deletions(-) - -commit a3406fb2ace1390db1c181823a7bfc66c9174d98 -Author: Pino Toscano <pino@kde.org> -Date: Sat Apr 12 22:40:42 2008 +0200 - - properly dispose the memory of the ink lists - - poppler/Annot.cc | 13 ++++++++++++- - poppler/Annot.h | 1 + - 2 files changed, 13 insertions(+), 1 deletion(-) - -commit 0dad70e2d12e8b587cab8ce2d914c81c6897a1d1 -Author: Pino Toscano <pino@kde.org> -Date: Sat Apr 12 22:15:35 2008 +0200 - - make AnnotInk working. - - - get the point indexes in the correct way - - dispose with free what you allocate with malloc - - fix logic when checking for an even number of points - - poppler/Annot.cc | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -commit 77404e24ea1e175fc9b55097dc5b35cc34760659 -Author: Pino Toscano <pino@kde.org> -Date: Sat Apr 12 21:08:54 2008 +0200 - - a length is an int - - poppler/Annot.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit bc2b2ffd2144f951c311e968fba4bc50b7c43ff3 -Merge: cd5afe6d bacc1dd9 -Author: Iñigo Martínez <inigomartinez@gmail.com> -Date: Sat Apr 12 17:40:49 2008 +0200 - - Fixed merging conflict. - - Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com> - -commit cd5afe6d9eca687ee224ff7680a8cba28d81a36d -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Apr 12 00:44:08 2008 +0200 - - Do not take into account Colorspace resource subdictionary for - image XObjects - - Fixes bug 15125 - The motivation under that change is on section 4.5.2 of the spec: - Certain objects, such as image XObjects, specify a - color space as an explicit parameter, often associated with the - key ColorSpace. - In this case, the color space array or name is always defined - directly as a PDF - object, not by an entry in the ColorSpace resource - subdictionary. This conven- - tion also applies when color spaces are defined in terms of other - color spaces. - - poppler/Gfx.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit bacc1dd9f37ff19c5e54878a5b08e7d734584bbf -Author: Pino Toscano <pino@kde.org> -Date: Sat Apr 12 17:20:09 2008 +0200 - - Read the "in reply to" reference as such, without reading the - associated annotation dictionary. - - poppler/Annot.cc | 10 ++++------ - poppler/Annot.h | 4 ++-- - 2 files changed, 6 insertions(+), 8 deletions(-) - -commit ffe09454a0948a6107bcc38f23ba2068151c547d -Author: Iñigo Martínez <inigomartinez@gmail.com> -Date: Sat Apr 12 17:17:59 2008 +0200 - - Initial Annot3D parsing a few general improvements. - - Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com> - - poppler/Annot.cc | 130 - +++++++++++++++++++++++++++++++++++++++++++++++++++---- - poppler/Annot.h | 84 +++++++++++++++++++++++++++++------ - 2 files changed, 193 insertions(+), 21 deletions(-) - -commit 8757c577241dda31bc59c7d1c208c159ad428877 -Author: Iñigo Martínez <inigomartinez@gmail.com> -Date: Sat Apr 12 10:38:07 2008 +0200 - - AnnotFileAttachment support. - - Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com> - - poppler/Annot.cc | 38 ++++++++++++++++++++++++++++++++++++-- - poppler/Annot.h | 25 +++++++++++++++++++++++++ - 2 files changed, 61 insertions(+), 2 deletions(-) - -commit 36989658149fc9e5e8a049ce070a102f35b7bddc -Author: Iñigo Martínez <inigomartinez@gmail.com> -Date: Sat Apr 12 09:55:26 2008 +0200 - - AnnotInk support. - - Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com> - - poppler/Annot.cc | 113 - +++++++++++++++++++++++++++++++++++++++++++++++++++++++ - poppler/Annot.h | 45 ++++++++++++++++++++++ - 2 files changed, 158 insertions(+) - -commit 464b171d0e9b989196c287f2ee4dfbbc14212aa9 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Apr 12 00:44:08 2008 +0200 - - Do not take into account Colorspace resource subdictionary for - image XObjects - - Fixes bug 15125 - The motivation under that change is on section 4.5.2 of the spec: - Certain objects, such as image XObjects, specify a - color space as an explicit parameter, often associated with the - key ColorSpace. - In this case, the color space array or name is always defined - directly as a PDF - object, not by an entry in the ColorSpace resource - subdictionary. This conven- - tion also applies when color spaces are defined in terms of other - color spaces. - - poppler/Gfx.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 42db4890e8295aaec5a1be12d1414fc0a9048550 -Author: Chris Wilson <chris@chris-wilson.co.uk> -Date: Thu Mar 27 10:52:22 2008 +0000 - - Do not call FT_Done_Face on a live cairo_font_face_t. - - Currently CairoFont calls FT_Done_Face on its deletion, but the - FT_Face - is usually still in use within cairo. This causes a failure later when - cairo tries to create a glyph from its cairo_font_face_t. - - From http://bugs.freedesktop.org/show_bug.cgi?id=15216: - ==13745== Invalid read of size 4 - ==13745== at 0x51BE572: FT_Load_Glyph (ftobjs.c:549) - ==13745== by 0x4A24921: _cairo_ft_scaled_glyph_init - (cairo-ft-font.c:1922) - ==13745== by 0x4A117AB: _cairo_scaled_glyph_lookup - (cairo-scaled-font.c:1674) - ==13745== by 0x4A12A5A: _cairo_scaled_font_glyph_device_extents - (cairo-scaled-font.c:1124) - ==13745== by 0x4A21ECD: _cairo_analysis_surface_show_glyphs - (cairo-analysis-surface.c:516) - ==13745== by 0x4A144DC: _cairo_surface_show_glyphs - (cairo-surface.c:2086) - ==13745== by 0x4A1FCC8: _cairo_meta_surface_replay_internal - (cairo-meta-surface.c:816) - ==13745== by 0x4A214B1: _paint_page (cairo-paginated-surface.c:299) - ==13745== by 0x4A2171E: _cairo_paginated_surface_show_page - (cairo-paginated-surface.c:445) - ==13745== by 0x4A14BDF: cairo_surface_show_page - (cairo-surface.c:1702) - ==13745== by 0x49FF661: cairo_show_page (cairo.c:2155) - ==13745== by 0xA267D97: - pdf_document_file_exporter_end_page(_EvFileExporter*) - (ev-poppler.cc:1753) - ==13745== Address 0x55c5630 is 88 bytes inside a block of size - 552 free'd - ==13745== at 0x402269C: free (vg_replace_malloc.c:326) - ==13745== by 0x51B7ABC: ft_free (ftsystem.c:158) - ==13745== by 0x51BB319: ft_mem_free (ftutil.c:171) - ==13745== by 0x51BC318: destroy_face (ftobjs.c:856) - ==13745== by 0x51BC3B2: FT_Done_Face (ftobjs.c:1972) - ==13745== by 0x4363704: CairoFont::~CairoFont() - (CairoFontEngine.cc:251) - ==13745== by 0x436401D: CairoFontEngine::getFont(GfxFont*, XRef*) - (CairoFontEngine.cc:335) - ==13745== by 0x4366915: CairoOutputDev::updateFont(GfxState*) - (CairoOutputDev.cc:318) - ==13745== by 0x5093BF1: Gfx::opShowText(Object*, int) (Gfx.cc:3073) - ==13745== by 0x508F901: Gfx::execOp(Object*, Object*, int) - (Gfx.cc:726) - ==13745== by 0x50906FF: Gfx::go(int) (Gfx.cc:594) - ==13745== by 0x5090C96: Gfx::display(Object*, int) (Gfx.cc:557) - - The solution is to release the reference to the cairo_font_face_t upon - destruction of the CairoFont, and then to release the FT_Face from the - destroy notify of the cairo_font_face_t. - - poppler/CairoFontEngine.cc | 19 +++++++++---------- - 1 file changed, 9 insertions(+), 10 deletions(-) - -commit 5f60843824582ece36d806508ec388330ddee854 -Author: Iñigo Martínez <inigomartinez@gmail.com> -Date: Tue Apr 8 00:30:57 2008 +0200 - - Added AnnotCoord support. - - Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com> - - poppler/Annot.cc | 64 - ++++++++++++++++++---------------------------------- - poppler/Annot.h | 69 - ++++++++++++++++++++++++++------------------------------ - 2 files changed, 54 insertions(+), 79 deletions(-) - -commit a6f70f465a3e6719d63cefbe3c27bae015be43c1 -Author: Pino Toscano <pino@kde.org> -Date: Sun Apr 6 13:12:01 2008 +0200 - - add getters for the coordinates in an AnnotLine - - poppler/Annot.h | 4 ++++ - 1 file changed, 4 insertions(+) - -commit 1d83d6edf9a843335e37a4d1e0e0dd71eb23d93b -Author: Pino Toscano <pino@kde.org> -Date: Sun Apr 6 12:24:42 2008 +0200 - - [Qt4] the caret symbol is an enum value, now - - qt4/src/poppler-annotation.cc | 35 ++++++++++++++++++++++++++++------- - qt4/src/poppler-annotation.h | 7 +++++-- - 2 files changed, 33 insertions(+), 9 deletions(-) - -commit 229d991a3258cb9b56f5e00f2deb3c976253cf68 -Author: Pino Toscano <pino@kde.org> -Date: Sun Apr 6 12:23:04 2008 +0200 - - the caret symbol does not seem to allow additional values, so convert - it to an enum - - poppler/Annot.cc | 11 +++++++---- - poppler/Annot.h | 9 +++++++-- - 2 files changed, 14 insertions(+), 6 deletions(-) - -commit fc24500ddd9182f97d23c46eaafc6be79a6721eb -Author: Pino Toscano <pino@kde.org> -Date: Sun Apr 6 11:43:49 2008 +0200 - - propetly initialise a couple of members; leak less - - poppler/ArthurOutputDev.cc | 5 +++++ - 1 file changed, 5 insertions(+) - -commit 9409de1e7c5b3770c7ef00c01ee376953dd532a5 -Author: Iñigo Martínez <inigomartinez@gmail.com> -Date: Sun Apr 6 01:38:25 2008 +0200 - - Changed AnnotFreeText RD field to the new parseDiffRectangle. - - Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com> - - poppler/Annot.cc | 35 ++--------------------------------- - 1 file changed, 2 insertions(+), 33 deletions(-) - -commit 28c5ee2e9fc2a24d2f2efb3d74d5cf882a106239 -Author: Pino Toscano <pino@kde.org> -Date: Sat Apr 5 23:19:33 2008 +0200 - - typo fix - - poppler/Annot.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit ed02769688466ca72bf35d4223c3822a1245604b -Author: Pino Toscano <pino@kde.org> -Date: Sat Apr 5 19:36:21 2008 +0200 - - read the destination of a link annotation - - poppler/Annot.cc | 5 ++++- - poppler/Annot.h | 4 ++-- - 2 files changed, 6 insertions(+), 3 deletions(-) - -commit ca31bf12a9d70bac88e457f7799e9935aba58640 -Author: Pino Toscano <pino@kde.org> -Date: Sat Apr 5 16:48:53 2008 +0200 - - variable forgotten in the copy&paste... - - qt4/src/poppler-annotation.cc | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit 4168daa141b76e5fcd07d046aca8dac2f3037ff9 -Author: Pino Toscano <pino@kde.org> -Date: Sat Apr 5 16:34:12 2008 +0200 - - [Qt4] deserialize also CaretAnnotation's - - qt4/src/poppler-annotation.cc | 3 +++ - 1 file changed, 3 insertions(+) - -commit b55bcc2aa95825863bef23ab96364b350a49949d -Author: Pino Toscano <pino@kde.org> -Date: Sat Apr 5 16:31:31 2008 +0200 - - [Qt4] first version of a CaretAnnotation. - - qt4/src/poppler-annotation.cc | 80 - +++++++++++++++++++++++++++++++++++++++++++ - qt4/src/poppler-annotation.h | 25 +++++++++++++- - 2 files changed, 104 insertions(+), 1 deletion(-) - -commit 4c9a02b7e49666efe10fdc16e7a03d8d520b65ec -Author: Pino Toscano <pino@kde.org> -Date: Sat Apr 5 16:01:58 2008 +0200 - - First version of AnnotCaret. - - poppler/Annot.cc | 36 +++++++++++++++++++++++++++++++++++- - poppler/Annot.h | 22 ++++++++++++++++++++++ - 2 files changed, 57 insertions(+), 1 deletion(-) - -commit d260fe9e514c667b66969b982119429cc922eb07 -Author: Pino Toscano <pino@kde.org> -Date: Sat Apr 5 15:54:29 2008 +0200 - - isolate the code for parsing a "difference rectangle" in an own - function - - poppler/Annot.cc | 54 - +++++++++++++++++++++++++++++++----------------------- - 1 file changed, 31 insertions(+), 23 deletions(-) - -commit 760833e409c122c0a61f7c87fd3133eebc10b402 -Author: Pino Toscano <pino@kde.org> -Date: Sat Apr 5 15:36:43 2008 +0200 - - First version of AnnotGeometry. - - poppler/Annot.cc | 77 - ++++++++++++++++++++++++++++++++++++++++++++++++++++++-- - poppler/Annot.h | 24 ++++++++++++++++++ - 2 files changed, 99 insertions(+), 2 deletions(-) - -commit 95d9d2362534c0524ad0448818b2d69b0909d482 -Author: Pino Toscano <pino@kde.org> -Date: Sat Apr 5 03:23:00 2008 +0200 - - finally, load the QuadPoints correctly - - when checking the validity of the coordinate, do the comparison just - with the proper one (either X or Y); - free the "point" object after each iteration - - poppler/Annot.cc | 11 ++++++++--- - 1 file changed, 8 insertions(+), 3 deletions(-) - -commit af1ffcbcec1730332d11f8da4a7ddac833b22408 -Author: Pino Toscano <pino@kde.org> -Date: Sat Apr 5 02:54:00 2008 +0200 - - More robust reading of QuadPoints (reset the allocated memory, - use the heap) - - poppler/Annot.cc | 7 +++---- - 1 file changed, 3 insertions(+), 4 deletions(-) - -commit 68fd98d69bac20282665cf6b824da30c3b310f0b -Author: Pino Toscano <pino@kde.org> -Date: Sat Apr 5 02:51:41 2008 +0200 - - Really implement AnnotTextMarkup. - - poppler/Annot.cc | 29 +++++++++++++++++++++++++---- - poppler/Annot.h | 2 +- - 2 files changed, 26 insertions(+), 5 deletions(-) - -commit 69a2ecfaf8f8cffd3027db5c3cc88c41413e42f1 -Author: Pino Toscano <pino@kde.org> -Date: Sat Apr 5 01:38:28 2008 +0200 - - Add the Stamp annotation type. - - poppler/Annot.cc | 28 +++++++++++++++++++++++++++- - poppler/Annot.h | 20 ++++++++++++++++++++ - 2 files changed, 47 insertions(+), 1 deletion(-) - -commit 97be4332818bcf58461816be995d88926809a4e5 -Author: Iñigo Martínez <inigomartinez@gmail.com> -Date: Fri Apr 4 23:49:12 2008 +0200 - - Updated glib bindings. - - Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com> - - glib/demo/annots.c | 32 +++++--------------------------- - glib/poppler-annot.cc | 27 +++++---------------------- - glib/poppler-annot.h | 13 +------------ - 3 files changed, 11 insertions(+), 61 deletions(-) - -commit 5caac407cdaf58621ac27e5561b31a995404ccb3 -Author: Iñigo Martínez <inigomartinez@gmail.com> -Date: Fri Apr 4 23:36:46 2008 +0200 - - Fixed icon name in AnnotText. - - Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com> - - poppler/Annot.cc | 25 ++++++------------------- - poppler/Annot.h | 15 +++------------ - 2 files changed, 9 insertions(+), 31 deletions(-) - -commit 0b714a61383da1b62daf2a60e3f6fcda09b4e9f2 -Author: Adam Batkin <adam@batkin.net> -Date: Thu Apr 3 20:02:52 2008 +0200 - - FindFirstFile returns INVALID_HANDLE_VALUE and not NULL on error - - goo/gfile.cc | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -commit be765f27cc5430d9bb2a3e113eb245d67c20a376 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Mar 31 12:37:33 2008 +0200 - - [glib] Fix a crash in outline demo due to page_num == dest_page_num - - 1 - - glib/demo/utils.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit e991e9ac6fcc0b6928b96fe8326eebcf3cb720ca -Author: Albert Astals Cid <tsdgeos@localhost.(none)> -Date: Sat Mar 29 13:25:52 2008 +0100 - - Add the export macro - - qt4/src/poppler-page-transition.h | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -commit b70ca35dce6da6efdff254c11a63de4f44228278 -Author: Albert Astals Cid <tsdgeos@localhost.(none)> -Date: Sat Mar 29 00:30:31 2008 +0100 - - Duplicate page-transition files on qt4 - - qt4/src/CMakeLists.txt | 4 +- - qt4/src/Makefile.am | 4 +- - qt4/src/poppler-page-transition-private.h | 28 ++++++ - qt4/src/poppler-page-transition.cc | 95 +++++++++++++++++++ - qt4/src/poppler-page-transition.h | 146 - ++++++++++++++++++++++++++++++ - 5 files changed, 273 insertions(+), 4 deletions(-) - -commit b5312785063235cef7584ab6a5d198fb72de0988 -Author: Iñigo Martínez <inigomartinez@gmail.com> -Date: Wed Mar 26 23:56:49 2008 +0100 - - Improved glib annot demo. - - Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com> - - glib/demo/annots.c | 314 - ++++++++++++++++++++++++++++++++++++++++++++++++----- - 1 file changed, 289 insertions(+), 25 deletions(-) - -commit 7cc8fd70f68d2cdab7ab83a0ecf6c8896c971d62 -Author: Pino Toscano <pino@kde.org> -Date: Wed Mar 26 21:03:34 2008 +0100 - - remove damn error - - qt4/src/poppler-page.cc.orig | 1317 - ------------------------------------------ - 1 file changed, 1317 deletions(-) - -commit 7a47ff3b54678a3de6964d25050e02186484f39a -Author: Pino Toscano <pino@kde.org> -Date: Wed Mar 26 21:00:32 2008 +0100 - - [Qt4] Add support for JavaScript links, and create them when present. - - qt4/src/poppler-link.cc | 36 ++ - qt4/src/poppler-link.h | 32 +- - qt4/src/poppler-page.cc | 7 + - qt4/src/poppler-page.cc.orig | 1317 - ++++++++++++++++++++++++++++++++++++++++++ - 4 files changed, 1391 insertions(+), 1 deletion(-) - -commit a6f2c10ee01ee62ae945b50f6b6eae380377fe03 -Author: Pino Toscano <pino@kde.org> -Date: Wed Mar 26 20:59:21 2008 +0100 - - [Qt4] Read the document-level JavaScript scripts. - - qt4/src/poppler-document.cc | 15 +++++++++++++++ - qt4/src/poppler-qt4.h | 8 ++++++++ - 2 files changed, 23 insertions(+) - -commit b8a471e55b998836c09c65ff736afdef8ac55189 -Author: Pino Toscano <pino@kde.org> -Date: Wed Mar 26 20:56:01 2008 +0100 - - Add support for JavaScript actions, and read them when found. - - poppler/Link.cc | 33 +++++++++++++++++++++++++++++++++ - poppler/Link.h | 23 +++++++++++++++++++++++ - 2 files changed, 56 insertions(+) - -commit 2fd85dc1b8b2ababadfc60e285c08a844737e4bb -Author: Pino Toscano <pino@kde.org> -Date: Wed Mar 26 20:53:42 2008 +0100 - - Read the JavaScript codes in the NameTree of the Catalog. - - poppler/Catalog.cc | 39 +++++++++++++++++++++++++++++++++++++++ - poppler/Catalog.h | 7 +++++++ - 2 files changed, 46 insertions(+) - -commit 312f14f5b7be1f0d62620477222919423c3869e0 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Mar 26 20:05:31 2008 +0100 - - compile++ - - fofi/FoFiBase.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 5bd750062e1fb136f77a55d1f35b2d6fabaad1b3 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Mar 26 19:42:43 2008 +0100 - - update version - - CMakeLists.txt | 2 +- - configure.ac | 2 +- - msvc/config.h | 6 +++--- - qt4/src/Doxyfile | 2 +- - 4 files changed, 6 insertions(+), 6 deletions(-) - -commit 10d4a8b9aed51902157c04d9deea0e99d829c4f6 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Mar 26 19:42:36 2008 +0100 - - fill news - - NEWS | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -commit 2069826d61ebd527768b6455689276c0a8288085 -Author: Pino Toscano <pino@kde.org> -Date: Wed Mar 26 16:05:06 2008 +0100 - - missing break - - qt4/src/poppler-page.cc | 1 + - 1 file changed, 1 insertion(+) - -commit d6a0c6a6803a03f402c2dcde41c6195e951470ba -Author: Pino Toscano <pino@kde.org> -Date: Wed Mar 26 15:50:39 2008 +0100 - - initialize posterStream to avoid crashing later - - poppler/Movie.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 0be811b3ad86b1cb14be94a017e70c65b8e64730 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Mar 25 22:59:22 2008 +0100 - - Don't end up in an infinite recursive loop in case resObj dict is - the same we are already in - - poppler/FontInfo.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 0222c6ceb0fcf1d7c4422691a68a035a558ad614 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Mar 24 17:14:07 2008 +0100 - - fix build when using cmake, not sure it's completely ok, but at - least i can compile - - CMakeLists.txt | 1 + - cmake/modules/FindGTK.cmake | 23 ++++++++++++++++------- - config.h.cmake | 3 +++ - glib/CMakeLists.txt | 17 +++++++++++------ - glib/poppler-page.cc | 2 +- - glib/test-poppler-glib.cc | 2 +- - 6 files changed, 33 insertions(+), 15 deletions(-) - -commit 3e4164f2db69358adf07596195842dd00458b621 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Mar 24 15:10:31 2008 +0100 - - fix some cmake HAVE_foo - - CMakeLists.txt | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit 22f615aee488cc363a078330861e80f389f47061 -Author: Iñigo Martínez <inigomartinez@gmail.com> -Date: Sun Mar 23 13:22:07 2008 +0100 - - Fixed wrong functions. - - Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com> - - glib/poppler-annot.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit cccfe42ed9c53d27cf6a1403ae55bf34a053012d -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Mar 22 19:12:05 2008 +0100 - - Fix rm line not to error when no *moc file is present - - qt4/src/Makefile.am | 2 +- - qt4/tests/Makefile.am | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit e60d39ba0e8b9742106a0c9b1385b1c907729c3f -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Mar 22 19:11:17 2008 +0100 - - Fix rm line not to error if no *moc file is present - - qt4/demos/Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit d9d52e622c6b28a9941168bb73839ec335ca7232 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Mar 22 19:10:40 2008 +0100 - - Fix configure to not require gdk when we are on try mode - - configure.ac | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -commit 9b8809298dd16cdbffcc12b6db8e274578934063 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Mar 22 15:49:02 2008 +0100 - - It's really only an error if < 0 - - poppler/PDFDoc.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 0fb1e697cc4100ce23298141c8b5829273872423 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Mar 22 15:46:44 2008 +0100 - - remove unneeded variable - - poppler/PDFDoc.cc | 1 - - 1 file changed, 1 deletion(-) - -commit 3404cb626ee9b4520d6fe601e07560745a4cb42a -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Mar 22 15:44:50 2008 +0100 - - Remove OutStream::reset since noone uses it - - This way we have a fseek less to care about if worked or not - - poppler/Stream.cc | 5 ----- - poppler/Stream.h | 5 ----- - qt4/src/poppler-qiodeviceoutstream-private.h | 1 - - qt4/src/poppler-qiodeviceoutstream.cc | 5 ----- - 4 files changed, 16 deletions(-) - -commit 066595dd06c930997d5ec65a06c822616af9baa0 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Mar 22 15:43:07 2008 +0100 - - Check the document stream is seekable when opening it - - Fixes bug 14126 - - poppler/PDFDoc.cc | 7 +++++++ - 1 file changed, 7 insertions(+) - -commit 23b6475463f8973b5ac83bb21a6b7b6000cc435b -Author: Ed Avis <eda@waniasset.com> -Date: Sat Mar 22 13:55:59 2008 +0100 - - Check for fseek return values - - fofi/FoFiBase.cc | 14 ++++++++++++-- - poppler/GfxFont.cc | 12 ++++++++++-- - 2 files changed, 22 insertions(+), 4 deletions(-) - -commit b33bb282e45cf1a083cfbb13603ac465d386c28d -Author: Iñigo Martínez <inigomartinez@gmail.com> -Date: Fri Mar 21 13:53:21 2008 +0100 - - Fixed poppler glib public api. - - Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com> - - glib/poppler-annot.cc | 4 ++-- - glib/poppler-annot.h | 2 +- - 2 files changed, 3 insertions(+), 3 deletions(-) - -commit 371932f413d570d7784c668f30834d3d92d7aa80 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Mar 20 11:44:32 2008 +0100 - - [glib] Remove unused variable. - - glib/poppler-document.cc | 1 - - 1 file changed, 1 deletion(-) - -commit 21fa476ac384256c15a954b708e009f2b336b06f -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Mar 20 11:42:32 2008 +0100 - - [glib] Do not cache image_dev in poppler page. - - Thanks to Kouhei Sutou who caught the problem. - - glib/poppler-page.cc | 60 - +++++++++++++++++++++++++++-------------------- - glib/poppler-private.h | 3 --- - glib/test-poppler-glib.cc | 9 ++++++- - 3 files changed, 43 insertions(+), 29 deletions(-) - -commit 22cd70d8fc308fb8b19d36d0172014ba532230fb -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Mar 19 21:52:14 2008 +0100 - - poppler_annot_markup_get_opacity returns a double so use %f - - glib/demo/annots.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit b9a5fd4671638caa91f8a389be278d993391f499 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Mar 19 21:28:49 2008 +0100 - - updated by gtk-doc - - glib/reference/tmpl/poppler-action.sgml | 1 + - glib/reference/tmpl/poppler.sgml | 3 +++ - 2 files changed, 4 insertions(+) - -commit b7e0b740578ea1e84ac0ef850b5a03c66b2863e3 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Mar 19 21:28:01 2008 +0100 - - Fill 0.7.3 news - - NEWS | 7 +++++++ - 1 file changed, 7 insertions(+) - -commit 3adaff1dad8127fdd06653cf49196027ad414a08 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Mar 19 21:27:46 2008 +0100 - - Bump version to 0.7.3 - - CMakeLists.txt | 2 +- - configure.ac | 2 +- - msvc/config.h | 6 +++--- - qt4/src/Doxyfile | 2 +- - 4 files changed, 6 insertions(+), 6 deletions(-) - -commit 52dd710b63911be2d8c960de0232c497c35ecac8 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Wed Mar 19 18:35:35 2008 +0100 - - [glib] Update outline and links demos to the new POPPLER_ACTION_NONE - - glib/demo/utils.c | 3 +++ - 1 file changed, 3 insertions(+) - -commit 6a22f0a20df38156c06e8ba10649e0828a1da102 -Author: Eugen Dedu <Eugen.Dedu@pu-pm.univ-fcomte.fr> -Date: Wed Mar 19 18:32:48 2008 +0100 - - [glib] Consider no action as an action of type None instead of Unknown - - glib/poppler-action.cc | 2 +- - glib/poppler-action.h | 1 + - 2 files changed, 2 insertions(+), 1 deletion(-) - -commit 185d5818fd546f85934b041d5b0cdcdf1849b1dc -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Mar 18 20:08:21 2008 +0100 - - Improve error handling when creating a document - - glib/poppler-document.cc | 40 ++++++++++++++++++++++++++++------------ - glib/poppler.h | 5 ++++- - 2 files changed, 32 insertions(+), 13 deletions(-) - -commit 9bba2748985049515bfd9c9b44f26b92fa704078 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Mar 15 01:11:39 2008 +0100 - - Some more free - - poppler/OptionalContent.cc | 5 +++++ - 1 file changed, 5 insertions(+) - -commit bfc308935fa138e27c4d2ad0e1c1cad20eba8e8a -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Mar 15 01:05:32 2008 +0100 - - Use error instead of printf - - poppler/OptionalContent.cc | 15 ++++++++------- - 1 file changed, 8 insertions(+), 7 deletions(-) - -commit 998b1523ee653c1585f03b4a580e0d95ba694aca -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Mar 15 01:02:31 2008 +0100 - - Some free - - poppler/OptionalContent.cc | 3 +++ - 1 file changed, 3 insertions(+) - -commit c65a66a82259f547927cbb918611bcf4a8e264b2 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Mar 14 20:29:53 2008 +0100 - - xx0 is non exclusive so that should be < not <= - - Fixes several warnings about writes on bad places - - splash/SplashXPathScanner.cc | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -commit bd2272f3079319d1c05ca93f7fb6eb0a5370b938 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Mar 14 19:52:04 2008 +0100 - - Fix "Make sure we don't draw outside the bitmap on Splash::fillGlyph2" - when painting with no aa - - Fixes bug 15009 - - splash/Splash.cc | 12 ++++++++---- - 1 file changed, 8 insertions(+), 4 deletions(-) - -commit 5bf8d864e68854f0855e07fb67aa124e06c739cd -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Mar 12 22:48:07 2008 +0100 - - fix build - - glib/reference/Makefile.am | 1 + - 1 file changed, 1 insertion(+) - -commit d0be5c86dcd3310062d820b3515c31e4720af2ca -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Mar 12 22:40:59 2008 +0100 - - Update version to 0.7.2 and fill NEWS - - CMakeLists.txt | 2 +- - NEWS | 20 ++++++++++++++++++++ - configure.ac | 2 +- - msvc/config.h | 6 +++--- - qt4/src/Doxyfile | 2 +- - 5 files changed, 26 insertions(+), 6 deletions(-) - -commit 0b2ecf39572821a99374e6acec7c1bd438911bbc -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Mar 12 22:38:57 2008 +0100 - - update soname here too - - glib/CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit f5065016b168e4896e2fe774cd22bbd900849b52 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Wed Mar 12 22:06:53 2008 +0100 - - Make GDK dependency option for glib bindings - - Fixes bug #13719. - - configure.ac | 45 ++- - glib/Makefile.am | 7 +- - glib/demo/page.c | 88 +++++- - glib/demo/render.c | 4 + - glib/poppler-action.h | 1 - - glib/poppler-annot.cc | 26 +- - glib/poppler-annot.h | 2 +- - glib/poppler-document.h | 2 - - glib/poppler-features.h.in | 1 + - glib/poppler-page.cc | 695 - ++++++++++++++++++++++++++------------------- - glib/poppler-page.h | 76 +++-- - glib/poppler.h | 2 +- - glib/test-poppler-glib.cc | 2 +- - 13 files changed, 610 insertions(+), 341 deletions(-) - -commit 46d4fab82332e71d0b68c0a8deeac78f2201ed14 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Mar 12 20:35:33 2008 +0100 - - Increment version of libpoppler and libpoppler-qt4 - - CMakeLists.txt | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/CMakeLists.txt | 2 +- - qt4/src/Makefile.am | 2 +- - 4 files changed, 4 insertions(+), 4 deletions(-) - -commit 550c1fc73a6d2af65728751fd0b59ccc7110fa8b -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Mar 12 20:34:48 2008 +0100 - - Init to false updated field of XRefEntries plus indenting fixes - - poppler/XRef.cc | 11 ++++++----- - 1 file changed, 6 insertions(+), 5 deletions(-) - -commit 6a671686c6265ecdb4c48f04392de9c56d4e0936 -Author: Adrian Johnson <ajohnson@redneon.com> -Date: Wed Mar 12 21:43:12 2008 +1030 - - Fix regression in cairo output when transforming ctm - - The commit: - ec01926e5a9dc16e200060497c43e79a1623698d "Avoid setting a singular - ctm" - introduced a regression in the output when using a ctm. - - The check for an invertable matrix had the side effect of inverting - the matrix. Instead, make a copy of the matrix before testing if it is - invertable. - - poppler/CairoOutputDev.cc | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -commit 0b2c3bb25c908b07e760d824dbfe93c6051812aa -Merge: 362fe013 9c472f76 -Author: Iñigo Martínez <inigomartinez@gmail.com> -Date: Wed Mar 12 00:23:58 2008 +0100 - - Merge branch 'master' of - ssh://inigomartinez@git.freedesktop.org/git/poppler/poppler - -commit 362fe013c0d96698b52d70cf5226cddca7fe52d4 -Author: Iñigo Martínez <inigomartinez@gmail.com> -Date: Wed Mar 12 00:07:12 2008 +0100 - - Enabled back the AnnotWidget support. - - Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com> - - poppler/Annot.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 9c472f76d2462d0e775c851fdbac6ca2bc9812ea -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Mar 12 00:00:20 2008 +0100 - - cmake build - - glib/demo/CMakeLists.txt | 1 + - 1 file changed, 1 insertion(+) - -commit 821858f5c36786955d9475044bfee57f5060ad2f -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Mar 11 23:58:05 2008 +0100 - - Return char bounding box instead of edge, it's much more useful for - character positioning - - qt4/src/poppler-page.cc | 8 ++++++-- - qt4/src/poppler-private.h | 3 +-- - qt4/src/poppler-qt4.h | 6 ++---- - qt4/src/poppler-textbox.cc | 4 ++-- - 4 files changed, 11 insertions(+), 10 deletions(-) - -commit d7e642732ced592362d9787bddadb7a110dcc5a5 -Merge: 3642f0c4 2d6c6053 -Author: Iñigo Martínez <inigomartinez@gmail.com> -Date: Tue Mar 11 23:41:59 2008 +0100 - - Merge branch 'master' of - ssh://inigomartinez@git.freedesktop.org/git/poppler/poppler - -commit 3642f0c48bc49cd4d698e769544c1d8604c6482f -Author: Iñigo Martínez <inigomartinez@gmail.com> -Date: Tue Mar 11 23:13:33 2008 +0100 - - glib annots demo. - - Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com> - - glib/demo/Makefile.am | 2 + - glib/demo/annots.c | 468 - ++++++++++++++++++++++++++++++++++++++++++++++++++ - glib/demo/annots.h | 31 ++++ - glib/demo/main.c | 4 +- - 4 files changed, 504 insertions(+), 1 deletion(-) - -commit 2d6c60537317bd3ac9e0582e0da09e7365729097 -Author: Pino Toscano <pino@kde.org> -Date: Tue Mar 11 22:54:44 2008 +0100 - - For now we cannot handle MovieLink's, so comment them out. - - qt4/src/poppler-annotation.cc | 2 ++ - qt4/src/poppler-link.cc | 4 ++++ - qt4/src/poppler-link.h | 2 ++ - 3 files changed, 8 insertions(+) - -commit a354f7198c493990613a1db131c662ec27948863 -Author: Hugo Mercier <hmercier31@gmail.com> -Date: Tue Mar 11 22:49:00 2008 +0100 - - Initial Movie support (2) - - Now with the forgotten files - - poppler/Movie.cc | 443 - +++++++++++++++++++++++++++++++++++++++++++++++++++++++ - poppler/Movie.h | 177 ++++++++++++++++++++++ - 2 files changed, 620 insertions(+) - -commit 43e5dd941d4bc35c4eebbad66c13235639e0c1a0 -Merge: aab17684 4fdd2543 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Mar 11 22:31:22 2008 +0100 - - Merge branch 'master' of - ssh://aacid@git.freedesktop.org/git/poppler/poppler - -commit 4fdd254370ea6055e95c8ebee51b69e06c501714 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Mar 11 22:31:00 2008 +0100 - - Fix build - - glib/poppler-page.cc | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit aab17684dc3f21ff2b1ee6eacdc0c565d368df78 -Author: Hugo Mercier <hmercier31@gmail.com> -Date: Tue Mar 11 22:28:28 2008 +0100 - - Initial Movie support - - CMakeLists.txt | 2 + - poppler/Annot.cc | 316 - +++++++++++++++++++++++++++++++++++++++++++++++++++- - poppler/Annot.h | 125 +++++++++++++++++++++ - poppler/Link.cc | 108 +++++++++++++++--- - poppler/Link.h | 64 ++++++++++- - poppler/Makefile.am | 2 + - 6 files changed, 591 insertions(+), 26 deletions(-) - -commit 13a0d2390b9e4684af070c213f385485715353df -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Mar 11 22:27:38 2008 +0100 - - Add poppler-annot to the cmake build system - - glib/CMakeLists.txt | 2 ++ - 1 file changed, 2 insertions(+) - -commit 19f0e3b40bce4d8157d8c8bd04eaf6bacbef38b8 -Author: Iñigo Martínez <inigomartinez@gmail.com> -Date: Tue Mar 11 22:09:04 2008 +0100 - - Add preliminary annotations support in the glib frontend - - glib/Makefile.am | 2 + - glib/poppler-annot.cc | 776 - +++++++++++++++++++++++++++++++++++++++++++++++++ - glib/poppler-annot.h | 181 ++++++++++++ - glib/poppler-page.cc | 166 +++++++++++ - glib/poppler-page.h | 15 + - glib/poppler-private.h | 5 +- - glib/poppler.h | 7 + - 7 files changed, 1151 insertions(+), 1 deletion(-) - -commit 6fa3ab20fee311b4aff92be18870fd0e1730a81f -Author: Iñigo Martínez <inigomartinez@gmail.com> -Date: Tue Mar 11 18:44:27 2008 +0100 - - Changed AnnotMarkup inheritance - - poppler/Annot.cc | 9 +++++---- - poppler/Annot.h | 10 +++++----- - 2 files changed, 10 insertions(+), 9 deletions(-) - -commit 3111cfe2ccb32f9680baaad0c3f0678dd5969f8b -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Mar 10 22:12:36 2008 +0100 - - And free the memory - - qt4/tests/test-poppler-qt4.cpp | 2 ++ - 1 file changed, 2 insertions(+) - -commit 58f88c23402ac2e678dc655f64d93d89bb1812be -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Mar 10 22:08:43 2008 +0100 - - Add the -textRects option to the test app so we can check text rects - are correct - - qt4/tests/test-poppler-qt4.cpp | 45 - +++++++++++++++++++++++++++++++++++++----- - 1 file changed, 40 insertions(+), 5 deletions(-) - -commit 94ceb3cae79dc7786fa59fd889a87160780ed5df -Merge: 0f9e8430 35f34bd4 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Mar 9 23:34:11 2008 +0100 - - Merge branch 'master' of - ssh://aacid@git.freedesktop.org/git/poppler/poppler - -commit 0f9e84302ac2108f05bdbb10e7e57ae19ad1e9f3 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Mar 9 23:33:11 2008 +0100 - - Do not force default values to fontconfig patterns as fontconfig - already fills in default values for us - - Fixes bug 14883 - - poppler/GlobalParams.cc | 17 +++++++++-------- - 1 file changed, 9 insertions(+), 8 deletions(-) - -commit 35f34bd44c74eeb76a58b30acfbb0303d7285f06 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Mar 9 17:38:54 2008 +0100 - - Fix build when compiling without cairo support - - glib/demo/images.c | 4 ++++ - 1 file changed, 4 insertions(+) - -commit 32637db19dd80a9b8452f86eb677b10e77290627 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Mar 9 00:57:08 2008 +0100 - - proper lib64 Qt detection - - Fixes bug 14583 - - m4/qt.m4 | 15 ++++++++++++--- - 1 file changed, 12 insertions(+), 3 deletions(-) - -commit 65a88a95a5c54c890048e8a986df361585d601dd -Author: Pino Toscano <pino@kde.org> -Date: Sat Mar 8 03:11:36 2008 +0100 - - Provide the mime type for an embedded file, if known. - - Adapt the unit test for that. - - qt4/src/poppler-embeddedfile.cc | 5 +++++ - qt4/src/poppler-qt4.h | 5 +++++ - qt4/tests/check_attachments.cpp | 7 +++++++ - 3 files changed, 17 insertions(+) - -commit 23da27a229c8b3cc2a0a0dd6354c40723934390c -Author: Pino Toscano <pino@kde.org> -Date: Sat Mar 8 03:10:58 2008 +0100 - - Optionally read the mimetype for the embedded files. - - poppler/Catalog.cc | 17 +++++++++-------- - poppler/Catalog.h | 7 ++++++- - 2 files changed, 15 insertions(+), 9 deletions(-) - -commit 42c254b978c61e2ccfda083dfeffec9fc35a5fe7 -Author: Pino Toscano <pino@kde.org> -Date: Mon Mar 3 16:56:09 2008 +0100 - - be safe about out-of-range values - - qt4/src/poppler-textbox.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 5db75df77938eb7620867d0618058be52ed2d3cb -Author: Pino Toscano <pino@kde.org> -Date: Mon Mar 3 16:53:39 2008 +0100 - - initialize nicely - - qt4/src/poppler-private.h | 5 +++++ - 1 file changed, 5 insertions(+) - -commit 3ad0ab7e4abd37528284269c69be3cdfb8d31d2e -Author: Pino Toscano <pino@kde.org> -Date: Mon Mar 3 16:49:23 2008 +0100 - - apidox - - qt4/src/poppler-link.h | 17 +++++++++++++++++ - qt4/src/poppler-qt4.h | 23 ++++++++++++++++++++++- - 2 files changed, 39 insertions(+), 1 deletion(-) - -commit ec01926e5a9dc16e200060497c43e79a1623698d -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Sun Mar 2 20:15:20 2008 -0500 - - Avoid setting a singular ctm - - Ignoring singular ctm's gives a better result than having - our cairo context error and turn off. Related to #14398. - - poppler/CairoOutputDev.cc | 14 ++++++++++++++ - 1 file changed, 14 insertions(+) - -commit 4882d7a118b93fdb5c441d70757e485be7ee25d7 -Author: Pino Toscano <pino@kde.org> -Date: Thu Feb 28 15:12:23 2008 +0100 - - printf -> qDebug - - qt4/src/poppler-optcontent.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 31ce4049bf12c2716be7ec0fb8eda502d989f66e -Author: Brad Hards <bradh@saxicola.cuneata.net> -Date: Thu Feb 28 22:09:30 2008 +1100 - - Respect PageMode for optional content and embedded files. - - This makes the PDF 1.7 spec open with the embedded files showing. - - qt4/demos/embeddedfiles.cpp | 7 +++++++ - qt4/demos/embeddedfiles.h | 1 + - qt4/demos/optcontent.cpp | 8 ++++++++ - qt4/demos/optcontent.h | 1 + - 4 files changed, 17 insertions(+) - -commit ff938c431799d49325c0f46f1e6cbe1033993a83 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Feb 27 23:12:53 2008 +0100 - - do not forget to distribute GlobalParamsWin.cc next time - - poppler/Makefile.am | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 277382b8186d137a9f2a62bc2d22e9f0cda7d923 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Feb 27 22:56:33 2008 +0100 - - fix typo - - glib/demo/images.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 5b2f8f21fca63508570a0c77c6f7221a322e6e57 -Merge: 7e651186 4254f123 -Author: Pino Toscano <pino@kde.org> -Date: Wed Feb 27 22:10:12 2008 +0100 - - Merge branch 'master' of - ssh://pino@git.freedesktop.org/git/poppler/poppler - -commit 7e651186f483976f9833de245b6c7add38e77a16 -Author: Pino Toscano <pino@kde.org> -Date: Wed Feb 27 22:03:17 2008 +0100 - - Properly enable/disable the contents when their parents are changed. - - Now, the children maintain the "checked state" they had, when their - parent is unchecked; - but, they are really disabled, both in the possibility to be checked - and in the drawing of their associated content [applying the same - to their children, and so on]. - - qt4/src/poppler-optcontent-private.h | 8 +++++++- - qt4/src/poppler-optcontent.cc | 37 - +++++++++++++++++++++++++++++++----- - 2 files changed, 39 insertions(+), 6 deletions(-) - -commit 4254f1237ebed09b8e1c85f935a20bde3d8f36ff -Merge: ed6c0c26 0569ae76 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Feb 27 20:44:27 2008 +0100 - - Merge branch 'master' of - ssh://aacid@git.freedesktop.org/git/poppler/poppler - -commit 8d384c06f96ba8cb3e73c275b3c708c64da4595d -Author: Pino Toscano <pino@kde.org> -Date: Wed Feb 27 20:39:09 2008 +0100 - - small header cleanup - - qt4/src/poppler-optcontent-private.h | 9 +++++++-- - qt4/src/poppler-optcontent.cc | 7 ++++--- - 2 files changed, 11 insertions(+), 5 deletions(-) - -commit ed6c0c260837a0025279765ef7778b83d6ee2209 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Feb 27 20:43:45 2008 +0100 - - fix build and distcheck with autools - - qt4/demos/Makefile.am | 3 +++ - qt4/src/Makefile.am | 5 ++++- - qt4/tests/Makefile.am | 3 +++ - 3 files changed, 10 insertions(+), 1 deletion(-) - -commit 344d55539b1b6bcabec609fd828db372a07491b4 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Feb 27 20:43:13 2008 +0100 - - fill the NEWS for 0.7.1 - - NEWS | 15 +++++++++++++++ - 1 file changed, 15 insertions(+) - -commit 1c47633ba782021978fa34d41a4ab0badf3af9d3 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Feb 27 20:42:55 2008 +0100 - - Increase version number to 0.7.1 - - CMakeLists.txt | 2 +- - configure.ac | 2 +- - msvc/config.h | 6 +++--- - qt4/src/Doxyfile | 2 +- - 4 files changed, 6 insertions(+), 6 deletions(-) - -commit 0569ae76b6af1723b4606af189242a23199f387d -Merge: f395531a d8eba8c1 -Author: Brad Hards <bradh@kde.org> -Date: Thu Feb 28 06:26:09 2008 +1100 - - Merge branch 'master' of - ssh://bradh@git.freedesktop.org/git/poppler/poppler - -commit d8eba8c10834116b4f0f295375805172f5216993 -Author: Pino Toscano <pino@kde.org> -Date: Wed Feb 27 19:07:46 2008 +0100 - - export the OptContentModel - - qt4/src/poppler-optcontent.h | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -commit 0445e64a4124af7c1b84673f237022e133eb8542 -Author: Pino Toscano <pino@kde.org> -Date: Wed Feb 27 19:04:03 2008 +0100 - - make only the Document able to create OptContentsModel's - - qt4/src/poppler-optcontent.h | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -commit c965437b67a4f97ee8365a217bd10406fba3767a -Author: Pino Toscano <pino@kde.org> -Date: Wed Feb 27 18:58:31 2008 +0100 - - setRootNode() is private (and unused) API - - qt4/src/poppler-optcontent-private.h | 2 ++ - qt4/src/poppler-optcontent.cc | 8 ++++---- - qt4/src/poppler-optcontent.h | 4 ---- - 3 files changed, 6 insertions(+), 8 deletions(-) - -commit e293bfc384e2dfc4ef04582053ce18d8c0bcb7b3 -Author: Pino Toscano <pino@kde.org> -Date: Wed Feb 27 18:50:35 2008 +0100 - - small cleanup - - qt4/src/poppler-optcontent.cc | 11 ++++------- - 1 file changed, 4 insertions(+), 7 deletions(-) - -commit f11aa0008585e845ce509172d76f72f941be497d -Author: Pino Toscano <pino@kde.org> -Date: Wed Feb 27 18:44:09 2008 +0100 - - adapt the tests to the new layout of the contents model - - qt4/tests/check_optcontent.cpp | 66 - +++++++++++++++--------------------------- - 1 file changed, 23 insertions(+), 43 deletions(-) - -commit 4a324484b5c77ddc348746e7bcf6051ade28e389 -Author: Pino Toscano <pino@kde.org> -Date: Wed Feb 27 18:04:52 2008 +0100 - - free some objects (thus leak less) - - poppler/Gfx.cc | 2 ++ - poppler/OptionalContent.cc | 2 ++ - 2 files changed, 4 insertions(+) - -commit 0f4e7791ab6884072a1aee56e9cec212d8cea263 -Author: Pino Toscano <pino@kde.org> -Date: Wed Feb 27 15:58:21 2008 +0100 - - ignore any generated .moc here - - qt4/src/.gitignore | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 136ae44f155b17d9e8b041b67f75531d8544337c -Author: Pino Toscano <pino@kde.org> -Date: Wed Feb 27 15:56:09 2008 +0100 - - keep track of the items changed when toggling an item, so we can - update them properly - - qt4/src/poppler-optcontent-private.h | 4 ++-- - qt4/src/poppler-optcontent.cc | 38 - ++++++++++++++++++++++++++++-------- - 2 files changed, 32 insertions(+), 10 deletions(-) - -commit b73e2afef7e5e1b68d82a10c94bca3c201c5f8b3 -Author: Pino Toscano <pino@kde.org> -Date: Wed Feb 27 15:52:06 2008 +0100 - - fix indexFromItem once again, and make parent() call it with the - right node - - qt4/src/poppler-optcontent-private.h | 2 +- - qt4/src/poppler-optcontent.cc | 19 +++++++++---------- - 2 files changed, 10 insertions(+), 11 deletions(-) - -commit 803787f763578320aa5f405ed49c64e6b924bad3 -Author: Pino Toscano <pino@kde.org> -Date: Wed Feb 27 15:30:18 2008 +0100 - - compile with the autotools - - (second patch I forgot to apply with the first) - - qt4/src/Makefile.am | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) - -commit 0b527a8ed62677bb09df4587f072a310c2959750 -Author: Pino Toscano <pino@kde.org> -Date: Wed Feb 27 14:34:13 2008 +0100 - - Extract the OptContentItem -> QModelIndex creation in an own function. - - qt4/src/poppler-optcontent-private.h | 1 + - qt4/src/poppler-optcontent.cc | 7 ++++++- - 2 files changed, 7 insertions(+), 1 deletion(-) - -commit c94d6cc95c6838f31e27832cb3090389bf4d8227 -Author: Pino Toscano <pino@kde.org> -Date: Wed Feb 27 14:30:26 2008 +0100 - - Make index(), data() and setData() more safe. - - Errors spotted using ModelTest. - - qt4/src/poppler-optcontent-private.h | 2 +- - qt4/src/poppler-optcontent.cc | 15 +++++++++------ - 2 files changed, 10 insertions(+), 7 deletions(-) - -commit b8e833733d84eaa93d6bae522710feb3075ca329 -Author: Pino Toscano <pino@kde.org> -Date: Wed Feb 27 14:05:19 2008 +0100 - - fix build with the autotools - - qt4/src/Makefile.am | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -commit f89ba474bae281f1cdeddb72ac8425dee1087e35 -Author: Pino Toscano <pino@kde.org> -Date: Wed Feb 27 13:28:50 2008 +0100 - - Put the check states of the optional contents in the same column as - the name. - - This feels a bit more elegant than changing a value in a different - column. - Cleanup data()/setData() so they can be extended easily. - - qt4/src/poppler-optcontent.cc | 74 - ++++++++++++++++++++++--------------------- - 1 file changed, 38 insertions(+), 36 deletions(-) - -commit defa0ecb2790402a4069fea3b3c285a50675682d -Author: Pino Toscano <pino@kde.org> -Date: Wed Feb 27 12:24:16 2008 +0100 - - Add a skeleton of OptContentModel::headerData(). - - It does nothing yet, but we can add stuff later on w/o breaking BC. - - qt4/src/poppler-optcontent.cc | 5 +++++ - qt4/src/poppler-optcontent.h | 2 ++ - 2 files changed, 7 insertions(+) - -commit f395531a3e8f71a46b3c942f8f437ade1d9fdb57 -Author: Brad Hards <bradh@kde.org> -Date: Wed Feb 27 22:22:51 2008 +1100 - - Minor cleanup. - - qt4/src/poppler-optcontent.cc | 7 +++---- - 1 file changed, 3 insertions(+), 4 deletions(-) - -commit 0a19486cb4de57c0c987cc4ce2434a96bbd18338 -Author: Pino Toscano <pino@kde.org> -Date: Wed Feb 27 12:15:44 2008 +0100 - - refresh the current page when the data of the content model change - - qt4/demos/optcontent.cpp | 8 ++++++++ - qt4/demos/optcontent.h | 3 +++ - 2 files changed, 11 insertions(+) - -commit 09b7cc2efb7d21fa4dabd23d2d2de877cc7d86ee -Author: Pino Toscano <pino@kde.org> -Date: Wed Feb 27 12:15:18 2008 +0100 - - optional method to reload the current page - - qt4/demos/documentobserver.cpp | 5 +++++ - qt4/demos/documentobserver.h | 1 + - 2 files changed, 6 insertions(+) - -commit 39fe905be8f2ae79d9c26cd87547f3ea2608411e -Author: Pino Toscano <pino@kde.org> -Date: Wed Feb 27 12:00:29 2008 +0100 - - Add a dock for showing the optional content tree. - - qt4/demos/CMakeLists.txt | 1 + - qt4/demos/Makefile.am | 3 +++ - qt4/demos/optcontent.cpp | 55 - ++++++++++++++++++++++++++++++++++++++++++++++++ - qt4/demos/optcontent.h | 43 +++++++++++++++++++++++++++++++++++++ - qt4/demos/viewer.cpp | 7 ++++++ - 5 files changed, 109 insertions(+) - -commit f17dd5539501a996479b903ac9b8aceb3c4cfafe -Author: Pino Toscano <pino@kde.org> -Date: Wed Feb 27 11:53:32 2008 +0100 - - cleanup - - qt4/src/poppler-optcontent-private.h | 3 ++- - qt4/src/poppler-optcontent.h | 4 +--- - 2 files changed, 3 insertions(+), 4 deletions(-) - -commit f3cc894559f10dbd4277fa9f30de9931ed69dfd4 -Author: Pino Toscano <pino@kde.org> -Date: Wed Feb 27 11:43:34 2008 +0100 - - OptContentModel::itemFromRef() and OptContentItem are private API. - - Hide them in the implementation. - - qt4/src/poppler-optcontent-private.h | 43 - ++++++++++++++++++++++++++++++++++++ - qt4/src/poppler-optcontent.cc | 8 +++---- - qt4/src/poppler-optcontent.h | 42 - ----------------------------------- - 3 files changed, 47 insertions(+), 46 deletions(-) - -commit 48e8b2105cf8f177ca655b969470e45e2407db82 -Author: Pino Toscano <pino@kde.org> -Date: Wed Feb 27 11:28:16 2008 +0100 - - move all the private stuff of OptContentModel into its d-pointer - - qt4/src/poppler-optcontent-private.h | 9 +++++++-- - qt4/src/poppler-optcontent.cc | 29 +++++++++++++++-------------- - qt4/src/poppler-optcontent.h | 4 ---- - 3 files changed, 22 insertions(+), 20 deletions(-) - -commit b78a7f7a0e8d5a9c22014d34754090d863030e0d -Author: Pino Toscano <pino@kde.org> -Date: Wed Feb 27 11:06:57 2008 +0100 - - use a QPointer for the OptContentModel, so we are safe about - ownership. - - qt4/src/poppler-document.cc | 4 ++-- - qt4/src/poppler-private.h | 6 +++--- - 2 files changed, 5 insertions(+), 5 deletions(-) - -commit 48557da71adb0fe6bd4da2fb32433796a96c3576 -Author: Brad Hards <bradh@kde.org> -Date: Wed Feb 27 19:39:18 2008 +1100 - - We need to install the optional content header. - - qt4/src/CMakeLists.txt | 1 + - 1 file changed, 1 insertion(+) - -commit 6e2bb03b5ef256c03a8da1cbf9bbc87c593942ad -Author: Brad Hards <bradh@kde.org> -Date: Wed Feb 27 19:23:49 2008 +1100 - - Partial d-pointer implementation. - - qt4/src/poppler-optcontent-private.h | 57 - ++++++++++++++++++++++++++++++++++++ - qt4/src/poppler-optcontent.cc | 49 +++++++++++++++++++------------ - qt4/src/poppler-optcontent.h | 24 ++++----------- - 3 files changed, 92 insertions(+), 38 deletions(-) - -commit c627b7aa10ae9cdceb78b751a7e826170f402af0 -Author: Brad Hards <bradh@kde.org> -Date: Wed Feb 27 16:12:38 2008 +1100 - - A couple of cleanups suggested by Pino. - - qt4/src/poppler-document.cc | 6 +++--- - qt4/src/poppler-qt4.h | 8 +++++--- - 2 files changed, 8 insertions(+), 6 deletions(-) - -commit 81891667e18fcf164af02f5f366de07f78d67c8f -Author: Brad Hards <bradh@kde.org> -Date: Wed Feb 27 15:47:03 2008 +1100 - - Add in the initial part of the optional content support. - - To see this work, compare ClarityOCGs.pdf with and - without this change. - - Right now we only handle optional content using - XObjects. Optional content using Marked Content has - infrastructure, but is not implemented. That will be - quite invasive in Gfx, and I'm not confident enough - to do it this late in the process. - - CMakeLists.txt | 1 + - poppler/Catalog.cc | 9 + - poppler/Catalog.h | 4 + - poppler/Gfx.cc | 65 +++++- - poppler/Gfx.h | 12 +- - poppler/Makefile.am | 2 + - poppler/OptionalContent.cc | 322 ++++++++++++++++++++++++++ - poppler/OptionalContent.h | 85 +++++++ - poppler/PDFDoc.h | 5 + - poppler/PSOutputDev.cc | 6 +- - poppler/Page.cc | 2 +- - qt4/src/.gitignore | 1 + - qt4/src/CMakeLists.txt | 3 + - qt4/src/Makefile.am | 6 + - qt4/src/poppler-document.cc | 13 ++ - qt4/src/poppler-optcontent.cc | 354 +++++++++++++++++++++++++++++ - qt4/src/poppler-optcontent.h | 122 ++++++++++ - qt4/src/poppler-private.h | 4 + - qt4/src/poppler-qt4.h | 18 ++ - qt4/tests/.gitignore | 1 + - qt4/tests/CMakeLists.txt | 1 + - qt4/tests/Makefile.am | 5 + - qt4/tests/check_optcontent.cpp | 499 - +++++++++++++++++++++++++++++++++++++++++ - 23 files changed, 1532 insertions(+), 8 deletions(-) - -commit 11b70bcda905e618c199a067db6b0246612e101d -Author: Pino Toscano <pino@kde.org> -Date: Tue Feb 26 23:01:27 2008 +0100 - - fixup the default export macro name (added by cmake); _WIN32 is - defined only on win32 (remove a plethora of warnings) - - qt4/src/poppler-export.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit d4d6c14cd83d04c61daa6618c3148a0bb47dc292 -Author: Pino Toscano <pino@kde.org> -Date: Tue Feb 26 22:57:02 2008 +0100 - - install the export header - - qt4/src/CMakeLists.txt | 1 + - qt4/src/Makefile.am | 1 + - 2 files changed, 2 insertions(+) - -commit 4ba2e2d21710135656adbf93c5994cfb46502308 -Author: Pino Toscano <pino@kde.org> -Date: Tue Feb 26 22:55:30 2008 +0100 - - no need to include the export header in private headers - - qt4/src/poppler-annotation-helper.h | 1 - - qt4/src/poppler-annotation-private.h | 1 - - qt4/src/poppler-converter-private.h | 1 - - qt4/src/poppler-link-extractor-private.h | 1 - - qt4/src/poppler-page-private.h | 1 - - qt4/src/poppler-private.h | 1 - - qt4/src/poppler-qiodeviceoutstream-private.h | 1 - - 7 files changed, 7 deletions(-) - -commit 0a466c09fb70b92f39df19bc315b6575e419ad5b -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Feb 26 22:47:31 2008 +0100 - - We also need to distribute poppler-export.h - - qt4/src/Makefile.am | 1 + - 1 file changed, 1 insertion(+) - -commit 2034d57c700049bc9a6565bbb818e1c9f4467784 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Feb 26 22:46:29 2008 +0100 - - Now for real: Add special casing in cmake buildsystem for MSVC, - also add Export markers to qt4 classes, although symbol visibility - is only used on MSVC at the moment - - CMakeLists.txt | 5 +++++ - qt4/src/CMakeLists.txt | 3 +++ - qt4/src/poppler-annotation-helper.h | 1 + - qt4/src/poppler-annotation-private.h | 1 + - qt4/src/poppler-annotation.h | 19 ++++++++++--------- - qt4/src/poppler-converter-private.h | 1 + - qt4/src/poppler-export.h | 6 +++--- - qt4/src/poppler-form.h | 9 +++++---- - qt4/src/poppler-link-extractor-private.h | 1 + - qt4/src/poppler-link.h | 17 +++++++++-------- - qt4/src/poppler-page-private.h | 1 + - qt4/src/poppler-private.h | 1 + - qt4/src/poppler-qiodeviceoutstream-private.h | 1 + - qt4/src/poppler-qt4.h | 21 +++++++++++---------- - qt4/tests/CMakeLists.txt | 6 ++++++ - 15 files changed, 59 insertions(+), 34 deletions(-) - -commit b931920f63f4276ec355118faa061bafa5ac5244 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Feb 26 22:42:16 2008 +0100 - - Add special casing in cmake buildsystem for MSVC, also add Export - markers to qt4 classes, although symbol visibility is only used on - MSVC at the moment - - qt4/src/poppler-export.h | 17 +++++++++++++++++ - 1 file changed, 17 insertions(+) - -commit 1778fddb36d6cb2c7f7848bee06189158f69f16e -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Feb 24 23:02:08 2008 +0100 - - Add the cmake files to EXTRA_DIST so they get added when i do make - dist to get the release tarball - - Makefile.am | 39 +++++++++++++++++++++++++++++++++++++++ - 1 file changed, 39 insertions(+) - -commit 51f171e10a42d492c8c32a5e2578d05b73d89238 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Feb 24 22:47:46 2008 +0100 - - ignore more - - qt4/demos/.gitignore | 2 ++ - 1 file changed, 2 insertions(+) - -commit adb1ccdb9265f0583cb348c456a39efac610aff1 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Feb 24 22:46:33 2008 +0100 - - ignore - - qt4/demos/.gitignore | 2 ++ - 1 file changed, 2 insertions(+) - -commit 101e526c63175ffc1a75e1b68da7bb4fff9cd530 -Author: Patrick Spendrin <ps_ml@gmx.de> -Date: Sun Feb 24 20:52:41 2008 +0100 - - define snprintf to _snprintf if we are building on MSVC - - config.h.cmake | 4 ++++ - 1 file changed, 4 insertions(+) - -commit f7f8ab488257c3979d20e5c0690ec5d7c2cd831b -Author: Patrick Spendrin <ps_ml@gmx.de> -Date: Sun Feb 24 20:43:11 2008 +0100 - - define M_PI in case it is not defined - - poppler/Function.cc | 4 ++++ - 1 file changed, 4 insertions(+) - -commit f00436b63bf9a42dcb2728a07db9c20f1f23d0bc -Author: Patrick Spendrin <ps_ml@gmx.de> -Date: Sun Feb 24 20:39:42 2008 +0100 - - Add proper dirent.h guards - - utils/pdftoabw.cc | 2 ++ - utils/pdftohtml.cc | 2 ++ - 2 files changed, 4 insertions(+) - -commit e1463451c584181f918265438cf6ddcb408bf731 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Feb 21 20:43:56 2008 +0100 - - Code uses if USE_EXCEPTIONS, so we need to defined it to 1, not just - define it - - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 88d4bbbcf828e3247454c8ba3c2fb0fb58207b6a -Author: Michael Vrable <mvrable@cs.ucsd.edu> -Date: Thu Feb 21 19:53:03 2008 +0100 - - If a bitmap's dimensions are invalid, do not try to display it. - - poppler/Gfx.cc | 3 +++ - 1 file changed, 3 insertions(+) - -commit 452ae6f5674b00b43955952961f7ca0583f73e27 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Feb 21 19:46:19 2008 +0100 - - Make sure we don't draw outside the bitmap on Splash::fillGlyph2 - - splash/Splash.cc | 76 - ++++++++++++++++++++++++++++++++++++-------------------- - 1 file changed, 49 insertions(+), 27 deletions(-) - -commit 7f60fa806bd6d3d28917f349a2a19b52f97f593a -Author: James Cloos <cloos@jhcloos.com> -Date: Thu Feb 21 13:00:05 2008 -0500 - - Fix typo - - Signed-off-by: James Cloos <cloos@jhcloos.com> - - qt4/demos/Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 053ecae534a4522d152b0139b6aed6da2059d760 -Author: Carl Worth <cworth@cworth.org> -Date: Wed Feb 20 17:21:27 2008 -0800 - - Keep cairo and cairo_shape consistent - - The 'cairo_shape' state was not always being modified at the same - time as 'cairo'. In some cases this led to a sequence of ever - larger matrix scale factors until things just blew up. - - poppler/CairoOutputDev.cc | 6 ++++++ - 1 file changed, 6 insertions(+) - -commit bf6dd890994150406b4464e45355a4a99870fc60 -Author: Pino Toscano <pino@kde.org> -Date: Thu Feb 21 01:23:07 2008 +0100 - - Add a dock for showing the document metadata. - - qt4/demos/CMakeLists.txt | 1 + - qt4/demos/Makefile.am | 3 +++ - qt4/demos/metadata.cpp | 50 - ++++++++++++++++++++++++++++++++++++++++++++++++ - qt4/demos/metadata.h | 43 +++++++++++++++++++++++++++++++++++++++++ - qt4/demos/viewer.cpp | 7 +++++++ - 5 files changed, 104 insertions(+) - -commit b6f0c8f83924c08be20b602b128651bf018172a3 -Author: Pino Toscano <pino@kde.org> -Date: Thu Feb 21 00:54:26 2008 +0100 - - Do not assign conflicting accelerators. - - qt4/demos/viewer.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit e0c27a968c7e7a0f6a89a050ddbfe328229f431d -Author: Pino Toscano <pino@kde.org> -Date: Thu Feb 21 00:53:24 2008 +0100 - - Apply the antialias settings w/o notify the observers. - - qt4/demos/viewer.cpp | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 2c6149abcecda15c6f73a1dee537072240ddd545 -Author: Pino Toscano <pino@kde.org> -Date: Thu Feb 21 00:51:21 2008 +0100 - - Add a settings menu to choose the render backend. - - qt4/demos/viewer.cpp | 28 ++++++++++++++++++++++++++++ - qt4/demos/viewer.h | 3 +++ - 2 files changed, 31 insertions(+) - -commit db2b0778dca364751a1d22294be29f8c7799e2e9 -Author: Pino Toscano <pino@kde.org> -Date: Thu Feb 21 00:33:23 2008 +0100 - - Add a dock for showing the embedded files. - - TODO: show the checksum in a pretty format. - - qt4/demos/CMakeLists.txt | 1 + - qt4/demos/Makefile.am | 3 ++ - qt4/demos/embeddedfiles.cpp | 75 - +++++++++++++++++++++++++++++++++++++++++++++ - qt4/demos/embeddedfiles.h | 43 ++++++++++++++++++++++++++ - qt4/demos/viewer.cpp | 7 +++++ - 5 files changed, 129 insertions(+) - -commit 51fba47ccb12a66282769fc504bac4c9f5123f75 -Author: Pino Toscano <pino@kde.org> -Date: Sun Feb 17 01:49:59 2008 +0100 - - clear the page label when the document is closed - - qt4/demos/pageview.cpp | 2 ++ - 1 file changed, 2 insertions(+) - -commit e964e2b9fbbe9b52b137ecd06729a06530835227 -Author: Michael Vrable <mvrable@cs.ucsd.edu> -Date: Tue Feb 19 23:22:55 2008 +0100 - - Allow grouped checkboxes to be selected individually. - - When checkboxes are in a group, they ought to behave like a - collection of - radio buttons. However, when deciding whether to draw a checkbox as - selected or not, the checkbox-drawing code was looking up the value - of the - V field in the form dictionary, which is shared among all checkboxes - in the - group. Thus, checkboxes would either all be on or off in unison. - - Instead, look up the AS (appearance state) value in each checkbox's - annotation dictionary, so that different checkboxes can be drawn - differently. - - poppler/Annot.cc | 6 ++---- - 1 file changed, 2 insertions(+), 4 deletions(-) - -commit 702fdd6c56b5369554c683d8c8e0e2c66e80886c -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Feb 19 00:18:04 2008 +0100 - - changes from gtk-doc - - glib/reference/tmpl/poppler-document.sgml | 1 + - glib/reference/tmpl/poppler-page.sgml | 2 +- - 2 files changed, 2 insertions(+), 1 deletion(-) - -commit 9e13b91ba38c20989d283588e73490a1601f5bb0 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Feb 19 00:10:24 2008 +0100 - - distribute the headers too - - qt4/demos/Makefile.am | 11 ++++++++++- - 1 file changed, 10 insertions(+), 1 deletion(-) - -commit 194e0ced7c38514ec3126666531862e3b29b4b77 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Feb 18 23:34:06 2008 +0100 - - Fill NEWS and increase version number to 0.7 - - CMakeLists.txt | 2 +- - NEWS | 96 - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - configure.ac | 2 +- - msvc/config.h | 6 ++-- - qt4/src/Doxyfile | 2 +- - 5 files changed, 102 insertions(+), 6 deletions(-) - -commit 3c407efe9f1f0cc3f6366d3a2b6e9b687656cc95 -Merge: 51f0cea0 7f4acb87 -Author: Pino Toscano <pino@kde.org> -Date: Mon Feb 18 21:30:42 2008 +0100 - - Merge branch 'master' of - ssh://pino@git.freedesktop.org/git/poppler/poppler - -commit 51f0cea0e3ba1acfc63877752e950fdd8c07e258 -Author: Pino Toscano <pino@kde.org> -Date: Mon Feb 18 21:29:41 2008 +0100 - - make the poppler_qt4viewer compile with the auto"tools" - - qt4/demos/Makefile.am | 16 ++++++++++++---- - 1 file changed, 12 insertions(+), 4 deletions(-) - -commit 7f4acb879d300e18dfaff768027c88195d7d8f1b -Author: Timothy Lee <timothy.lee@siriushk.com> -Date: Mon Feb 18 20:56:35 2008 +0100 - - Implement ImageOutputDev::drawMaskedImage and - ImageOutputDev::drawSoftMaskedImage so all images are exported when - using pdfimages - - utils/ImageOutputDev.cc | 19 +++++++++++++++++++ - utils/ImageOutputDev.h | 11 +++++++++++ - 2 files changed, 30 insertions(+) - -commit 064b316648e35416bb49336639da1d8d288d1ecf -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Feb 18 20:17:37 2008 +0100 - - xref can be null so check for it before checking we went out of bounds - - Fixes bug 14549 - - poppler/Lexer.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit b287b611b1c7b7dd00e12518cee3a6c35044e161 -Author: Pino Toscano <pino@kde.org> -Date: Sun Feb 17 01:21:07 2008 +0100 - - Really niptick: help menu with about dialog for us and Qt. - - qt4/demos/viewer.cpp | 15 +++++++++++++++ - qt4/demos/viewer.h | 2 ++ - 2 files changed, 17 insertions(+) - -commit 6400254fdabf3d0d32f27ebd00faa6958be62019 -Author: Pino Toscano <pino@kde.org> -Date: Sun Feb 17 01:12:27 2008 +0100 - - Add a title to the viewer :) - - qt4/demos/viewer.cpp | 2 ++ - 1 file changed, 2 insertions(+) - -commit b363c0568c9c61e7ee8ed86d808f0eed0b93b525 -Author: Pino Toscano <pino@kde.org> -Date: Sun Feb 17 01:09:57 2008 +0100 - - Add the possibility to save a copy of the file. - - qt4/demos/viewer.cpp | 29 +++++++++++++++++++++++++++++ - qt4/demos/viewer.h | 2 ++ - 2 files changed, 31 insertions(+) - -commit 42987dcdd8d7432145f78cfc550f0c099e6e7311 -Author: Pino Toscano <pino@kde.org> -Date: Sun Feb 17 00:33:01 2008 +0100 - - Add a Permissions dock. - - qt4/demos/CMakeLists.txt | 1 + - qt4/demos/Makefile.am | 1 + - qt4/demos/permissions.cpp | 77 - +++++++++++++++++++++++++++++++++++++++++++++++ - qt4/demos/permissions.h | 43 ++++++++++++++++++++++++++ - qt4/demos/viewer.cpp | 7 +++++ - 5 files changed, 129 insertions(+) - -commit 9d1dda64de1d9e3f6fc81e40a0c2246a6270dfa8 -Author: Pino Toscano <pino@kde.org> -Date: Sat Feb 16 23:56:17 2008 +0100 - - Add settings for antialias. - - qt4/demos/viewer.cpp | 41 +++++++++++++++++++++++++++++++++++++++++ - qt4/demos/viewer.h | 4 ++++ - 2 files changed, 45 insertions(+) - -commit 3abb8703d7d8b7a5fbcbb3c19d8e84d640abe88c -Author: Pino Toscano <pino@kde.org> -Date: Sat Feb 16 22:25:11 2008 +0100 - - Add a TOC info dock. - - qt4/demos/CMakeLists.txt | 1 + - qt4/demos/Makefile.am | 1 + - qt4/demos/toc.cpp | 90 - ++++++++++++++++++++++++++++++++++++++++++++++++ - qt4/demos/toc.h | 43 +++++++++++++++++++++++ - qt4/demos/viewer.cpp | 7 ++++ - 5 files changed, 142 insertions(+) - -commit 80925f06d125ebfc9909e36bdbe5d37fd0e48bdc -Author: Pino Toscano <pino@kde.org> -Date: Sat Feb 16 21:51:10 2008 +0100 - - Adapt the Fonts and Info docks to the new abstract info dock. - - qt4/demos/fonts.cpp | 10 +++------- - qt4/demos/fonts.h | 11 +++++------ - qt4/demos/info.cpp | 10 +++------- - qt4/demos/info.h | 11 +++++------ - 4 files changed, 16 insertions(+), 26 deletions(-) - -commit c03531d691e56aba2b4c6538cf9e2463e1e0aa29 -Author: Pino Toscano <pino@kde.org> -Date: Sat Feb 16 21:43:19 2008 +0100 - - Introduce a base info dock for handling the "dirty" work. - - qt4/demos/CMakeLists.txt | 1 + - qt4/demos/Makefile.am | 1 + - qt4/demos/abstractinfodock.cpp | 57 - ++++++++++++++++++++++++++++++++++++++++++ - qt4/demos/abstractinfodock.h | 48 +++++++++++++++++++++++++++++++++++ - 4 files changed, 107 insertions(+) - -commit 0f7d51c7fc2439ee9392c166576c341238f00f36 -Author: Pino Toscano <pino@kde.org> -Date: Sat Feb 16 18:49:52 2008 +0100 - - Delete the poppler page after usage. - - qt4/demos/pageview.cpp | 1 + - 1 file changed, 1 insertion(+) - -commit b41d069cdd1435ddb14b3de2986875069523c814 -Author: Pino Toscano <pino@kde.org> -Date: Sat Feb 16 18:48:57 2008 +0100 - - Initialize the current page number correctly. - - qt4/demos/viewer.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 75e516af0e72a2e3041660300e522ad00869372b -Author: Pino Toscano <pino@kde.org> -Date: Sat Feb 16 18:43:56 2008 +0100 - - Add a side dock for showing the fonts of the document. - - qt4/demos/CMakeLists.txt | 1 + - qt4/demos/Makefile.am | 1 + - qt4/demos/fonts.cpp | 78 - ++++++++++++++++++++++++++++++++++++++++++++++++ - qt4/demos/fonts.h | 44 +++++++++++++++++++++++++++ - qt4/demos/viewer.cpp | 7 +++++ - 5 files changed, 131 insertions(+) - -commit 8e642d1cbd48d4790a6769287cbfd90c3bc9fc34 -Author: Pino Toscano <pino@kde.org> -Date: Sat Feb 16 17:21:30 2008 +0100 - - Add a View menu where the dock widget toogle actions will be. - - As start, put the Info dock there. - - qt4/demos/viewer.cpp | 4 ++++ - 1 file changed, 4 insertions(+) - -commit c1feb7c2b5008cc04edb3c028f888072920ce4dc -Author: Pino Toscano <pino@kde.org> -Date: Sat Feb 16 17:14:00 2008 +0100 - - Add a side dock for showing the info keys. - - qt4/demos/CMakeLists.txt | 1 + - qt4/demos/Makefile.am | 1 + - qt4/demos/info.cpp | 78 - ++++++++++++++++++++++++++++++++++++++++++++++++ - qt4/demos/info.h | 44 +++++++++++++++++++++++++++ - qt4/demos/viewer.cpp | 5 ++++ - 5 files changed, 129 insertions(+) - -commit abc9b00c6470f9f6b66c280455f544ad0ee3aa8c -Author: Pino Toscano <pino@kde.org> -Date: Sat Feb 16 16:09:52 2008 +0100 - - Basic work in the demo PDF viewer, open documents and navigate into - the pages. - - An observer structure was introduced, so extra components can be - easily added and made aware of the document/page changes. - Both the navigation toolbar and the page view are implemented as - observers. - - qt4/demos/CMakeLists.txt | 3 ++ - qt4/demos/Makefile.am | 3 ++ - qt4/demos/documentobserver.cpp | 45 +++++++++++++++++++ - qt4/demos/documentobserver.h | 49 +++++++++++++++++++++ - qt4/demos/navigationtoolbar.cpp | 98 - +++++++++++++++++++++++++++++++++++++++++ - qt4/demos/navigationtoolbar.h | 56 +++++++++++++++++++++++ - qt4/demos/pageview.cpp | 60 +++++++++++++++++++++++++ - qt4/demos/pageview.h | 44 ++++++++++++++++++ - qt4/demos/viewer.cpp | 98 - +++++++++++++++++++++++++++++++++++++++-- - qt4/demos/viewer.h | 17 +++++++ - 10 files changed, 470 insertions(+), 3 deletions(-) - -commit 14c88853a5675f40efb72f3ef01f49eb06ab846c -Author: Pino Toscano <pino@kde.org> -Date: Sat Feb 16 00:32:30 2008 +0100 - - Compile the poppler_qt4viewer. - - qt4/demos/CMakeLists.txt | 7 +++++++ - qt4/demos/Makefile.am | 12 ++++++++++-- - 2 files changed, 17 insertions(+), 2 deletions(-) - -commit aeb591f015d5e7a2643ed75d872358d2b1256b99 -Author: Pino Toscano <pino@kde.org> -Date: Sat Feb 16 00:31:46 2008 +0100 - - Add a very minimal base PDF viewer. - - So minimal that it does nothing at the moment... - - qt4/demos/main_viewer.cpp | 29 +++++++++++++++++++++++++++++ - qt4/demos/viewer.cpp | 46 - ++++++++++++++++++++++++++++++++++++++++++++++ - qt4/demos/viewer.h | 45 - +++++++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 120 insertions(+) - -commit 8da490b090487c4c37290b63bdc9abcfaf6d6940 -Author: Pino Toscano <pino@kde.org> -Date: Fri Feb 15 23:59:39 2008 +0100 - - Add a skeleton of directory where PopplerQt4 demos will be. - - configure.ac | 1 + - qt4/CMakeLists.txt | 1 + - qt4/Makefile.am | 2 +- - qt4/demos/CMakeLists.txt | 10 ++++++++++ - qt4/demos/Makefile.am | 20 ++++++++++++++++++++ - 5 files changed, 33 insertions(+), 1 deletion(-) - -commit e24b49d52a5c1716641695ee731dd49848a114d9 -Author: Pino Toscano <pino@kde.org> -Date: Thu Feb 14 22:21:54 2008 +0100 - - do not print it as string - - qt4/src/poppler-private.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 2316455864e9c900c08d051c59b9508eddcb7c34 -Author: Pino Toscano <pino@kde.org> -Date: Thu Feb 14 21:02:20 2008 +0100 - - Pipe the poppler error messages through the Qt debug system. - - qt4/src/poppler-private.cc | 21 +++++++++++++++++++++ - qt4/src/poppler-private.h | 8 +++++++- - 2 files changed, 28 insertions(+), 1 deletion(-) - -commit d985d3b0cdc57370137865add2a5f3a7802109c7 -Author: Pino Toscano <pino@kde.org> -Date: Thu Feb 14 14:56:18 2008 +0100 - - Use what FormWidgetText give us. - - qt4/src/poppler-form.cc | 13 +++---------- - 1 file changed, 3 insertions(+), 10 deletions(-) - -commit a69bd442e52f4495f8d6bfd3bb58b3ebd1be1a63 -Author: Michael Vrable <mvrable@cs.ucsd.edu> -Date: Thu Feb 14 12:52:22 2008 +0100 - - Provide Unicode mappings for some control characters in - PDFDocEncoding. - - Though they do not represent glyphs, values such as carriage return - can be - found in text strings in PDFDocEncoding. Provide mappings for - these bytes - to Unicode. - - Additionally, map unknown characters to U+FFFD instead of U+0000, - so that - unknown characters do not result in nulls (which can truncate strings - early, particularly if the string is later re-encoded into - null-terminated - UTF-8). - - poppler/PDFDocEncoding.cc | 23 +++++++++++++++++------ - 1 file changed, 17 insertions(+), 6 deletions(-) - -commit ce17383e0ed21770b471e88f25046a64a23e7e45 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Feb 13 20:56:39 2008 +0100 - - Yet another fix for buggy documents, do not use the cache if the - cache could not be created because it ought to be too big - - Fixes http://bugs.kde.org/show_bug.cgi?id=157777 - - splash/SplashFont.cc | 48 - ++++++++++++++++++++++++++++-------------------- - 1 file changed, 28 insertions(+), 20 deletions(-) - -commit 15a61cac718ae8cbf83911e299b4cfdd24cdf178 -Author: Pino Toscano <pino@kde.org> -Date: Wed Feb 13 20:55:18 2008 +0100 - - add images.c - - glib/demo/CMakeLists.txt | 1 + - 1 file changed, 1 insertion(+) - -commit 9cfe10ab7f51d329647e102e446baaef043d8cc6 -Merge: e9187292 7d65b4da -Author: Pino Toscano <pino@kde.org> -Date: Wed Feb 13 20:53:43 2008 +0100 - - Merge branch 'master' of - ssh://pino@git.freedesktop.org/git/poppler/poppler - -commit 7d65b4da1bc060aeb94d67c2ff26912cef48c030 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Wed Feb 13 20:32:43 2008 +0100 - - Add images demo - - glib/demo/Makefile.am | 2 + - glib/demo/images.c | 338 - ++++++++++++++++++++++++++++++++++++++++++++++++++ - glib/demo/images.h | 31 +++++ - glib/demo/main.c | 4 +- - 4 files changed, 374 insertions(+), 1 deletion(-) - -commit e9187292701e72db1020f7701d0725d83eee4b00 -Author: Pino Toscano <pino@kde.org> -Date: Wed Feb 13 19:41:57 2008 +0100 - - Do the one-time initialisation in initTestCase(). - - qt4/tests/check_dateConversion.cpp | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -commit fb996c46e3c6b56a2c67819620000bcd804aacd6 -Author: Michael Vrable <mvrable@cs.ucsd.edu> -Date: Wed Feb 13 18:44:41 2008 +0100 - - Major rework of text display in form fields code. - - This adds support for UTF-16 strings as input, and will recode them - to the - appropriate character set for the font. - - The method Annot::layoutText packs a lot of functionality together, - but I - couldn't see a good way to split it apart. It will convert an - input text - string from PDFDocEncoding or UTF-16 (encoding is autodetected) to the - appropriate encoding for the font which will be used to display - the form - field. At the same time, it can compute the width of the resulting - string, - and optionally break the string at a specified width to aid in - wrapping - multi-line text. Text wrapping is integrated with encoding conversion - since wrapping is easiest with the original text (where spaces - and newlines - are easily identified), but text widths can only be computed after - re-encoding. - - Support for composite fonts is included, so long as those fonts use an - identity CMap, but this is still untested. Support for more - complex CMaps - is missing. - - The rewrite also includes a minor improvement to the formatting - of comb - fields; characters are now centered in the comb cells. - - poppler/Annot.cc | 507 - +++++++++++++++++++++++++++++++++++-------------------- - poppler/Annot.h | 9 +- - 2 files changed, 327 insertions(+), 189 deletions(-) - -commit 88c780aed4c9855f879e3c7a9f82500a859635a2 -Author: Michael Vrable <mvrable@cs.ucsd.edu> -Date: Wed Feb 13 18:42:49 2008 +0100 - - Fix what look to be a few bugs in functions for mapping to/from - Unicode. - - - Endianness fix in pdfDocEncodingToUTF16 (previously looked to - assume a - little-endian processor) - - Add support for CharCodeToUnicode::mapToCharCode for Unicode - codepoints - above 255. - - poppler/CharCodeToUnicode.cc | 4 ++-- - poppler/Form.cc | 4 ++-- - 2 files changed, 4 insertions(+), 4 deletions(-) - -commit 7574cb71f24ce5b32427f243c39b6029fb58ec81 -Merge: e798802f 4e45e5ca -Author: Pino Toscano <pino@kde.org> -Date: Wed Feb 13 01:07:31 2008 +0100 - - Merge branch 'master' of - ssh://pino@git.freedesktop.org/git/poppler/poppler - -commit 4e45e5ca4ab0ba2a6586505d80ed81f4b3426752 -Author: Patrick Spendrin <ps_ml@gmx.de> -Date: Tue Feb 12 21:41:26 2008 +0100 - - Do the right thing with CDECL, that is, undefine it if it is defined - so we can redefine it later - - poppler-config.h.cmake | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit e798802f00bff0a24ee6d1312d6c62624395865a -Author: Pino Toscano <pino@kde.org> -Date: Tue Feb 12 20:57:56 2008 +0100 - - Apidox fix: state which checksum is returned (if available). - - qt4/src/poppler-qt4.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 4e2ba70a88c40fef6775053b1cc5fa30e622cea7 -Author: Pino Toscano <pino@kde.org> -Date: Tue Feb 12 11:25:34 2008 +0100 - - Free the Object after you use it. - - poppler/Annot.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 039545fcd2c12631c7b8aea89c35f36cb387a17a -Author: Pino Toscano <pino@kde.org> -Date: Tue Feb 12 11:13:27 2008 +0100 - - Return the siblings even for checkboxes. - - qt4/src/poppler-form.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit fe5ee75cdf3e11e314318af12edf9d5bc8986250 -Author: Pino Toscano <pino@kde.org> -Date: Tue Feb 12 11:12:01 2008 +0100 - - Initialize correctly; free your memory. - - poppler/Form.cc | 2 ++ - 1 file changed, 2 insertions(+) - -commit e0eff92c7067d43faa8e93baed1f061863111251 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Feb 11 20:32:41 2008 +0100 - - Update the field dict instead of the annot dict for non composed dicts - - We were always updating the annot dictionary, adding or updating - the V field. While this is correct for composed dicts (annot + field) - it isn't for non composed ones since the annot dictionary doesn't - contain any V field because it's a field of the form field dictionary. - In these cases the form field is not correctly updated and if the - document is saved it will be wrong. - - poppler/Form.cc | 44 +++++++++++++++++++++++++++++++------------- - poppler/Form.h | 2 ++ - 2 files changed, 33 insertions(+), 13 deletions(-) - -commit 905e6da9795fee94329022c0cafbc229055fd4f6 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Feb 10 19:22:50 2008 +0100 - - Move forms specific draw methods from Annot to AnnotWidget class - - poppler/Annot.cc | 3433 - +++++++++++++++++++++++++++--------------------------- - poppler/Annot.h | 87 +- - poppler/Form.cc | 39 +- - poppler/Form.h | 2 + - poppler/Page.cc | 9 +- - 5 files changed, 1765 insertions(+), 1805 deletions(-) - -commit 78afbc4d7819654e8742d4457c9847ad02b73bf1 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Feb 10 17:12:59 2008 +0100 - - Some code refactoring and cleanup - - - Unused 'field' attribute in FormWidget class is now used and - getField() method has been added - - Method isReadOnly() in FormWidget class is not virtual anymore - but implemented in the base class - - Unused attribute 'catalog' in Form class has been removed and - 'acroForm' has been added instead with a getObj() method to get it. - - createFieldFromDict() method is now static - - poppler/Form.cc | 128 - ++++++++++++++++++++++++++++---------------------------- - poppler/Form.h | 41 +++++++++--------- - 2 files changed, 84 insertions(+), 85 deletions(-) - -commit 5f8e2f9140ee2ede841700726b974768ec863672 -Author: Pino Toscano <pino@kde.org> -Date: Mon Feb 11 20:16:44 2008 +0100 - - Use QVarLengthArray instead of relying on gcc-ism. - - qt4/src/poppler-page.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 7499764d382366823519aa13a38e1e44781c78af -Author: Pino Toscano <pino@kde.org> -Date: Mon Feb 11 11:57:50 2008 +0100 - - Add FormFieldButton::siblings(). - - This is needed for grouping together the radio buttons. - - qt4/src/poppler-form.cc | 14 ++++++++++++++ - qt4/src/poppler-form.h | 8 ++++++++ - 2 files changed, 22 insertions(+) - -commit 85bfa4f499a90d45b13df4d0a8760a7da6fc1532 -Author: Pino Toscano <pino@kde.org> -Date: Mon Feb 11 02:40:37 2008 +0100 - - Small apidox fix. - - qt4/src/poppler-form.h | 11 ++--------- - 1 file changed, 2 insertions(+), 9 deletions(-) - -commit ada05055c91e967dc3e2af32a2176dd12cb7fe70 -Author: Pino Toscano <pino@kde.org> -Date: Mon Feb 11 02:27:19 2008 +0100 - - Preliminary support for "button" form fields (ie, push buttons, - check boxes, and radio buttons). - - qt4/src/poppler-form.cc | 55 - +++++++++++++++++++++++++++++++++++++++++++++++++ - qt4/src/poppler-form.h | 54 - ++++++++++++++++++++++++++++++++++++++++++++++++ - qt4/src/poppler-page.cc | 6 ++++++ - 3 files changed, 115 insertions(+) - -commit 278b33f25df418ef12798100002845a3e2ceebd3 -Merge: c730b33f fdb0a4a2 -Author: Pino Toscano <pino@kde.org> -Date: Mon Feb 11 00:57:24 2008 +0100 - - Merge branch 'master' of - ssh://pino@git.freedesktop.org/git/poppler/poppler - -commit fdb0a4a2f1d86aec7a3b0fcd4b4d48455791ecad -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Sun Feb 10 18:47:40 2008 -0500 - - Avoid prescaling images when printing. - - Adds a function for letting the CairoOutputDev know whether it is - targetting a - screen or not. It then uses this knowledge to avoid prescaling - images. This way - cairo gets the full resolution image for use in the printed output. - - glib/poppler-page.cc | 1 + - poppler/CairoOutputDev.cc | 3 ++- - poppler/CairoOutputDev.h | 2 ++ - 3 files changed, 5 insertions(+), 1 deletion(-) - -commit c730b33f1ec2032c4b8c2660738448d954eb0f7d -Author: Pino Toscano <pino@kde.org> -Date: Mon Feb 11 00:46:20 2008 +0100 - - Keep the EmbFile object, and use this for getting the data. - - qt4/src/poppler-embeddedfile.cc | 33 +++++++++++---------------------- - qt4/src/poppler-private.h | 1 - - 2 files changed, 11 insertions(+), 23 deletions(-) - -commit 5915e57e7785370ce305cbbb3c2fedf36886689f -Author: Pino Toscano <pino@kde.org> -Date: Sun Feb 10 03:19:18 2008 +0100 - - const & in foreach - - qt4/tests/poppler-fonts.cpp | 2 +- - qt4/tests/stress-poppler-dir.cpp | 2 +- - qt4/tests/stress-poppler-qt4.cpp | 2 +- - qt4/tests/test-password-qt4.cpp | 2 +- - qt4/tests/test-poppler-qt4.cpp | 2 +- - 5 files changed, 5 insertions(+), 5 deletions(-) - -commit d8374e0c2eb3ba05be101687e20c5fcbc42c1ad0 -Author: Pino Toscano <pino@kde.org> -Date: Sun Feb 10 01:32:24 2008 +0100 - - Include only what needed; remove extra includes. - - qt4/tests/poppler-attachments.cpp | 4 +++- - qt4/tests/poppler-fonts.cpp | 4 +++- - qt4/tests/stress-poppler-dir.cpp | 9 ++++++--- - qt4/tests/stress-poppler-qt4.cpp | 9 ++++++--- - qt4/tests/test-password-qt4.cpp | 10 ++++++---- - qt4/tests/test-poppler-qt4.cpp | 12 ++++++++---- - 6 files changed, 32 insertions(+), 16 deletions(-) - -commit fa01a1115c4554b18c3462b568d76860d2fbe17b -Author: Pino Toscano <pino@kde.org> -Date: Sun Feb 10 01:09:57 2008 +0100 - - Comment out unused vars. - - utils/pdftoabw.cc | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit d3275e4263372b534c276f81d0c997ecb6675487 -Merge: c2186c18 5347a97e -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Feb 9 23:57:03 2008 +0100 - - Merge branch 'master' of - ssh://aacid@git.freedesktop.org/git/poppler/poppler - -commit c2186c1829c695c4ddb6c471ef8ad4ffa23c1b70 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Feb 9 23:56:32 2008 +0100 - - Only check if we are out of bounds if the object we are searching - for has a known id (0 also means not known) - - Found by Michael Vrable - - poppler/Lexer.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 5347a97e39388ae38cf2ab9c67f953b0f7a02a13 -Author: Pino Toscano <pino@kde.org> -Date: Sat Feb 9 18:26:41 2008 +0100 - - Add the operators for the flags we have. - - qt4/src/poppler-qt4.h | 3 +++ - 1 file changed, 3 insertions(+) - -commit 329ade4f936bf063539cdc887aaf9a1722a5b8e0 -Author: Pino Toscano <pino@kde.org> -Date: Sat Feb 9 18:23:59 2008 +0100 - - Add options for the PDF export; add the WithChanges flag for saving - the changes to the document as well. - - qt4/src/poppler-pdf-converter.cc | 25 +++++++++++++++++++++++-- - qt4/src/poppler-qt4.h | 14 ++++++++++++++ - 2 files changed, 37 insertions(+), 2 deletions(-) - -commit afb255366d56551bdc307766199bef9c5021d3ac -Merge: 8c44b175 8cb0e752 -Author: Pino Toscano <pino@kde.org> -Date: Sat Feb 9 17:58:49 2008 +0100 - - Merge branch 'master' of - ssh://pino@git.freedesktop.org/git/poppler/poppler - -commit 8c44b175081983c492821858341109fee9e86b16 -Author: Pino Toscano <pino@kde.org> -Date: Sat Feb 9 17:57:57 2008 +0100 - - Do not rely on GNU extensions, but at least use Qt. - - qt4/src/poppler-qiodeviceoutstream.cc | 11 ++++------- - 1 file changed, 4 insertions(+), 7 deletions(-) - -commit 8cb0e75203daa01439413d1a775482b48e784baa -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Feb 9 17:56:13 2008 +0100 - - Domain order is x_min x_max y_min y_max and not x_min y_min x_max - y_max - - poppler/GfxState.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit c8f734ba4258059fa4521a4d364f62ca1632840b -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Feb 9 13:37:04 2008 +0100 - - PS cos and sin input values are degrees so convert to radians so we - can use the cos and sin cmath functions - - poppler/Function.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 5fb0c9d31c1abf2e6ad306c112fbd2a7c33d8772 -Merge: 26556636 2255c85e -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Feb 9 13:15:15 2008 +0100 - - Merge branch 'master' of - ssh://carlosgc@git.freedesktop.org/git/poppler/poppler - -commit 26556636e71d5abcbfdd1373f5576d1233532cf8 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Feb 9 13:14:41 2008 +0100 - - Add saveWithoutChangesAs method to be able to save the document - ignoring changes made in forms or annots - - glib/poppler-document.cc | 41 ++++++++++++++++++++++++++++++++++++++++- - glib/poppler-document.h | 3 +++ - poppler/PDFDoc.cc | 38 ++++++++++++++++++++++++++++++++------ - poppler/PDFDoc.h | 4 ++++ - 4 files changed, 79 insertions(+), 7 deletions(-) - -commit 2255c85e4939a0752083dca21984ff4398baf8d2 -Merge: 5ba92876 56c92460 -Author: Pino Toscano <pino@kde.org> -Date: Sat Feb 9 12:49:45 2008 +0100 - - Merge branch 'master' of - ssh://pino@git.freedesktop.org/git/poppler/poppler - -commit 5ba928762471e1ea8b81acd4644dfd3f58d18f77 -Author: Pino Toscano <pino@kde.org> -Date: Sat Feb 9 12:48:04 2008 +0100 - - Fix placeholders in printf-like functions. - - glib/demo/page.c | 2 +- - glib/test-poppler-glib.cc | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -commit 56c924609223196c5c41b9e6d9102bc248bad947 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Feb 9 12:26:06 2008 +0100 - - atan operator must yield a degrees result between 0 and 360 - - See testcase at http://bugs.kde.org/show_bug.cgi?id=157497 - - poppler/Function.cc | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -commit 2a39932ae35a2716842bd2a1c3d4f9ce6b1e3dd8 -Author: Pino Toscano <pino@kde.org> -Date: Sat Feb 9 01:31:20 2008 +0100 - - Few improvements to the password test. - - - QString::fromUtf8() instead of QFile::encodeName() to correctly - pass the utf8 filenames - - QVERIFY(!foo) instead of QCOMPARE(foo, false) - - QVERIFY() also the return value of unlock() - - qt4/tests/check_password.cpp | 31 ++++++++++++++++--------------- - 1 file changed, 16 insertions(+), 15 deletions(-) - -commit cc9c124d4d859b845eebf4ca1e4397870a35fd4e -Author: Pino Toscano <pino@kde.org> -Date: Sat Feb 9 01:09:02 2008 +0100 - - Add an unit test case for few invalid dates. - - qt4/tests/check_dateConversion.cpp | 34 - ++++++++++++++++++++++++++++++++++ - 1 file changed, 34 insertions(+) - -commit eca91761741de5b340f7a2160db5b33401feb935 -Author: Pino Toscano <pino@kde.org> -Date: Fri Feb 8 18:42:14 2008 +0100 - - Remove unneeded headers. - - qt4/src/poppler-page.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 899627505a4645fb1cc7d3599adbeec449c57041 -Author: Pino Toscano <pino@kde.org> -Date: Fri Feb 8 18:41:13 2008 +0100 - - The return value is QString, so return QString's... - - qt4/src/poppler-document.cc | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -commit a1606fa4ff438983e3a7f55dd2d10a66f72e6711 -Author: Pino Toscano <pino@kde.org> -Date: Fri Feb 8 17:31:32 2008 +0100 - - Move checkDocument() inside the private class. - - qt4/src/poppler-document.cc | 6 +++--- - qt4/src/poppler-private.h | 2 ++ - qt4/src/poppler-qt4.h | 2 +- - 3 files changed, 6 insertions(+), 4 deletions(-) - -commit f1ec70a83f807493dab5118761df31c0f67decad -Author: Pino Toscano <pino@kde.org> -Date: Fri Feb 8 17:26:41 2008 +0100 - - Remove C-ism. - - qt4/src/poppler-document.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 3e994e8586fa1c87ef7e7f82af1cdacf2cd36310 -Author: Pino Toscano <pino@kde.org> -Date: Fri Feb 8 12:21:56 2008 +0100 - - Add the missing font types. - - qt4/src/poppler-fontinfo.cc | 11 +++++++++-- - 1 file changed, 9 insertions(+), 2 deletions(-) - -commit ba07963f85d777a441349e23d4c2f510e45c73be -Author: Pino Toscano <pino@kde.org> -Date: Fri Feb 8 12:19:04 2008 +0100 - - Be safe against self-assignment. - - qt4/src/poppler-fontinfo.cc | 3 +++ - 1 file changed, 3 insertions(+) - -commit 834b86548e09f4b24cdb2f194299d053b9b55022 -Author: Pino Toscano <pino@kde.org> -Date: Fri Feb 8 12:15:16 2008 +0100 - - Small apidox fix. - - qt4/src/poppler-qt4.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 11a61eac5b8cde04bf762bbbe0deab5c0bd52951 -Author: Pino Toscano <pino@kde.org> -Date: Fri Feb 8 02:21:32 2008 +0100 - - Pack few bools together. - - qt4/src/poppler-annotation.cc | 8 ++++---- - qt4/src/poppler-link.cc | 10 +++++----- - qt4/src/poppler-private.h | 4 ++-- - 3 files changed, 11 insertions(+), 11 deletions(-) - -commit 1aeba15b5eb9b30943259824678ebc9e4f56e870 -Merge: a4890637 22d10c19 -Author: Pino Toscano <pino@kde.org> -Date: Fri Feb 8 01:39:16 2008 +0100 - - Merge branch 'master' of - ssh://pino@git.freedesktop.org/git/poppler/poppler - -commit a4890637a2c2ab1623311d9a6920e82131c2597c -Author: Pino Toscano <pino@kde.org> -Date: Fri Feb 8 01:36:56 2008 +0100 - - Move QStringToUnicodeGooString() and QStringToGooString() to the - private module. - - qt4/src/poppler-document.cc | 10 ---------- - qt4/src/poppler-form.cc | 15 --------------- - qt4/src/poppler-private.cc | 25 +++++++++++++++++++++++++ - qt4/src/poppler-private.h | 4 ++++ - 4 files changed, 29 insertions(+), 25 deletions(-) - -commit 5e44241c4976b819f7be6badd2d183fbfb8ee6de -Author: Pino Toscano <pino@kde.org> -Date: Fri Feb 8 01:30:07 2008 +0100 - - Move the string functions implementation in a .cc file. - - qt4/src/CMakeLists.txt | 1 + - qt4/src/Makefile.am | 1 + - qt4/src/poppler-private.cc | 70 - ++++++++++++++++++++++++++++++++++++++++++++++ - qt4/src/poppler-private.h | 46 +++--------------------------- - 4 files changed, 76 insertions(+), 42 deletions(-) - -commit 124d92139241ad95da559d22af48254b45ac4a2e -Author: Pino Toscano <pino@kde.org> -Date: Fri Feb 8 01:07:43 2008 +0100 - - Include own header first, remove extra includes. - - qt4/src/poppler-document.cc | 1 - - qt4/src/poppler-embeddedfile.cc | 3 ++- - qt4/src/poppler-form.cc | 4 +++- - qt4/src/poppler-link-extractor-private.h | 2 ++ - qt4/src/poppler-link-extractor.cc | 7 +++++-- - qt4/src/poppler-page-private.h | 6 +++++- - qt4/src/poppler-private.h | 4 +++- - qt4/src/poppler-qt4.h | 2 -- - qt4/src/poppler-sound.cc | 4 ++-- - 9 files changed, 22 insertions(+), 11 deletions(-) - -commit 22d10c19e232dea143bda372c92aa12b999e4921 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Feb 7 23:38:50 2008 +0100 - - PDF spec says name tokens have a maximum length of 127, but there are - some docs in the wild with more than that and they work on acroread - so increase the allowed length to 128+127 - - poppler/Lexer.cc | 25 +++++++++++++++++++++---- - 1 file changed, 21 insertions(+), 4 deletions(-) - -commit ee9f85915feb86b54ace1a403baa13bbdd7c3966 -Author: Pino Toscano <pino@kde.org> -Date: Thu Feb 7 18:07:53 2008 +0100 - - Having a PageData is mandatory. - - Just assert when constructing instead of checking for it in each - link iteration. - - qt4/src/poppler-link-extractor.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit ad4b1361f6c25359e6ddb38599bfc1e4e3e80408 -Author: Pino Toscano <pino@kde.org> -Date: Thu Feb 7 18:03:30 2008 +0100 - - Precalc stuff we don't need to recalc in each link iteration. - - qt4/src/poppler-link-extractor-private.h | 3 ++- - qt4/src/poppler-link-extractor.cc | 14 ++++++++------ - 2 files changed, 10 insertions(+), 7 deletions(-) - -commit 82432dbc62a0879f4513640c2e0f594fda9347ad -Author: Pino Toscano <pino@kde.org> -Date: Thu Feb 7 17:51:50 2008 +0100 - - Store the ::Page internally, so we don't need to get it again - everytime. - - qt4/src/poppler-page-private.h | 3 +++ - qt4/src/poppler-page.cc | 37 ++++++++++++++----------------------- - 2 files changed, 17 insertions(+), 23 deletions(-) - -commit 8ec51f7ca518aa6a4a69f30d373722d05f50cf07 -Author: Pino Toscano <pino@kde.org> -Date: Thu Feb 7 16:48:16 2008 +0100 - - Compile the stress-poppler-dir test as well. - - qt4/tests/CMakeLists.txt | 1 + - 1 file changed, 1 insertion(+) - -commit 8a946b76ae2e7c2c5238b4e580c1c226eb457dc9 -Author: Pino Toscano <pino@kde.org> -Date: Thu Feb 7 01:07:28 2008 +0100 - - Micro-touches to the debug messages. - - qt4/src/poppler-page.cc | 26 +++++++++++++------------- - 1 file changed, 13 insertions(+), 13 deletions(-) - -commit c31990dfe50c7a0e3999e6d967699fce5ccb3339 -Merge: 7701e2a5 6d58cda8 -Author: Pino Toscano <pino@kde.org> -Date: Tue Feb 5 00:38:00 2008 +0100 - - Merge branch 'master' of - ssh://pino@git.freedesktop.org/git/poppler/poppler - -commit 7701e2a5c7d18fdaa0fa40c190e6ee0524746046 -Author: Pino Toscano <pino@kde.org> -Date: Tue Feb 5 00:37:01 2008 +0100 - - Add a AnnotColor -> QColor conversion method. - - qt4/src/poppler-annotation-helper.h | 6 ++++++ - qt4/src/poppler-annotation.cc | 31 +++++++++++++++++++++++++++++++ - 2 files changed, 37 insertions(+) - -commit 6d58cda82b0181f2cca6e9d95b15877793be0812 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Feb 4 23:33:51 2008 +0100 - - Protect us against weird dateString values - - qt4/src/poppler-document.cc | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -commit aa0435f1544fe1adcf10173e34eaeaf2a7a703c7 -Merge: b43f4e9a 37600b5e -Author: Pino Toscano <pino@kde.org> -Date: Mon Feb 4 20:56:53 2008 +0100 - - Merge branch 'master' of - ssh://pino@git.freedesktop.org/git/poppler/poppler - -commit 37600b5e848386d2c92c3dff8219c9dda16b0dca -Author: Iñigo Martínez <inigomartinez@gmail.com> -Date: Sun Feb 3 22:42:51 2008 +0100 - - Minor changes to Annot related stuff. - - Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com> - - poppler/Annot.cc | 15 ++++----------- - poppler/Annot.h | 12 ++++++++++-- - poppler/Gfx.cc | 7 ++++--- - poppler/Page.cc | 9 +++++++++ - poppler/Page.h | 3 +++ - 5 files changed, 30 insertions(+), 16 deletions(-) - -commit b43f4e9a161a1fd7b827244dc21b1bd2a6df7054 -Author: Pino Toscano <pino@kde.org> -Date: Sun Feb 3 20:32:15 2008 +0100 - - Pass the DocumentData to the Page (simplify a bit some code). - - qt4/src/poppler-document.cc | 2 +- - qt4/src/poppler-link-extractor-private.h | 4 +- - qt4/src/poppler-link-extractor.cc | 8 ++-- - qt4/src/poppler-page-private.h | 4 +- - qt4/src/poppler-page.cc | 64 - ++++++++++++++++---------------- - qt4/src/poppler-qt4.h | 5 +-- - 6 files changed, 42 insertions(+), 45 deletions(-) - -commit 4e0bb0307fccefc21f74a4c5a3a0d7e8e687b550 -Author: Pino Toscano <pino@draco.(none)> -Date: Sat Feb 2 12:57:25 2008 +0100 - - Fix include guard. - - poppler/ArthurOutputDev.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 6f11ef660540fd13aad1350385beb90758ca86af -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Feb 1 23:55:37 2008 +0100 - - Fix for end condition, init ucode to 0 - - poppler/GfxFont.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 1da2091807ae7f7d4d3f446953c41b4c440d4b1b -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Jan 31 23:52:20 2008 +0100 - - Ensure we don't draw outside the main bitmap on - SplashOutputDev::setSoftMask - - Fixes crash on http://bugs.kde.org/show_bug.cgi?id=157000 - - poppler/SplashOutputDev.cc | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -commit ecabc9469b137e8251344e5502de1cbf875223b9 -Author: Pino Toscano <pino@kde.org> -Date: Thu Jan 31 00:20:55 2008 +0100 - - Set RelWithDebInfo as default build type, if not specified. - - cmake/modules/PopplerMacros.cmake | 4 ++++ - 1 file changed, 4 insertions(+) - -commit 19da87a20b3906523a330e3c956903a58a3ede7f -Author: Pino Toscano <pino@kde.org> -Date: Thu Jan 31 00:11:58 2008 +0100 - - Support the different CMake build modes. - - Now you can specify (using -DCMAKE_BUILD_TYPE=type) a CMake build - type to have GCC or ICC w/ tuned C(XX)FLAGS. - The supported build types are: None (as in no type is specified on - command line), RelWithDebInfo, Release, Debug, DebugFull, Profile. - - CMakeLists.txt | 7 ------- - cmake/modules/PopplerMacros.cmake | 29 +++++++++++++++++++++++++++++ - 2 files changed, 29 insertions(+), 7 deletions(-) - -commit 37d2055137c310ceb217164a76814b188be3b1b2 -Author: Pino Toscano <pino@draco.(none)> -Date: Wed Jan 30 23:12:03 2008 +0100 - - Introduce the CMake-based build system. - - Mostly works nicely as the autotools, and it mimics (almost) all - the autotools behaviours. - Copied some scripts from the KDE cmake scripts (BSD-licensed). - TODO: gtk-doc. - - CMakeLists.txt | 390 +++++++ - ConfigureChecks.cmake | 47 + - cmake/modules/COPYING-CMAKE-SCRIPTS | 22 + - cmake/modules/FindCairo.cmake | 44 + - cmake/modules/FindFontconfig.cmake | 47 + - cmake/modules/FindFreetype.cmake | 74 ++ - cmake/modules/FindGTK.cmake | 70 ++ - cmake/modules/FindPackageHandleStandardArgs.cmake | 58 + - cmake/modules/FindQt3.cmake | 319 +++++ - cmake/modules/FindQt4.cmake | 1295 - +++++++++++++++++++++ - cmake/modules/MacroBoolTo01.cmake | 20 + - cmake/modules/MacroEnsureVersion.cmake | 117 ++ - cmake/modules/MacroOptionalFindPackage.cmake | 28 + - cmake/modules/MacroPushRequiredVars.cmake | 47 + - cmake/modules/PopplerDefaults.cmake | 10 + - cmake/modules/PopplerMacros.cmake | 83 ++ - config.h.cmake | 149 +++ - glib/CMakeLists.txt | 107 ++ - glib/demo/CMakeLists.txt | 17 + - glib/poppler-features.h.cmake | 24 + - poppler-cairo.pc.cmake | 9 + - poppler-config.h.cmake | 160 +++ - poppler-glib.pc.cmake | 13 + - poppler-qt.pc.cmake | 12 + - poppler-qt4.pc.cmake | 12 + - poppler-splash.pc.cmake | 9 + - poppler.pc.cmake | 11 + - qt/CMakeLists.txt | 33 + - qt4/CMakeLists.txt | 2 + - qt4/src/CMakeLists.txt | 43 + - qt4/tests/CMakeLists.txt | 47 + - test/CMakeLists.txt | 52 + - utils/CMakeLists.txt | 84 ++ - 33 files changed, 3455 insertions(+) - -commit 1ea831d3eee6eda35fadfb3c75962a0c708e6c7b -Author: Pino Toscano <pino@kde.org> -Date: Wed Jan 30 22:17:38 2008 +0100 - - Preprocessor #warning is GCC-specific. - - poppler/ArthurOutputDev.cc | 4 ++++ - 1 file changed, 4 insertions(+) - -commit 4c738cc6bd51f9d9e23ba83949c490c5c8691345 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Jan 29 23:45:52 2008 +0100 - - Scale text to match 'm' size - - Fixes bug 12304 - - poppler/SplashOutputDev.cc | 37 +++++++++++++++++++++++++++++++ - splash/SplashFTFont.cc | 55 - +++++++++++++++++++++++++++++++++++++++++++++- - splash/SplashFTFont.h | 4 ++++ - splash/SplashFont.h | 4 ++++ - splash/SplashFontFile.cc | 1 + - splash/SplashFontFile.h | 2 ++ - 6 files changed, 102 insertions(+), 1 deletion(-) - -commit 64f16cf6ebf2870852fe8d937b25be58869ad40a -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Jan 29 23:41:15 2008 +0100 - - Enable antialias by default on the test tool - - qt4/tests/test-poppler-qt4.cpp | 2 ++ - 1 file changed, 2 insertions(+) - -commit 90f0e6bc1e96d9f1666cb8476a92e127f5b927d4 -Author: Jonathan Kew <jonathan_kew@sil.org> -Date: Tue Jan 29 20:23:08 2008 +0100 - - Provide gstrndup as a portable substitue of strndup - - configure.ac | 1 - - goo/gmem.cc | 7 +++++++ - goo/gmem.h | 5 +++++ - poppler/GfxFont.cc | 8 +------- - 4 files changed, 13 insertions(+), 8 deletions(-) - -commit 77b91c852ad3d5554afc03aee92a1d928f233401 -Merge: 0babb0eb 05336967 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Jan 28 20:44:34 2008 +0100 - - Merge branch 'master' of - ssh://aacid@git.freedesktop.org/git/poppler/poppler - -commit 0babb0eb1afa343fb12a3fd037b98d2d1c794a1c -Author: Jonathan Kew <jonathan_kew@sil.org> -Date: Mon Jan 28 20:42:44 2008 +0100 - - Introduce a check for strndup and alternative for systems without it - - configure.ac | 1 + - poppler/GfxFont.cc | 6 ++++++ - 2 files changed, 7 insertions(+) - -commit 053369678963206a4afa88a614de1994872c7c5a -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Jan 27 19:36:28 2008 +0100 - - Add ok_to_fill_form permission flag - - glib/poppler-document.cc | 2 ++ - glib/poppler-document.h | 3 ++- - glib/test-poppler-glib.cc | 21 +++++++++++++++++++-- - 3 files changed, 23 insertions(+), 3 deletions(-) - -commit 3085a9495ad87a54758da0024372610fdaf88d57 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Jan 27 19:15:34 2008 +0100 - - Fix slice rendering in poppler glib demo - - glib/demo/render.c | 41 ++++++++++++++++++++++++----------------- - 1 file changed, 24 insertions(+), 17 deletions(-) - -commit 7ad6c4ba110b970516d5380444a03ae217496ddf -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Jan 24 21:14:44 2008 +0100 - - Incrementing the iterator would be a good idea - - qt4/src/poppler-annotation.cc | 1 + - 1 file changed, 1 insertion(+) - -commit 7c99ec4635a4971321bbead7d1bc723da59b755e -Author: Julien Rebetez <julien@fhtagn.net> -Date: Thu Jan 24 19:18:15 2008 +0100 - - Revert unwanted change on Dict, fix leak on writeTrailer - - poppler/Dict.cc | 2 +- - poppler/PDFDoc.cc | 4 ++-- - 2 files changed, 3 insertions(+), 3 deletions(-) - -commit 2335fb6034d2e9ec304abba400119b88302b3160 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Jan 23 23:26:20 2008 +0100 - - Draw underlined Links correctly - - See http://bugs.kde.org/show_bug.cgi?id=151359 for an example - - poppler/Gfx.cc | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -commit 96c532ea4b56a147de1deb965126e31f87df588b -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Wed Jan 23 13:30:12 2008 +0100 - - Fix memory leak - - poppler/Form.cc | 4 ++++ - 1 file changed, 4 insertions(+) - -commit 6bca64407c675ca837f83a12c0f655f975f14407 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Wed Jan 23 13:27:45 2008 +0100 - - Make sure default values are not loaded more than once for the - same widget. - - poppler/Form.cc | 18 +++++++++++++++++- - poppler/Form.h | 1 + - 2 files changed, 18 insertions(+), 1 deletion(-) - -commit eccf84b51a1cf5d478c0ec84be3fc9be8e458f4f -Author: Pino Toscano <pino@kde.org> -Date: Tue Jan 22 23:28:16 2008 +0100 - - Refactor the PSConverter and add a PDFConverter (for PDF export/save). - - Add an OutStream subclass to redirect the output to a QIODevice. - Split the PSConverter in a base class (BaseConverter) w/ d_ptr - structure. - Add a new PDFConverter that inherit BaseConverter, and do the - actual export - making use of the new QIODeviceOutStream. - The BaseConverter now handles automatically file or QIODevice output. - - qt4/src/Makefile.am | 5 + - qt4/src/poppler-base-converter.cc | 99 ++++++++++++++++ - qt4/src/poppler-converter-private.h | 48 ++++++++ - qt4/src/poppler-document.cc | 5 + - qt4/src/poppler-pdf-converter.cc | 68 +++++++++++ - qt4/src/poppler-ps-converter.cc | 162 - ++++++++++++--------------- - qt4/src/poppler-qiodeviceoutstream-private.h | 47 ++++++++ - qt4/src/poppler-qiodeviceoutstream.cc | 71 ++++++++++++ - qt4/src/poppler-qt4.h | 85 +++++++++++--- - 9 files changed, 483 insertions(+), 107 deletions(-) - -commit 547db8be1ab0b2987f0f06d8529eaaed2414028c -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Jan 22 13:22:20 2008 +0100 - - Fix a crash when createAnnot returns NULL due to invalid annot dict. - - poppler/Annot.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 0d558841142587d66bd3b2025e5a9ca39f7a6159 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Jan 21 21:43:39 2008 +0100 - - Fix another reversed comparison due to cmp - - poppler/Annot.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit cb6a87e39336e2e3893f3e5f577e4d176d237a9f -Author: Iñigo Martínez <inigomartinez@gmail.com> -Date: Mon Jan 21 10:07:35 2008 +0100 - - Fixed a few compare issues with Annots. - - Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com> - - poppler/Annot.cc | 24 ++++++++++++------------ - 1 file changed, 12 insertions(+), 12 deletions(-) - -commit 7cf85dc8d7c895a211684c7d36757063ed4f469b -Author: Albert Astals Cid <tsdgeos@bluebox.localdomain> -Date: Mon Jan 21 21:27:49 2008 +0100 - - The glade file needs to be distributed - - test/Makefile.am | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 46e93d31dd9b5909ecd8f7a8f8de23329444a7bc -Author: Albert Astals Cid <tsdgeos@bluebox.localdomain> -Date: Sun Jan 20 19:56:51 2008 +0100 - - we need time.h if we use time() - - poppler/PDFDoc.cc | 1 + - 1 file changed, 1 insertion(+) - -commit a0adb006c38ea07f010a01d9c0bb07ca0f48939d -Author: Pino Toscano <pino@kde.org> -Date: Sun Jan 20 19:55:55 2008 +0100 - - Added a saveAs() overload which takes a plain OutStream - - poppler/PDFDoc.cc | 9 +++++++-- - poppler/PDFDoc.h | 2 ++ - 2 files changed, 9 insertions(+), 2 deletions(-) - -commit fcdd5c51f370d040ae57aa64801c9bd4dbe88752 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Jan 19 18:00:10 2008 +0100 - - Do not render images when getting the image mapping, it can be done - later on demand. - - glib/poppler-page.cc | 81 +++++++++++++++------------- - glib/poppler-page.h | 6 ++- - poppler/CairoOutputDev.cc | 131 - ++++++++++++++++++++++++++-------------------- - poppler/CairoOutputDev.h | 12 ++++- - 4 files changed, 135 insertions(+), 95 deletions(-) - -commit 37ae465775d9a53e7c06cf51aa215439214fd79c -Author: Albert Astals Cid <tsdgeos@bluebox.localdomain> -Date: Sat Jan 19 14:00:31 2008 +0100 - - ignore pdf-fullrewrite binary - - test/.gitignore | 1 + - 1 file changed, 1 insertion(+) - -commit 1d160935ea4c1116b745c584ed7f1fd03fbbfb46 -Author: Iñigo Martínez <inigomartinez@gmail.com> -Date: Sat Jan 19 13:59:46 2008 +0100 - - AnnotWidget support and few fixes - - poppler/Annot.cc | 243 - ++++++++++++++++++++++++++++++++++++++++++++++++++++--- - poppler/Annot.h | 142 +++++++++++++++++++++++++++++--- - 2 files changed, 365 insertions(+), 20 deletions(-) - -commit 0e91a3973e525d65236d15930a8ea0e5bbb6a6cc -Author: Iñigo Martínez <inigomartinez@gmail.com> -Date: Sat Jan 19 13:59:25 2008 +0100 - - AnnotTextMarkup support and improved AnnotQuadrilaterals - - poppler/Annot.cc | 356 - ++++++++++++++++++++++++++++++++++++++++++++----------- - poppler/Annot.h | 130 +++++++++++++++++--- - 2 files changed, 400 insertions(+), 86 deletions(-) - -commit c13952cd56a40bad14a1bf28699b137f65162f10 -Author: Iñigo Martínez <inigomartinez@gmail.com> -Date: Sat Jan 19 13:59:02 2008 +0100 - - Changed AnnotQuadrilateral parsing inside AnnotLink - - poppler/Annot.cc | 246 - ++++++++++++++++++++++++++++++------------------------- - poppler/Annot.h | 19 +++-- - 2 files changed, 144 insertions(+), 121 deletions(-) - -commit 2f821f10fbbba9363405201c86494cd861cec2b2 -Author: Iñigo Martínez <inigomartinez@gmail.com> -Date: Sat Jan 19 13:49:43 2008 +0100 - - Add AnnotQuadPoints class - - poppler/Annot.cc | 16 ++++++++++++++++ - poppler/Annot.h | 23 +++++++++++++++++++++++ - 2 files changed, 39 insertions(+) - -commit de4c8fa6607e55c199bede1dc731227692ef4f53 -Author: Iñigo Martínez <inigomartinez@gmail.com> -Date: Sun Dec 30 21:21:56 2007 +0100 - - AnnotFreeText support. - - Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com> - - poppler/Annot.cc | 232 - ++++++++++++++++++++++++++++++++++++++++++++++++++++++- - poppler/Annot.h | 127 ++++++++++++++++++++++++++++++ - 2 files changed, 358 insertions(+), 1 deletion(-) - -commit c3504a87933ae1516b1ef05e527fd1c039091235 -Author: Iñigo Martínez <inigomartinez@gmail.com> -Date: Sun Dec 30 19:37:18 2007 +0100 - - Improved AnnotLink support. - - Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com> - - poppler/Annot.cc | 116 - +++++++++++++++++++++++++++++++++++++++++++++++++++++++ - poppler/Annot.h | 51 ++++++++++++++++++++++++ - 2 files changed, 167 insertions(+) - -commit a20468cc38bb590124b2b028a08f364f90f2487f -Author: Julien Rebetez <julien@fhtagn.net> -Date: Sat Jan 19 13:02:17 2008 +0100 - - Adds a test application to test full rewrite functionnality. - - test/Makefile.am | 11 ++++++++++- - test/pdf-fullrewrite.cc | 44 ++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 54 insertions(+), 1 deletion(-) - -commit 246294714c6011651fd0e5b3649bd65919058c72 -Author: Julien Rebetez <julien@fhtagn.net> -Date: Sat Jan 19 12:59:03 2008 +0100 - - FormWidget's 'modified' member variable is now updated correctly - each time an update is done. - - Before, only text FormWidget had their 'modified' field set to 'true' - if they had been updated. - It is now the case for the other type of FormWidgets. - - poppler/Form.cc | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -commit 6e0f297b8b17afb95779724b8618ca39016e664a -Author: Julien Rebetez <julien@fhtagn.net> -Date: Sat Jan 19 12:54:09 2008 +0100 - - Annot will save their generated appearance in their AP dict. - - poppler/Annot.cc | 42 ++++++++++++++++++++++++++++++++++++++---- - poppler/Annot.h | 1 + - 2 files changed, 39 insertions(+), 4 deletions(-) - -commit e20f6a8e9ac3936b4bc03710a71fe390dfc4c094 -Author: Julien Rebetez <julien@fhtagn.net> -Date: Sat Jan 19 12:52:02 2008 +0100 - - Add deep copy constructor to Dict. - - poppler/Dict.cc | 14 +++++++++++++- - poppler/Dict.h | 1 + - 2 files changed, 14 insertions(+), 1 deletion(-) - -commit e8d46cab77c7167edb0896296118daafc0f13b6d -Author: Julien Rebetez <julien@fhtagn.net> -Date: Sat Jan 19 12:51:44 2008 +0100 - - Adds the ability to save PDF using either incremental update or by - rewriting completly the PDF. - - poppler/PDFDoc.cc | 379 - +++++++++++++++++++++++++++++++++++++++++++++++++++++- - poppler/PDFDoc.h | 18 ++- - poppler/XRef.cc | 12 +- - poppler/XRef.h | 3 +- - 4 files changed, 402 insertions(+), 10 deletions(-) - -commit 742b0c3dec01d8672b84f56d5bb0e2890b178594 -Author: Julien Rebetez <julien@fhtagn.net> -Date: Sat Jan 19 12:51:27 2008 +0100 - - Make the md5 method of Decrypt public so it can be used by other - files. - - poppler/Decrypt.cc | 5 ++--- - poppler/Decrypt.h | 1 + - 2 files changed, 3 insertions(+), 3 deletions(-) - -commit bb7867976740dea259d4110c072552fc5953910f -Author: Julien Rebetez <julien@fhtagn.net> -Date: Sat Jan 19 12:51:07 2008 +0100 - - Modify the writeToFile method of XRef so it uses OutStream instead - of a C file descriptor. - - poppler/XRef.cc | 10 +++++----- - poppler/XRef.h | 2 +- - 2 files changed, 6 insertions(+), 6 deletions(-) - -commit d80736587fdbc0e163077f27bfd21c5e3a7fa4c7 -Author: Julien Rebetez <julien@fhtagn.net> -Date: Sat Jan 19 12:50:49 2008 +0100 - - Adds addIndirectObject method to XRef. This method allow the creation - of new indirect objects. - - poppler/XRef.cc | 39 +++++++++++++++++++++++++++++++++++++++ - poppler/XRef.h | 1 + - 2 files changed, 40 insertions(+) - -commit 8bd00dd0872191b8806e9411d9a1adc441f08a47 -Author: Julien Rebetez <julien@fhtagn.net> -Date: Sat Jan 19 12:50:16 2008 +0100 - - Add some unfiltered methods to input stream. - - With these methods, it is possible to read the raw content from the - stream, without any filtering (even not the headers). - - poppler/Stream.cc | 41 ++++++++++++++++++++++++++++------------- - poppler/Stream.h | 26 ++++++++++++++++++++++++++ - 2 files changed, 54 insertions(+), 13 deletions(-) - -commit 8bcda287ddd316f90b3e47a3a307fbe63a5c21f7 -Author: Julien Rebetez <julien@fhtagn.net> -Date: Sat Jan 19 12:46:53 2008 +0100 - - Add setNeedFree method to MemStream so it is possible to choose if - the stream should take care of deleting the buffer. - - poppler/Stream.h | 4 ++++ - 1 file changed, 4 insertions(+) - -commit 4fbd143de7e3a8ab386dd14b057e62b3b9fe04e4 -Author: Julien Rebetez <julien@fhtagn.net> -Date: Sat Jan 19 12:45:54 2008 +0100 - - Add Outstream, a base class for output streams and FileOutStream, - which implements OutStream for output to a file. - - poppler/Stream.cc | 55 +++++++++++++++++++++++++++++++++++++++++++++++ - poppler/Stream.h | 64 - +++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 119 insertions(+) - -commit 696eaa47169fb063b7e6998c876926c578b6fbfa -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Jan 17 15:56:59 2008 +0100 - - Fix a crash when editing text form fields - - poppler/Annot.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 9ec1b28dcdade12498b94b650c26483581294ee6 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Jan 17 14:54:34 2008 +0100 - - Fix a crash when a form field contains reference to non existant - children - - poppler/Form.cc | 4 ++++ - 1 file changed, 4 insertions(+) - -commit f7ed40c465033bad26dfda008c5984954baa0607 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Wed Jan 16 21:01:50 2008 +0100 - - Add a cast to fix build - - glib/demo/info.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 1c0aa21e598b879ec49d96700e6438ccb8ac2283 -Author: Albert Astals Cid <tsdgeos@bluebox.localdomain> -Date: Fri Jan 11 20:28:49 2008 +0100 - - rename info.c to info.cc to fix bug 14024 - - glib/demo/Makefile.am | 2 +- - glib/demo/{info.c => info.cc} | 0 - 2 files changed, 1 insertion(+), 1 deletion(-) - -commit 88f8bf850b6c41d25b9576597b5fc5bd75a122f4 -Author: Kjartan Maraas <kmaraas@gnome.org> -Date: Thu Jan 10 23:51:54 2008 +0100 - - Fix two use after free bugs in HtmlOutputDev.cc - - utils/HtmlOutputDev.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 348f4f9d9d5b0f91da6f46e0fcefec80255d4179 -Merge: 8a8a4f01 4eca2e04 -Author: Albert Astals Cid <tsdgeos@bluebox.localdomain> -Date: Sat Jan 5 23:03:06 2008 +0100 - - Merge branch 'master' of - ssh://aacid@git.freedesktop.org/git/poppler/poppler - -commit 8a8a4f01272fb86898fafbda07129c0cbc03d527 -Author: Pino Toscano <pino@kde.org> -Date: Sat Jan 5 23:02:22 2008 +0100 - - Make Document::renderHints return the correct render hints - - qt4/src/poppler-document.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 4eca2e041c93349e0c4666e83ad1ca3caff91dee -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Jan 1 14:34:00 2008 +0100 - - Add page transitions demo - - glib/demo/Makefile.am | 2 + - glib/demo/main.c | 16 +-- - glib/demo/transitions.c | 321 - ++++++++++++++++++++++++++++++++++++++++++++++++ - glib/demo/transitions.h | 31 +++++ - 4 files changed, 363 insertions(+), 7 deletions(-) - -commit e92b50bbd3dfc8657b611e3c33129d7c5bae2319 -Author: Koji Otani <sho@bbr.jp> -Date: Wed Dec 26 18:56:01 2007 +0100 - - Use getEmbeddedFontID instead of getEmbeddedFontName to check if a - font is embedded or not - - poppler/GfxFont.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 30e9bae97e3742913015f7ea46636b2b80937612 -Author: Ed Catmur <ed@catmur.co.uk> -Date: Sat Dec 22 22:54:51 2007 +0100 - - Fixlets for Adobe Glyph Naming convention implementation - - poppler/GfxFont.cc | 94 - ++++++++++++++++++++++++++++-------------------------- - 1 file changed, 48 insertions(+), 46 deletions(-) - -commit 40551e616b007ceb15c9d6e3d77c24538ffec924 -Author: Albert Astals Cid <tsdgeos@bluebox.localdomain> -Date: Sat Dec 22 14:31:50 2007 +0100 - - Check the destination page of the link does exist - - qt4/src/poppler-link.cc | 20 ++++++++++++-------- - 1 file changed, 12 insertions(+), 8 deletions(-) - -commit c06d6f2236d854f05e7621be280109ff27dc73b9 -Author: Albert Astals Cid <tsdgeos@bluebox.localdomain> -Date: Thu Dec 20 20:13:08 2007 +0100 - - Use UnicodeParsedString that does exactly what this code does - - qt4/src/poppler-document.cc | 28 +--------------------------- - 1 file changed, 1 insertion(+), 27 deletions(-) - -commit 5f9f06a10fdb72a9d809ee1f779e1a8f549840e7 -Author: Koji Otani <sho@bbr.jp> -Date: Thu Dec 20 19:59:26 2007 +0100 - - Fix for latest CJK code - - See - http://lists.freedesktop.org/archives/poppler/2007-December/003244.html - for more information - - poppler/GfxFont.cc | 14 ++++++++++---- - 1 file changed, 10 insertions(+), 4 deletions(-) - -commit bb49e1e3909fc7392c197dc67d9b7f5312fd0dad -Author: Ed Catmur <ed@catmur.co.uk> -Date: Tue Dec 18 20:20:11 2007 +0100 - - Implement Adobe Glyph Naming convention - - poppler/GfxFont.cc | 183 - ++++++++++++++++++++++++++++++++++++++++++++--------- - 1 file changed, 154 insertions(+), 29 deletions(-) - -commit 5634d63abdd64d371f2e8687a1c172f55b052008 -Author: Koji Otani <sho@bbr.jp> -Date: Mon Dec 17 20:43:41 2007 +0100 - - Allow seting some more Graphics States (Font, LW, LC, LJ, ML, D, - RI, FL) by operator 'gs' - - poppler/Gfx.cc | 67 - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 67 insertions(+) - -commit 7a9e7fc96b47b9d833300233ac38bbd60097f425 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Dec 16 21:21:08 2007 +0100 - - Add AnnotLink class so that link annots are properly recognized - - Right now, all of the annots except Text, are created using the - base class Annot which sets the type to unknown. For link annots this - causes the border never be drawn, since we are checking first - whether the - annot is a Link and it's always false. - - poppler/Annot.cc | 12 +++++++++++- - poppler/Annot.h | 10 ++++++++++ - 2 files changed, 21 insertions(+), 1 deletion(-) - -commit 796d9cb9b188a8af69d7fbf9bccbb408cbf6a71a -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Dec 15 15:21:49 2007 +0100 - - Fix a crash when trying to create a temp annot with catalog = NULL - - poppler/Annot.cc | 7 +++++++ - poppler/Annot.h | 1 + - poppler/Form.cc | 6 ++---- - 3 files changed, 10 insertions(+), 4 deletions(-) - -commit 99f049f0dfbfd9c22bea56ae96253837ae421e23 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri Dec 14 15:26:24 2007 +0100 - - Use the default dash array when it's not correct in AnnotBorderBS - - poppler/Annot.cc | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -commit cb2a997aa6f9dd5508ca8b04e63815da893497ef -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri Dec 14 14:12:14 2007 +0100 - - Fix another crash due to uninitialized variables - - poppler/Annot.cc | 18 ++++++++---------- - poppler/Annot.h | 1 + - 2 files changed, 9 insertions(+), 10 deletions(-) - -commit f704e86d8c72bacbd9443c4d828cd284d3a11753 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri Dec 14 12:58:12 2007 +0100 - - Fix several crashes due to uninitialized variables in Annots. - - poppler/Annot.cc | 11 +++++++---- - 1 file changed, 7 insertions(+), 4 deletions(-) - -commit 0820a93ba1c0e893681024feb9f9bd120a9eeb4d -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri Dec 14 12:38:58 2007 +0100 - - Check whether top and left should be changed in FitH, FitV, FitBH - and FitBV destinations - - According to the spec, if a null value is specified for top or left - parameter in such - destinations, the parameter should be retained unchanged. - - poppler/Link.cc | 36 ++++++++++++++++++++++++++++-------- - 1 file changed, 28 insertions(+), 8 deletions(-) - -commit 0fb42a2f557d5ec83b42326eb6b0be41622ca328 -Author: Iñigo Martínez <inigomartinez@gmail.com> -Date: Wed Dec 12 01:02:31 2007 +0100 - - Changed getters to const - - Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com> - - poppler/Annot.cc | 28 +++++++++++----------- - poppler/Annot.h | 72 - ++++++++++++++++++++++++++++---------------------------- - 2 files changed, 50 insertions(+), 50 deletions(-) - -commit 29d39a8ae120e6045a16a7aa0944c36560b42508 -Author: Iñigo Martínez <inigomartinez@gmail.com> -Date: Mon Dec 10 17:56:44 2007 +0100 - - AnnotText support. - - Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com> - - poppler/Annot.cc | 123 - ++++++++++++++++++++++++++++++++++++++++++++++++++++++- - poppler/Annot.h | 65 ++++++++++++++++++++++++----- - 2 files changed, 177 insertions(+), 11 deletions(-) - -commit 2acecde458122bd67487cc302478befa78bf6fbe -Author: Iñigo Martínez <inigomartinez@gmail.com> -Date: Mon Dec 10 16:45:46 2007 +0100 - - AnnotMarkup support. - - Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com> - - poppler/Annot.cc | 115 - +++++++++++++++++++++++++++++++++++++++++++++++++++++++ - poppler/Annot.h | 51 ++++++++++++++++++++++++ - 2 files changed, 166 insertions(+) - -commit 1f8c1fe34e04688d2ba200f1166cfdd1ffe563f0 -Author: Iñigo Martínez <inigomartinez@gmail.com> -Date: Mon Dec 10 16:34:01 2007 +0100 - - AnnotPopup support. - - Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com> - - poppler/Annot.cc | 34 ++++++++++++++++++++++++++++++++++ - poppler/Annot.h | 21 +++++++++++++++++++++ - 2 files changed, 55 insertions(+) - -commit 6c83e06fb2eb77d0dbefd1ebfbcac3e5f0cbb622 -Author: Iñigo Martínez <inigomartinez@gmail.com> -Date: Mon Dec 10 16:24:38 2007 +0100 - - Prepare code to Annotation Subtype support. - - Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com> - - glib/poppler-page.cc | 11 +--- - poppler/Annot.cc | 160 - ++++++++++++++++++++++++++++++++++++--------------- - poppler/Annot.h | 54 ++++++++++++++--- - poppler/Form.cc | 6 +- - 4 files changed, 167 insertions(+), 64 deletions(-) - -commit fa0bb5bbea5bf2769c8b3084f78770b7781002eb -Author: Iñigo Martínez <inigomartinez@gmail.com> -Date: Mon Dec 10 15:41:38 2007 +0100 - - Various Annot improvements - - Signed-off-by: Iñigo Martínez <inigomartinez@gmail.com> - - poppler/Annot.cc | 613 - ++++++++++++++++++++++++++++++++++++------------------- - poppler/Annot.h | 140 +++++++++++-- - poppler/Gfx.cc | 21 +- - poppler/Gfx.h | 5 +- - 4 files changed, 543 insertions(+), 236 deletions(-) - -commit e0f49fd5aef3c798798ad7e7dba55857bde1b4c0 -Author: Koji Otani <sho@bbr.jp> -Date: Thu Dec 13 23:40:46 2007 +0100 - - Some CJK charecters are displayed vertical glyphs incorrectly when - horizontal mode - - poppler/GfxFont.cc | 46 +++++++++++++++++++++++++--------------------- - 1 file changed, 25 insertions(+), 21 deletions(-) - -commit 85901922bf354a1268037d0b6ec5cbf14da979a1 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Dec 13 23:30:59 2007 +0100 - - Yet another gmallocn to gmallocn_checkoverflow - - Fixes http://bugs.kde.org/show_bug.cgi?id=153949 - - poppler/SplashOutputDev.cc | 23 ++++++++++++++++------- - 1 file changed, 16 insertions(+), 7 deletions(-) - -commit f24259cddb9c5e02cf9d2071bfa0106f3e88bd59 -Author: Koji Otani <sho@bbr.jp> -Date: Mon Dec 10 23:24:14 2007 +0100 - - Display characters outside of unicode BMP with TT font - - fofi/FoFiTrueType.cc | 33 ++++++++++++++++++++--- - fofi/FoFiTrueType.h | 2 +- - poppler/CMap.cc | 34 ++++++++++++++++++++++++ - poppler/CMap.h | 4 +++ - poppler/GfxFont.cc | 75 - ++++++++++++++++++++++++++++++++-------------------- - 5 files changed, 115 insertions(+), 33 deletions(-) - -commit 7cbabbf378cf5a9c0411558ff02b44dec2040ea1 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Dec 10 22:00:30 2007 +0100 - - Fix a crash when marked content properties operator is not a dict. - - poppler/Gfx.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit e807f9c72c7f0c5cc0655918f676f4af54739442 -Merge: bf57117d e2ea7430 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Dec 9 18:07:30 2007 +0100 - - Merge branch 'master' of - ssh://aacid@git.freedesktop.org/git/poppler/poppler - -commit bf57117df8786778faf31e5d843533004f867ff3 -Author: Adrian Johnson <ajohnson@redneon.com> -Date: Sun Dec 9 18:07:00 2007 +0100 - - Add support for ActualText entries - - Patch by Adrian Johnson with two minor changes by me (one fordward - declaration and a leak fix) - - poppler/Form.cc | 2 +- - poppler/Gfx.cc | 2 +- - poppler/OutputDev.cc | 2 +- - poppler/OutputDev.h | 2 +- - poppler/PDFDocEncoding.h | 4 ++ - poppler/TextOutputDev.cc | 98 - +++++++++++++++++++++++++++++++++++++++++++++++- - poppler/TextOutputDev.h | 11 ++++++ - 7 files changed, 116 insertions(+), 5 deletions(-) - -commit e2ea7430e7d6db50cbfdac34713915e5b0942a89 -Author: Albert Astals Cid <tsdgeos@localhost.(none)> -Date: Sat Dec 8 23:21:34 2007 +0100 - - disable warnings about assigning const char * to char * - - We have them all over the place and we are not going to fix it as - that'll be too much overhead when re-merging xpdf changes - - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit acf70c666d4f534cd97de64d4378bf6399e31fd4 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Dec 6 23:58:26 2007 +0100 - - Disable gtk tests if the user disabled glib frontend - - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit bb0ec68f21d355081ff75aad641bc3809141e398 -Merge: 5a34cddf b925ea23 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Dec 6 18:38:54 2007 +0100 - - Merge branch 'master' of - ssh://aacid@git.freedesktop.org/git/poppler/poppler - -commit b925ea232b6ed5028712600f9aebe453f3b2ba06 -Author: Brad Hards <bradh@kde.org> -Date: Tue Dec 4 19:11:13 2007 +1100 - - Remove redundant check. - - poppler/PSOutputDev.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 275afca4ef24020273df652ccfdf76c6994e9294 -Author: Brad Hards <bradh@kde.org> -Date: Sun Dec 2 19:45:16 2007 +1100 - - Preserve PDF page labels when we output as postscript. - - Resolves bug 13338. - - poppler/PSOutputDev.cc | 81 - +++++++++++++++++++++++++++++++++++++++++++++++++- - poppler/PSOutputDev.h | 2 ++ - 2 files changed, 82 insertions(+), 1 deletion(-) - -commit 641edb83a457083c13f3e374f6ac6c570dd54d7f -Author: Brad Hards <bradh@kde.org> -Date: Wed Nov 28 19:42:53 2007 +1100 - - Minor API documentation update - - qt4/src/poppler-annotation.h | 81 - ++++++++++++++++++++++++++++++++++++++++++-- - 1 file changed, 79 insertions(+), 2 deletions(-) - -commit 3635ec6fcbc89daf633c03efb644df9031b80f59 -Author: Brad Hards <bradh@kde.org> -Date: Wed Nov 28 19:42:22 2007 +1100 - - Update doxygen configuration file to version 1.5.3 - - qt4/src/Doxyfile | 185 - ++++++++++++++++++++++++++++++++++++++++++------------- - 1 file changed, 141 insertions(+), 44 deletions(-) - -commit 02c7ea6e1fd3e225de1eda231813f4db0ffb9fdb -Author: Brad Hards <bradh@kde.org> -Date: Wed Nov 28 19:41:54 2007 +1100 - - Fix off-by-one in printCommands path. - - poppler/Gfx.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 74af7c1209f47ed39addf7fde3ea106a7c77a408 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Nov 24 18:12:00 2007 +0100 - - Convert passwords from utf-8 to latin-1 when needed. Fixes bug #4557 - - glib/poppler-document.cc | 16 ++++++++++++++-- - 1 file changed, 14 insertions(+), 2 deletions(-) - -commit 5a34cddf043cb484549cb411e034786a7d8688a3 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Nov 23 23:13:57 2007 +0100 - - add a ignore - - glib/demo/.gitignore | 1 + - 1 file changed, 1 insertion(+) - -commit 21a58562cc1e575ec3d81b6e34bfcb21306eb67f -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Nov 23 23:12:06 2007 +0100 - - sscanf does not like null strings, so don't call it on empty qstrings - - qt/poppler-document.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 6f8451cf9d19f57f658d1568643ecb0f953e1075 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Sun Nov 11 21:29:40 2007 -0500 - - Add support for knockout groups to the cairo backend - - This is sort of hacky because we need to keep track of shape and - opacity - seperately. It is also probably not entirely correct. However, - it should be - closer than previously. - - poppler/CairoOutputDev.cc | 309 - ++++++++++++++++++++++++++++++++++++++++++++-- - poppler/CairoOutputDev.h | 8 +- - 2 files changed, 303 insertions(+), 14 deletions(-) - -commit b0fbfb0ac366434d7e4c0350a9be83ddda7b03cf -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Sun Nov 11 16:06:16 2007 -0500 - - Track the AlphaIsShape and TextKnockout state - - Parse, store and notify the OutputDevices about these entries. - - poppler/Gfx.cc | 14 ++++++++++++++ - poppler/GfxState.h | 6 ++++++ - poppler/OutputDev.h | 2 ++ - 3 files changed, 22 insertions(+) - -commit f6429b13a972f2deb25b3d3a9948dca024a54841 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Sat Nov 10 14:08:09 2007 -0500 - - Fix accidental mode change. - - poppler/CairoFontEngine.cc | 0 - poppler/CairoOutputDev.cc | 0 - 2 files changed, 0 insertions(+), 0 deletions(-) - -commit 5797f50a99d1494767edc5928f9c3e9d927b946d -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Sat Nov 10 01:52:00 2007 -0500 - - Scale text to match 'm' size - - This adds back the hack that was removed when fontconfig support - was added long - ago. It's not a great solution but lets us be at least as good as - xpdf. Fixes - #12304 with the cairo backend. The problem persists with the splash - backend. - - poppler/CairoFontEngine.cc | 56 - +++++++++++++++++++++++++++++++++++++++++++--- - poppler/CairoFontEngine.h | 7 +++++- - poppler/CairoOutputDev.cc | 8 +++++-- - 3 files changed, 65 insertions(+), 6 deletions(-) - -commit 551212e55127c7e46d9aff3318015fd9b5385687 -Author: Brad Hards <bradh@frogmouth.net> -Date: Sat Nov 10 11:56:15 2007 +0100 - - Fix uninitialized variable access - - Supported by Derek B. Noonburg - - poppler/GfxState.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 934a5ae45eb17bd0e2010be89f55510e8a69816b -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Sat Nov 3 13:08:51 2007 -0400 - - Avoiding using floating point when converting to luminance. - - The code now also does proper rounding instead of just truncating. - - poppler/CairoOutputDev.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 1b3f045a25e5d172357bc87c15ba591c8e1511a7 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Nov 8 23:34:07 2007 +0100 - - Move another gmallocn to gmallocn_checkoverflow. Fixes crashes on - incorrect pdf sent by Red Hat - - poppler/Stream.cc | 21 +++++++++++++++------ - 1 file changed, 15 insertions(+), 6 deletions(-) - -commit 944d327fd7036332a33b4ad6476ceca7a650ef6e -Merge: fb1d1f45 c340255f -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Nov 7 23:52:47 2007 +0100 - - Merge branch 'master' of - ssh://aacid@git.freedesktop.org/git/poppler/poppler - -commit fb1d1f459784a6c19034212a617268f7f5a90e9c -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Nov 7 23:51:58 2007 +0100 - - merge ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.02pl2.patch - - poppler/Stream.cc | 417 - +++++++++++++++++++++++++++++++----------------------- - poppler/Stream.h | 10 +- - 2 files changed, 245 insertions(+), 182 deletions(-) - -commit c340255f46bc95b5f850abcd3d9bcdc8594199bb -Author: Brad Hards <bradh@kde.org> -Date: Mon Nov 5 20:36:23 2007 +1100 - - Update .gitignore - - Suppress the noise a bit. - - qt4/.gitignore | 1 + - qt4/tests/.gitignore | 3 +++ - test/.gitignore | 2 ++ - 3 files changed, 6 insertions(+) - -commit cebf770379e7d71166e729aebf771a4ca291d48b -Author: Brad Hards <bradh@kde.org> -Date: Mon Nov 5 20:31:18 2007 +1100 - - Add a new unit test, for non-ASCII searching. - - There is a bug report (bug:7063) about not being able - to find text that isn't ASCII. I think that the problem isn't - in poppler core code - this unit test shows we can find - characters as long as they are properly encoded (which the - Qt4 front end does). - - qt4/tests/Makefile.am | 7 ++++++- - qt4/tests/check_search.cpp | 40 ++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 46 insertions(+), 1 deletion(-) - -commit 570fe464a2aae4f22d0b47cce73b8bc36b116e9f -Merge: 1c7b7a0c 78750679 -Author: Brad Hards <bradh@kde.org> -Date: Mon Nov 5 15:55:39 2007 +1100 - - Merge branch 'minor-fixes' - -commit 78750679e213d7307cce38166b6af32562e871b8 -Author: Brad Hards <bradh@kde.org> -Date: Mon Nov 5 15:54:36 2007 +1100 - - Additional check for password protected documents - - We need to bail out on locked documents. In the future, - we could probably go interactive, and ask the user for - a password. - - qt4/tests/test-poppler-qt4.cpp | 6 ++++++ - 1 file changed, 6 insertions(+) - -commit 1c7b7a0c581b542945cac257202bbb819d33694c -Author: Brad Hards <bradh@kde.org> -Date: Mon Nov 5 15:49:45 2007 +1100 - - Minor Qt4 API documentation fix - - Also, this is a test of my git newbie-ness. - - qt4/src/poppler-form.h | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -commit b86fc565d175835cf27e9c8632da47a5e0b50237 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Nov 5 00:14:55 2007 +0100 - - Fix FSF address - - glib/demo/fonts.c | 2 +- - glib/demo/fonts.h | 2 +- - glib/demo/forms.c | 2 +- - glib/demo/forms.h | 2 +- - glib/demo/info.c | 2 +- - glib/demo/info.h | 2 +- - glib/demo/links.c | 2 +- - glib/demo/links.h | 2 +- - glib/demo/main.c | 2 +- - glib/demo/outline.c | 2 +- - glib/demo/outline.h | 2 +- - glib/demo/page.c | 2 +- - glib/demo/page.h | 2 +- - glib/demo/render.c | 2 +- - glib/demo/render.h | 2 +- - glib/demo/utils.c | 2 +- - glib/demo/utils.h | 2 +- - glib/poppler-action.cc | 2 +- - glib/poppler-action.h | 2 +- - glib/poppler-attachment.cc | 2 +- - glib/poppler-attachment.h | 2 +- - glib/poppler-document.cc | 2 +- - glib/poppler-document.h | 2 +- - glib/poppler-features.h.in | 2 +- - glib/poppler-form-field.cc | 2 +- - glib/poppler-form-field.h | 2 +- - glib/poppler-page.cc | 2 +- - glib/poppler-page.h | 2 +- - glib/poppler.cc | 2 +- - glib/poppler.h | 2 +- - poppler/PageTransition.cc | 2 +- - poppler/Sound.cc | 2 +- - poppler/Sound.h | 2 +- - qt/poppler-document.cc | 2 +- - qt/poppler-fontinfo.cc | 2 +- - qt/poppler-link-qt3.h | 2 +- - qt/poppler-link.cc | 2 +- - qt/poppler-page-transition-private.h | 2 +- - qt/poppler-page-transition.cc | 2 +- - qt/poppler-page-transition.h | 2 +- - qt/poppler-page.cc | 2 +- - qt/poppler-private.h | 2 +- - qt/poppler-qt.h | 2 +- - qt4/src/poppler-annotation-helper.h | 2 +- - qt4/src/poppler-annotation-private.h | 2 +- - qt4/src/poppler-annotation.cc | 2 +- - qt4/src/poppler-annotation.h | 2 +- - qt4/src/poppler-document.cc | 2 +- - qt4/src/poppler-embeddedfile.cc | 2 +- - qt4/src/poppler-fontinfo.cc | 2 +- - qt4/src/poppler-form.cc | 2 +- - qt4/src/poppler-form.h | 2 +- - qt4/src/poppler-link-extractor-private.h | 2 +- - qt4/src/poppler-link-extractor.cc | 2 +- - qt4/src/poppler-link.cc | 2 +- - qt4/src/poppler-link.h | 2 +- - qt4/src/poppler-page-private.h | 2 +- - qt4/src/poppler-page.cc | 2 +- - qt4/src/poppler-private.h | 2 +- - qt4/src/poppler-ps-converter.cc | 2 +- - qt4/src/poppler-qt4.h | 2 +- - qt4/src/poppler-sound.cc | 2 +- - qt4/src/poppler-textbox.cc | 2 +- - 63 files changed, 63 insertions(+), 63 deletions(-) - -commit 37776afc6f8a5733b41da6fb0f45e7ace4edf737 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Nov 5 00:03:55 2007 +0100 - - Update from http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt - - COPYING | 27 +++++++++++++-------------- - 1 file changed, 13 insertions(+), 14 deletions(-) - -commit 34a90b35998b65539cf1e8f09194d45db71064a1 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Nov 4 14:03:35 2007 +0100 - - Remove duplicate checking - - poppler/JBIG2Stream.cc | 8 -------- - 1 file changed, 8 deletions(-) - -commit d694e1dd042fb97fbc62046b69cafe30d6f9ea58 -Merge: ba5b31c6 432e657a -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Nov 4 13:26:47 2007 +0100 - - Merge branch 'master' of - ssh://aacid@git.freedesktop.org/git/poppler/poppler - -commit ba5b31c6a8b2317332bfa148f6d80f66891fb9ce -Author: Brad Hards <bradh@frogmouth.net> -Date: Sun Nov 4 13:25:12 2007 +0100 - - Require fontconfig >= 2.0 Fixes bug 9020 - - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 432e657a49cb097638a79e38c141088039572816 -Author: Jeff Muizelaar <jeff@freiheit.infidigm.net> -Date: Mon Sep 17 19:15:21 2007 -0400 - - Use realloc/free instead of new/delete when resizing GooStrings - - This allows for a large performance improvement when appending a - large number - of characters to a GooString. This is especially helpful for - TextOutputDev on - large PDFs. For example, the following code has the potential to be - O(n) instead of - O(n²) with a good implementation of realloc. - - while (n) { - string.append(character); - n--; - } - - goo/GooString.cc | 30 +++++++++++++++++------------- - 1 file changed, 17 insertions(+), 13 deletions(-) - -commit cb80112afed2c5b9642c3c43f1cc001ed88d08cb -Author: Jonathan Kew <jonathan_kew@sil.org> -Date: Thu Nov 1 20:53:05 2007 +0100 - - Do not try to parse directories when processing nameToUnicode - dir. Fixes ugly warnings on mingw32 - - poppler/GlobalParams.cc | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -commit ad6b888edff7b30be72df948c4052b9934a37705 -Author: Albert Astals Cid <tsdgeos@bluebox.localdomain> -Date: Thu Nov 1 20:48:21 2007 +0100 - - Add some castings to make it compile - - glib/test-poppler-glib.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit a968dcc759379f48265c91bea63ca4cf987d94a9 -Author: Albert Astals Cid <tsdgeos@bluebox.localdomain> -Date: Wed Oct 31 23:53:39 2007 +0100 - - Tests for passwords - - qt4/tests/Makefile.am | 13 +++++- - qt4/tests/check_password.cpp | 87 - ++++++++++++++++++++++++++++++++++++++++ - qt4/tests/stress-poppler-dir.cpp | 63 +++++++++++++++++++++++++++++ - qt4/tests/test-poppler-qt4.cpp | 15 ++++++- - 4 files changed, 175 insertions(+), 3 deletions(-) - -commit 7b7a08863a8278dee7aa1fe7789cf72223c26b35 -Author: Brad Hards <bradh@frogmouth.net> -Date: Wed Oct 31 23:53:27 2007 +0100 - - Improve documentation - - qt4/src/poppler-qt4.h | 64 - ++++++++++++++++++++++++++++++++++++++++++++------- - 1 file changed, 56 insertions(+), 8 deletions(-) - -commit 96493c9409186a7e964e894c7f730962b6995fd7 -Author: Albert Astals Cid <tsdgeos@bluebox.localdomain> -Date: Wed Oct 31 23:51:25 2007 +0100 - - remove old file - - glib/test-poppler-glib.c | 514 - ----------------------------------------------- - 1 file changed, 514 deletions(-) - -commit 951a05f7a11af4a44e4cb85a015939d6a3e513f5 -Author: Albert Astals Cid <tsdgeos@bluebox.localdomain> -Date: Sat Oct 27 12:33:22 2007 +0200 - - Remove fordward declaration of a non-existant class - - poppler/Form.h | 1 - - 1 file changed, 1 deletion(-) - -commit 289679405ab143bc2106cf269227c514a1602e56 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Thu Oct 25 22:16:10 2007 -0400 - - Avoid drawing borders unless /W and /S are specified in /BS - - Acroread doesn't sometimes doesn't draw borders when you'd - expect it to. Special case that behaviour so that we do the - same thing. - - poppler/Annot.cc | 15 ++++++++++++--- - 1 file changed, 12 insertions(+), 3 deletions(-) - -commit ab0a6c37faf9916edcd70e128d9f2654eb795ace -Author: Albert Astals Cid <tsdgeos@bluebox.localdomain> -Date: Thu Oct 25 20:56:58 2007 +0200 - - Fix compilation on mingw. Bug 12493 - - Added a check for localtime_r in configure.ac - Moved test-poppler-glib.c to test-poppler-glib.cc to get the correct - compiler - - configure.ac | 1 + - glib/Makefile.am | 2 +- - glib/test-poppler-glib.cc | 520 - ++++++++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 522 insertions(+), 1 deletion(-) - -commit 6bd637dc135045b20abf024d394538d7a3160795 -Merge: c01ab714 25b273db -Author: Albert Astals Cid <tsdgeos@bluebox.localdomain> -Date: Tue Oct 23 23:27:01 2007 +0200 - - Merge branch 'master' of - ssh://aacid@git.freedesktop.org/git/poppler/poppler - -commit c01ab714ecd42e39ecb0be1c0c2504635251ac01 -Author: Albert Astals Cid <tsdgeos@bluebox.localdomain> -Date: Tue Oct 23 23:26:21 2007 +0200 - - Provide setters for some methods that only had getters. Fixes - bug 12894 - - poppler/GlobalParams.cc | 49 - +++++++++++++++++++++++++++++++++++++++++++++++++ - poppler/GlobalParams.h | 7 +++++++ - 2 files changed, 56 insertions(+) - -commit 25b273db677815c8df11e52fe9df29fe857a8a88 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Mon Oct 22 23:01:37 2007 -0400 - - Unset the font if it doesn't exist or we can not load it properly - - Previously, the previous font stayed current and glyphs would be - drawn using - it. This resulted in random glyphs being chosen unless the encodings - happened - to match. Now, instead, we draw nothing which matches the behaviour of - acroread. - - poppler/Gfx.cc | 4 ++++ - poppler/GfxFont.cc | 4 ++++ - 2 files changed, 8 insertions(+) - -commit 57331767ed5306eba1f9bf60e48fc88debdc2198 -Author: Albert Astals Cid <tsdgeos@bluebox.localdomain> -Date: Mon Oct 22 23:33:59 2007 +0200 - - builddir != srcdir fixes by Christian Persch <chpe gnome org> - - autogen.sh | 7 ++++--- - glib/demo/Makefile.am | 1 + - 2 files changed, 5 insertions(+), 3 deletions(-) - -commit 2a333e5a618b5c92f3c703816b950321f25d3aab -Author: Albert Astals Cid <tsdgeos@bluebox.localdomain> -Date: Mon Oct 22 22:14:43 2007 +0200 - - Splash rework, check if font is inside clip area before rendering - it to a temporary bitmap. Fixes KDE bug 150693 - - This change is not trivial. What i did is: - It is getGlyph the one that does the intersection between clip area - and rendering area of the font instead fillGlyph2 - That means some clipRes = state->clip->testRect but we win more - robustness against broken pdf that specify HUGE fonts - - splash/Splash.cc | 207 - ++++++++++++++++++++++++------------------------- - splash/Splash.h | 4 +- - splash/SplashFTFont.cc | 23 +++++- - splash/SplashFTFont.h | 4 +- - splash/SplashFont.cc | 29 +++++-- - splash/SplashFont.h | 5 +- - splash/SplashT1Font.cc | 11 ++- - splash/SplashT1Font.h | 4 +- - 8 files changed, 162 insertions(+), 125 deletions(-) - -commit cf785cd12ae77e8dd778ed043584f8f26efe675f -Author: Albert Astals Cid <tsdgeos@bluebox.localdomain> -Date: Mon Oct 22 21:59:35 2007 +0200 - - Add gmallocn_checkoverflow, it's the same as gmallocn but returns - NULL on overflow instead of doing exit() - - goo/gmem.cc | 18 ++++++++++++++++++ - goo/gmem.h | 3 +++ - 2 files changed, 21 insertions(+) - -commit 37e16ac301a35ceca2e3535f8c6100d4cf723c82 -Author: Albert Astals Cid <tsdgeos@bluebox.localdomain> -Date: Mon Oct 22 21:54:02 2007 +0200 - - exit(1) is bad in library code, use the src.abort method to describe - failure - - poppler/DCTStream.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit dbe975c129999a3efceb1c86518fa6fda74f685c -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Oct 22 11:25:37 2007 +0200 - - Fix a crash with invalid TrueType fonts - - fofi/FoFiTrueType.cc | 10 ++++++---- - 1 file changed, 6 insertions(+), 4 deletions(-) - -commit 8bfe30a48fd7021591ab307bd51f86c06ff202b9 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri Oct 19 15:46:50 2007 +0200 - - Do not generate appearance stream for radio button that are not active - - poppler/Annot.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -commit 1a531dcfee1c6fc79a414c38cbe7327fbf9a59d8 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri Oct 19 13:12:24 2007 +0200 - - Fix a crash with invalid embedded fonts - - poppler/CairoFontEngine.cc | 6 ++++++ - 1 file changed, 6 insertions(+) - -commit e1740278457e512676b623bcdf9968193f0a8d7b -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri Oct 19 12:21:54 2007 +0200 - - Do not draw annotations when rendering for printing - - glib/poppler-page.cc | 25 ++++++++++++++++++++++--- - poppler/Annot.h | 2 ++ - 2 files changed, 24 insertions(+), 3 deletions(-) - -commit a4d25f79dfc1a7e4998e2e113ef92312bd4af553 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Oct 16 15:24:08 2007 +0200 - - Detect form fields at any depth level - - We were ignoring non root form fields that contain only a kids - dictionary. - See evince bug: http://bugzilla.gnome.org/show_bug.cgi?id=486957 - - poppler/Form.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 03e1da99f7393fb1103643311b0b5af7b875e09c -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Sat Oct 13 19:38:15 2007 -0400 - - Add an implementation of CairoOutputDev::startPage() - - The implementation initializes fill_pattern and stroke_pattern - to black matching SplashOutputDev. This fixes #12504. - - poppler/CairoOutputDev.cc | 9 +++++++++ - poppler/CairoOutputDev.h | 2 +- - 2 files changed, 10 insertions(+), 1 deletion(-) - -commit 825c942d46e0c3e254028441015c5dd8440cc734 -Author: Albert Astals Cid <tsdgeos@bluebox.localdomain> -Date: Fri Oct 12 13:47:09 2007 +0200 - - Copy the embeddef file description string correctly - - poppler/Catalog.cc | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -commit 5e60da78695eff44cc10dbce46ef170727f682b1 -Author: Albert Astals Cid <tsdgeos@bluebox.localdomain> -Date: Fri Oct 12 13:46:52 2007 +0200 - - Correctly delete the embedded file stream - - qt4/src/poppler-embeddedfile.cc | 1 + - qt4/src/poppler-private.h | 2 +- - 2 files changed, 2 insertions(+), 1 deletion(-) - -commit 1627fbbde8be01af3bdd2583f3439897a37d5215 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Sat Oct 6 23:27:40 2007 -0400 - - Use maskWidth and maskHeight for reading from the mask image in - CairoOutputDev::drawMaskedImage() - - Previously, drawMaskedImage() was incorrectly using the image width - and height which is - wrong when width != maskWidth or heigh != maskHeight. Fixes #12668. - - poppler/CairoOutputDev.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 3156d560c5eaf6970da422d0b09fd2e95bfe6d1d -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri Oct 5 11:34:01 2007 +0200 - - Fix a crash when Form Fields array contains references - to non existent objects. Fixes bug #11865 - - poppler/Form.cc | 9 +++++++++ - 1 file changed, 9 insertions(+) - -commit f0b5e6286e94c6153c8247b5fae63a18622c48d3 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Oct 4 15:22:01 2007 +0200 - - Do not return unknown field type for signature form fields - - glib/poppler-form-field.cc | 2 ++ - 1 file changed, 2 insertions(+) - -commit 498fd7fb99b01a879d07e2ad12c0b9462a8fc438 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Oct 4 12:36:39 2007 +0200 - - Add poppler_page_render_for_printing() and - poppler_page_render_to_pixbuf_for_printing() - - We were unconditionally passing printing=gFalse to displaySlice. With - these new - functions we can render to a pixbuf or cairo surface passing - printing=gTrue to - displaySlice. - - glib/poppler-page.cc | 135 - +++++++++++++++++++++++++++++++++++++++++---------- - glib/poppler-page.h | 10 ++++ - 2 files changed, 119 insertions(+), 26 deletions(-) - -commit 56af69787c78c2edbb69266e86a5a5b639ca6d3e -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Wed Oct 3 23:02:25 2007 -0400 - - Error out if we can't find a .cidToUnicode for a known character - collection - - This situation was caused by the fixes for bug #11413. I'm not sure - it's the best thing to do, but it seems better. - - poppler/GfxFont.cc | 19 +++++++++++++++++++ - 1 file changed, 19 insertions(+) - -commit 3d0df46908379bce1d196b9dc41153b1adb5f725 -Author: Michael Wolf <maw@ximian.com> -Date: Wed Oct 3 19:43:55 2007 +0200 - - Fix compile warning - - glib/test-poppler-glib.c | 2 ++ - 1 file changed, 2 insertions(+) - -commit aba29e12528025c2cc71bf46e02e76ac4db2b193 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri Sep 28 21:01:50 2007 +0200 - - Add forms demo to glib poppler demo - - glib/demo/Makefile.am | 2 + - glib/demo/forms.c | 489 - ++++++++++++++++++++++++++++++++++++++++++++++++++ - glib/demo/forms.h | 31 ++++ - glib/demo/main.c | 8 +- - glib/demo/utils.c | 1 - - 5 files changed, 527 insertions(+), 4 deletions(-) - -commit d0c0f26d2c95232c216e3daa15e98a3aff14ac27 -Merge: 59d55f73 38d5bb15 -Author: Krzysztof Kowalczyk <kkowalczyk@gmail.com> -Date: Tue Sep 25 03:33:52 2007 -0700 - - Merge branch 'master' of - ssh://kjk@git.freedesktop.org/git/poppler/poppler - -commit 38d5bb150a5fe883da1d4256463d1f796d201283 -Author: Krzysztof Kowalczyk <kkowalczyk@kjkubu.(none)> -Date: Tue Sep 25 16:13:51 2007 -0700 - - Silence deprecation warnings - annoying with msvc 2005. - - makefile.vc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 59d55f7371bee81c9392fa2d4174ceffaacde471 -Author: Krzysztof Kowalczyk <kkowalczyk@gmail.com> -Date: Tue Sep 25 01:21:19 2007 -0700 - - Fix misleading comment. - - goo/GooTimer.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit c36d8afc984795aca0a12a94ec7668092067db82 -Author: Krzysztof Kowalczyk <kkowalczyk@gmail.com> -Date: Tue Sep 25 00:32:29 2007 -0700 - - Revert "replace extremely confusing 'a*(int)sizeof(foo)/sizeof(foo) - != a' which, due to type promotions, if a is int, is equivalent to - a < 0; fix problems revealed by the change" - - This reverts commit 08bf7c1151d594d4c7d253a2c89f4f3a088ad8ec. - - poppler/XRef.cc | 25 +++++++++++++++++++++---- - 1 file changed, 21 insertions(+), 4 deletions(-) - -commit ff25e83abae1ca17e2e7dd6f20946026fca69fff -Author: Krzysztof Kowalczyk <kkowalczyk@gmail.com> -Date: Mon Sep 24 23:57:25 2007 -0700 - - Make perf-test compile on unix as well. - - test/Makefile.am | 16 ++++++- - test/perf-test-preview-dummy.cc | 1 + - test/perf-test.cc | 104 - +++++++++++++++++----------------------- - 3 files changed, 59 insertions(+), 62 deletions(-) - -commit 70f3bf42b3028d9a2e4aefdc2e1a458b3c77b0e7 -Author: Krzysztof Kowalczyk <kkowalczyk@gmail.com> -Date: Mon Sep 24 21:26:54 2007 -0700 - - Let perf-test.cc manage lifetime of rendered bitmap. - - test/perf-test-preview-win.cc | 7 ------- - 1 file changed, 7 deletions(-) - -commit b622b252cba068a15eae77df5deb261dd98affaf -Author: Krzysztof Kowalczyk <kkowalczyk@gmail.com> -Date: Mon Sep 24 21:20:12 2007 -0700 - - Disable my_error for now - seems to corrupt memory. - - test/perf-test.cc | 2 ++ - 1 file changed, 2 insertions(+) - -commit bde8c9669ca6b43cb6a664bd14df164a718041ea -Author: Krzysztof Kowalczyk <kkowalczyk@gmail.com> -Date: Mon Sep 24 21:08:58 2007 -0700 - - Con't copy the file unless COPY_FILE is defined. - - test/perf-test.cc | 11 ++++++++++- - 1 file changed, 10 insertions(+), 1 deletion(-) - -commit bf9b46b012c64624818a2110af7c4b7e3b419728 -Author: Krzysztof Kowalczyk <kkowalczyk@gmail.com> -Date: Mon Sep 24 20:13:54 2007 -0700 - - Respect -loadonly cmd-line arg. - - test/perf-test.cc | 2 ++ - 1 file changed, 2 insertions(+) - -commit 2f664b654ca19135f0f8a0fe89872b9e0d526fa2 -Author: Krzysztof Kowalczyk <kkowalczyk@gmail.com> -Date: Mon Sep 24 19:41:45 2007 -0700 - - Fix msvc debug build. Fix bitmap leak in perf-test. - - makefile.vc | 6 ++++-- - test/perf-test.cc | 1 + - 2 files changed, 5 insertions(+), 2 deletions(-) - -commit 05d41cd5aec39b4e3c8949445a9986e5ca8b50dd -Author: Krzysztof Kowalczyk <kkowalczyk@gmail.com> -Date: Mon Sep 24 08:10:37 2007 -0700 - - Use GooTimer instead of my own timer. - - test/perf-test.cc | 98 - +++++-------------------------------------------------- - 1 file changed, 8 insertions(+), 90 deletions(-) - -commit 05fbce5b6657e883ece9054c79576b25271a05a4 -Author: Krzysztof Kowalczyk <kkowalczyk@gmail.com> -Date: Mon Sep 24 08:01:11 2007 -0700 - - Make GooTimer work for Windows/msvc build. - - goo/GooTimer.cc | 69 - +++++++++++++++++++++++++++++++++++++++------------------ - goo/GooTimer.h | 28 ++++++++++++++--------- - poppler/Gfx.cc | 11 ++------- - 3 files changed, 66 insertions(+), 42 deletions(-) - -commit 6347915085a487da08d39a859f4261fa812dab09 -Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)> -Date: Mon Sep 24 01:08:17 2007 -0700 - - Add Error.cc in msvc build and use setErrorFunction in perf-test. - - makefile.vc | 3 +-- - test/perf-test.cc | 10 +++++----- - 2 files changed, 6 insertions(+), 7 deletions(-) - -commit ed01b3965c57ce2a4eabf9c46b5319ea627d3324 -Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)> -Date: Mon Sep 24 01:03:09 2007 -0700 - - Match declaration of setErrorFunction with its definition. - - Also enable this code for Windows, since CDECL was what - was throwing msvc off. - - poppler/Error.cc | 12 +++--------- - 1 file changed, 3 insertions(+), 9 deletions(-) - -commit 71fb15f8bd131a13d8cf0f394fe601cfbb6e1772 -Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)> -Date: Mon Sep 24 00:38:29 2007 -0700 - - Even less compiler warnings. - - poppler/CairoOutputDev.cc | 6 +++--- - qt/poppler-page.cc | 3 +++ - utils/HtmlOutputDev.cc | 10 ++++++---- - 3 files changed, 12 insertions(+), 7 deletions(-) - -commit 7ba3f198a0651d2a7c91b7d9e10a5173dc3de0a3 -Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)> -Date: Mon Sep 24 00:32:37 2007 -0700 - - Even less compiler warnings. - - qt/poppler-document.cc | 8 ++++++++ - qt/poppler-private.h | 8 -------- - qt4/src/poppler-document.cc | 10 ++++++++++ - qt4/src/poppler-form.cc | 15 +++++++++++++++ - qt4/src/poppler-private.h | 25 ------------------------- - 5 files changed, 33 insertions(+), 33 deletions(-) - -commit ab1059f594cb9fccd8568ca2a535a363c7521daa -Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)> -Date: Mon Sep 24 00:14:01 2007 -0700 - - Don't break aliasing. - - poppler/GlobalParams.cc | 40 ++++++++++++++++++---------------------- - 1 file changed, 18 insertions(+), 22 deletions(-) - -commit 71c47b30adf687a0bcece22834933267053360de -Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)> -Date: Sun Sep 23 23:49:31 2007 -0700 - - Reduce compiler warnings. - - poppler/JBIG2Stream.cc | 16 ++++++++++++---- - 1 file changed, 12 insertions(+), 4 deletions(-) - -commit 8466d94929844c976bbad8bb7d1ea7f7f77cc196 -Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)> -Date: Sun Sep 23 23:34:52 2007 -0700 - - Reduce compiler warnings. Tabs to spaces. - - fofi/FoFiType1C.cc | 30 +++++++++++++++--------------- - 1 file changed, 15 insertions(+), 15 deletions(-) - -commit c53b8ccfba6fa4345086493f9e44212721c11d0a -Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)> -Date: Sun Sep 23 23:23:34 2007 -0700 - - Reduce number of compiler warnings. - - poppler/CharCodeToUnicode.cc | 2 +- - poppler/Gfx.cc | 6 ++---- - poppler/PageLabelInfo.cc | 2 ++ - 3 files changed, 5 insertions(+), 5 deletions(-) - -commit abede2a06c5c9dc97b40479deda49621458f1171 -Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)> -Date: Sun Sep 23 23:03:36 2007 -0700 - - Reduce number of compiler warnings. - - glib/poppler-action.cc | 1 - - glib/poppler-document.cc | 9 ++------- - glib/poppler-page.cc | 3 +-- - qt/poppler-document.cc | 1 - - qt4/src/poppler-annotation.cc | 16 +++++++++++++--- - 5 files changed, 16 insertions(+), 14 deletions(-) - -commit 60f5bcea4a920441e25ae11d677636242aabb2db -Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)> -Date: Sun Sep 23 22:48:06 2007 -0700 - - Remove unused variables. - - utils/pdftoppm.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 3179eee44eb0afbc642675268b9a4abb16ccdde3 -Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)> -Date: Sun Sep 23 22:47:21 2007 -0700 - - Remove unused variables. - - utils/HtmlOutputDev.cc | 23 ----------------------- - 1 file changed, 23 deletions(-) - -commit e9dc379190aa3166870d0b11a05ccc4e9dad2706 -Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)> -Date: Sun Sep 23 22:41:59 2007 -0700 - - Remove unused variables. - - poppler/ArthurOutputDev.cc | 16 +++++----------- - 1 file changed, 5 insertions(+), 11 deletions(-) - -commit 08bf7c1151d594d4c7d253a2c89f4f3a088ad8ec -Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)> -Date: Sun Sep 23 22:28:16 2007 -0700 - - replace extremely confusing 'a*(int)sizeof(foo)/sizeof(foo) != a' - which, due to type promotions, if a is int, is equivalent to a < 0; - fix problems revealed by the change - - poppler/XRef.cc | 25 ++++--------------------- - 1 file changed, 4 insertions(+), 21 deletions(-) - -commit 5a1f670a4d16affeed86cdf643ab22f481caa3a5 -Author: Krzysztof Kowalczyk <kkowalczyk@kjkubu.(none)> -Date: Sun Sep 23 20:42:59 2007 -0700 - - ignore *.o files - - .gitignore | 1 + - 1 file changed, 1 insertion(+) - -commit c156aed7234f82dea4cb384c1b8a7acdd34545be -Author: Krzysztof Kowalczyk <kkowalczyk@kjkubu.(none)> -Date: Sun Sep 23 20:41:19 2007 -0700 - - remove unused variables - - poppler/ABWOutputDev.cc | 10 ++-------- - 1 file changed, 2 insertions(+), 8 deletions(-) - -commit d0bdef4752be5fa609a0766ee87aa54d51611d9a -Author: Krzysztof Kowalczyk <kkowalczyk@kjkubu.(none)> -Date: Sat Sep 22 13:38:03 2007 -0700 - - undo accidental changes to file permissions - - msvc/poppler/poppler-config.h | 0 - poppler/Annot.cc | 0 - poppler/CairoFontEngine.cc | 0 - poppler/CairoOutputDev.cc | 0 - poppler/Catalog.cc | 0 - poppler/Form.cc | 0 - poppler/GfxFont.cc | 0 - poppler/GfxState.cc | 0 - poppler/Page.cc | 0 - poppler/SplashOutputDev.cc | 0 - poppler/TextOutputDev.cc | 0 - splash/Splash.cc | 0 - splash/SplashFTFontEngine.cc | 0 - test/perf-test-preview-dummy.cc | 0 - test/perf-test-preview-win.cc | 0 - test/perf-test.cc | 0 - 16 files changed, 0 insertions(+), 0 deletions(-) - -commit 6c69473f2f4a49757614ddd249e65bb7a13c63c1 -Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)> -Date: Fri Sep 21 08:09:53 2007 -0700 - - undo accidental mode change - - makefile.vc | 0 - 1 file changed, 0 insertions(+), 0 deletions(-) - -commit e7e386e7ce8cb8eb8a7037ebdaa601524d332ae7 -Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)> -Date: Fri Sep 21 08:08:53 2007 -0700 - - more simplification by removing unneded code - - makefile.vc | 2 +- - test/perf-test.cc | 60 - +++++++++---------------------------------------------- - 2 files changed, 10 insertions(+), 52 deletions(-) - -commit 3e10604637ec193269a3155985476d3b83dc7d62 -Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)> -Date: Fri Sep 21 07:48:38 2007 -0700 - - for portability use bool/true/false instead of BOOL/TRUE/FALSE - - test/perf-test.cc | 176 - ++++++++++++++++++++++++++---------------------------- - 1 file changed, 86 insertions(+), 90 deletions(-) - -commit 634718936f2a95fac2a9d12fcea483b3d0ca8fa6 -Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)> -Date: Fri Sep 21 07:41:14 2007 -0700 - - simplify perf-test - - test/perf-test-pdf-engine.h | 78 - ------------------------------------------- - test/perf-test-preview-win.cc | 5 ++- - test/perf-test.cc | 75 - +++++++++++++++++++++++++++++++++++++++-- - 3 files changed, 75 insertions(+), 83 deletions(-) - -commit 617550199762fab42ca2e202e641e047b3efbac0 -Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)> -Date: Fri Sep 21 05:20:16 2007 -0700 - - simplify perf-test code - - test/perf-test-pdf-engine.h | 67 +++-------------------- - test/perf-test-preview-dummy.cc | 3 +- - test/perf-test-preview-win.cc | 80 ++++++++++++++++++++++++---- - test/perf-test.cc | 114 - ++++------------------------------------ - 4 files changed, 86 insertions(+), 178 deletions(-) - -commit fb5bf808b88992c1772a10e4ed9fe788fb618417 -Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)> -Date: Fri Sep 21 03:03:26 2007 -0700 - - more msvc build fixes - - makefile.vc | 2 +- - test/perf-test.cc | 4 ++++ - 2 files changed, 5 insertions(+), 1 deletion(-) - -commit 60829b08a7440f36014f68ec54bee7a742412738 -Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)> -Date: Fri Sep 21 03:02:34 2007 -0700 - - msvc build fixes - - msvc/poppler/poppler-config.h | 143 - ++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 143 insertions(+) - -commit 853c22a174bae81139edc9aeded7f26ae2655cef -Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)> -Date: Thu Sep 20 23:21:35 2007 -0700 - - add pre-made config.h for msvc build - - msvc/config.h | 62 - +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 62 insertions(+) - -commit 31c43b118bd4372134018be6f6693f77d1f6a39b -Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)> -Date: Thu Sep 20 22:10:09 2007 -0700 - - remove unused variables - - poppler/CairoFontEngine.cc | 6 ++---- - poppler/CairoOutputDev.cc | 14 ++------------ - splash/SplashFTFontEngine.cc | 2 ++ - 3 files changed, 6 insertions(+), 16 deletions(-) - -commit 01b99f60e36dd955817f23911ef38947360f61f7 -Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)> -Date: Thu Sep 20 21:14:17 2007 -0700 - - remove unused variables - - poppler/GfxState.cc | 11 ++--------- - poppler/SplashOutputDev.cc | 9 +++------ - poppler/TextOutputDev.cc | 3 --- - 3 files changed, 5 insertions(+), 18 deletions(-) - -commit 7c406400532d68524a43cf963d894d3c4b269400 -Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)> -Date: Thu Sep 20 20:57:44 2007 -0700 - - remove unused variables - - poppler/Catalog.cc | 1 - - poppler/Form.cc | 5 ----- - poppler/GfxFont.cc | 6 ++---- - poppler/Page.cc | 2 +- - splash/Splash.cc | 5 ++++- - 5 files changed, 7 insertions(+), 12 deletions(-) - -commit 70f23389c97b1870b7311d97322cdd16b580a79d -Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)> -Date: Thu Sep 20 20:23:59 2007 -0700 - - don't silence warnings about unused variables/functions to keep - programmers honest - - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit cdb6fcf98137473efd993e1374a6f010e9db67db -Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)> -Date: Thu Sep 20 20:00:56 2007 -0700 - - Remove unused variables - - poppler/Annot.cc | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) - -commit 0e76b49ac852a5a7ebae4c1f67b153e0b7c9f905 -Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)> -Date: Tue Sep 18 01:04:50 2007 -0700 - - Explain how to compile on Windows using msvc makefile. - - README.windows | 63 - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 63 insertions(+) - -commit c002b4dc75b2688ffe8a734cf3e15f5891797842 -Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)> -Date: Tue Sep 18 00:04:47 2007 -0700 - - Add Windows/msvc makefile. - - Add native msvc windows makefile and pre-made - config.h for windows in msvc directory. - - makefile.vc | 149 - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 149 insertions(+) - -commit 1f33fc58201c92120c587189d2e0e819f83167da -Author: Krzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)> -Date: Mon Sep 17 23:53:02 2007 -0700 - - Start on a test program. - - Test program can be used for regression testing and - performance testing. It renders a page (or pages) - in a given PDF (or PDFs) and records rendering times. - For historical reasons the code is ugly and probably - only compiles on windows, but it'll get better. - - test/perf-test-pdf-engine.h | 131 ++++ - test/perf-test-preview-dummy.cc | 22 + - test/perf-test-preview-win.cc | 222 ++++++ - test/perf-test.cc | 1428 - +++++++++++++++++++++++++++++++++++++++ - 4 files changed, 1803 insertions(+) - -commit b96db4ad27535c2666fccdfe0a3c04cc7c37792d -Author: Jeff Muizelaar <jeff@freiheit.infidigm.net> -Date: Mon Sep 17 20:28:38 2007 -0400 - - Avoid double free caused by 302 merge - - The ownership of the the string returned by getKey() changed with - the 302 merge - but this code was not updated. Found by Matthew Woehlke. - - qt4/src/poppler-document.cc | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -commit 2a495f19d4465e15fd2fa96656d904315c79a443 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Mon Sep 17 16:52:45 2007 -0400 - - Simplify ChangeLog rule a bit. - - ChangeLog.mk | 81 - ------------------------------------------------------------ - Makefile.am | 7 +++--- - 2 files changed, 4 insertions(+), 84 deletions(-) - -commit 7d5abbeec55e4b90b139671d96cfdf58bdab70b8 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Mon Sep 17 15:45:26 2007 -0400 - - Add dist hook to generate ChangeLog. - - Taken from cairo. It still need some tweaking. - - ChangeLog.mk | 81 - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - Makefile.am | 4 +++ - configure.ac | 2 +- - 3 files changed, 86 insertions(+), 1 deletion(-) - -commit 15ad81c64cd8b1cb438d41be402daa19a239db3d -Author: Albert Astals Cid <tsdgeos@bluebox.localdomain> -Date: Mon Sep 17 19:39:29 2007 +0200 - - Use = instead of == in qt.m4 - - m4/qt.m4 | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 70fabcb96e207b9b889bb32c0cf5ea3fc0aa08f8 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Sun Sep 16 20:40:53 2007 -0400 - - Rename .cvsignore files to .gitignore and drop ChangeLog file. - - .cvsignore => .gitignore | 0 - ChangeLog | 4586 - ----------------------------- - fofi/{.cvsignore => .gitignore} | 0 - glib/{.cvsignore => .gitignore} | 0 - glib/reference/{.cvsignore => .gitignore} | 0 - goo/{.cvsignore => .gitignore} | 0 - poppler/{.cvsignore => .gitignore} | 0 - qt/{.cvsignore => .gitignore} | 0 - qt4/{.cvsignore => .gitignore} | 0 - qt4/src/{.cvsignore => .gitignore} | 0 - qt4/tests/{.cvsignore => .gitignore} | 0 - splash/{.cvsignore => .gitignore} | 0 - test/{.cvsignore => .gitignore} | 0 - utils/{.cvsignore => .gitignore} | 0 - 14 files changed, 4586 deletions(-) - -commit c9f9403ffc5b95ae790c3c81284c7786afe33f4d -Author: Krzysztof Kowalczyk <kkowalczyk@gmail.com> -Date: Fri Sep 14 20:50:07 2007 +0000 - - Windows implementation for matching fonts that doesn't use fontconfig - - ChangeLog | 6 + - poppler/GlobalParamsWin.cc | 285 - +++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 291 insertions(+) - -commit d18b5361a0504458da805ed6be037c9d648f9372 -Author: Krzysztof Kowalczyk <kkowalczyk@gmail.com> -Date: Fri Sep 14 20:47:11 2007 +0000 - - Update ChangeLog for previous checkin - - ChangeLog | 15 +++++++++++++++ - 1 file changed, 15 insertions(+) - -commit 3330763ddca66b30d5ee60aab94d6fe0bbae9c8f -Author: Krzysztof Kowalczyk <kkowalczyk@gmail.com> -Date: Fri Sep 14 06:17:35 2007 +0000 - - windows/msvc compilation fixes - - poppler/DCTStream.h | 2 +- - poppler/Error.cc | 6 ++++++ - poppler/FlateStream.h | 2 +- - poppler/GlobalParams.cc | 12 ++++++++++-- - poppler/GlobalParams.h | 17 +++++++++++++++++ - poppler/Stream.cc | 2 +- - splash/SplashFTFontEngine.cc | 2 ++ - splash/SplashFontEngine.cc | 2 +- - splash/SplashFontFile.cc | 2 ++ - splash/SplashFontFile.h | 3 ++- - splash/SplashT1FontEngine.cc | 2 +- - 11 files changed, 44 insertions(+), 8 deletions(-) - -commit 6eb159ef34eb7e2fb8adcfc48afd84d5f50efbbd -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Sep 10 17:38:05 2007 +0000 - - * autogen.sh: Support automake-1.10. - Patch by Krzysztof Kowalczyk <kkowalczyk@gmail.com> - - ChangeLog | 5 +++++ - autogen.sh | 11 ++++++----- - 2 files changed, 11 insertions(+), 5 deletions(-) - -commit 31bbc8c727cfecc79bd8da962ad8d99a0d1d3d33 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Sep 8 10:40:17 2007 +0000 - - * qt4/src/poppler-qt4.h: - * qt4/src/poppler-ps-converter.cc: - Add PSConverter::setOutputDevice() to set a QIODevice where - writing the resulting PS. - - ChangeLog | 7 ++++++ - qt4/src/poppler-ps-converter.cc | 51 - +++++++++++++++++++++++++++++++++++++---- - qt4/src/poppler-qt4.h | 5 +++- - 3 files changed, 58 insertions(+), 5 deletions(-) - -commit b3d63d03c310f01cc5b23d00ffd2103c6891fef2 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Sep 5 20:22:32 2007 +0000 - - * qt4/src/poppler-ps-converter.cc: Fix Right<->Left - interchange - - ChangeLog | 1 + - qt4/src/poppler-ps-converter.cc | 4 ++-- - 2 files changed, 3 insertions(+), 2 deletions(-) - -commit 64368582d5ca4e28c236f440482c96f1dd3a8897 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Sep 5 18:22:52 2007 +0000 - - * poppler/PSOutputDev.cc: Fix printing of second parameter - - ChangeLog | 4 ++++ - poppler/PSOutputDev.cc | 2 +- - 2 files changed, 5 insertions(+), 1 deletion(-) - -commit eaf9d06cf0d08ccdc183759e0331dc2439a6f10f -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Wed Sep 5 10:57:09 2007 +0000 - - 2007-09-05 Carlos Garcia Campos <carlosgc@gnome.org> - * glib/poppler-page.cc: - * glib/demo/render.c: Fix build with --disable-cairo-output. - - ChangeLog | 5 +++++ - glib/demo/render.c | 31 +++++++++++++++++++++++++++---- - glib/poppler-page.cc | 22 ++++++++++++---------- - 3 files changed, 44 insertions(+), 14 deletions(-) - -commit c0f488c2b0e115be3e1b7e4dc7baa38db5837498 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Sep 4 22:04:52 2007 +0000 - - did not want to commit this - - gtk-doc.make | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 3462851b4ea342651095f1803cd488bc3b3f5749 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Sep 4 22:02:06 2007 +0000 - - * utils/pdftoppm.cc: Fix build on Sun Studio compiler. - Patch by Brian Cameron <brian.cameron@sun.com> - - ChangeLog | 5 +++++ - gtk-doc.make | 2 +- - utils/pdftoppm.cc | 2 +- - 3 files changed, 7 insertions(+), 2 deletions(-) - -commit cdf3b9062cc54d558b8dbeefb3211a920ff2cb94 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Sep 3 19:23:11 2007 +0000 - - write news - fix qt4 build - - NEWS | 13 +++++++++++++ - qt4/src/Makefile.am | 3 ++- - 2 files changed, 15 insertions(+), 1 deletion(-) - -commit c82208a44f3b09c27bc33831641e4f746dd4361f -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Sep 3 18:28:44 2007 +0000 - - * configure.ac: Bump version to 0.6 - * glib/Makefile.am - * poppler/Makefile.am - * qt/Makefile.am - * qt4/src/Makefile.am: Bump sonames - - ChangeLog | 8 ++++++++ - configure.ac | 2 +- - glib/Makefile.am | 2 +- - poppler/Makefile.am | 2 +- - qt/Makefile.am | 2 +- - qt4/src/Makefile.am | 2 +- - 6 files changed, 13 insertions(+), 5 deletions(-) - -commit 2a12409ebbf96ea3ca4556b71231a45ae37cb052 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Sep 3 17:09:01 2007 +0000 - - * poppler/JBIG2Stream.cc: - * poppler/Stream.cc: Patch by Derek B. Noonburg - <derekn@foolabs.com> - to fix some errors in CCITTFaxStream and JBIG2Stream.cc - - ChangeLog | 6 ++++++ - poppler/JBIG2Stream.cc | 7 ++++--- - poppler/Stream.cc | 2 +- - 3 files changed, 11 insertions(+), 4 deletions(-) - -commit 0b483e71ef02b4040b665935c1018c8b30b9c1ca -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Sep 3 08:54:01 2007 +0000 - - 2007-09-03 Carlos Garcia Campos <carlosgc@gnome.org> - * gtk-doc.make: - * glib/poppler-document.cc: - * glib/poppler-form-field.cc: - * glib/poppler-page.cc: - * glib/reference/poppler-docs.sgml: - * glib/reference/poppler-sections.txt: - * glib/reference/poppler.types: - * glib/reference/tmpl/poppler-action.sgml: - * glib/reference/tmpl/poppler-attachment.sgml: - * glib/reference/tmpl/poppler-document.sgml: - * glib/reference/tmpl/poppler-enums.sgml: - * glib/reference/tmpl/poppler-form-field.sgml: - * glib/reference/tmpl/poppler-page.sgml: - * glib/reference/tmpl/poppler-private.sgml: - * glib/reference/tmpl/poppler.sgml: Update glib bindings API - documentation. - - ChangeLog | 19 ++ - glib/poppler-document.cc | 10 + - glib/poppler-form-field.cc | 205 ++++++++++++++++++ - glib/poppler-page.cc | 12 +- - glib/reference/poppler-docs.sgml | 2 + - glib/reference/poppler-sections.txt | 108 +++++++++- - glib/reference/poppler.types | 2 + - glib/reference/tmpl/poppler-action.sgml | 36 +++- - glib/reference/tmpl/poppler-attachment.sgml | 65 ++++++ - glib/reference/tmpl/poppler-document.sgml | 50 +++++ - glib/reference/tmpl/poppler-enums.sgml | 60 ++++++ - glib/reference/tmpl/poppler-form-field.sgml | 315 - ++++++++++++++++++++++++++++ - glib/reference/tmpl/poppler-page.sgml | 236 ++++++++++++++++++++- - glib/reference/tmpl/poppler-private.sgml | 6 + - glib/reference/tmpl/poppler.sgml | 49 +++++ - gtk-doc.make | 34 +-- - 16 files changed, 1181 insertions(+), 28 deletions(-) - -commit 289e3893cda45055951bb8d3b82a45644bc0b6c6 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Sep 2 17:02:55 2007 +0000 - - * poppler/GfxState.cc: Pad zeroes instead of aborting when - rendering - 1-bit images and the stream is "too short" to mimic - Acroread and - ghostscript behaviour. Patch by <darren.kenny@sun.com>. Fixes - #12208 - - ChangeLog | 3 +++ - poppler/GfxState.cc | 4 ++-- - 2 files changed, 5 insertions(+), 2 deletions(-) - -commit 6f6c2180aca2e26ea0e3c2f21f11bc8f457c19c0 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Sep 2 16:31:19 2007 +0000 - - * glib/demo/Makefile.am: Add - $(top_builddir)/poppler/libpoppler.la - * poppler/TextOutputDev.cc: Patch from Ed Catmur - <ed@catmur.co.uk> to - improve matching of half strings of decomposed - characters/ligatures. - - ChangeLog | 3 +++ - glib/demo/Makefile.am | 1 + - poppler/TextOutputDev.cc | 21 +++++++++++++-------- - 3 files changed, 17 insertions(+), 8 deletions(-) - -commit be1b5a0196cdfc78f74e08a023b477cac16eb0f3 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Sep 2 16:06:03 2007 +0000 - - poppler/PDFDoc.cc: Don't enforce %%EOF at the end of file - - ChangeLog | 4 ++++ - poppler/PDFDoc.cc | 3 ++- - 2 files changed, 6 insertions(+), 1 deletion(-) - -commit 500a87af9240344806c18ebbd05a89f4f4c69955 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Sun Sep 2 00:53:42 2007 +0000 - - 2007-09-01 Jeff Muizelaar <jeff@infidigm.net> - - * poppler/CairoOutputDev.cc: - * poppler/Error.cc: - * poppler/Error.h: Report any cairo errors when destroying - the cairo - context. - - ChangeLog | 7 +++++++ - poppler/CairoOutputDev.cc | 7 ++++++- - poppler/Error.cc | 7 +++++++ - poppler/Error.h | 1 + - 4 files changed, 21 insertions(+), 1 deletion(-) - -commit 0c22556bf70ff67eb388cdcd9784603030397785 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Sat Sep 1 23:38:04 2007 +0000 - - 2007-09-01 Jeff Muizelaar <jeff@infidigm.net> - - * glib/demo/Makefile.am: Only build the demo app if the - cflags will be - appropriately set. - - ChangeLog | 5 +++++ - glib/demo/Makefile.am | 2 ++ - 2 files changed, 7 insertions(+) - -commit a23d45dd6cd8a2ac4181170a9ee924fe49a9781b -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Sat Sep 1 23:00:59 2007 +0000 - - 2007-09-01 Jeff Muizelaar <jeff@infidigm.net> - - * glib/poppler-page.cc: Add note about clipping - - ChangeLog | 4 ++++ - glib/poppler-page.cc | 2 ++ - 2 files changed, 6 insertions(+) - -commit bf489d5cebc467807f2b38f74f6a6e34a503a9ca -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Aug 30 18:39:51 2007 +0000 - - * poppler/Form.h: Remove unused methods. Fixes 12013 - - ChangeLog | 4 ++++ - poppler/Form.h | 3 --- - 2 files changed, 4 insertions(+), 3 deletions(-) - -commit a81cc06c855385911dffa826b9e1407d6097e8c8 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Aug 30 18:15:34 2007 +0000 - - 2007-08-30 Carlos Garcia Campos <carlosgc@gnome.org> - * poppler/TextOutputDev.cc: - * poppler/TextOutputDev.h: - * glib/poppler.h: - * glib/poppler-page.cc: - * glib/poppler-page.h: - * glib/test-poppler-glib.c: Add support for word and line - selections. Based on patch by Kristian Høgsberg. - - ChangeLog | 10 ++++++ - glib/poppler-page.cc | 81 - ++++++++++++++++++++++++++++++++++++++++++------ - glib/poppler-page.h | 2 ++ - glib/poppler.h | 4 +-- - glib/test-poppler-glib.c | 2 +- - poppler/TextOutputDev.cc | 74 +++++++++++++++++++++++++++++-------------- - poppler/TextOutputDev.h | 34 +++++++++++++++----- - 7 files changed, 163 insertions(+), 44 deletions(-) - -commit 59ddb5cc8bec54305b6d256ad9975e95ecdcb935 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Aug 27 18:37:55 2007 +0000 - - * poppler/UnicodeTypeTable.cc: Fix error on the NFKC text - matching - routine. Fixes bug #11775. Patch by Ed Catmur - <ed@catmur.co.uk> - - ChangeLog | 5 +++++ - poppler/UnicodeTypeTable.cc | 2 +- - 2 files changed, 6 insertions(+), 1 deletion(-) - -commit a6e46ce61670679f368e66c1a98a7d5d1c960c5b -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Aug 27 17:56:29 2007 +0000 - - * qt4/src/Doxyfile: - * qt4/src/Mainpage.dox: - * qt4/src/poppler-annotation.h: - * qt4/src/poppler-form.h: - * qt4/src/poppler-link.h: - * qt4/src/poppler-qt4.h: - A few API documentation fixes and improvements. - - ChangeLog | 10 +++++++ - qt4/src/Doxyfile | 26 ++++++------------ - qt4/src/Mainpage.dox | 26 +++++++++++------- - qt4/src/poppler-annotation.h | 34 ++++++++++++++++++++++++ - qt4/src/poppler-form.h | 18 ++++++------- - qt4/src/poppler-link.h | 63 - +++++++++++++++++++++++++++++++++++++++++--- - qt4/src/poppler-qt4.h | 44 +++++++++++++++++++++---------- - 7 files changed, 166 insertions(+), 55 deletions(-) - -commit a7f8d92fba8c45d6ca83568c045d5e324158ee6b -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Aug 27 17:17:14 2007 +0000 - - * qt4/src/poppler-link.cc: - * qt4/src/poppler-link.h: - Initialise correctly, and missing empty destructor. - * qt4/src/poppler-annotation.cc: - Don't leak the private class. - - ChangeLog | 9 +++++++++ - qt4/src/poppler-annotation.cc | 4 ++-- - qt4/src/poppler-link.cc | 8 ++++++-- - qt4/src/poppler-link.h | 1 + - 4 files changed, 18 insertions(+), 4 deletions(-) - -commit 2b1ef8f06879eb0b79288d57540c238ea833db24 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Aug 26 21:39:22 2007 +0000 - - Fix bug 12121 - - ChangeLog | 4 ++++ - utils/ImageOutputDev.cc | 2 +- - 2 files changed, 5 insertions(+), 1 deletion(-) - -commit 20bcac5ee1988befb9c590a0d16cb615f0c49901 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Aug 26 21:28:34 2007 +0000 - - forgot to cvs add - - qt4/src/poppler-annotation-private.h | 49 - ++++++++++++++++++++++++++++++++++++ - 1 file changed, 49 insertions(+) - -commit e48de657db0ef439457b4b5ca39b937da25d531e -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Aug 26 18:11:01 2007 +0000 - - * qt4/src/poppler-annotation.cc: - * qt4/src/poppler-annotation.h: - Move all the private members of the *Annotation classes into - a common - shared private. - - ChangeLog | 4 + - qt4/src/poppler-annotation.cc | 969 - +++++++++++++++++++++++++++++++++++------- - qt4/src/poppler-annotation.h | 277 ++++++++---- - qt4/src/poppler-page.cc | 249 ++++++----- - 4 files changed, 1155 insertions(+), 344 deletions(-) - -commit 392f050f909b6a1250acf1971446a1849534482c -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Aug 26 16:42:46 2007 +0000 - - * qt4/src/poppler-document.cc: - * qt4/src/poppler-embeddedfile.cc: - * qt4/src/poppler-fontinfo.cc: - * qt4/src/poppler-form.cc: - * qt4/src/poppler-form.h: - * qt4/src/poppler-qt4.h: - * qt4/src/poppler-sound.cc: - * qt4/src/poppler-textbox.cc: - API work: remove 'const' and 'const&' from return values - with Qt - classes; make the non-copiable classes really non-copiable; - uninline a Document::page() method; other related small - changes. - * qt4/src/poppler-link.cc: - * qt4/src/poppler-link.h: - Make LinkDestination an implicitely shared class, with all - the private - members into the private class; move all the private members - of the - Link* classes into a common shared private. - - ChangeLog | 23 ++- - qt4/src/poppler-document.cc | 7 +- - qt4/src/poppler-embeddedfile.cc | 12 -- - qt4/src/poppler-fontinfo.cc | 12 +- - qt4/src/poppler-form.cc | 16 +- - qt4/src/poppler-form.h | 14 +- - qt4/src/poppler-link.cc | 373 - ++++++++++++++++++++++++++++++---------- - qt4/src/poppler-link.h | 67 +++++--- - qt4/src/poppler-qt4.h | 32 ++-- - qt4/src/poppler-sound.cc | 7 - - qt4/src/poppler-textbox.cc | 4 +- - 11 files changed, 404 insertions(+), 163 deletions(-) - -commit f215aca25fdd8fe287b717dde53f0be273d995e4 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun Aug 26 10:52:19 2007 +0000 - - 2007-08-26 Carlos Garcia Campos <carlosgc@gnome.org> - * configure.ac: - * glib/Makefile.am: - * glib/demo/Makefile.am: - * glib/demo/fonts.[ch]: - * glib/demo/info.[ch]: - * glib/demo/links.[ch]: - * glib/demo/main.c: - * glib/demo/outline.[ch]: - * glib/demo/page.[ch]: - * glib/demo/render.[ch]: - * glib/demo/utils.[ch]: Add poppler glib demo tool. - - ChangeLog | 14 ++ - configure.ac | 1 + - glib/Makefile.am | 2 +- - glib/demo/Makefile.am | 26 +++ - glib/demo/fonts.c | 276 ++++++++++++++++++++++++++++ - glib/demo/fonts.h | 31 ++++ - glib/demo/info.c | 243 ++++++++++++++++++++++++ - glib/demo/info.h | 31 ++++ - glib/demo/links.c | 289 +++++++++++++++++++++++++++++ - glib/demo/links.h | 31 ++++ - glib/demo/main.c | 205 +++++++++++++++++++++ - glib/demo/outline.c | 218 ++++++++++++++++++++++ - glib/demo/outline.h | 31 ++++ - glib/demo/page.c | 249 +++++++++++++++++++++++++ - glib/demo/page.h | 31 ++++ - glib/demo/render.c | 498 - ++++++++++++++++++++++++++++++++++++++++++++++++++ - glib/demo/render.h | 31 ++++ - glib/demo/utils.c | 234 ++++++++++++++++++++++++ - glib/demo/utils.h | 42 +++++ - 19 files changed, 2482 insertions(+), 1 deletion(-) - -commit 7c9529b70dc44bb001d21a3b47fc65916813dec1 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Aug 23 20:39:31 2007 +0000 - - 2007-08-23 Carlos Garcia Campos <carlosgc@gnome.org> - * glib/poppler-page.cc: Add missing comma. - - ChangeLog | 4 ++++ - glib/poppler-page.cc | 2 +- - 2 files changed, 5 insertions(+), 1 deletion(-) - -commit 3c4a85503261ee81a829a1683f1f5fa85d41f8ee -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Thu Aug 23 20:15:46 2007 +0000 - - 2007-08-23 Jeff Muizelaar <jeff@infidigm.net> - - * glib/poppler-page.cc: pass in -1 to displaySlice so that - it sets up - the slice size for us. This fixes the case of the wrong - values being - used when the pdf was rotated on its side. - Fixes #11913. - - ChangeLog | 7 +++++++ - glib/poppler-page.cc | 5 ++--- - 2 files changed, 9 insertions(+), 3 deletions(-) - -commit 3ba088d8caee3c40c2aba0cd85adcf9195ae88a3 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Aug 22 21:29:32 2007 +0000 - - * splash/SplashBitmap.cc: - * splash/SplashBitmap.h: - * utils/pdftoppm.cc: Add the following features to pdftoppm - - if omitting input filename or using - for input filename - reads pdf from stdin - - if omitting output filename, prints output to stdout - - create image of a cropped rectangle of the pdf - - scale pdf to fit in a square of wanted size - Patch by Ilmari Heikkinen <ilmari.heikkinen@gmail.com> - - ChangeLog | 12 ++++++ - splash/SplashBitmap.cc | 18 +++++++-- - splash/SplashBitmap.h | 2 + - utils/pdftoppm.cc | 107 - +++++++++++++++++++++++++++++++++++++++++-------- - 4 files changed, 119 insertions(+), 20 deletions(-) - -commit 567e82c13aace4f40c7a555a62a3a4d223a46d92 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Wed Aug 22 19:34:02 2007 +0000 - - 2007-08-22 Jeff Muizelaar <jeff@infidigm.net> - - * poppler/GlobalParams.cc: Fix debug spew. Patch from - Matthias Clasen. - - ChangeLog | 4 ++++ - poppler/GlobalParams.cc | 1 - - 2 files changed, 4 insertions(+), 1 deletion(-) - -commit bc499987074d046baf29deafe4a29d57039c0c5e -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Wed Aug 22 19:28:24 2007 +0000 - - 2007-08-22 Jeff Muizelaar <jeff@infidigm.net> - - * poppler/CairoOutputDev.cc: Fix the computation of the - padding in the - image scaling code. - - ChangeLog | 5 +++++ - poppler/CairoOutputDev.cc | 6 ++++-- - 2 files changed, 9 insertions(+), 2 deletions(-) - -commit d9719233447cb4f85f2bf9d9ec6ef089caa21140 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Sun Aug 19 16:20:21 2007 +0000 - - 2007-08-19 Jeff Muizelaar <jeff@infidigm.net> - - * poppler/CairoOutputDev.cc: Avoid allocating the glyph - array if - currentFont is not set in beginString. This closes a possible - memory leak. - - ChangeLog | 6 ++++++ - poppler/CairoOutputDev.cc | 3 +++ - 2 files changed, 9 insertions(+) - -commit 099eb56896046e020f4ef0365e1ee382f85ec1ab -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Aug 15 18:52:20 2007 +0000 - - * poppler/JBIG2Stream.cc: Quick fix for bug #12014 - - ChangeLog | 4 ++++ - poppler/JBIG2Stream.cc | 16 +++++++++++----- - 2 files changed, 15 insertions(+), 5 deletions(-) - -commit 3b7e3645c85c7a3d341457f105835b58c935bd67 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Aug 15 00:04:48 2007 +0000 - - RC2 is out! (0.5.91) - - ChangeLog | 1 + - NEWS | 18 ++++++++++++++++++ - configure.ac | 2 +- - 3 files changed, 20 insertions(+), 1 deletion(-) - -commit c240daefe660ac3456dc0c5f5dc82aa53ebc3313 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Aug 14 23:10:37 2007 +0000 - - * poppler/Stream.cc: Fix CVE-2007-3387 by merging xpdf-3.02pl1.patch - - ChangeLog | 1 + - poppler/Stream.cc | 12 +++++------- - 2 files changed, 6 insertions(+), 7 deletions(-) - -commit 1ba884b6b98ac8d755c9adc9f23a7a68d8b17b54 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Aug 14 22:47:30 2007 +0000 - - * configure.ac: - * pòppler/Makefile.am: Patch by Vincent Torri - <vtorri@univ-evry.fr> to - fix linking under MinGW - - ChangeLog | 6 ++++++ - configure.ac | 13 +++++++++++++ - poppler/Makefile.am | 5 +++-- - 3 files changed, 22 insertions(+), 2 deletions(-) - -commit 3c31f923fcf1aeb361910eb1e9445cc28aa5b3ca -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Tue Aug 7 16:22:12 2007 +0000 - - 2007-08-07 Jeff Muizelaar <jeff@infidigm.net> - - * poppler/CairoOutputDev.cc: Don't use the prescaleMethod - when we have a rotation as that case has not been tested. - Also make sure that scaledHeight is at least 1. - - ChangeLog | 6 ++++++ - poppler/CairoOutputDev.cc | 7 ++++++- - 2 files changed, 12 insertions(+), 1 deletion(-) - -commit af97e5f8e0f3beeb43acde92a0788c02d9718adf -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Aug 6 17:41:17 2007 +0000 - - 2007-08-06 Carlos Garcia Campos <carlosgc@gnome.org> - * poppler/Annot.cc: - * poppler/Annot.h: - * poppler/Form.cc: - * poppler/Form.h: - * poppler/Page.cc: Do not always regenerate appearance - stream for - every form widget, but only when it's actually needed. - - ChangeLog | 9 ++++++ - poppler/Annot.cc | 86 - ++++++++++++++++++++++++++++++++++---------------------- - poppler/Annot.h | 8 +++--- - poppler/Form.cc | 25 +++------------- - poppler/Form.h | 4 ++- - poppler/Page.cc | 8 ++---- - 6 files changed, 74 insertions(+), 66 deletions(-) - -commit 74627e71388ca0a4c0938a472c291ef87186f370 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Tue Jul 31 21:40:19 2007 +0000 - - 2007-07-31 Jeff Muizelaar <jeff@infidigm.net> - - * poppler/GlobalParams.cc: s/GList/GooList/ some Windows code. - - ChangeLog | 4 ++++ - poppler/GlobalParams.cc | 8 ++++---- - 2 files changed, 8 insertions(+), 4 deletions(-) - -commit f421e2151345ac855b75e819e19343a90789b3bf -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Tue Jul 31 16:50:06 2007 +0000 - - 2007-07-31 Jeff Muizelaar <jeff@infidigm.net> - - * glib/poppler-document.cc: - * glib/poppler-document.h: Add - poppler_fonts_iter_get_file_name. - - ChangeLog | 5 +++++ - glib/poppler-document.cc | 16 ++++++++++++++++ - glib/poppler-document.h | 1 + - 3 files changed, 22 insertions(+) - -commit 4d57b8a12b845d5d5ac321d7a4bca980d60d429f -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Tue Jul 31 16:48:35 2007 +0000 - - 2007-07-31 Jeff Muizelaar <jeff@infidigm.net> - - * poppler/CairoOutputDev.h: Add comment about - CairoImageOutputDevice's - implementation. - - ChangeLog | 5 +++++ - poppler/CairoOutputDev.h | 1 + - 2 files changed, 6 insertions(+) - -commit f04a67006abdb5843ab481aa1e25b51abd1b1b64 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Jul 31 11:41:53 2007 +0000 - - 2007-07-31 Carlos Garcia Campos <carlosgc@gnome.org> - * poppler/Form.cc: - * poppler/Form.h: Fix memory leak. - - ChangeLog | 5 +++++ - poppler/Form.cc | 9 +++++---- - poppler/Form.h | 4 ++-- - 3 files changed, 12 insertions(+), 6 deletions(-) - -commit ee9d556a8b413160911a535a0e9089b919ca29f5 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Jul 31 11:40:22 2007 +0000 - - 2007-07-31 Carlos Garcia Campos <carlosgc@gnome.org> - * poppler/CairoOutputDev.h: Empty implementation of - transparency - groups and soft masks in CairoImageOutputDev. Fixes a crash in - poppler_page_get_image_mapping. - - ChangeLog | 6 ++++++ - poppler/CairoOutputDev.h | 11 +++++++++++ - 2 files changed, 17 insertions(+) - -commit e08779856c801b9968dc2d47e28e86abc1ec7110 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Tue Jul 31 05:29:57 2007 +0000 - - 2007-07-31 Jeff Muizelaar <jeff@infidigm.net> - - * poppler/GfxFont.cc: Fix the case where the Encoding is - "Identity" - and ToUnicode exists. GfxCIDFont::getCodeToGIDMap makes - CIDTOGID map - from ToUnicde map, but when encoding is Identity, it should - not use - ToUnicode map to get GID. If encoding is Identity, No CIDTOGID - map is - needed. - Patch by Koji Otani. - Fixes #11413. - - ChangeLog | 10 ++++++++++ - poppler/GfxFont.cc | 1 + - 2 files changed, 11 insertions(+) - -commit 86fc9a6f343be920f5159e745947401227e41a37 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Mon Jul 30 19:28:17 2007 +0000 - - 2007-07-30 Jeff Muizelaar <jeff@infidigm.net> - - * poppler/CairoOutputDev.cc: - * poppler/CairoOutputDev.h: Prescale image masks before - giving them - to cairo to improve the quality of the scaled image. Improves - #5589. - - ChangeLog | 6 + - poppler/CairoOutputDev.cc | 300 - ++++++++++++++++++++++++++++++++++++++++++++-- - poppler/CairoOutputDev.h | 10 +- - 3 files changed, 303 insertions(+), 13 deletions(-) - -commit f754246e47161e9bf99887201e283c1419ade4f1 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Mon Jul 30 19:07:45 2007 +0000 - - 2007-07-30 Jeff Muizelaar <jeff@infidigm.net> - - * configure.ac: Update require cairo version to 1.4 - - ChangeLog | 4 ++++ - configure.ac | 2 +- - 2 files changed, 5 insertions(+), 1 deletion(-) - -commit bb20249ac676995725b617ef442f5feb01f78205 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Mon Jul 30 18:44:41 2007 +0000 - - 2007-07-30 Jeff Muizelaar <jeff@infidigm.net> - - * poppler/CairoOutputDev.cc: - * poppler/CairoOutputDev.h: Add transparency group support. - Fixes #7856. - - ChangeLog | 6 +++ - poppler/CairoOutputDev.cc | 133 - ++++++++++++++++++++++++++++++++++++++++++++++ - poppler/CairoOutputDev.h | 21 +++++++- - 3 files changed, 159 insertions(+), 1 deletion(-) - -commit a85acecaeb0d122becbc52a385d918561e995eca -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Mon Jul 30 00:22:35 2007 +0000 - - 2007-07-29 Jeff Muizelaar <jeff@infidigm.net> - - * poppler/CairoOutputDev.cc: - * poppler/CairoOutputDev.h: transform the original matrix - for type3 fonts - instead of using set_matrix() - - ChangeLog | 6 ++++++ - poppler/CairoOutputDev.cc | 20 +++++++++++++++++--- - poppler/CairoOutputDev.h | 1 + - 3 files changed, 24 insertions(+), 3 deletions(-) - -commit a81a082169de32d01c36c969616a5c2279f1bac7 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Mon Jul 30 00:18:59 2007 +0000 - - 2007-07-29 Jeff Muizelaar <jeff@infidigm.net> - - * glib/test-poppler-glib.c: include <time.h> to fix - compilation. - - ChangeLog | 4 ++++ - glib/test-poppler-glib.c | 1 + - 2 files changed, 5 insertions(+) - -commit 81393cb30f6287caf5195265cdc039555f2767d3 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Jul 28 08:22:40 2007 +0000 - - 2007-07-28 Carlos Garcia Campos <carlosgc@gnome.org> - * poppler/Annot.cc: - * poppler/Annot.h: - * poppler/Form.cc: - * poppler/Form.h: Make fieldLookup static in Form and use - it from - both Form and Annot. - - ChangeLog | 8 +++++++ - poppler/Annot.cc | 43 +++++++++++------------------------- - poppler/Annot.h | 1 - - poppler/Form.cc | 66 - +++++++++++++++++++++++++++----------------------------- - poppler/Form.h | 2 ++ - 5 files changed, 54 insertions(+), 66 deletions(-) - -commit 81b669dcb14bf821a49c9879f8d4129075647f5f -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Jul 28 08:05:11 2007 +0000 - - 2007-07-28 Carlos Garcia Campos <carlosgc@gnome.org> - * glib/poppler-page.h: Remove unneeded declarations. Fixes bug - #11744. Patch by Kouhei Sutou <kou@cozmixng.org>. - - ChangeLog | 5 +++++ - glib/poppler-page.h | 2 -- - 2 files changed, 5 insertions(+), 2 deletions(-) - -commit f2c4e5305009f1da770c99d3e2e3371ff37c75f3 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri Jul 27 09:17:40 2007 +0000 - - 2007-07-27 Carlos Garcia Campos <carlosgc@gnome.org> - * glib/poppler-document.cc: - * glib/poppler-document.h: - * glib/poppler-private.h: - * glib/test-poppler-glib.c: Make PopplerFontInfo - GObject. Patch by - Kouhei Sutou <kou@cozmixng.org>. - - ChangeLog | 8 ++++++++ - glib/poppler-document.cc | 44 - ++++++++++++++++++++++++++++++++++++++++---- - glib/poppler-document.h | 6 +++++- - glib/poppler-private.h | 1 + - glib/test-poppler-glib.c | 2 +- - 5 files changed, 55 insertions(+), 6 deletions(-) - -commit 975c7cff10d9b00359e147329ae2c7a93f8a3833 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Jul 25 17:20:06 2007 +0000 - - micro optimization - - qt4/src/poppler-page.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 525a7f49dd95f2644870a1c59ca15124e30026b4 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Jul 24 16:45:25 2007 +0000 - - 2007-07-24 Carlos Garcia Campos <carlosgc@gnome.org> - * poppler/Annot.cc: - * poppler/Form.cc: Several fixes in forms. Generate - appearance for - field buttons that don't have an AP dict. Do not remove - the first - character of the second and following lines in multiline text - fields. Fix a crash with pdf documents created by ooo - which have - radio buttons. Look for some inheritable attributes in the - parent when needed. - - ChangeLog | 10 ++++++++ - poppler/Annot.cc | 27 ++++++++++---------- - poppler/Form.cc | 77 - +++++++++++++++++++++++++++++++++++++++----------------- - 3 files changed, 78 insertions(+), 36 deletions(-) - -commit 633a1cde65f86ee6577a68f4f8d36de43d14c714 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Jul 15 21:03:50 2007 +0000 - - * utils/HtmlOutputDev.cc: - * utils/HtmlOutputDev.h: Create the html files in the - correct place, - not in the invocation dir. Fixes bug #11610 - - ChangeLog | 6 ++++++ - utils/HtmlOutputDev.cc | 37 ++++++++++--------------------------- - utils/HtmlOutputDev.h | 4 ---- - 3 files changed, 16 insertions(+), 31 deletions(-) - -commit ccb2d420ca8d818aa9ba1d64f08f5e94ab313a72 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Jul 15 17:09:29 2007 +0000 - - * poppler/DCTStream.cc - * poppler/DCTStream.h: Implement less evil error handling. On - a - error_exit level error we don't want to actually exit the - program. See - http://bugs.kde.org/show_bug.cgi?id=147878 for a pdf with this - problem. libjpeg was printing "Bogus Huffman table definition" - and - exiting the program. - * poppler/Stream.cc: Remove bogus #warning - - ChangeLog | 10 ++++++++++ - poppler/DCTStream.cc | 17 ++++++++++++++++- - poppler/DCTStream.h | 1 + - poppler/Stream.cc | 1 - - 4 files changed, 27 insertions(+), 2 deletions(-) - -commit f9d82dfd299ae23a1baf3e35e2c3cd351129c525 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Jul 14 18:23:42 2007 +0000 - - * utils/pdftops.cc: init width/height to -1 so it is - calculated if not - specified - - ChangeLog | 5 +++++ - utils/pdftops.cc | 4 ++-- - 2 files changed, 7 insertions(+), 2 deletions(-) - -commit 1c04136e9538ccfaa2d6b968861682ca3b69ffb3 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Jul 14 15:23:31 2007 +0000 - - 2007-07-14 Pino Toscano <pino@kde.org> - * glib/poppler-action.h: - * glib/poppler-document.h: Remove trailing comma from the last - item of enums. - - ChangeLog | 6 ++++++ - glib/poppler-action.h | 2 +- - glib/poppler-document.h | 8 ++++---- - 3 files changed, 11 insertions(+), 5 deletions(-) - -commit b9b68cabce19a5e23911e5432ace8c13bd237391 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Jul 14 15:15:57 2007 +0000 - - 2007-07-14 Carlos Garcia Campos <carlosgc@gnome.org> - * glib/poppler-form-field.cc: - * glib/poppler-form-field.h: - * glib/test-poppler-glib.c: Make is_password a property - instead of - a text form field type, since a text field could be - multiline and - password at the same time. - - ChangeLog | 8 ++++++++ - glib/poppler-form-field.cc | 10 ++++++++-- - glib/poppler-form-field.h | 2 +- - glib/test-poppler-glib.c | 4 ++-- - 4 files changed, 19 insertions(+), 5 deletions(-) - -commit 14a8361039d708661b8699b2e7c4496135021a85 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Jul 13 22:18:05 2007 +0000 - - * fofi/FoFiTrueType.cc - * fofi/FoFiTrueType.h - * poppler/CairoFontEngine.cc - * poppler/CharCodeToUnicode.cc - * poppler/CharCodeToUnicode.h - * poppler/GfxFont.cc - * poppler/GfxFont.h - * poppler/SplashOutputDev.cc: Patch by - Koji Otani <sho@bbr.jp> to fix several problems with - Japanese fonts. - Fixes bug 11413 - - ChangeLog | 13 ++ - fofi/FoFiTrueType.cc | 305 - +++++++++++++++++++++++++++++++++++++++++++ - fofi/FoFiTrueType.h | 12 ++ - poppler/CairoFontEngine.cc | 47 ++----- - poppler/CharCodeToUnicode.cc | 16 +++ - poppler/CharCodeToUnicode.h | 1 + - poppler/GfxFont.cc | 230 ++++++++++++++++++++++++++++---- - poppler/GfxFont.h | 2 + - poppler/SplashOutputDev.cc | 53 ++------ - 9 files changed, 577 insertions(+), 102 deletions(-) - -commit 8389099d8e8940e3f8920b14a83075d69bcd8e6c -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Jul 13 18:21:02 2007 +0000 - - * poppler/FontInfo.cc: Fix the FontInfoScanner::scan method to - actually scan the number of requested pages - - ChangeLog | 6 ++++++ - poppler/FontInfo.cc | 12 ++++++------ - 2 files changed, 12 insertions(+), 6 deletions(-) - -commit 9ced4442372d08375e0ded62f79052d8a3ec9cd6 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Jul 13 18:08:44 2007 +0000 - - * poppler/GlobalParams.cc: Remove dead unused code from - Win32 ifdef - - ChangeLog | 4 ++++ - poppler/GlobalParams.cc | 6 ------ - 2 files changed, 4 insertions(+), 6 deletions(-) - -commit fb89fdb8de608ff94082e16819f042cddabf2bcc -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Jul 11 18:52:12 2007 +0000 - - * poppler/PSOutputDev.cc - * poppler/PSOutputDev.h - * utils/pdftohtml.cc: Fix bug 9746. pdftohtml complex mode - had text - twice - - ChangeLog | 7 +++++++ - poppler/PSOutputDev.cc | 5 +++++ - poppler/PSOutputDev.h | 2 ++ - utils/pdftohtml.cc | 3 +-- - 4 files changed, 15 insertions(+), 2 deletions(-) - -commit 0c9fa59bf5edf3cfcca1792da51b904a7c7f7615 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Wed Jul 11 18:30:19 2007 +0000 - - 2007-07-11 Carlos Garcia Campos <carlosgc@gnome.org> - * poppler/Form.cc: - * poppler/XRef.cc: - * poppler/XRef.h: Fix memory leak. - - ChangeLog | 6 ++++++ - poppler/Form.cc | 49 ++++++++++++++++++++++++------------------------- - poppler/XRef.cc | 22 ++++++++++------------ - poppler/XRef.h | 2 +- - 4 files changed, 41 insertions(+), 38 deletions(-) - -commit 4ae7d43bd54c5b3e2f08c48441f741d3099e228f -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Jul 11 18:12:26 2007 +0000 - - * goo/GooVector.h: Rename guard from _VECTOR_H to GOO_VECTOR_H - * goo/gfile.cc: GString -> GooString in Windows code - * poppler/GlobalParams.cc: GString -> GooString in Windows - code - * splash/SplashT1FontEngine.cc - * splash/SplashT1FontEngine.h - * splash/SplashT1FontFile.cc - * splash/SplashT1FontFile.h: T1 code is not supported, - but at least - make it compile :-D - - ChangeLog | 11 +++++++++++ - goo/GooVector.h | 4 ++-- - goo/gfile.cc | 6 +++--- - poppler/GlobalParams.cc | 26 +++++++++++++------------- - splash/SplashFontEngine.cc | 2 +- - splash/SplashT1FontEngine.cc | 8 ++++---- - splash/SplashT1FontEngine.h | 7 +++---- - splash/SplashT1FontFile.cc | 8 +++++--- - splash/SplashT1FontFile.h | 4 ++-- - 9 files changed, 44 insertions(+), 32 deletions(-) - -commit 7bd125ce96c603fd5cf42d7c6a29b542e82dd4ec -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Wed Jul 11 18:08:07 2007 +0000 - - 2007-07-11 Carlos Garcia Campos <carlosgc@gnome.org> - * poppler/Form.cc: - * poppler/Form.h: - * glib/poppler-form-field.cc: - * glib/poppler-form-field.h: - * glib/test-poppler-glib.c: Add a method to get the max length - allowed in text form fields. - - ChangeLog | 9 +++++++++ - glib/poppler-form-field.cc | 8 ++++++++ - glib/poppler-form-field.h | 1 + - glib/test-poppler-glib.c | 1 + - poppler/Form.cc | 11 +++++++++++ - poppler/Form.h | 4 ++++ - 6 files changed, 34 insertions(+) - -commit 8a68855735e9d295d71685e82de39204d639ea7a -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Jul 9 08:52:58 2007 +0000 - - 2007-07-09 Carlos Garcia Campos <carlosgc@gnome.org> - * poppler/Annot.cc: - * poppler/Annot.h: Render '*' instead of the actual content in - password form fields. Patch by Julien Rebetez - <julien@fhtagn.net> - - ChangeLog | 6 ++++++ - poppler/Annot.cc | 52 - +++++++++++++++++++++++++++++----------------------- - poppler/Annot.h | 5 +++-- - 3 files changed, 38 insertions(+), 25 deletions(-) - -commit 53cf7d7084dc03a28239f11c94f2095bb02d6108 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Jul 7 16:23:56 2007 +0000 - - 2007-07-07 Carlos Garcia Campos <carlosgc@gnome.org> - * poppler/Form.cc: - * poppler/Form.h: - * glib/poppler-form-field.cc: - * glib/poppler-form-field.h: - * glib/test-poppler-glib.c: Add a method to get the type of - a Form - Field Button. - - ChangeLog | 9 +++++++++ - glib/poppler-form-field.cc | 18 ++++++++++++++++++ - glib/poppler-form-field.h | 8 ++++++++ - glib/test-poppler-glib.c | 26 +++++++++++++++++++++++--- - poppler/Form.cc | 5 +++++ - poppler/Form.h | 2 ++ - 6 files changed, 65 insertions(+), 3 deletions(-) - -commit de0a40181e5832a0dc263d40ed0a269867764623 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Jul 7 15:28:29 2007 +0000 - - 2007-07-07 Carlos Garcia Campos <carlosgc@gnome.org> - * poppler/Form.cc: Fix a crash when setting state on - buttons that - don't have state. - - ChangeLog | 5 +++++ - poppler/Form.cc | 3 +++ - 2 files changed, 8 insertions(+) - -commit a33518a3283ff25aa5517bc535ddb61383b1cfdc -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Jul 6 09:08:44 2007 +0000 - - * poppler/Form.cc: Fix a bug with FormField's destructor - which was not - checking if the FormField is terminal to determine wether - it needs to - delete children or widgets. Patch by - Julien Rebetez <julien@fhtagn.net> - - ChangeLog | 4 ++++ - poppler/Form.cc | 17 +++++++++++------ - 2 files changed, 15 insertions(+), 6 deletions(-) - -commit 43f0d5b9bb198cdcbc2f7111f294c6f947105314 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Jul 6 08:47:11 2007 +0000 - - * goo/GooString.cc: - * poppler/ABWOutputDev.cc: Build on Sun Force compiler, - patch by - Darren Kenny <darren.kenny@sun.com> - - ChangeLog | 6 ++++++ - goo/GooString.cc | 2 +- - poppler/ABWOutputDev.cc | 4 +++- - 3 files changed, 10 insertions(+), 2 deletions(-) - -commit 4e7405071b69889362e4d49de3f881f0e3e261e3 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Jul 5 13:04:01 2007 +0000 - - 2007-07-05 Carlos Garcia Campos <carlosgc@gnome.org> - * glib/poppler-form-field.cc: Allow to set NULL in form fields - that can contain text. - - ChangeLog | 5 +++++ - glib/poppler-form-field.cc | 30 ++++++++++++------------------ - 2 files changed, 17 insertions(+), 18 deletions(-) - -commit 625510797c528257527003477fe28adbacfe80e7 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Thu Jul 5 08:13:51 2007 +0000 - - 2007-07-05 Carlos Garcia Campos <carlosgc@gnome.org> - * glib/poppler-attachment.cc: - * glib/poppler-attachment.h: - * glib/test-poppler-glib.c: Rename cdate and mdate again - to ctime - and mtime, since they are public attributes and we don't - want to - break the API. - - ChangeLog | 8 ++++++++ - glib/poppler-attachment.cc | 4 ++-- - glib/poppler-attachment.h | 4 ++-- - glib/test-poppler-glib.c | 4 ++-- - 4 files changed, 14 insertions(+), 6 deletions(-) - -commit 9b2640f156f24b07c797d9461f84e64d550efa1a -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Jul 4 13:57:31 2007 +0000 - - * qt4/src/poppler-form.cc: QStringToGooString -> - QStringToUnicodeGooString has FormWidgetText::setContent - wants to have - the unicode formated string - * qt4/src/poppler-private.h: create QStringToUnicodeGooString - - ChangeLog | 7 +++++++ - qt4/src/poppler-form.cc | 2 +- - qt4/src/poppler-private.h | 15 +++++++++++++++ - 3 files changed, 23 insertions(+), 1 deletion(-) - -commit b70115cf979b29f75c644518ae0e9c0dd9892ebf -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Wed Jul 4 13:06:38 2007 +0000 - - 2007-07-04 Carlos Garcia Campos <carlosgc@gnome.org> - * glib/poppler-form-field.cc: Convert strings from UTF8 - to UTF16BE - before setting them. - - ChangeLog | 5 +++++ - glib/poppler-form-field.cc | 34 ++++++++++++++++++++++++---------- - 2 files changed, 29 insertions(+), 10 deletions(-) - -commit d37843877a6f93a9f27502d07ad82cba79e9aa73 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Wed Jul 4 08:26:52 2007 +0000 - - 2007-07-04 Carlos Garcia Campos <carlosgc@gnome.org> - * glib/poppler-attachment.cc: - * glib/poppler-attachment.h: Add size, creation and - modification - date and checksum properties to attachments. Fix memory leaks. - * glib/test-poppler-glib.c: - * glib/poppler.h: - * glib/poppler-private.h: - * glib/poppler-document.cc: Add a function to convert a - pdf date - into a GTime that is used by attachments and document - properties. Fix memory leak in attachments. - - ChangeLog | 12 ++++ - glib/poppler-attachment.cc | 25 +++++++- - glib/poppler-attachment.h | 16 ++--- - glib/poppler-document.cc | 142 - +++++++++++++++++++++++---------------------- - glib/poppler-private.h | 6 +- - glib/poppler.h | 1 + - glib/test-poppler-glib.c | 56 +++++++++++++++--- - 7 files changed, 171 insertions(+), 87 deletions(-) - -commit d933f47d4af0992059148259a189373b42499bbe -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Jul 3 20:31:20 2007 +0000 - - * qt4/tests/poppler-fonts.cpp: For the sake of completeness, - add all - the enums - - ChangeLog | 2 ++ - qt4/tests/poppler-fonts.cpp | 28 ++++++++++++++++++++-------- - 2 files changed, 22 insertions(+), 8 deletions(-) - -commit d90b166cfbdc4857351baa627d158d5e0b6652b4 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Jul 3 16:46:51 2007 +0000 - - * poppler/Catalog.cc: Fix crash, - embeddedFileNameTree.getName(i) - returns a reference to its own data so does not have to - be deleted - * qt4/tests/poppler-attachments.cpp: Delete the doc, just - for sake of - correctness - - ChangeLog | 7 +++++++ - poppler/Catalog.cc | 1 - - qt4/tests/poppler-attachments.cpp | 1 + - 3 files changed, 8 insertions(+), 1 deletion(-) - -commit 7fa87eb2b093770271bc3a72de5b0b9dc228aa1b -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Jul 3 14:01:40 2007 +0000 - - 2007-07-03 Carlos Garcia Campos <carlosgc@gnome.org> - * glib/poppler-form-field.cc: - * glib/poppler-form-field.h: - * glib/test-poppler-glib.c: Add choice_commit_on_change - function - to glib bindings. - - ChangeLog | 7 +++++++ - glib/poppler-form-field.cc | 8 ++++++++ - glib/poppler-form-field.h | 1 + - glib/test-poppler-glib.c | 2 ++ - 4 files changed, 18 insertions(+) - -commit 8b67e0403f6eaab6770cc0b7861074ae0b6d85bb -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Tue Jul 3 13:49:18 2007 +0000 - - 2007-07-03 Carlos Garcia Campos <carlosgc@gnome.org> - * glib/poppler-form-field.cc: - * glib/poppler-form-field.h: - * glib/test-poppler-glib.c: Fix a typo. - - ChangeLog | 6 ++++++ - glib/poppler-form-field.cc | 2 +- - glib/poppler-form-field.h | 2 +- - glib/test-poppler-glib.c | 2 +- - 4 files changed, 9 insertions(+), 3 deletions(-) - -commit 33a5765eb404a4b321b09c26af74c1ed64a5d474 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Jul 3 13:22:54 2007 +0000 - - * poppler/Catalog.cc: - * poppler/Catalog.h: Add size and checksum properties to - the embeded - files - * qt4/src/poppler-embeddedfile.cc: - * qt4/src/poppler-qt4.h: Add size and checksum properties - to the qt4 - frontend - - ChangeLog | 9 +++++++++ - poppler/Catalog.cc | 19 ++++++++++++++++--- - poppler/Catalog.h | 13 +++++++++++-- - qt4/src/poppler-embeddedfile.cc | 16 ++++++++++++++++ - qt4/src/poppler-qt4.h | 14 ++++++++++++++ - 5 files changed, 66 insertions(+), 5 deletions(-) - -commit c7d21f9354bbe090cce6459124dcaadf1e46639e -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Jul 2 13:39:32 2007 +0000 - - 2007-07-02 Carlos Garcia Campos <carlosgc@gnome.org> - * glib/poppler-form-field.cc: - * glib/poppler-form-field.h: - * glib/test-poppler-glib.c: - Use FILE_SELECT instead of FILESELECT and fix a typo. Patch by - Kouhei Sutou - - ChangeLog | 9 +++++++++ - glib/poppler-form-field.cc | 2 +- - glib/poppler-form-field.h | 2 +- - glib/test-poppler-glib.c | 2 +- - 4 files changed, 12 insertions(+), 3 deletions(-) - -commit 5e301064c62c6d58f488839d7bf804af912a3de1 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Mon Jul 2 13:34:26 2007 +0000 - - 2007-07-02 Carlos Garcia Campos <carlosgc@gnome.org> - * glib/poppler-form-field.cc: - * glib/poppler-form-field.h: - * glib/test-poppler-glib.c: - Add poppler_form_field_is_read_only to glib bindings. Patch by - Kouhei Sutou - - ChangeLog | 9 +++++++++ - glib/poppler-form-field.cc | 8 ++++++++ - glib/poppler-form-field.h | 1 + - glib/test-poppler-glib.c | 6 +++++- - 4 files changed, 23 insertions(+), 1 deletion(-) - -commit 11875746ce28e8999bcad46167fcfea131cd267a -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Jun 30 08:33:30 2007 +0000 - - 2007-06-30 Carlos Garcia Campos <carlosgc@gnome.org> - * glib/poppler-page.cc: Use poppler_page_transition_get_type - instead of poppler_page_transition which doesn't exist. Patch - by - Kouhei Sutou - - ChangeLog | 6 ++++++ - glib/poppler-page.cc | 2 +- - 2 files changed, 7 insertions(+), 1 deletion(-) - -commit 0a5acaae3b9bfcd731bc4e072f35f9433aa773da -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Jun 30 08:25:15 2007 +0000 - - 2007-06-30 Carlos Garcia Campos <carlosgc@gnome.org> - * glib/Makefile.am: - * glib/poppler-form-field.cc: - * glib/poppler-form-field.h: - * glib/poppler-document.cc: - * glib/poppler-document.h: - * glib/poppler-page.cc: - * glib/poppler-page.h: - * glib/poppler-private.h: - * glib/poppler.h: - * glib/test-poppler-glib.c: Improve forms API in the glib - bindings - in order to make it more consistent with the current API and - easier to use. - - ChangeLog | 15 +++ - glib/Makefile.am | 2 + - glib/poppler-document.cc | 197 ++-------------------------- - glib/poppler-document.h | 55 +------- - glib/poppler-form-field.cc | 316 - +++++++++++++++++++++++++++++++++++++++++++++ - glib/poppler-form-field.h | 96 ++++++++++++++ - glib/poppler-page.cc | 210 ++++++++++++------------------ - glib/poppler-page.h | 55 ++------ - glib/poppler-private.h | 11 +- - glib/poppler.h | 40 +++--- - glib/test-poppler-glib.c | 119 ++++++++++++++--- - 11 files changed, 662 insertions(+), 454 deletions(-) - -commit 2212874e57a6eb9db733b2e9a98f0cfcb88a8fc1 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Jun 26 21:31:07 2007 +0000 - - * poppler/Form.cc: Don't crash on documents with AcroForm - but no - AcroForm->Fields (it's mandatory but...) - - ChangeLog | 5 +++++ - poppler/Form.cc | 54 - +++++++++++++++++++++++++++++------------------------- - 2 files changed, 34 insertions(+), 25 deletions(-) - -commit e48ee9c4af6bf98b6988c51dcab9ee9ef6e3cafe -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sat Jun 23 18:06:07 2007 +0000 - - 2007-06-23 Carlos Garcia Campos <carlosgc@gnome.org> - * poppler/Annot.cc: - * poppler/Form.cc: Fix memory leaks. - - ChangeLog | 5 +++++ - poppler/Annot.cc | 2 +- - poppler/Form.cc | 13 +++++++++---- - 3 files changed, 15 insertions(+), 5 deletions(-) - -commit d874a2753e3ac51b6f539dfdf980435c8c381b4f -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Jun 20 20:07:15 2007 +0000 - - * qt4/src/poppler-qt4.h: - * qt4/src/poppler-document.cc: Allow access to a document's - metadata contents - from the qt4 binding. Based on patch by Jason Kivlighn - * qt4/tests/test-poppler-qt4.cpp: Print metadata if it exists - - ChangeLog | 5 +++++ - qt4/src/poppler-document.cc | 13 +++++++++++++ - qt4/src/poppler-qt4.h | 5 +++++ - qt4/tests/test-poppler-qt4.cpp | 1 + - 4 files changed, 24 insertions(+) - -commit 08d4c437e735ac50a340c4ae17ee0eeccd00dc20 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Jun 20 18:40:03 2007 +0000 - - * glib/poppler-document.cc: Allow access to a document's - metadata stream - through the glib binding. Patch by Jason Kivlighn - <jkivlighn@gmail.com> Approved by Carlos - - ChangeLog | 6 ++++++ - glib/poppler-document.cc | 21 +++++++++++++++++++++ - 2 files changed, 27 insertions(+) - -commit cdd2a49dc99aa16ded674c58dbb50298f06cf18a -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Jun 15 18:15:53 2007 +0000 - - * poppler/ABWOutputDev.cc: Replaces the getBiggestSeperator - function - at the ABWoutputdev with one that is easier to read/debug - and less likely to contain bugs. Some cosmetic fixes at the - functions recursiveXYC and splitnodes. Patch by - Jauco Noordzij <jauco.noordzij@gmail.com>. More info at - bug #11273 - - ChangeLog | 8 + - poppler/ABWOutputDev.cc | 384 - ++++++++++++------------------------------------ - 2 files changed, 106 insertions(+), 286 deletions(-) - -commit 7f23383197b0e2fa24be7b4925ea6f39eb95bbc1 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Jun 13 20:39:21 2007 +0000 - - * poppler/ABWOutputDev.cc - * poppler/ABWOutputDev.h: Remove dependency on debugxml. Patch - by - Jauco Noordzij <jauco.noordzij@gmail.com>. Fixes bug #11187 - - ChangeLog | 6 ++++ - poppler/ABWOutputDev.cc | 80 - ++++++++++++++++++++++++++++++++++++++++++++++++- - poppler/ABWOutputDev.h | 1 + - 3 files changed, 86 insertions(+), 1 deletion(-) - -commit 948520cd529ce47d1970aae6a0b8058128e37c30 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Jun 13 18:50:40 2007 +0000 - - * goo/FixedPoint.h - * goo/gmem.h - * poppler/SecurityHandler.h - * poppler/poppler-config.h.in - * utils/ImageOutputDev.h: - Patch by Axel Howind <Axel.Howind@htp-tel.de> - - include USE_EXCEPTIONS and USE_FIXEDPOINT in - poppler-config.h.in - - fix typo (MULTITHREADED/MULTITHREADING) in - poppler.config.h.in - - change installed headers to include poppler-config.h - instead of - config.h - - use <poppler/poppler-config.h> instead of <poppler-config.h> - so that - installed headers can be used without including - .../include/poppler - in the include path - - ChangeLog | 16 ++++++++++++++++ - goo/FixedPoint.h | 2 +- - goo/gmem.h | 2 +- - poppler/SecurityHandler.h | 2 +- - poppler/poppler-config.h.in | 12 +++++++++++- - utils/ImageOutputDev.h | 2 +- - 6 files changed, 31 insertions(+), 5 deletions(-) - -commit 825461e47b05595805e87a0d2960b07197c8da8b -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Jun 13 18:24:56 2007 +0000 - - configure.ac: Fix detection of glib - - ChangeLog | 4 ++++ - configure.ac | 2 +- - 2 files changed, 5 insertions(+), 1 deletion(-) - -commit a67a93fc6b4812a4f892b311c5b299e59283cd47 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Jun 11 21:14:22 2007 +0000 - - * poppler/CMap.h: - * poppler/CharCodeToUnicode.h: - * poppler/GlobalParams.h: - * poppler/PageLabelInfo.h: - * poppler/UnicodeMap.h: Further include cleanup. Patch by - Axel Howind - on bug #11228 - - ChangeLog | 9 +++++++++ - poppler/CMap.h | 2 +- - poppler/CharCodeToUnicode.h | 2 +- - poppler/GlobalParams.h | 2 +- - poppler/PageLabelInfo.h | 6 +++--- - poppler/UnicodeMap.h | 2 +- - 6 files changed, 16 insertions(+), 7 deletions(-) - -commit 051b31af053cac4727718169b79b25451a4bdd95 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Jun 11 21:11:05 2007 +0000 - - * qt/poppler-qt.h - * qt4/src/poppler-qt4.h: Headers cleanup - - ChangeLog | 5 +++++ - qt/poppler-qt.h | 6 +++--- - qt4/src/poppler-qt4.h | 8 ++++---- - 3 files changed, 12 insertions(+), 7 deletions(-) - -commit 3e1597b80fc6750f1ec3269f9819aa8225879524 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Jun 8 22:39:23 2007 +0000 - - poppler/Annot.cc: Fix leak - - ChangeLog | 4 ++++ - poppler/Annot.cc | 1 + - 2 files changed, 5 insertions(+) - -commit 49535c20b4f71d1c1381134233e2e1449cf560c0 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Thu Jun 7 21:23:03 2007 +0000 - - 2007-06-07 Jeff Muizelaar <jeff@infidigm.net> - - * poppler/ABWOutputDev.cc: Change "and", "or", "not" to "&&", - "||", - "!" for consistency with the rest of the code. Patch by - Jens Granseuer - - ChangeLog | 5 +++ - poppler/ABWOutputDev.cc | 93 - +++++++++++++++++++++++++------------------------ - 2 files changed, 52 insertions(+), 46 deletions(-) - -commit dd8fa975bf51dd18120369d0ef2d8f1781e04d93 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Jun 2 09:18:11 2007 +0000 - - correct form of patch 11102 - - utils/HtmlFonts.cc | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -commit cdf70857ece0748f13b11c923ccf9626094555b4 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Jun 1 18:34:48 2007 +0000 - - * poppler/ArthurOutputDev.cc - * splash/SplashFTFont.cc - * splash/SplashMath.h: Make it compile with - --enable-fixedpoint. Fixes - bug 11110 - - ChangeLog | 7 +++++++ - poppler/ArthurOutputDev.cc | 8 ++++---- - splash/SplashFTFont.cc | 8 ++++---- - splash/SplashMath.h | 2 +- - 4 files changed, 16 insertions(+), 9 deletions(-) - -commit 90b1a404629a884cc32737a3a729c9a75f7a59c1 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed May 30 18:33:24 2007 +0000 - - * configure.ac: Fix to check for glib-2.0 not glib that is - 1.0. Patch - came though Pardus developers and they don't remember where - they got - it from. - - ChangeLog | 6 ++++++ - configure.ac | 2 +- - 2 files changed, 7 insertions(+), 1 deletion(-) - -commit 03d766ea1ddd4ce6d938f96b53906a7dc8bd179a -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed May 30 18:29:57 2007 +0000 - - make dist needs this - - qt4/src/Makefile.am | 2 ++ - 1 file changed, 2 insertions(+) - -commit d540c04268047fdd125ad932ca05c7553a97c0fe -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed May 30 17:50:00 2007 +0000 - - * utils/HtmlFonts.cc: Make pdftohtml not pollute stdout. Patch - by - Nanning Buitenhuis <nanning@elvenkind.com> - - And some changes in glib/reference/tmpl - - ChangeLog | 5 + - glib/reference/tmpl/poppler-document.sgml | 4 + - glib/reference/tmpl/poppler-enums.sgml | 150 - ++++++++++++++++++++++++++++++ - glib/reference/tmpl/poppler-page.sgml | 5 +- - glib/reference/tmpl/poppler-unused.sgml | 130 - -------------------------- - utils/HtmlFonts.cc | 2 +- - 6 files changed, 162 insertions(+), 134 deletions(-) - -commit ce414f2a36f4d97a3bddfd42baabdc1e34bf9321 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Tue May 29 22:01:58 2007 +0000 - - 2007-05-29 Kristian Høgsberg <krh@redhat.com> - - * poppler/gen-unicode-tables.py: Add this script to fix - distcheck. - - ChangeLog | 4 ++++ - poppler/gen-unicode-tables.py | 38 ++++++++++++++++++++++++++++++++++++++ - 2 files changed, 42 insertions(+) - -commit 97e602752b05f3690acb1821bdca31c5771361e1 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun May 27 11:24:40 2007 +0000 - - 2007-05-27 Carlos Garcia Campos <carlosgc@gnome.org> - * glib/test-poppler-glib.c: Add forms test - * glib/poppler-page.cc: - * glib/poppler-page.h: - Fix indentation, some code cleanups and memory leaks. - - ChangeLog | 7 ++ - glib/poppler-page.cc | 198 - ++++++++++++++++++++++++++++------------------- - glib/poppler-page.h | 6 +- - glib/test-poppler-glib.c | 39 ++++++++++ - 4 files changed, 168 insertions(+), 82 deletions(-) - -commit 3d31c2b1ea913fc80211f1c6fed9b3666f124049 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Sun May 27 10:12:56 2007 +0000 - - 2007-05-27 Carlos Garcia Campos <carlosgc@gnome.org> - * glib/poppler-page.cc: - * glib/poppler-page.h: - Add missing image mapping type definition. - - ChangeLog | 6 ++++++ - glib/poppler-page.cc | 48 - +++++++++++++++++++++++++++++++++++++++++++++--- - glib/poppler-page.h | 5 +++++ - 3 files changed, 56 insertions(+), 3 deletions(-) - -commit 8284a769568322066a9d4626bd9b2cf3d18a6487 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat May 26 23:20:12 2007 +0000 - - * configure.ac: - * NEWS: Bump release to 0.5.9 (0.6 Release Candidate) - - ChangeLog | 2 ++ - NEWS | 15 +++++++++++++++ - configure.ac | 2 +- - 3 files changed, 18 insertions(+), 1 deletion(-) - -commit e6ff9e0d95e058f6aff3c72d5f4d7d7ccf661999 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat May 26 22:33:21 2007 +0000 - - * poppler-qt.pc.in: - * poppler-qt4.pc.in: - * qt/Makefile.am: - * qt4/src/Makefile.am: Install qt3 and qt4 headers in - separate dirs. - That way be can reuse poppler-page-transition.h and distros - don't get - conflicts when making separate qt3 and qt4 packages - - ChangeLog | 9 +++++++++ - poppler-qt.pc.in | 2 +- - poppler-qt4.pc.in | 2 +- - qt/Makefile.am | 2 +- - qt4/src/Makefile.am | 2 +- - 5 files changed, 13 insertions(+), 4 deletions(-) - -commit fefefe495a182c1745314186b99441b9e76ba5b4 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri May 25 23:17:58 2007 +0000 - - * qt4/src/poppler-link-extractor-private.cc: - * qt4/src/poppler-link-extractor-private.h: - * qt4/src/poppler-link.cc: - * qt4/src/poppler-link.h: Return link coordinates in 0..1 - range - instead of 0..size, much more easier to do user<->dev - transformations - * qt4/src/poppler-private.h: Fix indentation - - ChangeLog | 6 ++++++ - qt4/src/poppler-link-extractor-private.h | 1 + - qt4/src/poppler-link-extractor.cc | 12 ++++++------ - qt4/src/poppler-link.cc | 25 +++++++++++++++---------- - qt4/src/poppler-link.h | 7 ++++++- - qt4/src/poppler-private.h | 15 ++++++++------- - 6 files changed, 42 insertions(+), 24 deletions(-) - -commit ecaeaa9512d1dae4a036703ea8739102a8e463f0 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri May 25 22:30:20 2007 +0000 - - * qt4/src/poppler-link-extractor.cc: Use correct page box - to extract - link clickable area - - ChangeLog | 5 +++++ - qt4/src/poppler-link-extractor.cc | 2 +- - 2 files changed, 6 insertions(+), 1 deletion(-) - -commit 774a9456c668ef70b2e8f17d59f8f427aa97bad5 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Fri May 25 18:43:04 2007 +0000 - - 2007-05-25 Jeff Muizelaar <jeff@infidigm.net> - - * poppler/GfxFont.cc: - * poppler/GfxFont.h: - * poppler/GlobalParams.cc: - Don't cache DisplayFontParams by font name, instead cache them - in GfxFont. Fixes #8140. - - ChangeLog | 8 ++++++++ - poppler/GfxFont.cc | 2 ++ - poppler/GfxFont.h | 6 ++++++ - poppler/GlobalParams.cc | 4 ++-- - 4 files changed, 18 insertions(+), 2 deletions(-) - -commit a88fadf0bb9af55c83c9c4f7d08deb17d6aa9ae4 -Author: Carlos Garcia Campos <carlosgc@gnome.org> -Date: Fri May 25 17:33:37 2007 +0000 - - 2007-05-25 Carlos Garcia Campos <carlosgc@gnome.org> - * glib/poppler-page.cc: - * glib/poppler-page.h: - * glib/poppler.h: - Add selection style parameter to render_selection in order - to allow - requesting selections of words and paragraphs. - - ChangeLog | 8 ++++++++ - glib/poppler-page.cc | 30 ++++++++++++++++-------------- - glib/poppler-page.h | 6 ++++-- - glib/poppler.h | 7 +++++++ - 4 files changed, 35 insertions(+), 16 deletions(-) - -commit bf195b489c22875695e202d6ca6659144ef57e61 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed May 23 21:20:58 2007 +0000 - - * qt4/src/poppler-document.cc: - * qt4/src/poppler-private.h: - Better handle the setting of the vector antialiasing for - Splash. - * qt4/src/Mainpage.dox: - * qt4/src/poppler-link.h: - * qt4/src/poppler-qt4.h: - A few of API documentation fixes and improvements. - - ChangeLog | 10 ++++++++ - qt4/src/Mainpage.dox | 8 ++----- - qt4/src/poppler-document.cc | 5 ++-- - qt4/src/poppler-link.h | 4 +++- - qt4/src/poppler-private.h | 1 + - qt4/src/poppler-qt4.h | 57 - ++++++++++++++++++++++++++++++--------------- - 6 files changed, 57 insertions(+), 28 deletions(-) - -commit 36d1fe292778ba29990a389c50a0df0d51f11913 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon May 21 21:42:38 2007 +0000 - - Fix assert in bug 11023 - - ChangeLog | 4 ++++ - glib/poppler-action.cc | 2 +- - 2 files changed, 5 insertions(+), 1 deletion(-) - -commit 5b411246a2cce6ed3bb2d8c9e9d856227b6aba7f -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon May 21 21:39:08 2007 +0000 - - * glib/poppler-page.cc: - * glib/poppler-page.h: - poppler_page_render_section() for cairo. Bug 7023 - - ChangeLog | 6 ++++ - glib/poppler-page.cc | 88 - ++++++++++++++++++++++++++++++++++++++++++++++------ - glib/poppler-page.h | 9 ++++++ - 3 files changed, 93 insertions(+), 10 deletions(-) - -commit 409f2a9cb31add29accb87011331c50dc08110cd -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon May 21 21:35:10 2007 +0000 - - * glib/poppler-page.cc: - * glib/poppler-page.h: - * glib/poppler-private.h: - * glib/poppler.h: - * glib/test-poppler-glib.c: - * poppler/CairoOutputDev.cc: - * poppler/CairoOutputDev.h: Extend CairoOutputdev to do - image caching when rendering - - ChangeLog | 11 +++ - glib/poppler-page.cc | 161 ++++++++++++++++++++++++++++++++-- - glib/poppler-page.h | 10 +++ - glib/poppler-private.h | 3 + - glib/poppler.h | 9 +- - glib/test-poppler-glib.c | 27 +++++- - poppler/CairoOutputDev.cc | 215 - ++++++++++++++++++++++++++++++++++++++++++++++ - poppler/CairoOutputDev.h | 122 ++++++++++++++++++++++++++ - 8 files changed, 545 insertions(+), 13 deletions(-) - -commit afd11ec66430dae084b5a5560333e933460fc637 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon May 21 21:29:09 2007 +0000 - - * poppler/Annot.cc: avoid crashing if the font for the - drawing methods - can not be found - * poppler/Form.cc: fix memory leak - * qt4/src/poppler-private.h: fix the UnicodeParsedString - function to - really work and not crash - * splash/SplashTypes.h: RGB8X mode makes max number of - components in - any SplashColor always be 4 - - ChangeLog | 11 +++++++++++ - poppler/Annot.cc | 6 ++++++ - poppler/Form.cc | 1 + - qt4/src/poppler-private.h | 5 ++++- - splash/SplashTypes.h | 6 +----- - 5 files changed, 23 insertions(+), 6 deletions(-) - -commit f019c8a8efde004e1663ea88cb48c0e46318d936 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu May 17 21:32:57 2007 +0000 - - 2007-05-17 Pino Toscano <pino@kde.org> - - * qt4/src/poppler-link.cc: - Give some default values to LinkDestination - * qt4/src/poppler-private.h: - Fix memory leak when converting QString -> GooString - - ChangeLog | 7 +++++++ - qt4/src/poppler-link.cc | 12 ++++++++++++ - qt4/src/poppler-private.h | 4 +++- - 3 files changed, 22 insertions(+), 1 deletion(-) - -commit d68a4eb44b5390b3093774f39a6805ad2e95c146 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Sun May 13 00:53:43 2007 +0000 - - 2007-05-12 Jeff Muizelaar <jeff@infidigm.net> - - * poppler/Annot.cc: Only do appearance generation for text, - choice or - other fields that contain text. Patch by Julien Rebetez. - - ChangeLog | 5 +++++ - poppler/Annot.cc | 52 - ++++++++++++++++++++++++++++++++++++++++++++++------ - 2 files changed, 51 insertions(+), 6 deletions(-) - -commit 96f8731e90af1abce67d00a3febc11880c69ce62 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon May 7 18:41:09 2007 +0000 - - * Catalog.cc: Fix leak - * Form.cc: Fix leak, provide empty - FormPageWidgets::~FormPageWidgets - implementation - * Page.cc: Fix leak - - ChangeLog | 7 +++++++ - poppler/Catalog.cc | 1 + - poppler/Form.cc | 5 +++++ - poppler/Page.cc | 1 + - 4 files changed, 14 insertions(+) - -commit d46553d696b2d7fe416ce8db40db54dd1d7c6733 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Apr 30 22:34:21 2007 +0000 - - * poppler/Makefile.am: Don't link cairo to all poppler, - just to - poppler_cairo so when compiling the qt frontend and the - glib frontend - the qt one does not end up depending on cairo - - ChangeLog | 6 ++++++ - poppler/Makefile.am | 1 - - 2 files changed, 6 insertions(+), 1 deletion(-) - -commit d5c52409c532a126bcb8eb65f6f1390113a5f258 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Apr 29 17:37:38 2007 +0000 - - jeff committed this line by mistake - - ChangeLog | 1 - - 1 file changed, 1 deletion(-) - -commit 6ddc11ef4c534369ee104422bfb989603c466790 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Sun Apr 29 17:33:58 2007 +0000 - - 2007-04-29 Jeff Muizelaar <jeff@infidigm.net> - - * poppler/UnicodeTypeTable.cc: Make some of the unicode - tables const - which gets rid of about 20k of data. - - text data bss dec hex filename - before: 1415838 128864 8 1544710 179206 libpoppler.so - after: 1404574 140128 8 1544710 179206 libpoppler.so - - ChangeLog | 10 ++++++++++ - poppler/UnicodeTypeTable.cc | 24 ++++++++++++------------ - 2 files changed, 22 insertions(+), 12 deletions(-) - -commit c5613ab5ce65fc84eb3a5584cee1454171173fa7 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Apr 28 23:25:59 2007 +0000 - - * poppler/SplashOutputDev.cc: - * qt/poppler-private.h: - * qt4/src/poppler-private.h: - * splash/Splash.cc: - * splash/SplashBitmap.cc: - * splash/SplashTypes.h: Rename splashModeRGBX8 to - splashModeXBGR8 and - hopefully fix qt frontends image generation - - ChangeLog | 10 +++++ - poppler/SplashOutputDev.cc | 102 - +++++++++++++++++++++++++++++++++------------ - qt/poppler-private.h | 2 +- - qt4/src/poppler-private.h | 2 +- - splash/Splash.cc | 44 +++++++++---------- - splash/SplashBitmap.cc | 16 +++---- - splash/SplashTypes.h | 4 +- - 7 files changed, 120 insertions(+), 60 deletions(-) - -commit 6479ce224f1393235ca9888dfe0710327fbfccd2 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Apr 28 22:12:22 2007 +0000 - - fix merging problems - - splash/Splash.cc | 1 + - splash/SplashBitmap.cc | 1 - - 2 files changed, 1 insertion(+), 1 deletion(-) - -commit e2ac4ada3e29139053871ff7f53772e1ccc7adc0 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Apr 28 15:39:36 2007 +0000 - - \n at the end of the printf - Although i'm not sure we want to printf this... - - poppler/GlobalParams.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 9b8133940638c95940edcb9b98126ca9a4f7b8d4 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Apr 28 12:00:38 2007 +0000 - - * qt4/src/Makefile.am: - * qt4/src/poppler-document.cc: - * qt4/src/poppler-ps-converter.cc: - * qt4/src/poppler-qt4.h: Replace Document::print function - with lots of - arguments with a helper class with lots of functions. Will - help - mantaining BC in case we decide to add more functionality - to the - printing process. - - ChangeLog | 10 +++ - qt4/src/Makefile.am | 1 + - qt4/src/poppler-document.cc | 39 ++------- - qt4/src/poppler-ps-converter.cc | 190 - ++++++++++++++++++++++++++++++++++++++++ - qt4/src/poppler-qt4.h | 119 +++++++++++++++++++++---- - 5 files changed, 307 insertions(+), 52 deletions(-) - -commit 26d5fefcd4c858e2ebd689d963a65773957ac808 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Apr 28 11:35:34 2007 +0000 - - * qt4/src/poppler-page.cc: - Hopefully fix the calculation of the image size when rendering - using - ArthurOutputDev. - - ChangeLog | 6 ++++++ - qt4/src/poppler-page.cc | 2 +- - 2 files changed, 7 insertions(+), 1 deletion(-) - -commit 218364bc4951682de8e63e1bd3f061636b08b615 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Apr 28 11:34:14 2007 +0000 - - * glib/poppler-document.h: - * poppler/FontInfo.h: - * qt/poppler-qt.h: - * qt4/src/poppler-qt4.h: GfxFontType changed, adapt enums - of the - frontends and helper classes. Forgot to do it before merging. - - ChangeLog | 8 ++++++++ - glib/poppler-document.h | 6 +++++- - poppler/FontInfo.h | 6 +++++- - qt/poppler-qt.h | 6 +++++- - qt4/src/poppler-qt4.h | 20 ++++++++++++-------- - 5 files changed, 35 insertions(+), 11 deletions(-) - -commit c1a40d3b4e9b27e34c94c9477a0313534563a394 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Apr 28 11:20:58 2007 +0000 - - * qt4/src/poppler-annotation.h: - Make the header clean. - - ChangeLog | 5 +++++ - qt4/src/poppler-annotation.h | 3 +++ - 2 files changed, 8 insertions(+) - -commit 3f4bf880b95e28a1ae7a38b18b341e089860780c -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Apr 28 11:16:49 2007 +0000 - - * qt4/src/Makefile.am: - * qt4/src/poppler-link-extractor-private.h: - * qt4/src/poppler-link-extractor.cc: - * qt4/src/poppler-page-private.h: - * qt4/src/poppler-page.cc: - * qt4/src/poppler-private.h: - * qt4/src/poppler-qt4.h: - Getting the links of a page now is not more dependant on - the current - output device, and can be done anytime; thus, the doLinks - parameter - of the Page::render() can be dropped. - - ChangeLog | 13 ++++++ - qt4/src/Makefile.am | 3 +- - qt4/src/poppler-link-extractor-private.h | 55 ++++++++++++++++++++++++ - qt4/src/poppler-link-extractor.cc | 74 - ++++++++++++++++++++++++++++++++ - qt4/src/poppler-page-private.h | 38 ++++++++++++++++ - qt4/src/poppler-page.cc | 52 ++++------------------ - qt4/src/poppler-private.h | 5 ++- - qt4/src/poppler-qt4.h | 4 +- - 8 files changed, 195 insertions(+), 49 deletions(-) - -commit 7f9eec9ef4e7dc895d2a3e38014b6368cc7564b6 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Apr 27 22:41:10 2007 +0000 - - 2007-04-28 Albert Astals Cid <aacid@kde.org> - - * qt4/*: Stop requyring users to declare UNSTABLE_POPPLER_QT4 - - ChangeLog | 4 ++++ - qt4/src/Doxyfile | 2 +- - qt4/src/Mainpage.dox | 3 +-- - qt4/src/poppler-document.cc | 2 -- - qt4/src/poppler-embeddedfile.cc | 2 -- - qt4/src/poppler-fontinfo.cc | 2 -- - qt4/src/poppler-form.cc | 1 - - qt4/src/poppler-link.cc | 2 -- - qt4/src/poppler-page.cc | 1 - - qt4/src/poppler-qt4.h | 3 --- - qt4/src/poppler-sound.cc | 2 -- - qt4/src/poppler-textbox.cc | 2 -- - qt4/tests/check_attachments.cpp | 1 - - qt4/tests/check_dateConversion.cpp | 1 - - qt4/tests/check_fonts.cpp | 1 - - qt4/tests/check_metadata.cpp | 1 - - qt4/tests/check_pagelayout.cpp | 1 - - qt4/tests/check_pagemode.cpp | 1 - - qt4/tests/check_permissions.cpp | 1 - - qt4/tests/poppler-attachments.cpp | 1 - - qt4/tests/poppler-fonts.cpp | 1 - - qt4/tests/stress-poppler-qt4.cpp | 1 - - qt4/tests/test-password-qt4.cpp | 1 - - qt4/tests/test-poppler-qt4.cpp | 1 - - 24 files changed, 6 insertions(+), 32 deletions(-) - -commit 45993a6faafd7646075bc6630d5d2ad7a44f7e20 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Apr 27 22:26:09 2007 +0000 - - 2007-04-28 Carlos Garcia Campos <carlosgc@gnome.org> - reviewed and some code by: Albert Astals Cid <aacid@kde.org> - - * glib/poppler-page.cc: - * glib/poppler-page.h: - * glib/poppler.h: - * glib/test-poppler-glib.c: - * poppler/Makefile.am: - * poppler/PageTransition.cc: - * poppler/PageTransition.h: - * qt/poppler-page-transition.cc: - * qt/poppler-page-transition.h: Move Page Transition parsing - from qt - frontends to poppler core. Expose Page transitions on the glib - frontend. - - ChangeLog | 15 ++++ - glib/poppler-page.cc | 122 ++++++++++++++++++++++++++ - glib/poppler-page.h | 111 ++++++++++++++---------- - glib/poppler.h | 58 +++++++++---- - glib/test-poppler-glib.c | 60 +++++++++++++ - poppler/Makefile.am | 2 + - poppler/PageTransition.cc | 197 - +++++++++++++++--------------------------- - poppler/PageTransition.h | 86 ++++++++++++++++++ - qt/poppler-page-transition.cc | 145 ++++++------------------------- - qt/poppler-page-transition.h | 9 +- - 10 files changed, 497 insertions(+), 308 deletions(-) - -commit 877d6b202a75eb12119b16e740f85cc8b477d589 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Apr 27 21:25:30 2007 +0000 - - * glib/poppler-page.cc: - * poppler/PSOutputDev.cc: - * poppler/PSOutputDev.h: - * qt/poppler-document.cc: - * qt4/src/poppler-document.cc: - * qt4/src/poppler-qt4.h: - * utils/pdftohtml.cc: - * utils/pdftops.cc: - Add option to force rasterizing the pages when printing them - Add functionality to output the title field on the PS file - Only Qt4 frontend exposes the functionality - - Bringing this features from KPDF 3.5.7 to poppler - Testers welcome - Patches for other frontends more than welcome - Comments and suggestions even more than welcome :-) - - ChangeLog | 14 +++++++++++++ - glib/poppler-page.cc | 3 ++- - poppler/PSOutputDev.cc | 48 - +++++++++++++++++++++++++++++++-------------- - poppler/PSOutputDev.h | 17 ++++++++++------ - qt/poppler-document.cc | 2 +- - qt4/src/poppler-document.cc | 9 +++++++-- - qt4/src/poppler-qt4.h | 2 +- - utils/pdftohtml.cc | 2 +- - utils/pdftops.cc | 2 +- - 9 files changed, 71 insertions(+), 28 deletions(-) - -commit 99053be5357235c47a87775985646ef8d9880ed9 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Apr 26 17:57:01 2007 +0000 - - * goo/Makefile.am: Remove duplicate gmem.h - - ChangeLog | 4 ++++ - goo/Makefile.am | 1 - - 2 files changed, 4 insertions(+), 1 deletion(-) - -commit f6adb46cd88d23b34f1918d3be31c05b68b6a443 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Apr 25 21:31:17 2007 +0000 - - ignore pdftoabw binary - - utils/.cvsignore | 1 + - 1 file changed, 1 insertion(+) - -commit e09f231ac6c03ac2c3606f1bf20ba1bde3d85abd -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Apr 25 21:25:06 2007 +0000 - - 2007-04-25 Albert Astals Cid <aacid@kde.org> - - * qt4/src/poppler-document.cc: remove a delete[] no longer - needed - * qt4/src/poppler-private: initilize m_hints - - ChangeLog | 5 +++++ - qt4/src/poppler-document.cc | 1 - - qt4/src/poppler-private.h | 1 + - 3 files changed, 6 insertions(+), 1 deletion(-) - -commit bf7e0e980bf29994021cb1228f89f582adddf284 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Apr 25 19:59:09 2007 +0000 - - Merge xpdf302branch in HEAD as noone vetoed it. - Testing more than welcome - - ChangeLog | 140 + - configure.ac | 4 + - fofi/FoFiTrueType.cc | 458 +++- - fofi/FoFiTrueType.h | 42 +- - fofi/FoFiType1.cc | 65 +- - fofi/FoFiType1C.cc | 590 +++-- - fofi/FoFiType1C.h | 7 +- - glib/poppler-action.cc | 12 +- - glib/poppler-document.cc | 5 +- - glib/poppler-page.cc | 8 +- - goo/FixedPoint.cc | 31 +- - goo/FixedPoint.h | 5 + - goo/GooString.cc | 444 +++- - goo/GooString.h | 41 +- - goo/Makefile.am | 2 +- - goo/gfile.cc | 54 +- - goo/{gmem.c => gmem.cc} | 126 +- - goo/gmem.h | 27 +- - poppler/ABWOutputDev.cc | 1 - - poppler/ABWOutputDev.h | 1 - - poppler/Annot.cc | 1685 +++++++++--- - poppler/Annot.h | 83 +- - poppler/ArthurOutputDev.cc | 13 +- - poppler/Catalog.cc | 79 +- - poppler/Catalog.h | 16 +- - poppler/CharCodeToUnicode.cc | 31 +- - poppler/DCTStream.cc | 2 +- - poppler/DCTStream.h | 4 +- - poppler/Decrypt.cc | 427 ++- - poppler/Decrypt.h | 54 +- - poppler/Dict.cc | 23 +- - poppler/Dict.h | 27 +- - poppler/FontInfo.cc | 1 - - poppler/Form.cc | 19 +- - poppler/Form.h | 2 +- - poppler/Function.cc | 65 +- - poppler/Function.h | 8 +- - poppler/Gfx.cc | 1247 ++++++--- - poppler/Gfx.h | 39 +- - poppler/GfxFont.cc | 45 +- - poppler/GfxFont.h | 7 +- - poppler/GfxState.cc | 209 +- - poppler/GfxState.h | 42 +- - poppler/GlobalParams.cc | 399 ++- - poppler/GlobalParams.h | 41 +- - poppler/JBIG2Stream.cc | 96 +- - poppler/JBIG2Stream.h | 4 +- - poppler/JPXStream.cc | 246 +- - poppler/JPXStream.h | 8 +- - poppler/Lexer.cc | 18 +- - poppler/Link.cc | 150 +- - poppler/Link.h | 49 +- - poppler/Makefile.am | 4 +- - poppler/Object.cc | 5 +- - poppler/Object.h | 29 +- - poppler/Outline.cc | 1 - - poppler/OutputDev.cc | 2 + - poppler/OutputDev.h | 62 +- - poppler/PDFDoc.cc | 100 +- - poppler/PDFDoc.h | 21 +- - poppler/PSOutputDev.cc | 2715 ++++++++++++++----- - poppler/PSOutputDev.h | 58 +- - poppler/PSTokenizer.cc | 2 +- - poppler/Page.cc | 227 +- - poppler/Page.h | 22 +- - poppler/PageLabelInfo.cc | 1 - - poppler/Parser.cc | 66 +- - poppler/Parser.h | 11 +- - poppler/PreScanOutputDev.cc | 255 ++ - poppler/PreScanOutputDev.h | 128 + - poppler/SecurityHandler.cc | 17 +- - poppler/SecurityHandler.h | 5 + - poppler/SplashOutputDev.cc | 1480 ++++++----- - poppler/SplashOutputDev.h | 41 +- - poppler/Stream.cc | 338 +-- - poppler/Stream.h | 39 +- - poppler/TextOutputDev.cc | 537 +++- - poppler/TextOutputDev.h | 77 +- - poppler/UGooString.cc | 182 -- - poppler/UGooString.h | 79 - - poppler/XRef.cc | 29 +- - poppler/XRef.h | 6 +- - qt/poppler-document.cc | 15 +- - qt/poppler-page-transition.cc | 1 - - qt/poppler-page.cc | 4 +- - qt/poppler-private.h | 72 +- - qt4/src/poppler-annotation-helper.h | 38 +- - qt4/src/poppler-document.cc | 7 +- - qt4/src/poppler-embeddedfile.cc | 6 +- - qt4/src/poppler-form.cc | 12 +- - qt4/src/poppler-page.cc | 8 +- - qt4/src/poppler-private.h | 76 +- - splash/Splash.cc | 4994 - ++++++++++++++++++----------------- - splash/Splash.h | 137 +- - splash/SplashBitmap.cc | 110 +- - splash/SplashBitmap.h | 10 +- - splash/SplashClip.cc | 276 +- - splash/SplashClip.h | 28 +- - splash/SplashFTFont.cc | 104 +- - splash/SplashFTFont.h | 5 +- - splash/SplashFTFontEngine.cc | 54 +- - splash/SplashFTFontEngine.h | 9 +- - splash/SplashFTFontFile.cc | 19 +- - splash/SplashFTFontFile.h | 9 +- - splash/SplashFont.cc | 6 +- - splash/SplashFont.h | 13 +- - splash/SplashFontEngine.cc | 72 +- - splash/SplashFontEngine.h | 11 +- - splash/SplashFontFile.cc | 1 - - splash/SplashFontFile.h | 2 +- - splash/SplashMath.h | 15 +- - splash/SplashPath.cc | 42 +- - splash/SplashPath.h | 31 +- - splash/SplashPattern.cc | 28 - - splash/SplashPattern.h | 25 - - splash/SplashScreen.cc | 304 ++- - splash/SplashScreen.h | 18 +- - splash/SplashState.cc | 63 +- - splash/SplashState.h | 14 +- - splash/SplashT1Font.cc | 101 +- - splash/SplashT1Font.h | 6 +- - splash/SplashT1FontEngine.cc | 4 +- - splash/SplashT1FontFile.cc | 9 +- - splash/SplashT1FontFile.h | 7 +- - splash/SplashTypes.h | 72 +- - splash/SplashXPath.cc | 353 +-- - splash/SplashXPath.h | 26 +- - splash/SplashXPathScanner.cc | 143 + - splash/SplashXPathScanner.h | 13 + - utils/HtmlOutputDev.cc | 15 +- - utils/HtmlOutputDev.h | 15 +- - utils/pdffonts.cc | 15 +- - utils/pdfinfo.cc | 21 +- - utils/pdftoabw.cc | 1 - - utils/pdftohtml.cc | 3 +- - utils/pdftoppm.cc | 8 + - utils/pdftops.cc | 8 +- - utils/pdftotext.cc | 1 - - 138 files changed, 14350 insertions(+), 6851 deletions(-) - -commit ba74bb3b0632593d1937911d73709fc870480efd -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Apr 16 21:25:46 2007 +0000 - - * qt4/src/poppler-private.h: - Add the information about the open/close item in the DOM tree - of the TOC. - - ChangeLog | 7 +++++++ - qt4/src/poppler-private.h | 5 ++++- - 2 files changed, 11 insertions(+), 1 deletion(-) - -commit 6c7969f37c85f326327aca98e0346f2ebc86ffda -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Apr 14 23:19:46 2007 +0000 - - * utils/HtmlFonts.cc: Fix rendering of text colors on - complex mode. - * utils/pdftohtml.cc: Fix rendering of links. - - ChangeLog | 5 +++++ - utils/HtmlFonts.cc | 8 ++++---- - utils/pdftohtml.cc | 2 +- - 3 files changed, 10 insertions(+), 5 deletions(-) - -commit add8515d7b3fba59c20ed1bbb058cea9e138c1a8 -Author: Brad Hards <bradh@frogmouth.net> -Date: Sat Apr 14 07:29:04 2007 +0000 - - Not sure what this was intended to do, but it triggers a lot of - problems with the unit tests (essentially, duplicate delete's). - - CCMAIL: aacid@kde.org - - qt4/src/poppler-embeddedfile.cc | 1 - - 1 file changed, 1 deletion(-) - -commit f3ded10305f6ac682640c37c21f569db0f830756 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Sat Apr 7 21:12:35 2007 +0000 - - 2007-04-07 Jeff Muizelaar <jeff@infidigm.net> - - * utils/pdftoabw.cc: Fixing passing the wrong type - to fprintf. Patch by Kouhei Sutou. Fixes #10554. - - ChangeLog | 5 +++++ - utils/pdftoabw.cc | 2 +- - 2 files changed, 6 insertions(+), 1 deletion(-) - -commit 2fcb76df955c143153fe4b273d0388fcb7f67d8a -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Fri Apr 6 15:27:52 2007 +0000 - - 2007-04-06 Jeff Muizelaar <jeff@infidigm.net> - - * poppler/ABWOutputDev.cc: - * utils/pdftoabw.cc: Fix a number of issues with the new - AbiWord code: - *) Allows you to save to a file other than stdout - *) Checks for error conditions when reading the PDF - doc and - writing the ABW doc - *) Removes dead code in pdftoabw.cc - *) Fixes a SEGV I encountered when converting my - new home's floor plan - *) Returns proper error conditions should the - conversion fail for any reason - Patch by Dominic Lachowicz - - ChangeLog | 12 ++++++ - poppler/ABWOutputDev.cc | 3 ++ - utils/pdftoabw.cc | 101 - ++++++++++++++++++++++++++++-------------------- - 3 files changed, 74 insertions(+), 42 deletions(-) - -commit 29da65ec48b5ba91139084e197ce457d3cff3732 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Apr 5 12:13:51 2007 +0000 - - * poppler/PSOutputDev.cc: Readd code wrongly removed when doing the - GlobalParams cleaning - - ChangeLog | 5 +++++ - poppler/PSOutputDev.cc | 5 +++++ - 2 files changed, 10 insertions(+) - -commit 722b2bd86f58f2d7a914571cccfa195485a70c47 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Wed Apr 4 02:42:29 2007 +0000 - - 2007-04-03 Jeff Muizelaar <jeff@infidigm.net> - - * configure.ac: - * poppler/ABWOutputDev.cc: - * poppler/ABWOutputDev.h: - * poppler/Makefile.am: - * utils/Makefile.am: - * utils/pdftoabw.cc: Add AbiWord output device and pdftoabw - program. - Patch by Jauco Noordzij. Autotools stuff by Dominic Lachowicz. - - ChangeLog | 10 + - configure.ac | 15 + - poppler/ABWOutputDev.cc | 1286 - +++++++++++++++++++++++++++++++++++++++++++++++ - poppler/ABWOutputDev.h | 140 ++++++ - poppler/Makefile.am | 17 + - utils/Makefile.am | 16 +- - utils/pdftoabw.cc | 138 +++++ - 7 files changed, 1620 insertions(+), 2 deletions(-) - -commit c9b467da290476da5ebbe8dc25699cd25e589b57 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Mar 22 20:56:24 2007 +0000 - - * poppler/Gfx.cc: Accept reals for width and height of - images. Fixes - KDE bug 143322 - - ChangeLog | 5 +++++ - poppler/Gfx.cc | 14 ++++++++++---- - 2 files changed, 15 insertions(+), 4 deletions(-) - -commit ff8f8d44ef47a98f7dbdfaa4d27a720b1f37015f -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Mar 15 20:16:13 2007 +0000 - - * glib/Makefile.am: Make it build with BSD/Make. Patch by - Henry Precheur <henry@precheur.org> - - ChangeLog | 5 +++++ - glib/Makefile.am | 4 ++-- - 2 files changed, 7 insertions(+), 2 deletions(-) - -commit bbf7e78b6b2509ecdc476d7f55151ef327470d9d -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Mar 7 19:15:32 2007 +0000 - - 2007-03-07 Carlos Garcia Campos <carlosgc@gnome.org> - reviewed by: Albert Astals Cid <aacid@kde.org> - - * poppler/Page.cc: Consider 0x0 boxes as invalid. Fixes - http://bugzilla.gnome.org/show_bug.cgi?id=408682 - - 2007-03-06 Pino Toscano <pino@kde.org> - reviewed by: Albert Astals Cid <aacid@kde.org> - - * configure.ac: - * qt/Makefile.am: - * qt/poppler-link.cc: - * qt/poppler-page.cc: - * qt/poppler-private.h: - * qt4/poppler-link.cc: - Make the Qt4 frontend compilable again with no Splash. - Make the Qt3 frontend compilable with no Splash. - - ChangeLog | 18 ++++++++++++++++++ - configure.ac | 12 +----------- - poppler/Page.cc | 7 ++++++- - qt/Makefile.am | 1 - - qt/poppler-link.cc | 4 +++- - qt/poppler-page.cc | 16 +++++++++++++++- - qt/poppler-private.h | 11 ++++++++++- - qt4/src/poppler-link.cc | 10 ++++++---- - 8 files changed, 59 insertions(+), 20 deletions(-) - -commit 08dcc7121450cbfa163254001e73bb6a2670e055 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Mar 6 22:27:18 2007 +0000 - - * poppler/Annot.cc: - * poppler/Form.cc: - Fix uninitialized variables. - Properly escape parenthesis and slash in text field - - ChangeLog | 9 ++++++++- - poppler/Annot.cc | 3 +++ - poppler/Form.cc | 1 + - 3 files changed, 12 insertions(+), 1 deletion(-) - -commit e8d3b21d08a59ec8b62503b48504fe046d746bfa -Author: Brad Hards <bradh@frogmouth.net> -Date: Sun Mar 4 07:30:31 2007 +0000 - - Switch to using pkg-config to find Qt4. - - ChangeLog | 9 +++ - configure.ac | 36 +++++------ - m4/qt.m4 | 165 - -------------------------------------------------- - poppler/Makefile.am | 2 +- - qt4/src/Makefile.am | 3 +- - qt4/tests/Makefile.am | 21 +++---- - 6 files changed, 36 insertions(+), 200 deletions(-) - -commit bd99616b9c06f96beadb68e015d2904b7fe2df1d -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Feb 25 00:34:21 2007 +0000 - - 007-02-25 Julien Rebetez <julienr@svn.gnome.org> - - reviewed by: Albert Astals Cid <aacid@kde.org> - - * poppler/Annot.cc: - * poppler/Annot.h: - * poppler/Form.cc: - * poppler/Form.h: - Fix compilation warnings. - - ChangeLog | 10 ++++++++++ - poppler/Annot.cc | 30 +++++++++++++++++------------- - poppler/Annot.h | 5 ++++- - poppler/Form.cc | 37 ++++++++++++++----------------------- - poppler/Form.h | 13 ++++++------- - 5 files changed, 51 insertions(+), 44 deletions(-) - -commit d8d23b56332618d8c7d8198f55ec6efafd24187e -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Feb 25 00:00:20 2007 +0000 - - forgot to commit these - - qt4/src/poppler-form.cc | 284 - ++++++++++++++++++++++++++++++++++++++++++++++++ - qt4/src/poppler-form.h | 247 +++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 531 insertions(+) - -commit 984ce7f919aec27d5f4225376550cd6b58d4ae52 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Feb 24 23:58:31 2007 +0000 - - 2007-02-25 Pino Toscano <pino@kde.org> - reviewed by: Albert Astals Cid <aacid@kde.org> - - * qt4/src/Doxyfile: - * qt4/src/Makefile.am: - * qt4/src/poppler-annotation-helper.h: - * qt4/src/poppler-form.cc: - * qt4/src/poppler-form.h: - * qt4/src/poppler-page.cc: - * qt4/src/poppler-private.h: - * qt4/src/poppler-qt4.h: - Beginning of interactive forms support, first - implementation in the - Qt4 frontend. It supports text and choice fields in - a basic way. - - ChangeLog | 14 ++++++++++ - qt4/src/Doxyfile | 1 + - qt4/src/Makefile.am | 2 ++ - qt4/src/poppler-annotation-helper.h | 18 ++++++------- - qt4/src/poppler-page.cc | 36 +++++++++++++++++++++++++ - qt4/src/poppler-private.h | 52 - ++++++++++++++++++++++++++++++++++++- - qt4/src/poppler-qt4.h | 7 +++++ - 7 files changed, 120 insertions(+), 10 deletions(-) - -commit de7a90fc724de14151ec994d18f860ada3be2ac8 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Feb 24 23:43:34 2007 +0000 - - 2007-02-25 Albert Astals Cid <aacid@kde.org> - - * configure.ac: - * glib/poppler-document.cc: - * poppler/GlobalParams.cc: - * poppler/GlobalParams.h: - * poppler/PSOutputDev.cc: - * qt/poppler-document.cc: - * qt4/src/poppler-document.cc: - * qt4/src/poppler-private.h: - * qt4/src/poppler-qt4.h: - * test/gtk-splash-test.cc: - * test/pdf-inspector.cc: - * utils/pdffonts.cc: - * utils/pdfimages.cc: - * utils/pdfinfo.cc: - * utils/pdftohtml.cc: - * utils/pdftoppm.cc: - * utils/pdftops.cc: - * utils/pdftotext.cc: Remove dependency on xpdfrc file - and cleanup - GlobalParams accordingly - - ChangeLog | 22 ++ - configure.ac | 1 - - glib/poppler-document.cc | 4 +- - poppler/GlobalParams.cc | 666 - +------------------------------------------- - poppler/GlobalParams.h | 59 +--- - poppler/PSOutputDev.cc | 8 - - qt/poppler-document.cc | 4 +- - qt4/src/poppler-document.cc | 2 +- - qt4/src/poppler-private.h | 2 +- - qt4/src/poppler-qt4.h | 6 +- - test/gtk-splash-test.cc | 2 +- - test/pdf-inspector.cc | 2 +- - utils/pdffonts.cc | 5 +- - utils/pdfimages.cc | 5 +- - utils/pdfinfo.cc | 5 +- - utils/pdftohtml.cc | 2 +- - utils/pdftoppm.cc | 15 +- - utils/pdftops.cc | 50 ++-- - utils/pdftotext.cc | 5 +- - 19 files changed, 72 insertions(+), 793 deletions(-) - -commit 74e70386b759a3cd9864d11eb4ca210010136aa5 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Feb 24 23:32:22 2007 +0000 - - 2007-02-25 Julien Rebetez <julienr@svn.gnome.org> - reviewed by: <aacid@kde.org> - - * glib/poppler-document.cc: - * glib/poppler-document.h: - * glib/poppler-page.cc: - * glib/poppler-page.h: - * glib/poppler-private.h: - * glib/poppler.h: - * poppler/Annot.cc: - * poppler/Annot.h: - * poppler/Catalog.cc: - * poppler/Catalog.h: - * poppler/CharCodeToUnicode.cc: - * poppler/CharCodeToUnicode.h: - * poppler/Dict.cc: - * poppler/Dict.h: - * poppler/Form.cc: - * poppler/Form.h: - * poppler/GfxFont.cc: - * poppler/GfxFont.h: - * poppler/Makefile.am: - * poppler/Object.h: - * poppler/Page.cc: - * poppler/Page.h: - * poppler/XRef.cc: - * poppler/XRef.h: - Beginning of Interactive Form support: - Add a bunch of new classes (FormWidget / FormField) - to deal with form - fields. - Add support for object modification through - XRef::setModifiedObject, as - well as a function to write the Xref to a file, - which will be used - to implement PDF writing. - Add some functions to glib wrapper to expose the - new form features. - - ChangeLog | 35 ++ - glib/poppler-document.cc | 192 +++++++ - glib/poppler-document.h | 55 ++ - glib/poppler-page.cc | 120 +++++ - glib/poppler-page.h | 55 ++ - glib/poppler-private.h | 4 + - glib/poppler.h | 15 +- - poppler/Annot.cc | 344 +++++++++--- - poppler/Annot.h | 21 +- - poppler/Catalog.cc | 17 +- - poppler/Catalog.h | 4 + - poppler/CharCodeToUnicode.cc | 34 ++ - poppler/CharCodeToUnicode.h | 3 + - poppler/Dict.cc | 32 ++ - poppler/Dict.h | 4 + - poppler/Form.cc | 1187 - ++++++++++++++++++++++++++++++++++++++++++ - poppler/Form.h | 470 +++++++++++++++++ - poppler/GfxFont.cc | 27 + - poppler/GfxFont.h | 5 + - poppler/Makefile.am | 2 + - poppler/Object.h | 4 + - poppler/Page.cc | 11 +- - poppler/Page.h | 8 +- - poppler/XRef.cc | 87 ++++ - poppler/XRef.h | 9 + - 25 files changed, 2666 insertions(+), 79 deletions(-) - -commit 5c4ea446f33248964431e79b14592b30362634fe -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Feb 18 21:44:24 2007 +0000 - - * configure.ac: Change {datadir}/poppler to {datarootdir}/poppler so - that i get /usr/local/share/poppler in config.h - instead of - ${prefix}/poppler Better fixes are welcome. - - ChangeLog | 6 ++++++ - configure.ac | 2 +- - 2 files changed, 7 insertions(+), 1 deletion(-) - -commit dd140dd63de661303b578863af4d515d82117cca -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Feb 4 00:19:25 2007 +0000 - - fix date - - ChangeLog | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 3c1ed68bf4ee49b27275f7f65d49f42933b1cfa0 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Feb 4 00:16:43 2007 +0000 - - * poppler/Lexer.cc: - * poppler/Lexer.h: Patch to fix regression introduced by - optimizations - in bugzilla issue 7808 - - ChangeLog | 6 ++++++ - poppler/Lexer.cc | 30 ++++++++++++++++++++---------- - poppler/Lexer.h | 2 +- - 3 files changed, 27 insertions(+), 11 deletions(-) - -commit 672408839de0deac4c6006b54df723336ee4be2d -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Jan 31 22:05:09 2007 +0000 - - * qt4/src/poppler-page.cc: - Patch by Pino Toscano <pino@kde.org> to remove a nonsense done - by him. - - * qt4/tests/test-poppler-qt4.cpp: - Simply a bit. Patch by Pino Toscano <pino@kde.org>. - - ChangeLog | 8 ++++++++ - qt4/src/poppler-page.cc | 2 -- - qt4/tests/test-poppler-qt4.cpp | 24 ++++++++++++------------ - 3 files changed, 20 insertions(+), 14 deletions(-) - -commit 9c64b8c754e09ff2858af56ce38ef013002bf8e4 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Jan 31 18:48:16 2007 +0000 - - * m4/qt.m4: Fix Qt4 detection on Mac. Patch by Benjamin Reed - <ranger@befunk.com> - - ChangeLog | 5 +++++ - m4/qt.m4 | 26 +++++++++++++++++++++++--- - 2 files changed, 28 insertions(+), 3 deletions(-) - -commit 1b81192ff2bb9fae4a7bbc685fafe1718f303a7b -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Jan 28 15:55:11 2007 +0000 - - * glib/poppler-page.cc: Make link mapping coordinates - follow page - rotation. Patch by Carlos Garcia Campos <carlosgc@gnome.org> - * glib/poppler-action.cc: Fix link destination - coordinates. Patch by - Carlos Garcia Campos <carlosgc@gnome.org> - - ChangeLog | 4 ++ - glib/poppler-action.cc | 15 +++++- - glib/poppler-page.cc | 124 - +++++++++++++++++++++++++++++++------------------ - 3 files changed, 97 insertions(+), 46 deletions(-) - -commit 75dcf94f53c2d7241111f0d527ee4d3a2ef0b0cf -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Jan 28 15:36:08 2007 +0000 - - * glib/poppler-document.cc: Plug memory leak in - poppler-document. Patch by Carlos Garcia Campos <carlosgc@gnome.org> - - ChangeLog | 5 +++++ - glib/poppler-document.cc | 30 ++++++++++++++---------------- - 2 files changed, 19 insertions(+), 16 deletions(-) - -commit 682a15fc38a2c569d9b1f9871e3e949b62b33cf8 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Jan 21 22:35:23 2007 +0000 - - * poppler-document.cc: - * poppler-page.cc: - * poppler-private.h: - * poppler-qt4.h: - No need to destroy the Splash output device to change its - paper color. - Add the possibility to set flags that affect the rendering - (some - backends supports only some of them, though). - Add a Page::label to get the label associated with a page. - Patches by Pino Toscano <pino@kde.org>. - - ChangeLog | 12 ++++++++++++ - qt4/src/poppler-document.cc | 20 ++++++++++++++++++++ - qt4/src/poppler-page.cc | 14 +++++++++++++- - qt4/src/poppler-private.h | 29 ++++++++++++++++++++++++----- - qt4/src/poppler-qt4.h | 25 +++++++++++++++++++++++++ - 5 files changed, 94 insertions(+), 6 deletions(-) - -commit 7331bc46c1cb323316501f05ae1740bea5655596 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Jan 17 20:06:29 2007 +0000 - - * poppler/Sound.h: - * poppler/Sound.cc: - * qt4/src/poppler-sound.cc: Move most of the sound reading - code - into the Sound class, so frontends can use it easily. - Patch by Pino Toscano <pino@kde.org>. - - ChangeLog | 10 +++- - poppler/Sound.cc | 80 +++++++++++++++++++++++++- - poppler/Sound.h | 32 ++++++++++- - qt4/src/poppler-sound.cc | 144 - +++++++++++++++++------------------------------ - 4 files changed, 167 insertions(+), 99 deletions(-) - -commit 841bee94da7b6376d2e1fb3daaf8b727b90e42d8 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Jan 13 23:19:21 2007 +0000 - - * poppler/Stream.h: - * poppler/Stream.cc: Remove MemStream::setNeedFree method - i really did - not need it - * qt4/src/poppler-document.cc: - * qt4/src/poppler-link.cc: - * qt4/src/poppler-page.cc: - * qt4/src/poppler-private.h: Make Document::loadFromData - work on - documents with a password and don't need to do a malloc and - a memcpy. - - ChangeLog | 11 +++++++ - poppler/Stream.cc | 5 --- - poppler/Stream.h | 1 - - qt4/src/poppler-document.cc | 74 - ++++++++++++++++++++++++--------------------- - qt4/src/poppler-link.cc | 4 +-- - qt4/src/poppler-page.cc | 34 ++++++++++----------- - qt4/src/poppler-private.h | 24 +++++++++------ - 7 files changed, 84 insertions(+), 69 deletions(-) - -commit e1432fd7c4a6a2386789f450d39c6d954fd4e656 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Jan 13 18:29:39 2007 +0000 - - * configure.ac - * poppler/Makefile.am - * qt4/src/Makefile.am - * qt4/src/poppler-document.cc - * qt4/src/poppler-link.cc - * qt4/src/poppler-page.cc - * qt4/src/poppler-private.h - * qt4/src/poppler-qt4.h: Make the Qt4 backend compilable - even with - no Splash backend. Patch by Pino Toscano <pino@kde.org>. - - ChangeLog | 12 ++++++++++++ - configure.ac | 5 ----- - poppler/Makefile.am | 5 +++-- - qt4/src/Makefile.am | 6 +++++- - qt4/src/poppler-document.cc | 16 ++++++++++++++-- - qt4/src/poppler-link.cc | 1 + - qt4/src/poppler-page.cc | 15 ++++++++++++--- - qt4/src/poppler-private.h | 8 +++++++- - qt4/src/poppler-qt4.h | 6 ++++++ - 9 files changed, 60 insertions(+), 14 deletions(-) - -commit 457038e97325720615c4390ffa075dd8283966ee -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Jan 13 17:56:07 2007 +0000 - - * poppler/Stream.h: - * poppler/Stream.cc: Add MemStream::setNeedFree method - * qt4/src/poppler-document.cc: - * qt4/src/poppler-private.h: - * qt4/src/poppler-qt4.h: Add Document::loadFromData method - - ChangeLog | 8 ++++++++ - poppler/Stream.cc | 5 +++++ - poppler/Stream.h | 1 + - qt4/src/poppler-document.cc | 22 ++++++++++++++++++++++ - qt4/src/poppler-private.h | 17 +++++++++++++++-- - qt4/src/poppler-qt4.h | 16 ++++++++++++++++ - 6 files changed, 67 insertions(+), 2 deletions(-) - -commit 4e2a9c49ecab00b1f5d175570165cd490afdd31e -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Jan 11 22:28:03 2007 +0000 - - goo/gmem.c: Merge change from xpdf-3.01pl2 - - ChangeLog | 4 ++++ - goo/gmem.c | 13 +++++++++++-- - 2 files changed, 15 insertions(+), 2 deletions(-) - -commit bce14b274fd788d728116950d6464a85e33a9966 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Jan 11 22:12:11 2007 +0000 - - * poppler/Catalog.h: - * poppler/Catalog.cc: Limit max depth of recursive calls on - readPageTree to fix MOAB-06-01-2007 - - ChangeLog | 6 ++++++ - poppler/Catalog.cc | 20 +++++++++++++++----- - poppler/Catalog.h | 2 +- - 3 files changed, 22 insertions(+), 6 deletions(-) - -commit 3f0679a336ffaf2aff149f8526fa11f8f8cbda59 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Jan 6 21:53:08 2007 +0000 - - Patch by Pino Toscano <pino@kde.org> to fix some memory leaks when - dealing with sounds. - - ChangeLog | 9 +++++++++ - poppler/Sound.cc | 1 + - qt4/src/poppler-link.cc | 5 +++++ - qt4/src/poppler-link.h | 1 + - qt4/src/poppler-page.cc | 4 ++++ - qt4/src/poppler-sound.cc | 7 ++++++- - 6 files changed, 26 insertions(+), 1 deletion(-) - -commit d41cd2f567a955031cb7498d9089e70e14df4a42 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Jan 4 19:10:16 2007 +0000 - - qt4/src/poppler-private.h: gmallocn -> new[] - - ChangeLog | 4 ++++ - qt4/src/poppler-private.h | 2 +- - 2 files changed, 5 insertions(+), 1 deletion(-) - -commit f8edfb6832144cbbd1b234f6b35e33325269255c -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Jan 4 18:56:13 2007 +0000 - - qt/poppler-page-transition.cc: Fix memory leak. Patch by Tobias - Koenig <tokoe@kde.org> - - ChangeLog | 5 +++++ - qt/poppler-page-transition.cc | 1 + - 2 files changed, 6 insertions(+) - -commit 250a9f4b429344e0968c7bd0c0cebe7af373ae0a -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Dec 30 14:50:25 2006 +0000 - - * qt4/src/poppler-qt4.h: - * qt4/src/poppler-document.cc: Add const & to some parameters. Patch - by Pino Toscano <pino@kde.org> - - ChangeLog | 6 ++++++ - qt4/src/poppler-document.cc | 4 ++-- - qt4/src/poppler-qt4.h | 4 ++-- - 3 files changed, 10 insertions(+), 4 deletions(-) - -commit 250c1f94cc9a53f980fd08364d6cce29db9fd067 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Dec 29 14:08:35 2006 +0000 - - * poppler/UGooString.cc: Patch by Pino Toscano <pino@kde.org> so - that QStringToUGooString does not crash. - - ChangeLog | 5 +++++ - poppler/UGooString.cc | 1 + - 2 files changed, 6 insertions(+) - -commit 42770e5f07407b03dce31c73fd6956f9c8fc9a06 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Fri Dec 29 04:12:40 2006 +0000 - - 2006-12-28 Brad Taylor <brad@getcoded.net> - - * poppler/glib/poppler-document.h: - * poppler/glib/poppler-document.cc: Add - poppler_document_new_from_data - to allow loading PDFs out of memory. - - ChangeLog | 6 +++ - glib/poppler-document.cc | 113 - ++++++++++++++++++++++++++++++++++------------- - glib/poppler-document.h | 4 ++ - 3 files changed, 93 insertions(+), 30 deletions(-) - -commit 6fedd991b584e300b5710630fa7942d357fe7aaa -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Dec 28 17:22:36 2006 +0000 - - * qt4/src/poppler-embeddedfile.cc: - * qt4/src/poppler-document.cc: - * qt/poppler-document.cc: Fix memory leaks - - ChangeLog | 6 ++++++ - qt/poppler-document.cc | 4 ++++ - qt4/src/poppler-document.cc | 4 +++- - qt4/src/poppler-embeddedfile.cc | 4 +++- - 4 files changed, 16 insertions(+), 2 deletions(-) - -commit 7da5885e45c33382060276c95d9a3bd117ae55c7 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Dec 28 15:51:44 2006 +0000 - - * goo/GooString.cc - * goo/GooString.h - * goo/gmem.c - * goo/gmem.h - * poppler/Lexer.cc - * poppler/Lexer.h - * poppler/PageLabelInfo.cc - * poppler/Parser.cc - * poppler/UGooString.cc - * poppler/UGooString.h: Patch by Krzysztof Kowalczyk - <kkowalczyk@gmail.com> to improve performance. See bug 7808 for - details. - - ChangeLog | 15 ++++ - goo/GooString.cc | 186 - ++++++++++++++++++++++++----------------------- - goo/GooString.h | 28 +++++-- - goo/gmem.c | 3 +- - goo/gmem.h | 2 +- - poppler/Lexer.cc | 19 +++-- - poppler/Lexer.h | 10 +++ - poppler/PageLabelInfo.cc | 1 + - poppler/Parser.cc | 17 +++-- - poppler/UGooString.cc | 137 +++++++++++++++++++++++++++------- - poppler/UGooString.h | 40 ++++++++-- - 11 files changed, 313 insertions(+), 145 deletions(-) - -commit fbc05a6791fc28ee26a9d9188722ea3453c65ddc -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Dec 27 23:15:06 2006 +0000 - - * poppler/Annot.cc: - * poppler/Annot.h: Add type checking to processing of "Rect". Patch - by Scott Turner <scotty1024@mac.com> - - ChangeLog | 6 ++++++ - poppler/Annot.cc | 48 +++++++++++++++++++++++++++++------------------- - poppler/Annot.h | 1 + - 3 files changed, 36 insertions(+), 19 deletions(-) - -commit dc6b372358ac629c43aa2faabd644942cb0ed98b -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Dec 27 15:23:04 2006 +0000 - - Remove , after last value of enum. Thanks to André Wöbbeking - - ChangeLog | 1 + - poppler/Catalog.h | 2 +- - 2 files changed, 2 insertions(+), 1 deletion(-) - -commit c7d19539a95927eb277966a521f13393c9e116bb -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Dec 27 12:38:58 2006 +0000 - - qt4/src/poppler-qt4.h: Remove , after last value of enum. Thanks to - André Wöbbeking - - ChangeLog | 5 +++++ - qt4/src/poppler-qt4.h | 4 ++-- - 2 files changed, 7 insertions(+), 2 deletions(-) - -commit b29429c702e6540b9f35689b0a164f30e747d5d9 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Dec 26 20:07:03 2006 +0000 - - * qt4/src/poppler-qt4.h: - * qt4/src/poppler-page.cc: Add Page::duration() function to the - qt4 frontend. - - ChangeLog | 6 ++++++ - qt4/src/poppler-page.cc | 8 ++++++++ - qt4/src/poppler-qt4.h | 9 ++++++++- - 3 files changed, 22 insertions(+), 1 deletion(-) - -commit 62dfc58903b496c4cc720c8b2c759c6fb82fb443 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Dec 26 19:56:28 2006 +0000 - - * glib/test-poppler-glib.c: - * glib/poppler-page.cc: - * glib/poppler-page.h: - * poppler/Page.cc: - * poppler/Page.h: Implement /Dur entry in page object. Patch - by Carlos - Garcia Campos <carlosgc@gnome.org> - - ChangeLog | 9 +++++++++ - glib/poppler-page.cc | 16 ++++++++++++++++ - glib/poppler-page.h | 1 + - glib/test-poppler-glib.c | 7 +++++++ - poppler/Page.cc | 13 +++++++++++++ - poppler/Page.h | 6 ++++++ - 6 files changed, 52 insertions(+) - -commit 34e5aa62f4d3ba7a2d94a68a91c11a48277a4119 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Dec 23 13:12:13 2006 +0000 - - * poppler/PSTokenizer.cc: Enhance PSTokenizer::getToken - performance. - Patch by Scott Turner <scotty1024@mac.com>. In a random pdf - i tested - the patchs improves PSTokenizer::getToken performance by 15% - - ChangeLog | 6 ++++++ - poppler/PSTokenizer.cc | 33 +++++++++++++++++++++------------ - poppler/PSTokenizer.h | 1 + - 3 files changed, 28 insertions(+), 12 deletions(-) - -commit 1a5fa1d2ced62e7d027e085663e987cff625ce0b -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Dec 22 23:39:41 2006 +0000 - - poppler/Page.cc: Fix memory leak when reading a wrong color map in - a thumbnail. Patch by Scott Turner <scotty1024@mac.com> - - ChangeLog | 3 +++ - poppler/Page.cc | 1 + - 2 files changed, 4 insertions(+) - -commit dd1c134dcf085338a85188c7f205fc300396dc86 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Dec 22 23:27:53 2006 +0000 - - qt/poppler-page.cc: Fix memory leak in Page::textList. Patch by - Jerry Epplin <jepplin@globalvelocity.com> - - ChangeLog | 5 +++++ - qt/poppler-page.cc | 4 +++- - 2 files changed, 8 insertions(+), 1 deletion(-) - -commit 87e474a018c4808d6251fd79f9e9640e0f733551 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Thu Dec 21 01:01:30 2006 +0000 - - 2006-12-20 Jeff Muizelaar <jeff@infidigm.net> - - * poppler/CairoOutputDev.cc: Fix scaling of maskedImage - masks. They - should be scaled to the size of the image not the size of - the mask. - Fixes #9403. - - ChangeLog | 6 ++++++ - poppler/CairoOutputDev.cc | 8 ++------ - 2 files changed, 8 insertions(+), 6 deletions(-) - -commit 769a89623c680f51690db1751522b016b02b83a8 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Wed Dec 20 19:55:55 2006 +0000 - - 2006-12-20 Jeff Muizelaar <jeff@infidigm.net> - - * poppler/GlobalParams.cc: Try to make zero-width lines as - close to - one pixel wide as we can. Fixes #9393. - - ChangeLog | 5 +++++ - poppler/CairoOutputDev.cc | 10 ++++++++-- - 2 files changed, 13 insertions(+), 2 deletions(-) - -commit 5c4bca18373528f293bd5e080efca572977fc1ff -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Dec 19 20:27:55 2006 +0000 - - poppler/SplashOutputDev.cc: Fix gray calculation. Patch by Scott - Turner <scotty1024@mac.com> - - ChangeLog | 5 +++++ - poppler/SplashOutputDev.cc | 2 +- - 2 files changed, 6 insertions(+), 1 deletion(-) - -commit fba99578f6001ae0c0df0442bb73040b55109b1d -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Tue Dec 12 05:23:59 2006 +0000 - - 2006-12-12 Jeff Muizelaar <jeff@infidigm.net> - - * poppler/CairoOutputDev.cc: Change a cairo_set_matrix to - cairo_transform so that we don't blindly clobber the existing - matrix. - Patch by Daniel Colascione. - Fixes #9190. - - ChangeLog | 7 +++++++ - poppler/CairoOutputDev.cc | 2 +- - 2 files changed, 8 insertions(+), 1 deletion(-) - -commit 9a6ffa1c6e009f8606a055f873efdcd5829fcfa2 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Sun Dec 10 05:24:56 2006 +0000 - - 2006-12-09 Jeff Muizelaar <jeff@infidigm.net> - - * poppler/Function.cc: Initialize - PostScriptFunction::codeString to - NULL so that it can safely deleted if initialization fails. - Fixes #9263. - - ChangeLog | 6 ++++++ - poppler/Function.cc | 1 + - 2 files changed, 7 insertions(+) - -commit e92d63a179ae022270156da4e396c15ff9236d89 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Nov 23 19:01:44 2006 +0000 - - * m4/libjpeg.m4: Make JPEG library header search work under - MSYS. Patch by Alexis Wilke - - ChangeLog | 5 +++++ - m4/libjpeg.m4 | 2 +- - 2 files changed, 6 insertions(+), 1 deletion(-) - -commit 3913110f698fd006b394a395b5b0adfde30af31b -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Nov 22 21:55:27 2006 +0000 - - there should not be any whitespace after the \ - - qt4/src/Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit c3ab7addec5a7990872949b813c2b727b1614d64 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Nov 19 18:51:23 2006 +0000 - - Another leak fix on qt4/src/poppler-page.cc the previous changelog - is enough for this one ;-) - - qt4/src/poppler-page.cc | 4 ++++ - 1 file changed, 4 insertions(+) - -commit 9e9b82da91abacb916b05302d40bf822af6ac7f1 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Nov 19 12:59:48 2006 +0000 - - * qt4/src/poppler-link.cc: - * qt4/src/poppler-page.cc: - * qt4/src/poppler-qt4.h: - * qt4/src/poppler-textbox.cc: Fix memory leaks - * splash/Splash.cc: Initialize the values of nClipRes - - ChangeLog | 8 ++++++++ - qt4/src/poppler-link.cc | 6 ++++++ - qt4/src/poppler-page.cc | 4 +++- - qt4/src/poppler-qt4.h | 1 + - qt4/src/poppler-textbox.cc | 5 +++++ - splash/Splash.cc | 2 +- - 6 files changed, 24 insertions(+), 2 deletions(-) - -commit b9faacc62182efcbc84df2471e4c5dcf2b03bda8 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Nov 18 17:08:04 2006 +0000 - - * qt4/src/poppler-document.cc - * qt4/src/poppler-qt4.h: Add int marginRight, int - marginBottom, int - marginLeft, int marginTop, bool strictMargins to - Document::print() - - ChangeLog | 6 ++++++ - qt4/src/poppler-document.cc | 11 +++++++++-- - qt4/src/poppler-qt4.h | 6 +++++- - 3 files changed, 20 insertions(+), 3 deletions(-) - -commit da8e6d4c3e0afdaa031413649ae20545c8a1f845 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Nov 16 21:03:27 2006 +0000 - - really commit pino's patch :-S - - qt4/src/Doxyfile | 11 +++-- - qt4/src/Mainpage.dox | 26 +++++----- - qt4/src/poppler-annotation.h | 33 ++++++++----- - qt4/src/poppler-link.h | 68 +++++++++++++++++++++---- - qt4/src/poppler-qt4.h | 115 - +++++++++++++++++++++++++++---------------- - 5 files changed, 171 insertions(+), 82 deletions(-) - -commit 4f26e65096e3133a39fc0c9e82084c90cf77dda9 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Nov 16 21:00:10 2006 +0000 - - * qt4/src/Mainpage.dox: - * qt4/src/Doxyfile: - * qt4/src/poppler-annotation.h: - * qt4/src/poppler-link.h: - * qt4/src/poppler-qt4.h: Improve API documentation. Patch by - Pino Toscano. - - Generated docu at http://people.freedesktop.org/~aacid/docs/qt4/ - - ChangeLog | 9 +++++++++ - qt4/src/Mainpage.dox | 2 +- - 2 files changed, 10 insertions(+), 1 deletion(-) - -commit e68b6f3f8fea1e4f036eba0f19bb7e0c423d408c -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Nov 15 21:07:50 2006 +0000 - - 2006-11-15 Albert Astals Cid <aacid@kde.org> - - * qt4/src/poppler-link.cc: - * qt4/src/poppler-page.cc: - * qt4/src/poppler-qt4.h: - * qt4/src/poppler-document.cc: - * qt4/src/poppler-private.h: Generalize the way we render - the pages: - merge all the Page::renderTo* functions in only one that - renders on - a QImage, taking into account the currently chosen backend. - It is possible to switch rendering backend using the Document. - Patch by Pino Toscano. - - * qt4/tests/stress-poppler-qt4.cpp: - * qt4/tests/test-password-qt4.cpp: - * qt4/tests/test-poppler-qt4.cpp: Adapt the tests to the - changes in - the rendering API of Page. Patch by Pino Toscano. - - ChangeLog | 17 ++++++ - qt4/src/poppler-document.cc | 14 +++++ - qt4/src/poppler-link.cc | 2 +- - qt4/src/poppler-page.cc | 123 - +++++++++++++++++++++------------------ - qt4/src/poppler-private.h | 32 ++++++---- - qt4/src/poppler-qt4.h | 75 +++++++----------------- - qt4/tests/stress-poppler-qt4.cpp | 3 +- - qt4/tests/test-password-qt4.cpp | 12 ++-- - qt4/tests/test-poppler-qt4.cpp | 17 +++--- - 9 files changed, 152 insertions(+), 143 deletions(-) - -commit 37088dd3335be6e7641c47bea9b1ddd689b07372 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Nov 13 19:16:44 2006 +0000 - - * poppler/ArthurOutputDev.cc: Small fix to get colors right - - ChangeLog | 4 ++++ - poppler/ArthurOutputDev.cc | 8 ++++---- - 2 files changed, 8 insertions(+), 4 deletions(-) - -commit 302e2cab9fd626222c69ad40f7e40be2e65d34a9 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Nov 11 15:41:27 2006 +0000 - - Fix typo when outputing PS scale - - ChangeLog | 4 ++++ - poppler/PSOutputDev.cc | 2 +- - 2 files changed, 5 insertions(+), 1 deletion(-) - -commit e3550fb286dae98992b30edbf4a9300fa58d2e77 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Tue Nov 7 23:53:31 2006 +0000 - - 2006-11-07 Jeff Muizelaar <jeff@infidigm.net> - - * poppler/CairoOutputDev.cc: take horizontal scaling into - account - when updating the font. Also, cleanup some unused code. Fixes - #8924. - - ChangeLog | 5 +++++ - poppler/CairoOutputDev.cc | 9 ++------- - 2 files changed, 7 insertions(+), 7 deletions(-) - -commit f020b64a72ad5c82c3e7bdcf15039bb0037b1f22 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Oct 18 18:43:59 2006 +0000 - - 2006-10-18 Albert Astals Cid <aacid@kde.org> - - * qt4/src/poppler-document.cc: - * qt4/src/poppler-private.h: Do not crash when opening a - encrypted document. Do not crash when unlocking a locked - document. - - ChangeLog | 7 +++++++ - qt4/src/poppler-document.cc | 41 - ++++++++++++++++------------------------- - qt4/src/poppler-private.h | 14 ++++++++++++++ - 3 files changed, 37 insertions(+), 25 deletions(-) - -commit 577330ee1d4d1021174cf1bd59557a83a017e06f -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Oct 11 23:09:24 2006 +0000 - - * splash/Splash.cc: - * splash/SplashErrorCodes.h: Do not crash on documents that - report a - 0x0 mask for an image, like - http://bugs.kde.org/attachment.cgi?id=18083&action=view - - ChangeLog | 7 +++++++ - splash/Splash.cc | 2 ++ - splash/SplashErrorCodes.h | 2 ++ - 3 files changed, 11 insertions(+) - -commit 42c016c6d3c6de65fd92b51b9d6cc96d52404689 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Oct 8 20:38:47 2006 +0000 - - * poppler/Link.cc: - * poppler/Link.h: - * poppler/Makefile.am: - * poppler/Page.cc: - * poppler/Page.h: - * poppler/Sound.cc: - * poppler/Sound.h: Make poppler able to read Sound objects, - Sound - actions and Opening/Closing page actions. Patch by Pino - Toscano. - - * qt4/src/Makefile.am: - * qt4/src/poppler-link.cc: - * qt4/src/poppler-link.h: - * qt4/src/poppler-qt4.h: - * qt4/src/poppler-page.cc: - * qt4/src/poppler-sound.cc: Support for sounds, sound links - and page - actions in the Qt4 backend. Patch by Pino Toscano. - - ChangeLog | 19 +++++ - poppler/Link.cc | 53 ++++++++++++++ - poppler/Link.h | 32 +++++++++ - poppler/Makefile.am | 2 + - poppler/Page.cc | 8 +++ - poppler/Page.h | 4 ++ - poppler/Sound.cc | 65 +++++++++++++++++ - poppler/Sound.h | 46 ++++++++++++ - qt4/src/Makefile.am | 1 + - qt4/src/poppler-link.cc | 35 ++++++++++ - qt4/src/poppler-link.h | 26 ++++++- - qt4/src/poppler-page.cc | 32 +++++++++ - qt4/src/poppler-qt4.h | 87 +++++++++++++++++++++++ - qt4/src/poppler-sound.cc | 177 - +++++++++++++++++++++++++++++++++++++++++++++++ - 14 files changed, 586 insertions(+), 1 deletion(-) - -commit 1da064d7e7403ec7111eecb2b9613e27a2c4bb5d -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Sep 30 16:28:35 2006 +0000 - - * qt4/src/poppler-page.cc: PA is optional, H is a name not a string - - ChangeLog | 4 ++++ - qt4/src/poppler-page.cc | 15 +++++++++------ - 2 files changed, 13 insertions(+), 6 deletions(-) - -commit 29366d8e470ab2207cdfdab115c2fa9618c4c74e -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Sep 25 20:43:18 2006 +0000 - - * glib/Makefile.am - * qt/Makefile.am - * qt4/src/Makefile.am - * qt4/tests/Makefile.am - * test/Makefile.am - * utils/Makefile.am: Add FONTCONFIG_CFLAGS FONTCONFIG_LIBS - for people - that need them. Patch by morfoh@opensde.org. Fixes bug #8415 - - ChangeLog | 10 ++++++++++ - glib/Makefile.am | 2 ++ - qt/Makefile.am | 6 ++++-- - qt4/src/Makefile.am | 2 ++ - qt4/tests/Makefile.am | 2 ++ - test/Makefile.am | 6 ++++-- - utils/Makefile.am | 6 ++++-- - 7 files changed, 28 insertions(+), 6 deletions(-) - -commit 957c1e59df213a01ca87f03d067a8dab5dc09fb6 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Sep 25 20:05:28 2006 +0000 - - ignore poppler-features.h - - glib/.cvsignore | 1 + - 1 file changed, 1 insertion(+) - -commit 3158b54375bdfdc82779362cc9442aade87f84f6 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Fri Sep 22 00:55:54 2006 +0000 - - 2006-09-21 Kristian Høgsberg <krh@redhat.com> - - * NEWS: Update list of bugs fixes, release 0.5.4. - - ChangeLog | 2 ++ - NEWS | 2 +- - 2 files changed, 3 insertions(+), 1 deletion(-) - -commit 17dd1f60f9328ae68fbe262ae0745be976ff9f95 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Thu Sep 21 23:28:14 2006 +0000 - - 2006-09-21 Kristian Høgsberg <krh@redhat.com> - - * configure.ac: Check for gtk+ 2.8 for the gtk+ test case, - invert - help text for zlib option (#7788, #7661). - - ChangeLog | 3 +++ - configure.ac | 12 +++++------- - 2 files changed, 8 insertions(+), 7 deletions(-) - -commit ddbbd697424b9122ce1f0541ddada3fe8bb38fb1 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Thu Sep 21 22:58:31 2006 +0000 - - 2006-09-21 Kristian Høgsberg <krh@redhat.com> - - * utils/pdftops.cc: Get duplex setting from GlobalParams. - - ChangeLog | 2 ++ - utils/pdftops.cc | 3 ++- - 2 files changed, 4 insertions(+), 1 deletion(-) - -commit 0d25592a1a5811ee8fffbd70307c7bcaaaacadf3 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Thu Sep 21 22:40:52 2006 +0000 - - 2006-09-21 Kristian Høgsberg <krh@redhat.com> - - * glib/poppler-page.cc (_poppler_page_new): Make PopplerPage - reference its document throughout the lifetime of the page - (#7005). - - ChangeLog | 3 +++ - glib/poppler-page.cc | 5 ++++- - 2 files changed, 7 insertions(+), 1 deletion(-) - -commit b834755c7ae45eb4020e9cdbc3852eac0151fcdc -Author: Kristian Høgsberg <krh@redhat.com> -Date: Thu Sep 21 22:37:00 2006 +0000 - - 2006-09-21 Kristian Høgsberg <krh@redhat.com> - - * poppler/Gfx.cc: Remove the right out->updateAll() call. - - ChangeLog | 4 ++++ - poppler/Gfx.cc | 2 +- - 2 files changed, 5 insertions(+), 1 deletion(-) - -commit 181e2af1edf2cbc3c8edadad0dce215a64a990dd -Author: Kristian Høgsberg <krh@redhat.com> -Date: Thu Sep 21 01:05:23 2006 +0000 - - 2006-09-20 Kristian Høgsberg <krh@redhat.com> - - * NEWS: Sum up changes. - - * configure.ac: Bump release to 0.5.4. - - ChangeLog | 4 ++++ - NEWS | 10 ++++++++++ - configure.ac | 2 +- - 3 files changed, 15 insertions(+), 1 deletion(-) - -commit cc9c17a6730422be99ebcd69991fcf5d7b569640 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Thu Sep 21 00:56:33 2006 +0000 - - 2006-09-20 Kristian Høgsberg <krh@redhat.com> - - * poppler/Gfx.cc: Remove last remnant of erroneous type3 - commit a - while back, fixing #8182. - - ChangeLog | 5 +++++ - poppler/CairoOutputDev.cc | 1 - - poppler/Gfx.cc | 1 - - 3 files changed, 5 insertions(+), 2 deletions(-) - -commit 83be722b56d9266b89946fe994023351e47eb4fd -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Wed Sep 20 20:22:19 2006 +0000 - - 2006-09-20 Jeff Muizelaar <jeff@infidigm.net> - - * poppler/TextOutputDev.cc: TextFontInfo stores a copy of - a pointer - to a GfxFont but does not increment the reference count. Fix - the - problem by calling incRefCnt and decRefCnt - appropriately. Fixes #4649 - - ChangeLog | 6 ++++++ - poppler/TextOutputDev.cc | 4 ++++ - 2 files changed, 10 insertions(+) - -commit 1cf60015d7d78668c83737be6015dc880fd04ebf -Author: Kristian Høgsberg <krh@redhat.com> -Date: Tue Sep 19 04:39:07 2006 +0000 - - 2006-09-19 Kristian Høgsberg <krh@redhat.com> - - * poppler/GlobalParams.cc: Add scanEncodingDirs() to - automatically - scan in any encodings found under ${datadir}/poppler. - - * m4/define-dir.m4: New file, adds AC_DEFINE_DIR macro. - - ChangeLog | 7 +++ - configure.ac | 16 +------ - goo/gfile.cc | 16 +++---- - goo/gfile.h | 2 + - m4/define-dir.m4 | 34 ++++++++++++++ - poppler/GlobalParams.cc | 116 - ++++++++++++++++++++++++++++++++---------------- - poppler/GlobalParams.h | 7 ++- - 7 files changed, 136 insertions(+), 62 deletions(-) - -commit 821c883f9df9cc0e5b81aa2e070727996cf3bc4e -Author: Kristian Høgsberg <krh@redhat.com> -Date: Mon Sep 18 15:40:50 2006 +0000 - - 2006-09-13 Kristian Høgsberg <krh@redhat.com> - - * poppler/Makefile.am (libpoppler_la_LIBADD): Add cairo - libs to - link if configured. - - ChangeLog | 3 +++ - poppler/Makefile.am | 4 ++++ - 2 files changed, 7 insertions(+) - -commit d8ab8ebc94c32d32ad17ed54cede453de25d7dd5 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Wed Sep 13 20:25:03 2006 +0000 - - 2006-09-13 Kristian Høgsberg <krh@redhat.com> - - * configure.ac: Tighten glib check (#7906), add check for C++ - compiler (#8048). - - ChangeLog | 5 +++++ - configure.ac | 3 ++- - 2 files changed, 7 insertions(+), 1 deletion(-) - -commit 7c748075e18cfe95be6a56adf09ce7f2f032b86f -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Sep 12 19:48:47 2006 +0000 - - sorry Jeff - - ChangeLog | 7 +++++++ - 1 file changed, 7 insertions(+) - -commit 6cdcfae0e1c6fbec07ee5273e6ad97ef04110868 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Sep 11 21:20:56 2006 +0000 - - 2006-09-11 Albert Astals Cid <aacid@kde.org> - - * qt4/src/poppler-annotation.cc: - * qt4/src/poppler-annotation.h: - * qt4/src/poppler-page.cc: Add support for - LinkAnnotation. Patch by - Pino Toscano - - ChangeLog | 10 +- - qt4/src/poppler-annotation.cc | 230 - +++++++++++++++++++++++++++++++++++++++- - qt4/src/poppler-annotation.h | 22 +++- - qt4/src/poppler-page.cc | 237 - +++++++++++++++++++++++++----------------- - 4 files changed, 392 insertions(+), 107 deletions(-) - -commit 8335c7eea2aa62a580170f47323d8674bd89e412 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Fri Sep 8 23:28:22 2006 +0000 - - 2006-09-08 Jeff Muizelaar <jeff@infidigm.net> - - * poppler/CairoOutputDev.cc: The work-around for 1x1 - imagemasks was not - calling cairo_set_source causing the rectangles to be drawn - the wrong - colour occasionally. Fix by moving the existing call to - cairo_set_source above the work-around. Fixes #7113. - - ChangeLog | 7 +++++++ - poppler/CairoOutputDev.cc | 8 ++++---- - 2 files changed, 11 insertions(+), 4 deletions(-) - -commit 02d505aa0176b6e5a54ee82426d8333a9ef8f000 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Thu Sep 7 04:01:39 2006 +0000 - - 2006-09-06 Jeff Muizelaar <jeff@infidigm.net> - - * poppler/CairoOutputDev.cc: Avoid crashing in CairoOutputDev - if - endString is called without a corresponding beginString. Fixes - #4515. - - ChangeLog | 5 +++++ - poppler/CairoOutputDev.cc | 8 +++++++- - 2 files changed, 12 insertions(+), 1 deletion(-) - -commit 3ea0aada0434c9f815814253dd9d1374ae6643cc -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Wed Sep 6 23:54:30 2006 +0000 - - 2006-09-06 Jeff Muizelaar <jeff@infidigm.net> - - * configure.ac: - * poppler/FlateStream.cc: - * poppler/FlateStream.h: Fix FlateStream to not read more - than it - needs. This has a performance impact because our input buffer - is now - only 1 byte large, however correctness is better than - performance. - This should fix #3948. - - ChangeLog | 9 +++++++++ - configure.ac | 2 +- - poppler/FlateStream.cc | 35 +++++++++++++++++++++++++---------- - poppler/FlateStream.h | 3 ++- - 4 files changed, 37 insertions(+), 12 deletions(-) - -commit 1d2e6aedca0b8fcce6ac84ae2576ab067912886b -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Tue Sep 5 01:21:50 2006 +0000 - - 2006-09-04 Jeff Muizelaar <jeff@infidigm.net> - - * poppler/CairoOutputDev.cc: Initialize currentFont to - NULL before - use. Found by Pascal Terjan. Fixes #7924. - - ChangeLog | 5 +++++ - poppler/CairoOutputDev.cc | 1 + - 2 files changed, 6 insertions(+) - -commit 7905adaa21f2347346927fa567c64be60e2bc69c -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Sep 3 09:27:21 2006 +0000 - - * poppler/Dict.cc: - * poppler/Dict.h: - * poppler/Object.h: - * poppler/Parser.cc: Patch by Krzysztof Kowalczyk to increase - speed by - means of doing less copies between objects. See bug 8112 - for more - information. - - ChangeLog | 9 +++++++++ - poppler/Dict.cc | 4 ++-- - poppler/Dict.h | 11 +++++++++-- - poppler/Object.h | 12 ++++++++++++ - poppler/Parser.cc | 15 +++++++++------ - 5 files changed, 41 insertions(+), 10 deletions(-) - -commit 4da7c90a619002e54f436c4efee723b5bc42a112 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Aug 24 22:32:31 2006 +0000 - - * qt4/src/poppler-private.h: Init m_fontInfoScanner to - NULL. Discovered by - Rafael Rodríguez <rafael.rodriguez.tf@gmail.com> - - ChangeLog | 5 +++++ - qt4/src/poppler-private.h | 2 +- - 2 files changed, 6 insertions(+), 1 deletion(-) - -commit 469202e117910beb4e0ad906d5c154a3bae5c98b -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Aug 16 14:35:14 2006 +0000 - - * qt/poppler-page.cc: Report correct page size. Backport from Qt4 - frontend. Patch by Wilfried Huss - - ChangeLog | 5 +++++ - qt/poppler-page.cc | 10 ++++++++-- - 2 files changed, 13 insertions(+), 2 deletions(-) - -commit b881844e4d31009c5d54c9321a6daaf0f354cf6b -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Aug 16 09:18:04 2006 +0000 - - did not want to commit that, thanks Brad for noticing! - - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit f52380e6d569280839d7c37362bd7cc59f2573c3 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Aug 15 22:27:31 2006 +0000 - - add a warning how nasty zlib can be, it can come and it your pdfs - and make your readers crash when you are not looking at it, so be - aware that if you enable it you are on your own ;-) - - ChangeLog | 4 ++++ - configure.ac | 4 ++-- - 2 files changed, 6 insertions(+), 2 deletions(-) - -commit 1caba84b1024f1fa7865deebbf70379855ce078d -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Aug 11 13:12:11 2006 +0000 - - 2006-08-11 Albert Astals Cid <aacid@kde.org> - - * poppler/Catalog.cc: Fix leak - - ChangeLog | 4 ++++ - poppler/Catalog.cc | 1 + - 2 files changed, 5 insertions(+) - -commit 9b6455f6530e273afaa5f948b67ceeec8a06f976 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Aug 10 16:08:51 2006 +0000 - - 2006-08-10 Albert Astals Cid <aacid@kde.org> - - * poppler/SplashOutputDev.cc: Try to fix refs to fonts - yet again - - ChangeLog | 4 ++++ - poppler/SplashOutputDev.cc | 4 ++-- - 2 files changed, 6 insertions(+), 2 deletions(-) - -commit 305f60e0437dcfc5babd449123a1fe4cd062a219 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Aug 5 17:10:07 2006 +0000 - - 2006-08-05 Albert Astals Cid <aacid@kde.org> - - * poppler/Catalog.cc: The name array can contain references - to strings - instead of stings themselves, or at least PDF of - https://bugs.freedesktop.org/show_bug.cgi?id=7780 does. This - makes it - work with that file - * qt4/src/poppler-embeddedfile.cc: Use UGooString for - description - - ChangeLog | 8 ++++++++ - poppler/Catalog.cc | 12 ++++++++++-- - qt4/src/poppler-embeddedfile.cc | 3 ++- - 3 files changed, 20 insertions(+), 3 deletions(-) - -commit dd8758ea3f0f44e9f8362343f15b2064f428ad64 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Aug 4 22:48:09 2006 +0000 - - 2006-08-05 Albert Astals Cid <aacid@kde.org> - - * utils/pdftotext.cc: - * utils/pdfinfo.cc: - * utils/pdffonts.cc: Add the posibility of reading a file - from stdin. - Patch by Dom Lachowicz - - ChangeLog | 7 +++++++ - utils/pdffonts.cc | 11 ++++++++++- - utils/pdfinfo.cc | 11 ++++++++++- - utils/pdftotext.cc | 11 ++++++++++- - 4 files changed, 37 insertions(+), 3 deletions(-) - -commit a418d844cf6baa797919796ceadaf21ef9b2e5b9 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Aug 3 10:34:52 2006 +0000 - - * configure.ac: Use the correct variable to output the - utils status. - Patch by Dom Lachowic - - ChangeLog | 5 +++++ - configure.ac | 2 +- - 2 files changed, 6 insertions(+), 1 deletion(-) - -commit 1673b895656143a8a1f1a45e07f777f39995940d -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Jul 30 20:31:31 2006 +0000 - - * poppler/GfxState.cc: make nGfxBlendModeNames define - return the - correct size of the gfxBlendModeNames array so it does - not access - invalid memory areas when the blend mode is not - found. Discovered by - Krzysztof Kowalczyk - - ChangeLog | 7 +++++++ - poppler/GfxState.cc | 12 +++++++----- - 2 files changed, 14 insertions(+), 5 deletions(-) - -commit e4561568d14e7b3b2aec6ecaf3cc09078bdf7a46 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Jul 30 09:38:28 2006 +0000 - - * splash/SplashFontEngine.cc: - * poppler/SplashOutputDev.cc: Fix memory leak when using - embedded - fonts in the pdf file. Patch by Krzysztof Kowalczyk - - ChangeLog | 6 ++++++ - poppler/SplashOutputDev.cc | 8 ++++++-- - splash/SplashFontEngine.cc | 12 ++++++++---- - 3 files changed, 20 insertions(+), 6 deletions(-) - -commit 4a27502159a89992f54be2673b44bf7a8392b60d -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Jul 29 16:24:53 2006 +0000 - - push back thing i did not want to commit, sorry - - configure.ac | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit ba448afc0e97a9e779409ff228adcd4f627971f5 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Jul 29 16:22:52 2006 +0000 - - * configure.ac: Disable qt and qt4 frontends if splash - backend is - disabled - - ChangeLog | 5 +++++ - configure.ac | 18 ++++++++++++++---- - 2 files changed, 19 insertions(+), 4 deletions(-) - -commit 1e32d3baa5e8296caf55bd5853216a96618c74ac -Author: Kristian Høgsberg <krh@redhat.com> -Date: Fri Jul 28 18:17:45 2006 +0000 - - 2006-07-28 Kristian Høgsberg <krh@redhat.com> - - * poppler/CairoOutputDev.cc: Don't set font matrix translation - (fix from Behdad Esfahbod). - - ChangeLog | 5 +++++ - poppler/CairoOutputDev.cc | 4 ++-- - 2 files changed, 7 insertions(+), 2 deletions(-) - -commit 0bc1b0f35c28cb80dd27d24110367348e52c143b -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Jul 27 18:21:28 2006 +0000 - - fix date, i don't live in the past - - ChangeLog | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 2f27c3a0218608568f6cd1c718ef51b9879023a3 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Jul 27 18:17:50 2006 +0000 - - * poppler/Stream.cc: If you are going to test a variable, - better - initialize it first ;-) Fixes bug 7646 - - ChangeLog | 5 +++++ - poppler/Stream.cc | 2 +- - 2 files changed, 6 insertions(+), 1 deletion(-) - -commit f39ab43ca824cb7e5db73137c4545b3e85134425 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Jul 26 18:16:01 2006 +0000 - - 2006-07-26 Albert Astals Cid <aacid@kde.org> - - * qt/poppler-document.cc: - * qt/poppler-private.h: - * qt/poppler-qt.h: Port the QDomDocument *Document::toc() - const method - from the qt4 frontend to the qt frontend. Patch by Wilfried - Huss - - ChangeLog | 7 ++++++ - qt/poppler-document.cc | 18 ++++++++++++++++ - qt/poppler-private.h | 58 - ++++++++++++++++++++++++++++++++++++++++++++++++++ - qt/poppler-qt.h | 16 ++++++++++++++ - 4 files changed, 99 insertions(+) - -commit c3a9fd546b853c85b6be5fc8f4e5a78d8a7e7437 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Jul 25 18:39:57 2006 +0000 - - * qt4/src/poppler-document.cc: Obey kdeprint masters in that - a library - should output as much device independent PS as posible, - so disabling - duplex printing for default is a good idea. - - ChangeLog | 6 ++++++ - qt4/src/poppler-document.cc | 2 +- - 2 files changed, 7 insertions(+), 1 deletion(-) - -commit edc0499644b8083600ced9a5087ec0b0189e615b -Author: Kristian Høgsberg <krh@redhat.com> -Date: Mon Jul 24 19:49:51 2006 +0000 - - 2006-07-24 Kristian Høgsberg <krh@redhat.com> - - * configure.ac: - * poppler/Makefile.am: Move fontconfig dependency to - libpoppler. - - ChangeLog | 5 +++++ - configure.ac | 18 +++++++----------- - poppler/Makefile.am | 6 ++++-- - 3 files changed, 16 insertions(+), 13 deletions(-) - -commit 24b5a68a3f4cdba63fbcd01dc178a330b5f604a7 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Tue Jul 18 21:32:11 2006 +0000 - - 2006-07-18 Jeff Muizelaar <jeff@infidigm.net> - - * poppler/Gfx.cc: fix opCloseStroke to match the behaviour of - a separate opClose and opStroke. Previously, opCloseStroke - only - closes if there is a path however opClose closes - unconditionally. - - ChangeLog | 6 ++++++ - poppler/Gfx.cc | 2 +- - 2 files changed, 7 insertions(+), 1 deletion(-) - -commit c57ebd40fcf85432b2e5045086d158a63af12525 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Tue Jul 18 21:26:57 2006 +0000 - - 2006-07-18 Jeff Muizelaar <jeff@infidigm.net> - - * poppler/TextOutputDev.cc: call setDefaultCTM() after - start page - like in Gfx.cc. This fixes a regression caused by the fix - to #6948. - - ChangeLog | 5 +++++ - poppler/TextOutputDev.cc | 1 + - 2 files changed, 6 insertions(+) - -commit 640d5d5a9d9e53f3f677eb05f3d18e6bfc74e95a -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Jul 16 18:22:23 2006 +0000 - - 2006-07-16 Albert Astals Cid <aacid@kde.org> - - * poppler/GfxState.cc: Do not crash when we can not - parse a GfxImageColorMap - Fixes crash on pdf that can be found at - - ChangeLog | 7 +++++++ - poppler/GfxState.cc | 4 ++++ - qt4/src/Doxyfile | 4 ++-- - 3 files changed, 13 insertions(+), 2 deletions(-) - -commit c6926d1d8ab04468f56f4687cdd3f06af206226b -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Jun 28 19:23:52 2006 +0000 - - * poppler/DCTStream.cc: - * poppler/DCTStream.h: Reset jpeg structures on reset. - Fixes crash while printing pdf at - http://bugs.kde.org/attachment.cgi?id=16818&action=view - - ChangeLog | 7 +++++++ - poppler/DCTStream.cc | 25 ++++++++++++++++++------- - poppler/DCTStream.h | 2 ++ - 3 files changed, 27 insertions(+), 7 deletions(-) - -commit 96ac8dec591a0325a822c1f7b7bc7e78b867e3a0 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Jun 25 16:59:31 2006 +0000 - - Ask for paper size width and height to pass it to PSOutputDev in - both qt frontends (qt got abi mantained, qt4 changed as you still - have to define UNSTABLE_POPPLER_QT4 to be able of using it, one day - we'll have to think of removing it) - - ChangeLog | 8 ++++++++ - qt/poppler-document.cc | 9 +++++++-- - qt/poppler-qt.h | 9 +++++++++ - qt4/src/poppler-document.cc | 4 ++-- - qt4/src/poppler-qt4.h | 10 +++++++++- - 5 files changed, 35 insertions(+), 5 deletions(-) - -commit 965011f2001fb1ea36857995d5555266f82b8d96 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Jun 25 16:20:50 2006 +0000 - - put back a change that was not meant to be commited - - qt/poppler-qt.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 4995d09c91173d34a435112828aff21a63b147e9 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Jun 25 16:19:32 2006 +0000 - - rename poppler-link.h to poppler-link-qt3.h to not get conflicts - on install - - qt/Makefile.am | 2 +- - qt/poppler-link-qt3.h | 188 ++++++++++++++++++++++++++++++++++++ - qt/poppler-link.cc | 258 - ++++++++++++++++++++++++++++++++++++++++++++++++++ - qt/poppler-qt.h | 4 +- - 4 files changed, 449 insertions(+), 3 deletions(-) - -commit 087921b134c2646e6d41960f471a1819c7c8790a -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Jun 25 10:29:22 2006 +0000 - - add link support to qt3 frontend. - Patch by Wilfried Huss based on Qt4 code - - ChangeLog | 11 ++++ - qt/Makefile.am | 4 +- - qt/poppler-document.cc | 19 ++++--- - qt/poppler-page.cc | 136 - ++++++++++++++++++++++++++++++++++++++++++++++--- - qt/poppler-private.h | 33 +++++++++++- - qt/poppler-qt.h | 14 +++-- - 6 files changed, 196 insertions(+), 21 deletions(-) - -commit 831bd8942ef3224354b128d5e14e68fdfc57168b -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Jun 11 16:14:32 2006 +0000 - - optimization by Mario Teijeiro Otero - - poppler/UGooString.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 1223fd4b200f6c13996f8299f3563c818af0c21d -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Jun 10 22:23:19 2006 +0000 - - * poppler/UGooString.cc: When any of the chars that we - are passing to the UGooString is not pdfencodable, do not - encode the string, because we loose information if we do, - this fixes rendering of - http://publikationen.ub.uni-frankfurt.de/volltexte/2005/890/pdf/TR_abs_g.pdf - and other docs with type3 fonts and ligatures - - ChangeLog | 9 +++++++++ - poppler/UGooString.cc | 8 ++++++++ - 2 files changed, 17 insertions(+) - -commit b85a39ddfc7de8c0621e995c114885ecd08fcdc2 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Jun 1 21:03:38 2006 +0000 - - * qt4/src/poppler-qt4.h: - * qt4/src/poppler-page.cc: Add Rotation parameter that - is passed - to the respective output devs - - ChangeLog | 6 ++++++ - qt4/src/poppler-page.cc | 22 ++++++++++++++-------- - qt4/src/poppler-qt4.h | 14 +++++++++----- - 3 files changed, 29 insertions(+), 13 deletions(-) - -commit 2b5d3277f36864ff1ef44f1942f22de247d67ab6 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Jun 1 17:23:45 2006 +0000 - - * qt/poppler-document.cc: - * qt/poppler-qt.h: Add printing support, patch by - Stefan Kebekus <stefan.kebekus@math.uni-koeln.de> - - ChangeLog | 6 ++++++ - qt/poppler-document.cc | 18 ++++++++++++++++++ - qt/poppler-qt.h | 2 ++ - 3 files changed, 26 insertions(+) - -commit 5380d005b7b54cc6587ce6e8c3bbb358da5cd9a5 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Thu Jun 1 06:42:25 2006 +0000 - - 2006-06-01 Jeff Muizelaar <jeff@infidigm.net> - - * poppler/PSOutputDev.cc: - * poppler/PSOutputDev.h: Change filename parameter to - PSOutputDev - constructor from char * to const char *. - - ChangeLog | 6 ++++++ - poppler/PSOutputDev.cc | 2 +- - poppler/PSOutputDev.h | 2 +- - 3 files changed, 8 insertions(+), 2 deletions(-) - -commit c2a81ea8b01f3943a2eb737cf957acc0d05f7eed -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed May 31 20:14:04 2006 +0000 - - * poppler/SplashOutputDev.cc: - * splash/Splash.cc: Fix no splashModeRGB8Qt mode, that is, - make it - show images - - I'm sorry, really, i'll try to do better - - ChangeLog | 6 ++++++ - poppler/SplashOutputDev.cc | 10 ++++++++++ - splash/Splash.cc | 3 +++ - 3 files changed, 19 insertions(+) - -commit 643b310cf51474b6dfc077fe086ea121e807f6e1 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Wed May 31 19:18:28 2006 +0000 - - 2006-05-31 Jeff Muizelaar <jeff@infidigm.net> - - * TODO: Remove items's from my list that are done. - - ChangeLog | 4 ++++ - TODO | 3 --- - 2 files changed, 4 insertions(+), 3 deletions(-) - -commit 96e582721dcb15ea258b989c7c500084bff9f56d -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Wed May 31 17:31:49 2006 +0000 - - 2006-05-31 Jeff Muizelaar <jeff@infidigm.net> - - * poppler/CairoOutputDev.cc: - * poppler/CairoOutputDev.h: Change the cairo backend to - use the - transformation in cairo instead of doing all of the - transformations in - the OutputDevice. Fixes #6948. - - ChangeLog | 7 ++ - poppler/CairoOutputDev.cc | 200 - ++++++++++++++++++++-------------------------- - poppler/CairoOutputDev.h | 1 + - 3 files changed, 96 insertions(+), 112 deletions(-) - -commit 00ffb9bf50b6b3b2e8eaa8af593aaa01d4a62a34 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Wed May 31 04:53:27 2006 +0000 - - 2006-05-31 Kristian Høgsberg <krh@redhat.com> - - * NEWS: Sum up changes. - - * configure.ac: Bump release to 0.5.3. - - ChangeLog | 6 ++++++ - NEWS | 8 ++++++++ - configure.ac | 2 +- - 3 files changed, 15 insertions(+), 1 deletion(-) - -commit 223a4bf3a679f666b6c963a8787cf5b5ac75c4b6 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Wed May 31 02:02:54 2006 +0000 - - 2006-05-30 Kristian Høgsberg <krh@redhat.com> - - * poppler-glib.pc.in: - * configure.ac: Add poppler as a private requires if - pkg-config - supports it. - - ChangeLog | 6 ++++++ - configure.ac | 11 +++++++++++ - poppler-glib.pc.in | 3 ++- - 3 files changed, 19 insertions(+), 1 deletion(-) - -commit 7aaa4d3fbdb8ea2534d3cb80e68b2759b2e8fd2f -Author: Kristian Høgsberg <krh@redhat.com> -Date: Tue May 30 21:46:06 2006 +0000 - - 2006-05-30 Kristian Høgsberg <krh@redhat.com> - - * test/gtk-cairo-test.cc: Add --page option to gtk-cairo-test. - - ChangeLog | 4 ++++ - test/gtk-cairo-test.cc | 21 ++++++++++++++++++--- - 2 files changed, 22 insertions(+), 3 deletions(-) - -commit f7c1d519b9695ad8adfdcf3af696de746cdcf375 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Mon May 29 18:44:17 2006 +0000 - - 2006-05-29 Jeff Muizelaar <jeff@infidigm.net> - - * poppler/CairoFontEngine.cc: - * poppler/CairoFontEngine.h: - * poppler/CairoOutputDev.cc: Allow CairoFont creation to - fail more - gracefully. Fixes #4030. - - ChangeLog | 7 +++++++ - poppler/CairoFontEngine.cc | 27 +++++++++++++++++++++------ - poppler/CairoFontEngine.h | 4 +++- - poppler/CairoOutputDev.cc | 5 +++++ - 4 files changed, 36 insertions(+), 7 deletions(-) - -commit 84861800dad3649d4757d5c5539b9e86e2b2c644 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Sat May 27 17:27:37 2006 +0000 - - 2006-05-27 Jeff Muizelaar <jeff@infidigm.net> - - * poppler/CairoOutputDev.cc: - * poppler/CairoOutputDev.h: Back out the rest of krh's type3 - font work. This fixes type3 fonts in CairoOutputDevice. - - ChangeLog | 6 ++++++ - poppler/CairoOutputDev.cc | 3 +++ - poppler/CairoOutputDev.h | 2 +- - 3 files changed, 10 insertions(+), 1 deletion(-) - -commit 6f5a89a0a2cf17d45d1c31ce105829be8c7ac456 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue May 23 20:49:16 2006 +0000 - - * poppler/SplashOutputDev.cc: - * qt4/src/poppler-private.h: - * splash/Splash.cc: - * splash/SplashBitmap.cc: - * splash/SplashTypes.h: bring splashModeRGB8 back to the - old code - (before Frank's patch), create splashModeRGB8Qt that has - Frank's - codepath and is used by Qt frontends. Fixes corruption on - other programs expecting the old behaviour. - - Remember dude we are now a lib! you can not change behaviour from - one day to another! - - /me hits himself - - ChangeLog | 11 +++ - poppler/SplashOutputDev.cc | 8 +++ - qt/poppler-private.h | 2 +- - qt4/src/poppler-private.h | 2 +- - splash/Splash.cc | 169 - +++++++++++++++++++++++++++++++++++++++++++++ - splash/SplashBitmap.cc | 26 ++++++- - splash/SplashTypes.h | 2 + - 7 files changed, 216 insertions(+), 4 deletions(-) - -commit 495d592c3ba7fe81e03774f5b2ed677e5aa560c7 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Tue May 23 19:16:37 2006 +0000 - - 2006-05-23 Kristian Høgsberg <krh@redhat.com> - - * qt4/src/Makefile.am (libpoppler_qt4_la_SOURCES): Add missing - - ChangeLog | 5 +++++ - qt4/src/Makefile.am | 1 + - 2 files changed, 6 insertions(+) - -commit eecd06c86585bca05c99cd2e9a1b1ff3bbae3c72 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Mon May 22 20:19:35 2006 +0000 - - 2006-05-22 Kristian Høgsberg <krh@redhat.com> - - * configure.ac: Bump release. - * NEWS: Sum up changes. - - ChangeLog | 5 +++++ - NEWS | 11 ++++++++++- - configure.ac | 2 +- - 3 files changed, 16 insertions(+), 2 deletions(-) - -commit 680f20dfd1cf0342d49516b3848a2aef5d2a3883 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Mon May 22 19:58:41 2006 +0000 - - 2006-05-22 Kristian Høgsberg <krh@redhat.com> - - Patch from Rainer Keller to fix the ImageOutputDev (#6984). - - * utils/ImageOutputDev.cc (drawImage): Upate to work with new - 16-bit color representation. - - * utils/ImageOutputDev.h: Return gTrue for needNonText(). - - ChangeLog | 9 +++++++++ - NEWS | 4 ++++ - utils/ImageOutputDev.cc | 6 +++--- - utils/ImageOutputDev.h | 2 +- - 4 files changed, 17 insertions(+), 4 deletions(-) - -commit e43a06bf6e953fa9af18476e2c9f27106398c09c -Author: Kristian Høgsberg <krh@redhat.com> -Date: Sun May 21 23:26:45 2006 +0000 - - 2006-05-21 Kristian Høgsberg <krh@redhat.com> - - * poppler/CairoFontEngine.cc: - * poppler/CairoFontEngine.h: Back out type3 font work - committed by - accident. - - ChangeLog | 6 + - poppler/CairoFontEngine.cc | 347 - +++++---------------------------------------- - poppler/CairoFontEngine.h | 17 +-- - 3 files changed, 47 insertions(+), 323 deletions(-) - -commit 7d4bb0533f88f06449ebd64c1220d0b75001937d -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun May 21 18:14:15 2006 +0000 - - fix all is blue issue on ppc machines - - ChangeLog | 7 +++++++ - qt/poppler-page.cc | 17 +++++++++++++++++ - qt4/src/poppler-page.cc | 17 +++++++++++++++++ - 3 files changed, 41 insertions(+) - -commit 655af1e0126ca96d75c9c718d7d8f928c898b1f6 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun May 21 17:19:53 2006 +0000 - - hope to fix really Kouhei's name now - - ChangeLog | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -commit cc783a1ebe868ff75db5472775dabe0020ae501f -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun May 21 11:54:30 2006 +0000 - - Fix Kouhei name - - ChangeLog | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit e4b6ad3bb873a6f334934921e6d56e9d26e06a9a -Author: Kristian Høgsberg <krh@redhat.com> -Date: Fri May 19 22:55:49 2006 +0000 - - Add bug number to ChangeLog entry. - - ChangeLog | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 46f5f070cceb2c0f3b53537c8e33340b9f1bba38 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Fri May 19 22:26:03 2006 +0000 - - 2006-05-19 Kristian Høgsberg <krh@redhat.com> - - * glib/poppler-action.h: - * glib/poppler-action.cc: Add poppler_dest_get_type(), - patch from - Kouhei Souto (#6907). - - ChangeLog | 4 ++++ - glib/poppler-action.cc | 13 +++++++++++++ - glib/poppler-action.h | 4 ++++ - 3 files changed, 21 insertions(+) - -commit 875dc5b112dfe2d4a48a7567b1ff79257447cc0d -Author: Kristian Høgsberg <krh@redhat.com> -Date: Fri May 19 22:21:35 2006 +0000 - - 2006-05-19 Kristian Høgsberg <krh@redhat.com> - - * poppler-glib.pc.in (Requires): Add gdk-2.0 dependency, from - Kouhei Souto (#6896). - - ChangeLog | 3 +++ - poppler-glib.pc.in | 2 +- - 2 files changed, 4 insertions(+), 1 deletion(-) - -commit b66dda2640c088bbe205f698a0c4028144027922 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Fri May 19 22:19:21 2006 +0000 - - 2006-05-19 Kristian Høgsberg <krh@redhat.com> - - * glib/poppler-document.h (POPPLER_TYPE_INDEX_ITER) - (POPPLER_TYPE_FONTS_ITER): Add these macros, patch from Kouhei - Souto (#6897). - - ChangeLog | 4 ++++ - glib/poppler-document.h | 2 ++ - 2 files changed, 6 insertions(+) - -commit 095730456c0d8312067af10dd55a3b9165a83736 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Fri May 19 22:16:25 2006 +0000 - - 2006-05-19 Kristian Høgsberg <krh@redhat.com> - - * glib/Makefile.am (INCLUDES): Add define for G_LOG_DOMAIN, - from - Kouhei Souto (#6899). - - ChangeLog | 3 +++ - glib/Makefile.am | 1 + - 2 files changed, 4 insertions(+) - -commit b8d77633899c1dec5f3b9c9a0f075f39afa98965 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Fri May 19 22:12:38 2006 +0000 - - 2006-05-19 Kristian Høgsberg <krh@redhat.com> - - * glib/poppler-document.cc (poppler_document_save): - Memleak patch - from Paolo Borelli (#6908). - - ChangeLog | 5 +++++ - glib/poppler-document.cc | 2 ++ - 2 files changed, 7 insertions(+) - -commit 488f77298fee9eebbca5983c1c9fb186b3b67aa3 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Fri May 19 22:04:17 2006 +0000 - - 2006-05-19 Kristian Høgsberg <krh@redhat.com> - - * TextOutputDev.h: - * TextOutputDev.cc: - * UnicodeTypeTable.h: - * UnicodeTypeTable.cc: - * UnicodeCClassTables.h: - * UnicodeCompTables.h: - * UnicodeDecompTables.h: - * gen-unicode-tables.py: Patch from Ed Catmur (#2929) - to convert - search string and document text to unicode NFKC (compatibility - composition) before matching so ligatures match correctly. - - ChangeLog | 13 + - poppler/Makefile.am | 5 + - poppler/TextOutputDev.cc | 41 +- - poppler/TextOutputDev.h | 3 + - poppler/UnicodeCClassTables.h | 1827 +++++++++ - poppler/UnicodeCompTables.h | 665 ++++ - poppler/UnicodeDecompTables.h | 8526 - +++++++++++++++++++++++++++++++++++++++++ - poppler/UnicodeTypeTable.cc | 235 ++ - poppler/UnicodeTypeTable.h | 3 + - 9 files changed, 11303 insertions(+), 15 deletions(-) - -commit ecb942e54a1ab0f7eded91b7d1278f0ac62e2071 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Fri May 19 21:42:54 2006 +0000 - - 2006-05-19 Kristian Høgsberg <krh@redhat.com> - - * glib/poppler-page.cc (poppler_page_prepare_output_dev): - Fix the - rotation bug for real. - - ChangeLog | 5 +++++ - glib/poppler-page.cc | 16 +++++++++------- - 2 files changed, 14 insertions(+), 7 deletions(-) - -commit 28ae789afe0625a641525e4a0768d51fa8bd667c -Author: Kristian Høgsberg <krh@redhat.com> -Date: Fri May 19 20:54:13 2006 +0000 - - 2006-05-19 Kristian Høgsberg <krh@redhat.com> - - Patch from Kouhei Sutou (#6905). - - * glib/poppler-document.cc: - * glib/poppler-document.h: - * glib/poppler-private.h: - * glib/reference/tmpl/poppler-private.sgml: - * glib/reference/tmpl/poppler.sgml: Make PopplerPSOutput - a proper - glib object. - - ChangeLog | 11 +++++++ - glib/poppler-document.cc | 51 - ++++++++++++++++++++++++++------ - glib/poppler-document.h | 4 +++ - glib/poppler-private.h | 2 ++ - glib/reference/tmpl/poppler-private.sgml | 1 + - glib/reference/tmpl/poppler.sgml | 1 + - 6 files changed, 61 insertions(+), 9 deletions(-) - -commit 02cf7fd7df0b2d8c2b1c6f108e581bc1c7a973b1 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Fri May 19 20:35:43 2006 +0000 - - 2006-05-19 Kristian Høgsberg <krh@redhat.com> - - * glib/poppler-page.cc (poppler_page_prepare_output_dev): Fix - rotation bug (#6913, #6926). - - ChangeLog | 3 +++ - glib/poppler-page.cc | 12 +++++++++++- - 2 files changed, 14 insertions(+), 1 deletion(-) - -commit 78ae3efd9541d7b63ff5a2c4de3fde300806688f -Author: Kristian Høgsberg <krh@redhat.com> -Date: Fri May 19 19:21:59 2006 +0000 - - 2006-05-19 Kristian Høgsberg <krh@redhat.com> - - Memory leak patch from Carlos Garcia Campos (#6947). - - * glib/poppler-action.cc: - * glib/poppler-document.cc: - * glib/poppler-page.cc: - * poppler/CairoFontEngine.cc: - * poppler/CairoFontEngine.h: - * poppler/CairoOutputDev.cc: - * poppler/CairoOutputDev.h: - * poppler/Gfx.cc: - * poppler/TextOutputDev.cc: Fix various memory leaks. - - ChangeLog | 14 ++ - glib/poppler-action.cc | 9 +- - glib/poppler-document.cc | 31 +++- - glib/poppler-page.cc | 2 + - poppler/CairoFontEngine.cc | 347 - ++++++++++++++++++++++++++++++++++++++++----- - poppler/CairoFontEngine.h | 17 ++- - poppler/CairoOutputDev.cc | 5 +- - poppler/CairoOutputDev.h | 2 +- - poppler/Gfx.cc | 1 + - poppler/TextOutputDev.cc | 9 ++ - 10 files changed, 381 insertions(+), 56 deletions(-) - -commit 354c1926b7181fd668f221e1d672974e04fda747 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri May 19 17:24:19 2006 +0000 - - * qt4/src/poppler-link.cc: Patch by Pino Toscano, ensure the - splashoutput is created when parsing the TOC. - - ChangeLog | 5 +++++ - qt4/src/poppler-link.cc | 5 +++-- - 2 files changed, 8 insertions(+), 2 deletions(-) - -commit 3c9a5f37704781c9a51e72edd18451870452b9a7 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun May 14 16:11:54 2006 +0000 - - * poppler/FontInfo.cc: Fix possible crash, half patch - by Kouhei Sutou <kou@cozmixng.org> - - ChangeLog | 5 +++++ - poppler/FontInfo.cc | 4 ++-- - 2 files changed, 7 insertions(+), 2 deletions(-) - -commit 436f578fe762e8ceccce95a0f2003406527dde64 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat May 13 16:01:57 2006 +0000 - - * poppler/GfxState.cc: - * poppler/GfxState.h: Fix memleak, patch by - Carlos Garcia Campos <carlosgc@gnome.org> - - ChangeLog | 6 ++++++ - poppler/GfxState.cc | 8 ++++++++ - poppler/GfxState.h | 3 +-- - 3 files changed, 15 insertions(+), 2 deletions(-) - -commit 906515769097f2e38f6b2c2aff598919b9d1ee0d -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat May 13 15:58:37 2006 +0000 - - * qt4/src/poppler-document.cc: leak-- - * qt4/src/poppler-private.h: Refcount globalparams - * qt4/tests/test-poppler-qt4.cpp: Some leaks less - - ChangeLog | 6 ++++++ - qt4/src/poppler-document.cc | 10 +++++----- - qt4/src/poppler-private.h | 8 ++++++++ - qt4/tests/test-poppler-qt4.cpp | 6 ++++-- - 4 files changed, 23 insertions(+), 7 deletions(-) - -commit 46fd63c44369c882d8dac473d4156001d9d4ed18 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat May 13 11:14:24 2006 +0000 - - numbers for easier casting - - qt4/src/poppler-link.h | 14 ++++++++++++-- - 1 file changed, 12 insertions(+), 2 deletions(-) - -commit 35500375e3f790c444ab7e7d0a687d270c5a66b1 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri May 12 21:02:01 2006 +0000 - - fixing compile problems for some people - - qt4/src/poppler-page.cc | 6 ++++++ - 1 file changed, 6 insertions(+) - -commit 181f09829cf4831965059e3064114d83348c51b5 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri May 12 20:40:05 2006 +0000 - - * qt4/src/Makefile.am - * qt4/src/poppler-annotation-helper.h - * qt4/src/poppler-annotation.cc - * qt4/src/poppler-annotation.h - * qt4/src/poppler-link.cc - * qt4/src/poppler-link.h - * qt4/src/poppler-page.cc - * qt4/src/poppler-qt4.h: Code for annotations stripped - from oKular, - it's all based on Enrico's work, so ask him for details, - the problem - is that he left KDE development a while ago. - - ChangeLog | 14 + - qt4/src/Makefile.am | 2 + - qt4/src/poppler-annotation-helper.h | 213 ++++++++++ - qt4/src/poppler-annotation.cc | 792 - ++++++++++++++++++++++++++++++++++++ - qt4/src/poppler-annotation.h | 257 ++++++++++++ - qt4/src/poppler-link.cc | 4 +- - qt4/src/poppler-link.h | 2 +- - qt4/src/poppler-page.cc | 691 +++++++++++++++++++++++++++++++ - qt4/src/poppler-qt4.h | 8 +- - 9 files changed, 1980 insertions(+), 3 deletions(-) - -commit 3a48e89dfbe54af73a68ed8e917938f14ad17f01 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue May 9 20:07:06 2006 +0000 - - * qt4/src/Makefile.am: - * qt4/src/poppler-document.cc: - * qt4/src/poppler-link.cc: - * qt4/src/poppler-page.cc: - * qt4/src/poppler-private.h: - * qt4/src/poppler-qt4.h: Adding links extraction code, - should work as - it is basically stripped out from kpdf, but comments are - obviously welcome as always - - ChangeLog | 10 +++ - qt4/src/Makefile.am | 1 + - qt4/src/poppler-document.cc | 13 +--- - qt4/src/poppler-link.cc | 129 ++++++++++++++++++++++++++++++-- - qt4/src/poppler-link.h | 178 - ++++++++++++++++++++++++++++++++++++++++++++ - qt4/src/poppler-page.cc | 139 ++++++++++++++++++++++++++++++---- - qt4/src/poppler-private.h | 9 ++- - qt4/src/poppler-qt4.h | 56 +++----------- - 8 files changed, 456 insertions(+), 79 deletions(-) - -commit f628e1506e576a8553a9699c1d7f05ef55c24fa2 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon May 8 19:03:51 2006 +0000 - - memleak-- by carlos - - ChangeLog | 5 +++++ - poppler/Catalog.cc | 5 ++++- - 2 files changed, 9 insertions(+), 1 deletion(-) - -commit 1fce6266564583d356817a21f43c6b1ad8ce3716 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat May 6 10:57:07 2006 +0000 - - fix code, i suck - - qt4/src/poppler-page.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit be913b90d59da35a347498b86fdd3edb065aef23 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri May 5 20:51:01 2006 +0000 - - * poppler/Function.cc: quick fix for KDE bug #126760 - - Better solutions are of course accepted - - ChangeLog | 4 ++++ - poppler/Function.cc | 2 +- - 2 files changed, 5 insertions(+), 1 deletion(-) - -commit 2b085293bd73b4e77da848b3fe63a7e82e9ba5e5 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu May 4 19:10:55 2006 +0000 - - * qt4/src/poppler-qt4.h: - * qt4/src/poppler-page.cc: Implement search functionality - - more code to make oKular qt4popplered possible, probably not most - quickest code around, feel free to comment/optimize - - ChangeLog | 5 +++++ - qt4/src/poppler-page.cc | 43 +++++++++++++++++++++++++++++++++++++++++++ - qt4/src/poppler-qt4.h | 16 ++++++++++++++++ - 3 files changed, 64 insertions(+) - -commit a9b0c7977aba7bc85a8673c7f95187ff17ee4173 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Tue May 2 04:38:39 2006 +0000 - - 2006-05-02 Kristian Høgsberg <krh@redhat.com> - - * glib/poppler-page.cc: - * poppler/Gfx.cc: - * poppler/GfxFont.cc: - * poppler/GfxFont.h: - * poppler/GfxState.cc: - * poppler/TextOutputDev.cc: Patch from Gary Coady to add - reference - counting to GfxFont so we don't crash on text selection. - - ChangeLog | 10 ++++++++++ - glib/poppler-page.cc | 2 +- - poppler/Gfx.cc | 2 ++ - poppler/GfxFont.cc | 14 +++++++++++++- - poppler/GfxFont.h | 4 ++++ - poppler/GfxState.cc | 7 +++++++ - poppler/TextOutputDev.cc | 1 + - 7 files changed, 38 insertions(+), 2 deletions(-) - -commit 57af0207334ff1a407899370281ebb90fe953a32 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon May 1 18:33:47 2006 +0000 - - * qt4/src/poppler-page.cc: - * qt4/src/poppler-private.h: - * qt4/src/poppler-qt4.h: - * qt4/src/poppler-textbox.cc: Add nextWord(), hasSpaceAfter() - and - edge() to TextBox - - More things to make poppler-qt4Okular nearer - - ChangeLog | 8 ++++++++ - qt4/src/poppler-page.cc | 14 ++++++++++++++ - qt4/src/poppler-private.h | 11 +++++++++++ - qt4/src/poppler-qt4.h | 8 ++++++++ - qt4/src/poppler-textbox.cc | 23 ++++++++++++++++------- - 5 files changed, 57 insertions(+), 7 deletions(-) - -commit 61b126390f764fd38c79b6a64160a7dc7870bd4a -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon May 1 13:41:14 2006 +0000 - - revert thing that should not have gone in - - poppler/PageLabelInfo.cc | 43 +++++++++++++++++++++++++++++++++++++++++++ - poppler/PageLabelInfo.h | 44 - -------------------------------------------- - 2 files changed, 43 insertions(+), 44 deletions(-) - -commit f2424ef63e86d82b2be277e2b268b48aae29601e -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon May 1 13:32:31 2006 +0000 - - * qt4/src/poppler-document.cc: - * qt4/src/poppler-private.h: - * qt4/src/poppler-qt4.h: Add the possibility of setting - the paper - color - - One step more to make oKular fully use the qt4 bindings - - ChangeLog | 7 +++++++ - poppler/PageLabelInfo.cc | 43 - ------------------------------------------- - poppler/PageLabelInfo.h | 44 - ++++++++++++++++++++++++++++++++++++++++++++ - qt4/src/poppler-document.cc | 10 ++++++++++ - qt4/src/poppler-private.h | 22 +++++++++++++++++----- - qt4/src/poppler-qt4.h | 6 ++++++ - 6 files changed, 84 insertions(+), 48 deletions(-) - -commit 4147400e2b692df7f70c3772e8a4b576d4d85294 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Apr 29 15:23:41 2006 +0000 - - Fix memory leak. Bug 6765 - - ChangeLog | 5 +++++ - poppler/JBIG2Stream.cc | 1 + - 2 files changed, 6 insertions(+) - -commit 960d60467d62d28f20b127d07e8de1af42eec568 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Thu Apr 27 17:26:36 2006 +0000 - - 2006-04-27 Jeff Muizelaar <jeff@infidigm.net> - - * poppler/CairoOutputDev.cc: delete imgStr if some of - the cairo - functions fail. Fixes coverty reports #2106, #2107, #2077 and - bug #6764. Patch by Kjartan Maraas. - - ChangeLog | 6 ++++++ - poppler/CairoOutputDev.cc | 34 +++++++++++++++++++++++++--------- - 2 files changed, 31 insertions(+), 9 deletions(-) - -commit 155112131c6e25bfde752cf5daa80a6c9712cfed -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Apr 23 15:50:52 2006 +0000 - - qt4/src/poppler-private.h: Protect us against a link not having - a destination or a namedDestination - - ChangeLog | 5 +++++ - qt4/src/poppler-private.h | 2 +- - 2 files changed, 6 insertions(+), 1 deletion(-) - -commit c902a3a22bcceedc8ee8ca377064efcc8a9178ca -Author: Brad Hards <bradh@frogmouth.net> -Date: Fri Apr 21 12:02:19 2006 +0000 - - Add another path to search for Qt4 libs and includes. - - CCMAIL: montel@kde.org - - m4/qt.m4 | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -commit 18f8e1f1d213dbcda27cd0ec429273801f65e208 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Apr 18 19:11:56 2006 +0000 - - * goo/GooVector.h: Fix typo that was preventing build with MSVC8 - Discovered by Reece Dunn <msclrhd@hotmail.com> - - ChangeLog | 5 +++++ - goo/GooVector.h | 4 ++-- - 2 files changed, 7 insertions(+), 2 deletions(-) - -commit cbbb28a5959343d20dffe945ea83272c0b2e287b -Author: Kristian Høgsberg <krh@redhat.com> -Date: Sun Apr 16 22:59:44 2006 +0000 - - 2006-04-16 Carlos Garcia Campos <carlosgc@gnome.org> - - * glib/poppler-action.cc: - * glib/poppler-action.h: - * glib/poppler-private.h: - * glib/poppler.h: - Add support for named destinations and named actions. - - * glib/poppler-document.cc: - * glib/poppler-document.h: - Allow to find named destinations in document. - - ChangeLog | 12 +++ - glib/poppler-action.cc | 152 - +++++++++++++++++++++++++----- - glib/poppler-action.h | 7 +- - glib/poppler-document.cc | 37 ++++++++ - glib/poppler-document.h | 4 +- - glib/poppler-private.h | 2 + - glib/poppler.h | 1 + - glib/reference/tmpl/poppler-action.sgml | 2 + - glib/reference/tmpl/poppler-document.sgml | 4 - - 9 files changed, 189 insertions(+), 32 deletions(-) - -commit 85687a1e0e4c6be2dbfb23ba00018b9c7c7454f5 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Wed Apr 12 06:52:07 2006 +0000 - - 2006-04-12 Jeff Muizelaar <jeff@infidigm.net> - - * poppler/CairoOutputDev.cc: - * poppler/CairoOutputDev.h: Add support for masked images - to the cairo - backend. CairoOutputDevice really should have been refactored - before - committing this, but the results were so pretty I couldn't - resist. - Fixes #6174. - - ChangeLog | 8 ++++ - poppler/CairoOutputDev.cc | 118 - ++++++++++++++++++++++++++++++++++++++++++++++ - poppler/CairoOutputDev.h | 8 ++++ - 3 files changed, 134 insertions(+) - -commit 6039d4fc65cb25bef20efa29bc29d42086fc0854 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Wed Apr 12 05:46:44 2006 +0000 - - 2006-04-12 Jeff Muizelaar <jeff@infidigm.net> - - * poppler/CairoOutputDev.cc: Fix breakage by krh by only - calling - cairo_destroy on non-null. - - ChangeLog | 5 +++++ - poppler/CairoOutputDev.cc | 4 +++- - 2 files changed, 8 insertions(+), 1 deletion(-) - -commit d839a0bd78361930e5e2fe889df12e1e853ffed3 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Wed Apr 12 02:07:07 2006 +0000 - - 2006-04-11 Kristian Høgsberg <krh@redhat.com> - - * configure.ac: - * poppler-glib.pc.in: - * glib/Makefile.am: - * glib/poppler-page.cc: - * glib/poppler-page.h: - * glib/poppler.h: - * poppler/CairoOutputDev.cc: - * poppler/CairoOutputDev.h: - * glib/poppler-features.h.in: - Make the CairoOutputDev render to a cairo_t instead of a - cairo_surface_t and expose that functionality in the glib - wrapper - (poppler_page_render). - - * test/Makefile.am: - * test/gtk-cairo-test.cc: - Update gtk-cairo-test to use this new interface and add a spin - button for changing page (#5951). - - * utils/Makefile.am (EXTRA_DIST): Fix warning where this was - assigned twice. - - ChangeLog | 23 ++++ - configure.ac | 8 ++ - glib/Makefile.am | 10 +- - glib/poppler-features.h.in | 24 ++++ - glib/poppler-page.cc | 63 +++++++--- - glib/poppler-page.h | 10 ++ - glib/poppler.h | 1 + - poppler-glib.pc.in | 2 +- - poppler/CairoOutputDev.cc | 23 ++-- - poppler/CairoOutputDev.h | 6 +- - test/Makefile.am | 4 +- - test/gtk-cairo-test.cc | 286 - ++++++++++++++------------------------------- - utils/Makefile.am | 6 +- - 13 files changed, 221 insertions(+), 245 deletions(-) - -commit b198c9801c668014c0979c57033a0637e7e046e2 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Mon Apr 10 18:12:44 2006 +0000 - - 2006-04-10 Jeff Muizelaar <jeff@infidigm.net> - - * poppler/CairoOutputDev.cc: take originX and originY into - account in - drawChar() to draw vertical text properly. Fixes #6551. - - ChangeLog | 5 +++++ - poppler/CairoOutputDev.cc | 2 +- - 2 files changed, 6 insertions(+), 1 deletion(-) - -commit fd251f52efc7748fda91cc77fb9d3966e0f02ac8 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Apr 9 11:05:51 2006 +0000 - - m4/qt.m4: Improve for systems that need -pthread to be linked when - linking Qt. Patch by Diego Pettenò - - ChangeLog | 5 +++++ - m4/qt.m4 | 28 +++++++++++++++++++++++++++- - 2 files changed, 32 insertions(+), 1 deletion(-) - -commit 36de9747153a2ea9b3cf86c41e75a521441a2e06 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Apr 8 10:44:43 2006 +0000 - - * poppler/Makefile.am: - * qt4/src/Makefile.am: Don't link Qt4 in libpoppler when using - Qt4 frontend - Patch by Stefan Schweizer - - ChangeLog | 6 ++++++ - poppler/Makefile.am | 11 +++++------ - qt4/src/Makefile.am | 1 + - 3 files changed, 12 insertions(+), 6 deletions(-) - -commit bf7afe161d76c50fd1c480eb236607145782e59d -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Apr 5 18:20:56 2006 +0000 - - poppler/JBIG2Stream.cc: Fix for some buggy JBIG2 documents, patch - by Raj Kumar and Paul Walmsley. Fixes bug 6500 - - ChangeLog | 5 +++++ - poppler/JBIG2Stream.cc | 43 +++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 48 insertions(+) - -commit 315f8e488d3db848f88a06c7568b6583bbf0e432 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Wed Apr 5 17:20:56 2006 +0000 - - 2006-04-05 Jeff Muizelaar <jeff@infidigm.net> - - * poppler/CairoOutputDev.cc: use a separate matrix for - the softmask. - fixes #6492. - - ChangeLog | 5 +++++ - poppler/CairoOutputDev.cc | 11 ++++++++++- - 2 files changed, 15 insertions(+), 1 deletion(-) - -commit 0d311518f678a479c1efeaec15011e0a34de80fc -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Apr 4 21:01:01 2006 +0000 - - * splash/Splash.cc: - * splash/SplashBitmap.cc: Make Splashbitmap RGB8 use 32bits - internally - * qt/poppler-page.cc: - * qt4/src/poppler-page.cc: Adapt to splashbitmap change so - copying to - QImage is faster. - Patch by Frank Meerkötter slightly modified by Albert - Astals Cid - - I'll leave adapting the glib frontend for you guys, i tried to adapt - it but i got lost at gdk_pixbuf_get_n_channels (pixbuf); - - ChangeLog | 9 ++++++ - qt/poppler-page.cc | 18 ++++------- - qt4/src/poppler-page.cc | 15 ++++----- - splash/Splash.cc | 81 - +++++++++++++++++++++++++------------------------ - splash/SplashBitmap.cc | 10 +++--- - 5 files changed, 67 insertions(+), 66 deletions(-) - -commit 888bd41b42507f0a1af55c55495d31d802ce7706 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Apr 4 20:42:08 2006 +0000 - - Fix crash when using fixedpoint math. Patch by Frank Meerkoetter - - ChangeLog | 5 +++++ - splash/SplashFTFont.cc | 2 +- - 2 files changed, 6 insertions(+), 1 deletion(-) - -commit 56c98450160b639790931226a045ce4712e7d45e -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Apr 2 18:07:59 2006 +0000 - - Improvements to the Qt4 frontend, comments welcome - - ChangeLog | 7 +++ - m4/qt.m4 | 4 +- - qt4/src/Makefile.am | 1 + - qt4/src/poppler-document.cc | 85 +++++++++++++++++++++------ - qt4/src/poppler-link.cc | 138 - ++++++++++++++++++++++++++++++++++++++++++++ - qt4/src/poppler-page.cc | 9 ++- - qt4/src/poppler-private.h | 95 +++++++++++++++++++++++++++++- - qt4/src/poppler-qt4.h | 86 ++++++++++++++++++++++++--- - 8 files changed, 395 insertions(+), 30 deletions(-) - -commit c80ebf237e9c6232a1d0567a2688a294acfd481b -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Apr 1 11:25:57 2006 +0000 - - Fix bug 6454 - - ChangeLog | 5 +++++ - poppler/XRef.cc | 22 +++++++++++++--------- - 2 files changed, 18 insertions(+), 9 deletions(-) - -commit fe8142fbc12127682b8024673fe1af57b47bb5c9 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Tue Mar 21 04:25:53 2006 +0000 - - 2006-03-20 Jeff Muizelaar <jeff@infidigm.net> - - * glib/poppler-page.cc: Avoid strdup in - poppler_page_get_property and - make code cleaner. Combined with the memleak fix closes #6187. - Patch by chpe. - - ChangeLog | 6 ++++++ - glib/poppler-page.cc | 5 +---- - 2 files changed, 7 insertions(+), 4 deletions(-) - -commit 4f961df2e6e91a0dc0a024ae5acdefa394179a05 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Tue Mar 21 04:19:18 2006 +0000 - - 2006-03-20 Jeff Muizelaar <jeff@infidigm.net> - - * glib/poppler-page.cc: Fix memory leak in - poppler_page_get_text - Patch by chpe. - - ChangeLog | 5 +++++ - glib/poppler-page.cc | 2 +- - 2 files changed, 6 insertions(+), 1 deletion(-) - -commit ff4febab0a519732972c21bf76d7693c98265e0f -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Mar 20 20:07:36 2006 +0000 - - Use UGooString for dates, fixes KDE bug 123938 - - ChangeLog | 6 ++++++ - qt/poppler-document.cc | 2 +- - qt4/src/poppler-document.cc | 2 +- - 3 files changed, 8 insertions(+), 2 deletions(-) - -commit 75ac6de8cd651b1cbe2d6a7ffa4574097088041f -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Mon Mar 20 19:12:29 2006 +0000 - - 2006-03-20 Carlos Garcia Campos <calosgc@gnome.org> - - reviewed by: Jeff Muizelaar <jeff@infidigm.net> - - * glib/poppler-document.cc: Fix memory leak in - poppler_font_info_free - - ChangeLog | 6 ++++++ - glib/poppler-document.cc | 2 +- - 2 files changed, 7 insertions(+), 1 deletion(-) - -commit 784f6d9a0888dab34c586ffe14db8e55b8a11f51 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Mon Mar 20 19:02:10 2006 +0000 - - 2006-03-20 Jeff Muizelaar <jeff@infidigm.net> - - * poppler/CairoFontEngine.h: remove unused variables - - ChangeLog | 4 ++++ - poppler/CairoFontEngine.h | 1 - - 2 files changed, 4 insertions(+), 1 deletion(-) - -commit 847436779d7c82b428acfd6339130228bfadca24 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Mar 19 19:19:42 2006 +0000 - - fix date - - ChangeLog | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 401bae69cc7ade676cacd89b483f0a93a653c7a1 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Mar 19 17:01:05 2006 +0000 - - fix htmloutputdev - - ChangeLog | 4 ++++ - utils/HtmlOutputDev.cc | 2 +- - utils/HtmlOutputDev.h | 2 +- - 3 files changed, 6 insertions(+), 2 deletions(-) - -commit d56330e688c0a40b4e206ed3bbddd06d7f3ee66c -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Mar 16 22:04:56 2006 +0000 - - * poppler/Page.cc: Remove a #ifdef that was never defined - (nice to - have so sucky W args), probably came from gpdf (it's not - on xpdf - sources) and was causing bugs 6079 and 6167 - - Might be worth backporting to the stable branch - - ChangeLog | 8 +++++++- - poppler/Page.cc | 2 -- - 2 files changed, 7 insertions(+), 3 deletions(-) - -commit 7ed6737b00ece7ca00cee1d148752b11700370e6 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Mar 16 19:21:11 2006 +0000 - - poppler/FontInfo.cc: Embedded fonts don't have a font file - - ChangeLog | 4 ++++ - poppler/FontInfo.cc | 20 ++++++++++++-------- - 2 files changed, 16 insertions(+), 8 deletions(-) - -commit a34688ee29e1cdfcbaca232cf005af55af87f796 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Mar 14 19:34:10 2006 +0000 - - * qt4/src/poppler-qt4.h: Fix compilation with gcc4.1, patch by - Michael Olbrich - - ChangeLog | 5 +++++ - qt4/src/poppler-qt4.h | 10 +++++----- - 2 files changed, 10 insertions(+), 5 deletions(-) - -commit 1a90b3aaf6be4ca3ebb47e904842b1e14a0e8dfc -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Mar 11 15:19:02 2006 +0000 - - * poppler/FontInfo.cc: - * poppler/FontInfo.h: Add getFile() function that returns - the path of the font that is beign used in the system to - represent that font - * qt4/src/poppler-document.cc: - * qt4/src/poppler-fontinfo.cc: - * qt4/src/poppler-private.h: - * qt4/src/poppler-qt4.h: Add the file() function - * qt4/tests/poppler-fonts.cpp: Show the path of the font - used to represent each font - - May be interesting to have in the other frontends - - ChangeLog | 13 +++++++++++++ - poppler/FontInfo.cc | 10 ++++++++++ - poppler/FontInfo.h | 2 ++ - qt4/src/poppler-document.cc | 14 +------------- - qt4/src/poppler-fontinfo.cc | 29 +++++++++-------------------- - qt4/src/poppler-private.h | 29 +++++++++++++++++++++++++++++ - qt4/src/poppler-qt4.h | 8 ++++++-- - qt4/tests/poppler-fonts.cpp | 5 +++-- - 8 files changed, 73 insertions(+), 37 deletions(-) - -commit 22b1618185ec70895ec644d9e590c266ff98c9db -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Mar 9 21:56:07 2006 +0000 - - Build with cairo disabled, patch by Eduardo de Barros Lima - - ChangeLog | 5 +++++ - glib/Makefile.am | 2 +- - 2 files changed, 6 insertions(+), 1 deletion(-) - -commit 50ecfadab36a9769b09e4c2c1670d86448a0e1ee -Author: Kristian Høgsberg <krh@redhat.com> -Date: Tue Feb 28 23:24:59 2006 +0000 - - 2006-02-28 Kristian Høgsberg <krh@redhat.com> - - * configure.ac: Bump release to 0.5.1. - - * NEWS: Sum up 0.5.1 changes so far. - - * TextOutputDev.h: add getters for a couple of attributes. - - * glib/Makefile.am: - * poppler/Makefile.am: Move cairo link dependency to glib - bindings. - - ChangeLog | 11 +++++++++++ - NEWS | 10 ++++++++++ - configure.ac | 2 +- - glib/Makefile.am | 11 ++++++----- - poppler/Makefile.am | 19 ++++++++----------- - poppler/TextOutputDev.h | 7 +++++-- - qt/Makefile.am | 1 + - test/Makefile.am | 16 +++++++++------- - utils/Makefile.am | 29 +++++++++++++++++------------ - 9 files changed, 68 insertions(+), 38 deletions(-) - -commit b9e951ac68b9977ab7217ad0346bcf46a3fa3dfe -Author: Kristian Høgsberg <krh@redhat.com> -Date: Tue Feb 28 19:59:58 2006 +0000 - - 2006-02-28 Kristian Høgsberg <krh@redhat.com> - - * goo/gmem.c: (gmalloc), (grealloc): - * poppler/JBIG2Stream.cc: - * poppler/Stream.cc: - * poppler/Stream.h: - * splash/SplashXPathScanner.cc: - - More integer overflow fixes from Derek Noonburg (#5922). - - ChangeLog | 10 ++++++++++ - goo/gmem.c | 9 +++++---- - poppler/JBIG2Stream.cc | 12 ++++++++++-- - poppler/Stream.cc | 7 +++++++ - poppler/Stream.h | 2 +- - 5 files changed, 33 insertions(+), 7 deletions(-) - -commit 46db73a142d65a0c944910388d5971debc06ecbf -Author: Kristian Høgsberg <krh@redhat.com> -Date: Tue Feb 28 18:31:59 2006 +0000 - - 2006-02-28 Kristian Høgsberg <krh@redhat.com> - - * poppler/PSOutputDev.cc: Make PSOutputDev constructor respect - passed in paper size (#5946, #5749). - - ChangeLog | 5 +++++ - poppler/PSOutputDev.cc | 14 ++++++++------ - 2 files changed, 13 insertions(+), 6 deletions(-) - -commit 0f7f2182b2abe965b382937f5569b65a8828fc93 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Tue Feb 28 18:25:00 2006 +0000 - - 2006-02-28 Kristian Høgsberg <krh@redhat.com> - - * glib/poppler-document.cc (info_dict_get_string): Refactor - _popper_goo_string_to_utf8() out into it's own function. - - * glib/poppler-page.cc (poppler_page_get_property): Use - _popper_goo_string_to_utf8() here to convert ucs2 page labels. - - * glib/poppler-page.cc (poppler_page_get_selection_region): - Add - braces to fix warning. - - * poppler/PageLabelInfo.cc: If the label prefix string has - a ucs2 - marker, append the number part of the label as ucs2 (#5952). - - ChangeLog | 14 +++ - glib/poppler-document.cc | 52 +++++------ - glib/poppler-page.cc | 23 +++-- - glib/poppler-private.h | 3 + - glib/reference/tmpl/poppler-enums.sgml | 150 - -------------------------------- - glib/reference/tmpl/poppler-unused.sgml | 130 +++++++++++++++++++++++++++ - glib/test-poppler-glib.c | 2 +- - goo/GooString.cc | 5 ++ - goo/GooString.h | 4 + - poppler/PageLabelInfo.cc | 39 ++++++--- - poppler/PageLabelInfo.h | 2 +- - 11 files changed, 228 insertions(+), 196 deletions(-) - -commit 1bf83cdc8b75e1c76956ae643ee273e0b558fd08 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Feb 25 12:30:30 2006 +0000 - - fix warning - - ChangeLog | 4 ++++ - poppler/Object.cc | 3 ++- - 2 files changed, 6 insertions(+), 1 deletion(-) - -commit eb5642f396c8772c83b2cf27da437413b692c952 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Feb 23 22:26:05 2006 +0000 - - Don't build pdftoppm when splashoutput is disabled as it does not link - - ChangeLog | 5 +++++ - utils/Makefile.am | 13 +++++++++++-- - 2 files changed, 16 insertions(+), 2 deletions(-) - -commit 7c5c1361045429a429a6f40d936f8c7c01fe0d07 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Sat Feb 18 20:17:00 2006 +0000 - - 2006-02-18 Jeff Muizelaar <jeff@infidigm.net> - - * poppler/CairoOutputDev.cc: - * poppler/CairoOutputDev.h: - * poppler/GfxState.cc: - * poppler/GfxState.h: Add support for drawSoftMaskedImage to - CairoOutputDev. Ugly but works. - - ChangeLog | 8 ++++ - poppler/CairoOutputDev.cc | 101 - ++++++++++++++++++++++++++++++++++++++++++++++ - poppler/CairoOutputDev.h | 6 +++ - poppler/GfxState.cc | 50 +++++++++++++++++++++++ - poppler/GfxState.h | 2 + - 5 files changed, 167 insertions(+) - -commit dcb748f68112bd5f99fea8a3da06666be6cff0c5 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Thu Feb 16 19:41:17 2006 +0000 - - 2006-02-16 Jeff Muizelaar <jeff@infidigm.net> - - * poppler/CairoOutputDev.cc: Work around cairo bug when - scaling - 1x1 bitmaps. Fixes #3387. Also gives a performance - improvement. - - ChangeLog | 5 +++++ - poppler/CairoOutputDev.cc | 33 ++++++++++++++++++++++++--------- - 2 files changed, 29 insertions(+), 9 deletions(-) - -commit ef1070f6ca2d1e74c5f94728f3aaae22f0990c17 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Feb 16 19:28:54 2006 +0000 - - Update soname - - ChangeLog | 8 ++++++++ - glib/Makefile.am | 2 ++ - poppler/Makefile.am | 2 ++ - qt/Makefile.am | 2 ++ - qt4/src/Makefile.am | 2 ++ - 5 files changed, 16 insertions(+) - -commit 24b9f5c33fb00ff80a79b34444282a57288f636c -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Feb 13 23:04:54 2006 +0000 - - * poppler/ArthurOutputDev.cc: Make it compile after changing code - so we did not pass files to freetype but buffers - - ChangeLog | 5 +++++ - poppler/ArthurOutputDev.cc | 53 - +++++++++++++++++----------------------------- - 2 files changed, 24 insertions(+), 34 deletions(-) - -commit 0bda90310b267d3a4963096293eb2bd29b120768 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Feb 13 22:38:44 2006 +0000 - - Probably the last of inner patches missing from kpdf - Everybody will we happy now, kpdf has been finally assimilated - - ChangeLog | 5 ++ - poppler/PSOutputDev.cc | 124 - +++++++++++++++++++++++++++++++++++++++++++++---- - poppler/PSOutputDev.h | 4 +- - 3 files changed, 123 insertions(+), 10 deletions(-) - -commit cf9867fbbee2468a955b5845016585eeedf2debe -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Feb 6 20:49:21 2006 +0000 - - Various fixes from Frank Meerkötter to enable fixedpoint arithmetic - - ChangeLog | 8 ++++++++ - configure.ac | 2 +- - goo/FixedPoint.h | 2 +- - splash/Splash.cc | 4 ++-- - splash/SplashTypes.h | 2 +- - 5 files changed, 13 insertions(+), 5 deletions(-) - -commit f04e2c4f20f821ff8cb9465a715ccbb22091d449 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Feb 6 18:50:10 2006 +0000 - - Jeff Muizelaar's improvements to my yesterday's small patches - - ChangeLog | 6 ++++++ - poppler/Annot.cc | 9 ++++----- - poppler/JBIG2Stream.cc | 2 +- - 3 files changed, 11 insertions(+), 6 deletions(-) - -commit 33e98f81cdfda0935ac7ea79a691976465ec790b -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Feb 5 15:46:10 2006 +0000 - - Some small fixes from kpdf - - ChangeLog | 8 ++++++++ - poppler/Gfx.cc | 1 + - poppler/GfxFont.cc | 1 + - poppler/JBIG2Stream.cc | 2 +- - poppler/SplashOutputDev.cc | 1 - - 5 files changed, 11 insertions(+), 2 deletions(-) - -commit 6d9e6489d24b3105204ff4233f6493136e9b5715 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Sat Feb 4 21:10:41 2006 +0000 - - 2006-02-04 Jeff Muizelaar <jeff@infidigm.net> - - * poppler/Gfx.cc: - * poppler/OutputDev.cc: - * poppler/OutputDev.h: Let output devices know about pdf - grouping - operators. - Patch by Thorkild Stray. - - ChangeLog | 8 ++++++++ - poppler/Gfx.cc | 14 ++++++++++++++ - poppler/OutputDev.cc | 16 ++++++++++++++++ - poppler/OutputDev.h | 10 ++++++++++ - 4 files changed, 48 insertions(+) - -commit b4e34d905cd0ca5815a450de35b4c2774f4887c9 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Sat Feb 4 20:48:25 2006 +0000 - - 2006-02-04 Jeff Muizelaar <jeff@infidigm.net> - - * poppler/GlobalParams.cc: Check all fonts returned by - fontconfig. - Discard the ones that are not truetype or type1. Fixes #5758. - Patch by Ed Catmur. - - ChangeLog | 6 ++++++ - poppler/GlobalParams.cc | 51 - +++++++++++++++++++++++++++---------------------- - 2 files changed, 34 insertions(+), 23 deletions(-) - -commit fd85a0afdd7b4cafc68df400d4f94fccaea18c76 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Feb 4 20:34:13 2006 +0000 - - Remove bug from "do not use an external file to pass fonts to - Freetype" patch, patch by Stefan Schweizer - - ChangeLog | 3 +++ - poppler/SplashOutputDev.cc | 14 ++++++++++---- - 2 files changed, 13 insertions(+), 4 deletions(-) - -commit 67ca9d01f8badcf542f60b23521c384c9840ca1b -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Feb 4 20:31:00 2006 +0000 - - Added a DTD of the xml pdftohtml creates patch by Stefan Schweizer - - ChangeLog | 2 ++ - utils/Makefile.am | 2 ++ - utils/pdf2xml.dtd | 28 ++++++++++++++++++++++++++++ - 3 files changed, 32 insertions(+) - -commit f4df23ca7f396883a906f16dfc8db1ebd528e04a -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Feb 4 20:24:03 2006 +0000 - - ignore++ - - utils/.cvsignore | 1 + - 1 file changed, 1 insertion(+) - -commit 93ad488679f594e45547a67e2a7397f4c8bd2820 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Feb 4 20:07:07 2006 +0000 - - Actually create pdftoppm patch by Stefan Schweizer - - ChangeLog | 44 +++++++++++++++++++++++++------------------- - utils/Makefile.am | 10 ++++++++-- - utils/pdftoppm.cc | 9 +++++---- - 3 files changed, 38 insertions(+), 25 deletions(-) - -commit 7d2be955e6345a052590b06b29a6d2fb2111e2e6 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Feb 2 23:06:20 2006 +0000 - - CVE-2006-0301 fix by Derek though KDE security team - - ChangeLog | 5 +++++ - splash/SplashXPathScanner.cc | 32 ++++++++++++++++++++------------ - 2 files changed, 25 insertions(+), 12 deletions(-) - -commit c191e7d0f13ea429017e4d4f79ce803e84c72e40 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Feb 2 22:54:27 2006 +0000 - - i should learn on which day i live - - ChangeLog | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 1ddeed60d07c3a7e011f3f594fa9299379d0b000 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Feb 2 22:50:01 2006 +0000 - - don't use files to pass fonts to freetype - - ChangeLog | 26 ++++++++++++ - fofi/FoFiTrueType.cc | 43 ++++++++++++++++---- - fofi/FoFiTrueType.h | 7 ++-- - fofi/FoFiType1C.h | 2 +- - goo/gfile.cc | 8 ++++ - poppler/GfxFont.cc | 49 ++++++++++++++++++++++- - poppler/GfxFont.h | 2 + - poppler/GlobalParams.cc | 1 + - poppler/GlobalParams.h | 1 + - poppler/SplashOutputDev.cc | 94 - ++++++++++++++++++++++---------------------- - splash/SplashFTFontEngine.cc | 44 +++++++++++++-------- - splash/SplashFTFontEngine.h | 16 ++++---- - splash/SplashFTFontFile.cc | 47 +++++++++++++--------- - splash/SplashFTFontFile.h | 18 ++++----- - splash/SplashFontEngine.cc | 46 +++++++++------------- - splash/SplashFontEngine.h | 16 ++++---- - splash/SplashFontFile.cc | 70 +++++++++++++++++++++++++++++---- - splash/SplashFontFile.h | 25 ++++++++++-- - splash/SplashT1FontEngine.cc | 29 +++++++------- - splash/SplashT1FontFile.cc | 30 +++++++++++--- - splash/SplashT1FontFile.h | 4 +- - 21 files changed, 396 insertions(+), 182 deletions(-) - -commit 34df4cfa5cd8788ccf2ea698cbedd05b209041f5 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Wed Feb 1 03:52:12 2006 +0000 - - 2006-01-31 Jeff Muizelaar <jeff@infidigm.net> - - * poppler/GlobalParams.cc (GlobalParams::getDisplayFont): - Allow ttc fonts to be used. - - ChangeLog | 5 +++++ - poppler/GlobalParams.cc | 2 +- - 2 files changed, 6 insertions(+), 1 deletion(-) - -commit 0184e7c928ec60c0aa3f8634d96ae0cf0ad6d157 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Sun Jan 29 05:16:31 2006 +0000 - - 2006-01-28 Jeff Muizelaar <jeff@infidigm.net> - - * glib/poppler-attachment.h: fix compile by adding <time.h> - include. - Acked-by: Jonathan Blanford <jrb@redhat.com> - - ChangeLog | 5 +++++ - glib/poppler-attachment.h | 1 + - 2 files changed, 6 insertions(+) - -commit c805e25f2f074640e4345f8b71eef8d7de677109 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Thu Jan 26 19:25:07 2006 +0000 - - 2006-01-26 Kristian Høgsberg <krh@redhat.com> - - * poppler/CairoOutputDev.cc: Patch from Christian Krause; - handle - 0-width lines (#5545). - - ChangeLog | 5 +++++ - poppler/CairoOutputDev.cc | 6 +++++- - 2 files changed, 10 insertions(+), 1 deletion(-) - -commit 4f48abcd4c21460d4c5b718a7ba18cdceb30c2d1 -Author: Jonathan Blandford <jrb@redhat.com> -Date: Tue Jan 24 06:21:39 2006 +0000 - - Tue Jan 24 01:19:40 2006 Jonathan Blandford <jrb@redhat.com> - - * glib/Makefile.am: - * glib/poppler-attachment.cc: - * glib/poppler-attachment.h: - * glib/poppler-document.cc: - * glib/poppler-document.h: - * glib/poppler-page.cc: - * glib/poppler-private.h: - * glib/poppler.h: - * glib/test-poppler-glib.c: - * glib/reference/tmpl/poppler-enums.sgml: - * glib/reference/tmpl/poppler-unused.sgml: glib bindings - for the - embedded file support. It doesn't support mtime and - ctime yet, - but the rest works. - - ChangeLog | 16 +++ - glib/Makefile.am | 2 + - glib/poppler-attachment.cc | 223 - ++++++++++++++++++++++++++++++++ - glib/poppler-attachment.h | 67 ++++++++++ - glib/poppler-document.cc | 63 +++++++++ - glib/poppler-document.h | 6 + - glib/poppler-page.cc | 2 +- - glib/poppler-private.h | 6 +- - glib/poppler.h | 1 + - glib/reference/tmpl/poppler-enums.sgml | 150 +++++++++++++++++++++ - glib/reference/tmpl/poppler-unused.sgml | 130 ------------------- - glib/test-poppler-glib.c | 26 +++- - 12 files changed, 559 insertions(+), 133 deletions(-) - -commit 052bf4b80c8a0dc45f6222617bfd8ae1b9c40410 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Mon Jan 23 18:52:48 2006 +0000 - - 2006-01-23 Kristian Høgsberg <krh@redhat.com> - - * configure.ac: - * poppler/GlobalParams.cc: - * poppler/poppler-config.h.in: - * utils/pdftohtml.cc: - * utils/pdftops.cc: Respect command line paper size settings - (#5641). - Drop the built-in paper sizes. - - ChangeLog | 9 +++++++++ - configure.ac | 1 - - poppler/GlobalParams.cc | 23 ++--------------------- - poppler/poppler-config.h.in | 5 ----- - utils/pdftohtml.cc | 4 +--- - utils/pdftops.cc | 4 +++- - 6 files changed, 15 insertions(+), 31 deletions(-) - -commit fb2054a5031d60aac3ccc9a36b3ed88a32188e33 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Mon Jan 23 15:40:54 2006 +0000 - - 2006-01-23 Kristian Høgsberg <krh@redhat.com> - - * glib/test-poppler-glib.c (print_document_info, print_index): - Move variable declarations to top (#5692). - - * utils/*.cc: Move config.h #include to top of #include's - (#5693). - - ChangeLog | 5 +++++ - glib/test-poppler-glib.c | 5 +++-- - poppler/FontInfo.cc | 2 +- - utils/HtmlOutputDev.cc | 2 +- - utils/ImageOutputDev.cc | 2 +- - utils/pdffonts.cc | 2 +- - utils/pdfimages.cc | 2 +- - utils/pdfinfo.cc | 2 +- - utils/pdftohtml.cc | 4 ++-- - utils/pdftoppm.cc | 2 +- - utils/pdftops.cc | 2 +- - utils/pdftotext.cc | 2 +- - 12 files changed, 19 insertions(+), 13 deletions(-) - -commit 836af3529e827e25f20cb4710cbbf9ed0371a42c -Author: Kristian Høgsberg <krh@redhat.com> -Date: Mon Jan 23 14:45:30 2006 +0000 - - 2006-01-23 Kristian Høgsberg <krh@redhat.com> - - * splash/SplashFTFont.cc: Don't use deprecated freetype - include - files. - - ChangeLog | 5 +++++ - splash/SplashFTFont.cc | 3 ++- - 2 files changed, 7 insertions(+), 1 deletion(-) - -commit 60e13bf84e4f020a264811e4a5bf85d67e15d6df -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Sat Jan 21 21:56:40 2006 +0000 - - 2006-01-21 Jeff Muizelaar <jeff@infidigm.net> - - * TODO: Add my todo list. - - ChangeLog | 4 ++++ - TODO | 10 ++++++++++ - 2 files changed, 14 insertions(+) - -commit cebba06563d1b691a8bbb83828e47c9cc91e231a -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Jan 18 22:40:26 2006 +0000 - - ok, ok, lasts files, i promise :-/ - - qt4/tests/check_attachments.cpp | 151 - ++++++++++++++++++++++++++++++++++++++ - qt4/tests/poppler-attachments.cpp | 37 ++++++++++ - 2 files changed, 188 insertions(+) - -commit 0b12e7cce6c6633b1d07e2902a9fa13ff52079e7 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Jan 18 22:38:59 2006 +0000 - - YAMF = Yet Another Missing File - - qt4/src/poppler-embeddedfile.cc | 106 - ++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 106 insertions(+) - -commit 38c8f3a53b3eb2be1fbfa360f77285037d89b719 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Jan 18 22:36:01 2006 +0000 - - as usual i foget some files - - poppler/UGooString.cc | 86 - +++++++++++++++++++++++++++++++++++++++++++++++++++ - poppler/UGooString.h | 55 ++++++++++++++++++++++++++++++++ - 2 files changed, 141 insertions(+) - -commit ad6e7d862c8fa6e10a7dbbb3391cbb0b6c922375 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Jan 18 22:32:13 2006 +0000 - - Brad patch for embedded document extraction, only has Qt4 bindings - for now, needs Qt3 and glib work - - ChangeLog | 42 +++++++++++++ - glib/poppler-action.cc | 2 +- - glib/poppler-document.cc | 1 + - poppler/Annot.cc | 1 + - poppler/Catalog.cc | 133 - +++++++++++++++++++++++++++++++++++++++--- - poppler/Catalog.h | 60 +++++++++++++++++-- - poppler/Dict.cc | 17 +++--- - poppler/Dict.h | 15 ++--- - poppler/FontInfo.cc | 1 + - poppler/Function.cc | 1 + - poppler/Gfx.cc | 1 + - poppler/GfxFont.cc | 5 +- - poppler/GfxState.cc | 1 + - poppler/Link.cc | 9 +-- - poppler/Link.h | 9 +-- - poppler/Makefile.am | 2 + - poppler/Object.h | 17 +++--- - poppler/Outline.cc | 1 + - poppler/PDFDoc.cc | 1 + - poppler/PDFDoc.h | 2 +- - poppler/PSOutputDev.cc | 5 +- - poppler/Page.cc | 1 + - poppler/PageLabelInfo.cc | 1 + - poppler/Parser.cc | 2 + - poppler/SecurityHandler.cc | 1 + - poppler/Stream.cc | 1 + - poppler/XRef.cc | 1 + - qt/poppler-document.cc | 1 + - qt/poppler-page-transition.cc | 1 + - qt4/src/Makefile.am | 1 + - qt4/src/poppler-document.cc | 26 ++++++++- - qt4/src/poppler-private.h | 2 + - qt4/src/poppler-qt4.h | 68 +++++++++++++++++++++ - qt4/tests/.cvsignore | 2 + - qt4/tests/Makefile.am | 16 ++++- - utils/HtmlOutputDev.cc | 1 + - utils/pdffonts.cc | 1 + - utils/pdfinfo.cc | 1 + - utils/pdftohtml.cc | 1 + - utils/pdftotext.cc | 1 + - 40 files changed, 401 insertions(+), 54 deletions(-) - -commit 550fb0b617ece7951ec39aec5fa5504cc90022fc -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Jan 18 21:22:12 2006 +0000 - - Add some more documentation to PageTransition, patch by Stefan Kebekus - - ChangeLog | 6 ++++++ - qt/poppler-page-transition.h | 40 - +++++++++++++++++++++++++++++++++------- - qt4/src/Doxyfile | 2 +- - 3 files changed, 40 insertions(+), 8 deletions(-) - -commit d66f3647ff1c38318d4cd056cb4d4c7a32eb6603 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Jan 18 18:54:12 2006 +0000 - - poppler/CharCodeToUnicode.cc: Fix check for length that was not - having into account that there could be \n or \r in tokens - an that - those do not have to be took into account. Fixes - http://bugs.kde.org/show_bug.cgi?id=120310 - - ChangeLog | 9 ++++++++- - poppler/CharCodeToUnicode.cc | 31 +++++++++++++++++++++++++++---- - 2 files changed, 35 insertions(+), 5 deletions(-) - -commit d78b670339c8f92a32ab5f0a574d0e21690806f8 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Jan 17 21:35:31 2006 +0000 - - When doing the parsing check with XREF we did not grow too much. Fixes - serialata10a.pdf - - ChangeLog | 10 ++++++++++ - poppler/Lexer.cc | 22 +++++++++++++++++++--- - poppler/Lexer.h | 8 +++++--- - poppler/Parser.cc | 6 +++--- - poppler/Parser.h | 2 +- - poppler/XRef.cc | 17 +++++++++++++++++ - poppler/XRef.h | 3 +++ - 7 files changed, 58 insertions(+), 10 deletions(-) - -commit f5db636af0cd6e05cd7ede37a8585001d51192a1 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Jan 17 20:33:08 2006 +0000 - - i suck - i suck - i suck - i suck - i suck - A file i forgot to add to make it compile :-/ - - qt/poppler-page-transition-private.h | 28 ++++++++++++++++++++++++++++ - 1 file changed, 28 insertions(+) - -commit 9cc97908ea67ab431e58129f589e00f41f40a143 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Thu Jan 12 23:54:08 2006 +0000 - - 2006-01-12 Jeff Muizelaar <jeff@infidigm.net> - - * poppler/GlobalParams.cc: Make buildFcPattern() static. - - ChangeLog | 4 ++++ - poppler/GlobalParams.cc | 2 +- - 2 files changed, 5 insertions(+), 1 deletion(-) - -commit c7ce134fb1dadb46e2b3773d0976ea31da0a046f -Author: Kristian Høgsberg <krh@redhat.com> -Date: Wed Jan 11 16:52:58 2006 +0000 - - 2006-01-11 Kristian Høgsberg <krh@redhat.com> - - * poppler/JBIG2Stream.cc: - * poppler/Stream.cc: Merge patch to fix CVE-2005-3624, - CVE-2005-3625 and CVE-2005-3627 issues. - - ChangeLog | 6 ++++++ - poppler/JBIG2Stream.cc | 32 +++++++++++++++++++++++++++++++- - poppler/Stream.cc | 8 +++++--- - 3 files changed, 42 insertions(+), 4 deletions(-) - -commit ec7fb41725c19bc7f2aad1073fe6397ea0a8da0d -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Jan 10 21:57:28 2006 +0000 - - * configure.ac: - * m4/qt.m4: Fix bugs created when splitting the code from - configure.ac, take QTDIR into account when looking for - QtTestLib and - do not die if it is not found as it is not mandatory - * qt/poppler-page-transition.cc: - * qt/poppler-page.cc: - * qt/poppler-private.h: - * qt4/tests/Makefile.am: - * qt4/src/poppler-qt4.h: - * qt4/src/poppler-page.cc: - * qt4/src/Makefile.am: Fix mess created my the moving and - renaming of - PageTransition.cc - - ChangeLog | 15 +++++++++++++++ - configure.ac | 14 ++++---------- - m4/qt.m4 | 5 +++++ - qt/poppler-page-transition.cc | 2 +- - qt/poppler-page.cc | 1 + - qt/poppler-private.h | 5 ----- - qt4/src/Makefile.am | 1 + - qt4/src/poppler-page.cc | 2 +- - qt4/src/poppler-qt4.h | 2 +- - qt4/tests/Makefile.am | 1 + - 10 files changed, 30 insertions(+), 18 deletions(-) - -commit d9bc53a741b3bbd2a202662c66fe70f49ac72a49 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Tue Jan 10 17:59:51 2006 +0000 - - 2006-01-10 Kristian Høgsberg <krh@redhat.com> - - * splash/Makefile.am: Only install splash headers if - --enable-xpdf-headers is given. - - * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): Set this here. - - ChangeLog | 7 +++++++ - Makefile.am | 1 + - splash/Makefile.am | 4 ++++ - 3 files changed, 12 insertions(+) - -commit ea6d9b97cec6fabf8a5005c565bbdb378bed7f54 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Tue Jan 10 17:55:59 2006 +0000 - - 2006-01-10 Jeff Muizelaar <jeff@infidigm.net> - - * poppler/CairoOutputDev.cc: - * poppler/CairoOutputDev.h: - Fix the following fixme in CairoOutputDevice. - - // FIXME: This is quite right yet, we need to accumulate all - // glyphs within one text object before we clip. Right now - this - // just add this one string. - - The fix uses a strategy similar to the one the Splash backend. - textClipPath is used to store the appended path from each - call to - endString(). The accumulated path is clipped in endTextObject. - - ChangeLog | 14 ++++++++++++++ - poppler/CairoOutputDev.cc | 27 +++++++++++++++++++++++---- - poppler/CairoOutputDev.h | 1 + - 3 files changed, 38 insertions(+), 4 deletions(-) - -commit 9e8a655a2bd3ca8cff1a150dce0dd378aeca047b -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Sun Jan 8 22:59:48 2006 +0000 - - 2006-01-08 Jeff Muizelaar <jeff@infidigm.net> - - * poppler/CairoOutputDev.cc: Don't try and load type3 fonts - (#4030). - - ChangeLog | 6 +++++- - poppler/CairoOutputDev.cc | 5 ++++- - 2 files changed, 9 insertions(+), 2 deletions(-) - -commit 25fd8e1ea87c41855a4ee702fbe47f5661a54c22 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Sun Jan 8 22:51:17 2006 +0000 - - 2006-01-08 Jeff Muizelaar <jeff@infidigm.net> - - * poppler/Page.cc: use colToByte for reading thumbnails - (#5420). - - Patch by Nickolay V. Shmyrev. - - ChangeLog | 6 ++++++ - poppler/Page.cc | 6 +++--- - 2 files changed, 9 insertions(+), 3 deletions(-) - -commit df73ee2ec4b65ccf611f0fd76fb456cc797693d4 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Sat Jan 7 06:10:15 2006 +0000 - - 2006-01-07 Jeff Muizelaar <jeff@infidigm.net> - - * poppler/CairoOutputDev.cc: Initialize (fill|stroke)_opacity. - - ChangeLog | 4 ++++ - poppler/CairoOutputDev.cc | 2 ++ - 2 files changed, 6 insertions(+) - -commit 18eb8de66749082e4aa65cc6d369a533826fab33 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Fri Jan 6 10:05:58 2006 +0000 - - 2006-01-06 Kristian Høgsberg <krh@redhat.com> - - * qt/poppler-page.cc: - * qt/poppler-private.h: - * qt/poppler-qt.h: - * qt4/src/Makefile.am: - * qt/Makefile.am: - * poppler/Makefile.am: Move PageTransition to qt bindings, - move - contents from Private.h to qt/poppler-private.h. - - * poppler/TextOutputDev.cc (visitWord): Remove #warning. - - * utils/Makefile.am (pdfimages_SOURCES): Add ImageOutputDev.h, - use - dist_man1_MANS so we actually dist the man pages. - - * goo/Makefile.am (poppler_goo_include_HEADERS): Add - GooVector.h. - - * glib/reference/Makefile.am: DOC_SOURCE_DIR must be - relative to - $(srcdir), fix this to make distchek run. - - * m4/qt.m4: - * m4/libjpeg.m4: - * acinclude.m4: - * configure.ac: Split out Qt and libjpeg checks from - configure.ac - and acinclude.m4 to m4/qt.m4 and m4/libjpeg.m4. - - ChangeLog | 26 +++ - configure.ac | 223 - ++------------------- - glib/reference/Makefile.am | 2 +- - glib/reference/tmpl/poppler-enums.sgml | 150 -------------- - glib/reference/tmpl/poppler-unused.sgml | 130 ++++++++++++ - goo/Makefile.am | 1 + - acinclude.m4 => m4/libjpeg.m4 | 7 +- - m4/qt.m4 | 206 - +++++++++++++++++++ - poppler/Makefile.am | 1 - - poppler/Private.h | 30 --- - poppler/TextOutputDev.cc | 2 - - qt/Makefile.am | 8 +- - qt/poppler-page-transition.cc | 187 - +++++++++++++++++ - .../poppler-page-transition.h | 3 +- - qt/poppler-page.cc | 1 - - qt/poppler-private.h | 9 +- - qt/poppler-qt.h | 2 +- - qt4/src/Makefile.am | 8 +- - utils/Makefile.am | 54 ++++- - 19 files changed, 634 insertions(+), 416 deletions(-) - -commit 93921e77115ebe4d527f98675e438de485e84507 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Jan 5 23:53:33 2006 +0000 - - * poppler/DCTStream.cc: Fix handling of malformed jpeg streams like - the one at http://bugs.kde.org/show_bug.cgi?id=119569 - - Might be worth backporting to 0.4.x - - ChangeLog | 5 +++++ - poppler/DCTStream.cc | 26 ++++++++++++++++---------- - 2 files changed, 21 insertions(+), 10 deletions(-) - -commit 0dc16af02071350a0dc11af4106799378c99cdad -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Jan 5 13:53:58 2006 +0000 - - Introduce variants of renderTo that return a QImage and do not use - a QPixmap so threading is possible. - - ChangeLog | 8 +++++++ - qt/poppler-page.cc | 18 ++++++++++----- - qt/poppler-qt.h | 30 ++++++++++++++++++++----- - qt4/src/poppler-page.cc | 9 +++++++- - qt4/src/poppler-qt4.h | 59 - +++++++++++++++++++++++++++---------------------- - 5 files changed, 85 insertions(+), 39 deletions(-) - -commit 5c2cbf5d327c6cc75c073b56c3ab1748c0d24387 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Jan 2 14:24:31 2006 +0000 - - Use error() instead std::cerr in PageTranstion.cc - - ChangeLog | 4 ++++ - poppler/PageTransition.cc | 5 +++-- - 2 files changed, 7 insertions(+), 2 deletions(-) - -commit da5a4233498b56df611e1c7bca0090306cb5dbe0 -Author: Jonathan Blandford <jrb@redhat.com> -Date: Mon Jan 2 00:06:45 2006 +0000 - - Sun Jan 1 18:50:51 2006 Jonathan Blandford <jrb@redhat.com> - - * Makefile.am: - * autogen.sh: - * configure.ac: - * gtk-doc.make: - * glib/Makefile.am: enable gtk-doc support. - - ChangeLog | 8 +++ - Makefile.am | 2 + - autogen.sh | 14 +++++ - configure.ac | 4 ++ - glib/Makefile.am | 1 + - gtk-doc.make | 153 - +++++++++++++++++++++++++++++++++++++++++++++++++++++++ - m4/gtk-doc.m4 | 53 +++++++++++++++++++ - 7 files changed, 235 insertions(+) - -commit 372c34cc9728d7041bc4f6893c0bae50c9501c50 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Jan 1 22:35:48 2006 +0000 - - * qt4/src/poppler-private.h: - * qt4/src/poppler-page.cc: - * qt4/src/poppler-document.cc: Don't create a SplashOutputDev - for - every splashRenderToPixmap - - ChangeLog | 4 ++++ - qt4/src/poppler-document.cc | 1 - - qt4/src/poppler-page.cc | 18 +++++------------- - qt4/src/poppler-private.h | 24 +++++++++++++++++++++++- - 4 files changed, 32 insertions(+), 15 deletions(-) - -commit 6ff83474ac594368015334db9c6b33d3a552079f -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Jan 1 22:18:47 2006 +0000 - - * qt/poppler-page.cc: - * qt/poppler-private.h: Don't create a SplashOutputDev for every - renderToPixmap. - - ChangeLog | 6 ++++++ - qt/poppler-page.cc | 8 +------- - qt/poppler-private.h | 24 +++++++++++++++++++++++- - 3 files changed, 30 insertions(+), 8 deletions(-) - -commit 6942646d4c82327a80b021838a38aa55c1026883 -Author: Jonathan Blandford <jrb@redhat.com> -Date: Sun Jan 1 20:34:36 2006 +0000 - - Sun Jan 1 15:32:08 2006 Jonathan Blandford <jrb@redhat.com> - - * glib/reference/*: More gtk-doc work. Not enabled for - building - by default, but filled in. - - .cvsignore | 1 + - ChangeLog | 5 + - glib/reference/.cvsignore | 18 ++ - glib/reference/Makefile.am | 87 +++++++ - glib/reference/poppler-docs.sgml | 17 ++ - glib/reference/poppler-overrides.txt | 0 - glib/reference/poppler-sections.txt | 151 ++++++++++++ - glib/reference/poppler.types | 4 + - glib/reference/tmpl/poppler-action.sgml | 172 +++++++++++++ - glib/reference/tmpl/poppler-document.sgml | 354 - +++++++++++++++++++++++++++ - glib/reference/tmpl/poppler-enums.sgml | 169 +++++++++++++ - glib/reference/tmpl/poppler-page.sgml | 243 ++++++++++++++++++ - glib/reference/tmpl/poppler-private.sgml | 128 ++++++++++ - glib/reference/tmpl/poppler-unused.sgml | 0 - glib/reference/tmpl/poppler.sgml | 216 ++++++++++++++++ - glib/reference/tmpl/stamp-poppler-enums.sgml | 19 ++ - 16 files changed, 1584 insertions(+) - -commit 0fab1b711f153859e113cb3b6d734ddcb58fb87a -Author: Jonathan Blandford <jrb@redhat.com> -Date: Sat Dec 31 02:10:33 2005 +0000 - - Fri Dec 30 21:08:33 2005 Jonathan Blandford <jrb@redhat.com> - - * glib/*{cc,h}: Update inline doc comments. This is in - preparation for gtk-doc support. - - ChangeLog | 5 ++ - glib/poppler-action.cc | 14 +++++ - glib/poppler-action.h | 2 - - glib/poppler-document.cc | 151 - ++++++++++++++++++++++++++++++++++++++++++++++- - glib/poppler-document.h | 4 +- - glib/poppler-page.cc | 28 +++++++++ - glib/poppler.cc | 16 +++++ - glib/test-poppler-glib.c | 29 +++++++++ - 8 files changed, 243 insertions(+), 6 deletions(-) - -commit 313530036b204eaa5ddfa150730302e855560d6a -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Dec 30 22:54:46 2005 +0000 - - A delete that slipped from the last patch-commit - - qt4/src/poppler-page.cc | 1 + - 1 file changed, 1 insertion(+) - -commit cf6f8123af19aca4200b58a454652f68ce8132e2 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Dec 30 22:31:32 2005 +0000 - - Puting PageTransition implementation into poppler "core", both Qt - and Qt4 frontends use it. - - poppler/Makefile.am | 1 + - poppler/PageTransition.cc | 188 - ++++++++++++++++++++++++++++++++++++++++++++++ - poppler/PageTransition.h | 118 +++++++++++++++++++++++++++++ - poppler/Private.h | 30 ++++++++ - qt/Makefile.am | 2 +- - qt/poppler-page.cc | 111 +-------------------------- - qt/poppler-qt.h | 72 +----------------- - qt4/src/Makefile.am | 2 +- - qt4/src/poppler-page.cc | 17 ++++- - qt4/src/poppler-qt4.h | 14 +++- - 10 files changed, 374 insertions(+), 181 deletions(-) - -commit 56035ab199ac6deb5c1e07e745d120d1121a5960 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Dec 30 21:59:58 2005 +0000 - - * utils/HtmlOutputDev.cc: - * utils/ImageOutputDev.cc: Fix build when using --disable-libjpeg - - ChangeLog | 5 +++++ - utils/HtmlOutputDev.cc | 2 ++ - utils/ImageOutputDev.cc | 2 ++ - 3 files changed, 9 insertions(+) - -commit 8b64dafc7f1d198fb0052c0d6f0da6de97bbb48d -Author: Brad Hards <bradh@frogmouth.net> -Date: Wed Dec 28 09:23:43 2005 +0000 - - Plug a few memory leaks in the Qt4 bindings. - - ChangeLog | 25 ++++++++++++++++++++ - qt4/src/poppler-document.cc | 3 +++ - qt4/src/poppler-private.h | 7 +++++- - qt4/src/poppler-qt4.h | 3 +++ - qt4/tests/check_fonts.cpp | 8 +++++++ - qt4/tests/check_metadata.cpp | 50 - +++++++++++++++++++++++++++++++++++----- - qt4/tests/check_pagelayout.cpp | 6 +++++ - qt4/tests/check_pagemode.cpp | 10 ++++++++ - qt4/tests/check_permissions.cpp | 2 ++ - qt4/tests/check_version.cpp | 22 ------------------ - qt4/tests/poppler-fonts.cpp | 1 + - qt4/tests/stress-poppler-qt4.cpp | 2 ++ - 12 files changed, 110 insertions(+), 29 deletions(-) - -commit 64c07a20a4ed844f3b3dd26e974f58d5877cf9fd -Author: Brad Hards <bradh@frogmouth.net> -Date: Tue Dec 27 06:10:01 2005 +0000 - - qt4/src/poppler-qt4.h and qt4/src/poppler-document.cc: add - convertDate() function that - turns char* PDF date strings into QDateTime. This version handles - the timezone conversions. Refactored the existing date() method - to use it. - - qt4/tests/check_dateConversion.cpp: unit tests for convertDate() - qt4/tests/check_metadata.cpp: update to reflect UTC. - qt4/tests/.cvsignore: suppress check_dateConversion - - ChangeLog | 9 ++++ - qt4/src/poppler-document.cc | 89 ++++++++++++++++++++----------- - qt4/src/poppler-qt4.h | 5 ++ - qt4/tests/.cvsignore | 1 + - qt4/tests/Makefile.am | 11 ++-- - qt4/tests/check_dateConversion.cpp | 105 - +++++++++++++++++++++++++++++++++++++ - qt4/tests/check_metadata.cpp | 4 +- - 7 files changed, 188 insertions(+), 36 deletions(-) - -commit 4b2e3b5106b75f23c830837a886cd29beb1d1d1b -Author: Brad Hards <bradh@frogmouth.net> -Date: Tue Dec 27 05:08:34 2005 +0000 - - * qt4/src/Doxyfile (JAVADOC_AUTOBRIEF): Turned on automatic - \brief mode. - - * qt4/src/poppler-qt4.h: Update API documentation. Patch from - Stefan Kebekus, with some changes. Removed \brief entries. - - ChangeLog | 8 +++++ - qt4/src/Doxyfile | 2 +- - qt4/src/poppler-qt4.h | 81 - ++++++++++++++++++++++++++++++++++++++++----------- - 3 files changed, 73 insertions(+), 18 deletions(-) - -commit 8d9cf43aaa73d5012428a6a4c5d7e2cccbd3036e -Author: Kristian Høgsberg <krh@redhat.com> -Date: Wed Dec 21 22:09:47 2005 +0000 - - 2005-12-21 Kristian Høgsberg <krh@redhat.com> - - * NEWS: Sum up 0.5 changes so far. - - * acinclude.m4: Split jpeg macros out into this file. - - * poppler/Stream.cc: Apply latest CVE-2005-3191 updates. - - ChangeLog | 8 ++++ - NEWS | 8 ++++ - acinclude.m4 | 112 - ++++++++++++++++++++++++++++++++++++++++++++++++++ - configure.ac | 114 - --------------------------------------------------- - poppler/JPXStream.cc | 1 + - poppler/Stream.cc | 11 +++-- - 6 files changed, 137 insertions(+), 117 deletions(-) - -commit 97243286560cb4f264b875185c8768a6af09d554 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Wed Dec 21 17:30:33 2005 +0000 - - 2005-12-21 Kristian Høgsberg <krh@redhat.com> - - * utils/Makefile.am: Add parseargs.h to sources and add - -I$(top_srcdir)/poppler to INCLUDES. - - * poppler/CairoFontEngine.cc: Apply patch from Hiroyuki - Ikezoe to - man non-embedded CJK fonts work. - - ChangeLog | 14 ++++++++++--- - configure.ac | 2 +- - poppler/CairoFontEngine.cc | 52 - +++++++++++++++++++++++++++++++++++++++++----- - utils/Makefile.am | 15 +++++++------ - 4 files changed, 68 insertions(+), 15 deletions(-) - -commit cf887a9a9fae7272165d3aae05c85444ff5ca604 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Dec 18 22:03:30 2005 +0000 - - * poppler/Page.cc: Only discard cropbox sizes one by one - and not - completely. Jeff and Martin were right - - ChangeLog | 2 ++ - poppler/Page.cc | 13 ++++++++++--- - 2 files changed, 12 insertions(+), 3 deletions(-) - -commit 495890b9cef9d5d61bb47e789add1cf2c3b8f83d -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Dec 18 21:56:15 2005 +0000 - - + .cvsignore - - utils/.cvsignore | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -commit 5dca860bba6918e06fab3aa56a2c75f0ac9ecdfb -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Dec 18 21:08:48 2005 +0000 - - Fix utils building on Slackware - - ChangeLog | 3 +++ - configure.ac | 3 +++ - utils/Makefile.am | 3 ++- - 3 files changed, 8 insertions(+), 1 deletion(-) - -commit 03e3d9164ffd71f03136b57a9941ea14fadb21aa -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Dec 18 17:12:28 2005 +0000 - - 2005-12-18 Albert Astals Cid <aacid@kde.org> - - * configure.ac: Better jpeg detection, refer to ml PCbsd - problem - - ChangeLog | 4 ++ - configure.ac | 131 - +++++++++++++++++++++++++++++++++++++++++++++++++++-------- - 2 files changed, 118 insertions(+), 17 deletions(-) - -commit 888d76a29c9c5ea6c90cc4299b230ca0c2c2944f -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Dec 12 20:21:08 2005 +0000 - - * poppler/Page.cc: Ignore cropBox if it seems incorrect - - ChangeLog | 4 ++++ - poppler/Page.cc | 7 +++++++ - 2 files changed, 11 insertions(+) - -commit bcc5e3afe27c8787ce7022a0701997c96eddb4fe -Author: Kristian Høgsberg <krh@redhat.com> -Date: Mon Dec 12 20:15:11 2005 +0000 - - 2005-12-12 Kristian Høgsberg <krh@redhat.com> - - * Makefile.am: - * configure.ac: - * goo/GooVector.h: - * utils/HtmlFonts.cc: - * utils/HtmlFonts.h: - * utils/HtmlLinks.cc: - * utils/HtmlLinks.h: - * utils/HtmlOutputDev.cc: - * utils/HtmlOutputDev.h: - * utils/ImageOutputDev.cc: - * utils/ImageOutputDev.h: - * utils/Makefile.am: - * utils/parseargs.c: - * utils/parseargs.h: - * utils/pdffonts.1: - * utils/pdffonts.cc: - * utils/pdfimages.1: - * utils/pdfimages.cc: - * utils/pdfinfo.1: - * utils/pdfinfo.cc: - * utils/pdftohtml.1: - * utils/pdftohtml.cc: - * utils/pdftoppm.1: - * utils/pdftoppm.cc: - * utils/pdftops.1: - * utils/pdftops.cc: - * utils/pdftotext.1: - * utils/pdftotext.cc: Add command line utilities from xpdf. - - ChangeLog | 31 + - Makefile.am | 6 +- - configure.ac | 25 +- - goo/GooVector.h | 101 +++ - utils/HtmlFonts.cc | 326 ++++++++++ - utils/HtmlFonts.h | 85 +++ - utils/HtmlLinks.cc | 101 +++ - utils/HtmlLinks.h | 49 ++ - utils/HtmlOutputDev.cc | 1569 - +++++++++++++++++++++++++++++++++++++++++++++++ - utils/HtmlOutputDev.h | 302 +++++++++ - utils/ImageOutputDev.cc | 195 ++++++ - utils/ImageOutputDev.h | 76 +++ - utils/Makefile.am | 18 + - utils/parseargs.c | 190 ++++++ - utils/parseargs.h | 71 +++ - utils/pdffonts.1 | 128 ++++ - utils/pdffonts.cc | 294 +++++++++ - utils/pdfimages.1 | 96 +++ - utils/pdfimages.cc | 159 +++++ - utils/pdfinfo.1 | 157 +++++ - utils/pdfinfo.cc | 376 ++++++++++++ - utils/pdftohtml.1 | 85 +++ - utils/pdftohtml.cc | 429 +++++++++++++ - utils/pdftoppm.1 | 113 ++++ - utils/pdftoppm.cc | 189 ++++++ - utils/pdftops.1 | 224 +++++++ - utils/pdftops.cc | 336 ++++++++++ - utils/pdftotext.1 | 135 ++++ - utils/pdftotext.cc | 337 ++++++++++ - 29 files changed, 6194 insertions(+), 9 deletions(-) - -commit 5fbded32741acb5fac411189f80cb57aa11df517 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Dec 10 10:52:15 2005 +0000 - - * qt4/src/poppler-page.cc: - * qt4/src/poppler-qt4.h: - * qt4/src/tests/test-poppler-qt4.cpp: The parameters x,y,w,h to the - method splashRenderToPixmap are now used. Convenient - defaults are provided. The test has been changed accordingly. Some - added documentation. Patch by Stefan Kebekus - - ChangeLog | 9 +++++++++ - qt4/src/poppler-page.cc | 4 ++-- - qt4/src/poppler-qt4.h | 31 +++++++++++++++++++++++-------- - qt4/tests/test-poppler-qt4.cpp | 2 +- - 4 files changed, 35 insertions(+), 11 deletions(-) - -commit bc6df8c41081c0c0107655cbf70ddb8b0c493c34 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Fri Dec 9 20:49:59 2005 +0000 - - 2005-12-09 Kristian Høgsberg <krh@redhat.com> - - * poppler/GfxState.cc: Use colToByte() for converting - GxfColorComp - to bytes (really fix #5117). - - * poppler/Stream.cc: Remove duplicated check (#5243). - - ChangeLog | 5 +++++ - poppler/GfxState.cc | 6 +++--- - poppler/Stream.cc | 4 ---- - 3 files changed, 8 insertions(+), 7 deletions(-) - -commit 8a2464122455311c6d16ae62bb9ac9a0ae365a28 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Fri Dec 9 19:40:40 2005 +0000 - - 2005-12-09 Kristian Høgsberg <krh@redhat.com> - - * configure.ac: - * poppler/Makefile.am (poppler_includedir): - * goo/Makefile.am (poppler_goo_include_HEADERS): Make - installation - of xpdf header files optional. - - ChangeLog | 10 +++++++++- - configure.ac | 8 ++++++++ - goo/Makefile.am | 4 ++++ - poppler/Makefile.am | 4 ++++ - 4 files changed, 25 insertions(+), 1 deletion(-) - -commit 830b61bfd1c985fe14ec4d0f6724c8f70e924fc1 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Dec 8 18:17:42 2005 +0000 - - * configure.ac: Detect if gettimeofday is available, fixes - for correct - linking to Qt4 on windows - * goo/GooTimer.[cc|h]: Only build if gettimeofday is available - * poppler/Gfx.cc: Only use the timer for profiling if - gettimeofday is - available - * poppler/GlobalParams.cc: Remove extra unlockGlobalParams - that was - making windows hang - * splash/SplashFTFontEngine.cc: i need unistd.h on windows - also - * splash/SplashFontFile.cc: i need unistd.h on windows also - - ChangeLog | 12 ++++++++++++ - configure.ac | 14 +++++++++++++- - goo/GooTimer.cc | 3 +++ - goo/GooTimer.h | 4 ++++ - poppler/Gfx.cc | 6 ++++++ - poppler/GlobalParams.cc | 1 - - splash/SplashFTFontEngine.cc | 4 +--- - splash/SplashFontFile.cc | 4 +--- - 8 files changed, 40 insertions(+), 8 deletions(-) - -commit 0a1c33ed17fd7053ed455da3444856a5dab3c9b4 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Dec 8 12:42:50 2005 +0000 - - Remove -DDATADIR we are not using if for anything and it shadows a - windows typedef - - ChangeLog | 8 ++++++++ - glib/Makefile.am | 3 +-- - poppler/Makefile.am | 3 +-- - qt/Makefile.am | 3 +-- - test/Makefile.am | 3 +-- - 5 files changed, 12 insertions(+), 8 deletions(-) - -commit adca042e666fd932f16213d0a4daba08b5021901 -Author: Brad Hards <bradh@frogmouth.net> -Date: Wed Dec 7 08:42:21 2005 +0000 - - Remove the version check. OK'd by krh. - - ChangeLog | 2 ++ - poppler/PDFDoc.cc | 6 +----- - 2 files changed, 3 insertions(+), 5 deletions(-) - -commit bc57f8dd73eef9a74e4a6e248ed6985c360db838 -Author: Brad Hards <bradh@frogmouth.net> -Date: Wed Dec 7 08:31:09 2005 +0000 - - Add infoKeys() - allows you to get a list of all the string names - (keys) - for the metadata. - - ChangeLog | 7 +++++++ - qt4/src/poppler-document.cc | 22 ++++++++++++++++++++++ - qt4/src/poppler-qt4.h | 7 +++++++ - qt4/tests/check_metadata.cpp | 18 ++++++++++++++++++ - 4 files changed, 54 insertions(+) - -commit 7ec41df91e6dbf792e11676d929acc2f634bd382 -Author: Brad Hards <bradh@frogmouth.net> -Date: Tue Dec 6 09:58:04 2005 +0000 - - Add more unit tests for better coverage. - - ChangeLog | 6 ++++ - qt4/tests/check_fonts.cpp | 24 ++++++++++++++++ - qt4/tests/check_metadata.cpp | 66 - ++++++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 96 insertions(+) - -commit a92b10016306ac46775c9b95b52d249b233ff950 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Dec 5 20:46:22 2005 +0000 - - * poppler/CairoFontEngine.cc: Correct fix for #5149, i broke it when - merging xpdf 3.01 patches - - ChangeLog | 5 +++++ - poppler/CairoFontEngine.cc | 4 +--- - 2 files changed, 6 insertions(+), 3 deletions(-) - -commit 66096477d1a86f13fcb07ae25caff1cc02b1e7cd -Author: Brad Hards <bradh@frogmouth.net> -Date: Sun Dec 4 19:48:25 2005 +0000 - - Add checking for Type3 fonts in the unit test. - - ChangeLog | 5 +++++ - qt4/tests/check_fonts.cpp | 24 ++++++++++++++++++++++++ - 2 files changed, 29 insertions(+) - -commit 62345b0affed8e2e37728fca7f2b750879192c43 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Dec 4 18:53:40 2005 +0000 - - Fix error in merging CAN-2005-3193 fix. Thanks Daniel Gryniewicz - for notifying - - ChangeLog | 5 +++++ - poppler/JPXStream.cc | 2 -- - 2 files changed, 5 insertions(+), 2 deletions(-) - -commit ba4b3f88271892f197aa2ec076c80ff63a175887 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Dec 4 11:30:00 2005 +0000 - - * qt/poppler-qt.h: - * qt/poppler-fontinfo.h: - * qt4/src/poppler-qt4.h: - * qt4/src/poppler-fontinfo.cc: Implement copy constructor of - FontInfo needed - as Q[Value]List<FontInfo> uses it when appending - - ChangeLog | 8 ++++++++ - qt/poppler-fontinfo.cc | 9 +++++++++ - qt/poppler-qt.h | 2 ++ - qt4/src/poppler-fontinfo.cc | 9 +++++++++ - qt4/src/poppler-qt4.h | 2 ++ - 5 files changed, 30 insertions(+) - -commit e091231d98d12c19b0098ffbaec6ecda28097dff -Author: Brad Hards <bradh@frogmouth.net> -Date: Sun Dec 4 10:45:25 2005 +0000 - - Add new unit test to .cvsignore suppressions. - - ChangeLog | 2 ++ - qt4/tests/.cvsignore | 1 + - 2 files changed, 3 insertions(+) - -commit 6a7b1eaaedbfdd3a8e6b4d899477350f2b485641 -Author: Brad Hards <bradh@frogmouth.net> -Date: Sun Dec 4 10:05:21 2005 +0000 - - * qt4/src/poppler-qt4.h: - qt4/src/fontinfo.cc: add implementation for FontInfo::typeName() - - * qt4/tests/check_fonts.cpp: - * qt4/tests/Makefile.am: add unit test for fonts - - * qt4/src/Mainpage.dox: Minor typo fixes. - - ChangeLog | 11 +++++++++++ - qt4/src/Mainpage.dox | 5 +++-- - qt4/src/poppler-fontinfo.cc | 24 ++++++++++++++++++++++++ - qt4/src/poppler-qt4.h | 14 +++++++++++++- - qt4/tests/Makefile.am | 5 +++++ - qt4/tests/check_fonts.cpp | 42 - ++++++++++++++++++++++++++++++++++++++++++ - 6 files changed, 98 insertions(+), 3 deletions(-) - -commit 31b28b4c59f7820901e9cf893197f381acbae8ce -Author: Kristian Høgsberg <krh@redhat.com> -Date: Sun Dec 4 02:24:25 2005 +0000 - - 2005-12-03 Kristian Høgsberg <krh@redhat.com> - - * glib/poppler-page.cc (poppler_page_set_selection_alpha): Use - Nickolays original fix instead of trying to be clever with - gdk_pixbuf_fill(). - - * poppler/CairoFontEngine.cc: Fix text corruption bug (#5149), - a rerun of an old classic (#3340). - - ChangeLog | 7 +++++++ - glib/poppler-page.cc | 8 +++++++- - poppler/CairoFontEngine.cc | 2 ++ - 3 files changed, 16 insertions(+), 1 deletion(-) - -commit 4d169c5c345cdac84a39026e759b928977643417 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Sun Dec 4 01:42:29 2005 +0000 - - 2005-12-03 Kristian Høgsberg <krh@redhat.com> - - * poppler/GfxState.cc: Fixing another problem with new GfxRGB - representation causing images to show up as random pixels - (#5117). - - ChangeLog | 5 +++++ - poppler/GfxState.cc | 6 +++--- - 2 files changed, 8 insertions(+), 3 deletions(-) - -commit 58de0458e17b1639ce0bcae45a4b09b2c0a56618 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Sat Dec 3 23:23:53 2005 +0000 - - 2005-12-03 Kristian Høgsberg <krh@redhat.com> - - * qt/Makefile.am (noinst_PROGRAMS): Only build qt test - program if - splash is enabled. - - * poppler/CairoOutputDev.cc: Remove unused grid snapping code, - sidestepping #4507. - - * glib/poppler-document.h (PopplerPermissions): Breaking enum - definition over multiple lines confuses glib-mkenums (#4600). - - * poppler/Makefile.am (libpoppler_la_LIBADD): Add - FREETYPE_LIBS - (#4515). - - * poppler/TextOutputDev.cc: - * qt/poppler-qt.h: GCC-4.1 fixes (#5031). - - ChangeLog | 17 +++++++++++++++++ - glib/poppler-document.h | 5 +---- - poppler/CairoOutputDev.cc | 35 +++++++++-------------------------- - poppler/CairoOutputDev.h | 2 +- - poppler/Makefile.am | 3 ++- - poppler/TextOutputDev.cc | 2 +- - qt/Makefile.am | 4 ++++ - qt/poppler-qt.h | 6 +++--- - 8 files changed, 38 insertions(+), 36 deletions(-) - -commit df45483f1437d8a96519e1428d1f4b3ffc08c2cd -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Dec 3 22:39:06 2005 +0000 - - remove another chagne should not have gone in - - test/pdf-inspector.cc | 9 ++------- - 1 file changed, 2 insertions(+), 7 deletions(-) - -commit 7dfe02ee112dee51346525b62d877e6591135761 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Dec 3 22:28:46 2005 +0000 - - Add the font retrieveing on the qt3 backend also, based on a patch - by Wilfried Huss - - ChangeLog | 3 ++ - qt/poppler-fontinfo.cc | 75 - ++++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 78 insertions(+) - -commit 655b9dd195ac9faf2f7ea0255880b8c83b249a06 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Dec 3 22:26:07 2005 +0000 - - this should have not went in - - poppler/TextOutputDev.h | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -commit ab45eb562159d5b006e658ec66723a0a47908f65 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Dec 3 22:20:54 2005 +0000 - - * qt4/src/poppler-qt4.h: - * qt4/src/poppler-fontinfo.cc: - * qt4/src/poppler-textbox.cc: Remove implementation of that classes - from the header, use pimpl - - ChangeLog | 9 ++++- - poppler/TextOutputDev.h | 10 +++--- - qt/Makefile.am | 1 + - qt/poppler-document.cc | 29 ++++++++++++++++ - qt/poppler-private.h | 2 ++ - qt/poppler-qt.h | 80 - ++++++++++++++++++++++++++++++++++++++++++++- - qt4/src/Makefile.am | 2 ++ - qt4/src/poppler-fontinfo.cc | 69 ++++++++++++++++++++++++++++++++++++++ - qt4/src/poppler-qt4.h | 43 ++++++++++-------------- - qt4/src/poppler-textbox.cc | 49 +++++++++++++++++++++++++++ - test/pdf-inspector.cc | 9 +++-- - 11 files changed, 268 insertions(+), 35 deletions(-) - -commit 64079ad81caf6d2cf66b1f3a3de9454146e15c6c -Author: Kristian Høgsberg <krh@redhat.com> -Date: Sat Dec 3 21:55:36 2005 +0000 - - 2005-12-03 Kristian Høgsberg <krh@redhat.com> - - Fixes from Nickolay V. Shmyrev: - - * poppler/TextOutputDev.cc (TextLine::visitSelection, - TextBlock::visitSelection): Fix selection crash with - zero-width - word boxes or zero-height line boxes (#4402). - - * poppler/CairoOutputDev.h: Fix wrong cairo-ft.h include - (#4413). - - * poppler/CairoOutputDev.cc (eoFill, fill): - * glib/poppler-page.cc (poppler_page_render_selection): - Update to - work with new GfxColor definition and use - cairo_pattern_create_rgba() to cache cairo_pattern_t's for the - fill and stroke colors. - - * glib/poppler-page.cc (poppler_page_set_selection_alpha): - Zero - out pixbuf first. - - ChangeLog | 21 +++++++++++++++++ - glib/poppler-page.cc | 18 +++++++++------ - poppler/CairoOutputDev.cc | 59 - ++++++++++++++++++++++++++++++++++------------- - poppler/CairoOutputDev.h | 6 ++--- - poppler/TextOutputDev.cc | 8 +++---- - 5 files changed, 82 insertions(+), 30 deletions(-) - -commit f3da21a3ecdd2694290e64af86c8e35fcb61371b -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Dec 3 21:35:45 2005 +0000 - - More docs for the Qt4 frontend, patch by Stefan Kebekus - - ChangeLog | 8 ++++ - qt4/src/.cvsignore | 3 +- - qt4/src/Doxyfile | 4 +- - qt4/src/Mainpage.dox | 91 - ++++++++++++++++++++++++++++++++++++++++++ - qt4/src/poppler-page.cc | 20 +++------- - qt4/src/poppler-qt4.h | 57 ++++++++++++++++++-------- - qt4/tests/test-poppler-qt4.cpp | 5 ++- - 7 files changed, 151 insertions(+), 37 deletions(-) - -commit 7b2c6e92611db9350ca5dcaf3fd730fe5e69afea -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Dec 1 22:45:10 2005 +0000 - - Fix CAN-2005-3193 related bugs - Thanks Leonard for reporting - - ChangeLog | 6 ++++++ - poppler/JPXStream.cc | 9 ++++++++- - poppler/Stream.cc | 33 ++++++++++++++++++++++++++++++++- - poppler/Stream.h | 3 +++ - 4 files changed, 49 insertions(+), 2 deletions(-) - -commit a90f076af9ebb188895e7b223bcb7e5c3f4309c4 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Nov 28 22:50:19 2005 +0000 - - Fix QPixmap contents generation messed when doing the xpdf 3.01 - transition in qt4 frontend - Use Splash backend by default in the qt4 test, added -arthur option - to use the Arthur backend - - ChangeLog | 12 ++++++++-- - qt4/src/poppler-page.cc | 47 ++++++++++++++++++++++++++++--------- - qt4/src/poppler-qt4.h | 17 ++++++++++---- - qt4/tests/test-poppler-qt4.cpp | 53 - ++++++++++++++++++++++++++---------------- - 4 files changed, 91 insertions(+), 38 deletions(-) - -commit b7e4f0e7d175abde7fafb1fcc7ba129468bc8c1a -Author: Brad Hards <bradh@frogmouth.net> -Date: Sun Nov 27 01:33:51 2005 +0000 - - Convert Qt4 unit tests to use the new Qt4.1 QTestlib framework. - Add a little more API documentation - - ChangeLog | 7 +++++ - qt4/src/poppler-qt4.h | 11 +++++--- - qt4/tests/Makefile.am | 12 ++++++--- - qt4/tests/check_metadata.cpp | 58 - ++++++++++++++++++++--------------------- - qt4/tests/check_pagelayout.cpp | 14 +++++----- - qt4/tests/check_pagemode.cpp | 22 ++++++++-------- - qt4/tests/check_permissions.cpp | 18 ++++++------- - 7 files changed, 78 insertions(+), 64 deletions(-) - -commit d036fa022dbb6f4421ccc8b12b8f9e4f0c8d7406 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Nov 25 22:52:56 2005 +0000 - - patch from kebekus to add to the qt4 binding the same functions we - added to the qt3 one - - ChangeLog | 5 +++++ - qt4/src/poppler-page.cc | 44 ++++++++++++++++++++++++++++++++++++++++++-- - qt4/src/poppler-qt4.h | 22 ++++++++++++++++++++++ - 3 files changed, 69 insertions(+), 2 deletions(-) - -commit 3c9f09d76dc70e4ba766930facee8b6f30bcd2da -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Nov 22 21:50:44 2005 +0000 - - Fix page range in the inspector - - ChangeLog | 4 ++++ - test/pdf-inspector.cc | 2 +- - 2 files changed, 5 insertions(+), 1 deletion(-) - -commit e64f63416dbce497cb2167272b95491664f213e8 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Nov 21 22:12:15 2005 +0000 - - PAtch to add some more functions to the qt binding by Stefan Kebekus - - ChangeLog | 5 ++++ - qt/poppler-page.cc | 69 - +++++++++++++++++++++++++++++++++++++++++++++++++++++- - qt/poppler-qt.h | 41 ++++++++++++++++++++++++++++++++ - 3 files changed, 114 insertions(+), 1 deletion(-) - -commit 8bd8cb4160b73da69d058783750352fbface66dc -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Nov 21 19:44:09 2005 +0000 - - Fix a possible build problem - - ChangeLog | 4 ++++ - qt/Makefile.am | 1 + - 2 files changed, 5 insertions(+) - -commit fc59b79dc375544681032a1618e96c458515d724 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Sun Nov 20 23:17:32 2005 +0000 - - 2005-11-20 Kristian Høgsberg <krh@redhat.com> - - * poppler/GfxState.cc: Fix the byte_lookup initialization - broken - by the merges (#4350). Modify GfxColorSpace::getRGBLine() - to work - with new GfXColor type. - - ChangeLog | 13 +++++++++++- - poppler/GfxState.cc | 59 - +++++++++++++++++++++++++++++++---------------------- - 2 files changed, 47 insertions(+), 25 deletions(-) - -commit 6fe2cb0fcd53211143dcd0c47bf8c8c7a8c11a39 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Nov 17 21:37:34 2005 +0000 - - make it compile with freetype 2.2.0 preversions - - ChangeLog | 4 ++++ - splash/SplashFTFont.cc | 42 +++++++++++++++++++++++++++++++++++++----- - 2 files changed, 41 insertions(+), 5 deletions(-) - -commit 429d3521d788be702a3944bc290569f90ae04892 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Nov 4 19:03:55 2005 +0000 - - Make it compile using --disable-cairo-output - - ChangeLog | 4 ++++ - glib/poppler-document.cc | 6 ++++-- - glib/poppler-page.cc | 27 +++++++++++++-------------- - 3 files changed, 21 insertions(+), 16 deletions(-) - -commit b96c118eb08d478914c2981204d749a95957cbb3 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Nov 1 15:29:32 2005 +0000 - - Comment some unused parameters to calm down compiler warnings when - using these heders on external projects with higher warning verbosity - - ChangeLog | 5 +++ - poppler/OutputDev.h | 125 - ++++++++++++++++++++++++++-------------------------- - poppler/Stream.h | 24 +++++----- - 3 files changed, 80 insertions(+), 74 deletions(-) - -commit 51670972777510a3ec64a56649716b31167b9d0e -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Oct 30 20:29:05 2005 +0000 - - Last xpdf 3.01 merge (at least from my side) - It's very big, but noone has opposed in the 2 weeks time i gave on - the ml so either poppler is dead or people agree with the patch - - ChangeLog | 39 + - glib/poppler-page.cc | 32 +- - poppler/ArthurOutputDev.cc | 2 +- - poppler/ArthurOutputDev.h | 2 +- - poppler/CairoOutputDev.cc | 2 +- - poppler/CairoOutputDev.h | 2 +- - poppler/Gfx.cc | 645 +++++++++-- - poppler/Gfx.h | 17 +- - poppler/GfxState.cc | 1410 ++++++++++++++++++++--- - poppler/GfxState.h | 196 +++- - poppler/OutputDev.cc | 25 + - poppler/OutputDev.h | 46 +- - poppler/PDFDoc.cc | 98 +- - poppler/PDFDoc.h | 24 +- - poppler/PSOutputDev.cc | 1461 ++++++++++++++++++++---- - poppler/PSOutputDev.h | 48 +- - poppler/Page.cc | 115 +- - poppler/Page.h | 23 +- - poppler/SplashOutputDev.cc | 1525 ++++++++++++++++++++++--- - poppler/SplashOutputDev.h | 59 +- - poppler/TextOutputDev.cc | 230 ++-- - poppler/TextOutputDev.h | 16 +- - qt/poppler-page.cc | 34 +- - qt4/src/poppler-page.cc | 31 +- - splash/Splash.cc | 2656 - +++++++++++++++++++++++++++++++++----------- - splash/Splash.h | 75 +- - splash/SplashBitmap.cc | 216 ++-- - splash/SplashBitmap.h | 13 +- - splash/SplashPattern.cc | 22 +- - splash/SplashPattern.h | 19 +- - splash/SplashState.cc | 11 + - splash/SplashState.h | 3 + - splash/SplashTypes.h | 145 ++- - test/gtk-cairo-test.cc | 2 +- - test/gtk-splash-test.cc | 23 +- - test/pdf-inspector.cc | 2 +- - 36 files changed, 7685 insertions(+), 1584 deletions(-) - -commit 10dfa2254dafb9de93692def2bfb3133d9a39989 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Mon Oct 17 02:17:51 2005 +0000 - - 2005-10-05 Kristian Høgsberg <krh@redhat.com> - - * glib/poppler-page.cc (poppler_page_render_to_ps): - Fix another - off-by-one page number error (#4555). - - ChangeLog | 6 +++++- - poppler/poppler-config.h.in | 2 +- - 2 files changed, 6 insertions(+), 2 deletions(-) - -commit 9830f0ea41f09fefada740e9429c491e067a5082 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Oct 16 15:11:32 2005 +0000 - - GfxFont merges from xpdf 3.01 - - ChangeLog | 1 + - poppler/GfxFont.cc | 109 - ++++++++++++++++++++++++++++++++++++----------------- - 2 files changed, 75 insertions(+), 35 deletions(-) - -commit 62b5ba221aca8c320e964916b0c0329efc8da572 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Oct 16 15:04:39 2005 +0000 - - Stream[cc|h] merges from xpdf 3.01 - - ChangeLog | 1 + - poppler/Stream.cc | 714 - +++++++++++++++++++++++++++++++++++++++++++++++++----- - poppler/Stream.h | 19 +- - 3 files changed, 658 insertions(+), 76 deletions(-) - -commit b9fab51179f38e9798b10366be672f0432c874da -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Oct 16 14:58:14 2005 +0000 - - Function.cc|h merges from xpdf 3.01 - - ChangeLog | 1 + - poppler/Function.cc | 76 - ++++++++++++++++++++++++++++++----------------------- - poppler/Function.h | 42 +++++++++++++++++++++++++++++ - 3 files changed, 86 insertions(+), 33 deletions(-) - -commit c6e0242200f818c67508041763ff317e79daadd6 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Oct 16 14:54:17 2005 +0000 - - Annot.[cc|h] and related merges from xpdf 3.01 - - ChangeLog | 7 +- - poppler/Annot.cc | 234 - +++++++++++++++++++++++++++++++++++++++++++------ - poppler/Annot.h | 20 ++--- - poppler/FontInfo.cc | 2 +- - poppler/PSOutputDev.cc | 2 +- - poppler/Page.cc | 2 +- - 6 files changed, 221 insertions(+), 46 deletions(-) - -commit 65d574fdc009e45ad66d1d402d5e805e4e94f427 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Oct 16 14:30:16 2005 +0000 - - Merge SplashFTFont.cc with xpdf 3.01 changes - - ChangeLog | 1 + - splash/SplashFTFont.cc | 64 - ++++++++++++++++++++++++++++++++++---------------- - 2 files changed, 45 insertions(+), 20 deletions(-) - -commit f9d208e86433b213b21a75089f82fd00dcd746fc -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Oct 16 14:25:32 2005 +0000 - - Merge SplashScreen.[cc|h] from xpdf 3.01 - - ChangeLog | 4 ++ - splash/SplashScreen.cc | 110 - ++++++++++++++++++++++++++++++++----------------- - splash/SplashScreen.h | 12 +++++- - 3 files changed, 87 insertions(+), 39 deletions(-) - -commit 7d46ac000316566503a27b5e5c68621be9c081d0 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Oct 16 14:19:47 2005 +0000 - - Merging SplashXPathScanner.cc changes from xpdf 3.01 - - splash/SplashXPathScanner.cc | 80 - ++++++++++++++++++++++++-------------------- - 1 file changed, 43 insertions(+), 37 deletions(-) - -commit e34713a2187e05358f98e749ec2923210a40a862 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Wed Oct 5 15:57:17 2005 +0000 - - 2005-10-05 Kristian Høgsberg <krh@redhat.com> - - * glib/poppler-page.cc (poppler_page_render_to_ps): - Fix another - off-by-one page number error (#4555). - - ChangeLog | 5 +++++ - glib/poppler-page.cc | 2 +- - 2 files changed, 6 insertions(+), 1 deletion(-) - -commit fdd0934430ed251f9aeb45158b6ec95684b3e7b4 -Author: Marco Pesenti Gritti <mpg@redhat.com> -Date: Mon Sep 26 19:29:45 2005 +0000 - - 2005-09-26 Marco Pesenti Gritti <mpg@redhat.com> - - * glib/poppler-action.cc: - - Initialize window title even if the action is unknown - - ChangeLog | 6 ++++++ - glib/poppler-action.cc | 5 +++-- - 2 files changed, 9 insertions(+), 2 deletions(-) - -commit e9753049ddfbdf28df7a222d35eccdbcbcbc848d -Author: Marco Pesenti Gritti <mpg@redhat.com> -Date: Mon Sep 26 10:42:38 2005 +0000 - - 2005-09-26 Marco Pesenti Gritti <mpg@redhat.com> - - * glib/poppler-action.cc: - * glib/poppler-action.h: - - Implement launch action - - ChangeLog | 7 +++++++ - glib/poppler-action.cc | 11 ++++++++--- - glib/poppler-action.h | 1 + - 3 files changed, 16 insertions(+), 3 deletions(-) - -commit ab18b2cb6d1c62bb91173d105e8631fe4ef1bcfb -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Sep 20 15:27:31 2005 +0000 - - Parser.cc merges from xpdf 3.01 - - ChangeLog | 1 + - poppler/Parser.cc | 19 +++++++++++-------- - 2 files changed, 12 insertions(+), 8 deletions(-) - -commit cf6723caaed24615c3b8965cee9c433007f80d77 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Sep 20 15:08:52 2005 +0000 - - TextPage *TextOutpudDev::takeText() from xpdf 3.01 - - ChangeLog | 1 + - poppler/TextOutputDev.cc | 8 ++++++++ - poppler/TextOutputDev.h | 4 ++++ - 3 files changed, 13 insertions(+) - -commit e0cbb0ca2c611ad5ac0267e46279c9d61450902a -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Sep 20 14:59:43 2005 +0000 - - more 3.00 -> 3.01 merging - - ChangeLog | 1 + - poppler/XRef.cc | 1 - - 2 files changed, 1 insertion(+), 1 deletion(-) - -commit 9c7adb318d395ff674c6febf6406a8d47e9e5bf6 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Sep 20 14:43:15 2005 +0000 - - * poppler/UnicodeMap.cc: More grealloc -> greallocn - * poppler/UnicodeTypeTable.cc: Merge from xpdf 3.01 - - ChangeLog | 2 ++ - poppler/UnicodeMap.cc | 4 ++-- - poppler/UnicodeTypeTable.cc | 4 ++-- - 3 files changed, 6 insertions(+), 4 deletions(-) - -commit 2c4c9b855b0df1dc0836d4f44e9471215a419ea6 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Sep 20 14:34:31 2005 +0000 - - Merge link.cc changes from xpdf 3.00 -> 3.01 - - ChangeLog | 1 + - poppler/Link.cc | 64 - ++++++++++++++++++++++++++++++++++++++++++++++++++++++--- - 2 files changed, 62 insertions(+), 3 deletions(-) - -commit 4e9490c0219dd9c99ba0e5533c96663b8570a87b -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Sep 20 14:00:43 2005 +0000 - - Merge GlobalParam.* changes, they are worthless for us as poppler - but this way we are nearer to have the 3.01 sources merged, then we - can remove them if we decide we don't need this options. - Remove a setEncryption from the Xref.h marco probably forgot to - remove when merging - - ChangeLog | 3 +++ - poppler/GlobalParams.cc | 41 +++++++++++++++++++++++++++++++++++++++++ - poppler/GlobalParams.h | 22 ++++++++++++++++------ - poppler/XRef.h | 4 ---- - 4 files changed, 60 insertions(+), 10 deletions(-) - -commit 22da021bf69d83d641e3f30cc0e1bd62394e56a4 -Author: Marco Pesenti Gritti <mpg@redhat.com> -Date: Tue Sep 20 13:23:08 2005 +0000 - - 2005-09-20 Marco Pesenti Gritti <mpg@redhat.com> - - * poppler/XRef.cc: - - Remove duplicated initialization - - ChangeLog | 6 ++++++ - poppler/XRef.cc | 4 ---- - 2 files changed, 6 insertions(+), 4 deletions(-) - -commit 2a8778147938e3ed2af177226a9c35655f898c95 -Author: Marco Pesenti Gritti <mpg@redhat.com> -Date: Tue Sep 20 10:18:57 2005 +0000 - - 2005-09-20 Marco Pesenti Gritti <mpg@redhat.com> - - * poppler/GlobalParams.cc: - - s/G/Goo in not yet compiled plugins code - - ChangeLog | 6 ++++++ - poppler/GlobalParams.cc | 8 ++++---- - 2 files changed, 10 insertions(+), 4 deletions(-) - -commit 16f720b87cfc491db585dbdc99236cf492ffe85b -Author: Marco Pesenti Gritti <mpg@redhat.com> -Date: Tue Sep 20 09:57:41 2005 +0000 - - 2005-09-20 Marco Pesenti Gritti <mpg@redhat.com> - - * poppler/Makefile.am: - - Add XPDFPlugin*. Thanks to TSDgeos that noticed this. - - * poppler/XpdfPluginAPI.cc: - - Fixup - - ChangeLog | 10 ++++++++++ - poppler/Makefile.am | 4 +++- - poppler/XpdfPluginAPI.cc | 2 +- - 3 files changed, 14 insertions(+), 2 deletions(-) - -commit 5f30791c3d87315ad1f742de64d2c1351ca70cb7 -Author: Marco Pesenti Gritti <mpg@redhat.com> -Date: Fri Sep 16 19:33:28 2005 +0000 - - *** empty log message *** - - ChangeLog | 9 +++++++++ - 1 file changed, 9 insertions(+) - -commit db62e07fcf57f45951b21f8aab44b0d943efe5d0 -Author: Marco Pesenti Gritti <mpg@redhat.com> -Date: Fri Sep 16 19:33:05 2005 +0000 - - 2005-09-16 Marco Pesenti Gritti <mpg@redhat.com> - - * poppler/PDFDoc.cc: - * poppler/PDFDoc.h: - * poppler/XRef.cc: - * poppler/XRef.h: - - Merge more from 3.01 - - poppler/PDFDoc.cc | 20 ++++++++++++++++---- - poppler/PDFDoc.h | 19 +++++++++---------- - poppler/XRef.cc | 13 +++++++++++-- - poppler/XRef.h | 7 +++++-- - 4 files changed, 41 insertions(+), 18 deletions(-) - -commit 3acc7be594712fd0ce7ac07b7188d5b38b382782 -Author: Marco Pesenti Gritti <mpg@redhat.com> -Date: Fri Sep 16 19:05:00 2005 +0000 - - 2005-09-16 Marco Pesenti Gritti <mpg@redhat.com> - - * poppler/XRef.cc: - - Merge some initialization that I lost before - - ChangeLog | 6 ++++++ - poppler/XRef.cc | 4 ++++ - 2 files changed, 10 insertions(+) - -commit 3badd82b72b2768be27e309b048cd8dcb1c80038 -Author: Marco Pesenti Gritti <mpg@redhat.com> -Date: Fri Sep 16 18:46:37 2005 +0000 - - 2005-09-16 Marco Pesenti Gritti <mpg@redhat.com> - - * poppler/XRef.cc: - - Merge change from 3.01 - - ChangeLog | 6 ++++++ - poppler/XRef.cc | 8 -------- - 2 files changed, 6 insertions(+), 8 deletions(-) - -commit 5474583e20ca773befa17242d4ad7b8f81d5bf99 -Author: Marco Pesenti Gritti <mpg@redhat.com> -Date: Fri Sep 16 18:38:58 2005 +0000 - - 2005-09-16 Marco Pesenti Gritti <mpg@redhat.com> - - * poppler/CharCodeToUnicode.cc: - * poppler/CharCodeToUnicode.h: - - Improvements from xpdf 3.01 - - ChangeLog | 7 +++++++ - poppler/CharCodeToUnicode.cc | 31 +++++++++++++++++++------------ - poppler/CharCodeToUnicode.h | 4 ++++ - 3 files changed, 30 insertions(+), 12 deletions(-) - -commit b2a6eab113fecd3823885c64f3302bea4f372a9f -Author: Marco Pesenti Gritti <mpg@redhat.com> -Date: Fri Sep 16 18:37:29 2005 +0000 - - 2005-09-16 Marco Pesenti Gritti <mpg@redhat.com> - - * poppler/CMap.cc: - - Improvements from xpdf 3.01 - - ChangeLog | 6 ++++++ - poppler/CMap.cc | 30 +++++++++++++++++++++++++++--- - 2 files changed, 33 insertions(+), 3 deletions(-) - -commit 3f69f2158453b9dab9efc280ed1578ac3d0cebe8 -Author: Marco Pesenti Gritti <mpg@redhat.com> -Date: Fri Sep 16 18:35:29 2005 +0000 - - 2005-09-16 Marco Pesenti Gritti <mpg@redhat.com> - - * poppler/NameToUnicodeTable.h: - * poppler/UnicodeTypeTable.cc: - * poppler/UnicodeTypeTable.h: - - Merge some unicode table changes from xpdf 3.01 - - ChangeLog | 8 + - poppler/NameToUnicodeTable.h | 168 +++++------ - poppler/UnicodeTypeTable.cc | 690 - +++++++++++++++++++++++++++++++++++++++++-- - poppler/UnicodeTypeTable.h | 2 + - 4 files changed, 764 insertions(+), 104 deletions(-) - -commit 6cbe76bc55d557fe5fca0f8f1b33bda95acdc0e9 -Author: Marco Pesenti Gritti <mpg@redhat.com> -Date: Fri Sep 16 18:32:29 2005 +0000 - - 2005-09-16 Marco Pesenti Gritti <mpg@redhat.com> - - * poppler/SplashOutputDev.h: - * splash/Splash.cc: - * splash/Splash.h: - - Modified region support from xpdf 3.01 - - ChangeLog | 8 ++++++++ - poppler/SplashOutputDev.h | 5 +++++ - splash/Splash.cc | 31 +++++++++++++++++++++++++++++++ - splash/Splash.h | 11 +++++++++++ - 4 files changed, 55 insertions(+) - -commit a9df3f3203c14161e5d6bc6048ec7e123536e6d3 -Author: Marco Pesenti Gritti <mpg@redhat.com> -Date: Fri Sep 16 18:29:18 2005 +0000 - - 2005-09-16 Marco Pesenti Gritti <mpg@redhat.com> - - * goo/Makefile.am: - * poppler/DCTStream.h: - * poppler/Decrypt.cc: - * poppler/Decrypt.h: - * poppler/FlateStream.h: - * poppler/GlobalParams.cc: - * poppler/GlobalParams.h: - * poppler/Makefile.am: - * poppler/PDFDoc.cc: - * poppler/PDFDoc.h: - * poppler/Parser.cc: - * poppler/Parser.h: - * poppler/Stream.cc: - * poppler/Stream.h: - * poppler/XRef.cc: - * poppler/XRef.h: - * poppler/poppler-config.h.in: - - Merge security plugins support from xpdf 3.01 - - ChangeLog | 24 +++ - goo/FixedPoint.cc | 95 +++++++++++ - goo/FixedPoint.h | 150 ++++++++++++++++++ - goo/Makefile.am | 6 +- - poppler/DCTStream.h | 2 - - poppler/Decrypt.cc | 23 ++- - poppler/Decrypt.h | 6 +- - poppler/FlateStream.h | 2 - - poppler/GlobalParams.cc | 229 +++++++++++++++++++++++++++ - poppler/GlobalParams.h | 16 ++ - poppler/Makefile.am | 5 +- - poppler/PDFDoc.cc | 36 +++++ - poppler/PDFDoc.h | 1 + - poppler/Parser.cc | 20 --- - poppler/Parser.h | 4 - - poppler/SecurityHandler.cc | 376 - ++++++++++++++++++++++++++++++++++++++++++++ - poppler/SecurityHandler.h | 157 ++++++++++++++++++ - poppler/Stream.cc | 18 --- - poppler/Stream.h | 8 - - poppler/XRef.cc | 162 ++----------------- - poppler/XRef.h | 13 +- - poppler/XpdfPluginAPI.cc | 262 ++++++++++++++++++++++++++++++ - poppler/XpdfPluginAPI.h | 341 +++++++++++++++++++++++++++++++++++++++ - poppler/poppler-config.h.in | 2 - - 24 files changed, 1737 insertions(+), 221 deletions(-) - -commit a777e5c26483b90d0910e85c2be666640835d0bf -Author: Marco Pesenti Gritti <mpg@redhat.com> -Date: Fri Sep 16 18:21:38 2005 +0000 - - 2005-09-16 Marco Pesenti Gritti <mpg@redhat.com> - - * configure.ac: - * goo/Makefile.am: - * splash/Makefile.am: - * splash/SplashFTFont.cc: - * splash/SplashMath.h: - * splash/SplashTypes.h: - - Merge support for fixed point - - ChangeLog | 11 +++++++++++ - configure.ac | 4 ++++ - splash/Makefile.am | 1 + - splash/SplashFTFont.cc | 7 +++++++ - splash/SplashMath.h | 34 +++++++++++++++++++++++++++++++++- - splash/SplashTypes.h | 5 +++++ - 6 files changed, 61 insertions(+), 1 deletion(-) - -commit 00457c5f44a246c9f867a114a72be9f7b2dc1cf5 -Author: Marco Pesenti Gritti <mpg@redhat.com> -Date: Fri Sep 16 18:11:14 2005 +0000 - - 2005-09-16 Marco Pesenti Gritti <mpg@redhat.com> - - * poppler/ArthurOutputDev.cc: - * poppler/CairoFontEngine.cc: - * poppler/TextOutputDev.cc: - * poppler/UnicodeMap.cc: - - Use mallocn when possible - - ChangeLog | 9 +++++++++ - poppler/ArthurOutputDev.cc | 2 +- - poppler/CairoFontEngine.cc | 4 ++-- - poppler/TextOutputDev.cc | 2 +- - poppler/UnicodeMap.cc | 2 +- - 5 files changed, 14 insertions(+), 5 deletions(-) - -commit 09c9ff67ceae5753811a2f625e3ad810628c782e -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Sep 16 18:00:43 2005 +0000 - - SplashXPath.cc merges from xpdf 3.00 -> 3.01 - - ChangeLog | 3 ++ - splash/SplashXPath.cc | 81 - +++++++++++++++++++++++++-------------------------- - 2 files changed, 42 insertions(+), 42 deletions(-) - -commit 0555ba861d3b84d88c80da4fa247274338ff7817 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Sep 16 17:42:56 2005 +0000 - - SplashFontEngine.cc merge from xpdf 3.00 -> 3.01 - - splash/SplashFontEngine.cc | 8 ++++++++ - 1 file changed, 8 insertions(+) - -commit ddc72bd8354168d992631d1ef8cd0939b428966c -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Sep 15 22:24:55 2005 +0000 - - Merge xpdf 3.00 -> 3.01 changes in SplashT1Font.* files - - splash/SplashT1Font.cc | 23 ++++++++++++++++++----- - splash/SplashT1Font.h | 2 ++ - 2 files changed, 20 insertions(+), 5 deletions(-) - -commit ba409db3157105f326b4bbc342ca7af859a44ce9 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Sep 15 22:20:37 2005 +0000 - - Merge xpdf 3.00 -> 3.01 changes in SplashPath.* files - - splash/SplashPath.cc | 3 ++- - splash/SplashPath.h | 5 +++++ - 2 files changed, 7 insertions(+), 1 deletion(-) - -commit 3ea00e853049d8c26ee88aaef8ea6c47c8d46956 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Sep 15 22:15:47 2005 +0000 - - Merge xpdf 3.00 -> 3.01 changes in SplashFont.* files - - splash/SplashFont.cc | 6 ++++++ - splash/SplashFont.h | 10 +++++++++- - 2 files changed, 15 insertions(+), 1 deletion(-) - -commit e571dcbfd0c77a28e41710577859f632cc989de5 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Sep 15 22:09:50 2005 +0000 - - Merge the xpdf 3.01 change that uses runtime detection of freetype - version - - ChangeLog | 6 ++++++ - configure.ac | 14 +++----------- - poppler/CairoFontEngine.cc | 21 ++++++++++++++------- - poppler/CairoFontEngine.h | 3 ++- - splash/SplashFTFontEngine.cc | 19 +++++++++++-------- - splash/SplashFTFontEngine.h | 1 + - 6 files changed, 37 insertions(+), 27 deletions(-) - -commit 59fe2937db192dc7b59bf28c3f29909faf11aae3 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Sep 15 21:51:16 2005 +0000 - - Merge xpdf 3.00 -> 3.01 changes for that file - - splash/SplashClip.h | 9 +++++++++ - 1 file changed, 9 insertions(+) - -commit b2f94635249f2c5f0c876a1005826fe4c6eb6025 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Sep 15 12:52:36 2005 +0000 - - Merge xpdf 3.00 -> xpdf 3.01 changes for Catalog.[cc|h] - - poppler/Catalog.cc | 5 ++++- - poppler/Catalog.h | 3 +++ - 2 files changed, 7 insertions(+), 1 deletion(-) - -commit 0fc2e70576b1c48cf47a686e8aa7e202a802bc9d -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Sep 15 12:32:25 2005 +0000 - - Another small merge from xpdf 3.01 - - ChangeLog | 3 +++ - poppler/Outline.cc | 6 +++--- - 2 files changed, 6 insertions(+), 3 deletions(-) - -commit f8983ceb3c55df72c94870806d71db139c11bdeb -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Sep 15 12:28:34 2005 +0000 - - Another small xpdf 3.00 -> xpdf 3.01 merge - - poppler/Object.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 52efe9845cf3eb1dd836f90bfa203760baa2f87c -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Sep 15 11:46:56 2005 +0000 - - bradh forgot to remove the two returns when merging xpdf 3.00 -> - xpdf 3.01 changes of this file - - poppler/JPXStream.cc | 2 -- - 1 file changed, 2 deletions(-) - -commit 4b4fc5c017bf147c9069bbce32fc14467bd2a81a -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Sep 14 21:20:36 2005 +0000 - - Merge all the fofi/ changes from xpdf 3.01, there is only one api - change that affects PSOutputDev (also has been updated the part - that uses this api not the whole file). All our fixes in that dir - are included in the upgrade. - - ChangeLog | 4 + - fofi/FoFiTrueType.cc | 406 - +++++++++++++++++++++++++++++++++++++++++++------ - fofi/FoFiTrueType.h | 15 +- - fofi/FoFiType1.cc | 25 ++- - fofi/FoFiType1C.cc | 134 +++++++++++++--- - fofi/FoFiType1C.h | 6 + - poppler/PSOutputDev.cc | 7 +- - poppler/PSOutputDev.h | 3 +- - 8 files changed, 515 insertions(+), 85 deletions(-) - -commit a68e8e6330418b1f623867973b9c128a9a139c0c -Author: Kristian Høgsberg <krh@redhat.com> -Date: Wed Sep 7 03:00:36 2005 +0000 - - 2005-09-06 Kristian Høgsberg <krh@redhat.com> - - * configure.ac: Enable A4_PAPER and OPI_SUPPORT by default. - There - is no reason to not enable OPI and the paper size should be - controlled by the application. - - * test/Makefile.am (EXTRA_DIST): Add pdf-operators.c - - ChangeLog | 8 ++++++++ - configure.ac | 17 ++--------------- - test/Makefile.am | 3 +++ - 3 files changed, 13 insertions(+), 15 deletions(-) - -commit b6490944c081ff53f623acea7ab7a600c3e54816 -Author: Brad Hards <bradh@frogmouth.net> -Date: Sat Sep 3 11:53:44 2005 +0000 - - Switch the qt4/tests unittests to use QtTestLib. - - ChangeLog | 6 ++ - configure.ac | 66 +++++++++++++++++++++ - qt4/tests/.cvsignore | 17 ++---- - qt4/tests/Makefile.am | 71 ++++++++-------------- - qt4/tests/README.unittest | 23 ++++++++ - qt4/tests/check_author.cpp | 25 -------- - qt4/tests/check_linearised.cpp | 23 -------- - qt4/tests/check_metadata.cpp | 101 - ++++++++++++++++++++++++++++++++ - qt4/tests/check_orientation.cpp | 40 ------------- - qt4/tests/check_pagelayout.cpp | 44 ++++++++++++++ - qt4/tests/check_pagelayout_facing.cpp | 22 ------- - qt4/tests/check_pagelayout_none.cpp | 22 ------- - qt4/tests/check_pagelayout_single.cpp | 22 ------- - qt4/tests/check_pagemode.cpp | 64 ++++++++++++++++++++ - qt4/tests/check_pagemode_attach.cpp | 22 ------- - qt4/tests/check_pagemode_fullscreen.cpp | 22 ------- - qt4/tests/check_pagemode_none.cpp | 22 ------- - qt4/tests/check_pagemode_oc.cpp | 22 ------- - qt4/tests/check_pagemode_thumbs.cpp | 22 ------- - qt4/tests/check_permissions.cpp | 60 +++++++------------ - 20 files changed, 354 insertions(+), 362 deletions(-) - -commit 3725841417871d1051772068833dc908ca70b7ce -Author: Kristian Høgsberg <krh@redhat.com> -Date: Fri Sep 2 14:47:24 2005 +0000 - - 2005-09-02 Kristian Høgsberg <krh@redhat.com> - - * glib/poppler-page.cc: Apply Marcos rotation fix. - - ChangeLog | 4 ++++ - glib/poppler-page.cc | 5 ++++- - 2 files changed, 8 insertions(+), 1 deletion(-) - -commit ecf3dcadb948013cbc987e464952933daf78e4bf -Author: Brad Hards <bradh@frogmouth.net> -Date: Wed Aug 31 15:28:46 2005 +0000 - - Merge some missing parts of previous patches, and some other minor - cleanups from xpdf 3.0.1 - - poppler/Catalog.cc | 16 +-- - poppler/JPXStream.cc | 380 - +++++++++++++++++++++++++++++++++---------------- - poppler/JPXStream.h | 25 ++-- - poppler/Lexer.cc | 11 ++ - poppler/Lexer.h | 3 + - poppler/PSOutputDev.cc | 31 ++-- - poppler/Stream.h | 7 + - 7 files changed, 309 insertions(+), 164 deletions(-) - -commit de78738164319b733e54a9abfb5957870facd6cd -Author: Brad Hards <bradh@frogmouth.net> -Date: Wed Aug 31 09:51:41 2005 +0000 - - poppler/JArithmeticDecoder.cc - poppler/JArithmeticDecoder.h - poppler/JBIG2Stream.cc - poppler/JBIG2Stream.h: merge in some of the JBIG2 changes from - xpdf 3.0.1. - - ChangeLog | 9 ++ - poppler/JArithmeticDecoder.cc | 42 ++++++-- - poppler/JArithmeticDecoder.h | 22 +++- - poppler/JBIG2Stream.cc | 227 - +++++++++++++++++++++++++----------------- - poppler/JBIG2Stream.h | 4 +- - 5 files changed, 201 insertions(+), 103 deletions(-) - -commit 55952feb637e300b073691ae95d68e766521a769 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Mon Aug 29 15:24:32 2005 +0000 - - 2005-08-29 Kristian Høgsberg <krh@redhat.com> - - * configure.ac (HAVE_FREETYPE_H): Patch from Hiroyuki - Ikezoe: Set - HAVE_FREETYPE_217_OR_OLDER to 0 if we found freetype using - pkg-config (#4223). - - ChangeLog | 6 ++++++ - configure.ac | 2 +- - 2 files changed, 7 insertions(+), 1 deletion(-) - -commit 244e5c1f8f65da41ba6314028766dfe5973f6132 -Author: Brad Hards <bradh@frogmouth.net> -Date: Sun Aug 28 09:43:18 2005 +0000 - - Merge the Goo* improvements from xpdf 3.0.1. This change is based on - martink's work (7-xpdf-3.01-goo-improvements.patch), with some - tweaking - by me. - - ChangeLog | 13 ++++++++ - fofi/FoFiTrueType.cc | 1 + - goo/GooHash.cc | 24 +++++++++++++++ - goo/GooHash.h | 2 ++ - goo/GooList.cc | 5 ++++ - goo/GooList.h | 5 ++++ - goo/GooString.cc | 85 - +++++++++++++++++++++++++++++++++++++++++++++++++++- - goo/GooString.h | 11 +++---- - goo/gmem.c | 3 ++ - poppler/Decrypt.cc | 1 + - 10 files changed, 142 insertions(+), 8 deletions(-) - -commit eb91b274245b4f5f5389bc9ddfde2c2806557665 -Author: Brad Hards <bradh@frogmouth.net> -Date: Sun Aug 28 09:31:53 2005 +0000 - - This part of my previous gmallocn merge patch was missing. - - goo/GooHash.cc | 4 ++-- - goo/GooList.cc | 8 ++++---- - 2 files changed, 6 insertions(+), 6 deletions(-) - -commit b3474fd5e0efc96b5814d86e0cdedf39387e7ae3 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Sun Aug 28 03:26:53 2005 +0000 - - add note about related bug - - ChangeLog | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit ace2eb6ba518b970b96f30f61c4795c161e0cb79 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Sun Aug 28 03:22:04 2005 +0000 - - 2005-08-27 Jeff Muizelaar <jeff@infidigm.net> - - * poppler/FlateStream.cc: Fix predictor leak. - - ChangeLog | 4 ++++ - poppler/FlateStream.cc | 1 + - 2 files changed, 5 insertions(+) - -commit 96657c5480bf2ecf445ad5a105b8e7393ae53c8b -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Sun Aug 28 03:19:55 2005 +0000 - - 2005-08-27 Jeff Muizelaar <jeff@infidigm.net> - - * configure.ac: Disable the zlib-based decoder by default. - - ChangeLog | 4 ++++ - configure.ac | 2 +- - 2 files changed, 5 insertions(+), 1 deletion(-) - -commit d1d715158223c7ca3ae279cea420a948cfdb0428 -Author: Brad Hards <bradh@frogmouth.net> -Date: Sat Aug 27 08:43:42 2005 +0000 - - Merge the gmalloc -> gmallocn changes from xpdf 3.0.1. This change is - based on martink's work (13-xpdf-3.01-goo-allocn.patch) with some - tweaking by me. There may be some residual gmallocn changes still to - be merged. - - ChangeLog | 7 ++++++ - fofi/FoFiTrueType.cc | 12 +++++----- - fofi/FoFiType1.cc | 2 +- - fofi/FoFiType1C.cc | 14 +++++------ - goo/gmem.c | 22 ++++++++++++++++++ - goo/gmem.h | 9 ++++++++ - poppler/Annot.cc | 2 +- - poppler/Array.cc | 2 +- - poppler/BuiltinFont.cc | 2 +- - poppler/CMap.cc | 6 ++--- - poppler/Catalog.cc | 8 +++---- - poppler/CharCodeToUnicode.cc | 22 +++++++++--------- - poppler/Dict.cc | 2 +- - poppler/Function.cc | 20 ++++++++-------- - poppler/Gfx.cc | 2 +- - poppler/GfxFont.cc | 24 +++++++++---------- - poppler/GfxState.cc | 54 - +++++++++++++++++++++---------------------- - poppler/JArithmeticDecoder.cc | 2 +- - poppler/JBIG2Stream.cc | 30 ++++++++++++------------ - poppler/Link.cc | 6 ++--- - poppler/NameToCharCode.cc | 4 ++-- - poppler/Outline.cc | 4 ++-- - poppler/SplashOutputDev.cc | 8 +++---- - poppler/Stream.cc | 12 +++++----- - poppler/TextOutputDev.cc | 48 +++++++++++++++++++------------------- - poppler/XRef.cc | 18 +++++++-------- - splash/SplashClip.cc | 12 +++++----- - splash/SplashFTFontFile.cc | 2 +- - splash/SplashFont.cc | 6 ++--- - splash/SplashPath.cc | 8 +++---- - splash/SplashScreen.cc | 4 ++-- - splash/SplashState.cc | 4 ++-- - splash/SplashT1FontFile.cc | 4 ++-- - splash/SplashXPath.cc | 4 ++-- - splash/SplashXPathScanner.cc | 4 ++-- - 35 files changed, 214 insertions(+), 176 deletions(-) - -commit feb82c60b1f86a9d1260db57534d98c54ee615c4 -Author: Martin Kretzschmar <martink@gnome.org> -Date: Wed Aug 24 19:41:27 2005 +0000 - - * configure.ac: add /usr/include/qt4 to qt4_incdirs. That's what - Debian and Ubuntu use. Maybe we should just use pkg-config. If - it's usable with qt4. - - * test/.cvsignore: ignore pdf_inspector binary. - - ChangeLog | 8 ++++++++ - configure.ac | 2 +- - test/.cvsignore | 7 ++++--- - 3 files changed, 13 insertions(+), 4 deletions(-) - -commit 8dce80eb74f24f07ac7668905f1631e04a9c5841 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Wed Aug 24 18:57:46 2005 +0000 - - 2005-08-24 Kristian Høgsberg <krh@redhat.com> - - * poppler/TextOutputDev.cc: Push rotation argument down to - GfxState constructor. This is still not completely - functional yet. - - * glib/poppler-page.cc (poppler_page_render_selection): Add - rotation argument so API is useful. Not yet implemented. - (poppler_page_prepare_output_dev): Patch from Marco to fix - rotation using the cairo backend. - - ChangeLog | 10 ++++++++++ - glib/poppler-page.cc | 22 ++++++++++++++++------ - glib/poppler-page.h | 1 + - poppler/TextOutputDev.cc | 11 ++++++++--- - poppler/TextOutputDev.h | 4 +++- - 5 files changed, 38 insertions(+), 10 deletions(-) - -commit b909b5ae98bc3e557ef6e658e2b9120e82951259 -Author: Jonathan Blandford <jrb@redhat.com> -Date: Wed Aug 24 03:21:20 2005 +0000 - - Tue Aug 23 17:21:02 2005 Jonathan Blandford <jrb@redhat.com> - - * test/Makefile.am (gtk_cairo_test_LDADD): add - FREETYPE_{CFLAGS,LIBS} to the cairo deps - - ChangeLog | 5 +++++ - test/Makefile.am | 4 +++- - 2 files changed, 8 insertions(+), 1 deletion(-) - -commit da3aac379f07ffedd6078707ec9923800fc0c0a5 -Author: Jonathan Blandford <jrb@redhat.com> -Date: Tue Aug 23 18:20:45 2005 +0000 - - Tue Aug 23 13:38:01 2005 Jonathan Blandford <jrb@redhat.com> - - * configure.ac: - * poppler/Gfx.cc: - * poppler/Gfx.h: - * poppler/GlobalParams.cc: - * poppler/GlobalParams.h: - * poppler/Makefile.am: - * poppler/OutputDev.cc: - * poppler/OutputDev.h: - * poppler/ProfileData.cc: - * poppler/ProfileData.h: - * test/Makefile.am: - * test/pdf-inspector.cc: - * test/pdf-inspector.glade: - * test/pdf-operators.c: Initial cut at a pdf inspector. This - should help us look at PDF files. - - ChangeLog | 18 ++ - configure.ac | 4 +- - poppler/Gfx.cc | 30 ++++ - poppler/Gfx.h | 1 + - poppler/GlobalParams.cc | 16 ++ - poppler/GlobalParams.h | 3 + - poppler/Makefile.am | 2 + - poppler/OutputDev.cc | 17 ++ - poppler/OutputDev.h | 10 +- - poppler/ProfileData.cc | 44 +++++ - poppler/ProfileData.h | 41 +++++ - test/Makefile.am | 13 +- - test/pdf-inspector.cc | 358 ++++++++++++++++++++++++++++++++++++++ - test/pdf-inspector.glade | 434 - +++++++++++++++++++++++++++++++++++++++++++++++ - test/pdf-operators.c | 81 +++++++++ - 15 files changed, 1068 insertions(+), 4 deletions(-) - -commit 1aad886c6c19a964a3fc9e18f31acc8e115478e0 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Mon Aug 22 18:20:12 2005 +0000 - - 2005-08-22 Kristian Høgsberg <krh@redhat.com> - - * glib/poppler-page.cc: - * glib/poppler-page.h: - * glib/poppler-private.h: - * glib/test-poppler-glib.c: Patch from Marco to simplify - the glib - rotation API. - - ChangeLog | 8 +++ - glib/poppler-page.cc | 136 - +++++++---------------------------------------- - glib/poppler-page.h | 4 +- - glib/poppler-private.h | 1 - - glib/test-poppler-glib.c | 2 +- - 5 files changed, 28 insertions(+), 123 deletions(-) - -commit 6070b1dc4b76c236f3100fbd255c2d906e61c3c2 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Sun Aug 21 23:14:04 2005 +0000 - - 2005-08-21 Kristian Høgsberg <krh@redhat.com> - - * poppler/Makefile.am (INCLUDES): Add FREETYPE_CFLAGS. - - * configure.ac: Make freetype check use pkg-config if - possible. - - ChangeLog | 6 ++++++ - configure.ac | 34 ++++++++++++++++++++++++---------- - poppler/Makefile.am | 1 + - 3 files changed, 31 insertions(+), 10 deletions(-) - -commit 2698ca6fa107ea91dc01eb8cfb0c93383fbca125 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Wed Aug 17 16:54:01 2005 +0000 - - 2005-08-17 Kristian Høgsberg <krh@redhat.com> - - * poppler/GfxFont.cc: Add fix discussed in #3131 to only - use the - MacRoman char map if the font has one or the font dicts - specifies - /MacRoman. - - ChangeLog | 6 ++++++ - poppler/GfxFont.cc | 1 - - 2 files changed, 6 insertions(+), 1 deletion(-) - -commit 5dc9b14b99f2efa2fe018e9267dd363d1bcd78b1 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Aug 7 23:58:12 2005 +0000 - - Fix EOF checking - - ChangeLog | 4 ++++ - poppler/PDFDoc.cc | 10 +++++++++- - 2 files changed, 13 insertions(+), 1 deletion(-) - -commit 155d019d7b474f244a3e4bf64d192015f6a266c4 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Sat Aug 6 18:09:51 2005 +0000 - - 2005-08-06 Kristian Høgsberg <krh@redhat.com> - - * glib/poppler-page.cc: - * glib/poppler-page.h: Use GdkColor for specifying selection - colors, we alreay depend on GDK anyway. - - ChangeLog | 6 ++++++ - glib/poppler-page.cc | 20 +++++++++----------- - glib/poppler-page.h | 5 +++-- - 3 files changed, 18 insertions(+), 13 deletions(-) - -commit c710b645c8297d356c101b13a9889bcaba691176 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Aug 6 11:58:59 2005 +0000 - - Update comment - - poppler/PDFDoc.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit de7953c8a8360d8bfc99298906c5fc1094684fc3 -Author: Albert Astals Cid <aacid@kde.org> -Date: Sat Aug 6 11:47:37 2005 +0000 - - Increase EOF searching up to last 1024 characters - - ChangeLog | 7 +++++++ - poppler/PDFDoc.cc | 23 +++++++++++++---------- - 2 files changed, 20 insertions(+), 10 deletions(-) - -commit 5dd72618688763b50d5f5738d857c9294ef1b1c2 -Author: Brad Hards <bradh@frogmouth.net> -Date: Sat Aug 6 02:15:58 2005 +0000 - - Add password arguments to document constructor. - - ChangeLog | 4 ++++ - qt4/src/poppler-document.cc | 8 ++++++-- - qt4/src/poppler-qt4.h | 4 +++- - 3 files changed, 13 insertions(+), 3 deletions(-) - -commit edbd7957b393eb63f48df7db6b220b355d4fc461 -Author: Brad Hards <bradh@frogmouth.net> -Date: Sat Aug 6 02:07:55 2005 +0000 - - Make API extraction work again. - - ChangeLog | 3 +++ - qt4/src/Doxyfile | 2 +- - 2 files changed, 4 insertions(+), 1 deletion(-) - -commit f43a6f1d1c27c042f5736746c94430083baa4c1d -Author: Brad Hards <bradh@frogmouth.net> -Date: Sat Aug 6 01:53:06 2005 +0000 - - Add new test code for encrypted files. - - ChangeLog | 5 ++ - qt4/tests/.cvsignore | 1 + - qt4/tests/Makefile.am | 7 ++- - qt4/tests/test-password-qt4.cpp | 135 - ++++++++++++++++++++++++++++++++++++++++ - 4 files changed, 147 insertions(+), 1 deletion(-) - -commit 2ec26afaf80864b023899b890b8e229448da9bed -Author: Kristian Høgsberg <krh@redhat.com> -Date: Fri Aug 5 22:30:20 2005 +0000 - - 2005-08-05 Kristian Høgsberg <krh@redhat.com> - - * poppler/TextOutputDev.cc (visitLine): Round selection - coordinates in device space, so selection isn't fuzzy. - - * poppler/GfxState.cc: - * poppler/GfxState.h: Add simple Matrix class. - - ChangeLog | 8 ++++++++ - poppler/CairoOutputDev.cc | 6 +++--- - poppler/GfxState.cc | 26 ++++++++++++++++++++++++++ - poppler/GfxState.h | 10 ++++++++++ - poppler/TextOutputDev.cc | 14 ++++++++++++++ - 5 files changed, 61 insertions(+), 3 deletions(-) - -commit ccba4f0773047eea5e4ad0ac736450160dd97664 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Fri Aug 5 19:04:36 2005 +0000 - - 2005-08-05 Kristian Høgsberg <krh@redhat.com> - - * glib/poppler-page.cc: - * glib/poppler-page.h: - * poppler/TextOutputDev.cc: - * poppler/TextOutputDev.h: Propagate selection colors to - the glib API. - - ChangeLog | 7 ++++++ - glib/poppler-page.cc | 63 - ++++++++++++++++++++++++++++++++++++++++++------ - glib/poppler-page.h | 4 ++- - poppler/TextOutputDev.cc | 25 +++++++++---------- - poppler/TextOutputDev.h | 7 ++++-- - 5 files changed, 82 insertions(+), 24 deletions(-) - -commit 43e97129393f403c41f191ceae9a54793ece005f -Author: Brad Hards <bradh@frogmouth.net> -Date: Thu Aug 4 10:15:23 2005 +0000 - - Fix problem with drawing filled objects that was introduced in - Rev 1.4. - - ChangeLog | 5 +++++ - poppler/ArthurOutputDev.cc | 13 +++++++++++-- - 2 files changed, 16 insertions(+), 2 deletions(-) - -commit a75d80333a70d2e1ac7c9032d316034eebed9dd6 -Author: Brad Hards <bradh@frogmouth.net> -Date: Wed Aug 3 11:44:55 2005 +0000 - - Implement paging ability for Qt4, more than a little based - on Albert's work for Qt3. - Up arrow -> previous page - Down arrow -> next page - q -> quit. - - What more could you want from a PDF viewer :-) - - ChangeLog | 6 ++++++ - qt4/tests/test-poppler-qt4.cpp | 47 - +++++++++++++++++++++++++++++++++--------- - 2 files changed, 43 insertions(+), 10 deletions(-) - -commit f3e0a163b098da1cc389c2c4f47e28358b1bec77 -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Aug 1 19:15:40 2005 +0000 - - Fix problem in the patch to fix #3299 - - ChangeLog | 4 ++++ - poppler/DCTStream.cc | 15 ++++++++++----- - poppler/DCTStream.h | 1 + - 3 files changed, 15 insertions(+), 5 deletions(-) - -commit 5f7bd81bedd8c90e3312190256488ff0c15502e1 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Mon Aug 1 15:21:19 2005 +0000 - - 2005-08-01 Kristian Høgsberg <krh@redhat.com> - - Patch from Dan Winship <danw@novell.com> - - * glib/poppler-page.cc (poppler_page_copy_to_pixbuf): Set - alpha to - 0xff (opaque), not 0x00. - - ChangeLog | 7 +++++++ - glib/poppler-page.cc | 2 +- - 2 files changed, 8 insertions(+), 1 deletion(-) - -commit 22f509e60f60ccaea1f91d9ec1ef7ba8200bee8a -Author: Brad Hards <bradh@frogmouth.net> -Date: Mon Aug 1 08:09:00 2005 +0000 - - Fix up the fill problem with drawing text, where the "middle" - of glyphs - with a "hole" (like d, o, p, b, g) got filled. Also remove some - debugging - code. The glyphs are still ugly though. - - ChangeLog | 7 +++++++ - poppler/ArthurOutputDev.cc | 13 +------------ - 2 files changed, 8 insertions(+), 12 deletions(-) - -commit 7bf5d10c1f6edd538769c3a83a3b3d5df56d604b -Author: Brad Hards <bradh@frogmouth.net> -Date: Sun Jul 31 09:54:04 2005 +0000 - - An initial version of proper font handling, heavily based on work by - Albert Astals Cid. I changed it to stroke the glyphs based on the - SplashPath. In the longer term, Arthur should use FreeType paths - directly - hopefully that will be less ugly, and not fill everything. - - ChangeLog | 8 + - poppler/ArthurOutputDev.cc | 401 - ++++++++++++++++++++++++++++++++------------- - poppler/ArthurOutputDev.h | 15 +- - qt4/src/poppler-page.cc | 2 +- - splash/SplashPath.h | 2 + - 5 files changed, 314 insertions(+), 114 deletions(-) - -commit 8567b794628786b82e8db2a7daf75e4ad2398960 -Author: Brad Hards <bradh@frogmouth.net> -Date: Fri Jul 29 12:15:19 2005 +0000 - - Add some more test cases. - - ChangeLog | 4 ++++ - qt4/tests/.cvsignore | 4 ++++ - qt4/tests/Makefile.am | 10 +++++++++- - qt4/tests/check_pagelayout_facing.cpp | 22 ++++++++++++++++++++++ - qt4/tests/check_version.cpp | 22 ++++++++++++++++++++++ - 5 files changed, 61 insertions(+), 1 deletion(-) - -commit 59d660cf4d614fdea09d6a62b8889f7682c2b4f9 -Author: Brad Hards <bradh@frogmouth.net> -Date: Fri Jul 29 11:41:14 2005 +0000 - - Compile fix associated with last change. - - poppler/ArthurOutputDev.cc | 2 -- - 1 file changed, 2 deletions(-) - -commit 88c57c73f57820d6a57e26825093fbc688845e67 -Author: Brad Hards <bradh@frogmouth.net> -Date: Fri Jul 29 11:24:42 2005 +0000 - - A couple of minor changes to the Arthur backend. - - ChangeLog | 9 +++++++++ - poppler/ArthurOutputDev.cc | 18 ++++++++++++++---- - 2 files changed, 23 insertions(+), 4 deletions(-) - -commit 481db9d9eae5ea16e5b382f4ad21e6e624a70dcf -Author: Kristian Høgsberg <krh@redhat.com> -Date: Fri Jul 29 05:48:33 2005 +0000 - - 2005-07-29 Kristian Høgsberg <krh@redhat.com> - - * poppler/TextOutputDev.cc: Finish TextSelectionDumper - class for - extracting the text from a selection. Add - TextPage::getSelectionText() and - TextOutputDev::getSelectionText() - methods to expose the new functionality. - - * glib/poppler-page.cc (poppler_page_get_text): Use - TextOutputDev::getSelectionText() to get the text from the - selection. - - * glib/poppler-document.cc (poppler_document_new_from_file): - * glib/poppler-page.cc (_poppler_page_new): Add extra NULL to - g_object_new() constructor to silence gcc warning about - missing - sentinel. - - ChangeLog | 16 +++++ - glib/poppler-document.cc | 2 +- - glib/poppler-page.cc | 31 +++++---- - poppler/TextOutputDev.cc | 164 - +++++++++++++++++++++++++++++++++++------------ - poppler/TextOutputDev.h | 8 +++ - 5 files changed, 164 insertions(+), 57 deletions(-) - -commit ad312dbded4e8f70c3a2eac9a0964fa00ecb6b2c -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Jul 28 22:56:17 2005 +0000 - - Fix memory leaks in PageLabelInfo.cc - - ChangeLog | 4 ++++ - poppler/PageLabelInfo.cc | 11 +++++++++++ - poppler/PageLabelInfo.h | 2 ++ - 3 files changed, 17 insertions(+) - -commit b45ad9f3409d7b1ed147135a70553e5255913c61 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Jul 28 20:53:36 2005 +0000 - - - delete family; - + delete[] family; - as family is new[]'ed - - When assigning family if the font had "the proper info" and family - had to be deleted, do it. - - poppler/GlobalParams.cc | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -commit f93dfc5c5133e0b1bd9f4786cfe18bd796cbac2a -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Jul 28 18:51:17 2005 +0000 - - Remove the debugging - - poppler/GlobalParams.cc | 5 ----- - 1 file changed, 5 deletions(-) - -commit 8022315004e1623c0be320f7671fcd72c15c0de3 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Jul 28 18:37:17 2005 +0000 - - Wonder how that slipped here - - poppler/GlobalParams.cc | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -commit 82638babe89e402c0348619ec3205059b977c7e9 -Author: Albert Astals Cid <aacid@kde.org> -Date: Thu Jul 28 17:34:19 2005 +0000 - - Fontconfig patch is here, rejoice - - ChangeLog | 15 +- - glib/poppler-document.cc | 1 - - poppler/CairoFontEngine.cc | 95 +-------- - poppler/CairoFontEngine.h | 2 - - poppler/CairoOutputDev.cc | 4 - - poppler/GlobalParams.cc | 473 - ++++++++++++++++++++------------------------ - poppler/GlobalParams.h | 17 +- - poppler/SplashOutputDev.cc | 132 +------------ - poppler/SplashOutputDev.h | 3 - - qt/poppler-document.cc | 1 - - qt4/src/poppler-document.cc | 1 - - test/gtk-cairo-test.cc | 1 - - test/gtk-splash-test.cc | 1 - - 13 files changed, 241 insertions(+), 505 deletions(-) - -commit e9015531b1d0e5f2c8d8ca2bc50d5f14aaf954bc -Author: Kristian Høgsberg <krh@redhat.com> -Date: Thu Jul 28 06:31:57 2005 +0000 - - 2005-07-28 Kristian Høgsberg <krh@redhat.com> - - * poppler/poppler-config.h.in: Add GCC_PRINTF_FORMAT macro to - annotate printf-like functions (#3638). - - * poppler/Error.h: Add GCC_PRINTF_FORMAT to error(). - - * poppler/PSOutputDev.h: Add GCC_PRINTF_FORMAT to - PSOutputDev::writePSFmt(). - - * poppler/PSOutputDev.cc, poppler/GlobalParams.cc: Quiet new - printf warnings. - - ChangeLog | 11 +++++++++++ - poppler/Error.h | 2 +- - poppler/GlobalParams.cc | 3 ++- - poppler/PSOutputDev.cc | 3 +-- - poppler/PSOutputDev.h | 2 +- - poppler/TextOutputDev.cc | 13 ++++++++++++- - poppler/poppler-config.h.in | 12 ++++++++++++ - 7 files changed, 40 insertions(+), 6 deletions(-) - -commit 9df89c495683e229b771b3d008ed25d478465c35 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Thu Jul 28 05:52:43 2005 +0000 - - 2005-07-28 Kristian Høgsberg <krh@redhat.com> - - * poppler/TextOutputDev.cc (TextBlock::visitSelection): Assign - start and stop coordinates in one place so we don't assign the - same point to both in some corner cases. - (TextWord::visitSelection): Initialize begin to len, not - len + 1 - to fix crash. - - (TextWord::visitSelection, TextLine::visitSelection): Change - selection trigger; now midpoint of glyph must be included in - selection area for glyph to be in selection. - - ChangeLog | 12 +++++ - poppler/CairoOutputDev.cc | 2 +- - poppler/TextOutputDev.cc | 113 - ++++++++++++++++++++++------------------------ - 3 files changed, 67 insertions(+), 60 deletions(-) - -commit a3d9b5849cedf1316c6fc5859872e957f3f7b593 -Author: Martin Kretzschmar <martink@gnome.org> -Date: Wed Jul 27 19:21:08 2005 +0000 - - * poppler/PSOutputDev.cc (PSOutputDev): change the constructor to - take paper size and duplex setting parameters. - (init): add paper size and duplex parameters. - (writeDocSetup): add duplex parameter. - - * poppler/PSOutputDev.h: update declarations. - - * glib/poppler-private.h (struct _PopplerPSFile): store necessary - information to eventually construct a PSOutputDev. - - * glib/poppler-page.cc (poppler_page_render_to_ps): initialize the - output dev if it doesn't exist yet. - - * glib/poppler-document.cc (poppler_ps_file_new): don't create the - PSOutputDev here, just store filename and page range. - (poppler_ps_file_set_paper_size, poppler_ps_file_set_duplex): new - functions. - (poppler_ps_file_free): free the filename which we strdup now. - - * glib/poppler-document.h: add prototypes. - - ChangeLog | 23 +++++++++++++++++++++++ - glib/poppler-document.cc | 49 - +++++++++++++++++++++++++++++++++++++++++------- - glib/poppler-document.h | 15 ++++++++++----- - glib/poppler-page.cc | 10 ++++++++++ - glib/poppler-private.h | 6 ++++++ - poppler/PSOutputDev.cc | 23 ++++++++++++++--------- - poppler/PSOutputDev.h | 9 +++++++-- - 7 files changed, 112 insertions(+), 23 deletions(-) - -commit 7be920ecf13698c3cf4ab8df09c8c67f1a04bfa2 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Jul 26 21:52:09 2005 +0000 - - Fix mem leak in qt test app - - ChangeLog | 4 ++++ - qt/test-poppler-qt.cpp | 2 ++ - 2 files changed, 6 insertions(+) - -commit 2bc26dffd9f296799617d319055648c20f748c8a -Author: Kristian Høgsberg <krh@redhat.com> -Date: Tue Jul 26 20:34:13 2005 +0000 - - 2005-07-26 Kristian Høgsberg <krh@redhat.com> - - * fofi/FoFiType1.cc: Make check for end of encoding array - a bit - more liberal so we don't crash on complex encoding arrays - (#3344). - - ChangeLog | 5 +++++ - fofi/FoFiType1.cc | 21 +++++++-------------- - 2 files changed, 12 insertions(+), 14 deletions(-) - -commit 07911274e4e850a628b1e587cafc2a73c05f93fe -Author: Albert Astals Cid <aacid@kde.org> -Date: Mon Jul 25 20:40:37 2005 +0000 - - Work on bad jpeg data that have garbage before the start marker. Fixes - bug #3299 - - ChangeLog | 5 +++++ - poppler/DCTStream.cc | 38 ++++++++++++++++++++++++++++++++++++++ - 2 files changed, 43 insertions(+) - -commit a1869eca39172fcb42f036a5846b19548be53568 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Jul 22 11:01:25 2005 +0000 - - Fix bug #3586 - - ChangeLog | 5 +++++ - poppler/CairoFontEngine.cc | 2 ++ - 2 files changed, 7 insertions(+) - -commit 95529b41272484f08fb54393e1886bf7ff3e02c8 -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Jul 22 10:45:19 2005 +0000 - - Make it possible to browse pages in test-poppler-qt - - ChangeLog | 13 +++++++++---- - qt/test-poppler-qt.cpp | 49 - ++++++++++++++++++++++++++++++++++++++++--------- - 2 files changed, 49 insertions(+), 13 deletions(-) - -commit 2d52650864eab0e9385ed1fe8fb594daac9d8322 -Author: Martin Kretzschmar <martink@gnome.org> -Date: Fri Jul 22 10:35:56 2005 +0000 - - * glib/poppler-document.cc (poppler_fonts_iter_get_name): if the - font is a subset, strip the ABCDEF+ tag. - (poppler_fonts_iter_get_full_name): does what the old get_name did. - (poppler_fonts_iter_get_font_type, poppler_fonts_iter_is_embedded) - (poppler_fonts_iter_is_subset): new wrappers. - - * glib/poppler-document.h (PopplerFontType): new enum. - Update prototypes. - - ChangeLog | 11 ++++++++++ - glib/poppler-document.cc | 54 - +++++++++++++++++++++++++++++++++++++++++++++++- - glib/poppler-document.h | 38 ++++++++++++++++++++++++---------- - 3 files changed, 91 insertions(+), 12 deletions(-) - -commit 43bed4aafcf1d291dc96fa5070efbd7936a6122f -Author: Albert Astals Cid <aacid@kde.org> -Date: Fri Jul 22 10:33:54 2005 +0000 - - Fix bugs #3728 and #3750 - - ChangeLog | 4 ++++ - splash/Splash.cc | 10 ++++++++++ - 2 files changed, 14 insertions(+) - -commit c7bcef87493d354a077dd223d76f86640acc0ce3 -Author: Martin Kretzschmar <martink@gnome.org> -Date: Fri Jul 15 19:55:30 2005 +0000 - - update for 2005-06-27 change to actually display something again. - - ChangeLog | 5 +++++ - test/gtk-cairo-test.cc | 10 ++++++---- - 2 files changed, 11 insertions(+), 4 deletions(-) - -commit 6623711d2d50dc52454904ee16b25337f0aab130 -Author: Brad Hards <bradh@frogmouth.net> -Date: Sun Jul 10 09:34:03 2005 +0000 - - A general cleanup of the Arthur output renderer. - - ChangeLog | 5 +++ - poppler/ArthurOutputDev.cc | 105 - ++++++++++++++++----------------------------- - 2 files changed, 41 insertions(+), 69 deletions(-) - -commit ea1cc9a7b12db9c44b89896c41d07e3ba932d054 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Fri Jul 8 04:59:41 2005 +0000 - - 2005-07-08 Kristian Høgsberg <krh@redhat.com> - - * glib/poppler-page.cc (poppler_page_set_selection_alpha): Add - this function to initialize the alpha channel when using the - splash backend. - - * poppler/TextOutputDev.cc (visitLine): Add missing scaling of - intra-line selection edges. - - ChangeLog | 9 ++++++++ - glib/poppler-page.cc | 59 - +++++++++++++++++++++++++++++++++++++++++++++++- - poppler/TextOutputDev.cc | 17 ++++++++------ - 3 files changed, 77 insertions(+), 8 deletions(-) - -commit 1cd915397c9532ed80b4f905b6ed9c0126aa38f2 -Author: Brad Hards <bradh@frogmouth.net> -Date: Thu Jul 7 21:15:09 2005 +0000 - - Add support for page layout to the Qt4 bindings, plus - test cases. - - ChangeLog | 8 ++++++++ - qt4/src/poppler-document.cc | 22 ++++++++++++++++++++++ - qt4/src/poppler-qt4.h | 26 ++++++++++++++++++++++++-- - qt4/tests/Makefile.am | 10 +++++++++- - qt4/tests/check_pagelayout_none.cpp | 22 ++++++++++++++++++++++ - qt4/tests/check_pagelayout_single.cpp | 22 ++++++++++++++++++++++ - 6 files changed, 107 insertions(+), 3 deletions(-) - -commit 4e050aef7ba132900f84205be221fd48808848c3 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Thu Jul 7 17:19:36 2005 +0000 - - 2005-07-07 Kristian Høgsberg <krh@redhat.com> - - * glib/poppler-page.cc (poppler_page_prepare_output_dev): - Account - for page rotation when creating the cairo surface. - - ChangeLog | 5 +++++ - glib/poppler-page.cc | 17 +++++++++++++++-- - 2 files changed, 20 insertions(+), 2 deletions(-) - -commit 2eeab0b8afeb4897806df2de6e496889c25dda5e -Author: Kristian Høgsberg <krh@redhat.com> -Date: Thu Jul 7 15:58:43 2005 +0000 - - 2005-07-06 Kristian Høgsberg <krh@redhat.com> - - * glib/poppler-page.cc (poppler_page_copy_to_pixbuf): Add - out of - bounds checking (from Marco). - - ChangeLog | 6 +++++- - glib/poppler-page.cc | 5 +++++ - 2 files changed, 10 insertions(+), 1 deletion(-) - -commit b1015f6bdbd93b2a2574a9f0e0e1cd7dbae9af78 -Author: Brad Hards <bradh@frogmouth.net> -Date: Thu Jul 7 11:13:24 2005 +0000 - - At least try to fix glib issues. If you care about glib, - then you should review this. - - ChangeLog | 4 ++++ - glib/poppler-document.cc | 2 ++ - 2 files changed, 6 insertions(+) - -commit 8bf787031e7a2e93b4e1202918bd1aee86675082 -Author: Brad Hards <bradh@frogmouth.net> -Date: Thu Jul 7 11:04:08 2005 +0000 - - Update for page mode - new mode from PDF-1.6, API docs fixes - and some tests. - - ChangeLog | 15 +++++++++++++++ - poppler/Catalog.cc | 2 ++ - poppler/Catalog.h | 3 ++- - qt4/src/poppler-document.cc | 2 ++ - qt4/src/poppler-qt4.h | 14 +++++++++----- - qt4/tests/Makefile.am | 22 +++++++++++++++++++++- - qt4/tests/check_pagemode_attach.cpp | 22 ++++++++++++++++++++++ - qt4/tests/check_pagemode_fullscreen.cpp | 22 ++++++++++++++++++++++ - qt4/tests/check_pagemode_none.cpp | 22 ++++++++++++++++++++++ - qt4/tests/check_pagemode_oc.cpp | 22 ++++++++++++++++++++++ - qt4/tests/check_pagemode_thumbs.cpp | 22 ++++++++++++++++++++++ - 11 files changed, 161 insertions(+), 7 deletions(-) - -commit 695e27fb4d6fcc3466e2c9c95b4f02821b07e823 -Author: Brad Hards <bradh@frogmouth.net> -Date: Thu Jul 7 11:01:27 2005 +0000 - - Suppress noise from new test files. - - qt4/tests/.cvsignore | 6 ++++++ - 1 file changed, 6 insertions(+) - -commit 8a8d57bdcf11ed2903913d938b9711053b9bb9f1 -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Jul 6 17:12:36 2005 +0000 - - Extract family, stretch and weight from the font descriptor - - ChangeLog | 2 ++ - poppler/GfxFont.cc | 41 +++++++++++++++++++++++++++++++++++++++++ - poppler/GfxFont.h | 36 ++++++++++++++++++++++++++++++++++++ - 3 files changed, 79 insertions(+) - -commit 3a1646c2f776f5a07b0e830fcb8e1b0a80efb41c -Author: Albert Astals Cid <aacid@kde.org> -Date: Wed Jul 6 13:29:00 2005 +0000 - - Add checkFooter to check the document ends with %%EOF - - ChangeLog | 5 +++++ - poppler/PDFDoc.cc | 28 ++++++++++++++++++++++++++++ - poppler/PDFDoc.h | 1 + - 3 files changed, 34 insertions(+) - -commit 377c023d31cf74d8240aa5be9dba8e3838459a8c -Author: Brad Hards <bradh@frogmouth.net> -Date: Wed Jul 6 11:15:16 2005 +0000 - - Add unit tests for the isLinearized() property. - - ChangeLog | 4 ++++ - qt4/tests/Makefile.am | 6 +++++- - qt4/tests/check_linearised.cpp | 23 +++++++++++++++++++++++ - 3 files changed, 32 insertions(+), 1 deletion(-) - -commit 5fa869887a840a585340993718df0841010666cf -Author: Brad Hards <bradh@frogmouth.net> -Date: Wed Jul 6 09:52:30 2005 +0000 - - Remove boolean for unicode table lookup from Font - - ChangeLog | 14 ++++++++++++++ - qt4/src/poppler-document.cc | 2 -- - qt4/src/poppler-qt4.h | 14 +------------- - qt4/tests/poppler-fonts.cpp | 16 +++++++--------- - 4 files changed, 22 insertions(+), 24 deletions(-) - -commit 40469c5883e17e734f3d54872c59e76b95bc0f95 -Author: Brad Hards <bradh@frogmouth.net> -Date: Wed Jul 6 09:00:39 2005 +0000 - - Update to reflect recent changes. - - qt4/tests/.cvsignore | 2 ++ - 1 file changed, 2 insertions(+) - -commit 6cea437208f913085a6a8c7183b0826a107cefb5 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Jul 5 21:15:48 2005 +0000 - - Don't crash with files that have fonts with no name - - ChangeLog | 7 +++++++ - qt4/src/poppler-document.cc | 13 ++++++++++--- - qt4/src/poppler-qt4.h | 2 +- - 3 files changed, 18 insertions(+), 4 deletions(-) - -commit 1323c74479848f5b87a3a13fa26e8b9e096e9f6a -Author: Brad Hards <bradh@frogmouth.net> -Date: Tue Jul 5 12:31:59 2005 +0000 - - Check in a couple more test apps - - qt4/tests/Makefile.am | 10 ++++++- - qt4/tests/check_author.cpp | 25 +++++++++++++++++ - qt4/tests/check_permissions.cpp | 59 - +++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 93 insertions(+), 1 deletion(-) - -commit 839a798ec3725427185de5a48c58ac448596b25d -Author: Brad Hards <bradh@frogmouth.net> -Date: Tue Jul 5 12:25:00 2005 +0000 - - Add Qt4 bindings for new user permission properties. - - ChangeLog | 4 ++++ - qt4/src/poppler-document.cc | 25 ++++++++++++++++++++++ - qt4/src/poppler-qt4.h | 51 - ++++++++++++++++++++++++++++++++++++++++----- - 3 files changed, 75 insertions(+), 5 deletions(-) - -commit e10f6990d3339e3a7adeaa50b1754cf7ecf82f87 -Author: Brad Hards <bradh@frogmouth.net> -Date: Tue Jul 5 12:15:04 2005 +0000 - - Add some more user permissions properties - high resolution - printing, document assembly, extraction for accessibility - and form completion. - - ChangeLog | 8 ++++++++ - poppler/PDFDoc.h | 9 +++++++++ - poppler/XRef.cc | 55 - +++++++++++++++++++++++++++++++++++++++++++++++++++---- - poppler/XRef.h | 4 ++++ - 4 files changed, 72 insertions(+), 4 deletions(-) - -commit 3a8e1ba03cdec6412dd0b79f0cc59a4cd97dd4e7 -Author: Brad Hards <bradh@frogmouth.net> -Date: Mon Jul 4 11:38:22 2005 +0000 - - A couple more little changes. - - ChangeLog | 6 ++++++ - 1 file changed, 6 insertions(+) - -commit a44bd0b45bb89f29ddca5d0e8986a8de50f9db39 -Author: Brad Hards <bradh@frogmouth.net> -Date: Mon Jul 4 11:37:21 2005 +0000 - - Change path to sample file to point to test module - - qt4/tests/check_orientation.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 2a7079087c35651c242d3843c94703a3199e61ca -Author: Brad Hards <bradh@frogmouth.net> -Date: Mon Jul 4 11:36:13 2005 +0000 - - Fix typo causing failure to pick up upside down pages. - - qt4/src/poppler-page.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 529a548044ae721a414c5b8e768c0498b1e6830b -Author: Brad Hards <bradh@frogmouth.net> -Date: Mon Jul 4 08:30:29 2005 +0000 - - Update to reflect recent changes - - ChangeLog | 30 +++++++++++++++++++++++++++++- - qt4/tests/.cvsignore | 2 ++ - 2 files changed, 31 insertions(+), 1 deletion(-) - -commit 08cca4670f8ae65333beacda85834112e76489d1 -Author: Brad Hards <bradh@frogmouth.net> -Date: Mon Jul 4 08:21:27 2005 +0000 - - Add in a simple demo/test application, similar to the pdffonts - application in xpdf. - - qt4/tests/Makefile.am | 9 +++++- - qt4/tests/poppler-fonts.cpp | 76 - +++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 84 insertions(+), 1 deletion(-) - -commit 52af89d8303b50c45d5e4584d19ec8b7d7ebcf9b -Author: Brad Hards <bradh@frogmouth.net> -Date: Mon Jul 4 08:18:52 2005 +0000 - - Update to reflect changes to rendering API. - - qt4/tests/stress-poppler-qt4.cpp | 4 ++-- - qt4/tests/test-poppler-qt4.cpp | 3 ++- - 2 files changed, 4 insertions(+), 3 deletions(-) - -commit d42998d0fc32b1e21a2aeef1311e0baf508ade3f -Author: Brad Hards <bradh@frogmouth.net> -Date: Mon Jul 4 08:16:17 2005 +0000 - - Qt4 update. - * qt4/src/poppler-qt4.h: - * qt4/src/poppler-document.cc complete Qt4 font metadata - handling - - * qt4/src/poppler-qt4.h: - * qt4/src/poppler-page.cc: change the render API to make - it more - Qt-like. - - qt4/src/poppler-document.cc | 7 ++++- - qt4/src/poppler-page.cc | 5 ++-- - qt4/src/poppler-qt4.h | 73 - ++++++++++++++++++++++++++++++++++++++++++--- - 3 files changed, 77 insertions(+), 8 deletions(-) - -commit 5d194b926d1ed642ed4bbd3304befa073d389cd4 -Author: Brad Hards <bradh@frogmouth.net> -Date: Mon Jul 4 08:10:16 2005 +0000 - - Change FontInfo::type() to return an enumerated value, - rather than a GooString. - - poppler/FontInfo.cc | 16 ++-------------- - poppler/FontInfo.h | 16 +++++++++++++--- - 2 files changed, 15 insertions(+), 17 deletions(-) - -commit 1303020b2e97bc110ccf045cd2811daf59ec72ce -Author: Brad Hards <bradh@frogmouth.net> -Date: Mon Jul 4 07:42:32 2005 +0000 - - Fix up the unit test, now that I have a real sample - file. - - qt4/tests/check_orientation.cpp | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -commit 96fc0ea3fc6c9c7d933e9e0c02a622b2aeef7617 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Fri Jul 1 04:57:49 2005 +0000 - - 2005-07-01 Kristian Høgsberg <krh@redhat.com> - - * poppler/TextOutputDev.cc: Make selection also work when - dragging - backwards in the text flow. Currently this is a big pile of - if-statements, and there is certainly room for improvement. - - ChangeLog | 6 +++ - poppler/TextOutputDev.cc | 129 - ++++++++++++++++++++++++++++++++++++++--------- - 2 files changed, 111 insertions(+), 24 deletions(-) - -commit 06c49c496f28aba608101adcecd8cec34937ac78 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Thu Jun 30 19:44:33 2005 +0000 - - 2005-06-30 Kristian Høgsberg <krh@redhat.com> - - * glib/poppler-page.h: * glib/poppler-page.cc - (poppler_page_copy_to_pixbuf): Fix splash compilation - (patch from - Marco). - (poppler_page_render_to_pixbuf): Drop dest_x and dest_y - coordinates from this function. This functionality can be - achieved using a sub-GdkPixbuf. - - * glib/test-poppler-glib.c (main): Update test case. - - ChangeLog | 11 +++++++++++ - NEWS | 6 ++++++ - glib/poppler-page.cc | 27 ++++++++++----------------- - glib/poppler-page.h | 4 +--- - glib/test-poppler-glib.c | 2 +- - 5 files changed, 29 insertions(+), 21 deletions(-) - -commit b126785aeda6b5576a13fc3f3853b027bd7dd306 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Thu Jun 30 00:36:01 2005 +0000 - - 2005-06-29 Kristian Høgsberg <krh@redhat.com> - - * glib/poppler-private.h: Move TextOutputDev.h include - here from - poppler-page.cc - - ChangeLog | 5 +++++ - glib/poppler-page.cc | 1 - - glib/poppler-private.h | 1 + - 3 files changed, 6 insertions(+), 1 deletion(-) - -commit b15a8caf003d7d0631d4f78db5ab54e55a5a000a -Author: Kristian Høgsberg <krh@redhat.com> -Date: Wed Jun 29 21:24:48 2005 +0000 - - 2005-06-29 Kristian Høgsberg <krh@redhat.com> - - * configure.ac: - * glib/poppler-page.cc: - * glib/poppler-page.h: - * glib/poppler-private.h: - * poppler/CairoOutputDev.cc: - * poppler/CairoOutputDev.h: - * poppler/Page.cc: - * poppler/Page.h: - * poppler/TextOutputDev.cc: - * poppler/TextOutputDev.h: Add support for rendering real - selection (based on text flow). - - ChangeLog | 20 ++- - configure.ac | 4 +- - glib/poppler-page.cc | 224 +++++++++++++++++++------ - glib/poppler-page.h | 65 ++++---- - glib/poppler-private.h | 3 + - poppler/CairoOutputDev.cc | 13 +- - poppler/CairoOutputDev.h | 2 +- - poppler/Page.cc | 59 +++++-- - poppler/Page.h | 12 ++ - poppler/TextOutputDev.cc | 414 - +++++++++++++++++++++++++++++++++++++++++++++- - poppler/TextOutputDev.h | 38 ++++- - 11 files changed, 743 insertions(+), 111 deletions(-) - -commit 3b5e20465e482eb0e75a106697ee94d60aea2fdc -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Jun 28 22:51:29 2005 +0000 - - Forgot assigning type on copy constructor - - poppler/FontInfo.cc | 1 + - 1 file changed, 1 insertion(+) - -commit e512cd1832a0e6d15149e12e8e67a39d335efc86 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Jun 28 22:49:14 2005 +0000 - - Add FontInfo::getType() - - ChangeLog | 3 +++ - poppler/FontInfo.cc | 4 ++++ - poppler/FontInfo.h | 2 ++ - 3 files changed, 9 insertions(+) - -commit 8aeb5205f2876a9dc36eb1dc1e361bb87adf4e31 -Author: Albert Astals Cid <aacid@kde.org> -Date: Tue Jun 28 22:00:05 2005 +0000 - - use transformation matrix for image rendering in Arthur backend - - ChangeLog | 4 ++++ - poppler/ArthurOutputDev.cc | 12 +++++++----- - 2 files changed, 11 insertions(+), 5 deletions(-) - -commit a221d06fdc7b0688ca0744a1d6ad49d472c7f12c -Author: Brad Hards <bradh@frogmouth.net> -Date: Tue Jun 28 10:59:14 2005 +0000 - - Reduce cvs up noise - - .cvsignore | 1 + - ChangeLog | 7 +++++++ - qt4/.cvsignore | 3 +++ - qt4/src/.cvsignore | 7 +++++++ - qt4/tests/.cvsignore | 8 ++++++++ - 5 files changed, 26 insertions(+) - -commit ea58a20bbcf450a1ecb8fe00e8162cfdf76105f1 -Author: Brad Hards <bradh@frogmouth.net> -Date: Tue Jun 28 10:00:09 2005 +0000 - - Initial import of Qt4 bindings, and for a Qt4 "Arthur" (QPainter) - backend renderer. - - The bindings are currently unstable - you can expect substantial - change - in both source and binary interfaces. - - The Arthur renderer currently does a reasonable job of rendering path - and fill, but the image rendering doesn't work (for reasons that - aren't - clear to me) and text rendering doesn't use the right glyphs - it just - draws with the current font. There is a lot of work to do on this - too. Help is, of coure, welcome. - - ChangeLog | 12 + - Makefile.am | 10 +- - configure.ac | 94 ++- - poppler-qt4.pc.in | 12 + - poppler/ArthurOutputDev.cc | 604 +++++++++++++++++++ - poppler/ArthurOutputDev.h | 133 +++++ - poppler/Makefile.am | 20 + - qt4/Makefile.am | 1 + - qt4/src/Doxyfile | 1212 - ++++++++++++++++++++++++++++++++++++++ - qt4/src/Makefile.am | 22 + - qt4/src/poppler-document.cc | 309 ++++++++++ - qt4/src/poppler-page.cc | 170 ++++++ - qt4/src/poppler-private.h | 36 ++ - qt4/src/poppler-qt4.h | 286 +++++++++ - qt4/tests/Makefile.am | 34 ++ - qt4/tests/check_orientation.cpp | 40 ++ - qt4/tests/stress-poppler-qt4.cpp | 70 +++ - qt4/tests/test-poppler-qt4.cpp | 121 ++++ - 18 files changed, 3183 insertions(+), 3 deletions(-) - -commit 61e9bc76eb2fcb0b4b899ebfad1cc71c59fc8274 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Tue Jun 28 03:44:12 2005 +0000 - - 2005-06-27 Kristian Høgsberg <krh@redhat.com> - - * poppler/CairoOutputDev.cc: - * poppler/CairoOutputDev.h: Change CairoOutputDev to render - to a - given surface and let the user create that surface. - - * glib/poppler-document.cc: - * glib/poppler-page.cc: - * glib/poppler-private.h: Create the cairo image surface here - instead and pass it to the CairoOutputDev for rendering. - - * poppler/CairoOutputDevImage.cc: - * poppler/CairoOutputDevImage.h: - * poppler/CairoOutputDevX.cc: - * poppler/CairoOutputDevX.h: - * poppler/Makefile.am: Remove specialized cairo output - devices. - - ChangeLog | 17 ++++ - glib/poppler-document.cc | 2 +- - glib/poppler-page.cc | 21 +++- - glib/poppler-private.h | 4 +- - poppler/CairoOutputDev.cc | 24 +++-- - poppler/CairoOutputDev.h | 8 +- - poppler/CairoOutputDevImage.cc | 80 --------------- - poppler/CairoOutputDevImage.h | 44 --------- - poppler/CairoOutputDevX.cc | 216 - ----------------------------------------- - poppler/CairoOutputDevX.h | 117 ---------------------- - poppler/Makefile.am | 8 +- - 11 files changed, 54 insertions(+), 487 deletions(-) - -commit 8079dce3f0ed91dd531465f45c6d3c568ab4ecd1 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Mon Jun 27 01:04:32 2005 +0000 - - 2005-06-26 Kristian Høgsberg <krh@redhat.com> - - * poppler/CairoOutputDev.cc: - * poppler/CairoOutputDev.h: Switch back to using drawChar() - for - text, but utilize the beginString() and endString() hooks - so we - can use cairo_show_glyphs() efficiently. - - ChangeLog | 7 +++ - poppler/CairoOutputDev.cc | 107 - ++++++++++++++-------------------------------- - poppler/CairoOutputDev.h | 12 +++++- - 3 files changed, 48 insertions(+), 78 deletions(-) - -commit 1aa48d6b7907a1d53830f0cf28085041f685368d -Author: Albert Astals Cid <aacid@kde.org> -Date: Sun Jun 26 23:35:26 2005 +0000 - - Add PageTransition class and PageTransition* Page::getTransition() - const; to the qt frontend. Code almost 100% copied from xpdf code - inside kpdf - - ChangeLog | 5 +++ - qt/poppler-page.cc | 121 - +++++++++++++++++++++++++++++++++++++++++++++++++++++ - qt/poppler-qt.h | 78 ++++++++++++++++++++++++++++++++++ - 3 files changed, 204 insertions(+) - -commit 9d4327eecd94299a3629b0814e84f981a4be1dfb -Author: Martin Kretzschmar <martink@gnome.org> -Date: Sun Jun 26 15:54:16 2005 +0000 - - add poppler-enums.[ch]. - - ChangeLog | 2 ++ - glib/.cvsignore | 8 +++++--- - 2 files changed, 7 insertions(+), 3 deletions(-) - -commit 768186514b9fc175cf330344408bb89ab4c909f3 -Author: Martin Kretzschmar <martink@gnome.org> -Date: Sun Jun 26 11:40:35 2005 +0000 - - require glib 2.4+ for g_value_take_string and G_DEFINE_TYPE. - - ChangeLog | 5 +++++ - configure.ac | 4 ++-- - 2 files changed, 7 insertions(+), 2 deletions(-) - -commit 5d40e34a367212c39af06332879f26824d6d62d2 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Sun Jun 26 00:01:39 2005 +0000 - - 2005-06-25 Jeff Muizelaar <jeff@infidigm.net> - - * poppler/Error.h: Maybe fix build on Solaris. - - ChangeLog | 4 ++++ - poppler/Error.h | 2 +- - 2 files changed, 5 insertions(+), 1 deletion(-) - -commit c2780a3b3f4615bb28bfe394d649b388db4ccf4d -Author: Kristian Høgsberg <krh@redhat.com> -Date: Mon Jun 20 21:33:09 2005 +0000 - - 2005-06-20 Kristian Høgsberg <krh@redhat.com> - - * NEWS: - * configure.ac: Bump version to 0.3.3 and sum up changes since - last release. - - * glib/poppler-page.cc (poppler_page_find_text): Initialize - xMin - and yMin to avoid referencing unintialized memory (#3582). - - ChangeLog | 9 +++++++++ - NEWS | 10 ++++++++++ - configure.ac | 2 +- - glib/poppler-page.cc | 2 ++ - 4 files changed, 22 insertions(+), 1 deletion(-) - -commit 9023891f314ac37811b5c973be2e36b6de353cf2 -Author: Martin Kretzschmar <martink@gnome.org> -Date: Mon Jun 20 18:45:41 2005 +0000 - - (info_dict_get_string): convert from PDFDocEncoding to UTF-8. - - ChangeLog | 5 +++++ - glib/poppler-document.cc | 16 +++++++++++++++- - 2 files changed, 20 insertions(+), 1 deletion(-) - -commit bbf2fe757f0fd08d0e90e3810709ab7152c779c0 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Mon Jun 20 17:58:38 2005 +0000 - - 2005-06-20 Kristian Høgsberg <krh@redhat.com> - - * glib/poppler-page.cc: - * glib/poppler-page.h: - * glib/poppler.h: Clean up glib rotation implementation and - add a - getter for rotation. Patch from Marco. - - ChangeLog | 7 ++++++ - glib/poppler-page.cc | 69 - +++++++++++++++++++++++++++++----------------------- - glib/poppler-page.h | 57 ++++++++++++++++++++++--------------------- - glib/poppler.h | 1 - - 4 files changed, 75 insertions(+), 59 deletions(-) - -commit c264d8a9f84587cd0f2ef67683a01fc8dd9395af -Author: Kristian Høgsberg <krh@redhat.com> -Date: Mon Jun 20 17:38:27 2005 +0000 - - 2005-06-20 Kristian Høgsberg <krh@redhat.com> - - * glib/poppler-document.cc: - * poppler/FontInfo.cc: Fixes from Marco to handle fonts - without - name (typically type 3 fonts) and fix an iterator bug. - - ChangeLog | 6 ++++++ - glib/poppler-document.cc | 8 +++++++- - poppler/FontInfo.cc | 13 ++++++++++--- - 3 files changed, 23 insertions(+), 4 deletions(-) - -commit 4746e63a793a2881e904ac54d58b7d3e48b07dcf -Author: Kristian Høgsberg <krh@redhat.com> -Date: Mon Jun 20 17:22:35 2005 +0000 - - 2005-06-20 Kristian Høgsberg <krh@redhat.com> - - * glib/poppler-page.cc (poppler_page_get_link_mapping): Adjust - link coordinates so they're relative to bounding box - lower left - corner (#3396). - - ChangeLog | 6 ++++++ - glib/poppler-page.cc | 6 ++++++ - 2 files changed, 12 insertions(+) - -commit bada3d03583ef6ed34d2aa743de8fd9ca4a5c748 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Fri Jun 17 05:30:56 2005 +0000 - - 2005-06-17 Kristian Høgsberg <krh@redhat.com> - - * autogen.sh: Patch from Emil Soleyman-Zomalan to enable - checks - for automake >= 1.7 (#3554). - - ChangeLog | 5 +++ - autogen.sh | 104 - +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 109 insertions(+) - -commit 25db42831ddde500697126352458e092a9b0ab9b -Author: Kristian Høgsberg <krh@redhat.com> -Date: Wed Jun 15 15:02:46 2005 +0000 - - 2005-06-15 Kristian Høgsberg <krh@redhat.com> - - * glib/poppler-document.cc: - * glib/poppler-document.h: Patch from Marco to get initial - status - (open or closed) for bookmark subtrees. - ----------------------------------------------------------- - - ChangeLog | 6 ++++++ - glib/poppler-document.cc | 9 +++++++++ - glib/poppler-document.h | 1 + - 3 files changed, 16 insertions(+) - -commit e54e306ac5d603001fefda3b9ecd81821e4bd09e -Author: Kristian Høgsberg <krh@redhat.com> -Date: Mon Jun 13 17:18:32 2005 +0000 - - Forgot to add new files. - - poppler/FontInfo.cc | 197 - ++++++++++++++++++++++++++++++++++++++++++++++++++++ - poppler/FontInfo.h | 51 ++++++++++++++ - 2 files changed, 248 insertions(+) - -commit 23e8ed5cbf4d7d999a8a1dcf714aaddaf339ceff -Author: Kristian Høgsberg <krh@redhat.com> -Date: Mon Jun 13 16:09:33 2005 +0000 - - 2005-06-13 Kristian Høgsberg <krh@redhat.com> - - * glib/poppler-document.cc: - * glib/poppler-document.h: - * glib/poppler-private.h: - * glib/poppler.h: - * glib/test-poppler-glib.c: - * poppler/Makefile.am: Patch from Marco to extract font - info from - document. - - ChangeLog | 10 ++++ - glib/poppler-document.cc | 131 - +++++++++++++++++++++++++++++++++++++++++++++++ - glib/poppler-document.h | 13 +++++ - glib/poppler-private.h | 7 +++ - glib/poppler.h | 2 + - glib/test-poppler-glib.c | 14 +++++ - poppler/Makefile.am | 2 + - 7 files changed, 179 insertions(+) - -commit fbb86d2983a28ad2c46b8c5d475a2df1f0f0e4b9 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Wed Jun 8 14:35:46 2005 +0000 - - 2005-06-08 Kristian Høgsberg <krh@redhat.com> - - * poppler/CairoFontEngine.cc: Remember to delete tmpFileName. - Patch from Nikolai Weibull (#3491). - - ChangeLog | 5 +++++ - poppler/CairoFontEngine.cc | 37 +++++++++++++++++++------------------ - 2 files changed, 24 insertions(+), 18 deletions(-) - -commit 699b03025c1d38a42a49e39017097c5d0315fd6f -Author: Kristian Høgsberg <krh@redhat.com> -Date: Tue Jun 7 20:25:48 2005 +0000 - - 2005-06-07 Kristian Høgsberg <krh@redhat.com> - - * qt/test-poppler-qt.cpp: Add stdlib.h include for exit(). - - ChangeLog | 4 ++++ - qt/test-poppler-qt.cpp | 1 + - 2 files changed, 5 insertions(+) - -commit 0017b1a72c58e2d016d22451079c466abdfff15c -Author: Kristian Høgsberg <krh@redhat.com> -Date: Thu Jun 2 19:14:45 2005 +0000 - - 2005-06-02 Kristian Høgsberg <krh@redhat.com> - - * poppler/TextOutputDev.h: - * qt/poppler-qt.h: Patch from Stanislav Brabec - <sbrabec@suse.cz> - to fix gcc 4.0.1 warnings on undeclared friend classes. - - * test/gtk-splash-test.cc: Fix from Martin Kretzschmar - <martink@gnome.org> to compile with OPI enabled (#2911). - - ChangeLog | 9 +++++++++ - poppler/TextOutputDev.h | 3 +++ - qt/poppler-qt.h | 2 ++ - test/gtk-splash-test.cc | 2 +- - 4 files changed, 15 insertions(+), 1 deletion(-) - -commit 47c3b4ec2c7691e44f5100b1f5956df0005467c8 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Thu Jun 2 18:49:55 2005 +0000 - - 2005-06-02 Kristian Høgsberg <krh@redhat.com> - - Patch from Stanislav Brabec <sbrabec@suse.cz>: - - * configure.ac: - * poppler-cairo.pc.in: - * poppler-glib.pc.in: - * poppler-qt.pc.in: - * poppler-splash.pc.in: Misc fixes to pkg-config files. - - ChangeLog | 10 ++++++++++ - configure.ac | 6 ++++-- - poppler-cairo.pc.in | 3 +-- - poppler-glib.pc.in | 4 ++-- - poppler-qt.pc.in | 1 + - poppler-splash.pc.in | 3 +-- - 6 files changed, 19 insertions(+), 8 deletions(-) - -commit 9f0da96dd005defd5d82dd05b627ff1925430215 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Thu Jun 2 00:35:44 2005 +0000 - - 2005-06-01 Jeff Muizelaar <jeff@infidigm.net> - - * poppler/Error.cc: - * poppler/Error.h: Make error handling function setable - through - setErrorFunction. - - Based on a patch by Albert Astals Cid. - - ChangeLog | 8 ++++++++ - poppler/Error.cc | 29 ++++++++++++++++++++--------- - poppler/Error.h | 2 ++ - 3 files changed, 30 insertions(+), 9 deletions(-) - -commit f688aa11d066f1c6f4115cbdb604ac61fb8b5146 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Sun May 29 14:59:34 2005 +0000 - - 2005-05-29 Kristian Høgsberg <krh@redhat.com> - - * glib/*: Add more meta data properties to poppler document. - Patch by Emil Soleyman-Zomalan (#3359). - - ChangeLog | 5 ++ - glib/poppler-document.cc | 155 - ++++++++++++++++++++++++++++++++++++++++++++++- - glib/poppler.gidl | 5 ++ - glib/test-poppler-glib.c | 46 +++++++++----- - 4 files changed, 194 insertions(+), 17 deletions(-) - -commit 9e6eeec574d48d2341ee620e16360d3b21c40103 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Thu May 26 13:03:35 2005 +0000 - - 2005-05-26 Kristian Høgsberg <krh@redhat.com> - - * poppler/CairoOutputDev.cc (clip): Remove snapToGrid - so clip() - prototype matches what Gfx actually calls (fixes clipping). - - * poppler/CairoOutputDev.cc: Update fill color, stroke - color, fill - opacity and stroke opacity from GfxState on restore, - since they - aren't handled by cairo_restore() (#3362). - - * poppler/CairoOutputDev.cc: Comment out tolerance setting - until - we figure out how cairo settings relate to pdf settings. - - * poppler/CairoOutputDev.cc: Support fill and stroke opacity. - - ChangeLog | 12 ++++++++++++ - poppler/CairoOutputDev.cc | 41 ++++++++++++++++++++++++++++++----------- - poppler/CairoOutputDev.h | 6 +++++- - 3 files changed, 47 insertions(+), 12 deletions(-) - -commit 89a633edd860e3c6ded1e468edf6f28cfcb43d0e -Author: Kristian Høgsberg <krh@redhat.com> -Date: Thu May 26 12:52:38 2005 +0000 - - 2005-05-26 Kristian Høgsberg <krh@redhat.com> - - * poppler/GfxState.cc: - * poppler/GfxState.h: Add GfxColorSpace::getRGBLine here and - implement in subclasses. - - * poppler/CairoOutputDev.cc (drawImage): Use getRGBLine here. - - ChangeLog | 8 +++ - poppler/CairoOutputDev.cc | 66 +++++++++---------- - poppler/GfxState.cc | 160 - +++++++++++++++++++++++++++++++++++++++++++++- - poppler/GfxState.h | 14 ++++ - 4 files changed, 212 insertions(+), 36 deletions(-) - -commit 4d8224819da7a85e4d99f96c9bbb047ece58130a -Author: Jonathan Blandford <jrb@redhat.com> -Date: Mon May 23 04:23:53 2005 +0000 - - Mon May 23 00:22:41 2005 Jonathan Blandford <jrb@redhat.com> - - * glib/poppler-document.h: Add a permissions flag to the glib - bindings. - - ChangeLog | 5 +++++ - glib/poppler-document.cc | 24 ++++++++++++++++++++++++ - glib/poppler-document.h | 16 +++++++++------- - 3 files changed, 38 insertions(+), 7 deletions(-) - -commit 1f677e2f60634a7d0c5e0e0d2125ab15c2722979 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Sat May 21 21:33:06 2005 +0000 - - 2005-05-21 Kristian Høgsberg <krh@redhat.com> - - * glib/poppler-document.cc (poppler_ps_file_new): Fix - off-by-one - error spotted by Jürg Billeter. - ----------------------------------------------------- - - ChangeLog | 5 +++++ - glib/poppler-document.cc | 2 +- - 2 files changed, 6 insertions(+), 1 deletion(-) - -commit 0bbf2f08173866cde9b097eeeb1f4218a396588d -Author: Kristian Høgsberg <krh@redhat.com> -Date: Fri May 20 20:48:52 2005 +0000 - - 2005-05-20 Kristian Høgsberg <krh@redhat.com> - - * poppler/CairoOutputDev.cc: Account for different row - vs. column - vector conventions between cairo and poppler. - - ChangeLog | 3 +++ - poppler/CairoOutputDev.cc | 18 +++++++++--------- - 2 files changed, 12 insertions(+), 9 deletions(-) - -commit da44ec7e8de58e55e55b1f780bc3f4bc8307874f -Author: Kristian Høgsberg <krh@redhat.com> -Date: Fri May 20 18:38:10 2005 +0000 - - 2005-05-20 Kristian Høgsberg <krh@redhat.com> - - * poppler/CairoFontEngine.cc: Only get the code to gid map if - we're using freetype 2.1.7 or older (#3340). - - ChangeLog | 5 +++++ - poppler/CairoFontEngine.cc | 13 ++++++++----- - 2 files changed, 13 insertions(+), 5 deletions(-) - -commit 6fe29cf0a7e54b8d294471a0f94eb9e989ad1d7f -Author: Kristian Høgsberg <krh@redhat.com> -Date: Thu May 19 05:18:04 2005 +0000 - - Add bugzilla number. - - ChangeLog | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -commit 42de1348622cf86a87bc22941bd48bffa943dac9 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Thu May 19 05:16:22 2005 +0000 - - 2005-05-19 Kristian Høgsberg <krh@redhat.com> - - * poppler/CairoFontEngine.cc: Only cast to Gfx8BitFont when we - know for sure we have a truetype font. - GfxCIDFont::getCIDToGIDLen() can return 0 in which case - codeToGID - will be NULL, and we end up casting it to a Gfx8BitFont. - - ChangeLog | 7 +++++++ - poppler/CairoFontEngine.cc | 2 +- - 2 files changed, 8 insertions(+), 1 deletion(-) - -commit afc05387c94a76ff0ed69b3f5d9a69ddd1448e83 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Wed May 18 17:39:59 2005 +0000 - - 2005-05-18 Kristian Høgsberg <krh@redhat.com> - - * configure.ac: Require cairo 0.5.0, bump release to 0.3.2. - - * NEWS: Sum up latest changes. - - * glib/poppler-document.cc (poppler_ps_file_new): Take a page - range here instead of just number of pages. - - ChangeLog | 9 +++++++++ - NEWS | 7 +++++++ - configure.ac | 6 +++--- - glib/poppler-document.cc | 15 ++++++++++----- - glib/poppler-document.h | 1 + - 5 files changed, 30 insertions(+), 8 deletions(-) - -commit 420134a194af9161282ccfe329d17adef8d325f2 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Tue May 17 23:38:27 2005 +0000 - - 2005-05-17 Kristian Høgsberg <krh@redhat.com> - - * poppler/CairoOutputDevX.cc: - * test/gtk-cairo-test.cc: Chase the cairo xlib constructor - again. - - ChangeLog | 5 +++++ - poppler/CairoOutputDevX.cc | 5 +++-- - test/gtk-cairo-test.cc | 5 +++-- - 3 files changed, 11 insertions(+), 4 deletions(-) - -commit 6fd62953a910dcfb4abd9de5ea18285b8fa5d202 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Mon May 16 23:16:15 2005 +0000 - - Add bug number and attribution to ChangeLog entry. - - ChangeLog | 4 ++++ - 1 file changed, 4 insertions(+) - -commit 6d7f624c13e8a9a8251ac97388cd80e418c70250 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Mon May 16 21:56:31 2005 +0000 - - 2005-05-16 Kristian Høgsberg <krh@redhat.com> - - * configure.ac: Check for glib-mkenums. - - * glib/Makefile.am (poppler-enums.h): Generate glib enums at - compile time. - - * glib/poppler-enums.c: - * glib/poppler-enums.h: Removed. - - ChangeLog | 8 +++ - configure.ac | 3 + - glib/.cvsignore | 1 + - glib/Makefile.am | 67 ++++++++++++------ - glib/poppler-enums.c | 189 - --------------------------------------------------- - glib/poppler-enums.h | 49 ------------- - 6 files changed, 57 insertions(+), 260 deletions(-) - -commit 2801b54a944fc9e1072c5dcb9f1153a0c9f42de5 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Mon May 16 20:27:51 2005 +0000 - - 2005-05-16 Kristian Høgsberg <krh@redhat.com> - - * test/gtk-cairo-test.cc: Update this test case also. - - ChangeLog | 2 ++ - test/gtk-cairo-test.cc | 5 +++-- - 2 files changed, 5 insertions(+), 2 deletions(-) - -commit 8753ae8ba20fcceaef3ef1dda89129f0456fccf6 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Mon May 16 19:06:00 2005 +0000 - - 2005-05-16 Kristian Høgsberg <krh@redhat.com> - - * poppler/CairoOutputDevX.cc: Track changes to cairo Xlib - surface - constructors. - - * poppler/CairoFontEngine.cc (cairo_font_face_destroy): - Make this - static. - - ChangeLog | 8 ++++++++ - poppler/CairoFontEngine.cc | 2 +- - poppler/CairoOutputDevX.cc | 5 +++-- - 3 files changed, 12 insertions(+), 3 deletions(-) - -commit 2e17106ef4711097104a561d5be49980f8b2f5ab -Author: Jonathan Blandford <jrb@redhat.com> -Date: Fri May 13 03:47:36 2005 +0000 - - whoops! commit the right file. - - glib/poppler.gidl | 212 - ++++++++++++++++++++++++++++++++++++++++++++++++++++++ - glib/test.gidl | 23 ------ - 2 files changed, 212 insertions(+), 23 deletions(-) - -commit 19b62e1c8ea8ce042ac089defe94f756dcaf194e -Author: Jonathan Blandford <jrb@redhat.com> -Date: Fri May 13 03:25:32 2005 +0000 - - Thu May 12 23:10:45 2005 Jonathan Blandford <jrb@redhat.com> - - * glib/poppler.gidl: add metadata file. - - ChangeLog | 4 ++++ - glib/test.gidl | 23 +++++++++++++++++++++++ - 2 files changed, 27 insertions(+) - -commit bef5a548f3b21e7220079155e9b5054fb0c6c3c7 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Thu May 12 21:26:25 2005 +0000 - - 2005-05-12 Kristian Høgsberg <krh@redhat.com> - - * poppler/CairoOutputDev.cc: - * poppler/CairoOutputDevX.cc: - * poppler/CairoOutputDevImage.cc: - * test/gtk-cairo-test.cc: Update to latest cairo changes, - patch - from Jens Taprogge (#3281) - - ChangeLog | 8 ++++++++ - poppler/CairoOutputDev.cc | 22 +++++++++++----------- - poppler/CairoOutputDevImage.cc | 11 ++++++----- - poppler/CairoOutputDevX.cc | 7 +++++-- - test/gtk-cairo-test.cc | 8 +++++--- - 5 files changed, 35 insertions(+), 21 deletions(-) - -commit c10ea2dd9bffaf9af023612ef196bab2b204d3e1 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Wed May 11 20:01:43 2005 +0000 - - 2005-05-11 Kristian Høgsberg <krh@redhat.com> - - * glib/poppler.cc (poppler_get_backend, poppler_get_version): - Add - these functions so it's easy to tell if poppler is using - cairo or - splash and what version. - - * glib/test-poppler-glib.c (main): Print out version and - backend. - - ChangeLog | 8 ++++++++ - glib/poppler-enums.c | 26 ++++++++++++++++++++++++++ - glib/poppler-enums.h | 15 +++++++++++++++ - glib/poppler.cc | 21 +++++++++++++++++++++ - glib/poppler.h | 11 +++++++++++ - glib/test-poppler-glib.c | 9 ++++++++- - 6 files changed, 89 insertions(+), 1 deletion(-) - -commit 7d189e33cfa68e722561e9398ad85a77b538ab14 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Fri May 6 16:38:57 2005 +0000 - - 2005-05-06 Kristian Høgsberg <krh@redhat.com> - - * glib/Makefile.am (libpoppler_glib_la_LIBADD): Link - poppler-glib - against poppler. - - * qt/Makefile.am (libpoppler_qt_la_LIBADD): Ditto for qt. - - * poppler-glib.pc (Libs): Drop -lpoppler from link. - - * poppler-qt.pc (Libs): Ditto for qt. - - * configure.ac: Test for both libqt-mt.la and libqt-mt.so - in that - order. - - ChangeLog | 14 ++++++++++++++ - configure.ac | 8 +++++++- - glib/Makefile.am | 1 + - poppler-glib.pc.in | 2 +- - poppler-qt.pc.in | 2 +- - qt/Makefile.am | 1 + - qt/test-poppler-qt.cpp | 1 + - 7 files changed, 26 insertions(+), 3 deletions(-) - -commit c937e63f17a096b94a554103476ecb9ab1b71b90 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Wed May 4 20:08:41 2005 +0000 - - 2005-05-04 Kristian Høgsberg <krh@redhat.com> - - * poppler/CairoOutputDev.cc (CairoOutputDev::drawImageMask, - CairoOutputDev::drawImage): Track cairo cvs API changes; use - cairo_mask() and cairo_paint() for drawing image masks - and images. - - ChangeLog | 6 +++ - poppler/CairoOutputDev.cc | 98 - ++++++++++++++++++++++++----------------------- - 2 files changed, 57 insertions(+), 47 deletions(-) - -commit c142773ad30b409d8169a53921e731305de46e50 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Wed May 4 19:28:07 2005 +0000 - - 2005-05-04 Kristian Høgsberg <krh@redhat.com> - - * poppler/CairoOutputDev.cc: Fix matrix convention confusion. - - ChangeLog | 4 ++++ - poppler/CairoOutputDev.cc | 4 ++-- - 2 files changed, 6 insertions(+), 2 deletions(-) - -commit 28760927d724231d0137ca7ecc66c6c2250dff0d -Author: Kristian Høgsberg <krh@redhat.com> -Date: Wed May 4 19:11:11 2005 +0000 - - 2005-05-04 Kristian Høgsberg <krh@redhat.com> - - Patches from Albert Astals Cid: - - * qt/poppler-page.cc (getText): Use QString::fromUtf8() - instead of - implicit latin1 cast constructor. - - * qt/test-poppler-qt.cpp (main): Use a QLabel for showing text - instead of qDebug. - - ChangeLog | 10 ++++++++++ - qt/poppler-page.cc | 5 ++--- - qt/test-poppler-qt.cpp | 6 +++++- - 3 files changed, 17 insertions(+), 4 deletions(-) - -commit fd36522375bcf436639b8731acb3ad22c03c03f4 -Author: Jonathan Blandford <jrb@redhat.com> -Date: Wed May 4 06:32:38 2005 +0000 - - Wed May 4 02:31:05 2005 Jonathan Blandford <jrb@redhat.com> - - * glib/poppler-document.cc: - * glib/poppler-document.h: - * glib/poppler-enums.c: (poppler_permissions_get_type): - * glib/poppler-enums.h: - * glib/poppler-page.cc: - * glib/poppler-page.h: - * glib/poppler.h: - - Register a bunch of boxed types to test introspection, and for - LBs. Also, remove unused 'popper_document_save()' (-: - - ChangeLog | 13 ++++++++ - glib/poppler-document.cc | 48 ++++++++++++++++------------ - glib/poppler-document.h | 18 +++++++++-- - glib/poppler-enums.c | 19 +++++++++++ - glib/poppler-enums.h | 2 ++ - glib/poppler-page.cc | 83 - ++++++++++++++++++++++++++++++++++++++++++++++++ - glib/poppler-page.h | 36 ++++++++++++++------- - glib/poppler.h | 12 ++++--- - 8 files changed, 193 insertions(+), 38 deletions(-) - -commit 132647f8311c07b1f95ee4fca185e9774aae4913 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Mon May 2 05:39:11 2005 +0000 - - 2005-05-01 Kristian Høgsberg <krh@redhat.com> - - * poppler/CairoFontEngine.cc: - * poppler/CairoFontEngine.h: - * poppler/CairoOutputDev.cc: Back out workaround for cairo - 0.4.0 - font API and port to new cairo head. - - ChangeLog | 7 +++++ - configure.ac | 4 +-- - poppler/CairoFontEngine.cc | 67 - +++++++++++++++++------------------------- - poppler/CairoFontEngine.h | 12 ++++---- - poppler/CairoOutputDev.cc | 39 ++++++++++++++---------- - poppler/CairoOutputDevImage.cc | 2 +- - 6 files changed, 66 insertions(+), 65 deletions(-) - -commit 595c18c038f8dcef73fe58612fc8b93f891e65a1 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Mon May 2 00:44:26 2005 +0000 - - 2005-05-01 Jeff Muizelaar <jeff@infidigm.net> - - * splash/SplashFTFont.cc (SplashFTFont::getGlyphPath): - Use FT_LOAD_NO_BITMAP to make sure we get outlines loaded - instead - of bitmaps for use in FT_Outline_Decompose. - - Patch from Albert Astals Cid. - - ChangeLog | 8 ++++++++ - splash/SplashFTFont.cc | 2 +- - 2 files changed, 9 insertions(+), 1 deletion(-) - -commit 49d89ca0ed3986bec7468f6c0ed295e84ba67239 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Sun May 1 21:54:55 2005 +0000 - - 2005-05-01 Jeff Muizelaar <jeff@infidigm.net> - - * goo/gmem.c: (gmalloc), (grealloc), (gfree): - * goo/gmem.h: make memory functions use size_t instead of int. - - Patch from Takashi Iwai through Albert Astals Cid. - - ChangeLog | 7 +++++++ - goo/gmem.c | 10 +++++----- - goo/gmem.h | 4 ++-- - 3 files changed, 14 insertions(+), 7 deletions(-) - -commit 14d618bece894e4c6bed0f179a8fda4db5a67c9d -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Sat Apr 30 19:53:57 2005 +0000 - - 2005-04-30 Jeff Muizelaar <jeff@infidigm.net> - - * qt/poppler-document.cc (Document::unlock) : - * qt/poppler-qt.h (Document::unlock): - Add const to the password argument. - - Patch from Albert Astals Cid. - - ChangeLog | 8 ++++++++ - qt/poppler-document.cc | 2 +- - qt/poppler-qt.h | 2 +- - 3 files changed, 10 insertions(+), 2 deletions(-) - -commit 1e66da32964cc76c6ed3773574f422b4608cb0e1 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Sat Apr 30 17:31:47 2005 +0000 - - 2005-04-30 Jeff Muizelaar <jeff@infidigm.net> - - * fofi/FoFiType1.cc (FoFiType1::parse): - Don't assume Encoding array of Type1 fonts end in "foo def". - http://partners.adobe.com/public/developer/en/font/T1_SPEC.PDF - says - "This sequence of assignments must be followed by an instance - of the - token def or readonly; such a token may not occur within - the sequence - of assignments." so it must end with "readonly" "def" - "readonly def" - (That is what most fonts are using and this is why it was not - crashing) - - Patch from Albert Astals Cid. - - ChangeLog | 13 +++++++++++++ - fofi/FoFiType1.cc | 14 +++++++++++--- - 2 files changed, 24 insertions(+), 3 deletions(-) - -commit 0b532db77ef41937dd5be30d15c96557d81eceb2 -Author: Jonathan Blandford <jrb@redhat.com> -Date: Fri Apr 29 19:37:07 2005 +0000 - - Fri Apr 29 14:54:44 2005 Jonathan Blandford <jrb@redhat.com> - - * goo/GooTimer.h: New class to do simple timing checks. - - * glib/poppler-document.c: Patch from Martin Kretzschmar - to really - set the PDF version correct. Third time's the charm. - - ChangeLog | 7 ++++++ - glib/poppler-document.cc | 4 ++- - goo/GooTimer.cc | 63 - ++++++++++++++++++++++++++++++++++++++++++++++++ - goo/GooTimer.h | 40 ++++++++++++++++++++++++++++++ - goo/Makefile.am | 2 ++ - 5 files changed, 115 insertions(+), 1 deletion(-) - -commit 38948ea6f9ef76dae9b8a7156fe1ef32a0457380 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Fri Apr 29 03:57:16 2005 +0000 - - 2005-04-29 Kristian Høgsberg <krh@bitplanet.net> - - * configure.ac: Bump release to 0.3.1. - - * NEWS: Write up news for 0.3.1 release. - - ChangeLog | 6 ++++++ - NEWS | 6 ++++++ - configure.ac | 2 +- - 3 files changed, 13 insertions(+), 1 deletion(-) - -commit af65146c92682a3af06e9d3147426445c78309de -Author: Kristian Høgsberg <krh@redhat.com> -Date: Thu Apr 28 23:03:06 2005 +0000 - - 2005-04-28 Kristian Høgsberg <krh@redhat.com> - - Patch from Martin Kretzschmar: - - * poppler/GlobalParams.cc: use UTF-8 as the default text - encoding. - Fixes Bug 2934. - - ChangeLog | 7 +++++++ - poppler/GlobalParams.cc | 2 +- - 2 files changed, 8 insertions(+), 1 deletion(-) - -commit c2db3e1b297a9dc0accd0d8a1366970d45705c8f -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Wed Apr 27 20:56:18 2005 +0000 - - 2005-04-27 Jeff Muizelaar <jeff@infidigm.net> - - * configure.ac: - * poppler/FlateStream.cc: - * poppler/FlateStream.h: - * poppler/Makefile.am: - * poppler/Stream.cc: - * poppler/Stream.h: Add a reimplementation of FlateStream - using - zlib. - - ChangeLog | 10 +++++ - configure.ac | 29 ++++++++++++++ - poppler/FlateStream.cc | 107 - +++++++++++++++++++++++++++++++++++++++++++++++++ - poppler/FlateStream.h | 68 +++++++++++++++++++++++++++++++ - poppler/Makefile.am | 17 +++++++- - poppler/Stream.cc | 6 +++ - poppler/Stream.h | 2 + - 7 files changed, 237 insertions(+), 2 deletions(-) - -commit bc0afe524c2b87af191d83fc9e9bcdc8a6ce4042 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Wed Apr 27 18:53:20 2005 +0000 - - 2005-04-27 Kristian Høgsberg <krh@redhat.com> - - * poppler/Catalog.cc (NameTree::lookup): Fix bsearch return - value - NULL check. Found by Albert Astals Cid. - - ChangeLog | 5 +++++ - poppler/Catalog.cc | 8 ++++---- - 2 files changed, 9 insertions(+), 4 deletions(-) - -commit 3c37dc350d54e5a1035aecfba5bfa394f931cf51 -Author: Jonathan Blandford <jrb@redhat.com> -Date: Tue Apr 26 17:17:05 2005 +0000 - - Tue Apr 26 13:13:42 2005 Jonathan Blandford <jrb@redhat.com> - - * glib/test-poppler-glib.c (main): add a quick dump-to-text - test. - - ChangeLog | 4 ++++ - glib/test-poppler-glib.c | 20 ++++++++++++++++++++ - 2 files changed, 24 insertions(+) - -commit 44b800d520f90ffd143255d2c23835ea357c195b -Author: Kristian Høgsberg <krh@redhat.com> -Date: Mon Apr 25 18:04:32 2005 +0000 - - Actually commit the qt/Makefile.am change advertised in the ChangeLog. - - qt/Makefile.am | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -commit 437bec03dd2ab3cdf6215f9ad443b7f21ce84e18 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Sun Apr 24 19:56:17 2005 +0000 - - 2005-04-24 Kristian Høgsberg <krh@redhat.com> - - * qt/Makefile.am (libpoppler_qt_la_SOURCES): Add - poppler-private.h - to SOURCES. - - ChangeLog | 5 +++++ - 1 file changed, 5 insertions(+) - -commit 9b2b1244ed5f30a99120aaee49c72f7cb6a4f556 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Sat Apr 23 20:16:02 2005 +0000 - - 2005-04-23 Kristian Høgsberg <krh@redhat.com> - - * poppler/CairoFontEngine.cc: Use the right fileName for - loading - CID fonts (#3114). - - ChangeLog | 5 +++++ - poppler/CairoFontEngine.cc | 11 +++++++++-- - 2 files changed, 14 insertions(+), 2 deletions(-) - -commit e4516d728a4d1bc85831d5d00b6d6b8d49c79308 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Sat Apr 23 00:09:05 2005 +0000 - - 2005-04-22 Kristian Høgsberg <krh@redhat.com> - - * configure.ac: Actually commit version number bump. - - ChangeLog | 4 ++++ - NEWS | 2 +- - configure.ac | 2 +- - 3 files changed, 6 insertions(+), 2 deletions(-) - -commit c20448cb26fa1c309d726f272ddf1227f5a0e6ea -Author: Kristian Høgsberg <krh@redhat.com> -Date: Fri Apr 22 17:29:49 2005 +0000 - - 2005-04-22 Martin Kretzschmar <martink@gnome.org> - - * poppler/CairoFontEngine.cc: declare matrix variable - before the - first goto. Fixes build with gcc 3.3. - - ChangeLog | 5 +++++ - poppler/CairoFontEngine.cc | 3 ++- - 2 files changed, 7 insertions(+), 1 deletion(-) - -commit 42ecccf9b454893797e3d62f0f1c0a3276689e51 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Fri Apr 22 04:09:23 2005 +0000 - - Fri Apr 22 00:01:40 2005 Kristian Høgsberg <krh@redhat.com> - - * poppler/CairoFontEngine.cc: Hack around semi-broken - cairo-0.4.0 - font API to fix the problem where some glyphs would show up - at the - wrong sizes. We now create an FT_Face for each size and font - combination we encounter, since an FT_Face can't be shared - between - several cairo_font_t. - - ChangeLog | 8 +++++ - poppler/CairoFontEngine.cc | 79 - ++++++++++++++++++++-------------------------- - poppler/CairoFontEngine.h | 23 ++++++-------- - poppler/CairoOutputDev.cc | 18 +++++------ - 4 files changed, 61 insertions(+), 67 deletions(-) - -commit 7a703616d9497eba4d7d318da9918dae9cbe8f12 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Thu Apr 21 19:50:45 2005 +0000 - - Thu Apr 21 15:43:52 2005 Kristian Høgsberg <krh@redhat.com> - - * poppler/Outline.cc: - * poppler/Outline.h: Implement the documented behaviour for - Outline::getItems() and OutlineItem::getKids() and make - documentation more precise (Patch from Marco). - - ChangeLog | 7 +++++++ - poppler/Outline.cc | 6 ++++++ - poppler/Outline.h | 7 ++++--- - 3 files changed, 17 insertions(+), 3 deletions(-) - -commit 5c89902c5ee2cf13536225c141768b29505815ce -Author: Kristian Høgsberg <krh@redhat.com> -Date: Thu Apr 21 06:35:33 2005 +0000 - - Thu Apr 21 02:25:20 2005 Kristian Høgsberg <krh@redhat.com> - - * poppler/CairoFontEngine.cc (CairoFont::getFont): Cache - cairo_font_t's for a given CairoFont. With this patch - cairo will - recognize glyphs coming from the same font as such and - the glyph - cache will actually work. - - * glib/poppler-document.cc (poppler_document_new_from_file): - Add - output device (cairo or splash) to PopplerDocument and - initialize - it in the constructor. - - * glib/poppler-page.cc (splash_render_to_pixbuf, - cairo_render_to_pixbuf): Use output device from associated - poppler - document instead of creating a new one. - - * poppler-glib.pc.in (Requires): Add Requires: field. - - * poppler/Page.cc (loadThumb): Remove unecessary and buggy - call to - Stream::addFilters(), reported by Ryan Lortie (#3046). - - ChangeLog | 7 ++++++- - NEWS | 12 +++--------- - poppler/CairoFontEngine.cc | 45 - +++++++++++++++++++++++++++++++++++++++------ - poppler/CairoFontEngine.h | 9 ++++++++- - poppler/CairoOutputDev.cc | 9 +-------- - 5 files changed, 57 insertions(+), 25 deletions(-) - -commit 71c1563bb0462154cb7caa4356d8f8d049073ac4 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Thu Apr 21 05:20:24 2005 +0000 - - Thu Apr 21 00:15:30 2005 Kristian Høgsberg <krh@redhat.com> - - * glib/poppler-document.cc (poppler_document_new_from_file): - Add - output device (cairo or splash) to PopplerDocument and - initialize - it in the constructor. - - * glib/poppler-page.cc (splash_render_to_pixbuf, - cairo_render_to_pixbuf): Use output device from associated - poppler - document instead of creating a new one. - - * poppler-glib.pc.in (Requires): Add Requires: field. - - * poppler/Page.cc (loadThumb): Remove unecessary and buggy - call to - Stream::addFilters(), reported by Ryan Lortie (#3046). - - ChangeLog | 15 +++++++++++++++ - NEWS | 15 +++++++++++++++ - glib/poppler-document.cc | 10 ++++++++++ - glib/poppler-page.cc | 22 ++-------------------- - glib/poppler-private.h | 13 +++++++++++++ - poppler-glib.pc.in | 1 + - poppler/CairoFontEngine.cc | 2 +- - poppler/Page.cc | 2 -- - 8 files changed, 57 insertions(+), 23 deletions(-) - -commit c6328cbc6cea05890b52a8302f8deba443959c03 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Wed Apr 20 22:48:52 2005 +0000 - - 2005-04-13 Jeff Muizelaar <jrmuizel@nit.ca> - - * qt/poppler-page.cc (Page::getText): - * qt/poppler-qt.h: add a getText method for getting - the text on a page - - * qt/test-poppler-qt.c (PDFDisplay::PDFDisplay): - add the option to display the text on a page - - Patch from Albert Astals Cid. - - ChangeLog | 11 +++++++++++ - qt/poppler-page.cc | 37 +++++++++++++++++++++++++++++++++++++ - qt/poppler-qt.h | 20 ++++++++++++++++++++ - qt/test-poppler-qt.cpp | 40 ++++++++++++++++++++++++++++++---------- - 4 files changed, 98 insertions(+), 10 deletions(-) - -commit 86a32b65100a5baedd18ce0135703289839a317c -Author: Jonathan Blandford <jrb@redhat.com> -Date: Tue Apr 19 21:22:26 2005 +0000 - - Tue Apr 19 17:21:19 2005 Jonathan Blandford <jrb@redhat.com> - - * glib/poppler-document.cc (poppler_document_get_property): - Use - %.2g instead. - - ChangeLog | 5 +++++ - glib/poppler-document.cc | 2 +- - 2 files changed, 6 insertions(+), 1 deletion(-) - -commit 4e81624dcc2d5218f2f8bb4eaa992e724014a853 -Author: Jonathan Blandford <jrb@redhat.com> -Date: Tue Apr 19 21:13:22 2005 +0000 - - Tue Apr 19 17:11:52 2005 Jonathan Blandford <jrb@redhat.com> - - * glib/poppler-document.cc (poppler_document_get_property): - Use %g - instead of %f to avoid versioning like PDF-1.50000 - - ChangeLog | 5 +++++ - glib/poppler-document.cc | 2 +- - 2 files changed, 6 insertions(+), 1 deletion(-) - -commit 6ef9d30f06be2bd8a9e1470d70f49843a7e432ac -Author: Kristian Høgsberg <krh@redhat.com> -Date: Tue Apr 19 19:48:49 2005 +0000 - - Tue Apr 19 15:43:35 2005 Kristian Høgsberg <krh@redhat.com> - - * glib/poppler-action.cc (_poppler_action_new): Handle - NULL links - gracefully (fix from Jeff). - - ChangeLog | 5 +++++ - glib/poppler-action.cc | 7 ++++++- - 2 files changed, 11 insertions(+), 1 deletion(-) - -commit 770b7310ce8b07f95960c2014bf3f6040c060ac4 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Tue Apr 19 04:28:15 2005 +0000 - - Tue Apr 19 00:20:08 2005 Kristian Høgsberg <krh@redhat.com> - - * poppler/Catalog.cc: Fix from Marco to make sure we always - initialize Catalog::pageLabelInfo. - - ChangeLog | 5 +++++ - poppler/Catalog.cc | 3 +-- - 2 files changed, 6 insertions(+), 2 deletions(-) - -commit 49c10d9f2c4e0cef031f96929e38a14d7ce5af19 -Author: Jonathan Blandford <jrb@redhat.com> -Date: Sat Apr 16 18:57:43 2005 +0000 - - Sat Apr 16 14:53:15 2005 Jonathan Blandford <jrb@redhat.com> - - * glib/Makefile.am: Create poppler-enums.[ch] - - * glib/poppler.h: - * glib/poppler-page.cc: - * glib/poppler-page.h: - * glib/poppler-action.h: Try to clean up the headers a bit - - * glib/poppler-document.cc: - * glib/poppler-document.h: Add support for document data. - Implemented as a lot of GObject properties. - - * glib/poppler-enums.c: - * glib/poppler-enums.h: New autogenerated files. - - * glib/test-poppler-glib.c: Test the new document metadata. - Seems - to work nicely, other than the PDF string and View Prefs. - - * poppler/Catalog.cc: - * poppler/Catalog.h: Extend to support PageLayout. - - ChangeLog | 22 ++++++ - glib/Makefile.am | 32 +++++++- - glib/poppler-action.h | 15 ++-- - glib/poppler-document.cc | 196 - ++++++++++++++++++++++++++++++++++++++++++----- - glib/poppler-document.h | 43 +++++++++-- - glib/poppler-enums.c | 144 ++++++++++++++++++++++++++++++++++ - glib/poppler-enums.h | 32 ++++++++ - glib/poppler-page.cc | 3 - - glib/poppler-page.h | 1 + - glib/poppler.h | 7 ++ - glib/test-poppler-glib.c | 48 +++++++++++- - poppler/Catalog.cc | 17 ++++ - poppler/Catalog.h | 11 +++ - 13 files changed, 529 insertions(+), 42 deletions(-) - -commit f35c76cd3528f1e1de594e85e734ca23624b3a62 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Fri Apr 15 02:25:10 2005 +0000 - - 2005-04-14 Kristian Høgsberg <krh@redhat.com> - - * glib/poppler-page.cc: - * glib/poppler-page.h: - * glib/poppler-private.h: - * glib/poppler.h: Patch from Marco Pesenti Gritti to set page - orientaton. - - ChangeLog | 8 ++++ - glib/poppler-page.cc | 109 - +++++++++++++++++++++++++++++++++++++++++++++---- - glib/poppler-page.h | 45 ++++++++++---------- - glib/poppler-private.h | 1 + - glib/poppler.h | 9 ++++ - 5 files changed, 142 insertions(+), 30 deletions(-) - -commit 538408a8845e167cc2d796ac8b8129d0a2e6a894 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Thu Apr 14 01:34:38 2005 +0000 - - 2005-04-13 Jeff Muizelaar <jrmuizel@nit.ca> - - * poppler/CairoOutputDevImage.cc (getBitmap): remove unused - SplashBitmap. Patch from Albert Astals Cid. - - ChangeLog | 5 +++++ - poppler/CairoOutputDevImage.cc | 2 -- - 2 files changed, 5 insertions(+), 2 deletions(-) - -commit 2903530492c24f3c7cb3bf3b993500694aaa27a8 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Tue Apr 12 15:37:39 2005 +0000 - - 2005-04-12 Kristian Høgsberg <krh@redhat.com> - - * configure.ac: Add fontconfig to PKG_CHECK_MODULES for - the cairo - backend too, since we shouldn't depend on cairo.pc to pull - that in - for us. - - * poppler/Makefile.am (INCLUDES): Add $(splash_includes) to - INCLUDES to make sure the fontconfig include path is - added when - using the splash backend. - - ChangeLog | 10 ++++++++++ - configure.ac | 4 ++-- - poppler/Makefile.am | 1 + - 3 files changed, 13 insertions(+), 2 deletions(-) - -commit 0f7dd9a0512ff97293ee3f8a762b0049393b3cc1 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Sat Apr 9 18:14:39 2005 +0000 - - 2005-04-09 Jeff Muizelaar <jrmuizel@nit.ca> - - * poppler-qt.h: - * poppler-document.cc (okToPrint, okToChange, okToCopy): - Patch from Albert Astals Cid adding more metadata exports - - ChangeLog | 6 ++++++ - qt/poppler-document.cc | 20 ++++++++++++++++++++ - qt/poppler-qt.h | 4 ++++ - 3 files changed, 30 insertions(+) - -commit dee72b531dab83a29c7675ae06ffe376e4498a4e -Author: Kristian Høgsberg <krh@redhat.com> -Date: Fri Apr 8 21:09:27 2005 +0000 - - 2005-04-08 Kristian Høgsberg <krh@redhat.com> - - * poppler-qt.pc.in (Libs): Add -lpoppler to Libs. - - ChangeLog | 4 ++++ - poppler-qt.pc.in | 2 +- - 2 files changed, 5 insertions(+), 1 deletion(-) - -commit df59ce3b1d5ca8cd46aaf5f189bc78953e21e1a9 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Fri Apr 8 03:30:33 2005 +0000 - - 2005-04-07 Jeff Muizelaar <jrmuizel@nit.ca> - - * configure.ac: redo the qt tests from Albert Astals Cid - - ChangeLog | 4 ++++ - configure.ac | 78 - ++++++++++++++++++++++++++++++++++++------------------------ - 2 files changed, 51 insertions(+), 31 deletions(-) - -commit 3f9dde10e4778255c468895942e45d1a2637af3a -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Fri Apr 8 03:11:00 2005 +0000 - - 2005-04-07 Jeff Muizelaar <jrmuizel@nit.ca> - - * qt/poppler-document.cc: - * qt/poppler-page.cc: - * qt/poppler-qt.h: - Patch from Albert Astals Cid adding consts and exporting - some more - metadata. - - ChangeLog | 8 ++++++++ - qt/poppler-document.cc | 21 ++++++++++++++++++--- - qt/poppler-page.cc | 6 +++--- - qt/poppler-qt.h | 15 +++++++++------ - 4 files changed, 38 insertions(+), 12 deletions(-) - -commit e79a8b946e0d04b32da0b4ceea1649efd203cb07 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Thu Apr 7 22:01:51 2005 +0000 - - 2005-04-07 Kristian Høgsberg <krh@redhat.com> - - * glib/poppler-document.cc: - * glib/poppler-document.h: - * glib/poppler-page.cc: - * glib/poppler-page.h: - * glib/poppler-private.h: Print to PS support from Marco - Pesenti - Gritti. - - ChangeLog | 9 +++++++++ - glib/poppler-document.cc | 45 - +++++++++++++++++++++++++++++++++++++++++++++ - glib/poppler-document.h | 8 ++++++-- - glib/poppler-page.cc | 19 +++++++++++++++++++ - glib/poppler-page.h | 40 +++++++++++++++++++++------------------- - glib/poppler-private.h | 7 +++++++ - 6 files changed, 107 insertions(+), 21 deletions(-) - -commit 7319b66eb64e735ae8b811306eb76755f088385b -Author: Jonathan Blandford <jrb@redhat.com> -Date: Thu Apr 7 16:26:15 2005 +0000 - - Thu Apr 7 12:25:39 2005 Jonathan Blandford <jrb@redhat.com> - - * configure.ac: check for qt, not glib, when enabling the qt - subdir - - ChangeLog | 5 +++++ - configure.ac | 2 +- - 2 files changed, 6 insertions(+), 1 deletion(-) - -commit e258ed0cb42d524ee39451f680ad4c067e7721da -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Wed Apr 6 20:49:19 2005 +0000 - - 2005-04-06 Jeff Muizelaar <jrmuizel@nit.ca> - - * .cvsignore, glib/.cvsignore, qt/.cvsignore: - Add more things to .cvsignore. - Patch from Martin Kretzschmar. - - .cvsignore | 2 ++ - ChangeLog | 6 ++++++ - glib/.cvsignore | 7 +++++++ - qt/.cvsignore | 7 +++++++ - 4 files changed, 22 insertions(+) - -commit 2a5624a81aa84677a57e098d7d4045f44e3b6f3a -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Wed Apr 6 20:35:03 2005 +0000 - - 2005-04-06 Jeff Muizelaar <jrmuizel@nit.ca> - - * poppler-page.cc (Page::Page, Page::~Page): - Construct and deconstruct the PageData object. - Patch from Albert Astals Cid. - - ChangeLog | 6 ++++++ - qt/poppler-page.cc | 6 ++++++ - qt/poppler-qt.h | 1 + - 3 files changed, 13 insertions(+) - -commit f983e3d317660653f2bfc56f9b06e2cec675beca -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Wed Apr 6 14:39:40 2005 +0000 - - 2005-04-06 Jeff Muizelaar <jrmuizel@nit.ca> - - * Makefile.am, configure.ac: Add configuration for qt wrapper. - - * poppler-qt.pc.in: - * qt/Makefile.am: - * qt/poppler-document.cc: - * qt/poppler-page.cc: - * qt/poppler-private.h: - * qt/poppler-qt.h: - * qt/test-poppler-qt.cpp: - New files. - - ChangeLog | 13 +++ - Makefile.am | 13 ++- - configure.ac | 64 +++++++++++++- - poppler-qt.pc.in | 11 +++ - qt/Makefile.am | 32 +++++++ - qt/poppler-document.cc | 232 - +++++++++++++++++++++++++++++++++++++++++++++++++ - qt/poppler-page.cc | 66 ++++++++++++++ - qt/poppler-private.h | 32 +++++++ - qt/poppler-qt.h | 75 ++++++++++++++++ - qt/test-poppler-qt.cpp | 63 ++++++++++++++ - 10 files changed, 597 insertions(+), 4 deletions(-) - -commit d91dd69a7a0dd581c26728d2640e4d36a7ffe75f -Author: Kristian Høgsberg <krh@redhat.com> -Date: Tue Apr 5 17:46:44 2005 +0000 - - 2005-04-05 Kristian Høgsberg <krh@redhat.com> - - * NEWS: Attempt to sum up changes since 0.1.2. - - * configure.ac: Bump release to 0.2.0, add AC_DEFINEs - for cairo - and splash availability. - - * poppler/CairoFontEngine.cc: Disable hinting. - - * glib/poppler-page.cc (poppler_page_render_to_pixbuf): Choose - either splash or cairo rendering, based on configure choice. - (cairo_render_to_pixbuf): New function to render using - the cairo - backend. - (splash_render_to_pixbuf): Split out the splash code to this - function. - - ChangeLog | 16 +++++ - NEWS | 6 +- - configure.ac | 16 +++-- - glib/Makefile.am | 17 ++++- - glib/poppler-page.cc | 152 - +++++++++++++++++++++++++++++++++-------- - poppler/CairoFontEngine.cc | 2 +- - poppler/CairoOutputDevImage.cc | 20 ++---- - poppler/CairoOutputDevImage.h | 3 +- - 8 files changed, 179 insertions(+), 53 deletions(-) - -commit b62b0cec2335d987b31fbb0043cb33db29cc6a13 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Tue Apr 5 02:56:32 2005 +0000 - - 2005-04-04 Kristian Høgsberg <krh@redhat.com> - - * ChangeLog: Add this entry to test commit mailer script. - - ChangeLog | 2 ++ - 1 file changed, 2 insertions(+) - -commit 50b494266ce197fe88468ca2917b9910d77e5f98 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Tue Apr 5 02:49:18 2005 +0000 - - 2005-04-04 Kristian Høgsberg <krh@redhat.com> - - * TODO: Add reminder about using PDF font descriptors with - fontconfig. - - ChangeLog | 3 +++ - TODO | 2 ++ - 2 files changed, 5 insertions(+) - -commit d3d12235bf4de48363571b3d992ea3bfc29e6529 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Mon Apr 4 21:50:56 2005 +0000 - - 2005-04-04 Kristian Høgsberg <krh@redhat.com> - - * configure.ac: Add checks for mkstemp() and mkstemps(). - - * glib/poppler-page.cc (poppler_page_find_text): Reverse - y-coordinates so we return PDF style coordinates. - - From Maro Pesenti Gritti <mpgritti@gmail.com>: - - * configure.ac, poppler/Makefile.am: Check for fontconfig when - we're building the splash backend. - - * glib/poppler-page.cc (poppler_page_get_text): New - function to - select text on page. - - ChangeLog | 15 +++++++++++++++ - configure.ac | 5 ++++- - glib/poppler-page.cc | 48 - +++++++++++++++++++++++++++++++++++++++++++++--- - glib/poppler-page.h | 3 +++ - poppler/Makefile.am | 4 ++++ - 5 files changed, 71 insertions(+), 4 deletions(-) - -commit 2cb9d70678e33504246cbfbe0525c33f5e3b7736 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Mon Apr 4 05:56:29 2005 +0000 - - 2005-04-04 Kristian Høgsberg <krh@redhat.com> - - * glib/poppler-page.cc (poppler_page_find_text): Reverse - list of - matches so we get them in the right order. - - ChangeLog | 5 +++++ - glib/poppler-page.cc | 2 +- - 2 files changed, 6 insertions(+), 1 deletion(-) - -commit 8c2a5ffb73c0f2d84adebcfbd43f8347ae8c8bbc -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Sun Apr 3 18:17:55 2005 +0000 - - 2005-04-03 Martin Kretzschmar <martink@gnome.org> - - * poppler/DCTStream.h: Wrap #include <jpeglib.h> in extern "C" - Fixes build with unpatched libjpeg. - - ChangeLog | 5 +++++ - poppler/DCTStream.h | 2 ++ - 2 files changed, 7 insertions(+) - -commit 1879d82d9088aa36ef5e677f4bae44c84f90caa6 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Sat Apr 2 22:16:38 2005 +0000 - - 2005-04-02 Jeff Muizelaar <jrmuizel@nit.ca> - - * poppler/Page.h: - * poppler/Page.cc (Page::Page): - Some initial infrastructure for supporting transitions. - - ChangeLog | 6 ++++++ - poppler/Page.cc | 10 ++++++++++ - poppler/Page.h | 4 ++++ - 3 files changed, 20 insertions(+) - -commit fa4efbed51e12811070798a7cfb6b1f9e8d57abc -Author: Kristian Høgsberg <krh@redhat.com> -Date: Fri Apr 1 00:32:34 2005 +0000 - - 2005-03-31 Kristian Høgsberg <krh@redhat.com> - - * glib/poppler-page.cc (poppler_page_render_to_pixbuf): Clip - output to destination pixbuf and fix RGB order. - - ChangeLog | 5 +++++ - glib/poppler-page.cc | 38 +++++++++++++++++++++++--------------- - 2 files changed, 28 insertions(+), 15 deletions(-) - -commit bb508ded0b8c5806a9db1ec73e57b14268896911 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Thu Mar 31 22:45:05 2005 +0000 - - 2005-03-31 Kristian Høgsberg <krh@redhat.com> - - * glib/poppler-page.cc (poppler_page_find_text): New - function to - seach a page for occurrences of a given text string. - - * glib/poppler-page.cc: Add g_return_if_fail() checks to - a couple - of functions. - - ChangeLog | 8 +++++ - glib/poppler-page.cc | 82 - ++++++++++++++++++++++++++++++++++++++++++------ - glib/poppler-page.h | 18 ++++++++--- - glib/test-poppler-glib.c | 19 +++++++++-- - 4 files changed, 109 insertions(+), 18 deletions(-) - -commit 0b4d481e9c79cb18cf41b503970801bbf4b95b3c -Author: Jonathan Blandford <jrb@redhat.com> -Date: Thu Mar 31 05:29:42 2005 +0000 - - Thu Mar 31 00:26:20 2005 Jonathan Blandford <jrb@redhat.com> - - * glib/poppler-page.cc: - * glib/poppler-page.h (poppler_page_get_link_mapping, - poppler_page_free_link_mapping): New functions to get a - mapping of - links to locations on the current document. - :s - - ChangeLog | 7 +++++ - glib/poppler-page.cc | 85 - ++++++++++++++++++++++++++++++++++++++++++++++++---- - glib/poppler-page.h | 15 ++++++++++ - 3 files changed, 102 insertions(+), 5 deletions(-) - -commit c4e18f5a454794bd5e226f1106a54ccf807c6c3d -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Thu Mar 31 02:28:46 2005 +0000 - - 2005-03-30 Jeff Muizelaar <jrmuizel@nit.ca> - - * poppler/DCTStream.h: change x to unsigned int to eliminate - comparision warning - - ChangeLog | 5 +++++ - poppler/DCTStream.h | 2 +- - 2 files changed, 6 insertions(+), 1 deletion(-) - -commit e6a2a588305b4797af901599eb6854028f2be476 -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Wed Mar 30 18:43:44 2005 +0000 - - 2005-03-30 Jeff Muizelaar <jrmuizel@nit.ca> - - * poppler/Catalog.cc: delete pageLabelInfo on deconstruction - - ChangeLog | 4 ++++ - poppler/Catalog.cc | 1 + - 2 files changed, 5 insertions(+) - -commit a52905c0f0bf4d10d2103b80924a4de204d03836 -Author: Jonathan Blandford <jrb@redhat.com> -Date: Wed Mar 30 04:08:26 2005 +0000 - - add this - - glib/poppler-action.cc | 285 - +++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 285 insertions(+) - -commit 9542860a74076020b5727d4b761c08cdab42d69e -Author: Jonathan Blandford <jrb@redhat.com> -Date: Wed Mar 30 04:07:57 2005 +0000 - - add these - - glib/poppler-action.h | 157 - ++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 157 insertions(+) - -commit 07720f98eca8736695f7d0d8e98465d301e6b7cf -Author: Jonathan Blandford <jrb@redhat.com> -Date: Wed Mar 30 04:07:39 2005 +0000 - - Tue Mar 29 23:07:17 2005 Jonathan Blandford <jrb@redhat.com> - - * glib/poppler-page.h: Reformat. - - ChangeLog | 4 ++++ - glib/poppler-page.h | 34 +++++++++++++++++----------------- - 2 files changed, 21 insertions(+), 17 deletions(-) - -commit 3437b9e122aa05f4ede24664ee5a9b2d423ef9c4 -Author: Jonathan Blandford <jrb@redhat.com> -Date: Wed Mar 30 04:04:53 2005 +0000 - - Tue Mar 29 22:49:15 2005 Jonathan Blandford <jrb@redhat.com> - - * glib/poppler-action.[ch]: New item to encapsulate links. - * glib/poppler-document.[ch] (poppler_index_iter_get_action): - New - function to get the action. Also, fix some warnings. - * glib/poppler-private.h (_poppler_action_new): New function. - * glib/test-poppler-glib.c: Fix warnings. - - ChangeLog | 8 +++++++ - glib/Makefile.am | 2 ++ - glib/poppler-document.cc | 57 - +++++++++++------------------------------------- - glib/poppler-document.h | 7 ++---- - glib/poppler-private.h | 12 ++++++++-- - glib/poppler.h | 1 + - glib/test-poppler-glib.c | 4 +++- - 7 files changed, 39 insertions(+), 52 deletions(-) - -commit cab0ec4d011c34b571050a446c6e3286cc8749c8 -Author: Jonathan Blandford <jrb@redhat.com> -Date: Tue Mar 29 18:49:26 2005 +0000 - - Tue Mar 29 02:36:00 2005 Jonathan Blandford <jrb@redhat.com> - - * glib/poppler-document.[ch] (PopplerIndexIter): Add an - iter to - extract the index from the doc. Includes a bad hack, for now. - - Mon Mar 28 22:02:07 2005 Jonathan Blandford <jrb@redhat.com> - - * glib/poppler-page.cc: - * glib/poppler-page.h (poppler_page_get_thumbnail_size): New - function. - * poppler-glib.pc.in: add -lpoppler-glib to the libs line. - - ChangeLog | 12 ++++ - glib/poppler-document.cc | 160 - ++++++++++++++++++++++++++++++++++++++++++++++- - glib/poppler-document.h | 15 +++++ - glib/poppler-page.cc | 48 +++++++++++++- - glib/poppler-page.h | 3 + - poppler-glib.pc.in | 2 +- - 6 files changed, 236 insertions(+), 4 deletions(-) - -commit 2de98f3871bc4ea3e361ca4fe37f5b6561918c77 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Mon Mar 28 07:49:54 2005 +0000 - - 2005-03-28 Kristian Høgsberg <krh@redhat.com> - - * poppler/Page.cc (loadThumb): Backend agnostic method for - extracting an embedded thumbnail iamge. - - * poppler/Dict.cc (lookupInt): New convenience method. - - * glib/poppler-page.cc (poppler_page_get_thumbnail): New glib - function for getting the embedded thumbnail image for a page. - - ChangeLog | 10 +++++ - glib/poppler-page.cc | 23 ++++++++++ - glib/poppler-page.h | 32 +++++++------- - glib/test-poppler-glib.c | 24 ++++++++--- - poppler/Dict.cc | 20 +++++++++ - poppler/Dict.h | 1 + - poppler/Page.cc | 109 - +++++++++++++++++++++++++++++++++++++++++++++++ - poppler/Page.h | 1 + - 8 files changed, 196 insertions(+), 24 deletions(-) - -commit 591055d1fbcd0b9c2bb11f14040568051c5976d1 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Sat Mar 26 00:34:21 2005 +0000 - - 2005-03-25 Kristian Høgsberg <krh@redhat.com> - - * glib/Makefile.am (libpoppler_glib_la_SOURCES): Add - - * configure.ac: Check for fontconfig for glib bindings. - - ChangeLog | 4 ++++ - configure.ac | 4 ++-- - glib/Makefile.am | 7 +++++-- - 3 files changed, 11 insertions(+), 4 deletions(-) - -commit 1e30abe94a96b91df05716ea079c58782d767951 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Thu Mar 24 22:24:41 2005 +0000 - - 2005-03-24 Kristian Høgsberg <krh@redhat.com> - - * glib/Makefile.am: Use POPPLER_GLIB_CFLAGS and - POPPLER_GLIB_LIBS - instead of GTK_TEST_*. Reported by Adam Jackson - <ajax@nwnk.net>. - - ChangeLog | 5 +++++ - glib/Makefile.am | 7 +++---- - 2 files changed, 8 insertions(+), 4 deletions(-) - -commit 1d9fcaa34222b2ccd53280148561917dbb8d95d9 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Wed Mar 23 05:53:08 2005 +0000 - - File Edit Options Buffers Tools Help - 2005-03-23 Kristian Høgsberg <krh@redhat.com> - - * poppler/Catalog.cc (indexToLabel, labelToIndex): Add - stricter - checking of incoming labels and indices. - - * glib/test-poppler-glib.c (main): Change test program to - take the - page label from the command line. - - ChangeLog | 6 ++++++ - glib/test-poppler-glib.c | 5 ++++- - poppler/Catalog.cc | 31 +++++++++++++++++++++++++++++-- - 3 files changed, 39 insertions(+), 3 deletions(-) - -commit a9bbb465a0ee6ab320f76d322a3f575327ad1148 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Wed Mar 23 05:38:34 2005 +0000 - - 2005-03-23 Kristian Høgsberg <krh@redhat.com> - - * glib/poppler-page.cc: - * glib/poppler-page.h: Add poppler_page_get_index() and rename - popper_page_get_dimension() to popper_page_get_size() - - ChangeLog | 6 ++++++ - glib/poppler-page.cc | 12 +++++++++--- - glib/poppler-page.h | 32 +++++++++++++++++--------------- - glib/test-poppler-glib.c | 5 ++--- - 4 files changed, 34 insertions(+), 21 deletions(-) - -commit 178bff27d09d1e18d1fc00c975fa235b0e9f93d3 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Wed Mar 23 04:14:28 2005 +0000 - - 2005-03-22 Kristian Høgsberg <krh@redhat.com> - - * glib/poppler-document.cc: Implement poppler_document_save(). - - * glib/poppler-document.h: Add prototype and format headers - properly. - - ChangeLog | 7 +++++++ - glib/poppler-document.cc | 20 ++++++++++++++++++++ - glib/poppler-document.h | 30 +++++++++++++----------------- - 3 files changed, 40 insertions(+), 17 deletions(-) - -commit e40c6f69c9466df4cc70840b959f72cb0809c777 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Wed Mar 23 01:30:04 2005 +0000 - - 2005-03-22 Kristian Høgsberg <krh@redhat.com> - - * configure.ac: Fix --disable-popper typo reported by Albert. - Require exactly cairo 0.4 since CVS cairo has API changes. - - ChangeLog | 5 +++++ - configure.ac | 6 +++--- - 2 files changed, 8 insertions(+), 3 deletions(-) - -commit 2a1e4f6f6dd87dc59b3579175a87215fd7350ee0 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Tue Mar 22 22:46:37 2005 +0000 - - 2005-03-22 Kristian Høgsberg <krh@redhat.com> - - * poppler/Array.cc: - * poppler/Array.h: Add getString() convenience method. - - * poppler/Catalog.cc: - * poppler/Catalog.h: Optimize lookup of named destinations. - - ChangeLog | 8 +++ - poppler/Array.cc | 15 ++++++ - poppler/Array.h | 1 + - poppler/Catalog.cc | 142 - ++++++++++++++++++++++++++++++++++------------------- - poppler/Catalog.h | 32 +++++++++++- - 5 files changed, 146 insertions(+), 52 deletions(-) - -commit 4dfe0ce4a1ca09d632943f0f6315e31135957ada -Author: Kristian Høgsberg <krh@redhat.com> -Date: Tue Mar 22 01:50:05 2005 +0000 - - 2005-03-21 Kristian Høgsberg <krh@redhat.com> - - * NEWS, TODO: Update these. - - ChangeLog | 4 ++++ - NEWS | 1 + - TODO | 29 ++++++++++++++++++++--------- - 3 files changed, 25 insertions(+), 9 deletions(-) - -commit c158de90a5a8c6514d8aa22efa0b891a1801e822 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Mon Mar 21 07:53:19 2005 +0000 - - 2005-03-21 Kristian Høgsberg <krh@redhat.com> - - From Albert Astals Cid <tsdgeos@yahoo.es>: - - * poppler/Catalog.cc, poppler/Catalog.h: Parse PageMode - setting - from the Catalog dict and expose it through getPageMode() - method. - - ChangeLog | 10 ++++++++-- - poppler/Catalog.cc | 16 ++++++++++++++++ - poppler/Catalog.h | 12 ++++++++++++ - 3 files changed, 36 insertions(+), 2 deletions(-) - -commit 9887679ca195714d71cbedde9297e9dcea04eb13 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Mon Mar 21 07:36:11 2005 +0000 - - 2005-03-21 Kristian Høgsberg <krh@redhat.com> - - * glib/poppler-document.cc: - - * glib/poppler-document.h: Expose the documenttitle as - a GObject - property. - - * glib/poppler-page.cc: Expose the page label as a GObject - property. - - * glib/poppler-private.h: Add the page index to PopplerPage. - - * glib/test-poppler-glib.c: Print out page label and document - title. - - * poppler/Catalog.cc: - * poppler/Catalog.h: Add page label accessors. - - * poppler/PageLabelInfo.cc: - * poppler/PageLabelInfo.h: New files. - - * poppler/Makefile.am: Add new files to sources. - - ChangeLog | 23 ++++ - glib/poppler-document.cc | 95 ++++++++++++- - glib/poppler-document.h | 3 + - glib/poppler-page.cc | 37 ++++- - glib/poppler-private.h | 3 +- - glib/test-poppler-glib.c | 13 +- - poppler/Catalog.cc | 15 ++ - poppler/Catalog.h | 6 + - poppler/Makefile.am | 4 +- - poppler/PageLabelInfo.cc | 346 - +++++++++++++++++++++++++++++++++++++++++++++++ - poppler/PageLabelInfo.h | 37 +++++ - 11 files changed, 573 insertions(+), 9 deletions(-) - -commit 2cfe917de909254bc3a114a6add68a14b5885fd0 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Sun Mar 20 05:44:06 2005 +0000 - - 2005-03-20 Kristian Høgsberg <krh@redhat.com> - - * glib/poppler-document.cc: - * glib/poppler-page.h: - * glib/poppler.cc: - * poppler/Array.cc: - * poppler/Array.h: - * poppler/Catalog.cc: Fix up filenames in #include statements - and - comments. - - ChangeLog | 10 ++++++++++ - glib/poppler-document.cc | 2 +- - glib/poppler-document.h | 2 +- - glib/poppler-page.cc | 2 +- - glib/poppler-page.h | 2 +- - glib/poppler.cc | 2 +- - glib/poppler.h | 2 +- - 7 files changed, 16 insertions(+), 6 deletions(-) - -commit f9b6017cfaf8f814ae2fc027927477c29f24af71 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Sun Mar 20 00:35:21 2005 +0000 - - 2005-03-19 Kristian Høgsberg <krh@redhat.com> - - Land the first bits of the glib wrapper. - - * Makefile.am: - * configure.ac: Add new glib subdirectory and configure - options - for glib wrapper. - - * glib/Makefile.am: - * glib/poppler-document.cc: - * glib/poppler-document.h: - * glib/poppler-page.cc: - * glib/poppler-page.h: - * glib/poppler-private.h: - * glib/poppler.cc: - * glib/poppler.h: - * glib/test-poppler-glib.c: - * poppler-glib.pc.in: New files. - - ChangeLog | 19 ++++++ - Makefile.am | 27 ++++---- - NEWS | 4 ++ - configure.ac | 25 ++++++- - glib/Makefile.am | 33 ++++++++++ - glib/poppler-document.cc | 165 - +++++++++++++++++++++++++++++++++++++++++++++++ - glib/poppler-document.h | 52 +++++++++++++++ - glib/poppler-page.cc | 158 - +++++++++++++++++++++++++++++++++++++++++++++ - glib/poppler-page.h | 50 ++++++++++++++ - glib/poppler-private.h | 20 ++++++ - glib/poppler.cc | 29 +++++++++ - glib/poppler.h | 42 ++++++++++++ - glib/test-poppler-glib.c | 43 ++++++++++++ - poppler-glib.pc.in | 11 ++++ - 14 files changed, 661 insertions(+), 17 deletions(-) - -commit 2a31446b227b5cdc8334e672a71835b6ea14713a -Author: Jeff Muizelaar <jeff@infidigm.net> -Date: Wed Mar 16 15:51:36 2005 +0000 - - 2005-03-16 Jeff Muizelaar <jrmuizel@nit.ca> - - From Dan Sheridan <dan.sheridan@postman.org.uk> - - * poppler/XRef.cc (XRef::checkEncrypted): - The key length should be 5 for revision 2 documents. - - ChangeLog | 7 +++++++ - poppler/XRef.cc | 6 ++++++ - 2 files changed, 13 insertions(+) - -commit e632a1d4b2f685993bda407458c34ef8e6b74136 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Fri Mar 11 22:43:29 2005 +0000 - - 2005-03-11 Kristian Høgsberg <krh@redhat.com> - - From Jeff Muizelaar <jrmuizel@nit.ca>: - - * poppler/CairoOutputDev.cc (CairoOutputDev::drawImageMask): - Use - getLine instead of getPixel. - - ChangeLog | 3 +++ - poppler/CairoOutputDev.cc | 18 ++++++++---------- - 2 files changed, 11 insertions(+), 10 deletions(-) - -commit 83e904452f205a2c0cd2723cb12b7fd4640ce342 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Fri Mar 11 21:42:52 2005 +0000 - - 2005-03-11 Kristian Høgsberg <krh@redhat.com> - - From Jeff Muizelaar <jrmuizel@nit.ca>: - - * configure.ac: Add checks for libjpeg. - - * DCTStream.cc, DCTStream.h, Stream.cc, Stream.h, Makefile.am: - Conditionally use libjpeg instead of xpdf jpeg decoder. - - ChangeLog | 9 +++++ - configure.ac | 34 +++++++++++++++- - poppler/DCTStream.cc | 110 - +++++++++++++++++++++++++++++++++++++++++++++++++++ - poppler/DCTStream.h | 70 ++++++++++++++++++++++++++++++++ - poppler/Makefile.am | 14 ++++++- - poppler/Stream.cc | 8 ++++ - poppler/Stream.h | 2 + - 7 files changed, 245 insertions(+), 2 deletions(-) - -commit e2af71338fd89760c4ac76999985efc5eb92817f -Author: Kristian Høgsberg <krh@redhat.com> -Date: Fri Mar 11 16:42:20 2005 +0000 - - 2005-03-10 Kristian Høgsberg <krh@redhat.com> - - From Jeff Muizelaar <jrmuizel@nit.ca>: - - * poppler/CairoFontEngine.cc (CairoFontEngine::getFont): - Don't print "Type 3 font!" message. - - * poppler/CairoOutputDev.cc (CairoOutputDev::drawImageMask): - Enable image mask drawing and do it properly, albeit slowly. - - * poppler/CairoOutputDev.h - (CairoOutputDev::interpretType3Chars): Return true so that - Gfx.cc turns type3 characters into calls to drawImageMask - - ChangeLog | 14 ++++++++++++++ - poppler/CairoFontEngine.cc | 1 - - poppler/CairoOutputDev.cc | 25 ++++++++++--------------- - poppler/CairoOutputDev.h | 2 +- - 4 files changed, 25 insertions(+), 17 deletions(-) - -commit 3dc52373346e448077d2539163e873eef6406ed7 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Wed Mar 9 15:47:00 2005 +0000 - - 2005-03-09 Kristian Høgsberg <krh@redhat.com> - - * NEWS: Describe 0.1.2 (and 0.1.1) release. - - * configure.ac: Bump poppler version to 0.1.2 - - ChangeLog | 6 ++++++ - NEWS | 12 ++++++++++++ - configure.ac | 2 +- - 3 files changed, 19 insertions(+), 1 deletion(-) - -commit 5c6a2d34fc25df28ca5326e6910d7cf664f0c3d7 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Wed Mar 9 15:35:31 2005 +0000 - - 2005-03-09 Kristian Høgsberg <krh@redhat.com> - - * configure.ac: Bump cairo requirement to 0.4. - - ChangeLog | 4 ++++ - configure.ac | 4 ++-- - 2 files changed, 6 insertions(+), 2 deletions(-) - -commit 5b2d9a61e79cefd819888c8c89231a5fafccd114 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Sat Mar 5 04:57:49 2005 +0000 - - 2005-03-04 Kristian Høgsberg <krh@redhat.com> - - Patch from Jeff Muizelaar <jrmuizel@nit.ca>. Changed to - allocate - glyphs using gmalloc. - - * poppler/CairoOutputDev.cc (CairoOutputDev::drawString): - Implement drawString instead of drawChar. This change should - make clipping to a text path work and has a performance - improvement. Currently the code is a little ugly because we - can't concat matrices to cairo without losing our current - font. - - * poppler/CairoOutputDev.h (CairoOutputDev::useDrawChar): - Tell Gfx.cc that it should use drawString instead of drawChar. - - ChangeLog | 14 ++++++ - TODO | 3 ++ - poppler/CairoOutputDev.cc | 110 - ++++++++++++++++++++++++++++++++++------------ - poppler/CairoOutputDev.h | 7 +-- - 4 files changed, 102 insertions(+), 32 deletions(-) - -commit 60d190ef80a0dcd9cc3a67306e2c65c5dd482f24 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Sat Mar 5 04:37:14 2005 +0000 - - 2005-03-04 Kristian Høgsberg <krh@redhat.com> - - * test/gtk-cairo-test.cc (view_load): - * test/gtk-splash-test.cc (view_load): Fix missing return - statement, and remove unused variables. - - * configure.ac: Add configure option to enable the default KDE - flags as described by Albert Astals Cid <tsdgeos@yahoo.es>. - - * TODO: Update with Jeff's items. - - * .cvsignore: - * */.cvsignore: Add these to silence CVS. - - ChangeLog | 9 +++++++++ - TODO | 15 +++++++++++---- - configure.ac | 21 +++++++++++++++++++++ - test/gtk-cairo-test.cc | 6 ++---- - test/gtk-splash-test.cc | 5 ++--- - 5 files changed, 45 insertions(+), 11 deletions(-) - -commit e6706e505c1675724c8870f7c58079932661db5f -Author: Kristian Høgsberg <krh@redhat.com> -Date: Sat Mar 5 02:19:50 2005 +0000 - - 2005-03-04 Kristian Høgsberg <krh@redhat.com> - - * .cvsignore: - * */.cvsignore: Add these to silence CVS. - - .cvsignore | 21 +++++++++++++++++++++ - ChangeLog | 3 +++ - fofi/.cvsignore | 8 ++++++++ - goo/.cvsignore | 8 ++++++++ - poppler/.cvsignore | 10 ++++++++++ - splash/.cvsignore | 8 ++++++++ - test/.cvsignore | 10 ++++++++++ - 7 files changed, 68 insertions(+) - -commit 932edfc3c5c61e3b3e98957b717abbf8055e1c5e -Author: Kristian Høgsberg <krh@redhat.com> -Date: Fri Mar 4 19:47:13 2005 +0000 - - 2005-03-04 Kristian Høgsberg <krh@redhat.com> - - * configure.ac: Implement same check for gtk+-2.0 tests as for - cairo. - - ChangeLog | 5 +++++ - configure.ac | 11 ++++++++--- - 2 files changed, 13 insertions(+), 3 deletions(-) - -commit c632b35ad9345f280d78c268f84ae3fd5a3921b9 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Fri Mar 4 16:33:43 2005 +0000 - - 2005-03-04 Kristian Høgsberg <krh@redhat.com> - - * configure.ac: Only fail hard in check for cairo if the user - specified --enable-cairo-output (from Brad Hards - <bradh@frogmouth.net>). Print summary of configure results - at the - end of configure script. - - * poppler/poppler-config.h: Remove this file (noticed by Brad - Hards <bradh@frogmouth.net>). - - ChangeLog | 5 +++++ - configure.ac | 17 ++++++++++++++--- - 2 files changed, 19 insertions(+), 3 deletions(-) - -commit 80f9c90273eb31ac349c46bf86dedff7daf21db4 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Fri Mar 4 15:32:32 2005 +0000 - - 2005-03-04 Kristian Høgsberg <krh@redhat.com> - - * poppler/poppler-config.h: Remove this file (noticed by Brad - Hards <bradh@frogmouth.net>). - - ChangeLog | 5 ++ - poppler/poppler-config.h | 146 - ----------------------------------------------- - 2 files changed, 5 insertions(+), 146 deletions(-) - -commit 338b83b6f08a7212fdde2bbce94385e9a71a3d23 -Author: Kristian Høgsberg <krh@redhat.com> -Date: Fri Mar 4 02:46:44 2005 +0000 - - 2005-03-03 Kristian Høgsberg <krh@redhat.com> - - Patch from Jeff Muizelaar <jrmuizel@nit.ca>: - - * poppler/CairoOutputDev.cc (CairoOutputDev::drawImage, - CairoOutputDev::drawImageMask): destroy the image surface and - free the image buffer. - - ChangeLog | 10 ++++++++++ - autogen.sh | 2 +- - poppler/CairoOutputDev.cc | 8 +++++--- - 3 files changed, 16 insertions(+), 4 deletions(-) - -commit 062aa51487f539406b54458885b4c9501da3c44d -Author: Kristian Høgsberg <krh@redhat.com> -Date: Thu Mar 3 20:01:14 2005 +0000 - - 2005-03-03 Kristian Høgsberg <krh@redhat.com> - - * autogen.sh: Add to CVS. - - ChangeLog | 4 ++++ - autogen.sh | 4 ++++ - 2 files changed, 8 insertions(+) - -commit cb02d5d0e770e2a8cbe5a8ac810820a2ce5fec0c -Author: Kristian Høgsberg <krh@redhat.com> -Date: Thu Mar 3 19:45:58 2005 +0000 - - Initial revision - - AUTHORS | 3 + - COPYING | 340 ++++ - ChangeLog | 33 + - INSTALL | 236 +++ - Makefile.am | 29 + - NEWS | 4 + - README | 37 + - README-XPDF | 376 ++++ - TODO | 21 + - configure.ac | 139 ++ - fofi/FoFiBase.cc | 156 ++ - fofi/FoFiBase.h | 55 + - fofi/FoFiEncodings.cc | 994 ++++++++++ - fofi/FoFiEncodings.h | 34 + - fofi/FoFiTrueType.cc | 1438 ++++++++++++++ - fofi/FoFiTrueType.h | 131 ++ - fofi/FoFiType1.cc | 207 ++ - fofi/FoFiType1.h | 57 + - fofi/FoFiType1C.cc | 2385 ++++++++++++++++++++++ - fofi/FoFiType1C.h | 224 +++ - fofi/Makefile.am | 16 + - goo/GooHash.cc | 356 ++++ - goo/GooHash.h | 74 + - goo/GooList.cc | 92 + - goo/GooList.h | 89 + - goo/GooMutex.h | 49 + - goo/GooString.cc | 236 +++ - goo/GooString.h | 98 + - goo/Makefile.am | 20 + - goo/gfile.cc | 705 +++++++ - goo/gfile.h | 140 ++ - goo/gmem.c | 204 ++ - goo/gmem.h | 53 + - goo/gmempp.cc | 32 + - goo/gtypes.h | 29 + - poppler-cairo.pc.in | 10 + - poppler-splash.pc.in | 10 + - poppler.pc.in | 11 + - poppler/Annot.cc | 137 ++ - poppler/Annot.h | 79 + - poppler/Array.cc | 73 + - poppler/Array.h | 56 + - poppler/BaseFile.h | 82 + - poppler/BuiltinFont.cc | 65 + - poppler/BuiltinFont.h | 55 + - poppler/BuiltinFontTables.cc | 4284 - ++++++++++++++++++++++++++++++++++++++++ - poppler/BuiltinFontTables.h | 23 + - poppler/CMap.cc | 384 ++++ - poppler/CMap.h | 101 + - poppler/CairoFontEngine.cc | 367 ++++ - poppler/CairoFontEngine.h | 61 + - poppler/CairoOutputDev.cc | 569 ++++++ - poppler/CairoOutputDev.h | 146 ++ - poppler/CairoOutputDevImage.cc | 87 + - poppler/CairoOutputDevImage.h | 43 + - poppler/CairoOutputDevX.cc | 211 ++ - poppler/CairoOutputDevX.h | 117 ++ - poppler/Catalog.cc | 364 ++++ - poppler/Catalog.h | 87 + - poppler/CharCodeToUnicode.cc | 533 +++++ - poppler/CharCodeToUnicode.h | 112 ++ - poppler/CharTypes.h | 24 + - poppler/CompactFontTables.h | 464 +++++ - poppler/Decrypt.cc | 399 ++++ - poppler/Decrypt.h | 59 + - poppler/Dict.cc | 95 + - poppler/Dict.h | 75 + - poppler/Error.cc | 38 + - poppler/Error.h | 21 + - poppler/ErrorCodes.h | 36 + - poppler/FontEncodingTables.cc | 1824 +++++++++++++++++ - poppler/FontEncodingTables.h | 20 + - poppler/Function.cc | 1525 ++++++++++++++ - poppler/Function.h | 181 ++ - poppler/Gfx.cc | 3079 +++++++++++++++++++++++++++++ - poppler/Gfx.h | 279 +++ - poppler/GfxFont.cc | 1508 ++++++++++++++ - poppler/GfxFont.h | 313 +++ - poppler/GfxState.cc | 2782 ++++++++++++++++++++++++++ - poppler/GfxState.h | 1053 ++++++++++ - poppler/GlobalParams.cc | 1764 +++++++++++++++++ - poppler/GlobalParams.h | 312 +++ - poppler/JArithmeticDecoder.cc | 300 +++ - poppler/JArithmeticDecoder.h | 89 + - poppler/JBIG2Stream.cc | 3337 +++++++++++++++++++++++++++++++ - poppler/JBIG2Stream.h | 141 ++ - poppler/JPXStream.cc | 2822 ++++++++++++++++++++++++++ - poppler/JPXStream.h | 338 ++++ - poppler/Lexer.cc | 474 +++++ - poppler/Lexer.h | 75 + - poppler/Link.cc | 851 ++++++++ - poppler/Link.h | 407 ++++ - poppler/Makefile.am | 140 ++ - poppler/NameToCharCode.cc | 116 ++ - poppler/NameToCharCode.h | 40 + - poppler/NameToUnicodeTable.h | 1097 ++++++++++ - poppler/Object.cc | 231 +++ - poppler/Object.h | 301 +++ - poppler/Outline.cc | 151 ++ - poppler/Outline.h | 74 + - poppler/OutputDev.cc | 104 + - poppler/OutputDev.h | 162 ++ - poppler/PDFDoc.cc | 322 +++ - poppler/PDFDoc.h | 176 ++ - poppler/PDFDocEncoding.cc | 44 + - poppler/PDFDocEncoding.h | 16 + - poppler/PSOutputDev.cc | 3803 +++++++++++++++++++++++++++++++++++ - poppler/PSOutputDev.h | 312 +++ - poppler/PSTokenizer.cc | 135 ++ - poppler/PSTokenizer.h | 39 + - poppler/Page.cc | 370 ++++ - poppler/Page.h | 176 ++ - poppler/Parser.cc | 231 +++ - poppler/Parser.h | 58 + - poppler/SplashOutputDev.cc | 1348 +++++++++++++ - poppler/SplashOutputDev.h | 194 ++ - poppler/Stream-CCITT.h | 459 +++++ - poppler/Stream.cc | 3979 - +++++++++++++++++++++++++++++++++++++ - poppler/Stream.h | 841 ++++++++ - poppler/TextOutputDev.cc | 3529 +++++++++++++++++++++++++++++++++ - poppler/TextOutputDev.h | 569 ++++++ - poppler/UTF8.h | 56 + - poppler/UnicodeMap.cc | 293 +++ - poppler/UnicodeMap.h | 122 ++ - poppler/UnicodeMapTables.h | 361 ++++ - poppler/UnicodeTypeTable.cc | 299 +++ - poppler/UnicodeTypeTable.h | 18 + - poppler/XRef.cc | 1026 ++++++++++ - poppler/XRef.h | 133 ++ - poppler/poppler-config.h | 146 ++ - poppler/poppler-config.h.in | 145 ++ - splash/Makefile.am | 52 + - splash/Splash.cc | 1732 ++++++++++++++++ - splash/Splash.h | 174 ++ - splash/SplashBitmap.cc | 157 ++ - splash/SplashBitmap.h | 46 + - splash/SplashClip.cc | 270 +++ - splash/SplashClip.h | 86 + - splash/SplashErrorCodes.h | 30 + - splash/SplashFTFont.cc | 289 +++ - splash/SplashFTFont.h | 53 + - splash/SplashFTFontEngine.cc | 141 ++ - splash/SplashFTFontEngine.h | 58 + - splash/SplashFTFontFile.cc | 111 ++ - splash/SplashFTFontFile.h | 68 + - splash/SplashFont.cc | 166 ++ - splash/SplashFont.h | 87 + - splash/SplashFontEngine.cc | 245 +++ - splash/SplashFontEngine.h | 83 + - splash/SplashFontFile.cc | 55 + - splash/SplashFontFile.h | 58 + - splash/SplashFontFileID.cc | 23 + - splash/SplashFontFileID.h | 28 + - splash/SplashGlyphBitmap.h | 24 + - splash/SplashMath.h | 45 + - splash/SplashPath.cc | 177 ++ - splash/SplashPath.h | 105 + - splash/SplashPattern.cc | 64 + - splash/SplashPattern.h | 79 + - splash/SplashScreen.cc | 107 + - splash/SplashScreen.h | 38 + - splash/SplashState.cc | 99 + - splash/SplashState.h | 86 + - splash/SplashT1Font.cc | 251 +++ - splash/SplashT1Font.h | 49 + - splash/SplashT1FontEngine.cc | 124 ++ - splash/SplashT1FontEngine.h | 51 + - splash/SplashT1FontFile.cc | 96 + - splash/SplashT1FontFile.h | 55 + - splash/SplashTypes.h | 80 + - splash/SplashXPath.cc | 417 ++++ - splash/SplashXPath.h | 90 + - splash/SplashXPathScanner.cc | 271 +++ - splash/SplashXPathScanner.h | 72 + - test/Makefile.am | 48 + - test/gtk-cairo-test.cc | 298 +++ - test/gtk-splash-test.cc | 314 +++ - 177 files changed, 70512 insertions(+) diff --git a/Build/source/libs/poppler/poppler-src/ConfigureChecks.cmake b/Build/source/libs/poppler/poppler-src/ConfigureChecks.cmake deleted file mode 100644 index 21bad506d68..00000000000 --- a/Build/source/libs/poppler/poppler-src/ConfigureChecks.cmake +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright 2008 Pino Toscano, <pino@kde.org> -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -include(CheckIncludeFile) -include(CheckIncludeFiles) -include(CheckSymbolExists) -include(CheckFunctionExists) -include(CheckLibraryExists) -include(CheckTypeSize) -include(CheckCSourceCompiles) - -check_include_files(dlfcn.h HAVE_DLFCN_H) -check_include_files(fcntl.h HAVE_FCNTL_H) -check_include_files(stdlib.h HAVE_STDLIB_H) -check_include_files(sys/mman.h HAVE_SYS_MMAN_H) -check_include_files(sys/stat.h HAVE_SYS_STAT_H) -check_include_files(unistd.h HAVE_UNISTD_H) - -check_function_exists(fseek64 HAVE_FSEEK64) -check_function_exists(fseeko HAVE_FSEEKO) -check_function_exists(ftell64 HAVE_FTELL64) -check_function_exists(pread64 HAVE_PREAD64) -check_function_exists(lseek64 HAVE_LSEEK64) -check_function_exists(gmtime_r HAVE_GMTIME_R) -check_function_exists(timegm HAVE_TIMEGM) -check_function_exists(gettimeofday HAVE_GETTIMEOFDAY) -check_function_exists(localtime_r HAVE_LOCALTIME_R) -check_function_exists(popen HAVE_POPEN) -check_function_exists(mkstemp HAVE_MKSTEMP) -check_function_exists(rand_r HAVE_RAND_R) -check_function_exists(strcpy_s HAVE_STRCPY_S) -check_function_exists(strcat_s HAVE_STRCAT_S) -check_function_exists(strtok_r HAVE_STRTOK_R) - -macro(CHECK_FOR_DIR include var) - check_c_source_compiles( - "#include <${include}> - -int main(int argc, char *argv[]) -{ - DIR* d = 0; - return 0; -} -" ${var}) -endmacro(CHECK_FOR_DIR) -check_for_dir("dirent.h" HAVE_DIRENT_H) -check_for_dir("ndir.h" HAVE_NDIR_H) -check_for_dir("sys/dir.h" HAVE_SYS_DIR_H) -check_for_dir("sys/ndir.h" HAVE_SYS_NDIR_H) - -check_function_exists("nanosleep" HAVE_NANOSLEEP) -if(NOT HAVE_NANOSLEEP) - check_library_exists("rt" "nanosleep" "" LIB_RT_HAS_NANOSLEEP) -endif(NOT HAVE_NANOSLEEP) diff --git a/Build/source/libs/poppler/poppler-src/INSTALL b/Build/source/libs/poppler/poppler-src/INSTALL deleted file mode 100644 index a38a8c009a5..00000000000 --- a/Build/source/libs/poppler/poppler-src/INSTALL +++ /dev/null @@ -1,104 +0,0 @@ -Installation Instructions -************************* - -Basic Installation -================== - -mkdir build -cd build -cmake .. -make -make install - - -CMake configuration options can be set using the -D option. eg - - cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=release - - -Build Options -============= - -Set install prefix: - - -DCMAKE_INSTALL_PREFIX=<path> - -Set build type. This sets the standard compiler flags for the build -type. - - -DCMAKE_BUILD_TYPE=debug or -DCMAKE_BUILD_TYPE=release - -Set compiler flags: - - -DCMAKE_CXX_FLAGS=<flags> or set CXXFLAGS environment variable - -Set linker flags: - - -DCMAKE_LD_FLAGS=<flags> or set LDFLAGS environment variable - - -Optional Features -================= - - -D<FEATURE>=<ON|OFF> - -eg - - -DENABLE_SPLASH=ON -DBUILD_GTK_TESTS=OFF - -A list of all options can be display with the commmand: - - egrep '^ *(option|set.*STRING)' CMakeLists.txt - -Alternatively, the options can be edited by running "ccmake ." in the -build directory. - - -Cross Compiling -=============== - -A toolchain file is required to specify the target specific compiler -tools. Run cmake with the option: - - -DCMAKE_TOOLCHAIN_FILE=<Toolchain file> - -A sample toolchain for a 64-bit mingw build is shown below. Replace -/path/to/win/root with the install prefix for the target environment. - - set(CMAKE_SYSTEM_NAME Windows) - set(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc) - set(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++) - set(CMAKE_RC_COMPILER x86_64-w64-mingw32-windres) - set(CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32 /path/to/win/root ) - set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) - set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) - set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) - - -Debugging Options -================= - -Debug Build Types ------------------ -Release build with debugging information: - -DCMAKE_BUILD_TYPE=relwithdebinfo - -Debug build with optimization except for some code re-ordering optimizations: - -DCMAKE_BUILD_TYPE=debug - -Debug build with no optimization: - -DCMAKE_BUILD_TYPE=debugfull - -Release build with debugging and profiling information: - -DCMAKE_BUILD_TYPE=profile - - -Address Sanitizer ------------------ -Ensure the extra cmake modules are available (may be a separate -package) then use -DECM_ENABLE_SANITIZERS to specify the santizers. eg - - -DECM_ENABLE_SANITIZERS='address;leak;undefined' - -Some options may only be available with clang. Use --DCMAKE_CXX_COMPILER=clang++ to build with clang. diff --git a/Build/source/libs/poppler/poppler-src/NEWS b/Build/source/libs/poppler/poppler-src/NEWS deleted file mode 100644 index 485f89ea57a..00000000000 --- a/Build/source/libs/poppler/poppler-src/NEWS +++ /dev/null @@ -1,3039 +0,0 @@ -Release 0.68.0 - core: - * Add Reason and Location to SignatureInfo. Bug #107299 - * Fix memory misuse on signature handling - * Fix security issues found by oss-fuzz - * Don't give a warning when Marked value is false. Bug #107430 - - qt5: - * Add Reason and Location to SignatureInfo. Bug #107299 - - cpp: - * Add rotation() to text_box. Bug #106562 - * Fix build with MSVC - - utils: - * pdftoppm: Add -jpegopt optimize option support - * pdftocairo: Add -jpegopt optimize option support - * pdftohtml: Add option to not round coordinates - * pdftohtml: Fix possible crash. Bug #107316 - - build system: - * Use OpenJpeg cmake config file instead of pkgconfig - * Remove wchar_t- on MSVC - - -Release 0.67.0 - core: - * Fix lots of security/leak issues found by oss-fuzz - * Splash: Optimize some files, making them 20% faster (now for AABGR8) - - utils: - * pdfsig: Compile with libc != glibc. Bug #106783 - -Release 0.66.0 - core: - * Fix lots of security/leak issues found by oss-fuzz - * Splash: Optimize some files, making them 20% faster - * Splash: Correctly manipulate spot colors if SPOT_NCOMPS != 4 - * Fix compilation with some strict compilers - -Release 0.65.0 - core: - * SplashOutputDev: Add the invisible character check beginType3Char. Bug #106244 - * XRef: Fix runtime undefined behaviour. Bug #105970 - * Fix issues with malformed documents. Bug #104942, #103238 - * Remove GooHash after replacing it by std::unordered_map - * Add conversion methods between GooString and std::string. - - cpp: - * Add newline after error message - * Expose more image modes, add option to select mode in renderer. Bug #105558 - - build system: - * Fix compilation with libc++ - * Small improvement to FindLIBOPENJPEG2.cmake - - qt5: - * Add widget annot actions to FormFields - - utils: - * pdffonts: Minor formatting changes in the man page. Bug #105194 - -Release 0.64.0 - core: - * Workaround form field text not being drawn on broken files. Bug #103245 - * Add read only setter for form fields - * Add support for Link Hide action - * Add support for Next actions in Links - * Fix parsing of Annot focus out actions - * Fix PDFDoc::checkHeader() for PDFs smaller than 1 KiB. Bug #105674 - * Add const to several classes and members - * gfile: Fix build on some platforms - * Fix issues with on malformed documents. Bug #105972, #105969, #106059, #106061 - * Several small code improvements - - qt5: - * Allow setting of Form visibility status - * Allow setting of Form read only status - * Add support for Link Hide action - * Add support for Next actions in Links - * ArthurOutputDev: Implement axialShadedFill - * ArthurOutputDev: Implement drawImageMask. Bug #105531 - * ArthurOutputDev: Implement Type3 font support - - utils: - * pdfsig: Add -dump which writes signatures to disk. Bug #104881 - - glib: - * less deprecated calls - - build system: - * bring back the option to disable GObject introspection - * Add iconv include dir when compiling - * Make it possible to build poppler without fontconfig. Default for Android - -Release 0.63.0 - core: - * CairoOutputDev: support embedding CCITT image data. Bug #103399 - * CairoOutputDev: limit image size when printing. Bug #103399 - * CairoOutputDev: use GOOD instead of BEST as the default cairo filter for scaling. Bug #103136 - * Error out on save if file has changed since we opened it. Bug #103793 - * PDFDoc: use %c instead of \x to output binary. Bug #103873 - * Fix index out of bounds undefined behaviour in PSTokenizer. Bug #103583 - * Fix opening files with OutlineItem loops. Bug #102914 - * Fix some bugs in StructTreeRoot parsing of parent tree. Bug #103912 - * Remove error for wrong child type for tagged pdf. Bug #103587 - * FoFiTrueType::readPostTable() from xpdf 4.00. Bug #102880 - * GfxFontDict: merge reference generation from xpdf 4.00. Bug #104565 - * Reset lastAbortCheck on updateLevel reset - * PDFDoc::setup: Fail early if base stream length is 0. Bug #103552 - * Check curStr is actually a Stream before doing Stream operations. Bug #104518 - * Fix new Object API porting bug. Bug #104517 - * Check return code of getChar(), abort reading on error. Bug #104502 - * TextPage: Add horizontal scaling to font matrix. Bug #105259 - * Fix EmbedStream replay. Bug #103446 - * Fix memory leak on error condition - * Fix assert on malformed documents. Bug #104354 - * Fix abort in Gfx::opBeginMarkedContent if args[1] is not a name. Bug #104468 - * GfxGouraudTriangleShading::parse: Don't abort on malformed documents. Bug #104567 - * GfxFunctionShading::parse: Fix abort in malformed document. Bug #104581 - * Remove the extern C from glib.h. Bug #103621 - * Don't let ArthurOutputDev be friend of SplashPath anymore - * Fix undefined sanitizer warning about qsort - * Form.h: include time.h for time_t - * Various code improvements - - qt5: - * Add cancellation support to renderToImage and textList - * Do not assume all Screen annotation actions are Renditions. KDE bug #388175 - * qt5: Implement operator= for PageTransition - * ArthurOutputDev: 'clip' should intersect new and old clipping path - * ArthurOutputDev: Implement updateBlendMode - * ArthurOutputDev: Replace the QPainter by a stack of QPainters - * ArthurOutputDev: Rudimentary support for transparency groups - * Remove stale libcms1 code. Bug #104358 - * demo: don't crash if page is malformed - * Fix warnings due to the use of deprecated overloads of Poppler::Page::Search in tests. - - utils: - * pdfimages: Fix for files with flate encoded inline images. Bug #103446 - * pdftocairo: Remove stale libcms1 code. Bug #104358 - * pdfimages: Fix build without libtiff and libpng - * pdfseparate: Fix buffer size warning due to missing space for null terminator - - build system: - * Enable building all libs as static libs - * Enable no-missing-field-initializers - * Remove unused FindLIBOPENJPEG.cmake - * add "--owner root:0 --group root:0" options to tar command in dist target. Bug #104398 - * Add python3 support to gtkdoc.py - * gtkdoc.py: Make it work with newer gtk-doc. Bug #105075 - - cpp: - * Add page::text_list - -Release 0.62.0 - core: - * Stop supporting lcms1, you really want to use lcms2 :) - * Stop supporting openjpeg1, you really want to use openjpeg2 :) - * Open files that state 8 bits as third field of W. Bug #103469 - * GfxLabColorSpace::parse: Fix crash in broken documents. Bug #103582 - * Fix leak if parseDA fails - * Include glibc.h where needed - * Document the meaning of the 'type' integer of a shading - * Fix UTF test fail - * INSTALL: add debug options - - qt5: - * Add API to let the rendering process callback to get a partial rendering. Bug #103372 - - qt4: - * Remove the Qt4 frontend - - utils: - * Support unicode on windows console - * pdfsig: install man page - * sort encoding list - - glib: - * demo: fix warning - -Release 0.61.1 - core: - * CairoOutputDev: don't overflow y * stride when accessing image data - - cpp: - * Fix for corrupted image files on Windows. Bug #102494 - - build system: - * Fix incorrect paths in .pc files. Bug #103578 - * add the custom buildtests target only once. Bug #103003 - -Release 0.61.0 - core: - * Fix crashes in broken files - * Cleanup unused functions from GlobalParams - * Tweak LZWStream::processNextCode error handling. Bug #103174 - * Warning fixes - * Remove t1lib code - - qt5: - * Clean up the remaining Splash code in Arthur backend. Bug #103117 - * ArthurOutputDev: Properly implement saveState/restoreState. Bug #103118 - * Fix leak in ArthurOutputDev::updateFont. Bug #103508 - - build system: - * Use GNUInstallDirs. Bug #103211 - * mingw: Install pkg-config files - * mingw: change library names to include the soversion. Bug #103157 - * Fix installing a .cc file as header - * Use -pthread flag instead of -lpthread - -Release 0.60.1 - qt5: - * ArthurOutputDev: Add missing 'return' in error paths - - build system: - * FindLIBOPENJPEG.cmake: Add CheckCXXSourceCompiles - -Release 0.60.0 - core: - * Enable libcurl support by default - * PSOutputDev: Fix wrong text generation. Bug #102760 - * Added methods to get and set the font size of text fields. Bug #101692 - * CairoOutputDev: Do not extend the pattern in drawImageMaskRegular - * CairoOutputDev: do not use the custom downscaling for rendering images when using cairo >= 1.14 - * Fix build with old clang - * Fix various crashes in broken files - * Fix some warnings - * Add some constness to the basic classes - * Remove unused functions from GlobalParams - - qt5: - * Added methods to get and set the font size of text fields. Bug #101692 - * Add whether renderToImage shows annotations - * ArthurOutputDev: Replace Splash font rendering by Qt font rendering - * ArthurOutputDev: Implement the drawSoftMaskedImage method - * ArthurOutputDev: Fix several small bugs related to dash pattern handling - * Fix two minor typos - - build system: - * cmake is now the default build system - * autotools based build system has been removed - - utils: - * pdfinfo: don't truncate dest name - -Release 0.59.0 - core: - * Fix infinite recursion in NameTree parsing in broken files - - utils: - * pdfunite: Fix API porting error that caused abort in some cases - * pdfinfo: Fix crashes and memory leaks when using -dests - * pdfinfo: use GooString.append instead of sprintf/strcat - * pdfimages: Fix warning when compiling with cygwin - - build system: - * Fix cygwin 32-bit compile - * cmake tweaks - - -Release 0.58.0 - core: - * CairoOutputDev: cairo 1.14 now has high quality downscaling - * Signature related improvements. Bug #99271 - * Tweak which cmap we use. Bug #101855 - * Memory leak fixes - * Substantial rework of the internals - * win32: call ANSI functions directly. Bug #100312 - * Add some documentation - - qt5: - * Expose signature information. - * ArthurOutputDev: initialize the image with the paper color. Bug #102129 - * Fix copy'n'paste bugs: Qt4 -> Qt5 - * ArthurOutputDev: Properly set the QPainter transformation - * ArthurOutputDev: Use Qt::SvgMiterJoin instead of Qt::MiterJoin. Bug #102356 - - utils: - * pdfinfo: add -dests option to print named destinations. Bug #97262 - * pdftocairo: add -jpegopt for setting jpeg compression parameters. Bug #45727 - * pdftoppm: add -jpegopt for setting jpeg compression parameters. Bug #45727 - * pdfimages: support listing/extracting inline images. Bug #25625 - - build system: - * cmake: Various Windows fixes - * cmake: Use -std=c++11 instead of -std=gnu++11 - - cpp: - * Fix page.text() not taking page orientation into account. Bug #94517 - -Release 0.57.0 - core: - * Fix parsing of Type 1 fonts with newlines in encoding sequences. Bug #101728 - * Fix crash in broken documents - - utils: - * pdfunite: Fix crash with broken documents. Bug #101208 - * pdftohtml: skip control characters Bug #101770 - * pdfseparate: minor improvement to the documentation. Bug #101800 - - build system: - * cmake: Set RUNPATH for poppler shared libs. Bug #101945 - * configure: fix --disable-FEATURE actually enabling the feature - -Release 0.56.0 - core: - * FormFieldButton::setState() shouldn't check the field is readOnly - * Fix crashes on multiple broken files - - utils: - * pdfunite: Fix crash with broken documents. Bugs #101153 #101149 - -Release 0.55.0 - core: - * Fix abort in files with broken Decode arrays. KDE bug #379835 - * Fix memory leak (and probably logic bug) parsing broken XRef entries. Bug #100775 - * Fix memory leak when reconstructing broken files. Bug #100776 - * Minor optimization - * Fix regression in GfxIndexedColorSpace::mapColorToBase. Bug #100931 - * Fix memory leak in error condition - - cpp: - * Return nullptr if the page at index can't be fetched. Bug #100981 - - build system: - * Fail by default if libjpeg is not available - * Fail by default if libopenjpeg2/1 is not available - -Release 0.54.0 - core: - * Make XRef reconstruction a bit better. Bug #100509 - - glib: - * Expose movie play mode. Bug #99625 - * demo: Show play mode in movie properties view - - qt5: - * Compile with -DQT_NO_CAST_FROM_BYTEARRAY. Bug #100311 - - utils: - * pdfimages: don't fail listing if inline image data contains 'EI'. Bug #100737 - -Release 0.53.0 - core: - * Form support improvements - * SplashOutputDev: Fix memory leak when rendering images with colormap and matte color - * Minor fix in GlobalParams documentation - - qt5: - * Expose form calculate order - * Expose Form additional actions - - utils: - * pdfimages: support 16bpc png and tiff images. Bug #99988 - * pdftohtml: fix small memory leak when constructing some filenames - * pdfinfo: fix leak when printing JS - - build sytem: - * Compile in C++11 mode - -Release 0.52.0 - core: - * Fix assert on reading some OCGs. Bug #99768 - * Properly initialize some RichMedia variables in corner cases. Bug #99767 - - qt4: - * optcontent structure was leaking the headers items. Bug #99449 - * Cleanup objects in tests to fix memory leaks. Bug #99449 - - qt5: - * optcontent structure was leaking the headers items. Bug #99449 - * Cleanup objects in tests to fix memory leaks. Bug #99449 - - utils: - * pdftocairo.1: Fix typo - -Release 0.51.0 - core: - * Check for error from NSS in SignatureHandler construct. Bug #99363 - * Add Form[Field|Widget]::setPartialName - * Fix memory leak in PDFDoc::markAnnotations - - qt5: - * Implement digital signature support. Bug #94378 - * Add Poppler::FormField::setName - * Fix segfault/assert if LinkDestination is constructed with invalid input string. Bug #99357 - - utils: - * pdfunite: add fields to AcroForm dict. Bug #99141 - -Release 0.50.0 - core: - * PSOutputDev: Fix PS conversion for some files. Bug #63963 - * Fix Outline parsing on broken documents. Bug #98732 - * Fix PDFDoc::saveIncrementalUpdate()'s detection of document being modified. Bug #96561 - * SplashOutputDev: Read softmask into memstrean in case of matte. Bug #97803 - * Bail out if Hints nBitsNumObjects or nBitsDiffGroupLength are greater than 32. Bug #94941 - * CairoOutputDev: initialize CairoOutputDev::antialias. Bug #98983 - * Fix crash when loading some thumbnails. Bug #97870 - - utils: - * pdftoppm: Fix -tiff -gray/-mono incorrect output. - * pdftops: add -passlevel1customcolor. Bug #97193 - - - build system: - * Default to libopenjpeg2 instead of libopenjpeg1 - - qt: - * Support OCG state change links - - glib: - * Use g_slice_new0 for PopplerActionLayer. Bug #98786 - -Release 0.49.0 - core: - * Merge type3 glyph handling from xpdf 3.04. Bug #96667 - * Continue rendering in case of 'Singular matrix in shading pattern fill. Bug #98623 - * Fix memory leak in parametrized gouraudTriangleShadedFill - * Fix crash on broken files - * PDFDoc::setDocInfoStringEntry(): treat value consisting of just the unicode marker as an empty string - * Fix UBSAN warning - * Misc compile fixes - - utils: - * pdfseparate: remove extra '%' in error message - - build system: - * configure: Fix typo in disable nss help string - -Release 0.48.0 - core: - * Fix crashes and memory leaks in invalid files. - * Small memory usage improvements. - * TextOutputDev: Remove null characters from PDF text. Bug #97144 - * TextOutputDev: Break words on all whitespace characters. Bug #97399 - * Fix UTF16 decoding of document outline title. Bug #97156 - * Add functions for named destination name in name-tree/dict - - glib: - * Increase glib requirement to 2.41 - -Release 0.47.0 - core: - * Fix abort on documents where the docinfo obj is not a dict. Bug #97134 - * Check for XRefEntry existing before using it. Bug #97005 - * Fix memory leak on PDFDoc::setDocInfoStringEntry() with empty string - * Don't presume that DocInfo is a dictionary in XRef::createDocInfoIfNoneExists() - - build system: - * configure: Work with non gnu greps - -Release 0.46.0 - core: - * cairo: fix bug in setAntialias() - * cairo: Fix tiling patterns with BBox with non-zero x,y - * cairo: try finding glyphs in substitute fonts by unicode value. Bug #96994 - * Added XRef modification flag - * Added DocInfo setters & getters - * Be less strict when parsing FitH Link destinations. Bug #96661 - - utils: - * pdftocairo: revert the use of groups for blending into white page - * pdftocairo: Use fprintf for printing errors - * pdfinfo: Don't print pdf info when printing metadata, javascript, or structure. Bug #96801 - - glib: - * Added document property setters & simplified getters - * make document metatag gobject properties writeable - - cpp: - * pass len to GooString constructor in detail::ustring_to_unicode_GooString(). Bug #96426 - * Added functions to save a document - * Added document property setters & getters - - qt4: - * Added document property setters & simplified getters - - qt5: - * Added document property setters & simplified getters - - build system: - * configure: Don't use -fPIC on cygwin - * configure: Work with non gnu greps - -Release 0.45.0 - core: - * SplashOutputDev: Fix iccTransform + splashModeXBGR8 - * Fix memory leaks - * Fix crash in broken files. Bug #95567. Bug #96027 - * Emulate some non portable glibc functions when not available - - utils: - * pdftohtml: Fix crash in broken files. Bug #95563 - * pdfinfo: convert dates to local time zone - * pdfinfo: add -isodates for printing dates in ISO-8601 format - * pdfinfo: Fix memory leaks - - glib: - * return date in UTC instead of local time. Bug #94173 - - cpp: - * switched from detail::convert_date() to core's dateStringToTime() - -Release 0.44.0 - core: - * Fix Compile in 32bit linux. Bug #95492 - * Splash: type 3 chars. restore the current position also in output device. Bug #95344 - * Splash: Improve rendering of some dotted lines. Bug #84693 - * Refactor GooString::Set(). Bug #94201 - * Fix typo in GfxPatchMeshShading::parse - * Fix memory leak in PSOutputDev::filterPSLabel - * Fix memory leak in SignatureHandler::getDefaultFirefoxCertDB_Linux - * Fix potential crash in SplashOutputDev::doUpdateFont - * Fix potential crash in TextPage::coalesce - * Remove call that does nothing - - utils: - * pdftocairo: add -antialias option. Bug #94977 - -Release 0.43.0 - core: - * Implement sanity check for linearization usage. Bug #92482 - * Add SymbolMT as an alias for the Symbol font. Bug #93168 - * Fix some blank files. Bug #94756 - * cairo: fix fillToStrokePathClip crash and rendering. Bug #62905 - * cairo: Check if PDF knows the width of 'm' in case of substituted font. Bug #94054 - * cairo: save mask state and don't extend image mask. bug #94234 - * SplashOuputDev: Compile with C++11 compilers that don't define isinfinite. Bug #94761 - * typo fixes - - utils: - * pdftocairo: Calculate rotation before scaling. Bug #94655 - - qt4: - * Fix crash on certain PDF form item activation actions. Bug #94873 - - qt5: - * Fix crash on certain PDF form item activation actions. Bug #94873 - -Release 0.42.0 - core: - * Add the support for version 5 + revision 6 documents. Bug #85368 - * Add initial support for Signature handling - * Initialize gamut mapping multipliers in ::copy() functions. Bug #90697 - * Implement jpx streams support with depth < 8 - * Handle SMaskInData = 0 for JPX encoded images. Bug #93468 - * Fix rendering of some broken PDF files. Bug #92508 - * PSOutputDev: Support for LZW encoding - * PSOutputDev: Add support for Flate compression in Level 3 output. - * SplashOuputDev: Implement function shading. Bug #94441 - * SplashOuputDev: Improve rendering of some non embedded fonts. Bug #94054 - * SplashOuputDev: Fall back to Gfx implementation of tiling pattern if repetition rate is small. Bug #90596 - * SplashOuputDev: Implementation of Matte entries in softmasks of softmasked images. Bug #22473 - * SplashOuputDev: assure line width > 0 in case of text stroke. Bug #94038 - * TextOuputDev: Cache result of inner loop in visitDepthFirst. Bug #77087 - * Avoid attempting a tiling pattern fill with a singular transform matrix - - utils: - * pdfinfo: Add option to show document structure - * pdfsig: New command that gives information about signature - - qt4: - * Fix bug in links to remote documents getting the page number wrong sometimes - - qt5: - * Fix bug in links to remote documents getting the page number wrong sometimes - -Release 0.41.0 - core: - * CairoOutputDev: add missing font types (fontCIDType0COT and fontTrueTypeOT). Bug #93559 - * SplashOutputDev: Adjust limit check and check in addition bitmap pointer. Bug #94053 - - utils: - * pdfseparate: Refine resource detection - * pdfinfo: fix man page - -Release 0.40.0 - core: - * CairoOutputDev: Use shape mask with soft mask. Bug #91931 - * TextOutputDev: Handle right-to-left text in search - * TextOutputDev: Fix finding Arabic Presentation Forms ligatures - * Fix crash in invalid file. Bug #93476 - * Regression test improvements - - utils: - * pdftocairo: fix writing to stdout out with image output - * pdftocairo: document that -singlefile appends file type. Bug #86254 - * pdftocairo: ensure surface flushed before accessing image data - * pdftocairo: check for invalid use of options. Bug #92195 - * pdfunite: Fix typo in manual - - build system: - * Improve cmake build system - -Release 0.39.0 - core: - * Ignore the alternateSpace and tintTransform. Bug #92381 - * CairoOutputDev: Scale radial pattern. Bug #22098 - * CairoOutputDev: Implement function shading using mesh gradients. Bug #88394 - * Regression test improvements - * Fix typos in error messages - - build system: - * Visual Studio 2015 now supports snprintf. Bug #93116 - - utils: - * pdftops: fix %%PageBoundingBox. Bug #87161 - * pdftocairo: Fix double free when both user and owner passwords are given - - glib: - * Add duration_real to PopplerPageTransition. Bug #92040 - * Remove enum PopplerOrientation from API. Bug #93229 - * documentation improvements - * glib-demo improvements - -Release 0.38.0 - core: - * Splash: Multiply opacity in case of pattern colorspace. Bug #92592 - * Small form improvements on non ascii character rendering - * Clarify README - - build system: - * Clarify internal DCT and JPX are only provided as deprecated fallbacks - - utils: - * pdftocairo: fix fit to page transformation - -Release 0.37.0 - core: - * CairoOutputDev: Use mask for even-odd fill. Bug #84527 - * SplashOuputDev: Protect calls to set/getAA with the proper #if guards. Bug #92006 - * SplashOuputDev: Try to use an external font if the internal one is invalid - * PageTransition D is a number not an int. Bug #92040 - * Catalog::getNumPages(): validate page count - * Catalog::cachePageTree(): recover from out of memory condition - * Fix crashes in malformed documents - - build system: - * configure: fix openjpeg detection - -Release 0.36.0 - core: - * Patch to support RichMedia annotations - * Splash: Fix wrong memory access. Bug #91686 - * Cairo: fix size of transparency group surface. Bug #66229 - * Fix bounds check in Linearization::getPageFirst. Bug #91200 - * File Saving improvements - * Add premultiplied alpha channel to SplashBitmap - * Fix for xref table creation. Bug #90790 - * Fix JBIG2Decode infinite loop and stack overflow. Bug #91186 - * Minor optimization in text extraction - - qt4: - * Basic support for RichMedia annotations - * Change default image format - * Minor optimizations - - qt5: - * Basic support for RichMedia annotations - * Change default image format - * Minor optimizations - - cpp: - * Fix utf8/utf16 conversion. Bug #91644 - - build system: - * Do not hardcode -fPIC in Makefile.am - * cmake: Allow configuring SHARE_INSTALL_DIR. Bug #90293 - - utils: - * pdfunite: Insert embedded files in result pdf. Bug #90066 - * pdftotext: Add -bbox-layout option. Bug #89941 - -Release 0.35.0 - core: - * Fix assert in broken file. Bug #91344 - * Adjust memory layout computation of GooString - * Make SplashBitmap XBGR transfer alpha channel - * Splash: Fix wrong writes on non rgb outputs. Bug #90570 - * Splash: remove ifndef in Windows code - * GlobalParamsWin bugfixes. Bug #91053 - - qt4: - * Switch default image format - * Add IgnorePaperColor render flag - - qt5: - * Improve efficiency of Poppler::Page::renderToImage - * Switch default image format - * Add IgnorePaperColor render flag - - build system: - * Allow configuring SPLASH_CMYK support - * Add configure --enable-build-type. Bug #90796 - - glib: - * Explicitly link against pthread - * Deprecation fixes - - utils: - * pdftocairo: Fix cast to pointer from integer of different size on win64 - -Release 0.34.0 - core: - * Splash: Fix crash in PDF with nested softmasks. Bug #91240 - * Splash: Speed up of rendering icc based images. Bug #90171 - * PSOutputDev: Embed Type1 fonts to PostScript files correctly. Bug #19747 - * Fix pedantic memory leak - - glib: - * update new symbols section - - build system: - * cmake: Make sure ENABLE_LIBOPENJPEG is either 0 or 1 - -Release 0.33.0 - core: - * Fix regression in pdftops parameter passing. Bug #89827 - * Combine base characters and diacritical marks. Bug #87215 - * Use width from W array for WMode positioning. Bug #89621 - * Fixed adding annotation of Subtype Popup to pdf page. Bug #89136 - * CairoOutputDev: Fix memory leak in CairoFreeTypeFont::create - * SplashOutputDev: memset on error to have reproducible outputs - - qt4: - * Fix PDF Text String -> QString conversion. KDE Bug #344849 - - qt5: - * Fix PDF Text String -> QString conversion. KDE Bug #344849 - - glib: - * Add poppler_annot_markup_set_popup_rectangle() - * Fix segfault when creating PopplerAction. Bug #90093 - - utils: - * pdftohtml: Set exit status adecuately. Bug #83609 - - build system: - * configure: Fix invalid shell comparaison in libtiff test - -Release 0.32.0 - core: - * Annotations: Fix rendering of empty BG/BC arrays - * Splash: Fix wrong colour shown when GouraudTriangleShFill uses a DeviceN colorspace. Bug #89182 - * Splash: Fix use of uninitialized variable in Splash::pipeRun - * Remove unnecesary check for font validity. Bug #88939 - * Small optimization in GooString::appendfv(). Bug #89096 - * Fix crashes in malformed files - - utils: - * pdftops: Make colorpsace optimization an option instead of default - * pdfseparate: use always an unique instance for PDFDoc for savePageAs - - build system: - * cmake: If extra-cmake-modules is around include the Sanitizers module - -Release 0.31.0 - core: - * CairoOutputDev: support embedding JBIG2 image data - * Accept malformed documents whose root is a Page instead of a Pages. Bug #88172 - * Fix crash on broken documents - * JPEG2000Stream: Inline doGetChar and doLookChar - * GlobalParams cleaning - - utils: - * pdftops: Add rasterization option. Bug #85934 - - qt4: - * Expose whole-words search option - - qt5: - * Expose whole-words search option - -Release 0.30.0 - core: - * Openjpeg2 support (openjpeg 1 is preferred). Bug #58906 - * Fix potential memory corruption on TextSelectionDumper. Bug #84555 - * Check for invalid matrix in annotation. Bug #84990 - * Open some not conforming files. Bug #85919 - * PSOutputDev: Accept a list of pages indeces instead of first, last. Bug #84833 - * Fix memory leak on error condition - - cpp: - * New API to set debug output function - - build system: - * configure: Improve support with older clang versions. Bug #76963 - - utils: - * pdfunite: Support output intents, optional content and acroform - -Release 0.29.0 - core: - * Use correct LAB byte array for lcms input. Bug #86388 - * Write correct size in trailer dict. Bug #86063 - * Use Default colorspaces if present instead of Device colorspaces - * Solve blend mode problem in CYMK and DeviceN for separable blend modes - * Compilation/warning fixes on SunOS - * Regression test improvements - - glib: - * demo: Compilation fixlets - - build system: - * cofigure: print "no" instead of "auto" if lcms not found - -Release 0.28.0 - core: - * Fix rendering of file with a wrong embedded font. Bug #84270 - * Use alt colorspace to get CMYK values for an ICC based CMYK colorspace. Bug #79019 - * Map Standard/Expert encoding ligatures to AGLFN names. Bug #80093 - * Make Attribute::getName() work when UTF-16BE is used. Bug #84722 - * Fix memory leak in Dict::remove. Bug #84607 - * Fix crashes in broken files - * SplashOutputDev: Improve Overprintmode and shadings. Bug #80998 - * CairoOutputDev: fix crash when no group color space. Bug #85137 - * CairoOutputDev: Don't render text when text matrix is not invertable. Bug #78042 - * CairoOutputDev: Only embed mime data for gray/rgb/cmyk colorspaces. Bug #80719 - * CairoOutputDev: Only embed mime data if image decode map is identity - * cairo: Use matrix to determine pattern size. Bug #33364 - * Fix compile warnings - * regression test improvements - - glib: - * Fix use of uninitialized members in PopplerInputStream. Bug #82630 - * Documentation improvements - * Do not dist gir_DATA - * Remove use of GTK deprecated functions. Bug #82384. Bug #82385 - * Build introspection linking to the uninstalled libraries. Big #84526 - - qt4: - * Add a new Page::annotations() that let's you specify subtypes - - qt5: - * Add a new Page::annotations() that let's you specify subtypes - - utils: - * pdfseparate: additonal handling for annotations. Bug #77549 - * pdfdetach: fix crash when getPage() returns null. Bug #85145 - * pdftocairo: Add support for printing to a Windows printer. Bug #79936 - - build system: - * Move automake version check from autogen.sh to configure.ac. Bug #79797 - * Makefile.am cleanups. Bug #79411 - * Use poppler-data pkg-config - * Make autogen.sh work with variables with spaces - * Don't use -fPIC on mingw - * Fix build with --disable-utils. Bug #84448 - -Release 0.26.4 - core: - * CairoOutputDev: Make sure we always push a transparency group in setSoftMaskFromImageMask(). Bug #81624 - * Fix a crash when adding Annotation without contents - * Improve non-latin characters in inline notes. Bug #65956 - * Don't check for inlineImg twice. Bug #82059 - * printf() -> error() - - glib: - * Return NULL in poppler_annot_get_contents also for empty strings - * Fix a memory leak when getting text layout and attributes - -Release 0.26.3 - qt5: - * autoconf: Improve moc-qt5 detection - * Fix compilation with MinGW - - glib: - * Fix typo in api docs - * use C90-style comments in public headers - - core: - * Error out instead of exiting if allInter grows too much. Bug #78714 - - qt4: - * Update required version to Qt 4.7.0 - - build system: - * Include stdio.h from poppler-config.h - - misc: - * Update .gitignore files - -Release 0.26.2 - core: - * Make sure we have an xref before using. KDE Bug #335413 - - build system: - * autoconf: Fix typo in configure.ac - - utils: - * pdftohtml: exit with 0 with -v and -h - -Release 0.26.1 - core: - * Use field value V for radio buttons. Bug #75979 - * Fix extraction of text in some files. Bug #78145 - * Only add annotations of the current page when splitting. Bug #77549 - - build system: - * autoconf: Fix libopenjpeg 1.5 detection on some systems. Bug #78389 - - glib: - * Fix multiple definition of PopplerTextSpan - -Release 0.26.0 - qt4: - * Fix mismatched boolean logic in TextAnnotation::setInplaceIntent - - qt5: - * Fix mismatched boolean logic in TextAnnotation::setInplaceIntent - - core: - * Very small code cleanup - - cpp: - * Very small code cleanup - -Release 0.25.3 - core: - * Fix crashes on broken files - * Avoid MinGW/Cygwin warnings due to redefinition of NOMINMAX - * Fix some small memory leaks - - qt5: - * Fix some kinds of OCG models - * Cleanup some deprecated methods - - glib: - * Fix the first coord of the quadrilateral in create_poppler_quads_from_annot_quads(). Bug #76504 - - utils: - * pdftohtml: Fix typo in manpage - - qt4: - * Fix some kinds of OCG models - -Release 0.25.2 - core: - * Tagged-PDF support - * Open some broken files. Bug #75232 - * Fix crashes on broken files - * Fix regression parsing some broken files. KDE Bug #329600 - * Improve compilation under Win 8 with Visual Studio 2012. Bug #73111 - * PSOutputDev: Ensure paper size takes into account rotation. Bug #72312 - * PSOutputDev: Fix DocumentMedia/Page/Media/PageBBox DSC comments - * PSOutputDev: Use crop box as page size - * PSOutputDev: Remove origpagesizes mode and make -origpagesizes an alias for -paper match - * PSOutputDev: Only change paper size when different to previous size - * PSOutputDev: Ensure there is always a page size in the output - * PSOutputDev: Fix regression when creating level1 PS. Bug #75241 - * CairoOutputDev: Clip to crop box. Gnome Bug #649886 - * Splash: Blend usage in PDF with spot colors casue random output. Bug #74883 - * Splash: Fix off by one that caused crash in a file. Bug #76387 - * Make sure number of least objects in hints table is valid. Bug #74741 - * Limit numeric parsing of character names. Bug #38456 - - glib: - * Tagged-PDF support - * Annotation improvements - * Install error callback. Bug #73269 - * Fix gobject-introspection warnings - * demo: Fix performance in text markup annotations - * Increase gtk3 dependency - - qt4: - * Improve naming of internal export/import macros - * Add GCC visibility export attributes - * Expose document-supplied text direction - - qt5: - * Improve naming of internal export/import macros - * Add GCC visibility export attributes - * Expose document-supplied text direction - - utils: - * pdftocairo: Ensure page size and crop box works the same as pdftops - * Fix TIFF writting in Windows. Bug #75969 - - buildsystem: - * Learn about automake 1.14 - * Do not define -ansi. Bug #72499 - * cmake: Install JpegWriter.h depending on libjpeg - * cmake: Use c99 for the c compiler - -Release 0.25.1 - core: - * GooString format: Added some tests + improved documentation - * GooString format: fixed bug with printing LLONG_MIN - * regression test improvements - - qt4: - * Arthur backend font rendering improvements - * test program to save to file - - qt5: - * Arthur backend font rendering improvements - * Improve detection of Qt5 moc. Bug #72744 - * test program to save to file - - utils: - * pdfunite: Work even if there's a single file given - * pdfunite: do not lose fonts when merging some files - -Release 0.25.0 - core: - * Annotation improvements - * Tagged PDF work - * Improve speed on some files using ICC color space - * Use ICC profile in OutputIntents. Bug #34053 - * Limit use of ZapfDingbats character names. Bug #60243 - * Splash: correction for knockout transparency groups - * regression test improvements - - utils: - * pdftoppm: Added thinlinemode option setting - * pdfinfo: Indicate if pdf contains javascript - * pdfinfo: Add option to print out javascript - * pdfimages: Print size, ratio, and ppi - * pdfimages: More image output format support - * pdfseparate: allow zero-padded pagespecs - - glib: - * Annotation improvements - * Add API to get text, text layout and text attributes for a given area - * demo improvements - -Release 0.24.5 - core: - * Fix crash due to wrong formatting of error message. KDE Bug #328511 - -Release 0.24.4 - core: - * Fix regression in broken endstream detection. Bug #70854 - * Catalog: sort entries of NameTrees to make sure lookup works. Bug #26049 - * Don't infinite loop if reading from GooFile::read fails. Bug #71835 - - utils: - * pdftotext: Do not close stdout. Bug #71639 - * pdftotext: Silence warning for may be used uninitialized variable. Bug #71640 - * pdftotext: Escape the text of the xml headers - * Warn the user if he provides a wrong range - - qt4: - * Fix typo in xml API. Bug #71643 - - qt5: - * Fix typo in xml API. Bug #71643 - -Release 0.24.3 - core: - * PSOutputDev: Fix PFB font embedding. Bug #69717 - * CairoOutputDev: Do not set an invalid matrix in drawImage(). Bug #70085 - - qt4: - * Don't crash if getXRef()->copy() fails - - qt5: - * Don't crash if getXRef()->copy() fails - - utils: - * pdfseparate: Allow only one %d in the filename. Bug #69434 - -Release 0.24.2 - core: - * Windows: Fix CreateFile fails with ERROR_SHARING_VIOLATION. Bug #69597 - - utils: - * pdfseparate: improve the path building - * pdftocairo: check file opening failure in beginDocument() - -Release 0.24.1 - core: - * SplashOutputDev: use getRGBLine images if available. Bug #66928 - * SplashOutputDev: Don't copy bitmap if we don't need to. - * PSOutputDev: Fix regression in -eps -level1sep rendering. Bug #68321 - * Fix crash in malformed file 1026.asan.0.42.pdf - * use copyString instead of strdup where memory is freed with gfree. Bug #67666 - - utils: - * pdfdetach: don't mention xpdfrc - * pdftotext: Fix -bbox with stdin as input. Bug #45163 - * pdftohtml: Fix jpeg image export. Bug #48270 - * pdfimages: Fix typos in man page - - glib: - * demo: Remove GTK_DISABLE_DEPRECATED compilation flag - - qt4: - * Fix small typo in documentation - - qt5: - * Fix small typo in documentation - -Release 0.24.0 - core: - * TextOutputDev: Do not draw ligatures more than once when selected. Bug #9001 - * PSOutputDev: Make some pdftops conversions much faster - * PSOutputDev: Initialize t3FillColorOnly - * SplashOutputDev: Fallback to 1x1 bitmap if we fail to create the real size - -Release 0.23.4 - core: - * TextOutputDev: clip the selected text rendering to the selection box. Bug #66983 - * CairoImageOutputDev: Fix the bounding box of saved images - - build system: - * Improve linking against pthreads - -Release 0.23.3 - core: - * Annotation improvements - * Fix crashes on malformed files - * TextSelectionPainter: Draw glyphs after selection background - * TextOutputDev: add a method to TextPage to get the selection as a list of words - - qt5: - * Initial Qt5 port - - qt4: - * Windows compile fixes - * Demo: Allow the choose the page rotation - - build system: - * Fix mingw build - * Minor autotools fixes - -Release 0.23.2 - core: - * SplashOutputDev: Speed-up some tiling on a 10x factor - * Improve caching of lcms2 ICC color profiles - * Put some private classes in an anonymous namespace - - qt4: - * Add a thread stresser tool - - build system: - * Fix mingw build - -Release 0.23.1 - core: - * XRef stream writing: Write 32-bit offsets when possible - * Fix splashModeBGR8 rendering (Bug #64381) - - glib: - * Do not use deprecated gtk_scrolled_window_add_with_viewport() (Bug #64683) - - build system: - * Fix Large file support when using cmake - -Release 0.23.0 - core: - * Make rendering thread safe - * Large file support - * Implement Crypt filter (Bug #62800) - * Fix endstream detection (Bug #62985) - * CairoOutputDev: support uncolored tiling patterns (Bug #59179) - * SplashOutputDev: Introduce Thin Line mode support (Bug #37347) - - qt4: - * Expose Thin Line mode support - -Release 0.22.4 - core: - * Always consider a softmask transfer function (Bug #63587) - * Fix crash on malformed files (Bug #63190) - * Splash: Fix compilation with fixed point mode enabled - - utils: - * Fix crash on some files (Bug #63909) - - qt4: - * Fix name decoding of some attachments (KDE Bug #307786) - - build system: - * Fix compilation with mingw-w64 compiler - -Release 0.22.3 - core: - * Check order bounding box values in tiling pattern (Bug #62369) - * CairoImageOutputDev: Don't change image interpolation when printing (Bug #62418) - * TextOutputDev: Set text matrix when painting selection (Bug #61042) - * Only write the file once when saving (Bug #62739) - * Fix for complete rewrites in repaired files - * Fixlet regarding spec interpretation for Link Zoom value - * Fix typos in man pages - * Fix compile when not using libjpeg - - glib: - * Always start from the beginning when starting a new search on a page (Bug #59972) - - qt4: - * Fix crash in files with LinkRendition (KDE Bug #317710) - - build system: - * Small cmake improvements - -Release 0.22.2 - core: - * Correct rendering of underline and strike out annotations (Bug #61518) - * Workaround broken jpeg stream definitions (Bug #61994) - * SplashOutputDev: Restore CTM on early exits (Bug #61413) - * SplashOutputDev: Make sure we don't try to paint in x < 0 (KDE Bug #315432) - * Fix latin page labels. (Bug #61034) - * Fix compilation with jpeglib9 - * Fix minor valgrind warning - - utils: - * pdfimages: Fix extraction of some images (Bug #61168) - - build system: - * Fix the build with automake-1.13 - -Release 0.22.1 - core: - * Fix crash in some pdf files when extracting text (Bug #59561) - * Fix crashes in wrongly formed files - * Fix wrong warning when opening some files (Bug #58966) - - build system: - * Improve autoconf jpeglib.h detection (Bug #59186) - -Release 0.22.0 - core: - * Fix crash in invalid files that define a <= 0 bits per image value - * Fix a few issues in JPX decoding when not using OpenJPEG - * TextOutputDev: Use page size for max value in TextPage::visitSelection - * Fix typo in error message - - utils: - * Fix pdfunite regression (Bug #58569) - * Demo fixes and improvements - - misc: - * pdf-inspector improvements - -Release 0.21.4 - core: - * SplashOutputDev: Fix crash when rendering in monochrome mode - * SplashOutputDev: Fix line widths in monochrome mode (Bug #57294) - * PSOutputDev: Fix crop on EPS conversion (Bug #30692) - * TextOutputDev: Fix minor logic mistake - * Fix assert on some malformed files (Bug #58257) - * Move #include "jpeglib.h" into .cc file (Bug #57687) - * Filter text that may end up being written to the shell - * Fix windows compile warnings - - glib: - * Add poppler_annot_set_flags (Bug #58015) - * Demo fixes and improvements - - qt4: - * Fix check_lexer on 32-bit systems - -Release 0.21.3 - core: - * Splash: Implement bilinear image scaling (Bug #22138) - * CairoOutputDev: Update fill and stroke color in startPage (Bug #54526) - * Fix GooString::insert() - * Allow large chars in TextPage - * Fix crash on ActualText::end - * Don't use memcpy to copy classes - * Fix warnings - - glib: - * Check if words end with spaces (Bug #54504) - * Ensure text is only computed on first render - * Fix warnings while generating introspection file - * Fix returns tag in PopplerAttachmentSaveFunc api doc - * Minor demo fixes - -Release 0.21.2 - core: - * CairoOutputDev: make drawImage work with images > 32767 in width/height (Bug #56858) - * CairoOutputDev: Fix soft mask when image resolution != smask resolution (Bug #57070) - * CairoOutputDev: Fix crash in CairoImageOutputDev with setSoftMaskFromImageMask (Bug #57067) - * Remove a check on fonts that we don't need (Bug #56753) - * Misc code cleanups - - utils: - * pdftocairo: Add tiff output support (Bug #57006) - * pdfunite: Fix -v (Bug #56817) - * Misc code cleanups - -Release 0.21.1 - core: - * Annotation improvements - * Form improvements - * CairoImageOutputDev: Support parameterized Gouraud shading (Bug #56463) - * UTF validation fixes - * Do not call drawing routines if we don't need non text (Bug #54617) - * Fix Memory leak in CharCodeToUnicode (Bug #54702) - - qt4: - * Make LinkRendition properties available (Bug #55378) - * Accessors for FormWidgetChoice::editChoice - * Implement overprint - -Release 0.21.0 - core: - * Support the modification of files with Encrypt - * Annotation improvements - * Form improvements - * Splash: Implement DeviceN support - * Splash: Avoid bogus memory error for tilingPattern - * TextOutputDev: Allow multiple fonts in a TextWord - * Kill the concept of base dir - * PSOutputDev: Always write HiResBoundingBox (Bug #53159) - * Convert UTF-16 to UCS-4 when reading toUnicode cmap - * GooString formatting: add support for uppercase hexadecimal - * Use error() instead of fprintf(stderr, ...) in Annot::layoutText - * poppler-config.h: remove WITH_FONTCONFIGURATION_* macros - - glib: - * Annotation improvements - * Add poppler_page_remove_annot() - * Add poppler_document_new_from_stream - * Add poppler_document_new_from_gfile - * Add poppler_page_find_text_with_options (Bug #2951) - * Demo improvements - * Port tests and demo to GTK+3 - - qt4: - * Add accessor methods for movie poster information - * Make 'additional actions' available in Annotation API (Bug #53589) - * Add whole-page search method to Poppler::Page - * Small changes in tests - - utils: - * pdftohtml: Make the output more xhtml compliant - * pdftohtml: Add -fontfullname. (Bug #49872) - * pdftohtml: Do not invoke gs anymore - - build system: - * Add the possibility of using lcms1 even if lcms2 is installed - * Remove extra fontconfig CFLAGS and LIBS - -Release 0.20.5 - core: - * Fix crashes in malformed documents - * Fix parsing of very big numbers - * Splash: Do not render invalid font outlines (Bug #55573) - * Check for NaN in TextPage::addChar - - build system: - * Fix build using mingw64 with winpthread - * autotools: Fix compilation when lcms is on non standard locations (Bug #55326) - * Support automake-1.12 (Bug #55541) - - glib: - * Chain up finalize to the parent class (Bug #55521) - -Release 0.20.4 - core: - * Improvements regarding embedded file handling. (KDE Bug #306008) - * Fix opening some broken files (Bug #14303) - * Fix memory leaks - * Fix crashes in various broken files - * Refine warning to only complain when really needed - * Remove function declared but not implemented - * Remove execution permissions from a header file - - qt4: - * Improvements regarding embedded file handling. (KDE Bug #306008) - -Release 0.20.3 - core: - * If NULL, NULL fails as password try EMPTY, EMPTY before failing (Bug #3498) - * SplashOutputDev: Fix bogus memory allocation size in Splash::arbitraryTransformImage (Bug #49523) - * SplashOutputDev: Fix segfault when scaleImage returns NULL (Bug #52488) - * SplashOutputDev: Blend mode enhancements for CMYK - * PSOutputDev: Fix conversion when creating multiple strips (Bug #51982) - * PSOutputDev: Fix Bitmaps in level2sep or level3sep (Bug #52384) - * PSOutputDev: Fix DeviceN images with alternate Lab colorspace in level 3 PostScript (Bug #51822) - * PSOutputDev: Make sure xScale and yScale are always initialized (Bug #52215) - * Unify poppler-config.h includes in core "installed" headers (Bug #52193) - * Replace c++ style includes with c style ones (Bug #52426) - - utils: - * pdfseparate: Return 0 on success - -Release 0.20.2 - core: - * Fix compilation on Windows - * Copy resources content defined in the pages dict on save (Bug #51369) - * PSOutputDev: Correct %%DocumentCustomColors (Bug #51479) - * PSOutputDev: Fix handling of DeviceN images in level 3 PostScript (Bug #51548) - * Fix crash in malformed documents - - qt4: - * Do not hang on malformed /Annots objects (Bug #51361) - -Release 0.20.1 - core: - * Remove unnecesary transparency group handling in splash (Bug #13487) - * Include substitute font name in system font cache (Bug #49826) - * Fix logic on SplashBitmap::writeImgFile - * PSOutputDev: use setoverprintmode only if rip knows it - * Fix crash in malformed documents - - qt4: - * Make TextAnnotation constructor public - * Fix saving of default TextAnnotation to xml - * Keep page rotation into account when normalizing annotation coords - - glib: - * Fix memory leak when document fails to load - * Make sure password is always converted to latin1 - * Fix typo in documentation - - build system: - * Distribute cmake/modules/FindLCMS2.cmake (Bug #49818) - - utils: - * pdftohtml: Determine if font is bold or italic based on FontDescriptor (Bug #49758) - * pdfseparate: Syntax fixes in the man page - -Release 0.20.0 - core: - * Reconstruct xref table if xref needed but missing (Bug #40719) - * Fix getFullyQualifiedName with unicode field names (Bug #49256) - * SplashOutputDev: Fix rendering of knockout groups (Bug #12185) - * SplashOutputDev: Fix cmyk transfer bug (Bug #49341) - * Fix crashes in broken documents - * Bring back the Outputdev::begin/endMarkedContent virtuals - * Build fixes - - qt4: - * Convert propertly unicode encoded field qualified names - - glib: - * glib: Use delete[] to free array allocated with new[] (Bug #48447) - -Release 0.19.4 - core: - * Annotation improvements - * More compatible file writing - * SplashOutputDev: Fix slow rendering of pdf with a lot of image masks in pattern colorspace - * Fix crashes in broken documents - * Fix spurious warning messages - - utils: - * pdftotext: Add missing section heading to man page - * pdftohtml: Fix crash when the destination file does not exist - - build system: - * autoconf: Do not append "-ansi" to CXXFLAG, if "-std=XXX" is already specified. - * autoconf: Do not clear FREETYPE_CFLAGS, FREETYPE_LIBS before PKG_CHECK_MODULES() - * autoconf: Copying graphics library CFLAGS to cpp frontend Makefile.am - -Release 0.19.3 - core: - * Annotation improvements - * CairoOutputDev: Fix regression caused by mesh gradients - * CairoOutputDev: Use correct userfont font bbox (Bug #48399) - * CairoOutputDev: Fix paintTransparencyGroup when both mask and fill opacity are required (Bug #48453) - * CairoOutputDev: Ensure 0 width lines with stroke_adjust are aligned - * CairoOutputDev: Only align stroke coords for horizontal and vertical lines (Bug #48318) - * CairoOutputDev: Fix stroke pattern with transparency group (Bug #48468) - * Fix crash in JBIG2Stream decoding - * Fix memory leak when looking for a substitute font - * Fix page labels to not have a null character at the end - * Fix Splash CMYK merge error - * ttc<->ttf fallback is expected for CJK font list in for Windows (Bug #48046) - - qt4: - * Annotations can now be modified - * Annotations can now be added - * Annotations can now be removed - - utils: - * pdftohtml: Add producer and version to xml output - * pdftohtml: Fix the mask inversion for PNG - -Release 0.19.2 - core: - * Annotation improvements - * CairoOutputDev: update cairo mesh pattern to 1.12 api - * CairoOutputDev: fix some transparency issues (Bug #47739) - * CairoOutputDev: Fix regression in some shadings - * TextOutputDev: Don't add newline to last line extracted by TextSelectionDumper (Bug #45955) - * CJK font improvements - * Improve font matching for non embedded fonts - * Fix regression regarding forceRasterize in PSOutputDev - * Fix typos glyph names in truetype 'post' table standard mac ordering - - build system: - * minor cmake fixes - * misc autoconf fixes - * POPPLER_VERSION is now wrapped in quotes - - utils: - * pdftohtml: extract mask images even if they are not JPEG (Bug #47186) - * pdftohtml: Flip images if they need to (Bug #32340) - -Release 0.19.1 - core: - * Improve CJK suport in PSOutputDev - * CJK substitute implementation on WIndows platforms - * Do not crash on malformed files with 0 bits in the color map of an image - * Fix regression in some PSOutputDev array sizing - * Improvements to Annotation editing - * Fix logic error in Rendition parsing code (Bug #47063) - * Minor API changes to SplashOutputDev (Bug #46622) - * Fix mismatch in some functions declarations - * Update poppler copyright year - - utils: - * pdftops: Fix -passfonts regression. (Bug #46744) - * pdffonts: List the encoding of each font. (Bug #46888) - * pdftohtml: Add possibilty of controlling word breaks percentage. (Bug #47022) - - qt4: - * Support for LinkMovie object (Bug #40561) - * Support for Media Rendition - - glib: - * Add poppler_fonts_iter_get_encoding - * Improvements to the demo - -Release 0.19.0 - core: - * Merge Xpdf 3.03 - * Add support for lcms2 - * SplashOutputDev: Implement Overprint - * PSOutputDev: Implement Overprint - * Expand glyph name ligatures such as "ff", "ffi" etc to normal form (Bug #7002) - * Use an Identity CharCodeToUnicode for Adobe-Identity and Adobe-UCS collections (Bug #35468) - * CairoOutputDev: Avoid setting huge clip area when printing (Bug #44002) - * CairoOutputDev: Fix test for rotation (Bug #14619) - * CairoOutputDev: Don't read inline image streams twice (Bug #45668) - * CairoOutputDev: set mask matrix before drawing an image with a mask (Bug #40828) - * Update glyph names to Unicode values mapping (Bug #13131) - * Only use Hints table when there are no parse errors (Bug #46459) - * Expose POPPLER_VERSION in poppler-config.h - - utils: - * pdftohtml: Output images in -xml mode if no -i option is specified - * pdftohtml: Get rid of static data members; merge duplicated jpeg dumping code - * pdftohtml: Be more consistent generating the outlines - * pdftohtml: Generate outlines in pdftohtml in -xml mode (Bug #56993) - * pdftohtml: Combine UTF16 surrogate pairs (Bug #46521) - * pdfinfo: Report page rotation - * pdfinfo: Decode utf-16 surrogate pairs - * pdftoppm: Allow one of -scale-to-[xy] = -1 to mean the aspect ratio is to be preserved (Bug #43393) - * pdftocairo: Allow one of -scale-to-[xy] = -1 to mean the aspect ratio is to be preserved - * pdffonts: Add -subst option to list the substitute font name and filename - * pdfseparate: Produce PDF/X conformant pdf pages if the original PDF was PDF/X conformant - * pdfimages: Add -list option to list all images (Bug #46066) - * Improve various manpages - - glib: - * Add poppler_fonts_iter_get_substitute_name - * Demo improvements - * Update gtk-doc makefile and m4 file - * Fix typos in documentation - - qt4: - * Add the option of PSConverter creating EPS - * Form support improvements - - build system: - * autotools: Print the cairo version required if not found (Bug #44619) - * autotools: Print the glib version required if not found - * autotools: Use pkgconfig to check for libopenjpeg (Bug #21789) - * autotools: Replace openjpeg compile test with a version test - * Add a configuration option for the test data dir - -Release 0.18.4 - core: - * CairoOutputDev: Restore temporary clip used in CairoOutputDev::fill when painting a mask - * CairoOutputDev: Ensure paintTransparencyGroup uses same ctm as beginTransparencyGroup. Bug #29968 - * CairoOutputDev: Use fabs when comparing the transformed line width. Bug #43441 - * CairoOutputDev: Remove unused variable in CairoFontEngine.cc. Bug #45442 - * SplashOutputDev: Do not use 50Kb of stack in SplashXPath::addCurve. Bug #44905 - * JpegWriter: set image parameters after jpeg_set_defaults(). Bug #45224 - * OpenJPEG decoder: Set OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG if you have it. Bug #43414 - * Lexer: convert integer to real when overflow occurs. Bug #45605 - - glib: - * Various minor introspection and documentation improvements. Bug #44790 - * Fix return values. Bug #45440. Bug #45441 - * gtk-doc improvements. Bug #45549 - * Introspection improvements. Bug #45455 - - utils: - * HtmlOutputDev: Proper unicode support when dumping PDF outline. Bug #45572 - * HtmlOutputDev: Fix leaks. Bug #45805 - * HtmlOutputDev: Close li tags in generated outlines. Bug #45807 - * man pages: fix minor issues with hypens and % - - build system: - * automake: Link to lcms if needed - * automake: Fix build for builddir != srcdir. Bug #45434 - * automake: Improve moc detection when cross compiling - * Fix build with latest mingw-w64 headers. Bug #45407 - - qt4: - * remove non-existing 'qt' include dirs - -Release 0.18.3 - core: - * Do not fail if we are trying to save a file with Encrypt that has not been modified. KDE Bug #288045 - * Include .otf fonts when finding substitute fonts. Bug #44412 - * Fix stack overflow in PDFDoc::markObject(). Bug #44660 - * Include strings.h as we use memcpy. Bug #43558 - - utils: - * pdfunite: Properly initialize globalParams. Bug #44659 - * pdfseparate: Properly initialize globalParams - * Fix iniliazialization of GooString arguments - - build system: - * autoconf: Check for cairo-ft and other cairo backends. Bug #43969 - -Release 0.18.2 - core: - * Fix leak in GooString when resizing to a smaller string - * Fix crash if failing to parse the colorspace. Bug #42793 - * Make GfxColorSpace::parse accept dicts - - qt4: - * Use PDFDoc(wchar_t *, ...) on Windows. Bug #35378 - * Add missing include - * Minor fixes in documentation - - utils: - * pdftocairo: Fix crash when rendering only odd/even pages in a printing format - - build system: - * Fix pkg-config files - -Release 0.18.1 - core: - * PSOutputDev: Output PS that does not confuse libspectre - * PSOutputDev: Fix tiling pattern fill matrix. Bug #41374 - * PSOutputDev: Emit non repeating patterns just once - * PSOutputDev: Fix uncolored tiling patterns. Bug #41462 - * CairoOutputDev: Fix crash when using poppler_page_get_image() - * CairoOutputDev: Fix various setSoftMask bugs. Bug #41005 - - utils: - * pdftocairo: Flush/close files one we are done using them - * pdftocairo: Compile in Windows - - build system: - * CMake: Fix typo in option description - * CMake: Correctly include fontconfig include dir - * Remove poppler-cairo dependency from poppler-glib pkg-config file - - qt4: - * Minor fixes in documentation - -Release 0.18.0 - core: - * Fix small memory leak when dealing with marked content - * Remove DCTStream::getRawStream since Stream::getNextStream does the same - - utils: - * Rename pdfmerge to pdfunite - * Rename pdfextract to pdfseparate - * pdfseparate: Complain if %d is not present and it should - * Add pdfseparate and pdfunite man pages - - build system: - * Minor cleanup in regarding removed qt code - -Release 0.17.4 (0.18 RC) - core: - * SplashOutputDev: Compile when defining USE_FIXEDPOINT - * PNGWriter: Compile with libpng >= 1.5.0 - -Release 0.17.3 (0.18 Beta 3) - core: - * PSOutputDev: Use Patterns for tiling fill when PS level >= 2 - * PSOutputDev: Avoid using /PatternType if only one instance of the pattern is used - * PSOutputDev: Add poppler version as comment in the file - * CairoOutputDev: Set mime data for soft masked images (Bug #40192) - * CairoOutputDev: Assume printer pixel size is 1/600" when stroking 0 width lines (Bug #39067) - * CairoOutputDev: Use cairo_show_text_glyphs() when printing - * CairoOutputDev: Fix stroke patterns (Bug #11719) - * CairoOutputDev: Fix unique id mime data - * CairoOutputDev: fix stroking of very thin lines - * CairoOutputDev: align strokes when Stroke Adjust is true and line width <= 1 (Bug #4536) - * TextOutputDev: Add TextFontInfo::matches() - * Improve PNGWriter - * Rework writing of PDF files - - utils: - * Introduce pdftocairo - utility for creating png/jpeg/ps/eps/pdf/svg using CairoOutputDev - * Introduce pdfextract - utility to extract PDF pages - * Introduce pdfmerge - utility to merge PDF files - * Fix compilation warning - * pdftohtml: Support text rotation (Bug #38586) - * Update SEE ALSO section of man pages - - glib: - * Add poppler_page_get_text_attributes() - * Add text attributes information to text demo - - qt4: - * Add a way to get the fully qualified name of a FormField - * Minor documentation improvements - -Release 0.17.2 (0.18 Beta 2) - core: - * EmbeddedFile improvements - * don't gmalloc(-1) upon ftell failure - * Fix missing content in some pages (Bug #39637) - * Improve selection of CJK fonts (Bug #36474) - * SplashOutputDev: Implement overprint - * SplashOutputDev: Render dots for 0 length dashed lines (Bug #34150) - * SplashOutputDev: Fix bad memory access when not using antialias (Bug #37189) - * PSOutputDev: Make level2sep and level3sep write cmyk instead of rgb - * PSOutputDev: Make level1sep, level2sep and level3sep write gray instead of rgb for gray images - * Fix numerical overflow in libopenjpeg JPXStream (Bug #39361) - * Fix crash on truncated JPEG/DCT stream (Bug #36693) - * Make sure the dict is a page dict (Bugs #35925 #39072) - * Fix calculation of startXRefPos - * Handle missing startxref properly (Bug #38209) - * Parse the "Medium" modifier when asking fontconfig for a font - * Header cleanup - * Include cleanup - * Define cleanup - - glib: - * Add missing permissions flags to PopplerPermissions - * Add missing permission flags to info demo - * Update gtk-doc.make - * Add poppler_document_get_n_attachments() - - utils: - * pdftohtml: Fix encoding of PDF document metadata (Bug #37900) - * pdftohtml: Fix vertical spacing issues (Bug #38019) - * pdftotext: Fix -htmlmeta to correctly output U+2019 in PDF metadata (Bug #37900) - * pdftoppm: Implement overprint - - qt4: - * Rework EmbeddedFile internals - * Fix possible crash in test - -Release 0.17.1 (0.18 Beta 1) - core: - * Rework the way form fields tree is built - * Cleanup unused parameters/variables - - glib: - * Add JavaScript actions - * demo: Show javascript actions in actions view - - qt4: - * tests: Turn some assignments to bool into QVERIFY checks - -Release 0.17.0 (0.18 Alpha) - core: - * Splash: Implement tiling patterns - * Splash: Support slight hinting - * Splash: Radial shading improvements - * Splash: General speed improvements - * Arthur: Add Hinting API - * Cairo: Implement Type 4,5,6,7 shadings using cairo mesh gradients - * Cairo: Use the new cairo unique id to set the surface id when printing - * PS: Add PS level1 non standard binary output option - * PS: Allow setting the rasterization resolution - * Form support improvements - * Annotation support improvements - * General speed improvements - * Add support for handling ViewerPreferences - * Remove abiword output device - - utils: - * pdftoppm: Add -singlefile option (Bug #32025) - * pdftoppm: Add TIFF output format support (Bug #32027) - * pdftops: Add PS level1 non standard binary output option - * pdftops: Allow setting the rasterization resolution - * pdftoabw has been removed - - glib: - * Add poppler_form_field_get_action() (Bug 33174) - * Remove GDK API - * Remove test-poppler-glib - * demo: Add a tooltip with current selected character in text demo - * demo: show the activation action of form fields if there's one - - cpp: - * Add TIFF output possibility - * Add PNM output possibility - - qt4: - * Support slight hinting - * Form support improvements - - qt3: - * The Qt3 frontend has been removed - - tests: - * Merge splash and cairo tests into a single gtk-test tool - -Release 0.16.4 - core: - * Small improvements in Annot parsing - - glib: - * Add g_return macros to make sure index is correct in form field choice methods - * Fix a crash when a choice form field has no items selected in glib-demo - - utils: - * Small fixes to the pdftohtml manpage - * Fix copyright years - - qt4: - * Fix caption of push button fields - -Release 0.16.3 - core: - * Increase precision in PS output device - * Workaround bug when converting pdf to ps with level1 (Bug #31926) - * Fix crash in Splash output device in some broken pdf - * Fix infinite loop in some broken files - * Fix rendering of some substituted fonts (Bug #34522) - * Do not ask Freetype for 0x0 fonts in Splash output device (Bug #34602) - * Don't assume y1 > y3 for points of a highlight annotation (Gnome Bug #643028) - * Handle fontCIDType2OT when creating freetype font in Cairo output device (Gnome Bug #643273) - * Fix crash in some pdf that use ICC color space (Bug #34357) - - glib: - * Don't use an uninitialized local variable in demo - * Add some introspection markers - - qt4: - * Fix crash regression in unicodeToQString (again) - - utils: - * pdftotext: Do not crash when using -bbox - -Release 0.16.2 - core: - * Fix text extraction for some files - - qt4: - * Fix crash regression in unicodeToQString - -Release 0.16.1 - core: - * Fix colorspace issues in the Cairo backend (Bug #32746) - * Remove declaration of function without implementation - * Do not crash in case jpeg_create_decompress fails (Bug #32890) - * Fix variable access mismatch (Bug #33063) - * Fix converting some pdf to ps with -level1sep (Bug #32365) - * Fix line selection, dont check y for Line selections - * Include zlib header in PNGWriter.cc - * Fix leak in Splash backend when doing axial shaded fills - * Fix label to index conversion on multiple prefixes - - glib: - * Use NULL instead of FALSE for functions returning a pointer - * Fix memory leak in poppler_page_get_text_layout() for pages with no text - - qt4: - * Fix unicodeToQString() to correctly decode the Unicode sequence - -Release 0.16.0 - - core: - * Improve the correctness of radial shadings (Bug #32349) - * Adapt the zlib-based FlateStream code to API changes (Bug #32065) - * Make PreScanOutputDev be less agressive when deciding to rasterize (Bug #30107) - * Fix some warnings in newer gcc in Splash backend - * Fix the preliminary bbox/clip calculation in Splash backend - * Use A1 instead of A8 for imagemask in the Cairo backend - * Windows compile fixes - - utils: - * Do not return 99 (or 1) with -h, -v and -printenc (Bug #32149) - * Misc style improvements to pdftohtml code - * pdftohtml: Remove the -resolution flag introduced in 0.15.0 and fix the - existing -zoom flag - - build system: - * Add more warning flags to the default gcc builds - * Enable GObject introspection support in the cmake build system - - qt4: - * Windows compile fixes - -Release 0.15.3 (0.16 RC) - - core: - * Improve rendering of radial shadings - * Open a broken file (Bug #31861) - * Correct parsing of linearization table (Bug #31627) - * Find fonts inside patterns (Bug #31948) - * [win32] Simplify strtok_r implementation - * Use a std::vector<char> instead of a var-length-array of chars - * Fix crashes in broken files - * Use sets instead of arrays for looking for duplicate fonts - - cpp: - * Include correction - - utils: - * pdffonts: Remove duplicated code - -Release 0.15.2 (0.16 Beta 2) - - core: - * Improve shadings and antialias in the Splash backend (Bug #30436) - * Linearization improvements - * Small improvements to the Arthur backend - * Fix calculation of the size of some pages (Bug #30784) - * Fix crashes in broken documents - - qt4: - * Add Page::renderToPainter() method - * Add setDebugErrorFunction() method - - cpp: - * Add the hability to render pages to an image - - utils: - * Add -p flag to pdfimages - - build system: - * Remove -ansi flag for cywin and mingw - -Release 0.15.1 (0.16 Beta 1) - - core: - * Consider render value when colorizing text (Bug #2807) - * Improve rendering of Shading Type 6 and 7 - * Improve dict lookup speed for big dicts - * Fix multiple crashes in malformed PDF files - * Fix memory leak in in malformed PDF files - * Fix memory leak in the Catalog names - * Fix uninitialized uses on DCTScanInfo - * Fix a crash when drawing square/circle annots without a border (Bug #30580) - * Only clip boxes to mediabox if we are at the page level (Bug #30784) - * Do not omit the notdef glyph in the Splash backend - * Fix a crash when redering documents with invalid type 3 fonts in the Cairo backend - * Form improvements - * Add a method to get the PDF file identifier - - glib: - * Add more printing options to the API - * Add a method to get the PDF file identifier - * Add accessor for all PopplerDocument properties - * Form improvements - * Documentation improvements - * Improvements to the demo - - qt4: - * Add a callback to know which page has been printed - * Add a method to get the PDF file identifier - * Optimize GooString to QString conversion - * Some more autotests - * Update Doxyfile (enables .qch file for assistant) - - build system: - * Require Cairo 1.10 - - utils: - * pdftohtml: Add -s option to generate a single HTML page - * pdftotext: Add -bbox option - - cpp: - * Add the possibility of loading a document from raw data - * Add a method to get the PDF file identifier - * Improve Unicode to ustring conversion - * Documentation improvements - * Update Doxyfile - -Release 0.15.0 (0.16 Alpha) - - core: - * Remove exception support - * Improve creation of Annotations - * Fix failure to parse PDF with damaged internal structure. (Bugs #29189 #3870) - * Add a way to access the raw text of a page - * Speed improvements when reading multiple characters from a given Stream - * Speed improvements in the Splash backend - * Speed improvement in gray color space calculations - * Speed improvement in ICC color space calculations - * Speed improvement when reading some fonts - * Make GBool a bool instead of an int - - glib: - * Add GObject introspection support - * Improve creation of Annotations - * Add a way to get the coordinates of each character of a page - * Add a way to get the page label - * Documentation improvements - * Support password protected documents in the demo - * Support for selection in the demo - * Support for adding annotationss in the demo - * Misc improvements in the internals - - qt4: - * Add a way to access the raw text of a page - * Recognize "Print" as named action - * Documentation improvements - - build system: - * Add option for autogen.sh to skip configure - * Nicer autogen.sh output - * Improvements when build the glib frontend with CMake - - utils: - * pdftohtml: Use splash instead of external gs invocation to render the background - * pdftohtml: Let the user specify the resolution of the background. (Bug #29551) - - cpp: - * Add a way to access the raw text of a page - -Release 0.14.3 - - core: - * Tell Windows we are writing/reading binary data from stdout/stdio (Bug #29329) - * Fix crash when parsing some Movie elements (KDE Bug #249586) - -Release 0.14.2 - - core: - * Fix rendering of some documents involving tilingPatternFill in the cairo output device - * Improve rendering of some annotations - * Handle ColorTransform in DCT streams when using libjpeg (Bug #28873) - * Fix crash in the ps output device in some files (KDE Bug #246269) - * Fix crash in some malformed files (Bug #28842) - - build system: - * Improve build on windows - * Add uninstalled .pc file support when using autoconf - - glib: - * Fix a crash when a layer doesn't have a name (Bug #28842) - - utils: - * Fix padding of names in pdftoppm - -Release 0.14.1 - - core: - * Add ObjectStream caching, makes opening some files ten times faster (Bug #26759) - * Fix crash when writing to negative coordinates (Bug #28480) - * Check objects are the type we want them to be when parsing GfxICCBasedColorSpace - * Optimize Splash::compositeBackground - * Optimize color space calculations by using sqrt instead of pow 0.5 - * Fix crash in JBIG2Stream with malformed documents - - build system: - * Make sure we ship two needed cmake files - * Do not distribute glib/poppler-features.h and poppler/poppler-config.h - * Improve compilation with Sun Studio - * Fix linking of the cpp frontend when using autotools - - glib: - * Fix links/annots area for some documents (Bug #28588) - * Fix poppler_page_find_tex() when called more than once (Bug #27927) - - utils: - * Add -cropbox to pdftoppm manual - -Release 0.14.0 - - core: - * Fix crash when parsing pdf with broken JBIG2Stream (Bug #28170) - * Do not follow loops blindly when parsing XRef (Bug #28172) - * Allow quality & progressive mode to be utilised in JpegWriter - * Fix potential assert in Lexer code (KDE bug #240208) - * Fix opening of files whose /P is stored as unsigned integer - * Do not exit() when trying to allocate memory for the XRef fails - - cpp: - * Minor bugfixes - * Documentation improvements - - build system: - * Fix build in mingw32 when using autotools - * Preserve compiler flags when using cmake - -Release 0.13.4 (0.14 RC 1) - - core: - * Include standard float.h instead of unportable values.h - * Fix first color stop offset of linear gradients. Bug #27837 - * Fix compilation if JPEG nor PNG is used - * Use fabs for doubles instead of abs - * Use strtok_r instead strtok - * Adjust bbox for line annots when y1 = y2 - * Some fixes and regressions in the cairo output device - * Better check of overlapping of table cells when selecting text - - cpp: - * Make the pkg-config files really work - * Fix in/out buffer sizes in some functions - -Release 0.13.3 (0.14 Beta 2) - - core: - * Fix roll optimization in the PS function interpreter - * Correctly parse numbers with '+' sign. Gnome bug #614549 - * Add support for cached files - * Add support for reading a cached file from stdin - * Add HTTP support using libcurl, disabled by default - * Add some const correctnes to GooString - * Rework DCTStream error handling. Bug #26280 - * Use current fill_opacity when drawing soft masked images in Cairo backend. Gnome bug #614915 - * Use the topleft of the Rect of text annots to draw - * Fix saving update docs that have a compressed xref table. Bug #27450 - * Parse varius part of the document catalog on demand - * Implement colorizing image masks with pattern colorspace in Cairo backend - * Fix a crash when rendering 0x0 images in Cairo backend - * Check pattern status after setting matrix when rendering images - * Improve text selection/extraction order. Bug #3188 - * Fix pattern size when bbox is not at 0,0 - * Improve colorizing text and masks in pattern colorspace. Bug #27482 - * Silence some Illegal entry in bfrange block in ToUnicode CMap. Bug #27728 - - utils: - * Add the -o[dd] and -e[ven] options to pdftoppm - * Allow read from stdin using the new cached files feature - * Fix crash in pdftohtml when output filename was shorter than 5 characters - - glib: - * Use existing cairo api when rendering to a pixbuf - * Compile with -DGSEAL_ENABLE. Bug #27579 - -Release 0.13.2 (0.14 Beta 1) - - core: - * Improve Movie support - * Fix experimental Arthur backend to compile when if Splash backend is disable - * Fix usage of some streams in the Cairo backend - * Small improvements in the experimental Arthur backend - * Minor annotation improvements - * Rework LinkRendition to follow the spec - * Add support for Set-OCG-State actions - * Correctly initialize the grayscale softmask color in the Splash backend - * Correctly initialize actualText in TextOutputDev when initialization fails - * Various MSVC fixes - - glib: - * Add support for Movie objects - * Add support for Screen annotations - * Add support for rendition actions - * Add support for OCG State actions - * Improvements to the demo - - qt4: - * Always compile the experimental Arthur backend - * Minor speed improvement in QPainter usage - * Add a search overload that takes doubles instead of QRectF - - cpp: - * Fix iconv usage - * use gmtime() when gmtime_r() is not available - * Fix building in autotools in windows - * {from,to}_utf_8() -> {from,to}_utf8() - - build system: - * Multiple CMake build system fixes - * Fix of some DIST targets in autotools - * Make finding of Qt3 in autotools use pkg-config - -Release 0.13.1 (0.14 Alpha 2) - - core: - * New C++ frontend to interface with Poppler using only STL - * Use the right matrix for the mask in drawMaskedImage in Cairo output device. Bug #16906 - * Fix downscaling images when document is rotated in Cairo output device. Bug #26264 - * GooVector rewrite, old version had "unknown" origins/license - * Fix use after free in a error condition - * Improve handling of broken commands. Bug #24575 - * Fix potential use after free in Cairo output device. - * Fix regression in painting. Bug #26243 - * Improve handling of FontConfig. Bug #26544 - * Only assume the OC is not visible if it exists and is set to no. Bug #26532 - * Fix a potential crash in Splash font handling on out of memory conditions - * Implement writeImgFile for splashModeXBGR8 - * Several speed increases (around 40% in some documents) in the Splash output device - * Improve printing on the Cairo output device - * Do not use '\' character in PostScript names - * Omit writing of embedded fonts into temporary files in the Cairo output device. Bug #26694 - * Improve filtering of some images in the Cairo output device. Bugs #25268, #9860 - - utils: - * pdftoppm: Only swap w with h if rotation is 90 or 270 - - build system: - * Add POPPLER_WITH_GDK in cmake build system. Bug #26247 - * Fix typo: "MULTITHREAD" -> "MULTITHREADED in cmake build system - * Wrap #include <jpeglib.h> in extern "C" to fix build. Bug #26351 - * Add the Win32-specific ENABLE_RELOCATABLE option to cmake build system - * Reflect that poppler-glib needs cairo now in cmake build system - * Use pkgconfig to detect libpng on autotools build system - * Detect the need for nanosleep in solaris in cmake build system. Bug #26650 - -Release 0.13.0 (0.14 Alpha) - - core: - * Improvements to Annotation rendering. Bug #23108 - * Do not give an error when opening files without pages. Bug #24720 - * Try to read streams without Length - * Do not crop the transformation matrix at an arbitrary value. Bug #25763 - * Make poppler (optionally) relocatable on Windows - * Use a small object cache in GfxResources to cache GState objects - * Reduce the number of redundant pattern creations in the Cairo output device - * Use colToDbl() to avoid rounding error in the Cairo output device - * Fix problems with mask handling in the Cairo output device. Bug #8474 - * Use a better scale down implementation in the Cairo output device - * Various optimizations to the Splash output device - * Add the possibility to use floats instead of doubles in the Splash output device. Bug #25578 - * Write out fixed-content portion of Type 1 fonts in the PS output device - - build system: - * Improvements to the CMake build system - * Enable AM_SILENT_RULES by default in autotools - * Require glib 2.18 - * Require GTK+ 2.14 - * Make fontconfig optional with mingw compiler - * Remove makefile.vc - - glib: - * Add support for file attachment annotations - * Improvements to the demo - * Use TextOutputDev to get TextPage when we haven't rendered the page - * Remove support for the Splash output device - - utils: - * pdftoppm can now write to jpeg - * pdftoppm embeds the correct resolution in png and jpeg files - - qt4: - * Minor improvements to the tests - -Release 0.12.3 - - core: - * Be more lenient with /Decode key on images. Bug #17439 - * Correctly initialize fileName in LinkGoToR. Bug #25221 - * Improve the reconstruction of the XRef for broken files - * [Cairo backend] Do not crash on malformed files. Bug #24575 - * Accept Fontname if FontName is not present. KDE bug #217013 - * Make PSOutputDev code a bit more resilient - * Fix writing of null objects. Bug #25465 - * [Cairo backend] Fix crash in some documents. GNOME bug #603934 - * Correctly initialize profileCommands in Gfx constructor - - build system: - * Check for openjpeg in the C++ part as it uses bool in the header. Bug #25103 - -Release 0.12.2 - - core: - * Fix a memory leak when converting to PostScript - * Fix crash when reading a font fails. Bug #24525 - * Make the ICC cache per page instead of global. Bug #24686 - * Do not accept negative interval lengths in the page labels tree. Bug #24721 - * Do not crash on files Aspect of Movie objects are reals instead of integers. Bug #24733 - * Do not render patterns when using CairoImageOutputDev - * Allow Transitions dictionary to be a Ref - * Do not crash if jpeg_start_decompress fails. KDE bug #214317 - - glib: - * Fix CVE-2009-3607 - - qt4: - * Use '.' in the annotations XML instead of the decimal separator of the current locale - -Release 0.12.1 - - core: - * Fix compilation on some compilers - * Only initialize the font list once in Windows32/MSVC - * Do not crash on fonts without CharCodeToUnicode. Bug #24036 - * Fix regression due to not setting LC_NUMERIC anymore - * Improve realibility for Streams with broken Length. Bug #6841 - * Write the Info into the trailer dict if there is one. Bug #24091 - * Do not crash when saving files that come from a stream without name. Bug #24090 - * Improve relability of the save function - * Fix the Length value if it was wrong when saving - * Fix includes for those using internal headers - * Rework how hinting is used in the splash backend. It is disabled by default now - * fix constructor of DCTStream when using internal decoder - * Security fixes based xpdf 3.02pl4 - - qt4: - * Add the possibility of setting wheter to use or not font hinting - * Add a way for converters to return more exact errors they had when converting - * Check the document is not locked when converting to PS - - build system: - * Compile on Cygwin - * Use _WIN32 instead of WIN32. Bug #24259 - * Add the possibility to pass LIB_SUFFIX when using CMake - -Release 0.12.0 - - core: - * Fix printf format security warnings - * Improve rendering of radial shadings. Bug #20238 - * Better fallback when there's a font type mismatch. Bug #17252 - * Do not crash on attachments without data stream. Bug #10386 - * Fix infinite loop in JBIG2Decoder. Bug #23025 - - build system: - * Minimizes pkg-config dependencies for Qt frontends - * Add automake 1.11 support - * Use the newest automake found and not the oldest - * Support AM_SILENT_RULES when using automake 1.11 - - utils: - * Add common options to pdftoabw - -Release 0.11.3 (0.12 RC 1) - - core: - * Optimization in the Cairo renderer for some fonts - * Do not apply masks when fill color space mode is csPattern in the Cairo renderer. Bug #22216 - * Check for overflow when parsing integers. Bug #23078 - * Do not save the font file twice for FreeType fonts in the Cairo renderer. Bug #20491 - * Use current fill_opacity when drawing images in the Cairo renderer - * Fix alpha rendering in some files in the Splash renderer. Bug #22143, #22152 - * Implement tiling patterns in the Cairo renderer - * When converting a cm matrix to PS write 4 significant digits for numbers < 1 not 4 decimals. Bug #23332 - * Fix changing of locale, now poppler no longer changes LC_NUMERIC to "C" - * Return PDF version as two integers instead of as a double - - Qt4: - * Addition of the Color Management API - * Small fix to documentation - * Fix backwards text search - - utils: - * Add the -png flag to pdftoppm to output to PNG - -Release 0.11.2 (0.12 Beta 2) - - core: - * Make DecryptStream return sane values for getPos(). Bug #19706 - * Fix bug when printing pdf with multiple page sizes in duplex mode - * Initilize AnnotColot properly when the Array is not correct - * Fix crash on some files with forms. Bug #22485 - * Fix crash in files with invalid embedded files. Bug #22551 - * Improve FileSpec attribute parsing - * Cairo output device improvements. Bugs #10942, #18017, #14160 - * Implement blend modes in cairo backend - * Handle fontType1COT fonts in CairoFontEngine - * Fix generation of PS for some files. Bug #18908 - * Don't use byte_lookup table when color space doesn't support getLine methods. Bug #11027 - * Fix rendering of PDF files with malformed patterns. Bug #22835 - * Add the possibility of disabling font substitution in pdftops. Bug #23030 - * Fix some radio buttons not being detected as such - - glib: - * Improvements to the demo - - Qt4: - * Improvements to the demo - - build system: - * Use gtkbuilder rather than libglade for some tests - - utils: - * Fix bug with noCrop parameter in pdftops - -Release 0.11.1 (0.12 Beta 1) - - core: - * Support colorizing text in pattern colorspace. Bug #19670 and #19994 - * Add the possibility of forcing no hinting of fonts in the Splash backend - * Support multiple page sizes when converting to PS. Bug #19777 - * Also tokens with leading 00 when parsing the char to unicode map. Bug #22025 - * Improvements of rendering speed in documents using PS transformations a lot. Bug #21562 - * More work on Annotations support - * Use Interpolate flag to decide whether applying image interpolation during rendering. Bug #9860 - * Handle Streams in CMap definitions. Bug #22334 - * Fix some bugs in JBIG2Stream handling - * Fix dashed line in page 1 of bug 20011 - * Fix exit(1) when rendering a file - * Fix pdftops crash on file from KDE bug #174899 - * Fix PS generation in some files. Bug #20420 - * Do not create the GfxColorTransform if the lcms could not be created. Bug #20108 - * Check Mask entries are int before using them, if they are real cast to int and try to use them. Bug #21841 - * Use the correct value when creating the V field for form combo boxes - * Give an error when using level1sep in pdftops without having CMYK support. Bug #22026 - * Don't include lcms.h in GfxState.h - * Fix splashColorModeNComps to correctly include all values for each SplashColorMode - * Add splashClearColor that assigns white to the given colorptr - * Kill support for specifying extension in openTmpFile. Bug #21713 - * Fix "Conditional jump or move depends on uninitialised value". Bug #20011 - - glib: - * Add poppler_annot_markup_has_popup() - * Hyphenate UTF-8 and UTF-16BE. Bug #21953 - * Use g_strerror instead of strerror. Bug #22095 - * Fix a crash when a destination points to an invalid page - * Improvements to the demo - - Qt4: - * Add LinkDestination::destinationName() - * Do not try to resolve named destinations for GoTo links pointing to external documents - * Add Page::thumbnail() - * Improvements to the demo - * Improvements to the documentation - - build system: - * Build fix for MSVC - * Better lcms cmake check comming from kdelibs - * Use pkgconfig for autotools lcms check - * Remove unneeded files from repo. Bug #22094 - -Release 0.11.0 (0.12 Alpha) - - core: - * Add initial support for color management - * Remove case-insensitive matching of filenames in PDFDoc constructor - * Fix extraction of some ActualText content - * More work on Annotations support - * Improve font rendering in Cairo output device - * Fix bug in cairo backend with nested masks - * Fix cairo luminosity smask rendering - * Add optionally text support to Cairo output device - * Add the possibility of setting the datadir on runtime - * Return an error code instead of a boolean when saving - * Make the font scanner more versatile - * Small opimization in documents that use PostScriptFunction transforms - * Minor optimization to Stream handling - * Fix some compile warnings - - glib: - * Optional content support - * More work on Annotations support - * Improvements to the demo - * Documentation improvements - * Fix build when compiling with GTK_DISABLE_SINGLE_INCLUDES - - Qt4: - * Support URI actions for Table Of Contents items - * Documentation improvements - * Improvements to the demo - * Add a FontIterator for iterating through the fonts of the document - - utils: - * Allow the use of cropbox in pdftoppm - * Make pdftohtml output png images when the image stream is not a jpeg - * Make pdftotext accept cropping options like pdftoppm - * Support rendering non-square pixels in pdftoppm - - build system: - * Require Cairo 1.8.4 for the Cairo output device - * Require CMake 2.6 when using the CMake build system - * Optionally require libpng for pdftohtml - * Optionally require libcms for color management - -Release 0.10.6 - - core: - * Fix problems that happen when parsing broken JBIG2 files. - CVE-2009-0799, CVE-2009-0800, CVE-2009-1179, CVE-2009-1180 - CVE-2009-1181, CVE-2009-1182, CVE-2009-1183, CVE-2009-1187, CVE-2009-1188 - * Fix parsing of incorrect border arrays. Bug #19761 - * Fix clip test for fonts. Bug #20950 - * Fix getGlyphAdvance to behave correctly on font size changes. Bug #20769 - * Misc build fixes - - build system: - * Fix the Qt4 version we need - -Release 0.10.5 - - core: - * Read the UF entry if present and prefer it over F in Filespec dictionary - * Fix typo that was making CairoOutputDev crash on some files. Bug #17337 - * Make JBIG2Stream more robust to corrupt input data - * Do not blindly follow loops parsing OutlineItem. Bug #18364 - * Set up the error manager before calling jpeg_create_decompress. Bug #20484 - * Check there is an optional content config before using it. Bug #20587 - * Fix rendering of some PDF with OpenType fonts. Bug #20605 - - build system: - * Yet more support for build on windows - * Use AC_CHECK_HEADER to find headers. Bug #20538 - * Check for pkgconfig before using it - * General autotools improvements - -Release 0.10.4 - - core: - * Fix a memory leak when asking for a document-level JS - * Do not crash in some PDF we do not parse correctly. Bug #19702 - * Fix crash on unexepcted form Opt value. Bug #19790 - - utils: - * Fix pdfimages to extract i color components per pixel jpeg images. Bug #19789 - -Release 0.10.3 - - core: - * Fix a crash on documents with malformed outline. Bug #19024 - * Fix leak on AnnotScreen destructor. Bug #19095 - * Fix wrong PS generation when a large image is in Patterns. Bug #18908 - * Remove BaseFile.h it was never used. Bug #19298 - * Improve document saving - * Fix PS generation of PDF with malformed font Length2 definition - * Fix a leak while parsing annotations - * Fix rendering of some checkboxes - - Qt4: - * Fix positioning of Form rects on PDF with cropbox - * Fix positioning of Annotation rects on PDF with cropbox. Bug #18558. - * Small documentation improvements - * Make Document::fonts() work when called more than once. Bug #19405 - - build system: - * CMake: look harder for openjpeg - * CMake: update the poppler core headers installation - * Autotools: do not install Function.cc as it's not a header - - Qt: - * Fix deserialization of links right coordinate - -Release 0.10.2 - - core: - * Fix a crash when selecting text in word mode - * Fix a crash in some malformed documents (second argument of opMarkPoint is not a dictionary) - * Ensure cairo font matrix is invertable. Fixes bugs #18254 and #18429 - * Fix a memory leak (Bug #18924) - - Qt4: - * Fix deserization of links right coordinate - - misc: - * Fix build on Solaris 10 + Sun Studio 12 - * Compile with -pedantic - -Release 0.10.1 - - core: - * Improvements in Optional Content support - * Small fix in Form support - * Fix memory leak in case of error - * Fix potential crash on text search - * Try render documents with invalid indexed color space parameters. Bug #18374 - * Fix crash on text extraction when poppler-data is not installed. Bug #18023 - - Qt: - * Fix two memory leaks - - Qt4: - * Small documentation improvement - * Fix memory leak in the demo code - -Release 0.10.0 - - core: - * Fix crashes on PDF using Stitching or Axial Shading painting - * Fix rendering of PDF with Type1 fonts that have more than - one encoding definition per line - * Do not try to save documents that have Encryption as we - do not support that and the user ended with a broken file - * Fix crash on files with OptionalContentGroup but no Name - - Qt4: - * Fix the area of the links to be correctly reported on rotated documents - - misc: - * Mingw+Msys should work - -Release 0.9.3 (0.10 RC 2) - - core: - * Fix rendering regression on some embedded fonts - * Fix rendering regression of some special fonts - * Fix crash on documents with bogus jpeg data - - Qt4: - * The printing flag defaults to true on PSConverter - * Documentation improvement - - utils: - * Fix regression that made HmtlOutputDev ignore jpeg images - - misc: - * Improve compilation on mingw - -Release 0.9.2 (0.10 RC 1) - - core: - * Fix conversion to PS some files (bug #17645) - * Small Form fixes - * Small JS fixes - * Improve memory usage of the cairo renderer - - utils: - * Fix mismatched free/delete in pdftohtml - * Fix memory leak in pdftohtml - * Fix crash in pdftohtml - - glib: - * Fix a crash in forms demo - - misc: - * Compile with -pedantic - -Release 0.9.1 (0.10 Beta 2) - - Core: - * Fix crash on some AESv2 encrypted files (bugs #13972, #16092, #17523) - * Improve parsing of broken files (bug #17568) - - glib frontend: - * Minor improvements to the demo application - - utils: - * pdftohtml: Generate the outline file in the same place - of the other generated files (bug #17504) - -Release 0.9.0 (0.10 Beta 1) - - Core: - * Initial JavaScript support - * Annotation improvements - * Improvements in the Arthur based renderer - * Improvements in the Cairo based renderer - * Added a JPEG2000 decoder based on OpenJPEG - * Small fixes in ActualText implementation - * Fix jpeg rendering when not using the libjpeg based decoder - * Movie fixes - * Do not get out of memory on documents that specify huge fonts - * Emulate Adobe Reader behaviour on documents with duplicate keys in Dictionaries - * Forms improvements - - Qt4 frontend: - * Annotation improvements - * Forms improvements - * Add the possibility of extracting embedded fonts - * Initial Movie support - * Documentation improvements - * Small improvements in the PS exporter - - glib frontend: - * Annotation improvements - * Attachment fixes - - utils: - * updated man pages - * Added -listenc to pdfinfo and pdftotext - -Release 0.8.7 - - Core: - * Fix regression in Form rendering - * Fix memory leak in the cairo backend - -Release 0.8.6 - - Core: - * Call error() when font loading fails - * Be less strict parsing TTF tables (bug #16940) - * Fix crash due to uninitialized variable - - Qt 4 frontend: - * Make the paper color setting working as it should - * Make sure to use the correct page width/height for form widgets coordinates - -Release 0.8.5 - - Core: - * Fix crash on PDF that define a page thumbnail but it's not a Stream - * Fix crash when Annots object is not of the desired type - * Fix crash when obtaining fonts in PDF where XObjects link themselves in loops - * Fix crash on documents with an IRT object - * Saving should work much better now - * Plug some memory leaks in Annotation handling - - Utils: - * pdftohtml: Don't crash on documents that specify an invalid named dest for a link - * pdftohtml: Make html output to keep all the spaces with   - * pdftohtml: Improve a bit text layout - * pdftohtml: Make xml output valid xml - -Release 0.8.4 - - Core: - * Fix leak in ABWOutputDev.cc - * Fix uninitialized variable that broke file saving in some cases - * Use a single global FT_Library in CairoOutputDev. - Fixes some crashes in CairoOutputDev. - - Qt 4 frontend: - * Fix saving over existing files - - build system: - * Make sure Qt4 moc is used to generate moc files in Qt4 frontend - -Release 0.8.3 - - Core: - * Fix crash when reading some PDF with annotations - * Fix crash on PDF that reference Optional Content elements that don't exist - * Fix leaks on error conditions - * Do not limit CharCodeToUnicodeString to 8 characters - * Support for surrogates outside the BMP plane - - Qt 3 frontend: - * Fix crash when reading PDF with password - * Fix leak when calling scanForFonts() - - Qt 4 frontend: - * Fix the text() method - - Splash renderer: - * Fix compilation with --enable-fixedpoint - -Release 0.8.2 - - core: - * Fix call broken by a fix introduced in 0.8.1 - -Release 0.8.1 - - core: - * Do not call FT_Done_Face on a live cairo_font_face_t as it might cause crashes - * Do not take into account Colorspace resource subdictionary for image XObjects - * Downsample 16 bit per component images to 8 bit per component so they render - - build system: - * Link to pthread when the system needs it - - windows: - * Fix comparing against NULL instead against INVALID_HANDLE_VALUE when calling FindFirstFile - -Release 0.8.0 - - * Fix caching of members in the glib frontend causing issues with rendering - * Change glib public api to have a correct naming - * Some better error handling on corner cases - * Check the document stream is seekable when opening it - * Build fixes with autotools and with cmake - * Fix infinite recursion on some malformed documents when consulting the fonts - * Fix possible crash when asking for Movie contents - -Release 0.7.3 (0.8 RC 2) - - * Fix regression in Splash renderer - * Fix off-by-one write in Splash - * Plug some minor leaks in Optional Content code - * Improve error handling when creating a document in the glib frontend - -Release 0.7.2 (0.8 RC 1) - - Major Changes: - * Improve font matching not forcing default values onto Fontconfig - * Add preliminary annotations support in the glib frontend - * Initial Movie support in the core - * Make GDK dependency optional in glib bindings - - Minor Changes: - * Make the core able to read mime types of embedded files - * Qt4 API for accessing mime types of embedded files - * Handle correctly check state of optional content groups - regarding parents state - * Avoid setting singular CTM matrices on the Cairo backend - * Improved Qt4 API to get character position - * Qt4 api documentation improvements - * Qt4 minor stability fixes - * Proper lib64 Qt detection - * Fix build when compiling without cairo support - -Release 0.7.1 (0.8 Beta 2) - - Major Changes: - * Really distribute CMake files as optional build tool - * Initial Optional Content support in core and in the Qt4 frontend - - Minor Changes: - * Allow grouped checkboxes to be selected individually - * Qt4 demo program improvements - * Keep cairo and cairo_shape consistent - * Safety checks on Splash renderer so that it does not draw outside the allocated bitmap - * Do not try to display bitmaps of invalid size - * Fix building with exceptions - * Improvements for building with MSVC and CMake - -Release 0.7.0 (0.8 Beta 1) - - * Saving support - * Partial annotation support - * Forms improvements - * Add support for ActualText entries - * Display characters outside of unicode BMP with TT font - * CJK rendering fixes - * Implement Adobe Glyph Naming convention for fonts - * CMake as optional build tool - * Better font scaling for non embedded fonts - * Preserve PDF page labels when we output as postscript - -Release 0.6.4 - - Qt4 frontend: - * Fix crash on links that point to a non existent page - * Make Document::renderHints return the correct render hints - * Fix infinite loop when parsing LineAnnotation - - core: - * Fix crash in the Splash renderer when T3 fonts are badly defined - * Draw underlined Links correctly - - utils: - * Fix two use after free bugs in HtmlOutputDev.cc - - build system: - * Fix build on mingw32 - - tests: - * Distribute the glade file of pdf-inspector - -Release 0.6.3 - - core: - * Fix crash in extra debug code - - glib frontend: - * Make sure passwords are passed correctly to poppler core - - Qt frontend: - * Fix crash on documents that specify an empty date - - build system: - * Disable gtk tests if the user disabled glib frontend - -Release 0.6.2 - - poppler core: - * Fix CVE-2007-4352, CVE-2007-5392 and CVE-2007-5393 - * Fix a crash on documents with wrong CCITTFaxStream - * Fix a crash in the Cairo renderer with invalid embedded fonts - * Fix a crash with invalid TrueType fonts - * Check if font is inside the clip area before rendering - it to a temporary bitmap in the Splash renderer. Fixes crashes on - incorrect documents - * Do not use exit(1) on DCTStream errors - * Detect form fields at any depth level - * Do not generate appearance stream for radio buttons that are not active - * mingw fixes - - build system: - * Require fontconfig >= 2.0 - * builddir != srcdir fixes - - Qt4 frontend: - * Improved documentation - - misc: - * Fix FSF address - -Release 0.6.1 - - poppler core: - * Fix printing with different x and y scale - * Fix crash when Form Fields array contains references to non existent objects - * Fix crash in CairoOutputDev::drawMaskedImage() - * Fix embedded file description not working on some cases - - Qt4 frontend: - * Fix printing issue - * Avoid double free - * Fix memory leak when dealing with embedded files - - glib frontend: - * Fix build with --disable-cairo-output - * Do not return unknown field type for signature form fields - - build system: - * Support automake-1.10 - * More compatible sh code in qt.m4 - - utils: - * Fix build on Sun Studio compiler - -Release 0.6 - - - CairoOutputDev fixes - - Allow pdftoppm to read/write from stdin/stdout - - API work on Qt4 frontend - - Fix pdfimages produces inverted image for black & white image - - Fix error on the NFKC text matching routine - - Add support for word and line selections - - Do not enforce %%EOF at the end of file - - Pad zeroes instead of aborting when rendering 1-bit images - and the stream is too short - - Update glib bindings documentation - -Release 0.5.91 (0.6 Release Candidate 2) - - - Various memory leaks fixed - - Compile with --enable-fixedpoint. Bug #11110 - - Header cleanup - - Remove dependency on debugxml. Bug #11187 - - Allow access to document metadata in glib and qt4 frontends - - Several glib API frontend improvements - - Fix crash on accessing embedded files - - Build on Sun Force compiler - - Render '*' instead of the actual content in password form fields - - Fix pdftohtml complex output. Bug #9746 and #11610 - - Windows build fixes - - Improve Japanese font support. Bug #11413 - - Do not exit the program on files that confuse libjpeg - - Update required cairo version to 1.4 - - Fix CVE-2007-3387 - -Release 0.5.9 (0.6 Release Candidate) - - - Merge xpdf 3.02 changes - - Qt4 frontend is not marked anymore as unstable - - Support for Sound objects - - Support for Opening/Closing page actions - - Support for page duration - - Improve PS Tokenizer performance thanks to Scott Turner - - Various speed ups by Krzysztof Kowalczyk - - Beginning of Interactive Form support by Julien Rebetez - - xpdfrc is no longer used for anything - - Add AbiWord output device and pdftoabw program by Jauco Noordzij - - Fix security issue MOAB-06-01-2007 - - Lots of bugs fixed - -Release 0.5.4 - - - Automatically read in CJK encoding files if they're - installed (#2984, #7105, #7093). This works with the new - poppler-data package. - - Speed ups by Krzysztof Kowalczyk (#8112) - - Patch from Dom Lachowicz to let the utils take input on stdin. - - Bugs fixed (#8182, #4649, #7906, #8048, #7113, #4515, #3948, - #7924, #7780, #7646, #6948, #7788, #7661, #7005) - -Release 0.5.3 - - - Add poppler as a private requires of poppler-glib. - - Allow CairoFont creation to fail more gracefully (#4030). - - Back out the rest of krh's type3 font work. - - Revert splashModeRGB8 changes. - - Add missing poppler-annotation-helper.h. - -Release 0.5.2 - - - Much improved Qt bindings (Albert Astals Cid). - - Cairo backend now supports masked images (Jeff Muizelaar, #6174). - - Patches from Kouhei Sutou to make glib bindings more - language binding friendly (#6907, #6897, #6899, #6905). - - Search now works with ligatures (Ed Catmull, #2929). - - The glib bindings now has an entry point to render to a cairo_t. - - GCC 4.1 and MSVC compilation fixes. - - Memory leaks plugged: #6908, #6947, #6765, #6764, #6187 - - Misc bug fixes: #6984, #6896, #6913, #6926, #4481, #5951, - #6551, #6500, #6492, #6454, #6079, #6167. - -Release 0.5.1 - - - Support for embedded files. - - Handle 0-width lines correctly. - - Avoid external file use when opening fonts. - - Only use vector fonts returned from fontconfig (#5758). - - Fix scaled 1x1 pixmaps use for drawing lines (#3387). - - drawSoftMaskedImage support in cairo backend. - - Misc bug fixes: #5922, #5946, #5749, #5952, #4030, #5420. - -Release 0.5.0 - - - Font matching code for non embedded fonts now use fontconfig - instead of hard coded list of fonts. - - Merge in Xpdf 3.01 changes. - - Add command line tools from Xpdf. - - Make install of Xpdf header files ./configure'able. - -Release 0.4.0 - - - Real text selection. - - API breakage in glib wrapper: dropping dest_x and dest_y - arguments from poppler_page_render_to_pixbuf(). - -Release 0.3.3 - - - New glib API to get document font information (Marco). - - More document properties available as glib properties (Emil - Soleyman-Zomalan, #3359) - - Optimize color conversion for images. - - Support for constant opacity. - - Fix problems with pkg-config files. - - Bugs fixes: #3491, #2911, #3362, #3340, #3265, #3239, #3396. - -Release 0.3.2 - - - New API to get poppler version and backend type. - - Various font fixes from Albert Astals Cid. - - Update to cairo 0.5.0 API, including better font support. - - Meta data for the glib binding. - -Release 0.3.1 - - - Add qt/poppler-private.h to SOURCES - - Jeff's path to use zlib instead of builtin decompression. - - Bug fixes: #2934, segfault on invalid links, #3114 - -Release 0.3.0 - - - First cut at qt wrapper, including a getText() method for - getting text from a page. - - More glib functionality: meta data, set page orientation, - print to PS - - Performance fixes for glib cairo - - Bug fixes - -Release 0.2.0 (Tue Apr 5 12:32:10 EDT 2005) - - - Add glib wrapper for poppler, which will use cairo rendering - if available - - Support for page labels - - configure and build fixes. - -Release 0.1.2 (Wed Mar 9 10:45:58 EST 2005) - - - cairo optimizations and fixes from Jeff Muizelaar - - Bump cairo requirement to 0.4 - - Make cairo and gtk checks fail gracefully - -Release 0.1.1 - - - Fix issues with installed header files including config.h - - Fix a couple of typos in pkg-config files - - Install splash and cairo header files when necessary - -Release 0.1 - no date yet - - - First release - - More NEWS here diff --git a/Build/source/libs/poppler/poppler-src/README b/Build/source/libs/poppler/poppler-src/README deleted file mode 100644 index dc3c19ec31b..00000000000 --- a/Build/source/libs/poppler/poppler-src/README +++ /dev/null @@ -1,39 +0,0 @@ -This is poppler, a PDF rendering library. - -Poppler is a fork of the xpdf PDF viewer developed by Derek Noonburg -of Glyph and Cog, LLC. The purpose of forking xpdf is twofold. -First, we want to provide PDF rendering functionality as a shared -library, to centralize the maintenance effort. Today a number of -applications incorporate the xpdf code base, and whenever a security -issue is discovered, all these applications exchange patches and put -out new releases. In turn, all distributions must package and release -new version of these xpdf based viewers. It's safe to say that -there's a lot of duplicated effort with the current situation. Even if -poppler in the short term introduces yet another xpdf derived code -base to the world, we hope that over time these applications will -adopt poppler. After all, we only need one application to use poppler -to break even. - -Second, we would like to move libpoppler forward in a number of areas -that don't fit within the goals of xpdf. By design, xpdf depends on -very few libraries and runs a wide range of X based platforms. This -is a strong feature and reasonable design goal. However, with poppler -we would like to replace parts of xpdf that are now available as -standard components of modern Unix desktop environments. One such -example is fontconfig, which solves the problem of matching and -locating fonts on the system, in a standardized and well understood -way. Another example is cairo, which provides high quality 2D -rendering. See the file TODO for a list of planned changes. - -Please note that xpdf, and thus poppler, is licensed under the GPL, -not the LGPL. Consequently, any application using poppler must also -be licensed under the GPL. If you want to incorporate Xpdf based PDF -rendering in a closed source product, please contact Glyph & Cog -(www.glyphandcog.com) for commercial licensing options. Note that -this only allows you to use xpdf in a closed source product, -not poppler itself. - - Kristian Høgsberg, Feb. 27, 2005 - - -See the README-XPDF for the original xpdf-3.03 README. diff --git a/Build/source/libs/poppler/poppler-src/README-XPDF b/Build/source/libs/poppler/poppler-src/README-XPDF deleted file mode 100644 index e97791ce5b2..00000000000 --- a/Build/source/libs/poppler/poppler-src/README-XPDF +++ /dev/null @@ -1,423 +0,0 @@ -Xpdf -==== - -version 3.03 -2011-aug-15 - -The Xpdf software and documentation are -copyright 1996-2011 Glyph & Cog, LLC. - -Email: derekn@foolabs.com -WWW: http://www.foolabs.com/xpdf/ - -The PDF data structures, operators, and specification are -copyright 1985-2006 Adobe Systems Inc. - - -What is Xpdf? -------------- - -Xpdf is an open source viewer for Portable Document Format (PDF) -files. (These are also sometimes also called 'Acrobat' files, from -the name of Adobe's PDF software.) The Xpdf project also includes a -PDF text extractor, PDF-to-PostScript converter, and various other -utilities. - -Xpdf runs under the X Window System on UNIX, VMS, and OS/2. The non-X -components (pdftops, pdftotext, etc.) also run on Windows and Mac OSX -systems and should run on pretty much any system with a decent C++ -compiler. Xpdf will run on 32-bit and 64-bit machines. - - -License & Distribution ----------------------- - -Xpdf is licensed under the GNU General Pulbic License (GPL), version 2 -or 3. This means that you can distribute derivatives of Xpdf under -any of the following: - - GPL v2 only - - GPL v3 only - - GPL v2 or v3 - -The Xpdf source package includes the text of both GPL versions: -COPYING for GPL v2, COPYING3 for GPL v3. - -Please note that Xpdf is NOT licensed under "any later version" of the -GPL, as I have no idea what those versions will look like. - -If you are redistributing unmodified copies of Xpdf (or any of the -Xpdf tools) in binary form, you need to include all of the -documentation: README, man pages (or help files), COPYING, and -COPYING3. - -If you want to incorporate the Xpdf source code into another program -(or create a modified version of Xpdf), and you are distributing that -program, you have two options: release your program under the GPL (v2 -and/or v3), or purchase a commercial Xpdf source license. - -If you're interested in commercial licensing, please see the Glyph & -Cog web site: - - http://www.glyphandcog.com/ - - -Compatibility -------------- - -Xpdf is developed and tested on Linux. - -In addition, it has been compiled by others on Solaris, AIX, HP-UX, -Digital Unix, Irix, and numerous other Unix implementations, as well -as VMS and OS/2. It should work on pretty much any system which runs -X11 and has Unix-like libraries. You'll need ANSI C++ and C compilers -to compile it. - -The non-X components of Xpdf (pdftops, pdftotext, pdfinfo, pdffonts, -pdfdetach, pdftoppm, and pdfimages) can also be compiled on Windows -and Mac OSX systems. See the Xpdf web page for details. - -If you compile Xpdf for a system not listed on the web page, please -let me know. If you're willing to make your binary available by ftp -or on the web, I'll be happy to add a link from the Xpdf web page. I -have decided not to host any binaries I didn't compile myself (for -disk space and support reasons). - -If you can't get Xpdf to compile on your system, send me email and -I'll try to help. - -Xpdf has been ported to the Acorn, Amiga, BeOS, and EPOC. See the -Xpdf web page for links. - - -Getting Xpdf ------------- - -The latest version is available from: - - http://www.foolabs.com/xpdf/ - -or: - - ftp://ftp.foolabs.com/pub/xpdf/ - -Source code and several precompiled executables are available. - -Announcements of new versions are posted to comp.text.pdf and emailed -to a list of people. If you'd like to receive email notification of -new versions, just let me know. - - -Running Xpdf ------------- - -To run xpdf, simply type: - - xpdf file.pdf - -To generate a PostScript file, hit the "print" button in xpdf, or run -pdftops: - - pdftops file.pdf - -To generate a plain text file, run pdftotext: - - pdftotext file.pdf - -There are five additional utilities (which are fully described in -their man pages): - - pdfinfo -- dumps a PDF file's Info dictionary (plus some other - useful information) - pdffonts -- lists the fonts used in a PDF file along with various - information for each font - pdfdetach -- lists or extracts embedded files (attachments) from a - PDF file - pdftoppm -- converts a PDF file to a series of PPM/PGM/PBM-format - bitmaps - pdfimages -- extracts the images from a PDF file - -Command line options and many other details are described in the man -pages (xpdf(1), etc.) and the VMS help files (xpdf.hlp, etc.). - -All of these utilities read an optional configuration file: see the -xpdfrc(5) man page. - - -Upgrading from Xpdf 3.02 (and earlier) --------------------------------------- - -The font configuration system has been changed. Previous versions -used mostly separate commands to configure fonts for display and for -PostScript output. As of 3.03, configuration options that make sense -for both display and PS output have been unified. - -The following xpdfrc commands have been removed: -* displayFontT1, displayFontTT: replaced with fontFile -* displayNamedCIDFontT1, displayNamedCIDFontTT: replaced with fontFile -* displayCIDFontT1, displayCIDFontTT: replaced with fontFileCC -* psFont: replaced with psResidentFont -* psNamedFont16: replaced with psResidentFont16 -* psFont16: replaced with psResidentFontCC - -See the xpdfrc(5) man page for more information on the new commands. - -Pdftops will now embed external 16-bit fonts (configured with the -fontFileCC command) when the PDF file refers to a non-embedded font. -It does not do any subsetting (yet), so the resulting PS files will be -large. - - -Compiling Xpdf --------------- - -See the separate file, INSTALL. - - -Bugs ----- - -If you find a bug in Xpdf, i.e., if it prints an error message, -crashes, or incorrectly displays a document, and you don't see that -bug listed here, please send me email, with a pointer (URL, ftp site, -etc.) to the PDF file. - - -Acknowledgments ---------------- - -Thanks to: - -* Patrick Voigt for help with the remote server code. -* Patrick Moreau, Martin P.J. Zinser, and David Mathog for the VMS - port. -* David Boldt and Rick Rodgers for sample man pages. -* Brendan Miller for the icon idea. -* Olly Betts for help testing pdftotext. -* Peter Ganten for the OS/2 port. -* Michael Richmond for the Win32 port of pdftops and pdftotext and the - xpdf/cygwin/XFree86 build instructions. -* Frank M. Siegert for improvements in the PostScript code. -* Leo Smiers for the decryption patches. -* Rainer Menzner for creating t1lib, and for helping me adapt it to - xpdf. -* Pine Tree Systems A/S for funding the OPI and EPS support in - pdftops. -* Easy Software Products for funding several improvements to the - PostScript output code. -* Tom Kacvinsky for help with FreeType and for being my interface to - the FreeType team. -* Theppitak Karoonboonyanan for help with Thai support. -* Leonard Rosenthol for help and contributions on a bunch of things. -* Alexandros Diamantidis and Maria Adaloglou for help with Greek - support. -* Lawrence Lai for help with the CJK Unicode maps. - -Various people have contributed modifications made for use by the -pdftex project: - -* Han The Thanh -* Martin Schröder of ArtCom GmbH - - -References ----------- - -Adobe Systems Inc., _PDF Reference, sixth edition: Adobe Portable -Document Format version 1.7_. -http://www.adobe.com/devnet/pdf/pdf_reference.html -[The manual for PDF version 1.7.] - -Adobe Systems Inc., "Errata for the PDF Reference, sixth edition, -version 1.7", October 16, 2006. -http://www.adobe.com/devnet/pdf/pdf_reference.html -[The errata for the PDF 1.7 spec.] - -Adobe Systems Inc., _PostScript Language Reference_, 3rd ed. -Addison-Wesley, 1999, ISBN 0-201-37922-8. -[The official PostScript manual.] - -Adobe Systems, Inc., _The Type 42 Font Format Specification_, -Adobe Developer Support Technical Specification #5012. 1998. -http://partners.adobe.com/asn/developer/pdfs/tn/5012.Type42_Spec.pdf -[Type 42 is the format used to embed TrueType fonts in PostScript -files.] - -Adobe Systems, Inc., _Adobe CMap and CIDFont Files Specification_, -Adobe Developer Support Technical Specification #5014. 1995. -http://www.adobe.com/supportservice/devrelations/PDFS/TN/5014.CIDFont_Spec.pdf -[CMap file format needed for Japanese and Chinese font support.] - -Adobe Systems, Inc., _Adobe-Japan1-4 Character Collection for -CID-Keyed Fonts_, Adobe Developer Support Technical Note #5078. -2000. -http://partners.adobe.com/asn/developer/PDFS/TN/5078.CID_Glyph.pdf -[The Adobe Japanese character set.] - -Adobe Systems, Inc., _Adobe-GB1-4 Character Collection for -CID-Keyed Fonts_, Adobe Developer Support Technical Note #5079. -2000. -http://partners.adobe.com/asn/developer/pdfs/tn/5079.Adobe-GB1-4.pdf -[The Adobe Chinese GB (simplified) character set.] - -Adobe Systems, Inc., _Adobe-CNS1-3 Character Collection for -CID-Keyed Fonts_, Adobe Developer Support Technical Note #5080. -2000. -http://partners.adobe.com/asn/developer/PDFS/TN/5080.CNS_CharColl.pdf -[The Adobe Chinese CNS (traditional) character set.] - -Adobe Systems Inc., _Supporting the DCT Filters in PostScript Level -2_, Adobe Developer Support Technical Note #5116. 1992. -http://www.adobe.com/supportservice/devrelations/PDFS/TN/5116.PS2_DCT.PDF -[Description of the DCTDecode filter parameters.] - -Adobe Systems Inc., _Open Prepress Interface (OPI) Specification - -Version 2.0_, Adobe Developer Support Technical Note #5660. 2000. -http://partners.adobe.com/asn/developer/PDFS/TN/5660.OPI_2.0.pdf - -Adobe Systems Inc., CMap files. -ftp://ftp.oreilly.com/pub/examples/nutshell/cjkv/adobe/ -[The actual CMap files for the 16-bit CJK encodings.] - -Adobe Systems Inc., Unicode glyph lists. -http://partners.adobe.com/asn/developer/type/unicodegn.html -http://partners.adobe.com/asn/developer/type/glyphlist.txt -http://partners.adobe.com/asn/developer/type/corporateuse.txt -http://partners.adobe.com/asn/developer/type/zapfdingbats.txt -[Mappings between character names to Unicode.] - -Adobe Systems Inc., OpenType Specification v. 1.4. -http://partners.adobe.com/public/developer/opentype/index_spec.html -[The OpenType font format spec.] - -Aldus Corp., _OPI: Open Prepress Interface Specification 1.3_. 1993. -http://partners.adobe.com/asn/developer/PDFS/TN/OPI_13.pdf - -Anonymous, RC4 source code. -ftp://ftp.ox.ac.uk/pub/crypto/misc/rc4.tar.gz -ftp://idea.sec.dsi.unimi.it/pub/crypt/code/rc4.tar.gz -[This is the algorithm used to encrypt PDF files.] - -T. Boutell, et al., "PNG (Portable Network Graphics) Specification, -Version 1.0". RFC 2083. -[PDF uses the PNG filter algorithms.] - -CCITT, "Information Technology - Digital Compression and Coding of -Continuous-tone Still Images - Requirements and Guidelines", CCITT -Recommendation T.81. -http://www.w3.org/Graphics/JPEG/ -[The official JPEG spec.] - -A. Chernov, "Registration of a Cyrillic Character Set". RFC 1489. -[Documentation for the KOI8-R Cyrillic encoding.] - -Roman Czyborra, "The ISO 8859 Alphabet Soup". -http://czyborra.com/charsets/iso8859.html -[Documentation on the various ISO 859 encodings.] - -L. Peter Deutsch, "ZLIB Compressed Data Format Specification version -3.3". RFC 1950. -[Information on the general format used in FlateDecode streams.] - -L. Peter Deutsch, "DEFLATE Compressed Data Format Specification -version 1.3". RFC 1951. -[The definition of the compression algorithm used in FlateDecode -streams.] - -Morris Dworkin, "Recommendation for Block Cipher Modes of Operation", -National Institute of Standards, NIST Special Publication 800-38A, -2001. -[The cipher block chaining (CBC) mode used with AES in PDF files.] - -Federal Information Processing Standards Publication 197 (FIPS PUBS -197), "Advanced Encryption Standard (AES)", November 26, 2001. -[AES encryption, used in PDF 1.6.] - -Jim Flowers, "X Logical Font Description Conventions", Version 1.5, X -Consortium Standard, X Version 11, Release 6.1. -ftp://ftp.x.org/pub/R6.1/xc/doc/hardcopy/XLFD/xlfd.PS.Z -[The official specification of X font descriptors, including font -transformation matrices.] - -Foley, van Dam, Feiner, and Hughes, _Computer Graphics: Principles and -Practice_, 2nd ed. Addison-Wesley, 1990, ISBN 0-201-12110-7. -[Colorspace conversion functions, Bezier spline math.] - -Robert L. Hummel, _Programmer's Technical Reference: Data and Fax -Communications_. Ziff-Davis Press, 1993, ISBN 1-56276-077-7. -[CCITT Group 3 and 4 fax decoding.] - -ISO/IEC, _Information technology -- Lossy/lossless coding of bi-level -images_. ISO/IEC 14492, First edition (2001-12-15). -http://webstore.ansi.org/ -[The official JBIG2 standard. The final draft of this spec is -available from http://www.jpeg.org/jbighomepage.html.] - -ISO/IEC, _Information technology -- JPEG 2000 image coding system -- -Part 1: Core coding system_. ISO/IEC 15444-1, First edition -(2000-12-15). -http://webstore.ansi.org/ -[The official JPEG 2000 standard. The final committee draft of this -spec is available from http://www.jpeg.org/JPEG2000.html, but there -were changes made to the bitstream format between that draft and the -published spec.] - -ITU, "Standardization of Group 3 facsimile terminals for document -transmission", ITU-T Recommendation T.4, 1999. -ITU, "Facsimile coding schemes and coding control functions for Group 4 -facsimile apparatus", ITU-T Recommendation T.6, 1993. -http://www.itu.int/ -[The official Group 3 and 4 fax standards - used by the CCITTFaxDecode -stream, as well as the JBIG2Decode stream.] - -B. Kaliski, "PKCS #5: Password-Based Cryptography Specification, -Version 2.0". RFC 2898. -[Defines the padding scheme used with AES encryption in PDF files.] - -Christoph Loeffler, Adriaan Ligtenberg, George S. Moschytz, "Practical -Fast 1-D DCT Algorithms with 11 Multiplications". IEEE Intl. Conf. on -Acoustics, Speech & Signal Processing, 1989, 988-991. -[The fast IDCT algorithm used in the DCTDecode filter.] - -Microsoft, _TrueType 1.0 Font Files_, rev. 1.66. 1995. -http://www.microsoft.com/typography/tt/tt.htm -[The TrueType font spec (in MS Word format, naturally).] - -V. Ostromoukhov, R.D. Hersch, "Stochastic Clustered-Dot Dithering", -Conf. Color Imaging: Device-Independent Color, Color Hardcopy, and -Graphic Arts IV, 1999, SPIE Vol. 3648, 496-505. -http://diwww.epfl.ch/w3lsp/publications/colour/scd.html -[The stochastic dithering algorithm used in Xpdf.] - -P. Peterlin, "ISO 8859-2 (Latin 2) Resources". -http://sizif.mf.uni-lj.si/linux/cee/iso8859-2.html -[This is a web page with all sorts of useful Latin-2 character set and -font information.] - -Charles Poynton, "Color FAQ". -http://www.inforamp.net/~poynton/ColorFAQ.html -[The mapping from the CIE 1931 (XYZ) color space to RGB.] - -R. Rivest, "The MD5 Message-Digest Algorithm". RFC 1321. -[MD5 is used in PDF document encryption.] - -Thai Industrial Standard, "Standard for Thai Character Codes for -Computers", TIS-620-2533 (1990). -http://www.nectec.or.th/it-standards/std620/std620.htm -[The TIS-620 Thai encoding.] - -Unicode Consortium, "Unicode Home Page". -http://www.unicode.org/ -[Online copy of the Unicode spec.] - -W3C Recommendation, "PNG (Portable Network Graphics) Specification -Version 1.0". -http://www.w3.org/Graphics/PNG/ -[Defines the PNG image predictor.] - -Gregory K. Wallace, "The JPEG Still Picture Compression Standard". -ftp://ftp.uu.net/graphics/jpeg/wallace.ps.gz -[Good description of the JPEG standard. Also published in CACM, April -1991, and submitted to IEEE Transactions on Consumer Electronics.] - -F. Yergeau, "UTF-8, a transformation format of ISO 10646". RFC 2279. -[A commonly used Unicode encoding.] diff --git a/Build/source/libs/poppler/poppler-src/README.contributors b/Build/source/libs/poppler/poppler-src/README.contributors deleted file mode 100644 index 5e45331e65f..00000000000 --- a/Build/source/libs/poppler/poppler-src/README.contributors +++ /dev/null @@ -1,21 +0,0 @@ -If you want to become or are a poppler contributor, this is a README for you, keep reading! - -Licensing ---------- -Only send patches to poppler if you agree to license (or relicense) them under -GPLv2 and later (or something more permissive that can be "upgraded" to GPLv2 -and later). If you do not agree to this license, please explain the problem / bug -and how you would solve it in words instead of code. - -By default all patches attached to the bugzilla or sent to the mailing list will -be assumed to agree with the licensing expressed here. - -Channels of contact -------------------- -Poppler has three main channels of contact: - * The poppler mailing list http://lists.freedesktop.org/mailman/listinfo/poppler - * The poppler bug tracker (bugzilla) http://bugs.freedesktop.org - * The #poppler channel at the freenode network -Do not hesitate to drop by talk to people there. - -And keep hacking on poppler! diff --git a/Build/source/libs/poppler/poppler-src/config.h.cmake b/Build/source/libs/poppler/poppler-src/config.h.cmake deleted file mode 100644 index 10ce5580567..00000000000 --- a/Build/source/libs/poppler/poppler-src/config.h.cmake +++ /dev/null @@ -1,209 +0,0 @@ -/* config.h. Generated from config.h.cmake by cmake. */ - -/* Build against libcurl. */ -#cmakedefine ENABLE_LIBCURL 1 - -/* Use libjpeg instead of builtin jpeg decoder. */ -#cmakedefine ENABLE_LIBJPEG 1 - -/* Use libopenjpeg instead of builtin jpeg2000 decoder. */ -#cmakedefine ENABLE_LIBOPENJPEG 1 - -/* Build against libtiff. */ -#cmakedefine ENABLE_LIBTIFF 1 - -/* Build against libpng. */ -#cmakedefine ENABLE_LIBPNG 1 - -/* Do not hardcode the library location */ -#cmakedefine ENABLE_RELOCATABLE 1 - -/* Build against zlib. */ -#cmakedefine ENABLE_ZLIB 1 - -/* Use zlib instead of builtin zlib decoder to uncompress flate streams. */ -#cmakedefine ENABLE_ZLIB_UNCOMPRESS 1 - -/* Build against libnss3 for digital signature validation */ -#cmakedefine ENABLE_NSS3 1 - -/* Use cairo for rendering. */ -#cmakedefine HAVE_CAIRO 1 - -/* Do we have any DCT decoder?. */ -#cmakedefine HAVE_DCT_DECODER 1 - -/* Do we have any JPX decoder?. */ -#cmakedefine HAVE_JPX_DECODER 1 - -/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'. - */ -#cmakedefine HAVE_DIRENT_H 1 - -/* Define to 1 if you have the <dlfcn.h> header file. */ -#cmakedefine HAVE_DLFCN_H 1 - -/* Define to 1 if you have the <fcntl.h> header file. */ -#cmakedefine HAVE_FCNTL_H 1 - -/* Define to 1 if you have the `fseek64' function. */ -#cmakedefine HAVE_FSEEK64 1 - -/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ -#cmakedefine HAVE_FSEEKO 1 - -/* Define to 1 if you have the `ftell64' function. */ -#cmakedefine HAVE_FTELL64 1 - -/* Define to 1 if you have the `pread64' function. */ -#cmakedefine HAVE_PREAD64 1 - -/* Define to 1 if you have the `lseek64' function. */ -#cmakedefine HAVE_LSEEK64 1 - -/* Defines if gettimeofday is available on your system */ -#cmakedefine HAVE_GETTIMEOFDAY 1 - -/* Defines if gmtime_r is available on your system */ -#cmakedefine HAVE_GMTIME_R 1 - -/* Defines if timegm is available on your system */ -#cmakedefine HAVE_TIMEGM 1 - -/* Define if you have the iconv() function and it works. */ -#cmakedefine HAVE_ICONV 1 - -/* Define to 1 if you have the `z' library (-lz). */ -#cmakedefine HAVE_LIBZ 1 - -/* Defines if localtime_r is available on your system */ -#cmakedefine HAVE_LOCALTIME_R 1 - -/* Define to 1 if you have the `mkstemp' function. */ -#cmakedefine HAVE_MKSTEMP 1 - -/* Define to 1 if you have the `rand_r' function. */ -#cmakedefine HAVE_RAND_R 1 - -/* Define to 1 if you have the `strcpy_s' function. */ -#cmakedefine HAVE_STRCPY_S 1 - -/* Define to 1 if you have the `strcat_s' function. */ -#cmakedefine HAVE_STRCAT_S 1 - -/* Defines if strtok_r is available on your system */ -#cmakedefine HAVE_STRTOK_R 1 - -/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */ -#cmakedefine HAVE_NDIR_H 1 - -/* Define to 1 if you have the `popen' function. */ -#cmakedefine HAVE_POPEN 1 - -/* Use splash for rendering. */ -#cmakedefine HAVE_SPLASH 1 - -/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'. - */ -#cmakedefine HAVE_SYS_DIR_H 1 - -/* Define to 1 if you have the <sys/mman.h> header file. */ -#cmakedefine HAVE_SYS_MMAN_H 1 - -/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'. - */ -#cmakedefine HAVE_SYS_NDIR_H 1 - -/* Define to 1 if you have the <sys/stat.h> header file. */ -#cmakedefine HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the <unistd.h> header file. */ -#cmakedefine HAVE_UNISTD_H 1 - -/* Define to 1 if you have a big endian machine */ -#cmakedefine WORDS_BIGENDIAN 1 - -/* Define as const if the declaration of iconv() needs const. */ -#define ICONV_CONST ${ICONV_CONST} - -/* Enable multithreading support. */ -#cmakedefine MULTITHREADED 1 - -/* Generate OPI comments in PS output. */ -#cmakedefine OPI_SUPPORT 1 - -/* Name of package */ -#define PACKAGE "poppler" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "https://bugs.freedesktop.org/enter_bug.cgi?product=poppler" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "poppler" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "poppler ${POPPLER_VERSION}" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "poppler" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "${POPPLER_VERSION}" - -/* Poppler data dir */ -#define POPPLER_DATADIR "${POPPLER_DATADIR}" - -/* Support for curl based doc builder is compiled in. */ -#cmakedefine POPPLER_HAS_CURL_SUPPORT 1 - -/* Include support for CMYK rasterization */ -#cmakedefine SPLASH_CMYK 1 - -/* Enable word list support. */ -#cmakedefine TEXTOUT_WORD_LIST 1 - -/* Defines if use cms */ -#cmakedefine USE_CMS 1 - -/* Use fixed point arithmetic in the Splash backend */ -#cmakedefine USE_FIXEDPOINT 1 - -/* Use single precision arithmetic in the Splash backend */ -#cmakedefine USE_FLOAT 1 - -/* Version number of package */ -#define VERSION "${POPPLER_VERSION}" - -/* Use fontconfig font configuration backend */ -#cmakedefine WITH_FONTCONFIGURATION_FONTCONFIG 1 - -/* Use win32 font configuration backend */ -#cmakedefine WITH_FONTCONFIGURATION_WIN32 1 - -/* OpenJPEG with the OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG flag */ -#cmakedefine WITH_OPENJPEG_IGNORE_PCLR_CMAP_CDEF_FLAG 1 - -/* MS defined snprintf as deprecated but then added it in Visual Studio 2015. */ -#if defined(_MSC_VER) && _MSC_VER < 1900 -#define snprintf _snprintf -#endif - -//------------------------------------------------------------------------ -// popen -//------------------------------------------------------------------------ -#if defined(_MSC_VER) || defined(__BORLANDC__) -#define popen _popen -#define pclose _pclose -#endif - -/* Number of bits in a file offset, on hosts where this is settable. */ -#cmakedefine _FILE_OFFSET_BITS @_FILE_OFFSET_BITS@ - -/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ -/* TODO This is wrong, port if needed #undef _LARGEFILE_SOURCE */ - -/* Define for large files, on AIX-style hosts. */ -/* TODO This is wrong, port if needed #undef _LARGE_FILES */ diff --git a/Build/source/libs/poppler/poppler-src/fofi/FoFiBase.cc b/Build/source/libs/poppler/poppler-src/fofi/FoFiBase.cc deleted file mode 100644 index 2fa71d130be..00000000000 --- a/Build/source/libs/poppler/poppler-src/fofi/FoFiBase.cc +++ /dev/null @@ -1,204 +0,0 @@ -//======================================================================== -// -// FoFiBase.cc -// -// Copyright 1999-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2008 Ed Avis <eda@waniasset.com> -// Copyright (C) 2011 Jim Meyering <jim@meyering.net> -// Copyright (C) 2016 Albert Astals Cid <aacid@kde.org> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include <config.h> - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include <stdio.h> -#include <limits.h> -#include "goo/gmem.h" -#include "poppler/Error.h" -#include "FoFiBase.h" - -//------------------------------------------------------------------------ -// FoFiBase -//------------------------------------------------------------------------ - -FoFiBase::FoFiBase(char *fileA, int lenA, GBool freeFileDataA) { - fileData = file = (Guchar *)fileA; - len = lenA; - freeFileData = freeFileDataA; -} - -FoFiBase::~FoFiBase() { - if (freeFileData) { - gfree(fileData); - } -} - -char *FoFiBase::readFile(char *fileName, int *fileLen) { - FILE *f; - char *buf; - int n; - - if (!(f = fopen(fileName, "rb"))) { - error(errIO, -1, "Cannot open '{0:s}'", fileName); - return nullptr; - } - if (fseek(f, 0, SEEK_END) != 0) { - error(errIO, -1, "Cannot seek to end of '{0:s}'", fileName); - fclose(f); - return nullptr; - } - n = (int)ftell(f); - if (n < 0) { - error(errIO, -1, "Cannot determine length of '{0:s}'", fileName); - fclose(f); - return nullptr; - } - if (fseek(f, 0, SEEK_SET) != 0) { - error(errIO, -1, "Cannot seek to start of '{0:s}'", fileName); - fclose(f); - return nullptr; - } - buf = (char *)gmalloc(n); - if ((int)fread(buf, 1, n, f) != n) { - gfree(buf); - fclose(f); - return nullptr; - } - fclose(f); - *fileLen = n; - return buf; -} - -int FoFiBase::getS8(int pos, GBool *ok) { - int x; - - if (pos < 0 || pos >= len) { - *ok = gFalse; - return 0; - } - x = file[pos]; - if (x & 0x80) { - x |= ~0xff; - } - return x; -} - -int FoFiBase::getU8(int pos, GBool *ok) { - if (pos < 0 || pos >= len) { - *ok = gFalse; - return 0; - } - return file[pos]; -} - -int FoFiBase::getS16BE(int pos, GBool *ok) { - int x; - - if (pos < 0 || pos+1 >= len || pos > INT_MAX - 1) { - *ok = gFalse; - return 0; - } - x = file[pos]; - x = (x << 8) + file[pos+1]; - if (x & 0x8000) { - x |= ~0xffff; - } - return x; -} - -int FoFiBase::getU16BE(int pos, GBool *ok) { - int x; - - if (pos < 0 || pos+1 >= len || pos > INT_MAX - 1) { - *ok = gFalse; - return 0; - } - x = file[pos]; - x = (x << 8) + file[pos+1]; - return x; -} - -int FoFiBase::getS32BE(int pos, GBool *ok) { - int x; - - if (pos < 0 || pos+3 >= len || pos > INT_MAX - 3) { - *ok = gFalse; - return 0; - } - x = file[pos]; - x = (x << 8) + file[pos+1]; - x = (x << 8) + file[pos+2]; - x = (x << 8) + file[pos+3]; - if (x & 0x80000000) { - x |= ~0xffffffff; - } - return x; -} - -Guint FoFiBase::getU32BE(int pos, GBool *ok) { - Guint x; - - if (pos < 0 || pos+3 >= len || pos > INT_MAX - 3) { - *ok = gFalse; - return 0; - } - x = file[pos]; - x = (x << 8) + file[pos+1]; - x = (x << 8) + file[pos+2]; - x = (x << 8) + file[pos+3]; - return x; -} - -Guint FoFiBase::getU32LE(int pos, GBool *ok) { - Guint x; - - if (pos < 0 || pos+3 >= len || pos > INT_MAX - 3) { - *ok = gFalse; - return 0; - } - x = file[pos+3]; - x = (x << 8) + file[pos+2]; - x = (x << 8) + file[pos+1]; - x = (x << 8) + file[pos]; - return x; -} - -Guint FoFiBase::getUVarBE(int pos, int size, GBool *ok) { - Guint x; - int i; - - if (pos < 0 || pos + size > len || pos > INT_MAX - size) { - *ok = gFalse; - return 0; - } - x = 0; - for (i = 0; i < size; ++i) { - x = (x << 8) + file[pos + i]; - } - return x; -} - -GBool FoFiBase::checkRegion(int pos, int size) { - return pos >= 0 && - pos < INT_MAX - size && - size < INT_MAX - pos && - pos + size >= pos && - pos + size <= len; -} diff --git a/Build/source/libs/poppler/poppler-src/fofi/FoFiBase.h b/Build/source/libs/poppler/poppler-src/fofi/FoFiBase.h deleted file mode 100644 index be4e7025336..00000000000 --- a/Build/source/libs/poppler/poppler-src/fofi/FoFiBase.h +++ /dev/null @@ -1,72 +0,0 @@ -//======================================================================== -// -// FoFiBase.h -// -// Copyright 1999-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2018 Albert Astals Cid <aacid@kde.org> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef FOFIBASE_H -#define FOFIBASE_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "goo/gtypes.h" - -//------------------------------------------------------------------------ - -typedef void (*FoFiOutputFunc)(void *stream, const char *data, int len); - -//------------------------------------------------------------------------ -// FoFiBase -//------------------------------------------------------------------------ - -class FoFiBase { -public: - FoFiBase(const FoFiBase &) = delete; - FoFiBase& operator=(const FoFiBase &other) = delete; - - virtual ~FoFiBase(); - -protected: - - FoFiBase(char *fileA, int lenA, GBool freeFileDataA); - static char *readFile(char *fileName, int *fileLen); - - // S = signed / U = unsigned - // 8/16/32/Var = word length, in bytes - // BE = big endian - int getS8(int pos, GBool *ok); - int getU8(int pos, GBool *ok); - int getS16BE(int pos, GBool *ok); - int getU16BE(int pos, GBool *ok); - int getS32BE(int pos, GBool *ok); - Guint getU32BE(int pos, GBool *ok); - Guint getU32LE(int pos, GBool *ok); - Guint getUVarBE(int pos, int size, GBool *ok); - - GBool checkRegion(int pos, int size); - - Guchar *fileData; - Guchar *file; - int len; - GBool freeFileData; -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/fofi/FoFiEncodings.cc b/Build/source/libs/poppler/poppler-src/fofi/FoFiEncodings.cc deleted file mode 100644 index 96bd4e950fd..00000000000 --- a/Build/source/libs/poppler/poppler-src/fofi/FoFiEncodings.cc +++ /dev/null @@ -1,1008 +0,0 @@ -//======================================================================== -// -// FoFiEncodings.cc -// -// Copyright 1999-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2016 Albert Astals Cid <aacid@kde.org> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include <config.h> - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include <stdlib.h> -#include "FoFiEncodings.h" - -//------------------------------------------------------------------------ -// Type 1 and 1C font data -//------------------------------------------------------------------------ - -const char * const fofiType1StandardEncoding[256] = { - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - "space", - "exclam", - "quotedbl", - "numbersign", - "dollar", - "percent", - "ampersand", - "quoteright", - "parenleft", - "parenright", - "asterisk", - "plus", - "comma", - "hyphen", - "period", - "slash", - "zero", - "one", - "two", - "three", - "four", - "five", - "six", - "seven", - "eight", - "nine", - "colon", - "semicolon", - "less", - "equal", - "greater", - "question", - "at", - "A", - "B", - "C", - "D", - "E", - "F", - "G", - "H", - "I", - "J", - "K", - "L", - "M", - "N", - "O", - "P", - "Q", - "R", - "S", - "T", - "U", - "V", - "W", - "X", - "Y", - "Z", - "bracketleft", - "backslash", - "bracketright", - "asciicircum", - "underscore", - "quoteleft", - "a", - "b", - "c", - "d", - "e", - "f", - "g", - "h", - "i", - "j", - "k", - "l", - "m", - "n", - "o", - "p", - "q", - "r", - "s", - "t", - "u", - "v", - "w", - "x", - "y", - "z", - "braceleft", - "bar", - "braceright", - "asciitilde", - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - "exclamdown", - "cent", - "sterling", - "fraction", - "yen", - "florin", - "section", - "currency", - "quotesingle", - "quotedblleft", - "guillemotleft", - "guilsinglleft", - "guilsinglright", - "fi", - "fl", - nullptr, - "endash", - "dagger", - "daggerdbl", - "periodcentered", - nullptr, - "paragraph", - "bullet", - "quotesinglbase", - "quotedblbase", - "quotedblright", - "guillemotright", - "ellipsis", - "perthousand", - nullptr, - "questiondown", - nullptr, - "grave", - "acute", - "circumflex", - "tilde", - "macron", - "breve", - "dotaccent", - "dieresis", - nullptr, - "ring", - "cedilla", - nullptr, - "hungarumlaut", - "ogonek", - "caron", - "emdash", - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - "AE", - nullptr, - "ordfeminine", - nullptr, - nullptr, - nullptr, - nullptr, - "Lslash", - "Oslash", - "OE", - "ordmasculine", - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - "ae", - nullptr, - nullptr, - nullptr, - "dotlessi", - nullptr, - nullptr, - "lslash", - "oslash", - "oe", - "germandbls", - nullptr, - nullptr, - nullptr, - nullptr -}; - -const char * const fofiType1ExpertEncoding[256] = { - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - "space", - "exclamsmall", - "Hungarumlautsmall", - nullptr, - "dollaroldstyle", - "dollarsuperior", - "ampersandsmall", - "Acutesmall", - "parenleftsuperior", - "parenrightsuperior", - "twodotenleader", - "onedotenleader", - "comma", - "hyphen", - "period", - "fraction", - "zerooldstyle", - "oneoldstyle", - "twooldstyle", - "threeoldstyle", - "fouroldstyle", - "fiveoldstyle", - "sixoldstyle", - "sevenoldstyle", - "eightoldstyle", - "nineoldstyle", - "colon", - "semicolon", - "commasuperior", - "threequartersemdash", - "periodsuperior", - "questionsmall", - nullptr, - "asuperior", - "bsuperior", - "centsuperior", - "dsuperior", - "esuperior", - nullptr, - nullptr, - nullptr, - "isuperior", - nullptr, - nullptr, - "lsuperior", - "msuperior", - "nsuperior", - "osuperior", - nullptr, - nullptr, - "rsuperior", - "ssuperior", - "tsuperior", - nullptr, - "ff", - "fi", - "fl", - "ffi", - "ffl", - "parenleftinferior", - nullptr, - "parenrightinferior", - "Circumflexsmall", - "hyphensuperior", - "Gravesmall", - "Asmall", - "Bsmall", - "Csmall", - "Dsmall", - "Esmall", - "Fsmall", - "Gsmall", - "Hsmall", - "Ismall", - "Jsmall", - "Ksmall", - "Lsmall", - "Msmall", - "Nsmall", - "Osmall", - "Psmall", - "Qsmall", - "Rsmall", - "Ssmall", - "Tsmall", - "Usmall", - "Vsmall", - "Wsmall", - "Xsmall", - "Ysmall", - "Zsmall", - "colonmonetary", - "onefitted", - "rupiah", - "Tildesmall", - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - "exclamdownsmall", - "centoldstyle", - "Lslashsmall", - nullptr, - nullptr, - "Scaronsmall", - "Zcaronsmall", - "Dieresissmall", - "Brevesmall", - "Caronsmall", - nullptr, - "Dotaccentsmall", - nullptr, - nullptr, - "Macronsmall", - nullptr, - nullptr, - "figuredash", - "hypheninferior", - nullptr, - nullptr, - "Ogoneksmall", - "Ringsmall", - "Cedillasmall", - nullptr, - nullptr, - nullptr, - "onequarter", - "onehalf", - "threequarters", - "questiondownsmall", - "oneeighth", - "threeeighths", - "fiveeighths", - "seveneighths", - "onethird", - "twothirds", - nullptr, - nullptr, - "zerosuperior", - "onesuperior", - "twosuperior", - "threesuperior", - "foursuperior", - "fivesuperior", - "sixsuperior", - "sevensuperior", - "eightsuperior", - "ninesuperior", - "zeroinferior", - "oneinferior", - "twoinferior", - "threeinferior", - "fourinferior", - "fiveinferior", - "sixinferior", - "seveninferior", - "eightinferior", - "nineinferior", - "centinferior", - "dollarinferior", - "periodinferior", - "commainferior", - "Agravesmall", - "Aacutesmall", - "Acircumflexsmall", - "Atildesmall", - "Adieresissmall", - "Aringsmall", - "AEsmall", - "Ccedillasmall", - "Egravesmall", - "Eacutesmall", - "Ecircumflexsmall", - "Edieresissmall", - "Igravesmall", - "Iacutesmall", - "Icircumflexsmall", - "Idieresissmall", - "Ethsmall", - "Ntildesmall", - "Ogravesmall", - "Oacutesmall", - "Ocircumflexsmall", - "Otildesmall", - "Odieresissmall", - "OEsmall", - "Oslashsmall", - "Ugravesmall", - "Uacutesmall", - "Ucircumflexsmall", - "Udieresissmall", - "Yacutesmall", - "Thornsmall", - "Ydieresissmall" -}; - -//------------------------------------------------------------------------ -// Type 1C font data -//------------------------------------------------------------------------ - -const char *fofiType1CStdStrings[391] = { - ".notdef", - "space", - "exclam", - "quotedbl", - "numbersign", - "dollar", - "percent", - "ampersand", - "quoteright", - "parenleft", - "parenright", - "asterisk", - "plus", - "comma", - "hyphen", - "period", - "slash", - "zero", - "one", - "two", - "three", - "four", - "five", - "six", - "seven", - "eight", - "nine", - "colon", - "semicolon", - "less", - "equal", - "greater", - "question", - "at", - "A", - "B", - "C", - "D", - "E", - "F", - "G", - "H", - "I", - "J", - "K", - "L", - "M", - "N", - "O", - "P", - "Q", - "R", - "S", - "T", - "U", - "V", - "W", - "X", - "Y", - "Z", - "bracketleft", - "backslash", - "bracketright", - "asciicircum", - "underscore", - "quoteleft", - "a", - "b", - "c", - "d", - "e", - "f", - "g", - "h", - "i", - "j", - "k", - "l", - "m", - "n", - "o", - "p", - "q", - "r", - "s", - "t", - "u", - "v", - "w", - "x", - "y", - "z", - "braceleft", - "bar", - "braceright", - "asciitilde", - "exclamdown", - "cent", - "sterling", - "fraction", - "yen", - "florin", - "section", - "currency", - "quotesingle", - "quotedblleft", - "guillemotleft", - "guilsinglleft", - "guilsinglright", - "fi", - "fl", - "endash", - "dagger", - "daggerdbl", - "periodcentered", - "paragraph", - "bullet", - "quotesinglbase", - "quotedblbase", - "quotedblright", - "guillemotright", - "ellipsis", - "perthousand", - "questiondown", - "grave", - "acute", - "circumflex", - "tilde", - "macron", - "breve", - "dotaccent", - "dieresis", - "ring", - "cedilla", - "hungarumlaut", - "ogonek", - "caron", - "emdash", - "AE", - "ordfeminine", - "Lslash", - "Oslash", - "OE", - "ordmasculine", - "ae", - "dotlessi", - "lslash", - "oslash", - "oe", - "germandbls", - "onesuperior", - "logicalnot", - "mu", - "trademark", - "Eth", - "onehalf", - "plusminus", - "Thorn", - "onequarter", - "divide", - "brokenbar", - "degree", - "thorn", - "threequarters", - "twosuperior", - "registered", - "minus", - "eth", - "multiply", - "threesuperior", - "copyright", - "Aacute", - "Acircumflex", - "Adieresis", - "Agrave", - "Aring", - "Atilde", - "Ccedilla", - "Eacute", - "Ecircumflex", - "Edieresis", - "Egrave", - "Iacute", - "Icircumflex", - "Idieresis", - "Igrave", - "Ntilde", - "Oacute", - "Ocircumflex", - "Odieresis", - "Ograve", - "Otilde", - "Scaron", - "Uacute", - "Ucircumflex", - "Udieresis", - "Ugrave", - "Yacute", - "Ydieresis", - "Zcaron", - "aacute", - "acircumflex", - "adieresis", - "agrave", - "aring", - "atilde", - "ccedilla", - "eacute", - "ecircumflex", - "edieresis", - "egrave", - "iacute", - "icircumflex", - "idieresis", - "igrave", - "ntilde", - "oacute", - "ocircumflex", - "odieresis", - "ograve", - "otilde", - "scaron", - "uacute", - "ucircumflex", - "udieresis", - "ugrave", - "yacute", - "ydieresis", - "zcaron", - "exclamsmall", - "Hungarumlautsmall", - "dollaroldstyle", - "dollarsuperior", - "ampersandsmall", - "Acutesmall", - "parenleftsuperior", - "parenrightsuperior", - "twodotenleader", - "onedotenleader", - "zerooldstyle", - "oneoldstyle", - "twooldstyle", - "threeoldstyle", - "fouroldstyle", - "fiveoldstyle", - "sixoldstyle", - "sevenoldstyle", - "eightoldstyle", - "nineoldstyle", - "commasuperior", - "threequartersemdash", - "periodsuperior", - "questionsmall", - "asuperior", - "bsuperior", - "centsuperior", - "dsuperior", - "esuperior", - "isuperior", - "lsuperior", - "msuperior", - "nsuperior", - "osuperior", - "rsuperior", - "ssuperior", - "tsuperior", - "ff", - "ffi", - "ffl", - "parenleftinferior", - "parenrightinferior", - "Circumflexsmall", - "hyphensuperior", - "Gravesmall", - "Asmall", - "Bsmall", - "Csmall", - "Dsmall", - "Esmall", - "Fsmall", - "Gsmall", - "Hsmall", - "Ismall", - "Jsmall", - "Ksmall", - "Lsmall", - "Msmall", - "Nsmall", - "Osmall", - "Psmall", - "Qsmall", - "Rsmall", - "Ssmall", - "Tsmall", - "Usmall", - "Vsmall", - "Wsmall", - "Xsmall", - "Ysmall", - "Zsmall", - "colonmonetary", - "onefitted", - "rupiah", - "Tildesmall", - "exclamdownsmall", - "centoldstyle", - "Lslashsmall", - "Scaronsmall", - "Zcaronsmall", - "Dieresissmall", - "Brevesmall", - "Caronsmall", - "Dotaccentsmall", - "Macronsmall", - "figuredash", - "hypheninferior", - "Ogoneksmall", - "Ringsmall", - "Cedillasmall", - "questiondownsmall", - "oneeighth", - "threeeighths", - "fiveeighths", - "seveneighths", - "onethird", - "twothirds", - "zerosuperior", - "foursuperior", - "fivesuperior", - "sixsuperior", - "sevensuperior", - "eightsuperior", - "ninesuperior", - "zeroinferior", - "oneinferior", - "twoinferior", - "threeinferior", - "fourinferior", - "fiveinferior", - "sixinferior", - "seveninferior", - "eightinferior", - "nineinferior", - "centinferior", - "dollarinferior", - "periodinferior", - "commainferior", - "Agravesmall", - "Aacutesmall", - "Acircumflexsmall", - "Atildesmall", - "Adieresissmall", - "Aringsmall", - "AEsmall", - "Ccedillasmall", - "Egravesmall", - "Eacutesmall", - "Ecircumflexsmall", - "Edieresissmall", - "Igravesmall", - "Iacutesmall", - "Icircumflexsmall", - "Idieresissmall", - "Ethsmall", - "Ntildesmall", - "Ogravesmall", - "Oacutesmall", - "Ocircumflexsmall", - "Otildesmall", - "Odieresissmall", - "OEsmall", - "Oslashsmall", - "Ugravesmall", - "Uacutesmall", - "Ucircumflexsmall", - "Udieresissmall", - "Yacutesmall", - "Thornsmall", - "Ydieresissmall", - "001.000", - "001.001", - "001.002", - "001.003", - "Black", - "Bold", - "Book", - "Light", - "Medium", - "Regular", - "Roman", - "Semibold" -}; - -Gushort fofiType1CISOAdobeCharset[229] = { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, - 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, - 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, - 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, - 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, - 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, - 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, - 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, - 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, - 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, - 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, - 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, - 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, - 220, 221, 222, 223, 224, 225, 226, 227, 228 -}; - -Gushort fofiType1CExpertCharset[166] = { - 0, 1, 229, 230, 231, 232, 233, 234, 235, 236, - 237, 238, 13, 14, 15, 99, 239, 240, 241, 242, - 243, 244, 245, 246, 247, 248, 27, 28, 249, 250, - 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, - 261, 262, 263, 264, 265, 266, 109, 110, 267, 268, - 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, - 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, - 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, - 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, - 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, - 158, 155, 163, 319, 320, 321, 322, 323, 324, 325, - 326, 150, 164, 169, 327, 328, 329, 330, 331, 332, - 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, - 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, - 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, - 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, - 373, 374, 375, 376, 377, 378 -}; - -Gushort fofiType1CExpertSubsetCharset[87] = { - 0, 1, 231, 232, 235, 236, 237, 238, 13, 14, - 15, 99, 239, 240, 241, 242, 243, 244, 245, 246, - 247, 248, 27, 28, 249, 250, 251, 253, 254, 255, - 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, - 266, 109, 110, 267, 268, 269, 270, 272, 300, 301, - 302, 305, 314, 315, 158, 155, 163, 320, 321, 322, - 323, 324, 325, 326, 150, 164, 169, 327, 328, 329, - 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, - 340, 341, 342, 343, 344, 345, 346 -}; diff --git a/Build/source/libs/poppler/poppler-src/fofi/FoFiEncodings.h b/Build/source/libs/poppler/poppler-src/fofi/FoFiEncodings.h deleted file mode 100644 index e7444906346..00000000000 --- a/Build/source/libs/poppler/poppler-src/fofi/FoFiEncodings.h +++ /dev/null @@ -1,48 +0,0 @@ -//======================================================================== -// -// FoFiEncodings.h -// -// Copyright 1999-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2016 Albert Astals Cid <aacid@kde.org> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef FOFIENCODINGS_H -#define FOFIENCODINGS_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "goo/gtypes.h" - -//------------------------------------------------------------------------ -// Type 1 and 1C font data -//------------------------------------------------------------------------ - -extern const char * const fofiType1StandardEncoding[256]; -extern const char * const fofiType1ExpertEncoding[256]; - -//------------------------------------------------------------------------ -// Type 1C font data -//------------------------------------------------------------------------ - -extern const char *fofiType1CStdStrings[391]; -extern Gushort fofiType1CISOAdobeCharset[229]; -extern Gushort fofiType1CExpertCharset[166]; -extern Gushort fofiType1CExpertSubsetCharset[87]; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/fofi/FoFiIdentifier.cc b/Build/source/libs/poppler/poppler-src/fofi/FoFiIdentifier.cc deleted file mode 100644 index ffe9c47c742..00000000000 --- a/Build/source/libs/poppler/poppler-src/fofi/FoFiIdentifier.cc +++ /dev/null @@ -1,651 +0,0 @@ -//======================================================================== -// -// FoFiIdentifier.cc -// -// Copyright 2009 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2013 Christoph Duelli <duelli@melosgmbh.de> -// Copyright (C) 2018 Albert Astals Cid <aacid@kde.org> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include <stdio.h> -#include <string.h> -#include <limits.h> -#include "goo/gtypes.h" -#include "FoFiIdentifier.h" - -//------------------------------------------------------------------------ - -namespace { // do not pollute global namespace - -class Reader { -public: - Reader() = default; - Reader(const Reader &) = delete; - Reader& operator=(const Reader &other) = delete; - - virtual ~Reader() {} - - // Read one byte. Returns -1 if past EOF. - virtual int getByte(int pos) = 0; - - // Read a big-endian unsigned 16-bit integer. Fills in *val and - // returns true if successful. - virtual GBool getU16BE(int pos, int *val) = 0; - - // Read a big-endian unsigned 32-bit integer. Fills in *val and - // returns true if successful. - virtual GBool getU32BE(int pos, Guint *val) = 0; - - // Read a little-endian unsigned 32-bit integer. Fills in *val and - // returns true if successful. - virtual GBool getU32LE(int pos, Guint *val) = 0; - - // Read a big-endian unsigned <size>-byte integer, where 1 <= size - // <= 4. Fills in *val and returns true if successful. - virtual GBool getUVarBE(int pos, int size, Guint *val) = 0; - - // Compare against a string. Returns true if equal. - virtual GBool cmp(int pos, const char *s) = 0; - -}; - -//------------------------------------------------------------------------ - -class MemReader: public Reader { -public: - - static MemReader *make(char *bufA, int lenA); - ~MemReader(); - int getByte(int pos) override; - GBool getU16BE(int pos, int *val) override; - GBool getU32BE(int pos, Guint *val) override; - GBool getU32LE(int pos, Guint *val) override; - GBool getUVarBE(int pos, int size, Guint *val) override; - GBool cmp(int pos, const char *s) override; - -private: - - MemReader(char *bufA, int lenA); - - char *buf; - int len; -}; - -MemReader *MemReader::make(char *bufA, int lenA) { - return new MemReader(bufA, lenA); -} - -MemReader::MemReader(char *bufA, int lenA) { - buf = bufA; - len = lenA; -} - -MemReader::~MemReader() { -} - -int MemReader::getByte(int pos) { - if (pos < 0 || pos >= len) { - return -1; - } - return buf[pos] & 0xff; -} - -GBool MemReader::getU16BE(int pos, int *val) { - if (pos < 0 || pos > len - 2) { - return gFalse; - } - *val = ((buf[pos] & 0xff) << 8) + - (buf[pos+1] & 0xff); - return gTrue; -} - -GBool MemReader::getU32BE(int pos, Guint *val) { - if (pos < 0 || pos > len - 4) { - return gFalse; - } - *val = ((buf[pos] & 0xff) << 24) + - ((buf[pos+1] & 0xff) << 16) + - ((buf[pos+2] & 0xff) << 8) + - (buf[pos+3] & 0xff); - return gTrue; -} - -GBool MemReader::getU32LE(int pos, Guint *val) { - if (pos < 0 || pos > len - 4) { - return gFalse; - } - *val = (buf[pos] & 0xff) + - ((buf[pos+1] & 0xff) << 8) + - ((buf[pos+2] & 0xff) << 16) + - ((buf[pos+3] & 0xff) << 24); - return gTrue; -} - -GBool MemReader::getUVarBE(int pos, int size, Guint *val) { - int i; - - if (size < 1 || size > 4 || pos < 0 || pos > len - size) { - return gFalse; - } - *val = 0; - for (i = 0; i < size; ++i) { - *val = (*val << 8) + (buf[pos + i] & 0xff); - } - return gTrue; -} - -GBool MemReader::cmp(int pos, const char *s) { - int n; - - n = (int)strlen(s); - if (pos < 0 || len < n || pos > len - n) { - return gFalse; - } - return !memcmp(buf + pos, s, n); -} - -//------------------------------------------------------------------------ - -class FileReader: public Reader { -public: - - static FileReader *make(char *fileName); - ~FileReader(); - int getByte(int pos) override; - GBool getU16BE(int pos, int *val) override; - GBool getU32BE(int pos, Guint *val) override; - GBool getU32LE(int pos, Guint *val) override; - GBool getUVarBE(int pos, int size, Guint *val) override; - GBool cmp(int pos, const char *s) override; - -private: - - FileReader(FILE *fA); - GBool fillBuf(int pos, int len); - - FILE *f; - char buf[1024]; - int bufPos, bufLen; -}; - -FileReader *FileReader::make(char *fileName) { - FILE *fA; - - if (!(fA = fopen(fileName, "rb"))) { - return nullptr; - } - return new FileReader(fA); -} - -FileReader::FileReader(FILE *fA) { - f = fA; - bufPos = 0; - bufLen = 0; -} - -FileReader::~FileReader() { - fclose(f); -} - -int FileReader::getByte(int pos) { - if (!fillBuf(pos, 1)) { - return -1; - } - return buf[pos - bufPos] & 0xff; -} - -GBool FileReader::getU16BE(int pos, int *val) { - if (!fillBuf(pos, 2)) { - return gFalse; - } - *val = ((buf[pos - bufPos] & 0xff) << 8) + - (buf[pos - bufPos + 1] & 0xff); - return gTrue; -} - -GBool FileReader::getU32BE(int pos, Guint *val) { - if (!fillBuf(pos, 4)) { - return gFalse; - } - *val = ((buf[pos - bufPos] & 0xff) << 24) + - ((buf[pos - bufPos + 1] & 0xff) << 16) + - ((buf[pos - bufPos + 2] & 0xff) << 8) + - (buf[pos - bufPos + 3] & 0xff); - return gTrue; -} - -GBool FileReader::getU32LE(int pos, Guint *val) { - if (!fillBuf(pos, 4)) { - return gFalse; - } - *val = (buf[pos - bufPos] & 0xff) + - ((buf[pos - bufPos + 1] & 0xff) << 8) + - ((buf[pos - bufPos + 2] & 0xff) << 16) + - ((buf[pos - bufPos + 3] & 0xff) << 24); - return gTrue; -} - -GBool FileReader::getUVarBE(int pos, int size, Guint *val) { - int i; - - if (size < 1 || size > 4 || !fillBuf(pos, size)) { - return gFalse; - } - *val = 0; - for (i = 0; i < size; ++i) { - *val = (*val << 8) + (buf[pos - bufPos + i] & 0xff); - } - return gTrue; -} - -GBool FileReader::cmp(int pos, const char *s) { - int n; - - n = (int)strlen(s); - if (!fillBuf(pos, n)) { - return gFalse; - } - return !memcmp(buf - bufPos + pos, s, n); -} - -GBool FileReader::fillBuf(int pos, int len) { - if (pos < 0 || len < 0 || len > (int)sizeof(buf) || - pos > INT_MAX - (int)sizeof(buf)) { - return gFalse; - } - if (pos >= bufPos && pos + len <= bufPos + bufLen) { - return gTrue; - } - if (fseek(f, pos, SEEK_SET)) { - return gFalse; - } - bufPos = pos; - bufLen = (int)fread(buf, 1, sizeof(buf), f); - if (bufLen < len) { - return gFalse; - } - return gTrue; -} - -//------------------------------------------------------------------------ - -class StreamReader: public Reader { -public: - - static StreamReader *make(int (*getCharA)(void *data), void *dataA); - ~StreamReader(); - int getByte(int pos) override; - GBool getU16BE(int pos, int *val) override; - GBool getU32BE(int pos, Guint *val) override; - GBool getU32LE(int pos, Guint *val) override; - GBool getUVarBE(int pos, int size, Guint *val) override; - GBool cmp(int pos, const char *s) override; - -private: - - StreamReader(int (*getCharA)(void *data), void *dataA); - GBool fillBuf(int pos, int len); - - int (*getChar)(void *data); - void *data; - int streamPos; - char buf[1024]; - int bufPos, bufLen; -}; - -StreamReader *StreamReader::make(int (*getCharA)(void *data), void *dataA) { - return new StreamReader(getCharA, dataA); -} - -StreamReader::StreamReader(int (*getCharA)(void *data), void *dataA) { - getChar = getCharA; - data = dataA; - streamPos = 0; - bufPos = 0; - bufLen = 0; -} - -StreamReader::~StreamReader() { -} - -int StreamReader::getByte(int pos) { - if (!fillBuf(pos, 1)) { - return -1; - } - return buf[pos - bufPos] & 0xff; -} - -GBool StreamReader::getU16BE(int pos, int *val) { - if (!fillBuf(pos, 2)) { - return gFalse; - } - *val = ((buf[pos - bufPos] & 0xff) << 8) + - (buf[pos - bufPos + 1] & 0xff); - return gTrue; -} - -GBool StreamReader::getU32BE(int pos, Guint *val) { - if (!fillBuf(pos, 4)) { - return gFalse; - } - *val = ((buf[pos - bufPos] & 0xff) << 24) + - ((buf[pos - bufPos + 1] & 0xff) << 16) + - ((buf[pos - bufPos + 2] & 0xff) << 8) + - (buf[pos - bufPos + 3] & 0xff); - return gTrue; -} - -GBool StreamReader::getU32LE(int pos, Guint *val) { - if (!fillBuf(pos, 4)) { - return gFalse; - } - *val = (buf[pos - bufPos] & 0xff) + - ((buf[pos - bufPos + 1] & 0xff) << 8) + - ((buf[pos - bufPos + 2] & 0xff) << 16) + - ((buf[pos - bufPos + 3] & 0xff) << 24); - return gTrue; -} - -GBool StreamReader::getUVarBE(int pos, int size, Guint *val) { - int i; - - if (size < 1 || size > 4 || !fillBuf(pos, size)) { - return gFalse; - } - *val = 0; - for (i = 0; i < size; ++i) { - *val = (*val << 8) + (buf[pos - bufPos + i] & 0xff); - } - return gTrue; -} - -GBool StreamReader::cmp(int pos, const char *s) { - const int n = (int)strlen(s); - if (!fillBuf(pos, n)) { - return gFalse; - } - const int posDiff = pos - bufPos; - return !memcmp(buf + posDiff, s, n); -} - -GBool StreamReader::fillBuf(int pos, int len) { - int c; - - if (pos < 0 || len < 0 || len > (int)sizeof(buf) || - pos > INT_MAX - (int)sizeof(buf)) { - return gFalse; - } - if (pos < bufPos) { - return gFalse; - } - - // if requested region will not fit in the current buffer... - if (pos + len > bufPos + (int)sizeof(buf)) { - - // if the start of the requested data is already in the buffer, move - // it to the start of the buffer - if (pos < bufPos + bufLen) { - bufLen -= pos - bufPos; - memmove(buf, buf + (pos - bufPos), bufLen); - bufPos = pos; - - // otherwise discard data from the - // stream until we get to the requested position - } else { - bufPos += bufLen; - bufLen = 0; - while (bufPos < pos) { - if ((c = (*getChar)(data)) < 0) { - return gFalse; - } - ++bufPos; - } - } - } - - // read the rest of the requested data - while (bufPos + bufLen < pos + len) { - if ((c = (*getChar)(data)) < 0) { - return gFalse; - } - buf[bufLen++] = (char)c; - } - - return gTrue; -} - -} - -//------------------------------------------------------------------------ - -static FoFiIdentifierType identify(Reader *reader); -static FoFiIdentifierType identifyOpenType(Reader *reader); -static FoFiIdentifierType identifyCFF(Reader *reader, int start); - -FoFiIdentifierType FoFiIdentifier::identifyMem(char *file, int len) { - MemReader *reader; - FoFiIdentifierType type; - - if (!(reader = MemReader::make(file, len))) { - return fofiIdError; - } - type = identify(reader); - delete reader; - return type; -} - -FoFiIdentifierType FoFiIdentifier::identifyFile(char *fileName) { - FileReader *reader; - FoFiIdentifierType type; - - if (!(reader = FileReader::make(fileName))) { - return fofiIdError; - } - type = identify(reader); - delete reader; - return type; -} - -FoFiIdentifierType FoFiIdentifier::identifyStream(int (*getChar)(void *data), - void *data) { - StreamReader *reader; - FoFiIdentifierType type; - - if (!(reader = StreamReader::make(getChar, data))) { - return fofiIdError; - } - type = identify(reader); - delete reader; - return type; -} - -static FoFiIdentifierType identify(Reader *reader) { - Guint n; - - //----- PFA - if (reader->cmp(0, "%!PS-AdobeFont-1") || - reader->cmp(0, "%!FontType1")) { - return fofiIdType1PFA; - } - - //----- PFB - if (reader->getByte(0) == 0x80 && - reader->getByte(1) == 0x01 && - reader->getU32LE(2, &n)) { - if ((n >= 16 && reader->cmp(6, "%!PS-AdobeFont-1")) || - (n >= 11 && reader->cmp(6, "%!FontType1"))) { - return fofiIdType1PFB; - } - } - - //----- TrueType - if ((reader->getByte(0) == 0x00 && - reader->getByte(1) == 0x01 && - reader->getByte(2) == 0x00 && - reader->getByte(3) == 0x00) || - (reader->getByte(0) == 0x74 && // 'true' - reader->getByte(1) == 0x72 && - reader->getByte(2) == 0x75 && - reader->getByte(3) == 0x65)) { - return fofiIdTrueType; - } - if (reader->getByte(0) == 0x74 && // 'ttcf' - reader->getByte(1) == 0x74 && - reader->getByte(2) == 0x63 && - reader->getByte(3) == 0x66) { - return fofiIdTrueTypeCollection; - } - - //----- OpenType - if (reader->getByte(0) == 0x4f && // 'OTTO - reader->getByte(1) == 0x54 && - reader->getByte(2) == 0x54 && - reader->getByte(3) == 0x4f) { - return identifyOpenType(reader); - } - - //----- CFF - if (reader->getByte(0) == 0x01 && - reader->getByte(1) == 0x00) { - return identifyCFF(reader, 0); - } - // some tools embed CFF fonts with an extra whitespace char at the - // beginning - if (reader->getByte(1) == 0x01 && - reader->getByte(2) == 0x00) { - return identifyCFF(reader, 1); - } - - return fofiIdUnknown; -} - -static FoFiIdentifierType identifyOpenType(Reader *reader) { - FoFiIdentifierType type; - Guint offset; - int nTables, i; - - if (!reader->getU16BE(4, &nTables)) { - return fofiIdUnknown; - } - for (i = 0; i < nTables; ++i) { - if (reader->cmp(12 + i*16, "CFF ")) { - if (reader->getU32BE(12 + i*16 + 8, &offset) && - offset < (Guint)INT_MAX) { - type = identifyCFF(reader, (int)offset); - if (type == fofiIdCFF8Bit) { - type = fofiIdOpenTypeCFF8Bit; - } else if (type == fofiIdCFFCID) { - type = fofiIdOpenTypeCFFCID; - } - return type; - } - return fofiIdUnknown; - } - } - return fofiIdUnknown; -} - -static FoFiIdentifierType identifyCFF(Reader *reader, int start) { - Guint offset0, offset1; - int hdrSize, offSize0, offSize1, pos, endPos, b0, n, i; - - //----- read the header - if (reader->getByte(start) != 0x01 || - reader->getByte(start + 1) != 0x00) { - return fofiIdUnknown; - } - if ((hdrSize = reader->getByte(start + 2)) < 0) { - return fofiIdUnknown; - } - if ((offSize0 = reader->getByte(start + 3)) < 1 || offSize0 > 4) { - return fofiIdUnknown; - } - pos = start + hdrSize; - if (pos < 0) { - return fofiIdUnknown; - } - - //----- skip the name index - if (!reader->getU16BE(pos, &n)) { - return fofiIdUnknown; - } - if (n == 0) { - pos += 2; - } else { - if ((offSize1 = reader->getByte(pos + 2)) < 1 || offSize1 > 4) { - return fofiIdUnknown; - } - if (!reader->getUVarBE(pos + 3 + n * offSize1, offSize1, &offset1) || - offset1 > (Guint)INT_MAX) { - return fofiIdUnknown; - } - pos += 3 + (n + 1) * offSize1 + (int)offset1 - 1; - } - if (pos < 0) { - return fofiIdUnknown; - } - - //----- parse the top dict index - if (!reader->getU16BE(pos, &n) || n < 1) { - return fofiIdUnknown; - } - if ((offSize1 = reader->getByte(pos + 2)) < 1 || offSize1 > 4) { - return fofiIdUnknown; - } - if (!reader->getUVarBE(pos + 3, offSize1, &offset0) || - offset0 > (Guint)INT_MAX || - !reader->getUVarBE(pos + 3 + offSize1, offSize1, &offset1) || - offset1 > (Guint)INT_MAX || - offset0 > offset1) { - return fofiIdUnknown; - } - pos = pos + 3 + (n + 1) * offSize1 + (int)offset0 - 1; - endPos = pos + 3 + (n + 1) * offSize1 + (int)offset1 - 1; - if (pos < 0 || endPos < 0 || pos > endPos) { - return fofiIdUnknown; - } - - //----- parse the top dict, look for ROS as first entry - // for a CID font, the top dict starts with: - // <int> <int> <int> ROS - for (i = 0; i < 3; ++i) { - b0 = reader->getByte(pos++); - if (b0 == 0x1c) { - pos += 2; - } else if (b0 == 0x1d) { - pos += 4; - } else if (b0 >= 0xf7 && b0 <= 0xfe) { - pos += 1; - } else if (b0 < 0x20 || b0 > 0xf6) { - return fofiIdCFF8Bit; - } - if (pos >= endPos || pos < 0) { - return fofiIdCFF8Bit; - } - } - if (pos + 1 < endPos && - reader->getByte(pos) == 12 && - reader->getByte(pos + 1) == 30) { - return fofiIdCFFCID; - } else { - return fofiIdCFF8Bit; - } -} diff --git a/Build/source/libs/poppler/poppler-src/fofi/FoFiIdentifier.h b/Build/source/libs/poppler/poppler-src/fofi/FoFiIdentifier.h deleted file mode 100644 index af1323b76d6..00000000000 --- a/Build/source/libs/poppler/poppler-src/fofi/FoFiIdentifier.h +++ /dev/null @@ -1,42 +0,0 @@ -//======================================================================== -// -// FoFiIdentifier.h -// -// Copyright 2009 Glyph & Cog, LLC -// -//======================================================================== - -#ifndef FOFIIDENTIFIER_H -#define FOFIIDENTIFIER_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -//------------------------------------------------------------------------ -// FoFiIdentifier -//------------------------------------------------------------------------ - -enum FoFiIdentifierType { - fofiIdType1PFA, // Type 1 font in PFA format - fofiIdType1PFB, // Type 1 font in PFB format - fofiIdCFF8Bit, // 8-bit CFF font - fofiIdCFFCID, // CID CFF font - fofiIdTrueType, // TrueType font - fofiIdTrueTypeCollection, // TrueType collection - fofiIdOpenTypeCFF8Bit, // OpenType wrapper with 8-bit CFF font - fofiIdOpenTypeCFFCID, // OpenType wrapper with CID CFF font - fofiIdUnknown, // unknown type - fofiIdError // error in reading the file -}; - -class FoFiIdentifier { -public: - - static FoFiIdentifierType identifyMem(char *file, int len); - static FoFiIdentifierType identifyFile(char *fileName); - static FoFiIdentifierType identifyStream(int (*getChar)(void *data), - void *data); -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/fofi/FoFiTrueType.cc b/Build/source/libs/poppler/poppler-src/fofi/FoFiTrueType.cc deleted file mode 100644 index caf84f8da08..00000000000 --- a/Build/source/libs/poppler/poppler-src/fofi/FoFiTrueType.cc +++ /dev/null @@ -1,1863 +0,0 @@ -//======================================================================== -// -// FoFiTrueType.cc -// -// Copyright 1999-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2006 Takashi Iwai <tiwai@suse.de> -// Copyright (C) 2007 Koji Otani <sho@bbr.jp> -// Copyright (C) 2007 Carlos Garcia Campos <carlosgc@gnome.org> -// Copyright (C) 2008, 2009, 2012, 2014-2017 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2008 Tomas Are Haavet <tomasare@gmail.com> -// Copyright (C) 2012 Suzuki Toshiya <mpsuzuki@hiroshima-u.ac.jp> -// Copyright (C) 2012, 2017 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2014 Thomas Freitag <Thomas.Freitag@alfa.de> -// Copyright (C) 2015 Aleksei Volkov <Aleksei Volkov> -// Copyright (C) 2015, 2016 William Bader <williambader@hotmail.com> -// Copyright (C) 2018 Adam Reichold <adam.reichold@t-online.de> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include <config.h> - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include <stdlib.h> -#include <string.h> -#include <limits.h> -#include <algorithm> -#include "goo/gtypes.h" -#include "goo/gmem.h" -#include "goo/GooLikely.h" -#include "goo/GooString.h" -#include "FoFiType1C.h" -#include "FoFiTrueType.h" -#include "poppler/Error.h" - -// -// Terminology -// ----------- -// -// character code = number used as an element of a text string -// -// character name = glyph name = name for a particular glyph within a -// font -// -// glyph index = GID = position (within some internal table in the font) -// where the instructions to draw a particular glyph are -// stored -// -// Type 1 fonts -// ------------ -// -// Type 1 fonts contain: -// -// Encoding: array of glyph names, maps char codes to glyph names -// -// Encoding[charCode] = charName -// -// CharStrings: dictionary of instructions, keyed by character names, -// maps character name to glyph data -// -// CharStrings[charName] = glyphData -// -// TrueType fonts -// -------------- -// -// TrueType fonts contain: -// -// 'cmap' table: mapping from character code to glyph index; there may -// be multiple cmaps in a TrueType font -// -// cmap[charCode] = gid -// -// 'post' table: mapping from glyph index to glyph name -// -// post[gid] = glyphName -// -// Type 42 fonts -// ------------- -// -// Type 42 fonts contain: -// -// Encoding: array of glyph names, maps char codes to glyph names -// -// Encoding[charCode] = charName -// -// CharStrings: dictionary of glyph indexes, keyed by character names, -// maps character name to glyph index -// -// CharStrings[charName] = gid -// - -//------------------------------------------------------------------------ - -#define ttcfTag 0x74746366 - -//------------------------------------------------------------------------ - -struct TrueTypeTable { - Guint tag; - Guint checksum; - int offset; - int origOffset; - int len; -}; - -struct TrueTypeCmap { - int platform; - int encoding; - int offset; - int len; - int fmt; -}; - -struct TrueTypeLoca { - int idx; - int origOffset; - int newOffset; - int len; -}; - -#define cmapTag 0x636d6170 -#define glyfTag 0x676c7966 -#define headTag 0x68656164 -#define hheaTag 0x68686561 -#define hmtxTag 0x686d7478 -#define locaTag 0x6c6f6361 -#define nameTag 0x6e616d65 -#define os2Tag 0x4f532f32 -#define postTag 0x706f7374 -#define vrt2Tag 0x76727432 -#define vertTag 0x76657274 - -struct cmpTrueTypeLocaOffsetFunctor { - bool operator()(const TrueTypeLoca &loca1, const TrueTypeLoca &loca2) { - if (loca1.origOffset == loca2.origOffset) { - return loca1.idx < loca2.idx; - } - return loca1.origOffset < loca2.origOffset; - } -}; - -struct cmpTrueTypeLocaIdxFunctor { - bool operator()(const TrueTypeLoca &loca1, const TrueTypeLoca &loca2) { - return loca1.idx < loca2.idx; - } -}; - -struct cmpTrueTypeTableTagFunctor { - bool operator()(const TrueTypeTable &tab1, const TrueTypeTable &tab2) { - return tab1.tag < tab2.tag; - } -}; - -//------------------------------------------------------------------------ - -struct T42Table { - const char *tag; // 4-byte tag - GBool required; // required by the TrueType spec? -}; - -// TrueType tables to be embedded in Type 42 fonts. -// NB: the table names must be in alphabetical order here. -#define nT42Tables 11 -static T42Table t42Tables[nT42Tables] = { - { "cvt ", gTrue }, - { "fpgm", gTrue }, - { "glyf", gTrue }, - { "head", gTrue }, - { "hhea", gTrue }, - { "hmtx", gTrue }, - { "loca", gTrue }, - { "maxp", gTrue }, - { "prep", gTrue }, - { "vhea", gFalse }, - { "vmtx", gFalse } -}; -#define t42HeadTable 3 -#define t42LocaTable 6 -#define t42GlyfTable 2 -#define t42VheaTable 9 -#define t42VmtxTable 10 - -//------------------------------------------------------------------------ - -// Glyph names in some arbitrary standard order that Apple uses for -// their TrueType fonts. -static const char *macGlyphNames[258] = { - ".notdef", "null", "CR", "space", - "exclam", "quotedbl", "numbersign", "dollar", - "percent", "ampersand", "quotesingle", "parenleft", - "parenright", "asterisk", "plus", "comma", - "hyphen", "period", "slash", "zero", - "one", "two", "three", "four", - "five", "six", "seven", "eight", - "nine", "colon", "semicolon", "less", - "equal", "greater", "question", "at", - "A", "B", "C", "D", - "E", "F", "G", "H", - "I", "J", "K", "L", - "M", "N", "O", "P", - "Q", "R", "S", "T", - "U", "V", "W", "X", - "Y", "Z", "bracketleft", "backslash", - "bracketright", "asciicircum", "underscore", "grave", - "a", "b", "c", "d", - "e", "f", "g", "h", - "i", "j", "k", "l", - "m", "n", "o", "p", - "q", "r", "s", "t", - "u", "v", "w", "x", - "y", "z", "braceleft", "bar", - "braceright", "asciitilde", "Adieresis", "Aring", - "Ccedilla", "Eacute", "Ntilde", "Odieresis", - "Udieresis", "aacute", "agrave", "acircumflex", - "adieresis", "atilde", "aring", "ccedilla", - "eacute", "egrave", "ecircumflex", "edieresis", - "iacute", "igrave", "icircumflex", "idieresis", - "ntilde", "oacute", "ograve", "ocircumflex", - "odieresis", "otilde", "uacute", "ugrave", - "ucircumflex", "udieresis", "dagger", "degree", - "cent", "sterling", "section", "bullet", - "paragraph", "germandbls", "registered", "copyright", - "trademark", "acute", "dieresis", "notequal", - "AE", "Oslash", "infinity", "plusminus", - "lessequal", "greaterequal", "yen", "mu", - "partialdiff", "summation", "product", "pi", - "integral", "ordfeminine", "ordmasculine", "Omega", - "ae", "oslash", "questiondown", "exclamdown", - "logicalnot", "radical", "florin", "approxequal", - "increment", "guillemotleft", "guillemotright", "ellipsis", - "nbspace", "Agrave", "Atilde", "Otilde", - "OE", "oe", "endash", "emdash", - "quotedblleft", "quotedblright", "quoteleft", "quoteright", - "divide", "lozenge", "ydieresis", "Ydieresis", - "fraction", "currency", "guilsinglleft", "guilsinglright", - "fi", "fl", "daggerdbl", "periodcentered", - "quotesinglbase", "quotedblbase", "perthousand", "Acircumflex", - "Ecircumflex", "Aacute", "Edieresis", "Egrave", - "Iacute", "Icircumflex", "Idieresis", "Igrave", - "Oacute", "Ocircumflex", "applelogo", "Ograve", - "Uacute", "Ucircumflex", "Ugrave", "dotlessi", - "circumflex", "tilde", "overscore", "breve", - "dotaccent", "ring", "cedilla", "hungarumlaut", - "ogonek", "caron", "Lslash", "lslash", - "Scaron", "scaron", "Zcaron", "zcaron", - "brokenbar", "Eth", "eth", "Yacute", - "yacute", "Thorn", "thorn", "minus", - "multiply", "onesuperior", "twosuperior", "threesuperior", - "onehalf", "onequarter", "threequarters", "franc", - "Gbreve", "gbreve", "Idot", "Scedilla", - "scedilla", "Cacute", "cacute", "Ccaron", - "ccaron", "dmacron" -}; - -//------------------------------------------------------------------------ -// FoFiTrueType -//------------------------------------------------------------------------ - -FoFiTrueType *FoFiTrueType::make(char *fileA, int lenA, int faceIndexA) { - FoFiTrueType *ff; - - ff = new FoFiTrueType(fileA, lenA, gFalse, faceIndexA); - if (!ff->parsedOk) { - delete ff; - return nullptr; - } - return ff; -} - -FoFiTrueType *FoFiTrueType::load(char *fileName, int faceIndexA) { - FoFiTrueType *ff; - char *fileA; - int lenA; - - if (!(fileA = FoFiBase::readFile(fileName, &lenA))) { - return nullptr; - } - ff = new FoFiTrueType(fileA, lenA, gTrue, faceIndexA); - if (!ff->parsedOk) { - delete ff; - return nullptr; - } - return ff; -} - -FoFiTrueType::FoFiTrueType(char *fileA, int lenA, GBool freeFileDataA, int faceIndexA): - FoFiBase(fileA, lenA, freeFileDataA) -{ - tables = nullptr; - nTables = 0; - cmaps = nullptr; - nCmaps = 0; - parsedOk = gFalse; - faceIndex = faceIndexA; - gsubFeatureTable = 0; - gsubLookupList = 0; - - parse(); -} - -FoFiTrueType::~FoFiTrueType() { - gfree(tables); - gfree(cmaps); -} - -int FoFiTrueType::getNumCmaps() { - return nCmaps; -} - -int FoFiTrueType::getCmapPlatform(int i) { - return cmaps[i].platform; -} - -int FoFiTrueType::getCmapEncoding(int i) { - return cmaps[i].encoding; -} - -int FoFiTrueType::findCmap(int platform, int encoding) { - int i; - - for (i = 0; i < nCmaps; ++i) { - if (cmaps[i].platform == platform && cmaps[i].encoding == encoding) { - return i; - } - } - return -1; -} - -int FoFiTrueType::mapCodeToGID(int i, Guint c) { - int gid; - Guint segCnt, segEnd, segStart, segDelta, segOffset; - Guint cmapFirst, cmapLen; - int pos, a, b, m; - GBool ok; - - if (i < 0 || i >= nCmaps) { - return 0; - } - ok = gTrue; - pos = cmaps[i].offset; - switch (cmaps[i].fmt) { - case 0: - if (c + 6 >= (Guint)cmaps[i].len) { - return 0; - } - gid = getU8(cmaps[i].offset + 6 + c, &ok); - break; - case 4: - segCnt = getU16BE(pos + 6, &ok) / 2; - a = -1; - b = segCnt - 1; - segEnd = getU16BE(pos + 14 + 2*b, &ok); - if (c > segEnd) { - // malformed font -- the TrueType spec requires the last segEnd - // to be 0xffff - return 0; - } - // invariant: seg[a].end < code <= seg[b].end - while (b - a > 1 && ok) { - m = (a + b) / 2; - segEnd = getU16BE(pos + 14 + 2*m, &ok); - if (segEnd < c) { - a = m; - } else { - b = m; - } - } - segStart = getU16BE(pos + 16 + 2*segCnt + 2*b, &ok); - segDelta = getU16BE(pos + 16 + 4*segCnt + 2*b, &ok); - segOffset = getU16BE(pos + 16 + 6*segCnt + 2*b, &ok); - if (c < segStart) { - return 0; - } - if (segOffset == 0) { - gid = (c + segDelta) & 0xffff; - } else { - gid = getU16BE(pos + 16 + 6*segCnt + 2*b + - segOffset + 2 * (c - segStart), &ok); - if (gid != 0) { - gid = (gid + segDelta) & 0xffff; - } - } - break; - case 6: - cmapFirst = getU16BE(pos + 6, &ok); - cmapLen = getU16BE(pos + 8, &ok); - if (c < cmapFirst || c >= cmapFirst + cmapLen) { - return 0; - } - gid = getU16BE(pos + 10 + 2 * (c - cmapFirst), &ok); - break; - case 12: - segCnt = getU32BE(pos + 12, &ok); - a = -1; - b = segCnt - 1; - segEnd = getU32BE(pos + 16 + 12*b+4, &ok); - if (c > segEnd) { - return 0; - } - // invariant: seg[a].end < code <= seg[b].end - while (b - a > 1 && ok) { - m = (a + b) / 2; - segEnd = getU32BE(pos + 16 + 12*m+4, &ok); - if (segEnd < c) { - a = m; - } else { - b = m; - } - } - segStart = getU32BE(pos + 16 + 12*b, &ok); - segDelta = getU32BE(pos + 16 + 12*b+8, &ok); - if (c < segStart) { - return 0; - } - gid = segDelta + (c-segStart); - break; - default: - return 0; - } - if (!ok) { - return 0; - } - return gid; -} - -int FoFiTrueType::mapNameToGID(char *name) const { - const auto gid = nameToGID.find(name); - if (gid == nameToGID.end()) { - return 0; - } - return gid->second; -} - -GBool FoFiTrueType::getCFFBlock(char **start, int *length) { - int i; - - if (!openTypeCFF || !tables) { - return gFalse; - } - i = seekTable("CFF "); - if (!checkRegion(tables[i].offset, tables[i].len)) { - return gFalse; - } - *start = (char *)file + tables[i].offset; - *length = tables[i].len; - return gTrue; -} - -int *FoFiTrueType::getCIDToGIDMap(int *nCIDs) { - char *start; - int length; - FoFiType1C *ff; - int *map; - - *nCIDs = 0; - if (!getCFFBlock(&start, &length)) { - return nullptr; - } - if (!(ff = FoFiType1C::make(start, length))) { - return nullptr; - } - map = ff->getCIDToGIDMap(nCIDs); - delete ff; - return map; -} - -int FoFiTrueType::getEmbeddingRights() { - int i, fsType; - GBool ok; - - if ((i = seekTable("OS/2")) < 0) { - return 4; - } - ok = gTrue; - fsType = getU16BE(tables[i].offset + 8, &ok); - if (!ok) { - return 4; - } - if (fsType & 0x0008) { - return 2; - } - if (fsType & 0x0004) { - return 1; - } - if (fsType & 0x0002) { - return 0; - } - return 3; -} - -void FoFiTrueType::getFontMatrix(double *mat) { - char *start; - int length; - FoFiType1C *ff; - - if (!getCFFBlock(&start, &length)) { - return; - } - if (!(ff = FoFiType1C::make(start, length))) { - return; - } - ff->getFontMatrix(mat); - delete ff; -} - -void FoFiTrueType::convertToType42(char *psName, char **encoding, - int *codeToGID, - FoFiOutputFunc outputFunc, - void *outputStream) { - GooString *buf; - int maxUsedGlyph; - GBool ok; - - if (openTypeCFF) { - return; - } - - // write the header - ok = gTrue; - buf = GooString::format("%!PS-TrueTypeFont-{0:2g}\n", - (double)getS32BE(0, &ok) / 65536.0); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - - // begin the font dictionary - (*outputFunc)(outputStream, "10 dict begin\n", 14); - (*outputFunc)(outputStream, "/FontName /", 11); - (*outputFunc)(outputStream, psName, strlen(psName)); - (*outputFunc)(outputStream, " def\n", 5); - (*outputFunc)(outputStream, "/FontType 42 def\n", 17); - (*outputFunc)(outputStream, "/FontMatrix [1 0 0 1 0 0] def\n", 30); - buf = GooString::format("/FontBBox [{0:d} {1:d} {2:d} {3:d}] def\n", - bbox[0], bbox[1], bbox[2], bbox[3]); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - (*outputFunc)(outputStream, "/PaintType 0 def\n", 17); - - // write the guts of the dictionary - cvtEncoding(encoding, outputFunc, outputStream); - cvtCharStrings(encoding, codeToGID, outputFunc, outputStream); - cvtSfnts(outputFunc, outputStream, nullptr, gFalse, &maxUsedGlyph); - - // end the dictionary and define the font - (*outputFunc)(outputStream, "FontName currentdict end definefont pop\n", 40); -} - -void FoFiTrueType::convertToType1(char *psName, const char **newEncoding, - GBool ascii, FoFiOutputFunc outputFunc, - void *outputStream) { - char *start; - int length; - FoFiType1C *ff; - - if (!getCFFBlock(&start, &length)) { - return; - } - if (!(ff = FoFiType1C::make(start, length))) { - return; - } - ff->convertToType1(psName, newEncoding, ascii, outputFunc, outputStream); - delete ff; -} - -void FoFiTrueType::convertToCIDType2(char *psName, - int *cidMap, int nCIDs, - GBool needVerticalMetrics, - FoFiOutputFunc outputFunc, - void *outputStream) { - GooString *buf; - int cid, maxUsedGlyph; - GBool ok; - int i, j, k; - - if (openTypeCFF) { - return; - } - - // write the header - ok = gTrue; - buf = GooString::format("%!PS-TrueTypeFont-{0:2g}\n", - (double)getS32BE(0, &ok) / 65536.0); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - - // begin the font dictionary - (*outputFunc)(outputStream, "20 dict begin\n", 14); - (*outputFunc)(outputStream, "/CIDFontName /", 14); - (*outputFunc)(outputStream, psName, strlen(psName)); - (*outputFunc)(outputStream, " def\n", 5); - (*outputFunc)(outputStream, "/CIDFontType 2 def\n", 19); - (*outputFunc)(outputStream, "/FontType 42 def\n", 17); - (*outputFunc)(outputStream, "/CIDSystemInfo 3 dict dup begin\n", 32); - (*outputFunc)(outputStream, " /Registry (Adobe) def\n", 24); - (*outputFunc)(outputStream, " /Ordering (Identity) def\n", 27); - (*outputFunc)(outputStream, " /Supplement 0 def\n", 20); - (*outputFunc)(outputStream, " end def\n", 10); - (*outputFunc)(outputStream, "/GDBytes 2 def\n", 15); - if (cidMap) { - buf = GooString::format("/CIDCount {0:d} def\n", nCIDs); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - if (nCIDs > 32767) { - (*outputFunc)(outputStream, "/CIDMap [", 9); - for (i = 0; i < nCIDs; i += 32768 - 16) { - (*outputFunc)(outputStream, "<\n", 2); - for (j = 0; j < 32768 - 16 && i+j < nCIDs; j += 16) { - (*outputFunc)(outputStream, " ", 2); - for (k = 0; k < 16 && i+j+k < nCIDs; ++k) { - cid = cidMap[i+j+k]; - buf = GooString::format("{0:02x}{1:02x}", - (cid >> 8) & 0xff, cid & 0xff); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - } - (*outputFunc)(outputStream, "\n", 1); - } - (*outputFunc)(outputStream, " >", 3); - } - (*outputFunc)(outputStream, "\n", 1); - (*outputFunc)(outputStream, "] def\n", 6); - } else { - (*outputFunc)(outputStream, "/CIDMap <\n", 10); - for (i = 0; i < nCIDs; i += 16) { - (*outputFunc)(outputStream, " ", 2); - for (j = 0; j < 16 && i+j < nCIDs; ++j) { - cid = cidMap[i+j]; - buf = GooString::format("{0:02x}{1:02x}", - (cid >> 8) & 0xff, cid & 0xff); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - } - (*outputFunc)(outputStream, "\n", 1); - } - (*outputFunc)(outputStream, "> def\n", 6); - } - } else { - // direct mapping - just fill the string(s) with s[i]=i - buf = GooString::format("/CIDCount {0:d} def\n", nGlyphs); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - if (nGlyphs > 32767) { - (*outputFunc)(outputStream, "/CIDMap [\n", 10); - for (i = 0; i < nGlyphs; i += 32767) { - j = nGlyphs - i < 32767 ? nGlyphs - i : 32767; - buf = GooString::format(" {0:d} string 0 1 {1:d} {{\n", 2 * j, j - 1); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - buf = GooString::format(" 2 copy dup 2 mul exch {0:d} add -8 bitshift put\n", - i); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - buf = GooString::format(" 1 index exch dup 2 mul 1 add exch {0:d} add" - " 255 and put\n", i); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - (*outputFunc)(outputStream, " } for\n", 8); - } - (*outputFunc)(outputStream, "] def\n", 6); - } else { - buf = GooString::format("/CIDMap {0:d} string\n", 2 * nGlyphs); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - buf = GooString::format(" 0 1 {0:d} {{\n", nGlyphs - 1); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - (*outputFunc)(outputStream, - " 2 copy dup 2 mul exch -8 bitshift put\n", 42); - (*outputFunc)(outputStream, - " 1 index exch dup 2 mul 1 add exch 255 and put\n", 50); - (*outputFunc)(outputStream, " } for\n", 8); - (*outputFunc)(outputStream, "def\n", 4); - } - } - (*outputFunc)(outputStream, "/FontMatrix [1 0 0 1 0 0] def\n", 30); - buf = GooString::format("/FontBBox [{0:d} {1:d} {2:d} {3:d}] def\n", - bbox[0], bbox[1], bbox[2], bbox[3]); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - (*outputFunc)(outputStream, "/PaintType 0 def\n", 17); - (*outputFunc)(outputStream, "/Encoding [] readonly def\n", 26); - (*outputFunc)(outputStream, "/CharStrings 1 dict dup begin\n", 30); - (*outputFunc)(outputStream, " /.notdef 0 def\n", 17); - (*outputFunc)(outputStream, " end readonly def\n", 19); - - // write the guts of the dictionary - cvtSfnts(outputFunc, outputStream, nullptr, needVerticalMetrics, &maxUsedGlyph); - - // end the dictionary and define the font - (*outputFunc)(outputStream, - "CIDFontName currentdict end /CIDFont defineresource pop\n", - 56); -} - -void FoFiTrueType::convertToCIDType0(char *psName, int *cidMap, int nCIDs, - FoFiOutputFunc outputFunc, - void *outputStream) { - char *start; - int length; - FoFiType1C *ff; - - if (!getCFFBlock(&start, &length)) { - return; - } - if (!(ff = FoFiType1C::make(start, length))) { - return; - } - ff->convertToCIDType0(psName, cidMap, nCIDs, outputFunc, outputStream); - delete ff; -} - -void FoFiTrueType::convertToType0(char *psName, int *cidMap, int nCIDs, - GBool needVerticalMetrics, - int *maxValidGlyph, - FoFiOutputFunc outputFunc, - void *outputStream) { - GooString *buf; - GooString *sfntsName; - int maxUsedGlyph, n, i, j; - - *maxValidGlyph = -1; - - if (openTypeCFF) { - return; - } - - // write the Type 42 sfnts array - sfntsName = (new GooString(psName))->append("_sfnts"); - cvtSfnts(outputFunc, outputStream, sfntsName, needVerticalMetrics, - &maxUsedGlyph); - delete sfntsName; - - // write the descendant Type 42 fonts - // (The following is a kludge: nGlyphs is the glyph count from the - // maxp table; maxUsedGlyph is the max glyph number that has a - // non-zero-length description, from the loca table. The problem is - // that some TrueType font subsets fail to change the glyph count, - // i.e., nGlyphs is much larger than maxUsedGlyph+1, which results - // in an unnecessarily huge Type 0 font. But some other PDF files - // have fonts with only zero or one used glyph, and a content stream - // that refers to one of the unused glyphs -- this results in PS - // errors if we simply use maxUsedGlyph+1 for the Type 0 font. So - // we compromise by always defining at least 256 glyphs.) - // Some fonts have a large nGlyphs but maxUsedGlyph of 0. - // These fonts might reference any glyph. - // Return the last written glyph number in maxValidGlyph. - // PSOutputDev::drawString() can use maxValidGlyph to avoid - // referencing zero-length glyphs that we trimmed. - // This allows pdftops to avoid writing huge files while still - // handling the rare PDF that uses a zero-length glyph. - if (cidMap) { - n = nCIDs; - } else if (nGlyphs > maxUsedGlyph + 256) { - if (maxUsedGlyph <= 255) { - n = 256; - } else { - n = maxUsedGlyph + 1; - } - } else { - n = nGlyphs; - } - *maxValidGlyph = n-1; - for (i = 0; i < n; i += 256) { - (*outputFunc)(outputStream, "10 dict begin\n", 14); - (*outputFunc)(outputStream, "/FontName /", 11); - (*outputFunc)(outputStream, psName, strlen(psName)); - buf = GooString::format("_{0:02x} def\n", i >> 8); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - (*outputFunc)(outputStream, "/FontType 42 def\n", 17); - (*outputFunc)(outputStream, "/FontMatrix [1 0 0 1 0 0] def\n", 30); - buf = GooString::format("/FontBBox [{0:d} {1:d} {2:d} {3:d}] def\n", - bbox[0], bbox[1], bbox[2], bbox[3]); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - (*outputFunc)(outputStream, "/PaintType 0 def\n", 17); - (*outputFunc)(outputStream, "/sfnts ", 7); - (*outputFunc)(outputStream, psName, strlen(psName)); - (*outputFunc)(outputStream, "_sfnts def\n", 11); - (*outputFunc)(outputStream, "/Encoding 256 array\n", 20); - for (j = 0; j < 256 && i+j < n; ++j) { - buf = GooString::format("dup {0:d} /c{1:02x} put\n", j, j); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - } - (*outputFunc)(outputStream, "readonly def\n", 13); - (*outputFunc)(outputStream, "/CharStrings 257 dict dup begin\n", 32); - (*outputFunc)(outputStream, "/.notdef 0 def\n", 15); - for (j = 0; j < 256 && i+j < n; ++j) { - buf = GooString::format("/c{0:02x} {1:d} def\n", - j, cidMap ? cidMap[i+j] : i+j); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - } - (*outputFunc)(outputStream, "end readonly def\n", 17); - (*outputFunc)(outputStream, - "FontName currentdict end definefont pop\n", 40); - } - - // write the Type 0 parent font - (*outputFunc)(outputStream, "16 dict begin\n", 14); - (*outputFunc)(outputStream, "/FontName /", 11); - (*outputFunc)(outputStream, psName, strlen(psName)); - (*outputFunc)(outputStream, " def\n", 5); - (*outputFunc)(outputStream, "/FontType 0 def\n", 16); - (*outputFunc)(outputStream, "/FontMatrix [1 0 0 1 0 0] def\n", 30); - (*outputFunc)(outputStream, "/FMapType 2 def\n", 16); - (*outputFunc)(outputStream, "/Encoding [\n", 12); - for (i = 0; i < n; i += 256) { - buf = GooString::format("{0:d}\n", i >> 8); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - } - (*outputFunc)(outputStream, "] def\n", 6); - (*outputFunc)(outputStream, "/FDepVector [\n", 14); - for (i = 0; i < n; i += 256) { - (*outputFunc)(outputStream, "/", 1); - (*outputFunc)(outputStream, psName, strlen(psName)); - buf = GooString::format("_{0:02x} findfont\n", i >> 8); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - } - (*outputFunc)(outputStream, "] def\n", 6); - (*outputFunc)(outputStream, "FontName currentdict end definefont pop\n", 40); -} - -void FoFiTrueType::convertToType0(char *psName, int *cidMap, int nCIDs, - FoFiOutputFunc outputFunc, - void *outputStream) { - char *start; - int length; - FoFiType1C *ff; - - if (!getCFFBlock(&start, &length)) { - return; - } - if (!(ff = FoFiType1C::make(start, length))) { - return; - } - ff->convertToType0(psName, cidMap, nCIDs, outputFunc, outputStream); - delete ff; -} - -void FoFiTrueType::cvtEncoding(char **encoding, - FoFiOutputFunc outputFunc, - void *outputStream) { - const char *name; - GooString *buf; - int i; - - (*outputFunc)(outputStream, "/Encoding 256 array\n", 20); - if (encoding) { - for (i = 0; i < 256; ++i) { - if (!(name = encoding[i])) { - name = ".notdef"; - } - buf = GooString::format("dup {0:d} /", i); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - (*outputFunc)(outputStream, name, strlen(name)); - (*outputFunc)(outputStream, " put\n", 5); - } - } else { - for (i = 0; i < 256; ++i) { - buf = GooString::format("dup {0:d} /c{1:02x} put\n", i, i); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - } - } - (*outputFunc)(outputStream, "readonly def\n", 13); -} - -void FoFiTrueType::cvtCharStrings(char **encoding, - int *codeToGID, - FoFiOutputFunc outputFunc, - void *outputStream) { - char *name; - GooString *buf; - char buf2[16]; - int i, k; - - // always define '.notdef' - (*outputFunc)(outputStream, "/CharStrings 256 dict dup begin\n", 32); - (*outputFunc)(outputStream, "/.notdef 0 def\n", 15); - - // if there's no 'cmap' table, punt - if (nCmaps == 0) { - goto err; - } - - // map char name to glyph index: - // 1. use encoding to map name to char code - // 2. use codeToGID to map char code to glyph index - // N.B. We do this in reverse order because font subsets can have - // weird encodings that use the same character name twice, and - // the first definition is probably the one we want. - k = 0; // make gcc happy - for (i = 255; i >= 0; --i) { - if (encoding) { - name = encoding[i]; - } else { - sprintf(buf2, "c%02x", i); - name = buf2; - } - if (name && strcmp(name, ".notdef")) { - k = codeToGID[i]; - // note: Distiller (maybe Adobe's PS interpreter in general) - // doesn't like TrueType fonts that have CharStrings entries - // which point to nonexistent glyphs, hence the (k < nGlyphs) - // test - if (k > 0 && k < nGlyphs) { - (*outputFunc)(outputStream, "/", 1); - (*outputFunc)(outputStream, name, strlen(name)); - buf = GooString::format(" {0:d} def\n", k); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - } - } - } - - err: - (*outputFunc)(outputStream, "end readonly def\n", 17); -} - -void FoFiTrueType::cvtSfnts(FoFiOutputFunc outputFunc, - void *outputStream, GooString *name, - GBool needVerticalMetrics, - int *maxUsedGlyph) { - Guchar headData[54]; - TrueTypeLoca *locaTable; - Guchar *locaData; - TrueTypeTable newTables[nT42Tables]; - Guchar tableDir[12 + nT42Tables*16]; - GBool ok; - Guint checksum; - int nNewTables; - int glyfTableLen, length, pos, glyfPos, i, j, k, vmtxTabLength; - Guchar vheaTab[36] = { - 0, 1, 0, 0, // table version number - 0, 0, // ascent - 0, 0, // descent - 0, 0, // reserved - 0, 0, // max advance height - 0, 0, // min top side bearing - 0, 0, // min bottom side bearing - 0, 0, // y max extent - 0, 0, // caret slope rise - 0, 1, // caret slope run - 0, 0, // caret offset - 0, 0, // reserved - 0, 0, // reserved - 0, 0, // reserved - 0, 0, // reserved - 0, 0, // metric data format - 0, 1 // number of advance heights in vmtx table - }; - Guchar *vmtxTab; - GBool needVhea, needVmtx; - int advance; - - // construct the 'head' table, zero out the font checksum - i = seekTable("head"); - if (i < 0 || i >= nTables) { - return; - } - pos = tables[i].offset; - if (!checkRegion(pos, 54)) { - return; - } - memcpy(headData, file + pos, 54); - headData[8] = headData[9] = headData[10] = headData[11] = (Guchar)0; - - // check for a bogus loca format field in the 'head' table - // (I've encountered fonts with loca format set to 0x0100 instead of 0x0001) - if (locaFmt != 0 && locaFmt != 1) { - headData[50] = 0; - headData[51] = 1; - } - - // read the original 'loca' table, pad entries out to 4 bytes, and - // sort it into proper order -- some (non-compliant) fonts have - // out-of-order loca tables; in order to correctly handle the case - // where (compliant) fonts have empty entries in the middle of the - // table, cmpTrueTypeLocaOffset uses offset as its primary sort key, - // and idx as its secondary key (ensuring that adjacent entries with - // the same pos value remain in the same order) - locaTable = (TrueTypeLoca *)gmallocn(nGlyphs + 1, sizeof(TrueTypeLoca)); - i = seekTable("loca"); - pos = tables[i].offset; - i = seekTable("glyf"); - glyfTableLen = tables[i].len; - ok = gTrue; - for (i = 0; i <= nGlyphs; ++i) { - locaTable[i].idx = i; - if (locaFmt) { - locaTable[i].origOffset = (int)getU32BE(pos + i*4, &ok); - } else { - locaTable[i].origOffset = 2 * getU16BE(pos + i*2, &ok); - } - if (locaTable[i].origOffset > glyfTableLen) { - locaTable[i].origOffset = glyfTableLen; - } - } - std::sort(locaTable, locaTable + nGlyphs + 1, - cmpTrueTypeLocaOffsetFunctor()); - for (i = 0; i < nGlyphs; ++i) { - locaTable[i].len = locaTable[i+1].origOffset - locaTable[i].origOffset; - } - locaTable[nGlyphs].len = 0; - std::sort(locaTable, locaTable + nGlyphs + 1, cmpTrueTypeLocaIdxFunctor()); - pos = 0; - *maxUsedGlyph = -1; - for (i = 0; i <= nGlyphs; ++i) { - locaTable[i].newOffset = pos; - pos += locaTable[i].len; - if (pos & 3) { - pos += 4 - (pos & 3); - } - if (locaTable[i].len > 0) { - *maxUsedGlyph = i; - } - } - - // construct the new 'loca' table - locaData = (Guchar *)gmallocn(nGlyphs + 1, (locaFmt ? 4 : 2)); - for (i = 0; i <= nGlyphs; ++i) { - pos = locaTable[i].newOffset; - if (locaFmt) { - locaData[4*i ] = (Guchar)(pos >> 24); - locaData[4*i+1] = (Guchar)(pos >> 16); - locaData[4*i+2] = (Guchar)(pos >> 8); - locaData[4*i+3] = (Guchar) pos; - } else { - locaData[2*i ] = (Guchar)(pos >> 9); - locaData[2*i+1] = (Guchar)(pos >> 1); - } - } - - // count the number of tables - nNewTables = 0; - for (i = 0; i < nT42Tables; ++i) { - if (t42Tables[i].required || - seekTable(t42Tables[i].tag) >= 0) { - ++nNewTables; - } - } - vmtxTab = nullptr; // make gcc happy - vmtxTabLength = 0; - advance = 0; // make gcc happy - if (needVerticalMetrics) { - needVhea = seekTable("vhea") < 0; - needVmtx = seekTable("vmtx") < 0; - if (needVhea || needVmtx) { - i = seekTable("head"); - advance = getU16BE(tables[i].offset + 18, &ok); // units per em - if (needVhea) { - ++nNewTables; - } - if (needVmtx) { - ++nNewTables; - } - } - } - - // construct the new table headers, including table checksums - // (pad each table out to a multiple of 4 bytes) - pos = 12 + nNewTables*16; - k = 0; - for (i = 0; i < nT42Tables; ++i) { - length = -1; - checksum = 0; // make gcc happy - if (i == t42HeadTable) { - length = 54; - checksum = computeTableChecksum(headData, 54); - } else if (i == t42LocaTable) { - length = (nGlyphs + 1) * (locaFmt ? 4 : 2); - checksum = computeTableChecksum(locaData, length); - } else if (i == t42GlyfTable) { - length = 0; - checksum = 0; - glyfPos = tables[seekTable("glyf")].offset; - for (j = 0; j < nGlyphs; ++j) { - length += locaTable[j].len; - if (length & 3) { - length += 4 - (length & 3); - } - if (checkRegion(glyfPos + locaTable[j].origOffset, locaTable[j].len)) { - checksum += - computeTableChecksum(file + glyfPos + locaTable[j].origOffset, - locaTable[j].len); - } - } - } else { - if ((j = seekTable(t42Tables[i].tag)) >= 0) { - length = tables[j].len; - if (checkRegion(tables[j].offset, length)) { - checksum = computeTableChecksum(file + tables[j].offset, length); - } - } else if (needVerticalMetrics && i == t42VheaTable) { - vheaTab[10] = advance / 256; // max advance height - vheaTab[11] = advance % 256; - length = sizeof(vheaTab); - checksum = computeTableChecksum(vheaTab, length); - } else if (needVerticalMetrics && i == t42VmtxTable) { - length = 4 + (nGlyphs - 1) * 2; - vmtxTabLength = length; - vmtxTab = (Guchar *)gmalloc(length); - vmtxTab[0] = advance / 256; - vmtxTab[1] = advance % 256; - for (j = 2; j < length; j += 2) { - vmtxTab[j] = 0; - vmtxTab[j+1] = 0; - } - checksum = computeTableChecksum(vmtxTab, length); - } else if (t42Tables[i].required) { - //~ error(-1, "Embedded TrueType font is missing a required table ('%s')", - //~ t42Tables[i].tag); - length = 0; - checksum = 0; - } - } - if (length >= 0) { - newTables[k].tag = ((t42Tables[i].tag[0] & 0xff) << 24) | - ((t42Tables[i].tag[1] & 0xff) << 16) | - ((t42Tables[i].tag[2] & 0xff) << 8) | - (t42Tables[i].tag[3] & 0xff); - newTables[k].checksum = checksum; - newTables[k].offset = pos; - newTables[k].len = length; - pos += length; - if (pos & 3) { - pos += 4 - (length & 3); - } - ++k; - } - } - - // construct the table directory - tableDir[0] = 0x00; // sfnt version - tableDir[1] = 0x01; - tableDir[2] = 0x00; - tableDir[3] = 0x00; - tableDir[4] = 0; // numTables - tableDir[5] = nNewTables; - tableDir[6] = 0; // searchRange - tableDir[7] = (Guchar)128; - tableDir[8] = 0; // entrySelector - tableDir[9] = 3; - tableDir[10] = 0; // rangeShift - tableDir[11] = (Guchar)(16 * nNewTables - 128); - pos = 12; - for (i = 0; i < nNewTables; ++i) { - tableDir[pos ] = (Guchar)(newTables[i].tag >> 24); - tableDir[pos+ 1] = (Guchar)(newTables[i].tag >> 16); - tableDir[pos+ 2] = (Guchar)(newTables[i].tag >> 8); - tableDir[pos+ 3] = (Guchar) newTables[i].tag; - tableDir[pos+ 4] = (Guchar)(newTables[i].checksum >> 24); - tableDir[pos+ 5] = (Guchar)(newTables[i].checksum >> 16); - tableDir[pos+ 6] = (Guchar)(newTables[i].checksum >> 8); - tableDir[pos+ 7] = (Guchar) newTables[i].checksum; - tableDir[pos+ 8] = (Guchar)(newTables[i].offset >> 24); - tableDir[pos+ 9] = (Guchar)(newTables[i].offset >> 16); - tableDir[pos+10] = (Guchar)(newTables[i].offset >> 8); - tableDir[pos+11] = (Guchar) newTables[i].offset; - tableDir[pos+12] = (Guchar)(newTables[i].len >> 24); - tableDir[pos+13] = (Guchar)(newTables[i].len >> 16); - tableDir[pos+14] = (Guchar)(newTables[i].len >> 8); - tableDir[pos+15] = (Guchar) newTables[i].len; - pos += 16; - } - - // compute the font checksum and store it in the head table - checksum = computeTableChecksum(tableDir, 12 + nNewTables*16); - for (i = 0; i < nNewTables; ++i) { - checksum += newTables[i].checksum; - } - checksum = 0xb1b0afba - checksum; // because the TrueType spec says so - headData[ 8] = (Guchar)(checksum >> 24); - headData[ 9] = (Guchar)(checksum >> 16); - headData[10] = (Guchar)(checksum >> 8); - headData[11] = (Guchar) checksum; - - // start the sfnts array - if (name) { - (*outputFunc)(outputStream, "/", 1); - (*outputFunc)(outputStream, name->getCString(), name->getLength()); - (*outputFunc)(outputStream, " [\n", 3); - } else { - (*outputFunc)(outputStream, "/sfnts [\n", 9); - } - - // write the table directory - dumpString(tableDir, 12 + nNewTables*16, outputFunc, outputStream); - - // write the tables - for (i = 0; i < nNewTables; ++i) { - if (i == t42HeadTable) { - dumpString(headData, 54, outputFunc, outputStream); - } else if (i == t42LocaTable) { - length = (nGlyphs + 1) * (locaFmt ? 4 : 2); - dumpString(locaData, length, outputFunc, outputStream); - } else if (i == t42GlyfTable) { - glyfPos = tables[seekTable("glyf")].offset; - for (j = 0; j < nGlyphs; ++j) { - if (locaTable[j].len > 0 && - checkRegion(glyfPos + locaTable[j].origOffset, locaTable[j].len)) { - dumpString(file + glyfPos + locaTable[j].origOffset, - locaTable[j].len, outputFunc, outputStream); - } - } - } else { - // length == 0 means the table is missing and the error was - // already reported during the construction of the table - // headers - if ((length = newTables[i].len) > 0) { - if ((j = seekTable(t42Tables[i].tag)) >= 0 && - checkRegion(tables[j].offset, tables[j].len)) { - dumpString(file + tables[j].offset, tables[j].len, - outputFunc, outputStream); - } else if (needVerticalMetrics && i == t42VheaTable) { - if (unlikely(length > (int)sizeof(vheaTab))) { - error(errSyntaxWarning, -1, "length bigger than vheaTab size"); - length = sizeof(vheaTab); - } - dumpString(vheaTab, length, outputFunc, outputStream); - } else if (needVerticalMetrics && i == t42VmtxTable) { - if (unlikely(length > vmtxTabLength)) { - error(errSyntaxWarning, -1, "length bigger than vmtxTab size"); - length = vmtxTabLength; - } - dumpString(vmtxTab, length, outputFunc, outputStream); - } - } - } - } - - // end the sfnts array - (*outputFunc)(outputStream, "] def\n", 6); - - gfree(locaData); - gfree(locaTable); - if (vmtxTab) { - gfree(vmtxTab); - } -} - -void FoFiTrueType::dumpString(Guchar *s, int length, - FoFiOutputFunc outputFunc, - void *outputStream) { - GooString *buf; - int pad, i, j; - - (*outputFunc)(outputStream, "<", 1); - for (i = 0; i < length; i += 32) { - for (j = 0; j < 32 && i+j < length; ++j) { - buf = GooString::format("{0:02x}", s[i+j] & 0xff); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - } - if (i % (65536 - 32) == 65536 - 64) { - (*outputFunc)(outputStream, ">\n<", 3); - } else if (i+32 < length) { - (*outputFunc)(outputStream, "\n", 1); - } - } - if (length & 3) { - pad = 4 - (length & 3); - for (i = 0; i < pad; ++i) { - (*outputFunc)(outputStream, "00", 2); - } - } - // add an extra zero byte because the Adobe Type 42 spec says so - (*outputFunc)(outputStream, "00>\n", 4); -} - -Guint FoFiTrueType::computeTableChecksum(Guchar *data, int length) { - Guint checksum, word; - int i; - - checksum = 0; - for (i = 0; i+3 < length; i += 4) { - word = ((data[i ] & 0xff) << 24) + - ((data[i+1] & 0xff) << 16) + - ((data[i+2] & 0xff) << 8) + - (data[i+3] & 0xff); - checksum += word; - } - if (length & 3) { - word = 0; - i = length & ~3; - switch (length & 3) { - case 3: - word |= (data[i+2] & 0xff) << 8; - // fallthrough - case 2: - word |= (data[i+1] & 0xff) << 16; - // fallthrough - case 1: - word |= (data[i ] & 0xff) << 24; - break; - } - checksum += word; - } - return checksum; -} - -void FoFiTrueType::parse() { - Guint topTag; - int pos, ver, i, j; - - parsedOk = gTrue; - - // look for a collection (TTC) - topTag = getU32BE(0, &parsedOk); - if (!parsedOk) { - return; - } - if (topTag == ttcfTag) { - /* TTC font */ - int dircount; - - dircount = getU32BE(8, &parsedOk); - if (!parsedOk) - return; - if (! dircount) { - parsedOk = gFalse; - return; - } - - if (faceIndex >= dircount) - faceIndex = 0; - pos = getU32BE(12 + faceIndex * 4, &parsedOk); - if (! parsedOk) - return; - } else { - pos = 0; - } - - // check the sfnt version - ver = getU32BE(pos, &parsedOk); - if (!parsedOk) { - return; - } - openTypeCFF = ver == 0x4f54544f; // 'OTTO' - - // read the table directory - nTables = getU16BE(pos + 4, &parsedOk); - if (!parsedOk) { - return; - } - tables = (TrueTypeTable *)gmallocn(nTables, sizeof(TrueTypeTable)); - pos += 12; - j = 0; - for (i = 0; i < nTables; ++i) { - tables[j].tag = getU32BE(pos, &parsedOk); - tables[j].checksum = getU32BE(pos + 4, &parsedOk); - tables[j].offset = (int)getU32BE(pos + 8, &parsedOk); - tables[j].len = (int)getU32BE(pos + 12, &parsedOk); - if (unlikely((tables[j].offset < 0) || - (tables[j].len < 0) || - (tables[j].offset < INT_MAX - tables[j].len) || - (tables[j].len > INT_MAX - tables[j].offset) || - (tables[j].offset + tables[j].len >= tables[j].offset && tables[j].offset + tables[j].len <= len))) { - // ignore any bogus entries in the table directory - ++j; - } - pos += 16; - } - if (nTables != j) { - nTables = j; - tables = (TrueTypeTable *)greallocn_checkoverflow(tables, nTables, sizeof(TrueTypeTable)); - } - if (!parsedOk || tables == nullptr) { - return; - } - - // check for tables that are required by both the TrueType spec and - // the Type 42 spec - if (seekTable("head") < 0 || - seekTable("hhea") < 0 || - seekTable("maxp") < 0 || - (!openTypeCFF && seekTable("loca") < 0) || - (!openTypeCFF && seekTable("glyf") < 0) || - (openTypeCFF && seekTable("CFF ") < 0)) { - parsedOk = gFalse; - return; - } - - // read the cmaps - if ((i = seekTable("cmap")) >= 0) { - pos = tables[i].offset + 2; - nCmaps = getU16BE(pos, &parsedOk); - pos += 2; - if (!parsedOk) { - return; - } - cmaps = (TrueTypeCmap *)gmallocn(nCmaps, sizeof(TrueTypeCmap)); - for (j = 0; j < nCmaps; ++j) { - cmaps[j].platform = getU16BE(pos, &parsedOk); - cmaps[j].encoding = getU16BE(pos + 2, &parsedOk); - cmaps[j].offset = tables[i].offset + getU32BE(pos + 4, &parsedOk); - pos += 8; - cmaps[j].fmt = getU16BE(cmaps[j].offset, &parsedOk); - cmaps[j].len = getU16BE(cmaps[j].offset + 2, &parsedOk); - } - if (!parsedOk) { - return; - } - } else { - nCmaps = 0; - } - - // get the number of glyphs from the maxp table - i = seekTable("maxp"); - nGlyphs = getU16BE(tables[i].offset + 4, &parsedOk); - if (!parsedOk) { - return; - } - - // get the bbox and loca table format from the head table - i = seekTable("head"); - bbox[0] = getS16BE(tables[i].offset + 36, &parsedOk); - bbox[1] = getS16BE(tables[i].offset + 38, &parsedOk); - bbox[2] = getS16BE(tables[i].offset + 40, &parsedOk); - bbox[3] = getS16BE(tables[i].offset + 42, &parsedOk); - locaFmt = getS16BE(tables[i].offset + 50, &parsedOk); - if (!parsedOk) { - return; - } - - // read the post table - readPostTable(); -} - -void FoFiTrueType::readPostTable() { - std::string name; - int tablePos, postFmt, stringIdx, stringPos; - GBool ok; - int i, j, n, m; - - ok = gTrue; - if ((i = seekTable("post")) < 0) { - return; - } - tablePos = tables[i].offset; - postFmt = getU32BE(tablePos, &ok); - if (!ok) { - goto err; - } - if (postFmt == 0x00010000) { - nameToGID.reserve(258); - for (i = 0; i < 258; ++i) { - nameToGID.emplace(macGlyphNames[i], i); - } - } else if (postFmt == 0x00020000) { - nameToGID.reserve(258); - n = getU16BE(tablePos + 32, &ok); - if (!ok) { - goto err; - } - if (n > nGlyphs) { - n = nGlyphs; - } - stringIdx = 0; - stringPos = tablePos + 34 + 2*n; - for (i = 0; i < n; ++i) { - ok = gTrue; - j = getU16BE(tablePos + 34 + 2*i, &ok); - if (j < 258) { - nameToGID[macGlyphNames[j]] = i; - } else { - j -= 258; - if (j != stringIdx) { - for (stringIdx = 0, stringPos = tablePos + 34 + 2*n; - stringIdx < j; - ++stringIdx, stringPos += 1 + getU8(stringPos, &ok)) ; - if (!ok) { - continue; - } - } - m = getU8(stringPos, &ok); - if (!ok || !checkRegion(stringPos + 1, m)) { - continue; - } - name.assign((char *)&file[stringPos + 1], m); - nameToGID[name] = i; - ++stringIdx; - stringPos += 1 + m; - } - } - } else if (postFmt == 0x00028000) { - nameToGID.reserve(258); - for (i = 0; i < nGlyphs; ++i) { - j = getU8(tablePos + 32 + i, &ok); - if (!ok) { - continue; - } - if (j < 258) { - nameToGID[macGlyphNames[j]] = i; - } - } - } - - return; - - err: - nameToGID.clear(); -} - -int FoFiTrueType::seekTable(const char *tag) { - Guint tagI; - int i; - - tagI = ((tag[0] & 0xff) << 24) | - ((tag[1] & 0xff) << 16) | - ((tag[2] & 0xff) << 8) | - (tag[3] & 0xff); - for (i = 0; i < nTables; ++i) { - if (tables[i].tag == tagI) { - return i; - } - } - return -1; -} - -Guint FoFiTrueType::charToTag(const char *tagName) -{ - int n = strlen(tagName); - Guint tag = 0; - int i; - - if (n > 4) n = 4; - for (i = 0;i < n;i++) { - tag <<= 8; - tag |= tagName[i] & 0xff; - } - for (;i < 4;i++) { - tag <<= 8; - tag |= ' '; - } - return tag; -} - -/* - setup GSUB table data - Only supporting vertical text substitution. -*/ -int FoFiTrueType::setupGSUB(const char *scriptName) -{ - return setupGSUB(scriptName, nullptr); -} - -/* - setup GSUB table data - Only supporting vertical text substitution. -*/ -int FoFiTrueType::setupGSUB(const char *scriptName, - const char *languageName) -{ - Guint gsubTable; - unsigned int i; - Guint scriptList, featureList; - Guint scriptCount; - Guint tag; - Guint scriptTable = 0; - Guint langSys; - Guint featureCount; - Guint featureIndex; - Guint ftable = 0; - Guint llist; - Guint scriptTag; - int x; - Guint pos; - - if (scriptName == nullptr) { - gsubFeatureTable = 0; - return 0; - } - scriptTag = charToTag(scriptName); - /* read GSUB Header */ - if ((x = seekTable("GSUB")) < 0) { - return 0; /* GSUB table not found */ - } - gsubTable = tables[x].offset; - pos = gsubTable+4; - scriptList = getU16BE(pos,&parsedOk); - pos += 2; - featureList = getU16BE(pos,&parsedOk); - pos += 2; - llist = getU16BE(pos,&parsedOk); - - gsubLookupList = llist+gsubTable; /* change to offset from top of file */ - /* read script list table */ - pos = gsubTable+scriptList; - scriptCount = getU16BE(pos,&parsedOk); - pos += 2; - /* find script */ - for (i = 0;i < scriptCount;i++) { - tag = getU32BE(pos,&parsedOk); - pos += 4; - scriptTable = getU16BE(pos,&parsedOk); - pos += 2; - if (tag == scriptTag) { - /* found */ - break; - } - } - if (i >= scriptCount) { - /* not found */ - return 0; - } - - /* read script table */ - /* use default language system */ - pos = gsubTable+scriptList+scriptTable; - langSys = 0; - if (languageName) { - Guint langTag = charToTag(languageName); - Guint langCount = getU16BE(pos+2,&parsedOk); - for (i = 0;i < langCount && langSys == 0;i++) { - tag = getU32BE(pos+4+i*(4+2),&parsedOk); - if (tag == langTag) { - langSys = getU16BE(pos+4+i*(4+2)+4,&parsedOk); - } - } - } - if (langSys == 0) { - /* default language system */ - langSys = getU16BE(pos,&parsedOk); - } - - /* read LangSys table */ - if (langSys == 0) { - /* no default LangSys */ - return 0; - } - - pos = gsubTable+scriptList+scriptTable+langSys+2; - featureIndex = getU16BE(pos,&parsedOk); /* ReqFeatureIndex */ - pos += 2; - - if (featureIndex != 0xffff) { - Guint tpos; - /* read feature record */ - tpos = gsubTable+featureList; - featureCount = getU16BE(tpos,&parsedOk); - tpos = gsubTable+featureList+2+featureIndex*(4+2); - tag = getU32BE(tpos,&parsedOk); - tpos += 4; - if (tag == vrt2Tag) { - /* vrt2 is preferred, overwrite vert */ - ftable = getU16BE(tpos,&parsedOk); - /* convert to offset from file top */ - gsubFeatureTable = ftable+gsubTable+featureList; - return 0; - } else if (tag == vertTag) { - ftable = getU16BE(tpos,&parsedOk); - } - } - featureCount = getU16BE(pos,&parsedOk); - pos += 2; - /* find 'vrt2' or 'vert' feature */ - for (i = 0;i < featureCount;i++) { - Guint oldPos; - - featureIndex = getU16BE(pos,&parsedOk); - pos += 2; - oldPos = pos; /* save position */ - /* read feature record */ - pos = gsubTable+featureList+2+featureIndex*(4+2); - tag = getU32BE(pos,&parsedOk); - pos += 4; - if (tag == vrt2Tag) { - /* vrt2 is preferred, overwrite vert */ - ftable = getU16BE(pos,&parsedOk); - break; - } else if (ftable == 0 && tag == vertTag) { - ftable = getU16BE(pos,&parsedOk); - } - pos = oldPos; /* restore old position */ - } - if (ftable == 0) { - /* vert nor vrt2 are not found */ - return 0; - } - /* convert to offset from file top */ - gsubFeatureTable = ftable+gsubTable+featureList; - return 0; -} - -Guint FoFiTrueType::doMapToVertGID(Guint orgGID) -{ - Guint lookupCount; - Guint lookupListIndex; - Guint i; - Guint gid = 0; - Guint pos; - - pos = gsubFeatureTable+2; - lookupCount = getU16BE(pos,&parsedOk); - pos += 2; - for (i = 0;i < lookupCount;i++) { - lookupListIndex = getU16BE(pos,&parsedOk); - pos += 2; - if ((gid = scanLookupList(lookupListIndex,orgGID)) != 0) { - break; - } - } - return gid; -} - -Guint FoFiTrueType::mapToVertGID(Guint orgGID) -{ - Guint mapped; - - if (gsubFeatureTable == 0) return orgGID; - if ((mapped = doMapToVertGID(orgGID)) != 0) { - return mapped; - } - return orgGID; -} - -Guint FoFiTrueType::scanLookupList(Guint listIndex, Guint orgGID) -{ - Guint lookupTable; - Guint subTableCount; - Guint subTable; - Guint i; - Guint gid = 0; - Guint pos; - - if (gsubLookupList == 0) return 0; /* no lookup list */ - pos = gsubLookupList+2+listIndex*2; - lookupTable = getU16BE(pos,&parsedOk); - /* read lookup table */ - pos = gsubLookupList+lookupTable+4; - subTableCount = getU16BE(pos,&parsedOk); - pos += 2;; - for (i = 0;i < subTableCount;i++) { - subTable = getU16BE(pos,&parsedOk); - pos += 2; - if ((gid = scanLookupSubTable(gsubLookupList+lookupTable+subTable,orgGID)) - != 0) break; - } - return gid; -} - -Guint FoFiTrueType::scanLookupSubTable(Guint subTable, Guint orgGID) -{ - Guint format; - Guint coverage; - int delta; - int glyphCount; - Guint substitute; - Guint gid = 0; - int coverageIndex; - int pos; - - pos = subTable; - format = getU16BE(pos,&parsedOk); - pos += 2; - coverage = getU16BE(pos,&parsedOk); - pos += 2; - if ((coverageIndex = - checkGIDInCoverage(subTable+coverage,orgGID)) >= 0) { - switch (format) { - case 1: - /* format 1 */ - delta = getS16BE(pos,&parsedOk); - pos += 2; - gid = orgGID+delta; - break; - case 2: - /* format 2 */ - glyphCount = getS16BE(pos,&parsedOk); - pos += 2; - if (glyphCount > coverageIndex) { - pos += coverageIndex*2; - substitute = getU16BE(pos,&parsedOk); - gid = substitute; - } - break; - default: - /* unknown format */ - break; - } - } - return gid; -} - -int FoFiTrueType::checkGIDInCoverage(Guint coverage, Guint orgGID) -{ - int index = -1; - Guint format; - Guint count; - Guint i; - Guint pos; - - pos = coverage; - format = getU16BE(pos,&parsedOk); - pos += 2; - switch (format) { - case 1: - count = getU16BE(pos,&parsedOk); - pos += 2; - // In some poor CJK fonts, key GIDs are not sorted, - // thus we cannot finish checking even when the range - // including orgGID seems to have already passed. - for (i = 0;i < count;i++) { - Guint gid; - - gid = getU16BE(pos,&parsedOk); - pos += 2; - if (gid == orgGID) { - /* found */ - index = i; - break; - } - } - break; - case 2: - count = getU16BE(pos,&parsedOk); - pos += 2; - for (i = 0;i < count;i++) { - Guint startGID, endGID; - Guint startIndex; - - startGID = getU16BE(pos,&parsedOk); - pos += 2; - endGID = getU16BE(pos,&parsedOk); - pos += 2; - startIndex = getU16BE(pos,&parsedOk); - pos += 2; - // In some poor CJK fonts, key GIDs are not sorted, - // thus we cannot finish checking even when the range - // including orgGID seems to have already passed. - if (startGID <= orgGID && orgGID <= endGID) { - /* found */ - index = startIndex+orgGID-startGID; - break; - } - } - break; - default: - break; - } - return index; -} - diff --git a/Build/source/libs/poppler/poppler-src/fofi/FoFiTrueType.h b/Build/source/libs/poppler/poppler-src/fofi/FoFiTrueType.h deleted file mode 100644 index 6bc4022f7db..00000000000 --- a/Build/source/libs/poppler/poppler-src/fofi/FoFiTrueType.h +++ /dev/null @@ -1,213 +0,0 @@ -//======================================================================== -// -// FoFiTrueType.h -// -// Copyright 1999-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2006 Takashi Iwai <tiwai@suse.de> -// Copyright (C) 2007 Koji Otani <sho@bbr.jp> -// Copyright (C) 2011, 2012 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2012 Suzuki Toshiya <mpsuzuki@hiroshima-u.ac.jp> -// Copyright (C) 2016 William Bader <williambader@hotmail.com> -// Copyright (C) 2018 Adam Reichold <adam.reichold@t-online.de> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef FOFITRUETYPE_H -#define FOFITRUETYPE_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "stddef.h" -#include <unordered_map> -#include <string> -#include "goo/gtypes.h" -#include "FoFiBase.h" - -class GooString; -struct TrueTypeTable; -struct TrueTypeCmap; - -//------------------------------------------------------------------------ -// FoFiTrueType -//------------------------------------------------------------------------ - -class FoFiTrueType: public FoFiBase { -public: - - // Create a FoFiTrueType object from a memory buffer. - static FoFiTrueType *make(char *fileA, int lenA, int faceIndexA=0); - - // Create a FoFiTrueType object from a file on disk. - static FoFiTrueType *load(char *fileName, int faceIndexA=0); - - ~FoFiTrueType(); - - // Returns true if this an OpenType font containing CFF data, false - // if it's a TrueType font (or OpenType font with TrueType data). - GBool isOpenTypeCFF() { return openTypeCFF; } - - // Return the number of cmaps defined by this font. - int getNumCmaps(); - - // Return the platform ID of the <i>th cmap. - int getCmapPlatform(int i); - - // Return the encoding ID of the <i>th cmap. - int getCmapEncoding(int i); - - // Return the index of the cmap for <platform>, <encoding>. Returns - // -1 if there is no corresponding cmap. - int findCmap(int platform, int encoding); - - // Return the GID corresponding to <c> according to the <i>th cmap. - int mapCodeToGID(int i, Guint c); - - // map gid to vertical glyph gid if exist. - // if not exist return original gid - Guint mapToVertGID(Guint orgGID); - - // Returns the GID corresponding to <name> according to the post - // table. Returns 0 if there is no mapping for <name> or if the - // font does not have a post table. - int mapNameToGID(char *name) const; - - // Return the mapping from CIDs to GIDs, and return the number of - // CIDs in *<nCIDs>. This is only useful for CID fonts. (Only - // useful for OpenType CFF fonts.) - int *getCIDToGIDMap(int *nCIDs); - - // Returns the least restrictive embedding licensing right (as - // defined by the TrueType spec): - // * 4: OS/2 table is missing or invalid - // * 3: installable embedding - // * 2: editable embedding - // * 1: preview & print embedding - // * 0: restricted license embedding - int getEmbeddingRights(); - - // Return the font matrix as an array of six numbers. (Only useful - // for OpenType CFF fonts.) - void getFontMatrix(double *mat); - - // Convert to a Type 42 font, suitable for embedding in a PostScript - // file. <psName> will be used as the PostScript font name (so we - // don't need to depend on the 'name' table in the font). The - // <encoding> array specifies the mapping from char codes to names. - // If <encoding> is NULL, the encoding is unknown or undefined. The - // <codeToGID> array specifies the mapping from char codes to GIDs. - // (Not useful for OpenType CFF fonts.) - void convertToType42(char *psName, char **encoding, - int *codeToGID, - FoFiOutputFunc outputFunc, void *outputStream); - - // Convert to a Type 1 font, suitable for embedding in a PostScript - // file. This is only useful with 8-bit fonts. If <newEncoding> is - // not NULL, it will be used in place of the encoding in the Type 1C - // font. If <ascii> is true the eexec section will be hex-encoded, - // otherwise it will be left as binary data. If <psName> is - // non-NULL, it will be used as the PostScript font name. (Only - // useful for OpenType CFF fonts.) - void convertToType1(char *psName, const char **newEncoding, GBool ascii, - FoFiOutputFunc outputFunc, void *outputStream); - - // Convert to a Type 2 CIDFont, suitable for embedding in a - // PostScript file. <psName> will be used as the PostScript font - // name (so we don't need to depend on the 'name' table in the - // font). The <cidMap> array maps CIDs to GIDs; it has <nCIDs> - // entries. (Not useful for OpenType CFF fonts.) - void convertToCIDType2(char *psName, int *cidMap, int nCIDs, - GBool needVerticalMetrics, - FoFiOutputFunc outputFunc, void *outputStream); - - // Convert to a Type 0 CIDFont, suitable for embedding in a - // PostScript file. <psName> will be used as the PostScript font - // name. (Only useful for OpenType CFF fonts.) - void convertToCIDType0(char *psName, int *cidMap, int nCIDs, - FoFiOutputFunc outputFunc, void *outputStream); - - // Convert to a Type 0 (but non-CID) composite font, suitable for - // embedding in a PostScript file. <psName> will be used as the - // PostScript font name (so we don't need to depend on the 'name' - // table in the font). The <cidMap> array maps CIDs to GIDs; it has - // <nCIDs> entries. (Not useful for OpenType CFF fonts.) - void convertToType0(char *psName, int *cidMap, int nCIDs, - GBool needVerticalMetrics, - int *maxValidGlyph, - FoFiOutputFunc outputFunc, void *outputStream); - - // Convert to a Type 0 (but non-CID) composite font, suitable for - // embedding in a PostScript file. <psName> will be used as the - // PostScript font name. (Only useful for OpenType CFF fonts.) - void convertToType0(char *psName, int *cidMap, int nCIDs, - FoFiOutputFunc outputFunc, void *outputStream); - - // Returns a pointer to the CFF font embedded in this OpenType font. - // If successful, sets *<start> and *<length>, and returns true. - // Otherwise returns false. (Only useful for OpenType CFF fonts). - GBool getCFFBlock(char **start, int *length); - - // setup vert/vrt2 GSUB for default lang - int setupGSUB(const char *scriptName); - - // setup vert/vrt2 GSUB for specified lang - int setupGSUB(const char *scriptName, const char* languageName); - -private: - - FoFiTrueType(char *fileA, int lenA, GBool freeFileDataA, int faceIndexA); - void cvtEncoding(char **encoding, - FoFiOutputFunc outputFunc, - void *outputStream); - void cvtCharStrings(char **encoding, - int *codeToGID, - FoFiOutputFunc outputFunc, - void *outputStream); - void cvtSfnts(FoFiOutputFunc outputFunc, - void *outputStream, GooString *name, - GBool needVerticalMetrics, - int *maxUsedGlyph); - void dumpString(Guchar *s, int length, - FoFiOutputFunc outputFunc, - void *outputStream); - Guint computeTableChecksum(Guchar *data, int length); - void parse(); - void readPostTable(); - int seekTable(const char *tag); - Guint charToTag(const char *tagName); - Guint doMapToVertGID(Guint orgGID); - Guint scanLookupList(Guint listIndex, Guint orgGID); - Guint scanLookupSubTable(Guint subTable, Guint orgGID); - int checkGIDInCoverage(Guint coverage, Guint orgGID); - - TrueTypeTable *tables; - int nTables; - TrueTypeCmap *cmaps; - int nCmaps; - int nGlyphs; - int locaFmt; - int bbox[4]; - std::unordered_map<std::string,int> nameToGID; - GBool openTypeCFF; - - GBool parsedOk; - int faceIndex; - Guint gsubFeatureTable; - Guint gsubLookupList; -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/fofi/FoFiType1.cc b/Build/source/libs/poppler/poppler-src/fofi/FoFiType1.cc deleted file mode 100644 index 2806d92fbef..00000000000 --- a/Build/source/libs/poppler/poppler-src/fofi/FoFiType1.cc +++ /dev/null @@ -1,403 +0,0 @@ -//======================================================================== -// -// FoFiType1.cc -// -// Copyright 1999-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2005, 2008, 2010 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2005 Kristian Høgsberg <krh@redhat.com> -// Copyright (C) 2010 Jakub Wilk <jwilk@jwilk.net> -// Copyright (C) 2014 Carlos Garcia Campos <carlosgc@gnome.org> -// Copyright (C) 2017 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2017 Jean Ghali <jghali@libertysurf.fr> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include <config.h> - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include <stdlib.h> -#include <string.h> -#include <limits.h> -#include "goo/glibc.h" -#include "goo/gmem.h" -#include "goo/GooLikely.h" -#include "FoFiEncodings.h" -#include "FoFiType1.h" -#include "poppler/Error.h" - -//------------------------------------------------------------------------ -// FoFiType1 -//------------------------------------------------------------------------ - -FoFiType1 *FoFiType1::make(char *fileA, int lenA) { - return new FoFiType1(fileA, lenA, gFalse); -} - -FoFiType1 *FoFiType1::load(char *fileName) { - char *fileA; - int lenA; - - if (!(fileA = FoFiBase::readFile(fileName, &lenA))) { - return nullptr; - } - return new FoFiType1(fileA, lenA, gTrue); -} - -FoFiType1::FoFiType1(char *fileA, int lenA, GBool freeFileDataA): - FoFiBase(fileA, lenA, freeFileDataA) -{ - name = nullptr; - encoding = nullptr; - fontMatrix[0] = 0.001; - fontMatrix[1] = 0; - fontMatrix[2] = 0; - fontMatrix[3] = 0.001; - fontMatrix[4] = 0; - fontMatrix[5] = 0; - parsed = gFalse; - undoPFB(); -} - -FoFiType1::~FoFiType1() { - int i; - - if (name) { - gfree(name); - } - if (encoding && encoding != fofiType1StandardEncoding) { - for (i = 0; i < 256; ++i) { - gfree(encoding[i]); - } - gfree(encoding); - } -} - -char *FoFiType1::getName() { - if (!parsed) { - parse(); - } - return name; -} - -char **FoFiType1::getEncoding() { - if (!parsed) { - parse(); - } - return encoding; -} - -void FoFiType1::getFontMatrix(double *mat) { - int i; - - if (!parsed) { - parse(); - } - for (i = 0; i < 6; ++i) { - mat[i] = fontMatrix[i]; - } -} - -void FoFiType1::writeEncoded(const char **newEncoding, - FoFiOutputFunc outputFunc, void *outputStream) { - char buf[512]; - char *line, *line2, *p; - int i; - - // copy everything up to the encoding - for (line = (char *)file; - line && strncmp(line, "/Encoding", 9); - line = getNextLine(line)) ; - if (!line) { - // no encoding - just copy the whole font file - (*outputFunc)(outputStream, (char *)file, len); - return; - } - (*outputFunc)(outputStream, (char *)file, line - (char *)file); - - // write the new encoding - (*outputFunc)(outputStream, "/Encoding 256 array\n", 20); - (*outputFunc)(outputStream, - "0 1 255 {1 index exch /.notdef put} for\n", 40); - for (i = 0; i < 256; ++i) { - if (newEncoding[i]) { - sprintf(buf, "dup %d /%s put\n", i, newEncoding[i]); - (*outputFunc)(outputStream, buf, strlen(buf)); - } - } - (*outputFunc)(outputStream, "readonly def\n", 13); - - // find the end of the encoding data - //~ this ought to parse PostScript tokens - if (!strncmp(line, "/Encoding StandardEncoding def", 30)) { - line = getNextLine(line); - } else { - // skip "/Encoding" + one whitespace char, - // then look for 'def' preceded by PostScript whitespace - p = line + 10; - line = nullptr; - for (; p < (char *)file + len; ++p) { - if ((*p == ' ' || *p == '\t' || *p == '\x0a' || - *p == '\x0d' || *p == '\x0c' || *p == '\0') && - p + 4 <= (char *)file + len && - !strncmp(p + 1, "def", 3)) { - line = p + 4; - break; - } - } - } - - // some fonts have two /Encoding entries in their dictionary, so we - // check for a second one here - if (line) { - for (line2 = line, i = 0; - i < 20 && line2 && strncmp(line2, "/Encoding", 9); - line2 = getNextLine(line2), ++i) ; - if (i < 20 && line2) { - (*outputFunc)(outputStream, line, line2 - line); - if (!strncmp(line2, "/Encoding StandardEncoding def", 30)) { - line = getNextLine(line2); - } else { - // skip "/Encoding" + one whitespace char, - // then look for 'def' preceded by PostScript whitespace - p = line2 + 10; - line = nullptr; - for (; p < (char *)file + len; ++p) { - if ((*p == ' ' || *p == '\t' || *p == '\x0a' || - *p == '\x0d' || *p == '\x0c' || *p == '\0') && - p + 4 <= (char *)file + len && - !strncmp(p + 1, "def", 3)) { - line = p + 4; - break; - } - } - } - } - - // copy everything after the encoding - if (line) { - (*outputFunc)(outputStream, line, ((char *)file + len) - line); - } - } -} - -char *FoFiType1::getNextLine(char *line) { - while (line < (char *)file + len && *line != '\x0a' && *line != '\x0d') { - ++line; - } - if (line < (char *)file + len && *line == '\x0d') { - ++line; - } - if (line < (char *)file + len && *line == '\x0a') { - ++line; - } - if (line >= (char *)file + len) { - return nullptr; - } - return line; -} - -void FoFiType1::parse() { - char *line, *line1, *firstLine, *p, *p2; - char buf[256]; - char c; - int n, code, base, i, j; - char *tokptr; - GBool gotMatrix, continueLine; - - gotMatrix = gFalse; - for (i = 1, line = (char *)file; - i <= 100 && line && (!name || !encoding); - ++i) { - - // get font name - if (!name && - (line + 9 <= (char*)file + len) && - !strncmp(line, "/FontName", 9)) { - const auto availableFile = (char*)file + len - line; - const int lineLen = availableFile < 255 ? availableFile : 255; - strncpy(buf, line, lineLen); - buf[lineLen] = '\0'; - if ((p = strchr(buf+9, '/')) && - (p = strtok_r(p+1, " \t\n\r", &tokptr))) { - name = copyString(p); - } - line = getNextLine(line); - - // get encoding - } else if (!encoding && - (line + 30 <= (char*)file + len) && - !strncmp(line, "/Encoding StandardEncoding def", 30)) { - encoding = (char **)fofiType1StandardEncoding; - } else if (!encoding && - (line + 19 <= (char*)file + len) && - !strncmp(line, "/Encoding 256 array", 19)) { - encoding = (char **)gmallocn(256, sizeof(char *)); - for (j = 0; j < 256; ++j) { - encoding[j] = nullptr; - } - continueLine = gFalse; - for (j = 0, line = getNextLine(line); - j < 300 && line && (line1 = getNextLine(line)); - ++j, line = line1) { - if ((n = (int)(line1 - line)) > 255) { - error(errSyntaxWarning, -1, "FoFiType1::parse a line has more than 255 characters, we don't support this"); - n = 255; - } - if (continueLine) { - continueLine = gFalse; - if ((line1 - firstLine) + 1 > (int)sizeof(buf)) - break; - p = firstLine; - p2 = buf; - while (p < line1) { - if (*p == '\n' || *p == '\r') { - *p2++ = ' '; - p++; - } else { - *p2++ = *p++; - } - } - *p2 = '\0'; - } else { - firstLine = line; - strncpy(buf, line, n); - buf[n] = '\0'; - } - for (p = buf; *p == ' ' || *p == '\t'; ++p) ; - if (!strncmp(p, "dup", 3)) { - while (1) { - p += 3; - for (; *p == ' ' || *p == '\t'; ++p) ; - code = 0; - if (*p == '8' && p[1] == '#') { - base = 8; - p += 2; - } else if (*p >= '0' && *p <= '9') { - base = 10; - } else if (*p == '\n' || *p == '\r') { - continueLine = gTrue; - break; - } else { - break; - } - for (; *p >= '0' && *p < '0' + base && code < INT_MAX / (base + (*p - '0')); ++p) { - code = code * base + (*p - '0'); - } - for (; *p == ' ' || *p == '\t'; ++p) ; - if (*p == '\n' || *p == '\r') { - continueLine = gTrue; - break; - } else if (*p != '/') { - break; - } - ++p; - for (p2 = p; *p2 && *p2 != ' ' && *p2 != '\t'; ++p2) ; - if (code >= 0 && code < 256) { - c = *p2; - *p2 = '\0'; - gfree(encoding[code]); - encoding[code] = copyString(p); - *p2 = c; - } - for (p = p2; *p == ' ' || *p == '\t'; ++p) ; - if (*p == '\n' || *p == '\r') { - continueLine = gTrue; - break; - } - if (strncmp(p, "put", 3)) { - break; - } - for (p += 3; *p == ' ' || *p == '\t'; ++p) ; - if (strncmp(p, "dup", 3)) { - break; - } - } - } else { - if (strtok_r(buf, " \t", &tokptr) && - (p = strtok_r(nullptr, " \t\n\r", &tokptr)) && !strcmp(p, "def")) { - break; - } - } - } - //~ check for getinterval/putinterval junk - - } else if (!gotMatrix && - (line + 11 <= (char*)file + len) && - !strncmp(line, "/FontMatrix", 11)) { - const auto availableFile = (char*)file + len - (line + 11); - const int bufLen = availableFile < 255 ? availableFile : 255; - strncpy(buf, line + 11, bufLen); - buf[bufLen] = '\0'; - if ((p = strchr(buf, '['))) { - ++p; - if ((p2 = strchr(p, ']'))) { - *p2 = '\0'; - for (j = 0; j < 6; ++j) { - if ((p = strtok(j == 0 ? p : (char *)nullptr, " \t\n\r"))) { - fontMatrix[j] = atof(p); - } else { - break; - } - } - } - } - gotMatrix = gTrue; - - } else { - line = getNextLine(line); - } - } - - parsed = gTrue; -} - -// Undo the PFB encoding, i.e., remove the PFB headers. -void FoFiType1::undoPFB() { - GBool ok; - Guchar *file2; - int pos1, pos2, type; - Guint segLen; - - ok = gTrue; - if (getU8(0, &ok) != 0x80 || !ok) { - return; - } - file2 = (Guchar *)gmalloc(len); - pos1 = pos2 = 0; - while (getU8(pos1, &ok) == 0x80 && ok) { - type = getU8(pos1 + 1, &ok); - if (type < 1 || type > 2 || !ok) { - break; - } - segLen = getU32LE(pos1 + 2, &ok); - pos1 += 6; - if (!ok || !checkRegion(pos1, segLen)) { - break; - } - memcpy(file2 + pos2, file + pos1, segLen); - pos1 += segLen; - pos2 += segLen; - } - if (freeFileData) { - gfree(fileData); - } - file = fileData = file2; - freeFileData = gTrue; - len = pos2; -} diff --git a/Build/source/libs/poppler/poppler-src/fofi/FoFiType1.h b/Build/source/libs/poppler/poppler-src/fofi/FoFiType1.h deleted file mode 100644 index ac0b9c973cd..00000000000 --- a/Build/source/libs/poppler/poppler-src/fofi/FoFiType1.h +++ /dev/null @@ -1,62 +0,0 @@ -//======================================================================== -// -// FoFiType1.h -// -// Copyright 1999-2003 Glyph & Cog, LLC -// -//======================================================================== - -#ifndef FOFITYPE1_H -#define FOFITYPE1_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "goo/gtypes.h" -#include "FoFiBase.h" - -//------------------------------------------------------------------------ -// FoFiType1 -//------------------------------------------------------------------------ - -class FoFiType1: public FoFiBase { -public: - - // Create a FoFiType1 object from a memory buffer. - static FoFiType1 *make(char *fileA, int lenA); - - // Create a FoFiType1 object from a file on disk. - static FoFiType1 *load(char *fileName); - - ~FoFiType1(); - - // Return the font name. - char *getName(); - - // Return the encoding, as an array of 256 names (any of which may - // be NULL). - char **getEncoding(); - - // Return the font matrix as an array of six numbers. - void getFontMatrix(double *mat); - - // Write a version of the Type 1 font file with a new encoding. - void writeEncoded(const char **newEncoding, - FoFiOutputFunc outputFunc, void *outputStream); - -private: - - FoFiType1(char *fileA, int lenA, GBool freeFileDataA); - - char *getNextLine(char *line); - void parse(); - void undoPFB(); - - char *name; - char **encoding; - double fontMatrix[6]; - GBool parsed; -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/fofi/FoFiType1C.cc b/Build/source/libs/poppler/poppler-src/fofi/FoFiType1C.cc deleted file mode 100644 index caa4b42b6cf..00000000000 --- a/Build/source/libs/poppler/poppler-src/fofi/FoFiType1C.cc +++ /dev/null @@ -1,2755 +0,0 @@ -//======================================================================== -// -// FoFiType1C.cc -// -// Copyright 1999-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2009, 2010, 2017, 2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2012 Thomas Freitag <Thomas.Freitag@alfa.de> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include <config.h> - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include <stdlib.h> -#include <string.h> -#include <math.h> -#include "goo/gmem.h" -#include "goo/gstrtod.h" -#include "goo/GooLikely.h" -#include "goo/GooString.h" -#include "poppler/Error.h" -#include "FoFiEncodings.h" -#include "FoFiType1C.h" - -//------------------------------------------------------------------------ - -static char hexChars[17] = "0123456789ABCDEF"; - -//------------------------------------------------------------------------ -// FoFiType1C -//------------------------------------------------------------------------ - -FoFiType1C *FoFiType1C::make(char *fileA, int lenA) { - FoFiType1C *ff; - - ff = new FoFiType1C(fileA, lenA, gFalse); - if (!ff->parse()) { - delete ff; - return nullptr; - } - return ff; -} - -FoFiType1C *FoFiType1C::load(char *fileName) { - FoFiType1C *ff; - char *fileA; - int lenA; - - if (!(fileA = FoFiBase::readFile(fileName, &lenA))) { - return nullptr; - } - ff = new FoFiType1C(fileA, lenA, gTrue); - if (!ff->parse()) { - delete ff; - return nullptr; - } - return ff; -} - -FoFiType1C::FoFiType1C(char *fileA, int lenA, GBool freeFileDataA): - FoFiBase(fileA, lenA, freeFileDataA) -{ - name = nullptr; - encoding = nullptr; - privateDicts = nullptr; - fdSelect = nullptr; - charset = nullptr; - charsetLength = 0; -} - -FoFiType1C::~FoFiType1C() { - int i; - - if (name) { - delete name; - } - if (encoding && - encoding != fofiType1StandardEncoding && - encoding != fofiType1ExpertEncoding) { - for (i = 0; i < 256; ++i) { - gfree(encoding[i]); - } - gfree(encoding); - } - if (privateDicts) { - gfree(privateDicts); - } - if (fdSelect) { - gfree(fdSelect); - } - if (charset && - charset != fofiType1CISOAdobeCharset && - charset != fofiType1CExpertCharset && - charset != fofiType1CExpertSubsetCharset) { - gfree(charset); - } -} - -char *FoFiType1C::getName() { - return name ? name->getCString() : (char *)nullptr; -} - -char **FoFiType1C::getEncoding() { - return encoding; -} - -GooString *FoFiType1C::getGlyphName(int gid) { - char buf[256]; - GBool ok; - - ok = gTrue; - if (gid < 0 || gid >= charsetLength) - return nullptr; - getString(charset[gid], buf, &ok); - if (!ok) { - return nullptr; - } - return new GooString(buf); -} - -int *FoFiType1C::getCIDToGIDMap(int *nCIDs) { - int *map; - int n, i; - - // a CID font's top dict has ROS as the first operator - if (topDict.firstOp != 0x0c1e) { - *nCIDs = 0; - return nullptr; - } - - // in a CID font, the charset data is the GID-to-CID mapping, so all - // we have to do is reverse it - n = 0; - for (i = 0; i < nGlyphs && i < charsetLength; ++i) { - if (charset[i] > n) { - n = charset[i]; - } - } - ++n; - map = (int *)gmallocn(n, sizeof(int)); - memset(map, 0, n * sizeof(int)); - for (i = 0; i < nGlyphs; ++i) { - map[charset[i]] = i; - } - *nCIDs = n; - return map; -} - -void FoFiType1C::getFontMatrix(double *mat) { - int i; - - if (topDict.firstOp == 0x0c1e && privateDicts[0].hasFontMatrix) { - if (topDict.hasFontMatrix) { - mat[0] = topDict.fontMatrix[0] * privateDicts[0].fontMatrix[0] + - topDict.fontMatrix[1] * privateDicts[0].fontMatrix[2]; - mat[1] = topDict.fontMatrix[0] * privateDicts[0].fontMatrix[1] + - topDict.fontMatrix[1] * privateDicts[0].fontMatrix[3]; - mat[2] = topDict.fontMatrix[2] * privateDicts[0].fontMatrix[0] + - topDict.fontMatrix[3] * privateDicts[0].fontMatrix[2]; - mat[3] = topDict.fontMatrix[2] * privateDicts[0].fontMatrix[1] + - topDict.fontMatrix[3] * privateDicts[0].fontMatrix[3]; - mat[4] = topDict.fontMatrix[4] * privateDicts[0].fontMatrix[0] + - topDict.fontMatrix[5] * privateDicts[0].fontMatrix[2]; - mat[5] = topDict.fontMatrix[4] * privateDicts[0].fontMatrix[1] + - topDict.fontMatrix[5] * privateDicts[0].fontMatrix[3]; - } else { - for (i = 0; i < 6; ++i) { - mat[i] = privateDicts[0].fontMatrix[i]; - } - } - } else { - for (i = 0; i < 6; ++i) { - mat[i] = topDict.fontMatrix[i]; - } - } -} - -void FoFiType1C::convertToType1(char *psName, const char **newEncoding, GBool ascii, - FoFiOutputFunc outputFunc, - void *outputStream) { - int psNameLen; - Type1CEexecBuf eb; - Type1CIndex subrIdx; - Type1CIndexVal val; - GooString *buf; - char buf2[256]; - const char **enc; - GBool ok; - int i; - - if (psName) { - psNameLen = strlen(psName); - } else { - psName = name->getCString(); - psNameLen = name->getLength(); - } - - // write header and font dictionary, up to encoding - ok = gTrue; - (*outputFunc)(outputStream, "%!FontType1-1.0: ", 17); - (*outputFunc)(outputStream, psName, psNameLen); - if (topDict.versionSID != 0) { - getString(topDict.versionSID, buf2, &ok); - (*outputFunc)(outputStream, buf2, strlen(buf2)); - } - (*outputFunc)(outputStream, "\n", 1); - // the dictionary needs room for 12 entries: the following 9, plus - // Private and CharStrings (in the eexec section) and FID (which is - // added by definefont) - (*outputFunc)(outputStream, "12 dict begin\n", 14); - (*outputFunc)(outputStream, "/FontInfo 10 dict dup begin\n", 28); - if (topDict.versionSID != 0) { - (*outputFunc)(outputStream, "/version ", 9); - writePSString(buf2, outputFunc, outputStream); - (*outputFunc)(outputStream, " readonly def\n", 14); - } - if (topDict.noticeSID != 0) { - getString(topDict.noticeSID, buf2, &ok); - (*outputFunc)(outputStream, "/Notice ", 8); - writePSString(buf2, outputFunc, outputStream); - (*outputFunc)(outputStream, " readonly def\n", 14); - } - if (topDict.copyrightSID != 0) { - getString(topDict.copyrightSID, buf2, &ok); - (*outputFunc)(outputStream, "/Copyright ", 11); - writePSString(buf2, outputFunc, outputStream); - (*outputFunc)(outputStream, " readonly def\n", 14); - } - if (topDict.fullNameSID != 0) { - getString(topDict.fullNameSID, buf2, &ok); - (*outputFunc)(outputStream, "/FullName ", 10); - writePSString(buf2, outputFunc, outputStream); - (*outputFunc)(outputStream, " readonly def\n", 14); - } - if (topDict.familyNameSID != 0) { - getString(topDict.familyNameSID, buf2, &ok); - (*outputFunc)(outputStream, "/FamilyName ", 12); - writePSString(buf2, outputFunc, outputStream); - (*outputFunc)(outputStream, " readonly def\n", 14); - } - if (topDict.weightSID != 0) { - getString(topDict.weightSID, buf2, &ok); - (*outputFunc)(outputStream, "/Weight ", 8); - writePSString(buf2, outputFunc, outputStream); - (*outputFunc)(outputStream, " readonly def\n", 14); - } - if (topDict.isFixedPitch) { - (*outputFunc)(outputStream, "/isFixedPitch true def\n", 23); - } else { - (*outputFunc)(outputStream, "/isFixedPitch false def\n", 24); - } - buf = GooString::format("/ItalicAngle {0:.4g} def\n", topDict.italicAngle); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - buf = GooString::format("/UnderlinePosition {0:.4g} def\n", - topDict.underlinePosition); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - buf = GooString::format("/UnderlineThickness {0:.4g} def\n", - topDict.underlineThickness); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - (*outputFunc)(outputStream, "end readonly def\n", 17); - (*outputFunc)(outputStream, "/FontName /", 11); - (*outputFunc)(outputStream, psName, psNameLen); - (*outputFunc)(outputStream, " def\n", 5); - buf = GooString::format("/PaintType {0:d} def\n", topDict.paintType); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - (*outputFunc)(outputStream, "/FontType 1 def\n", 16); - buf = GooString::format("/FontMatrix [{0:.8g} {1:.8g} {2:.8g} {3:.8g} {4:.8g} {5:.8g}] readonly def\n", - topDict.fontMatrix[0], topDict.fontMatrix[1], - topDict.fontMatrix[2], topDict.fontMatrix[3], - topDict.fontMatrix[4], topDict.fontMatrix[5]); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - buf = GooString::format("/FontBBox [{0:.4g} {1:.4g} {2:.4g} {3:.4g}] readonly def\n", - topDict.fontBBox[0], topDict.fontBBox[1], - topDict.fontBBox[2], topDict.fontBBox[3]); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - buf = GooString::format("/StrokeWidth {0:.4g} def\n", topDict.strokeWidth); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - if (topDict.uniqueID != 0) { - buf = GooString::format("/UniqueID {0:d} def\n", topDict.uniqueID); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - } - - // write the encoding - (*outputFunc)(outputStream, "/Encoding ", 10); - if (!newEncoding && encoding == fofiType1StandardEncoding) { - (*outputFunc)(outputStream, "StandardEncoding def\n", 21); - } else { - (*outputFunc)(outputStream, "256 array\n", 10); - (*outputFunc)(outputStream, - "0 1 255 {1 index exch /.notdef put} for\n", 40); - enc = newEncoding ? newEncoding : (const char **)encoding; - for (i = 0; i < 256; ++i) { - if (enc[i]) { - buf = GooString::format("dup {0:d} /{1:s} put\n", i, enc[i]); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - } - } - (*outputFunc)(outputStream, "readonly def\n", 13); - } - (*outputFunc)(outputStream, "currentdict end\n", 16); - - // start the binary section - (*outputFunc)(outputStream, "currentfile eexec\n", 18); - eb.outputFunc = outputFunc; - eb.outputStream = outputStream; - eb.ascii = ascii; - eb.r1 = 55665; - eb.line = 0; - - // write the private dictionary - eexecWrite(&eb, "\x83\xca\x73\xd5"); - eexecWrite(&eb, "dup /Private 32 dict dup begin\n"); - eexecWrite(&eb, "/RD {string currentfile exch readstring pop}" - " executeonly def\n"); - eexecWrite(&eb, "/ND {noaccess def} executeonly def\n"); - eexecWrite(&eb, "/NP {noaccess put} executeonly def\n"); - eexecWrite(&eb, "/MinFeature {16 16} def\n"); - eexecWrite(&eb, "/password 5839 def\n"); - if (privateDicts[0].nBlueValues) { - eexecWrite(&eb, "/BlueValues ["); - for (i = 0; i < privateDicts[0].nBlueValues; ++i) { - buf = GooString::format("{0:s}{1:d}", - i > 0 ? " " : "", privateDicts[0].blueValues[i]); - eexecWrite(&eb, buf->getCString()); - delete buf; - } - eexecWrite(&eb, "] def\n"); - } - if (privateDicts[0].nOtherBlues) { - eexecWrite(&eb, "/OtherBlues ["); - for (i = 0; i < privateDicts[0].nOtherBlues; ++i) { - buf = GooString::format("{0:s}{1:d}", - i > 0 ? " " : "", privateDicts[0].otherBlues[i]); - eexecWrite(&eb, buf->getCString()); - delete buf; - } - eexecWrite(&eb, "] def\n"); - } - if (privateDicts[0].nFamilyBlues) { - eexecWrite(&eb, "/FamilyBlues ["); - for (i = 0; i < privateDicts[0].nFamilyBlues; ++i) { - buf = GooString::format("{0:s}{1:d}", - i > 0 ? " " : "", privateDicts[0].familyBlues[i]); - eexecWrite(&eb, buf->getCString()); - delete buf; - } - eexecWrite(&eb, "] def\n"); - } - if (privateDicts[0].nFamilyOtherBlues) { - eexecWrite(&eb, "/FamilyOtherBlues ["); - for (i = 0; i < privateDicts[0].nFamilyOtherBlues; ++i) { - buf = GooString::format("{0:s}{1:d}", i > 0 ? " " : "", - privateDicts[0].familyOtherBlues[i]); - eexecWrite(&eb, buf->getCString()); - delete buf; - } - eexecWrite(&eb, "] def\n"); - } - if (privateDicts[0].blueScale != 0.039625) { - buf = GooString::format("/BlueScale {0:.4g} def\n", - privateDicts[0].blueScale); - eexecWrite(&eb, buf->getCString()); - delete buf; - } - if (privateDicts[0].blueShift != 7) { - buf = GooString::format("/BlueShift {0:d} def\n", privateDicts[0].blueShift); - eexecWrite(&eb, buf->getCString()); - delete buf; - } - if (privateDicts[0].blueFuzz != 1) { - buf = GooString::format("/BlueFuzz {0:d} def\n", privateDicts[0].blueFuzz); - eexecWrite(&eb, buf->getCString()); - delete buf; - } - if (privateDicts[0].hasStdHW) { - buf = GooString::format("/StdHW [{0:.4g}] def\n", privateDicts[0].stdHW); - eexecWrite(&eb, buf->getCString()); - delete buf; - } - if (privateDicts[0].hasStdVW) { - buf = GooString::format("/StdVW [{0:.4g}] def\n", privateDicts[0].stdVW); - eexecWrite(&eb, buf->getCString()); - delete buf; - } - if (privateDicts[0].nStemSnapH) { - eexecWrite(&eb, "/StemSnapH ["); - for (i = 0; i < privateDicts[0].nStemSnapH; ++i) { - buf = GooString::format("{0:s}{1:.4g}", - i > 0 ? " " : "", privateDicts[0].stemSnapH[i]); - eexecWrite(&eb, buf->getCString()); - delete buf; - } - eexecWrite(&eb, "] def\n"); - } - if (privateDicts[0].nStemSnapV) { - eexecWrite(&eb, "/StemSnapV ["); - for (i = 0; i < privateDicts[0].nStemSnapV; ++i) { - buf = GooString::format("{0:s}{1:.4g}", - i > 0 ? " " : "", privateDicts[0].stemSnapV[i]); - eexecWrite(&eb, buf->getCString()); - delete buf; - } - eexecWrite(&eb, "] def\n"); - } - if (privateDicts[0].hasForceBold) { - buf = GooString::format("/ForceBold {0:s} def\n", - privateDicts[0].forceBold ? "true" : "false"); - eexecWrite(&eb, buf->getCString()); - delete buf; - } - if (privateDicts[0].forceBoldThreshold != 0) { - buf = GooString::format("/ForceBoldThreshold {0:.4g} def\n", - privateDicts[0].forceBoldThreshold); - eexecWrite(&eb, buf->getCString()); - delete buf; - } - if (privateDicts[0].languageGroup != 0) { - buf = GooString::format("/LanguageGroup {0:d} def\n", - privateDicts[0].languageGroup); - eexecWrite(&eb, buf->getCString()); - delete buf; - } - if (privateDicts[0].expansionFactor != 0.06) { - buf = GooString::format("/ExpansionFactor {0:.4g} def\n", - privateDicts[0].expansionFactor); - eexecWrite(&eb, buf->getCString()); - delete buf; - } - - // set up subroutines - ok = gTrue; - getIndex(privateDicts[0].subrsOffset, &subrIdx, &ok); - if (!ok) { - subrIdx.pos = -1; - } - - // write the CharStrings - buf = GooString::format("2 index /CharStrings {0:d} dict dup begin\n", - nGlyphs); - eexecWrite(&eb, buf->getCString()); - delete buf; - for (i = 0; i < nGlyphs; ++i) { - ok = gTrue; - getIndexVal(&charStringsIdx, i, &val, &ok); - if (ok && i < charsetLength) { - getString(charset[i], buf2, &ok); - if (ok) { - eexecCvtGlyph(&eb, buf2, val.pos, val.len, &subrIdx, &privateDicts[0]); - } - } - } - eexecWrite(&eb, "end\n"); - eexecWrite(&eb, "end\n"); - eexecWrite(&eb, "readonly put\n"); - eexecWrite(&eb, "noaccess put\n"); - eexecWrite(&eb, "dup /FontName get exch definefont pop\n"); - eexecWrite(&eb, "mark currentfile closefile\n"); - - // trailer - if (ascii && eb.line > 0) { - (*outputFunc)(outputStream, "\n", 1); - } - for (i = 0; i < 8; ++i) { - (*outputFunc)(outputStream, "0000000000000000000000000000000000000000000000000000000000000000\n", 65); - } - (*outputFunc)(outputStream, "cleartomark\n", 12); -} - -void FoFiType1C::convertToCIDType0(char *psName, int *codeMap, int nCodes, - FoFiOutputFunc outputFunc, - void *outputStream) { - int *cidMap; - GooString *charStrings; - int *charStringOffsets; - Type1CIndex subrIdx; - Type1CIndexVal val; - int nCIDs, gdBytes; - GooString *buf; - char buf2[256]; - GBool ok; - int gid, offset, n, i, j, k; - - // compute the CID count and build the CID-to-GID mapping - if (codeMap) { - nCIDs = nCodes; - cidMap = (int *)gmallocn(nCIDs, sizeof(int)); - for (i = 0; i < nCodes; ++i) { - if (codeMap[i] >= 0 && codeMap[i] < nGlyphs) { - cidMap[i] = codeMap[i]; - } else { - cidMap[i] = -1; - } - } - } else if (topDict.firstOp == 0x0c1e) { - nCIDs = 0; - for (i = 0; i < nGlyphs && i < charsetLength; ++i) { - if (charset[i] >= nCIDs) { - nCIDs = charset[i] + 1; - } - } - cidMap = (int *)gmallocn(nCIDs, sizeof(int)); - for (i = 0; i < nCIDs; ++i) { - cidMap[i] = -1; - } - for (i = 0; i < nGlyphs && i < charsetLength; ++i) { - cidMap[charset[i]] = i; - } - } else { - nCIDs = nGlyphs; - cidMap = (int *)gmallocn(nCIDs, sizeof(int)); - for (i = 0; i < nCIDs; ++i) { - cidMap[i] = i; - } - } - - // build the charstrings - charStrings = new GooString(); - charStringOffsets = (int *)gmallocn(nCIDs + 1, sizeof(int)); - for (i = 0; i < nCIDs; ++i) { - charStringOffsets[i] = charStrings->getLength(); - if ((gid = cidMap[i]) >= 0) { - ok = gTrue; - getIndexVal(&charStringsIdx, gid, &val, &ok); - if (ok) { - getIndex(privateDicts[fdSelect ? fdSelect[gid] : 0].subrsOffset, - &subrIdx, &ok); - if (!ok) { - subrIdx.pos = -1; - } - cvtGlyph(val.pos, val.len, charStrings, - &subrIdx, &privateDicts[fdSelect ? fdSelect[gid] : 0], gTrue); - } - } - } - charStringOffsets[nCIDs] = charStrings->getLength(); - - // compute gdBytes = number of bytes needed for charstring offsets - // (offset size needs to account for the charstring offset table, - // with a worst case of five bytes per entry, plus the charstrings - // themselves) - i = (nCIDs + 1) * 5 + charStrings->getLength(); - if (i < 0x100) { - gdBytes = 1; - } else if (i < 0x10000) { - gdBytes = 2; - } else if (i < 0x1000000) { - gdBytes = 3; - } else { - gdBytes = 4; - } - - // begin the font dictionary - (*outputFunc)(outputStream, "/CIDInit /ProcSet findresource begin\n", 37); - (*outputFunc)(outputStream, "20 dict begin\n", 14); - (*outputFunc)(outputStream, "/CIDFontName /", 14); - (*outputFunc)(outputStream, psName, strlen(psName)); - (*outputFunc)(outputStream, " def\n", 5); - (*outputFunc)(outputStream, "/CIDFontType 0 def\n", 19); - (*outputFunc)(outputStream, "/CIDSystemInfo 3 dict dup begin\n", 32); - if (topDict.registrySID > 0 && topDict.orderingSID > 0) { - ok = gTrue; - getString(topDict.registrySID, buf2, &ok); - if (ok) { - (*outputFunc)(outputStream, " /Registry (", 13); - (*outputFunc)(outputStream, buf2, strlen(buf2)); - (*outputFunc)(outputStream, ") def\n", 6); - } - ok = gTrue; - getString(topDict.orderingSID, buf2, &ok); - if (ok) { - (*outputFunc)(outputStream, " /Ordering (", 13); - (*outputFunc)(outputStream, buf2, strlen(buf2)); - (*outputFunc)(outputStream, ") def\n", 6); - } - } else { - (*outputFunc)(outputStream, " /Registry (Adobe) def\n", 24); - (*outputFunc)(outputStream, " /Ordering (Identity) def\n", 27); - } - buf = GooString::format(" /Supplement {0:d} def\n", topDict.supplement); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - (*outputFunc)(outputStream, "end def\n", 8); - if (topDict.hasFontMatrix) { - buf = GooString::format("/FontMatrix [{0:.8g} {1:.8g} {2:.8g} {3:.8g} {4:.8g} {5:.8g}] def\n", - topDict.fontMatrix[0], topDict.fontMatrix[1], - topDict.fontMatrix[2], topDict.fontMatrix[3], - topDict.fontMatrix[4], topDict.fontMatrix[5]); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - } else if (privateDicts[0].hasFontMatrix) { - (*outputFunc)(outputStream, "/FontMatrix [1 0 0 1 0 0] def\n", 30); - } else { - (*outputFunc)(outputStream, - "/FontMatrix [0.001 0 0 0.001 0 0] def\n", 38); - } - buf = GooString::format("/FontBBox [{0:.4g} {1:.4g} {2:.4g} {3:.4g}] def\n", - topDict.fontBBox[0], topDict.fontBBox[1], - topDict.fontBBox[2], topDict.fontBBox[3]); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - (*outputFunc)(outputStream, "/FontInfo 1 dict dup begin\n", 27); - (*outputFunc)(outputStream, " /FSType 8 def\n", 16); - (*outputFunc)(outputStream, "end def\n", 8); - - // CIDFont-specific entries - buf = GooString::format("/CIDCount {0:d} def\n", nCIDs); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - (*outputFunc)(outputStream, "/FDBytes 1 def\n", 15); - buf = GooString::format("/GDBytes {0:d} def\n", gdBytes); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - (*outputFunc)(outputStream, "/CIDMapOffset 0 def\n", 20); - if (topDict.paintType != 0) { - buf = GooString::format("/PaintType {0:d} def\n", topDict.paintType); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - buf = GooString::format("/StrokeWidth {0:.4g} def\n", topDict.strokeWidth); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - } - - // FDArray entry - buf = GooString::format("/FDArray {0:d} array\n", nFDs); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - for (i = 0; i < nFDs; ++i) { - buf = GooString::format("dup {0:d} 10 dict begin\n", i); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - (*outputFunc)(outputStream, "/FontType 1 def\n", 16); - if (privateDicts[i].hasFontMatrix) { - buf = GooString::format("/FontMatrix [{0:.8g} {1:.8g} {2:.8g} {3:.8g} {4:.8g} {5:.8g}] def\n", - privateDicts[i].fontMatrix[0], - privateDicts[i].fontMatrix[1], - privateDicts[i].fontMatrix[2], - privateDicts[i].fontMatrix[3], - privateDicts[i].fontMatrix[4], - privateDicts[i].fontMatrix[5]); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - } else { - (*outputFunc)(outputStream, "/FontMatrix [1 0 0 1 0 0] def\n", 30); - } - buf = GooString::format("/PaintType {0:d} def\n", topDict.paintType); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - (*outputFunc)(outputStream, "/Private 32 dict begin\n", 23); - if (privateDicts[i].nBlueValues) { - (*outputFunc)(outputStream, "/BlueValues [", 13); - for (j = 0; j < privateDicts[i].nBlueValues; ++j) { - buf = GooString::format("{0:s}{1:d}", - j > 0 ? " " : "", privateDicts[i].blueValues[j]); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - } - (*outputFunc)(outputStream, "] def\n", 6); - } - if (privateDicts[i].nOtherBlues) { - (*outputFunc)(outputStream, "/OtherBlues [", 13); - for (j = 0; j < privateDicts[i].nOtherBlues; ++j) { - buf = GooString::format("{0:s}{1:d}", - j > 0 ? " " : "", privateDicts[i].otherBlues[j]); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - } - (*outputFunc)(outputStream, "] def\n", 6); - } - if (privateDicts[i].nFamilyBlues) { - (*outputFunc)(outputStream, "/FamilyBlues [", 14); - for (j = 0; j < privateDicts[i].nFamilyBlues; ++j) { - buf = GooString::format("{0:s}{1:d}", - j > 0 ? " " : "", - privateDicts[i].familyBlues[j]); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - } - (*outputFunc)(outputStream, "] def\n", 6); - } - if (privateDicts[i].nFamilyOtherBlues) { - (*outputFunc)(outputStream, "/FamilyOtherBlues [", 19); - for (j = 0; j < privateDicts[i].nFamilyOtherBlues; ++j) { - buf = GooString::format("{0:s}{1:d}", j > 0 ? " " : "", - privateDicts[i].familyOtherBlues[j]); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - } - (*outputFunc)(outputStream, "] def\n", 6); - } - if (privateDicts[i].blueScale != 0.039625) { - buf = GooString::format("/BlueScale {0:.4g} def\n", - privateDicts[i].blueScale); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - } - if (privateDicts[i].blueShift != 7) { - buf = GooString::format("/BlueShift {0:d} def\n", - privateDicts[i].blueShift); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - } - if (privateDicts[i].blueFuzz != 1) { - buf = GooString::format("/BlueFuzz {0:d} def\n", privateDicts[i].blueFuzz); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - } - if (privateDicts[i].hasStdHW) { - buf = GooString::format("/StdHW [{0:.4g}] def\n", privateDicts[i].stdHW); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - } - if (privateDicts[i].hasStdVW) { - buf = GooString::format("/StdVW [{0:.4g}] def\n", privateDicts[i].stdVW); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - } - if (privateDicts[i].nStemSnapH) { - (*outputFunc)(outputStream, "/StemSnapH [", 12); - for (j = 0; j < privateDicts[i].nStemSnapH; ++j) { - buf = GooString::format("{0:s}{1:.4g}", - j > 0 ? " " : "", privateDicts[i].stemSnapH[j]); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - } - (*outputFunc)(outputStream, "] def\n", 6); - } - if (privateDicts[i].nStemSnapV) { - (*outputFunc)(outputStream, "/StemSnapV [", 12); - for (j = 0; j < privateDicts[i].nStemSnapV; ++j) { - buf = GooString::format("{0:s}{1:.4g}", - j > 0 ? " " : "", privateDicts[i].stemSnapV[j]); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - } - (*outputFunc)(outputStream, "] def\n", 6); - } - if (privateDicts[i].hasForceBold) { - buf = GooString::format("/ForceBold {0:s} def\n", - privateDicts[i].forceBold ? "true" : "false"); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - } - if (privateDicts[i].forceBoldThreshold != 0) { - buf = GooString::format("/ForceBoldThreshold {0:.4g} def\n", - privateDicts[i].forceBoldThreshold); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - } - if (privateDicts[i].languageGroup != 0) { - buf = GooString::format("/LanguageGroup {0:d} def\n", - privateDicts[i].languageGroup); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - } - if (privateDicts[i].expansionFactor != 0.06) { - buf = GooString::format("/ExpansionFactor {0:.4g} def\n", - privateDicts[i].expansionFactor); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - } - (*outputFunc)(outputStream, "currentdict end def\n", 20); - (*outputFunc)(outputStream, "currentdict end put\n", 20); - } - (*outputFunc)(outputStream, "def\n", 4); - - // start the binary section - offset = (nCIDs + 1) * (1 + gdBytes); - buf = GooString::format("(Hex) {0:d} StartData\n", - offset + charStrings->getLength()); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - - // write the charstring offset (CIDMap) table - for (i = 0; i <= nCIDs; i += 6) { - for (j = 0; j < 6 && i+j <= nCIDs; ++j) { - if (i+j < nCIDs && cidMap[i+j] >= 0 && fdSelect) { - buf2[0] = (char)fdSelect[cidMap[i+j]]; - } else { - buf2[0] = (char)0; - } - n = offset + charStringOffsets[i+j]; - for (k = gdBytes; k >= 1; --k) { - buf2[k] = (char)(n & 0xff); - n >>= 8; - } - for (k = 0; k <= gdBytes; ++k) { - buf = GooString::format("{0:02x}", buf2[k] & 0xff); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - } - } - (*outputFunc)(outputStream, "\n", 1); - } - - // write the charstring data - n = charStrings->getLength(); - for (i = 0; i < n; i += 32) { - for (j = 0; j < 32 && i+j < n; ++j) { - buf = GooString::format("{0:02x}", charStrings->getChar(i+j) & 0xff); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - } - if (i + 32 >= n) { - (*outputFunc)(outputStream, ">", 1); - } - (*outputFunc)(outputStream, "\n", 1); - } - - gfree(charStringOffsets); - delete charStrings; - gfree(cidMap); -} - -void FoFiType1C::convertToType0(char *psName, int *codeMap, int nCodes, - FoFiOutputFunc outputFunc, - void *outputStream) { - int *cidMap; - Type1CIndex subrIdx; - Type1CIndexVal val; - int nCIDs; - GooString *buf; - Type1CEexecBuf eb; - GBool ok; - int fd, i, j, k; - - // compute the CID count and build the CID-to-GID mapping - if (codeMap) { - nCIDs = nCodes; - cidMap = (int *)gmallocn(nCIDs, sizeof(int)); - for (i = 0; i < nCodes; ++i) { - if (codeMap[i] >= 0 && codeMap[i] < nGlyphs) { - cidMap[i] = codeMap[i]; - } else { - cidMap[i] = -1; - } - } - } else if (topDict.firstOp == 0x0c1e) { - nCIDs = 0; - for (i = 0; i < nGlyphs && i < charsetLength; ++i) { - if (charset[i] >= nCIDs) { - nCIDs = charset[i] + 1; - } - } - cidMap = (int *)gmallocn(nCIDs, sizeof(int)); - for (i = 0; i < nCIDs; ++i) { - cidMap[i] = -1; - } - for (i = 0; i < nGlyphs && i < charsetLength; ++i) { - cidMap[charset[i]] = i; - } - } else { - nCIDs = nGlyphs; - cidMap = (int *)gmallocn(nCIDs, sizeof(int)); - for (i = 0; i < nCIDs; ++i) { - cidMap[i] = i; - } - } - - if (privateDicts) { - // write the descendant Type 1 fonts - for (i = 0; i < nCIDs; i += 256) { - - //~ this assumes that all CIDs in this block have the same FD -- - //~ to handle multiple FDs correctly, need to somehow divide the - //~ font up by FD; as a kludge we ignore CID 0, which is .notdef - fd = 0; - // if fdSelect is NULL, we have an 8-bit font, so just leave fd=0 - if (fdSelect) { - for (j = i==0 ? 1 : 0; j < 256 && i+j < nCIDs; ++j) { - if (cidMap[i+j] >= 0) { - fd = fdSelect[cidMap[i+j]]; - break; - } - } - } - - if (fd >= nFDs) - continue; - - // font dictionary (unencrypted section) - (*outputFunc)(outputStream, "16 dict begin\n", 14); - (*outputFunc)(outputStream, "/FontName /", 11); - (*outputFunc)(outputStream, psName, strlen(psName)); - buf = GooString::format("_{0:02x} def\n", i >> 8); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - (*outputFunc)(outputStream, "/FontType 1 def\n", 16); - if (privateDicts[fd].hasFontMatrix) { - buf = GooString::format("/FontMatrix [{0:.8g} {1:.8g} {2:.8g} {3:.8g} {4:.8g} {5:.8g}] def\n", - privateDicts[fd].fontMatrix[0], - privateDicts[fd].fontMatrix[1], - privateDicts[fd].fontMatrix[2], - privateDicts[fd].fontMatrix[3], - privateDicts[fd].fontMatrix[4], - privateDicts[fd].fontMatrix[5]); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - } else if (topDict.hasFontMatrix) { - (*outputFunc)(outputStream, "/FontMatrix [1 0 0 1 0 0] def\n", 30); - } else { - (*outputFunc)(outputStream, - "/FontMatrix [0.001 0 0 0.001 0 0] def\n", 38); - } - buf = GooString::format("/FontBBox [{0:.4g} {1:.4g} {2:.4g} {3:.4g}] def\n", - topDict.fontBBox[0], topDict.fontBBox[1], - topDict.fontBBox[2], topDict.fontBBox[3]); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - buf = GooString::format("/PaintType {0:d} def\n", topDict.paintType); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - if (topDict.paintType != 0) { - buf = GooString::format("/StrokeWidth {0:.4g} def\n", topDict.strokeWidth); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - } - (*outputFunc)(outputStream, "/Encoding 256 array\n", 20); - for (j = 0; j < 256 && i+j < nCIDs; ++j) { - buf = GooString::format("dup {0:d} /c{1:02x} put\n", j, j); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - } - if (j < 256) { - buf = GooString::format("{0:d} 1 255 {{ 1 index exch /.notdef put }} for\n", - j); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - } - (*outputFunc)(outputStream, "readonly def\n", 13); - (*outputFunc)(outputStream, "currentdict end\n", 16); - - // start the binary section - (*outputFunc)(outputStream, "currentfile eexec\n", 18); - eb.outputFunc = outputFunc; - eb.outputStream = outputStream; - eb.ascii = gTrue; - eb.r1 = 55665; - eb.line = 0; - - // start the private dictionary - eexecWrite(&eb, "\x83\xca\x73\xd5"); - eexecWrite(&eb, "dup /Private 32 dict dup begin\n"); - eexecWrite(&eb, "/RD {string currentfile exch readstring pop}" - " executeonly def\n"); - eexecWrite(&eb, "/ND {noaccess def} executeonly def\n"); - eexecWrite(&eb, "/NP {noaccess put} executeonly def\n"); - eexecWrite(&eb, "/MinFeature {16 16} def\n"); - eexecWrite(&eb, "/password 5839 def\n"); - if (privateDicts[fd].nBlueValues) { - eexecWrite(&eb, "/BlueValues ["); - for (k = 0; k < privateDicts[fd].nBlueValues; ++k) { - buf = GooString::format("{0:s}{1:d}", - k > 0 ? " " : "", - privateDicts[fd].blueValues[k]); - eexecWrite(&eb, buf->getCString()); - delete buf; - } - eexecWrite(&eb, "] def\n"); - } - if (privateDicts[fd].nOtherBlues) { - eexecWrite(&eb, "/OtherBlues ["); - for (k = 0; k < privateDicts[fd].nOtherBlues; ++k) { - buf = GooString::format("{0:s}{1:d}", - k > 0 ? " " : "", - privateDicts[fd].otherBlues[k]); - eexecWrite(&eb, buf->getCString()); - delete buf; - } - eexecWrite(&eb, "] def\n"); - } - if (privateDicts[fd].nFamilyBlues) { - eexecWrite(&eb, "/FamilyBlues ["); - for (k = 0; k < privateDicts[fd].nFamilyBlues; ++k) { - buf = GooString::format("{0:s}{1:d}", k > 0 ? " " : "", - privateDicts[fd].familyBlues[k]); - eexecWrite(&eb, buf->getCString()); - delete buf; - } - eexecWrite(&eb, "] def\n"); - } - if (privateDicts[fd].nFamilyOtherBlues) { - eexecWrite(&eb, "/FamilyOtherBlues ["); - for (k = 0; k < privateDicts[fd].nFamilyOtherBlues; ++k) { - buf = GooString::format("{0:s}{1:d}", k > 0 ? " " : "", - privateDicts[fd].familyOtherBlues[k]); - eexecWrite(&eb, buf->getCString()); - delete buf; - } - eexecWrite(&eb, "] def\n"); - } - if (privateDicts[fd].blueScale != 0.039625) { - buf = GooString::format("/BlueScale {0:.4g} def\n", - privateDicts[fd].blueScale); - eexecWrite(&eb, buf->getCString()); - delete buf; - } - if (privateDicts[fd].blueShift != 7) { - buf = GooString::format("/BlueShift {0:d} def\n", - privateDicts[fd].blueShift); - eexecWrite(&eb, buf->getCString()); - delete buf; - } - if (privateDicts[fd].blueFuzz != 1) { - buf = GooString::format("/BlueFuzz {0:d} def\n", - privateDicts[fd].blueFuzz); - eexecWrite(&eb, buf->getCString()); - delete buf; - } - if (privateDicts[fd].hasStdHW) { - buf = GooString::format("/StdHW [{0:.4g}] def\n", privateDicts[fd].stdHW); - eexecWrite(&eb, buf->getCString()); - delete buf; - } - if (privateDicts[fd].hasStdVW) { - buf = GooString::format("/StdVW [{0:.4g}] def\n", privateDicts[fd].stdVW); - eexecWrite(&eb, buf->getCString()); - delete buf; - } - if (privateDicts[fd].nStemSnapH) { - eexecWrite(&eb, "/StemSnapH ["); - for (k = 0; k < privateDicts[fd].nStemSnapH; ++k) { - buf = GooString::format("{0:s}{1:.4g}", - k > 0 ? " " : "", privateDicts[fd].stemSnapH[k]); - eexecWrite(&eb, buf->getCString()); - delete buf; - } - eexecWrite(&eb, "] def\n"); - } - if (privateDicts[fd].nStemSnapV) { - eexecWrite(&eb, "/StemSnapV ["); - for (k = 0; k < privateDicts[fd].nStemSnapV; ++k) { - buf = GooString::format("{0:s}{1:.4g}", - k > 0 ? " " : "", privateDicts[fd].stemSnapV[k]); - eexecWrite(&eb, buf->getCString()); - delete buf; - } - eexecWrite(&eb, "] def\n"); - } - if (privateDicts[fd].hasForceBold) { - buf = GooString::format("/ForceBold {0:s} def\n", - privateDicts[fd].forceBold ? "true" : "false"); - eexecWrite(&eb, buf->getCString()); - delete buf; - } - if (privateDicts[fd].forceBoldThreshold != 0) { - buf = GooString::format("/ForceBoldThreshold {0:.4g} def\n", - privateDicts[fd].forceBoldThreshold); - eexecWrite(&eb, buf->getCString()); - delete buf; - } - if (privateDicts[fd].languageGroup != 0) { - buf = GooString::format("/LanguageGroup {0:d} def\n", - privateDicts[fd].languageGroup); - eexecWrite(&eb, buf->getCString()); - delete buf; - } - if (privateDicts[fd].expansionFactor != 0.06) { - buf = GooString::format("/ExpansionFactor {0:.4g} def\n", - privateDicts[fd].expansionFactor); - eexecWrite(&eb, buf->getCString()); - delete buf; - } - - // set up the subroutines - ok = gTrue; - getIndex(privateDicts[fd].subrsOffset, &subrIdx, &ok); - if (!ok) { - subrIdx.pos = -1; - } - - // start the CharStrings - eexecWrite(&eb, "2 index /CharStrings 256 dict dup begin\n"); - - // write the .notdef CharString - ok = gTrue; - getIndexVal(&charStringsIdx, 0, &val, &ok); - if (ok) { - eexecCvtGlyph(&eb, ".notdef", val.pos, val.len, - &subrIdx, &privateDicts[fd]); - } - - // write the CharStrings - for (j = 0; j < 256 && i+j < nCIDs; ++j) { - if (cidMap[i+j] >= 0) { - ok = gTrue; - getIndexVal(&charStringsIdx, cidMap[i+j], &val, &ok); - if (ok) { - buf = GooString::format("c{0:02x}", j); - eexecCvtGlyph(&eb, buf->getCString(), val.pos, val.len, - &subrIdx, &privateDicts[fd]); - delete buf; - } - } - } - eexecWrite(&eb, "end\n"); - eexecWrite(&eb, "end\n"); - eexecWrite(&eb, "readonly put\n"); - eexecWrite(&eb, "noaccess put\n"); - eexecWrite(&eb, "dup /FontName get exch definefont pop\n"); - eexecWrite(&eb, "mark currentfile closefile\n"); - - // trailer - if (eb.line > 0) { - (*outputFunc)(outputStream, "\n", 1); - } - for (j = 0; j < 8; ++j) { - (*outputFunc)(outputStream, "0000000000000000000000000000000000000000000000000000000000000000\n", 65); - } - (*outputFunc)(outputStream, "cleartomark\n", 12); - } - } else { - error(errSyntaxError, -1, "FoFiType1C::convertToType0 without privateDicts"); - } - - // write the Type 0 parent font - (*outputFunc)(outputStream, "16 dict begin\n", 14); - (*outputFunc)(outputStream, "/FontName /", 11); - (*outputFunc)(outputStream, psName, strlen(psName)); - (*outputFunc)(outputStream, " def\n", 5); - (*outputFunc)(outputStream, "/FontType 0 def\n", 16); - if (topDict.hasFontMatrix) { - buf = GooString::format("/FontMatrix [{0:.8g} {1:.8g} {2:.8g} {3:.8g} {4:.8g} {5:.8g}] def\n", - topDict.fontMatrix[0], topDict.fontMatrix[1], - topDict.fontMatrix[2], topDict.fontMatrix[3], - topDict.fontMatrix[4], topDict.fontMatrix[5]); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - } else { - (*outputFunc)(outputStream, "/FontMatrix [1 0 0 1 0 0] def\n", 30); - } - (*outputFunc)(outputStream, "/FMapType 2 def\n", 16); - (*outputFunc)(outputStream, "/Encoding [\n", 12); - for (i = 0; i < nCIDs; i += 256) { - buf = GooString::format("{0:d}\n", i >> 8); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - } - (*outputFunc)(outputStream, "] def\n", 6); - (*outputFunc)(outputStream, "/FDepVector [\n", 14); - for (i = 0; i < nCIDs; i += 256) { - (*outputFunc)(outputStream, "/", 1); - (*outputFunc)(outputStream, psName, strlen(psName)); - buf = GooString::format("_{0:02x} findfont\n", i >> 8); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - } - (*outputFunc)(outputStream, "] def\n", 6); - (*outputFunc)(outputStream, "FontName currentdict end definefont pop\n", 40); - - gfree(cidMap); -} - -void FoFiType1C::eexecCvtGlyph(Type1CEexecBuf *eb, const char *glyphName, - int offset, int nBytes, - Type1CIndex *subrIdx, - Type1CPrivateDict *pDict) { - GooString *buf; - GooString *charBuf; - - // generate the charstring - charBuf = new GooString(); - cvtGlyph(offset, nBytes, charBuf, subrIdx, pDict, gTrue); - - buf = GooString::format("/{0:s} {1:d} RD ", glyphName, charBuf->getLength()); - eexecWrite(eb, buf->getCString()); - delete buf; - eexecWriteCharstring(eb, (Guchar *)charBuf->getCString(), - charBuf->getLength()); - eexecWrite(eb, " ND\n"); - - delete charBuf; -} - -void FoFiType1C::cvtGlyph(int offset, int nBytes, GooString *charBuf, - Type1CIndex *subrIdx, Type1CPrivateDict *pDict, - GBool top) { - Type1CIndexVal val; - GBool ok, dFP; - double d, dx, dy; - Gushort r2; - Guchar byte; - int pos, subrBias, start, i, k; - - start = charBuf->getLength(); - if (top) { - charBuf->append((char)73); - charBuf->append((char)58); - charBuf->append((char)147); - charBuf->append((char)134); - nOps = 0; - nHints = 0; - firstOp = gTrue; - openPath = gFalse; - } - - pos = offset; - while (pos < offset + nBytes) { - ok = gTrue; - pos = getOp(pos, gTrue, &ok); - if (!ok) { - break; - } - if (!ops[nOps - 1].isNum) { - --nOps; // drop the operator - switch (ops[nOps].op) { - case 0x0001: // hstem - if (firstOp) { - cvtGlyphWidth(nOps & 1, charBuf, pDict); - firstOp = gFalse; - } - if (nOps & 1) { - //~ error(-1, "Wrong number of args (%d) to Type 2 hstem", nOps); - } - d = 0; - dFP = gFalse; - for (k = 0; k < nOps; k += 2) { - // convert Type 2 edge hints (-20 or -21) to Type 1 ghost hints - if (ops[k+1].num < 0) { - d += ops[k].num + ops[k+1].num; - dFP |= ops[k].isFP | ops[k+1].isFP; - cvtNum(d, dFP, charBuf); - cvtNum(-ops[k+1].num, ops[k+1].isFP, charBuf); - } else { - d += ops[k].num; - dFP |= ops[k].isFP; - cvtNum(d, dFP, charBuf); - cvtNum(ops[k+1].num, ops[k+1].isFP, charBuf); - d += ops[k+1].num; - dFP |= ops[k+1].isFP; - } - charBuf->append((char)1); - } - nHints += nOps / 2; - nOps = 0; - break; - case 0x0003: // vstem - if (firstOp) { - cvtGlyphWidth(nOps & 1, charBuf, pDict); - firstOp = gFalse; - } - if (nOps & 1) { - //~ error(-1, "Wrong number of args (%d) to Type 2 vstem", nOps); - } - d = 0; - dFP = gFalse; - for (k = 0; k < nOps; k += 2) { - // convert Type 2 edge hints (-20 or -21) to Type 1 ghost hints - if (ops[k+1].num < 0) { - d += ops[k].num + ops[k+1].num; - dFP |= ops[k].isFP | ops[k+1].isFP; - cvtNum(d, dFP, charBuf); - cvtNum(-ops[k+1].num, ops[k+1].isFP, charBuf); - } else { - d += ops[k].num; - dFP |= ops[k].isFP; - cvtNum(d, dFP, charBuf); - cvtNum(ops[k+1].num, ops[k+1].isFP, charBuf); - d += ops[k+1].num; - dFP |= ops[k+1].isFP; - } - charBuf->append((char)3); - } - nHints += nOps / 2; - nOps = 0; - break; - case 0x0004: // vmoveto - if (firstOp) { - cvtGlyphWidth(nOps == 2, charBuf, pDict); - firstOp = gFalse; - } - if (openPath) { - charBuf->append((char)9); - openPath = gFalse; - } - if (nOps != 1) { - //~ error(-1, "Wrong number of args (%d) to Type 2 vmoveto", nOps); - } - cvtNum(ops[0].num, ops[0].isFP, charBuf); - charBuf->append((char)4); - nOps = 0; - break; - case 0x0005: // rlineto - if (nOps < 2 || nOps % 2 != 0) { - //~ error(-1, "Wrong number of args (%d) to Type 2 rlineto", nOps); - } - for (k = 0; k < nOps; k += 2) { - cvtNum(ops[k].num, ops[k].isFP, charBuf); - cvtNum(ops[k+1].num, ops[k+1].isFP, charBuf); - charBuf->append((char)5); - } - nOps = 0; - openPath = gTrue; - break; - case 0x0006: // hlineto - if (nOps < 1) { - //~ error(-1, "Wrong number of args (%d) to Type 2 hlineto", nOps); - } - for (k = 0; k < nOps; ++k) { - cvtNum(ops[k].num, ops[k].isFP, charBuf); - charBuf->append((char)((k & 1) ? 7 : 6)); - } - nOps = 0; - openPath = gTrue; - break; - case 0x0007: // vlineto - if (nOps < 1) { - //~ error(-1, "Wrong number of args (%d) to Type 2 vlineto", nOps); - } - for (k = 0; k < nOps; ++k) { - cvtNum(ops[k].num, ops[k].isFP, charBuf); - charBuf->append((char)((k & 1) ? 6 : 7)); - } - nOps = 0; - openPath = gTrue; - break; - case 0x0008: // rrcurveto - if (nOps < 6 || nOps % 6 != 0) { - //~ error(-1, "Wrong number of args (%d) to Type 2 rrcurveto", nOps); - } - for (k = 0; k < nOps; k += 6) { - cvtNum(ops[k].num, ops[k].isFP, charBuf); - cvtNum(ops[k+1].num, ops[k+1].isFP, charBuf); - cvtNum(ops[k+2].num, ops[k+2].isFP, charBuf); - cvtNum(ops[k+3].num, ops[k+3].isFP, charBuf); - cvtNum(ops[k+4].num, ops[k+4].isFP, charBuf); - cvtNum(ops[k+5].num, ops[k+5].isFP, charBuf); - charBuf->append((char)8); - } - nOps = 0; - openPath = gTrue; - break; - case 0x000a: // callsubr - if (nOps >= 1) { - subrBias = (subrIdx->len < 1240) - ? 107 : (subrIdx->len < 33900) ? 1131 : 32768; - k = subrBias + (int)ops[nOps - 1].num; - --nOps; - ok = gTrue; - getIndexVal(subrIdx, k, &val, &ok); - if (likely(ok && val.pos != offset)) { - cvtGlyph(val.pos, val.len, charBuf, subrIdx, pDict, gFalse); - } - } else { - //~ error(-1, "Too few args to Type 2 callsubr"); - } - // don't clear the stack - break; - case 0x000b: // return - // don't clear the stack - break; - case 0x000e: // endchar / seac - if (firstOp) { - cvtGlyphWidth(nOps == 1 || nOps == 5, charBuf, pDict); - firstOp = gFalse; - } - if (openPath) { - charBuf->append((char)9); - openPath = gFalse; - } - if (nOps == 4) { - cvtNum(0, gFalse, charBuf); - cvtNum(ops[0].num, ops[0].isFP, charBuf); - cvtNum(ops[1].num, ops[1].isFP, charBuf); - cvtNum(ops[2].num, ops[2].isFP, charBuf); - cvtNum(ops[3].num, ops[3].isFP, charBuf); - charBuf->append((char)12)->append((char)6); - } else if (nOps == 0) { - charBuf->append((char)14); - } else { - //~ error(-1, "Wrong number of args (%d) to Type 2 endchar", nOps); - } - nOps = 0; - break; - case 0x000f: // (obsolete) - // this op is ignored, but we need the glyph width - if (firstOp) { - cvtGlyphWidth(nOps > 0, charBuf, pDict); - firstOp = gFalse; - } - nOps = 0; - break; - case 0x0010: // blend - //~ error(-1, "Unimplemented Type 2 charstring op: %d", file[i]); - nOps = 0; - break; - case 0x0012: // hstemhm - // ignored - if (firstOp) { - cvtGlyphWidth(nOps & 1, charBuf, pDict); - firstOp = gFalse; - } - if (nOps & 1) { - //~ error(-1, "Wrong number of args (%d) to Type 2 hstemhm", nOps); - } - nHints += nOps / 2; - nOps = 0; - break; - case 0x0013: // hintmask - // ignored - if (firstOp) { - cvtGlyphWidth(nOps & 1, charBuf, pDict); - firstOp = gFalse; - } - if (nOps > 0) { - if (nOps & 1) { - //~ error(-1, "Wrong number of args (%d) to Type 2 hintmask/vstemhm", - //~ nOps); - } - nHints += nOps / 2; - } - pos += (nHints + 7) >> 3; - nOps = 0; - break; - case 0x0014: // cntrmask - // ignored - if (firstOp) { - cvtGlyphWidth(nOps & 1, charBuf, pDict); - firstOp = gFalse; - } - if (nOps > 0) { - if (nOps & 1) { - //~ error(-1, "Wrong number of args (%d) to Type 2 cntrmask/vstemhm", - //~ nOps); - } - nHints += nOps / 2; - } - pos += (nHints + 7) >> 3; - nOps = 0; - break; - case 0x0015: // rmoveto - if (firstOp) { - cvtGlyphWidth(nOps == 3, charBuf, pDict); - firstOp = gFalse; - } - if (openPath) { - charBuf->append((char)9); - openPath = gFalse; - } - if (nOps != 2) { - //~ error(-1, "Wrong number of args (%d) to Type 2 rmoveto", nOps); - } - cvtNum(ops[0].num, ops[0].isFP, charBuf); - cvtNum(ops[1].num, ops[1].isFP, charBuf); - charBuf->append((char)21); - nOps = 0; - break; - case 0x0016: // hmoveto - if (firstOp) { - cvtGlyphWidth(nOps == 2, charBuf, pDict); - firstOp = gFalse; - } - if (openPath) { - charBuf->append((char)9); - openPath = gFalse; - } - if (nOps != 1) { - //~ error(-1, "Wrong number of args (%d) to Type 2 hmoveto", nOps); - } - cvtNum(ops[0].num, ops[0].isFP, charBuf); - charBuf->append((char)22); - nOps = 0; - break; - case 0x0017: // vstemhm - // ignored - if (firstOp) { - cvtGlyphWidth(nOps & 1, charBuf, pDict); - firstOp = gFalse; - } - if (nOps & 1) { - //~ error(-1, "Wrong number of args (%d) to Type 2 vstemhm", nOps); - } - nHints += nOps / 2; - nOps = 0; - break; - case 0x0018: // rcurveline - if (nOps < 8 || (nOps - 2) % 6 != 0) { - //~ error(-1, "Wrong number of args (%d) to Type 2 rcurveline", nOps); - } - for (k = 0; k < nOps - 2; k += 6) { - cvtNum(ops[k].num, ops[k].isFP, charBuf); - cvtNum(ops[k+1].num, ops[k+1].isFP, charBuf); - cvtNum(ops[k+2].num, ops[k+2].isFP, charBuf); - cvtNum(ops[k+3].num, ops[k+3].isFP, charBuf); - cvtNum(ops[k+4].num, ops[k+4].isFP, charBuf); - cvtNum(ops[k+5].num, ops[k+5].isFP, charBuf); - charBuf->append((char)8); - } - cvtNum(ops[k].num, ops[k].isFP, charBuf); - cvtNum(ops[k+1].num, ops[k].isFP, charBuf); - charBuf->append((char)5); - nOps = 0; - openPath = gTrue; - break; - case 0x0019: // rlinecurve - if (nOps < 8 || (nOps - 6) % 2 != 0) { - //~ error(-1, "Wrong number of args (%d) to Type 2 rlinecurve", nOps); - } - for (k = 0; k < nOps - 6; k += 2) { - cvtNum(ops[k].num, ops[k].isFP, charBuf); - cvtNum(ops[k+1].num, ops[k].isFP, charBuf); - charBuf->append((char)5); - } - cvtNum(ops[k].num, ops[k].isFP, charBuf); - cvtNum(ops[k+1].num, ops[k+1].isFP, charBuf); - cvtNum(ops[k+2].num, ops[k+2].isFP, charBuf); - cvtNum(ops[k+3].num, ops[k+3].isFP, charBuf); - cvtNum(ops[k+4].num, ops[k+4].isFP, charBuf); - cvtNum(ops[k+5].num, ops[k+5].isFP, charBuf); - charBuf->append((char)8); - nOps = 0; - openPath = gTrue; - break; - case 0x001a: // vvcurveto - if (nOps < 4 || !(nOps % 4 == 0 || (nOps-1) % 4 == 0)) { - //~ error(-1, "Wrong number of args (%d) to Type 2 vvcurveto", nOps); - } - if (nOps % 2 == 1) { - cvtNum(ops[0].num, ops[0].isFP, charBuf); - cvtNum(ops[1].num, ops[1].isFP, charBuf); - cvtNum(ops[2].num, ops[2].isFP, charBuf); - cvtNum(ops[3].num, ops[3].isFP, charBuf); - cvtNum(0, gFalse, charBuf); - cvtNum(ops[4].num, ops[4].isFP, charBuf); - charBuf->append((char)8); - k = 5; - } else { - k = 0; - } - for (; k < nOps; k += 4) { - cvtNum(0, gFalse, charBuf); - cvtNum(ops[k].num, ops[k].isFP, charBuf); - cvtNum(ops[k+1].num, ops[k+1].isFP, charBuf); - cvtNum(ops[k+2].num, ops[k+2].isFP, charBuf); - cvtNum(0, gFalse, charBuf); - cvtNum(ops[k+3].num, ops[k+3].isFP, charBuf); - charBuf->append((char)8); - } - nOps = 0; - openPath = gTrue; - break; - case 0x001b: // hhcurveto - if (nOps < 4 || !(nOps % 4 == 0 || (nOps-1) % 4 == 0)) { - //~ error(-1, "Wrong number of args (%d) to Type 2 hhcurveto", nOps); - } - if (nOps % 2 == 1) { - cvtNum(ops[1].num, ops[1].isFP, charBuf); - cvtNum(ops[0].num, ops[0].isFP, charBuf); - cvtNum(ops[2].num, ops[2].isFP, charBuf); - cvtNum(ops[3].num, ops[3].isFP, charBuf); - cvtNum(ops[4].num, ops[4].isFP, charBuf); - cvtNum(0, gFalse, charBuf); - charBuf->append((char)8); - k = 5; - } else { - k = 0; - } - for (; k < nOps; k += 4) { - cvtNum(ops[k].num, ops[k].isFP, charBuf); - cvtNum(0, gFalse, charBuf); - cvtNum(ops[k+1].num, ops[k+1].isFP, charBuf); - cvtNum(ops[k+2].num, ops[k+2].isFP, charBuf); - cvtNum(ops[k+3].num, ops[k+3].isFP, charBuf); - cvtNum(0, gFalse, charBuf); - charBuf->append((char)8); - } - nOps = 0; - openPath = gTrue; - break; - case 0x001d: // callgsubr - if (nOps >= 1) { - k = gsubrBias + (int)ops[nOps - 1].num; - --nOps; - ok = gTrue; - getIndexVal(&gsubrIdx, k, &val, &ok); - if (likely(ok && val.pos != offset)) { - cvtGlyph(val.pos, val.len, charBuf, subrIdx, pDict, gFalse); - } - } else { - //~ error(-1, "Too few args to Type 2 callgsubr"); - } - // don't clear the stack - break; - case 0x001e: // vhcurveto - if (nOps < 4 || !(nOps % 4 == 0 || (nOps-1) % 4 == 0)) { - //~ error(-1, "Wrong number of args (%d) to Type 2 vhcurveto", nOps); - } - for (k = 0; k < nOps && k != nOps-5; k += 4) { - if (k % 8 == 0) { - cvtNum(ops[k].num, ops[k].isFP, charBuf); - cvtNum(ops[k+1].num, ops[k+1].isFP, charBuf); - cvtNum(ops[k+2].num, ops[k+2].isFP, charBuf); - cvtNum(ops[k+3].num, ops[k+3].isFP, charBuf); - charBuf->append((char)30); - } else { - cvtNum(ops[k].num, ops[k].isFP, charBuf); - cvtNum(ops[k+1].num, ops[k+1].isFP, charBuf); - cvtNum(ops[k+2].num, ops[k+2].isFP, charBuf); - cvtNum(ops[k+3].num, ops[k+3].isFP, charBuf); - charBuf->append((char)31); - } - } - if (k == nOps-5) { - if (k % 8 == 0) { - cvtNum(0, gFalse, charBuf); - cvtNum(ops[k].num, ops[k].isFP, charBuf); - cvtNum(ops[k+1].num, ops[k+1].isFP, charBuf); - cvtNum(ops[k+2].num, ops[k+2].isFP, charBuf); - cvtNum(ops[k+3].num, ops[k+3].isFP, charBuf); - cvtNum(ops[k+4].num, ops[k+4].isFP, charBuf); - } else { - cvtNum(ops[k].num, ops[k].isFP, charBuf); - cvtNum(0, gFalse, charBuf); - cvtNum(ops[k+1].num, ops[k+1].isFP, charBuf); - cvtNum(ops[k+2].num, ops[k+2].isFP, charBuf); - cvtNum(ops[k+4].num, ops[k+4].isFP, charBuf); - cvtNum(ops[k+3].num, ops[k+3].isFP, charBuf); - } - charBuf->append((char)8); - } - nOps = 0; - openPath = gTrue; - break; - case 0x001f: // hvcurveto - if (nOps < 4 || !(nOps % 4 == 0 || (nOps-1) % 4 == 0)) { - //~ error(-1, "Wrong number of args (%d) to Type 2 hvcurveto", nOps); - } - for (k = 0; k < nOps && k != nOps-5; k += 4) { - if (k % 8 == 0) { - cvtNum(ops[k].num, ops[k].isFP, charBuf); - cvtNum(ops[k+1].num, ops[k+1].isFP, charBuf); - cvtNum(ops[k+2].num, ops[k+2].isFP, charBuf); - cvtNum(ops[k+3].num, ops[k+3].isFP, charBuf); - charBuf->append((char)31); - } else { - cvtNum(ops[k].num, ops[k].isFP, charBuf); - cvtNum(ops[k+1].num, ops[k+1].isFP, charBuf); - cvtNum(ops[k+2].num, ops[k+2].isFP, charBuf); - cvtNum(ops[k+3].num, ops[k+3].isFP, charBuf); - charBuf->append((char)30); - } - } - if (k == nOps-5) { - if (k % 8 == 0) { - cvtNum(ops[k].num, ops[k].isFP, charBuf); - cvtNum(0, gFalse, charBuf); - cvtNum(ops[k+1].num, ops[k+1].isFP, charBuf); - cvtNum(ops[k+2].num, ops[k+2].isFP, charBuf); - cvtNum(ops[k+4].num, ops[k+4].isFP, charBuf); - cvtNum(ops[k+3].num, ops[k+3].isFP, charBuf); - } else { - cvtNum(0, gFalse, charBuf); - cvtNum(ops[k].num, ops[k].isFP, charBuf); - cvtNum(ops[k+1].num, ops[k+1].isFP, charBuf); - cvtNum(ops[k+2].num, ops[k+2].isFP, charBuf); - cvtNum(ops[k+3].num, ops[k+3].isFP, charBuf); - cvtNum(ops[k+4].num, ops[k+4].isFP, charBuf); - } - charBuf->append((char)8); - } - nOps = 0; - openPath = gTrue; - break; - case 0x0c00: // dotsection (should be Type 1 only?) - // ignored - nOps = 0; - break; - case 0x0c03: // and - case 0x0c04: // or - case 0x0c05: // not - case 0x0c08: // store - case 0x0c09: // abs - case 0x0c0a: // add - case 0x0c0b: // sub - case 0x0c0c: // div - case 0x0c0d: // load - case 0x0c0e: // neg - case 0x0c0f: // eq - case 0x0c12: // drop - case 0x0c14: // put - case 0x0c15: // get - case 0x0c16: // ifelse - case 0x0c17: // random - case 0x0c18: // mul - case 0x0c1a: // sqrt - case 0x0c1b: // dup - case 0x0c1c: // exch - case 0x0c1d: // index - case 0x0c1e: // roll - //~ error(-1, "Unimplemented Type 2 charstring op: 12.%d", file[i+1]); - nOps = 0; - break; - case 0x0c22: // hflex - if (nOps != 7) { - //~ error(-1, "Wrong number of args (%d) to Type 2 hflex", nOps); - } - cvtNum(ops[0].num, ops[0].isFP, charBuf); - cvtNum(0, gFalse, charBuf); - cvtNum(ops[1].num, ops[1].isFP, charBuf); - cvtNum(ops[2].num, ops[2].isFP, charBuf); - cvtNum(ops[3].num, ops[3].isFP, charBuf); - cvtNum(0, gFalse, charBuf); - charBuf->append((char)8); - cvtNum(ops[4].num, ops[4].isFP, charBuf); - cvtNum(0, gFalse, charBuf); - cvtNum(ops[5].num, ops[5].isFP, charBuf); - cvtNum(-ops[2].num, ops[2].isFP, charBuf); - cvtNum(ops[6].num, ops[6].isFP, charBuf); - cvtNum(0, gFalse, charBuf); - charBuf->append((char)8); - nOps = 0; - openPath = gTrue; - break; - case 0x0c23: // flex - if (nOps != 13) { - //~ error(-1, "Wrong number of args (%d) to Type 2 flex", nOps); - } - cvtNum(ops[0].num, ops[0].isFP, charBuf); - cvtNum(ops[1].num, ops[1].isFP, charBuf); - cvtNum(ops[2].num, ops[2].isFP, charBuf); - cvtNum(ops[3].num, ops[3].isFP, charBuf); - cvtNum(ops[4].num, ops[4].isFP, charBuf); - cvtNum(ops[5].num, ops[5].isFP, charBuf); - charBuf->append((char)8); - cvtNum(ops[6].num, ops[6].isFP, charBuf); - cvtNum(ops[7].num, ops[7].isFP, charBuf); - cvtNum(ops[8].num, ops[8].isFP, charBuf); - cvtNum(ops[9].num, ops[9].isFP, charBuf); - cvtNum(ops[10].num, ops[10].isFP, charBuf); - cvtNum(ops[11].num, ops[11].isFP, charBuf); - charBuf->append((char)8); - nOps = 0; - openPath = gTrue; - break; - case 0x0c24: // hflex1 - if (nOps != 9) { - //~ error(-1, "Wrong number of args (%d) to Type 2 hflex1", nOps); - } - cvtNum(ops[0].num, ops[0].isFP, charBuf); - cvtNum(ops[1].num, ops[1].isFP, charBuf); - cvtNum(ops[2].num, ops[2].isFP, charBuf); - cvtNum(ops[3].num, ops[3].isFP, charBuf); - cvtNum(ops[4].num, ops[4].isFP, charBuf); - cvtNum(0, gFalse, charBuf); - charBuf->append((char)8); - cvtNum(ops[5].num, ops[5].isFP, charBuf); - cvtNum(0, gFalse, charBuf); - cvtNum(ops[6].num, ops[6].isFP, charBuf); - cvtNum(ops[7].num, ops[7].isFP, charBuf); - cvtNum(ops[8].num, ops[8].isFP, charBuf); - cvtNum(-(ops[1].num + ops[3].num + ops[7].num), - ops[1].isFP | ops[3].isFP | ops[7].isFP, charBuf); - charBuf->append((char)8); - nOps = 0; - openPath = gTrue; - break; - case 0x0c25: // flex1 - if (nOps != 11) { - //~ error(-1, "Wrong number of args (%d) to Type 2 flex1", nOps); - } - cvtNum(ops[0].num, ops[0].isFP, charBuf); - cvtNum(ops[1].num, ops[1].isFP, charBuf); - cvtNum(ops[2].num, ops[2].isFP, charBuf); - cvtNum(ops[3].num, ops[3].isFP, charBuf); - cvtNum(ops[4].num, ops[4].isFP, charBuf); - cvtNum(ops[5].num, ops[5].isFP, charBuf); - charBuf->append((char)8); - cvtNum(ops[6].num, ops[6].isFP, charBuf); - cvtNum(ops[7].num, ops[7].isFP, charBuf); - cvtNum(ops[8].num, ops[8].isFP, charBuf); - cvtNum(ops[9].num, ops[9].isFP, charBuf); - dx = ops[0].num + ops[2].num + ops[4].num + ops[6].num + ops[8].num; - dy = ops[1].num + ops[3].num + ops[5].num + ops[7].num + ops[9].num; - if (fabs(dx) > fabs(dy)) { - cvtNum(ops[10].num, ops[10].isFP, charBuf); - cvtNum(-dy, ops[1].isFP | ops[3].isFP | ops[5].isFP | - ops[7].isFP | ops[9].isFP, charBuf); - } else { - cvtNum(-dx, ops[0].isFP | ops[2].isFP | ops[4].isFP | - ops[6].isFP | ops[8].isFP, charBuf); - cvtNum(ops[10].num, ops[10].isFP, charBuf); - } - charBuf->append((char)8); - nOps = 0; - openPath = gTrue; - break; - default: - //~ error(-1, "Illegal Type 2 charstring op: %04x", - //~ ops[nOps].op); - nOps = 0; - break; - } - } - } - - // charstring encryption - if (top) { - r2 = 4330; - for (i = start; i < charBuf->getLength(); ++i) { - byte = charBuf->getChar(i) ^ (r2 >> 8); - charBuf->setChar(i, byte); - r2 = (byte + r2) * 52845 + 22719; - } - } -} - -void FoFiType1C::cvtGlyphWidth(GBool useOp, GooString *charBuf, - Type1CPrivateDict *pDict) { - double w; - GBool wFP; - int i; - - if (useOp) { - w = pDict->nominalWidthX + ops[0].num; - wFP = pDict->nominalWidthXFP | ops[0].isFP; - for (i = 1; i < nOps; ++i) { - ops[i-1] = ops[i]; - } - --nOps; - } else { - w = pDict->defaultWidthX; - wFP = pDict->defaultWidthXFP; - } - cvtNum(0, gFalse, charBuf); - cvtNum(w, wFP, charBuf); - charBuf->append((char)13); -} - -void FoFiType1C::cvtNum(double x, GBool isFP, GooString *charBuf) { - Guchar buf[12]; - int y, n; - - n = 0; - if (isFP) { - if (x >= -32768 && x < 32768) { - y = (int)(x * 256.0); - buf[0] = 255; - buf[1] = (Guchar)(y >> 24); - buf[2] = (Guchar)(y >> 16); - buf[3] = (Guchar)(y >> 8); - buf[4] = (Guchar)y; - buf[5] = 255; - buf[6] = 0; - buf[7] = 0; - buf[8] = 1; - buf[9] = 0; - buf[10] = 12; - buf[11] = 12; - n = 12; - } else { - //~ error(-1, "Type 2 fixed point constant out of range"); - } - } else { - y = (int)x; - if (y >= -107 && y <= 107) { - buf[0] = (Guchar)(y + 139); - n = 1; - } else if (y > 107 && y <= 1131) { - y -= 108; - buf[0] = (Guchar)((y >> 8) + 247); - buf[1] = (Guchar)(y & 0xff); - n = 2; - } else if (y < -107 && y >= -1131) { - y = -y - 108; - buf[0] = (Guchar)((y >> 8) + 251); - buf[1] = (Guchar)(y & 0xff); - n = 2; - } else { - buf[0] = 255; - buf[1] = (Guchar)(y >> 24); - buf[2] = (Guchar)(y >> 16); - buf[3] = (Guchar)(y >> 8); - buf[4] = (Guchar)y; - n = 5; - } - } - charBuf->append((char *)buf, n); -} - -void FoFiType1C::eexecWrite(Type1CEexecBuf *eb, const char *s) { - Guchar *p; - Guchar x; - - for (p = (Guchar *)s; *p; ++p) { - x = *p ^ (eb->r1 >> 8); - eb->r1 = (x + eb->r1) * 52845 + 22719; - if (eb->ascii) { - (*eb->outputFunc)(eb->outputStream, &hexChars[x >> 4], 1); - (*eb->outputFunc)(eb->outputStream, &hexChars[x & 0x0f], 1); - eb->line += 2; - if (eb->line == 64) { - (*eb->outputFunc)(eb->outputStream, "\n", 1); - eb->line = 0; - } - } else { - (*eb->outputFunc)(eb->outputStream, (char *)&x, 1); - } - } -} - -void FoFiType1C::eexecWriteCharstring(Type1CEexecBuf *eb, - Guchar *s, int n) { - Guchar x; - int i; - - // eexec encryption - for (i = 0; i < n; ++i) { - x = s[i] ^ (eb->r1 >> 8); - eb->r1 = (x + eb->r1) * 52845 + 22719; - if (eb->ascii) { - (*eb->outputFunc)(eb->outputStream, &hexChars[x >> 4], 1); - (*eb->outputFunc)(eb->outputStream, &hexChars[x & 0x0f], 1); - eb->line += 2; - if (eb->line == 64) { - (*eb->outputFunc)(eb->outputStream, "\n", 1); - eb->line = 0; - } - } else { - (*eb->outputFunc)(eb->outputStream, (char *)&x, 1); - } - } -} - -void FoFiType1C::writePSString(char *s, FoFiOutputFunc outputFunc, - void *outputStream) { - char buf[80]; - char *p; - int i, c; - - i = 0; - buf[i++] = '('; - for (p = s; *p; ++p) { - c = *p & 0xff; - if (c == '(' || c == ')' || c == '\\') { - buf[i++] = '\\'; - buf[i++] = c; - } else if (c < 0x20 || c >= 0x80) { - buf[i++] = '\\'; - buf[i++] = '0' + ((c >> 6) & 7); - buf[i++] = '0' + ((c >> 3) & 7); - buf[i++] = '0' + (c & 7); - } else { - buf[i++] = c; - } - if (i >= 64) { - buf[i++] = '\\'; - buf[i++] = '\n'; - (*outputFunc)(outputStream, buf, i); - i = 0; - } - } - buf[i++] = ')'; - (*outputFunc)(outputStream, buf, i); -} - -GBool FoFiType1C::parse() { - Type1CIndex fdIdx; - Type1CIndexVal val; - int i; - - parsedOk = gTrue; - - // some tools embed Type 1C fonts with an extra whitespace char at - // the beginning - if (len > 0 && file[0] != '\x01') { - ++file; - --len; - } - - // find the indexes - getIndex(getU8(2, &parsedOk), &nameIdx, &parsedOk); - getIndex(nameIdx.endPos, &topDictIdx, &parsedOk); - getIndex(topDictIdx.endPos, &stringIdx, &parsedOk); - getIndex(stringIdx.endPos, &gsubrIdx, &parsedOk); - if (!parsedOk) { - return gFalse; - } - gsubrBias = (gsubrIdx.len < 1240) ? 107 - : (gsubrIdx.len < 33900) ? 1131 : 32768; - - // read the first font name - getIndexVal(&nameIdx, 0, &val, &parsedOk); - if (!parsedOk) { - return gFalse; - } - name = new GooString((char *)&file[val.pos], val.len); - - // read the top dict for the first font - readTopDict(); - - // for CID fonts: read the FDArray dicts and private dicts - if (topDict.firstOp == 0x0c1e) { - if (topDict.fdArrayOffset == 0) { - nFDs = 1; - privateDicts = (Type1CPrivateDict *)gmalloc(sizeof(Type1CPrivateDict)); - readPrivateDict(0, 0, &privateDicts[0]); - } else { - getIndex(topDict.fdArrayOffset, &fdIdx, &parsedOk); - if (!parsedOk) { - return gFalse; - } - nFDs = fdIdx.len; - privateDicts = (Type1CPrivateDict *) - gmallocn(nFDs, sizeof(Type1CPrivateDict)); - for (i = 0; i < nFDs; ++i) { - getIndexVal(&fdIdx, i, &val, &parsedOk); - if (!parsedOk) { - return gFalse; - } - readFD(val.pos, val.len, &privateDicts[i]); - } - } - - // for 8-bit fonts: read the private dict - } else { - nFDs = 1; - privateDicts = (Type1CPrivateDict *)gmalloc(sizeof(Type1CPrivateDict)); - readPrivateDict(topDict.privateOffset, topDict.privateSize, - &privateDicts[0]); - } - - // check for parse errors in the private dict(s) - if (!parsedOk) { - return gFalse; - } - - // get the charstrings index - if (topDict.charStringsOffset <= 0) { - parsedOk = gFalse; - return gFalse; - } - getIndex(topDict.charStringsOffset, &charStringsIdx, &parsedOk); - if (!parsedOk) { - return gFalse; - } - nGlyphs = charStringsIdx.len; - - // for CID fonts: read the FDSelect table - if (topDict.firstOp == 0x0c1e) { - readFDSelect(); - if (!parsedOk) { - return gFalse; - } - } - - // read the charset - if (!readCharset()) { - parsedOk = gFalse; - return gFalse; - } - - // for 8-bit fonts: build the encoding - if (topDict.firstOp != 0x0c14 && topDict.firstOp != 0x0c1e) { - buildEncoding(); - if (!parsedOk) { - return gFalse; - } - } - - return parsedOk; -} - -void FoFiType1C::readTopDict() { - Type1CIndexVal topDictPtr; - int pos; - - topDict.firstOp = -1; - topDict.versionSID = 0; - topDict.noticeSID = 0; - topDict.copyrightSID = 0; - topDict.fullNameSID = 0; - topDict.familyNameSID = 0; - topDict.weightSID = 0; - topDict.isFixedPitch = 0; - topDict.italicAngle = 0; - topDict.underlinePosition = -100; - topDict.underlineThickness = 50; - topDict.paintType = 0; - topDict.charstringType = 2; - topDict.fontMatrix[0] = 0.001; - topDict.fontMatrix[1] = 0; - topDict.fontMatrix[2] = 0; - topDict.fontMatrix[3] = 0.001; - topDict.fontMatrix[4] = 0; - topDict.fontMatrix[5] = 0; - topDict.hasFontMatrix = gFalse; - topDict.uniqueID = 0; - topDict.fontBBox[0] = 0; - topDict.fontBBox[1] = 0; - topDict.fontBBox[2] = 0; - topDict.fontBBox[3] = 0; - topDict.strokeWidth = 0; - topDict.charsetOffset = 0; - topDict.encodingOffset = 0; - topDict.charStringsOffset = 0; - topDict.privateSize = 0; - topDict.privateOffset = 0; - topDict.registrySID = 0; - topDict.orderingSID = 0; - topDict.supplement = 0; - topDict.fdArrayOffset = 0; - topDict.fdSelectOffset = 0; - - getIndexVal(&topDictIdx, 0, &topDictPtr, &parsedOk); - if (!parsedOk) { - return; - } - pos = topDictPtr.pos; - nOps = 0; - while (pos < topDictPtr.pos + topDictPtr.len) { - pos = getOp(pos, gFalse, &parsedOk); - if (!parsedOk) { - break; - } - if (!ops[nOps - 1].isNum) { - --nOps; // drop the operator - if (topDict.firstOp < 0) { - topDict.firstOp = ops[nOps].op; - } - switch (ops[nOps].op) { - case 0x0000: topDict.versionSID = (int)ops[0].num; break; - case 0x0001: topDict.noticeSID = (int)ops[0].num; break; - case 0x0c00: topDict.copyrightSID = (int)ops[0].num; break; - case 0x0002: topDict.fullNameSID = (int)ops[0].num; break; - case 0x0003: topDict.familyNameSID = (int)ops[0].num; break; - case 0x0004: topDict.weightSID = (int)ops[0].num; break; - case 0x0c01: topDict.isFixedPitch = (int)ops[0].num; break; - case 0x0c02: topDict.italicAngle = ops[0].num; break; - case 0x0c03: topDict.underlinePosition = ops[0].num; break; - case 0x0c04: topDict.underlineThickness = ops[0].num; break; - case 0x0c05: topDict.paintType = (int)ops[0].num; break; - case 0x0c06: topDict.charstringType = (int)ops[0].num; break; - case 0x0c07: topDict.fontMatrix[0] = ops[0].num; - topDict.fontMatrix[1] = ops[1].num; - topDict.fontMatrix[2] = ops[2].num; - topDict.fontMatrix[3] = ops[3].num; - topDict.fontMatrix[4] = ops[4].num; - topDict.fontMatrix[5] = ops[5].num; - topDict.hasFontMatrix = gTrue; break; - case 0x000d: topDict.uniqueID = (int)ops[0].num; break; - case 0x0005: topDict.fontBBox[0] = ops[0].num; - topDict.fontBBox[1] = ops[1].num; - topDict.fontBBox[2] = ops[2].num; - topDict.fontBBox[3] = ops[3].num; break; - case 0x0c08: topDict.strokeWidth = ops[0].num; break; - case 0x000f: topDict.charsetOffset = (int)ops[0].num; break; - case 0x0010: topDict.encodingOffset = (int)ops[0].num; break; - case 0x0011: topDict.charStringsOffset = (int)ops[0].num; break; - case 0x0012: topDict.privateSize = (int)ops[0].num; - topDict.privateOffset = (int)ops[1].num; break; - case 0x0c1e: topDict.registrySID = (int)ops[0].num; - topDict.orderingSID = (int)ops[1].num; - topDict.supplement = (int)ops[2].num; break; - case 0x0c24: topDict.fdArrayOffset = (int)ops[0].num; break; - case 0x0c25: topDict.fdSelectOffset = (int)ops[0].num; break; - } - nOps = 0; - } - } -} - -// Read a CID font dict (FD) - this pulls out the private dict -// pointer, and reads the private dict. It also pulls the FontMatrix -// (if any) out of the FD. -void FoFiType1C::readFD(int offset, int length, Type1CPrivateDict *pDict) { - int pos, pSize, pOffset; - double fontMatrix[6] = {0}; - GBool hasFontMatrix; - - hasFontMatrix = gFalse; - fontMatrix[0] = fontMatrix[1] = fontMatrix[2] = 0; // make gcc happy - fontMatrix[3] = fontMatrix[4] = fontMatrix[5] = 0; - pSize = pOffset = 0; - pos = offset; - nOps = 0; - while (pos < offset + length) { - pos = getOp(pos, gFalse, &parsedOk); - if (!parsedOk) { - return; - } - if (!ops[nOps - 1].isNum) { - if (ops[nOps - 1].op == 0x0012) { - if (nOps < 3) { - parsedOk = gFalse; - return; - } - pSize = (int)ops[0].num; - pOffset = (int)ops[1].num; - break; - } else if (ops[nOps - 1].op == 0x0c07) { - fontMatrix[0] = ops[0].num; - fontMatrix[1] = ops[1].num; - fontMatrix[2] = ops[2].num; - fontMatrix[3] = ops[3].num; - fontMatrix[4] = ops[4].num; - fontMatrix[5] = ops[5].num; - hasFontMatrix = gTrue; - } - nOps = 0; - } - } - readPrivateDict(pOffset, pSize, pDict); - if (hasFontMatrix) { - pDict->fontMatrix[0] = fontMatrix[0]; - pDict->fontMatrix[1] = fontMatrix[1]; - pDict->fontMatrix[2] = fontMatrix[2]; - pDict->fontMatrix[3] = fontMatrix[3]; - pDict->fontMatrix[4] = fontMatrix[4]; - pDict->fontMatrix[5] = fontMatrix[5]; - pDict->hasFontMatrix = gTrue; - } -} - -void FoFiType1C::readPrivateDict(int offset, int length, - Type1CPrivateDict *pDict) { - int pos; - - pDict->hasFontMatrix = gFalse; - pDict->nBlueValues = 0; - pDict->nOtherBlues = 0; - pDict->nFamilyBlues = 0; - pDict->nFamilyOtherBlues = 0; - pDict->blueScale = 0.039625; - pDict->blueShift = 7; - pDict->blueFuzz = 1; - pDict->hasStdHW = gFalse; - pDict->hasStdVW = gFalse; - pDict->nStemSnapH = 0; - pDict->nStemSnapV = 0; - pDict->hasForceBold = gFalse; - pDict->forceBoldThreshold = 0; - pDict->languageGroup = 0; - pDict->expansionFactor = 0.06; - pDict->initialRandomSeed = 0; - pDict->subrsOffset = 0; - pDict->defaultWidthX = 0; - pDict->defaultWidthXFP = gFalse; - pDict->nominalWidthX = 0; - pDict->nominalWidthXFP = gFalse; - - // no dictionary - if (offset == 0 || length == 0) { - return; - } - - pos = offset; - nOps = 0; - while (pos < offset + length) { - pos = getOp(pos, gFalse, &parsedOk); - if (!parsedOk) { - break; - } - if (!ops[nOps - 1].isNum) { - --nOps; // drop the operator - switch (ops[nOps].op) { - case 0x0006: - pDict->nBlueValues = getDeltaIntArray(pDict->blueValues, - type1CMaxBlueValues); - break; - case 0x0007: - pDict->nOtherBlues = getDeltaIntArray(pDict->otherBlues, - type1CMaxOtherBlues); - break; - case 0x0008: - pDict->nFamilyBlues = getDeltaIntArray(pDict->familyBlues, - type1CMaxBlueValues); - break; - case 0x0009: - pDict->nFamilyOtherBlues = getDeltaIntArray(pDict->familyOtherBlues, - type1CMaxOtherBlues); - break; - case 0x0c09: - pDict->blueScale = ops[0].num; - break; - case 0x0c0a: - pDict->blueShift = (int)ops[0].num; - break; - case 0x0c0b: - pDict->blueFuzz = (int)ops[0].num; - break; - case 0x000a: - pDict->stdHW = ops[0].num; - pDict->hasStdHW = gTrue; - break; - case 0x000b: - pDict->stdVW = ops[0].num; - pDict->hasStdVW = gTrue; - break; - case 0x0c0c: - pDict->nStemSnapH = getDeltaFPArray(pDict->stemSnapH, - type1CMaxStemSnap); - break; - case 0x0c0d: - pDict->nStemSnapV = getDeltaFPArray(pDict->stemSnapV, - type1CMaxStemSnap); - break; - case 0x0c0e: - pDict->forceBold = ops[0].num != 0; - pDict->hasForceBold = gTrue; - break; - case 0x0c0f: - pDict->forceBoldThreshold = ops[0].num; - break; - case 0x0c11: - pDict->languageGroup = (int)ops[0].num; - break; - case 0x0c12: - pDict->expansionFactor = ops[0].num; - break; - case 0x0c13: - pDict->initialRandomSeed = (int)ops[0].num; - break; - case 0x0013: - pDict->subrsOffset = offset + (int)ops[0].num; - break; - case 0x0014: - pDict->defaultWidthX = ops[0].num; - pDict->defaultWidthXFP = ops[0].isFP; - break; - case 0x0015: - pDict->nominalWidthX = ops[0].num; - pDict->nominalWidthXFP = ops[0].isFP; - break; - } - nOps = 0; - } - } -} - -void FoFiType1C::readFDSelect() { - int fdSelectFmt, pos, nRanges, gid0, gid1, fd, i, j; - - fdSelect = (Guchar *)gmalloc(nGlyphs); - if (topDict.fdSelectOffset == 0) { - for (i = 0; i < nGlyphs; ++i) { - fdSelect[i] = 0; - } - } else { - pos = topDict.fdSelectOffset; - fdSelectFmt = getU8(pos++, &parsedOk); - if (!parsedOk) { - return; - } - if (fdSelectFmt == 0) { - if (!checkRegion(pos, nGlyphs)) { - parsedOk = gFalse; - return; - } - memcpy(fdSelect, file + pos, nGlyphs); - } else if (fdSelectFmt == 3) { - nRanges = getU16BE(pos, &parsedOk); - pos += 2; - gid0 = getU16BE(pos, &parsedOk); - pos += 2; - for (i = 1; i <= nRanges; ++i) { - fd = getU8(pos++, &parsedOk); - gid1 = getU16BE(pos, &parsedOk); - if (!parsedOk) { - return; - } - pos += 2; - if (gid0 > gid1 || gid1 > nGlyphs) { - //~ error(-1, "Bad FDSelect table in CID font"); - parsedOk = gFalse; - return; - } - for (j = gid0; j < gid1; ++j) { - fdSelect[j] = fd; - } - gid0 = gid1; - } - } else { - //~ error(-1, "Unknown FDSelect table format in CID font"); - for (i = 0; i < nGlyphs; ++i) { - fdSelect[i] = 0; - } - } - } -} - -void FoFiType1C::buildEncoding() { - char buf[256]; - int nCodes, nRanges, encFormat; - int pos, c, sid, nLeft, nSups, i, j; - - if (topDict.encodingOffset == 0) { - encoding = (char **)fofiType1StandardEncoding; - - } else if (topDict.encodingOffset == 1) { - encoding = (char **)fofiType1ExpertEncoding; - - } else { - encoding = (char **)gmallocn(256, sizeof(char *)); - for (i = 0; i < 256; ++i) { - encoding[i] = nullptr; - } - pos = topDict.encodingOffset; - encFormat = getU8(pos++, &parsedOk); - if (!parsedOk) { - return; - } - if ((encFormat & 0x7f) == 0) { - nCodes = 1 + getU8(pos++, &parsedOk); - if (!parsedOk) { - return; - } - if (nCodes > nGlyphs) { - nCodes = nGlyphs; - } - for (i = 1; i < nCodes && i < charsetLength; ++i) { - c = getU8(pos++, &parsedOk); - if (!parsedOk) { - return; - } - if (encoding[c]) { - gfree(encoding[c]); - } - encoding[c] = copyString(getString(charset[i], buf, &parsedOk)); - } - } else if ((encFormat & 0x7f) == 1) { - nRanges = getU8(pos++, &parsedOk); - if (!parsedOk) { - return; - } - nCodes = 1; - for (i = 0; i < nRanges; ++i) { - c = getU8(pos++, &parsedOk); - nLeft = getU8(pos++, &parsedOk); - if (!parsedOk) { - return; - } - for (j = 0; j <= nLeft && nCodes < nGlyphs && nCodes < charsetLength; ++j) { - if (c < 256) { - if (encoding[c]) { - gfree(encoding[c]); - } - encoding[c] = copyString(getString(charset[nCodes], buf, - &parsedOk)); - } - ++nCodes; - ++c; - } - } - } - if (encFormat & 0x80) { - nSups = getU8(pos++, &parsedOk); - if (!parsedOk) { - return; - } - for (i = 0; i < nSups; ++i) { - c = getU8(pos++, &parsedOk);; - if (!parsedOk) { - return;; - } - sid = getU16BE(pos, &parsedOk); - pos += 2; - if (!parsedOk) { - return; - } - if (encoding[c]) { - gfree(encoding[c]); - } - encoding[c] = copyString(getString(sid, buf, &parsedOk)); - } - } - } -} - -GBool FoFiType1C::readCharset() { - int charsetFormat, c, pos; - int nLeft, i, j; - - if (topDict.charsetOffset == 0) { - charset = fofiType1CISOAdobeCharset; - charsetLength = sizeof(fofiType1CISOAdobeCharset) / sizeof(Gushort); - } else if (topDict.charsetOffset == 1) { - charset = fofiType1CExpertCharset; - charsetLength = sizeof(fofiType1CExpertCharset) / sizeof(Gushort); - } else if (topDict.charsetOffset == 2) { - charset = fofiType1CExpertSubsetCharset; - charsetLength = sizeof(fofiType1CExpertSubsetCharset) / sizeof(Gushort); - } else { - charset = (Gushort *)gmallocn(nGlyphs, sizeof(Gushort)); - charsetLength = nGlyphs; - for (i = 0; i < nGlyphs; ++i) { - charset[i] = 0; - } - pos = topDict.charsetOffset; - charsetFormat = getU8(pos++, &parsedOk); - if (charsetFormat == 0) { - for (i = 1; i < nGlyphs; ++i) { - charset[i] = (Gushort)getU16BE(pos, &parsedOk); - pos += 2; - if (!parsedOk) { - break; - } - } - } else if (charsetFormat == 1) { - i = 1; - while (i < nGlyphs) { - c = getU16BE(pos, &parsedOk); - pos += 2; - nLeft = getU8(pos++, &parsedOk); - if (!parsedOk) { - break; - } - for (j = 0; j <= nLeft && i < nGlyphs; ++j) { - charset[i++] = (Gushort)c++; - } - } - } else if (charsetFormat == 2) { - i = 1; - while (i < nGlyphs) { - c = getU16BE(pos, &parsedOk); - pos += 2; - nLeft = getU16BE(pos, &parsedOk); - pos += 2; - if (!parsedOk) { - break; - } - for (j = 0; j <= nLeft && i < nGlyphs; ++j) { - charset[i++] = (Gushort)c++; - } - } - } - if (!parsedOk) { - gfree(charset); - charset = nullptr; - charsetLength = 0; - return gFalse; - } - } - return gTrue; -} - -int FoFiType1C::getOp(int pos, GBool charstring, GBool *ok) { - static char nybChars[16] = "0123456789.ee -"; - Type1COp op; - char buf[65]; - int b0, b1, nyb0, nyb1, x, i; - - b0 = getU8(pos++, ok); - - if (b0 == 28) { - x = getU8(pos++, ok); - x = (x << 8) | getU8(pos++, ok); - if (x & 0x8000) { - x |= ~0xffff; - } - op.num = x; - - } else if (!charstring && b0 == 29) { - x = getU8(pos++, ok); - x = (x << 8) | getU8(pos++, ok); - x = (x << 8) | getU8(pos++, ok); - x = (x << 8) | getU8(pos++, ok); - if (x & 0x80000000) { - x |= ~0xffffffff; - } - op.num = x; - - } else if (!charstring && b0 == 30) { - i = 0; - do { - b1 = getU8(pos++, ok); - nyb0 = b1 >> 4; - nyb1 = b1 & 0x0f; - if (nyb0 == 0xf) { - break; - } - buf[i++] = nybChars[nyb0]; - if (i == 64) { - break; - } - if (nyb0 == 0xc) { - buf[i++] = '-'; - } - if (i == 64) { - break; - } - if (nyb1 == 0xf) { - break; - } - buf[i++] = nybChars[nyb1]; - if (i == 64) { - break; - } - if (nyb1 == 0xc) { - buf[i++] = '-'; - } - } while (i < 64); - buf[i] = '\0'; - op.num = gatof(buf); - op.isFP = gTrue; - - } else if (b0 >= 32 && b0 <= 246) { - op.num = b0 - 139; - - } else if (b0 >= 247 && b0 <= 250) { - op.num = ((b0 - 247) << 8) + getU8(pos++, ok) + 108; - - } else if (b0 >= 251 && b0 <= 254) { - op.num = -((b0 - 251) << 8) - getU8(pos++, ok) - 108; - - } else if (charstring && b0 == 255) { - x = getU8(pos++, ok); - x = (x << 8) | getU8(pos++, ok); - x = (x << 8) | getU8(pos++, ok); - x = (x << 8) | getU8(pos++, ok); - if (x & 0x80000000) { - x |= ~0xffffffff; - } - op.num = (double)x / 65536.0; - op.isFP = gTrue; - - } else if (b0 == 12) { - op.isNum = gFalse; - op.op = 0x0c00 + getU8(pos++, ok); - - } else { - op.isNum = gFalse; - op.op = b0; - } - - if (nOps < 49) { - ops[nOps++] = op; - } - - return pos; -} - -// Convert the delta-encoded ops array to an array of ints. -int FoFiType1C::getDeltaIntArray(int *arr, int maxLen) { - int x; - int n, i; - - if ((n = nOps) > maxLen) { - n = maxLen; - } - x = 0; - for (i = 0; i < n; ++i) { - x += (int)ops[i].num; - arr[i] = x; - } - return n; -} - -// Convert the delta-encoded ops array to an array of doubles. -int FoFiType1C::getDeltaFPArray(double *arr, int maxLen) { - double x; - int n, i; - - if ((n = nOps) > maxLen) { - n = maxLen; - } - x = 0; - for (i = 0; i < n; ++i) { - x += ops[i].num; - arr[i] = x; - } - return n; -} - -void FoFiType1C::getIndex(int pos, Type1CIndex *idx, GBool *ok) { - idx->pos = pos; - idx->len = getU16BE(pos, ok); - if (idx->len == 0) { - // empty indexes are legal and contain just the length field - idx->offSize = 0; - idx->startPos = idx->endPos = pos + 2; - } else { - idx->offSize = getU8(pos + 2, ok); - if (idx->offSize < 1 || idx->offSize > 4) { - *ok = gFalse; - } - idx->startPos = pos + 3 + (idx->len + 1) * idx->offSize - 1; - if (idx->startPos < 0 || idx->startPos >= len) { - *ok = gFalse; - } - idx->endPos = idx->startPos + getUVarBE(pos + 3 + idx->len * idx->offSize, - idx->offSize, ok); - if (idx->endPos < idx->startPos || idx->endPos > len) { - *ok = gFalse; - } - } -} - -void FoFiType1C::getIndexVal(Type1CIndex *idx, int i, - Type1CIndexVal *val, GBool *ok) { - int pos0, pos1; - - if (i < 0 || i >= idx->len) { - *ok = gFalse; - return; - } - pos0 = idx->startPos + getUVarBE(idx->pos + 3 + i * idx->offSize, - idx->offSize, ok); - pos1 = idx->startPos + getUVarBE(idx->pos + 3 + (i + 1) * idx->offSize, - idx->offSize, ok); - if (pos0 < idx->startPos || pos0 > idx->endPos || - pos1 <= idx->startPos || pos1 > idx->endPos || - pos1 < pos0) { - *ok = gFalse; - } - val->pos = pos0; - val->len = pos1 - pos0; -} - -char *FoFiType1C::getString(int sid, char *buf, GBool *ok) { - Type1CIndexVal val; - int n; - - if (sid < 0) { - buf[0] = '\0'; - } else if (sid < 391) { - strcpy(buf, fofiType1CStdStrings[sid]); - } else { - sid -= 391; - getIndexVal(&stringIdx, sid, &val, ok); - if (*ok) { - if ((n = val.len) > 255) { - n = 255; - } - strncpy(buf, (char *)&file[val.pos], n); - buf[n] = '\0'; - } else { - buf[0] = '\0'; - } - } - return buf; -} diff --git a/Build/source/libs/poppler/poppler-src/fofi/FoFiType1C.h b/Build/source/libs/poppler/poppler-src/fofi/FoFiType1C.h deleted file mode 100644 index 03a160040ea..00000000000 --- a/Build/source/libs/poppler/poppler-src/fofi/FoFiType1C.h +++ /dev/null @@ -1,267 +0,0 @@ -//======================================================================== -// -// FoFiType1C.h -// -// Copyright 1999-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2006 Takashi Iwai <tiwai@suse.de> -// Copyright (C) 2012 Thomas Freitag <Thomas.Freitag@alfa.de> -// Copyright (C) 2018 Albert Astals Cid <aacid@kde.org> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef FOFITYPE1C_H -#define FOFITYPE1C_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "goo/gtypes.h" -#include "FoFiBase.h" - -class GooString; - -//------------------------------------------------------------------------ - -struct Type1CIndex { - int pos; // absolute position in file - int len; // length (number of entries) - int offSize; // offset size - int startPos; // position of start of index data - 1 - int endPos; // position one byte past end of the index -}; - -struct Type1CIndexVal { - int pos; // absolute position in file - int len; // length, in bytes -}; - -struct Type1CTopDict { - int firstOp; - - int versionSID; - int noticeSID; - int copyrightSID; - int fullNameSID; - int familyNameSID; - int weightSID; - int isFixedPitch; - double italicAngle; - double underlinePosition; - double underlineThickness; - int paintType; - int charstringType; - double fontMatrix[6]; - GBool hasFontMatrix; // CID fonts are allowed to put their - // FontMatrix in the FD instead of the - // top dict - int uniqueID; - double fontBBox[4]; - double strokeWidth; - int charsetOffset; - int encodingOffset; - int charStringsOffset; - int privateSize; - int privateOffset; - - // CIDFont entries - int registrySID; - int orderingSID; - int supplement; - int fdArrayOffset; - int fdSelectOffset; -}; - -#define type1CMaxBlueValues 14 -#define type1CMaxOtherBlues 10 -#define type1CMaxStemSnap 12 - -struct Type1CPrivateDict { - double fontMatrix[6]; - GBool hasFontMatrix; - int blueValues[type1CMaxBlueValues]; - int nBlueValues; - int otherBlues[type1CMaxOtherBlues]; - int nOtherBlues; - int familyBlues[type1CMaxBlueValues]; - int nFamilyBlues; - int familyOtherBlues[type1CMaxOtherBlues]; - int nFamilyOtherBlues; - double blueScale; - int blueShift; - int blueFuzz; - double stdHW; - GBool hasStdHW; - double stdVW; - GBool hasStdVW; - double stemSnapH[type1CMaxStemSnap]; - int nStemSnapH; - double stemSnapV[type1CMaxStemSnap]; - int nStemSnapV; - GBool forceBold; - GBool hasForceBold; - double forceBoldThreshold; - int languageGroup; - double expansionFactor; - int initialRandomSeed; - int subrsOffset; - double defaultWidthX; - GBool defaultWidthXFP; - double nominalWidthX; - GBool nominalWidthXFP; -}; - -struct Type1COp { - GBool isNum = gTrue; // true -> number, false -> operator - GBool isFP = gFalse; // true -> floating point number, false -> int - union { - double num = 0; // if num is true - int op; // if num is false - }; -}; - -struct Type1CEexecBuf { - FoFiOutputFunc outputFunc; - void *outputStream; - GBool ascii; // ASCII encoding? - Gushort r1; // eexec encryption key - int line; // number of eexec chars left on current line -}; - -//------------------------------------------------------------------------ -// FoFiType1C -//------------------------------------------------------------------------ - -class FoFiType1C: public FoFiBase { -public: - - // Create a FoFiType1C object from a memory buffer. - static FoFiType1C *make(char *fileA, int lenA); - - // Create a FoFiType1C object from a file on disk. - static FoFiType1C *load(char *fileName); - - virtual ~FoFiType1C(); - - // Return the font name. - char *getName(); - - // Return the encoding, as an array of 256 names (any of which may - // be NULL). This is only useful with 8-bit fonts. - char **getEncoding(); - - // Get the glyph names. - int getNumGlyphs() { return nGlyphs; } - GooString *getGlyphName(int gid); - - // Return the mapping from CIDs to GIDs, and return the number of - // CIDs in *<nCIDs>. This is only useful for CID fonts. - int *getCIDToGIDMap(int *nCIDs); - - // Return the font matrix as an array of six numbers. - void getFontMatrix(double *mat); - - // Convert to a Type 1 font, suitable for embedding in a PostScript - // file. This is only useful with 8-bit fonts. If <newEncoding> is - // not NULL, it will be used in place of the encoding in the Type 1C - // font. If <ascii> is true the eexec section will be hex-encoded, - // otherwise it will be left as binary data. If <psName> is non-NULL, - // it will be used as the PostScript font name. - void convertToType1(char *psName, const char **newEncoding, GBool ascii, - FoFiOutputFunc outputFunc, void *outputStream); - - // Convert to a Type 0 CIDFont, suitable for embedding in a - // PostScript file. <psName> will be used as the PostScript font - // name. There are three cases for the CID-to-GID mapping: - // (1) if <codeMap> is non-NULL, then it is the CID-to-GID mapping - // (2) if <codeMap> is NULL and this is a CID CFF font, then the - // font's internal CID-to-GID mapping is used - // (3) is <codeMap> is NULL and this is an 8-bit CFF font, then - // the identity CID-to-GID mapping is used - void convertToCIDType0(char *psName, int *codeMap, int nCodes, - FoFiOutputFunc outputFunc, void *outputStream); - - // Convert to a Type 0 (but non-CID) composite font, suitable for - // embedding in a PostScript file. <psName> will be used as the - // PostScript font name. There are three cases for the CID-to-GID - // mapping: - // (1) if <codeMap> is non-NULL, then it is the CID-to-GID mapping - // (2) if <codeMap> is NULL and this is a CID CFF font, then the - // font's internal CID-to-GID mapping is used - // (3) is <codeMap> is NULL and this is an 8-bit CFF font, then - // the identity CID-to-GID mapping is used - void convertToType0(char *psName, int *codeMap, int nCodes, - FoFiOutputFunc outputFunc, void *outputStream); - -private: - - FoFiType1C(char *fileA, int lenA, GBool freeFileDataA); - void eexecCvtGlyph(Type1CEexecBuf *eb, const char *glyphName, - int offset, int nBytes, - Type1CIndex *subrIdx, - Type1CPrivateDict *pDict); - void cvtGlyph(int offset, int nBytes, GooString *charBuf, - Type1CIndex *subrIdx, Type1CPrivateDict *pDict, - GBool top); - void cvtGlyphWidth(GBool useOp, GooString *charBuf, - Type1CPrivateDict *pDict); - void cvtNum(double x, GBool isFP, GooString *charBuf); - void eexecWrite(Type1CEexecBuf *eb, const char *s); - void eexecWriteCharstring(Type1CEexecBuf *eb, Guchar *s, int n); - void writePSString(char *s, FoFiOutputFunc outputFunc, void *outputStream); - GBool parse(); - void readTopDict(); - void readFD(int offset, int length, Type1CPrivateDict *pDict); - void readPrivateDict(int offset, int length, Type1CPrivateDict *pDict); - void readFDSelect(); - void buildEncoding(); - GBool readCharset(); - int getOp(int pos, GBool charstring, GBool *ok); - int getDeltaIntArray(int *arr, int maxLen); - int getDeltaFPArray(double *arr, int maxLen); - void getIndex(int pos, Type1CIndex *idx, GBool *ok); - void getIndexVal(Type1CIndex *idx, int i, Type1CIndexVal *val, GBool *ok); - char *getString(int sid, char *buf, GBool *ok); - - GooString *name; - char **encoding; - - Type1CIndex nameIdx; - Type1CIndex topDictIdx; - Type1CIndex stringIdx; - Type1CIndex gsubrIdx; - Type1CIndex charStringsIdx; - - Type1CTopDict topDict; - Type1CPrivateDict *privateDicts; - - int nGlyphs; - int nFDs; - Guchar *fdSelect; - Gushort *charset; - Gushort charsetLength; - int gsubrBias; - - GBool parsedOk; - - Type1COp ops[49]; // operands and operator - int nOps; // number of operands - int nHints; // number of hints for the current glyph - GBool firstOp; // true if we haven't hit the first op yet - GBool openPath; // true if there is an unclosed path -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/goo/FixedPoint.cc b/Build/source/libs/poppler/poppler-src/goo/FixedPoint.cc deleted file mode 100644 index b51446bfbc3..00000000000 --- a/Build/source/libs/poppler/poppler-src/goo/FixedPoint.cc +++ /dev/null @@ -1,149 +0,0 @@ -//======================================================================== -// -// FixedPoint.cc -// -// Fixed point type, with C++ operators. -// -// Copyright 2004 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2017 Adrian Johnson <ajohnson@redneon.com> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include <config.h> - -#ifdef USE_FIXEDPOINT - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include "FixedPoint.h" - -#define ln2 ((FixedPoint)0.69314718) - -#define ln2 ((FixedPoint)0.69314718) - -FixedPoint FixedPoint::sqrt(FixedPoint x) { - FixedPoint y0, y1, z; - - if (x.val <= 0) { - y1.val = 0; - } else { - y1.val = x.val == 1 ? 2 : x.val >> 1; - do { - y0.val = y1.val; - z = x / y0; - y1.val = (y0.val + z.val) >> 1; - } while (::abs(y0.val - y1.val) > 1); - } - return y1; -} - -FixedPoint FixedPoint::pow(FixedPoint x, FixedPoint y) { - FixedPoint t, t2, lnx0, lnx, z0, z; - int d, n, i; - - if (y.val <= 0) { - z.val = 0; - } else { - // y * ln(x) - t = (x - 1) / (x + 1); - t2 = t * t; - d = 1; - lnx = 0; - do { - lnx0 = lnx; - lnx += t / d; - t *= t2; - d += 2; - } while (::abs(lnx.val - lnx0.val) > 2); - lnx.val <<= 1; - t = y * lnx; - // exp(y * ln(x)) - n = floor(t / ln2); - t -= ln2 * n; - t2 = t; - d = 1; - i = 1; - z = 1; - do { - z0 = z; - z += t2 / d; - t2 *= t; - ++i; - d *= i; - } while (::abs(z.val - z0.val) > 2 && d < (1 << fixptShift)); - if (n >= 0) { - z.val <<= n; - } else if (n < 0) { - z.val >>= -n; - } - } - return z; -} - -int FixedPoint::mul(int x, int y) { - FixPtInt64 z; - - z = ((FixPtInt64)x * y) >> fixptShift; - if (z > 0x7fffffffLL) { - return 0x7fffffff; - } else if (z < -0x80000000LL) { - return 0x80000000; - } else { - return (int)z; - } -} - -int FixedPoint::div(int x, int y) { - FixPtInt64 z; - - z = ((FixPtInt64)x << fixptShift) / y; - if (z > 0x7fffffffLL) { - return 0x7fffffff; - } else if (z < -0x80000000LL) { - return 0x80000000; - } else { - return (int)z; - } -} - -GBool FixedPoint::divCheck(FixedPoint x, FixedPoint y, FixedPoint *result) { - FixPtInt64 z; - - z = ((FixPtInt64)x.val << fixptShift) / y.val; - if ((z == 0 && x != 0) || - z >= ((FixPtInt64)1 << 31) || z < -((FixPtInt64)1 << 31)) { - return gFalse; - } - result->val = z; - return gTrue; -} - -GBool FixedPoint::checkDet(FixedPoint m11, FixedPoint m12, - FixedPoint m21, FixedPoint m22, - FixedPoint epsilon) { - FixPtInt64 det, e; - - det = (FixPtInt64)m11.val * (FixPtInt64)m22.val - - (FixPtInt64)m12.val * (FixPtInt64)m21.val; - e = (FixPtInt64)epsilon.val << fixptShift; - // NB: this comparison has to be >= not > because epsilon can be - // truncated to zero as a fixed point value. - return det >= e || det <= -e; -} - -#endif // USE_FIXEDPOINT diff --git a/Build/source/libs/poppler/poppler-src/goo/FixedPoint.h b/Build/source/libs/poppler/poppler-src/goo/FixedPoint.h deleted file mode 100644 index 408dfc6f483..00000000000 --- a/Build/source/libs/poppler/poppler-src/goo/FixedPoint.h +++ /dev/null @@ -1,181 +0,0 @@ -//======================================================================== -// -// FixedPoint.h -// -// Fixed point type, with C++ operators. -// -// Copyright 2004 Glyph & Cog, LLC -// -//======================================================================== - - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2017 Adrian Johnson <ajohnson@redneon.com> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef FIXEDPOINT_H -#define FIXEDPOINT_H - -#include "poppler-config.h" - -#ifdef USE_FIXEDPOINT - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include <stdio.h> -#include <stdlib.h> -#include "gtypes.h" - -#define fixptShift 16 -#define fixptMaskL ((1 << fixptShift) - 1) -#define fixptMaskH (~fixptMaskL) - -typedef long long FixPtInt64; - -class FixedPoint { -public: - - FixedPoint() { val = 0; } - FixedPoint(const FixedPoint &x) { val = x.val; } - FixedPoint(double x) { val = (int)(x * (1 << fixptShift) + 0.5); } - FixedPoint(int x) { val = x << fixptShift; } - FixedPoint(long x) { val = x << fixptShift; } - - operator float() - { return (float) val * ((float)1 / (float)(1 << fixptShift)); } - operator double() - { return (double) val * (1.0 / (double)(1 << fixptShift)); } - operator int() - { return val >> fixptShift; } - - int get16Dot16() { return val; } - - FixedPoint operator =(FixedPoint x) { val = x.val; return *this; } - - int operator ==(FixedPoint x) { return val == x.val; } - int operator ==(double x) { return *this == (FixedPoint)x; } - int operator ==(int x) { return *this == (FixedPoint)x; } - int operator ==(long x) { return *this == (FixedPoint)x; } - - int operator !=(FixedPoint x) { return val != x.val; } - int operator !=(double x) { return *this != (FixedPoint)x; } - int operator !=(int x) { return *this != (FixedPoint)x; } - int operator !=(long x) { return *this != (FixedPoint)x; } - - int operator <(FixedPoint x) { return val < x.val; } - int operator <(double x) { return *this < (FixedPoint)x; } - int operator <(int x) { return *this < (FixedPoint)x; } - int operator <(long x) { return *this < (FixedPoint)x; } - - int operator <=(FixedPoint x) { return val <= x.val; } - int operator <=(double x) { return *this <= (FixedPoint)x; } - int operator <=(int x) { return *this <= (FixedPoint)x; } - int operator <=(long x) { return *this <= (FixedPoint)x; } - - int operator >(FixedPoint x) { return val > x.val; } - int operator >(double x) { return *this > (FixedPoint)x; } - int operator >(int x) { return *this > (FixedPoint)x; } - int operator >(long x) { return *this > (FixedPoint)x; } - - int operator >=(FixedPoint x) { return val >= x.val; } - int operator >=(double x) { return *this >= (FixedPoint)x; } - int operator >=(int x) { return *this >= (FixedPoint)x; } - int operator >=(long x) { return *this >= (FixedPoint)x; } - - FixedPoint operator -() { return make(-val); } - - FixedPoint operator +(FixedPoint x) { return make(val + x.val); } - FixedPoint operator +(double x) { return *this + (FixedPoint)x; } - FixedPoint operator +(int x) { return *this + (FixedPoint)x; } - FixedPoint operator +(long x) { return *this + (FixedPoint)x; } - - FixedPoint operator +=(FixedPoint x) { val = val + x.val; return *this; } - FixedPoint operator +=(double x) { return *this += (FixedPoint)x; } - FixedPoint operator +=(int x) { return *this += (FixedPoint)x; } - FixedPoint operator +=(long x) { return *this += (FixedPoint)x; } - - FixedPoint operator -(FixedPoint x) { return make(val - x.val); } - FixedPoint operator -(double x) { return *this - (FixedPoint)x; } - FixedPoint operator -(int x) { return *this - (FixedPoint)x; } - FixedPoint operator -(long x) { return *this - (FixedPoint)x; } - - FixedPoint operator -=(FixedPoint x) { val = val - x.val; return *this; } - FixedPoint operator -=(double x) { return *this -= (FixedPoint)x; } - FixedPoint operator -=(int x) { return *this -= (FixedPoint)x; } - FixedPoint operator -=(long x) { return *this -= (FixedPoint)x; } - - FixedPoint operator *(FixedPoint x) { return make(mul(val, x.val)); } - FixedPoint operator *(double x) { return *this * (FixedPoint)x; } - FixedPoint operator *(int x) { return *this * (FixedPoint)x; } - FixedPoint operator *(long x) { return *this * (FixedPoint)x; } - - FixedPoint operator *=(FixedPoint x) { val = mul(val, x.val); return *this; } - FixedPoint operator *=(double x) { return *this *= (FixedPoint)x; } - FixedPoint operator *=(int x) { return *this *= (FixedPoint)x; } - FixedPoint operator *=(long x) { return *this *= (FixedPoint)x; } - - FixedPoint operator /(FixedPoint x) { return make(div(val, x.val)); } - FixedPoint operator /(double x) { return *this / (FixedPoint)x; } - FixedPoint operator /(int x) { return *this / (FixedPoint)x; } - FixedPoint operator /(long x) { return *this / (FixedPoint)x; } - - FixedPoint operator /=(FixedPoint x) { val = div(val, x.val); return *this; } - FixedPoint operator /=(double x) { return *this /= (FixedPoint)x; } - FixedPoint operator /=(int x) { return *this /= (FixedPoint)x; } - FixedPoint operator /=(long x) { return *this /= (FixedPoint)x; } - - static FixedPoint abs(FixedPoint x) { return make(::abs(x.val)); } - - static int floor(FixedPoint x) { return x.val >> fixptShift; } - - static int ceil(FixedPoint x) - { return (x.val & fixptMaskL) ? ((x.val >> fixptShift) + 1) - : (x.val >> fixptShift); } - - static int round(FixedPoint x) - { return (x.val + (1 << (fixptShift - 1))) >> fixptShift; } - - // Computes (x+y)/2 avoiding overflow and LSbit accuracy issues. - static FixedPoint avg(FixedPoint x, FixedPoint y) - { return make((x.val >> 1) + (y.val >> 1) + ((x.val | y.val) & 1)); } - - - static FixedPoint sqrt(FixedPoint x); - - static FixedPoint pow(FixedPoint x, FixedPoint y); - - // Compute *result = x/y; return false if there is an underflow or - // overflow. - static GBool divCheck(FixedPoint x, FixedPoint y, FixedPoint *result); - - // Compute abs(m11*m22 - m12*m21) >= epsilon, handling the case - // where the multiplications overflow. - static GBool checkDet(FixedPoint m11, FixedPoint m12, - FixedPoint m21, FixedPoint m22, - FixedPoint epsilon); - -private: - - static FixedPoint make(int valA) { FixedPoint x; x.val = valA; return x; } - - static int mul(int x, int y); - static int div(int x, int y); - - int val; // fixed point: (n-fixptShift).(fixptShift) -}; - -#endif // USE_FIXEDPOINT - -#endif diff --git a/Build/source/libs/poppler/poppler-src/goo/GooLikely.h b/Build/source/libs/poppler/poppler-src/goo/GooLikely.h deleted file mode 100644 index 724ccf00870..00000000000 --- a/Build/source/libs/poppler/poppler-src/goo/GooLikely.h +++ /dev/null @@ -1,22 +0,0 @@ -//======================================================================== -// -// GooLikely.h -// -// This file is licensed under the GPLv2 or later -// -// Copyright (C) 2008 Kees Cook <kees@outflux.net> -// -//======================================================================== - -#ifndef GOOLIKELY_H -#define GOOLIKELY_H - -#if defined(__GNUC__) && (__GNUC__ > 2) && defined(__OPTIMIZE__) -# define likely(x) __builtin_expect((x), 1) -# define unlikely(x) __builtin_expect((x), 0) -#else -# define likely(x) (x) -# define unlikely(x) (x) -#endif - -#endif diff --git a/Build/source/libs/poppler/poppler-src/goo/GooList.cc b/Build/source/libs/poppler/poppler-src/goo/GooList.cc deleted file mode 100644 index e0e4875bad9..00000000000 --- a/Build/source/libs/poppler/poppler-src/goo/GooList.cc +++ /dev/null @@ -1,136 +0,0 @@ -//======================================================================== -// -// GooList.cc -// -// Copyright 2001-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2018 Albert Astals Cid <aacid@kde.org> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include <config.h> - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include <stdlib.h> -#include <string.h> -#include "gmem.h" -#include "GooList.h" - -//------------------------------------------------------------------------ -// GooList -//------------------------------------------------------------------------ - -GooList::GooList() { - size = 8; - data = (void **)gmallocn(size, sizeof(void*)); - length = 0; - inc = 0; -} - -GooList::GooList(int sizeA) { - size = sizeA ? sizeA : 8; - data = (void **)gmallocn(size, sizeof(void*)); - length = 0; - inc = 0; -} - -GooList::~GooList() { - gfree(data); -} - -GooList *GooList::copy() const { - GooList *ret; - - ret = new GooList(length); - ret->length = length; - memcpy(ret->data, data, length * sizeof(void *)); - ret->inc = inc; - return ret; -} - -void GooList::append(void *p) { - if (length >= size) { - expand(); - } - data[length++] = p; -} - -void GooList::append(GooList *list) { - int i; - - while (length + list->length > size) { - expand(); - } - for (i = 0; i < list->length; ++i) { - data[length++] = list->data[i]; - } -} - -void GooList::insert(int i, void *p) { - if (length >= size) { - expand(); - } - if (i < 0) { - i = 0; - } - if (i < length) { - memmove(data+i+1, data+i, (length - i) * sizeof(void *)); - } - data[i] = p; - ++length; -} - -void *GooList::del(int i) { - void *p; - - p = data[i]; - if (i < length - 1) { - memmove(data+i, data+i+1, (length - i - 1) * sizeof(void *)); - } - --length; - if (size - length >= ((inc > 0) ? inc : size/2)) { - shrink(); - } - return p; -} - -void GooList::sort(int (*cmp)(const void *obj1, const void *obj2)) { - qsort(data, length, sizeof(void *), cmp); -} - -void GooList::reverse() { - void *t; - int n, i; - - n = length / 2; - for (i = 0; i < n; ++i) { - t = data[i]; - data[i] = data[length - 1 - i]; - data[length - 1 - i] = t; - } -} - -void GooList::expand() { - size += (inc > 0) ? inc : size; - data = (void **)greallocn(data, size, sizeof(void*)); -} - -void GooList::shrink() { - size -= (inc > 0) ? inc : size/2; - data = (void **)greallocn(data, size, sizeof(void*)); -} diff --git a/Build/source/libs/poppler/poppler-src/goo/GooList.h b/Build/source/libs/poppler/poppler-src/goo/GooList.h deleted file mode 100644 index a0bc525d8da..00000000000 --- a/Build/source/libs/poppler/poppler-src/goo/GooList.h +++ /dev/null @@ -1,120 +0,0 @@ -//======================================================================== -// -// GooList.h -// -// Copyright 2001-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2012, 2018 Albert Astals Cid <aacid@kde.org> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef GLIST_H -#define GLIST_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "gtypes.h" - -//------------------------------------------------------------------------ -// GooList -//------------------------------------------------------------------------ - -class GooList { -public: - - // Create an empty list. - GooList(); - - // Create an empty list with space for <size1> elements. - GooList(int sizeA); - - // Destructor - does not free pointed-to objects. - ~GooList(); - - //----- general - - // Get the number of elements. - int getLength() const { return length; } - - // Returns a (shallow) copy of this list. - GooList *copy() const; - - //----- ordered list support - - // Return the <i>th element. - // Assumes 0 <= i < length. - void *get(int i) const { return data[i]; } - - // Replace the <i>th element. - // Assumes 0 <= i < length. - void put(int i, void *p) { data[i] = p; } - - // Append an element to the end of the list. - void append(void *p); - - // Append another list to the end of this one. - void append(GooList *list); - - // Insert an element at index <i>. - // Assumes 0 <= i <= length. - void insert(int i, void *p); - - // Deletes and returns the element at index <i>. - // Assumes 0 <= i < length. - void *del(int i); - - // Sort the list accoring to the given comparison function. - // NB: this sorts an array of pointers, so the pointer args need to - // be double-dereferenced. - void sort(int (*cmp)(const void *ptr1, const void *ptr2)); - - // Reverse the list. - void reverse(); - - //----- control - - // Set allocation increment to <inc>. If inc > 0, that many - // elements will be allocated every time the list is expanded. - // If inc <= 0, the list will be doubled in size. - void setAllocIncr(int incA) { inc = incA; } - -private: - GooList(const GooList &other); - GooList& operator=(const GooList &other); - - void expand(); - void shrink(); - - void **data; // the list elements - int size; // size of data array - int length; // number of elements on list - int inc; // allocation increment -}; - -#define deleteGooList(list, T) \ - do { \ - GooList *_list = (list); \ - { \ - int _i; \ - for (_i = 0; _i < _list->getLength(); ++_i) { \ - delete (T*)_list->get(_i); \ - } \ - delete _list; \ - } \ - } while (0) - -#endif diff --git a/Build/source/libs/poppler/poppler-src/goo/GooMutex.h b/Build/source/libs/poppler/poppler-src/goo/GooMutex.h deleted file mode 100644 index ed0758fa67a..00000000000 --- a/Build/source/libs/poppler/poppler-src/goo/GooMutex.h +++ /dev/null @@ -1,93 +0,0 @@ -//======================================================================== -// -// GooMutex.h -// -// Portable mutex macros. -// -// Copyright 2002-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2009 Kovid Goyal <kovid@kovidgoyal.net> -// Copyright (C) 2013 Thomas Freitag <Thomas.Freitag@alfa.de> -// Copyright (C) 2013, 2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2013 Adam Reichold <adamreichold@myopera.com> -// Copyright (C) 2014 Bogdan Cristea <cristeab@gmail.com> -// Copyright (C) 2014 Peter Breitenlohner <peb@mppmu.mpg.de> -// Copyright (C) 2017 Adrian Johnson <ajohnson@redneon.com> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef GMUTEX_H -#define GMUTEX_H - -#ifdef MULTITHREADED - -// Usage: -// -// GooMutex m; -// gInitMutex(&m); -// ... -// gLockMutex(&m); -// ... critical section ... -// gUnlockMutex(&m); -// ... -// gDestroyMutex(&m); - -#ifdef _WIN32 -#ifndef NOMINMAX -#define NOMINMAX -#endif -#include <windows.h> - -typedef CRITICAL_SECTION GooMutex; - -#define gInitMutex(m) InitializeCriticalSection(m) -#define gDestroyMutex(m) DeleteCriticalSection(m) -#define gLockMutex(m) EnterCriticalSection(m) -#define gUnlockMutex(m) LeaveCriticalSection(m) - -#else // assume pthreads - -#include <pthread.h> - -typedef pthread_mutex_t GooMutex; - -inline void gInitMutex(GooMutex *m) { - pthread_mutexattr_t mutexattr; - pthread_mutexattr_init(&mutexattr); - pthread_mutexattr_settype(&mutexattr, PTHREAD_MUTEX_RECURSIVE); - pthread_mutex_init(m, &mutexattr); - pthread_mutexattr_destroy(&mutexattr); -} -#define gDestroyMutex(m) pthread_mutex_destroy(m) -#define gLockMutex(m) pthread_mutex_lock(m) -#define gUnlockMutex(m) pthread_mutex_unlock(m) - -#endif - -class MutexLocker { -public: - MutexLocker(GooMutex *mutexA) : mutex(mutexA) { gLockMutex(mutex); } - ~MutexLocker() { gUnlockMutex(mutex); } - - MutexLocker(const MutexLocker &) = delete; - MutexLocker& operator=(const MutexLocker &other) = delete; - -private: - GooMutex *mutex; -}; - -#endif // MULTITHREADED - -#endif // GMUTEX_H diff --git a/Build/source/libs/poppler/poppler-src/goo/GooString.cc b/Build/source/libs/poppler/poppler-src/goo/GooString.cc deleted file mode 100644 index 0cf32a3a6d7..00000000000 --- a/Build/source/libs/poppler/poppler-src/goo/GooString.cc +++ /dev/null @@ -1,925 +0,0 @@ -//======================================================================== -// -// GooString.cc -// -// Simple variable-length string type. -// -// Copyright 1996-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2006 Kristian Høgsberg <krh@redhat.com> -// Copyright (C) 2006 Krzysztof Kowalczyk <kkowalczyk@gmail.com> -// Copyright (C) 2007 Jeff Muizelaar <jeff@infidigm.net> -// Copyright (C) 2008-2011, 2016, 2017 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2011 Kenji Uno <ku@digitaldolphins.jp> -// Copyright (C) 2012, 2013 Fabio D'Urso <fabiodurso@hotmail.it> -// Copyright (C) 2012, 2017 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2012 Pino Toscano <pino@kde.org> -// Copyright (C) 2013 Jason Crain <jason@aquaticape.us> -// Copyright (C) 2015 William Bader <williambader@hotmail.com> -// Copyright (C) 2016 Jakub Alba <jakubalba@gmail.com> -// 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 -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include <config.h> - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include <stdlib.h> -#include <stddef.h> -#include <string.h> -#include <ctype.h> -#include <assert.h> -#include <math.h> -#include "gmem.h" -#include "GooString.h" - -static const int MAXIMUM_DOUBLE_PREC = 16; - -//------------------------------------------------------------------------ - -union GooStringFormatArg { - int i; - Guint ui; - long l; - Gulong ul; - long long ll; - unsigned long long ull; - double f; - char c; - char *s; - GooString *gs; -}; - -enum GooStringFormatType { - fmtIntDecimal, - fmtIntHex, - fmtIntHexUpper, - fmtIntOctal, - fmtIntBinary, - fmtUIntDecimal, - fmtUIntHex, - fmtUIntHexUpper, - fmtUIntOctal, - fmtUIntBinary, - fmtLongDecimal, - fmtLongHex, - fmtLongHexUpper, - fmtLongOctal, - fmtLongBinary, - fmtULongDecimal, - fmtULongHex, - fmtULongHexUpper, - fmtULongOctal, - fmtULongBinary, - fmtLongLongDecimal, - fmtLongLongHex, - fmtLongLongHexUpper, - fmtLongLongOctal, - fmtLongLongBinary, - fmtULongLongDecimal, - fmtULongLongHex, - fmtULongLongHexUpper, - fmtULongLongOctal, - fmtULongLongBinary, - fmtDouble, - fmtDoubleTrimSmallAware, - fmtDoubleTrim, - fmtChar, - fmtString, - fmtGooString, - fmtSpace -}; - -static const char *formatStrings[] = { - "d", "x", "X", "o", "b", "ud", "ux", "uX", "uo", "ub", - "ld", "lx", "lX", "lo", "lb", "uld", "ulx", "ulX", "ulo", "ulb", - "lld", "llx", "llX", "llo", "llb", - "ulld", "ullx", "ullX", "ullo", "ullb", - "f", "gs", "g", - "c", - "s", - "t", - "w", - nullptr -}; - -//------------------------------------------------------------------------ - -int inline GooString::roundedSize(int len) { - int delta; - if (len <= STR_STATIC_SIZE-1) - return STR_STATIC_SIZE; - delta = len < 256 ? 7 : 255; - return ((len + 1) + delta) & ~delta; -} - -// Make sure that the buffer is big enough to contain <newLength> characters -// plus terminating 0. -// We assume that if this is being called from the constructor, <s> was set -// to NULL and <length> was set to 0 to indicate unused string before calling us. -void inline GooString::resize(int newLength) { - char *s1 = s; - - if (!s || (roundedSize(length) != roundedSize(newLength))) { - // requires re-allocating data for string - if (newLength < STR_STATIC_SIZE) { - s1 = sStatic; - } else { - // allocate a rounded amount - if (s == sStatic) - s1 = (char*)gmalloc(roundedSize(newLength)); - else - s1 = (char*)grealloc(s, roundedSize(newLength)); - } - if (s == sStatic || s1 == sStatic) { - // copy the minimum, we only need to if are moving to or - // from sStatic. - // assert(s != s1) the roundedSize condition ensures this - if (newLength < length) { - memcpy(s1, s, newLength); - } else if (length > 0) { - memcpy(s1, s, length); - } - if (s != sStatic) - gfree(s); - } - - } - - s = s1; - length = newLength; - s[length] = '\0'; -} - -GooString* GooString::Set(const char *newStr, int newLen) -{ - if (!newStr) { - clear(); - return this; - } - - if (newLen == CALC_STRING_LEN) { - newLen = strlen(newStr); - } else { - assert(newLen >= 0); - } - - resize(newLen); - memmove(s, newStr, newLen); - - return this; -} - -GooString::GooString() { - s = nullptr; - length = 0; - Set(nullptr); - -#if __cplusplus >= 201103L - static_assert(sizeof(GooString) == GooString::STR_FINAL_SIZE, "You should check memory alignment or STR_STATIC_SIZE calculation."); -#endif -} - -GooString::GooString(const char *sA) { - s = nullptr; - length = 0; - Set(sA, CALC_STRING_LEN); -} - -GooString::GooString(const char *sA, int lengthA) { - s = nullptr; - length = 0; - Set(sA, lengthA); -} - -GooString::GooString(const GooString *str, int idx, int lengthA) { - s = nullptr; - length = 0; - assert(idx + lengthA <= str->length); - Set(str->getCString() + idx, lengthA); -} - -GooString::GooString(const GooString *str) { - s = nullptr; - length = 0; - Set(str->getCString(), str->length); -} - -GooString::GooString(GooString *str1, GooString *str2) { - s = nullptr; - length = 0; - resize(str1->length + str2->length); - memcpy(s, str1->getCString(), str1->length); - memcpy(s + str1->length, str2->getCString(), str2->length); -} - -GooString *GooString::fromInt(int x) { - char buf[24]; // enough space for 64-bit ints plus a little extra - char *p; - int len; - formatInt(x, buf, sizeof(buf), gFalse, 0, 10, &p, &len); - return new GooString(p, len); -} - -GooString *GooString::format(const char *fmt, ...) { - va_list argList; - GooString *s; - - s = new GooString(); - va_start(argList, fmt); - s->appendfv(fmt, argList); - va_end(argList); - return s; -} - -GooString *GooString::formatv(const char *fmt, va_list argList) { - GooString *s; - - s = new GooString(); - s->appendfv(fmt, argList); - return s; -} - -GooString::~GooString() { - if (s != sStatic) - gfree(s); -} - -GooString *GooString::clear() { - resize(0); - return this; -} - -GooString *GooString::append(char c) { - return append((const char*)&c, 1); -} - -GooString *GooString::append(const GooString *str) { - return append(str->getCString(), str->getLength()); -} - -GooString *GooString::append(const char *str, int lengthA) { - int prevLen = length; - if (CALC_STRING_LEN == lengthA) - lengthA = strlen(str); - resize(length + lengthA); - memcpy(s + prevLen, str, lengthA); - return this; -} - -GooString *GooString::appendf(const char *fmt, ...) { - va_list argList; - - va_start(argList, fmt); - appendfv(fmt, argList); - va_end(argList); - return this; -} - -GooString *GooString::appendfv(const char *fmt, va_list argList) { - GooStringFormatArg *args; - int argsLen, argsSize; - GooStringFormatArg arg; - int idx, width, prec; - GBool reverseAlign, zeroFill; - GooStringFormatType ft; - char buf[65]; - int len, i; - const char *p0, *p1; - char *str; - GooStringFormatArg argsBuf[ 8 ]; - - argsLen = 0; - argsSize = sizeof(argsBuf) / sizeof(argsBuf[0]); - args = argsBuf; - - p0 = fmt; - while (*p0) { - if (*p0 == '{') { - ++p0; - if (*p0 == '{') { - ++p0; - append('{'); - } else { - - // parse the format string - if (!(*p0 >= '0' && *p0 <= '9')) { - break; - } - idx = *p0 - '0'; - for (++p0; *p0 >= '0' && *p0 <= '9'; ++p0) { - idx = 10 * idx + (*p0 - '0'); - } - if (*p0 != ':') { - break; - } - ++p0; - if (*p0 == '-') { - reverseAlign = gTrue; - ++p0; - } else { - reverseAlign = gFalse; - } - width = 0; - zeroFill = *p0 == '0'; - for (; *p0 >= '0' && *p0 <= '9'; ++p0) { - width = 10 * width + (*p0 - '0'); - } - if (width < 0) { - width = 0; - } - if (*p0 == '.') { - ++p0; - prec = 0; - for (; *p0 >= '0' && *p0 <= '9'; ++p0) { - prec = 10 * prec + (*p0 - '0'); - } - } else { - prec = 0; - } - for (ft = (GooStringFormatType)0; - formatStrings[ft]; - ft = (GooStringFormatType)(ft + 1)) { - if (!strncmp(p0, formatStrings[ft], strlen(formatStrings[ft]))) { - break; - } - } - if (!formatStrings[ft]) { - break; - } - p0 += strlen(formatStrings[ft]); - if (*p0 != '}') { - break; - } - ++p0; - - // fetch the argument - if (idx > argsLen) { - break; - } - if (idx == argsLen) { - if (argsLen == argsSize) { - argsSize *= 2; - if (args == argsBuf) { - args = (GooStringFormatArg *)gmallocn(argsSize, sizeof(GooStringFormatArg)); - memcpy(args, argsBuf, argsLen * sizeof(GooStringFormatArg)); - } else { - args = (GooStringFormatArg *)greallocn(args, argsSize, - sizeof(GooStringFormatArg)); - } - } - switch (ft) { - case fmtIntDecimal: - case fmtIntHex: - case fmtIntHexUpper: - case fmtIntOctal: - case fmtIntBinary: - case fmtSpace: - args[argsLen].i = va_arg(argList, int); - break; - case fmtUIntDecimal: - case fmtUIntHex: - case fmtUIntHexUpper: - case fmtUIntOctal: - case fmtUIntBinary: - args[argsLen].ui = va_arg(argList, Guint); - break; - case fmtLongDecimal: - case fmtLongHex: - case fmtLongHexUpper: - case fmtLongOctal: - case fmtLongBinary: - args[argsLen].l = va_arg(argList, long); - break; - case fmtULongDecimal: - case fmtULongHex: - case fmtULongHexUpper: - case fmtULongOctal: - case fmtULongBinary: - args[argsLen].ul = va_arg(argList, Gulong); - break; - case fmtLongLongDecimal: - case fmtLongLongHex: - case fmtLongLongHexUpper: - case fmtLongLongOctal: - case fmtLongLongBinary: - args[argsLen].ll = va_arg(argList, long long); - break; - case fmtULongLongDecimal: - case fmtULongLongHex: - case fmtULongLongHexUpper: - case fmtULongLongOctal: - case fmtULongLongBinary: - args[argsLen].ull = va_arg(argList, unsigned long long); - break; - case fmtDouble: - case fmtDoubleTrim: - case fmtDoubleTrimSmallAware: - args[argsLen].f = va_arg(argList, double); - break; - case fmtChar: - args[argsLen].c = (char)va_arg(argList, int); - break; - case fmtString: - args[argsLen].s = va_arg(argList, char *); - break; - case fmtGooString: - args[argsLen].gs = va_arg(argList, GooString *); - break; - } - ++argsLen; - } - - // format the argument - arg = args[idx]; - switch (ft) { - case fmtIntDecimal: - formatInt(arg.i, buf, sizeof(buf), zeroFill, width, 10, &str, &len); - break; - case fmtIntHex: - formatInt(arg.i, buf, sizeof(buf), zeroFill, width, 16, &str, &len); - break; - case fmtIntHexUpper: - formatInt(arg.i, buf, sizeof(buf), zeroFill, width, 16, &str, &len, - gTrue); - break; - case fmtIntOctal: - formatInt(arg.i, buf, sizeof(buf), zeroFill, width, 8, &str, &len); - break; - case fmtIntBinary: - formatInt(arg.i, buf, sizeof(buf), zeroFill, width, 2, &str, &len); - break; - case fmtUIntDecimal: - formatUInt(arg.ui, buf, sizeof(buf), zeroFill, width, 10, - &str, &len); - break; - case fmtUIntHex: - formatUInt(arg.ui, buf, sizeof(buf), zeroFill, width, 16, - &str, &len); - break; - case fmtUIntHexUpper: - formatUInt(arg.ui, buf, sizeof(buf), zeroFill, width, 16, - &str, &len, gTrue); - break; - case fmtUIntOctal: - formatUInt(arg.ui, buf, sizeof(buf), zeroFill, width, 8, &str, &len); - break; - case fmtUIntBinary: - formatUInt(arg.ui, buf, sizeof(buf), zeroFill, width, 2, &str, &len); - break; - case fmtLongDecimal: - formatInt(arg.l, buf, sizeof(buf), zeroFill, width, 10, &str, &len); - break; - case fmtLongHex: - formatInt(arg.l, buf, sizeof(buf), zeroFill, width, 16, &str, &len); - break; - case fmtLongHexUpper: - formatInt(arg.l, buf, sizeof(buf), zeroFill, width, 16, &str, &len, - gTrue); - break; - case fmtLongOctal: - formatInt(arg.l, buf, sizeof(buf), zeroFill, width, 8, &str, &len); - break; - case fmtLongBinary: - formatInt(arg.l, buf, sizeof(buf), zeroFill, width, 2, &str, &len); - break; - case fmtULongDecimal: - formatUInt(arg.ul, buf, sizeof(buf), zeroFill, width, 10, - &str, &len); - break; - case fmtULongHex: - formatUInt(arg.ul, buf, sizeof(buf), zeroFill, width, 16, - &str, &len); - break; - case fmtULongHexUpper: - formatUInt(arg.ul, buf, sizeof(buf), zeroFill, width, 16, - &str, &len, gTrue); - break; - case fmtULongOctal: - formatUInt(arg.ul, buf, sizeof(buf), zeroFill, width, 8, &str, &len); - break; - case fmtULongBinary: - formatUInt(arg.ul, buf, sizeof(buf), zeroFill, width, 2, &str, &len); - break; - case fmtLongLongDecimal: - formatInt(arg.ll, buf, sizeof(buf), zeroFill, width, 10, &str, &len); - break; - case fmtLongLongHex: - formatInt(arg.ll, buf, sizeof(buf), zeroFill, width, 16, &str, &len); - break; - case fmtLongLongHexUpper: - formatInt(arg.ll, buf, sizeof(buf), zeroFill, width, 16, &str, &len, - gTrue); - break; - case fmtLongLongOctal: - formatInt(arg.ll, buf, sizeof(buf), zeroFill, width, 8, &str, &len); - break; - case fmtLongLongBinary: - formatInt(arg.ll, buf, sizeof(buf), zeroFill, width, 2, &str, &len); - break; - case fmtULongLongDecimal: - formatUInt(arg.ull, buf, sizeof(buf), zeroFill, width, 10, - &str, &len); - break; - case fmtULongLongHex: - formatUInt(arg.ull, buf, sizeof(buf), zeroFill, width, 16, - &str, &len); - break; - case fmtULongLongHexUpper: - formatUInt(arg.ull, buf, sizeof(buf), zeroFill, width, 16, - &str, &len, gTrue); - break; - case fmtULongLongOctal: - formatUInt(arg.ull, buf, sizeof(buf), zeroFill, width, 8, - &str, &len); - break; - case fmtULongLongBinary: - formatUInt(arg.ull, buf, sizeof(buf), zeroFill, width, 2, - &str, &len); - break; - case fmtDouble: - formatDouble(arg.f, buf, sizeof(buf), prec, gFalse, &str, &len); - break; - case fmtDoubleTrim: - formatDouble(arg.f, buf, sizeof(buf), prec, gTrue, &str, &len); - break; - case fmtDoubleTrimSmallAware: - formatDoubleSmallAware(arg.f, buf, sizeof(buf), prec, gTrue, &str, &len); - break; - case fmtChar: - buf[0] = arg.c; - str = buf; - len = 1; - reverseAlign = !reverseAlign; - break; - case fmtString: - str = arg.s; - len = strlen(str); - reverseAlign = !reverseAlign; - break; - case fmtGooString: - str = arg.gs->getCString(); - len = arg.gs->getLength(); - reverseAlign = !reverseAlign; - break; - case fmtSpace: - str = buf; - len = 0; - width = arg.i; - break; - } - - // append the formatted arg, handling width and alignment - if (!reverseAlign && len < width) { - for (i = len; i < width; ++i) { - append(' '); - } - } - append(str, len); - if (reverseAlign && len < width) { - for (i = len; i < width; ++i) { - append(' '); - } - } - } - - } else if (*p0 == '}') { - ++p0; - if (*p0 == '}') { - ++p0; - } - append('}'); - - } else { - for (p1 = p0 + 1; *p1 && *p1 != '{' && *p1 != '}'; ++p1) ; - append(p0, p1 - p0); - p0 = p1; - } - } - - if (args != argsBuf) { - gfree(args); - } - - return this; -} - -static const char lowerCaseDigits[17] = "0123456789abcdef"; -static const char upperCaseDigits[17] = "0123456789ABCDEF"; - -void GooString::formatInt(long long x, char *buf, int bufSize, - GBool zeroFill, int width, int base, - char **p, int *len, GBool upperCase) { - const char *vals = upperCase ? upperCaseDigits : lowerCaseDigits; - GBool neg; - int start, i, j; - unsigned long long abs_x; - - i = bufSize; - if ((neg = x < 0)) { - abs_x = -x; - } else { - abs_x = x; - } - start = neg ? 1 : 0; - if (abs_x == 0) { - buf[--i] = '0'; - } else { - while (i > start && abs_x) { - buf[--i] = vals[abs_x % base]; - abs_x /= base; - } - } - if (zeroFill) { - for (j = bufSize - i; i > start && j < width - start; ++j) { - buf[--i] = '0'; - } - } - if (neg) { - buf[--i] = '-'; - } - *p = buf + i; - *len = bufSize - i; -} - -void GooString::formatUInt(unsigned long long x, char *buf, int bufSize, - GBool zeroFill, int width, int base, - char **p, int *len, GBool upperCase) { - const char *vals = upperCase ? upperCaseDigits : lowerCaseDigits; - int i, j; - - i = bufSize; - if (x == 0) { - buf[--i] = '0'; - } else { - while (i > 0 && x) { - buf[--i] = vals[x % base]; - x /= base; - } - } - if (zeroFill) { - for (j = bufSize - i; i > 0 && j < width; ++j) { - buf[--i] = '0'; - } - } - *p = buf + i; - *len = bufSize - i; -} - -void GooString::formatDouble(double x, char *buf, int bufSize, int prec, - GBool trim, char **p, int *len) { - GBool neg, started; - double x2; - int d, i, j; - - if ((neg = x < 0)) { - x = -x; - } - x = floor(x * pow(10.0, prec) + 0.5); - i = bufSize; - started = !trim; - for (j = 0; j < prec && i > 1; ++j) { - x2 = floor(0.1 * (x + 0.5)); - d = (int)floor(x - 10 * x2 + 0.5); - if (started || d != 0) { - buf[--i] = '0' + d; - started = gTrue; - } - x = x2; - } - if (i > 1 && started) { - buf[--i] = '.'; - } - if (i > 1) { - do { - x2 = floor(0.1 * (x + 0.5)); - d = (int)floor(x - 10 * x2 + 0.5); - buf[--i] = '0' + d; - x = x2; - } while (i > 1 && x); - } - if (neg) { - buf[--i] = '-'; - } - *p = buf + i; - *len = bufSize - i; -} - -void GooString::formatDoubleSmallAware(double x, char *buf, int bufSize, int prec, - GBool trim, char **p, int *len) -{ - double absX = fabs(x); - if (absX >= 0.1) { - formatDouble(x, buf, bufSize, prec, trim, p, len); - } else { - while (absX < 0.1 && prec < MAXIMUM_DOUBLE_PREC) - { - absX = absX * 10; - prec++; - } - formatDouble(x, buf, bufSize, prec, trim, p, len); - } -} - -GooString *GooString::insert(int i, char c) { - return insert(i, (const char*)&c, 1); -} - -GooString *GooString::insert(int i, const GooString *str) { - return insert(i, str->getCString(), str->getLength()); -} - -GooString *GooString::insert(int i, const char *str, int lengthA) { - int prevLen = length; - if (CALC_STRING_LEN == lengthA) - lengthA = strlen(str); - - resize(length + lengthA); - memmove(s+i+lengthA, s+i, prevLen-i); - memcpy(s+i, str, lengthA); - return this; -} - -GooString *GooString::del(int i, int n) { - int j; - - if (i >= 0 && n > 0 && i + n > 0) { - if (i + n > length) { - n = length - i; - } - for (j = i; j <= length - n; ++j) { - s[j] = s[j + n]; - } - resize(length - n); - } - return this; -} - -GooString *GooString::upperCase() { - int i; - - for (i = 0; i < length; ++i) { - if (islower(s[i])) - s[i] = toupper(s[i]); - } - return this; -} - -GooString *GooString::lowerCase() { - int i; - - for (i = 0; i < length; ++i) { - if (isupper(s[i])) - s[i] = tolower(s[i]); - } - return this; -} - -int GooString::cmp(const GooString *str) const { - int n1, n2, i, x; - char *p1, *p2; - - n1 = length; - n2 = str->length; - for (i = 0, p1 = s, p2 = str->s; i < n1 && i < n2; ++i, ++p1, ++p2) { - x = *p1 - *p2; - if (x != 0) { - return x; - } - } - return n1 - n2; -} - -int GooString::cmpN(GooString *str, int n) const { - int n1, n2, i, x; - char *p1, *p2; - - n1 = length; - n2 = str->length; - for (i = 0, p1 = s, p2 = str->s; - i < n1 && i < n2 && i < n; - ++i, ++p1, ++p2) { - x = *p1 - *p2; - if (x != 0) { - return x; - } - } - if (i == n) { - return 0; - } - return n1 - n2; -} - -int GooString::cmp(const char *sA) const { - int n1, i, x; - const char *p1, *p2; - - n1 = length; - for (i = 0, p1 = s, p2 = sA; i < n1 && *p2; ++i, ++p1, ++p2) { - x = *p1 - *p2; - if (x != 0) { - return x; - } - } - if (i < n1) { - return 1; - } - if (*p2) { - return -1; - } - return 0; -} - -int GooString::cmpN(const char *sA, int n) const { - int n1, i, x; - const char *p1, *p2; - - n1 = length; - for (i = 0, p1 = s, p2 = sA; i < n1 && *p2 && i < n; ++i, ++p1, ++p2) { - x = *p1 - *p2; - if (x != 0) { - return x; - } - } - if (i == n) { - return 0; - } - if (i < n1) { - return 1; - } - if (*p2) { - return -1; - } - return 0; -} - -GBool GooString::endsWith(const char *suffix) const { - int suffixLen = strlen(suffix); - - if (length < suffixLen) - return gFalse; - - return strcmp(s + length - suffixLen, suffix) == 0; -} - -GBool GooString::hasUnicodeMarker(void) const -{ - return length > 1 && (s[0] & 0xff) == 0xfe && (s[1] & 0xff) == 0xff; -} - -void GooString::prependUnicodeMarker() -{ - insert(0, (char)0xff); - insert(0, (char)0xfe); -} - -GooString *GooString::sanitizedName(GBool psmode) const -{ - GooString *name; - char buf[8]; - int i; - char c; - - name = new GooString(); - - if (psmode) - { - // ghostscript chokes on names that begin with out-of-limits - // numbers, e.g., 1e4foo is handled correctly (as a name), but - // 1e999foo generates a limitcheck error - c = getChar(0); - if (c >= '0' && c <= '9') { - name->append('f'); - } - } - - for (i = 0; i < getLength(); ++i) { - c = getChar(i); - if (c <= (char)0x20 || c >= (char)0x7f || - c == ' ' || - c == '(' || c == ')' || c == '<' || c == '>' || - c == '[' || c == ']' || c == '{' || c == '}' || - c == '/' || c == '%' || c == '#') { - sprintf(buf, "#%02x", c & 0xff); - name->append(buf); - } else { - name->append(c); - } - } - return name; -} diff --git a/Build/source/libs/poppler/poppler-src/goo/GooString.h b/Build/source/libs/poppler/poppler-src/goo/GooString.h deleted file mode 100644 index 78ebd85b81a..00000000000 --- a/Build/source/libs/poppler/poppler-src/goo/GooString.h +++ /dev/null @@ -1,208 +0,0 @@ -//======================================================================== -// -// GooString.h -// -// Simple variable-length string type. -// -// Copyright 1996-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2006 Kristian Høgsberg <krh@redhat.com> -// Copyright (C) 2006 Krzysztof Kowalczyk <kkowalczyk@gmail.com> -// Copyright (C) 2008-2010, 2012, 2014, 2017 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2012-2014 Fabio D'Urso <fabiodurso@hotmail.it> -// Copyright (C) 2013 Jason Crain <jason@aquaticape.us> -// Copyright (C) 2015, 2018 Adam Reichold <adam.reichold@t-online.de> -// Copyright (C) 2016 Jakub Alba <jakubalba@gmail.com> -// Copyright (C) 2017 Adrian Johnson <ajohnson@redneon.com> -// 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 -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef GooString_H -#define GooString_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include <stdarg.h> -#include <stdlib.h> // for NULL -#include <string> -#include "gtypes.h" - -#ifdef __clang__ -# define GOOSTRING_FORMAT __attribute__((__annotate__("gooformat"))) -#else -# define GOOSTRING_FORMAT -#endif - -class GooString { -public: - - // a special value telling that the length of the string is not given - // so it must be calculated from the strings - static const int CALC_STRING_LEN = -1; - - // Create an empty string. - GooString(); - - // Create a string from a C string. - explicit GooString(const char *sA); - - // Create a string from <lengthA> chars at <sA>. This string - // can contain null characters. - GooString(const char *sA, int lengthA); - - // Create a string from <lengthA> chars at <idx> in <str>. - GooString(const GooString *str, int idx, int lengthA); - - // Set content of a string to <newStr>. If <newLen> is CALC_STRING_LEN, then - // length of the string will be calculated with strlen(). Otherwise we assume - // this is a valid length of <newStr> (or its substring) - GooString* Set(const char *newStr, int newLen=CALC_STRING_LEN); - - // Copy a string. - explicit GooString(const GooString *str); - GooString *copy() const { return new GooString(this); } - - // Concatenate two strings. - GooString(GooString *str1, GooString *str2); - - // Convert an integer to a string. - static GooString *fromInt(int x); - - // Create a formatted string. Similar to printf, but without the - // string overflow issues. Formatting elements consist of: - // {<arg>:[<width>][.<precision>]<type>} - // where: - // - <arg> is the argument number (arg 0 is the first argument - // following the format string) -- NB: args must be first used in - // order; they can be reused in any order - // - <width> is the field width -- negative to reverse the alignment; - // starting with a leading zero to zero-fill (for integers) - // - <precision> is the number of digits to the right of the decimal - // point (for floating point numbers) - // - <type> is one of: - // d, x, X, o, b -- int in decimal, lowercase hex, uppercase hex, octal, binary - // ud, ux, uX, uo, ub -- unsigned int - // ld, lx, lX, lo, lb, uld, ulx, ulX, ulo, ulb -- long, unsigned long - // lld, llx, llX, llo, llb, ulld, ullx, ullX, ullo, ullb - // -- long long, unsigned long long - // f, g, gs -- floating point (float or double) - // f -- always prints trailing zeros (eg 1.0 with .2f will print 1.00) - // g -- omits trailing zeros and, if possible, the dot (eg 1.0 shows up as 1) - // gs -- is like g, but treats <precision> as number of significant - // digits to show (eg 0.0123 with .2gs will print 0.012) - // c -- character (char, short or int) - // s -- string (char *) - // t -- GooString * - // w -- blank space; arg determines width - // To get literal curly braces, use {{ or }}. - static GooString *format(const char *fmt, ...) GOOSTRING_FORMAT; - static GooString *formatv(const char *fmt, va_list argList); - - // Destructor. - ~GooString(); - - // Get length. - int getLength() const { return length; } - - // Get C string. - char *getCString() { return s; } - const char *getCString() const { return s; } - - // Get <i>th character. - char getChar(int i) const { return s[i]; } - - // Change <i>th character. - void setChar(int i, char c) { s[i] = c; } - - // Clear string to zero length. - GooString *clear(); - - // Append a character or string. - GooString *append(char c); - GooString *append(const GooString *str); - GooString *append(const char *str, int lengthA=CALC_STRING_LEN); - - // Append a formatted string. - GooString *appendf(const char *fmt, ...) GOOSTRING_FORMAT; - GooString *appendfv(const char *fmt, va_list argList); - - // Insert a character or string. - GooString *insert(int i, char c); - GooString *insert(int i, const GooString *str); - GooString *insert(int i, const char *str, int lengthA=CALC_STRING_LEN); - - // Delete a character or range of characters. - GooString *del(int i, int n = 1); - - // Convert string to all-upper/all-lower case. - GooString *upperCase(); - GooString *lowerCase(); - - // Compare two strings: -1:< 0:= +1:> - int cmp(const GooString *str) const; - int cmpN(GooString *str, int n) const; - int cmp(const char *sA) const; - int cmpN(const char *sA, int n) const; - - // Return true if string ends with suffix - GBool endsWith(const char *suffix) const; - - GBool hasUnicodeMarker(void) const; - void prependUnicodeMarker(); - GBool hasJustUnicodeMarker(void) const { return length == 2 && hasUnicodeMarker(); } - - // Sanitizes the string so that it does - // not contain any ( ) < > [ ] { } / % - // The postscript mode also has some more strict checks - // The caller owns the return value - GooString *sanitizedName(GBool psmode) const; - - // Conversion from and to std::string - explicit GooString(const std::string& str) : GooString(str.data(), str.size()) {} - std::string toStr() const { return std::string(getCString(), getLength()); } - -private: - GooString(const GooString &other); - GooString& operator=(const GooString &other); - - // You can tweak the final object size for different time/space tradeoffs. - // In libc malloc(), rounding is 16 so it's best to choose a value that - // is a multiple of 16. - static const int STR_FINAL_SIZE = 32; - static const int STR_STATIC_SIZE = STR_FINAL_SIZE - sizeof(int) - sizeof(char*); - - int roundedSize(int len); - - char sStatic[STR_STATIC_SIZE]; - int length; - char *s; - - void resize(int newLength); - static void formatInt(long long x, char *buf, int bufSize, - GBool zeroFill, int width, int base, - char **p, int *len, GBool upperCase = gFalse); - static void formatUInt(unsigned long long x, char *buf, int bufSize, - GBool zeroFill, int width, int base, - char **p, int *len, GBool upperCase = gFalse); - static void formatDouble(double x, char *buf, int bufSize, int prec, - GBool trim, char **p, int *len); - static void formatDoubleSmallAware(double x, char *buf, int bufSize, int prec, - GBool trim, char **p, int *len); -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/goo/GooTimer.cc b/Build/source/libs/poppler/poppler-src/goo/GooTimer.cc deleted file mode 100644 index b1161853f2d..00000000000 --- a/Build/source/libs/poppler/poppler-src/goo/GooTimer.cc +++ /dev/null @@ -1,95 +0,0 @@ -//======================================================================== -// -// GooTimer.cc -// -// This file is licensed under GPLv2 or later -// -// Copyright 2005 Jonathan Blandford <jrb@redhat.com> -// Copyright 2007 Krzysztof Kowalczyk <kkowalczyk@gmail.com> -// Copyright 2010 Hib Eris <hib@hiberis.nl> -// Inspired by gtimer.c in glib, which is Copyright 2000 by the GLib Team -// -//======================================================================== - -#include <config.h> - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include "GooTimer.h" -#include <string.h> - -#define USEC_PER_SEC 1000000 - -//------------------------------------------------------------------------ -// GooTimer -//------------------------------------------------------------------------ - -GooTimer::GooTimer() { - start(); -} - -void GooTimer::start() { -#ifdef HAVE_GETTIMEOFDAY - gettimeofday(&start_time, nullptr); -#elif defined(_WIN32) - QueryPerformanceCounter(&start_time); -#endif - active = true; -} - -void GooTimer::stop() { -#ifdef HAVE_GETTIMEOFDAY - gettimeofday(&end_time, nullptr); -#elif defined(_WIN32) - QueryPerformanceCounter(&end_time); -#endif - active = false; -} - -#ifdef HAVE_GETTIMEOFDAY -double GooTimer::getElapsed() -{ - double total; - struct timeval elapsed; - - if (active) - gettimeofday(&end_time, nullptr); - - if (start_time.tv_usec > end_time.tv_usec) { - end_time.tv_usec += USEC_PER_SEC; - end_time.tv_sec--; - } - - elapsed.tv_usec = end_time.tv_usec - start_time.tv_usec; - elapsed.tv_sec = end_time.tv_sec - start_time.tv_sec; - - total = elapsed.tv_sec + ((double) elapsed.tv_usec / 1e6); - if (total < 0) - total = 0; - - return total; -} -#elif defined(_WIN32) -double GooTimer::getElapsed() -{ - LARGE_INTEGER freq; - double time_in_secs; - QueryPerformanceFrequency(&freq); - - if (active) - QueryPerformanceCounter(&end_time); - - time_in_secs = (double)(end_time.QuadPart-start_time.QuadPart)/(double)freq.QuadPart; - return time_in_secs * 1000.0; - -} -#else -double GooTimer::getElapsed() -{ -#warning "no support for GooTimer" - return 0; -} -#endif - diff --git a/Build/source/libs/poppler/poppler-src/goo/GooTimer.h b/Build/source/libs/poppler/poppler-src/goo/GooTimer.h deleted file mode 100644 index ac64f6b4868..00000000000 --- a/Build/source/libs/poppler/poppler-src/goo/GooTimer.h +++ /dev/null @@ -1,62 +0,0 @@ -//======================================================================== -// -// GooTimer.cc -// -// This file is licensed under GPLv2 or later -// -// Copyright 2005 Jonathan Blandford <jrb@redhat.com> -// Copyright 2007 Krzysztof Kowalczyk <kkowalczyk@gmail.com> -// Copyright 2010 Hib Eris <hib@hiberis.nl> -// Copyright 2011 Albert Astals cid <aacid@kde.org> -// Copyright 2014 Bogdan Cristea <cristeab@gmail.com> -// Copyright 2014 Peter Breitenlohner <peb@mppmu.mpg.de> -// Inspired by gtimer.c in glib, which is Copyright 2000 by the GLib Team -// -//======================================================================== - -#ifndef GOOTIMER_H -#define GOOTIMER_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "poppler-config.h" -#include "gtypes.h" -#ifdef HAVE_GETTIMEOFDAY -#include <sys/time.h> -#endif - -#ifdef _WIN32 -#ifndef NOMINMAX -#define NOMINMAX -#endif -#include <windows.h> -#endif - -//------------------------------------------------------------------------ -// GooTimer -//------------------------------------------------------------------------ - -class GooTimer { -public: - - // Create a new timer. - GooTimer(); - - void start(); - void stop(); - double getElapsed(); - -private: -#ifdef HAVE_GETTIMEOFDAY - struct timeval start_time; - struct timeval end_time; -#elif defined(_WIN32) - LARGE_INTEGER start_time; - LARGE_INTEGER end_time; -#endif - GBool active; -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/goo/ImgWriter.cc b/Build/source/libs/poppler/poppler-src/goo/ImgWriter.cc deleted file mode 100644 index a30d26d89ad..00000000000 --- a/Build/source/libs/poppler/poppler-src/goo/ImgWriter.cc +++ /dev/null @@ -1,15 +0,0 @@ -//======================================================================== -// -// ImgWriter.cpp -// -// This file is licensed under the GPLv2 or later -// -// Copyright (C) 2009 Albert Astals Cid <aacid@kde.org> -// -//======================================================================== - -#include "ImgWriter.h" - -ImgWriter::~ImgWriter() -{ -} diff --git a/Build/source/libs/poppler/poppler-src/goo/ImgWriter.h b/Build/source/libs/poppler/poppler-src/goo/ImgWriter.h deleted file mode 100644 index 2ab97cdb4b2..00000000000 --- a/Build/source/libs/poppler/poppler-src/goo/ImgWriter.h +++ /dev/null @@ -1,37 +0,0 @@ -//======================================================================== -// -// ImgWriter.h -// -// This file is licensed under the GPLv2 or later -// -// Copyright (C) 2009 Stefan Thomas <thomas@eload24.com> -// Copyright (C) 2009, 2011, 2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2010 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2010 Brian Cameron <brian.cameron@oracle.com> -// Copyright (C) 2011 Thomas Freitag <Thomas.Freitag@alfa.de> -// -//======================================================================== - -#ifndef IMGWRITER_H -#define IMGWRITER_H - -#include <stdio.h> - -class ImgWriter -{ -public: - ImgWriter() = default; - ImgWriter(const ImgWriter &) = delete; - ImgWriter& operator=(const ImgWriter &other) = delete; - - virtual ~ImgWriter(); - virtual bool init(FILE *f, int width, int height, int hDPI, int vDPI) = 0; - - virtual bool writePointers(unsigned char **rowPointers, int rowCount) = 0; - virtual bool writeRow(unsigned char **row) = 0; - - virtual bool close() = 0; - virtual bool supportCMYK() { return false; } -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/goo/JpegWriter.cc b/Build/source/libs/poppler/poppler-src/goo/JpegWriter.cc deleted file mode 100644 index 16c97afe768..00000000000 --- a/Build/source/libs/poppler/poppler-src/goo/JpegWriter.cc +++ /dev/null @@ -1,203 +0,0 @@ -//======================================================================== -// -// JpegWriter.cc -// -// This file is licensed under the GPLv2 or later -// -// Copyright (C) 2009 Stefan Thomas <thomas@eload24.com> -// Copyright (C) 2010, 2012, 2017 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2010 Harry Roberts <harry.roberts@midnight-labs.org> -// Copyright (C) 2011 Thomas Freitag <Thomas.Freitag@alfa.de> -// Copyright (C) 2013 Peter Breitenlohner <peb@mppmu.mpg.de> -// Copyright (C) 2017, 2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2018 Martin Packman <gzlist@googlemail.com> -// -//======================================================================== - -#include "JpegWriter.h" - -#ifdef ENABLE_LIBJPEG - -extern "C" { -#include <jpeglib.h> -} - -#include "poppler/Error.h" - -struct JpegWriterPrivate { - bool progressive; - bool optimize; - int quality; - JpegWriter::Format format; - struct jpeg_compress_struct cinfo; - struct jpeg_error_mgr jerr; -}; - -static void outputMessage(j_common_ptr cinfo) -{ - char buffer[JMSG_LENGTH_MAX]; - - // Create the message - (*cinfo->err->format_message) (cinfo, buffer); - - // Send it to poppler's error handler - error(errInternal, -1, "{0:s}", buffer); -} - -JpegWriter::JpegWriter(int q, bool p, Format formatA) -{ - priv = new JpegWriterPrivate; - priv->progressive = p; - priv->optimize = false; - priv->quality = q; - priv->format = formatA; -} - -JpegWriter::JpegWriter(Format formatA) - : JpegWriter(-1, false, formatA) -{ -} - -JpegWriter::~JpegWriter() -{ - // cleanup - jpeg_destroy_compress(&priv->cinfo); - delete priv; -} - -void JpegWriter::setQuality(int quality) -{ - priv->quality = quality; -} - -void JpegWriter::setProgressive(bool progressive) -{ - priv->progressive = progressive; -} - -void JpegWriter::setOptimize(bool optimize) -{ - priv->optimize = optimize; -} - -bool JpegWriter::init(FILE *f, int width, int height, int hDPI, int vDPI) -{ - // Setup error handler - priv->cinfo.err = jpeg_std_error(&priv->jerr); - priv->jerr.output_message = &outputMessage; - - // Initialize libjpeg - jpeg_create_compress(&priv->cinfo); - - // First set colorspace and call jpeg_set_defaults() since - // jpeg_set_defaults() sets default values for all fields in - // cinfo based on the colorspace. - switch (priv->format) { - case RGB: - priv->cinfo.in_color_space = JCS_RGB; - break; - case GRAY: - priv->cinfo.in_color_space = JCS_GRAYSCALE; - break; - case CMYK: - priv->cinfo.in_color_space = JCS_CMYK; - break; - default: - return false; - } - jpeg_set_defaults(&priv->cinfo); - - // Set destination file - jpeg_stdio_dest(&priv->cinfo, f); - - // Set libjpeg configuration - priv->cinfo.image_width = width; - priv->cinfo.image_height = height; - priv->cinfo.density_unit = 1; // dots per inch - priv->cinfo.X_density = hDPI; - priv->cinfo.Y_density = vDPI; - switch (priv->format) { - case GRAY: - priv->cinfo.input_components = 1; - break; - case RGB: - priv->cinfo.input_components = 3; - break; - case CMYK: - priv->cinfo.input_components = 4; - jpeg_set_colorspace(&priv->cinfo, JCS_YCCK); - priv->cinfo.write_JFIF_header = TRUE; - break; - default: - return false; - } - - // Set quality - if (priv->quality >= 0 && priv->quality <= 100) { - jpeg_set_quality(&priv->cinfo, priv->quality, TRUE); - } - - // Use progressive mode - if (priv->progressive) { - jpeg_simple_progression(&priv->cinfo); - } - - // Set whether to compute optimal Huffman coding tables - priv->cinfo.optimize_coding = priv->optimize; - - // Get ready for data - jpeg_start_compress(&priv->cinfo, TRUE); - - return true; -} - -bool JpegWriter::writePointers(unsigned char **rowPointers, int rowCount) -{ - if (priv->format == CMYK) { - for (int y = 0; y < rowCount; y++) { - unsigned char *row = rowPointers[y]; - for (unsigned int x = 0; x < priv->cinfo.image_width; x++) { - for (int n = 0; n < 4; n++) { - *row = 0xff - *row; - row++; - } - } - } - } - // Write all rows to the file - jpeg_write_scanlines(&priv->cinfo, rowPointers, rowCount); - - return true; -} - -bool JpegWriter::writeRow(unsigned char **rowPointer) -{ - if (priv->format == CMYK) { - unsigned char *row = rowPointer[0]; - for (unsigned int x = 0; x < priv->cinfo.image_width; x++) { - for (int n = 0; n < 4; n++) { - *row = 0xff - *row; - row++; - } - } - } - // Write the row to the file - jpeg_write_scanlines(&priv->cinfo, rowPointer, 1); - - return true; -} - -bool JpegWriter::close() -{ - jpeg_finish_compress(&priv->cinfo); - - return true; -} - -bool JpegWriter::supportCMYK() -{ - return priv->format == CMYK; -} - - -#endif diff --git a/Build/source/libs/poppler/poppler-src/goo/JpegWriter.h b/Build/source/libs/poppler/poppler-src/goo/JpegWriter.h deleted file mode 100644 index 40de0ec2b28..00000000000 --- a/Build/source/libs/poppler/poppler-src/goo/JpegWriter.h +++ /dev/null @@ -1,63 +0,0 @@ -//======================================================================== -// -// JpegWriter.h -// -// This file is licensed under the GPLv2 or later -// -// Copyright (C) 2009 Stefan Thomas <thomas@eload24.com> -// Copyright (C) 2010, 2012, 2017 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2010 Jürg Billeter <j@bitron.ch> -// Copyright (C) 2010 Harry Roberts <harry.roberts@midnight-labs.org> -// Copyright (C) 2010 Brian Cameron <brian.cameron@oracle.com> -// Copyright (C) 2011 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2011 Thomas Freitag <Thomas.Freitag@alfa.de> -// Copyright (C) 2018 Martin Packman <gzlist@googlemail.com> -// -//======================================================================== - -#ifndef JPEGWRITER_H -#define JPEGWRITER_H - -#include "poppler-config.h" - -#ifdef ENABLE_LIBJPEG - -#include <sys/types.h> -#include "ImgWriter.h" - -struct JpegWriterPrivate; - -class JpegWriter : public ImgWriter -{ -public: - /* RGB - 3 bytes/pixel - * GRAY - 1 byte/pixel - * CMYK - 4 bytes/pixel - */ - enum Format { RGB, GRAY, CMYK }; - - JpegWriter(int quality, bool progressive, Format format = RGB); - JpegWriter(Format format = RGB); - ~JpegWriter(); - - void setQuality(int quality); - void setProgressive(bool progressive); - void setOptimize(bool optimize); - bool init(FILE *f, int width, int height, int hDPI, int vDPI) override; - - bool writePointers(unsigned char **rowPointers, int rowCount) override; - bool writeRow(unsigned char **row) override; - - bool close() override; - bool supportCMYK() override; - -private: - JpegWriter(const JpegWriter &other); - JpegWriter& operator=(const JpegWriter &other); - - JpegWriterPrivate *priv; -}; - -#endif - -#endif diff --git a/Build/source/libs/poppler/poppler-src/goo/NetPBMWriter.cc b/Build/source/libs/poppler/poppler-src/goo/NetPBMWriter.cc deleted file mode 100644 index fca00b26b1a..00000000000 --- a/Build/source/libs/poppler/poppler-src/goo/NetPBMWriter.cc +++ /dev/null @@ -1,84 +0,0 @@ -//======================================================================== -// -// NetPBMWriter.h -// -// Copyright 1998-2003 Glyph & Cog, LLC -// -//======================================================================== -// -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2005, 2007, 2011 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2006 Rainer Keller <class321@gmx.de> -// Copyright (C) 2008 Timothy Lee <timothy.lee@siriushk.com> -// Copyright (C) 2008 Vasile Gaburici <gaburici@cs.umd.edu> -// Copyright (C) 2009 Carlos Garcia Campos <carlosgc@gnome.org> -// Copyright (C) 2009 William Bader <williambader@hotmail.com> -// Copyright (C) 2010 Jakob Voss <jakob.voss@gbv.de> -// Copyright (C) 2012, 2013 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2013 Thomas Fischer <fischer@unix-ag.uni-kl.de> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include "poppler-config.h" - -#include "NetPBMWriter.h" - -// Writer for the NetPBM formats (PBM and PPM) -// This format is documented at: -// http://netpbm.sourceforge.net/doc/pbm.html -// http://netpbm.sourceforge.net/doc/ppm.html - -NetPBMWriter::NetPBMWriter(Format formatA) : format(formatA) -{ -} - -bool NetPBMWriter::init(FILE *f, int widthA, int heightA, int hDPI, int vDPI) -{ - file = f; - width = widthA; - if (format == MONOCHROME) { - fprintf(file, "P4\n"); - fprintf(file, "%d %d\n", widthA, heightA); - } else { - fprintf(file, "P6\n"); - fprintf(file, "%d %d\n", widthA, heightA); - fprintf(file, "255\n"); - } - return true; -} - -bool NetPBMWriter::writePointers(unsigned char **rowPointers, int rowCount) -{ - for (int i = 0; i < rowCount; i++) - writeRow(&rowPointers[i]); - return true; -} - -bool NetPBMWriter::writeRow(unsigned char **row) -{ - if (format == MONOCHROME) { - // PBM uses 0 = white, 1 = black so we need to invert the colors - int size = (width + 7)/8; - for (int i = 0; i < size; i++) - fputc((*row)[i] ^ 0xff, file); - } else { - fwrite(*row, 1, width*3, file); - } - return true; -} - - -bool NetPBMWriter::close() -{ - return true; -} - diff --git a/Build/source/libs/poppler/poppler-src/goo/NetPBMWriter.h b/Build/source/libs/poppler/poppler-src/goo/NetPBMWriter.h deleted file mode 100644 index ffdd7e17513..00000000000 --- a/Build/source/libs/poppler/poppler-src/goo/NetPBMWriter.h +++ /dev/null @@ -1,52 +0,0 @@ -//======================================================================== -// -// NetPBMWriter.h -// -// This file is licensed under the GPLv2 or later -// -// Copyright (C) 2009 Stefan Thomas <thomas@eload24.com> -// Copyright (C) 2009, 2011 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2010, 2013 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2010 Brian Cameron <brian.cameron@oracle.com> -// Copyright (C) 2011 Thomas Freitag <Thomas.Freitag@alfa.de> -// -//======================================================================== - -#ifndef NETPBMWRITER_H -#define NETPBMWRITER_H - -#include "poppler-config.h" - -#include "ImgWriter.h" - -// Writer for the NetPBM formats (PBM and PPM) -// This format is documented at: -// http://netpbm.sourceforge.net/doc/pbm.html -// http://netpbm.sourceforge.net/doc/ppm.html - -class NetPBMWriter : public ImgWriter -{ -public: - - /* RGB - 3 bytes/pixel - * MONOCHROME - 8 pixels/byte - */ - enum Format { RGB, MONOCHROME }; - - NetPBMWriter(Format formatA = RGB); - ~NetPBMWriter() {}; - - bool init(FILE *f, int width, int height, int hDPI, int vDPI) override; - - bool writePointers(unsigned char **rowPointers, int rowCount) override; - bool writeRow(unsigned char **row) override; - - bool close() override; - -private: - FILE *file; - Format format; - int width; -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/goo/PNGWriter.cc b/Build/source/libs/poppler/poppler-src/goo/PNGWriter.cc deleted file mode 100644 index f230fcaf96f..00000000000 --- a/Build/source/libs/poppler/poppler-src/goo/PNGWriter.cc +++ /dev/null @@ -1,193 +0,0 @@ -//======================================================================== -// -// PNGWriter.cc -// -// This file is licensed under the GPLv2 or later -// -// Copyright (C) 2009 Warren Toomey <wkt@tuhs.org> -// Copyright (C) 2009 Shen Liang <shenzhuxi@gmail.com> -// Copyright (C) 2009, 2011 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2009 Stefan Thomas <thomas@eload24.com> -// Copyright (C) 2010, 2011, 2013, 2017 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2011 Thomas Klausner <wiz@danbala.tuwien.ac.at> -// Copyright (C) 2012 Pino Toscano <pino@kde.org> -// -//======================================================================== - -#include "PNGWriter.h" - -#ifdef ENABLE_LIBPNG - -#include <zlib.h> -#include <stdlib.h> -#include <string.h> - -#include "poppler/Error.h" -#include "goo/gmem.h" - -#include <png.h> - -struct PNGWriterPrivate { - PNGWriter::Format format; - png_structp png_ptr; - png_infop info_ptr; - unsigned char *icc_data; - int icc_data_size; - char *icc_name; - bool sRGB_profile; -}; - -PNGWriter::PNGWriter(Format formatA) -{ - priv = new PNGWriterPrivate; - priv->format = formatA; - priv->icc_data = nullptr; - priv->icc_data_size = 0; - priv->icc_name = nullptr; - priv->sRGB_profile = false; -} - -PNGWriter::~PNGWriter() -{ - /* cleanup heap allocation */ - png_destroy_write_struct(&priv->png_ptr, &priv->info_ptr); - if (priv->icc_data) { - gfree(priv->icc_data); - free(priv->icc_name); - } - - delete priv; -} - -void PNGWriter::setICCProfile(const char *name, unsigned char *data, int size) -{ - priv->icc_data = (unsigned char *)gmalloc(size); - memcpy(priv->icc_data, data, size); - priv->icc_data_size = size; - priv->icc_name = strdup(name); -} - -void PNGWriter::setSRGBProfile() -{ - priv->sRGB_profile = true; -} - -bool PNGWriter::init(FILE *f, int width, int height, int hDPI, int vDPI) -{ - /* libpng changed the png_set_iCCP() prototype in 1.5.0 */ -#if PNG_LIBPNG_VER < 10500 - png_charp icc_data_ptr = (png_charp)priv->icc_data; -#else - png_const_bytep icc_data_ptr = (png_const_bytep)priv->icc_data; -#endif - - /* initialize stuff */ - priv->png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, nullptr, nullptr, nullptr); - if (!priv->png_ptr) { - error(errInternal, -1, "png_create_write_struct failed"); - return false; - } - - priv->info_ptr = png_create_info_struct(priv->png_ptr); - if (!priv->info_ptr) { - error(errInternal, -1, "png_create_info_struct failed"); - return false; - } - - if (setjmp(png_jmpbuf(priv->png_ptr))) { - error(errInternal, -1, "png_jmpbuf failed"); - return false; - } - - /* write header */ - png_init_io(priv->png_ptr, f); - if (setjmp(png_jmpbuf(priv->png_ptr))) { - error(errInternal, -1, "Error during writing header"); - return false; - } - - // Set up the type of PNG image and the compression level - png_set_compression_level(priv->png_ptr, Z_BEST_COMPRESSION); - - // Silence silly gcc - png_byte bit_depth = -1; - png_byte color_type = -1; - switch (priv->format) { - case RGB: - bit_depth = 8; - color_type = PNG_COLOR_TYPE_RGB; - break; - case RGB48: - bit_depth = 16; - color_type = PNG_COLOR_TYPE_RGB; - break; - case RGBA: - bit_depth = 8; - color_type = PNG_COLOR_TYPE_RGB_ALPHA; - break; - case GRAY: - bit_depth = 8; - color_type = PNG_COLOR_TYPE_GRAY; - break; - case MONOCHROME: - bit_depth = 1; - color_type = PNG_COLOR_TYPE_GRAY; - break; - } - png_byte interlace_type = PNG_INTERLACE_NONE; - - png_set_IHDR(priv->png_ptr, priv->info_ptr, width, height, bit_depth, color_type, interlace_type, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT); - - png_set_pHYs(priv->png_ptr, priv->info_ptr, hDPI/0.0254, vDPI/0.0254, PNG_RESOLUTION_METER); - - if (priv->icc_data) - png_set_iCCP(priv->png_ptr, priv->info_ptr, priv->icc_name, PNG_COMPRESSION_TYPE_BASE, icc_data_ptr, priv->icc_data_size); - else if (priv->sRGB_profile) - png_set_sRGB(priv->png_ptr, priv->info_ptr, PNG_sRGB_INTENT_RELATIVE); - - png_write_info(priv->png_ptr, priv->info_ptr); - if (setjmp(png_jmpbuf(priv->png_ptr))) { - error(errInternal, -1, "error during writing png info bytes"); - return false; - } - - return true; -} - -bool PNGWriter::writePointers(unsigned char **rowPointers, int rowCount) -{ - png_write_image(priv->png_ptr, rowPointers); - /* write bytes */ - if (setjmp(png_jmpbuf(priv->png_ptr))) { - error(errInternal, -1, "Error during writing bytes"); - return false; - } - - return true; -} - -bool PNGWriter::writeRow(unsigned char **row) -{ - // Write the row to the file - png_write_rows(priv->png_ptr, row, 1); - if (setjmp(png_jmpbuf(priv->png_ptr))) { - error(errInternal, -1, "error during png row write"); - return false; - } - - return true; -} - -bool PNGWriter::close() -{ - /* end write */ - png_write_end(priv->png_ptr, priv->info_ptr); - if (setjmp(png_jmpbuf(priv->png_ptr))) { - error(errInternal, -1, "Error during end of write"); - return false; - } - - return true; -} - -#endif diff --git a/Build/source/libs/poppler/poppler-src/goo/PNGWriter.h b/Build/source/libs/poppler/poppler-src/goo/PNGWriter.h deleted file mode 100644 index 93f54369290..00000000000 --- a/Build/source/libs/poppler/poppler-src/goo/PNGWriter.h +++ /dev/null @@ -1,62 +0,0 @@ -//======================================================================== -// -// PNGWriter.h -// -// This file is licensed under the GPLv2 or later -// -// Copyright (C) 2009 Warren Toomey <wkt@tuhs.org> -// Copyright (C) 2009 Shen Liang <shenzhuxi@gmail.com> -// Copyright (C) 2009, 2011-2013 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2009 Stefan Thomas <thomas@eload24.com> -// Copyright (C) 2010, 2011, 2013, 2017 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2012 Pino Toscano <pino@kde.org> -// -//======================================================================== - -#ifndef PNGWRITER_H -#define PNGWRITER_H - -#include "poppler-config.h" - -#ifdef ENABLE_LIBPNG - -#include "ImgWriter.h" - -struct PNGWriterPrivate; - -class PNGWriter : public ImgWriter -{ -public: - - /* RGB - 3 bytes/pixel - * RGBA - 4 bytes/pixel - * GRAY - 1 byte/pixel - * MONOCHROME - 8 pixels/byte - * RGB48 - 6 bytes/pixel - */ - enum Format { RGB, RGBA, GRAY, MONOCHROME, RGB48 }; - - PNGWriter(Format format = RGB); - ~PNGWriter(); - - void setICCProfile(const char *name, unsigned char *data, int size); - void setSRGBProfile(); - - - bool init(FILE *f, int width, int height, int hDPI, int vDPI) override; - - bool writePointers(unsigned char **rowPointers, int rowCount) override; - bool writeRow(unsigned char **row) override; - - bool close() override; - -private: - PNGWriter(const PNGWriter &other); - PNGWriter& operator=(const PNGWriter &other); - - PNGWriterPrivate *priv; -}; - -#endif - -#endif diff --git a/Build/source/libs/poppler/poppler-src/goo/TiffWriter.cc b/Build/source/libs/poppler/poppler-src/goo/TiffWriter.cc deleted file mode 100644 index fd2eaa31485..00000000000 --- a/Build/source/libs/poppler/poppler-src/goo/TiffWriter.cc +++ /dev/null @@ -1,242 +0,0 @@ -//======================================================================== -// -// TiffWriter.cc -// -// This file is licensed under the GPLv2 or later -// -// Copyright (C) 2010, 2012 William Bader <williambader@hotmail.com> -// Copyright (C) 2012 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2012, 2017 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2012 Pino Toscano <pino@kde.org> -// Copyright (C) 2014 Steven Lee <roc.sky@gmail.com> -// -//======================================================================== - -#include "TiffWriter.h" - -#ifdef ENABLE_LIBTIFF - -#include <string.h> - -#ifdef _WIN32 -#include <io.h> -#endif - -extern "C" { -#include <tiffio.h> -} - -struct TiffWriterPrivate { - TIFF *f; // LibTiff file context - int numRows; // number of rows in the image - int curRow; // number of rows written - const char *compressionString; // compression type - TiffWriter::Format format; // format of image data -}; - -TiffWriter::~TiffWriter() -{ - delete priv; -} - -TiffWriter::TiffWriter(Format formatA) -{ - priv = new TiffWriterPrivate; - priv->f = nullptr; - priv->numRows = 0; - priv->curRow = 0; - priv->compressionString = nullptr; - priv->format = formatA; -} - -// Set the compression type - -void TiffWriter::setCompressionString(const char *compressionStringArg) -{ - priv->compressionString = compressionStringArg; -} - -// Write a TIFF file. - -bool TiffWriter::init(FILE *openedFile, int width, int height, int hDPI, int vDPI) -{ - unsigned int compression; - uint16 photometric = 0; - uint32 rowsperstrip = (uint32) -1; - int bitspersample; - uint16 samplesperpixel = 0; - const struct compression_name_tag { - const char *compressionName; // name of the compression option from the command line - unsigned int compressionCode; // internal libtiff code - const char *compressionDescription; // descriptive name - } compressionList[] = { - { "none", COMPRESSION_NONE, "no compression" }, - { "ccittrle", COMPRESSION_CCITTRLE, "CCITT modified Huffman RLE" }, - { "ccittfax3", COMPRESSION_CCITTFAX3,"CCITT Group 3 fax encoding" }, - { "ccittt4", COMPRESSION_CCITT_T4, "CCITT T.4 (TIFF 6 name)" }, - { "ccittfax4", COMPRESSION_CCITTFAX4, "CCITT Group 4 fax encoding" }, - { "ccittt6", COMPRESSION_CCITT_T6, "CCITT T.6 (TIFF 6 name)" }, - { "lzw", COMPRESSION_LZW, "Lempel-Ziv & Welch" }, - { "ojpeg", COMPRESSION_OJPEG, "!6.0 JPEG" }, - { "jpeg", COMPRESSION_JPEG, "%JPEG DCT compression" }, - { "next", COMPRESSION_NEXT, "NeXT 2-bit RLE" }, - { "packbits", COMPRESSION_PACKBITS, "Macintosh RLE" }, - { "ccittrlew", COMPRESSION_CCITTRLEW, "CCITT modified Huffman RLE w/ word alignment" }, - { "deflate", COMPRESSION_DEFLATE, "Deflate compression" }, - { "adeflate", COMPRESSION_ADOBE_DEFLATE, "Deflate compression, as recognized by Adobe" }, - { "dcs", COMPRESSION_DCS, "Kodak DCS encoding" }, - { "jbig", COMPRESSION_JBIG, "ISO JBIG" }, - { "jp2000", COMPRESSION_JP2000, "Leadtools JPEG2000" }, - { nullptr, 0, nullptr } - }; - - // Initialize - - priv->f = nullptr; - priv->curRow = 0; - - // Store the number of rows - - priv->numRows = height; - - // Set the compression - - compression = COMPRESSION_NONE; - - if (priv->compressionString == nullptr || strcmp(priv->compressionString, "") == 0) { - compression = COMPRESSION_NONE; - } else { - int i; - for (i = 0; compressionList[i].compressionName != nullptr; i++) { - if (strcmp(priv->compressionString, compressionList[i].compressionName) == 0) { - compression = compressionList[i].compressionCode; - break; - } - } - if (compressionList[i].compressionName == nullptr) { - fprintf(stderr, "TiffWriter: Unknown compression type '%.10s', using 'none'.\n", priv->compressionString); - fprintf(stderr, "Known compression types (the tiff library might not support every type)\n"); - for (i = 0; compressionList[i].compressionName != nullptr; i++) { - fprintf(stderr, "%10s %s\n", compressionList[i].compressionName, compressionList[i].compressionDescription); - } - } - } - - // Set bits per sample, samples per pixel, and photometric type from format - - bitspersample = (priv->format == MONOCHROME ? 1 : 8); - - switch (priv->format) { - case MONOCHROME: - case GRAY: - samplesperpixel = 1; - photometric = PHOTOMETRIC_MINISBLACK; - break; - - case RGB: - samplesperpixel = 3; - photometric = PHOTOMETRIC_RGB; - break; - - case RGBA_PREMULTIPLIED: - samplesperpixel = 4; - photometric = PHOTOMETRIC_RGB; - break; - - case CMYK: - samplesperpixel = 4; - photometric = PHOTOMETRIC_SEPARATED; - break; - - case RGB48: - samplesperpixel = 3; - bitspersample = 16; - photometric = PHOTOMETRIC_RGB; - break; - } - - // Open the file - - if (openedFile == nullptr) { - fprintf(stderr, "TiffWriter: No output file given.\n"); - return false; - } - -#ifdef _WIN32 - //Convert C Library handle to Win32 Handle - priv->f = TIFFFdOpen(_get_osfhandle(fileno(openedFile)), "-", "w"); -#else - priv->f = TIFFFdOpen(fileno(openedFile), "-", "w"); -#endif - - - if (!priv->f) { - return false; - } - - // Set TIFF tags - - TIFFSetField(priv->f, TIFFTAG_IMAGEWIDTH, width); - TIFFSetField(priv->f, TIFFTAG_IMAGELENGTH, height); - TIFFSetField(priv->f, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT); - TIFFSetField(priv->f, TIFFTAG_SAMPLESPERPIXEL, samplesperpixel); - TIFFSetField(priv->f, TIFFTAG_BITSPERSAMPLE, bitspersample); - TIFFSetField(priv->f, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG); - TIFFSetField(priv->f, TIFFTAG_PHOTOMETRIC, photometric); - TIFFSetField(priv->f, TIFFTAG_COMPRESSION, (uint16) compression); - TIFFSetField(priv->f, TIFFTAG_ROWSPERSTRIP, TIFFDefaultStripSize(priv->f, rowsperstrip)); - TIFFSetField(priv->f, TIFFTAG_XRESOLUTION, (double) hDPI); - TIFFSetField(priv->f, TIFFTAG_YRESOLUTION, (double) vDPI); - TIFFSetField(priv->f, TIFFTAG_RESOLUTIONUNIT, RESUNIT_INCH); - - if (priv->format == RGBA_PREMULTIPLIED) { - uint16 extra = EXTRASAMPLE_ASSOCALPHA; - TIFFSetField(priv->f, TIFFTAG_EXTRASAMPLES, 1, &extra); - } - - if (priv->format == CMYK) { - TIFFSetField(priv->f, TIFFTAG_INKSET, INKSET_CMYK); - TIFFSetField(priv->f, TIFFTAG_NUMBEROFINKS, 4); - } - - return true; -} - -bool TiffWriter::writePointers(unsigned char **rowPointers, int rowCount) -{ - // Write all rows to the file - - for (int row = 0; row < rowCount; row++) { - if (TIFFWriteScanline(priv->f, rowPointers[row], row, 0) < 0) { - fprintf(stderr, "TiffWriter: Error writing tiff row %d\n", row); - return false; - } - } - - return true; -} - -bool TiffWriter::writeRow(unsigned char **rowData) -{ - // Add a single row - - if (TIFFWriteScanline(priv->f, *rowData, priv->curRow, 0) < 0) { - fprintf(stderr, "TiffWriter: Error writing tiff row %d\n", priv->curRow); - return false; - } - - priv->curRow++; - - return true; -} - -bool TiffWriter::close() -{ - // Close the file - - TIFFClose(priv->f); - - return true; -} - -#endif diff --git a/Build/source/libs/poppler/poppler-src/goo/TiffWriter.h b/Build/source/libs/poppler/poppler-src/goo/TiffWriter.h deleted file mode 100644 index 9126e8847c0..00000000000 --- a/Build/source/libs/poppler/poppler-src/goo/TiffWriter.h +++ /dev/null @@ -1,61 +0,0 @@ -//======================================================================== -// -// TiffWriter.h -// -// This file is licensed under the GPLv2 or later -// -// Copyright (C) 2010, 2012 William Bader <williambader@hotmail.com> -// Copyright (C) 2011, 2012 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2012, 2017 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2012 Pino Toscano <pino@kde.org> -// -//======================================================================== - -#ifndef TIFFWRITER_H -#define TIFFWRITER_H - -#include "poppler-config.h" - -#ifdef ENABLE_LIBTIFF - -#include <sys/types.h> -#include "ImgWriter.h" - -struct TiffWriterPrivate; - -class TiffWriter : public ImgWriter -{ -public: - /* RGB - 3 bytes/pixel - * RGBA_PREMULTIPLIED - 4 bytes/pixel premultiplied by alpha - * GRAY - 1 byte/pixel - * MONOCHROME - 8 pixels/byte - * CMYK - 4 bytes/pixel - * RGB48 - 6 bytes/pixel - */ - enum Format { RGB, RGBA_PREMULTIPLIED, GRAY, MONOCHROME, CMYK, RGB48 }; - - TiffWriter(Format format = RGB); - ~TiffWriter(); - - void setCompressionString(const char *compressionStringArg); - - bool init(FILE *openedFile, int width, int height, int hDPI, int vDPI) override; - - bool writePointers(unsigned char **rowPointers, int rowCount) override; - bool writeRow(unsigned char **rowData) override; - - bool supportCMYK() override { return true; } - - bool close() override; - -private: - TiffWriter(const TiffWriter &other); - TiffWriter& operator=(const TiffWriter &other); - - TiffWriterPrivate *priv; -}; - -#endif - -#endif diff --git a/Build/source/libs/poppler/poppler-src/goo/gfile.cc b/Build/source/libs/poppler/poppler-src/goo/gfile.cc deleted file mode 100644 index 381a0ce265d..00000000000 --- a/Build/source/libs/poppler/poppler-src/goo/gfile.cc +++ /dev/null @@ -1,876 +0,0 @@ -//======================================================================== -// -// gfile.cc -// -// Miscellaneous file and directory name manipulation. -// -// Copyright 1996-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2006 Takashi Iwai <tiwai@suse.de> -// Copyright (C) 2006 Kristian Høgsberg <krh@redhat.com> -// Copyright (C) 2008 Adam Batkin <adam@batkin.net> -// Copyright (C) 2008, 2010, 2012, 2013 Hib Eris <hib@hiberis.nl> -// Copyright (C) 2009, 2012, 2014, 2017, 2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2009 Kovid Goyal <kovid@kovidgoyal.net> -// Copyright (C) 2013, 2018 Adam Reichold <adamreichold@myopera.com> -// Copyright (C) 2013, 2017 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2013 Peter Breitenlohner <peb@mppmu.mpg.de> -// Copyright (C) 2013, 2017 Thomas Freitag <Thomas.Freitag@alfa.de> -// Copyright (C) 2017 Christoph Cullmann <cullmann@kde.org> -// Copyright (C) 2018 Mojca Miklavec <mojca@macports.org> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include <config.h> - -#ifndef _WIN32 -# if defined(MACOS) -# include <sys/stat.h> -# elif !defined(ACORN) -# include <sys/types.h> -# include <sys/stat.h> -# include <fcntl.h> -# endif -# include <limits.h> -# include <string.h> -# if !defined(VMS) && !defined(ACORN) && !defined(MACOS) -# include <pwd.h> -# endif -# if defined(VMS) && (__DECCXX_VER < 50200000) -# include <unixlib.h> -# endif -#endif // _WIN32 -#include <stdio.h> -#include <limits> -#include "GooString.h" -#include "gfile.h" - -// Some systems don't define this, so just make it something reasonably -// large. -#ifndef PATH_MAX -#define PATH_MAX 1024 -#endif - -#ifndef _WIN32 - -namespace { - -template< typename... > -struct void_type -{ - using type = void; -}; - -template< typename... Args > -using void_t = typename void_type< Args... >::type; - -template< typename Stat, typename = void_t<> > -struct StatMtim -{ - static const struct timespec& value(const Stat& stbuf) { - return stbuf.st_mtim; - } -}; - -// Mac OS X uses a different field name than POSIX and this detects it. -template< typename Stat > -struct StatMtim< Stat, void_t< decltype ( Stat::st_mtimespec ) > > -{ - static const struct timespec& value(const Stat& stbuf) { - return stbuf.st_mtimespec; - } -}; - -inline const struct timespec& mtim(const struct stat& stbuf) { - return StatMtim< struct stat >::value(stbuf); -} - -} - -#endif - -//------------------------------------------------------------------------ - -GooString *getCurrentDir() { - char buf[PATH_MAX+1]; - -#if defined(__EMX__) - if (_getcwd2(buf, sizeof(buf))) -#elif defined(_WIN32) - if (GetCurrentDirectoryA(sizeof(buf), buf)) -#elif defined(ACORN) - if (strcpy(buf, "@")) -#elif defined(MACOS) - if (strcpy(buf, ":")) -#else - if (getcwd(buf, sizeof(buf))) -#endif - return new GooString(buf); - return new GooString(); -} - -GooString *appendToPath(GooString *path, const char *fileName) { -#if defined(VMS) - //---------- VMS ---------- - //~ this should handle everything necessary for file - //~ requesters, but it's certainly not complete - char *p0, *p1, *p2; - char *q1; - - p0 = path->getCString(); - p1 = p0 + path->getLength() - 1; - if (!strcmp(fileName, "-")) { - if (*p1 == ']') { - for (p2 = p1; p2 > p0 && *p2 != '.' && *p2 != '['; --p2) ; - if (*p2 == '[') - ++p2; - path->del(p2 - p0, p1 - p2); - } else if (*p1 == ':') { - path->append("[-]"); - } else { - path->clear(); - path->append("[-]"); - } - } else if ((q1 = strrchr(fileName, '.')) && !strncmp(q1, ".DIR;", 5)) { - if (*p1 == ']') { - path->insert(p1 - p0, '.'); - path->insert(p1 - p0 + 1, fileName, q1 - fileName); - } else if (*p1 == ':') { - path->append('['); - path->append(']'); - path->append(fileName, q1 - fileName); - } else { - path->clear(); - path->append(fileName, q1 - fileName); - } - } else { - if (*p1 != ']' && *p1 != ':') - path->clear(); - path->append(fileName); - } - return path; - -#elif defined(_WIN32) - //---------- Win32 ---------- - GooString *tmp; - char buf[256]; - char *fp; - - tmp = new GooString(path); - tmp->append('/'); - tmp->append(fileName); - GetFullPathNameA(tmp->getCString(), sizeof(buf), buf, &fp); - delete tmp; - path->clear(); - path->append(buf); - return path; - -#elif defined(ACORN) - //---------- RISCOS ---------- - char *p; - int i; - - path->append("."); - i = path->getLength(); - path->append(fileName); - for (p = path->getCString() + i; *p; ++p) { - if (*p == '/') { - *p = '.'; - } else if (*p == '.') { - *p = '/'; - } - } - return path; - -#elif defined(MACOS) - //---------- MacOS ---------- - char *p; - int i; - - path->append(":"); - i = path->getLength(); - path->append(fileName); - for (p = path->getCString() + i; *p; ++p) { - if (*p == '/') { - *p = ':'; - } else if (*p == '.') { - *p = ':'; - } - } - return path; - -#elif defined(__EMX__) - //---------- OS/2+EMX ---------- - int i; - - // appending "." does nothing - if (!strcmp(fileName, ".")) - return path; - - // appending ".." goes up one directory - if (!strcmp(fileName, "..")) { - for (i = path->getLength() - 2; i >= 0; --i) { - if (path->getChar(i) == '/' || path->getChar(i) == '\\' || - path->getChar(i) == ':') - break; - } - if (i <= 0) { - if (path->getChar(0) == '/' || path->getChar(0) == '\\') { - path->del(1, path->getLength() - 1); - } else if (path->getLength() >= 2 && path->getChar(1) == ':') { - path->del(2, path->getLength() - 2); - } else { - path->clear(); - path->append(".."); - } - } else { - if (path->getChar(i-1) == ':') - ++i; - path->del(i, path->getLength() - i); - } - return path; - } - - // otherwise, append "/" and new path component - if (path->getLength() > 0 && - path->getChar(path->getLength() - 1) != '/' && - path->getChar(path->getLength() - 1) != '\\') - path->append('/'); - path->append(fileName); - return path; - -#else - //---------- Unix ---------- - int i; - - // appending "." does nothing - if (!strcmp(fileName, ".")) - return path; - - // appending ".." goes up one directory - if (!strcmp(fileName, "..")) { - for (i = path->getLength() - 2; i >= 0; --i) { - if (path->getChar(i) == '/') - break; - } - if (i <= 0) { - if (path->getChar(0) == '/') { - path->del(1, path->getLength() - 1); - } else { - path->clear(); - path->append(".."); - } - } else { - path->del(i, path->getLength() - i); - } - return path; - } - - // otherwise, append "/" and new path component - if (path->getLength() > 0 && - path->getChar(path->getLength() - 1) != '/') - path->append('/'); - path->append(fileName); - return path; -#endif -} - -GooString *grabPath(char *fileName) { -#ifdef VMS - //---------- VMS ---------- - char *p; - - if ((p = strrchr(fileName, ']'))) - return new GooString(fileName, p + 1 - fileName); - if ((p = strrchr(fileName, ':'))) - return new GooString(fileName, p + 1 - fileName); - return new GooString(); - -#elif defined(__EMX__) || defined(_WIN32) - //---------- OS/2+EMX and Win32 ---------- - char *p; - - if ((p = strrchr(fileName, '/'))) - return new GooString(fileName, p - fileName); - if ((p = strrchr(fileName, '\\'))) - return new GooString(fileName, p - fileName); - if ((p = strrchr(fileName, ':'))) - return new GooString(fileName, p + 1 - fileName); - return new GooString(); - -#elif defined(ACORN) - //---------- RISCOS ---------- - char *p; - - if ((p = strrchr(fileName, '.'))) - return new GooString(fileName, p - fileName); - return new GooString(); - -#elif defined(MACOS) - //---------- MacOS ---------- - char *p; - - if ((p = strrchr(fileName, ':'))) - return new GooString(fileName, p - fileName); - return new GooString(); - -#else - //---------- Unix ---------- - char *p; - - if ((p = strrchr(fileName, '/'))) - return new GooString(fileName, p - fileName); - return new GooString(); -#endif -} - -GBool isAbsolutePath(char *path) { -#ifdef VMS - //---------- VMS ---------- - return strchr(path, ':') || - (path[0] == '[' && path[1] != '.' && path[1] != '-'); - -#elif defined(__EMX__) || defined(_WIN32) - //---------- OS/2+EMX and Win32 ---------- - return path[0] == '/' || path[0] == '\\' || path[1] == ':'; - -#elif defined(ACORN) - //---------- RISCOS ---------- - return path[0] == '$'; - -#elif defined(MACOS) - //---------- MacOS ---------- - return path[0] != ':'; - -#else - //---------- Unix ---------- - return path[0] == '/'; -#endif -} - -time_t getModTime(char *fileName) { -#ifdef _WIN32 - //~ should implement this, but it's (currently) only used in xpdf - return 0; -#else - struct stat statBuf; - - if (stat(fileName, &statBuf)) { - return 0; - } - return statBuf.st_mtime; -#endif -} - -GBool openTempFile(GooString **name, FILE **f, const char *mode) { -#if defined(_WIN32) - //---------- Win32 ---------- - char *tempDir; - GooString *s, *s2; - FILE *f2; - int t, i; - - // this has the standard race condition problem, but I haven't found - // a better way to generate temp file names with extensions on - // Windows - if ((tempDir = getenv("TEMP"))) { - s = new GooString(tempDir); - s->append('\\'); - } else { - s = new GooString(); - } - s->appendf("x_{0:d}_{1:d}_", - (int)GetCurrentProcessId(), (int)GetCurrentThreadId()); - t = (int)time(nullptr); - for (i = 0; i < 1000; ++i) { - s2 = s->copy()->appendf("{0:d}", t + i); - if (!(f2 = fopen(s2->getCString(), "r"))) { - if (!(f2 = fopen(s2->getCString(), mode))) { - delete s2; - delete s; - return gFalse; - } - *name = s2; - *f = f2; - delete s; - return gTrue; - } - fclose(f2); - delete s2; - } - delete s; - return gFalse; -#elif defined(VMS) || defined(__EMX__) || defined(ACORN) || defined(MACOS) - //---------- non-Unix ---------- - char *s; - - // There is a security hole here: an attacker can create a symlink - // with this file name after the tmpnam call and before the fopen - // call. I will happily accept fixes to this function for non-Unix - // OSs. - if (!(s = tmpnam(NULL))) { - return gFalse; - } - *name = new GooString(s); - if (!(*f = fopen((*name)->getCString(), mode))) { - delete (*name); - *name = NULL; - return gFalse; - } - return gTrue; -#else - //---------- Unix ---------- - char *s; - int fd; - -#ifdef HAVE_MKSTEMP - if ((s = getenv("TMPDIR"))) { - *name = new GooString(s); - } else { - *name = new GooString("/tmp"); - } - (*name)->append("/XXXXXX"); - fd = mkstemp((*name)->getCString()); -#else // HAVE_MKSTEMP - if (!(s = tmpnam(NULL))) { - return gFalse; - } - *name = new GooString(s); - fd = open((*name)->getCString(), O_WRONLY | O_CREAT | O_EXCL, 0600); -#endif // HAVE_MKSTEMP - if (fd < 0 || !(*f = fdopen(fd, mode))) { - delete *name; - *name = nullptr; - return gFalse; - } - return gTrue; -#endif -} - -#ifdef _WIN32 -GooString *fileNameToUTF8(char *path) { - GooString *s; - char *p; - - s = new GooString(); - for (p = path; *p; ++p) { - if (*p & 0x80) { - s->append((char)(0xc0 | ((*p >> 6) & 0x03))); - s->append((char)(0x80 | (*p & 0x3f))); - } else { - s->append(*p); - } - } - return s; -} - -GooString *fileNameToUTF8(wchar_t *path) { - GooString *s; - wchar_t *p; - - s = new GooString(); - for (p = path; *p; ++p) { - if (*p < 0x80) { - s->append((char)*p); - } else if (*p < 0x800) { - s->append((char)(0xc0 | ((*p >> 6) & 0x1f))); - s->append((char)(0x80 | (*p & 0x3f))); - } else { - s->append((char)(0xe0 | ((*p >> 12) & 0x0f))); - s->append((char)(0x80 | ((*p >> 6) & 0x3f))); - s->append((char)(0x80 | (*p & 0x3f))); - } - } - return s; -} -#endif - -FILE *openFile(const char *path, const char *mode) { -#ifdef _WIN32 - OSVERSIONINFO version; - wchar_t wPath[_MAX_PATH + 1]; - char nPath[_MAX_PATH + 1]; - wchar_t wMode[8]; - const char *p; - size_t i; - - // NB: _wfopen is only available in NT - version.dwOSVersionInfoSize = sizeof(version); - GetVersionEx(&version); - if (version.dwPlatformId == VER_PLATFORM_WIN32_NT) { - for (p = path, i = 0; *p && i < _MAX_PATH; ++i) { - if ((p[0] & 0xe0) == 0xc0 && - p[1] && (p[1] & 0xc0) == 0x80) { - wPath[i] = (wchar_t)(((p[0] & 0x1f) << 6) | - (p[1] & 0x3f)); - p += 2; - } else if ((p[0] & 0xf0) == 0xe0 && - p[1] && (p[1] & 0xc0) == 0x80 && - p[2] && (p[2] & 0xc0) == 0x80) { - wPath[i] = (wchar_t)(((p[0] & 0x0f) << 12) | - ((p[1] & 0x3f) << 6) | - (p[2] & 0x3f)); - p += 3; - } else { - wPath[i] = (wchar_t)(p[0] & 0xff); - p += 1; - } - } - wPath[i] = (wchar_t)0; - for (i = 0; (i < sizeof(mode) - 1) && mode[i]; ++i) { - wMode[i] = (wchar_t)(mode[i] & 0xff); - } - wMode[i] = (wchar_t)0; - return _wfopen(wPath, wMode); - } else { - for (p = path, i = 0; *p && i < _MAX_PATH; ++i) { - if ((p[0] & 0xe0) == 0xc0 && - p[1] && (p[1] & 0xc0) == 0x80) { - nPath[i] = (char)(((p[0] & 0x1f) << 6) | - (p[1] & 0x3f)); - p += 2; - } else if ((p[0] & 0xf0) == 0xe0 && - p[1] && (p[1] & 0xc0) == 0x80 && - p[2] && (p[2] & 0xc0) == 0x80) { - nPath[i] = (char)(((p[1] & 0x3f) << 6) | - (p[2] & 0x3f)); - p += 3; - } else { - nPath[i] = p[0]; - p += 1; - } - } - nPath[i] = '\0'; - return fopen(nPath, mode); - } -#else - return fopen(path, mode); -#endif -} - -char *getLine(char *buf, int size, FILE *f) { - int c, i; - - i = 0; - while (i < size - 1) { - if ((c = fgetc(f)) == EOF) { - break; - } - buf[i++] = (char)c; - if (c == '\x0a') { - break; - } - if (c == '\x0d') { - c = fgetc(f); - if (c == '\x0a' && i < size - 1) { - buf[i++] = (char)c; - } else if (c != EOF) { - ungetc(c, f); - } - break; - } - } - buf[i] = '\0'; - if (i == 0) { - return nullptr; - } - return buf; -} - -int Gfseek(FILE *f, Goffset offset, int whence) { -#if defined(HAVE_FSEEKO) - return fseeko(f, offset, whence); -#elif defined(HAVE_FSEEK64) - return fseek64(f, offset, whence); -#elif defined(__MINGW32__) - return fseeko64(f, offset, whence); -#elif defined(_WIN32) - return _fseeki64(f, offset, whence); -#else - return fseek(f, offset, whence); -#endif -} - -Goffset Gftell(FILE *f) { -#if defined(HAVE_FSEEKO) - return ftello(f); -#elif defined(HAVE_FSEEK64) - return ftell64(f); -#elif defined(__MINGW32__) - return ftello64(f); -#elif defined(_WIN32) - return _ftelli64(f); -#else - return ftell(f); -#endif -} - -Goffset GoffsetMax() { -#if defined(HAVE_FSEEKO) - return (std::numeric_limits<off_t>::max)(); -#elif defined(HAVE_FSEEK64) || defined(__MINGW32__) - return (std::numeric_limits<off64_t>::max)(); -#elif defined(_WIN32) - return (std::numeric_limits<__int64>::max)(); -#else - return (std::numeric_limits<long>::max)(); -#endif -} - -//------------------------------------------------------------------------ -// GooFile -//------------------------------------------------------------------------ - -#ifdef _WIN32 - -GooFile::GooFile(HANDLE handleA) : handle(handleA) { - GetFileTime(handleA, nullptr, nullptr, &modifiedTimeOnOpen); -} - -int GooFile::read(char *buf, int n, Goffset offset) const { - DWORD m; - - LARGE_INTEGER largeInteger = {}; - largeInteger.QuadPart = offset; - - OVERLAPPED overlapped = {}; - overlapped.Offset = largeInteger.LowPart; - overlapped.OffsetHigh = largeInteger.HighPart; - - return FALSE == ReadFile(handle, buf, n, &m, &overlapped) ? -1 : m; -} - -Goffset GooFile::size() const { - LARGE_INTEGER size = {(DWORD)-1,-1}; - - GetFileSizeEx(handle, &size); - - return size.QuadPart; -} - -GooFile* GooFile::open(const GooString *fileName) { - HANDLE handle = CreateFileA(fileName->getCString(), - GENERIC_READ, - FILE_SHARE_READ | FILE_SHARE_WRITE, - nullptr, - OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL, nullptr); - - return handle == INVALID_HANDLE_VALUE ? nullptr : new GooFile(handle); -} - -GooFile* GooFile::open(const wchar_t *fileName) { - HANDLE handle = CreateFileW(fileName, - GENERIC_READ, - FILE_SHARE_READ | FILE_SHARE_WRITE, - nullptr, - OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL, nullptr); - - return handle == INVALID_HANDLE_VALUE ? nullptr : new GooFile(handle); -} - -bool GooFile::modificationTimeChangedSinceOpen() const -{ - struct _FILETIME lastModified; - GetFileTime(handle, nullptr, nullptr, &lastModified); - - return modifiedTimeOnOpen.dwHighDateTime != lastModified.dwHighDateTime || modifiedTimeOnOpen.dwLowDateTime != lastModified.dwLowDateTime; -} - -#else - -int GooFile::read(char *buf, int n, Goffset offset) const { -#ifdef HAVE_PREAD64 - return pread64(fd, buf, n, offset); -#else - return pread(fd, buf, n, offset); -#endif -} - -Goffset GooFile::size() const { -#ifdef HAVE_LSEEK64 - return lseek64(fd, 0, SEEK_END); -#else - return lseek(fd, 0, SEEK_END); -#endif -} - -GooFile* GooFile::open(const GooString *fileName) { -#ifdef VMS - int fd = ::open(fileName->getCString(), Q_RDONLY, "ctx=stm"); -#else - int fd = ::open(fileName->getCString(), O_RDONLY); -#endif - - return fd < 0 ? nullptr : new GooFile(fd); -} - -GooFile::GooFile(int fdA) - : fd(fdA) -{ - struct stat statbuf; - fstat(fd, &statbuf); - modifiedTimeOnOpen = mtim(statbuf); -} - -bool GooFile::modificationTimeChangedSinceOpen() const -{ - struct stat statbuf; - fstat(fd, &statbuf); - - return modifiedTimeOnOpen.tv_sec != mtim(statbuf).tv_sec || modifiedTimeOnOpen.tv_nsec != mtim(statbuf).tv_nsec; -} - -#endif // _WIN32 - -//------------------------------------------------------------------------ -// GDir and GDirEntry -//------------------------------------------------------------------------ - -GDirEntry::GDirEntry(char *dirPath, char *nameA, GBool doStat) { -#ifdef VMS - char *p; -#elif defined(_WIN32) - DWORD fa; -#elif defined(ACORN) -#else - struct stat st; -#endif - - name = new GooString(nameA); - dir = gFalse; - fullPath = new GooString(dirPath); - appendToPath(fullPath, nameA); - if (doStat) { -#ifdef VMS - if (!strcmp(nameA, "-") || - ((p = strrchr(nameA, '.')) && !strncmp(p, ".DIR;", 5))) - dir = gTrue; -#elif defined(ACORN) -#else -#ifdef _WIN32 - fa = GetFileAttributesA(fullPath->getCString()); - dir = (fa != 0xFFFFFFFF && (fa & FILE_ATTRIBUTE_DIRECTORY)); -#else - if (stat(fullPath->getCString(), &st) == 0) - dir = S_ISDIR(st.st_mode); -#endif -#endif - } -} - -GDirEntry::~GDirEntry() { - delete fullPath; - delete name; -} - -GDir::GDir(char *name, GBool doStatA) { - path = new GooString(name); - doStat = doStatA; -#if defined(_WIN32) - GooString *tmp; - - tmp = path->copy(); - tmp->append("/*.*"); - hnd = FindFirstFileA(tmp->getCString(), &ffd); - delete tmp; -#elif defined(ACORN) -#elif defined(MACOS) -#else - dir = opendir(name); -#ifdef VMS - needParent = strchr(name, '[') != NULL; -#endif -#endif -} - -GDir::~GDir() { - delete path; -#if defined(_WIN32) - if (hnd != INVALID_HANDLE_VALUE) { - FindClose(hnd); - hnd = INVALID_HANDLE_VALUE; - } -#elif defined(ACORN) -#elif defined(MACOS) -#else - if (dir) - closedir(dir); -#endif -} - -GDirEntry *GDir::getNextEntry() { - GDirEntry *e = nullptr; - -#if defined(_WIN32) - if (hnd != INVALID_HANDLE_VALUE) { - e = new GDirEntry(path->getCString(), ffd.cFileName, doStat); - if (!FindNextFileA(hnd, &ffd)) { - FindClose(hnd); - hnd = INVALID_HANDLE_VALUE; - } - } -#elif defined(ACORN) -#elif defined(MACOS) -#elif defined(VMS) - struct dirent *ent; - if (dir) { - if (needParent) { - e = new GDirEntry(path->getCString(), "-", doStat); - needParent = gFalse; - return e; - } - ent = readdir(dir); - if (ent) { - e = new GDirEntry(path->getCString(), ent->d_name, doStat); - } - } -#else - struct dirent *ent; - if (dir) { - do { - ent = readdir(dir); - } - while (ent && (!strcmp(ent->d_name, ".") || !strcmp(ent->d_name, ".."))); - if (ent) { - e = new GDirEntry(path->getCString(), ent->d_name, doStat); - } - } -#endif - - return e; -} - -void GDir::rewind() { -#ifdef _WIN32 - GooString *tmp; - - if (hnd != INVALID_HANDLE_VALUE) - FindClose(hnd); - tmp = path->copy(); - tmp->append("/*.*"); - hnd = FindFirstFileA(tmp->getCString(), &ffd); - delete tmp; -#elif defined(ACORN) -#elif defined(MACOS) -#else - if (dir) - rewinddir(dir); -#ifdef VMS - needParent = strchr(path->getCString(), '[') != NULL; -#endif -#endif -} diff --git a/Build/source/libs/poppler/poppler-src/goo/gfile.h b/Build/source/libs/poppler/poppler-src/goo/gfile.h deleted file mode 100644 index 25595aae6d4..00000000000 --- a/Build/source/libs/poppler/poppler-src/goo/gfile.h +++ /dev/null @@ -1,221 +0,0 @@ -//======================================================================== -// -// gfile.h -// -// Miscellaneous file and directory name manipulation. -// -// Copyright 1996-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2006 Kristian Høgsberg <krh@redhat.com> -// Copyright (C) 2009, 2011, 2012, 2017, 2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2009 Kovid Goyal <kovid@kovidgoyal.net> -// Copyright (C) 2013 Adam Reichold <adamreichold@myopera.com> -// Copyright (C) 2013, 2017 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2014 Bogdan Cristea <cristeab@gmail.com> -// Copyright (C) 2014 Peter Breitenlohner <peb@mppmu.mpg.de> -// Copyright (C) 2017 Christoph Cullmann <cullmann@kde.org> -// Copyright (C) 2017 Thomas Freitag <Thomas.Freitag@alfa.de> -// Copyright (C) 2018 Mojca Miklavec <mojca@macports.org> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef GFILE_H -#define GFILE_H - -#include "poppler-config.h" -#include <stdio.h> -#include <stdlib.h> -#include <stddef.h> -#include <time.h> -extern "C" { -#if defined(_WIN32) -# include <sys/stat.h> -# ifdef FPTEX -# include <win32lib.h> -# else -# ifndef NOMINMAX -# define NOMINMAX -# endif -# include <windows.h> -# endif -#elif defined(ACORN) -#else -# include <unistd.h> -# include <sys/types.h> -# if defined(VMS) -# include "vms_dirent.h" -# elif defined(HAVE_DIRENT_H) -# include <dirent.h> -# define NAMLEN(d) strlen((d)->d_name) -# else -# define dirent direct -# define NAMLEN(d) (d)->d_namlen -# ifdef HAVE_SYS_NDIR_H -# include <sys/ndir.h> -# endif -# ifdef HAVE_SYS_DIR_H -# include <sys/dir.h> -# endif -# ifdef HAVE_NDIR_H -# include <ndir.h> -# endif -# endif -#endif -} -#include "gtypes.h" - -class GooString; - -//------------------------------------------------------------------------ - -// Get current directory. -extern GooString *getCurrentDir(); - -// Append a file name to a path string. <path> may be an empty -// string, denoting the current directory). Returns <path>. -extern GooString *appendToPath(GooString *path, const char *fileName); - -// Grab the path from the front of the file name. If there is no -// directory component in <fileName>, returns an empty string. -extern GooString *grabPath(char *fileName); - -// Is this an absolute path or file name? -extern GBool isAbsolutePath(char *path); - -// Get the modification time for <fileName>. Returns 0 if there is an -// error. -extern time_t getModTime(char *fileName); - -// Create a temporary file and open it for writing. If <ext> is not -// NULL, it will be used as the file name extension. Returns both the -// name and the file pointer. For security reasons, all writing -// should be done to the returned file pointer; the file may be -// reopened later for reading, but not for writing. The <mode> string -// should be "w" or "wb". Returns true on success. -extern GBool openTempFile(GooString **name, FILE **f, const char *mode); - -#ifdef _WIN32 -// Convert a file name from Latin-1 to UTF-8. -extern GooString *fileNameToUTF8(char *path); - -// Convert a file name from UCS-2 to UTF-8. -extern GooString *fileNameToUTF8(wchar_t *path); -#endif - -// Open a file. On Windows, this converts the path from UTF-8 to -// UCS-2 and calls _wfopen (if available). On other OSes, this simply -// calls fopen. -extern FILE *openFile(const char *path, const char *mode); - -// Just like fgets, but handles Unix, Mac, and/or DOS end-of-line -// conventions. -extern char *getLine(char *buf, int size, FILE *f); - -// Like fseek/ftell but uses platform specific variants that support large files -extern int Gfseek(FILE *f, Goffset offset, int whence); -extern Goffset Gftell(FILE *f); - -// Largest offset supported by Gfseek/Gftell -extern Goffset GoffsetMax(); - -//------------------------------------------------------------------------ -// GooFile -//------------------------------------------------------------------------ - -class GooFile -{ -public: - GooFile(const GooFile &) = delete; - GooFile& operator=(const GooFile &other) = delete; - - int read(char *buf, int n, Goffset offset) const; - Goffset size() const; - - static GooFile *open(const GooString *fileName); - -#ifdef _WIN32 - static GooFile *open(const wchar_t *fileName); - - ~GooFile() { CloseHandle(handle); } - - // Asuming than on windows you can't change files that are already open - bool modificationTimeChangedSinceOpen() const; - -private: - GooFile(HANDLE handleA); - HANDLE handle; - struct _FILETIME modifiedTimeOnOpen; -#else - ~GooFile() { close(fd); } - - bool modificationTimeChangedSinceOpen() const; - -private: - GooFile(int fdA); - int fd; - struct timespec modifiedTimeOnOpen; -#endif // _WIN32 -}; - -//------------------------------------------------------------------------ -// GDir and GDirEntry -//------------------------------------------------------------------------ - -class GDirEntry { -public: - - GDirEntry(char *dirPath, char *nameA, GBool doStat); - ~GDirEntry(); - GooString *getName() { return name; } - GooString *getFullPath() { return fullPath; } - GBool isDir() { return dir; } - -private: - GDirEntry(const GDirEntry &other); - GDirEntry& operator=(const GDirEntry &other); - - GooString *name; // dir/file name - GooString *fullPath; - GBool dir; // is it a directory? -}; - -class GDir { -public: - - GDir(char *name, GBool doStatA = gTrue); - ~GDir(); - GDirEntry *getNextEntry(); - void rewind(); - -private: - GDir(const GDir &other); - GDir& operator=(const GDir &other); - - GooString *path; // directory path - GBool doStat; // call stat() for each entry? -#if defined(_WIN32) - WIN32_FIND_DATAA ffd; - HANDLE hnd; -#elif defined(ACORN) -#elif defined(MACOS) -#else - DIR *dir; // the DIR structure from opendir() -#ifdef VMS - GBool needParent; // need to return an entry for [-] -#endif -#endif -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/goo/glibc.cc b/Build/source/libs/poppler/poppler-src/goo/glibc.cc deleted file mode 100644 index 4968047feea..00000000000 --- a/Build/source/libs/poppler/poppler-src/goo/glibc.cc +++ /dev/null @@ -1,58 +0,0 @@ -//======================================================================== -// -// glibc.h -// -// Emulate various non-portable glibc functions. -// -// This file is licensed under the GPLv2 or later -// -// Copyright (C) 2016 Adrian Johnson <ajohnson@redneon.com> -// -//======================================================================== - -#include "glibc.h" - -#ifndef HAVE_GMTIME_R -struct tm *gmtime_r(const time_t *timep, struct tm *result) -{ - struct tm *gt; - gt = gmtime(timep); - if (gt) - *result = *gt; - return gt; -} -#endif - -#ifndef HAVE_LOCALTIME_R -struct tm *localtime_r(const time_t *timep, struct tm *result) -{ - struct tm *lt; - lt = localtime(timep); - *result = *lt; - return lt; -} -#endif - -#ifndef HAVE_TIMEGM -// Get offset of local time from UTC in seconds. DST is ignored. -static time_t getLocalTimeZoneOffset() -{ - time_t utc, local; - struct tm tm_utc; - time (&utc); - gmtime_r(&utc, &tm_utc); - local = mktime(&tm_utc); - return difftime(utc, local); -} - -time_t timegm(struct tm *tm) -{ - tm->tm_isdst = 0; - time_t t = mktime(tm); - if (t == -1) - return t; - - t += getLocalTimeZoneOffset(); - return t; -} -#endif diff --git a/Build/source/libs/poppler/poppler-src/goo/glibc.h b/Build/source/libs/poppler/poppler-src/goo/glibc.h deleted file mode 100644 index ccbd87364eb..00000000000 --- a/Build/source/libs/poppler/poppler-src/goo/glibc.h +++ /dev/null @@ -1,38 +0,0 @@ -//======================================================================== -// -// glibc.h -// -// Emulate various non-portable glibc functions. -// -// This file is licensed under the GPLv2 or later -// -// Copyright (C) 2016, 2017 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2017 Albert Astals Cid <aacid@kde.org> -// -//======================================================================== - -#ifndef GLIBC_H -#define GLIBC_H - -#include "config.h" - -#include <time.h> - -#ifndef HAVE_GMTIME_R -struct tm *gmtime_r(const time_t *timep, struct tm *result); -#endif - -#ifndef HAVE_LOCALTIME_R -struct tm *localtime_r(const time_t *timep, struct tm *result); -#endif - -#ifndef HAVE_TIMEGM -time_t timegm(struct tm *tm); -#endif - -#ifndef HAVE_STRTOK_R -char * strtok_r (char *s, const char *delim, char **save_ptr); -#endif - -#endif // GLIBC_H - diff --git a/Build/source/libs/poppler/poppler-src/goo/glibc_strtok_r.cc b/Build/source/libs/poppler/poppler-src/goo/glibc_strtok_r.cc deleted file mode 100644 index e323bc21b4c..00000000000 --- a/Build/source/libs/poppler/poppler-src/goo/glibc_strtok_r.cc +++ /dev/null @@ -1,98 +0,0 @@ -/* Reentrant string tokenizer. Generic version. - Copyright (C) 1991,1996-1999,2001,2004 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -/* Copyright (C) 1991,93,96,97,99,2000,2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Based on strlen implementation by Torbjorn Granlund (tege@sics.se), - with help from Dan Sahlin (dan@sics.se) and - commentary by Jim Blandy (jimb@ai.mit.edu); - adaptation to memchr suggested by Dick Karpinski (dick@cca.ucsf.edu), - and implemented by Roland McGrath (roland@ai.mit.edu). - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2012 Alexey Pavlov <alexpux@gmail.com> -// Copyright (C) 2012 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2017 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2017 Pekka Vuorela <pekka.vuorela@jollamobile.com> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include "glibc.h" - -#ifndef HAVE_STRTOK_R - -#include <string.h> - -#define __rawmemchr strchr - -char * strtok_r (char *s, const char *delim, char **save_ptr) -{ - char *token; - - if (s == NULL) - s = *save_ptr; - - /* Scan leading delimiters. */ - s += strspn (s, delim); - if (*s == '\0') - { - *save_ptr = s; - return NULL; - } - - /* Find the end of the token. */ - token = s; - s = strpbrk (token, delim); - if (s == NULL) - /* This token finishes the string. */ - *save_ptr = __rawmemchr (token, '\0'); - else - { - /* Terminate the token and make *SAVE_PTR point past it. */ - *s = '\0'; - *save_ptr = s + 1; - } - return token; -} - -#endif diff --git a/Build/source/libs/poppler/poppler-src/goo/gmem.cc b/Build/source/libs/poppler/poppler-src/goo/gmem.cc deleted file mode 100644 index f118fd715d4..00000000000 --- a/Build/source/libs/poppler/poppler-src/goo/gmem.cc +++ /dev/null @@ -1,322 +0,0 @@ -/* - * gmem.c - * - * Memory routines with out-of-memory checking. - * - * Copyright 1996-2003 Glyph & Cog, LLC - */ - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2005 Takashi Iwai <tiwai@suse.de> -// Copyright (C) 2007-2010, 2012 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2008 Jonathan Kew <jonathan_kew@sil.org> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include <config.h> -#include <stdio.h> -#include <stdlib.h> -#include <stddef.h> -#include <string.h> -#include <limits.h> -#include "gmem.h" - -#ifdef DEBUG_MEM - -typedef struct _GMemHdr { - unsigned int magic; - int size; - int index; - struct _GMemHdr *next, *prev; -} GMemHdr; - -#define gMemHdrSize ((sizeof(GMemHdr) + 7) & ~7) -#define gMemTrlSize (sizeof(long)) - -#define gMemMagic 0xabcd9999 - -#if gmemTrlSize==8 -#define gMemDeadVal 0xdeadbeefdeadbeefUL -#else -#define gMemDeadVal 0xdeadbeefUL -#endif - -/* round data size so trailer will be aligned */ -#define gMemDataSize(size) \ - ((((size) + gMemTrlSize - 1) / gMemTrlSize) * gMemTrlSize) - -static GMemHdr *gMemHead = NULL; -static GMemHdr *gMemTail = NULL; - -static int gMemIndex = 0; -static int gMemAlloc = 0; -static int gMemInUse = 0; - -#endif /* DEBUG_MEM */ - -inline static void *gmalloc(size_t size, bool checkoverflow) { -#ifdef DEBUG_MEM - int size1; - char *mem; - GMemHdr *hdr; - void *data; - unsigned long *trl, *p; - - if (size == 0) { - return NULL; - } - size1 = gMemDataSize(size); - if (!(mem = (char *)malloc(size1 + gMemHdrSize + gMemTrlSize))) { - fprintf(stderr, "Out of memory\n"); - if (checkoverflow) return NULL; - else exit(1); - } - hdr = (GMemHdr *)mem; - data = (void *)(mem + gMemHdrSize); - trl = (unsigned long *)(mem + gMemHdrSize + size1); - hdr->magic = gMemMagic; - hdr->size = size; - hdr->index = gMemIndex++; - if (gMemTail) { - gMemTail->next = hdr; - hdr->prev = gMemTail; - gMemTail = hdr; - } else { - hdr->prev = NULL; - gMemHead = gMemTail = hdr; - } - hdr->next = NULL; - ++gMemAlloc; - gMemInUse += size; - for (p = (unsigned long *)data; p <= trl; ++p) { - *p = gMemDeadVal; - } - return data; -#else - void *p; - - if (size == 0) { - return nullptr; - } - if (!(p = malloc(size))) { - fprintf(stderr, "Out of memory\n"); - if (checkoverflow) return nullptr; - else exit(1); - } - return p; -#endif -} - -void *gmalloc(size_t size) { - return gmalloc(size, false); -} - -void *gmalloc_checkoverflow(size_t size) { - return gmalloc(size, true); -} - -inline static void *grealloc(void *p, size_t size, bool checkoverflow) { -#ifdef DEBUG_MEM - GMemHdr *hdr; - void *q; - int oldSize; - - if (size == 0) { - if (p) { - gfree(p); - } - return NULL; - } - if (p) { - hdr = (GMemHdr *)((char *)p - gMemHdrSize); - oldSize = hdr->size; - q = gmalloc(size, checkoverflow); - memcpy(q, p, size < oldSize ? size : oldSize); - gfree(p); - } else { - q = gmalloc(size, checkoverflow); - } - return q; -#else - void *q; - - if (size == 0) { - if (p) { - free(p); - } - return nullptr; - } - if (p) { - q = realloc(p, size); - } else { - q = malloc(size); - } - if (!q) { - fprintf(stderr, "Out of memory\n"); - if (checkoverflow) return nullptr; - else exit(1); - } - return q; -#endif -} - -void *grealloc(void *p, size_t size) { - return grealloc(p, size, false); -} - -void *grealloc_checkoverflow(void *p, size_t size) { - return grealloc(p, size, true); -} - -inline static void *gmallocn(int nObjs, int objSize, bool checkoverflow) { - if (nObjs == 0) { - return nullptr; - } - if (objSize <= 0 || nObjs < 0 || nObjs >= INT_MAX / objSize) { - fprintf(stderr, "Bogus memory allocation size\n"); - if (checkoverflow) return nullptr; - else exit(1); - } - const int n = nObjs * objSize; - return gmalloc(n, checkoverflow); -} - -void *gmallocn(int nObjs, int objSize) { - return gmallocn(nObjs, objSize, false); -} - -void *gmallocn_checkoverflow(int nObjs, int objSize) { - return gmallocn(nObjs, objSize, true); -} - -inline static void *gmallocn3(int a, int b, int c, bool checkoverflow) { - int n = a * b; - if (b <= 0 || a < 0 || a >= INT_MAX / b) { - fprintf(stderr, "Bogus memory allocation size\n"); - if (checkoverflow) return nullptr; - else exit(1); - } - return gmallocn(n, c, checkoverflow); -} - -void *gmallocn3(int a, int b, int c) { - return gmallocn3(a, b, c, false); -} - -void *gmallocn3_checkoverflow(int a, int b, int c) { - return gmallocn3(a, b, c, true); -} - -inline static void *greallocn(void *p, int nObjs, int objSize, bool checkoverflow) { - if (nObjs == 0) { - if (p) { - gfree(p); - } - return nullptr; - } - if (objSize <= 0 || nObjs < 0 || nObjs >= INT_MAX / objSize) { - fprintf(stderr, "Bogus memory allocation size\n"); - if (checkoverflow) { - gfree(p); - return nullptr; - } else { - exit(1); - } - } - const int n = nObjs * objSize; - return grealloc(p, n, checkoverflow); -} - -void *greallocn(void *p, int nObjs, int objSize) { - return greallocn(p, nObjs, objSize, false); -} - -void *greallocn_checkoverflow(void *p, int nObjs, int objSize) { - return greallocn(p, nObjs, objSize, true); -} - -void gfree(void *p) { -#ifdef DEBUG_MEM - int size; - GMemHdr *hdr; - unsigned long *trl, *clr; - - if (p) { - hdr = (GMemHdr *)((char *)p - gMemHdrSize); - if (hdr->magic == gMemMagic && - ((hdr->prev == NULL) == (hdr == gMemHead)) && - ((hdr->next == NULL) == (hdr == gMemTail))) { - if (hdr->prev) { - hdr->prev->next = hdr->next; - } else { - gMemHead = hdr->next; - } - if (hdr->next) { - hdr->next->prev = hdr->prev; - } else { - gMemTail = hdr->prev; - } - --gMemAlloc; - gMemInUse -= hdr->size; - size = gMemDataSize(hdr->size); - trl = (unsigned long *)((char *)hdr + gMemHdrSize + size); - if (*trl != gMemDeadVal) { - fprintf(stderr, "Overwrite past end of block %d at address %p\n", - hdr->index, p); - } - for (clr = (unsigned long *)hdr; clr <= trl; ++clr) { - *clr = gMemDeadVal; - } - free(hdr); - } else { - fprintf(stderr, "Attempted to free bad address %p\n", p); - } - } -#else - if (p) { - free(p); - } -#endif -} - -#ifdef DEBUG_MEM -void gMemReport(FILE *f) { - GMemHdr *p; - - fprintf(f, "%d memory allocations in all\n", gMemIndex); - if (gMemAlloc > 0) { - fprintf(f, "%d memory blocks left allocated:\n", gMemAlloc); - fprintf(f, " index size\n"); - fprintf(f, "-------- --------\n"); - for (p = gMemHead; p; p = p->next) { - fprintf(f, "%8d %8d\n", p->index, p->size); - } - } else { - fprintf(f, "No memory blocks left allocated\n"); - } -} -#endif - -char *copyString(const char *s) { - char *s1; - - s1 = (char *)gmalloc(strlen(s) + 1); - strcpy(s1, s); - return s1; -} - -char *gstrndup(const char *s, size_t n) { - char *s1 = (char*)gmalloc(n + 1); /* cannot return NULL for size > 0 */ - s1[n] = '\0'; - memcpy(s1, s, n); - return s1; -} diff --git a/Build/source/libs/poppler/poppler-src/goo/gmem.h b/Build/source/libs/poppler/poppler-src/goo/gmem.h deleted file mode 100644 index 4c76f0fb65e..00000000000 --- a/Build/source/libs/poppler/poppler-src/goo/gmem.h +++ /dev/null @@ -1,92 +0,0 @@ -/* - * gmem.h - * - * Memory routines with out-of-memory checking. - * - * Copyright 1996-2003 Glyph & Cog, LLC - */ - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2005 Takashi Iwai <tiwai@suse.de> -// Copyright (C) 2007-2010, 2017 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2008 Jonathan Kew <jonathan_kew@sil.org> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef GMEM_H -#define GMEM_H - -#include <stdio.h> -#include "poppler-config.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Same as malloc, but prints error message and exits if malloc() - * returns NULL. - */ -extern void *gmalloc(size_t size); -extern void *gmalloc_checkoverflow(size_t size); - -/* - * Same as realloc, but prints error message and exits if realloc() - * returns NULL. If <p> is NULL, calls malloc instead of realloc(). - */ -extern void *grealloc(void *p, size_t size); -extern void *grealloc_checkoverflow(void *p, size_t size); - -/* - * These are similar to gmalloc and grealloc, but take an object count - * and size. The result is similar to allocating nObjs * objSize - * bytes, but there is an additional error check that the total size - * doesn't overflow an int. - * The gmallocn_checkoverflow variant returns NULL instead of exiting - * the application if a overflow is detected - */ -extern void *gmallocn(int nObjs, int objSize); -extern void *gmallocn_checkoverflow(int nObjs, int objSize); -extern void *gmallocn3(int a, int b, int c); -extern void *gmallocn3_checkoverflow(int a, int b, int c); -extern void *greallocn(void *p, int nObjs, int objSize); -extern void *greallocn_checkoverflow(void *p, int nObjs, int objSize); - -/* - * Same as free, but checks for and ignores NULL pointers. - */ -extern void gfree(void *p); - -#ifdef DEBUG_MEM -/* - * Report on unfreed memory. - */ -extern void gMemReport(FILE *f); -#else -#define gMemReport(f) -#endif - -/* - * Allocate memory and copy a string into it. - */ -extern char *copyString(const char *s); - -/* - * Allocate memory and copy a limited-length string to it. - */ -extern char *gstrndup(const char *s, size_t n); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/Build/source/libs/poppler/poppler-src/goo/gmempp.cc b/Build/source/libs/poppler/poppler-src/goo/gmempp.cc deleted file mode 100644 index a70338ca3ce..00000000000 --- a/Build/source/libs/poppler/poppler-src/goo/gmempp.cc +++ /dev/null @@ -1,32 +0,0 @@ -//======================================================================== -// -// gmempp.cc -// -// Use gmalloc/gfree for C++ new/delete operators. -// -// Copyright 1996-2003 Glyph & Cog, LLC -// -//======================================================================== - -#include <config.h> -#include "gmem.h" - -#ifdef DEBUG_MEM - -void *operator new(size_t size) { - return gmalloc((int)size); -} - -void *operator new[](size_t size) { - return gmalloc((int)size); -} - -void operator delete(void *p) { - gfree(p); -} - -void operator delete[](void *p) { - gfree(p); -} - -#endif diff --git a/Build/source/libs/poppler/poppler-src/goo/grandom.cc b/Build/source/libs/poppler/poppler-src/goo/grandom.cc deleted file mode 100644 index 3171af85ec3..00000000000 --- a/Build/source/libs/poppler/poppler-src/goo/grandom.cc +++ /dev/null @@ -1,70 +0,0 @@ -/* - * grandom.cc - * - * This file is licensed under the GPLv2 or later - * - * Pseudo-random number generation - * - * Copyright (C) 2012 Fabio D'Urso <fabiodurso@hotmail.it> - */ - -#include <config.h> -#include "grandom.h" -#include "gtypes.h" - -#ifdef HAVE_RAND_R // rand_r backend (POSIX) - -static GBool initialized = gFalse; - -#include <stdlib.h> -#include <time.h> -static unsigned int seed; - -static void initialize() { - if (!initialized) { - seed = time(nullptr); - initialized = gTrue; - } -} - -void grandom_fill(Guchar *buff, int size) -{ - initialize(); - while (size--) - *buff++ = rand_r(&seed) % 256; -} - -double grandom_double() -{ - initialize(); - return rand_r(&seed) / (1 + (double)RAND_MAX); -} - -#else // srand+rand backend (unsafe, because it may interfere with the application) - -static GBool initialized = gFalse; - -#include <stdlib.h> -#include <time.h> - -static void initialize() { - if (!initialized) { - srand(time(nullptr)); - initialized = gTrue; - } -} - -void grandom_fill(Guchar *buff, int size) -{ - initialize(); - while (size--) - *buff++ = rand() % 256; -} - -double grandom_double() -{ - initialize(); - return rand() / (1 + (double)RAND_MAX); -} - -#endif diff --git a/Build/source/libs/poppler/poppler-src/goo/grandom.h b/Build/source/libs/poppler/poppler-src/goo/grandom.h deleted file mode 100644 index 45fa791aba8..00000000000 --- a/Build/source/libs/poppler/poppler-src/goo/grandom.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * grandom.h - * - * This file is licensed under the GPLv2 or later - * - * Pseudo-random number generation - * - * Copyright (C) 2012 Fabio D'Urso <fabiodurso@hotmail.it> - */ - -#ifndef GRANDOM_H -#define GRANDOM_H - -#include "gtypes.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Fills the given buffer with random bytes - */ -extern void grandom_fill(Guchar *buff, int size); - -/* - * Returns a random number in [0,1) - */ -extern double grandom_double(); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/Build/source/libs/poppler/poppler-src/goo/gstrtod.cc b/Build/source/libs/poppler/poppler-src/goo/gstrtod.cc deleted file mode 100644 index a1062821218..00000000000 --- a/Build/source/libs/poppler/poppler-src/goo/gstrtod.cc +++ /dev/null @@ -1,147 +0,0 @@ -/* This file is part of Libspectre. - * - * Copyright (C) 2007, 2012 Albert Astals Cid <aacid@kde.org> - * Copyright (C) 2007 Carlos Garcia Campos <carlosgc@gnome.org> - * - * Libspectre is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * Libspectre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -/* This function comes from spectre-utils from libspectre */ - -#include "gstrtod.h" - -#include <locale.h> -#include <errno.h> -#include <stdlib.h> -#include <string.h> - -#define ascii_isspace(c) \ - (c == ' ' || c == '\f' || c == '\n' || c == '\r' || c == '\t' || c == '\v') -#define ascii_isdigit(c) \ - (c >= '0' && c <= '9') - -double gatof(const char *nptr) -{ - return gstrtod(nptr, nullptr); -} - -double gstrtod(const char *nptr, char **endptr) -{ - char *fail_pos; - double val; - struct lconv *locale_data; - const char *decimal_point; - int decimal_point_len; - const char *p, *decimal_point_pos; - const char *end = nullptr; /* Silence gcc */ - int strtod_errno; - - fail_pos = nullptr; - - locale_data = localeconv (); - decimal_point = locale_data->decimal_point; - decimal_point_len = strlen (decimal_point); - - decimal_point_pos = nullptr; - end = nullptr; - - if (decimal_point[0] != '.' || decimal_point[1] != 0) { - p = nptr; - /* Skip leading space */ - while (ascii_isspace (*p)) - p++; - - /* Skip leading optional sign */ - if (*p == '+' || *p == '-') - p++; - - if (ascii_isdigit (*p) || *p == '.') { - while (ascii_isdigit (*p)) - p++; - - if (*p == '.') - decimal_point_pos = p++; - - while (ascii_isdigit (*p)) - p++; - - if (*p == 'e' || *p == 'E') - p++; - if (*p == '+' || *p == '-') - p++; - while (ascii_isdigit (*p)) - p++; - - end = p; - } - /* For the other cases, we need not convert the decimal point */ - } - - if (decimal_point_pos) { - char *copy, *c; - - /* We need to convert the '.' to the locale specific decimal point */ - copy = (char *) malloc (end - nptr + 1 + decimal_point_len); - - c = copy; - memcpy (c, nptr, decimal_point_pos - nptr); - c += decimal_point_pos - nptr; - memcpy (c, decimal_point, decimal_point_len); - c += decimal_point_len; - memcpy (c, decimal_point_pos + 1, end - (decimal_point_pos + 1)); - c += end - (decimal_point_pos + 1); - *c = 0; - - errno = 0; - val = strtod (copy, &fail_pos); - strtod_errno = errno; - - if (fail_pos) { - if (fail_pos - copy > decimal_point_pos - nptr) - fail_pos = (char *)nptr + (fail_pos - copy) - (decimal_point_len - 1); - else - fail_pos = (char *)nptr + (fail_pos - copy); - } - - free (copy); - } else if (end) { - char *copy; - - copy = (char *) malloc (end - (char *)nptr + 1); - memcpy (copy, nptr, end - nptr); - *(copy + (end - (char *)nptr)) = 0; - - errno = 0; - val = strtod (copy, &fail_pos); - strtod_errno = errno; - - if (fail_pos) { - fail_pos = (char *)nptr + (fail_pos - copy); - } - - free (copy); - } else { - errno = 0; - val = strtod (nptr, &fail_pos); - strtod_errno = errno; - } - - if (endptr) - *endptr = fail_pos; - - errno = strtod_errno; - - return val; -} diff --git a/Build/source/libs/poppler/poppler-src/goo/gstrtod.h b/Build/source/libs/poppler/poppler-src/goo/gstrtod.h deleted file mode 100644 index e8abdadf53e..00000000000 --- a/Build/source/libs/poppler/poppler-src/goo/gstrtod.h +++ /dev/null @@ -1,43 +0,0 @@ -/* This file is part of Libspectre. - * - * Copyright (C) 2007 Albert Astals Cid <aacid@kde.org> - * Copyright (C) 2007 Carlos Garcia Campos <carlosgc@gnome.org> - * - * Libspectre is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * Libspectre is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -/* This function comes from spectre-utils from libspectre */ - -#ifndef GSTRTOD_H -#define GSTRTOD_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* This function behaves like the standard atof()/(strtod() function - * does in the C locale. It does this without actually changing - * the current locale, since that would not be thread-safe. - * A limitation of the implementation is that this function - * will still accept localized versions of infinities and NANs. - */ -double gatof(const char *nptr); -double gstrtod(const char *nptr, char **endptr); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/Build/source/libs/poppler/poppler-src/goo/gtypes.h b/Build/source/libs/poppler/poppler-src/goo/gtypes.h deleted file mode 100644 index a8d4519497e..00000000000 --- a/Build/source/libs/poppler/poppler-src/goo/gtypes.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * gtypes.h - * - * Some useful simple types. - * - * Copyright 1996-2003 Glyph & Cog, LLC - */ - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2010 Patrick Spendrin <ps_ml@gmx.de> -// Copyright (C) 2010 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2013 Adrian Johnson <ajohnson@redneon.com> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef GTYPES_H -#define GTYPES_H - -#include "poppler-config.h" - -/* - * These have stupid names to avoid conflicts with some (but not all) - * C++ compilers which define them. - */ -typedef bool GBool; -#define gTrue true -#define gFalse false - -#ifdef _MSC_VER -#pragma warning(disable: 4800) /* 'type' : forcing value to bool 'true' or 'false' (performance warning) */ -#endif - -/* - * These have stupid names to avoid conflicts with <sys/types.h>, - * which on various systems defines some random subset of these. - */ -typedef unsigned char Guchar; -typedef unsigned short Gushort; -typedef unsigned int Guint; -typedef unsigned long Gulong; -typedef long long Goffset; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/gtkdoc.py b/Build/source/libs/poppler/poppler-src/gtkdoc.py deleted file mode 100644 index cc73ffc1bc3..00000000000 --- a/Build/source/libs/poppler/poppler-src/gtkdoc.py +++ /dev/null @@ -1,447 +0,0 @@ -# Copyright (C) 2011 Igalia S.L. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -import errno -import logging -import os -import os.path -import subprocess -import sys - -PY2 = sys.version_info[0] == 2 - -class GTKDoc(object): - - """Class that controls a gtkdoc run. - - Each instance of this class represents one gtkdoc configuration - and set of documentation. The gtkdoc package is a series of tools - run consecutively which converts inline C/C++ documentation into - docbook files and then into HTML. This class is suitable for - generating documentation or simply verifying correctness. - - Keyword arguments: - output_dir -- The path where gtkdoc output should be placed. Generation - may overwrite file in this directory. Required. - module_name -- The name of the documentation module. For libraries this - is typically the library name. Required if not library path - is given. - source_dirs -- A list of paths to directories of source code to be scanned. - Required if headers is not specified. - ignored_files -- A list of filenames to ignore in the source directory. It is - only necessary to provide the basenames of these files. - Typically it is important to provide an updated list of - ignored files to prevent warnings about undocumented symbols. - headers -- A list of paths to headers to be scanned. Required if source_dirs - is not specified. - namespace -- The library namespace. - decorator -- If a decorator is used to unhide certain symbols in header - files this parameter is required for successful scanning. - (default '') - deprecation_guard -- gtkdoc tries to ensure that symbols marked as deprecated - are encased in this C preprocessor define. This is required - to avoid gtkdoc warnings. (default '') - cflags -- This parameter specifies any preprocessor flags necessary for - building the scanner binary during gtkdoc-scanobj. Typically - this includes all absolute include paths necessary to resolve - all header dependencies. (default '') - ldflags -- This parameter specifies any linker flags necessary for - building the scanner binary during gtkdoc-scanobj. Typically - this includes "-lyourlibraryname". (default '') - library_path -- This parameter specifies the path to the directory where you - library resides used for building the scanner binary during - gtkdoc-scanobj. (default '') - - doc_dir -- The path to other documentation files necessary to build - the documentation. This files in this directory as well as - the files in the 'html' subdirectory will be copied - recursively into the output directory. (default '') - main_sgml_file -- The path or name (if a doc_dir is given) of the SGML file - that is the considered the main page of your documentation. - (default: <module_name>-docs.sgml) - version -- The version number of the module. If this is provided, - a version.xml file containing the version will be created - in the output directory during documentation generation. - - interactive -- Whether or not errors or warnings should prompt the user - to continue or not. When this value is false, generation - will continue despite warnings. (default False) - - virtual_root -- A temporary installation directory which is used as the root - where the actual installation prefix lives; this is mostly - useful for packagers, and should be set to what is given to - make install as DESTDIR. - """ - - def __init__(self, args): - - # Parameters specific to scanning. - self.module_name = '' - self.source_dirs = [] - self.headers = [] - self.ignored_files = [] - self.namespace = '' - self.decorator = '' - self.deprecation_guard = '' - - # Parameters specific to gtkdoc-scanobj. - self.cflags = '' - self.ldflags = '' - self.library_path = '' - - # Parameters specific to generation. - self.output_dir = '' - self.doc_dir = '' - self.main_sgml_file = '' - - # Parameters specific to gtkdoc-fixxref. - self.cross_reference_deps = [] - - self.interactive = False - - self.logger = logging.getLogger('gtkdoc') - - for key, value in iter(args.items()): - setattr(self, key, value) - - if not getattr(self, 'output_dir'): - raise Exception('output_dir not specified.') - if not getattr(self, 'module_name'): - raise Exception('module_name not specified.') - if not getattr(self, 'source_dirs') and not getattr(self, 'headers'): - raise Exception('Neither source_dirs nor headers specified.' % key) - - # Make all paths absolute in case we were passed relative paths, since - # we change the current working directory when executing subcommands. - self.output_dir = os.path.abspath(self.output_dir) - self.source_dirs = [os.path.abspath(x) for x in self.source_dirs] - self.headers = [os.path.abspath(x) for x in self.headers] - if self.library_path: - self.library_path = os.path.abspath(self.library_path) - - if not self.main_sgml_file: - self.main_sgml_file = self.module_name + "-docs.sgml" - - def generate(self, html=True): - self.saw_warnings = False - - self._copy_doc_files_to_output_dir(html) - self._write_version_xml() - self._run_gtkdoc_scan() - self._run_gtkdoc_scangobj() - self._run_gtkdoc_mkdb() - - if not html: - return - - self._run_gtkdoc_mkhtml() - self._run_gtkdoc_fixxref() - - def _delete_file_if_exists(self, path): - if not os.access(path, os.F_OK | os.R_OK): - return - self.logger.debug('deleting %s', path) - os.unlink(path) - - def _create_directory_if_nonexistent(self, path): - try: - os.makedirs(path) - except OSError as error: - if error.errno != errno.EEXIST: - raise - - def _raise_exception_if_file_inaccessible(self, path): - if not os.path.exists(path) or not os.access(path, os.R_OK): - raise Exception("Could not access file at: %s" % path) - - def _output_has_warnings(self, outputs): - for output in outputs: - if output and output.find('warning'): - return True - return False - - def _ask_yes_or_no_question(self, question): - if not self.interactive: - return True - - question += ' [y/N] ' - answer = None - while answer != 'y' and answer != 'n' and answer != '': - answer = raw_input(question).lower() - return answer == 'y' - - def _run_command(self, args, env=None, cwd=None, print_output=True, ignore_warnings=False): - if print_output: - self.logger.debug("Running %s", args[0]) - self.logger.debug("Full command args: %s", str(args)) - - process = subprocess.Popen(args, env=env, cwd=cwd, - stdout=subprocess.PIPE, - stderr=subprocess.PIPE) - stdout, stderr = [b.decode("utf-8") for b in process.communicate()] - - if print_output: - if stdout: - if PY2: - try: - sys.stdout.write(stdout.encode("utf-8")) - except UnicodeDecodeError: - sys.stdout.write(stdout) - else: - sys.stdout.write(stdout) - if stderr: - if PY2: - try: - sys.stderr.write(stderr.encode("utf-8")) - except UnicodeDecodeError: - sys.stderr.write(stderr) - else: - sys.stderr.write(stderr) - - if process.returncode != 0: - raise Exception('%s produced a non-zero return code %i' - % (args[0], process.returncode)) - - if not ignore_warnings and ('warning' in stderr or 'warning' in stdout): - self.saw_warnings = True - if not self._ask_yes_or_no_question('%s produced warnings, ' - 'try to continue?' % args[0]): - raise Exception('%s step failed' % args[0]) - - return stdout.strip() - - def _copy_doc_files_to_output_dir(self, html=True): - if not self.doc_dir: - self.logger.info('Not copying any files from doc directory,' - ' because no doc directory given.') - return - - def copy_file_replacing_existing(src, dest): - if os.path.isdir(src): - self.logger.debug('skipped directory %s', src) - return - if not os.access(src, os.F_OK | os.R_OK): - self.logger.debug('skipped unreadable %s', src) - return - - self._delete_file_if_exists(dest) - - self.logger.debug('created %s', dest) - try: - os.link(src, dest) - except OSError: - os.symlink(src, dest) - - def copy_all_files_in_directory(src, dest): - for path in os.listdir(src): - copy_file_replacing_existing(os.path.join(src, path), - os.path.join(dest, path)) - - self.logger.debug('Copying template files to output directory...') - self._create_directory_if_nonexistent(self.output_dir) - copy_all_files_in_directory(self.doc_dir, self.output_dir) - - if not html: - return - - self.logger.debug('Copying HTML files to output directory...') - html_src_dir = os.path.join(self.doc_dir, 'html') - html_dest_dir = os.path.join(self.output_dir, 'html') - self._create_directory_if_nonexistent(html_dest_dir) - - if os.path.exists(html_src_dir): - copy_all_files_in_directory(html_src_dir, html_dest_dir) - - def _write_version_xml(self): - if not self.version: - self.logger.info('No version specified, so not writing version.xml') - return - - version_xml_path = os.path.join(self.output_dir, 'version.xml') - src_version_xml_path = os.path.join(self.doc_dir, 'version.xml') - - # Don't overwrite version.xml if it was in the doc directory. - if os.path.exists(version_xml_path) and \ - os.path.exists(src_version_xml_path): - return - - output_file = open(version_xml_path, 'w') - output_file.write(self.version) - output_file.close() - - def _ignored_files_basenames(self): - return ' '.join([os.path.basename(x) for x in self.ignored_files]) - - def _run_gtkdoc_scan(self): - args = ['gtkdoc-scan', - '--module=%s' % self.module_name, - '--rebuild-types'] - - if not self.headers: - # Each source directory should be have its own "--source-dir=" prefix. - args.extend(['--source-dir=%s' % path for path in self.source_dirs]) - - if self.decorator: - args.append('--ignore-decorators=%s' % self.decorator) - if self.deprecation_guard: - args.append('--deprecated-guards=%s' % self.deprecation_guard) - if self.output_dir: - args.append('--output-dir=%s' % self.output_dir) - - # We only need to pass the list of ignored files if the we are not using an explicit list of headers. - if not self.headers: - # gtkdoc-scan wants the basenames of ignored headers, so strip the - # dirname. Different from "--source-dir", the headers should be - # specified as one long string. - ignored_files_basenames = self._ignored_files_basenames() - if ignored_files_basenames: - args.append('--ignore-headers=%s' % ignored_files_basenames) - - if self.headers: - args.extend(self.headers) - - self._run_command(args) - - def _run_gtkdoc_scangobj(self): - env = os.environ - ldflags = self.ldflags - if self.library_path: - additional_ldflags = '' - for arg in env.get('LDFLAGS', '').split(' '): - if arg.startswith('-L'): - additional_ldflags = '%s %s' % (additional_ldflags, arg) - ldflags = ' "-L%s" %s ' % (self.library_path, additional_ldflags) + ldflags - current_ld_library_path = env.get('LD_LIBRARY_PATH') - if current_ld_library_path: - env['LD_LIBRARY_PATH'] = '%s:%s' % (self.library_path, current_ld_library_path) - else: - env['LD_LIBRARY_PATH'] = self.library_path - - if ldflags: - env['LDFLAGS'] = '%s %s' % (ldflags, env.get('LDFLAGS', '')) - if self.cflags: - env['CFLAGS'] = '%s %s' % (self.cflags, env.get('CFLAGS', '')) - - if 'CFLAGS' in env: - self.logger.debug('CFLAGS=%s', env['CFLAGS']) - if 'LDFLAGS' in env: - self.logger.debug('LDFLAGS %s', env['LDFLAGS']) - if 'RUN' in env: - self.logger.debug('RUN=%s', env['RUN']) - self._run_command(['gtkdoc-scangobj', '--module=%s' % self.module_name], - env=env, cwd=self.output_dir) - - def _run_gtkdoc_mkdb(self): - sgml_file = os.path.join(self.output_dir, self.main_sgml_file) - self._raise_exception_if_file_inaccessible(sgml_file) - - args = ['gtkdoc-mkdb', - '--module=%s' % self.module_name, - '--main-sgml-file=%s' % sgml_file, - '--source-suffixes=h,c,cpp,cc', - '--output-format=xml', - '--sgml-mode'] - - if self.namespace: - args.append('--name-space=%s' % self.namespace) - - ignored_files_basenames = self._ignored_files_basenames() - if ignored_files_basenames: - args.append('--ignore-files=%s' % ignored_files_basenames) - - # Each directory should be have its own "--source-dir=" prefix. - args.extend(['--source-dir=%s' % path for path in self.source_dirs]) - self._run_command(args, cwd=self.output_dir) - - def _run_gtkdoc_mkhtml(self): - html_dest_dir = os.path.join(self.output_dir, 'html') - if not os.path.isdir(html_dest_dir): - raise Exception("%s is not a directory, could not generate HTML" - % html_dest_dir) - elif not os.access(html_dest_dir, os.X_OK | os.R_OK | os.W_OK): - raise Exception("Could not access %s to generate HTML" - % html_dest_dir) - - # gtkdoc-mkhtml expects the SGML path to be absolute. - sgml_file = os.path.join(os.path.abspath(self.output_dir), - self.main_sgml_file) - self._raise_exception_if_file_inaccessible(sgml_file) - - self._run_command(['gtkdoc-mkhtml', self.module_name, sgml_file], - cwd=html_dest_dir) - - def _run_gtkdoc_fixxref(self): - args = ['gtkdoc-fixxref', - '--module=%s' % self.module_name, - '--module-dir=html', - '--html-dir=html'] - args.extend(['--extra-dir=%s' % extra_dir for extra_dir in self.cross_reference_deps]) - self._run_command(args, cwd=self.output_dir, ignore_warnings=True) - - def rebase_installed_docs(self): - if not os.path.isdir(self.output_dir): - raise Exception("Tried to rebase documentation before generating it.") - html_dir = os.path.join(self.virtual_root + self.prefix, 'share', 'gtk-doc', 'html', self.module_name) - if not os.path.isdir(html_dir): - return - args = ['gtkdoc-rebase', - '--relative', - '--html-dir=%s' % html_dir] - args.extend(['--other-dir=%s' % extra_dir for extra_dir in self.cross_reference_deps]) - if self.virtual_root: - args.extend(['--dest-dir=%s' % self.virtual_root]) - self._run_command(args, cwd=self.output_dir) - - def api_missing_documentation(self): - unused_doc_file = os.path.join(self.output_dir, self.module_name + "-unused.txt") - if not os.path.exists(unused_doc_file) or not os.access(unused_doc_file, os.R_OK): - return [] - return open(unused_doc_file).read().splitlines() - -class PkgConfigGTKDoc(GTKDoc): - - """Class reads a library's pkgconfig file to guess gtkdoc parameters. - - Some gtkdoc parameters can be guessed by reading a library's pkgconfig - file, including the cflags, ldflags and version parameters. If you - provide these parameters as well, they will be appended to the ones - guessed via the pkgconfig file. - - Keyword arguments: - pkg_config_path -- Path to the pkgconfig file for the library. Required. - """ - - def __init__(self, pkg_config_path, args): - super(PkgConfigGTKDoc, self).__init__(args) - - pkg_config = os.environ.get('PKG_CONFIG', 'pkg-config') - - if not os.path.exists(pkg_config_path): - raise Exception('Could not find pkg-config file at: %s' - % pkg_config_path) - - self.cflags += " " + self._run_command([pkg_config, - pkg_config_path, - '--cflags'], print_output=False) - self.ldflags += " " + self._run_command([pkg_config, - pkg_config_path, - '--libs'], print_output=False) - self.version = self._run_command([pkg_config, - pkg_config_path, - '--modversion'], print_output=False) - self.prefix = self._run_command([pkg_config, - pkg_config_path, - '--variable=prefix'], print_output=False) diff --git a/Build/source/libs/poppler/poppler-src/make-glib-api-docs b/Build/source/libs/poppler/poppler-src/make-glib-api-docs deleted file mode 100755 index 6fbe4494cf0..00000000000 --- a/Build/source/libs/poppler/poppler-src/make-glib-api-docs +++ /dev/null @@ -1,66 +0,0 @@ -#!/usr/bin/env python -# -# Copyright (C) 2017 Carlos Garcia Campos <carlosgc@gnome.org> -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -import argparse -import logging -import os -from gtkdoc import PkgConfigGTKDoc - -def configure_logging(verbose): - level = logging.DEBUG if verbose else logging.INFO - logger = logging.getLogger('gtkdoc') - logger.setLevel(level) - handler = logging.StreamHandler() - handler.setLevel(level) - logger.addHandler(handler) - if level == logging.DEBUG: - handler.setFormatter(logging.Formatter('[%(asctime)s] %(message)s')) - else: - handler.setFormatter(logging.Formatter('%(message)s')) - - -parser = argparse.ArgumentParser(description='Make poppler GLib API documentation.') -parser.add_argument('-v', '--verbose', action='store_true', default = False, - help='Whether or not to run in verbose mode.') -parser.add_argument('--skip-html', action='store_true', - help='Whether or not to skip HTML generation, which can be slow.') -parser.add_argument('-s', '--src-dir', action='store', default='.', dest='src_dir', - help='The source directory') -parser.add_argument('-b', '--build-dir', action='store', default='build', dest='build_dir', - help='The build directory') -args = parser.parse_args() -configure_logging(args.verbose) - -pkgconfig_file = os.path.join(args.build_dir, 'poppler-glib.pc') -pkgconfig_path = os.environ.get("PKG_CONFIG_PATH") -os.environ['PKG_CONFIG_PATH'] = args.build_dir -if pkgconfig_path: - os.environ['PKG_CONFIG_PATH'] += ':' + pkgconfig_path - -gtkdoc = PkgConfigGTKDoc(pkgconfig_file, { - 'library_path': os.path.join(args.build_dir, 'glib'), - 'module_name': 'poppler', - 'doc_dir': os.path.join(args.src_dir, 'glib', 'reference'), - 'output_dir': os.path.join(args.build_dir, 'glib', 'reference'), - 'main_sgml_file': 'poppler-docs.sgml', - 'source_dirs': [os.path.join(args.src_dir, 'glib')], - 'cflags': '-I%s' % os.path.join(args.src_dir, 'glib'), - 'ignored_files': ['poppler-private.h', 'poppler-input-stream.h', 'poppler-cached-file-loader.h', 'demo'] -}) - -gtkdoc.generate(not args.skip_html) diff --git a/Build/source/libs/poppler/poppler-src/poppler-cairo.pc.cmake b/Build/source/libs/poppler/poppler-src/poppler-cairo.pc.cmake deleted file mode 100644 index e68cceab381..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler-cairo.pc.cmake +++ /dev/null @@ -1,8 +0,0 @@ -prefix=@CMAKE_INSTALL_PREFIX@ -libdir=@CMAKE_INSTALL_FULL_LIBDIR@ -includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ - -Name: poppler-cairo -Description: Cairo backend for Poppler PDF rendering library -Version: @POPPLER_VERSION@ -Requires: poppler = @POPPLER_VERSION@ cairo >= @CAIRO_VERSION@ diff --git a/Build/source/libs/poppler/poppler-src/poppler-cpp.pc.cmake b/Build/source/libs/poppler/poppler-src/poppler-cpp.pc.cmake deleted file mode 100644 index 3eb68b3810c..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler-cpp.pc.cmake +++ /dev/null @@ -1,12 +0,0 @@ -prefix=@CMAKE_INSTALL_PREFIX@ -libdir=@CMAKE_INSTALL_FULL_LIBDIR@ -includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ - -Name: poppler-cpp -Description: cpp backend for Poppler PDF rendering library -Version: @POPPLER_VERSION@ -Requires: @PC_REQUIRES@ -@PC_REQUIRES_PRIVATE@ - -Libs: -L${libdir} -lpoppler-cpp -Cflags: -I${includedir}/poppler/cpp diff --git a/Build/source/libs/poppler/poppler-src/poppler-glib.pc.cmake b/Build/source/libs/poppler/poppler-src/poppler-glib.pc.cmake deleted file mode 100644 index ac248192509..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler-glib.pc.cmake +++ /dev/null @@ -1,12 +0,0 @@ -prefix=@CMAKE_INSTALL_PREFIX@ -libdir=@CMAKE_INSTALL_FULL_LIBDIR@ -includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ - -Name: poppler-glib -Description: GLib wrapper for poppler -Version: @POPPLER_VERSION@ -Requires: glib-2.0 >= @GLIB_REQUIRED@ gobject-2.0 >= @GLIB_REQUIRED@ cairo >= @CAIRO_VERSION@ -@PC_REQUIRES_PRIVATE@ - -Libs: -L${libdir} -lpoppler-glib -Cflags: -I${includedir}/poppler/glib diff --git a/Build/source/libs/poppler/poppler-src/poppler-qt5.pc.cmake b/Build/source/libs/poppler/poppler-src/poppler-qt5.pc.cmake deleted file mode 100644 index 94636892208..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler-qt5.pc.cmake +++ /dev/null @@ -1,12 +0,0 @@ -prefix=@CMAKE_INSTALL_PREFIX@ -libdir=@CMAKE_INSTALL_FULL_LIBDIR@ -includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ - -Name: poppler-qt5 -Description: Qt5 bindings for poppler -Version: @POPPLER_VERSION@ -Requires: @PC_REQUIRES@ -@PC_REQUIRES_PRIVATE@ - -Libs: -L${libdir} -lpoppler-qt5 -Cflags: -I${includedir}/poppler/qt5 diff --git a/Build/source/libs/poppler/poppler-src/poppler-splash.pc.cmake b/Build/source/libs/poppler/poppler-src/poppler-splash.pc.cmake deleted file mode 100644 index f9eceebe815..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler-splash.pc.cmake +++ /dev/null @@ -1,8 +0,0 @@ -prefix=@CMAKE_INSTALL_PREFIX@ -libdir=@CMAKE_INSTALL_FULL_LIBDIR@ -includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ - -Name: poppler-splash -Description: Splash backend for Poppler PDF rendering library -Version: @POPPLER_VERSION@ -Requires: poppler = @POPPLER_VERSION@ diff --git a/Build/source/libs/poppler/poppler-src/poppler.pc.cmake b/Build/source/libs/poppler/poppler-src/poppler.pc.cmake deleted file mode 100644 index 00b734883c3..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler.pc.cmake +++ /dev/null @@ -1,10 +0,0 @@ -prefix=@CMAKE_INSTALL_PREFIX@ -libdir=@CMAKE_INSTALL_FULL_LIBDIR@ -includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ - -Name: poppler -Description: PDF rendering library -Version: @POPPLER_VERSION@ - -Libs: -L${libdir} -lpoppler -Cflags: -I${includedir}/poppler diff --git a/Build/source/libs/poppler/poppler-src/poppler/Annot.cc b/Build/source/libs/poppler/poppler-src/poppler/Annot.cc deleted file mode 100644 index d37824c1d38..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/Annot.cc +++ /dev/null @@ -1,6951 +0,0 @@ -//======================================================================== -// -// Annot.cc -// -// Copyright 2000-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2006 Scott Turner <scotty1024@mac.com> -// Copyright (C) 2007, 2008 Julien Rebetez <julienr@svn.gnome.org> -// Copyright (C) 2007-2013, 2015-2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2007-2013 Carlos Garcia Campos <carlosgc@gnome.org> -// Copyright (C) 2007, 2008 Iñigo Martínez <inigomartinez@gmail.com> -// Copyright (C) 2007 Jeff Muizelaar <jeff@infidigm.net> -// Copyright (C) 2008, 2011 Pino Toscano <pino@kde.org> -// Copyright (C) 2008 Michael Vrable <mvrable@cs.ucsd.edu> -// Copyright (C) 2008 Hugo Mercier <hmercier31@gmail.com> -// Copyright (C) 2009 Ilya Gorenbein <igorenbein@finjan.com> -// Copyright (C) 2011, 2013 José Aliste <jaliste@src.gnome.org> -// Copyright (C) 2012, 2013 Fabio D'Urso <fabiodurso@hotmail.it> -// Copyright (C) 2012, 2013 Thomas Freitag <Thomas.Freitag@alfa.de> -// Copyright (C) 2012, 2015 Tobias Koenig <tokoe@kdab.com> -// Copyright (C) 2013 Peter Breitenlohner <peb@mppmu.mpg.de> -// Copyright (C) 2013, 2017 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2014, 2015 Marek Kasik <mkasik@redhat.com> -// Copyright (C) 2014 Jiri Slaby <jirislaby@gmail.com> -// Copyright (C) 2014 Anuj Khare <khareanuj18@gmail.com> -// Copyright (C) 2015 Petr Gajdos <pgajdos@suse.cz> -// Copyright (C) 2015 Philipp Reinkemeier <philipp.reinkemeier@offis.de> -// Copyright (C) 2015 Tamas Szekeres <szekerest@gmail.com> -// Copyright (C) 2017 Hans-Ulrich Jüttner <huj@froreich-bioscientia.de> -// 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 -// Copyright 2018 Andre Heinecke <aheinecke@intevation.de> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include <config.h> - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include <stdlib.h> -#include <math.h> -#include <assert.h> -#include "goo/gmem.h" -#include "goo/gstrtod.h" -#include "GooList.h" -#include "Error.h" -#include "Object.h" -#include "Catalog.h" -#include "Gfx.h" -#include "Lexer.h" -#include "PDFDoc.h" -#include "Page.h" -#include "Annot.h" -#include "GfxFont.h" -#include "CharCodeToUnicode.h" -#include "PDFDocEncoding.h" -#include "Form.h" -#include "Error.h" -#include "XRef.h" -#include "Movie.h" -#include "OptionalContent.h" -#include "Sound.h" -#include "FileSpec.h" -#include "DateInfo.h" -#include "Link.h" -#include <string.h> -#include <algorithm> - -#ifdef MULTITHREADED -# define annotLocker() MutexLocker locker(&mutex) -# define annotCondLocker(X) MutexLocker locker(&mutex, (X)) -#else -# define annotLocker() -# define annotCondLocker(X) -#endif - -#define fieldFlagReadOnly 0x00000001 -#define fieldFlagRequired 0x00000002 -#define fieldFlagNoExport 0x00000004 -#define fieldFlagMultiline 0x00001000 -#define fieldFlagPassword 0x00002000 -#define fieldFlagNoToggleToOff 0x00004000 -#define fieldFlagRadio 0x00008000 -#define fieldFlagPushbutton 0x00010000 -#define fieldFlagCombo 0x00020000 -#define fieldFlagEdit 0x00040000 -#define fieldFlagSort 0x00080000 -#define fieldFlagFileSelect 0x00100000 -#define fieldFlagMultiSelect 0x00200000 -#define fieldFlagDoNotSpellCheck 0x00400000 -#define fieldFlagDoNotScroll 0x00800000 -#define fieldFlagComb 0x01000000 -#define fieldFlagRichText 0x02000000 -#define fieldFlagRadiosInUnison 0x02000000 -#define fieldFlagCommitOnSelChange 0x04000000 - -#define fieldQuadLeft 0 -#define fieldQuadCenter 1 -#define fieldQuadRight 2 - -// distance of Bezier control point from center for circle approximation -// = (4 * (sqrt(2) - 1) / 3) * r -#define bezierCircle 0.55228475 - -static AnnotLineEndingStyle parseAnnotLineEndingStyle(const GooString *string) { - if (string != nullptr) { - if (!string->cmp("Square")) { - return annotLineEndingSquare; - } else if (!string->cmp("Circle")) { - return annotLineEndingCircle; - } else if (!string->cmp("Diamond")) { - return annotLineEndingDiamond; - } else if (!string->cmp("OpenArrow")) { - return annotLineEndingOpenArrow; - } else if (!string->cmp("ClosedArrow")) { - return annotLineEndingClosedArrow; - } else if (!string->cmp("Butt")) { - return annotLineEndingButt; - } else if (!string->cmp("ROpenArrow")) { - return annotLineEndingROpenArrow; - } else if (!string->cmp("RClosedArrow")) { - return annotLineEndingRClosedArrow; - } else if (!string->cmp("Slash")) { - return annotLineEndingSlash; - } else { - return annotLineEndingNone; - } - } else { - return annotLineEndingNone; - } -} - -static const char* convertAnnotLineEndingStyle(AnnotLineEndingStyle style) { - switch (style) { - case annotLineEndingSquare: - return "Square"; - case annotLineEndingCircle: - return "Circle"; - case annotLineEndingDiamond: - return "Diamond"; - case annotLineEndingOpenArrow: - return "OpenArrow"; - case annotLineEndingClosedArrow: - return "ClosedArrow"; - case annotLineEndingButt: - return "Butt"; - case annotLineEndingROpenArrow: - return "ROpenArrow"; - case annotLineEndingRClosedArrow: - return "RClosedArrow"; - case annotLineEndingSlash: - return "Slash"; - default: - return "None"; - } -} - -static AnnotExternalDataType parseAnnotExternalData(Dict* dict) { - AnnotExternalDataType type; - - Object obj1 = dict->lookup("Subtype"); - if (obj1.isName()) { - const char *typeName = obj1.getName(); - - if (!strcmp(typeName, "Markup3D")) { - type = annotExternalDataMarkup3D; - } else { - type = annotExternalDataMarkupUnknown; - } - } else { - type = annotExternalDataMarkupUnknown; - } - - return type; -} - -static PDFRectangle *parseDiffRectangle(Array *array, PDFRectangle *rect) { - PDFRectangle *newRect = nullptr; - if (array->getLength() == 4) { - // deltas - Object obj1; - double dx1 = (obj1 = array->get(0), obj1.isNum() ? obj1.getNum() : 0); - double dy1 = (obj1 = array->get(1), obj1.isNum() ? obj1.getNum() : 0); - double dx2 = (obj1 = array->get(2), obj1.isNum() ? obj1.getNum() : 0); - double dy2 = (obj1 = array->get(3), obj1.isNum() ? obj1.getNum() : 0); - - // checking that the numbers are valid (i.e. >= 0), - // and that applying the differences still give us a valid rect - if (dx1 >= 0 && dy1 >= 0 && dx2 >= 0 && dy2 - && (rect->x2 - rect->x1 - dx1 - dx2) >= 0 - && (rect->y2 - rect->y1 - dy1 - dy2) >= 0) { - newRect = new PDFRectangle(); - newRect->x1 = rect->x1 + dx1; - newRect->y1 = rect->y1 + dy1; - newRect->x2 = rect->x2 - dx2; - newRect->y2 = rect->y2 - dy2; - } - } - return newRect; -} - -static LinkAction* getAdditionalAction(Annot::AdditionalActionsType type, Object *additionalActions, PDFDoc *doc) { - LinkAction *linkAction = nullptr; - Object additionalActionsObject = additionalActions->fetch(doc->getXRef()); - - if (additionalActionsObject.isDict()) { - const char *key = (type == Annot::actionCursorEntering ? "E" : - type == Annot::actionCursorLeaving ? "X" : - type == Annot::actionMousePressed ? "D" : - type == Annot::actionMouseReleased ? "U" : - type == Annot::actionFocusIn ? "Fo" : - type == Annot::actionFocusOut ? "Bl" : - type == Annot::actionPageOpening ? "PO" : - type == Annot::actionPageClosing ? "PC" : - type == Annot::actionPageVisible ? "PV" : - type == Annot::actionPageInvisible ? "PI" : nullptr); - - Object actionObject = additionalActionsObject.dictLookup(key); - if (actionObject.isDict()) - linkAction = LinkAction::parseAction(&actionObject, doc->getCatalog()->getBaseURI()); - } - - return linkAction; -} - -static LinkAction* getFormAdditionalAction(Annot::FormAdditionalActionsType type, Object *additionalActions, PDFDoc *doc) { - LinkAction *linkAction = nullptr; - Object additionalActionsObject = additionalActions->fetch(doc->getXRef()); - - if (additionalActionsObject.isDict()) { - const char *key = (type == Annot::actionFieldModified ? "K" : - type == Annot::actionFormatField ? "F" : - type == Annot::actionValidateField ? "V" : - type == Annot::actionCalculateField ? "C" : nullptr); - - Object actionObject = additionalActionsObject.dictLookup(key); - if (actionObject.isDict()) - linkAction = LinkAction::parseAction(&actionObject, doc->getCatalog()->getBaseURI()); - } - - return linkAction; -} - -//------------------------------------------------------------------------ -// AnnotBorderEffect -//------------------------------------------------------------------------ - -AnnotBorderEffect::AnnotBorderEffect(Dict *dict) { - Object obj1; - - obj1 = dict->lookup("S"); - if (obj1.isName()) { - const char *effectName = obj1.getName(); - - if (!strcmp(effectName, "C")) - effectType = borderEffectCloudy; - else - effectType = borderEffectNoEffect; - } else { - effectType = borderEffectNoEffect; - } - - obj1 = dict->lookup("I"); - if (obj1.isNum() && effectType == borderEffectCloudy) { - intensity = obj1.getNum(); - } else { - intensity = 0; - } -} - -//------------------------------------------------------------------------ -// AnnotPath -//------------------------------------------------------------------------ - -AnnotPath::AnnotPath() { - coords = nullptr; - coordsLength = 0; -} - -AnnotPath::AnnotPath(Array *array) { - coords = nullptr; - coordsLength = 0; - parsePathArray(array); -} - -AnnotPath::AnnotPath(AnnotCoord **coords, int coordsLength) { - this->coords = coords; - this->coordsLength = coordsLength; -} - -AnnotPath::~AnnotPath() { - if (coords) { - for (int i = 0; i < coordsLength; ++i) - delete coords[i]; - gfree(coords); - } -} - -double AnnotPath::getX(int coord) const { - if (coord >= 0 && coord < coordsLength) - return coords[coord]->getX(); - return 0; -} - -double AnnotPath::getY(int coord) const { - if (coord >= 0 && coord < coordsLength) - return coords[coord]->getY(); - return 0; -} - -AnnotCoord *AnnotPath::getCoord(int coord) const { - if (coord >= 0 && coord < coordsLength) - return coords[coord]; - return nullptr; -} - -void AnnotPath::parsePathArray(Array *array) { - int tempLength; - AnnotCoord **tempCoords; - GBool correct = gTrue; - - if (array->getLength() % 2) { - error(errSyntaxError, -1, "Bad Annot Path"); - return; - } - - tempLength = array->getLength() / 2; - tempCoords = (AnnotCoord **) gmallocn (tempLength, sizeof(AnnotCoord *)); - memset(tempCoords, 0, tempLength * sizeof(AnnotCoord *)); - for (int i = 0; i < tempLength && correct; i++) { - double x = 0, y = 0; - - Object obj1 = array->get(i * 2); - if (obj1.isNum()) { - x = obj1.getNum(); - } else { - correct = gFalse; - } - - obj1 = array->get((i * 2) + 1); - if (obj1.isNum()) { - y = obj1.getNum(); - } else { - correct = gFalse; - } - - if (!correct) { - for (int j = i - 1; j >= 0; j--) - delete tempCoords[j]; - gfree (tempCoords); - return; - } - - tempCoords[i] = new AnnotCoord(x, y); - } - - coords = tempCoords; - coordsLength = tempLength; -} - -//------------------------------------------------------------------------ -// AnnotCalloutLine -//------------------------------------------------------------------------ - -AnnotCalloutLine::AnnotCalloutLine(double x1, double y1, double x2, double y2) - : coord1(x1, y1), coord2(x2, y2) { -} - -//------------------------------------------------------------------------ -// AnnotCalloutMultiLine -//------------------------------------------------------------------------ - -AnnotCalloutMultiLine::AnnotCalloutMultiLine(double x1, double y1, double x2, - double y2, double x3, double y3) - : AnnotCalloutLine(x1, y1, x2, y2), coord3(x3, y3) { -} - -//------------------------------------------------------------------------ -// AnnotQuadrilateral -//------------------------------------------------------------------------ - -AnnotQuadrilaterals::AnnotQuadrilaterals(Array *array, PDFRectangle *rect) { - int arrayLength = array->getLength(); - GBool correct = gTrue; - int quadsLength = 0; - AnnotQuadrilateral **quads; - double quadArray[8]; - - // default values - quadrilaterals = nullptr; - quadrilateralsLength = 0; - - if ((arrayLength % 8) == 0) { - int i; - - quadsLength = arrayLength / 8; - quads = (AnnotQuadrilateral **) gmallocn - ((quadsLength), sizeof(AnnotQuadrilateral *)); - memset(quads, 0, quadsLength * sizeof(AnnotQuadrilateral *)); - - for (i = 0; i < quadsLength; i++) { - for (int j = 0; j < 8; j++) { - Object obj = array->get(i * 8 + j); - if (obj.isNum()) { - quadArray[j] = obj.getNum(); - } else { - correct = gFalse; - error (errSyntaxError, -1, "Invalid QuadPoint in annot"); - break; - } - } - - if (!correct) - break; - - quads[i] = new AnnotQuadrilateral(quadArray[0], quadArray[1], - quadArray[2], quadArray[3], - quadArray[4], quadArray[5], - quadArray[6], quadArray[7]); - } - - if (correct) { - quadrilateralsLength = quadsLength; - quadrilaterals = quads; - } else { - for (int j = 0; j < i; j++) - delete quads[j]; - gfree (quads); - } - } -} - -AnnotQuadrilaterals::AnnotQuadrilaterals(AnnotQuadrilaterals::AnnotQuadrilateral **quads, int quadsLength) { - quadrilaterals = quads; - quadrilateralsLength = quadsLength; -} - -AnnotQuadrilaterals::~AnnotQuadrilaterals() { - if (quadrilaterals) { - for(int i = 0; i < quadrilateralsLength; i++) - delete quadrilaterals[i]; - - gfree (quadrilaterals); - } -} - -double AnnotQuadrilaterals::getX1(int quadrilateral) { - if (quadrilateral >= 0 && quadrilateral < quadrilateralsLength) - return quadrilaterals[quadrilateral]->coord1.getX(); - return 0; -} - -double AnnotQuadrilaterals::getY1(int quadrilateral) { - if (quadrilateral >= 0 && quadrilateral < quadrilateralsLength) - return quadrilaterals[quadrilateral]->coord1.getY(); - return 0; -} - -double AnnotQuadrilaterals::getX2(int quadrilateral) { - if (quadrilateral >= 0 && quadrilateral < quadrilateralsLength) - return quadrilaterals[quadrilateral]->coord2.getX(); - return 0; -} - -double AnnotQuadrilaterals::getY2(int quadrilateral) { - if (quadrilateral >= 0 && quadrilateral < quadrilateralsLength) - return quadrilaterals[quadrilateral]->coord2.getY(); - return 0; -} - -double AnnotQuadrilaterals::getX3(int quadrilateral) { - if (quadrilateral >= 0 && quadrilateral < quadrilateralsLength) - return quadrilaterals[quadrilateral]->coord3.getX(); - return 0; -} - -double AnnotQuadrilaterals::getY3(int quadrilateral) { - if (quadrilateral >= 0 && quadrilateral < quadrilateralsLength) - return quadrilaterals[quadrilateral]->coord3.getY(); - return 0; -} - -double AnnotQuadrilaterals::getX4(int quadrilateral) { - if (quadrilateral >= 0 && quadrilateral < quadrilateralsLength) - return quadrilaterals[quadrilateral]->coord4.getX(); - return 0; -} - -double AnnotQuadrilaterals::getY4(int quadrilateral) { - if (quadrilateral >= 0 && quadrilateral < quadrilateralsLength) - return quadrilaterals[quadrilateral]->coord4.getY(); - return 0; -} - -AnnotQuadrilaterals::AnnotQuadrilateral::AnnotQuadrilateral(double x1, double y1, - double x2, double y2, double x3, double y3, double x4, double y4) - : coord1(x1, y1), coord2(x2, y2), coord3(x3, y3), coord4(x4, y4) { -} - -//------------------------------------------------------------------------ -// AnnotBorder -//------------------------------------------------------------------------ -AnnotBorder::AnnotBorder() { - width = 1; - dashLength = 0; - dash = nullptr; - style = borderSolid; -} - -GBool AnnotBorder::parseDashArray(Object *dashObj) { - GBool correct = gTrue; - const int tempLength = dashObj->arrayGetLength(); - double *tempDash = (double *) gmallocn (tempLength, sizeof (double)); - - // TODO: check not all zero (Line Dash Pattern Page 217 PDF 8.1) - for (int i = 0; i < tempLength && i < DASH_LIMIT && correct; i++) { - const Object obj1 = dashObj->arrayGet(i); - if (obj1.isNum()) { - tempDash[i] = obj1.getNum(); - - correct = tempDash[i] >= 0; - } else { - correct = gFalse; - } - } - - if (correct) { - dashLength = tempLength; - dash = tempDash; - style = borderDashed; - } else { - gfree (tempDash); - } - - return correct; -} - -AnnotBorder::~AnnotBorder() { - if (dash) - gfree (dash); -} - -//------------------------------------------------------------------------ -// AnnotBorderArray -//------------------------------------------------------------------------ - -AnnotBorderArray::AnnotBorderArray() { - horizontalCorner = 0; - verticalCorner = 0; -} - -AnnotBorderArray::AnnotBorderArray(Array *array) { - Object obj1; - int arrayLength = array->getLength(); - - GBool correct = gTrue; - if (arrayLength == 3 || arrayLength == 4) { - // implementation note 81 in Appendix H. - - obj1 = array->get(0); - if (obj1.isNum()) - horizontalCorner = obj1.getNum(); - else - correct = gFalse; - - obj1 = array->get(1); - if (obj1.isNum()) - verticalCorner = obj1.getNum(); - else - correct = gFalse; - - obj1 = array->get(2); - if (obj1.isNum()) - width = obj1.getNum(); - else - correct = gFalse; - - if (arrayLength == 4) { - obj1 = array->get(3); - if (obj1.isArray()) - correct = parseDashArray(&obj1); - else - correct = gFalse; - } - } else { - correct = gFalse; - } - - if (!correct) { - width = 0; - } -} - -Object AnnotBorderArray::writeToObject(XRef *xref) const { - Array *borderArray = new Array(xref); - borderArray->add(Object(horizontalCorner)); - borderArray->add(Object(verticalCorner)); - borderArray->add(Object(width)); - - if (dashLength > 0) { - Array *a = new Array(xref); - - for (int i = 0; i < dashLength; i++) - a->add(Object(dash[i])); - - borderArray->add(Object(a)); - } - - return Object(borderArray); -} - -//------------------------------------------------------------------------ -// AnnotBorderBS -//------------------------------------------------------------------------ - -AnnotBorderBS::AnnotBorderBS() { -} - -AnnotBorderBS::AnnotBorderBS(Dict *dict) { - Object obj1, obj2; - - // acroread 8 seems to need both W and S entries for - // any border to be drawn, even though the spec - // doesn't claim anything of that sort. We follow - // that behaviour by veryifying both entries exist - // otherwise we set the borderWidth to 0 - // --jrmuizel - obj1 = dict->lookup("W"); - obj2 = dict->lookup("S"); - if (obj1.isNum() && obj2.isName()) { - const char *styleName = obj2.getName(); - - width = obj1.getNum(); - - if (!strcmp(styleName, "S")) { - style = borderSolid; - } else if (!strcmp(styleName, "D")) { - style = borderDashed; - } else if (!strcmp(styleName, "B")) { - style = borderBeveled; - } else if (!strcmp(styleName, "I")) { - style = borderInset; - } else if (!strcmp(styleName, "U")) { - style = borderUnderlined; - } else { - style = borderSolid; - } - } else { - width = 0; - } - - if (style == borderDashed) { - obj1 = dict->lookup("D"); - if (obj1.isArray()) - parseDashArray(&obj1); - - if (!dash) { - dashLength = 1; - dash = (double *) gmallocn (dashLength, sizeof (double)); - dash[0] = 3; - } - } -} - -const char *AnnotBorderBS::getStyleName() const { - switch (style) { - case borderSolid: - return "S"; - case borderDashed: - return "D"; - case borderBeveled: - return "B"; - case borderInset: - return "I"; - case borderUnderlined: - return "U"; - } - - return "S"; -} - -Object AnnotBorderBS::writeToObject(XRef *xref) const { - Dict *dict = new Dict(xref); - dict->set("W", Object(width)); - dict->set("S", Object(objName, getStyleName())); - if (style == borderDashed && dashLength > 0) { - Array *a = new Array(xref); - - for (int i = 0; i < dashLength; i++) - a->add(Object(dash[i])); - dict->set("D", Object(a)); - } - return Object(dict); -} - -//------------------------------------------------------------------------ -// AnnotColor -//------------------------------------------------------------------------ - -AnnotColor::AnnotColor() { - length = 0; -} - -AnnotColor::AnnotColor(double gray) { - length = 1; - - values[0] = gray; -} - -AnnotColor::AnnotColor(double r, double g, double b) { - length = 3; - - values[0] = r; - values[1] = g; - values[2] = b; -} - -AnnotColor::AnnotColor(double c, double m, double y, double k) { - length = 4; - - values[0] = c; - values[1] = m; - values[2] = y; - values[3] = k; -} - -// If <adjust> is +1, color is brightened; -// if <adjust> is -1, color is darkened; -// otherwise color is not modified. -AnnotColor::AnnotColor(Array *array, int adjust) { - int i; - - length = array->getLength(); - if (length > 4) - length = 4; - - for (i = 0; i < length; i++) { - Object obj1 = array->get(i); - if (obj1.isNum()) { - values[i] = obj1.getNum(); - - if (values[i] < 0 || values[i] > 1) - values[i] = 0; - } else { - values[i] = 0; - } - } - - if (adjust != 0) - adjustColor(adjust); -} - -void AnnotColor::adjustColor(int adjust) { - int i; - - if (length == 4) { - adjust = -adjust; - } - if (adjust > 0) { - for (i = 0; i < length; ++i) { - values[i] = 0.5 * values[i] + 0.5; - } - } else if (adjust < 0) { - for (i = 0; i < length; ++i) { - values[i] = 0.5 * values[i]; - } - } -} - -Object AnnotColor::writeToObject(XRef *xref) const { - if (length == 0) { - return Object(objNull); // Transparent (no color) - } else { - Array *a = new Array(xref); - for (int i = 0; i < length; ++i) - a->add( Object( values[i] ) ); - return Object(a); - } -} - -//------------------------------------------------------------------------ -// AnnotIconFit -//------------------------------------------------------------------------ - -AnnotIconFit::AnnotIconFit(Dict* dict) { - Object obj1; - - obj1 = dict->lookup("SW"); - if (obj1.isName()) { - const char *scaleName = obj1.getName(); - - if(!strcmp(scaleName, "B")) { - scaleWhen = scaleBigger; - } else if(!strcmp(scaleName, "S")) { - scaleWhen = scaleSmaller; - } else if(!strcmp(scaleName, "N")) { - scaleWhen = scaleNever; - } else { - scaleWhen = scaleAlways; - } - } else { - scaleWhen = scaleAlways; - } - - obj1 = dict->lookup("S"); - if (obj1.isName()) { - const char *scaleName = obj1.getName(); - - if(!strcmp(scaleName, "A")) { - scale = scaleAnamorphic; - } else { - scale = scaleProportional; - } - } else { - scale = scaleProportional; - } - - obj1 = dict->lookup("A"); - if (obj1.isArray() && obj1.arrayGetLength() == 2) { - Object obj2; - (obj2 = obj1.arrayGet(0), obj2.isNum() ? left = obj2.getNum() : left = 0); - (obj2 = obj1.arrayGet(1), obj2.isNum() ? bottom = obj2.getNum() : bottom = 0); - - if (left < 0 || left > 1) - left = 0.5; - - if (bottom < 0 || bottom > 1) - bottom = 0.5; - - } else { - left = bottom = 0.5; - } - - obj1 = dict->lookup("FB"); - if (obj1.isBool()) { - fullyBounds = obj1.getBool(); - } else { - fullyBounds = gFalse; - } -} - -//------------------------------------------------------------------------ -// AnnotAppearance -//------------------------------------------------------------------------ - -AnnotAppearance::AnnotAppearance(PDFDoc *docA, Object *dict) { - assert(dict->isDict()); - doc = docA; - xref = docA->getXRef(); - appearDict = dict->copy(); -} - -AnnotAppearance::~AnnotAppearance() { -} - -Object AnnotAppearance::getAppearanceStream(AnnotAppearanceType type, const char *state) { - Object apData; - - // Obtain dictionary or stream associated to appearance type - switch (type) { - case appearRollover: - apData = appearDict.dictLookupNF("R"); - if (apData.isNull()) - apData = appearDict.dictLookupNF("N"); - break; - case appearDown: - apData = appearDict.dictLookupNF("D"); - if (apData.isNull()) - apData = appearDict.dictLookupNF("N"); - break; - case appearNormal: - apData = appearDict.dictLookupNF("N"); - break; - } - - Object res; - if (apData.isDict() && state) - res = apData.dictLookupNF(state); - else if (apData.isRef()) - res = apData.copy(); - - return res; -} - -GooString * AnnotAppearance::getStateKey(int i) { - GooString * res = nullptr; - Object obj1 = appearDict.dictLookupNF("N"); - if (obj1.isDict()) - res = new GooString(obj1.dictGetKey(i)); - return res; -} - -int AnnotAppearance::getNumStates() { - int res = 0; - Object obj1 = appearDict.dictLookupNF("N"); - if (obj1.isDict()) - res = obj1.dictGetLength(); - return res; -} - -// Test if stateObj (a Ref or a Dict) points to the specified stream -GBool AnnotAppearance::referencesStream(Object *stateObj, Ref refToStream) { - if (stateObj->isRef()) { - Ref r = stateObj->getRef(); - if (r.num == refToStream.num && r.gen == refToStream.gen) { - return gTrue; - } - } else if (stateObj->isDict()) { // Test each value - const int size = stateObj->dictGetLength(); - for (int i = 0; i < size; ++i) { - Object obj1 = stateObj->dictGetValNF(i); - if (obj1.isRef()) { - Ref r = obj1.getRef(); - if (r.num == refToStream.num && r.gen == refToStream.gen) { - return gTrue; - } - } - } - } - return gFalse; // Not found -} - -// Test if this AnnotAppearance references the specified stream -GBool AnnotAppearance::referencesStream(Ref refToStream) { - Object obj1; - GBool found; - - // Scan each state's ref/subdictionary - obj1 = appearDict.dictLookupNF("N"); - found = referencesStream(&obj1, refToStream); - if (found) - return gTrue; - - obj1 = appearDict.dictLookupNF("R"); - found = referencesStream(&obj1, refToStream); - if (found) - return gTrue; - - obj1 = appearDict.dictLookupNF("D"); - found = referencesStream(&obj1, refToStream); - return found; -} - -// If this is the only annotation in the document that references the -// specified appearance stream, remove the appearance stream -void AnnotAppearance::removeStream(Ref refToStream) { - const int lastpage = doc->getNumPages(); - for (int pg = 1; pg <= lastpage; ++pg) { // Scan all annotations in the document - Page *page = doc->getPage(pg); - if (!page) { - error(errSyntaxError, -1, "Failed check for shared annotation stream at page {0:d}", pg); - continue; - } - Annots *annots = page->getAnnots(); - for (int i = 0; i < annots->getNumAnnots(); ++i) { - AnnotAppearance *annotAp = annots->getAnnot(i)->getAppearStreams(); - if (annotAp && annotAp != this && annotAp->referencesStream(refToStream)) { - return; // Another annotation points to the stream -> Don't delete it - } - } - } - - // TODO: stream resources (e.g. font), AP name tree - xref->removeIndirectObject(refToStream); -} - -// Removes stream if obj is a Ref, or removes pointed streams if obj is a Dict -void AnnotAppearance::removeStateStreams(Object *obj1) { - if (obj1->isRef()) { - removeStream(obj1->getRef()); - } else if (obj1->isDict()) { - const int size = obj1->dictGetLength(); - for (int i = 0; i < size; ++i) { - Object obj2 = obj1->dictGetValNF(i); - if (obj2.isRef()) { - removeStream(obj2.getRef()); - } - } - } -} - -void AnnotAppearance::removeAllStreams() { - Object obj1; - obj1 = appearDict.dictLookupNF("N"); - removeStateStreams(&obj1); - obj1 = appearDict.dictLookupNF("R"); - removeStateStreams(&obj1); - obj1 = appearDict.dictLookupNF("D"); - removeStateStreams(&obj1); -} - -//------------------------------------------------------------------------ -// AnnotAppearanceCharacs -//------------------------------------------------------------------------ - -AnnotAppearanceCharacs::AnnotAppearanceCharacs(Dict *dict) { - Object obj1; - - obj1 = dict->lookup("R"); - if (obj1.isInt()) { - rotation = obj1.getInt(); - } else { - rotation = 0; - } - - obj1 = dict->lookup("BC"); - if (obj1.isArray()) { - Array *colorComponents = obj1.getArray(); - if (colorComponents->getLength() > 0) { - borderColor = new AnnotColor(colorComponents); - } else { - borderColor = nullptr; - } - } else { - borderColor = nullptr; - } - - obj1 = dict->lookup("BG"); - if (obj1.isArray()) { - Array *colorComponents = obj1.getArray(); - if (colorComponents->getLength() > 0) { - backColor = new AnnotColor(colorComponents); - } else { - backColor = nullptr; - } - } else { - backColor = nullptr; - } - - obj1 = dict->lookup("CA"); - if (obj1.isString()) { - normalCaption = new GooString(obj1.getString()); - } else { - normalCaption = nullptr; - } - - obj1 = dict->lookup("RC"); - if (obj1.isString()) { - rolloverCaption = new GooString(obj1.getString()); - } else { - rolloverCaption = nullptr; - } - - obj1 = dict->lookup("AC"); - if (obj1.isString()) { - alternateCaption = new GooString(obj1.getString()); - } else { - alternateCaption = nullptr; - } - - obj1 = dict->lookup("IF"); - if (obj1.isDict()) { - iconFit = new AnnotIconFit(obj1.getDict()); - } else { - iconFit = nullptr; - } - - obj1 = dict->lookup("TP"); - if (obj1.isInt()) { - position = (AnnotAppearanceCharacsTextPos) obj1.getInt(); - } else { - position = captionNoIcon; - } -} - -AnnotAppearanceCharacs::~AnnotAppearanceCharacs() { - if (borderColor) - delete borderColor; - - if (backColor) - delete backColor; - - if (normalCaption) - delete normalCaption; - - if (rolloverCaption) - delete rolloverCaption; - - if (alternateCaption) - delete alternateCaption; - - if (iconFit) - delete iconFit; -} - -//------------------------------------------------------------------------ -// AnnotAppearanceBBox -//------------------------------------------------------------------------ - -AnnotAppearanceBBox::AnnotAppearanceBBox(PDFRectangle *rect) { - origX = rect->x1; - origY = rect->y1; - borderWidth = 0; - - // Initially set the same size as rect - minX = 0; - minY = 0; - maxX = rect->x2 - rect->x1; - maxY = rect->y2 - rect->y1; -} - -void AnnotAppearanceBBox::extendTo(double x, double y) { - if (x < minX) { - minX = x; - } else if (x > maxX) { - maxX = x; - } - if (y < minY) { - minY = y; - } else if (y > maxY) { - maxY = y; - } -} - -void AnnotAppearanceBBox::getBBoxRect(double bbox[4]) const { - bbox[0] = minX - borderWidth; - bbox[1] = minY - borderWidth; - bbox[2] = maxX + borderWidth; - bbox[3] = maxY + borderWidth; -} - -double AnnotAppearanceBBox::getPageXMin() const { - return origX + minX - borderWidth; -} - -double AnnotAppearanceBBox::getPageYMin() const { - return origY + minY - borderWidth; -} - -double AnnotAppearanceBBox::getPageXMax() const { - return origX + maxX + borderWidth; -} - -double AnnotAppearanceBBox::getPageYMax() const { - return origY + maxY + borderWidth; -} - -//------------------------------------------------------------------------ -// Annot -//------------------------------------------------------------------------ - -Annot::Annot(PDFDoc *docA, PDFRectangle *rectA) { - - refCnt = 1; - flags = flagUnknown; - type = typeUnknown; - - Array *a = new Array(docA->getXRef()); - a->add(Object(rectA->x1)); - a->add(Object(rectA->y1)); - a->add(Object(rectA->x2)); - a->add(Object(rectA->y2)); - - annotObj = Object(new Dict(docA->getXRef())); - annotObj.dictSet ("Type", Object(objName, "Annot")); - annotObj.dictSet ("Rect", Object(a)); - - ref = docA->getXRef()->addIndirectObject (&annotObj); - - initialize (docA, annotObj.getDict()); -} - -Annot::Annot(PDFDoc *docA, Object *dictObject) { - refCnt = 1; - hasRef = false; - flags = flagUnknown; - type = typeUnknown; - annotObj = dictObject->copy(); - initialize (docA, dictObject->getDict()); -} - -Annot::Annot(PDFDoc *docA, Object *dictObject, Object *obj) { - refCnt = 1; - if (obj->isRef()) { - hasRef = gTrue; - ref = obj->getRef(); - } else { - hasRef = gFalse; - } - flags = flagUnknown; - type = typeUnknown; - annotObj = dictObject->copy(); - initialize (docA, dictObject->getDict()); -} - -void Annot::initialize(PDFDoc *docA, Dict *dict) { - Object apObj, asObj, obj1; - - ok = gTrue; - doc = docA; - xref = doc->getXRef(); - appearStreams = nullptr; - appearBBox = nullptr; - appearState = nullptr; - - appearance.setToNull(); - - //----- parse the rectangle - rect = new PDFRectangle(); - obj1 = dict->lookup("Rect"); - if (obj1.isArray() && obj1.arrayGetLength() == 4) { - Object obj2; - (obj2 = obj1.arrayGet(0), obj2.isNum() ? rect->x1 = obj2.getNum() : rect->x1 = 0); - (obj2 = obj1.arrayGet(1), obj2.isNum() ? rect->y1 = obj2.getNum() : rect->y1 = 0); - (obj2 = obj1.arrayGet(2), obj2.isNum() ? rect->x2 = obj2.getNum() : rect->x2 = 1); - (obj2 = obj1.arrayGet(3), obj2.isNum() ? rect->y2 = obj2.getNum() : rect->y2 = 1); - - if (rect->x1 > rect->x2) { - double t = rect->x1; - rect->x1 = rect->x2; - rect->x2 = t; - } - - if (rect->y1 > rect->y2) { - double t = rect->y1; - rect->y1 = rect->y2; - rect->y2 = t; - } - } else { - rect->x1 = rect->y1 = 0; - rect->x2 = rect->y2 = 1; - error(errSyntaxError, -1, "Bad bounding box for annotation"); - ok = gFalse; - } - - obj1 = dict->lookup("Contents"); - if (obj1.isString()) { - contents = obj1.getString()->copy(); - } else { - contents = new GooString(); - } - - // Note: This value is overwritten by Annots ctor - obj1 = dict->lookupNF("P"); - if (obj1.isRef()) { - Ref ref = obj1.getRef(); - - page = doc->getCatalog()->findPage (ref.num, ref.gen); - } else { - page = 0; - } - - obj1 = dict->lookup("NM"); - if (obj1.isString()) { - name = obj1.getString()->copy(); - } else { - name = nullptr; - } - - obj1 = dict->lookup("M"); - if (obj1.isString()) { - modified = obj1.getString()->copy(); - } else { - modified = nullptr; - } - - //----- get the flags - obj1 = dict->lookup("F"); - if (obj1.isInt()) { - flags |= obj1.getInt(); - } else { - flags = flagUnknown; - } - - //----- get the annotation appearance dictionary - apObj = dict->lookup("AP"); - if (apObj.isDict()) { - appearStreams = new AnnotAppearance(doc, &apObj); - } - - //----- get the appearance state - asObj = dict->lookup("AS"); - if (asObj.isName()) { - appearState = new GooString(asObj.getName()); - } else if (appearStreams && appearStreams->getNumStates() != 0) { - error (errSyntaxError, -1, "Invalid or missing AS value in annotation containing one or more appearance subdictionaries"); - // AS value is required in this case, but if the - // N dictionary contains only one entry - // take it as default appearance. - if (appearStreams->getNumStates() == 1) { - appearState = appearStreams->getStateKey(0); - } - } - if (!appearState) { - appearState = new GooString("Off"); - } - - //----- get the annotation appearance - if (appearStreams) { - appearance = appearStreams->getAppearanceStream(AnnotAppearance::appearNormal, appearState->getCString()); - } - - //----- parse the border style - // According to the spec if neither the Border nor the BS entry is present, - // the border shall be drawn as a solid line with a width of 1 point. But acroread - // seems to ignore the Border entry for annots that can't have a BS entry. So, we only - // follow this rule for annots tha can have a BS entry. - obj1 = dict->lookup("Border"); - if (obj1.isArray()) - border = new AnnotBorderArray(obj1.getArray()); - else - border = nullptr; - - obj1 = dict->lookup("C"); - if (obj1.isArray()) { - color = new AnnotColor(obj1.getArray()); - } else { - color = nullptr; - } - - obj1 = dict->lookup("StructParent"); - if (obj1.isInt()) { - treeKey = obj1.getInt(); - } else { - treeKey = 0; - } - - oc = dict->lookupNF("OC"); - -#ifdef MULTITHREADED - gInitMutex(&mutex); -#endif -} - -void Annot::getRect(double *x1, double *y1, double *x2, double *y2) const { - *x1 = rect->x1; - *y1 = rect->y1; - *x2 = rect->x2; - *y2 = rect->y2; -} - -void Annot::setRect(PDFRectangle *rect) { - setRect(rect->x1, rect->y1, rect->x2, rect->y2); -} - -void Annot::setRect(double x1, double y1, double x2, double y2) { - if (x1 < x2) { - rect->x1 = x1; - rect->x2 = x2; - } else { - rect->x1 = x2; - rect->x2 = x1; - } - - if (y1 < y2) { - rect->y1 = y1; - rect->y2 = y2; - } else { - rect->y1 = y2; - rect->y2 = y1; - } - - Array *a = new Array(xref); - a->add(Object(rect->x1)); - a->add(Object(rect->y1)); - a->add(Object(rect->x2)); - a->add(Object(rect->y2)); - - update("Rect", Object(a)); - invalidateAppearance(); -} - -GBool Annot::inRect(double x, double y) const { - return rect->contains(x, y); -} - -void Annot::update(const char *key, Object &&value) { - annotLocker(); - /* Set M to current time, unless we are updating M itself */ - if (strcmp(key, "M") != 0) { - delete modified; - modified = timeToDateString(nullptr); - - annotObj.dictSet("M", Object(modified->copy())); - } - - annotObj.dictSet(const_cast<char*>(key), std::move(value)); - - xref->setModifiedObject(&annotObj, ref); -} - -void Annot::setContents(GooString *new_content) { - annotLocker(); - delete contents; - - if (new_content) { - contents = new GooString(new_content); - //append the unicode marker <FE FF> if needed - if (!contents->hasUnicodeMarker()) { - contents->prependUnicodeMarker(); - } - } else { - contents = new GooString(); - } - - update ("Contents", Object(contents->copy())); -} - -void Annot::setName(GooString *new_name) { - annotLocker(); - delete name; - - if (new_name) { - name = new GooString(new_name); - } else { - name = new GooString(); - } - - update ("NM", Object(name->copy())); -} - -void Annot::setModified(GooString *new_modified) { - annotLocker(); - delete modified; - - if (new_modified) - modified = new GooString(new_modified); - else - modified = new GooString(); - - update ("M", Object(modified->copy())); -} - -void Annot::setFlags(Guint new_flags) { - annotLocker(); - flags = new_flags; - update ("F", Object(int(flags))); -} - -void Annot::setBorder(AnnotBorder *new_border) { - annotLocker(); - delete border; - - if (new_border) { - Object obj1 = new_border->writeToObject(xref); - update(new_border->getType() == AnnotBorder::typeArray ? "Border" : "BS", std::move(obj1)); - border = new_border; - } else { - border = nullptr; - } - invalidateAppearance(); -} - -void Annot::setColor(AnnotColor *new_color) { - annotLocker(); - delete color; - - if (new_color) { - Object obj1 = new_color->writeToObject(xref); - update ("C", std::move(obj1)); - color = new_color; - } else { - color = nullptr; - } - invalidateAppearance(); -} - -void Annot::setPage(int pageIndex, GBool updateP) { - annotLocker(); - Page *pageobj = doc->getPage(pageIndex); - Object obj1(objNull); - - if (pageobj) { - Ref pageRef = pageobj->getRef(); - obj1 = Object(pageRef.num, pageRef.gen); - page = pageIndex; - } else { - page = 0; - } - - if (updateP) { - update("P", std::move(obj1)); - } -} - -void Annot::setAppearanceState(const char *state) { - annotLocker(); - if (!state) - return; - - delete appearState; - appearState = new GooString(state); - - delete appearBBox; - appearBBox = nullptr; - - update ("AS", Object(objName, state)); - - // The appearance state determines the current appearance stream - if (appearStreams) { - appearance = appearStreams->getAppearanceStream(AnnotAppearance::appearNormal, appearState->getCString()); - } else { - appearance.setToNull(); - } -} - -void Annot::invalidateAppearance() { - annotLocker(); - if (appearStreams) { // Remove existing appearance streams - appearStreams->removeAllStreams(); - } - delete appearStreams; - appearStreams = nullptr; - - delete appearState; - appearState = nullptr; - - delete appearBBox; - appearBBox = nullptr; - - appearance.setToNull(); - - Object obj2 = annotObj.dictLookup("AP"); - if (!obj2.isNull()) - update ("AP", Object(objNull)); // Remove AP - - obj2 = annotObj.dictLookup("AS"); - if (!obj2.isNull()) - update ("AS", Object(objNull)); // Remove AS -} - -double Annot::getXMin() { - return rect->x1; -} - -double Annot::getYMin() { - return rect->y1; -} - -double Annot::getXMax() { - return rect->x2; -} - -double Annot::getYMax() { - return rect->y2; -} - -void Annot::readArrayNum(Object *pdfArray, int key, double *value) { - Object valueObject = pdfArray->arrayGet(key); - if (valueObject.isNum()) { - *value = valueObject.getNum(); - } else { - *value = 0; - ok = gFalse; - } -} - -void Annot::removeReferencedObjects() { - // Remove appearance streams (if any) - invalidateAppearance(); -} - -void Annot::incRefCnt() { - annotLocker(); - refCnt++; -} - -void Annot::decRefCnt() { -#ifdef MULTITHREADED - gLockMutex(&mutex); -#endif - if (--refCnt == 0) { -#ifdef MULTITHREADED - gUnlockMutex(&mutex); -#endif - delete this; - return; - } -#ifdef MULTITHREADED - gUnlockMutex(&mutex); -#endif -} - -Annot::~Annot() { - delete rect; - delete contents; - - if (name) - delete name; - - if (modified) - delete modified; - - delete appearStreams; - delete appearBBox; - - if (appearState) - delete appearState; - - if (border) - delete border; - - if (color) - delete color; - -#ifdef MULTITHREADED - gDestroyMutex(&mutex); -#endif -} - -void AnnotAppearanceBuilder::setDrawColor(const AnnotColor *drawColor, GBool fill) { - const double *values = drawColor->getValues(); - - switch (drawColor->getSpace()) { - case AnnotColor::colorCMYK: - appearBuf->appendf("{0:.2f} {1:.2f} {2:.2f} {3:.2f} {4:c}\n", - values[0], values[1], values[2], values[3], - fill ? 'k' : 'K'); - break; - case AnnotColor::colorRGB: - appearBuf->appendf("{0:.2f} {1:.2f} {2:.2f} {3:s}\n", - values[0], values[1], values[2], - fill ? "rg" : "RG"); - break; - case AnnotColor::colorGray: - appearBuf->appendf("{0:.2f} {1:c}\n", - values[0], - fill ? 'g' : 'G'); - break; - case AnnotColor::colorTransparent: - default: - break; - } -} - -void AnnotAppearanceBuilder::setLineStyleForBorder(const AnnotBorder *border) { - int i, dashLength; - double *dash; - - switch (border->getStyle()) { - case AnnotBorder::borderDashed: - appearBuf->append("["); - dashLength = border->getDashLength(); - dash = border->getDash(); - for (i = 0; i < dashLength; ++i) - appearBuf->appendf(" {0:.2f}", dash[i]); - appearBuf->append(" ] 0 d\n"); - break; - default: - appearBuf->append("[] 0 d\n"); - break; - } - appearBuf->appendf("{0:.2f} w\n", border->getWidth()); -} - -// Draw an (approximate) circle of radius <r> centered at (<cx>, <cy>). -// If <fill> is true, the circle is filled; otherwise it is stroked. -void AnnotAppearanceBuilder::drawCircle(double cx, double cy, double r, GBool fill) { - appearBuf->appendf("{0:.2f} {1:.2f} m\n", - cx + r, cy); - appearBuf->appendf("{0:.2f} {1:.2f} {2:.2f} {3:.2f} {4:.2f} {5:.2f} c\n", - cx + r, cy + bezierCircle * r, - cx + bezierCircle * r, cy + r, - cx, cy + r); - appearBuf->appendf("{0:.2f} {1:.2f} {2:.2f} {3:.2f} {4:.2f} {5:.2f} c\n", - cx - bezierCircle * r, cy + r, - cx - r, cy + bezierCircle * r, - cx - r, cy); - appearBuf->appendf("{0:.2f} {1:.2f} {2:.2f} {3:.2f} {4:.2f} {5:.2f} c\n", - cx - r, cy - bezierCircle * r, - cx - bezierCircle * r, cy - r, - cx, cy - r); - appearBuf->appendf("{0:.2f} {1:.2f} {2:.2f} {3:.2f} {4:.2f} {5:.2f} c\n", - cx + bezierCircle * r, cy - r, - cx + r, cy - bezierCircle * r, - cx + r, cy); - appearBuf->append(fill ? "f\n" : "s\n"); -} - -// Draw the top-left half of an (approximate) circle of radius <r> -// centered at (<cx>, <cy>). -void AnnotAppearanceBuilder::drawCircleTopLeft(double cx, double cy, double r) { - double r2; - - r2 = r / sqrt(2.0); - appearBuf->appendf("{0:.2f} {1:.2f} m\n", - cx + r2, cy + r2); - appearBuf->appendf("{0:.2f} {1:.2f} {2:.2f} {3:.2f} {4:.2f} {5:.2f} c\n", - cx + (1 - bezierCircle) * r2, - cy + (1 + bezierCircle) * r2, - cx - (1 - bezierCircle) * r2, - cy + (1 + bezierCircle) * r2, - cx - r2, - cy + r2); - appearBuf->appendf("{0:.2f} {1:.2f} {2:.2f} {3:.2f} {4:.2f} {5:.2f} c\n", - cx - (1 + bezierCircle) * r2, - cy + (1 - bezierCircle) * r2, - cx - (1 + bezierCircle) * r2, - cy - (1 - bezierCircle) * r2, - cx - r2, - cy - r2); - appearBuf->append("S\n"); -} - -// Draw the bottom-right half of an (approximate) circle of radius <r> -// centered at (<cx>, <cy>). -void AnnotAppearanceBuilder::drawCircleBottomRight(double cx, double cy, double r) { - double r2; - - r2 = r / sqrt(2.0); - appearBuf->appendf("{0:.2f} {1:.2f} m\n", - cx - r2, cy - r2); - appearBuf->appendf("{0:.2f} {1:.2f} {2:.2f} {3:.2f} {4:.2f} {5:.2f} c\n", - cx - (1 - bezierCircle) * r2, - cy - (1 + bezierCircle) * r2, - cx + (1 - bezierCircle) * r2, - cy - (1 + bezierCircle) * r2, - cx + r2, - cy - r2); - appearBuf->appendf("{0:.2f} {1:.2f} {2:.2f} {3:.2f} {4:.2f} {5:.2f} c\n", - cx + (1 + bezierCircle) * r2, - cy - (1 - bezierCircle) * r2, - cx + (1 + bezierCircle) * r2, - cy + (1 - bezierCircle) * r2, - cx + r2, - cy + r2); - appearBuf->append("S\n"); -} - -Object Annot::createForm(const GooString *appearBuf, double *bbox, GBool transparencyGroup, Dict *resDict) { - Dict *appearDict = new Dict(xref); - appearDict->set("Length", Object(appearBuf->getLength())); - appearDict->set("Subtype", Object(objName, "Form")); - - Array *a = new Array(xref); - a->add(Object(bbox[0])); - a->add(Object(bbox[1])); - a->add(Object(bbox[2])); - a->add(Object(bbox[3])); - appearDict->set("BBox", Object(a)); - if (transparencyGroup) { - Dict *d = new Dict(xref); - d->set("S", Object(objName, "Transparency")); - appearDict->set("Group", Object(d)); - } - if (resDict) - appearDict->set("Resources", Object(resDict)); - - Stream *mStream = new AutoFreeMemStream(copyString(appearBuf->getCString()), 0, - appearBuf->getLength(), Object(appearDict)); - return Object(mStream); -} - -Dict *Annot::createResourcesDict(const char *formName, Object &&formStream, - const char *stateName, - double opacity, const char *blendMode) { - Dict *gsDict = new Dict(xref); - if (opacity != 1) { - gsDict->set("CA", Object(opacity)); - gsDict->set("ca", Object(opacity)); - } - if (blendMode) - gsDict->set("BM", Object(objName, blendMode)); - Dict *stateDict = new Dict(xref); - stateDict->set(stateName, Object(gsDict)); - Dict *formDict = new Dict(xref); - formDict->set(formName, std::move(formStream)); - - Dict *resDict = new Dict(xref); - resDict->set("ExtGState", Object(stateDict)); - resDict->set("XObject", Object(formDict)); - - return resDict; -} - -Object Annot::getAppearanceResDict() { - Object obj1, obj2; - - // Fetch appearance's resource dict (if any) - obj1 = appearance.fetch(xref); - if (obj1.isStream()) { - obj2 = obj1.streamGetDict()->lookup("Resources"); - if (obj2.isDict()) { - return obj2; - } - } - - return Object(objNull); -} - -GBool Annot::isVisible(GBool printing) { - // check the flags - if ((flags & flagHidden) || - (printing && !(flags & flagPrint)) || - (!printing && (flags & flagNoView))) { - return gFalse; - } - - // check the OC - OCGs *optContentConfig = doc->getCatalog()->getOptContentConfig(); - if (optContentConfig) { - if (! optContentConfig->optContentIsVisible(&oc)) - return gFalse; - } - - return gTrue; -} - -int Annot::getRotation() const -{ - Page *pageobj = doc->getPage(page); - assert(pageobj != nullptr); - - if (flags & flagNoRotate) { - return (360 - pageobj->getRotate()) % 360; - } else { - return 0; - } -} - -void Annot::draw(Gfx *gfx, GBool printing) { - annotLocker(); - if (!isVisible (printing)) - return; - - // draw the appearance stream - Object obj = appearance.fetch(gfx->getXRef()); - gfx->drawAnnot(&obj, (AnnotBorder *)nullptr, color, - rect->x1, rect->y1, rect->x2, rect->y2, getRotation()); -} - -//------------------------------------------------------------------------ -// AnnotPopup -//------------------------------------------------------------------------ - -AnnotPopup::AnnotPopup(PDFDoc *docA, PDFRectangle *rect) : - Annot(docA, rect) { - type = typePopup; - - annotObj.dictSet ("Subtype", Object(objName, "Popup")); - initialize (docA, annotObj.getDict()); -} - -AnnotPopup::AnnotPopup(PDFDoc *docA, Object *dictObject, Object *obj) : - Annot(docA, dictObject, obj) { - type = typePopup; - initialize(docA, dictObject->getDict()); -} - -AnnotPopup::~AnnotPopup() { -} - -void AnnotPopup::initialize(PDFDoc *docA, Dict *dict) { - parent = dict->lookupNF("Parent"); - if (!parent.isRef()) { - parent.setToNull(); - } - - Object obj1 = dict->lookup("Open"); - if (obj1.isBool()) { - open = obj1.getBool(); - } else { - open = gFalse; - } -} - -void AnnotPopup::setParent(Object *parentA) { - update ("Parent", parentA->copy()); -} - -void AnnotPopup::setParent(Annot *parentA) { - const Ref parentRef = parentA->getRef(); - update ("Parent", Object(parentRef.num, parentRef.gen)); -} - -void AnnotPopup::setOpen(GBool openA) { - open = openA; - update ("Open", Object(open)); -} - -//------------------------------------------------------------------------ -// AnnotMarkup -//------------------------------------------------------------------------ -AnnotMarkup::AnnotMarkup(PDFDoc *docA, PDFRectangle *rect) : - Annot(docA, rect) { - initialize(docA, annotObj.getDict(), &annotObj); -} - -AnnotMarkup::AnnotMarkup(PDFDoc *docA, Object *dictObject, Object *obj) : - Annot(docA, dictObject, obj) { - initialize(docA, dictObject->getDict(), obj); -} - -AnnotMarkup::~AnnotMarkup() { - if (label) - delete label; - - if (popup) - delete popup; - - if (date) - delete date; - - if (subject) - delete subject; -} - -void AnnotMarkup::initialize(PDFDoc *docA, Dict *dict, Object *obj) { - Object obj1, obj2; - - obj1 = dict->lookup("T"); - if (obj1.isString()) { - label = obj1.getString()->copy(); - } else { - label = nullptr; - } - - obj1 = dict->lookup("Popup"); - obj2 = dict->lookupNF("Popup"); - if (obj1.isDict() && obj2.isRef()) { - popup = new AnnotPopup(docA, &obj1, &obj2); - } else { - popup = nullptr; - } - - obj1 = dict->lookup("CA"); - if (obj1.isNum()) { - opacity = obj1.getNum(); - } else { - opacity = 1.0; - } - - obj1 = dict->lookup("CreationDate"); - if (obj1.isString()) { - date = obj1.getString()->copy(); - } else { - date = nullptr; - } - - obj1 = dict->lookupNF("IRT"); - if (obj1.isRef()) { - inReplyTo = obj1.getRef(); - } else { - inReplyTo.num = 0; - inReplyTo.gen = 0; - } - - obj1 = dict->lookup("Subj"); - if (obj1.isString()) { - subject = obj1.getString()->copy(); - } else { - subject = nullptr; - } - - obj1 = dict->lookup("RT"); - if (obj1.isName()) { - const char *replyName = obj1.getName(); - - if (!strcmp(replyName, "R")) { - replyTo = replyTypeR; - } else if (!strcmp(replyName, "Group")) { - replyTo = replyTypeGroup; - } else { - replyTo = replyTypeR; - } - } else { - replyTo = replyTypeR; - } - - obj1 = dict->lookup("ExData"); - if (obj1.isDict()) { - exData = parseAnnotExternalData(obj1.getDict()); - } else { - exData = annotExternalDataMarkupUnknown; - } -} - -void AnnotMarkup::setLabel(GooString *new_label) { - delete label; - - if (new_label) { - label = new GooString(new_label); - //append the unicode marker <FE FF> if needed - if (!label->hasUnicodeMarker()) { - label->prependUnicodeMarker(); - } - } else { - label = new GooString(); - } - - update ("T", Object(label->copy())); -} - -void AnnotMarkup::setPopup(AnnotPopup *new_popup) { - // If there exists an old popup annotation that is already - // associated with a page, then we need to remove that - // popup annotation from the page. Otherwise we would have - // dangling references to it. - if (popup != nullptr && popup->getPageNum() != 0) { - Page *pageobj = doc->getPage(popup->getPageNum()); - if (pageobj) { - pageobj->removeAnnot(popup); - } - } - delete popup; - - if (new_popup) { - const Ref popupRef = new_popup->getRef(); - update ("Popup", Object(popupRef.num, popupRef.gen)); - - new_popup->setParent(this); - popup = new_popup; - - // If this annotation is already added to a page, then we - // add the new popup annotation to the same page. - if (page != 0) { - Page *pageobj = doc->getPage(page); - assert(pageobj != nullptr); // pageobj should exist in doc (see setPage()) - - pageobj->addAnnot(popup); - } - } else { - popup = nullptr; - } -} - -void AnnotMarkup::setOpacity(double opacityA) { - opacity = opacityA; - update ("CA", Object(opacity)); - invalidateAppearance(); -} - -void AnnotMarkup::setDate(GooString *new_date) { - delete date; - - if (new_date) - date = new GooString(new_date); - else - date = new GooString(); - - update ("CreationDate", Object(date->copy())); -} - -void AnnotMarkup::removeReferencedObjects() { - Page *pageobj = doc->getPage(page); - assert(pageobj != nullptr); // We're called when removing an annot from a page - - // Remove popup - if (popup) { - pageobj->removeAnnot(popup); - } - - Annot::removeReferencedObjects(); -} - -//------------------------------------------------------------------------ -// AnnotText -//------------------------------------------------------------------------ - -AnnotText::AnnotText(PDFDoc *docA, PDFRectangle *rect) : - AnnotMarkup(docA, rect) { - type = typeText; - flags |= flagNoZoom | flagNoRotate; - - annotObj.dictSet ("Subtype", Object(objName, "Text")); - initialize (docA, annotObj.getDict()); -} - -AnnotText::AnnotText(PDFDoc *docA, Object *dictObject, Object *obj) : - AnnotMarkup(docA, dictObject, obj) { - - type = typeText; - flags |= flagNoZoom | flagNoRotate; - initialize (docA, dictObject->getDict()); -} - -AnnotText::~AnnotText() { - delete icon; -} - -void AnnotText::initialize(PDFDoc *docA, Dict *dict) { - Object obj1; - - obj1 = dict->lookup("Open"); - if (obj1.isBool()) - open = obj1.getBool(); - else - open = gFalse; - - obj1 = dict->lookup("Name"); - if (obj1.isName()) { - icon = new GooString(obj1.getName()); - } else { - icon = new GooString("Note"); - } - - obj1 = dict->lookup("StateModel"); - if (obj1.isString()) { - const GooString *modelName = obj1.getString(); - - Object obj2 = dict->lookup("State"); - if (obj2.isString()) { - const GooString *stateName = obj2.getString(); - - if (!stateName->cmp("Marked")) { - state = stateMarked; - } else if (!stateName->cmp("Unmarked")) { - state = stateUnmarked; - } else if (!stateName->cmp("Accepted")) { - state = stateAccepted; - } else if (!stateName->cmp("Rejected")) { - state = stateRejected; - } else if (!stateName->cmp("Cancelled")) { - state = stateCancelled; - } else if (!stateName->cmp("Completed")) { - state = stateCompleted; - } else if (!stateName->cmp("None")) { - state = stateNone; - } else { - state = stateUnknown; - } - } else { - state = stateUnknown; - } - - if (!modelName->cmp("Marked")) { - switch (state) { - case stateUnknown: - state = stateMarked; - break; - case stateAccepted: - case stateRejected: - case stateCancelled: - case stateCompleted: - case stateNone: - state = stateUnknown; - break; - default: - break; - } - } else if (!modelName->cmp("Review")) { - switch (state) { - case stateUnknown: - state = stateNone; - break; - case stateMarked: - case stateUnmarked: - state = stateUnknown; - break; - default: - break; - } - } else { - state = stateUnknown; - } - } else { - state = stateUnknown; - } -} - -void AnnotText::setOpen(GBool openA) { - open = openA; - update ("Open", Object(open)); -} - -void AnnotText::setIcon(GooString *new_icon) { - if (new_icon && icon->cmp(new_icon) == 0) - return; - - delete icon; - - if (new_icon) { - icon = new GooString (new_icon); - } else { - icon = new GooString("Note"); - } - - update("Name", Object(objName, icon->getCString())); - invalidateAppearance(); -} - -#define ANNOT_TEXT_AP_NOTE \ - "3.602 24 m 20.398 24 l 22.387 24 24 22.387 24 20.398 c 24 3.602 l 24\n" \ - "1.613 22.387 0 20.398 0 c 3.602 0 l 1.613 0 0 1.613 0 3.602 c 0 20.398\n" \ - "l 0 22.387 1.613 24 3.602 24 c h\n" \ - "3.602 24 m f\n" \ - "0.533333 0.541176 0.521569 RG 2 w\n" \ - "1 J\n" \ - "1 j\n" \ - "[] 0.0 d\n" \ - "4 M 9 18 m 4 18 l 4 7 4 4 6 3 c 20 3 l 18 4 18 7 18 18 c 17 18 l S\n" \ - "1.5 w\n" \ - "0 j\n" \ - "10 16 m 14 21 l S\n" \ - "1.85625 w\n" \ - "1 j\n" \ - "15.07 20.523 m 15.07 19.672 14.379 18.977 13.523 18.977 c 12.672 18.977\n" \ - "11.977 19.672 11.977 20.523 c 11.977 21.379 12.672 22.07 13.523 22.07 c\n" \ - "14.379 22.07 15.07 21.379 15.07 20.523 c h\n" \ - "15.07 20.523 m S\n" \ - "1 w\n" \ - "0 j\n" \ - "6.5 13.5 m 15.5 13.5 l S\n" \ - "6.5 10.5 m 13.5 10.5 l S\n" \ - "6.801 7.5 m 15.5 7.5 l S\n" \ - "0.729412 0.741176 0.713725 RG 2 w\n" \ - "1 j\n" \ - "9 19 m 4 19 l 4 8 4 5 6 4 c 20 4 l 18 5 18 8 18 19 c 17 19 l S\n" \ - "1.5 w\n" \ - "0 j\n" \ - "10 17 m 14 22 l S\n" \ - "1.85625 w\n" \ - "1 j\n" \ - "15.07 21.523 m 15.07 20.672 14.379 19.977 13.523 19.977 c 12.672 19.977\n" \ - "11.977 20.672 11.977 21.523 c 11.977 22.379 12.672 23.07 13.523 23.07 c\n" \ - "14.379 23.07 15.07 22.379 15.07 21.523 c h\n" \ - "15.07 21.523 m S\n" \ - "1 w\n" \ - "0 j\n" \ - "6.5 14.5 m 15.5 14.5 l S\n" \ - "6.5 11.5 m 13.5 11.5 l S\n" \ - "6.801 8.5 m 15.5 8.5 l S\n" - -#define ANNOT_TEXT_AP_COMMENT \ - "4.301 23 m 19.699 23 l 21.523 23 23 21.523 23 19.699 c 23 4.301 l 23\n" \ - "2.477 21.523 1 19.699 1 c 4.301 1 l 2.477 1 1 2.477 1 4.301 c 1 19.699\n" \ - "l 1 21.523 2.477 23 4.301 23 c h\n" \ - "4.301 23 m f\n" \ - "0.533333 0.541176 0.521569 RG 2 w\n" \ - "0 J\n" \ - "1 j\n" \ - "[] 0.0 d\n" \ - "4 M 8 20 m 16 20 l 18.363 20 20 18.215 20 16 c 20 13 l 20 10.785 18.363 9\n" \ - "16 9 c 13 9 l 8 3 l 8 9 l 8 9 l 5.637 9 4 10.785 4 13 c 4 16 l 4 18.215\n" \ - "5.637 20 8 20 c h\n" \ - "8 20 m S\n" \ - "0.729412 0.741176 0.713725 RG 8 21 m 16 21 l 18.363 21 20 19.215 20 17\n" \ - "c 20 14 l 20 11.785 18.363 10\n" \ - "16 10 c 13 10 l 8 4 l 8 10 l 8 10 l 5.637 10 4 11.785 4 14 c 4 17 l 4\n" \ - "19.215 5.637 21 8 21 c h\n" \ - "8 21 m S\n" - -#define ANNOT_TEXT_AP_KEY \ - "4.301 23 m 19.699 23 l 21.523 23 23 21.523 23 19.699 c 23 4.301 l 23\n" \ - "2.477 21.523 1 19.699 1 c 4.301 1 l 2.477 1 1 2.477 1 4.301 c 1 19.699\n" \ - "l 1 21.523 2.477 23 4.301 23 c h\n" \ - "4.301 23 m f\n" \ - "0.533333 0.541176 0.521569 RG 2 w\n" \ - "1 J\n" \ - "0 j\n" \ - "[] 0.0 d\n" \ - "4 M 11.895 18.754 m 13.926 20.625 17.09 20.496 18.961 18.465 c 20.832\n" \ - "16.434 20.699 13.27 18.668 11.398 c 17.164 10.016 15.043 9.746 13.281\n" \ - "10.516 c 12.473 9.324 l 11.281 10.078 l 9.547 8.664 l 9.008 6.496 l\n" \ - "7.059 6.059 l 6.34 4.121 l 5.543 3.668 l 3.375 4.207 l 2.938 6.156 l\n" \ - "10.57 13.457 l 9.949 15.277 10.391 17.367 11.895 18.754 c h\n" \ - "11.895 18.754 m S\n" \ - "1.5 w\n" \ - "16.059 15.586 m 16.523 15.078 17.316 15.043 17.824 15.512 c 18.332\n" \ - "15.98 18.363 16.77 17.895 17.277 c 17.43 17.785 16.637 17.816 16.129\n" \ - "17.352 c 15.621 16.883 15.59 16.094 16.059 15.586 c h\n" \ - "16.059 15.586 m S\n" \ - "0.729412 0.741176 0.713725 RG 2 w\n" \ - "11.895 19.754 m 13.926 21.625 17.09 21.496 18.961 19.465 c 20.832\n" \ - "17.434 20.699 14.27 18.668 12.398 c 17.164 11.016 15.043 10.746 13.281\n" \ - "11.516 c 12.473 10.324 l 11.281 11.078 l 9.547 9.664 l 9.008 7.496 l\n" \ - "7.059 7.059 l 6.34 5.121 l 5.543 4.668 l 3.375 5.207 l 2.938 7.156 l\n" \ - "10.57 14.457 l 9.949 16.277 10.391 18.367 11.895 19.754 c h\n" \ - "11.895 19.754 m S\n" \ - "1.5 w\n" \ - "16.059 16.586 m 16.523 16.078 17.316 16.043 17.824 16.512 c 18.332\n" \ - "16.98 18.363 17.77 17.895 18.277 c 17.43 18.785 16.637 18.816 16.129\n" \ - "18.352 c 15.621 17.883 15.59 17.094 16.059 16.586 c h\n" \ - "16.059 16.586 m S\n" - -#define ANNOT_TEXT_AP_HELP \ - "4.301 23 m 19.699 23 l 21.523 23 23 21.523 23 19.699 c 23 4.301 l 23\n" \ - "2.477 21.523 1 19.699 1 c 4.301 1 l 2.477 1 1 2.477 1 4.301 c 1 19.699\n" \ - "l 1 21.523 2.477 23 4.301 23 c h\n" \ - "4.301 23 m f\n" \ - "0.533333 0.541176 0.521569 RG 2.5 w\n" \ - "1 J\n" \ - "1 j\n" \ - "[] 0.0 d\n" \ - "4 M 8.289 16.488 m 8.824 17.828 10.043 18.773 11.473 18.965 c 12.902 19.156\n" \ - "14.328 18.559 15.195 17.406 c 16.062 16.254 16.242 14.723 15.664 13.398\n" \ - "c S\n" \ - "0 j\n" \ - "12 8 m 12 12 16 11 16 15 c S\n" \ - "1.539286 w\n" \ - "1 j\n" \ - "q 1 0 0 -0.999991 0 24 cm\n" \ - "12.684 20.891 m 12.473 21.258 12.004 21.395 11.629 21.196 c 11.254\n" \ - "20.992 11.105 20.531 11.297 20.149 c 11.488 19.77 11.945 19.61 12.332\n" \ - "19.789 c 12.719 19.969 12.891 20.426 12.719 20.817 c S Q\n" \ - "0.729412 0.741176 0.713725 RG 2.5 w\n" \ - "8.289 17.488 m 9.109 19.539 11.438 20.535 13.488 19.711 c 15.539 18.891\n" \ - "16.535 16.562 15.711 14.512 c 15.699 14.473 15.684 14.438 15.664 14.398\n" \ - "c S\n" \ - "0 j\n" \ - "12 9 m 12 13 16 12 16 16 c S\n" \ - "1.539286 w\n" \ - "1 j\n" \ - "q 1 0 0 -0.999991 0 24 cm\n" \ - "12.684 19.891 m 12.473 20.258 12.004 20.395 11.629 20.195 c 11.254\n" \ - "19.992 11.105 19.531 11.297 19.149 c 11.488 18.77 11.945 18.61 12.332\n" \ - "18.789 c 12.719 18.969 12.891 19.426 12.719 19.817 c S Q\n" - -#define ANNOT_TEXT_AP_NEW_PARAGRAPH \ - "4.301 23 m 19.699 23 l 21.523 23 23 21.523 23 19.699 c 23 4.301 l 23\n" \ - "2.477 21.523 1 19.699 1 c 4.301 1 l 2.477 1 1 2.477 1 4.301 c 1 19.699\n" \ - "l 1 21.523 2.477 23 4.301 23 c h\n" \ - "4.301 23 m f\n" \ - "0.533333 0.541176 0.521569 RG 4 w\n" \ - "0 J\n" \ - "2 j\n" \ - "[] 0.0 d\n" \ - "4 M q 1 0 0 -1 0 24 cm\n" \ - "9.211 11.988 m 8.449 12.07 7.711 11.707 7.305 11.059 c 6.898 10.41\n" \ - "6.898 9.59 7.305 8.941 c 7.711 8.293 8.449 7.93 9.211 8.012 c S Q\n" \ - "1.004413 w\n" \ - "1 J\n" \ - "1 j\n" \ - "q 1 0 0 -0.991232 0 24 cm\n" \ - "18.07 11.511 m 15.113 10.014 l 12.199 11.602 l 12.711 8.323 l 10.301\n" \ - "6.045 l 13.574 5.517 l 14.996 2.522 l 16.512 5.474 l 19.801 5.899 l\n" \ - "17.461 8.252 l 18.07 11.511 l h\n" \ - "18.07 11.511 m S Q\n" \ - "2 w\n" \ - "0 j\n" \ - "11 17 m 10 17 l 10 3 l S\n" \ - "14 3 m 14 13 l S\n" \ - "0.729412 0.741176 0.713725 RG 4 w\n" \ - "0 J\n" \ - "2 j\n" \ - "q 1 0 0 -1 0 24 cm\n" \ - "9.211 10.988 m 8.109 11.105 7.125 10.309 7.012 9.211 c 6.895 8.109\n" \ - "7.691 7.125 8.789 7.012 c 8.93 6.996 9.07 6.996 9.211 7.012 c S Q\n" \ - "1.004413 w\n" \ - "1 J\n" \ - "1 j\n" \ - "q 1 0 0 -0.991232 0 24 cm\n" \ - "18.07 10.502 m 15.113 9.005 l 12.199 10.593 l 12.711 7.314 l 10.301\n" \ - "5.036 l 13.574 4.508 l 14.996 1.513 l 16.512 4.465 l 19.801 4.891 l\n" \ - "17.461 7.243 l 18.07 10.502 l h\n" \ - "18.07 10.502 m S Q\n" \ - "2 w\n" \ - "0 j\n" \ - "11 18 m 10 18 l 10 4 l S\n" \ - "14 4 m 14 14 l S\n" - -#define ANNOT_TEXT_AP_PARAGRAPH \ - "4.301 23 m 19.699 23 l 21.523 23 23 21.523 23 19.699 c 23 4.301 l 23\n" \ - "2.477 21.523 1 19.699 1 c 4.301 1 l 2.477 1 1 2.477 1 4.301 c 1 19.699\n" \ - "l 1 21.523 2.477 23 4.301 23 c h\n" \ - "4.301 23 m f\n" \ - "0.533333 0.541176 0.521569 RG 2 w\n" \ - "1 J\n" \ - "1 j\n" \ - "[] 0.0 d\n" \ - "4 M 15 3 m 15 18 l 11 18 l 11 3 l S\n" \ - "4 w\n" \ - "q 1 0 0 -1 0 24 cm\n" \ - "9.777 10.988 m 8.746 10.871 7.973 9.988 8 8.949 c 8.027 7.91 8.844\n" \ - "7.066 9.879 7.004 c S Q\n" \ - "0.729412 0.741176 0.713725 RG 2 w\n" \ - "15 4 m 15 19 l 11 19 l 11 4 l S\n" \ - "4 w\n" \ - "q 1 0 0 -1 0 24 cm\n" \ - "9.777 9.988 m 8.746 9.871 7.973 8.988 8 7.949 c 8.027 6.91 8.844 6.066\n" \ - "9.879 6.004 c S Q\n" - -#define ANNOT_TEXT_AP_INSERT \ - "4.301 23 m 19.699 23 l 21.523 23 23 21.523 23 19.699 c 23 4.301 l 23\n" \ - "2.477 21.523 1 19.699 1 c 4.301 1 l 2.477 1 1 2.477 1 4.301 c 1 19.699\n" \ - "l 1 21.523 2.477 23 4.301 23 c h\n" \ - "4.301 23 m f\n" \ - "0.533333 0.541176 0.521569 RG 2 w\n" \ - "1 J\n" \ - "0 j\n" \ - "[] 0.0 d\n" \ - "4 M 12 18.012 m 20 18 l S\n" \ - "9 10 m 17 10 l S\n" \ - "12 14.012 m 20 14 l S\n" \ - "12 6.012 m 20 6.012 l S\n" \ - "4 12 m 6 10 l 4 8 l S\n" \ - "4 12 m 4 8 l S\n" \ - "0.729412 0.741176 0.713725 RG 12 19.012 m 20 19 l S\n" \ - "9 11 m 17 11 l S\n" \ - "12 15.012 m 20 15 l S\n" \ - "12 7.012 m 20 7.012 l S\n" \ - "4 13 m 6 11 l 4 9 l S\n" \ - "4 13 m 4 9 l S\n" - -#define ANNOT_TEXT_AP_CROSS \ - "4.301 23 m 19.699 23 l 21.523 23 23 21.523 23 19.699 c 23 4.301 l 23\n" \ - "2.477 21.523 1 19.699 1 c 4.301 1 l 2.477 1 1 2.477 1 4.301 c 1 19.699\n" \ - "l 1 21.523 2.477 23 4.301 23 c h\n" \ - "4.301 23 m f\n" \ - "0.533333 0.541176 0.521569 RG 2.5 w\n" \ - "1 J\n" \ - "0 j\n" \ - "[] 0.0 d\n" \ - "4 M 18 5 m 6 17 l S\n" \ - "6 5 m 18 17 l S\n" \ - "0.729412 0.741176 0.713725 RG 18 6 m 6 18 l S\n" \ - "6 6 m 18 18 l S\n" - -#define ANNOT_TEXT_AP_CIRCLE \ - "4.301 23 m 19.699 23 l 21.523 23 23 21.523 23 19.699 c 23 4.301 l 23\n" \ - "2.477 21.523 1 19.699 1 c 4.301 1 l 2.477 1 1 2.477 1 4.301 c 1 19.699\n" \ - "l 1 21.523 2.477 23 4.301 23 c h\n" \ - "4.301 23 m f\n" \ - "0.533333 0.541176 0.521569 RG 2.5 w\n" \ - "1 J\n" \ - "1 j\n" \ - "[] 0.0 d\n" \ - "4 M 19.5 11.5 m 19.5 7.359 16.141 4 12 4 c 7.859 4 4.5 7.359 4.5 11.5 c 4.5\n" \ - "15.641 7.859 19 12 19 c 16.141 19 19.5 15.641 19.5 11.5 c h\n" \ - "19.5 11.5 m S\n" \ - "0.729412 0.741176 0.713725 RG 19.5 12.5 m 19.5 8.359 16.141 5 12 5 c\n" \ - "7.859 5 4.5 8.359 4.5 12.5 c 4.5\n" \ - "16.641 7.859 20 12 20 c 16.141 20 19.5 16.641 19.5 12.5 c h\n" \ - "19.5 12.5 m S\n" - -void AnnotText::draw(Gfx *gfx, GBool printing) { - double ca = 1; - - if (!isVisible (printing)) - return; - - annotLocker(); - if (appearance.isNull()) { - ca = opacity; - - AnnotAppearanceBuilder appearBuilder; - - appearBuilder.append ("q\n"); - if (color) - appearBuilder.setDrawColor(color, gTrue); - else - appearBuilder.append ("1 1 1 rg\n"); - if (!icon->cmp("Note")) - appearBuilder.append (ANNOT_TEXT_AP_NOTE); - else if (!icon->cmp("Comment")) - appearBuilder.append (ANNOT_TEXT_AP_COMMENT); - else if (!icon->cmp("Key")) - appearBuilder.append (ANNOT_TEXT_AP_KEY); - else if (!icon->cmp("Help")) - appearBuilder.append (ANNOT_TEXT_AP_HELP); - else if (!icon->cmp("NewParagraph")) - appearBuilder.append (ANNOT_TEXT_AP_NEW_PARAGRAPH); - else if (!icon->cmp("Paragraph")) - appearBuilder.append (ANNOT_TEXT_AP_PARAGRAPH); - else if (!icon->cmp("Insert")) - appearBuilder.append (ANNOT_TEXT_AP_INSERT); - else if (!icon->cmp("Cross")) - appearBuilder.append (ANNOT_TEXT_AP_CROSS); - else if (!icon->cmp("Circle")) - appearBuilder.append (ANNOT_TEXT_AP_CIRCLE); - appearBuilder.append ("Q\n"); - - // Force 24x24 rectangle - PDFRectangle fixedRect(rect->x1, rect->y2 - 24, rect->x1 + 24, rect->y2); - appearBBox = new AnnotAppearanceBBox(&fixedRect); - double bbox[4]; - appearBBox->getBBoxRect(bbox); - if (ca == 1) { - appearance = createForm(appearBuilder.buffer(), bbox, gFalse, nullptr); - } else { - Object aStream = createForm(appearBuilder.buffer(), bbox, gTrue, nullptr); - - GooString appearBuf("/GS0 gs\n/Fm0 Do"); - Dict *resDict = createResourcesDict("Fm0", std::move(aStream), "GS0", ca, nullptr); - appearance = createForm(&appearBuf, bbox, gFalse, resDict); - } - } - - // draw the appearance stream - Object obj = appearance.fetch(gfx->getXRef()); - if (appearBBox) { - gfx->drawAnnot(&obj, (AnnotBorder *)nullptr, color, - appearBBox->getPageXMin(), appearBBox->getPageYMin(), - appearBBox->getPageXMax(), appearBBox->getPageYMax(), - getRotation()); - } else { - gfx->drawAnnot(&obj, (AnnotBorder *)nullptr, color, - rect->x1, rect->y1, rect->x2, rect->y2, getRotation()); - } -} - -//------------------------------------------------------------------------ -// AnnotLink -//------------------------------------------------------------------------ -AnnotLink::AnnotLink(PDFDoc *docA, PDFRectangle *rect) : - Annot(docA, rect) { - type = typeLink; - annotObj.dictSet ("Subtype", Object(objName, "Link")); - initialize (docA, annotObj.getDict()); -} - -AnnotLink::AnnotLink(PDFDoc *docA, Object *dictObject, Object *obj) : - Annot(docA, dictObject, obj) { - - type = typeLink; - initialize (docA, dictObject->getDict()); -} - -AnnotLink::~AnnotLink() { - delete action; - /* - if (uriAction) - delete uriAction; - */ - if (quadrilaterals) - delete quadrilaterals; -} - -void AnnotLink::initialize(PDFDoc *docA, Dict *dict) { - Object obj1; - - action = nullptr; - - // look for destination - obj1 = dict->lookup("Dest"); - if (!obj1.isNull()) { - action = LinkAction::parseDest(&obj1); - // look for action - } else { - obj1 = dict->lookup("A"); - if (obj1.isDict()) { - action = LinkAction::parseAction(&obj1, doc->getCatalog()->getBaseURI()); - } - } - - obj1 = dict->lookup("H"); - if (obj1.isName()) { - const char *effect = obj1.getName(); - - if (!strcmp(effect, "N")) { - linkEffect = effectNone; - } else if (!strcmp(effect, "I")) { - linkEffect = effectInvert; - } else if (!strcmp(effect, "O")) { - linkEffect = effectOutline; - } else if (!strcmp(effect, "P")) { - linkEffect = effectPush; - } else { - linkEffect = effectInvert; - } - } else { - linkEffect = effectInvert; - } - /* - obj1 = dict->lookup("PA"); - if (obj1.isDict()) { - uriAction = NULL; - } else { - uriAction = NULL; - } - obj1.free(); - */ - obj1 = dict->lookup("QuadPoints"); - if (obj1.isArray()) { - quadrilaterals = new AnnotQuadrilaterals(obj1.getArray(), rect); - } else { - quadrilaterals = nullptr; - } - - obj1 = dict->lookup("BS"); - if (obj1.isDict()) { - delete border; - border = new AnnotBorderBS(obj1.getDict()); - } else if (!border) { - border = new AnnotBorderBS(); - } -} - -void AnnotLink::draw(Gfx *gfx, GBool printing) { - if (!isVisible (printing)) - return; - - annotLocker(); - // draw the appearance stream - Object obj = appearance.fetch(gfx->getXRef()); - gfx->drawAnnot(&obj, border, color, - rect->x1, rect->y1, rect->x2, rect->y2, getRotation()); -} - -//------------------------------------------------------------------------ -// AnnotFreeText -//------------------------------------------------------------------------ -AnnotFreeText::AnnotFreeText(PDFDoc *docA, PDFRectangle *rect, GooString *da) : - AnnotMarkup(docA, rect) { - type = typeFreeText; - - annotObj.dictSet ("Subtype", Object(objName, "FreeText")); - annotObj.dictSet("DA", Object(da->copy())); - - initialize (docA, annotObj.getDict()); -} - -AnnotFreeText::AnnotFreeText(PDFDoc *docA, Object *dictObject, Object *obj) : - AnnotMarkup(docA, dictObject, obj) { - type = typeFreeText; - initialize(docA, dictObject->getDict()); -} - -AnnotFreeText::~AnnotFreeText() { - delete appearanceString; - - if (styleString) - delete styleString; - - if (calloutLine) - delete calloutLine; - - if (borderEffect) - delete borderEffect; - - if (rectangle) - delete rectangle; -} - -void AnnotFreeText::initialize(PDFDoc *docA, Dict *dict) { - Object obj1; - - obj1 = dict->lookup("DA"); - if (obj1.isString()) { - appearanceString = obj1.getString()->copy(); - } else { - appearanceString = new GooString(); - error(errSyntaxError, -1, "Bad appearance for annotation"); - ok = gFalse; - } - - obj1 = dict->lookup("Q"); - if (obj1.isInt()) { - quadding = (AnnotFreeTextQuadding) obj1.getInt(); - } else { - quadding = quaddingLeftJustified; - } - - obj1 = dict->lookup("DS"); - if (obj1.isString()) { - styleString = obj1.getString()->copy(); - } else { - styleString = nullptr; - } - - obj1 = dict->lookup("CL"); - if (obj1.isArray() && obj1.arrayGetLength() >= 4) { - double x1, y1, x2, y2; - Object obj2; - - (obj2 = obj1.arrayGet(0), obj2.isNum() ? x1 = obj2.getNum() : x1 = 0); - (obj2 = obj1.arrayGet(1), obj2.isNum() ? y1 = obj2.getNum() : y1 = 0); - (obj2 = obj1.arrayGet(2), obj2.isNum() ? x2 = obj2.getNum() : x2 = 0); - (obj2 = obj1.arrayGet(3), obj2.isNum() ? y2 = obj2.getNum() : y2 = 0); - - if (obj1.arrayGetLength() == 6) { - double x3, y3; - (obj2 = obj1.arrayGet(4), obj2.isNum() ? x3 = obj2.getNum() : x3 = 0); - (obj2 = obj1.arrayGet(5), obj2.isNum() ? y3 = obj2.getNum() : y3 = 0); - calloutLine = new AnnotCalloutMultiLine(x1, y1, x2, y2, x3, y3); - } else { - calloutLine = new AnnotCalloutLine(x1, y1, x2, y2); - } - } else { - calloutLine = nullptr; - } - - obj1 = dict->lookup("IT"); - if (obj1.isName()) { - const char *intentName = obj1.getName(); - - if (!strcmp(intentName, "FreeText")) { - intent = intentFreeText; - } else if (!strcmp(intentName, "FreeTextCallout")) { - intent = intentFreeTextCallout; - } else if (!strcmp(intentName, "FreeTextTypeWriter")) { - intent = intentFreeTextTypeWriter; - } else { - intent = intentFreeText; - } - } else { - intent = intentFreeText; - } - - obj1 = dict->lookup("BS"); - if (obj1.isDict()) { - delete border; - border = new AnnotBorderBS(obj1.getDict()); - } else if (!border) { - border = new AnnotBorderBS(); - } - - obj1 = dict->lookup("BE"); - if (obj1.isDict()) { - borderEffect = new AnnotBorderEffect(obj1.getDict()); - } else { - borderEffect = nullptr; - } - - obj1 = dict->lookup("RD"); - if (obj1.isArray()) { - rectangle = parseDiffRectangle(obj1.getArray(), rect); - } else { - rectangle = nullptr; - } - - obj1 = dict->lookup("LE"); - if (obj1.isName()) { - GooString styleName(obj1.getName()); - endStyle = parseAnnotLineEndingStyle(&styleName); - } else { - endStyle = annotLineEndingNone; - } -} - -void AnnotFreeText::setContents(GooString *new_content) { - Annot::setContents(new_content); - invalidateAppearance(); -} - -void AnnotFreeText::setAppearanceString(GooString *new_string) { - delete appearanceString; - - if (new_string) { - appearanceString = new GooString(new_string); - } else { - appearanceString = new GooString(); - } - - update ("DA", Object(appearanceString->copy())); - invalidateAppearance(); -} - -void AnnotFreeText::setQuadding(AnnotFreeTextQuadding new_quadding) { - quadding = new_quadding; - update ("Q", Object((int)quadding)); - invalidateAppearance(); -} - -void AnnotFreeText::setStyleString(GooString *new_string) { - delete styleString; - - if (new_string) { - styleString = new GooString(new_string); - //append the unicode marker <FE FF> if needed - if (!styleString->hasUnicodeMarker()) { - styleString->prependUnicodeMarker(); - } - } else { - styleString = new GooString(); - } - - update ("DS", Object(styleString->copy())); -} - -void AnnotFreeText::setCalloutLine(AnnotCalloutLine *line) { - delete calloutLine; - - Object obj1; - if (line == nullptr) { - obj1.setToNull(); - calloutLine = nullptr; - } else { - double x1 = line->getX1(), y1 = line->getY1(); - double x2 = line->getX2(), y2 = line->getY2(); - obj1 = Object( new Array(xref) ); - obj1.arrayAdd( Object(x1) ); - obj1.arrayAdd( Object(y1) ); - obj1.arrayAdd( Object(x2) ); - obj1.arrayAdd( Object(y2) ); - - AnnotCalloutMultiLine *mline = dynamic_cast<AnnotCalloutMultiLine*>(line); - if (mline) { - double x3 = mline->getX3(), y3 = mline->getY3(); - obj1.arrayAdd( Object(x3) ); - obj1.arrayAdd( Object(y3) ); - calloutLine = new AnnotCalloutMultiLine(x1, y1, x2, y2, x3, y3); - } else { - calloutLine = new AnnotCalloutLine(x1, y1, x2, y2); - } - } - - update("CL", std::move(obj1)); - invalidateAppearance(); -} - -void AnnotFreeText::setIntent(AnnotFreeTextIntent new_intent) { - const char *intentName; - - intent = new_intent; - if (new_intent == intentFreeText) - intentName = "FreeText"; - else if (new_intent == intentFreeTextCallout) - intentName = "FreeTextCallout"; - else // intentFreeTextTypeWriter - intentName = "FreeTextTypeWriter"; - update ("IT", Object(objName, intentName)); -} - -static GfxFont * createAnnotDrawFont(XRef * xref, Dict *fontResDict) -{ - const Ref dummyRef = { -1, -1 }; - - Dict *fontDict = new Dict(xref); - fontDict->add(copyString("BaseFont"), Object(objName, "Helvetica")); - fontDict->add(copyString("Subtype"), Object(objName, "Type0")); - fontDict->add(copyString("Encoding"), Object(objName, "WinAnsiEncoding")); - - Dict *fontsDict = new Dict(xref); - fontsDict->add(copyString("AnnotDrawFont"), Object(fontDict)); - - fontResDict->add(copyString("Font"), Object(fontsDict)); - - return GfxFont::makeFont(xref, "AnnotDrawFont", dummyRef, fontDict); -} - -void AnnotFreeText::parseAppearanceString(GooString *da, double &fontsize, AnnotColor* &fontcolor) { - fontsize = -1; - fontcolor = nullptr; - if (da) { - GooList * daToks = new GooList(); - int i = FormFieldText::tokenizeDA(da, daToks, "Tf"); - - if (i >= 1) { - fontsize = gatof(( (GooString *)daToks->get(i-1) )->getCString()); - // TODO: Font name - } - // Scan backwards: we are looking for the last set value - for (i = daToks->getLength()-1; i >= 0; --i) { - if (fontcolor == nullptr) { - if (!((GooString *)daToks->get(i))->cmp("g") && i >= 1) { - fontcolor = new AnnotColor(gatof(( (GooString *)daToks->get(i-1) )->getCString())); - } else if (!((GooString *)daToks->get(i))->cmp("rg") && i >= 3) { - fontcolor = new AnnotColor(gatof(( (GooString *)daToks->get(i-3) )->getCString()), - gatof(( (GooString *)daToks->get(i-2) )->getCString()), - gatof(( (GooString *)daToks->get(i-1) )->getCString())); - } else if (!((GooString *)daToks->get(i))->cmp("k") && i >= 4) { - fontcolor = new AnnotColor(gatof(( (GooString *)daToks->get(i-4) )->getCString()), - gatof(( (GooString *)daToks->get(i-3) )->getCString()), - gatof(( (GooString *)daToks->get(i-2) )->getCString()), - gatof(( (GooString *)daToks->get(i-1) )->getCString())); - } - } - } - deleteGooList(daToks, GooString); - } -} - -void AnnotFreeText::generateFreeTextAppearance() -{ - double borderWidth, ca = opacity; - - AnnotAppearanceBuilder appearBuilder; - appearBuilder.append ("q\n"); - - borderWidth = border->getWidth(); - if (borderWidth > 0) - appearBuilder.setLineStyleForBorder(border); - - // Box size - const double width = rect->x2 - rect->x1; - const double height = rect->y2 - rect->y1; - - // Parse some properties from the appearance string - double fontsize; - AnnotColor *fontcolor; - parseAppearanceString(appearanceString, fontsize, fontcolor); - // Default values - if (fontsize <= 0) - fontsize = 10; - if (fontcolor == nullptr) - fontcolor = new AnnotColor(0, 0, 0); // Black - if (!contents) - contents = new GooString (); - - // Draw box - GBool doFill = (color && color->getSpace() != AnnotColor::colorTransparent); - GBool doStroke = (borderWidth != 0); - if (doFill || doStroke) { - if (doStroke) { - appearBuilder.setDrawColor(fontcolor, gFalse); // Border color: same as font color - } - appearBuilder.appendf ("{0:.2f} {0:.2f} {1:.2f} {2:.2f} re\n", borderWidth/2, width-borderWidth, height-borderWidth); - if (doFill) { - appearBuilder.setDrawColor(color, gTrue); - appearBuilder.append(doStroke ? "B\n" : "f\n"); - } else { - appearBuilder.append("S\n"); - } - } - - // Setup text clipping - const double textmargin = borderWidth * 2; - const double textwidth = width - 2*textmargin; - appearBuilder.appendf ("{0:.2f} {0:.2f} {1:.2f} {2:.2f} re W n\n", textmargin, textwidth, height - 2*textmargin); - - Dict *fontResDict = new Dict(xref); - GfxFont *font = createAnnotDrawFont(xref, fontResDict); - - // Set font state - appearBuilder.setDrawColor(fontcolor, gTrue); - appearBuilder.appendf ("BT 1 0 0 1 {0:.2f} {1:.2f} Tm\n", textmargin, height - textmargin - fontsize * font->getDescent()); - appearBuilder.appendf ("/AnnotDrawFont {0:.2f} Tf\n", fontsize); - - int i = 0; - double xposPrev = 0; - while (i < contents->getLength()) { - GooString out; - double linewidth, xpos; - layoutText(contents, &out, &i, font, &linewidth, textwidth/fontsize, nullptr, gFalse); - linewidth *= fontsize; - switch (quadding) { - case quaddingCentered: - xpos = (textwidth - linewidth) / 2; - break; - case quaddingRightJustified: - xpos = textwidth - linewidth; - break; - default: // quaddingLeftJustified: - xpos = 0; - break; - } - appearBuilder.appendf("{0:.2f} {1:.2f} Td\n", xpos - xposPrev, -fontsize); - appearBuilder.writeString(out); - appearBuilder.append("Tj\n"); - xposPrev = xpos; - } - - font->decRefCnt(); - delete fontcolor; - appearBuilder.append ("ET Q\n"); - - double bbox[4]; - bbox[0] = bbox[1] = 0; - bbox[2] = rect->x2 - rect->x1; - bbox[3] = rect->y2 - rect->y1; - - if (ca == 1) { - appearance = createForm(appearBuilder.buffer(), bbox, gFalse, fontResDict); - } else { - Object aStream = createForm(appearBuilder.buffer(), bbox, gTrue, fontResDict); - - GooString appearBuf("/GS0 gs\n/Fm0 Do"); - Dict *resDict = createResourcesDict("Fm0", std::move(aStream), "GS0", ca, nullptr); - appearance = createForm(&appearBuf, bbox, gFalse, resDict); - } -} - -void AnnotFreeText::draw(Gfx *gfx, GBool printing) { - if (!isVisible (printing)) - return; - - annotLocker(); - if (appearance.isNull()) { - generateFreeTextAppearance(); - } - - // draw the appearance stream - Object obj = appearance.fetch(gfx->getXRef()); - gfx->drawAnnot(&obj, (AnnotBorder *)nullptr, color, - rect->x1, rect->y1, rect->x2, rect->y2, getRotation()); -} - -// Before retrieving the res dict, regenerate the appearance stream if needed, -// because AnnotFreeText::draw needs to store font info in the res dict -Object AnnotFreeText::getAppearanceResDict() { - if (appearance.isNull()) { - generateFreeTextAppearance(); - } - return Annot::getAppearanceResDict(); -} - -//------------------------------------------------------------------------ -// AnnotLine -//------------------------------------------------------------------------ - -AnnotLine::AnnotLine(PDFDoc *docA, PDFRectangle *rect) : - AnnotMarkup(docA, rect) { - type = typeLine; - annotObj.dictSet ("Subtype", Object(objName, "Line")); - - initialize (docA, annotObj.getDict()); -} - -AnnotLine::AnnotLine(PDFDoc *docA, Object *dictObject, Object *obj) : - AnnotMarkup(docA, dictObject, obj) { - type = typeLine; - initialize(docA, dictObject->getDict()); -} - -AnnotLine::~AnnotLine() { - delete coord1; - delete coord2; - - if (interiorColor) - delete interiorColor; - - if (measure) - delete measure; -} - -void AnnotLine::initialize(PDFDoc *docA, Dict *dict) { - Object obj1; - - obj1 = dict->lookup("L"); - if (obj1.isArray() && obj1.arrayGetLength() == 4) { - Object obj2; - double x1, y1, x2, y2; - - (obj2 = obj1.arrayGet(0), obj2.isNum() ? x1 = obj2.getNum() : x1 = 0); - (obj2 = obj1.arrayGet(1), obj2.isNum() ? y1 = obj2.getNum() : y1 = 0); - (obj2 = obj1.arrayGet(2), obj2.isNum() ? x2 = obj2.getNum() : x2 = 0); - (obj2 = obj1.arrayGet(3), obj2.isNum() ? y2 = obj2.getNum() : y2 = 0); - - coord1 = new AnnotCoord(x1, y1); - coord2 = new AnnotCoord(x2, y2); - } else { - coord1 = new AnnotCoord(); - coord2 = new AnnotCoord(); - } - - obj1 = dict->lookup("LE"); - if (obj1.isArray() && obj1.arrayGetLength() == 2) { - Object obj2; - - obj2 = obj1.arrayGet(0); - if (obj2.isString()) - startStyle = parseAnnotLineEndingStyle(obj2.getString()); - else - startStyle = annotLineEndingNone; - - obj2 = obj1.arrayGet(1); - if (obj2.isString()) - endStyle = parseAnnotLineEndingStyle(obj2.getString()); - else - endStyle = annotLineEndingNone; - - } else { - startStyle = endStyle = annotLineEndingNone; - } - - obj1 = dict->lookup("IC"); - if (obj1.isArray()) { - interiorColor = new AnnotColor(obj1.getArray()); - } else { - interiorColor = nullptr; - } - - obj1 = dict->lookup("LL"); - if (obj1.isNum()) { - leaderLineLength = obj1.getNum(); - } else { - leaderLineLength = 0; - } - - obj1 = dict->lookup("LLE"); - if (obj1.isNum()) { - leaderLineExtension = obj1.getNum(); - - if (leaderLineExtension < 0) - leaderLineExtension = 0; - } else { - leaderLineExtension = 0; - } - - obj1 = dict->lookup("Cap"); - if (obj1.isBool()) { - caption = obj1.getBool(); - } else { - caption = gFalse; - } - - obj1 = dict->lookup("IT"); - if (obj1.isName()) { - const char *intentName = obj1.getName(); - - if(!strcmp(intentName, "LineArrow")) { - intent = intentLineArrow; - } else if(!strcmp(intentName, "LineDimension")) { - intent = intentLineDimension; - } else { - intent = intentLineArrow; - } - } else { - intent = intentLineArrow; - } - - obj1 = dict->lookup("LLO"); - if (obj1.isNum()) { - leaderLineOffset = obj1.getNum(); - - if (leaderLineOffset < 0) - leaderLineOffset = 0; - } else { - leaderLineOffset = 0; - } - - obj1 = dict->lookup("CP"); - if (obj1.isName()) { - const char *captionName = obj1.getName(); - - if(!strcmp(captionName, "Inline")) { - captionPos = captionPosInline; - } else if(!strcmp(captionName, "Top")) { - captionPos = captionPosTop; - } else { - captionPos = captionPosInline; - } - } else { - captionPos = captionPosInline; - } - - obj1 = dict->lookup("Measure"); - if (obj1.isDict()) { - measure = nullptr; - } else { - measure = nullptr; - } - - obj1 = dict->lookup("CO"); - if (obj1.isArray() && (obj1.arrayGetLength() == 2)) { - Object obj2; - - obj2 = obj1.arrayGet(0); - captionTextHorizontal = obj2.isNum() ? obj2.getNum() : 0; - obj2 = obj1.arrayGet(1); - captionTextVertical = obj2.isNum() ? obj2.getNum() : 0; - } else { - captionTextHorizontal = captionTextVertical = 0; - } - - obj1 = dict->lookup("BS"); - if (obj1.isDict()) { - delete border; - border = new AnnotBorderBS(obj1.getDict()); - } else if (!border) { - border = new AnnotBorderBS(); - } -} - -void AnnotLine::setContents(GooString *new_content) { - Annot::setContents(new_content); - if (caption) - invalidateAppearance(); -} - -void AnnotLine::setVertices(double x1, double y1, double x2, double y2) { - delete coord1; - coord1 = new AnnotCoord(x1, y1); - delete coord2; - coord2 = new AnnotCoord(x2, y2); - - Array *lArray = new Array(xref); - lArray->add( Object(x1) ); - lArray->add( Object(y1) ); - lArray->add( Object(x2) ); - lArray->add( Object(y2) ); - - update("L", Object(lArray)); - invalidateAppearance(); -} - -void AnnotLine::setStartEndStyle(AnnotLineEndingStyle start, AnnotLineEndingStyle end) { - startStyle = start; - endStyle = end; - - Array *leArray = new Array(xref); - leArray->add( Object(objName, convertAnnotLineEndingStyle( startStyle )) ); - leArray->add( Object(objName, convertAnnotLineEndingStyle( endStyle )) ); - - update("LE", Object(leArray)); - invalidateAppearance(); -} - -void AnnotLine::setInteriorColor(AnnotColor *new_color) { - delete interiorColor; - - if (new_color) { - Object obj1 = new_color->writeToObject(xref); - update ("IC", std::move(obj1)); - interiorColor = new_color; - } else { - interiorColor = nullptr; - } - invalidateAppearance(); -} - -void AnnotLine::setLeaderLineLength(double len) { - leaderLineLength = len; - update ("LL", Object(len)); - invalidateAppearance(); -} - -void AnnotLine::setLeaderLineExtension(double len) { - leaderLineExtension = len; - update ("LLE", Object(len)); - - // LL is required if LLE is present - update ("LL", Object(leaderLineLength)); - invalidateAppearance(); -} - -void AnnotLine::setCaption(bool new_cap) { - caption = new_cap; - update ("Cap", Object(new_cap)); - invalidateAppearance(); -} - -void AnnotLine::setIntent(AnnotLineIntent new_intent) { - const char *intentName; - - intent = new_intent; - if (new_intent == intentLineArrow) - intentName = "LineArrow"; - else // intentLineDimension - intentName = "LineDimension"; - update ("IT", Object(objName, intentName)); -} - -void AnnotLine::generateLineAppearance() -{ - double borderWidth, ca = opacity; - - appearBBox = new AnnotAppearanceBBox(rect); - AnnotAppearanceBuilder appearBuilder; - appearBuilder.append ("q\n"); - if (color) { - appearBuilder.setDrawColor(color, gFalse); - } - - appearBuilder.setLineStyleForBorder(border); - borderWidth = border->getWidth(); - appearBBox->setBorderWidth(std::max(1., borderWidth)); - - const double x1 = coord1->getX(); - const double y1 = coord1->getY(); - const double x2 = coord2->getX(); - const double y2 = coord2->getY(); - - // Main segment length - const double main_len = sqrt((x2-x1)*(x2-x1) + (y2-y1)*(y2-y1)); - - // Main segment becomes positive x direction, coord1 becomes (0,0) - Matrix matr; - const double angle = atan2(y2 - y1, x2 - x1); - matr.m[0] = matr.m[3] = cos(angle); - matr.m[1] = sin(angle); - matr.m[2] = -matr.m[1]; - matr.m[4] = x1-rect->x1; - matr.m[5] = y1-rect->y1; - - double tx, ty, captionwidth = 0, captionheight = 0; - AnnotLineCaptionPos actualCaptionPos = captionPos; - const double fontsize = 9; - const double captionhmargin = 2; // Left and right margin (inline caption only) - const double captionmaxwidth = main_len - 2 * captionhmargin; - - Dict *fontResDict; - GfxFont *font; - - // Calculate caption width and height - if (caption) { - fontResDict = new Dict(xref); - font = createAnnotDrawFont(xref, fontResDict); - int lines = 0; - int i = 0; - while (i < contents->getLength()) { - GooString out; - double linewidth; - layoutText(contents, &out, &i, font, &linewidth, 0, nullptr, gFalse); - linewidth *= fontsize; - if (linewidth > captionwidth) { - captionwidth = linewidth; - } - ++lines; - } - captionheight = lines * fontsize; - // If text is longer than available space, turn into captionPosTop - if (captionwidth > captionmaxwidth) { - actualCaptionPos = captionPosTop; - } - } else { - fontResDict = nullptr; - font = nullptr; - } - - // Draw main segment - matr.transform (0, leaderLineLength, &tx, &ty); - appearBuilder.appendf ("{0:.2f} {1:.2f} m\n", tx, ty); - appearBBox->extendTo (tx, ty); - - if (captionwidth != 0 && actualCaptionPos == captionPosInline) { // Break in the middle - matr.transform ((main_len-captionwidth)/2 - captionhmargin, leaderLineLength, &tx, &ty); - appearBuilder.appendf ("{0:.2f} {1:.2f} l S\n", tx, ty); - - matr.transform ((main_len+captionwidth)/2 + captionhmargin, leaderLineLength, &tx, &ty); - appearBuilder.appendf ("{0:.2f} {1:.2f} m\n", tx, ty); - } - - matr.transform (main_len, leaderLineLength, &tx, &ty); - appearBuilder.appendf ("{0:.2f} {1:.2f} l S\n", tx, ty); - appearBBox->extendTo (tx, ty); - - // TODO: Line endings - - // Draw caption text - if (caption) { - double tlx = (main_len - captionwidth) / 2, tly; // Top-left coords - if (actualCaptionPos == captionPosInline) { - tly = leaderLineLength + captionheight / 2; - } else { - tly = leaderLineLength + captionheight + 2*borderWidth; - } - - tlx += captionTextHorizontal; - tly += captionTextVertical; - - // Adjust bounding box - matr.transform (tlx, tly-captionheight, &tx, &ty); - appearBBox->extendTo (tx, ty); - matr.transform (tlx+captionwidth, tly-captionheight, &tx, &ty); - appearBBox->extendTo (tx, ty); - matr.transform (tlx+captionwidth, tly, &tx, &ty); - appearBBox->extendTo (tx, ty); - matr.transform (tlx, tly, &tx, &ty); - appearBBox->extendTo (tx, ty); - - // Setup text state (reusing transformed top-left coord) - appearBuilder.appendf ("0 g BT /AnnotDrawFont {0:.2f} Tf\n", fontsize); // Font color: black - appearBuilder.appendf ("{0:.2f} {1:.2f} {2:.2f} {3:.2f} {4:.2f} {5:.2f} Tm\n", - matr.m[0], matr.m[1], matr.m[2], matr.m[3], tx, ty); - appearBuilder.appendf ("0 {0:.2f} Td\n", -fontsize * font->getDescent()); - // Draw text - int i = 0; - double xposPrev = 0; - while (i < contents->getLength()) { - GooString out; - double linewidth, xpos; - layoutText(contents, &out, &i, font, &linewidth, 0, nullptr, gFalse); - linewidth *= fontsize; - xpos = (captionwidth - linewidth) / 2; - appearBuilder.appendf("{0:.2f} {1:.2f} Td\n", xpos - xposPrev, -fontsize); - appearBuilder.writeString(out); - appearBuilder.append ("Tj\n"); - xposPrev = xpos; - } - appearBuilder.append ("ET\n"); - font->decRefCnt(); - } - - // Draw leader lines - double ll_len = fabs(leaderLineLength) + leaderLineExtension; - double sign = leaderLineLength >= 0 ? 1 : -1; - if (ll_len != 0) { - matr.transform (0, 0, &tx, &ty); - appearBuilder.appendf ("{0:.2f} {1:.2f} m\n", tx, ty); - appearBBox->extendTo (tx, ty); - matr.transform (0, sign*ll_len, &tx, &ty); - appearBuilder.appendf ("{0:.2f} {1:.2f} l S\n", tx, ty); - appearBBox->extendTo (tx, ty); - - matr.transform (main_len, 0, &tx, &ty); - appearBuilder.appendf ("{0:.2f} {1:.2f} m\n", tx, ty); - appearBBox->extendTo (tx, ty); - matr.transform (main_len, sign*ll_len, &tx, &ty); - appearBuilder.appendf ("{0:.2f} {1:.2f} l S\n", tx, ty); - appearBBox->extendTo (tx, ty); - } - - appearBuilder.append ("Q\n"); - - double bbox[4]; - appearBBox->getBBoxRect(bbox); - if (ca == 1) { - appearance = createForm(appearBuilder.buffer(), bbox, gFalse, fontResDict); - } else { - Object aStream = createForm(appearBuilder.buffer(), bbox, gTrue, fontResDict); - - GooString appearBuf("/GS0 gs\n/Fm0 Do"); - Dict *resDict = createResourcesDict("Fm0", std::move(aStream), "GS0", ca, nullptr); - appearance = createForm(&appearBuf, bbox, gFalse, resDict); - } -} - -void AnnotLine::draw(Gfx *gfx, GBool printing) { - if (!isVisible (printing)) - return; - - annotLocker(); - if (appearance.isNull()) { - generateLineAppearance(); - } - - // draw the appearance stream - Object obj = appearance.fetch(gfx->getXRef()); - if (appearBBox) { - gfx->drawAnnot(&obj, (AnnotBorder *)nullptr, color, - appearBBox->getPageXMin(), appearBBox->getPageYMin(), - appearBBox->getPageXMax(), appearBBox->getPageYMax(), - getRotation()); - } else { - gfx->drawAnnot(&obj, (AnnotBorder *)nullptr, color, - rect->x1, rect->y1, rect->x2, rect->y2, getRotation()); - } -} - -// Before retrieving the res dict, regenerate the appearance stream if needed, -// because AnnotLine::draw may need to store font info in the res dict -Object AnnotLine::getAppearanceResDict() { - if (appearance.isNull()) { - generateLineAppearance(); - } - return Annot::getAppearanceResDict(); -} - -//------------------------------------------------------------------------ -// AnnotTextMarkup -//------------------------------------------------------------------------ -AnnotTextMarkup::AnnotTextMarkup(PDFDoc *docA, PDFRectangle *rect, AnnotSubtype subType) : - AnnotMarkup(docA, rect) { - switch (subType) { - case typeHighlight: - annotObj.dictSet ("Subtype", Object(objName, "Highlight")); - break; - case typeUnderline: - annotObj.dictSet ("Subtype", Object(objName, "Underline")); - break; - case typeSquiggly: - annotObj.dictSet ("Subtype", Object(objName, "Squiggly")); - break; - case typeStrikeOut: - annotObj.dictSet ("Subtype", Object(objName, "StrikeOut")); - break; - default: - assert (0 && "Invalid subtype for AnnotTextMarkup\n"); - } - - // Store dummy quadrilateral with null coordinates - Array *quadPoints = new Array(doc->getXRef()); - for (int i = 0; i < 4*2; ++i) { - quadPoints->add(Object(0.)); - } - annotObj.dictSet ("QuadPoints", Object(quadPoints)); - - initialize(docA, annotObj.getDict()); -} - -AnnotTextMarkup::AnnotTextMarkup(PDFDoc *docA, Object *dictObject, Object *obj) : - AnnotMarkup(docA, dictObject, obj) { - // the real type will be read in initialize() - type = typeHighlight; - initialize(docA, dictObject->getDict()); -} - -void AnnotTextMarkup::initialize(PDFDoc *docA, Dict *dict) { - Object obj1; - - obj1 = dict->lookup("Subtype"); - if (obj1.isName()) { - GooString typeName(obj1.getName()); - if (!typeName.cmp("Highlight")) { - type = typeHighlight; - } else if (!typeName.cmp("Underline")) { - type = typeUnderline; - } else if (!typeName.cmp("Squiggly")) { - type = typeSquiggly; - } else if (!typeName.cmp("StrikeOut")) { - type = typeStrikeOut; - } - } - - obj1 = dict->lookup("QuadPoints"); - if (obj1.isArray()) { - quadrilaterals = new AnnotQuadrilaterals(obj1.getArray(), rect); - } else { - error(errSyntaxError, -1, "Bad Annot Text Markup QuadPoints"); - quadrilaterals = nullptr; - ok = gFalse; - } -} - -AnnotTextMarkup::~AnnotTextMarkup() { - delete quadrilaterals; -} - -void AnnotTextMarkup::setType(AnnotSubtype new_type) { - const char *typeName = nullptr; /* squelch bogus compiler warning */ - - switch (new_type) { - case typeHighlight: - typeName = "Highlight"; - break; - case typeUnderline: - typeName = "Underline"; - break; - case typeSquiggly: - typeName = "Squiggly"; - break; - case typeStrikeOut: - typeName = "StrikeOut"; - break; - default: - assert(!"Invalid subtype"); - } - - type = new_type; - update("Subtype", Object(objName, typeName)); - invalidateAppearance(); -} - -void AnnotTextMarkup::setQuadrilaterals(AnnotQuadrilaterals *quadPoints) { - Array *a = new Array(xref); - - for (int i = 0; i < quadPoints->getQuadrilateralsLength(); ++i) { - a->add(Object(quadPoints->getX1(i))); - a->add(Object(quadPoints->getY1(i))); - a->add(Object(quadPoints->getX2(i))); - a->add(Object(quadPoints->getY2(i))); - a->add(Object(quadPoints->getX3(i))); - a->add(Object(quadPoints->getY3(i))); - a->add(Object(quadPoints->getX4(i))); - a->add(Object(quadPoints->getY4(i))); - } - - delete quadrilaterals; - quadrilaterals = new AnnotQuadrilaterals(a, rect); - - annotObj.dictSet ("QuadPoints", Object(a)); - invalidateAppearance(); -} - -void AnnotTextMarkup::draw(Gfx *gfx, GBool printing) { - double ca = 1; - int i; - - if (!isVisible (printing)) - return; - - annotLocker(); - if (appearance.isNull() || type == typeHighlight) { - GBool blendMultiply = gTrue; - ca = opacity; - - AnnotAppearanceBuilder appearBuilder; - appearBuilder.append ("q\n"); - - /* Adjust BBox */ - delete appearBBox; - appearBBox = new AnnotAppearanceBBox(rect); - for (i = 0; i < quadrilaterals->getQuadrilateralsLength(); ++i) { - appearBBox->extendTo (quadrilaterals->getX1(i) - rect->x1, quadrilaterals->getY1(i) - rect->y1); - appearBBox->extendTo (quadrilaterals->getX2(i) - rect->x1, quadrilaterals->getY2(i) - rect->y1); - appearBBox->extendTo (quadrilaterals->getX3(i) - rect->x1, quadrilaterals->getY3(i) - rect->y1); - appearBBox->extendTo (quadrilaterals->getX4(i) - rect->x1, quadrilaterals->getY4(i) - rect->y1); - } - - switch (type) { - case typeUnderline: - if (color) { - appearBuilder.setDrawColor(color, gFalse); - } - appearBuilder.append ("[] 0 d 1 w\n"); - - for (i = 0; i < quadrilaterals->getQuadrilateralsLength(); ++i) { - double x3, y3, x4, y4; - - x3 = quadrilaterals->getX3(i); - y3 = quadrilaterals->getY3(i); - x4 = quadrilaterals->getX4(i); - y4 = quadrilaterals->getY4(i); - - appearBuilder.appendf ("{0:.2f} {1:.2f} m\n", x3, y3); - appearBuilder.appendf ("{0:.2f} {1:.2f} l\n", x4, y4); - appearBuilder.append ("S\n"); - } - break; - case typeStrikeOut: - if (color) { - appearBuilder.setDrawColor(color, gFalse); - } - blendMultiply = gFalse; - appearBuilder.append ("[] 0 d 1 w\n"); - - for (i = 0; i < quadrilaterals->getQuadrilateralsLength(); ++i) { - double x1, y1, x2, y2; - double x3, y3, x4, y4; - - x1 = quadrilaterals->getX1(i); - y1 = quadrilaterals->getY1(i); - x2 = quadrilaterals->getX2(i); - y2 = quadrilaterals->getY2(i); - - x3 = quadrilaterals->getX3(i); - y3 = quadrilaterals->getY3(i); - x4 = quadrilaterals->getX4(i); - y4 = quadrilaterals->getY4(i); - - appearBuilder.appendf ("{0:.2f} {1:.2f} m\n", (x1+x3)/2., (y1+y3)/2.); - appearBuilder.appendf ("{0:.2f} {1:.2f} l\n", (x2+x4)/2., (y2+y4)/2.); - appearBuilder.append ("S\n"); - } - break; - case typeSquiggly: - if (color) { - appearBuilder.setDrawColor(color, gFalse); - } - appearBuilder.append ("[] 0 d 1 w\n"); - - for (i = 0; i < quadrilaterals->getQuadrilateralsLength(); ++i) { - double x1, y1, x2, y3; - double h6; - - x1 = quadrilaterals->getX1(i); - y1 = quadrilaterals->getY1(i); - x2 = quadrilaterals->getX2(i); - y3 = quadrilaterals->getY3(i); - h6 = (y1 - y3) / 6.0; - - appearBuilder.appendf ("{0:.2f} {1:.2f} m\n", x1, y3+h6); - bool down = false; - do { - down = !down; // Zigzag line - x1 += 2; - appearBuilder.appendf ("{0:.2f} {1:.2f} l\n", x1, y3 + (down ? 0 : h6)); - } while (x1 < x2); - appearBuilder.append ("S\n"); - } - break; - default: - case typeHighlight: - if (color) - appearBuilder.setDrawColor(color, gTrue); - - double biggestBorder = 0; - for (i = 0; i < quadrilaterals->getQuadrilateralsLength(); ++i) { - double x1, y1, x2, y2, x3, y3, x4, y4; - double h4; - - x1 = quadrilaterals->getX1(i); - y1 = quadrilaterals->getY1(i); - x2 = quadrilaterals->getX2(i); - y2 = quadrilaterals->getY2(i); - x3 = quadrilaterals->getX3(i); - y3 = quadrilaterals->getY3(i); - x4 = quadrilaterals->getX4(i); - y4 = quadrilaterals->getY4(i); - h4 = fabs(y1 - y3) / 4.0; - - if (h4 > biggestBorder) { - biggestBorder = h4; - } - - appearBuilder.appendf ("{0:.2f} {1:.2f} m\n", x3, y3); - appearBuilder.appendf ("{0:.2f} {1:.2f} {2:.2f} {3:.2f} {4:.2f} {5:.2f} c\n", - x3 - h4, y3 + h4, x1 - h4, y1 - h4, x1, y1); - appearBuilder.appendf ("{0:.2f} {1:.2f} l\n", x2, y2); - appearBuilder.appendf ("{0:.2f} {1:.2f} {2:.2f} {3:.2f} {4:.2f} {5:.2f} c\n", - x2 + h4, y2 - h4, x4 + h4, y4 + h4, x4, y4); - appearBuilder.append ("f\n"); - } - appearBBox->setBorderWidth(biggestBorder); - break; - } - appearBuilder.append ("Q\n"); - - double bbox[4]; - bbox[0] = appearBBox->getPageXMin(); - bbox[1] = appearBBox->getPageYMin(); - bbox[2] = appearBBox->getPageXMax(); - bbox[3] = appearBBox->getPageYMax(); - Object aStream = createForm(appearBuilder.buffer(), bbox, gTrue, nullptr); - - GooString appearBuf("/GS0 gs\n/Fm0 Do"); - Dict *resDict = createResourcesDict("Fm0", std::move(aStream), "GS0", 1, blendMultiply ? "Multiply" : nullptr); - if (ca == 1) { - appearance = createForm(&appearBuf, bbox, gFalse, resDict); - } else { - aStream = createForm(&appearBuf, bbox, gTrue, resDict); - - Dict *resDict2 = createResourcesDict("Fm0", std::move(aStream), "GS0", ca, nullptr); - appearance = createForm(&appearBuf, bbox, gFalse, resDict2); - } - } - - // draw the appearance stream - Object obj = appearance.fetch(gfx->getXRef()); - if (appearBBox) { - gfx->drawAnnot(&obj, (AnnotBorder *)nullptr, color, - appearBBox->getPageXMin(), appearBBox->getPageYMin(), - appearBBox->getPageXMax(), appearBBox->getPageYMax(), - getRotation()); - } else { - gfx->drawAnnot(&obj, (AnnotBorder *)nullptr, color, - rect->x1, rect->y1, rect->x2, rect->y2, getRotation()); - } -} - -//------------------------------------------------------------------------ -// AnnotWidget -//------------------------------------------------------------------------ - -AnnotWidget::AnnotWidget(PDFDoc *docA, Object *dictObject, Object *obj) : - Annot(docA, dictObject, obj) { - type = typeWidget; - field = nullptr; - initialize(docA, dictObject->getDict()); -} - -AnnotWidget::AnnotWidget(PDFDoc *docA, Object *dictObject, Object *obj, FormField *fieldA) : - Annot(docA, dictObject, obj) { - type = typeWidget; - field = fieldA; - initialize(docA, dictObject->getDict()); -} - -AnnotWidget::~AnnotWidget() { - if (appearCharacs) - delete appearCharacs; - - if (action) - delete action; - - if (parent) - delete parent; -} - -void AnnotWidget::initialize(PDFDoc *docA, Dict *dict) { - Object obj1; - - form = doc->getCatalog()->getForm(); - - obj1 = dict->lookup("H"); - if (obj1.isName()) { - const char *modeName = obj1.getName(); - - if(!strcmp(modeName, "N")) { - mode = highlightModeNone; - } else if(!strcmp(modeName, "O")) { - mode = highlightModeOutline; - } else if(!strcmp(modeName, "P") || !strcmp(modeName, "T")) { - mode = highlightModePush; - } else { - mode = highlightModeInvert; - } - } else { - mode = highlightModeInvert; - } - - obj1 = dict->lookup("MK"); - if (obj1.isDict()) { - appearCharacs = new AnnotAppearanceCharacs(obj1.getDict()); - } else { - appearCharacs = nullptr; - } - - action = nullptr; - obj1 = dict->lookup("A"); - if (obj1.isDict()) { - action = LinkAction::parseAction(&obj1, doc->getCatalog()->getBaseURI()); - } - - additionalActions = dict->lookupNF("AA"); - - obj1 = dict->lookup("Parent"); - if (obj1.isDict()) { - parent = nullptr; - } else { - parent = nullptr; - } - - obj1 = dict->lookup("BS"); - if (obj1.isDict()) { - delete border; - border = new AnnotBorderBS(obj1.getDict()); - } - - updatedAppearanceStream.num = updatedAppearanceStream.gen = -1; -} - -LinkAction* AnnotWidget::getAdditionalAction(AdditionalActionsType type) -{ - return ::getAdditionalAction(type, &additionalActions, doc); -} - -LinkAction* AnnotWidget::getFormAdditionalAction(FormAdditionalActionsType type) -{ - return ::getFormAdditionalAction(type, &additionalActions, doc); -} - -// Grand unified handler for preparing text strings to be drawn into form -// fields. Takes as input a text string (in PDFDocEncoding or UTF-16). -// Converts some or all of this string to the appropriate encoding for the -// specified font, and computes the width of the text. Can optionally stop -// converting when a specified width has been reached, to perform line-breaking -// for multi-line fields. -// -// Parameters: -// text: input text string to convert -// outBuf: buffer for writing re-encoded string -// i: index at which to start converting; will be updated to point just after -// last character processed -// font: the font which will be used for display -// width: computed width (unscaled by font size) will be stored here -// widthLimit: if non-zero, stop converting to keep width under this value -// (should be scaled down by font size) -// charCount: count of number of characters will be stored here -// noReencode: if set, do not try to translate the character encoding -// (useful for Zapf Dingbats or other unusual encodings) -// can only be used with simple fonts, not CID-keyed fonts -// -// TODO: Handle surrogate pairs in UTF-16. -// Should be able to generate output for any CID-keyed font. -// Doesn't handle vertical fonts--should it? -void Annot::layoutText(const GooString *text, GooString *outBuf, int *i, - const GfxFont *font, double *width, double widthLimit, - int *charCount, GBool noReencode) -{ - CharCode c; - Unicode uChar, *uAux; - double w = 0.0; - int uLen, n; - double dx, dy, ox, oy; - if (!text) { - return; - } - GBool unicode = text->hasUnicodeMarker(); - GBool spacePrev; // previous character was a space - - // State for backtracking when more text has been processed than fits within - // widthLimit. We track for both input (text) and output (outBuf) the offset - // to the first character to discard. - // - // We keep track of several points: - // 1 - end of previous completed word which fits - // 2 - previous character which fit - int last_i1, last_i2, last_o1, last_o2; - - if (unicode && text->getLength() % 2 != 0) { - error(errSyntaxError, -1, "AnnotWidget::layoutText, bad unicode string"); - return; - } - - // skip Unicode marker on string if needed - if (unicode && *i == 0) - *i = 2; - - // Start decoding and copying characters, until either: - // we reach the end of the string - // we reach the maximum width - // we reach a newline character - // As we copy characters, keep track of the last full word to fit, so that we - // can backtrack if we exceed the maximum width. - last_i1 = last_i2 = *i; - last_o1 = last_o2 = 0; - spacePrev = gFalse; - outBuf->clear(); - - while (*i < text->getLength()) { - last_i2 = *i; - last_o2 = outBuf->getLength(); - - if (unicode) { - uChar = (unsigned char)(text->getChar(*i)) << 8; - uChar += (unsigned char)(text->getChar(*i + 1)); - *i += 2; - } else { - if (noReencode) - uChar = text->getChar(*i) & 0xff; - else - uChar = pdfDocEncoding[text->getChar(*i) & 0xff]; - *i += 1; - } - - // Explicit line break? - if (uChar == '\r' || uChar == '\n') { - // Treat a <CR><LF> sequence as a single line break - if (uChar == '\r' && *i < text->getLength()) { - if (unicode && text->getChar(*i) == '\0' - && text->getChar(*i + 1) == '\n') - *i += 2; - else if (!unicode && text->getChar(*i) == '\n') - *i += 1; - } - - break; - } - - if (noReencode) { - outBuf->append(uChar); - } else { - const CharCodeToUnicode *ccToUnicode = font->getToUnicode(); - if (!ccToUnicode) { - // This assumes an identity CMap. - outBuf->append((uChar >> 8) & 0xff); - outBuf->append(uChar & 0xff); - } else if (ccToUnicode->mapToCharCode(&uChar, &c, 1)) { - if (font->isCIDFont()) { - // TODO: This assumes an identity CMap. It should be extended to - // handle the general case. - outBuf->append((c >> 8) & 0xff); - outBuf->append(c & 0xff); - } else { - // 8-bit font - outBuf->append(c); - } - } else { - error(errSyntaxError, -1, "AnnotWidget::layoutText, cannot convert U+{0:04uX}", uChar); - } - } - - // If we see a space, then we have a linebreak opportunity. - if (uChar == ' ') { - last_i1 = *i; - if (!spacePrev) - last_o1 = last_o2; - spacePrev = gTrue; - } else { - spacePrev = gFalse; - } - - // Compute width of character just output - if (outBuf->getLength() > last_o2) { - dx = 0.0; - font->getNextChar(outBuf->getCString() + last_o2, - outBuf->getLength() - last_o2, - &c, &uAux, &uLen, &dx, &dy, &ox, &oy); - w += dx; - } - - // Current line over-full now? - if (widthLimit > 0.0 && w > widthLimit) { - if (last_o1 > 0) { - // Back up to the previous word which fit, if there was a previous - // word. - *i = last_i1; - outBuf->del(last_o1, outBuf->getLength() - last_o1); - } else if (last_o2 > 0) { - // Otherwise, back up to the previous character (in the only word on - // this line) - *i = last_i2; - outBuf->del(last_o2, outBuf->getLength() - last_o2); - } else { - // Otherwise, we were trying to fit the first character; include it - // anyway even if it overflows the space--no updates to make. - } - break; - } - } - - // If splitting input into lines because we reached the width limit, then - // consume any remaining trailing spaces that would go on this line from the - // input. If in doing so we reach a newline, consume that also. This code - // won't run if we stopped at a newline above, since in that case w <= - // widthLimit still. - if (widthLimit > 0.0 && w > widthLimit) { - if (unicode) { - while (*i < text->getLength() - && text->getChar(*i) == '\0' && text->getChar(*i + 1) == ' ') - *i += 2; - if (*i < text->getLength() - && text->getChar(*i) == '\0' && text->getChar(*i + 1) == '\r') - *i += 2; - if (*i < text->getLength() - && text->getChar(*i) == '\0' && text->getChar(*i + 1) == '\n') - *i += 2; - } else { - while (*i < text->getLength() && text->getChar(*i) == ' ') - *i += 1; - if (*i < text->getLength() && text->getChar(*i) == '\r') - *i += 1; - if (*i < text->getLength() && text->getChar(*i) == '\n') - *i += 1; - } - } - - // Compute the actual width and character count of the final string, based on - // breakpoint, if this information is requested by the caller. - if (width != nullptr || charCount != nullptr) { - char *s = outBuf->getCString(); - int len = outBuf->getLength(); - - if (width != nullptr) - *width = 0.0; - if (charCount != nullptr) - *charCount = 0; - - while (len > 0) { - dx = 0.0; - n = font->getNextChar(s, len, &c, &uAux, &uLen, &dx, &dy, &ox, &oy); - - if (n == 0) { - break; - } - - if (width != nullptr) - *width += dx; - if (charCount != nullptr) - *charCount += 1; - - s += n; - len -= n; - } - } -} - -// Copy the given string to appearBuf, adding parentheses around it and -// escaping characters as appropriate. -void AnnotAppearanceBuilder::writeString(const GooString &str) -{ - char c; - int i; - - appearBuf->append('('); - - for (i = 0; i < str.getLength(); ++i) { - c = str.getChar(i); - if (c == '(' || c == ')' || c == '\\') { - appearBuf->append('\\'); - appearBuf->append(c); - } else if (c < 0x20) { - appearBuf->appendf("\\{0:03o}", (unsigned char)c); - } else { - appearBuf->append(c); - } - } - - appearBuf->append(')'); -} - -// Draw the variable text or caption for a field. -bool AnnotAppearanceBuilder::drawText(const GooString *text, const GooString *da, const GfxResources *resources, - const AnnotBorder *border, const AnnotAppearanceCharacs *appearCharacs, const PDFRectangle *rect, - GBool multiline, int comb, int quadding, - GBool txField, GBool forceZapfDingbats, - XRef *xref, bool *addedDingbatsResource, - GBool password) { - GooList *daToks; - GooString *tok, *convertedText; - const GfxFont *font; - double dx, dy; - double fontSize, fontSize2, borderWidth, x, xPrev, y, w, wMax; - int tfPos, tmPos, i, j; - int rot; - GBool freeText = gFalse; // true if text should be freed before return - GfxFont *fontToFree = nullptr; - - //~ if there is no MK entry, this should use the existing content stream, - //~ and only replace the marked content portion of it - //~ (this is only relevant for Tx fields) - - // parse the default appearance string - tfPos = tmPos = -1; - if (da) { - daToks = new GooList(); - i = 0; - while (i < da->getLength()) { - while (i < da->getLength() && Lexer::isSpace(da->getChar(i))) { - ++i; - } - if (i < da->getLength()) { - for (j = i + 1; - j < da->getLength() && !Lexer::isSpace(da->getChar(j)); - ++j) ; - daToks->append(new GooString(da, i, j - i)); - i = j; - } - } - for (i = 2; i < daToks->getLength(); ++i) { - if (i >= 2 && !((GooString *)daToks->get(i))->cmp("Tf")) { - tfPos = i - 2; - } else if (i >= 6 && !((GooString *)daToks->get(i))->cmp("Tm")) { - tmPos = i - 6; - } - } - } else { - daToks = nullptr; - } - - // force ZapfDingbats - if (forceZapfDingbats) { - assert(xref != nullptr); - assert(addedDingbatsResource != nullptr); - *addedDingbatsResource = false; - - if (tfPos >= 0) { - tok = (GooString *)daToks->get(tfPos); - if (tok->cmp("/ZaDb")) { - tok->clear(); - tok->append("/ZaDb"); - } - } - } - // get the font and font size - font = nullptr; - fontSize = 0; - if (tfPos >= 0) { - tok = (GooString *)daToks->get(tfPos); - if (tok->getLength() >= 1 && tok->getChar(0) == '/') { - if (!resources || !(font = resources->lookupFont(tok->getCString() + 1))) { - if (forceZapfDingbats) { - // We are forcing ZaDb but the font does not exist - // so create a fake one - Ref r; // dummy Ref, it's not used at all in this codepath - r.num = -1; - r.gen = -1; - Dict *d = new Dict(xref); - fontToFree = new Gfx8BitFont(xref, "ZaDb", r, new GooString("ZapfDingbats"), fontType1, r, d); - delete d; - font = fontToFree; - *addedDingbatsResource = true; - } else { - error(errSyntaxError, -1, "Unknown font in field's DA string"); - } - } - } else { - error(errSyntaxError, -1, "Invalid font name in 'Tf' operator in field's DA string"); - } - tok = (GooString *)daToks->get(tfPos + 1); - fontSize = gatof(tok->getCString()); - } else { - error(errSyntaxError, -1, "Missing 'Tf' operator in field's DA string"); - } - if (!font) { - if (daToks) { - deleteGooList(daToks, GooString); - } - return false; - } - - // get the border width - borderWidth = border ? border->getWidth() : 0; - - // for a password field, replace all characters with asterisks - if (password) { - int len; - if (text->hasUnicodeMarker()) - len = (text->getLength() - 2) / 2; - else - len = text->getLength(); - - GooString *newText = new GooString; - for (i = 0; i < len; ++i) - newText->append('*'); - text = newText; - freeText = gTrue; - } - - convertedText = new GooString; - - // setup - if (txField) { - appearBuf->append("/Tx BMC\n"); - } - appearBuf->append("q\n"); - rot = appearCharacs ? appearCharacs->getRotation() : 0; - switch (rot) { - case 90: - appearBuf->appendf("0 1 -1 0 {0:.2f} 0 cm\n", rect->x2 - rect->x1); - dx = rect->y2 - rect->y1; - dy = rect->x2 - rect->x1; - break; - case 180: - appearBuf->appendf("-1 0 0 -1 {0:.2f} {1:.2f} cm\n", - rect->x2 - rect->x1, rect->y2 - rect->y1); - dx = rect->x2 - rect->y2; - dy = rect->y2 - rect->y1; - break; - case 270: - appearBuf->appendf("0 -1 1 0 0 {0:.2f} cm\n", rect->y2 - rect->y1); - dx = rect->y2 - rect->y1; - dy = rect->x2 - rect->x1; - break; - default: // assume rot == 0 - dx = rect->x2 - rect->x1; - dy = rect->y2 - rect->y1; - break; - } - appearBuf->append("BT\n"); - // multi-line text - if (multiline) { - // note: the comb flag is ignored in multiline mode - - wMax = dx - 2 * borderWidth - 4; - - // compute font autosize - if (fontSize == 0) { - for (fontSize = 20; fontSize > 1; --fontSize) { - y = dy - 3; - i = 0; - while (i < text->getLength()) { - Annot::layoutText(text, convertedText, &i, font, &w, wMax / fontSize, nullptr, - forceZapfDingbats); - y -= fontSize; - } - // approximate the descender for the last line - if (y >= 0.33 * fontSize) { - break; - } - } - if (tfPos >= 0) { - tok = (GooString *)daToks->get(tfPos + 1); - tok->clear(); - tok->appendf("{0:.2f}", fontSize); - } - } - - // starting y coordinate - // (note: each line of text starts with a Td operator that moves - // down a line) - y = dy - 3; - - // set the font matrix - if (tmPos >= 0) { - tok = (GooString *)daToks->get(tmPos + 4); - tok->clear(); - tok->append('0'); - tok = (GooString *)daToks->get(tmPos + 5); - tok->clear(); - tok->appendf("{0:.2f}", y); - } - - // write the DA string - if (daToks) { - for (i = 0; i < daToks->getLength(); ++i) { - appearBuf->append((GooString *)daToks->get(i))->append(' '); - } - } - - // write the font matrix (if not part of the DA string) - if (tmPos < 0) { - appearBuf->appendf("1 0 0 1 0 {0:.2f} Tm\n", y); - } - - // write a series of lines of text - i = 0; - xPrev = 0; - while (i < text->getLength()) { - Annot::layoutText(text, convertedText, &i, font, &w, wMax / fontSize, nullptr, - forceZapfDingbats); - w *= fontSize; - - // compute text start position - switch (quadding) { - case quaddingLeftJustified: - default: - x = borderWidth + 2; - break; - case quaddingCentered: - x = (dx - w) / 2; - break; - case quaddingRightJustified: - x = dx - borderWidth - 2 - w; - break; - } - - // draw the line - appearBuf->appendf("{0:.2f} {1:.2f} Td\n", x - xPrev, -fontSize); - writeString(*convertedText); - appearBuf->append(" Tj\n"); - - // next line - xPrev = x; - } - - // single-line text - } else { - //~ replace newlines with spaces? - what does Acrobat do? - - // comb formatting - if (comb > 0) { - int charCount; - - // compute comb spacing - w = (dx - 2 * borderWidth) / comb; - - // compute font autosize - if (fontSize == 0) { - fontSize = dy - 2 * borderWidth; - if (w < fontSize) { - fontSize = w; - } - fontSize = floor(fontSize); - if (tfPos >= 0) { - tok = (GooString *)daToks->get(tfPos + 1); - tok->clear(); - tok->appendf("{0:.2f}", fontSize); - } - } - - i = 0; - Annot::layoutText(text, convertedText, &i, font, nullptr, 0.0, &charCount, - forceZapfDingbats); - if (charCount > comb) - charCount = comb; - - // compute starting text cell - switch (quadding) { - case quaddingLeftJustified: - default: - x = borderWidth; - break; - case quaddingCentered: - x = borderWidth + (comb - charCount) / 2 * w; - break; - case quaddingRightJustified: - x = borderWidth + (comb - charCount) * w; - break; - } - y = 0.5 * dy - 0.4 * fontSize; - - // set the font matrix - if (tmPos >= 0) { - tok = (GooString *)daToks->get(tmPos + 4); - tok->clear(); - tok->appendf("{0:.2f}", x); - tok = (GooString *)daToks->get(tmPos + 5); - tok->clear(); - tok->appendf("{0:.2f}", y); - } - - // write the DA string - if (daToks) { - for (i = 0; i < daToks->getLength(); ++i) { - appearBuf->append((GooString *)daToks->get(i))->append(' '); - } - } - - // write the font matrix (if not part of the DA string) - if (tmPos < 0) { - appearBuf->appendf("1 0 0 1 {0:.2f} {1:.2f} Tm\n", x, y); - } - - // write the text string - char *s = convertedText->getCString(); - int len = convertedText->getLength(); - i = 0; - xPrev = w; // so that first character is placed properly - while (i < comb && len > 0) { - CharCode code; - Unicode *uAux; - int uLen, n; - double dx, dy, ox, oy; - - dx = 0.0; - n = font->getNextChar(s, len, &code, &uAux, &uLen, &dx, &dy, &ox, &oy); - dx *= fontSize; - - // center each character within its cell, by advancing the text - // position the appropriate amount relative to the start of the - // previous character - x = 0.5 * (w - dx); - appearBuf->appendf("{0:.2f} 0 Td\n", x - xPrev + w); - - GooString charBuf(s, n); - writeString(charBuf); - appearBuf->append(" Tj\n"); - - i++; - s += n; - len -= n; - xPrev = x; - } - - // regular (non-comb) formatting - } else { - i = 0; - Annot::layoutText(text, convertedText, &i, font, &w, 0.0, nullptr, - forceZapfDingbats); - - // compute font autosize - if (fontSize == 0) { - fontSize = dy - 2 * borderWidth; - fontSize2 = (dx - 4 - 2 * borderWidth) / w; - if (fontSize2 < fontSize) { - fontSize = fontSize2; - } - fontSize = floor(fontSize); - if (tfPos >= 0) { - tok = (GooString *)daToks->get(tfPos + 1); - tok->clear(); - tok->appendf("{0:.2f}", fontSize); - } - } - - // compute text start position - w *= fontSize; - switch (quadding) { - case quaddingLeftJustified: - default: - x = borderWidth + 2; - break; - case quaddingCentered: - x = (dx - w) / 2; - break; - case quaddingRightJustified: - x = dx - borderWidth - 2 - w; - break; - } - y = 0.5 * dy - 0.4 * fontSize; - - // set the font matrix - if (tmPos >= 0) { - tok = (GooString *)daToks->get(tmPos + 4); - tok->clear(); - tok->appendf("{0:.2f}", x); - tok = (GooString *)daToks->get(tmPos + 5); - tok->clear(); - tok->appendf("{0:.2f}", y); - } - - // write the DA string - if (daToks) { - for (i = 0; i < daToks->getLength(); ++i) { - appearBuf->append((GooString *)daToks->get(i))->append(' '); - } - } - - // write the font matrix (if not part of the DA string) - if (tmPos < 0) { - appearBuf->appendf("1 0 0 1 {0:.2f} {1:.2f} Tm\n", x, y); - } - - // write the text string - writeString(*convertedText); - appearBuf->append(" Tj\n"); - } - } - // cleanup - appearBuf->append("ET\n"); - appearBuf->append("Q\n"); - if (txField) { - appearBuf->append("EMC\n"); - } - if (daToks) { - deleteGooList(daToks, GooString); - } - if (freeText) { - delete text; - } - delete convertedText; - if (fontToFree) { - fontToFree->decRefCnt(); - } - - return true; -} - -// Draw the variable text or caption for a field. -bool AnnotAppearanceBuilder::drawListBox(const FormFieldChoice *fieldChoice, const AnnotBorder *border, const PDFRectangle *rect, - const GooString *da, const GfxResources *resources, int quadding) { - GooList *daToks; - GooString *tok, *convertedText; - const GfxFont *font; - double fontSize, fontSize2, borderWidth, x, y, w, wMax; - int tfPos, tmPos, i, j; - - //~ if there is no MK entry, this should use the existing content stream, - //~ and only replace the marked content portion of it - //~ (this is only relevant for Tx fields) - - // parse the default appearance string - tfPos = tmPos = -1; - if (da) { - daToks = new GooList(); - i = 0; - while (i < da->getLength()) { - while (i < da->getLength() && Lexer::isSpace(da->getChar(i))) { - ++i; - } - if (i < da->getLength()) { - for (j = i + 1; - j < da->getLength() && !Lexer::isSpace(da->getChar(j)); - ++j) ; - daToks->append(new GooString(da, i, j - i)); - i = j; - } - } - for (i = 2; i < daToks->getLength(); ++i) { - if (i >= 2 && !((GooString *)daToks->get(i))->cmp("Tf")) { - tfPos = i - 2; - } else if (i >= 6 && !((GooString *)daToks->get(i))->cmp("Tm")) { - tmPos = i - 6; - } - } - } else { - daToks = nullptr; - } - - // get the font and font size - font = nullptr; - fontSize = 0; - if (tfPos >= 0) { - tok = (GooString *)daToks->get(tfPos); - if (tok->getLength() >= 1 && tok->getChar(0) == '/') { - if (!resources || !(font = resources->lookupFont(tok->getCString() + 1))) { - error(errSyntaxError, -1, "Unknown font in field's DA string"); - } - } else { - error(errSyntaxError, -1, "Invalid font name in 'Tf' operator in field's DA string"); - } - tok = (GooString *)daToks->get(tfPos + 1); - fontSize = gatof(tok->getCString()); - } else { - error(errSyntaxError, -1, "Missing 'Tf' operator in field's DA string"); - } - if (!font) { - if (daToks) { - deleteGooList(daToks, GooString); - } - return false; - } - - convertedText = new GooString; - - // get the border width - borderWidth = border ? border->getWidth() : 0; - - // compute font autosize - if (fontSize == 0) { - wMax = 0; - for (i = 0; i < fieldChoice->getNumChoices(); ++i) { - j = 0; - if (fieldChoice->getChoice(i) == nullptr) { - error(errSyntaxError, -1, "Invalid annotation listbox"); - if (daToks) { - deleteGooList(daToks, GooString); - } - delete convertedText; - return false; - } - Annot::layoutText(fieldChoice->getChoice(i), convertedText, &j, font, &w, 0.0, nullptr, gFalse); - if (w > wMax) { - wMax = w; - } - } - fontSize = rect->y2 - rect->y1 - 2 * borderWidth; - fontSize2 = (rect->x2 - rect->x1 - 4 - 2 * borderWidth) / wMax; - if (fontSize2 < fontSize) { - fontSize = fontSize2; - } - fontSize = floor(fontSize); - if (tfPos >= 0) { - tok = (GooString *)daToks->get(tfPos + 1); - tok->clear(); - tok->appendf("{0:.2f}", fontSize); - } - } - // draw the text - y = rect->y2 - rect->y1 - 1.1 * fontSize; - for (i = fieldChoice->getTopIndex(); i < fieldChoice->getNumChoices(); ++i) { - // setup - appearBuf->append("q\n"); - - // draw the background if selected - if (fieldChoice->isSelected(i)) { - appearBuf->append("0 g f\n"); - appearBuf->appendf("{0:.2f} {1:.2f} {2:.2f} {3:.2f} re f\n", - borderWidth, - y - 0.2 * fontSize, - rect->x2 - rect->x1 - 2 * borderWidth, - 1.1 * fontSize); - } - - // setup - appearBuf->append("BT\n"); - - // compute text width and start position - j = 0; - Annot::layoutText(fieldChoice->getChoice(i), convertedText, &j, font, &w, 0.0, nullptr, gFalse); - w *= fontSize; - switch (quadding) { - case quaddingLeftJustified: - default: - x = borderWidth + 2; - break; - case quaddingCentered: - x = (rect->x2 - rect->x1 - w) / 2; - break; - case quaddingRightJustified: - x = rect->x2 - rect->x1 - borderWidth - 2 - w; - break; - } - - // set the font matrix - if (tmPos >= 0) { - tok = (GooString *)daToks->get(tmPos + 4); - tok->clear(); - tok->appendf("{0:.2f}", x); - tok = (GooString *)daToks->get(tmPos + 5); - tok->clear(); - tok->appendf("{0:.2f}", y); - } - - // write the DA string - if (daToks) { - for (j = 0; j < daToks->getLength(); ++j) { - appearBuf->append((GooString *)daToks->get(j))->append(' '); - } - } - - // write the font matrix (if not part of the DA string) - if (tmPos < 0) { - appearBuf->appendf("1 0 0 1 {0:.2f} {1:.2f} Tm\n", x, y); - } - - // change the text color if selected - if (fieldChoice->isSelected(i)) { - appearBuf->append("1 g\n"); - } - - // write the text string - writeString(*convertedText); - appearBuf->append(" Tj\n"); - - // cleanup - appearBuf->append("ET\n"); - appearBuf->append("Q\n"); - - // next line - y -= 1.1 * fontSize; - } - - if (daToks) { - deleteGooList(daToks, GooString); - } - - delete convertedText; - - return true; -} - -void AnnotAppearanceBuilder::drawFieldBorder(const FormField *field, const AnnotBorder *border, const AnnotAppearanceCharacs *appearCharacs, const PDFRectangle *rect) { - int dashLength; - double *dash; - AnnotColor adjustedColor; - const double w = border->getWidth(); - - const AnnotColor *aColor = appearCharacs->getBorderColor(); - if (!aColor) - aColor = appearCharacs->getBackColor(); - if (!aColor) - return; - - const double dx = rect->x2 - rect->x1; - const double dy = rect->y2 - rect->y1; - - // radio buttons with no caption have a round border - const GBool hasCaption = appearCharacs->getNormalCaption() != nullptr; - if (field->getType() == formButton && - static_cast<const FormFieldButton*>(field)->getButtonType() == formButtonRadio && !hasCaption) { - double r = 0.5 * (dx < dy ? dx : dy); - switch (border->getStyle()) { - case AnnotBorder::borderDashed: - appearBuf->append("["); - dashLength = border->getDashLength(); - dash = border->getDash(); - for (int i = 0; i < dashLength; ++i) { - appearBuf->appendf(" {0:.2f}", dash[i]); - } - appearBuf->append("] 0 d\n"); - // fallthrough - case AnnotBorder::borderSolid: - case AnnotBorder::borderUnderlined: - appearBuf->appendf("{0:.2f} w\n", w); - setDrawColor(aColor, gFalse); - drawCircle(0.5 * dx, 0.5 * dy, r - 0.5 * w, gFalse); - break; - case AnnotBorder::borderBeveled: - case AnnotBorder::borderInset: - appearBuf->appendf("{0:.2f} w\n", 0.5 * w); - setDrawColor(aColor, gFalse); - drawCircle(0.5 * dx, 0.5 * dy, r - 0.25 * w, gFalse); - adjustedColor = AnnotColor(*aColor); - adjustedColor.adjustColor(border->getStyle() == AnnotBorder::borderBeveled ? 1 : -1); - setDrawColor(&adjustedColor, gFalse); - drawCircleTopLeft(0.5 * dx, 0.5 * dy, r - 0.75 * w); - adjustedColor = AnnotColor(*aColor); - adjustedColor.adjustColor(border->getStyle() == AnnotBorder::borderBeveled ? -1 : 1); - setDrawColor(&adjustedColor, gFalse); - drawCircleBottomRight(0.5 * dx, 0.5 * dy, r - 0.75 * w); - break; - } - } else { - switch (border->getStyle()) { - case AnnotBorder::borderDashed: - appearBuf->append("["); - dashLength = border->getDashLength(); - dash = border->getDash(); - for (int i = 0; i < dashLength; ++i) { - appearBuf->appendf(" {0:.2f}", dash[i]); - } - appearBuf->append("] 0 d\n"); - // fallthrough - case AnnotBorder::borderSolid: - appearBuf->appendf("{0:.2f} w\n", w); - setDrawColor(aColor, gFalse); - appearBuf->appendf("{0:.2f} {0:.2f} {1:.2f} {2:.2f} re s\n", - 0.5 * w, dx - w, dy - w); - break; - case AnnotBorder::borderBeveled: - case AnnotBorder::borderInset: - adjustedColor = AnnotColor(*aColor); - adjustedColor.adjustColor(border->getStyle() == AnnotBorder::borderBeveled ? 1 : -1); - setDrawColor(&adjustedColor, gTrue); - appearBuf->append("0 0 m\n"); - appearBuf->appendf("0 {0:.2f} l\n", dy); - appearBuf->appendf("{0:.2f} {1:.2f} l\n", dx, dy); - appearBuf->appendf("{0:.2f} {1:.2f} l\n", dx - w, dy - w); - appearBuf->appendf("{0:.2f} {1:.2f} l\n", w, dy - w); - appearBuf->appendf("{0:.2f} {0:.2f} l\n", w); - appearBuf->append("f\n"); - adjustedColor = AnnotColor(*aColor); - adjustedColor.adjustColor(border->getStyle() == AnnotBorder::borderBeveled ? -1 : 1); - setDrawColor(&adjustedColor, gTrue); - appearBuf->append("0 0 m\n"); - appearBuf->appendf("{0:.2f} 0 l\n", dx); - appearBuf->appendf("{0:.2f} {1:.2f} l\n", dx, dy); - appearBuf->appendf("{0:.2f} {1:.2f} l\n", dx - w, dy - w); - appearBuf->appendf("{0:.2f} {1:.2f} l\n", dx - w, w); - appearBuf->appendf("{0:.2f} {0:.2f} l\n", w); - appearBuf->append("f\n"); - break; - case AnnotBorder::borderUnderlined: - appearBuf->appendf("{0:.2f} w\n", w); - setDrawColor(aColor, gFalse); - appearBuf->appendf("0 0 m {0:.2f} 0 l s\n", dx); - break; - } - - // clip to the inside of the border - appearBuf->appendf("{0:.2f} {0:.2f} {1:.2f} {2:.2f} re W n\n", - w, dx - 2 * w, dy - 2 * w); - } -} - -bool AnnotAppearanceBuilder::drawFormField(const FormField *field, const Form *form, const GfxResources *resources, const GooString *da, const AnnotBorder *border, const AnnotAppearanceCharacs *appearCharacs, const PDFRectangle *rect, const GooString *appearState, XRef *xref, bool *addedDingbatsResource) -{ - // draw the field contents - switch (field->getType()) { - case formButton: - return drawFormFieldButton(static_cast<const FormFieldButton *>(field), resources, da, border, appearCharacs, rect, appearState, xref, addedDingbatsResource); - break; - case formText: - return drawFormFieldText(static_cast<const FormFieldText *>(field), form, resources, da, border, appearCharacs, rect); - case formChoice: - return drawFormFieldChoice(static_cast<const FormFieldChoice *>(field), form, resources, da, border, appearCharacs, rect); - break; - case formSignature: - //~unimp - break; - case formUndef: - default: - error(errSyntaxError, -1, "Unknown field type"); - } - - return false; -} - - -bool AnnotAppearanceBuilder::drawFormFieldButton(const FormFieldButton *field, const GfxResources *resources, const GooString *da, const AnnotBorder *border, const AnnotAppearanceCharacs *appearCharacs, const PDFRectangle *rect, const GooString *appearState, XRef *xref, bool *addedDingbatsResource) { - const GooString *caption = nullptr; - if (appearCharacs) - caption = appearCharacs->getNormalCaption(); - - switch (field->getButtonType()) { - case formButtonRadio: { - //~ Acrobat doesn't draw a caption if there is no AP dict (?) - if (appearState && appearState->cmp("Off") != 0 && - field->getState(appearState->getCString())) { - if (caption) { - return drawText(caption, da, resources, border, appearCharacs, rect, gFalse, 0, fieldQuadCenter, gFalse, gTrue, xref, addedDingbatsResource, gFalse); - } else if (appearCharacs) { - const AnnotColor *aColor = appearCharacs->getBorderColor(); - if (aColor) { - const double dx = rect->x2 - rect->x1; - const double dy = rect->y2 - rect->y1; - setDrawColor(aColor, gTrue); - drawCircle(0.5 * dx, 0.5 * dy, 0.2 * (dx < dy ? dx : dy), gTrue); - } - return true; - } - } - } - break; - case formButtonPush: - if (caption) - return drawText(caption, da, resources, border, appearCharacs, rect, gFalse, 0, fieldQuadCenter, gFalse, gFalse, xref, addedDingbatsResource, gFalse); - break; - case formButtonCheck: - if (appearState && appearState->cmp("Off") != 0) { - if (!caption) { - GooString checkMark("3"); - return drawText(&checkMark, da, resources, border, appearCharacs, rect, gFalse, 0, fieldQuadCenter, gFalse, gTrue, xref, addedDingbatsResource, gFalse); - } else { - return drawText(caption, da, resources, border, appearCharacs, rect, gFalse, 0, fieldQuadCenter, gFalse, gTrue, xref, addedDingbatsResource, gFalse); - } - } - break; - } - - return true; -} - -bool AnnotAppearanceBuilder::drawFormFieldText(const FormFieldText *fieldText, const Form *form, const GfxResources *resources, const GooString *da, const AnnotBorder *border, const AnnotAppearanceCharacs *appearCharacs, const PDFRectangle *rect) { - VariableTextQuadding quadding; - const GooString *contents; - - contents = fieldText->getContent(); - if (contents) { - quadding = fieldText->hasTextQuadding() ? fieldText->getTextQuadding() : form->getTextQuadding(); - - int comb = 0; - if (fieldText->isComb()) - comb = fieldText->getMaxLen(); - - return drawText(contents, da, resources, border, appearCharacs, rect, - fieldText->isMultiline(), comb, quadding, gTrue, gFalse, nullptr, nullptr, fieldText->isPassword()); - } - - return true; -} - -bool AnnotAppearanceBuilder::drawFormFieldChoice(const FormFieldChoice *fieldChoice, const Form *form, const GfxResources *resources, const GooString *da, const AnnotBorder *border, const AnnotAppearanceCharacs *appearCharacs, const PDFRectangle *rect) { - const GooString *selected; - VariableTextQuadding quadding; - - quadding = fieldChoice->hasTextQuadding() ? fieldChoice->getTextQuadding() : form->getTextQuadding(); - - if (fieldChoice->isCombo()) { - selected = fieldChoice->getSelectedChoice(); - if (selected) { - return drawText(selected, da, resources, border, appearCharacs, rect, gFalse, 0, quadding, gTrue, gFalse, nullptr, nullptr, gFalse); - //~ Acrobat draws a popup icon on the right side - } - // list box - } else { - return drawListBox(fieldChoice, border, rect, da, resources, quadding); - } - - return true; -} - -void AnnotWidget::generateFieldAppearance(bool *addedDingbatsResource) { - GfxResources *resources; - const GooString *da; - - AnnotAppearanceBuilder appearBuilder; - - // draw the background - if (appearCharacs) { - const AnnotColor *aColor = appearCharacs->getBackColor(); - if (aColor) { - appearBuilder.setDrawColor(aColor, gTrue); - appearBuilder.appendf("0 0 {0:.2f} {1:.2f} re f\n", - rect->x2 - rect->x1, rect->y2 - rect->y1); - } - } - - // draw the border - if (appearCharacs && border && border->getWidth() > 0) - appearBuilder.drawFieldBorder(field, border, appearCharacs, rect); - - da = field->getDefaultAppearance(); - if (!da) - da = form->getDefaultAppearance(); - - resources = form->getDefaultResources(); - - const bool success = appearBuilder.drawFormField(field, form, resources, da, border, appearCharacs, rect, appearState, xref, addedDingbatsResource); - if (!success && da != form->getDefaultAppearance()) { - da = form->getDefaultAppearance(); - appearBuilder.drawFormField(field, form, resources, da, border, appearCharacs, rect, appearState, xref, addedDingbatsResource); - } - - const GooString *appearBuf = appearBuilder.buffer(); - // build the appearance stream dictionary - Dict *appearDict = new Dict(xref); - appearDict->add(copyString("Length"), Object(appearBuf->getLength())); - appearDict->add(copyString("Subtype"), Object(objName, "Form")); - Array *bbox = new Array(xref); - bbox->add(Object(0)); - bbox->add(Object(0)); - bbox->add(Object(rect->x2 - rect->x1)); - bbox->add(Object(rect->y2 - rect->y1)); - appearDict->add(copyString("BBox"), Object(bbox)); - - // set the resource dictionary - Object *resDict = form->getDefaultResourcesObj(); - if (resDict->isDict()) { - appearDict->add(copyString("Resources"), resDict->copy()); - } - - // build the appearance stream - Stream *appearStream = new AutoFreeMemStream(copyString(appearBuf->getCString()), 0, - appearBuf->getLength(), Object(appearDict)); - appearance = Object(appearStream); -} - -void AnnotWidget::updateAppearanceStream() -{ - // If this the first time updateAppearanceStream() is called on this widget, - // destroy the AP dictionary because we are going to create a new one. - if (updatedAppearanceStream.num == -1) { - invalidateAppearance(); // Delete AP dictionary and all referenced streams - } - - // There's no need to create a new appearance stream if NeedAppearances is - // set, because it will be ignored next time anyway. - if (form && form->getNeedAppearances()) - return; - - // Create the new appearance - bool dummyAddDingbatsResource = false; // This is only update so if we didn't need to add - // the dingbats resource we should not need it now - generateFieldAppearance(&dummyAddDingbatsResource); - - // Fetch the appearance stream we've just created - Object obj1 = appearance.fetch(xref); - - // If this the first time updateAppearanceStream() is called on this widget, - // create a new AP dictionary containing the new appearance stream. - // Otherwise, just update the stream we had created previously. - if (updatedAppearanceStream.num == -1) { - // Write the appearance stream - updatedAppearanceStream = xref->addIndirectObject(&obj1); - - // Write the AP dictionary - obj1 = Object(new Dict(xref)); - obj1.dictAdd(copyString("N"), Object(updatedAppearanceStream.num, updatedAppearanceStream.gen)); - - // Update our internal pointers to the appearance dictionary - appearStreams = new AnnotAppearance(doc, &obj1); - - update("AP", std::move(obj1)); - } else { - // Replace the existing appearance stream - xref->setModifiedObject(&obj1, updatedAppearanceStream); - } -} - -void AnnotWidget::draw(Gfx *gfx, GBool printing) { - if (!isVisible (printing)) - return; - - annotLocker(); - bool addDingbatsResource = false; - - // Only construct the appearance stream when - // - annot doesn't have an AP or - // - NeedAppearances is true - if (field) { - if (appearance.isNull() || (form && form->getNeedAppearances())) - generateFieldAppearance(&addDingbatsResource); - } - - // draw the appearance stream - Object obj = appearance.fetch(gfx->getXRef()); - if (addDingbatsResource) { - // We are forcing ZaDb but the font does not exist - // so create a fake one - Dict *fontDict = new Dict(gfx->getXRef()); - fontDict->add(copyString("BaseFont"), Object(objName, "ZapfDingbats")); - fontDict->add(copyString("Subtype"), Object(objName, "Type1")); - - Dict *fontsDict = new Dict(gfx->getXRef()); - fontsDict->add(copyString("ZaDb"), Object(fontDict)); - - Dict *dict = new Dict(gfx->getXRef()); - dict->add(copyString("Font"), Object(fontsDict)); - gfx->pushResources(dict); - delete dict; - } - gfx->drawAnnot(&obj, (AnnotBorder *)nullptr, color, - rect->x1, rect->y1, rect->x2, rect->y2, getRotation()); - if (addDingbatsResource) { - gfx->popResources(); - } -} - - -//------------------------------------------------------------------------ -// AnnotMovie -//------------------------------------------------------------------------ -AnnotMovie::AnnotMovie(PDFDoc *docA, PDFRectangle *rect, Movie *movieA) : - Annot(docA, rect) { - type = typeMovie; - annotObj.dictSet ("Subtype", Object(objName, "Movie")); - - movie = movieA->copy(); - // TODO: create movie dict from movieA - - initialize(docA, annotObj.getDict()); -} - -AnnotMovie::AnnotMovie(PDFDoc *docA, Object *dictObject, Object *obj) : - Annot(docA, dictObject, obj) { - type = typeMovie; - initialize(docA, dictObject->getDict()); -} - -AnnotMovie::~AnnotMovie() { - if (title) - delete title; - delete movie; -} - -void AnnotMovie::initialize(PDFDoc *docA, Dict* dict) { - Object obj1; - - obj1 = dict->lookup("T"); - if (obj1.isString()) { - title = obj1.getString()->copy(); - } else { - title = nullptr; - } - - Object movieDict = dict->lookup("Movie"); - if (movieDict.isDict()) { - Object obj2 = dict->lookup("A"); - if (obj2.isDict()) - movie = new Movie (&movieDict, &obj2); - else - movie = new Movie (&movieDict); - if (!movie->isOk()) { - delete movie; - movie = nullptr; - ok = gFalse; - } - } else { - error(errSyntaxError, -1, "Bad Annot Movie"); - movie = nullptr; - ok = gFalse; - } -} - -void AnnotMovie::draw(Gfx *gfx, GBool printing) { - if (!isVisible (printing)) - return; - - annotLocker(); - if (appearance.isNull() && movie->getShowPoster()) { - int width, height; - Object poster = movie->getPoster(); - movie->getAspect(&width, &height); - - if (width != -1 && height != -1 && !poster.isNone()) { - GooString *appearBuf = new GooString (); - appearBuf->append ("q\n"); - appearBuf->appendf ("{0:d} 0 0 {1:d} 0 0 cm\n", width, height); - appearBuf->append ("/MImg Do\n"); - appearBuf->append ("Q\n"); - - Dict *imgDict = new Dict(gfx->getXRef()); - imgDict->set("MImg", std::move(poster)); - - Dict *resDict = new Dict(gfx->getXRef()); - resDict->set("XObject", Object(imgDict)); - - Dict *formDict = new Dict(gfx->getXRef()); - formDict->set("Length", Object(appearBuf->getLength())); - formDict->set("Subtype", Object(objName, "Form")); - formDict->set("Name", Object(objName, "FRM")); - Array *bboxArray = new Array(gfx->getXRef()); - bboxArray->add(Object(0)); - bboxArray->add(Object(0)); - bboxArray->add(Object(width)); - bboxArray->add(Object(height)); - formDict->set("BBox", Object(bboxArray)); - Array *matrix = new Array(gfx->getXRef()); - matrix->add(Object(1)); - matrix->add(Object(0)); - matrix->add(Object(0)); - matrix->add(Object(1)); - matrix->add(Object(-width / 2)); - matrix->add(Object(-height / 2)); - formDict->set("Matrix", Object(matrix)); - formDict->set("Resources", Object(resDict)); - - Stream *mStream = new AutoFreeMemStream(copyString(appearBuf->getCString()), 0, - appearBuf->getLength(), Object(formDict)); - delete appearBuf; - - Dict *dict = new Dict(gfx->getXRef()); - dict->set("FRM", Object(mStream)); - - Dict *resDict2 = new Dict(gfx->getXRef()); - resDict2->set("XObject", Object(dict)); - - appearBuf = new GooString (); - appearBuf->append ("q\n"); - appearBuf->appendf ("0 0 {0:d} {1:d} re W n\n", width, height); - appearBuf->append ("q\n"); - appearBuf->appendf ("0 0 {0:d} {1:d} re W n\n", width, height); - appearBuf->appendf ("1 0 0 1 {0:d} {1:d} cm\n", width / 2, height / 2); - appearBuf->append ("/FRM Do\n"); - appearBuf->append ("Q\n"); - appearBuf->append ("Q\n"); - - double bbox[4]; - bbox[0] = bbox[1] = 0; - bbox[2] = width; - bbox[3] = height; - appearance = createForm(appearBuf, bbox, gFalse, resDict2); - delete appearBuf; - } - } - - // draw the appearance stream - Object obj = appearance.fetch(gfx->getXRef()); - gfx->drawAnnot(&obj, (AnnotBorder *)nullptr, color, - rect->x1, rect->y1, rect->x2, rect->y2, getRotation()); -} - -//------------------------------------------------------------------------ -// AnnotScreen -//------------------------------------------------------------------------ -AnnotScreen::AnnotScreen(PDFDoc *docA, PDFRectangle *rect) : - Annot(docA, rect) { - type = typeScreen; - - annotObj.dictSet ("Subtype", Object(objName, "Screen")); - initialize(docA, annotObj.getDict()); -} - -AnnotScreen::AnnotScreen(PDFDoc *docA, Object *dictObject, Object *obj) : - Annot(docA, dictObject, obj) { - type = typeScreen; - initialize(docA, dictObject->getDict()); -} - -AnnotScreen::~AnnotScreen() { - delete title; - delete appearCharacs; - delete action; -} - -void AnnotScreen::initialize(PDFDoc *docA, Dict* dict) { - Object obj1; - - title = nullptr; - obj1 = dict->lookup("T"); - if (obj1.isString()) { - title = obj1.getString()->copy(); - } - - action = nullptr; - obj1 = dict->lookup("A"); - if (obj1.isDict()) { - action = LinkAction::parseAction(&obj1, doc->getCatalog()->getBaseURI()); - if (action && action->getKind() == actionRendition && page == 0) { - error (errSyntaxError, -1, "Invalid Rendition action: associated screen annotation without P"); - delete action; - action = nullptr; - ok = gFalse; - } - } - - additionalActions = dict->lookupNF("AA"); - - appearCharacs = nullptr; - obj1 = dict->lookup("MK"); - if (obj1.isDict()) { - appearCharacs = new AnnotAppearanceCharacs(obj1.getDict()); - } -} - -LinkAction* AnnotScreen::getAdditionalAction(AdditionalActionsType type) -{ - if (type == actionFocusIn || type == actionFocusOut) // not defined for screen annotation - return nullptr; - - return ::getAdditionalAction(type, &additionalActions, doc); -} - -//------------------------------------------------------------------------ -// AnnotStamp -//------------------------------------------------------------------------ -AnnotStamp::AnnotStamp(PDFDoc *docA, PDFRectangle *rect) : - AnnotMarkup(docA, rect) { - type = typeStamp; - annotObj.dictSet ("Subtype", Object(objName, "Stamp")); - initialize(docA, annotObj.getDict()); -} - -AnnotStamp::AnnotStamp(PDFDoc *docA, Object *dictObject, Object *obj) : - AnnotMarkup(docA, dictObject, obj) { - type = typeStamp; - initialize(docA, dictObject->getDict()); -} - -AnnotStamp::~AnnotStamp() { - delete icon; -} - -void AnnotStamp::initialize(PDFDoc *docA, Dict* dict) { - Object obj1 = dict->lookup("Name"); - if (obj1.isName()) { - icon = new GooString(obj1.getName()); - } else { - icon = new GooString("Draft"); - } - -} - -void AnnotStamp::setIcon(GooString *new_icon) { - delete icon; - - if (new_icon) { - icon = new GooString (new_icon); - } else { - icon = new GooString(); - } - - update("Name", Object(objName, icon->getCString())); - invalidateAppearance(); -} - -//------------------------------------------------------------------------ -// AnnotGeometry -//------------------------------------------------------------------------ -AnnotGeometry::AnnotGeometry(PDFDoc *docA, PDFRectangle *rect, AnnotSubtype subType) : - AnnotMarkup(docA, rect) { - switch (subType) { - case typeSquare: - annotObj.dictSet ("Subtype", Object(objName, "Square")); - break; - case typeCircle: - annotObj.dictSet ("Subtype", Object(objName, "Circle")); - break; - default: - assert (0 && "Invalid subtype for AnnotGeometry\n"); - } - - initialize(docA, annotObj.getDict()); -} - -AnnotGeometry::AnnotGeometry(PDFDoc *docA, Object *dictObject, Object *obj) : - AnnotMarkup(docA, dictObject, obj) { - // the real type will be read in initialize() - type = typeSquare; - initialize(docA, dictObject->getDict()); -} - -AnnotGeometry::~AnnotGeometry() { - delete interiorColor; - delete borderEffect; - delete geometryRect; -} - -void AnnotGeometry::initialize(PDFDoc *docA, Dict* dict) { - Object obj1; - - obj1 = dict->lookup("Subtype"); - if (obj1.isName()) { - GooString typeName(obj1.getName()); - if (!typeName.cmp("Square")) { - type = typeSquare; - } else if (!typeName.cmp("Circle")) { - type = typeCircle; - } - } - - obj1 = dict->lookup("IC"); - if (obj1.isArray()) { - interiorColor = new AnnotColor(obj1.getArray()); - } else { - interiorColor = nullptr; - } - - obj1 = dict->lookup("BS"); - if (obj1.isDict()) { - delete border; - border = new AnnotBorderBS(obj1.getDict()); - } else if (!border) { - border = new AnnotBorderBS(); - } - - obj1 = dict->lookup("BE"); - if (obj1.isDict()) { - borderEffect = new AnnotBorderEffect(obj1.getDict()); - } else { - borderEffect = nullptr; - } - - geometryRect = nullptr; - obj1 = dict->lookup("RD"); - if (obj1.isArray()) { - geometryRect = parseDiffRectangle(obj1.getArray(), rect); - } -} - -void AnnotGeometry::setType(AnnotSubtype new_type) { - const char *typeName = nullptr; /* squelch bogus compiler warning */ - - switch (new_type) { - case typeSquare: - typeName = "Square"; - break; - case typeCircle: - typeName = "Circle"; - break; - default: - assert(!"Invalid subtype"); - } - - type = new_type; - update("Subtype", Object(objName, typeName)); - invalidateAppearance(); -} - -void AnnotGeometry::setInteriorColor(AnnotColor *new_color) { - delete interiorColor; - - if (new_color) { - Object obj1 = new_color->writeToObject(xref); - update ("IC", std::move(obj1)); - interiorColor = new_color; - } else { - interiorColor = nullptr; - } - invalidateAppearance(); -} - -void AnnotGeometry::draw(Gfx *gfx, GBool printing) { - double ca = 1; - - if (!isVisible (printing)) - return; - - annotLocker(); - if (appearance.isNull()) { - ca = opacity; - - AnnotAppearanceBuilder appearBuilder; - appearBuilder.append ("q\n"); - if (color) - appearBuilder.setDrawColor(color, gFalse); - - double borderWidth = border->getWidth(); - appearBuilder.setLineStyleForBorder(border); - - if (interiorColor) - appearBuilder.setDrawColor(interiorColor, gTrue); - - if (type == typeSquare) { - appearBuilder.appendf ("{0:.2f} {1:.2f} {2:.2f} {3:.2f} re\n", - borderWidth / 2.0, borderWidth / 2.0, - (rect->x2 - rect->x1) - borderWidth, - (rect->y2 - rect->y1) - borderWidth); - } else { - double width, height; - double b; - double x1, y1, x2, y2, x3, y3; - - width = rect->x2 - rect->x1; - height = rect->y2 - rect->y1; - b = borderWidth / 2.0; - - x1 = b; - y1 = height / 2.0; - appearBuilder.appendf ("{0:.2f} {1:.2f} m\n", x1, y1); - - y1 += height / 4.0; - x2 = width / 4.0; - y2 = height - b; - x3 = width / 2.0; - y3 = y2; - appearBuilder.appendf ("{0:.2f} {1:.2f} {2:.2f} {3:.2f} {4:.2f} {5:.2f} c\n", - x1, y1, x2, y2, x3, y3); - x2 = width - b; - y2 = y1; - x1 = x3 + (width / 4.0); - y1 = y3; - x3 = x2; - y3 = height / 2.0; - appearBuilder.appendf ("{0:.2f} {1:.2f} {2:.2f} {3:.2f} {4:.2f} {5:.2f} c\n", - x1, y1, x2, y2, x3, y3); - - x2 = x1; - y2 = b; - x1 = x3; - y1 = height / 4.0; - x3 = width / 2.0; - y3 = b; - appearBuilder.appendf ("{0:.2f} {1:.2f} {2:.2f} {3:.2f} {4:.2f} {5:.2f} c\n", - x1, y1, x2, y2, x3, y3); - - x2 = b; - y2 = y1; - x1 = width / 4.0; - y1 = b; - x3 = b; - y3 = height / 2.0; - appearBuilder.appendf ("{0:.2f} {1:.2f} {2:.2f} {3:.2f} {4:.2f} {5:.2f} c\n", - x1, y1, x2, y2, x3, y3); - } - - if (interiorColor && interiorColor->getSpace() != AnnotColor::colorTransparent) - appearBuilder.append ("b\n"); - else - appearBuilder.append ("S\n"); - - appearBuilder.append ("Q\n"); - - double bbox[4]; - bbox[0] = bbox[1] = 0; - bbox[2] = rect->x2 - rect->x1; - bbox[3] = rect->y2 - rect->y1; - if (ca == 1) { - appearance = createForm(appearBuilder.buffer(), bbox, gFalse, nullptr); - } else { - Object aStream = createForm(appearBuilder.buffer(), bbox, gTrue, nullptr); - - GooString appearBuf("/GS0 gs\n/Fm0 Do"); - Dict *resDict = createResourcesDict("Fm0", std::move(aStream), "GS0", ca, nullptr); - appearance = createForm(&appearBuf, bbox, gFalse, resDict); - } - } - - // draw the appearance stream - Object obj = appearance.fetch(gfx->getXRef()); - gfx->drawAnnot(&obj, (AnnotBorder *)nullptr, color, - rect->x1, rect->y1, rect->x2, rect->y2, getRotation()); -} - -//------------------------------------------------------------------------ -// AnnotPolygon -//------------------------------------------------------------------------ -AnnotPolygon::AnnotPolygon(PDFDoc *docA, PDFRectangle *rect, AnnotSubtype subType) : - AnnotMarkup(docA, rect) { - switch (subType) { - case typePolygon: - annotObj.dictSet ("Subtype", Object(objName, "Polygon")); - break; - case typePolyLine: - annotObj.dictSet ("Subtype", Object(objName, "PolyLine")); - break; - default: - assert (0 && "Invalid subtype for AnnotGeometry\n"); - } - - // Store dummy path with one null vertex only - Array *a = new Array(doc->getXRef()); - a->add(Object(0.)); - a->add(Object(0.)); - annotObj.dictSet("Vertices", Object(a)); - - initialize(docA, annotObj.getDict()); -} - -AnnotPolygon::AnnotPolygon(PDFDoc *docA, Object *dictObject, Object *obj) : - AnnotMarkup(docA, dictObject, obj) { - // the real type will be read in initialize() - type = typePolygon; - initialize(docA, dictObject->getDict()); -} - -AnnotPolygon::~AnnotPolygon() { - delete vertices; - - if (interiorColor) - delete interiorColor; - - if (borderEffect) - delete borderEffect; -} - -void AnnotPolygon::initialize(PDFDoc *docA, Dict* dict) { - Object obj1; - - obj1 = dict->lookup("Subtype"); - if (obj1.isName()) { - GooString typeName(obj1.getName()); - if (!typeName.cmp("Polygon")) { - type = typePolygon; - } else if (!typeName.cmp("PolyLine")) { - type = typePolyLine; - } - } - - obj1 = dict->lookup("Vertices"); - if (obj1.isArray()) { - vertices = new AnnotPath(obj1.getArray()); - } else { - vertices = new AnnotPath(); - error(errSyntaxError, -1, "Bad Annot Polygon Vertices"); - ok = gFalse; - } - - obj1 = dict->lookup("LE"); - if (obj1.isArray() && obj1.arrayGetLength() == 2) { - Object obj2 = obj1.arrayGet(0); - if(obj2.isString()) - startStyle = parseAnnotLineEndingStyle(obj2.getString()); - else - startStyle = annotLineEndingNone; - - obj2 = obj1.arrayGet(1); - if(obj2.isString()) - endStyle = parseAnnotLineEndingStyle(obj2.getString()); - else - endStyle = annotLineEndingNone; - - } else { - startStyle = endStyle = annotLineEndingNone; - } - - obj1 = dict->lookup("IC"); - if (obj1.isArray()) { - interiorColor = new AnnotColor(obj1.getArray()); - } else { - interiorColor = nullptr; - } - - obj1 = dict->lookup("BS"); - if (obj1.isDict()) { - delete border; - border = new AnnotBorderBS(obj1.getDict()); - } else if (!border) { - border = new AnnotBorderBS(); - } - - obj1 = dict->lookup("BE"); - if (obj1.isDict()) { - borderEffect = new AnnotBorderEffect(obj1.getDict()); - } else { - borderEffect = nullptr; - } - - obj1 = dict->lookup("IT"); - if (obj1.isName()) { - const char *intentName = obj1.getName(); - - if(!strcmp(intentName, "PolygonCloud")) { - intent = polygonCloud; - } else if(!strcmp(intentName, "PolyLineDimension")) { - intent = polylineDimension; - } else { - intent = polygonDimension; - } - } else { - intent = polygonCloud; - } -} - -void AnnotPolygon::setType(AnnotSubtype new_type) { - const char *typeName = nullptr; /* squelch bogus compiler warning */ - - switch (new_type) { - case typePolygon: - typeName = "Polygon"; - break; - case typePolyLine: - typeName = "PolyLine"; - break; - default: - assert(!"Invalid subtype"); - } - - type = new_type; - update("Subtype", Object(objName, typeName)); - invalidateAppearance(); -} - -void AnnotPolygon::setVertices(AnnotPath *path) { - delete vertices; - - Array *a = new Array(xref); - for (int i = 0; i < path->getCoordsLength(); i++) { - a->add(Object(path->getX(i))); - a->add(Object(path->getY(i))); - } - - vertices = new AnnotPath(a); - - update("Vertices", Object(a)); - invalidateAppearance(); -} - -void AnnotPolygon::setStartEndStyle(AnnotLineEndingStyle start, AnnotLineEndingStyle end) { - startStyle = start; - endStyle = end; - - Array *a = new Array(xref); - a->add( Object(objName, convertAnnotLineEndingStyle( startStyle )) ); - a->add( Object(objName, convertAnnotLineEndingStyle( endStyle )) ); - - update("LE", Object(a)); - invalidateAppearance(); -} - -void AnnotPolygon::setInteriorColor(AnnotColor *new_color) { - delete interiorColor; - - if (new_color) { - Object obj1 = new_color->writeToObject(xref); - update ("IC", std::move(obj1)); - interiorColor = new_color; - } else { - interiorColor = nullptr; - } - invalidateAppearance(); -} - -void AnnotPolygon::setIntent(AnnotPolygonIntent new_intent) { - const char *intentName; - - intent = new_intent; - if (new_intent == polygonCloud) - intentName = "PolygonCloud"; - else if (new_intent == polylineDimension) - intentName = "PolyLineDimension"; - else // polygonDimension - intentName = "PolygonDimension"; - update ("IT", Object(objName, intentName)); -} - -void AnnotPolygon::draw(Gfx *gfx, GBool printing) { - double ca = 1; - - if (!isVisible (printing)) - return; - - annotLocker(); - if (appearance.isNull()) { - appearBBox = new AnnotAppearanceBBox(rect); - ca = opacity; - - AnnotAppearanceBuilder appearBuilder; - appearBuilder.append ("q\n"); - - if (color) { - appearBuilder.setDrawColor(color, gFalse); - } - - appearBuilder.setLineStyleForBorder(border); - appearBBox->setBorderWidth(std::max(1., border->getWidth())); - - if (interiorColor) { - appearBuilder.setDrawColor(interiorColor, gTrue); - } - - if (vertices->getCoordsLength() != 0) { - appearBuilder.appendf ("{0:.2f} {1:.2f} m\n", vertices->getX(0) - rect->x1, vertices->getY(0) - rect->y1); - appearBBox->extendTo (vertices->getX(0) - rect->x1, vertices->getY(0) - rect->y1); - - for (int i = 1; i < vertices->getCoordsLength(); ++i) { - appearBuilder.appendf ("{0:.2f} {1:.2f} l\n", vertices->getX(i) - rect->x1, vertices->getY(i) - rect->y1); - appearBBox->extendTo (vertices->getX(i) - rect->x1, vertices->getY(i) - rect->y1); - } - - if (type == typePolygon) { - if (interiorColor && interiorColor->getSpace() != AnnotColor::colorTransparent) { - appearBuilder.append ("b\n"); - } else { - appearBuilder.append ("s\n"); - } - } else { - appearBuilder.append ("S\n"); - } - } - - appearBuilder.append ("Q\n"); - - double bbox[4]; - appearBBox->getBBoxRect(bbox); - if (ca == 1) { - appearance = createForm(appearBuilder.buffer(), bbox, gFalse, nullptr); - } else { - Object aStream = createForm(appearBuilder.buffer(), bbox, gTrue, nullptr); - - GooString appearBuf("/GS0 gs\n/Fm0 Do"); - Dict *resDict = createResourcesDict("Fm0", std::move(aStream), "GS0", ca, nullptr); - appearance = createForm(&appearBuf, bbox, gFalse, resDict); - } - } - - // draw the appearance stream - Object obj = appearance.fetch(gfx->getXRef()); - if (appearBBox) { - gfx->drawAnnot(&obj, (AnnotBorder *)nullptr, color, - appearBBox->getPageXMin(), appearBBox->getPageYMin(), - appearBBox->getPageXMax(), appearBBox->getPageYMax(), - getRotation()); - } else { - gfx->drawAnnot(&obj, (AnnotBorder *)nullptr, color, - rect->x1, rect->y1, rect->x2, rect->y2, getRotation()); - } -} - -//------------------------------------------------------------------------ -// AnnotCaret -//------------------------------------------------------------------------ -AnnotCaret::AnnotCaret(PDFDoc *docA, PDFRectangle *rect) : - AnnotMarkup(docA, rect) { - type = typeCaret; - - annotObj.dictSet ("Subtype", Object(objName, "Caret")); - initialize(docA, annotObj.getDict()); -} - -AnnotCaret::AnnotCaret(PDFDoc *docA, Object *dictObject, Object *obj) : - AnnotMarkup(docA, dictObject, obj) { - type = typeCaret; - initialize(docA, dictObject->getDict()); -} - -AnnotCaret::~AnnotCaret() { - delete caretRect; -} - -void AnnotCaret::initialize(PDFDoc *docA, Dict* dict) { - Object obj1; - - symbol = symbolNone; - obj1 = dict->lookup("Sy"); - if (obj1.isName()) { - GooString typeName(obj1.getName()); - if (!typeName.cmp("P")) { - symbol = symbolP; - } else if (!typeName.cmp("None")) { - symbol = symbolNone; - } - } - - obj1 = dict->lookup("RD"); - if (obj1.isArray()) { - caretRect = parseDiffRectangle(obj1.getArray(), rect); - } else { - caretRect = nullptr; - } -} - -void AnnotCaret::setSymbol(AnnotCaretSymbol new_symbol) { - symbol = new_symbol; - update("Sy", Object(objName, new_symbol == symbolP ? "P" : "None")); - invalidateAppearance(); -} - -//------------------------------------------------------------------------ -// AnnotInk -//------------------------------------------------------------------------ -AnnotInk::AnnotInk(PDFDoc *docA, PDFRectangle *rect) : - AnnotMarkup(docA, rect) { - type = typeInk; - - annotObj.dictSet ("Subtype", Object(objName, "Ink")); - - // Store dummy path with one null vertex only - Array *inkList = new Array(doc->getXRef()); - Array *vList = new Array(doc->getXRef()); - vList->add(Object(0.)); - vList->add(Object(0.)); - inkList->add(Object(vList)); - annotObj.dictSet("InkList", Object(inkList)); - - initialize(docA, annotObj.getDict()); -} - -AnnotInk::AnnotInk(PDFDoc *docA, Object *dictObject, Object *obj) : - AnnotMarkup(docA, dictObject, obj) { - type = typeInk; - initialize(docA, dictObject->getDict()); -} - -AnnotInk::~AnnotInk() { - freeInkList(); -} - -void AnnotInk::initialize(PDFDoc *docA, Dict* dict) { - Object obj1; - - obj1 = dict->lookup("InkList"); - if (obj1.isArray()) { - parseInkList(obj1.getArray()); - } else { - inkListLength = 0; - inkList = nullptr; - error(errSyntaxError, -1, "Bad Annot Ink List"); - ok = gFalse; - } - - obj1 = dict->lookup("BS"); - if (obj1.isDict()) { - delete border; - border = new AnnotBorderBS(obj1.getDict()); - } else if (!border) { - border = new AnnotBorderBS(); - } -} - -void AnnotInk::writeInkList(AnnotPath **paths, int n_paths, Array *dest_array) { - for (int i = 0; i < n_paths; ++i) { - AnnotPath *path = paths[i]; - Array *a = new Array(xref); - for (int j = 0; j < path->getCoordsLength(); ++j) { - a->add(Object(path->getX(j))); - a->add(Object(path->getY(j))); - } - dest_array->add(Object(a)); - } -} - -void AnnotInk::parseInkList(Array *array) { - inkListLength = array->getLength(); - inkList = (AnnotPath **) gmallocn ((inkListLength), sizeof(AnnotPath *)); - memset(inkList, 0, inkListLength * sizeof(AnnotPath *)); - for (int i = 0; i < inkListLength; i++) { - Object obj2 = array->get(i); - if (obj2.isArray()) - inkList[i] = new AnnotPath(obj2.getArray()); - } -} - -void AnnotInk::freeInkList() { - if (inkList) { - for (int i = 0; i < inkListLength; ++i) - delete inkList[i]; - gfree(inkList); - } -} - -void AnnotInk::setInkList(AnnotPath **paths, int n_paths) { - freeInkList(); - - Array *a = new Array(xref); - writeInkList(paths, n_paths, a); - - parseInkList(a); - annotObj.dictSet ("InkList", Object(a)); - invalidateAppearance(); -} - -void AnnotInk::draw(Gfx *gfx, GBool printing) { - double ca = 1; - - if (!isVisible (printing)) - return; - - annotLocker(); - if (appearance.isNull()) { - appearBBox = new AnnotAppearanceBBox(rect); - ca = opacity; - - AnnotAppearanceBuilder appearBuilder; - appearBuilder.append ("q\n"); - - if (color) { - appearBuilder.setDrawColor(color, gFalse); - } - - appearBuilder.setLineStyleForBorder(border); - appearBBox->setBorderWidth(std::max(1., border->getWidth())); - - for (int i = 0; i < inkListLength; ++i) { - const AnnotPath * path = inkList[i]; - if (path && path->getCoordsLength() != 0) { - appearBuilder.appendf ("{0:.2f} {1:.2f} m\n", path->getX(0) - rect->x1, path->getY(0) - rect->y1); - appearBBox->extendTo (path->getX(0) - rect->x1, path->getY(0) - rect->y1); - - for (int j = 1; j < path->getCoordsLength(); ++j) { - appearBuilder.appendf ("{0:.2f} {1:.2f} l\n", path->getX(j) - rect->x1, path->getY(j) - rect->y1); - appearBBox->extendTo (path->getX(j) - rect->x1, path->getY(j) - rect->y1); - } - - appearBuilder.append ("S\n"); - } - } - - appearBuilder.append ("Q\n"); - - double bbox[4]; - appearBBox->getBBoxRect(bbox); - if (ca == 1) { - appearance = createForm(appearBuilder.buffer(), bbox, gFalse, nullptr); - } else { - Object aStream = createForm(appearBuilder.buffer(), bbox, gTrue, nullptr); - - GooString appearBuf("/GS0 gs\n/Fm0 Do"); - Dict *resDict = createResourcesDict("Fm0", std::move(aStream), "GS0", ca, nullptr); - appearance = createForm(&appearBuf, bbox, gFalse, resDict); - } - } - - // draw the appearance stream - Object obj = appearance.fetch(gfx->getXRef()); - if (appearBBox) { - gfx->drawAnnot(&obj, (AnnotBorder *)nullptr, color, - appearBBox->getPageXMin(), appearBBox->getPageYMin(), - appearBBox->getPageXMax(), appearBBox->getPageYMax(), - getRotation()); - } else { - gfx->drawAnnot(&obj, (AnnotBorder *)nullptr, color, - rect->x1, rect->y1, rect->x2, rect->y2, getRotation()); - } -} - -//------------------------------------------------------------------------ -// AnnotFileAttachment -//------------------------------------------------------------------------ -AnnotFileAttachment::AnnotFileAttachment(PDFDoc *docA, PDFRectangle *rect, GooString *filename) : - AnnotMarkup(docA, rect) { - type = typeFileAttachment; - - annotObj.dictSet("Subtype", Object(objName, "FileAttachment")); - annotObj.dictSet("FS", Object(filename->copy())); - - initialize(docA, annotObj.getDict()); -} - -AnnotFileAttachment::AnnotFileAttachment(PDFDoc *docA, Object *dictObject, Object *obj) : - AnnotMarkup(docA, dictObject, obj) { - type = typeFileAttachment; - initialize(docA, dictObject->getDict()); -} - -AnnotFileAttachment::~AnnotFileAttachment() { - delete name; -} - -void AnnotFileAttachment::initialize(PDFDoc *docA, Dict* dict) { - Object obj1; - - obj1 = dict->lookup("FS"); - if (obj1.isDict() || obj1.isString()) { - file = obj1.copy(); - } else { - error(errSyntaxError, -1, "Bad Annot File Attachment"); - ok = gFalse; - } - - obj1 = dict->lookup("Name"); - if (obj1.isName()) { - name = new GooString(obj1.getName()); - } else { - name = new GooString("PushPin"); - } -} - -#define ANNOT_FILE_ATTACHMENT_AP_PUSHPIN \ - "4.301 23 m 19.699 23 l 21.523 23 23 21.523 23 19.699 c 23 4.301 l 23\n" \ - "2.477 21.523 1 19.699 1 c 4.301 1 l 2.477 1 1 2.477 1 4.301 c 1 19.699\n" \ - "l 1 21.523 2.477 23 4.301 23 c h\n" \ - "4.301 23 m f\n" \ - "0.533333 0.541176 0.521569 RG 2 w\n" \ - "1 J\n" \ - "1 j\n" \ - "[] 0.0 d\n" \ - "4 M 5 4 m 6 5 l S\n" \ - "2 w\n" \ - "11 14 m 9 12 l 6 12 l 13 5 l 13 8 l 15 10 l 18 11 l 20 11 l 12 19 l 12\n" \ - "17 l 11 14 l h\n" \ - "11 14 m S\n" \ - "3 w\n" \ - "6 5 m 9 8 l S\n" \ - "0.729412 0.741176 0.713725 RG 2 w\n" \ - "5 5 m 6 6 l S\n" \ - "2 w\n" \ - "11 15 m 9 13 l 6 13 l 13 6 l 13 9 l 15 11 l 18 12 l 20 12 l 12 20 l 12\n" \ - "18 l 11 15 l h\n" \ - "11 15 m S\n" \ - "3 w\n" \ - "6 6 m 9 9 l S\n" - -#define ANNOT_FILE_ATTACHMENT_AP_PAPERCLIP \ - "4.301 23 m 19.699 23 l 21.523 23 23 21.523 23 19.699 c 23 4.301 l 23\n" \ - "2.477 21.523 1 19.699 1 c 4.301 1 l 2.477 1 1 2.477 1 4.301 c 1 19.699\n" \ - "l 1 21.523 2.477 23 4.301 23 c h\n" \ - "4.301 23 m f\n" \ - "0.533333 0.541176 0.521569 RG 2 w\n" \ - "1 J\n" \ - "1 j\n" \ - "[] 0.0 d\n" \ - "4 M 16.645 12.035 m 12.418 7.707 l 10.902 6.559 6.402 11.203 8.09 12.562 c\n" \ - "14.133 18.578 l 14.949 19.387 16.867 19.184 17.539 18.465 c 20.551\n" \ - "15.23 l 21.191 14.66 21.336 12.887 20.426 12.102 c 13.18 4.824 l 12.18\n" \ - "3.82 6.25 2.566 4.324 4.461 c 3 6.395 3.383 11.438 4.711 12.801 c 9.648\n" \ - "17.887 l S\n" \ - "0.729412 0.741176 0.713725 RG 16.645 13.035 m 12.418 8.707 l\n" \ - "10.902 7.559 6.402 12.203 8.09 13.562 c\n" \ - "14.133 19.578 l 14.949 20.387 16.867 20.184 17.539 19.465 c 20.551\n" \ - "16.23 l 21.191 15.66 21.336 13.887 20.426 13.102 c 13.18 5.824 l 12.18\n" \ - "4.82 6.25 3.566 4.324 5.461 c 3 7.395 3.383 12.438 4.711 13.801 c 9.648\n" \ - "18.887 l S\n" - -#define ANNOT_FILE_ATTACHMENT_AP_GRAPH \ - "4.301 23 m 19.699 23 l 21.523 23 23 21.523 23 19.699 c 23 4.301 l 23\n" \ - "2.477 21.523 1 19.699 1 c 4.301 1 l 2.477 1 1 2.477 1 4.301 c 1 19.699\n" \ - "l 1 21.523 2.477 23 4.301 23 c h\n" \ - "4.301 23 m f\n" \ - "0.533333 0.541176 0.521569 RG 1 w\n" \ - "1 J\n" \ - "0 j\n" \ - "[] 0.0 d\n" \ - "4 M 18.5 15.5 m 18.5 13.086 l 16.086 15.5 l 18.5 15.5 l h\n" \ - "18.5 15.5 m S\n" \ - "7 7 m 10 11 l 13 9 l 18 15 l S\n" \ - "0.729412 0.741176 0.713725 RG 7 8 m 10 12 l 13 10 l 18 16 l S\n" \ - "18.5 16.5 m 18.5 14.086 l 16.086 16.5 l 18.5 16.5 l h\n" \ - "18.5 16.5 m S\n" \ - "0.533333 0.541176 0.521569 RG 2 w\n" \ - "1 j\n" \ - "3 19 m 3 3 l 21 3 l S\n" \ - "0.729412 0.741176 0.713725 RG 3 20 m 3 4 l 21 4 l S\n" - -#define ANNOT_FILE_ATTACHMENT_AP_TAG \ - "4.301 23 m 19.699 23 l 21.523 23 23 21.523 23 19.699 c 23 4.301 l 23\n" \ - "2.477 21.523 1 19.699 1 c 4.301 1 l 2.477 1 1 2.477 1 4.301 c 1 19.699\n" \ - "l 1 21.523 2.477 23 4.301 23 c h\n" \ - "4.301 23 m f\n" \ - "0.533333 0.541176 0.521569 RG 0.999781 w\n" \ - "1 J\n" \ - "1 j\n" \ - "[] 0.0 d\n" \ - "4 M q 1 0 0 -1 0 24 cm\n" \ - "8.492 8.707 m 8.492 9.535 7.82 10.207 6.992 10.207 c 6.164 10.207 5.492\n" \ - "9.535 5.492 8.707 c 5.492 7.879 6.164 7.207 6.992 7.207 c 7.82 7.207\n" \ - "8.492 7.879 8.492 8.707 c h\n" \ - "8.492 8.707 m S Q\n" \ - "2 w\n" \ - "20.078 11.414 m 20.891 10.602 20.785 9.293 20.078 8.586 c 14.422 2.93 l\n" \ - "13.715 2.223 12.301 2.223 11.594 2.93 c 3.816 10.707 l 3.109 11.414\n" \ - "2.402 17.781 3.816 19.195 c 5.23 20.609 11.594 19.902 12.301 19.195 c\n" \ - "20.078 11.414 l h\n" \ - "20.078 11.414 m S\n" \ - "0.729412 0.741176 0.713725 RG 20.078 12.414 m\n" \ - "20.891 11.605 20.785 10.293 20.078 9.586 c 14.422 3.93 l\n" \ - "13.715 3.223 12.301 3.223 11.594 3.93 c 3.816 11.707 l 3.109 12.414\n" \ - "2.402 18.781 3.816 20.195 c 5.23 21.609 11.594 20.902 12.301 20.195 c\n" \ - "20.078 12.414 l h\n" \ - "20.078 12.414 m S\n" \ - "0.533333 0.541176 0.521569 RG 1 w\n" \ - "0 j\n" \ - "11.949 13.184 m 16.191 8.941 l S\n" \ - "0.729412 0.741176 0.713725 RG 11.949 14.184 m 16.191 9.941 l S\n" \ - "0.533333 0.541176 0.521569 RG 14.07 6.82 m 9.828 11.062 l S\n" \ - "0.729412 0.741176 0.713725 RG 14.07 7.82 m 9.828 12.062 l S\n" \ - "0.533333 0.541176 0.521569 RG 6.93 15.141 m 8 20 14.27 20.5 16 20.5 c\n" \ - "18.094 20.504 19.5 20 19.5 18 c 19.5 16.699 20.91 16.418 22.5 16.5 c S\n" \ - "0.729412 0.741176 0.713725 RG 0.999781 w\n" \ - "1 j\n" \ - "q 1 0 0 -1 0 24 cm\n" \ - "8.492 7.707 m 8.492 8.535 7.82 9.207 6.992 9.207 c 6.164 9.207 5.492\n" \ - "8.535 5.492 7.707 c 5.492 6.879 6.164 6.207 6.992 6.207 c 7.82 6.207\n" \ - "8.492 6.879 8.492 7.707 c h\n" \ - "8.492 7.707 m S Q\n" \ - "1 w\n" \ - "0 j\n" \ - "6.93 16.141 m 8 21 14.27 21.5 16 21.5 c 18.094 21.504 19.5 21 19.5 19 c\n" \ - "19.5 17.699 20.91 17.418 22.5 17.5 c S\n" - -void AnnotFileAttachment::draw(Gfx *gfx, GBool printing) { - double ca = 1; - - if (!isVisible (printing)) - return; - - annotLocker(); - if (appearance.isNull()) { - ca = opacity; - - AnnotAppearanceBuilder appearBuilder; - - appearBuilder.append ("q\n"); - if (color) - appearBuilder.setDrawColor(color, gTrue); - else - appearBuilder.append ("1 1 1 rg\n"); - if (!name->cmp("PushPin")) - appearBuilder.append (ANNOT_FILE_ATTACHMENT_AP_PUSHPIN); - else if (!name->cmp("Paperclip")) - appearBuilder.append (ANNOT_FILE_ATTACHMENT_AP_PAPERCLIP); - else if (!name->cmp("Graph")) - appearBuilder.append (ANNOT_FILE_ATTACHMENT_AP_GRAPH); - else if (!name->cmp("Tag")) - appearBuilder.append (ANNOT_FILE_ATTACHMENT_AP_TAG); - appearBuilder.append ("Q\n"); - - double bbox[4]; - bbox[0] = bbox[1] = 0; - bbox[2] = bbox[3] = 24; - if (ca == 1) { - appearance = createForm (appearBuilder.buffer(), bbox, gFalse, nullptr); - } else { - Object aStream = createForm (appearBuilder.buffer(), bbox, gTrue, nullptr); - - GooString appearBuf("/GS0 gs\n/Fm0 Do"); - Dict *resDict = createResourcesDict("Fm0", std::move(aStream), "GS0", ca, nullptr); - appearance = createForm(&appearBuf, bbox, gFalse, resDict); - } - } - - // draw the appearance stream - Object obj = appearance.fetch(gfx->getXRef()); - gfx->drawAnnot(&obj, (AnnotBorder *)nullptr, color, - rect->x1, rect->y1, rect->x2, rect->y2, getRotation()); -} - -//------------------------------------------------------------------------ -// AnnotSound -//------------------------------------------------------------------------ -AnnotSound::AnnotSound(PDFDoc *docA, PDFRectangle *rect, Sound *soundA) : - AnnotMarkup(docA, rect) { - type = typeSound; - - annotObj.dictSet ("Subtype", Object(objName, "Sound")); - annotObj.dictSet ("Sound", soundA->getObject()->copy()); - - initialize(docA, annotObj.getDict()); -} - -AnnotSound::AnnotSound(PDFDoc *docA, Object *dictObject, Object *obj) : - AnnotMarkup(docA, dictObject, obj) { - type = typeSound; - initialize(docA, dictObject->getDict()); -} - -AnnotSound::~AnnotSound() { - delete sound; - - delete name; -} - -void AnnotSound::initialize(PDFDoc *docA, Dict* dict) { - Object obj1 = dict->lookup("Sound"); - - sound = Sound::parseSound(&obj1); - if (!sound) { - error(errSyntaxError, -1, "Bad Annot Sound"); - ok = gFalse; - } - - obj1 = dict->lookup("Name"); - if (obj1.isName()) { - name = new GooString(obj1.getName()); - } else { - name = new GooString("Speaker"); - } -} - -#define ANNOT_SOUND_AP_SPEAKER \ - "4.301 23 m 19.699 23 l 21.523 23 23 21.523 23 19.699 c 23 4.301 l 23\n" \ - "2.477 21.523 1 19.699 1 c 4.301 1 l 2.477 1 1 2.477 1 4.301 c 1 19.699\n" \ - "l 1 21.523 2.477 23 4.301 23 c h\n" \ - "4.301 23 m f\n" \ - "0.533333 0.541176 0.521569 RG 2 w\n" \ - "0 J\n" \ - "1 j\n" \ - "[] 0.0 d\n" \ - "4 M 4 14 m 4.086 8.043 l 7 8 l 11 4 l 11 18 l 7 14 l 4 14 l h\n" \ - "4 14 m S\n" \ - "1 w\n" \ - "1 J\n" \ - "0 j\n" \ - "13.699 15.398 m 14.699 13.398 14.699 9.398 13.699 7.398 c S\n" \ - "18.199 19.398 m 21.199 17.398 21.199 5.398 18.199 3.398 c S\n" \ - "16 17.398 m 18 16.398 18 7.398 16 5.398 c S\n" \ - "0.729412 0.741176 0.713725 RG 2 w\n" \ - "0 J\n" \ - "1 j\n" \ - "4 15 m 4.086 9.043 l 7 9 l 11 5 l 11 19 l 7 15 l 4 15 l h\n" \ - "4 15 m S\n" \ - "1 w\n" \ - "1 J\n" \ - "0 j\n" \ - "13.699 16 m 14.699 14 14.699 10 13.699 8 c S\n" \ - "18.199 20 m 21.199 18 21.199 6 18.199 4 c S\n" \ - "16 18 m 18 17 18 8 16 6 c S\n" - -#define ANNOT_SOUND_AP_MIC \ - "4.301 23 m 19.699 23 l 21.523 23 23 21.523 23 19.699 c 23 4.301 l 23\n" \ - "2.477 21.523 1 19.699 1 c 4.301 1 l 2.477 1 1 2.477 1 4.301 c 1 19.699\n" \ - "l 1 21.523 2.477 23 4.301 23 c h\n" \ - "4.301 23 m f\n" \ - "0.533333 0.541176 0.521569 RG 2 w\n" \ - "1 J\n" \ - "0 j\n" \ - "[] 0.0 d\n" \ - "4 M 12 20 m 12 20 l 13.656 20 15 18.656 15 17 c 15 13 l 15 11.344 13.656 10\n" \ - "12 10 c 12 10 l 10.344 10 9 11.344 9 13 c 9 17 l 9 18.656 10.344 20 12\n" \ - "20 c h\n" \ - "12 20 m S\n" \ - "1 w\n" \ - "17.5 14.5 m 17.5 11.973 l 17.5 8.941 15.047 6.5 12 6.5 c 8.953 6.5 6.5\n" \ - "8.941 6.5 11.973 c 6.5 14.5 l S\n" \ - "2 w\n" \ - "0 J\n" \ - "12 6.52 m 12 3 l S\n" \ - "1 J\n" \ - "8 3 m 16 3 l S\n" \ - "0.729412 0.741176 0.713725 RG 12 21 m 12 21 l 13.656 21 15 19.656 15 18 c\n" \ - "15 14 l 15 12.344 13.656 11 12 11 c 12 11 l 10.344 11 9 12.344 9 14 c\n" \ - "9 18 l 9 19.656 10.344 21 12 21 c h\n" \ - "12 21 m S\n" \ - "1 w\n" \ - "17.5 15.5 m 17.5 12.973 l 17.5 9.941 15.047 7.5 12 7.5 c 8.953 7.5 6.5\n" \ - "9.941 6.5 12.973 c 6.5 15.5 l S\n" \ - "2 w\n" \ - "0 J\n" \ - "12 7.52 m 12 4 l S\n" \ - "1 J\n" \ - "8 4 m 16 4 l S\n" - -void AnnotSound::draw(Gfx *gfx, GBool printing) { - Object obj; - double ca = 1; - - if (!isVisible (printing)) - return; - - annotLocker(); - if (appearance.isNull()) { - ca = opacity; - - AnnotAppearanceBuilder appearBuilder; - - appearBuilder.append ("q\n"); - if (color) - appearBuilder.setDrawColor(color, gTrue); - else - appearBuilder.append ("1 1 1 rg\n"); - if (!name->cmp("Speaker")) - appearBuilder.append (ANNOT_SOUND_AP_SPEAKER); - else if (!name->cmp("Mic")) - appearBuilder.append (ANNOT_SOUND_AP_MIC); - appearBuilder.append ("Q\n"); - - double bbox[4]; - bbox[0] = bbox[1] = 0; - bbox[2] = bbox[3] = 24; - if (ca == 1) { - appearance = createForm(appearBuilder.buffer(), bbox, gFalse, nullptr); - } else { - Object aStream = createForm(appearBuilder.buffer(), bbox, gTrue, nullptr); - - GooString appearBuf("/GS0 gs\n/Fm0 Do"); - Dict *resDict = createResourcesDict("Fm0", std::move(aStream), "GS0", ca, nullptr); - appearance = createForm(&appearBuf, bbox, gFalse, resDict); - } - } - - // draw the appearance stream - obj = appearance.fetch(gfx->getXRef()); - gfx->drawAnnot(&obj, (AnnotBorder *)nullptr, color, - rect->x1, rect->y1, rect->x2, rect->y2, getRotation()); -} - -//------------------------------------------------------------------------ -// Annot3D -//------------------------------------------------------------------------ -Annot3D::Annot3D(PDFDoc *docA, PDFRectangle *rect) : - Annot(docA, rect) { - type = type3D; - - annotObj.dictSet ("Subtype", Object(objName, "3D")); - - initialize(docA, annotObj.getDict()); -} - -Annot3D::Annot3D(PDFDoc *docA, Object *dictObject, Object *obj) : - Annot(docA, dictObject, obj) { - type = type3D; - initialize(docA, dictObject->getDict()); -} - -Annot3D::~Annot3D() { - if (activation) - delete activation; -} - -void Annot3D::initialize(PDFDoc *docA, Dict* dict) { - Object obj1 = dict->lookup("3DA"); - if (obj1.isDict()) { - activation = new Activation(obj1.getDict()); - } else { - activation = nullptr; - } -} - -Annot3D::Activation::Activation(Dict *dict) { - Object obj1; - - obj1 = dict->lookup("A"); - if (obj1.isName()) { - const char *name = obj1.getName(); - - if(!strcmp(name, "PO")) { - aTrigger = aTriggerPageOpened; - } else if(!strcmp(name, "PV")) { - aTrigger = aTriggerPageVisible; - } else if(!strcmp(name, "XA")) { - aTrigger = aTriggerUserAction; - } else { - aTrigger = aTriggerUnknown; - } - } else { - aTrigger = aTriggerUnknown; - } - - obj1 = dict->lookup("AIS"); - if (obj1.isName()) { - const char *name = obj1.getName(); - - if(!strcmp(name, "I")) { - aState = aStateEnabled; - } else if(!strcmp(name, "L")) { - aState = aStateDisabled; - } else { - aState = aStateUnknown; - } - } else { - aState = aStateUnknown; - } - - obj1 = dict->lookup("D"); - if (obj1.isName()) { - const char *name = obj1.getName(); - - if(!strcmp(name, "PC")) { - dTrigger = dTriggerPageClosed; - } else if(!strcmp(name, "PI")) { - dTrigger = dTriggerPageInvisible; - } else if(!strcmp(name, "XD")) { - dTrigger = dTriggerUserAction; - } else { - dTrigger = dTriggerUnknown; - } - } else { - dTrigger = dTriggerUnknown; - } - - obj1 = dict->lookup("DIS"); - if (obj1.isName()) { - const char *name = obj1.getName(); - - if(!strcmp(name, "U")) { - dState = dStateUninstantiaded; - } else if(!strcmp(name, "I")) { - dState = dStateInstantiated; - } else if(!strcmp(name, "L")) { - dState = dStateLive; - } else { - dState = dStateUnknown; - } - } else { - dState = dStateUnknown; - } - - obj1 = dict->lookup("TB"); - if (obj1.isBool()) { - displayToolbar = obj1.getBool(); - } else { - displayToolbar = gTrue; - } - - obj1 = dict->lookup("NP"); - if (obj1.isBool()) { - displayNavigation = obj1.getBool(); - } else { - displayNavigation = gFalse; - } -} - -//------------------------------------------------------------------------ -// AnnotRichMedia -//------------------------------------------------------------------------ -AnnotRichMedia::AnnotRichMedia(PDFDoc *docA, PDFRectangle *rect) : - Annot(docA, rect) { - type = typeRichMedia; - - annotObj.dictSet ("Subtype", Object(objName, "RichMedia")); - - initialize(docA, annotObj.getDict()); -} - -AnnotRichMedia::AnnotRichMedia(PDFDoc *docA, Object *dictObject, Object *obj) : - Annot(docA, dictObject, obj) { - type = typeRichMedia; - initialize(docA, dictObject->getDict()); -} - -AnnotRichMedia::~AnnotRichMedia() { - delete content; - delete settings; -} - -void AnnotRichMedia::initialize(PDFDoc *docA, Dict* dict) { - Object obj1 = dict->lookup("RichMediaContent"); - if (obj1.isDict()) { - content = new AnnotRichMedia::Content(obj1.getDict()); - } else { - content = nullptr; - } - - obj1 = dict->lookup("RichMediaSettings"); - if (obj1.isDict()) { - settings = new AnnotRichMedia::Settings(obj1.getDict()); - } else { - settings = nullptr; - } -} - -AnnotRichMedia::Content* AnnotRichMedia::getContent() const { - return content; -} - -AnnotRichMedia::Settings* AnnotRichMedia::getSettings() const { - return settings; -} - -AnnotRichMedia::Settings::Settings(Dict *dict) { - Object obj1 = dict->lookup("Activation"); - if (obj1.isDict()) { - activation = new AnnotRichMedia::Activation(obj1.getDict()); - } else { - activation = nullptr; - } - - obj1 = dict->lookup("Deactivation"); - if (obj1.isDict()) { - deactivation = new AnnotRichMedia::Deactivation(obj1.getDict()); - } else { - deactivation = nullptr; - } -} - -AnnotRichMedia::Settings::~Settings() { - delete activation; - delete deactivation; -} - -AnnotRichMedia::Activation* AnnotRichMedia::Settings::getActivation() const { - return activation; -} - -AnnotRichMedia::Deactivation* AnnotRichMedia::Settings::getDeactivation() const { - return deactivation; -} - -AnnotRichMedia::Activation::Activation(Dict *dict) { - Object obj1 = dict->lookup("Condition"); - if (obj1.isName()) { - const char *name = obj1.getName(); - - if (!strcmp(name, "PO")) { - condition = conditionPageOpened; - } else if (!strcmp(name, "PV")) { - condition = conditionPageVisible; - } else if (!strcmp(name, "XA")) { - condition = conditionUserAction; - } else { - condition = conditionUserAction; - } - } else { - condition = conditionUserAction; - } -} - -AnnotRichMedia::Activation::Condition AnnotRichMedia::Activation::getCondition() const { - return condition; -} - -AnnotRichMedia::Deactivation::Deactivation(Dict *dict) { - Object obj1 = dict->lookup("Condition"); - if (obj1.isName()) { - const char *name = obj1.getName(); - - if (!strcmp(name, "PC")) { - condition = conditionPageClosed; - } else if (!strcmp(name, "PI")) { - condition = conditionPageInvisible; - } else if (!strcmp(name, "XD")) { - condition = conditionUserAction; - } else { - condition = conditionUserAction; - } - } else { - condition = conditionUserAction; - } -} - -AnnotRichMedia::Deactivation::Condition AnnotRichMedia::Deactivation::getCondition() const { - return condition; -} - -AnnotRichMedia::Content::Content(Dict *dict) { - Object obj1 = dict->lookup("Configurations"); - if (obj1.isArray()) { - nConfigurations = obj1.arrayGetLength(); - - configurations = (Configuration **)gmallocn(nConfigurations, sizeof(Configuration *)); - - for (int i = 0; i < nConfigurations; ++i) { - Object obj2 = obj1.arrayGet(i); - if (obj2.isDict()) { - configurations[i] = new AnnotRichMedia::Configuration(obj2.getDict()); - } else { - configurations[i] = nullptr; - } - } - } else { - nConfigurations = 0; - configurations = nullptr; - } - - nAssets = 0; - assets = nullptr; - obj1 = dict->lookup("Assets"); - if (obj1.isDict()) { - Object obj2 = obj1.getDict()->lookup("Names"); - if (obj2.isArray()) { - nAssets = obj2.arrayGetLength() / 2; - - assets = (Asset **)gmallocn(nAssets, sizeof(Asset *)); - - int counter = 0; - for (int i = 0; i < nAssets; ++i) { - assets[counter] = new AnnotRichMedia::Asset; - - Object objKey = obj2.arrayGet(i * 2); - assets[counter]->fileSpec = obj2.arrayGet(i * 2 + 1); - - assets[counter]->name = new GooString( objKey.getString() ); - ++counter; - - } - } - } -} - -AnnotRichMedia::Content::~Content() { - if (configurations) { - for (int i = 0; i < nConfigurations; ++i) - delete configurations[i]; - gfree(configurations); - } - - if (assets) { - for (int i = 0; i < nAssets; ++i) - delete assets[i]; - gfree(assets); - } -} - -int AnnotRichMedia::Content::getConfigurationsCount() const { - return nConfigurations; -} - -AnnotRichMedia::Configuration* AnnotRichMedia::Content::getConfiguration(int index) const { - if (index < 0 || index >= nConfigurations) - return nullptr; - - return configurations[index]; -} - -int AnnotRichMedia::Content::getAssetsCount() const { - return nAssets; -} - -AnnotRichMedia::Asset* AnnotRichMedia::Content::getAsset(int index) const { - if (index < 0 || index >= nAssets) - return nullptr; - - return assets[index]; -} - -AnnotRichMedia::Asset::Asset() - : name(nullptr) -{ -} - -AnnotRichMedia::Asset::~Asset() -{ - delete name; -} - -const GooString* AnnotRichMedia::Asset::getName() const { - return name; -} - -Object* AnnotRichMedia::Asset::getFileSpec() const { - return const_cast<Object*>(&fileSpec); -} - -AnnotRichMedia::Configuration::Configuration(Dict *dict) -{ - Object obj1 = dict->lookup("Instances"); - if (obj1.isArray()) { - nInstances = obj1.arrayGetLength(); - - instances = (Instance **)gmallocn(nInstances, sizeof(Instance *)); - - for (int i = 0; i < nInstances; ++i) { - Object obj2 = obj1.arrayGet(i); - if (obj2.isDict()) { - instances[i] = new AnnotRichMedia::Instance(obj2.getDict()); - } else { - instances[i] = nullptr; - } - } - } else { - instances = nullptr; - } - - obj1 = dict->lookup("Name"); - if (obj1.isString()) { - name = new GooString(obj1.getString()); - } else { - name = nullptr; - } - - obj1 = dict->lookup("Subtype"); - if (obj1.isName()) { - const char *name = obj1.getName(); - - if (!strcmp(name, "3D")) { - type = type3D; - } else if (!strcmp(name, "Flash")) { - type = typeFlash; - } else if (!strcmp(name, "Sound")) { - type = typeSound; - } else if (!strcmp(name, "Video")) { - type = typeVideo; - } else { - // determine from first non null instance - type = typeFlash; // default in case all instances are null - if (instances && nInstances > 0) { - for (int i = 0; i < nInstances; ++i) { - AnnotRichMedia::Instance *instance = instances[i]; - if (instance) { - switch (instance->getType()) { - case AnnotRichMedia::Instance::type3D: - type = type3D; - break; - case AnnotRichMedia::Instance::typeFlash: - type = typeFlash; - break; - case AnnotRichMedia::Instance::typeSound: - type = typeSound; - break; - case AnnotRichMedia::Instance::typeVideo: - type = typeVideo; - break; - } - // break the loop since we found the first non null instance - break; - } - } - } - } - } -} - -AnnotRichMedia::Configuration::~Configuration() -{ - if (instances) { - for (int i = 0; i < nInstances; ++i) - delete instances[i]; - gfree(instances); - } - - delete name; -} - -int AnnotRichMedia::Configuration::getInstancesCount() const { - return nInstances; -} - -AnnotRichMedia::Instance* AnnotRichMedia::Configuration::getInstance(int index) const { - if (index < 0 || index >= nInstances) - return nullptr; - - return instances[index]; -} - -const GooString* AnnotRichMedia::Configuration::getName() const { - return name; -} - -AnnotRichMedia::Configuration::Type AnnotRichMedia::Configuration::getType() const { - return type; -} - -AnnotRichMedia::Instance::Instance(Dict *dict) -{ - Object obj1 = dict->lookup("Subtype"); - const char *name = obj1.isName() ? obj1.getName() : ""; - - if (!strcmp(name, "3D")) { - type = type3D; - } else if (!strcmp(name, "Flash")) { - type = typeFlash; - } else if (!strcmp(name, "Sound")) { - type = typeSound; - } else if (!strcmp(name, "Video")) { - type = typeVideo; - } else { - type = typeFlash; - } - - obj1 = dict->lookup("Params"); - if (obj1.isDict()) { - params = new AnnotRichMedia::Params(obj1.getDict()); - } else { - params = nullptr; - } -} - -AnnotRichMedia::Instance::~Instance() -{ - delete params; -} - -AnnotRichMedia::Instance::Type AnnotRichMedia::Instance::getType() const { - return type; -} - -AnnotRichMedia::Params* AnnotRichMedia::Instance::getParams() const { - return params; -} - -AnnotRichMedia::Params::Params(Dict *dict) -{ - Object obj1 = dict->lookup("FlashVars"); - if (obj1.isString()) { - flashVars = new GooString(obj1.getString()); - } else { - flashVars = nullptr; - } -} - -AnnotRichMedia::Params::~Params() -{ - delete flashVars; -} - -const GooString* AnnotRichMedia::Params::getFlashVars() const { - return flashVars; -} - -//------------------------------------------------------------------------ -// Annots -//------------------------------------------------------------------------ - -Annots::Annots(PDFDoc *docA, int page, Object *annotsObj) { - Annot *annot; - int i; - - doc = docA; - annots = nullptr; - size = 0; - nAnnots = 0; - - if (annotsObj->isArray()) { - for (i = 0; i < annotsObj->arrayGetLength(); ++i) { - //get the Ref to this annot and pass it to Annot constructor - //this way, it'll be possible for the annot to retrieve the corresponding - //form widget - Object obj1 = annotsObj->arrayGet(i); - if (obj1.isDict()) { - Object obj2 = annotsObj->arrayGetNF(i); - annot = createAnnot (&obj1, &obj2); - if (annot) { - if (annot->isOk()) { - annot->setPage(page, gFalse); // Don't change /P - appendAnnot(annot); - } - annot->decRefCnt(); - } - } - } - } -} - -void Annots::appendAnnot(Annot *annot) { - if (annot && annot->isOk()) { - if (nAnnots >= size) { - size += 16; - annots = (Annot **)greallocn(annots, size, sizeof(Annot *)); - } - annots[nAnnots++] = annot; - annot->incRefCnt(); - } -} - -GBool Annots::removeAnnot(Annot *annot) { - int idx = -1; - // Search annot and determine its index - for (int i = 0; idx == -1 && i < nAnnots; i++) { - if (annots[i] == annot) { - idx = i; - } - } - if (idx == -1) { - return gFalse; - } else { - --nAnnots; - memmove( annots + idx, annots + idx + 1, sizeof(annots[0]) * (nAnnots - idx) ); - annot->decRefCnt(); - return gTrue; - } -} - -Annot *Annots::createAnnot(Object* dictObject, Object *obj) { - Annot *annot = nullptr; - Object obj1 = dictObject->dictLookup("Subtype"); - if (obj1.isName()) { - const char *typeName = obj1.getName(); - - if (!strcmp(typeName, "Text")) { - annot = new AnnotText(doc, dictObject, obj); - } else if (!strcmp(typeName, "Link")) { - annot = new AnnotLink(doc, dictObject, obj); - } else if (!strcmp(typeName, "FreeText")) { - annot = new AnnotFreeText(doc, dictObject, obj); - } else if (!strcmp(typeName, "Line")) { - annot = new AnnotLine(doc, dictObject, obj); - } else if (!strcmp(typeName, "Square")) { - annot = new AnnotGeometry(doc, dictObject, obj); - } else if (!strcmp(typeName, "Circle")) { - annot = new AnnotGeometry(doc, dictObject, obj); - } else if (!strcmp(typeName, "Polygon")) { - annot = new AnnotPolygon(doc, dictObject, obj); - } else if (!strcmp(typeName, "PolyLine")) { - annot = new AnnotPolygon(doc, dictObject, obj); - } else if (!strcmp(typeName, "Highlight")) { - annot = new AnnotTextMarkup(doc, dictObject, obj); - } else if (!strcmp(typeName, "Underline")) { - annot = new AnnotTextMarkup(doc, dictObject, obj); - } else if (!strcmp(typeName, "Squiggly")) { - annot = new AnnotTextMarkup(doc, dictObject, obj); - } else if (!strcmp(typeName, "StrikeOut")) { - annot = new AnnotTextMarkup(doc, dictObject, obj); - } else if (!strcmp(typeName, "Stamp")) { - annot = new AnnotStamp(doc, dictObject, obj); - } else if (!strcmp(typeName, "Caret")) { - annot = new AnnotCaret(doc, dictObject, obj); - } else if (!strcmp(typeName, "Ink")) { - annot = new AnnotInk(doc, dictObject, obj); - } else if (!strcmp(typeName, "FileAttachment")) { - annot = new AnnotFileAttachment(doc, dictObject, obj); - } else if (!strcmp(typeName, "Sound")) { - annot = new AnnotSound(doc, dictObject, obj); - } else if(!strcmp(typeName, "Movie")) { - annot = new AnnotMovie(doc, dictObject, obj); - } else if(!strcmp(typeName, "Widget")) { - // Find the annot in forms - if (obj->isRef()) { - Form *form = doc->getCatalog()->getForm(); - if (form) { - FormWidget *widget = form->findWidgetByRef(obj->getRef()); - if (widget) { - annot = widget->getWidgetAnnotation(); - annot->incRefCnt(); - } - } - } - if (!annot) - annot = new AnnotWidget(doc, dictObject, obj); - } else if(!strcmp(typeName, "Screen")) { - annot = new AnnotScreen(doc, dictObject, obj); - } else if(!strcmp(typeName, "PrinterMark")) { - annot = new Annot(doc, dictObject, obj); - } else if (!strcmp(typeName, "TrapNet")) { - annot = new Annot(doc, dictObject, obj); - } else if (!strcmp(typeName, "Watermark")) { - annot = new Annot(doc, dictObject, obj); - } else if (!strcmp(typeName, "3D")) { - annot = new Annot3D(doc, dictObject, obj); - } else if (!strcmp(typeName, "RichMedia")) { - annot = new AnnotRichMedia(doc, dictObject, obj); - } else if (!strcmp(typeName, "Popup")) { - /* Popup annots are already handled by markup annots - * Here we only care about popup annots without a - * markup annotation associated - */ - Object obj2 = dictObject->dictLookup("Parent"); - if (obj2.isNull()) - annot = new AnnotPopup(doc, dictObject, obj); - else - annot = nullptr; - } else { - annot = new Annot(doc, dictObject, obj); - } - } - - return annot; -} - -Annot *Annots::findAnnot(Ref *ref) { - int i; - - for (i = 0; i < nAnnots; ++i) { - if (annots[i]->match(ref)) { - return annots[i]; - } - } - return nullptr; -} - - -Annots::~Annots() { - int i; - - for (i = 0; i < nAnnots; ++i) { - annots[i]->decRefCnt(); - } - gfree(annots); -} - - -//------------------------------------------------------------------------ -// AnnotAppearanceBuilder -//------------------------------------------------------------------------ - -AnnotAppearanceBuilder::AnnotAppearanceBuilder() - : appearBuf(new GooString()) -{ -} - -AnnotAppearanceBuilder::~AnnotAppearanceBuilder() -{ - delete appearBuf; -} - -void AnnotAppearanceBuilder::append(const char *text) -{ - appearBuf->append(text); -} - -void AnnotAppearanceBuilder::appendf(const char *fmt, ...) GOOSTRING_FORMAT -{ - va_list argList; - - va_start(argList, fmt); - appearBuf->appendfv(fmt, argList); - va_end(argList); -} - -const GooString *AnnotAppearanceBuilder::buffer() const -{ - return appearBuf; -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/Annot.h b/Build/source/libs/poppler/poppler-src/poppler/Annot.h deleted file mode 100644 index 83c10b397b1..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/Annot.h +++ /dev/null @@ -1,1669 +0,0 @@ -//======================================================================== -// -// Annot.h -// -// Copyright 2000-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2006 Scott Turner <scotty1024@mac.com> -// Copyright (C) 2007, 2008 Julien Rebetez <julienr@svn.gnome.org> -// Copyright (C) 2007-2011, 2013, 2015 Carlos Garcia Campos <carlosgc@gnome.org> -// Copyright (C) 2007, 2008 Iñigo Martínez <inigomartinez@gmail.com> -// Copyright (C) 2008 Michael Vrable <mvrable@cs.ucsd.edu> -// Copyright (C) 2008 Hugo Mercier <hmercier31@gmail.com> -// Copyright (C) 2008 Pino Toscano <pino@kde.org> -// Copyright (C) 2008 Tomas Are Haavet <tomasare@gmail.com> -// Copyright (C) 2009-2011, 2013, 2016-2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2012, 2013 Fabio D'Urso <fabiodurso@hotmail.it> -// Copyright (C) 2012, 2015 Tobias Koenig <tokoe@kdab.com> -// Copyright (C) 2013 Thomas Freitag <Thomas.Freitag@alfa.de> -// Copyright (C) 2013, 2017 Adrian Johnson <ajohnson@redneon.com> -// 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 -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef ANNOT_H -#define ANNOT_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "Object.h" - -class XRef; -class Gfx; -class CharCodeToUnicode; -class GfxFont; -class GfxResources; -class Page; -class PDFDoc; -class Form; -class FormWidget; -class FormField; -class FormFieldButton; -class FormFieldText; -class FormFieldChoice; -class PDFRectangle; -class Movie; -class LinkAction; -class Sound; -class FileSpec; - -enum AnnotLineEndingStyle { - annotLineEndingSquare, // Square - annotLineEndingCircle, // Circle - annotLineEndingDiamond, // Diamond - annotLineEndingOpenArrow, // OpenArrow - annotLineEndingClosedArrow, // ClosedArrow - annotLineEndingNone, // None - annotLineEndingButt, // Butt - annotLineEndingROpenArrow, // ROpenArrow - annotLineEndingRClosedArrow, // RClosedArrow - annotLineEndingSlash // Slash -}; - -enum AnnotExternalDataType { - annotExternalDataMarkupUnknown, - annotExternalDataMarkup3D // Markup3D -}; - -//------------------------------------------------------------------------ -// AnnotCoord -//------------------------------------------------------------------------ - -class AnnotCoord { -public: - - AnnotCoord() : x(0), y(0) { } - AnnotCoord(double _x, double _y) : x(_x), y(_y) { } - - double getX() const { return x; } - double getY() const { return y; } - -protected: - - double x, y; -}; - -//------------------------------------------------------------------------ -// AnnotPath -//------------------------------------------------------------------------ - -class AnnotPath { -public: - AnnotPath(); - AnnotPath(Array *array); - AnnotPath(AnnotCoord **coords, int coordLength); - ~AnnotPath(); - - AnnotPath(const AnnotPath &) = delete; - AnnotPath& operator=(const AnnotPath &other) = delete; - - double getX(int coord) const; - double getY(int coord) const; - AnnotCoord *getCoord(int coord) const; - int getCoordsLength() const { return coordsLength; } -protected: - AnnotCoord **coords; - int coordsLength; - - void parsePathArray(Array *array); -}; - -//------------------------------------------------------------------------ -// AnnotCalloutLine -//------------------------------------------------------------------------ - -class AnnotCalloutLine { -public: - - AnnotCalloutLine(double x1, double y1, double x2, double y2); - virtual ~AnnotCalloutLine() { } - - AnnotCalloutLine(const AnnotCalloutLine &) = delete; - AnnotCalloutLine& operator=(const AnnotCalloutLine &other) = delete; - - double getX1() const { return coord1.getX(); } - double getY1() const { return coord1.getY(); } - double getX2() const { return coord2.getX(); } - double getY2() const { return coord2.getY(); } - -protected: - - AnnotCoord coord1, coord2; -}; - -//------------------------------------------------------------------------ -// AnnotCalloutMultiLine -//------------------------------------------------------------------------ - -class AnnotCalloutMultiLine: public AnnotCalloutLine { -public: - - AnnotCalloutMultiLine(double x1, double y1, double x2, double y2, - double x3, double y3); - - double getX3() const { return coord3.getX(); } - double getY3() const { return coord3.getY(); } - -protected: - - AnnotCoord coord3; -}; - -//------------------------------------------------------------------------ -// AnnotBorderEffect -//------------------------------------------------------------------------ - -class AnnotBorderEffect { -public: - - enum AnnotBorderEffectType { - borderEffectNoEffect, // S - borderEffectCloudy // C - }; - - AnnotBorderEffect(Dict *dict); - - AnnotBorderEffectType getEffectType() const { return effectType; } - double getIntensity() const { return intensity; } - -private: - - AnnotBorderEffectType effectType; // S (Default S) - double intensity; // I (Default 0) -}; - -//------------------------------------------------------------------------ -// AnnotQuadrilateral -//------------------------------------------------------------------------ - -class AnnotQuadrilaterals { -public: - class AnnotQuadrilateral { - public: - AnnotQuadrilateral(double x1, double y1, double x2, double y2, double x3, - double y3, double x4, double y4); - - AnnotCoord coord1, coord2, coord3, coord4; - }; - - AnnotQuadrilaterals(Array *array, PDFRectangle *rect); - AnnotQuadrilaterals(AnnotQuadrilateral **quads, int quadsLength); - ~AnnotQuadrilaterals(); - - AnnotQuadrilaterals(const AnnotQuadrilaterals &) = delete; - AnnotQuadrilaterals& operator=(const AnnotQuadrilaterals &other) = delete; - - double getX1(int quadrilateral); - double getY1(int quadrilateral); - double getX2(int quadrilateral); - double getY2(int quadrilateral); - double getX3(int quadrilateral); - double getY3(int quadrilateral); - double getX4(int quadrilateral); - double getY4(int quadrilateral); - int getQuadrilateralsLength() const { return quadrilateralsLength; } -protected: - - AnnotQuadrilateral** quadrilaterals; - int quadrilateralsLength; -}; - -//------------------------------------------------------------------------ -// AnnotBorder -//------------------------------------------------------------------------ - -class AnnotBorder { -public: - enum AnnotBorderType { - typeArray, - typeBS - }; - - enum AnnotBorderStyle { - borderSolid, // Solid - borderDashed, // Dashed - borderBeveled, // Beveled - borderInset, // Inset - borderUnderlined // Underlined - }; - - virtual ~AnnotBorder(); - - AnnotBorder(const AnnotBorder &) = delete; - AnnotBorder& operator=(const AnnotBorder &other) = delete; - - virtual void setWidth(double new_width) { width = new_width; } - - virtual AnnotBorderType getType() const = 0; - virtual double getWidth() const { return width; } - virtual int getDashLength() const { return dashLength; } - virtual double *getDash() const { return dash; } - virtual AnnotBorderStyle getStyle() const { return style; } - - virtual Object writeToObject(XRef *xref) const = 0; - -protected: - AnnotBorder(); - - GBool parseDashArray(Object *dashObj); - - AnnotBorderType type; - double width; - static const int DASH_LIMIT = 10; // implementation note 82 in Appendix H. - int dashLength; - double *dash; - AnnotBorderStyle style; -}; - -//------------------------------------------------------------------------ -// AnnotBorderArray -//------------------------------------------------------------------------ - -class AnnotBorderArray: public AnnotBorder { -public: - AnnotBorderArray(); - AnnotBorderArray(Array *array); - - void setHorizontalCorner(double hc) { horizontalCorner = hc; } - void setVerticalCorner(double vc) { verticalCorner = vc; } - - double getHorizontalCorner() const { return horizontalCorner; } - double getVerticalCorner() const { return verticalCorner; } - -private: - AnnotBorderType getType() const override { return typeArray; } - Object writeToObject(XRef *xref) const override; - - double horizontalCorner; // (Default 0) - double verticalCorner; // (Default 0) - // double width; // (Default 1) (inherited from AnnotBorder) -}; - -//------------------------------------------------------------------------ -// AnnotBorderBS -//------------------------------------------------------------------------ - -class AnnotBorderBS: public AnnotBorder { -public: - - AnnotBorderBS(); - AnnotBorderBS(Dict *dict); - -private: - AnnotBorderType getType() const override { return typeBS; } - Object writeToObject(XRef *xref) const override; - - const char *getStyleName() const; - - // double width; // W (Default 1) (inherited from AnnotBorder) - // AnnotBorderStyle style; // S (Default S) (inherited from AnnotBorder) - // double *dash; // D (Default [3]) (inherited from AnnotBorder) -}; - -//------------------------------------------------------------------------ -// AnnotColor -//------------------------------------------------------------------------ - -class AnnotColor { -public: - - enum AnnotColorSpace { - colorTransparent = 0, - colorGray = 1, - colorRGB = 3, - colorCMYK = 4 - }; - - AnnotColor(); - AnnotColor(double gray); - AnnotColor(double r, double g, double b); - AnnotColor(double c, double m, double y, double k); - AnnotColor(Array *array, int adjust = 0); - - void adjustColor(int adjust); - - AnnotColorSpace getSpace() const { return (AnnotColorSpace) length; } - const double *getValues() const { return values; } - - Object writeToObject(XRef *xref) const; - -private: - - double values[4]; - int length; -}; - -//------------------------------------------------------------------------ -// AnnotIconFit -//------------------------------------------------------------------------ - -class AnnotIconFit { -public: - - enum AnnotIconFitScaleWhen { - scaleAlways, // A - scaleBigger, // B - scaleSmaller, // S - scaleNever // N - }; - - enum AnnotIconFitScale { - scaleAnamorphic, // A - scaleProportional // P - }; - - AnnotIconFit(Dict *dict); - - AnnotIconFitScaleWhen getScaleWhen() { return scaleWhen; } - AnnotIconFitScale getScale() { return scale; } - double getLeft() { return left; } - double getBottom() { return bottom; } - bool getFullyBounds() { return fullyBounds; } - -protected: - - AnnotIconFitScaleWhen scaleWhen; // SW (Default A) - AnnotIconFitScale scale; // S (Default P) - double left; // A (Default [0.5 0.5] - double bottom; // Only if scale is P - bool fullyBounds; // FB (Default false) -}; - -//------------------------------------------------------------------------ -// AnnotAppearance -//------------------------------------------------------------------------ - -class AnnotAppearance { -public: - - enum AnnotAppearanceType { - appearNormal, - appearRollover, - appearDown - }; - - AnnotAppearance(PDFDoc *docA, Object *dict); - ~AnnotAppearance(); - - // State is ignored if no subdictionary is present - Object getAppearanceStream(AnnotAppearanceType type, const char *state); - - // Access keys in normal appearance subdictionary (N) - GooString * getStateKey(int i); - int getNumStates(); - - // Removes all associated streams in the xref table. Caller is required to - // reset parent annotation's AP and AS after this call. - void removeAllStreams(); - - // Test if this AnnotAppearance references the specified stream - GBool referencesStream(Ref targetStreamRef); - -private: - static GBool referencesStream(Object *stateObj, Ref targetStreamRef); - void removeStream(Ref refToStream); - void removeStateStreams(Object *state); - -protected: - PDFDoc *doc; - XRef *xref; // the xref table for this PDF file - Object appearDict; // Annotation's AP -}; - -//------------------------------------------------------------------------ -// AnnotAppearanceCharacs -//------------------------------------------------------------------------ - -class AnnotAppearanceCharacs { -public: - - enum AnnotAppearanceCharacsTextPos { - captionNoIcon, // 0 - captionNoCaption, // 1 - captionBelow, // 2 - captionAbove, // 3 - captionRight, // 4 - captionLeft, // 5 - captionOverlaid // 6 - }; - - AnnotAppearanceCharacs(Dict *dict); - ~AnnotAppearanceCharacs(); - - AnnotAppearanceCharacs(const AnnotAppearanceCharacs &) = delete; - AnnotAppearanceCharacs& operator=(const AnnotAppearanceCharacs &) = delete; - - int getRotation() const { return rotation; } - const AnnotColor *getBorderColor() const { return borderColor; } - const AnnotColor *getBackColor() const { return backColor; } - const GooString *getNormalCaption() const { return normalCaption; } - const GooString *getRolloverCaption() const { return rolloverCaption; } - const GooString *getAlternateCaption() const { return alternateCaption; } - const AnnotIconFit *getIconFit() const { return iconFit; } - AnnotAppearanceCharacsTextPos getPosition() const { return position; } - -protected: - - int rotation; // R (Default 0) - AnnotColor *borderColor; // BC - AnnotColor *backColor; // BG - GooString *normalCaption; // CA - GooString *rolloverCaption; // RC - GooString *alternateCaption; // AC - // I - // RI - // IX - AnnotIconFit *iconFit; // IF - AnnotAppearanceCharacsTextPos position; // TP (Default 0) -}; - -//------------------------------------------------------------------------ -// AnnotAppearanceBBox -//------------------------------------------------------------------------ - -class AnnotAppearanceBBox -{ -public: - AnnotAppearanceBBox(PDFRectangle *init); - - void setBorderWidth(double w) { borderWidth = w; } - - // The following functions operate on coords relative to [origX origY] - void extendTo(double x, double y); - void getBBoxRect(double bbox[4]) const; - - // Get boundaries in page coordinates - double getPageXMin() const; - double getPageYMin() const; - double getPageXMax() const; - double getPageYMax() const; - -private: - double origX, origY, borderWidth; - double minX, minY, maxX, maxY; -}; - -//------------------------------------------------------------------------ -// AnnotAppearanceBuilder -//------------------------------------------------------------------------ - -class AnnotAppearanceBuilder { -public: - AnnotAppearanceBuilder(); - ~AnnotAppearanceBuilder(); - - AnnotAppearanceBuilder(const AnnotAppearanceBuilder &) = delete; - AnnotAppearanceBuilder& operator=(const AnnotAppearanceBuilder &) = delete; - - void setDrawColor(const AnnotColor *color, GBool fill); - void setLineStyleForBorder(const AnnotBorder *border); - void drawCircle(double cx, double cy, double r, GBool fill); - void drawCircleTopLeft(double cx, double cy, double r); - void drawCircleBottomRight(double cx, double cy, double r); - void drawFieldBorder(const FormField *field, const AnnotBorder *border, const AnnotAppearanceCharacs *appearCharacs, const PDFRectangle *rect); - bool drawFormField(const FormField *field, const Form *form, const GfxResources *resources, const GooString *da, const AnnotBorder *border, const AnnotAppearanceCharacs *appearCharacs, const PDFRectangle *rect, const GooString *appearState, XRef *xref, bool *addedDingbatsResource); - - void writeString(const GooString &str); - - void append(const char *text); - void appendf(const char *fmt, ...) GOOSTRING_FORMAT; - - const GooString *buffer() const; - -private: - bool drawListBox(const FormFieldChoice *fieldChoice, const AnnotBorder *border, const PDFRectangle *rect, - const GooString *da, const GfxResources *resources, int quadding); - bool drawFormFieldButton(const FormFieldButton *field, const GfxResources *resources, const GooString *da, const AnnotBorder *border, const AnnotAppearanceCharacs *appearCharacs, const PDFRectangle *rect, const GooString *appearState, XRef *xref, bool *addedDingbatsResource); - bool drawFormFieldText(const FormFieldText *fieldText, const Form *form, const GfxResources *resources, const GooString *da, const AnnotBorder *border, const AnnotAppearanceCharacs *appearCharacs, const PDFRectangle *rect); - bool drawFormFieldChoice(const FormFieldChoice *fieldChoice, const Form *form, const GfxResources *resources, const GooString *da, const AnnotBorder *border, const AnnotAppearanceCharacs *appearCharacs, const PDFRectangle *rect); - bool drawText(const GooString *text, const GooString *da, const GfxResources *resources, - const AnnotBorder *border, const AnnotAppearanceCharacs *appearCharacs, const PDFRectangle *rect, - GBool multiline, int comb, int quadding, - GBool txField, GBool forceZapfDingbats, - XRef *xref, bool *addedDingbatsResource, // xref and addedDingbatsResource both must not be null if forceZapfDingbats is passed - GBool password); - - GooString *appearBuf; -}; - -//------------------------------------------------------------------------ -// Annot -//------------------------------------------------------------------------ - -class Annot { - friend class Annots; - friend class Page; -public: - enum AnnotFlag { - flagUnknown = 0x0000, - flagInvisible = 0x0001, - flagHidden = 0x0002, - flagPrint = 0x0004, - flagNoZoom = 0x0008, - flagNoRotate = 0x0010, - flagNoView = 0x0020, - flagReadOnly = 0x0040, - flagLocked = 0x0080, - flagToggleNoView = 0x0100, - flagLockedContents = 0x0200 - }; - - enum AnnotSubtype { - typeUnknown, // 0 - typeText, // Text 1 - typeLink, // Link 2 - typeFreeText, // FreeText 3 - typeLine, // Line 4 - typeSquare, // Square 5 - typeCircle, // Circle 6 - typePolygon, // Polygon 7 - typePolyLine, // PolyLine 8 - typeHighlight, // Highlight 9 - typeUnderline, // Underline 10 - typeSquiggly, // Squiggly 11 - typeStrikeOut, // StrikeOut 12 - typeStamp, // Stamp 13 - typeCaret, // Caret 14 - typeInk, // Ink 15 - typePopup, // Popup 16 - typeFileAttachment, // FileAttachment 17 - typeSound, // Sound 18 - typeMovie, // Movie 19 - typeWidget, // Widget 20 - typeScreen, // Screen 21 - typePrinterMark, // PrinterMark 22 - typeTrapNet, // TrapNet 23 - typeWatermark, // Watermark 24 - type3D, // 3D 25 - typeRichMedia // RichMedia 26 - }; - - /** - * Describes the additional actions of a screen or widget annotation. - */ - enum AdditionalActionsType { - actionCursorEntering, ///< Performed when the cursor enters the annotation's active area - actionCursorLeaving, ///< Performed when the cursor exists the annotation's active area - actionMousePressed, ///< Performed when the mouse button is pressed inside the annotation's active area - actionMouseReleased, ///< Performed when the mouse button is released inside the annotation's active area - actionFocusIn, ///< Performed when the annotation receives the input focus - actionFocusOut, ///< Performed when the annotation loses the input focus - actionPageOpening, ///< Performed when the page containing the annotation is opened - actionPageClosing, ///< Performed when the page containing the annotation is closed - actionPageVisible, ///< Performed when the page containing the annotation becomes visible - actionPageInvisible ///< Performed when the page containing the annotation becomes invisible - }; - - enum FormAdditionalActionsType { - actionFieldModified, ///< Performed when the when the user modifies the field - actionFormatField, ///< Performed before the field is formatted to display its value - actionValidateField, ///< Performed when the field value changes - actionCalculateField, ///< Performed when the field needs to be recalculated - }; - - Annot(PDFDoc *docA, PDFRectangle *rectA); - Annot(PDFDoc *docA, Object *dictObject); - Annot(PDFDoc *docA, Object *dictObject, Object *obj); - GBool isOk() { return ok; } - - void incRefCnt(); - void decRefCnt(); - - virtual void draw(Gfx *gfx, GBool printing); - // Get the resource dict of the appearance stream - virtual Object getAppearanceResDict(); - - GBool match(Ref *refA) - { return ref.num == refA->num && ref.gen == refA->gen; } - - double getXMin(); - double getYMin(); - double getXMax(); - double getYMax(); - - void setRect(PDFRectangle *rect); - void setRect(double x1, double y1, double x2, double y2); - - // Sets the annot contents to new_content - // new_content should never be NULL - virtual void setContents(GooString *new_content); - void setName(GooString *new_name); - void setModified(GooString *new_date); - void setFlags(Guint new_flags); - - void setBorder(AnnotBorder *new_border); // Takes ownership - - // The annotation takes the ownership of - // new_color. - void setColor(AnnotColor *new_color); - - void setAppearanceState(const char *state); - - // getters - PDFDoc *getDoc() const { return doc; } - XRef *getXRef() const { return xref; } - GBool getHasRef() const { return hasRef; } - Ref getRef() const { return ref; } - AnnotSubtype getType() const { return type; } - PDFRectangle *getRect() const { return rect; } - void getRect(double *x1, double *y1, double *x2, double *y2) const; - const GooString *getContents() const { return contents; } - int getPageNum() const { return page; } - const GooString *getName() const { return name; } - const GooString *getModified() const { return modified; } - Guint getFlags() const { return flags; } - AnnotAppearance *getAppearStreams() const { return appearStreams; } - const GooString *getAppearState() const { return appearState; } - AnnotBorder *getBorder() const { return border; } - AnnotColor *getColor() const { return color; } - int getTreeKey() const { return treeKey; } - - int getId() { return ref.num; } - - // Check if point is inside the annot rectangle. - GBool inRect(double x, double y) const; - - static void layoutText(const GooString *text, GooString *outBuf, int *i, const GfxFont *font, - double *width, double widthLimit, int *charCount, - GBool noReencode); - -private: - void readArrayNum(Object *pdfArray, int key, double *value); - // write vStr[i:j[ in appearBuf - - void initialize (PDFDoc *docA, Dict *dict); - void setPage (int new_page, GBool updateP); // Called by Page::addAnnot and Annots ctor - - -protected: - virtual ~Annot(); - virtual void removeReferencedObjects(); // Called by Page::removeAnnot - Object createForm(const GooString *appearBuf, double *bbox, GBool transparencyGroup, Dict *resDict); - Dict *createResourcesDict(const char *formName, Object &&formStream, const char *stateName, - double opacity, const char *blendMode); - GBool isVisible(GBool printing); - int getRotation() const; - - // Updates the field key of the annotation dictionary - // and sets M to the current time - void update(const char *key, Object &&value); - - // Delete appearance streams and reset appearance state - void invalidateAppearance(); - - Object annotObj; - - int refCnt; - - // required data - AnnotSubtype type; // Annotation type - PDFRectangle *rect; // Rect - - // optional data - GooString *contents; // Contents - GooString *name; // NM - GooString *modified; // M - int page; // P - Guint flags; // F (must be a 32 bit unsigned int) - AnnotAppearance *appearStreams; // AP - Object appearance; // a reference to the Form XObject stream - // for the normal appearance - AnnotAppearanceBBox *appearBBox; // BBox of generated appearance - GooString *appearState; // AS - int treeKey; // Struct Parent; - Object oc; // OC - - PDFDoc *doc; - XRef *xref; // the xref table for this PDF file - Ref ref; // object ref identifying this annotation - AnnotBorder *border; // Border, BS - AnnotColor *color; // C - GBool ok; - - bool hasRef; -#ifdef MULTITHREADED - GooMutex mutex; -#endif -}; - -//------------------------------------------------------------------------ -// AnnotPopup -//------------------------------------------------------------------------ - -class AnnotPopup: public Annot { -public: - AnnotPopup(PDFDoc *docA, PDFRectangle *rect); - AnnotPopup(PDFDoc *docA, Object *dictObject, Object *obj); - ~AnnotPopup(); - - Object *getParentNF() { return &parent; } - void setParent(Object *parentA); - void setParent(Annot *parentA); - GBool getOpen() const { return open; } - void setOpen(GBool openA); - -protected: - void initialize(PDFDoc *docA, Dict *dict); - - Object parent; // Parent - GBool open; // Open -}; - -//------------------------------------------------------------------------ -// AnnotMarkup -//------------------------------------------------------------------------ - -class AnnotMarkup: public Annot { -public: - enum AnnotMarkupReplyType { - replyTypeR, // R - replyTypeGroup // Group - }; - - AnnotMarkup(PDFDoc *docA, PDFRectangle *rect); - AnnotMarkup(PDFDoc *docA, Object *dictObject, Object *obj); - ~AnnotMarkup(); - - // getters - const GooString *getLabel() const { return label; } - AnnotPopup *getPopup() const { return popup; } - double getOpacity() const { return opacity; } - // getRC - const GooString *getDate() const { return date; } - int getInReplyToID() const { return inReplyTo.num; } - const GooString *getSubject() const { return subject; } - AnnotMarkupReplyType getReplyTo() const { return replyTo; } - AnnotExternalDataType getExData() const { return exData; } - - // The annotation takes the ownership of new_popup - void setPopup(AnnotPopup *new_popup); - void setLabel(GooString *new_label); - void setOpacity(double opacityA); - void setDate(GooString *new_date); - -protected: - void removeReferencedObjects() override; - - GooString *label; // T (Default autor) - AnnotPopup *popup; // Popup - double opacity; // CA (Default 1.0) - // RC - GooString *date; // CreationDate - Ref inReplyTo; // IRT - GooString *subject; // Subj - AnnotMarkupReplyType replyTo; // RT (Default R) - // this object is overrided by the custom intent fields defined in some - // annotation types. - //GooString *intent; // IT - AnnotExternalDataType exData; // ExData - -private: - void initialize(PDFDoc *docA, Dict *dict, Object *obj); -}; - -//------------------------------------------------------------------------ -// AnnotText -//------------------------------------------------------------------------ - -class AnnotText: public AnnotMarkup { -public: - enum AnnotTextState { - stateUnknown, - // Marked state model - stateMarked, // Marked - stateUnmarked, // Unmarked - // Review state model - stateAccepted, // Accepted - stateRejected, // Rejected - stateCancelled, // Cancelled - stateCompleted, // Completed - stateNone // None - }; - - AnnotText(PDFDoc *docA, PDFRectangle *rect); - AnnotText(PDFDoc *docA, Object *dictObject, Object *obj); - ~AnnotText(); - - void draw(Gfx *gfx, GBool printing) override; - - // getters - GBool getOpen() const { return open; } - const GooString *getIcon() const { return icon; } - AnnotTextState getState() const { return state; } - - void setOpen(GBool openA); - void setIcon(GooString *new_icon); - -private: - - void initialize(PDFDoc *docA, Dict *dict); - - GBool open; // Open (Default false) - GooString *icon; // Name (Default Note) - AnnotTextState state; // State (Default Umarked if - // StateModel Marked - // None if StareModel Review) -}; - -//------------------------------------------------------------------------ -// AnnotMovie -//------------------------------------------------------------------------ - - - -class AnnotMovie: public Annot { - public: - AnnotMovie(PDFDoc *docA, PDFRectangle *rect, Movie *movieA); - AnnotMovie(PDFDoc *docA, Object *dictObject, Object *obj); - ~AnnotMovie(); - - void draw(Gfx *gfx, GBool printing) override; - - const GooString* getTitle() const { return title; } - Movie* getMovie() { return movie; } - - private: - void initialize(PDFDoc *docA, Dict *dict); - - GooString* title; // T - Movie* movie; // Movie + A -}; - - -//------------------------------------------------------------------------ -// AnnotScreen -//------------------------------------------------------------------------ - -class AnnotScreen: public Annot { - public: - - AnnotScreen(PDFDoc *docA, PDFRectangle *rect); - AnnotScreen(PDFDoc *docA, Object *dictObject, Object *obj); - ~AnnotScreen(); - - const GooString* getTitle() const { return title; } - - AnnotAppearanceCharacs *getAppearCharacs() { return appearCharacs; } - LinkAction* getAction() { return action; } // The caller should now delete the result - LinkAction *getAdditionalAction(AdditionalActionsType type); // The caller should delete the result - - private: - void initialize(PDFDoc *docA, Dict *dict); - - - GooString* title; // T - - AnnotAppearanceCharacs* appearCharacs; // MK - - LinkAction *action; // A - Object additionalActions; // AA -}; - -//------------------------------------------------------------------------ -// AnnotLink -//------------------------------------------------------------------------ - -class AnnotLink: public Annot { -public: - - enum AnnotLinkEffect { - effectNone, // N - effectInvert, // I - effectOutline, // O - effectPush // P - }; - - AnnotLink(PDFDoc *docA, PDFRectangle *rect); - AnnotLink(PDFDoc *docA, Object *dictObject, Object *obj); - ~AnnotLink(); - - void draw(Gfx *gfx, GBool printing) override; - - // getters - LinkAction *getAction() const { return action; } - AnnotLinkEffect getLinkEffect() const { return linkEffect; } - Dict *getUriAction() const { return uriAction; } - AnnotQuadrilaterals *getQuadrilaterals() const { return quadrilaterals; } - -protected: - - void initialize(PDFDoc *docA, Dict *dict); - - LinkAction *action; // A, Dest - AnnotLinkEffect linkEffect; // H (Default I) - Dict *uriAction; // PA - - AnnotQuadrilaterals *quadrilaterals; // QuadPoints -}; - -//------------------------------------------------------------------------ -// AnnotFreeText -//------------------------------------------------------------------------ - -class AnnotFreeText: public AnnotMarkup { -public: - - enum AnnotFreeTextQuadding { - quaddingLeftJustified, // 0 - quaddingCentered, // 1 - quaddingRightJustified // 2 - }; - - enum AnnotFreeTextIntent { - intentFreeText, // FreeText - intentFreeTextCallout, // FreeTextCallout - intentFreeTextTypeWriter // FreeTextTypeWriter - }; - - AnnotFreeText(PDFDoc *docA, PDFRectangle *rect, GooString *da); - AnnotFreeText(PDFDoc *docA, Object *dictObject, Object *obj); - ~AnnotFreeText(); - - void draw(Gfx *gfx, GBool printing) override; - Object getAppearanceResDict() override; - void setContents(GooString *new_content) override; - - void setAppearanceString(GooString *new_string); - void setQuadding(AnnotFreeTextQuadding new_quadding); - void setStyleString(GooString *new_string); - void setCalloutLine(AnnotCalloutLine *line); - void setIntent(AnnotFreeTextIntent new_intent); - - // getters - const GooString *getAppearanceString() const { return appearanceString; } - AnnotFreeTextQuadding getQuadding() const { return quadding; } - // return rc - const GooString *getStyleString() const { return styleString; } - AnnotCalloutLine *getCalloutLine() const { return calloutLine; } - AnnotFreeTextIntent getIntent() const { return intent; } - AnnotBorderEffect *getBorderEffect() const { return borderEffect; } - PDFRectangle *getRectangle() const { return rectangle; } - AnnotLineEndingStyle getEndStyle() const { return endStyle; } - -protected: - - void initialize(PDFDoc *docA, Dict *dict); - static void parseAppearanceString(GooString *da, double &fontsize, AnnotColor* &fontcolor); - void generateFreeTextAppearance(); - - // required - GooString *appearanceString; // DA - - // optional - AnnotFreeTextQuadding quadding; // Q (Default 0) - // RC - GooString *styleString; // DS - AnnotCalloutLine *calloutLine; // CL - AnnotFreeTextIntent intent; // IT - AnnotBorderEffect *borderEffect; // BE - PDFRectangle *rectangle; // RD - // inherited from Annot - // AnnotBorderBS border; // BS - AnnotLineEndingStyle endStyle; // LE (Default None) -}; - -//------------------------------------------------------------------------ -// AnnotLine -//------------------------------------------------------------------------ - -class AnnotLine: public AnnotMarkup { -public: - - enum AnnotLineIntent { - intentLineArrow, // LineArrow - intentLineDimension // LineDimension - }; - - enum AnnotLineCaptionPos { - captionPosInline, // Inline - captionPosTop // Top - }; - - AnnotLine(PDFDoc *docA, PDFRectangle *rect); - AnnotLine(PDFDoc *docA, Object *dictObject, Object *obj); - ~AnnotLine(); - - void draw(Gfx *gfx, GBool printing) override; - Object getAppearanceResDict() override; - void setContents(GooString *new_content) override; - - void setVertices(double x1, double y1, double x2, double y2); - void setStartEndStyle(AnnotLineEndingStyle start, AnnotLineEndingStyle end); - void setInteriorColor(AnnotColor *new_color); - void setLeaderLineLength(double len); - void setLeaderLineExtension(double len); - void setCaption(bool new_cap); - void setIntent(AnnotLineIntent new_intent); - - // getters - AnnotLineEndingStyle getStartStyle() const { return startStyle; } - AnnotLineEndingStyle getEndStyle() const { return endStyle; } - AnnotColor *getInteriorColor() const { return interiorColor; } - double getLeaderLineLength() const { return leaderLineLength; } - double getLeaderLineExtension() const { return leaderLineExtension; } - bool getCaption() const { return caption; } - AnnotLineIntent getIntent() const { return intent; } - double getLeaderLineOffset() const { return leaderLineOffset; } - AnnotLineCaptionPos getCaptionPos() const { return captionPos; } - Dict *getMeasure() const { return measure; } - double getCaptionTextHorizontal() const { return captionTextHorizontal; } - double getCaptionTextVertical() const { return captionTextVertical; } - double getX1() const { return coord1->getX(); } - double getY1() const { return coord1->getY(); } - double getX2() const { return coord2->getX(); } - double getY2() const { return coord2->getY(); } - -protected: - - void initialize(PDFDoc *docA, Dict *dict); - void generateLineAppearance(); - - // required - AnnotCoord *coord1, *coord2; - - // optional - // inherited from Annot - // AnnotBorderBS border; // BS - AnnotLineEndingStyle startStyle; // LE (Default [/None /None]) - AnnotLineEndingStyle endStyle; // - AnnotColor *interiorColor; // IC - double leaderLineLength; // LL (Default 0) - double leaderLineExtension; // LLE (Default 0) - bool caption; // Cap (Default false) - AnnotLineIntent intent; // IT - double leaderLineOffset; // LLO - AnnotLineCaptionPos captionPos; // CP (Default Inline) - Dict *measure; // Measure - double captionTextHorizontal; // CO (Default [0, 0]) - double captionTextVertical; // -}; - -//------------------------------------------------------------------------ -// AnnotTextMarkup -//------------------------------------------------------------------------ - -class AnnotTextMarkup: public AnnotMarkup { -public: - - AnnotTextMarkup(PDFDoc *docA, PDFRectangle *rect, AnnotSubtype subType); - AnnotTextMarkup(PDFDoc *docA, Object *dictObject, Object *obj); - ~AnnotTextMarkup(); - - void draw(Gfx *gfx, GBool printing) override; - - // typeHighlight, typeUnderline, typeSquiggly or typeStrikeOut - void setType(AnnotSubtype new_type); - - void setQuadrilaterals(AnnotQuadrilaterals *quadPoints); - - AnnotQuadrilaterals *getQuadrilaterals() const { return quadrilaterals; } - -protected: - - void initialize(PDFDoc *docA, Dict *dict); - - AnnotQuadrilaterals *quadrilaterals; // QuadPoints -}; - -//------------------------------------------------------------------------ -// AnnotStamp -//------------------------------------------------------------------------ - -class AnnotStamp: public AnnotMarkup { -public: - - AnnotStamp(PDFDoc *docA, PDFRectangle *rect); - AnnotStamp(PDFDoc *docA, Object *dictObject, Object *obj); - ~AnnotStamp(); - - void setIcon(GooString *new_icon); - - // getters - const GooString *getIcon() const { return icon; } - -private: - - void initialize(PDFDoc *docA, Dict *dict); - - GooString *icon; // Name (Default Draft) -}; - -//------------------------------------------------------------------------ -// AnnotGeometry -//------------------------------------------------------------------------ - -class AnnotGeometry: public AnnotMarkup { -public: - - AnnotGeometry(PDFDoc *docA, PDFRectangle *rect, AnnotSubtype subType); - AnnotGeometry(PDFDoc *docA, Object *dictObject, Object *obj); - ~AnnotGeometry(); - - void draw(Gfx *gfx, GBool printing) override; - - void setType(AnnotSubtype new_type); // typeSquare or typeCircle - void setInteriorColor(AnnotColor *new_color); - - // getters - AnnotColor *getInteriorColor() const { return interiorColor; } - AnnotBorderEffect *getBorderEffect() const { return borderEffect; } - PDFRectangle *getGeometryRect() const { return geometryRect; } - -private: - - void initialize(PDFDoc *docA, Dict *dict); - - AnnotColor *interiorColor; // IC - AnnotBorderEffect *borderEffect; // BE - PDFRectangle *geometryRect; // RD (combined with Rect) -}; - -//------------------------------------------------------------------------ -// AnnotPolygon -//------------------------------------------------------------------------ - -class AnnotPolygon: public AnnotMarkup { -public: - - enum AnnotPolygonIntent { - polygonCloud, // PolygonCloud - polylineDimension, // PolyLineDimension - polygonDimension // PolygonDimension - }; - - AnnotPolygon(PDFDoc *docA, PDFRectangle *rect, AnnotSubtype subType); - AnnotPolygon(PDFDoc *docA, Object *dictObject, Object *obj); - ~AnnotPolygon(); - - void draw(Gfx *gfx, GBool printing) override; - - void setType(AnnotSubtype new_type); // typePolygon or typePolyLine - void setVertices(AnnotPath *path); - void setStartEndStyle(AnnotLineEndingStyle start, AnnotLineEndingStyle end); - void setInteriorColor(AnnotColor *new_color); - void setIntent(AnnotPolygonIntent new_intent); - - // getters - AnnotPath *getVertices() const { return vertices; } - AnnotLineEndingStyle getStartStyle() const { return startStyle; } - AnnotLineEndingStyle getEndStyle() const { return endStyle; } - AnnotColor *getInteriorColor() const { return interiorColor; } - AnnotBorderEffect *getBorderEffect() const { return borderEffect; } - AnnotPolygonIntent getIntent() const { return intent; } - -private: - - void initialize(PDFDoc *docA, Dict *dict); - - // required - AnnotPath *vertices; // Vertices - - // optional - AnnotLineEndingStyle startStyle; // LE (Default [/None /None]) - AnnotLineEndingStyle endStyle; // - // inherited from Annot - // AnnotBorderBS border; // BS - AnnotColor *interiorColor; // IC - AnnotBorderEffect *borderEffect; // BE - AnnotPolygonIntent intent; // IT - // Measure -}; - -//------------------------------------------------------------------------ -// AnnotCaret -//------------------------------------------------------------------------ - -class AnnotCaret: public AnnotMarkup { -public: - - enum AnnotCaretSymbol { - symbolNone, // None - symbolP // P - }; - - AnnotCaret(PDFDoc *docA, PDFRectangle *rect); - AnnotCaret(PDFDoc *docA, Object *dictObject, Object *obj); - ~AnnotCaret(); - - void setSymbol(AnnotCaretSymbol new_symbol); - - // getters - AnnotCaretSymbol getSymbol() const { return symbol; } - PDFRectangle *getCaretRect() const { return caretRect; } - -private: - - void initialize(PDFDoc *docA, Dict *dict); - - AnnotCaretSymbol symbol; // Sy (Default None) - PDFRectangle *caretRect; // RD (combined with Rect) -}; - -//------------------------------------------------------------------------ -// AnnotInk -//------------------------------------------------------------------------ - -class AnnotInk: public AnnotMarkup { -public: - - AnnotInk(PDFDoc *docA, PDFRectangle *rect); - AnnotInk(PDFDoc *docA, Object *dictObject, Object *obj); - ~AnnotInk(); - - void draw(Gfx *gfx, GBool printing) override; - - void setInkList(AnnotPath **paths, int n_paths); - - // getters - AnnotPath **getInkList() const { return inkList; } - int getInkListLength() const { return inkListLength; } - -private: - - void initialize(PDFDoc *docA, Dict *dict); - void writeInkList(AnnotPath **paths, int n_paths, Array *dest_array); - void parseInkList(Array *src_array); - void freeInkList(); - - // required - AnnotPath **inkList; // InkList - int inkListLength; - - // optional - // inherited from Annot - // AnnotBorderBS border; // BS -}; - -//------------------------------------------------------------------------ -// AnnotFileAttachment -//------------------------------------------------------------------------ - -class AnnotFileAttachment: public AnnotMarkup { -public: - - AnnotFileAttachment(PDFDoc *docA, PDFRectangle *rect, GooString *filename); - AnnotFileAttachment(PDFDoc *docA, Object *dictObject, Object *obj); - ~AnnotFileAttachment(); - - void draw(Gfx *gfx, GBool printing) override; - - // getters - Object *getFile() { return &file; } - const GooString *getName() const { return name; } - -private: - - void initialize(PDFDoc *docA, Dict *dict); - - // required - Object file; // FS - - // optional - GooString *name; // Name -}; - -//------------------------------------------------------------------------ -// AnnotSound -//------------------------------------------------------------------------ - -class AnnotSound: public AnnotMarkup { -public: - - AnnotSound(PDFDoc *docA, PDFRectangle *rect, Sound *soundA); - AnnotSound(PDFDoc *docA, Object *dictObject, Object *obj); - ~AnnotSound(); - - void draw(Gfx *gfx, GBool printing) override; - - // getters - Sound *getSound() { return sound; } - const GooString *getName() const { return name; } - -private: - - void initialize(PDFDoc *docA, Dict *dict); - - // required - Sound *sound; // Sound - - // optional - GooString *name; // Name -}; - -//------------------------------------------------------------------------ -// AnnotWidget -//------------------------------------------------------------------------ - -class AnnotWidget: public Annot { -public: - - enum AnnotWidgetHighlightMode { - highlightModeNone, // N - highlightModeInvert, // I - highlightModeOutline, // O - highlightModePush // P,T - }; - - AnnotWidget(PDFDoc *docA, Object *dictObject, Object *obj); - AnnotWidget(PDFDoc *docA, Object *dictObject, Object *obj, FormField *fieldA); - ~AnnotWidget(); - - void draw(Gfx *gfx, GBool printing) override; - - void generateFieldAppearance (bool *addDingbatsResource); - void updateAppearanceStream (); - - AnnotWidgetHighlightMode getMode() { return mode; } - AnnotAppearanceCharacs *getAppearCharacs() { return appearCharacs; } - LinkAction *getAction() { return action; } // The caller should not delete the result - LinkAction *getAdditionalAction(AdditionalActionsType type); // The caller should delete the result - LinkAction *getFormAdditionalAction(FormAdditionalActionsType type); // The caller should delete the result - Dict *getParent() { return parent; } - -private: - - void initialize(PDFDoc *docA, Dict *dict); - - Form *form; - FormField *field; // FormField object for this annotation - AnnotWidgetHighlightMode mode; // H (Default I) - AnnotAppearanceCharacs *appearCharacs; // MK - LinkAction *action; // A - Object additionalActions; // AA - // inherited from Annot - // AnnotBorderBS border; // BS - Dict *parent; // Parent - Ref updatedAppearanceStream; // {-1,-1} if updateAppearanceStream has never been called -}; - -//------------------------------------------------------------------------ -// Annot3D -//------------------------------------------------------------------------ - -class Annot3D: public Annot { - class Activation { - public: - enum ActivationATrigger { - aTriggerUnknown, - aTriggerPageOpened, // PO - aTriggerPageVisible, // PV - aTriggerUserAction // XA - }; - - enum ActivationAState { - aStateUnknown, - aStateEnabled, // I - aStateDisabled // L - }; - - enum ActivationDTrigger { - dTriggerUnknown, - dTriggerPageClosed, // PC - dTriggerPageInvisible, // PI - dTriggerUserAction // XD - }; - - enum ActivationDState { - dStateUnknown, - dStateUninstantiaded, // U - dStateInstantiated, // I - dStateLive // L - }; - - Activation(Dict *dict); - private: - - ActivationATrigger aTrigger; // A (Default XA) - ActivationAState aState; // AIS (Default L) - ActivationDTrigger dTrigger; // D (Default PI) - ActivationDState dState; // DIS (Default U) - GBool displayToolbar; // TB (Default true) - GBool displayNavigation; // NP (Default false); - }; -public: - - Annot3D(PDFDoc *docA, PDFRectangle *rect); - Annot3D(PDFDoc *docA, Object *dictObject, Object *obj); - ~Annot3D(); - - // getters - -private: - - void initialize(PDFDoc *docA, Dict *dict); - - Activation *activation; // 3DA -}; - -//------------------------------------------------------------------------ -// AnnotRichMedia -//------------------------------------------------------------------------ - -class AnnotRichMedia: public Annot { -public: - class Params { - public: - Params(Dict *dict); - ~Params(); - - Params(const Params &) = delete; - Params& operator=(const Params &) = delete; - - const GooString* getFlashVars() const; - - private: - // optional - GooString *flashVars; // FlashVars - }; - - class Instance { - public: - enum Type { - type3D, // 3D - typeFlash, // Flash - typeSound, // Sound - typeVideo // Video - }; - - Instance(Dict *dict); - ~Instance(); - - Instance(const Instance &) = delete; - Instance& operator=(const Instance &) = delete; - - Type getType() const; - Params* getParams() const; - - private: - // optional - Type type; // Subtype - Params *params; // Params - }; - - class Configuration { - public: - enum Type { - type3D, // 3D - typeFlash, // Flash - typeSound, // Sound - typeVideo // Video - }; - - Configuration(Dict *dict); - ~Configuration(); - - Configuration(const Configuration &) = delete; - Configuration& operator=(const Configuration &) = delete; - - Type getType() const; - const GooString* getName() const; - int getInstancesCount() const; - Instance* getInstance(int index) const; - - private: - // optional - Type type; // Subtype - GooString *name; // Name - Instance **instances; // Instances - int nInstances; - }; - - class Content; - - class Asset { - public: - Asset(); - ~Asset(); - - Asset(const Asset &) = delete; - Asset& operator=(const Asset &) = delete; - - const GooString* getName() const; - Object* getFileSpec() const; - - private: - friend class AnnotRichMedia::Content; - - GooString *name; - Object fileSpec; - }; - - class Content { - public: - Content(Dict *dict); - ~Content(); - - Content(const Content &) = delete; - Content& operator=(const Content &) = delete; - - int getConfigurationsCount() const; - Configuration* getConfiguration(int index) const; - - int getAssetsCount() const; - Asset* getAsset(int index) const; - - private: - // optional - Configuration **configurations; // Configurations - int nConfigurations; - - Asset **assets; // Assets - int nAssets; - }; - - class Activation { - public: - enum Condition { - conditionPageOpened, // PO - conditionPageVisible, // PV - conditionUserAction // XA - }; - - Activation(Dict *dict); - - Condition getCondition() const; - - private: - // optional - Condition condition; - }; - - class Deactivation { - public: - enum Condition { - conditionPageClosed, // PC - conditionPageInvisible, // PI - conditionUserAction // XD - }; - - Deactivation(Dict *dict); - - Condition getCondition() const; - - private: - // optional - Condition condition; - }; - - class Settings { - public: - Settings(Dict *dict); - ~Settings(); - - Settings(const Settings &) = delete; - Settings& operator=(const Settings &) = delete; - - Activation* getActivation() const; - Deactivation* getDeactivation() const; - - private: - // optional - Activation *activation; - Deactivation *deactivation; - }; - - AnnotRichMedia(PDFDoc *docA, PDFRectangle *rect); - AnnotRichMedia(PDFDoc *docA, Object *dictObject, Object *obj); - ~AnnotRichMedia(); - - Content* getContent() const; - - Settings* getSettings() const; - -private: - void initialize(PDFDoc *docA, Dict *dict); - - // required - Content *content; // RichMediaContent - - // optional - Settings *settings; // RichMediaSettings -}; - - -//------------------------------------------------------------------------ -// Annots -//------------------------------------------------------------------------ - -class Annots { -public: - - // Build a list of Annot objects and call setPage on them - Annots(PDFDoc *docA, int page, Object *annotsObj); - - ~Annots(); - - Annots(const Annots &) = delete; - Annots& operator=(const Annots &) = delete; - - // Iterate through list of annotations. - int getNumAnnots() { return nAnnots; } - Annot *getAnnot(int i) { return annots[i]; } - void appendAnnot(Annot *annot); - GBool removeAnnot(Annot *annot); - -private: - Annot* createAnnot(Object* dictObject, Object *obj); - Annot *findAnnot(Ref *ref); - - PDFDoc *doc; - Annot **annots; - int nAnnots; - int size; -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/Array.cc b/Build/source/libs/poppler/poppler-src/poppler/Array.cc deleted file mode 100644 index e8aa34eafe6..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/Array.cc +++ /dev/null @@ -1,150 +0,0 @@ -//======================================================================== -// -// Array.cc -// -// Copyright 1996-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2005 Kristian Høgsberg <krh@redhat.com> -// Copyright (C) 2012 Fabio D'Urso <fabiodurso@hotmail.it> -// Copyright (C) 2013 Thomas Freitag <Thomas.Freitag@alfa.de> -// Copyright (C) 2013, 2017 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2017 Adrian Johnson <ajohnson@redneon.com> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include <config.h> - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include <stdlib.h> -#include <stddef.h> -#include "goo/gmem.h" -#include "Object.h" -#include "Array.h" - -#ifdef MULTITHREADED -# define arrayLocker() MutexLocker locker(&mutex) -#else -# define arrayLocker() -#endif -//------------------------------------------------------------------------ -// Array -//------------------------------------------------------------------------ - -Array::Array(XRef *xrefA) { - xref = xrefA; - elems = nullptr; - size = length = 0; - ref = 1; -#ifdef MULTITHREADED - gInitMutex(&mutex); -#endif -} - -Array::~Array() { - int i; - - for (i = 0; i < length; ++i) - elems[i].free(); - gfree(elems); -#ifdef MULTITHREADED - gDestroyMutex(&mutex); -#endif -} - -Object Array::copy(XRef *xrefA) const { - arrayLocker(); - Array *a = new Array(xrefA); - for (int i = 0; i < length; ++i) { - a->add(elems[i].copy()); - } - return Object(a); -} - -int Array::incRef() { - arrayLocker(); - ++ref; - return ref; -} - -int Array::decRef() { - arrayLocker(); - --ref; - return ref; -} - -void Array::add(Object &&elem) { - arrayLocker(); - if (length == size) { - if (length == 0) { - size = 8; - } else { - size *= 2; - } - elems = (Object *)greallocn(elems, size, sizeof(Object)); - } - elems[length].initNullAfterMalloc(); - elems[length] = std::move(elem); - ++length; -} - -void Array::remove(int i) { - arrayLocker(); - if (i < 0 || i >= length) { -#ifdef DEBUG_MEM - abort(); -#else - return; -#endif - } - --length; - memmove( static_cast<void*>(elems + i), elems + i + 1, sizeof(elems[0]) * (length - i) ); -} - -Object Array::get(int i, int recursion) const { - if (i < 0 || i >= length) { -#ifdef DEBUG_MEM - abort(); -#else - return Object(objNull); -#endif - } - return elems[i].fetch(xref, recursion); -} - -Object Array::getNF(int i) const { - if (i < 0 || i >= length) { -#ifdef DEBUG_MEM - abort(); -#else - return Object(objNull); -#endif - } - return elems[i].copy(); -} - -GBool Array::getString(int i, GooString *string) const -{ - Object obj = getNF(i); - if (obj.isString()) { - string->clear(); - string->append(obj.getString()); - return gTrue; - } else { - return gFalse; - } -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/Array.h b/Build/source/libs/poppler/poppler-src/poppler/Array.h deleted file mode 100644 index cd71c825537..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/Array.h +++ /dev/null @@ -1,91 +0,0 @@ -//======================================================================== -// -// Array.h -// -// Copyright 1996-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2005 Kristian Høgsberg <krh@redhat.com> -// Copyright (C) 2012 Fabio D'Urso <fabiodurso@hotmail.it> -// Copyright (C) 2013 Thomas Freitag <Thomas.Freitag@alfa.de> -// Copyright (C) 2017, 2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2017 Adrian Johnson <ajohnson@redneon.com> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef ARRAY_H -#define ARRAY_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "poppler-config.h" -#include "Object.h" -#include "goo/GooMutex.h" - -class XRef; - -//------------------------------------------------------------------------ -// Array -//------------------------------------------------------------------------ - -class Array { -public: - - // Constructor. - Array(XRef *xrefA); - - // Destructor. - ~Array(); - - Array(const Array &) = delete; - Array& operator=(const Array &) = delete; - - // Get number of elements. - int getLength() const { return length; } - - // Copy array with new xref - Object copy(XRef *xrefA) const; - - // Add an element - // elem becomes a dead object after this call - void add(Object &&elem); - - // Remove an element by position - void remove(int i); - - // Accessors. - Object get(int i, int resursion = 0) const; - Object getNF(int i) const; - GBool getString(int i, GooString *string) const; - -private: - friend class Object; // for incRef/decRef - - // Reference counting. - int incRef(); - int decRef(); - - XRef *xref; // the xref table for this PDF file - Object *elems; // array of elements - int size; // size of <elems> array - int length; // number of elements in array - int ref; // reference count -#ifdef MULTITHREADED - mutable GooMutex mutex; -#endif -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/BuiltinFont.cc b/Build/source/libs/poppler/poppler-src/poppler/BuiltinFont.cc deleted file mode 100644 index b6034752a23..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/BuiltinFont.cc +++ /dev/null @@ -1,65 +0,0 @@ -//======================================================================== -// -// BuiltinFont.cc -// -// Copyright 2001-2003 Glyph & Cog, LLC -// -//======================================================================== - -#include <config.h> - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include <stdlib.h> -#include <string.h> -#include "goo/gmem.h" -#include "FontEncodingTables.h" -#include "BuiltinFont.h" - -//------------------------------------------------------------------------ - -BuiltinFontWidths::BuiltinFontWidths(BuiltinFontWidth *widths, int sizeA) { - int i, h; - - size = sizeA; - tab = (BuiltinFontWidth **)gmallocn(size, sizeof(BuiltinFontWidth *)); - for (i = 0; i < size; ++i) { - tab[i] = nullptr; - } - for (i = 0; i < sizeA; ++i) { - h = hash(widths[i].name); - widths[i].next = tab[h]; - tab[h] = &widths[i]; - } -} - -BuiltinFontWidths::~BuiltinFontWidths() { - gfree(tab); -} - -GBool BuiltinFontWidths::getWidth(const char *name, Gushort *width) { - int h; - BuiltinFontWidth *p; - - h = hash(name); - for (p = tab[h]; p; p = p->next) { - if (!strcmp(p->name, name)) { - *width = p->width; - return gTrue; - } - } - return gFalse; -} - -int BuiltinFontWidths::hash(const char *name) { - const char *p; - unsigned int h; - - h = 0; - for (p = name; *p; ++p) { - h = 17 * h + (int)(*p & 0xff); - } - return (int)(h % size); -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/BuiltinFont.h b/Build/source/libs/poppler/poppler-src/poppler/BuiltinFont.h deleted file mode 100644 index 754e736669c..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/BuiltinFont.h +++ /dev/null @@ -1,73 +0,0 @@ -//======================================================================== -// -// BuiltinFont.h -// -// Copyright 2001-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2018 Albert Astals Cid <aacid@kde.org> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef BUILTINFONT_H -#define BUILTINFONT_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "goo/gtypes.h" - -struct BuiltinFont; -class BuiltinFontWidths; - -//------------------------------------------------------------------------ - -struct BuiltinFont { - const char *name; - const char **defaultBaseEnc; - short ascent; - short descent; - short bbox[4]; - BuiltinFontWidths *widths; -}; - -//------------------------------------------------------------------------ - -struct BuiltinFontWidth { - const char *name; - Gushort width; - BuiltinFontWidth *next; -}; - -class BuiltinFontWidths { -public: - - BuiltinFontWidths(BuiltinFontWidth *widths, int sizeA); - ~BuiltinFontWidths(); - - BuiltinFontWidths(const BuiltinFontWidths &) = delete; - BuiltinFontWidths& operator=(const BuiltinFontWidths &) = delete; - - GBool getWidth(const char *name, Gushort *width); - -private: - - int hash(const char *name); - - BuiltinFontWidth **tab; - int size; -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/BuiltinFontTables.cc b/Build/source/libs/poppler/poppler-src/poppler/BuiltinFontTables.cc deleted file mode 100644 index c1e636f6ee3..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/BuiltinFontTables.cc +++ /dev/null @@ -1,4284 +0,0 @@ -//======================================================================== -// -// BuiltinFontTables.cc -// -// Copyright 2001-2003 Glyph & Cog, LLC -// -//======================================================================== - -#include <config.h> -#include <stdlib.h> -#include "FontEncodingTables.h" -#include "BuiltinFontTables.h" - -static BuiltinFontWidth courierWidthsTab[] = { - { "Ntilde", 600, nullptr }, - { "rcaron", 600, nullptr }, - { "kcommaaccent", 600, nullptr }, - { "Ncommaaccent", 600, nullptr }, - { "Zacute", 600, nullptr }, - { "comma", 600, nullptr }, - { "cedilla", 600, nullptr }, - { "plusminus", 600, nullptr }, - { "circumflex", 600, nullptr }, - { "dotaccent", 600, nullptr }, - { "edotaccent", 600, nullptr }, - { "asciitilde", 600, nullptr }, - { "colon", 600, nullptr }, - { "onehalf", 600, nullptr }, - { "dollar", 600, nullptr }, - { "Lcaron", 600, nullptr }, - { "ntilde", 600, nullptr }, - { "Aogonek", 600, nullptr }, - { "ncommaaccent", 600, nullptr }, - { "minus", 600, nullptr }, - { "Iogonek", 600, nullptr }, - { "zacute", 600, nullptr }, - { "yen", 600, nullptr }, - { "space", 600, nullptr }, - { "Omacron", 600, nullptr }, - { "questiondown", 600, nullptr }, - { "emdash", 600, nullptr }, - { "Agrave", 600, nullptr }, - { "three", 600, nullptr }, - { "numbersign", 600, nullptr }, - { "lcaron", 600, nullptr }, - { "A", 600, nullptr }, - { "B", 600, nullptr }, - { "C", 600, nullptr }, - { "aogonek", 600, nullptr }, - { "D", 600, nullptr }, - { "E", 600, nullptr }, - { "onequarter", 600, nullptr }, - { "F", 600, nullptr }, - { "G", 600, nullptr }, - { "H", 600, nullptr }, - { "I", 600, nullptr }, - { "J", 600, nullptr }, - { "K", 600, nullptr }, - { "iogonek", 600, nullptr }, - { "L", 600, nullptr }, - { "backslash", 600, nullptr }, - { "periodcentered", 600, nullptr }, - { "M", 600, nullptr }, - { "N", 600, nullptr }, - { "omacron", 600, nullptr }, - { "Tcommaaccent", 600, nullptr }, - { "O", 600, nullptr }, - { "P", 600, nullptr }, - { "Q", 600, nullptr }, - { "Uhungarumlaut", 600, nullptr }, - { "R", 600, nullptr }, - { "Aacute", 600, nullptr }, - { "caron", 600, nullptr }, - { "S", 600, nullptr }, - { "T", 600, nullptr }, - { "U", 600, nullptr }, - { "agrave", 600, nullptr }, - { "V", 600, nullptr }, - { "W", 600, nullptr }, - { "equal", 600, nullptr }, - { "question", 600, nullptr }, - { "X", 600, nullptr }, - { "Y", 600, nullptr }, - { "Z", 600, nullptr }, - { "four", 600, nullptr }, - { "a", 600, nullptr }, - { "Gcommaaccent", 600, nullptr }, - { "b", 600, nullptr }, - { "c", 600, nullptr }, - { "d", 600, nullptr }, - { "e", 600, nullptr }, - { "f", 600, nullptr }, - { "g", 600, nullptr }, - { "bullet", 600, nullptr }, - { "h", 600, nullptr }, - { "i", 600, nullptr }, - { "Oslash", 600, nullptr }, - { "dagger", 600, nullptr }, - { "j", 600, nullptr }, - { "k", 600, nullptr }, - { "l", 600, nullptr }, - { "m", 600, nullptr }, - { "n", 600, nullptr }, - { "tcommaaccent", 600, nullptr }, - { "o", 600, nullptr }, - { "ordfeminine", 600, nullptr }, - { "ring", 600, nullptr }, - { "p", 600, nullptr }, - { "q", 600, nullptr }, - { "uhungarumlaut", 600, nullptr }, - { "r", 600, nullptr }, - { "twosuperior", 600, nullptr }, - { "aacute", 600, nullptr }, - { "s", 600, nullptr }, - { "OE", 600, nullptr }, - { "t", 600, nullptr }, - { "divide", 600, nullptr }, - { "u", 600, nullptr }, - { "Ccaron", 600, nullptr }, - { "v", 600, nullptr }, - { "w", 600, nullptr }, - { "x", 600, nullptr }, - { "y", 600, nullptr }, - { "z", 600, nullptr }, - { "Gbreve", 600, nullptr }, - { "commaaccent", 600, nullptr }, - { "hungarumlaut", 600, nullptr }, - { "Idotaccent", 600, nullptr }, - { "Nacute", 600, nullptr }, - { "quotedbl", 600, nullptr }, - { "gcommaaccent", 600, nullptr }, - { "mu", 600, nullptr }, - { "greaterequal", 600, nullptr }, - { "Scaron", 600, nullptr }, - { "Lslash", 600, nullptr }, - { "semicolon", 600, nullptr }, - { "oslash", 600, nullptr }, - { "lessequal", 600, nullptr }, - { "lozenge", 600, nullptr }, - { "parenright", 600, nullptr }, - { "ccaron", 600, nullptr }, - { "Ecircumflex", 600, nullptr }, - { "gbreve", 600, nullptr }, - { "trademark", 600, nullptr }, - { "daggerdbl", 600, nullptr }, - { "nacute", 600, nullptr }, - { "macron", 600, nullptr }, - { "Otilde", 600, nullptr }, - { "Emacron", 600, nullptr }, - { "ellipsis", 600, nullptr }, - { "scaron", 600, nullptr }, - { "AE", 600, nullptr }, - { "Ucircumflex", 600, nullptr }, - { "lslash", 600, nullptr }, - { "quotedblleft", 600, nullptr }, - { "hyphen", 600, nullptr }, - { "guilsinglright", 600, nullptr }, - { "quotesingle", 600, nullptr }, - { "eight", 600, nullptr }, - { "exclamdown", 600, nullptr }, - { "endash", 600, nullptr }, - { "oe", 600, nullptr }, - { "Abreve", 600, nullptr }, - { "Umacron", 600, nullptr }, - { "ecircumflex", 600, nullptr }, - { "Adieresis", 600, nullptr }, - { "copyright", 600, nullptr }, - { "Egrave", 600, nullptr }, - { "slash", 600, nullptr }, - { "Edieresis", 600, nullptr }, - { "otilde", 600, nullptr }, - { "Idieresis", 600, nullptr }, - { "parenleft", 600, nullptr }, - { "one", 600, nullptr }, - { "emacron", 600, nullptr }, - { "Odieresis", 600, nullptr }, - { "ucircumflex", 600, nullptr }, - { "bracketleft", 600, nullptr }, - { "Ugrave", 600, nullptr }, - { "quoteright", 600, nullptr }, - { "Udieresis", 600, nullptr }, - { "perthousand", 600, nullptr }, - { "Ydieresis", 600, nullptr }, - { "umacron", 600, nullptr }, - { "abreve", 600, nullptr }, - { "Eacute", 600, nullptr }, - { "adieresis", 600, nullptr }, - { "egrave", 600, nullptr }, - { "edieresis", 600, nullptr }, - { "idieresis", 600, nullptr }, - { "Eth", 600, nullptr }, - { "ae", 600, nullptr }, - { "asterisk", 600, nullptr }, - { "odieresis", 600, nullptr }, - { "Uacute", 600, nullptr }, - { "ugrave", 600, nullptr }, - { "five", 600, nullptr }, - { "nine", 600, nullptr }, - { "udieresis", 600, nullptr }, - { "Zcaron", 600, nullptr }, - { "Scommaaccent", 600, nullptr }, - { "threequarters", 600, nullptr }, - { "guillemotright", 600, nullptr }, - { "Ccedilla", 600, nullptr }, - { "ydieresis", 600, nullptr }, - { "tilde", 600, nullptr }, - { "at", 600, nullptr }, - { "eacute", 600, nullptr }, - { "underscore", 600, nullptr }, - { "Euro", 600, nullptr }, - { "Dcroat", 600, nullptr }, - { "zero", 600, nullptr }, - { "multiply", 600, nullptr }, - { "eth", 600, nullptr }, - { "Scedilla", 600, nullptr }, - { "Racute", 600, nullptr }, - { "Ograve", 600, nullptr }, - { "partialdiff", 600, nullptr }, - { "uacute", 600, nullptr }, - { "braceleft", 600, nullptr }, - { "Thorn", 600, nullptr }, - { "zcaron", 600, nullptr }, - { "scommaaccent", 600, nullptr }, - { "ccedilla", 600, nullptr }, - { "Dcaron", 600, nullptr }, - { "dcroat", 600, nullptr }, - { "scedilla", 600, nullptr }, - { "Oacute", 600, nullptr }, - { "Ocircumflex", 600, nullptr }, - { "ogonek", 600, nullptr }, - { "ograve", 600, nullptr }, - { "racute", 600, nullptr }, - { "Tcaron", 600, nullptr }, - { "Eogonek", 600, nullptr }, - { "thorn", 600, nullptr }, - { "degree", 600, nullptr }, - { "registered", 600, nullptr }, - { "radical", 600, nullptr }, - { "Aring", 600, nullptr }, - { "percent", 600, nullptr }, - { "six", 600, nullptr }, - { "paragraph", 600, nullptr }, - { "dcaron", 600, nullptr }, - { "Uogonek", 600, nullptr }, - { "two", 600, nullptr }, - { "summation", 600, nullptr }, - { "Igrave", 600, nullptr }, - { "Lacute", 600, nullptr }, - { "ocircumflex", 600, nullptr }, - { "oacute", 600, nullptr }, - { "Uring", 600, nullptr }, - { "Lcommaaccent", 600, nullptr }, - { "tcaron", 600, nullptr }, - { "eogonek", 600, nullptr }, - { "Delta", 600, nullptr }, - { "Ohungarumlaut", 600, nullptr }, - { "asciicircum", 600, nullptr }, - { "aring", 600, nullptr }, - { "grave", 600, nullptr }, - { "uogonek", 600, nullptr }, - { "bracketright", 600, nullptr }, - { "ampersand", 600, nullptr }, - { "Iacute", 600, nullptr }, - { "lacute", 600, nullptr }, - { "igrave", 600, nullptr }, - { "Ncaron", 600, nullptr }, - { "plus", 600, nullptr }, - { "uring", 600, nullptr }, - { "quotesinglbase", 600, nullptr }, - { "lcommaaccent", 600, nullptr }, - { "Yacute", 600, nullptr }, - { "ohungarumlaut", 600, nullptr }, - { "threesuperior", 600, nullptr }, - { "acute", 600, nullptr }, - { "section", 600, nullptr }, - { "dieresis", 600, nullptr }, - { "quotedblbase", 600, nullptr }, - { "iacute", 600, nullptr }, - { "ncaron", 600, nullptr }, - { "florin", 600, nullptr }, - { "yacute", 600, nullptr }, - { "Rcommaaccent", 600, nullptr }, - { "fi", 600, nullptr }, - { "fl", 600, nullptr }, - { "Acircumflex", 600, nullptr }, - { "Cacute", 600, nullptr }, - { "Icircumflex", 600, nullptr }, - { "guillemotleft", 600, nullptr }, - { "germandbls", 600, nullptr }, - { "seven", 600, nullptr }, - { "Amacron", 600, nullptr }, - { "Sacute", 600, nullptr }, - { "ordmasculine", 600, nullptr }, - { "dotlessi", 600, nullptr }, - { "sterling", 600, nullptr }, - { "notequal", 600, nullptr }, - { "Imacron", 600, nullptr }, - { "rcommaaccent", 600, nullptr }, - { "Zdotaccent", 600, nullptr }, - { "acircumflex", 600, nullptr }, - { "cacute", 600, nullptr }, - { "Ecaron", 600, nullptr }, - { "braceright", 600, nullptr }, - { "icircumflex", 600, nullptr }, - { "quotedblright", 600, nullptr }, - { "amacron", 600, nullptr }, - { "sacute", 600, nullptr }, - { "imacron", 600, nullptr }, - { "cent", 600, nullptr }, - { "currency", 600, nullptr }, - { "logicalnot", 600, nullptr }, - { "zdotaccent", 600, nullptr }, - { "Atilde", 600, nullptr }, - { "breve", 600, nullptr }, - { "bar", 600, nullptr }, - { "fraction", 600, nullptr }, - { "less", 600, nullptr }, - { "ecaron", 600, nullptr }, - { "guilsinglleft", 600, nullptr }, - { "exclam", 600, nullptr }, - { "period", 600, nullptr }, - { "Rcaron", 600, nullptr }, - { "Kcommaaccent", 600, nullptr }, - { "greater", 600, nullptr }, - { "atilde", 600, nullptr }, - { "brokenbar", 600, nullptr }, - { "quoteleft", 600, nullptr }, - { "Edotaccent", 600, nullptr }, - { "onesuperior", 600, nullptr } -}; - -static BuiltinFontWidth courierBoldWidthsTab[] = { - { "Ntilde", 600, nullptr }, - { "rcaron", 600, nullptr }, - { "kcommaaccent", 600, nullptr }, - { "Ncommaaccent", 600, nullptr }, - { "Zacute", 600, nullptr }, - { "comma", 600, nullptr }, - { "cedilla", 600, nullptr }, - { "plusminus", 600, nullptr }, - { "circumflex", 600, nullptr }, - { "dotaccent", 600, nullptr }, - { "edotaccent", 600, nullptr }, - { "asciitilde", 600, nullptr }, - { "colon", 600, nullptr }, - { "onehalf", 600, nullptr }, - { "dollar", 600, nullptr }, - { "Lcaron", 600, nullptr }, - { "ntilde", 600, nullptr }, - { "Aogonek", 600, nullptr }, - { "ncommaaccent", 600, nullptr }, - { "minus", 600, nullptr }, - { "Iogonek", 600, nullptr }, - { "zacute", 600, nullptr }, - { "yen", 600, nullptr }, - { "space", 600, nullptr }, - { "Omacron", 600, nullptr }, - { "questiondown", 600, nullptr }, - { "emdash", 600, nullptr }, - { "Agrave", 600, nullptr }, - { "three", 600, nullptr }, - { "numbersign", 600, nullptr }, - { "lcaron", 600, nullptr }, - { "A", 600, nullptr }, - { "B", 600, nullptr }, - { "C", 600, nullptr }, - { "aogonek", 600, nullptr }, - { "D", 600, nullptr }, - { "E", 600, nullptr }, - { "onequarter", 600, nullptr }, - { "F", 600, nullptr }, - { "G", 600, nullptr }, - { "H", 600, nullptr }, - { "I", 600, nullptr }, - { "J", 600, nullptr }, - { "K", 600, nullptr }, - { "iogonek", 600, nullptr }, - { "backslash", 600, nullptr }, - { "L", 600, nullptr }, - { "periodcentered", 600, nullptr }, - { "M", 600, nullptr }, - { "N", 600, nullptr }, - { "omacron", 600, nullptr }, - { "Tcommaaccent", 600, nullptr }, - { "O", 600, nullptr }, - { "P", 600, nullptr }, - { "Q", 600, nullptr }, - { "Uhungarumlaut", 600, nullptr }, - { "R", 600, nullptr }, - { "Aacute", 600, nullptr }, - { "caron", 600, nullptr }, - { "S", 600, nullptr }, - { "T", 600, nullptr }, - { "U", 600, nullptr }, - { "agrave", 600, nullptr }, - { "V", 600, nullptr }, - { "W", 600, nullptr }, - { "X", 600, nullptr }, - { "question", 600, nullptr }, - { "equal", 600, nullptr }, - { "Y", 600, nullptr }, - { "Z", 600, nullptr }, - { "four", 600, nullptr }, - { "a", 600, nullptr }, - { "Gcommaaccent", 600, nullptr }, - { "b", 600, nullptr }, - { "c", 600, nullptr }, - { "d", 600, nullptr }, - { "e", 600, nullptr }, - { "f", 600, nullptr }, - { "g", 600, nullptr }, - { "bullet", 600, nullptr }, - { "h", 600, nullptr }, - { "i", 600, nullptr }, - { "Oslash", 600, nullptr }, - { "dagger", 600, nullptr }, - { "j", 600, nullptr }, - { "k", 600, nullptr }, - { "l", 600, nullptr }, - { "m", 600, nullptr }, - { "n", 600, nullptr }, - { "tcommaaccent", 600, nullptr }, - { "o", 600, nullptr }, - { "ordfeminine", 600, nullptr }, - { "ring", 600, nullptr }, - { "p", 600, nullptr }, - { "q", 600, nullptr }, - { "uhungarumlaut", 600, nullptr }, - { "r", 600, nullptr }, - { "twosuperior", 600, nullptr }, - { "aacute", 600, nullptr }, - { "s", 600, nullptr }, - { "OE", 600, nullptr }, - { "t", 600, nullptr }, - { "divide", 600, nullptr }, - { "u", 600, nullptr }, - { "Ccaron", 600, nullptr }, - { "v", 600, nullptr }, - { "w", 600, nullptr }, - { "x", 600, nullptr }, - { "y", 600, nullptr }, - { "z", 600, nullptr }, - { "Gbreve", 600, nullptr }, - { "commaaccent", 600, nullptr }, - { "hungarumlaut", 600, nullptr }, - { "Idotaccent", 600, nullptr }, - { "Nacute", 600, nullptr }, - { "quotedbl", 600, nullptr }, - { "gcommaaccent", 600, nullptr }, - { "mu", 600, nullptr }, - { "greaterequal", 600, nullptr }, - { "Scaron", 600, nullptr }, - { "Lslash", 600, nullptr }, - { "semicolon", 600, nullptr }, - { "oslash", 600, nullptr }, - { "lessequal", 600, nullptr }, - { "lozenge", 600, nullptr }, - { "parenright", 600, nullptr }, - { "ccaron", 600, nullptr }, - { "Ecircumflex", 600, nullptr }, - { "gbreve", 600, nullptr }, - { "trademark", 600, nullptr }, - { "daggerdbl", 600, nullptr }, - { "nacute", 600, nullptr }, - { "macron", 600, nullptr }, - { "Otilde", 600, nullptr }, - { "Emacron", 600, nullptr }, - { "ellipsis", 600, nullptr }, - { "scaron", 600, nullptr }, - { "AE", 600, nullptr }, - { "Ucircumflex", 600, nullptr }, - { "lslash", 600, nullptr }, - { "quotedblleft", 600, nullptr }, - { "guilsinglright", 600, nullptr }, - { "hyphen", 600, nullptr }, - { "quotesingle", 600, nullptr }, - { "eight", 600, nullptr }, - { "exclamdown", 600, nullptr }, - { "endash", 600, nullptr }, - { "oe", 600, nullptr }, - { "Abreve", 600, nullptr }, - { "Umacron", 600, nullptr }, - { "ecircumflex", 600, nullptr }, - { "Adieresis", 600, nullptr }, - { "copyright", 600, nullptr }, - { "Egrave", 600, nullptr }, - { "slash", 600, nullptr }, - { "Edieresis", 600, nullptr }, - { "otilde", 600, nullptr }, - { "Idieresis", 600, nullptr }, - { "parenleft", 600, nullptr }, - { "one", 600, nullptr }, - { "emacron", 600, nullptr }, - { "Odieresis", 600, nullptr }, - { "ucircumflex", 600, nullptr }, - { "bracketleft", 600, nullptr }, - { "Ugrave", 600, nullptr }, - { "quoteright", 600, nullptr }, - { "Udieresis", 600, nullptr }, - { "perthousand", 600, nullptr }, - { "Ydieresis", 600, nullptr }, - { "umacron", 600, nullptr }, - { "abreve", 600, nullptr }, - { "Eacute", 600, nullptr }, - { "adieresis", 600, nullptr }, - { "egrave", 600, nullptr }, - { "edieresis", 600, nullptr }, - { "idieresis", 600, nullptr }, - { "Eth", 600, nullptr }, - { "ae", 600, nullptr }, - { "asterisk", 600, nullptr }, - { "odieresis", 600, nullptr }, - { "Uacute", 600, nullptr }, - { "ugrave", 600, nullptr }, - { "nine", 600, nullptr }, - { "five", 600, nullptr }, - { "udieresis", 600, nullptr }, - { "Zcaron", 600, nullptr }, - { "Scommaaccent", 600, nullptr }, - { "threequarters", 600, nullptr }, - { "guillemotright", 600, nullptr }, - { "Ccedilla", 600, nullptr }, - { "ydieresis", 600, nullptr }, - { "tilde", 600, nullptr }, - { "at", 600, nullptr }, - { "eacute", 600, nullptr }, - { "underscore", 600, nullptr }, - { "Euro", 600, nullptr }, - { "Dcroat", 600, nullptr }, - { "multiply", 600, nullptr }, - { "zero", 600, nullptr }, - { "eth", 600, nullptr }, - { "Scedilla", 600, nullptr }, - { "Ograve", 600, nullptr }, - { "Racute", 600, nullptr }, - { "partialdiff", 600, nullptr }, - { "uacute", 600, nullptr }, - { "braceleft", 600, nullptr }, - { "Thorn", 600, nullptr }, - { "zcaron", 600, nullptr }, - { "scommaaccent", 600, nullptr }, - { "ccedilla", 600, nullptr }, - { "Dcaron", 600, nullptr }, - { "dcroat", 600, nullptr }, - { "Ocircumflex", 600, nullptr }, - { "Oacute", 600, nullptr }, - { "scedilla", 600, nullptr }, - { "ogonek", 600, nullptr }, - { "ograve", 600, nullptr }, - { "racute", 600, nullptr }, - { "Tcaron", 600, nullptr }, - { "Eogonek", 600, nullptr }, - { "thorn", 600, nullptr }, - { "degree", 600, nullptr }, - { "registered", 600, nullptr }, - { "radical", 600, nullptr }, - { "Aring", 600, nullptr }, - { "percent", 600, nullptr }, - { "six", 600, nullptr }, - { "paragraph", 600, nullptr }, - { "dcaron", 600, nullptr }, - { "Uogonek", 600, nullptr }, - { "two", 600, nullptr }, - { "summation", 600, nullptr }, - { "Igrave", 600, nullptr }, - { "Lacute", 600, nullptr }, - { "ocircumflex", 600, nullptr }, - { "oacute", 600, nullptr }, - { "Uring", 600, nullptr }, - { "Lcommaaccent", 600, nullptr }, - { "tcaron", 600, nullptr }, - { "eogonek", 600, nullptr }, - { "Delta", 600, nullptr }, - { "Ohungarumlaut", 600, nullptr }, - { "asciicircum", 600, nullptr }, - { "aring", 600, nullptr }, - { "grave", 600, nullptr }, - { "uogonek", 600, nullptr }, - { "bracketright", 600, nullptr }, - { "Iacute", 600, nullptr }, - { "ampersand", 600, nullptr }, - { "igrave", 600, nullptr }, - { "lacute", 600, nullptr }, - { "Ncaron", 600, nullptr }, - { "plus", 600, nullptr }, - { "uring", 600, nullptr }, - { "quotesinglbase", 600, nullptr }, - { "lcommaaccent", 600, nullptr }, - { "Yacute", 600, nullptr }, - { "ohungarumlaut", 600, nullptr }, - { "threesuperior", 600, nullptr }, - { "acute", 600, nullptr }, - { "section", 600, nullptr }, - { "dieresis", 600, nullptr }, - { "iacute", 600, nullptr }, - { "quotedblbase", 600, nullptr }, - { "ncaron", 600, nullptr }, - { "florin", 600, nullptr }, - { "yacute", 600, nullptr }, - { "Rcommaaccent", 600, nullptr }, - { "fi", 600, nullptr }, - { "fl", 600, nullptr }, - { "Acircumflex", 600, nullptr }, - { "Cacute", 600, nullptr }, - { "Icircumflex", 600, nullptr }, - { "guillemotleft", 600, nullptr }, - { "germandbls", 600, nullptr }, - { "Amacron", 600, nullptr }, - { "seven", 600, nullptr }, - { "Sacute", 600, nullptr }, - { "ordmasculine", 600, nullptr }, - { "dotlessi", 600, nullptr }, - { "sterling", 600, nullptr }, - { "notequal", 600, nullptr }, - { "Imacron", 600, nullptr }, - { "rcommaaccent", 600, nullptr }, - { "Zdotaccent", 600, nullptr }, - { "acircumflex", 600, nullptr }, - { "cacute", 600, nullptr }, - { "Ecaron", 600, nullptr }, - { "icircumflex", 600, nullptr }, - { "braceright", 600, nullptr }, - { "quotedblright", 600, nullptr }, - { "amacron", 600, nullptr }, - { "sacute", 600, nullptr }, - { "imacron", 600, nullptr }, - { "cent", 600, nullptr }, - { "currency", 600, nullptr }, - { "logicalnot", 600, nullptr }, - { "zdotaccent", 600, nullptr }, - { "Atilde", 600, nullptr }, - { "breve", 600, nullptr }, - { "bar", 600, nullptr }, - { "fraction", 600, nullptr }, - { "less", 600, nullptr }, - { "ecaron", 600, nullptr }, - { "guilsinglleft", 600, nullptr }, - { "exclam", 600, nullptr }, - { "period", 600, nullptr }, - { "Rcaron", 600, nullptr }, - { "Kcommaaccent", 600, nullptr }, - { "greater", 600, nullptr }, - { "atilde", 600, nullptr }, - { "brokenbar", 600, nullptr }, - { "quoteleft", 600, nullptr }, - { "Edotaccent", 600, nullptr }, - { "onesuperior", 600, nullptr } -}; - -static BuiltinFontWidth courierBoldObliqueWidthsTab[] = { - { "Ntilde", 600, nullptr }, - { "rcaron", 600, nullptr }, - { "kcommaaccent", 600, nullptr }, - { "Ncommaaccent", 600, nullptr }, - { "Zacute", 600, nullptr }, - { "comma", 600, nullptr }, - { "cedilla", 600, nullptr }, - { "plusminus", 600, nullptr }, - { "circumflex", 600, nullptr }, - { "dotaccent", 600, nullptr }, - { "edotaccent", 600, nullptr }, - { "asciitilde", 600, nullptr }, - { "colon", 600, nullptr }, - { "onehalf", 600, nullptr }, - { "dollar", 600, nullptr }, - { "Lcaron", 600, nullptr }, - { "ntilde", 600, nullptr }, - { "Aogonek", 600, nullptr }, - { "ncommaaccent", 600, nullptr }, - { "minus", 600, nullptr }, - { "Iogonek", 600, nullptr }, - { "zacute", 600, nullptr }, - { "yen", 600, nullptr }, - { "space", 600, nullptr }, - { "Omacron", 600, nullptr }, - { "questiondown", 600, nullptr }, - { "emdash", 600, nullptr }, - { "Agrave", 600, nullptr }, - { "three", 600, nullptr }, - { "numbersign", 600, nullptr }, - { "lcaron", 600, nullptr }, - { "A", 600, nullptr }, - { "B", 600, nullptr }, - { "C", 600, nullptr }, - { "aogonek", 600, nullptr }, - { "D", 600, nullptr }, - { "E", 600, nullptr }, - { "onequarter", 600, nullptr }, - { "F", 600, nullptr }, - { "G", 600, nullptr }, - { "H", 600, nullptr }, - { "I", 600, nullptr }, - { "J", 600, nullptr }, - { "K", 600, nullptr }, - { "iogonek", 600, nullptr }, - { "backslash", 600, nullptr }, - { "L", 600, nullptr }, - { "periodcentered", 600, nullptr }, - { "M", 600, nullptr }, - { "N", 600, nullptr }, - { "omacron", 600, nullptr }, - { "Tcommaaccent", 600, nullptr }, - { "O", 600, nullptr }, - { "P", 600, nullptr }, - { "Q", 600, nullptr }, - { "Uhungarumlaut", 600, nullptr }, - { "R", 600, nullptr }, - { "Aacute", 600, nullptr }, - { "caron", 600, nullptr }, - { "S", 600, nullptr }, - { "T", 600, nullptr }, - { "U", 600, nullptr }, - { "agrave", 600, nullptr }, - { "V", 600, nullptr }, - { "W", 600, nullptr }, - { "X", 600, nullptr }, - { "question", 600, nullptr }, - { "equal", 600, nullptr }, - { "Y", 600, nullptr }, - { "Z", 600, nullptr }, - { "four", 600, nullptr }, - { "a", 600, nullptr }, - { "Gcommaaccent", 600, nullptr }, - { "b", 600, nullptr }, - { "c", 600, nullptr }, - { "d", 600, nullptr }, - { "e", 600, nullptr }, - { "f", 600, nullptr }, - { "g", 600, nullptr }, - { "bullet", 600, nullptr }, - { "h", 600, nullptr }, - { "i", 600, nullptr }, - { "Oslash", 600, nullptr }, - { "dagger", 600, nullptr }, - { "j", 600, nullptr }, - { "k", 600, nullptr }, - { "l", 600, nullptr }, - { "m", 600, nullptr }, - { "n", 600, nullptr }, - { "tcommaaccent", 600, nullptr }, - { "o", 600, nullptr }, - { "ordfeminine", 600, nullptr }, - { "ring", 600, nullptr }, - { "p", 600, nullptr }, - { "q", 600, nullptr }, - { "uhungarumlaut", 600, nullptr }, - { "r", 600, nullptr }, - { "twosuperior", 600, nullptr }, - { "aacute", 600, nullptr }, - { "s", 600, nullptr }, - { "OE", 600, nullptr }, - { "t", 600, nullptr }, - { "divide", 600, nullptr }, - { "u", 600, nullptr }, - { "Ccaron", 600, nullptr }, - { "v", 600, nullptr }, - { "w", 600, nullptr }, - { "x", 600, nullptr }, - { "y", 600, nullptr }, - { "z", 600, nullptr }, - { "Gbreve", 600, nullptr }, - { "commaaccent", 600, nullptr }, - { "hungarumlaut", 600, nullptr }, - { "Idotaccent", 600, nullptr }, - { "Nacute", 600, nullptr }, - { "quotedbl", 600, nullptr }, - { "gcommaaccent", 600, nullptr }, - { "mu", 600, nullptr }, - { "greaterequal", 600, nullptr }, - { "Scaron", 600, nullptr }, - { "Lslash", 600, nullptr }, - { "semicolon", 600, nullptr }, - { "oslash", 600, nullptr }, - { "lessequal", 600, nullptr }, - { "lozenge", 600, nullptr }, - { "parenright", 600, nullptr }, - { "ccaron", 600, nullptr }, - { "Ecircumflex", 600, nullptr }, - { "gbreve", 600, nullptr }, - { "trademark", 600, nullptr }, - { "daggerdbl", 600, nullptr }, - { "nacute", 600, nullptr }, - { "macron", 600, nullptr }, - { "Otilde", 600, nullptr }, - { "Emacron", 600, nullptr }, - { "ellipsis", 600, nullptr }, - { "scaron", 600, nullptr }, - { "AE", 600, nullptr }, - { "Ucircumflex", 600, nullptr }, - { "lslash", 600, nullptr }, - { "quotedblleft", 600, nullptr }, - { "guilsinglright", 600, nullptr }, - { "hyphen", 600, nullptr }, - { "quotesingle", 600, nullptr }, - { "eight", 600, nullptr }, - { "exclamdown", 600, nullptr }, - { "endash", 600, nullptr }, - { "oe", 600, nullptr }, - { "Abreve", 600, nullptr }, - { "Umacron", 600, nullptr }, - { "ecircumflex", 600, nullptr }, - { "Adieresis", 600, nullptr }, - { "copyright", 600, nullptr }, - { "Egrave", 600, nullptr }, - { "slash", 600, nullptr }, - { "Edieresis", 600, nullptr }, - { "otilde", 600, nullptr }, - { "Idieresis", 600, nullptr }, - { "parenleft", 600, nullptr }, - { "one", 600, nullptr }, - { "emacron", 600, nullptr }, - { "Odieresis", 600, nullptr }, - { "ucircumflex", 600, nullptr }, - { "bracketleft", 600, nullptr }, - { "Ugrave", 600, nullptr }, - { "quoteright", 600, nullptr }, - { "Udieresis", 600, nullptr }, - { "perthousand", 600, nullptr }, - { "Ydieresis", 600, nullptr }, - { "umacron", 600, nullptr }, - { "abreve", 600, nullptr }, - { "Eacute", 600, nullptr }, - { "adieresis", 600, nullptr }, - { "egrave", 600, nullptr }, - { "edieresis", 600, nullptr }, - { "idieresis", 600, nullptr }, - { "Eth", 600, nullptr }, - { "ae", 600, nullptr }, - { "asterisk", 600, nullptr }, - { "odieresis", 600, nullptr }, - { "Uacute", 600, nullptr }, - { "ugrave", 600, nullptr }, - { "nine", 600, nullptr }, - { "five", 600, nullptr }, - { "udieresis", 600, nullptr }, - { "Zcaron", 600, nullptr }, - { "Scommaaccent", 600, nullptr }, - { "threequarters", 600, nullptr }, - { "guillemotright", 600, nullptr }, - { "Ccedilla", 600, nullptr }, - { "ydieresis", 600, nullptr }, - { "tilde", 600, nullptr }, - { "at", 600, nullptr }, - { "eacute", 600, nullptr }, - { "underscore", 600, nullptr }, - { "Euro", 600, nullptr }, - { "Dcroat", 600, nullptr }, - { "multiply", 600, nullptr }, - { "zero", 600, nullptr }, - { "eth", 600, nullptr }, - { "Scedilla", 600, nullptr }, - { "Ograve", 600, nullptr }, - { "Racute", 600, nullptr }, - { "partialdiff", 600, nullptr }, - { "uacute", 600, nullptr }, - { "braceleft", 600, nullptr }, - { "Thorn", 600, nullptr }, - { "zcaron", 600, nullptr }, - { "scommaaccent", 600, nullptr }, - { "ccedilla", 600, nullptr }, - { "Dcaron", 600, nullptr }, - { "dcroat", 600, nullptr }, - { "Ocircumflex", 600, nullptr }, - { "Oacute", 600, nullptr }, - { "scedilla", 600, nullptr }, - { "ogonek", 600, nullptr }, - { "ograve", 600, nullptr }, - { "racute", 600, nullptr }, - { "Tcaron", 600, nullptr }, - { "Eogonek", 600, nullptr }, - { "thorn", 600, nullptr }, - { "degree", 600, nullptr }, - { "registered", 600, nullptr }, - { "radical", 600, nullptr }, - { "Aring", 600, nullptr }, - { "percent", 600, nullptr }, - { "six", 600, nullptr }, - { "paragraph", 600, nullptr }, - { "dcaron", 600, nullptr }, - { "Uogonek", 600, nullptr }, - { "two", 600, nullptr }, - { "summation", 600, nullptr }, - { "Igrave", 600, nullptr }, - { "Lacute", 600, nullptr }, - { "ocircumflex", 600, nullptr }, - { "oacute", 600, nullptr }, - { "Uring", 600, nullptr }, - { "Lcommaaccent", 600, nullptr }, - { "tcaron", 600, nullptr }, - { "eogonek", 600, nullptr }, - { "Delta", 600, nullptr }, - { "Ohungarumlaut", 600, nullptr }, - { "asciicircum", 600, nullptr }, - { "aring", 600, nullptr }, - { "grave", 600, nullptr }, - { "uogonek", 600, nullptr }, - { "bracketright", 600, nullptr }, - { "Iacute", 600, nullptr }, - { "ampersand", 600, nullptr }, - { "igrave", 600, nullptr }, - { "lacute", 600, nullptr }, - { "Ncaron", 600, nullptr }, - { "plus", 600, nullptr }, - { "uring", 600, nullptr }, - { "quotesinglbase", 600, nullptr }, - { "lcommaaccent", 600, nullptr }, - { "Yacute", 600, nullptr }, - { "ohungarumlaut", 600, nullptr }, - { "threesuperior", 600, nullptr }, - { "acute", 600, nullptr }, - { "section", 600, nullptr }, - { "dieresis", 600, nullptr }, - { "iacute", 600, nullptr }, - { "quotedblbase", 600, nullptr }, - { "ncaron", 600, nullptr }, - { "florin", 600, nullptr }, - { "yacute", 600, nullptr }, - { "Rcommaaccent", 600, nullptr }, - { "fi", 600, nullptr }, - { "fl", 600, nullptr }, - { "Acircumflex", 600, nullptr }, - { "Cacute", 600, nullptr }, - { "Icircumflex", 600, nullptr }, - { "guillemotleft", 600, nullptr }, - { "germandbls", 600, nullptr }, - { "Amacron", 600, nullptr }, - { "seven", 600, nullptr }, - { "Sacute", 600, nullptr }, - { "ordmasculine", 600, nullptr }, - { "dotlessi", 600, nullptr }, - { "sterling", 600, nullptr }, - { "notequal", 600, nullptr }, - { "Imacron", 600, nullptr }, - { "rcommaaccent", 600, nullptr }, - { "Zdotaccent", 600, nullptr }, - { "acircumflex", 600, nullptr }, - { "cacute", 600, nullptr }, - { "Ecaron", 600, nullptr }, - { "icircumflex", 600, nullptr }, - { "braceright", 600, nullptr }, - { "quotedblright", 600, nullptr }, - { "amacron", 600, nullptr }, - { "sacute", 600, nullptr }, - { "imacron", 600, nullptr }, - { "cent", 600, nullptr }, - { "currency", 600, nullptr }, - { "logicalnot", 600, nullptr }, - { "zdotaccent", 600, nullptr }, - { "Atilde", 600, nullptr }, - { "breve", 600, nullptr }, - { "bar", 600, nullptr }, - { "fraction", 600, nullptr }, - { "less", 600, nullptr }, - { "ecaron", 600, nullptr }, - { "guilsinglleft", 600, nullptr }, - { "exclam", 600, nullptr }, - { "period", 600, nullptr }, - { "Rcaron", 600, nullptr }, - { "Kcommaaccent", 600, nullptr }, - { "greater", 600, nullptr }, - { "atilde", 600, nullptr }, - { "brokenbar", 600, nullptr }, - { "quoteleft", 600, nullptr }, - { "Edotaccent", 600, nullptr }, - { "onesuperior", 600, nullptr } -}; - -static BuiltinFontWidth courierObliqueWidthsTab[] = { - { "Ntilde", 600, nullptr }, - { "rcaron", 600, nullptr }, - { "kcommaaccent", 600, nullptr }, - { "Ncommaaccent", 600, nullptr }, - { "Zacute", 600, nullptr }, - { "comma", 600, nullptr }, - { "cedilla", 600, nullptr }, - { "plusminus", 600, nullptr }, - { "circumflex", 600, nullptr }, - { "dotaccent", 600, nullptr }, - { "edotaccent", 600, nullptr }, - { "asciitilde", 600, nullptr }, - { "colon", 600, nullptr }, - { "onehalf", 600, nullptr }, - { "dollar", 600, nullptr }, - { "Lcaron", 600, nullptr }, - { "ntilde", 600, nullptr }, - { "Aogonek", 600, nullptr }, - { "ncommaaccent", 600, nullptr }, - { "minus", 600, nullptr }, - { "Iogonek", 600, nullptr }, - { "zacute", 600, nullptr }, - { "yen", 600, nullptr }, - { "space", 600, nullptr }, - { "Omacron", 600, nullptr }, - { "questiondown", 600, nullptr }, - { "emdash", 600, nullptr }, - { "Agrave", 600, nullptr }, - { "three", 600, nullptr }, - { "numbersign", 600, nullptr }, - { "lcaron", 600, nullptr }, - { "A", 600, nullptr }, - { "B", 600, nullptr }, - { "C", 600, nullptr }, - { "aogonek", 600, nullptr }, - { "D", 600, nullptr }, - { "E", 600, nullptr }, - { "onequarter", 600, nullptr }, - { "F", 600, nullptr }, - { "G", 600, nullptr }, - { "H", 600, nullptr }, - { "I", 600, nullptr }, - { "J", 600, nullptr }, - { "K", 600, nullptr }, - { "iogonek", 600, nullptr }, - { "backslash", 600, nullptr }, - { "L", 600, nullptr }, - { "periodcentered", 600, nullptr }, - { "M", 600, nullptr }, - { "N", 600, nullptr }, - { "omacron", 600, nullptr }, - { "Tcommaaccent", 600, nullptr }, - { "O", 600, nullptr }, - { "P", 600, nullptr }, - { "Q", 600, nullptr }, - { "Uhungarumlaut", 600, nullptr }, - { "R", 600, nullptr }, - { "Aacute", 600, nullptr }, - { "caron", 600, nullptr }, - { "S", 600, nullptr }, - { "T", 600, nullptr }, - { "U", 600, nullptr }, - { "agrave", 600, nullptr }, - { "V", 600, nullptr }, - { "W", 600, nullptr }, - { "X", 600, nullptr }, - { "question", 600, nullptr }, - { "equal", 600, nullptr }, - { "Y", 600, nullptr }, - { "Z", 600, nullptr }, - { "four", 600, nullptr }, - { "a", 600, nullptr }, - { "Gcommaaccent", 600, nullptr }, - { "b", 600, nullptr }, - { "c", 600, nullptr }, - { "d", 600, nullptr }, - { "e", 600, nullptr }, - { "f", 600, nullptr }, - { "g", 600, nullptr }, - { "bullet", 600, nullptr }, - { "h", 600, nullptr }, - { "i", 600, nullptr }, - { "Oslash", 600, nullptr }, - { "dagger", 600, nullptr }, - { "j", 600, nullptr }, - { "k", 600, nullptr }, - { "l", 600, nullptr }, - { "m", 600, nullptr }, - { "n", 600, nullptr }, - { "tcommaaccent", 600, nullptr }, - { "o", 600, nullptr }, - { "ordfeminine", 600, nullptr }, - { "ring", 600, nullptr }, - { "p", 600, nullptr }, - { "q", 600, nullptr }, - { "uhungarumlaut", 600, nullptr }, - { "r", 600, nullptr }, - { "twosuperior", 600, nullptr }, - { "aacute", 600, nullptr }, - { "s", 600, nullptr }, - { "OE", 600, nullptr }, - { "t", 600, nullptr }, - { "divide", 600, nullptr }, - { "u", 600, nullptr }, - { "Ccaron", 600, nullptr }, - { "v", 600, nullptr }, - { "w", 600, nullptr }, - { "x", 600, nullptr }, - { "y", 600, nullptr }, - { "z", 600, nullptr }, - { "Gbreve", 600, nullptr }, - { "commaaccent", 600, nullptr }, - { "hungarumlaut", 600, nullptr }, - { "Idotaccent", 600, nullptr }, - { "Nacute", 600, nullptr }, - { "quotedbl", 600, nullptr }, - { "gcommaaccent", 600, nullptr }, - { "mu", 600, nullptr }, - { "greaterequal", 600, nullptr }, - { "Scaron", 600, nullptr }, - { "Lslash", 600, nullptr }, - { "semicolon", 600, nullptr }, - { "oslash", 600, nullptr }, - { "lessequal", 600, nullptr }, - { "lozenge", 600, nullptr }, - { "parenright", 600, nullptr }, - { "ccaron", 600, nullptr }, - { "Ecircumflex", 600, nullptr }, - { "gbreve", 600, nullptr }, - { "trademark", 600, nullptr }, - { "daggerdbl", 600, nullptr }, - { "nacute", 600, nullptr }, - { "macron", 600, nullptr }, - { "Otilde", 600, nullptr }, - { "Emacron", 600, nullptr }, - { "ellipsis", 600, nullptr }, - { "scaron", 600, nullptr }, - { "AE", 600, nullptr }, - { "Ucircumflex", 600, nullptr }, - { "lslash", 600, nullptr }, - { "quotedblleft", 600, nullptr }, - { "guilsinglright", 600, nullptr }, - { "hyphen", 600, nullptr }, - { "quotesingle", 600, nullptr }, - { "eight", 600, nullptr }, - { "exclamdown", 600, nullptr }, - { "endash", 600, nullptr }, - { "oe", 600, nullptr }, - { "Abreve", 600, nullptr }, - { "Umacron", 600, nullptr }, - { "ecircumflex", 600, nullptr }, - { "Adieresis", 600, nullptr }, - { "copyright", 600, nullptr }, - { "Egrave", 600, nullptr }, - { "slash", 600, nullptr }, - { "Edieresis", 600, nullptr }, - { "otilde", 600, nullptr }, - { "Idieresis", 600, nullptr }, - { "parenleft", 600, nullptr }, - { "one", 600, nullptr }, - { "emacron", 600, nullptr }, - { "Odieresis", 600, nullptr }, - { "ucircumflex", 600, nullptr }, - { "bracketleft", 600, nullptr }, - { "Ugrave", 600, nullptr }, - { "quoteright", 600, nullptr }, - { "Udieresis", 600, nullptr }, - { "perthousand", 600, nullptr }, - { "Ydieresis", 600, nullptr }, - { "umacron", 600, nullptr }, - { "abreve", 600, nullptr }, - { "Eacute", 600, nullptr }, - { "adieresis", 600, nullptr }, - { "egrave", 600, nullptr }, - { "edieresis", 600, nullptr }, - { "idieresis", 600, nullptr }, - { "Eth", 600, nullptr }, - { "ae", 600, nullptr }, - { "asterisk", 600, nullptr }, - { "odieresis", 600, nullptr }, - { "Uacute", 600, nullptr }, - { "ugrave", 600, nullptr }, - { "nine", 600, nullptr }, - { "five", 600, nullptr }, - { "udieresis", 600, nullptr }, - { "Zcaron", 600, nullptr }, - { "Scommaaccent", 600, nullptr }, - { "threequarters", 600, nullptr }, - { "guillemotright", 600, nullptr }, - { "Ccedilla", 600, nullptr }, - { "ydieresis", 600, nullptr }, - { "tilde", 600, nullptr }, - { "at", 600, nullptr }, - { "eacute", 600, nullptr }, - { "underscore", 600, nullptr }, - { "Euro", 600, nullptr }, - { "Dcroat", 600, nullptr }, - { "multiply", 600, nullptr }, - { "zero", 600, nullptr }, - { "eth", 600, nullptr }, - { "Scedilla", 600, nullptr }, - { "Ograve", 600, nullptr }, - { "Racute", 600, nullptr }, - { "partialdiff", 600, nullptr }, - { "uacute", 600, nullptr }, - { "braceleft", 600, nullptr }, - { "Thorn", 600, nullptr }, - { "zcaron", 600, nullptr }, - { "scommaaccent", 600, nullptr }, - { "ccedilla", 600, nullptr }, - { "Dcaron", 600, nullptr }, - { "dcroat", 600, nullptr }, - { "Ocircumflex", 600, nullptr }, - { "Oacute", 600, nullptr }, - { "scedilla", 600, nullptr }, - { "ogonek", 600, nullptr }, - { "ograve", 600, nullptr }, - { "racute", 600, nullptr }, - { "Tcaron", 600, nullptr }, - { "Eogonek", 600, nullptr }, - { "thorn", 600, nullptr }, - { "degree", 600, nullptr }, - { "registered", 600, nullptr }, - { "radical", 600, nullptr }, - { "Aring", 600, nullptr }, - { "percent", 600, nullptr }, - { "six", 600, nullptr }, - { "paragraph", 600, nullptr }, - { "dcaron", 600, nullptr }, - { "Uogonek", 600, nullptr }, - { "two", 600, nullptr }, - { "summation", 600, nullptr }, - { "Igrave", 600, nullptr }, - { "Lacute", 600, nullptr }, - { "ocircumflex", 600, nullptr }, - { "oacute", 600, nullptr }, - { "Uring", 600, nullptr }, - { "Lcommaaccent", 600, nullptr }, - { "tcaron", 600, nullptr }, - { "eogonek", 600, nullptr }, - { "Delta", 600, nullptr }, - { "Ohungarumlaut", 600, nullptr }, - { "asciicircum", 600, nullptr }, - { "aring", 600, nullptr }, - { "grave", 600, nullptr }, - { "uogonek", 600, nullptr }, - { "bracketright", 600, nullptr }, - { "Iacute", 600, nullptr }, - { "ampersand", 600, nullptr }, - { "igrave", 600, nullptr }, - { "lacute", 600, nullptr }, - { "Ncaron", 600, nullptr }, - { "plus", 600, nullptr }, - { "uring", 600, nullptr }, - { "quotesinglbase", 600, nullptr }, - { "lcommaaccent", 600, nullptr }, - { "Yacute", 600, nullptr }, - { "ohungarumlaut", 600, nullptr }, - { "threesuperior", 600, nullptr }, - { "acute", 600, nullptr }, - { "section", 600, nullptr }, - { "dieresis", 600, nullptr }, - { "iacute", 600, nullptr }, - { "quotedblbase", 600, nullptr }, - { "ncaron", 600, nullptr }, - { "florin", 600, nullptr }, - { "yacute", 600, nullptr }, - { "Rcommaaccent", 600, nullptr }, - { "fi", 600, nullptr }, - { "fl", 600, nullptr }, - { "Acircumflex", 600, nullptr }, - { "Cacute", 600, nullptr }, - { "Icircumflex", 600, nullptr }, - { "guillemotleft", 600, nullptr }, - { "germandbls", 600, nullptr }, - { "Amacron", 600, nullptr }, - { "seven", 600, nullptr }, - { "Sacute", 600, nullptr }, - { "ordmasculine", 600, nullptr }, - { "dotlessi", 600, nullptr }, - { "sterling", 600, nullptr }, - { "notequal", 600, nullptr }, - { "Imacron", 600, nullptr }, - { "rcommaaccent", 600, nullptr }, - { "Zdotaccent", 600, nullptr }, - { "acircumflex", 600, nullptr }, - { "cacute", 600, nullptr }, - { "Ecaron", 600, nullptr }, - { "icircumflex", 600, nullptr }, - { "braceright", 600, nullptr }, - { "quotedblright", 600, nullptr }, - { "amacron", 600, nullptr }, - { "sacute", 600, nullptr }, - { "imacron", 600, nullptr }, - { "cent", 600, nullptr }, - { "currency", 600, nullptr }, - { "logicalnot", 600, nullptr }, - { "zdotaccent", 600, nullptr }, - { "Atilde", 600, nullptr }, - { "breve", 600, nullptr }, - { "bar", 600, nullptr }, - { "fraction", 600, nullptr }, - { "less", 600, nullptr }, - { "ecaron", 600, nullptr }, - { "guilsinglleft", 600, nullptr }, - { "exclam", 600, nullptr }, - { "period", 600, nullptr }, - { "Rcaron", 600, nullptr }, - { "Kcommaaccent", 600, nullptr }, - { "greater", 600, nullptr }, - { "atilde", 600, nullptr }, - { "brokenbar", 600, nullptr }, - { "quoteleft", 600, nullptr }, - { "Edotaccent", 600, nullptr }, - { "onesuperior", 600, nullptr } -}; - -static BuiltinFontWidth helveticaWidthsTab[] = { - { "Ntilde", 722, nullptr }, - { "rcaron", 333, nullptr }, - { "kcommaaccent", 500, nullptr }, - { "Ncommaaccent", 722, nullptr }, - { "Zacute", 611, nullptr }, - { "comma", 278, nullptr }, - { "cedilla", 333, nullptr }, - { "plusminus", 584, nullptr }, - { "circumflex", 333, nullptr }, - { "dotaccent", 333, nullptr }, - { "edotaccent", 556, nullptr }, - { "asciitilde", 584, nullptr }, - { "colon", 278, nullptr }, - { "onehalf", 834, nullptr }, - { "dollar", 556, nullptr }, - { "Lcaron", 556, nullptr }, - { "ntilde", 556, nullptr }, - { "Aogonek", 667, nullptr }, - { "ncommaaccent", 556, nullptr }, - { "minus", 584, nullptr }, - { "Iogonek", 278, nullptr }, - { "zacute", 500, nullptr }, - { "yen", 556, nullptr }, - { "space", 278, nullptr }, - { "Omacron", 778, nullptr }, - { "questiondown", 611, nullptr }, - { "emdash", 1000, nullptr }, - { "Agrave", 667, nullptr }, - { "three", 556, nullptr }, - { "numbersign", 556, nullptr }, - { "lcaron", 299, nullptr }, - { "A", 667, nullptr }, - { "B", 667, nullptr }, - { "C", 722, nullptr }, - { "aogonek", 556, nullptr }, - { "D", 722, nullptr }, - { "E", 667, nullptr }, - { "onequarter", 834, nullptr }, - { "F", 611, nullptr }, - { "G", 778, nullptr }, - { "H", 722, nullptr }, - { "I", 278, nullptr }, - { "J", 500, nullptr }, - { "K", 667, nullptr }, - { "iogonek", 222, nullptr }, - { "backslash", 278, nullptr }, - { "L", 556, nullptr }, - { "periodcentered", 278, nullptr }, - { "M", 833, nullptr }, - { "N", 722, nullptr }, - { "omacron", 556, nullptr }, - { "Tcommaaccent", 611, nullptr }, - { "O", 778, nullptr }, - { "P", 667, nullptr }, - { "Q", 778, nullptr }, - { "Uhungarumlaut", 722, nullptr }, - { "R", 722, nullptr }, - { "Aacute", 667, nullptr }, - { "caron", 333, nullptr }, - { "S", 667, nullptr }, - { "T", 611, nullptr }, - { "U", 722, nullptr }, - { "agrave", 556, nullptr }, - { "V", 667, nullptr }, - { "W", 944, nullptr }, - { "X", 667, nullptr }, - { "question", 556, nullptr }, - { "equal", 584, nullptr }, - { "Y", 667, nullptr }, - { "Z", 611, nullptr }, - { "four", 556, nullptr }, - { "a", 556, nullptr }, - { "Gcommaaccent", 778, nullptr }, - { "b", 556, nullptr }, - { "c", 500, nullptr }, - { "d", 556, nullptr }, - { "e", 556, nullptr }, - { "f", 278, nullptr }, - { "g", 556, nullptr }, - { "bullet", 350, nullptr }, - { "h", 556, nullptr }, - { "i", 222, nullptr }, - { "Oslash", 778, nullptr }, - { "dagger", 556, nullptr }, - { "j", 222, nullptr }, - { "k", 500, nullptr }, - { "l", 222, nullptr }, - { "m", 833, nullptr }, - { "n", 556, nullptr }, - { "tcommaaccent", 278, nullptr }, - { "o", 556, nullptr }, - { "ordfeminine", 370, nullptr }, - { "ring", 333, nullptr }, - { "p", 556, nullptr }, - { "q", 556, nullptr }, - { "uhungarumlaut", 556, nullptr }, - { "r", 333, nullptr }, - { "twosuperior", 333, nullptr }, - { "aacute", 556, nullptr }, - { "s", 500, nullptr }, - { "OE", 1000, nullptr }, - { "t", 278, nullptr }, - { "divide", 584, nullptr }, - { "u", 556, nullptr }, - { "Ccaron", 722, nullptr }, - { "v", 500, nullptr }, - { "w", 722, nullptr }, - { "x", 500, nullptr }, - { "y", 500, nullptr }, - { "z", 500, nullptr }, - { "Gbreve", 778, nullptr }, - { "commaaccent", 250, nullptr }, - { "hungarumlaut", 333, nullptr }, - { "Idotaccent", 278, nullptr }, - { "Nacute", 722, nullptr }, - { "quotedbl", 355, nullptr }, - { "gcommaaccent", 556, nullptr }, - { "mu", 556, nullptr }, - { "greaterequal", 549, nullptr }, - { "Scaron", 667, nullptr }, - { "Lslash", 556, nullptr }, - { "semicolon", 278, nullptr }, - { "oslash", 611, nullptr }, - { "lessequal", 549, nullptr }, - { "lozenge", 471, nullptr }, - { "parenright", 333, nullptr }, - { "ccaron", 500, nullptr }, - { "Ecircumflex", 667, nullptr }, - { "gbreve", 556, nullptr }, - { "trademark", 1000, nullptr }, - { "daggerdbl", 556, nullptr }, - { "nacute", 556, nullptr }, - { "macron", 333, nullptr }, - { "Otilde", 778, nullptr }, - { "Emacron", 667, nullptr }, - { "ellipsis", 1000, nullptr }, - { "scaron", 500, nullptr }, - { "AE", 1000, nullptr }, - { "Ucircumflex", 722, nullptr }, - { "lslash", 222, nullptr }, - { "quotedblleft", 333, nullptr }, - { "guilsinglright", 333, nullptr }, - { "hyphen", 333, nullptr }, - { "quotesingle", 191, nullptr }, - { "eight", 556, nullptr }, - { "exclamdown", 333, nullptr }, - { "endash", 556, nullptr }, - { "oe", 944, nullptr }, - { "Abreve", 667, nullptr }, - { "Umacron", 722, nullptr }, - { "ecircumflex", 556, nullptr }, - { "Adieresis", 667, nullptr }, - { "copyright", 737, nullptr }, - { "Egrave", 667, nullptr }, - { "slash", 278, nullptr }, - { "Edieresis", 667, nullptr }, - { "otilde", 556, nullptr }, - { "Idieresis", 278, nullptr }, - { "parenleft", 333, nullptr }, - { "one", 556, nullptr }, - { "emacron", 556, nullptr }, - { "Odieresis", 778, nullptr }, - { "ucircumflex", 556, nullptr }, - { "bracketleft", 278, nullptr }, - { "Ugrave", 722, nullptr }, - { "quoteright", 222, nullptr }, - { "Udieresis", 722, nullptr }, - { "perthousand", 1000, nullptr }, - { "Ydieresis", 667, nullptr }, - { "umacron", 556, nullptr }, - { "abreve", 556, nullptr }, - { "Eacute", 667, nullptr }, - { "adieresis", 556, nullptr }, - { "egrave", 556, nullptr }, - { "edieresis", 556, nullptr }, - { "idieresis", 278, nullptr }, - { "Eth", 722, nullptr }, - { "ae", 889, nullptr }, - { "asterisk", 389, nullptr }, - { "odieresis", 556, nullptr }, - { "Uacute", 722, nullptr }, - { "ugrave", 556, nullptr }, - { "nine", 556, nullptr }, - { "five", 556, nullptr }, - { "udieresis", 556, nullptr }, - { "Zcaron", 611, nullptr }, - { "Scommaaccent", 667, nullptr }, - { "threequarters", 834, nullptr }, - { "guillemotright", 556, nullptr }, - { "Ccedilla", 722, nullptr }, - { "ydieresis", 500, nullptr }, - { "tilde", 333, nullptr }, - { "at", 1015, nullptr }, - { "eacute", 556, nullptr }, - { "underscore", 556, nullptr }, - { "Euro", 556, nullptr }, - { "Dcroat", 722, nullptr }, - { "multiply", 584, nullptr }, - { "zero", 556, nullptr }, - { "eth", 556, nullptr }, - { "Scedilla", 667, nullptr }, - { "Ograve", 778, nullptr }, - { "Racute", 722, nullptr }, - { "partialdiff", 476, nullptr }, - { "uacute", 556, nullptr }, - { "braceleft", 334, nullptr }, - { "Thorn", 667, nullptr }, - { "zcaron", 500, nullptr }, - { "scommaaccent", 500, nullptr }, - { "ccedilla", 500, nullptr }, - { "Dcaron", 722, nullptr }, - { "dcroat", 556, nullptr }, - { "Ocircumflex", 778, nullptr }, - { "Oacute", 778, nullptr }, - { "scedilla", 500, nullptr }, - { "ogonek", 333, nullptr }, - { "ograve", 556, nullptr }, - { "racute", 333, nullptr }, - { "Tcaron", 611, nullptr }, - { "Eogonek", 667, nullptr }, - { "thorn", 556, nullptr }, - { "degree", 400, nullptr }, - { "registered", 737, nullptr }, - { "radical", 453, nullptr }, - { "Aring", 667, nullptr }, - { "percent", 889, nullptr }, - { "six", 556, nullptr }, - { "paragraph", 537, nullptr }, - { "dcaron", 643, nullptr }, - { "Uogonek", 722, nullptr }, - { "two", 556, nullptr }, - { "summation", 600, nullptr }, - { "Igrave", 278, nullptr }, - { "Lacute", 556, nullptr }, - { "ocircumflex", 556, nullptr }, - { "oacute", 556, nullptr }, - { "Uring", 722, nullptr }, - { "Lcommaaccent", 556, nullptr }, - { "tcaron", 317, nullptr }, - { "eogonek", 556, nullptr }, - { "Delta", 612, nullptr }, - { "Ohungarumlaut", 778, nullptr }, - { "asciicircum", 469, nullptr }, - { "aring", 556, nullptr }, - { "grave", 333, nullptr }, - { "uogonek", 556, nullptr }, - { "bracketright", 278, nullptr }, - { "Iacute", 278, nullptr }, - { "ampersand", 667, nullptr }, - { "igrave", 278, nullptr }, - { "lacute", 222, nullptr }, - { "Ncaron", 722, nullptr }, - { "plus", 584, nullptr }, - { "uring", 556, nullptr }, - { "quotesinglbase", 222, nullptr }, - { "lcommaaccent", 222, nullptr }, - { "Yacute", 667, nullptr }, - { "ohungarumlaut", 556, nullptr }, - { "threesuperior", 333, nullptr }, - { "acute", 333, nullptr }, - { "section", 556, nullptr }, - { "dieresis", 333, nullptr }, - { "iacute", 278, nullptr }, - { "quotedblbase", 333, nullptr }, - { "ncaron", 556, nullptr }, - { "florin", 556, nullptr }, - { "yacute", 500, nullptr }, - { "Rcommaaccent", 722, nullptr }, - { "fi", 500, nullptr }, - { "fl", 500, nullptr }, - { "Acircumflex", 667, nullptr }, - { "Cacute", 722, nullptr }, - { "Icircumflex", 278, nullptr }, - { "guillemotleft", 556, nullptr }, - { "germandbls", 611, nullptr }, - { "Amacron", 667, nullptr }, - { "seven", 556, nullptr }, - { "Sacute", 667, nullptr }, - { "ordmasculine", 365, nullptr }, - { "dotlessi", 278, nullptr }, - { "sterling", 556, nullptr }, - { "notequal", 549, nullptr }, - { "Imacron", 278, nullptr }, - { "rcommaaccent", 333, nullptr }, - { "Zdotaccent", 611, nullptr }, - { "acircumflex", 556, nullptr }, - { "cacute", 500, nullptr }, - { "Ecaron", 667, nullptr }, - { "icircumflex", 278, nullptr }, - { "braceright", 334, nullptr }, - { "quotedblright", 333, nullptr }, - { "amacron", 556, nullptr }, - { "sacute", 500, nullptr }, - { "imacron", 278, nullptr }, - { "cent", 556, nullptr }, - { "currency", 556, nullptr }, - { "logicalnot", 584, nullptr }, - { "zdotaccent", 500, nullptr }, - { "Atilde", 667, nullptr }, - { "breve", 333, nullptr }, - { "bar", 260, nullptr }, - { "fraction", 167, nullptr }, - { "less", 584, nullptr }, - { "ecaron", 556, nullptr }, - { "guilsinglleft", 333, nullptr }, - { "exclam", 278, nullptr }, - { "period", 278, nullptr }, - { "Rcaron", 722, nullptr }, - { "Kcommaaccent", 667, nullptr }, - { "greater", 584, nullptr }, - { "atilde", 556, nullptr }, - { "brokenbar", 260, nullptr }, - { "quoteleft", 222, nullptr }, - { "Edotaccent", 667, nullptr }, - { "onesuperior", 333, nullptr } -}; - -static BuiltinFontWidth helveticaBoldWidthsTab[] = { - { "Ntilde", 722, nullptr }, - { "rcaron", 389, nullptr }, - { "kcommaaccent", 556, nullptr }, - { "Ncommaaccent", 722, nullptr }, - { "Zacute", 611, nullptr }, - { "comma", 278, nullptr }, - { "cedilla", 333, nullptr }, - { "plusminus", 584, nullptr }, - { "circumflex", 333, nullptr }, - { "dotaccent", 333, nullptr }, - { "edotaccent", 556, nullptr }, - { "asciitilde", 584, nullptr }, - { "colon", 333, nullptr }, - { "onehalf", 834, nullptr }, - { "dollar", 556, nullptr }, - { "Lcaron", 611, nullptr }, - { "ntilde", 611, nullptr }, - { "Aogonek", 722, nullptr }, - { "ncommaaccent", 611, nullptr }, - { "minus", 584, nullptr }, - { "Iogonek", 278, nullptr }, - { "zacute", 500, nullptr }, - { "yen", 556, nullptr }, - { "space", 278, nullptr }, - { "Omacron", 778, nullptr }, - { "questiondown", 611, nullptr }, - { "emdash", 1000, nullptr }, - { "Agrave", 722, nullptr }, - { "three", 556, nullptr }, - { "numbersign", 556, nullptr }, - { "lcaron", 400, nullptr }, - { "A", 722, nullptr }, - { "B", 722, nullptr }, - { "C", 722, nullptr }, - { "aogonek", 556, nullptr }, - { "D", 722, nullptr }, - { "E", 667, nullptr }, - { "onequarter", 834, nullptr }, - { "F", 611, nullptr }, - { "G", 778, nullptr }, - { "H", 722, nullptr }, - { "I", 278, nullptr }, - { "J", 556, nullptr }, - { "K", 722, nullptr }, - { "iogonek", 278, nullptr }, - { "backslash", 278, nullptr }, - { "L", 611, nullptr }, - { "periodcentered", 278, nullptr }, - { "M", 833, nullptr }, - { "N", 722, nullptr }, - { "omacron", 611, nullptr }, - { "Tcommaaccent", 611, nullptr }, - { "O", 778, nullptr }, - { "P", 667, nullptr }, - { "Q", 778, nullptr }, - { "Uhungarumlaut", 722, nullptr }, - { "R", 722, nullptr }, - { "Aacute", 722, nullptr }, - { "caron", 333, nullptr }, - { "S", 667, nullptr }, - { "T", 611, nullptr }, - { "U", 722, nullptr }, - { "agrave", 556, nullptr }, - { "V", 667, nullptr }, - { "W", 944, nullptr }, - { "X", 667, nullptr }, - { "question", 611, nullptr }, - { "equal", 584, nullptr }, - { "Y", 667, nullptr }, - { "Z", 611, nullptr }, - { "four", 556, nullptr }, - { "a", 556, nullptr }, - { "Gcommaaccent", 778, nullptr }, - { "b", 611, nullptr }, - { "c", 556, nullptr }, - { "d", 611, nullptr }, - { "e", 556, nullptr }, - { "f", 333, nullptr }, - { "g", 611, nullptr }, - { "bullet", 350, nullptr }, - { "h", 611, nullptr }, - { "i", 278, nullptr }, - { "Oslash", 778, nullptr }, - { "dagger", 556, nullptr }, - { "j", 278, nullptr }, - { "k", 556, nullptr }, - { "l", 278, nullptr }, - { "m", 889, nullptr }, - { "n", 611, nullptr }, - { "tcommaaccent", 333, nullptr }, - { "o", 611, nullptr }, - { "ordfeminine", 370, nullptr }, - { "ring", 333, nullptr }, - { "p", 611, nullptr }, - { "q", 611, nullptr }, - { "uhungarumlaut", 611, nullptr }, - { "r", 389, nullptr }, - { "twosuperior", 333, nullptr }, - { "aacute", 556, nullptr }, - { "s", 556, nullptr }, - { "OE", 1000, nullptr }, - { "t", 333, nullptr }, - { "divide", 584, nullptr }, - { "u", 611, nullptr }, - { "Ccaron", 722, nullptr }, - { "v", 556, nullptr }, - { "w", 778, nullptr }, - { "x", 556, nullptr }, - { "y", 556, nullptr }, - { "z", 500, nullptr }, - { "Gbreve", 778, nullptr }, - { "commaaccent", 250, nullptr }, - { "hungarumlaut", 333, nullptr }, - { "Idotaccent", 278, nullptr }, - { "Nacute", 722, nullptr }, - { "quotedbl", 474, nullptr }, - { "gcommaaccent", 611, nullptr }, - { "mu", 611, nullptr }, - { "greaterequal", 549, nullptr }, - { "Scaron", 667, nullptr }, - { "Lslash", 611, nullptr }, - { "semicolon", 333, nullptr }, - { "oslash", 611, nullptr }, - { "lessequal", 549, nullptr }, - { "lozenge", 494, nullptr }, - { "parenright", 333, nullptr }, - { "ccaron", 556, nullptr }, - { "Ecircumflex", 667, nullptr }, - { "gbreve", 611, nullptr }, - { "trademark", 1000, nullptr }, - { "daggerdbl", 556, nullptr }, - { "nacute", 611, nullptr }, - { "macron", 333, nullptr }, - { "Otilde", 778, nullptr }, - { "Emacron", 667, nullptr }, - { "ellipsis", 1000, nullptr }, - { "scaron", 556, nullptr }, - { "AE", 1000, nullptr }, - { "Ucircumflex", 722, nullptr }, - { "lslash", 278, nullptr }, - { "quotedblleft", 500, nullptr }, - { "guilsinglright", 333, nullptr }, - { "hyphen", 333, nullptr }, - { "quotesingle", 238, nullptr }, - { "eight", 556, nullptr }, - { "exclamdown", 333, nullptr }, - { "endash", 556, nullptr }, - { "oe", 944, nullptr }, - { "Abreve", 722, nullptr }, - { "Umacron", 722, nullptr }, - { "ecircumflex", 556, nullptr }, - { "Adieresis", 722, nullptr }, - { "copyright", 737, nullptr }, - { "Egrave", 667, nullptr }, - { "slash", 278, nullptr }, - { "Edieresis", 667, nullptr }, - { "otilde", 611, nullptr }, - { "Idieresis", 278, nullptr }, - { "parenleft", 333, nullptr }, - { "one", 556, nullptr }, - { "emacron", 556, nullptr }, - { "Odieresis", 778, nullptr }, - { "ucircumflex", 611, nullptr }, - { "bracketleft", 333, nullptr }, - { "Ugrave", 722, nullptr }, - { "quoteright", 278, nullptr }, - { "Udieresis", 722, nullptr }, - { "perthousand", 1000, nullptr }, - { "Ydieresis", 667, nullptr }, - { "umacron", 611, nullptr }, - { "abreve", 556, nullptr }, - { "Eacute", 667, nullptr }, - { "adieresis", 556, nullptr }, - { "egrave", 556, nullptr }, - { "edieresis", 556, nullptr }, - { "idieresis", 278, nullptr }, - { "Eth", 722, nullptr }, - { "ae", 889, nullptr }, - { "asterisk", 389, nullptr }, - { "odieresis", 611, nullptr }, - { "Uacute", 722, nullptr }, - { "ugrave", 611, nullptr }, - { "nine", 556, nullptr }, - { "five", 556, nullptr }, - { "udieresis", 611, nullptr }, - { "Zcaron", 611, nullptr }, - { "Scommaaccent", 667, nullptr }, - { "threequarters", 834, nullptr }, - { "guillemotright", 556, nullptr }, - { "Ccedilla", 722, nullptr }, - { "ydieresis", 556, nullptr }, - { "tilde", 333, nullptr }, - { "dbldaggerumlaut", 556, nullptr }, - { "at", 975, nullptr }, - { "eacute", 556, nullptr }, - { "underscore", 556, nullptr }, - { "Euro", 556, nullptr }, - { "Dcroat", 722, nullptr }, - { "multiply", 584, nullptr }, - { "zero", 556, nullptr }, - { "eth", 611, nullptr }, - { "Scedilla", 667, nullptr }, - { "Ograve", 778, nullptr }, - { "Racute", 722, nullptr }, - { "partialdiff", 494, nullptr }, - { "uacute", 611, nullptr }, - { "braceleft", 389, nullptr }, - { "Thorn", 667, nullptr }, - { "zcaron", 500, nullptr }, - { "scommaaccent", 556, nullptr }, - { "ccedilla", 556, nullptr }, - { "Dcaron", 722, nullptr }, - { "dcroat", 611, nullptr }, - { "Ocircumflex", 778, nullptr }, - { "Oacute", 778, nullptr }, - { "scedilla", 556, nullptr }, - { "ogonek", 333, nullptr }, - { "ograve", 611, nullptr }, - { "racute", 389, nullptr }, - { "Tcaron", 611, nullptr }, - { "Eogonek", 667, nullptr }, - { "thorn", 611, nullptr }, - { "degree", 400, nullptr }, - { "registered", 737, nullptr }, - { "radical", 549, nullptr }, - { "Aring", 722, nullptr }, - { "percent", 889, nullptr }, - { "six", 556, nullptr }, - { "paragraph", 556, nullptr }, - { "dcaron", 743, nullptr }, - { "Uogonek", 722, nullptr }, - { "two", 556, nullptr }, - { "summation", 600, nullptr }, - { "Igrave", 278, nullptr }, - { "Lacute", 611, nullptr }, - { "ocircumflex", 611, nullptr }, - { "oacute", 611, nullptr }, - { "Uring", 722, nullptr }, - { "Lcommaaccent", 611, nullptr }, - { "tcaron", 389, nullptr }, - { "eogonek", 556, nullptr }, - { "Delta", 612, nullptr }, - { "Ohungarumlaut", 778, nullptr }, - { "asciicircum", 584, nullptr }, - { "aring", 556, nullptr }, - { "grave", 333, nullptr }, - { "uogonek", 611, nullptr }, - { "bracketright", 333, nullptr }, - { "Iacute", 278, nullptr }, - { "ampersand", 722, nullptr }, - { "igrave", 278, nullptr }, - { "lacute", 278, nullptr }, - { "Ncaron", 722, nullptr }, - { "plus", 584, nullptr }, - { "uring", 611, nullptr }, - { "quotesinglbase", 278, nullptr }, - { "lcommaaccent", 278, nullptr }, - { "Yacute", 667, nullptr }, - { "ohungarumlaut", 611, nullptr }, - { "threesuperior", 333, nullptr }, - { "acute", 333, nullptr }, - { "section", 556, nullptr }, - { "dieresis", 333, nullptr }, - { "iacute", 278, nullptr }, - { "quotedblbase", 500, nullptr }, - { "ncaron", 611, nullptr }, - { "florin", 556, nullptr }, - { "yacute", 556, nullptr }, - { "Rcommaaccent", 722, nullptr }, - { "fi", 611, nullptr }, - { "fl", 611, nullptr }, - { "Acircumflex", 722, nullptr }, - { "Cacute", 722, nullptr }, - { "Icircumflex", 278, nullptr }, - { "guillemotleft", 556, nullptr }, - { "germandbls", 611, nullptr }, - { "Amacron", 722, nullptr }, - { "seven", 556, nullptr }, - { "Sacute", 667, nullptr }, - { "ordmasculine", 365, nullptr }, - { "dotlessi", 278, nullptr }, - { "sterling", 556, nullptr }, - { "notequal", 549, nullptr }, - { "Imacron", 278, nullptr }, - { "rcommaaccent", 389, nullptr }, - { "Zdotaccent", 611, nullptr }, - { "acircumflex", 556, nullptr }, - { "cacute", 556, nullptr }, - { "Ecaron", 667, nullptr }, - { "icircumflex", 278, nullptr }, - { "braceright", 389, nullptr }, - { "quotedblright", 500, nullptr }, - { "amacron", 556, nullptr }, - { "sacute", 556, nullptr }, - { "imacron", 278, nullptr }, - { "cent", 556, nullptr }, - { "currency", 556, nullptr }, - { "logicalnot", 584, nullptr }, - { "zdotaccent", 500, nullptr }, - { "Atilde", 722, nullptr }, - { "breve", 333, nullptr }, - { "bar", 280, nullptr }, - { "fraction", 167, nullptr }, - { "less", 584, nullptr }, - { "ecaron", 556, nullptr }, - { "guilsinglleft", 333, nullptr }, - { "exclam", 333, nullptr }, - { "period", 278, nullptr }, - { "Rcaron", 722, nullptr }, - { "Kcommaaccent", 722, nullptr }, - { "greater", 584, nullptr }, - { "atilde", 556, nullptr }, - { "brokenbar", 280, nullptr }, - { "quoteleft", 278, nullptr }, - { "Edotaccent", 667, nullptr }, - { "onesuperior", 333, nullptr } -}; - -static BuiltinFontWidth helveticaBoldObliqueWidthsTab[] = { - { "Ntilde", 722, nullptr }, - { "rcaron", 389, nullptr }, - { "kcommaaccent", 556, nullptr }, - { "Ncommaaccent", 722, nullptr }, - { "Zacute", 611, nullptr }, - { "comma", 278, nullptr }, - { "cedilla", 333, nullptr }, - { "plusminus", 584, nullptr }, - { "circumflex", 333, nullptr }, - { "dotaccent", 333, nullptr }, - { "edotaccent", 556, nullptr }, - { "asciitilde", 584, nullptr }, - { "colon", 333, nullptr }, - { "onehalf", 834, nullptr }, - { "dollar", 556, nullptr }, - { "Lcaron", 611, nullptr }, - { "ntilde", 611, nullptr }, - { "Aogonek", 722, nullptr }, - { "ncommaaccent", 611, nullptr }, - { "minus", 584, nullptr }, - { "Iogonek", 278, nullptr }, - { "zacute", 500, nullptr }, - { "yen", 556, nullptr }, - { "space", 278, nullptr }, - { "Omacron", 778, nullptr }, - { "questiondown", 611, nullptr }, - { "emdash", 1000, nullptr }, - { "Agrave", 722, nullptr }, - { "three", 556, nullptr }, - { "numbersign", 556, nullptr }, - { "lcaron", 400, nullptr }, - { "A", 722, nullptr }, - { "B", 722, nullptr }, - { "C", 722, nullptr }, - { "aogonek", 556, nullptr }, - { "D", 722, nullptr }, - { "E", 667, nullptr }, - { "onequarter", 834, nullptr }, - { "F", 611, nullptr }, - { "G", 778, nullptr }, - { "H", 722, nullptr }, - { "I", 278, nullptr }, - { "J", 556, nullptr }, - { "K", 722, nullptr }, - { "iogonek", 278, nullptr }, - { "backslash", 278, nullptr }, - { "L", 611, nullptr }, - { "periodcentered", 278, nullptr }, - { "M", 833, nullptr }, - { "N", 722, nullptr }, - { "omacron", 611, nullptr }, - { "Tcommaaccent", 611, nullptr }, - { "O", 778, nullptr }, - { "P", 667, nullptr }, - { "Q", 778, nullptr }, - { "Uhungarumlaut", 722, nullptr }, - { "R", 722, nullptr }, - { "Aacute", 722, nullptr }, - { "caron", 333, nullptr }, - { "S", 667, nullptr }, - { "T", 611, nullptr }, - { "U", 722, nullptr }, - { "agrave", 556, nullptr }, - { "V", 667, nullptr }, - { "W", 944, nullptr }, - { "X", 667, nullptr }, - { "question", 611, nullptr }, - { "equal", 584, nullptr }, - { "Y", 667, nullptr }, - { "Z", 611, nullptr }, - { "four", 556, nullptr }, - { "a", 556, nullptr }, - { "Gcommaaccent", 778, nullptr }, - { "b", 611, nullptr }, - { "c", 556, nullptr }, - { "d", 611, nullptr }, - { "e", 556, nullptr }, - { "f", 333, nullptr }, - { "g", 611, nullptr }, - { "bullet", 350, nullptr }, - { "h", 611, nullptr }, - { "i", 278, nullptr }, - { "Oslash", 778, nullptr }, - { "dagger", 556, nullptr }, - { "j", 278, nullptr }, - { "k", 556, nullptr }, - { "l", 278, nullptr }, - { "m", 889, nullptr }, - { "n", 611, nullptr }, - { "tcommaaccent", 333, nullptr }, - { "o", 611, nullptr }, - { "ordfeminine", 370, nullptr }, - { "ring", 333, nullptr }, - { "p", 611, nullptr }, - { "q", 611, nullptr }, - { "uhungarumlaut", 611, nullptr }, - { "r", 389, nullptr }, - { "twosuperior", 333, nullptr }, - { "aacute", 556, nullptr }, - { "s", 556, nullptr }, - { "OE", 1000, nullptr }, - { "t", 333, nullptr }, - { "divide", 584, nullptr }, - { "u", 611, nullptr }, - { "Ccaron", 722, nullptr }, - { "v", 556, nullptr }, - { "w", 778, nullptr }, - { "x", 556, nullptr }, - { "y", 556, nullptr }, - { "z", 500, nullptr }, - { "Gbreve", 778, nullptr }, - { "commaaccent", 250, nullptr }, - { "hungarumlaut", 333, nullptr }, - { "Idotaccent", 278, nullptr }, - { "Nacute", 722, nullptr }, - { "quotedbl", 474, nullptr }, - { "gcommaaccent", 611, nullptr }, - { "mu", 611, nullptr }, - { "greaterequal", 549, nullptr }, - { "Scaron", 667, nullptr }, - { "Lslash", 611, nullptr }, - { "semicolon", 333, nullptr }, - { "oslash", 611, nullptr }, - { "lessequal", 549, nullptr }, - { "lozenge", 494, nullptr }, - { "parenright", 333, nullptr }, - { "ccaron", 556, nullptr }, - { "Ecircumflex", 667, nullptr }, - { "gbreve", 611, nullptr }, - { "trademark", 1000, nullptr }, - { "daggerdbl", 556, nullptr }, - { "nacute", 611, nullptr }, - { "macron", 333, nullptr }, - { "Otilde", 778, nullptr }, - { "Emacron", 667, nullptr }, - { "ellipsis", 1000, nullptr }, - { "scaron", 556, nullptr }, - { "AE", 1000, nullptr }, - { "Ucircumflex", 722, nullptr }, - { "lslash", 278, nullptr }, - { "quotedblleft", 500, nullptr }, - { "guilsinglright", 333, nullptr }, - { "hyphen", 333, nullptr }, - { "quotesingle", 238, nullptr }, - { "eight", 556, nullptr }, - { "exclamdown", 333, nullptr }, - { "endash", 556, nullptr }, - { "oe", 944, nullptr }, - { "Abreve", 722, nullptr }, - { "Umacron", 722, nullptr }, - { "ecircumflex", 556, nullptr }, - { "Adieresis", 722, nullptr }, - { "copyright", 737, nullptr }, - { "Egrave", 667, nullptr }, - { "slash", 278, nullptr }, - { "Edieresis", 667, nullptr }, - { "otilde", 611, nullptr }, - { "Idieresis", 278, nullptr }, - { "parenleft", 333, nullptr }, - { "one", 556, nullptr }, - { "emacron", 556, nullptr }, - { "Odieresis", 778, nullptr }, - { "ucircumflex", 611, nullptr }, - { "bracketleft", 333, nullptr }, - { "Ugrave", 722, nullptr }, - { "quoteright", 278, nullptr }, - { "Udieresis", 722, nullptr }, - { "perthousand", 1000, nullptr }, - { "Ydieresis", 667, nullptr }, - { "umacron", 611, nullptr }, - { "abreve", 556, nullptr }, - { "Eacute", 667, nullptr }, - { "adieresis", 556, nullptr }, - { "egrave", 556, nullptr }, - { "edieresis", 556, nullptr }, - { "idieresis", 278, nullptr }, - { "Eth", 722, nullptr }, - { "ae", 889, nullptr }, - { "asterisk", 389, nullptr }, - { "odieresis", 611, nullptr }, - { "Uacute", 722, nullptr }, - { "ugrave", 611, nullptr }, - { "nine", 556, nullptr }, - { "five", 556, nullptr }, - { "udieresis", 611, nullptr }, - { "Zcaron", 611, nullptr }, - { "Scommaaccent", 667, nullptr }, - { "threequarters", 834, nullptr }, - { "guillemotright", 556, nullptr }, - { "Ccedilla", 722, nullptr }, - { "ydieresis", 556, nullptr }, - { "tilde", 333, nullptr }, - { "at", 975, nullptr }, - { "eacute", 556, nullptr }, - { "underscore", 556, nullptr }, - { "Euro", 556, nullptr }, - { "Dcroat", 722, nullptr }, - { "multiply", 584, nullptr }, - { "zero", 556, nullptr }, - { "eth", 611, nullptr }, - { "Scedilla", 667, nullptr }, - { "Ograve", 778, nullptr }, - { "Racute", 722, nullptr }, - { "partialdiff", 494, nullptr }, - { "uacute", 611, nullptr }, - { "braceleft", 389, nullptr }, - { "Thorn", 667, nullptr }, - { "zcaron", 500, nullptr }, - { "scommaaccent", 556, nullptr }, - { "ccedilla", 556, nullptr }, - { "Dcaron", 722, nullptr }, - { "dcroat", 611, nullptr }, - { "Ocircumflex", 778, nullptr }, - { "Oacute", 778, nullptr }, - { "scedilla", 556, nullptr }, - { "ogonek", 333, nullptr }, - { "ograve", 611, nullptr }, - { "racute", 389, nullptr }, - { "Tcaron", 611, nullptr }, - { "Eogonek", 667, nullptr }, - { "thorn", 611, nullptr }, - { "degree", 400, nullptr }, - { "registered", 737, nullptr }, - { "radical", 549, nullptr }, - { "Aring", 722, nullptr }, - { "percent", 889, nullptr }, - { "six", 556, nullptr }, - { "paragraph", 556, nullptr }, - { "dcaron", 743, nullptr }, - { "Uogonek", 722, nullptr }, - { "two", 556, nullptr }, - { "summation", 600, nullptr }, - { "Igrave", 278, nullptr }, - { "Lacute", 611, nullptr }, - { "ocircumflex", 611, nullptr }, - { "oacute", 611, nullptr }, - { "Uring", 722, nullptr }, - { "Lcommaaccent", 611, nullptr }, - { "tcaron", 389, nullptr }, - { "eogonek", 556, nullptr }, - { "Delta", 612, nullptr }, - { "Ohungarumlaut", 778, nullptr }, - { "asciicircum", 584, nullptr }, - { "aring", 556, nullptr }, - { "grave", 333, nullptr }, - { "uogonek", 611, nullptr }, - { "bracketright", 333, nullptr }, - { "Iacute", 278, nullptr }, - { "ampersand", 722, nullptr }, - { "igrave", 278, nullptr }, - { "lacute", 278, nullptr }, - { "Ncaron", 722, nullptr }, - { "plus", 584, nullptr }, - { "uring", 611, nullptr }, - { "quotesinglbase", 278, nullptr }, - { "lcommaaccent", 278, nullptr }, - { "Yacute", 667, nullptr }, - { "ohungarumlaut", 611, nullptr }, - { "threesuperior", 333, nullptr }, - { "acute", 333, nullptr }, - { "section", 556, nullptr }, - { "dieresis", 333, nullptr }, - { "iacute", 278, nullptr }, - { "quotedblbase", 500, nullptr }, - { "ncaron", 611, nullptr }, - { "florin", 556, nullptr }, - { "yacute", 556, nullptr }, - { "Rcommaaccent", 722, nullptr }, - { "fi", 611, nullptr }, - { "fl", 611, nullptr }, - { "Acircumflex", 722, nullptr }, - { "Cacute", 722, nullptr }, - { "Icircumflex", 278, nullptr }, - { "guillemotleft", 556, nullptr }, - { "germandbls", 611, nullptr }, - { "Amacron", 722, nullptr }, - { "seven", 556, nullptr }, - { "Sacute", 667, nullptr }, - { "ordmasculine", 365, nullptr }, - { "dotlessi", 278, nullptr }, - { "sterling", 556, nullptr }, - { "notequal", 549, nullptr }, - { "Imacron", 278, nullptr }, - { "rcommaaccent", 389, nullptr }, - { "Zdotaccent", 611, nullptr }, - { "acircumflex", 556, nullptr }, - { "cacute", 556, nullptr }, - { "Ecaron", 667, nullptr }, - { "icircumflex", 278, nullptr }, - { "braceright", 389, nullptr }, - { "quotedblright", 500, nullptr }, - { "amacron", 556, nullptr }, - { "sacute", 556, nullptr }, - { "imacron", 278, nullptr }, - { "cent", 556, nullptr }, - { "currency", 556, nullptr }, - { "logicalnot", 584, nullptr }, - { "zdotaccent", 500, nullptr }, - { "Atilde", 722, nullptr }, - { "breve", 333, nullptr }, - { "bar", 280, nullptr }, - { "fraction", 167, nullptr }, - { "less", 584, nullptr }, - { "ecaron", 556, nullptr }, - { "guilsinglleft", 333, nullptr }, - { "exclam", 333, nullptr }, - { "period", 278, nullptr }, - { "Rcaron", 722, nullptr }, - { "Kcommaaccent", 722, nullptr }, - { "greater", 584, nullptr }, - { "atilde", 556, nullptr }, - { "brokenbar", 280, nullptr }, - { "quoteleft", 278, nullptr }, - { "Edotaccent", 667, nullptr }, - { "onesuperior", 333, nullptr } -}; - -static BuiltinFontWidth helveticaObliqueWidthsTab[] = { - { "Ntilde", 722, nullptr }, - { "rcaron", 333, nullptr }, - { "kcommaaccent", 500, nullptr }, - { "Ncommaaccent", 722, nullptr }, - { "Zacute", 611, nullptr }, - { "comma", 278, nullptr }, - { "cedilla", 333, nullptr }, - { "plusminus", 584, nullptr }, - { "circumflex", 333, nullptr }, - { "dotaccent", 333, nullptr }, - { "edotaccent", 556, nullptr }, - { "asciitilde", 584, nullptr }, - { "colon", 278, nullptr }, - { "onehalf", 834, nullptr }, - { "dollar", 556, nullptr }, - { "Lcaron", 556, nullptr }, - { "ntilde", 556, nullptr }, - { "Aogonek", 667, nullptr }, - { "ncommaaccent", 556, nullptr }, - { "minus", 584, nullptr }, - { "Iogonek", 278, nullptr }, - { "zacute", 500, nullptr }, - { "yen", 556, nullptr }, - { "space", 278, nullptr }, - { "Omacron", 778, nullptr }, - { "questiondown", 611, nullptr }, - { "emdash", 1000, nullptr }, - { "Agrave", 667, nullptr }, - { "three", 556, nullptr }, - { "numbersign", 556, nullptr }, - { "lcaron", 299, nullptr }, - { "A", 667, nullptr }, - { "B", 667, nullptr }, - { "C", 722, nullptr }, - { "aogonek", 556, nullptr }, - { "D", 722, nullptr }, - { "E", 667, nullptr }, - { "onequarter", 834, nullptr }, - { "F", 611, nullptr }, - { "G", 778, nullptr }, - { "H", 722, nullptr }, - { "I", 278, nullptr }, - { "J", 500, nullptr }, - { "K", 667, nullptr }, - { "iogonek", 222, nullptr }, - { "backslash", 278, nullptr }, - { "L", 556, nullptr }, - { "periodcentered", 278, nullptr }, - { "M", 833, nullptr }, - { "N", 722, nullptr }, - { "omacron", 556, nullptr }, - { "Tcommaaccent", 611, nullptr }, - { "O", 778, nullptr }, - { "P", 667, nullptr }, - { "Q", 778, nullptr }, - { "Uhungarumlaut", 722, nullptr }, - { "R", 722, nullptr }, - { "Aacute", 667, nullptr }, - { "caron", 333, nullptr }, - { "S", 667, nullptr }, - { "T", 611, nullptr }, - { "U", 722, nullptr }, - { "agrave", 556, nullptr }, - { "V", 667, nullptr }, - { "W", 944, nullptr }, - { "X", 667, nullptr }, - { "question", 556, nullptr }, - { "equal", 584, nullptr }, - { "Y", 667, nullptr }, - { "Z", 611, nullptr }, - { "four", 556, nullptr }, - { "a", 556, nullptr }, - { "Gcommaaccent", 778, nullptr }, - { "b", 556, nullptr }, - { "c", 500, nullptr }, - { "d", 556, nullptr }, - { "e", 556, nullptr }, - { "f", 278, nullptr }, - { "g", 556, nullptr }, - { "bullet", 350, nullptr }, - { "h", 556, nullptr }, - { "i", 222, nullptr }, - { "Oslash", 778, nullptr }, - { "dagger", 556, nullptr }, - { "j", 222, nullptr }, - { "k", 500, nullptr }, - { "l", 222, nullptr }, - { "m", 833, nullptr }, - { "n", 556, nullptr }, - { "tcommaaccent", 278, nullptr }, - { "o", 556, nullptr }, - { "ordfeminine", 370, nullptr }, - { "ring", 333, nullptr }, - { "p", 556, nullptr }, - { "q", 556, nullptr }, - { "uhungarumlaut", 556, nullptr }, - { "r", 333, nullptr }, - { "twosuperior", 333, nullptr }, - { "aacute", 556, nullptr }, - { "s", 500, nullptr }, - { "OE", 1000, nullptr }, - { "t", 278, nullptr }, - { "divide", 584, nullptr }, - { "u", 556, nullptr }, - { "Ccaron", 722, nullptr }, - { "v", 500, nullptr }, - { "w", 722, nullptr }, - { "x", 500, nullptr }, - { "y", 500, nullptr }, - { "z", 500, nullptr }, - { "Gbreve", 778, nullptr }, - { "commaaccent", 250, nullptr }, - { "hungarumlaut", 333, nullptr }, - { "Idotaccent", 278, nullptr }, - { "Nacute", 722, nullptr }, - { "quotedbl", 355, nullptr }, - { "gcommaaccent", 556, nullptr }, - { "mu", 556, nullptr }, - { "greaterequal", 549, nullptr }, - { "Scaron", 667, nullptr }, - { "Lslash", 556, nullptr }, - { "semicolon", 278, nullptr }, - { "oslash", 611, nullptr }, - { "lessequal", 549, nullptr }, - { "lozenge", 471, nullptr }, - { "parenright", 333, nullptr }, - { "ccaron", 500, nullptr }, - { "Ecircumflex", 667, nullptr }, - { "gbreve", 556, nullptr }, - { "trademark", 1000, nullptr }, - { "daggerdbl", 556, nullptr }, - { "nacute", 556, nullptr }, - { "macron", 333, nullptr }, - { "Otilde", 778, nullptr }, - { "Emacron", 667, nullptr }, - { "ellipsis", 1000, nullptr }, - { "scaron", 500, nullptr }, - { "AE", 1000, nullptr }, - { "Ucircumflex", 722, nullptr }, - { "lslash", 222, nullptr }, - { "quotedblleft", 333, nullptr }, - { "guilsinglright", 333, nullptr }, - { "hyphen", 333, nullptr }, - { "quotesingle", 191, nullptr }, - { "eight", 556, nullptr }, - { "exclamdown", 333, nullptr }, - { "endash", 556, nullptr }, - { "oe", 944, nullptr }, - { "Abreve", 667, nullptr }, - { "Umacron", 722, nullptr }, - { "ecircumflex", 556, nullptr }, - { "Adieresis", 667, nullptr }, - { "copyright", 737, nullptr }, - { "Egrave", 667, nullptr }, - { "slash", 278, nullptr }, - { "Edieresis", 667, nullptr }, - { "otilde", 556, nullptr }, - { "Idieresis", 278, nullptr }, - { "parenleft", 333, nullptr }, - { "one", 556, nullptr }, - { "emacron", 556, nullptr }, - { "Odieresis", 778, nullptr }, - { "ucircumflex", 556, nullptr }, - { "bracketleft", 278, nullptr }, - { "Ugrave", 722, nullptr }, - { "quoteright", 222, nullptr }, - { "Udieresis", 722, nullptr }, - { "perthousand", 1000, nullptr }, - { "Ydieresis", 667, nullptr }, - { "umacron", 556, nullptr }, - { "abreve", 556, nullptr }, - { "Eacute", 667, nullptr }, - { "adieresis", 556, nullptr }, - { "egrave", 556, nullptr }, - { "edieresis", 556, nullptr }, - { "idieresis", 278, nullptr }, - { "Eth", 722, nullptr }, - { "ae", 889, nullptr }, - { "asterisk", 389, nullptr }, - { "odieresis", 556, nullptr }, - { "Uacute", 722, nullptr }, - { "ugrave", 556, nullptr }, - { "nine", 556, nullptr }, - { "five", 556, nullptr }, - { "udieresis", 556, nullptr }, - { "Zcaron", 611, nullptr }, - { "Scommaaccent", 667, nullptr }, - { "threequarters", 834, nullptr }, - { "guillemotright", 556, nullptr }, - { "Ccedilla", 722, nullptr }, - { "ydieresis", 500, nullptr }, - { "tilde", 333, nullptr }, - { "at", 1015, nullptr }, - { "eacute", 556, nullptr }, - { "underscore", 556, nullptr }, - { "Euro", 556, nullptr }, - { "Dcroat", 722, nullptr }, - { "multiply", 584, nullptr }, - { "zero", 556, nullptr }, - { "eth", 556, nullptr }, - { "Scedilla", 667, nullptr }, - { "Ograve", 778, nullptr }, - { "Racute", 722, nullptr }, - { "partialdiff", 476, nullptr }, - { "uacute", 556, nullptr }, - { "braceleft", 334, nullptr }, - { "Thorn", 667, nullptr }, - { "zcaron", 500, nullptr }, - { "scommaaccent", 500, nullptr }, - { "ccedilla", 500, nullptr }, - { "Dcaron", 722, nullptr }, - { "dcroat", 556, nullptr }, - { "Ocircumflex", 778, nullptr }, - { "Oacute", 778, nullptr }, - { "scedilla", 500, nullptr }, - { "ogonek", 333, nullptr }, - { "ograve", 556, nullptr }, - { "racute", 333, nullptr }, - { "Tcaron", 611, nullptr }, - { "Eogonek", 667, nullptr }, - { "thorn", 556, nullptr }, - { "degree", 400, nullptr }, - { "registered", 737, nullptr }, - { "radical", 453, nullptr }, - { "Aring", 667, nullptr }, - { "percent", 889, nullptr }, - { "six", 556, nullptr }, - { "paragraph", 537, nullptr }, - { "dcaron", 643, nullptr }, - { "Uogonek", 722, nullptr }, - { "two", 556, nullptr }, - { "summation", 600, nullptr }, - { "Igrave", 278, nullptr }, - { "Lacute", 556, nullptr }, - { "ocircumflex", 556, nullptr }, - { "oacute", 556, nullptr }, - { "Uring", 722, nullptr }, - { "Lcommaaccent", 556, nullptr }, - { "tcaron", 317, nullptr }, - { "eogonek", 556, nullptr }, - { "Delta", 612, nullptr }, - { "Ohungarumlaut", 778, nullptr }, - { "asciicircum", 469, nullptr }, - { "aring", 556, nullptr }, - { "grave", 333, nullptr }, - { "uogonek", 556, nullptr }, - { "bracketright", 278, nullptr }, - { "Iacute", 278, nullptr }, - { "ampersand", 667, nullptr }, - { "igrave", 278, nullptr }, - { "lacute", 222, nullptr }, - { "Ncaron", 722, nullptr }, - { "plus", 584, nullptr }, - { "uring", 556, nullptr }, - { "quotesinglbase", 222, nullptr }, - { "lcommaaccent", 222, nullptr }, - { "Yacute", 667, nullptr }, - { "ohungarumlaut", 556, nullptr }, - { "threesuperior", 333, nullptr }, - { "acute", 333, nullptr }, - { "section", 556, nullptr }, - { "dieresis", 333, nullptr }, - { "iacute", 278, nullptr }, - { "quotedblbase", 333, nullptr }, - { "ncaron", 556, nullptr }, - { "florin", 556, nullptr }, - { "yacute", 500, nullptr }, - { "Rcommaaccent", 722, nullptr }, - { "fi", 500, nullptr }, - { "fl", 500, nullptr }, - { "Acircumflex", 667, nullptr }, - { "Cacute", 722, nullptr }, - { "Icircumflex", 278, nullptr }, - { "guillemotleft", 556, nullptr }, - { "germandbls", 611, nullptr }, - { "Amacron", 667, nullptr }, - { "seven", 556, nullptr }, - { "Sacute", 667, nullptr }, - { "ordmasculine", 365, nullptr }, - { "dotlessi", 278, nullptr }, - { "sterling", 556, nullptr }, - { "notequal", 549, nullptr }, - { "Imacron", 278, nullptr }, - { "rcommaaccent", 333, nullptr }, - { "Zdotaccent", 611, nullptr }, - { "acircumflex", 556, nullptr }, - { "cacute", 500, nullptr }, - { "Ecaron", 667, nullptr }, - { "icircumflex", 278, nullptr }, - { "braceright", 334, nullptr }, - { "quotedblright", 333, nullptr }, - { "amacron", 556, nullptr }, - { "sacute", 500, nullptr }, - { "imacron", 278, nullptr }, - { "cent", 556, nullptr }, - { "currency", 556, nullptr }, - { "logicalnot", 584, nullptr }, - { "zdotaccent", 500, nullptr }, - { "Atilde", 667, nullptr }, - { "breve", 333, nullptr }, - { "bar", 260, nullptr }, - { "fraction", 167, nullptr }, - { "less", 584, nullptr }, - { "ecaron", 556, nullptr }, - { "guilsinglleft", 333, nullptr }, - { "exclam", 278, nullptr }, - { "period", 278, nullptr }, - { "Rcaron", 722, nullptr }, - { "Kcommaaccent", 667, nullptr }, - { "greater", 584, nullptr }, - { "atilde", 556, nullptr }, - { "brokenbar", 260, nullptr }, - { "quoteleft", 222, nullptr }, - { "Edotaccent", 667, nullptr }, - { "onesuperior", 333, nullptr } -}; - -static BuiltinFontWidth symbolWidthsTab[] = { - { "bracketleftex", 384, nullptr }, - { "alpha", 631, nullptr }, - { "union", 768, nullptr }, - { "infinity", 713, nullptr }, - { "comma", 250, nullptr }, - { "copyrightsans", 790, nullptr }, - { "plusminus", 549, nullptr }, - { "arrowup", 603, nullptr }, - { "apple", 790, nullptr }, - { "parenleftbt", 384, nullptr }, - { "notelement", 713, nullptr }, - { "colon", 278, nullptr }, - { "beta", 549, nullptr }, - { "braceleftbt", 494, nullptr }, - { "Lambda", 686, nullptr }, - { "Phi", 763, nullptr }, - { "minus", 549, nullptr }, - { "space", 250, nullptr }, - { "Sigma", 592, nullptr }, - { "approxequal", 549, nullptr }, - { "minute", 247, nullptr }, - { "circleplus", 768, nullptr }, - { "Omicron", 722, nullptr }, - { "three", 500, nullptr }, - { "numbersign", 500, nullptr }, - { "lambda", 549, nullptr }, - { "phi", 521, nullptr }, - { "aleph", 823, nullptr }, - { "Tau", 611, nullptr }, - { "spade", 753, nullptr }, - { "logicaland", 603, nullptr }, - { "sigma", 603, nullptr }, - { "propersuperset", 713, nullptr }, - { "omicron", 549, nullptr }, - { "question", 444, nullptr }, - { "equal", 549, nullptr }, - { "Epsilon", 611, nullptr }, - { "emptyset", 823, nullptr }, - { "diamond", 753, nullptr }, - { "four", 500, nullptr }, - { "Mu", 889, nullptr }, - { "parenlefttp", 384, nullptr }, - { "club", 753, nullptr }, - { "bullet", 460, nullptr }, - { "Omega", 768, nullptr }, - { "tau", 439, nullptr }, - { "Upsilon", 690, nullptr }, - { "bracelefttp", 494, nullptr }, - { "heart", 753, nullptr }, - { "divide", 549, nullptr }, - { "epsilon", 439, nullptr }, - { "logicalor", 603, nullptr }, - { "parenleftex", 384, nullptr }, - { "greaterequal", 549, nullptr }, - { "mu", 576, nullptr }, - { "Nu", 722, nullptr }, - { "therefore", 863, nullptr }, - { "notsubset", 713, nullptr }, - { "omega", 686, nullptr }, - { "semicolon", 278, nullptr }, - { "element", 713, nullptr }, - { "upsilon", 576, nullptr }, - { "existential", 549, nullptr }, - { "integralbt", 686, nullptr }, - { "lessequal", 549, nullptr }, - { "phi1", 603, nullptr }, - { "lozenge", 494, nullptr }, - { "trademarkserif", 890, nullptr }, - { "parenright", 333, nullptr }, - { "reflexsuperset", 713, nullptr }, - { "sigma1", 439, nullptr }, - { "nu", 521, nullptr }, - { "Gamma", 603, nullptr }, - { "angleright", 329, nullptr }, - { "ellipsis", 1000, nullptr }, - { "Rho", 556, nullptr }, - { "parenrightbt", 384, nullptr }, - { "radicalex", 500, nullptr }, - { "eight", 500, nullptr }, - { "angleleft", 329, nullptr }, - { "arrowdbldown", 603, nullptr }, - { "congruent", 549, nullptr }, - { "Theta", 741, nullptr }, - { "intersection", 768, nullptr }, - { "Pi", 768, nullptr }, - { "slash", 278, nullptr }, - { "registerserif", 790, nullptr }, - { "parenleft", 333, nullptr }, - { "one", 500, nullptr }, - { "gamma", 411, nullptr }, - { "bracketleft", 333, nullptr }, - { "rho", 549, nullptr }, - { "circlemultiply", 768, nullptr }, - { "Chi", 722, nullptr }, - { "theta", 521, nullptr }, - { "pi", 549, nullptr }, - { "integraltp", 686, nullptr }, - { "Eta", 722, nullptr }, - { "product", 823, nullptr }, - { "nine", 500, nullptr }, - { "five", 500, nullptr }, - { "propersubset", 713, nullptr }, - { "bracketrightbt", 384, nullptr }, - { "trademarksans", 786, nullptr }, - { "dotmath", 250, nullptr }, - { "integralex", 686, nullptr }, - { "chi", 549, nullptr }, - { "parenrighttp", 384, nullptr }, - { "eta", 603, nullptr }, - { "underscore", 500, nullptr }, - { "Euro", 750, nullptr }, - { "multiply", 549, nullptr }, - { "zero", 500, nullptr }, - { "partialdiff", 494, nullptr }, - { "angle", 768, nullptr }, - { "arrowdblleft", 987, nullptr }, - { "braceleft", 480, nullptr }, - { "parenrightex", 384, nullptr }, - { "Rfraktur", 795, nullptr }, - { "Zeta", 611, nullptr }, - { "braceex", 494, nullptr }, - { "arrowdblup", 603, nullptr }, - { "arrowdown", 603, nullptr }, - { "Ifraktur", 686, nullptr }, - { "degree", 400, nullptr }, - { "Iota", 333, nullptr }, - { "perpendicular", 658, nullptr }, - { "radical", 549, nullptr }, - { "asteriskmath", 500, nullptr }, - { "percent", 833, nullptr }, - { "zeta", 494, nullptr }, - { "six", 500, nullptr }, - { "two", 500, nullptr }, - { "weierstrass", 987, nullptr }, - { "summation", 713, nullptr }, - { "bracketrighttp", 384, nullptr }, - { "carriagereturn", 658, nullptr }, - { "suchthat", 439, nullptr }, - { "arrowvertex", 603, nullptr }, - { "Delta", 612, nullptr }, - { "iota", 329, nullptr }, - { "arrowhorizex", 1000, nullptr }, - { "bracketrightex", 384, nullptr }, - { "bracketright", 333, nullptr }, - { "ampersand", 778, nullptr }, - { "plus", 549, nullptr }, - { "proportional", 713, nullptr }, - { "delta", 494, nullptr }, - { "copyrightserif", 790, nullptr }, - { "bracerightmid", 494, nullptr }, - { "arrowleft", 987, nullptr }, - { "second", 411, nullptr }, - { "arrowdblboth", 1042, nullptr }, - { "florin", 500, nullptr }, - { "Psi", 795, nullptr }, - { "bracerightbt", 494, nullptr }, - { "bracketleftbt", 384, nullptr }, - { "seven", 500, nullptr }, - { "braceleftmid", 494, nullptr }, - { "notequal", 549, nullptr }, - { "psi", 686, nullptr }, - { "equivalence", 549, nullptr }, - { "universal", 713, nullptr }, - { "arrowdblright", 987, nullptr }, - { "braceright", 480, nullptr }, - { "reflexsubset", 713, nullptr }, - { "Xi", 645, nullptr }, - { "theta1", 631, nullptr }, - { "logicalnot", 713, nullptr }, - { "Kappa", 722, nullptr }, - { "similar", 549, nullptr }, - { "bar", 200, nullptr }, - { "fraction", 167, nullptr }, - { "less", 549, nullptr }, - { "registersans", 790, nullptr }, - { "omega1", 713, nullptr }, - { "exclam", 333, nullptr }, - { "Upsilon1", 620, nullptr }, - { "bracerighttp", 494, nullptr }, - { "xi", 493, nullptr }, - { "period", 250, nullptr }, - { "Alpha", 722, nullptr }, - { "arrowright", 987, nullptr }, - { "greater", 549, nullptr }, - { "bracketlefttp", 384, nullptr }, - { "kappa", 549, nullptr }, - { "gradient", 713, nullptr }, - { "integral", 274, nullptr }, - { "arrowboth", 1042, nullptr }, - { "Beta", 667, nullptr } -}; - -static BuiltinFontWidth timesBoldWidthsTab[] = { - { "Ntilde", 722, nullptr }, - { "rcaron", 444, nullptr }, - { "kcommaaccent", 556, nullptr }, - { "Ncommaaccent", 722, nullptr }, - { "Zacute", 667, nullptr }, - { "comma", 250, nullptr }, - { "cedilla", 333, nullptr }, - { "plusminus", 570, nullptr }, - { "circumflex", 333, nullptr }, - { "dotaccent", 333, nullptr }, - { "edotaccent", 444, nullptr }, - { "asciitilde", 520, nullptr }, - { "colon", 333, nullptr }, - { "onehalf", 750, nullptr }, - { "dollar", 500, nullptr }, - { "Lcaron", 667, nullptr }, - { "ntilde", 556, nullptr }, - { "Aogonek", 722, nullptr }, - { "ncommaaccent", 556, nullptr }, - { "minus", 570, nullptr }, - { "Iogonek", 389, nullptr }, - { "zacute", 444, nullptr }, - { "yen", 500, nullptr }, - { "space", 250, nullptr }, - { "Omacron", 778, nullptr }, - { "questiondown", 500, nullptr }, - { "emdash", 1000, nullptr }, - { "Agrave", 722, nullptr }, - { "three", 500, nullptr }, - { "numbersign", 500, nullptr }, - { "lcaron", 394, nullptr }, - { "A", 722, nullptr }, - { "B", 667, nullptr }, - { "C", 722, nullptr }, - { "aogonek", 500, nullptr }, - { "D", 722, nullptr }, - { "E", 667, nullptr }, - { "onequarter", 750, nullptr }, - { "F", 611, nullptr }, - { "G", 778, nullptr }, - { "H", 778, nullptr }, - { "I", 389, nullptr }, - { "J", 500, nullptr }, - { "K", 778, nullptr }, - { "iogonek", 278, nullptr }, - { "backslash", 278, nullptr }, - { "L", 667, nullptr }, - { "periodcentered", 250, nullptr }, - { "M", 944, nullptr }, - { "N", 722, nullptr }, - { "omacron", 500, nullptr }, - { "Tcommaaccent", 667, nullptr }, - { "O", 778, nullptr }, - { "P", 611, nullptr }, - { "Q", 778, nullptr }, - { "Uhungarumlaut", 722, nullptr }, - { "R", 722, nullptr }, - { "Aacute", 722, nullptr }, - { "caron", 333, nullptr }, - { "S", 556, nullptr }, - { "T", 667, nullptr }, - { "U", 722, nullptr }, - { "agrave", 500, nullptr }, - { "V", 722, nullptr }, - { "W", 1000, nullptr }, - { "X", 722, nullptr }, - { "question", 500, nullptr }, - { "equal", 570, nullptr }, - { "Y", 722, nullptr }, - { "Z", 667, nullptr }, - { "four", 500, nullptr }, - { "a", 500, nullptr }, - { "Gcommaaccent", 778, nullptr }, - { "b", 556, nullptr }, - { "c", 444, nullptr }, - { "d", 556, nullptr }, - { "e", 444, nullptr }, - { "f", 333, nullptr }, - { "g", 500, nullptr }, - { "bullet", 350, nullptr }, - { "h", 556, nullptr }, - { "i", 278, nullptr }, - { "Oslash", 778, nullptr }, - { "dagger", 500, nullptr }, - { "j", 333, nullptr }, - { "k", 556, nullptr }, - { "l", 278, nullptr }, - { "m", 833, nullptr }, - { "n", 556, nullptr }, - { "tcommaaccent", 333, nullptr }, - { "o", 500, nullptr }, - { "ordfeminine", 300, nullptr }, - { "ring", 333, nullptr }, - { "p", 556, nullptr }, - { "q", 556, nullptr }, - { "uhungarumlaut", 556, nullptr }, - { "r", 444, nullptr }, - { "twosuperior", 300, nullptr }, - { "aacute", 500, nullptr }, - { "s", 389, nullptr }, - { "OE", 1000, nullptr }, - { "t", 333, nullptr }, - { "divide", 570, nullptr }, - { "u", 556, nullptr }, - { "Ccaron", 722, nullptr }, - { "v", 500, nullptr }, - { "w", 722, nullptr }, - { "x", 500, nullptr }, - { "y", 500, nullptr }, - { "z", 444, nullptr }, - { "Gbreve", 778, nullptr }, - { "commaaccent", 250, nullptr }, - { "hungarumlaut", 333, nullptr }, - { "Idotaccent", 389, nullptr }, - { "Nacute", 722, nullptr }, - { "quotedbl", 555, nullptr }, - { "gcommaaccent", 500, nullptr }, - { "mu", 556, nullptr }, - { "greaterequal", 549, nullptr }, - { "Scaron", 556, nullptr }, - { "Lslash", 667, nullptr }, - { "semicolon", 333, nullptr }, - { "oslash", 500, nullptr }, - { "lessequal", 549, nullptr }, - { "lozenge", 494, nullptr }, - { "parenright", 333, nullptr }, - { "ccaron", 444, nullptr }, - { "Ecircumflex", 667, nullptr }, - { "gbreve", 500, nullptr }, - { "trademark", 1000, nullptr }, - { "daggerdbl", 500, nullptr }, - { "nacute", 556, nullptr }, - { "macron", 333, nullptr }, - { "Otilde", 778, nullptr }, - { "Emacron", 667, nullptr }, - { "ellipsis", 1000, nullptr }, - { "scaron", 389, nullptr }, - { "AE", 1000, nullptr }, - { "Ucircumflex", 722, nullptr }, - { "lslash", 278, nullptr }, - { "quotedblleft", 500, nullptr }, - { "guilsinglright", 333, nullptr }, - { "hyphen", 333, nullptr }, - { "quotesingle", 278, nullptr }, - { "eight", 500, nullptr }, - { "exclamdown", 333, nullptr }, - { "endash", 500, nullptr }, - { "oe", 722, nullptr }, - { "Abreve", 722, nullptr }, - { "Umacron", 722, nullptr }, - { "ecircumflex", 444, nullptr }, - { "Adieresis", 722, nullptr }, - { "copyright", 747, nullptr }, - { "Egrave", 667, nullptr }, - { "slash", 278, nullptr }, - { "Edieresis", 667, nullptr }, - { "otilde", 500, nullptr }, - { "Idieresis", 389, nullptr }, - { "parenleft", 333, nullptr }, - { "one", 500, nullptr }, - { "emacron", 444, nullptr }, - { "Odieresis", 778, nullptr }, - { "ucircumflex", 556, nullptr }, - { "bracketleft", 333, nullptr }, - { "Ugrave", 722, nullptr }, - { "quoteright", 333, nullptr }, - { "Udieresis", 722, nullptr }, - { "perthousand", 1000, nullptr }, - { "Ydieresis", 722, nullptr }, - { "umacron", 556, nullptr }, - { "abreve", 500, nullptr }, - { "Eacute", 667, nullptr }, - { "adieresis", 500, nullptr }, - { "egrave", 444, nullptr }, - { "edieresis", 444, nullptr }, - { "idieresis", 278, nullptr }, - { "Eth", 722, nullptr }, - { "ae", 722, nullptr }, - { "asterisk", 500, nullptr }, - { "odieresis", 500, nullptr }, - { "Uacute", 722, nullptr }, - { "ugrave", 556, nullptr }, - { "nine", 500, nullptr }, - { "five", 500, nullptr }, - { "udieresis", 556, nullptr }, - { "Zcaron", 667, nullptr }, - { "Scommaaccent", 556, nullptr }, - { "threequarters", 750, nullptr }, - { "guillemotright", 500, nullptr }, - { "Ccedilla", 722, nullptr }, - { "ydieresis", 500, nullptr }, - { "tilde", 333, nullptr }, - { "at", 930, nullptr }, - { "eacute", 444, nullptr }, - { "underscore", 500, nullptr }, - { "Euro", 500, nullptr }, - { "Dcroat", 722, nullptr }, - { "multiply", 570, nullptr }, - { "zero", 500, nullptr }, - { "eth", 500, nullptr }, - { "Scedilla", 556, nullptr }, - { "Ograve", 778, nullptr }, - { "Racute", 722, nullptr }, - { "partialdiff", 494, nullptr }, - { "uacute", 556, nullptr }, - { "braceleft", 394, nullptr }, - { "Thorn", 611, nullptr }, - { "zcaron", 444, nullptr }, - { "scommaaccent", 389, nullptr }, - { "ccedilla", 444, nullptr }, - { "Dcaron", 722, nullptr }, - { "dcroat", 556, nullptr }, - { "Ocircumflex", 778, nullptr }, - { "Oacute", 778, nullptr }, - { "scedilla", 389, nullptr }, - { "ogonek", 333, nullptr }, - { "ograve", 500, nullptr }, - { "racute", 444, nullptr }, - { "Tcaron", 667, nullptr }, - { "Eogonek", 667, nullptr }, - { "thorn", 556, nullptr }, - { "degree", 400, nullptr }, - { "registered", 747, nullptr }, - { "radical", 549, nullptr }, - { "Aring", 722, nullptr }, - { "percent", 1000, nullptr }, - { "six", 500, nullptr }, - { "paragraph", 540, nullptr }, - { "dcaron", 672, nullptr }, - { "Uogonek", 722, nullptr }, - { "two", 500, nullptr }, - { "summation", 600, nullptr }, - { "Igrave", 389, nullptr }, - { "Lacute", 667, nullptr }, - { "ocircumflex", 500, nullptr }, - { "oacute", 500, nullptr }, - { "Uring", 722, nullptr }, - { "Lcommaaccent", 667, nullptr }, - { "tcaron", 416, nullptr }, - { "eogonek", 444, nullptr }, - { "Delta", 612, nullptr }, - { "Ohungarumlaut", 778, nullptr }, - { "asciicircum", 581, nullptr }, - { "aring", 500, nullptr }, - { "grave", 333, nullptr }, - { "uogonek", 556, nullptr }, - { "bracketright", 333, nullptr }, - { "Iacute", 389, nullptr }, - { "ampersand", 833, nullptr }, - { "igrave", 278, nullptr }, - { "lacute", 278, nullptr }, - { "Ncaron", 722, nullptr }, - { "plus", 570, nullptr }, - { "uring", 556, nullptr }, - { "quotesinglbase", 333, nullptr }, - { "lcommaaccent", 278, nullptr }, - { "Yacute", 722, nullptr }, - { "ohungarumlaut", 500, nullptr }, - { "threesuperior", 300, nullptr }, - { "acute", 333, nullptr }, - { "section", 500, nullptr }, - { "dieresis", 333, nullptr }, - { "iacute", 278, nullptr }, - { "quotedblbase", 500, nullptr }, - { "ncaron", 556, nullptr }, - { "florin", 500, nullptr }, - { "yacute", 500, nullptr }, - { "Rcommaaccent", 722, nullptr }, - { "fi", 556, nullptr }, - { "fl", 556, nullptr }, - { "Acircumflex", 722, nullptr }, - { "Cacute", 722, nullptr }, - { "Icircumflex", 389, nullptr }, - { "guillemotleft", 500, nullptr }, - { "germandbls", 556, nullptr }, - { "Amacron", 722, nullptr }, - { "seven", 500, nullptr }, - { "Sacute", 556, nullptr }, - { "ordmasculine", 330, nullptr }, - { "dotlessi", 278, nullptr }, - { "sterling", 500, nullptr }, - { "notequal", 549, nullptr }, - { "Imacron", 389, nullptr }, - { "rcommaaccent", 444, nullptr }, - { "Zdotaccent", 667, nullptr }, - { "acircumflex", 500, nullptr }, - { "cacute", 444, nullptr }, - { "Ecaron", 667, nullptr }, - { "icircumflex", 278, nullptr }, - { "braceright", 394, nullptr }, - { "quotedblright", 500, nullptr }, - { "amacron", 500, nullptr }, - { "sacute", 389, nullptr }, - { "imacron", 278, nullptr }, - { "cent", 500, nullptr }, - { "currency", 500, nullptr }, - { "logicalnot", 570, nullptr }, - { "zdotaccent", 444, nullptr }, - { "Atilde", 722, nullptr }, - { "breve", 333, nullptr }, - { "bar", 220, nullptr }, - { "fraction", 167, nullptr }, - { "less", 570, nullptr }, - { "ecaron", 444, nullptr }, - { "guilsinglleft", 333, nullptr }, - { "exclam", 333, nullptr }, - { "period", 250, nullptr }, - { "Rcaron", 722, nullptr }, - { "Kcommaaccent", 778, nullptr }, - { "greater", 570, nullptr }, - { "atilde", 500, nullptr }, - { "brokenbar", 220, nullptr }, - { "quoteleft", 333, nullptr }, - { "Edotaccent", 667, nullptr }, - { "onesuperior", 300, nullptr } -}; - -static BuiltinFontWidth timesBoldItalicWidthsTab[] = { - { "Ntilde", 722, nullptr }, - { "rcaron", 389, nullptr }, - { "kcommaaccent", 500, nullptr }, - { "Ncommaaccent", 722, nullptr }, - { "Zacute", 611, nullptr }, - { "comma", 250, nullptr }, - { "cedilla", 333, nullptr }, - { "plusminus", 570, nullptr }, - { "circumflex", 333, nullptr }, - { "dotaccent", 333, nullptr }, - { "edotaccent", 444, nullptr }, - { "asciitilde", 570, nullptr }, - { "colon", 333, nullptr }, - { "onehalf", 750, nullptr }, - { "dollar", 500, nullptr }, - { "Lcaron", 611, nullptr }, - { "ntilde", 556, nullptr }, - { "Aogonek", 667, nullptr }, - { "ncommaaccent", 556, nullptr }, - { "minus", 606, nullptr }, - { "Iogonek", 389, nullptr }, - { "zacute", 389, nullptr }, - { "yen", 500, nullptr }, - { "space", 250, nullptr }, - { "Omacron", 722, nullptr }, - { "questiondown", 500, nullptr }, - { "emdash", 1000, nullptr }, - { "Agrave", 667, nullptr }, - { "three", 500, nullptr }, - { "numbersign", 500, nullptr }, - { "lcaron", 382, nullptr }, - { "A", 667, nullptr }, - { "B", 667, nullptr }, - { "C", 667, nullptr }, - { "aogonek", 500, nullptr }, - { "D", 722, nullptr }, - { "E", 667, nullptr }, - { "onequarter", 750, nullptr }, - { "F", 667, nullptr }, - { "G", 722, nullptr }, - { "H", 778, nullptr }, - { "I", 389, nullptr }, - { "J", 500, nullptr }, - { "K", 667, nullptr }, - { "iogonek", 278, nullptr }, - { "backslash", 278, nullptr }, - { "L", 611, nullptr }, - { "periodcentered", 250, nullptr }, - { "M", 889, nullptr }, - { "N", 722, nullptr }, - { "omacron", 500, nullptr }, - { "Tcommaaccent", 611, nullptr }, - { "O", 722, nullptr }, - { "P", 611, nullptr }, - { "Q", 722, nullptr }, - { "Uhungarumlaut", 722, nullptr }, - { "R", 667, nullptr }, - { "Aacute", 667, nullptr }, - { "caron", 333, nullptr }, - { "S", 556, nullptr }, - { "T", 611, nullptr }, - { "U", 722, nullptr }, - { "agrave", 500, nullptr }, - { "V", 667, nullptr }, - { "W", 889, nullptr }, - { "X", 667, nullptr }, - { "question", 500, nullptr }, - { "equal", 570, nullptr }, - { "Y", 611, nullptr }, - { "Z", 611, nullptr }, - { "four", 500, nullptr }, - { "a", 500, nullptr }, - { "Gcommaaccent", 722, nullptr }, - { "b", 500, nullptr }, - { "c", 444, nullptr }, - { "d", 500, nullptr }, - { "e", 444, nullptr }, - { "f", 333, nullptr }, - { "g", 500, nullptr }, - { "bullet", 350, nullptr }, - { "h", 556, nullptr }, - { "i", 278, nullptr }, - { "Oslash", 722, nullptr }, - { "dagger", 500, nullptr }, - { "j", 278, nullptr }, - { "k", 500, nullptr }, - { "l", 278, nullptr }, - { "m", 778, nullptr }, - { "n", 556, nullptr }, - { "tcommaaccent", 278, nullptr }, - { "o", 500, nullptr }, - { "ordfeminine", 266, nullptr }, - { "ring", 333, nullptr }, - { "p", 500, nullptr }, - { "q", 500, nullptr }, - { "uhungarumlaut", 556, nullptr }, - { "r", 389, nullptr }, - { "twosuperior", 300, nullptr }, - { "aacute", 500, nullptr }, - { "s", 389, nullptr }, - { "OE", 944, nullptr }, - { "t", 278, nullptr }, - { "divide", 570, nullptr }, - { "u", 556, nullptr }, - { "Ccaron", 667, nullptr }, - { "v", 444, nullptr }, - { "w", 667, nullptr }, - { "x", 500, nullptr }, - { "y", 444, nullptr }, - { "z", 389, nullptr }, - { "Gbreve", 722, nullptr }, - { "commaaccent", 250, nullptr }, - { "hungarumlaut", 333, nullptr }, - { "Idotaccent", 389, nullptr }, - { "Nacute", 722, nullptr }, - { "quotedbl", 555, nullptr }, - { "gcommaaccent", 500, nullptr }, - { "mu", 576, nullptr }, - { "greaterequal", 549, nullptr }, - { "Scaron", 556, nullptr }, - { "Lslash", 611, nullptr }, - { "semicolon", 333, nullptr }, - { "oslash", 500, nullptr }, - { "lessequal", 549, nullptr }, - { "lozenge", 494, nullptr }, - { "parenright", 333, nullptr }, - { "ccaron", 444, nullptr }, - { "Ecircumflex", 667, nullptr }, - { "gbreve", 500, nullptr }, - { "trademark", 1000, nullptr }, - { "daggerdbl", 500, nullptr }, - { "nacute", 556, nullptr }, - { "macron", 333, nullptr }, - { "Otilde", 722, nullptr }, - { "Emacron", 667, nullptr }, - { "ellipsis", 1000, nullptr }, - { "scaron", 389, nullptr }, - { "AE", 944, nullptr }, - { "Ucircumflex", 722, nullptr }, - { "lslash", 278, nullptr }, - { "quotedblleft", 500, nullptr }, - { "guilsinglright", 333, nullptr }, - { "hyphen", 333, nullptr }, - { "quotesingle", 278, nullptr }, - { "eight", 500, nullptr }, - { "exclamdown", 389, nullptr }, - { "endash", 500, nullptr }, - { "oe", 722, nullptr }, - { "Abreve", 667, nullptr }, - { "Umacron", 722, nullptr }, - { "ecircumflex", 444, nullptr }, - { "Adieresis", 667, nullptr }, - { "copyright", 747, nullptr }, - { "Egrave", 667, nullptr }, - { "slash", 278, nullptr }, - { "Edieresis", 667, nullptr }, - { "otilde", 500, nullptr }, - { "Idieresis", 389, nullptr }, - { "parenleft", 333, nullptr }, - { "one", 500, nullptr }, - { "emacron", 444, nullptr }, - { "Odieresis", 722, nullptr }, - { "ucircumflex", 556, nullptr }, - { "bracketleft", 333, nullptr }, - { "Ugrave", 722, nullptr }, - { "quoteright", 333, nullptr }, - { "Udieresis", 722, nullptr }, - { "perthousand", 1000, nullptr }, - { "Ydieresis", 611, nullptr }, - { "umacron", 556, nullptr }, - { "abreve", 500, nullptr }, - { "Eacute", 667, nullptr }, - { "adieresis", 500, nullptr }, - { "egrave", 444, nullptr }, - { "edieresis", 444, nullptr }, - { "idieresis", 278, nullptr }, - { "Eth", 722, nullptr }, - { "ae", 722, nullptr }, - { "asterisk", 500, nullptr }, - { "odieresis", 500, nullptr }, - { "Uacute", 722, nullptr }, - { "ugrave", 556, nullptr }, - { "nine", 500, nullptr }, - { "five", 500, nullptr }, - { "udieresis", 556, nullptr }, - { "Zcaron", 611, nullptr }, - { "Scommaaccent", 556, nullptr }, - { "threequarters", 750, nullptr }, - { "guillemotright", 500, nullptr }, - { "Ccedilla", 667, nullptr }, - { "ydieresis", 444, nullptr }, - { "tilde", 333, nullptr }, - { "at", 832, nullptr }, - { "eacute", 444, nullptr }, - { "underscore", 500, nullptr }, - { "Euro", 500, nullptr }, - { "Dcroat", 722, nullptr }, - { "multiply", 570, nullptr }, - { "zero", 500, nullptr }, - { "eth", 500, nullptr }, - { "Scedilla", 556, nullptr }, - { "Ograve", 722, nullptr }, - { "Racute", 667, nullptr }, - { "partialdiff", 494, nullptr }, - { "uacute", 556, nullptr }, - { "braceleft", 348, nullptr }, - { "Thorn", 611, nullptr }, - { "zcaron", 389, nullptr }, - { "scommaaccent", 389, nullptr }, - { "ccedilla", 444, nullptr }, - { "Dcaron", 722, nullptr }, - { "dcroat", 500, nullptr }, - { "Ocircumflex", 722, nullptr }, - { "Oacute", 722, nullptr }, - { "scedilla", 389, nullptr }, - { "ogonek", 333, nullptr }, - { "ograve", 500, nullptr }, - { "racute", 389, nullptr }, - { "Tcaron", 611, nullptr }, - { "Eogonek", 667, nullptr }, - { "thorn", 500, nullptr }, - { "degree", 400, nullptr }, - { "registered", 747, nullptr }, - { "radical", 549, nullptr }, - { "Aring", 667, nullptr }, - { "percent", 833, nullptr }, - { "six", 500, nullptr }, - { "paragraph", 500, nullptr }, - { "dcaron", 608, nullptr }, - { "Uogonek", 722, nullptr }, - { "two", 500, nullptr }, - { "summation", 600, nullptr }, - { "Igrave", 389, nullptr }, - { "Lacute", 611, nullptr }, - { "ocircumflex", 500, nullptr }, - { "oacute", 500, nullptr }, - { "Uring", 722, nullptr }, - { "Lcommaaccent", 611, nullptr }, - { "tcaron", 366, nullptr }, - { "eogonek", 444, nullptr }, - { "Delta", 612, nullptr }, - { "Ohungarumlaut", 722, nullptr }, - { "asciicircum", 570, nullptr }, - { "aring", 500, nullptr }, - { "grave", 333, nullptr }, - { "uogonek", 556, nullptr }, - { "bracketright", 333, nullptr }, - { "Iacute", 389, nullptr }, - { "ampersand", 778, nullptr }, - { "igrave", 278, nullptr }, - { "lacute", 278, nullptr }, - { "Ncaron", 722, nullptr }, - { "plus", 570, nullptr }, - { "uring", 556, nullptr }, - { "quotesinglbase", 333, nullptr }, - { "lcommaaccent", 278, nullptr }, - { "Yacute", 611, nullptr }, - { "ohungarumlaut", 500, nullptr }, - { "threesuperior", 300, nullptr }, - { "acute", 333, nullptr }, - { "section", 500, nullptr }, - { "dieresis", 333, nullptr }, - { "iacute", 278, nullptr }, - { "quotedblbase", 500, nullptr }, - { "ncaron", 556, nullptr }, - { "florin", 500, nullptr }, - { "yacute", 444, nullptr }, - { "Rcommaaccent", 667, nullptr }, - { "fi", 556, nullptr }, - { "fl", 556, nullptr }, - { "Acircumflex", 667, nullptr }, - { "Cacute", 667, nullptr }, - { "Icircumflex", 389, nullptr }, - { "guillemotleft", 500, nullptr }, - { "germandbls", 500, nullptr }, - { "Amacron", 667, nullptr }, - { "seven", 500, nullptr }, - { "Sacute", 556, nullptr }, - { "ordmasculine", 300, nullptr }, - { "dotlessi", 278, nullptr }, - { "sterling", 500, nullptr }, - { "notequal", 549, nullptr }, - { "Imacron", 389, nullptr }, - { "rcommaaccent", 389, nullptr }, - { "Zdotaccent", 611, nullptr }, - { "acircumflex", 500, nullptr }, - { "cacute", 444, nullptr }, - { "Ecaron", 667, nullptr }, - { "icircumflex", 278, nullptr }, - { "braceright", 348, nullptr }, - { "quotedblright", 500, nullptr }, - { "amacron", 500, nullptr }, - { "sacute", 389, nullptr }, - { "imacron", 278, nullptr }, - { "cent", 500, nullptr }, - { "currency", 500, nullptr }, - { "logicalnot", 606, nullptr }, - { "zdotaccent", 389, nullptr }, - { "Atilde", 667, nullptr }, - { "breve", 333, nullptr }, - { "bar", 220, nullptr }, - { "fraction", 167, nullptr }, - { "less", 570, nullptr }, - { "ecaron", 444, nullptr }, - { "guilsinglleft", 333, nullptr }, - { "exclam", 389, nullptr }, - { "period", 250, nullptr }, - { "Rcaron", 667, nullptr }, - { "Kcommaaccent", 667, nullptr }, - { "greater", 570, nullptr }, - { "atilde", 500, nullptr }, - { "brokenbar", 220, nullptr }, - { "quoteleft", 333, nullptr }, - { "Edotaccent", 667, nullptr }, - { "onesuperior", 300, nullptr } -}; - -static BuiltinFontWidth timesItalicWidthsTab[] = { - { "Ntilde", 667, nullptr }, - { "rcaron", 389, nullptr }, - { "kcommaaccent", 444, nullptr }, - { "Ncommaaccent", 667, nullptr }, - { "Zacute", 556, nullptr }, - { "comma", 250, nullptr }, - { "cedilla", 333, nullptr }, - { "plusminus", 675, nullptr }, - { "circumflex", 333, nullptr }, - { "dotaccent", 333, nullptr }, - { "edotaccent", 444, nullptr }, - { "asciitilde", 541, nullptr }, - { "colon", 333, nullptr }, - { "onehalf", 750, nullptr }, - { "dollar", 500, nullptr }, - { "Lcaron", 611, nullptr }, - { "ntilde", 500, nullptr }, - { "Aogonek", 611, nullptr }, - { "ncommaaccent", 500, nullptr }, - { "minus", 675, nullptr }, - { "Iogonek", 333, nullptr }, - { "zacute", 389, nullptr }, - { "yen", 500, nullptr }, - { "space", 250, nullptr }, - { "Omacron", 722, nullptr }, - { "questiondown", 500, nullptr }, - { "emdash", 889, nullptr }, - { "Agrave", 611, nullptr }, - { "three", 500, nullptr }, - { "numbersign", 500, nullptr }, - { "lcaron", 300, nullptr }, - { "A", 611, nullptr }, - { "B", 611, nullptr }, - { "C", 667, nullptr }, - { "aogonek", 500, nullptr }, - { "D", 722, nullptr }, - { "E", 611, nullptr }, - { "onequarter", 750, nullptr }, - { "F", 611, nullptr }, - { "G", 722, nullptr }, - { "H", 722, nullptr }, - { "I", 333, nullptr }, - { "J", 444, nullptr }, - { "K", 667, nullptr }, - { "iogonek", 278, nullptr }, - { "backslash", 278, nullptr }, - { "L", 556, nullptr }, - { "periodcentered", 250, nullptr }, - { "M", 833, nullptr }, - { "N", 667, nullptr }, - { "omacron", 500, nullptr }, - { "Tcommaaccent", 556, nullptr }, - { "O", 722, nullptr }, - { "P", 611, nullptr }, - { "Q", 722, nullptr }, - { "Uhungarumlaut", 722, nullptr }, - { "R", 611, nullptr }, - { "Aacute", 611, nullptr }, - { "caron", 333, nullptr }, - { "S", 500, nullptr }, - { "T", 556, nullptr }, - { "U", 722, nullptr }, - { "agrave", 500, nullptr }, - { "V", 611, nullptr }, - { "W", 833, nullptr }, - { "X", 611, nullptr }, - { "question", 500, nullptr }, - { "equal", 675, nullptr }, - { "Y", 556, nullptr }, - { "Z", 556, nullptr }, - { "four", 500, nullptr }, - { "a", 500, nullptr }, - { "Gcommaaccent", 722, nullptr }, - { "b", 500, nullptr }, - { "c", 444, nullptr }, - { "d", 500, nullptr }, - { "e", 444, nullptr }, - { "f", 278, nullptr }, - { "g", 500, nullptr }, - { "bullet", 350, nullptr }, - { "h", 500, nullptr }, - { "i", 278, nullptr }, - { "Oslash", 722, nullptr }, - { "dagger", 500, nullptr }, - { "j", 278, nullptr }, - { "k", 444, nullptr }, - { "l", 278, nullptr }, - { "m", 722, nullptr }, - { "n", 500, nullptr }, - { "tcommaaccent", 278, nullptr }, - { "o", 500, nullptr }, - { "ordfeminine", 276, nullptr }, - { "ring", 333, nullptr }, - { "p", 500, nullptr }, - { "q", 500, nullptr }, - { "uhungarumlaut", 500, nullptr }, - { "r", 389, nullptr }, - { "twosuperior", 300, nullptr }, - { "aacute", 500, nullptr }, - { "s", 389, nullptr }, - { "OE", 944, nullptr }, - { "t", 278, nullptr }, - { "divide", 675, nullptr }, - { "u", 500, nullptr }, - { "Ccaron", 667, nullptr }, - { "v", 444, nullptr }, - { "w", 667, nullptr }, - { "x", 444, nullptr }, - { "y", 444, nullptr }, - { "z", 389, nullptr }, - { "Gbreve", 722, nullptr }, - { "commaaccent", 250, nullptr }, - { "hungarumlaut", 333, nullptr }, - { "Idotaccent", 333, nullptr }, - { "Nacute", 667, nullptr }, - { "quotedbl", 420, nullptr }, - { "gcommaaccent", 500, nullptr }, - { "mu", 500, nullptr }, - { "greaterequal", 549, nullptr }, - { "Scaron", 500, nullptr }, - { "Lslash", 556, nullptr }, - { "semicolon", 333, nullptr }, - { "oslash", 500, nullptr }, - { "lessequal", 549, nullptr }, - { "lozenge", 471, nullptr }, - { "parenright", 333, nullptr }, - { "ccaron", 444, nullptr }, - { "Ecircumflex", 611, nullptr }, - { "gbreve", 500, nullptr }, - { "trademark", 980, nullptr }, - { "daggerdbl", 500, nullptr }, - { "nacute", 500, nullptr }, - { "macron", 333, nullptr }, - { "Otilde", 722, nullptr }, - { "Emacron", 611, nullptr }, - { "ellipsis", 889, nullptr }, - { "scaron", 389, nullptr }, - { "AE", 889, nullptr }, - { "Ucircumflex", 722, nullptr }, - { "lslash", 278, nullptr }, - { "quotedblleft", 556, nullptr }, - { "guilsinglright", 333, nullptr }, - { "hyphen", 333, nullptr }, - { "quotesingle", 214, nullptr }, - { "eight", 500, nullptr }, - { "exclamdown", 389, nullptr }, - { "endash", 500, nullptr }, - { "oe", 667, nullptr }, - { "Abreve", 611, nullptr }, - { "Umacron", 722, nullptr }, - { "ecircumflex", 444, nullptr }, - { "Adieresis", 611, nullptr }, - { "copyright", 760, nullptr }, - { "Egrave", 611, nullptr }, - { "slash", 278, nullptr }, - { "Edieresis", 611, nullptr }, - { "otilde", 500, nullptr }, - { "Idieresis", 333, nullptr }, - { "parenleft", 333, nullptr }, - { "one", 500, nullptr }, - { "emacron", 444, nullptr }, - { "Odieresis", 722, nullptr }, - { "ucircumflex", 500, nullptr }, - { "bracketleft", 389, nullptr }, - { "Ugrave", 722, nullptr }, - { "quoteright", 333, nullptr }, - { "Udieresis", 722, nullptr }, - { "perthousand", 1000, nullptr }, - { "Ydieresis", 556, nullptr }, - { "umacron", 500, nullptr }, - { "abreve", 500, nullptr }, - { "Eacute", 611, nullptr }, - { "adieresis", 500, nullptr }, - { "egrave", 444, nullptr }, - { "edieresis", 444, nullptr }, - { "idieresis", 278, nullptr }, - { "Eth", 722, nullptr }, - { "ae", 667, nullptr }, - { "asterisk", 500, nullptr }, - { "odieresis", 500, nullptr }, - { "Uacute", 722, nullptr }, - { "ugrave", 500, nullptr }, - { "nine", 500, nullptr }, - { "five", 500, nullptr }, - { "udieresis", 500, nullptr }, - { "Zcaron", 556, nullptr }, - { "Scommaaccent", 500, nullptr }, - { "threequarters", 750, nullptr }, - { "guillemotright", 500, nullptr }, - { "Ccedilla", 667, nullptr }, - { "ydieresis", 444, nullptr }, - { "tilde", 333, nullptr }, - { "at", 920, nullptr }, - { "eacute", 444, nullptr }, - { "underscore", 500, nullptr }, - { "Euro", 500, nullptr }, - { "Dcroat", 722, nullptr }, - { "multiply", 675, nullptr }, - { "zero", 500, nullptr }, - { "eth", 500, nullptr }, - { "Scedilla", 500, nullptr }, - { "Ograve", 722, nullptr }, - { "Racute", 611, nullptr }, - { "partialdiff", 476, nullptr }, - { "uacute", 500, nullptr }, - { "braceleft", 400, nullptr }, - { "Thorn", 611, nullptr }, - { "zcaron", 389, nullptr }, - { "scommaaccent", 389, nullptr }, - { "ccedilla", 444, nullptr }, - { "Dcaron", 722, nullptr }, - { "dcroat", 500, nullptr }, - { "Ocircumflex", 722, nullptr }, - { "Oacute", 722, nullptr }, - { "scedilla", 389, nullptr }, - { "ogonek", 333, nullptr }, - { "ograve", 500, nullptr }, - { "racute", 389, nullptr }, - { "Tcaron", 556, nullptr }, - { "Eogonek", 611, nullptr }, - { "thorn", 500, nullptr }, - { "degree", 400, nullptr }, - { "registered", 760, nullptr }, - { "radical", 453, nullptr }, - { "Aring", 611, nullptr }, - { "percent", 833, nullptr }, - { "six", 500, nullptr }, - { "paragraph", 523, nullptr }, - { "dcaron", 544, nullptr }, - { "Uogonek", 722, nullptr }, - { "two", 500, nullptr }, - { "summation", 600, nullptr }, - { "Igrave", 333, nullptr }, - { "Lacute", 556, nullptr }, - { "ocircumflex", 500, nullptr }, - { "oacute", 500, nullptr }, - { "Uring", 722, nullptr }, - { "Lcommaaccent", 556, nullptr }, - { "tcaron", 300, nullptr }, - { "eogonek", 444, nullptr }, - { "Delta", 612, nullptr }, - { "Ohungarumlaut", 722, nullptr }, - { "asciicircum", 422, nullptr }, - { "aring", 500, nullptr }, - { "grave", 333, nullptr }, - { "uogonek", 500, nullptr }, - { "bracketright", 389, nullptr }, - { "Iacute", 333, nullptr }, - { "ampersand", 778, nullptr }, - { "igrave", 278, nullptr }, - { "lacute", 278, nullptr }, - { "Ncaron", 667, nullptr }, - { "plus", 675, nullptr }, - { "uring", 500, nullptr }, - { "quotesinglbase", 333, nullptr }, - { "lcommaaccent", 278, nullptr }, - { "Yacute", 556, nullptr }, - { "ohungarumlaut", 500, nullptr }, - { "threesuperior", 300, nullptr }, - { "acute", 333, nullptr }, - { "section", 500, nullptr }, - { "dieresis", 333, nullptr }, - { "iacute", 278, nullptr }, - { "quotedblbase", 556, nullptr }, - { "ncaron", 500, nullptr }, - { "florin", 500, nullptr }, - { "yacute", 444, nullptr }, - { "Rcommaaccent", 611, nullptr }, - { "fi", 500, nullptr }, - { "fl", 500, nullptr }, - { "Acircumflex", 611, nullptr }, - { "Cacute", 667, nullptr }, - { "Icircumflex", 333, nullptr }, - { "guillemotleft", 500, nullptr }, - { "germandbls", 500, nullptr }, - { "Amacron", 611, nullptr }, - { "seven", 500, nullptr }, - { "Sacute", 500, nullptr }, - { "ordmasculine", 310, nullptr }, - { "dotlessi", 278, nullptr }, - { "sterling", 500, nullptr }, - { "notequal", 549, nullptr }, - { "Imacron", 333, nullptr }, - { "rcommaaccent", 389, nullptr }, - { "Zdotaccent", 556, nullptr }, - { "acircumflex", 500, nullptr }, - { "cacute", 444, nullptr }, - { "Ecaron", 611, nullptr }, - { "icircumflex", 278, nullptr }, - { "braceright", 400, nullptr }, - { "quotedblright", 556, nullptr }, - { "amacron", 500, nullptr }, - { "sacute", 389, nullptr }, - { "imacron", 278, nullptr }, - { "cent", 500, nullptr }, - { "currency", 500, nullptr }, - { "logicalnot", 675, nullptr }, - { "zdotaccent", 389, nullptr }, - { "Atilde", 611, nullptr }, - { "breve", 333, nullptr }, - { "bar", 275, nullptr }, - { "fraction", 167, nullptr }, - { "less", 675, nullptr }, - { "ecaron", 444, nullptr }, - { "guilsinglleft", 333, nullptr }, - { "exclam", 333, nullptr }, - { "period", 250, nullptr }, - { "Rcaron", 611, nullptr }, - { "Kcommaaccent", 667, nullptr }, - { "greater", 675, nullptr }, - { "atilde", 500, nullptr }, - { "brokenbar", 275, nullptr }, - { "quoteleft", 333, nullptr }, - { "Edotaccent", 611, nullptr }, - { "onesuperior", 300, nullptr } -}; - -static BuiltinFontWidth timesRomanWidthsTab[] = { - { "Ntilde", 722, nullptr }, - { "rcaron", 333, nullptr }, - { "kcommaaccent", 500, nullptr }, - { "Ncommaaccent", 722, nullptr }, - { "Zacute", 611, nullptr }, - { "comma", 250, nullptr }, - { "cedilla", 333, nullptr }, - { "plusminus", 564, nullptr }, - { "circumflex", 333, nullptr }, - { "dotaccent", 333, nullptr }, - { "edotaccent", 444, nullptr }, - { "asciitilde", 541, nullptr }, - { "colon", 278, nullptr }, - { "onehalf", 750, nullptr }, - { "dollar", 500, nullptr }, - { "Lcaron", 611, nullptr }, - { "ntilde", 500, nullptr }, - { "Aogonek", 722, nullptr }, - { "ncommaaccent", 500, nullptr }, - { "minus", 564, nullptr }, - { "Iogonek", 333, nullptr }, - { "zacute", 444, nullptr }, - { "yen", 500, nullptr }, - { "space", 250, nullptr }, - { "Omacron", 722, nullptr }, - { "questiondown", 444, nullptr }, - { "emdash", 1000, nullptr }, - { "Agrave", 722, nullptr }, - { "three", 500, nullptr }, - { "numbersign", 500, nullptr }, - { "lcaron", 344, nullptr }, - { "A", 722, nullptr }, - { "B", 667, nullptr }, - { "C", 667, nullptr }, - { "aogonek", 444, nullptr }, - { "D", 722, nullptr }, - { "E", 611, nullptr }, - { "onequarter", 750, nullptr }, - { "F", 556, nullptr }, - { "G", 722, nullptr }, - { "H", 722, nullptr }, - { "I", 333, nullptr }, - { "J", 389, nullptr }, - { "K", 722, nullptr }, - { "iogonek", 278, nullptr }, - { "backslash", 278, nullptr }, - { "L", 611, nullptr }, - { "periodcentered", 250, nullptr }, - { "M", 889, nullptr }, - { "N", 722, nullptr }, - { "omacron", 500, nullptr }, - { "Tcommaaccent", 611, nullptr }, - { "O", 722, nullptr }, - { "P", 556, nullptr }, - { "Q", 722, nullptr }, - { "Uhungarumlaut", 722, nullptr }, - { "R", 667, nullptr }, - { "Aacute", 722, nullptr }, - { "caron", 333, nullptr }, - { "S", 556, nullptr }, - { "T", 611, nullptr }, - { "U", 722, nullptr }, - { "agrave", 444, nullptr }, - { "V", 722, nullptr }, - { "W", 944, nullptr }, - { "X", 722, nullptr }, - { "question", 444, nullptr }, - { "equal", 564, nullptr }, - { "Y", 722, nullptr }, - { "Z", 611, nullptr }, - { "four", 500, nullptr }, - { "a", 444, nullptr }, - { "Gcommaaccent", 722, nullptr }, - { "b", 500, nullptr }, - { "c", 444, nullptr }, - { "d", 500, nullptr }, - { "e", 444, nullptr }, - { "f", 333, nullptr }, - { "g", 500, nullptr }, - { "bullet", 350, nullptr }, - { "h", 500, nullptr }, - { "i", 278, nullptr }, - { "Oslash", 722, nullptr }, - { "dagger", 500, nullptr }, - { "j", 278, nullptr }, - { "k", 500, nullptr }, - { "l", 278, nullptr }, - { "m", 778, nullptr }, - { "n", 500, nullptr }, - { "tcommaaccent", 278, nullptr }, - { "o", 500, nullptr }, - { "ordfeminine", 276, nullptr }, - { "ring", 333, nullptr }, - { "p", 500, nullptr }, - { "q", 500, nullptr }, - { "uhungarumlaut", 500, nullptr }, - { "r", 333, nullptr }, - { "twosuperior", 300, nullptr }, - { "aacute", 444, nullptr }, - { "s", 389, nullptr }, - { "OE", 889, nullptr }, - { "t", 278, nullptr }, - { "divide", 564, nullptr }, - { "u", 500, nullptr }, - { "Ccaron", 667, nullptr }, - { "v", 500, nullptr }, - { "w", 722, nullptr }, - { "x", 500, nullptr }, - { "y", 500, nullptr }, - { "z", 444, nullptr }, - { "Gbreve", 722, nullptr }, - { "commaaccent", 250, nullptr }, - { "hungarumlaut", 333, nullptr }, - { "Idotaccent", 333, nullptr }, - { "Nacute", 722, nullptr }, - { "quotedbl", 408, nullptr }, - { "gcommaaccent", 500, nullptr }, - { "mu", 500, nullptr }, - { "greaterequal", 549, nullptr }, - { "Scaron", 556, nullptr }, - { "Lslash", 611, nullptr }, - { "semicolon", 278, nullptr }, - { "oslash", 500, nullptr }, - { "lessequal", 549, nullptr }, - { "lozenge", 471, nullptr }, - { "parenright", 333, nullptr }, - { "ccaron", 444, nullptr }, - { "Ecircumflex", 611, nullptr }, - { "gbreve", 500, nullptr }, - { "trademark", 980, nullptr }, - { "daggerdbl", 500, nullptr }, - { "nacute", 500, nullptr }, - { "macron", 333, nullptr }, - { "Otilde", 722, nullptr }, - { "Emacron", 611, nullptr }, - { "ellipsis", 1000, nullptr }, - { "scaron", 389, nullptr }, - { "AE", 889, nullptr }, - { "Ucircumflex", 722, nullptr }, - { "lslash", 278, nullptr }, - { "quotedblleft", 444, nullptr }, - { "guilsinglright", 333, nullptr }, - { "hyphen", 333, nullptr }, - { "quotesingle", 180, nullptr }, - { "eight", 500, nullptr }, - { "exclamdown", 333, nullptr }, - { "endash", 500, nullptr }, - { "oe", 722, nullptr }, - { "Abreve", 722, nullptr }, - { "Umacron", 722, nullptr }, - { "ecircumflex", 444, nullptr }, - { "Adieresis", 722, nullptr }, - { "copyright", 760, nullptr }, - { "Egrave", 611, nullptr }, - { "slash", 278, nullptr }, - { "Edieresis", 611, nullptr }, - { "otilde", 500, nullptr }, - { "Idieresis", 333, nullptr }, - { "parenleft", 333, nullptr }, - { "one", 500, nullptr }, - { "emacron", 444, nullptr }, - { "Odieresis", 722, nullptr }, - { "ucircumflex", 500, nullptr }, - { "bracketleft", 333, nullptr }, - { "Ugrave", 722, nullptr }, - { "quoteright", 333, nullptr }, - { "Udieresis", 722, nullptr }, - { "perthousand", 1000, nullptr }, - { "Ydieresis", 722, nullptr }, - { "umacron", 500, nullptr }, - { "abreve", 444, nullptr }, - { "Eacute", 611, nullptr }, - { "adieresis", 444, nullptr }, - { "egrave", 444, nullptr }, - { "edieresis", 444, nullptr }, - { "idieresis", 278, nullptr }, - { "Eth", 722, nullptr }, - { "ae", 667, nullptr }, - { "asterisk", 500, nullptr }, - { "odieresis", 500, nullptr }, - { "Uacute", 722, nullptr }, - { "ugrave", 500, nullptr }, - { "nine", 500, nullptr }, - { "five", 500, nullptr }, - { "udieresis", 500, nullptr }, - { "Zcaron", 611, nullptr }, - { "Scommaaccent", 556, nullptr }, - { "threequarters", 750, nullptr }, - { "guillemotright", 500, nullptr }, - { "Ccedilla", 667, nullptr }, - { "ydieresis", 500, nullptr }, - { "tilde", 333, nullptr }, - { "at", 921, nullptr }, - { "eacute", 444, nullptr }, - { "underscore", 500, nullptr }, - { "Euro", 500, nullptr }, - { "Dcroat", 722, nullptr }, - { "multiply", 564, nullptr }, - { "zero", 500, nullptr }, - { "eth", 500, nullptr }, - { "Scedilla", 556, nullptr }, - { "Ograve", 722, nullptr }, - { "Racute", 667, nullptr }, - { "partialdiff", 476, nullptr }, - { "uacute", 500, nullptr }, - { "braceleft", 480, nullptr }, - { "Thorn", 556, nullptr }, - { "zcaron", 444, nullptr }, - { "scommaaccent", 389, nullptr }, - { "ccedilla", 444, nullptr }, - { "Dcaron", 722, nullptr }, - { "dcroat", 500, nullptr }, - { "Ocircumflex", 722, nullptr }, - { "Oacute", 722, nullptr }, - { "scedilla", 389, nullptr }, - { "ogonek", 333, nullptr }, - { "ograve", 500, nullptr }, - { "racute", 333, nullptr }, - { "Tcaron", 611, nullptr }, - { "Eogonek", 611, nullptr }, - { "thorn", 500, nullptr }, - { "degree", 400, nullptr }, - { "registered", 760, nullptr }, - { "radical", 453, nullptr }, - { "Aring", 722, nullptr }, - { "percent", 833, nullptr }, - { "six", 500, nullptr }, - { "paragraph", 453, nullptr }, - { "dcaron", 588, nullptr }, - { "Uogonek", 722, nullptr }, - { "two", 500, nullptr }, - { "summation", 600, nullptr }, - { "Igrave", 333, nullptr }, - { "Lacute", 611, nullptr }, - { "ocircumflex", 500, nullptr }, - { "oacute", 500, nullptr }, - { "Uring", 722, nullptr }, - { "Lcommaaccent", 611, nullptr }, - { "tcaron", 326, nullptr }, - { "eogonek", 444, nullptr }, - { "Delta", 612, nullptr }, - { "Ohungarumlaut", 722, nullptr }, - { "asciicircum", 469, nullptr }, - { "aring", 444, nullptr }, - { "grave", 333, nullptr }, - { "uogonek", 500, nullptr }, - { "bracketright", 333, nullptr }, - { "Iacute", 333, nullptr }, - { "ampersand", 778, nullptr }, - { "igrave", 278, nullptr }, - { "lacute", 278, nullptr }, - { "Ncaron", 722, nullptr }, - { "plus", 564, nullptr }, - { "uring", 500, nullptr }, - { "quotesinglbase", 333, nullptr }, - { "lcommaaccent", 278, nullptr }, - { "Yacute", 722, nullptr }, - { "ohungarumlaut", 500, nullptr }, - { "threesuperior", 300, nullptr }, - { "acute", 333, nullptr }, - { "section", 500, nullptr }, - { "dieresis", 333, nullptr }, - { "iacute", 278, nullptr }, - { "quotedblbase", 444, nullptr }, - { "ncaron", 500, nullptr }, - { "florin", 500, nullptr }, - { "yacute", 500, nullptr }, - { "Rcommaaccent", 667, nullptr }, - { "fi", 556, nullptr }, - { "fl", 556, nullptr }, - { "Acircumflex", 722, nullptr }, - { "Cacute", 667, nullptr }, - { "Icircumflex", 333, nullptr }, - { "guillemotleft", 500, nullptr }, - { "germandbls", 500, nullptr }, - { "Amacron", 722, nullptr }, - { "seven", 500, nullptr }, - { "Sacute", 556, nullptr }, - { "ordmasculine", 310, nullptr }, - { "dotlessi", 278, nullptr }, - { "sterling", 500, nullptr }, - { "notequal", 549, nullptr }, - { "Imacron", 333, nullptr }, - { "rcommaaccent", 333, nullptr }, - { "Zdotaccent", 611, nullptr }, - { "acircumflex", 444, nullptr }, - { "cacute", 444, nullptr }, - { "Ecaron", 611, nullptr }, - { "icircumflex", 278, nullptr }, - { "braceright", 480, nullptr }, - { "quotedblright", 444, nullptr }, - { "amacron", 444, nullptr }, - { "sacute", 389, nullptr }, - { "imacron", 278, nullptr }, - { "cent", 500, nullptr }, - { "currency", 500, nullptr }, - { "logicalnot", 564, nullptr }, - { "zdotaccent", 444, nullptr }, - { "Atilde", 722, nullptr }, - { "breve", 333, nullptr }, - { "bar", 200, nullptr }, - { "fraction", 167, nullptr }, - { "less", 564, nullptr }, - { "ecaron", 444, nullptr }, - { "guilsinglleft", 333, nullptr }, - { "exclam", 333, nullptr }, - { "period", 250, nullptr }, - { "Rcaron", 667, nullptr }, - { "Kcommaaccent", 722, nullptr }, - { "greater", 564, nullptr }, - { "atilde", 444, nullptr }, - { "brokenbar", 200, nullptr }, - { "quoteleft", 333, nullptr }, - { "Edotaccent", 611, nullptr }, - { "onesuperior", 300, nullptr } -}; - -static BuiltinFontWidth zapfDingbatsWidthsTab[] = { - { "a81", 438, nullptr }, - { "a82", 138, nullptr }, - { "a83", 277, nullptr }, - { "a84", 415, nullptr }, - { "a85", 509, nullptr }, - { "a86", 410, nullptr }, - { "a87", 234, nullptr }, - { "a88", 234, nullptr }, - { "a89", 390, nullptr }, - { "a140", 788, nullptr }, - { "a141", 788, nullptr }, - { "a142", 788, nullptr }, - { "a143", 788, nullptr }, - { "a144", 788, nullptr }, - { "a145", 788, nullptr }, - { "a146", 788, nullptr }, - { "a147", 788, nullptr }, - { "a148", 788, nullptr }, - { "a149", 788, nullptr }, - { "a90", 390, nullptr }, - { "a91", 276, nullptr }, - { "a92", 276, nullptr }, - { "space", 278, nullptr }, - { "a93", 317, nullptr }, - { "a94", 317, nullptr }, - { "a95", 334, nullptr }, - { "a96", 334, nullptr }, - { "a97", 392, nullptr }, - { "a98", 392, nullptr }, - { "a99", 668, nullptr }, - { "a150", 788, nullptr }, - { "a151", 788, nullptr }, - { "a152", 788, nullptr }, - { "a153", 788, nullptr }, - { "a154", 788, nullptr }, - { "a155", 788, nullptr }, - { "a156", 788, nullptr }, - { "a157", 788, nullptr }, - { "a158", 788, nullptr }, - { "a159", 788, nullptr }, - { "a160", 894, nullptr }, - { "a161", 838, nullptr }, - { "a162", 924, nullptr }, - { "a163", 1016, nullptr }, - { "a164", 458, nullptr }, - { "a165", 924, nullptr }, - { "a166", 918, nullptr }, - { "a167", 927, nullptr }, - { "a168", 928, nullptr }, - { "a169", 928, nullptr }, - { "a170", 834, nullptr }, - { "a171", 873, nullptr }, - { "a172", 828, nullptr }, - { "a173", 924, nullptr }, - { "a174", 917, nullptr }, - { "a175", 930, nullptr }, - { "a176", 931, nullptr }, - { "a177", 463, nullptr }, - { "a178", 883, nullptr }, - { "a179", 836, nullptr }, - { "a180", 867, nullptr }, - { "a181", 696, nullptr }, - { "a182", 874, nullptr }, - { "a183", 760, nullptr }, - { "a184", 946, nullptr }, - { "a185", 865, nullptr }, - { "a186", 967, nullptr }, - { "a187", 831, nullptr }, - { "a188", 873, nullptr }, - { "a189", 927, nullptr }, - { "a1", 974, nullptr }, - { "a2", 961, nullptr }, - { "a3", 980, nullptr }, - { "a4", 719, nullptr }, - { "a5", 789, nullptr }, - { "a6", 494, nullptr }, - { "a7", 552, nullptr }, - { "a8", 537, nullptr }, - { "a9", 577, nullptr }, - { "a190", 970, nullptr }, - { "a191", 918, nullptr }, - { "a192", 748, nullptr }, - { "a193", 836, nullptr }, - { "a194", 771, nullptr }, - { "a195", 888, nullptr }, - { "a196", 748, nullptr }, - { "a197", 771, nullptr }, - { "a198", 888, nullptr }, - { "a199", 867, nullptr }, - { "a10", 692, nullptr }, - { "a11", 960, nullptr }, - { "a12", 939, nullptr }, - { "a13", 549, nullptr }, - { "a14", 855, nullptr }, - { "a15", 911, nullptr }, - { "a16", 933, nullptr }, - { "a17", 945, nullptr }, - { "a18", 974, nullptr }, - { "a19", 755, nullptr }, - { "a20", 846, nullptr }, - { "a21", 762, nullptr }, - { "a22", 761, nullptr }, - { "a23", 571, nullptr }, - { "a24", 677, nullptr }, - { "a25", 763, nullptr }, - { "a26", 760, nullptr }, - { "a27", 759, nullptr }, - { "a28", 754, nullptr }, - { "a29", 786, nullptr }, - { "a30", 788, nullptr }, - { "a31", 788, nullptr }, - { "a32", 790, nullptr }, - { "a33", 793, nullptr }, - { "a34", 794, nullptr }, - { "a35", 816, nullptr }, - { "a36", 823, nullptr }, - { "a37", 789, nullptr }, - { "a38", 841, nullptr }, - { "a39", 823, nullptr }, - { "a40", 833, nullptr }, - { "a41", 816, nullptr }, - { "a42", 831, nullptr }, - { "a43", 923, nullptr }, - { "a44", 744, nullptr }, - { "a45", 723, nullptr }, - { "a46", 749, nullptr }, - { "a47", 790, nullptr }, - { "a48", 792, nullptr }, - { "a49", 695, nullptr }, - { "a100", 668, nullptr }, - { "a101", 732, nullptr }, - { "a102", 544, nullptr }, - { "a103", 544, nullptr }, - { "a104", 910, nullptr }, - { "a105", 911, nullptr }, - { "a106", 667, nullptr }, - { "a107", 760, nullptr }, - { "a108", 760, nullptr }, - { "a109", 626, nullptr }, - { "a50", 776, nullptr }, - { "a51", 768, nullptr }, - { "a52", 792, nullptr }, - { "a53", 759, nullptr }, - { "a54", 707, nullptr }, - { "a55", 708, nullptr }, - { "a56", 682, nullptr }, - { "a57", 701, nullptr }, - { "a58", 826, nullptr }, - { "a59", 815, nullptr }, - { "a110", 694, nullptr }, - { "a111", 595, nullptr }, - { "a112", 776, nullptr }, - { "a117", 690, nullptr }, - { "a118", 791, nullptr }, - { "a119", 790, nullptr }, - { "a60", 789, nullptr }, - { "a61", 789, nullptr }, - { "a62", 707, nullptr }, - { "a63", 687, nullptr }, - { "a64", 696, nullptr }, - { "a65", 689, nullptr }, - { "a66", 786, nullptr }, - { "a67", 787, nullptr }, - { "a68", 713, nullptr }, - { "a69", 791, nullptr }, - { "a200", 696, nullptr }, - { "a201", 874, nullptr }, - { "a120", 788, nullptr }, - { "a121", 788, nullptr }, - { "a202", 974, nullptr }, - { "a122", 788, nullptr }, - { "a203", 762, nullptr }, - { "a123", 788, nullptr }, - { "a204", 759, nullptr }, - { "a124", 788, nullptr }, - { "a205", 509, nullptr }, - { "a125", 788, nullptr }, - { "a206", 410, nullptr }, - { "a126", 788, nullptr }, - { "a127", 788, nullptr }, - { "a128", 788, nullptr }, - { "a129", 788, nullptr }, - { "a70", 785, nullptr }, - { "a71", 791, nullptr }, - { "a72", 873, nullptr }, - { "a73", 761, nullptr }, - { "a74", 762, nullptr }, - { "a75", 759, nullptr }, - { "a76", 892, nullptr }, - { "a77", 892, nullptr }, - { "a78", 788, nullptr }, - { "a79", 784, nullptr }, - { "a130", 788, nullptr }, - { "a131", 788, nullptr }, - { "a132", 788, nullptr }, - { "a133", 788, nullptr }, - { "a134", 788, nullptr }, - { "a135", 788, nullptr }, - { "a136", 788, nullptr }, - { "a137", 788, nullptr }, - { "a138", 788, nullptr }, - { "a139", 788, nullptr } -}; - -BuiltinFont builtinFonts[] = { - { "Courier", standardEncoding, 629, -157, { -23, -250, 715, 805}, nullptr }, - { "Courier-Bold", standardEncoding, 629, -157, {-113, -250, 749, 801}, nullptr }, - { "Courier-BoldOblique", standardEncoding, 629, -157, { -57, -250, 869, 801}, nullptr }, - { "Courier-Oblique", standardEncoding, 629, -157, { -27, -250, 849, 805}, nullptr }, - { "Helvetica", standardEncoding, 718, -207, {-166, -225, 1000, 931}, nullptr }, - { "Helvetica-Bold", standardEncoding, 718, -207, {-170, -228, 1003, 962}, nullptr }, - { "Helvetica-BoldOblique", standardEncoding, 718, -207, {-174, -228, 1114, 962}, nullptr }, - { "Helvetica-Oblique", standardEncoding, 718, -207, {-170, -225, 1116, 931}, nullptr }, - { "Symbol", symbolEncoding, 1010, -293, {-180, -293, 1090, 1010}, nullptr }, - { "Times-Bold", standardEncoding, 683, -217, {-168, -218, 1000, 935}, nullptr }, - { "Times-BoldItalic", standardEncoding, 683, -217, {-200, -218, 996, 921}, nullptr }, - { "Times-Italic", standardEncoding, 683, -217, {-169, -217, 1010, 883}, nullptr }, - { "Times-Roman", standardEncoding, 683, -217, {-168, -218, 1000, 898}, nullptr }, - { "ZapfDingbats", zapfDingbatsEncoding, 820, -143, { -1, -143, 981, 820}, nullptr } -}; - -BuiltinFont *builtinFontSubst[] = { - &builtinFonts[0], - &builtinFonts[3], - &builtinFonts[1], - &builtinFonts[2], - &builtinFonts[4], - &builtinFonts[7], - &builtinFonts[5], - &builtinFonts[6], - &builtinFonts[12], - &builtinFonts[11], - &builtinFonts[9], - &builtinFonts[10] -}; - -void initBuiltinFontTables() { - builtinFonts[0].widths = new BuiltinFontWidths(courierWidthsTab, 315); - builtinFonts[1].widths = new BuiltinFontWidths(courierBoldWidthsTab, 315); - builtinFonts[2].widths = new BuiltinFontWidths(courierBoldObliqueWidthsTab, 315); - builtinFonts[3].widths = new BuiltinFontWidths(courierObliqueWidthsTab, 315); - builtinFonts[4].widths = new BuiltinFontWidths(helveticaWidthsTab, 315); - builtinFonts[5].widths = new BuiltinFontWidths(helveticaBoldWidthsTab, 316); - builtinFonts[6].widths = new BuiltinFontWidths(helveticaBoldObliqueWidthsTab, 315); - builtinFonts[7].widths = new BuiltinFontWidths(helveticaObliqueWidthsTab, 315); - builtinFonts[8].widths = new BuiltinFontWidths(symbolWidthsTab, 190); - builtinFonts[9].widths = new BuiltinFontWidths(timesBoldWidthsTab, 315); - builtinFonts[10].widths = new BuiltinFontWidths(timesBoldItalicWidthsTab, 315); - builtinFonts[11].widths = new BuiltinFontWidths(timesItalicWidthsTab, 315); - builtinFonts[12].widths = new BuiltinFontWidths(timesRomanWidthsTab, 315); - builtinFonts[13].widths = new BuiltinFontWidths(zapfDingbatsWidthsTab, 202); -} - -void freeBuiltinFontTables() { - int i; - - for (i = 0; i < 14; ++i) { - delete builtinFonts[i].widths; - } -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/BuiltinFontTables.h b/Build/source/libs/poppler/poppler-src/poppler/BuiltinFontTables.h deleted file mode 100644 index eb45549efd2..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/BuiltinFontTables.h +++ /dev/null @@ -1,23 +0,0 @@ -//======================================================================== -// -// BuiltinFontTables.h -// -// Copyright 2001-2003 Glyph & Cog, LLC -// -//======================================================================== - -#ifndef BUILTINFONTTABLES_H -#define BUILTINFONTTABLES_H - -#include "BuiltinFont.h" - -#define nBuiltinFonts 14 -#define nBuiltinFontSubsts 12 - -extern BuiltinFont builtinFonts[nBuiltinFonts]; -extern BuiltinFont *builtinFontSubst[nBuiltinFontSubsts]; - -extern void initBuiltinFontTables(); -extern void freeBuiltinFontTables(); - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/CMap.cc b/Build/source/libs/poppler/poppler-src/poppler/CMap.cc deleted file mode 100644 index 614009b77ac..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/CMap.cc +++ /dev/null @@ -1,595 +0,0 @@ -//======================================================================== -// -// CMap.cc -// -// Copyright 2001-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2008 Koji Otani <sho@bbr.jp> -// Copyright (C) 2008, 2009, 2017, 2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2013 Fabio D'Urso <fabiodurso@hotmail.it> -// Copyright (C) 2017 Adrian Johnson <ajohnson@redneon.com> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include <config.h> - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <ctype.h> -#include "goo/gmem.h" -#include "goo/gfile.h" -#include "goo/GooString.h" -#include "Error.h" -#include "GlobalParams.h" -#include "PSTokenizer.h" -#include "CMap.h" -#include "Object.h" - -//------------------------------------------------------------------------ - -struct CMapVectorEntry { - GBool isVector; - union { - CMapVectorEntry *vector; - CID cid; - }; -}; - -//------------------------------------------------------------------------ - -static int getCharFromFile(void *data) { - return fgetc((FILE *)data); -} - -static int getCharFromStream(void *data) { - return ((Stream *)data)->getChar(); -} - -//------------------------------------------------------------------------ - -CMap *CMap::parse(CMapCache *cache, GooString *collectionA, Object *obj) { - CMap *cMap; - GooString *cMapNameA; - - if (obj->isName()) { - cMapNameA = new GooString(obj->getName()); - if (!(cMap = globalParams->getCMap(collectionA, cMapNameA))) { - error(errSyntaxError, -1, - "Unknown CMap '{0:t}' for character collection '{1:t}'", - cMapNameA, collectionA); - } - delete cMapNameA; - } else if (obj->isStream()) { - if (!(cMap = CMap::parse(nullptr, collectionA, obj->getStream()))) { - error(errSyntaxError, -1, "Invalid CMap in Type 0 font"); - } - } else { - error(errSyntaxError, -1, "Invalid Encoding in Type 0 font"); - return nullptr; - } - return cMap; -} - -CMap *CMap::parse(CMapCache *cache, GooString *collectionA, - GooString *cMapNameA) { - FILE *f; - CMap *cMap; - - if (!(f = globalParams->findCMapFile(collectionA, cMapNameA))) { - - // Check for an identity CMap. - if (!cMapNameA->cmp("Identity") || !cMapNameA->cmp("Identity-H")) { - return new CMap(collectionA->copy(), cMapNameA->copy(), 0); - } - if (!cMapNameA->cmp("Identity-V")) { - return new CMap(collectionA->copy(), cMapNameA->copy(), 1); - } - - error(errSyntaxError, -1, - "Couldn't find '{0:t}' CMap file for '{1:t}' collection", - cMapNameA, collectionA); - return nullptr; - } - - cMap = new CMap(collectionA->copy(), cMapNameA->copy()); - cMap->parse2(cache, &getCharFromFile, f); - - fclose(f); - - return cMap; -} - -CMap *CMap::parse(CMapCache *cache, GooString *collectionA, Stream *str) { - CMap *cMap = new CMap(collectionA->copy(), nullptr); - Object obj1 = str->getDict()->lookup("UseCMap"); - if (!obj1.isNull()) { - cMap->useCMap(cache, &obj1); - } - - str->reset(); - cMap->parse2(cache, &getCharFromStream, str); - str->close(); - return cMap; -} - -CMap *CMap::parse(CMapCache *cache, GooString *collectionA, - GooString *cMapNameA, Stream *stream) { - FILE *f = nullptr; - CMap *cmap; - PSTokenizer *pst; - char tok1[256], tok2[256], tok3[256]; - int n1, n2, n3; - Guint start, end, code; - - if (stream) { - stream->reset(); - pst = new PSTokenizer(&getCharFromStream, stream); - } else { - if (!(f = globalParams->findCMapFile(collectionA, cMapNameA))) { - - // Check for an identity CMap. - if (!cMapNameA->cmp("Identity") || !cMapNameA->cmp("Identity-H")) { - return new CMap(collectionA->copy(), cMapNameA->copy(), 0); - } - if (!cMapNameA->cmp("Identity-V")) { - return new CMap(collectionA->copy(), cMapNameA->copy(), 1); - } - - error(errSyntaxError, -1, "Couldn't find '{0:t}' CMap file for '{1:t}' collection", - cMapNameA, collectionA); - return nullptr; - } - pst = new PSTokenizer(&getCharFromFile, f); - } - - cmap = new CMap(collectionA->copy(), cMapNameA->copy()); - - pst->getToken(tok1, sizeof(tok1), &n1); - while (pst->getToken(tok2, sizeof(tok2), &n2)) { - if (!strcmp(tok2, "usecmap")) { - if (tok1[0] == '/') { - cmap->useCMap(cache, tok1 + 1); - } - pst->getToken(tok1, sizeof(tok1), &n1); - } else if (!strcmp(tok1, "/WMode")) { - cmap->wMode = atoi(tok2); - pst->getToken(tok1, sizeof(tok1), &n1); - } else if (!strcmp(tok2, "begincidchar")) { - while (pst->getToken(tok1, sizeof(tok1), &n1)) { - if (!strcmp(tok1, "endcidchar")) { - break; - } - if (!pst->getToken(tok2, sizeof(tok2), &n2) || - !strcmp(tok2, "endcidchar")) { - error(errSyntaxError, -1, "Illegal entry in cidchar block in CMap"); - break; - } - if (!(tok1[0] == '<' && tok1[n1 - 1] == '>' && - n1 >= 4 && (n1 & 1) == 0)) { - error(errSyntaxError, -1, "Illegal entry in cidchar block in CMap"); - continue; - } - tok1[n1 - 1] = '\0'; - if (sscanf(tok1 + 1, "%x", &code) != 1) { - error(errSyntaxError, -1, "Illegal entry in cidchar block in CMap"); - continue; - } - n1 = (n1 - 2) / 2; - cmap->addCIDs(code, code, n1, (CID)atoi(tok2)); - } - pst->getToken(tok1, sizeof(tok1), &n1); - } else if (!strcmp(tok2, "begincidrange")) { - while (pst->getToken(tok1, sizeof(tok1), &n1)) { - if (!strcmp(tok1, "endcidrange")) { - break; - } - if (!pst->getToken(tok2, sizeof(tok2), &n2) || - !strcmp(tok2, "endcidrange") || - !pst->getToken(tok3, sizeof(tok3), &n3) || - !strcmp(tok3, "endcidrange")) { - error(errSyntaxError, -1, "Illegal entry in cidrange block in CMap"); - break; - } - if (tok1[0] == '<' && tok2[0] == '<' && - n1 == n2 && n1 >= 4 && (n1 & 1) == 0) { - tok1[n1 - 1] = tok2[n1 - 1] = '\0'; - sscanf(tok1 + 1, "%x", &start); - sscanf(tok2 + 1, "%x", &end); - n1 = (n1 - 2) / 2; - cmap->addCIDs(start, end, n1, (CID)atoi(tok3)); - } - } - pst->getToken(tok1, sizeof(tok1), &n1); - } else { - strcpy(tok1, tok2); - } - } - delete pst; - - if (f) { - fclose(f); - } - - return cmap; -} - -void CMap::parse2(CMapCache *cache, int (*getCharFunc)(void *), void *data) { - PSTokenizer *pst; - char tok1[256], tok2[256], tok3[256]; - int n1, n2, n3; - Guint start = 0, end = 0, code; - - pst = new PSTokenizer(getCharFunc, data); - pst->getToken(tok1, sizeof(tok1), &n1); - while (pst->getToken(tok2, sizeof(tok2), &n2)) { - if (!strcmp(tok2, "usecmap")) { - if (tok1[0] == '/') { - useCMap(cache, tok1 + 1); - } - pst->getToken(tok1, sizeof(tok1), &n1); - } else if (!strcmp(tok1, "/WMode")) { - wMode = atoi(tok2); - pst->getToken(tok1, sizeof(tok1), &n1); - } else if (!strcmp(tok2, "begincidchar")) { - while (pst->getToken(tok1, sizeof(tok1), &n1)) { - if (!strcmp(tok1, "endcidchar")) { - break; - } - if (!pst->getToken(tok2, sizeof(tok2), &n2) || - !strcmp(tok2, "endcidchar")) { - error(errSyntaxError, -1, "Illegal entry in cidchar block in CMap"); - break; - } - if (!(tok1[0] == '<' && tok1[n1 - 1] == '>' && - n1 >= 4 && (n1 & 1) == 0)) { - error(errSyntaxError, -1, "Illegal entry in cidchar block in CMap"); - continue; - } - tok1[n1 - 1] = '\0'; - if (sscanf(tok1 + 1, "%x", &code) != 1) { - error(errSyntaxError, -1, "Illegal entry in cidchar block in CMap"); - continue; - } - n1 = (n1 - 2) / 2; - addCIDs(code, code, n1, (CID)atoi(tok2)); - } - pst->getToken(tok1, sizeof(tok1), &n1); - } else if (!strcmp(tok2, "begincidrange")) { - while (pst->getToken(tok1, sizeof(tok1), &n1)) { - if (!strcmp(tok1, "endcidrange")) { - break; - } - if (!pst->getToken(tok2, sizeof(tok2), &n2) || - !strcmp(tok2, "endcidrange") || - !pst->getToken(tok3, sizeof(tok3), &n3) || - !strcmp(tok3, "endcidrange")) { - error(errSyntaxError, -1, "Illegal entry in cidrange block in CMap"); - break; - } - if (tok1[0] == '<' && tok2[0] == '<' && - n1 == n2 && n1 >= 4 && (n1 & 1) == 0) { - tok1[n1 - 1] = tok2[n1 - 1] = '\0'; - sscanf(tok1 + 1, "%x", &start); - sscanf(tok2 + 1, "%x", &end); - n1 = (n1 - 2) / 2; - addCIDs(start, end, n1, (CID)atoi(tok3)); - } - } - pst->getToken(tok1, sizeof(tok1), &n1); - } else { - strcpy(tok1, tok2); - } - } - delete pst; -} - -CMap::CMap(GooString *collectionA, GooString *cMapNameA) { - int i; - - collection = collectionA; - cMapName = cMapNameA; - isIdent = gFalse; - wMode = 0; - vector = (CMapVectorEntry *)gmallocn(256, sizeof(CMapVectorEntry)); - for (i = 0; i < 256; ++i) { - vector[i].isVector = gFalse; - vector[i].cid = 0; - } - refCnt = 1; -#ifdef MULTITHREADED - gInitMutex(&mutex); -#endif -} - -CMap::CMap(GooString *collectionA, GooString *cMapNameA, int wModeA) { - collection = collectionA; - cMapName = cMapNameA; - isIdent = gTrue; - wMode = wModeA; - vector = nullptr; - refCnt = 1; -#ifdef MULTITHREADED - gInitMutex(&mutex); -#endif -} - -void CMap::useCMap(CMapCache *cache, char *useName) { - GooString *useNameStr; - CMap *subCMap; - - useNameStr = new GooString(useName); - // if cache is non-NULL, we already have a lock, and we can use - // CMapCache::getCMap() directly; otherwise, we need to use - // GlobalParams::getCMap() in order to acqure the lock need to use - // GlobalParams::getCMap - if (cache) { - subCMap = cache->getCMap(collection, useNameStr, nullptr); - } else { - subCMap = globalParams->getCMap(collection, useNameStr); - } - delete useNameStr; - if (!subCMap) { - return; - } - isIdent = subCMap->isIdent; - if (subCMap->vector) { - copyVector(vector, subCMap->vector); - } - subCMap->decRefCnt(); -} - -void CMap::useCMap(CMapCache *cache, Object *obj) { - CMap *subCMap; - - subCMap = CMap::parse(cache, collection, obj); - if (!subCMap) { - return; - } - isIdent = subCMap->isIdent; - if (subCMap->vector) { - copyVector(vector, subCMap->vector); - } - subCMap->decRefCnt(); -} - -void CMap::copyVector(CMapVectorEntry *dest, CMapVectorEntry *src) { - int i, j; - - for (i = 0; i < 256; ++i) { - if (src[i].isVector) { - if (!dest[i].isVector) { - dest[i].isVector = gTrue; - dest[i].vector = - (CMapVectorEntry *)gmallocn(256, sizeof(CMapVectorEntry)); - for (j = 0; j < 256; ++j) { - dest[i].vector[j].isVector = gFalse; - dest[i].vector[j].cid = 0; - } - } - copyVector(dest[i].vector, src[i].vector); - } else { - if (dest[i].isVector) { - error(errSyntaxError, -1, "Collision in usecmap"); - } else { - dest[i].cid = src[i].cid; - } - } - } -} - -void CMap::addCIDs(Guint start, Guint end, Guint nBytes, CID firstCID) { - CMapVectorEntry *vec; - CID cid; - int byte; - Guint i, j; - - vec = vector; - for (i = nBytes - 1; i >= 1; --i) { - byte = (start >> (8 * i)) & 0xff; - if (!vec[byte].isVector) { - vec[byte].isVector = gTrue; - vec[byte].vector = - (CMapVectorEntry *)gmallocn(256, sizeof(CMapVectorEntry)); - for (j = 0; j < 256; ++j) { - vec[byte].vector[j].isVector = gFalse; - vec[byte].vector[j].cid = 0; - } - } - vec = vec[byte].vector; - } - cid = firstCID; - for (byte = (int)(start & 0xff); byte <= (int)(end & 0xff); ++byte) { - if (vec[byte].isVector) { - error(errSyntaxError, -1, - "Invalid CID ({0:ux} - {1:ux} [{2:ud} bytes]) in CMap", - start, end, nBytes); - } else { - vec[byte].cid = cid; - } - ++cid; - } -} - -CMap::~CMap() { - delete collection; - delete cMapName; - if (vector) { - freeCMapVector(vector); - } -#ifdef MULTITHREADED - gDestroyMutex(&mutex); -#endif -} - -void CMap::freeCMapVector(CMapVectorEntry *vec) { - int i; - - for (i = 0; i < 256; ++i) { - if (vec[i].isVector) { - freeCMapVector(vec[i].vector); - } - } - gfree(vec); -} - -void CMap::incRefCnt() { -#ifdef MULTITHREADED - gLockMutex(&mutex); -#endif - ++refCnt; -#ifdef MULTITHREADED - gUnlockMutex(&mutex); -#endif -} - -void CMap::decRefCnt() { - GBool done; - -#ifdef MULTITHREADED - gLockMutex(&mutex); -#endif - done = --refCnt == 0; -#ifdef MULTITHREADED - gUnlockMutex(&mutex); -#endif - if (done) { - delete this; - } -} - -GBool CMap::match(GooString *collectionA, GooString *cMapNameA) { - return !collection->cmp(collectionA) && !cMapName->cmp(cMapNameA); -} - -CID CMap::getCID(const char *s, int len, CharCode *c, int *nUsed) { - CMapVectorEntry *vec; - CharCode cc; - int n, i; - - vec = vector; - cc = 0; - n = 0; - while (vec && n < len) { - i = s[n++] & 0xff; - cc = (cc << 8) | i; - if (!vec[i].isVector) { - *c = cc; - *nUsed = n; - return vec[i].cid; - } - vec = vec[i].vector; - } - if (isIdent && len >= 2) { - // identity CMap - *nUsed = 2; - *c = cc = ((s[0] & 0xff) << 8) + (s[1] & 0xff); - return cc; - } - *nUsed = 1; - *c = s[0] & 0xff; - return 0; -} - -void CMap::setReverseMapVector(Guint startCode, CMapVectorEntry *vec, - Guint *rmap, Guint rmapSize, Guint ncand) { - int i; - - if (vec == nullptr) return; - for (i = 0;i < 256;i++) { - if (vec[i].isVector) { - setReverseMapVector((startCode+i) << 8, - vec[i].vector,rmap,rmapSize,ncand); - } else { - Guint cid = vec[i].cid; - - if (cid < rmapSize) { - Guint cand; - - for (cand = 0;cand < ncand;cand++) { - Guint code = startCode+i; - Guint idx = cid*ncand+cand; - if (rmap[idx] == 0) { - rmap[idx] = code; - break; - } else if (rmap[idx] == code) { - break; - } - } - } - } - } -} - -void CMap::setReverseMap(Guint *rmap, Guint rmapSize, Guint ncand) { - setReverseMapVector(0,vector,rmap,rmapSize,ncand); -} - -//------------------------------------------------------------------------ - -CMapCache::CMapCache() { - int i; - - for (i = 0; i < cMapCacheSize; ++i) { - cache[i] = nullptr; - } -} - -CMapCache::~CMapCache() { - int i; - - for (i = 0; i < cMapCacheSize; ++i) { - if (cache[i]) { - cache[i]->decRefCnt(); - } - } -} - -CMap *CMapCache::getCMap(GooString *collection, GooString *cMapName, Stream *stream) { - CMap *cmap; - int i, j; - - if (cache[0] && cache[0]->match(collection, cMapName)) { - cache[0]->incRefCnt(); - return cache[0]; - } - for (i = 1; i < cMapCacheSize; ++i) { - if (cache[i] && cache[i]->match(collection, cMapName)) { - cmap = cache[i]; - for (j = i; j >= 1; --j) { - cache[j] = cache[j - 1]; - } - cache[0] = cmap; - cmap->incRefCnt(); - return cmap; - } - } - if ((cmap = CMap::parse(this, collection, cMapName, stream))) { - if (cache[cMapCacheSize - 1]) { - cache[cMapCacheSize - 1]->decRefCnt(); - } - for (j = cMapCacheSize - 1; j >= 1; --j) { - cache[j] = cache[j - 1]; - } - cache[0] = cmap; - cmap->incRefCnt(); - return cmap; - } - return nullptr; -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/CMap.h b/Build/source/libs/poppler/poppler-src/poppler/CMap.h deleted file mode 100644 index eb9893ac5b4..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/CMap.h +++ /dev/null @@ -1,151 +0,0 @@ -//======================================================================== -// -// CMap.h -// -// Copyright 2001-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2008 Koji Otani <sho@bbr.jp> -// Copyright (C) 2009, 2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2012, 2017 Adrian Johnson <ajohnson@redneon.com> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef CMAP_H -#define CMAP_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "poppler-config.h" -#include "goo/gtypes.h" -#include "CharTypes.h" - -#ifdef MULTITHREADED -#include "goo/GooMutex.h" -#endif - -class GooString; -class Object; -struct CMapVectorEntry; -class CMapCache; -class Stream; - -//------------------------------------------------------------------------ - -class CMap { -public: - - // Parse a CMap from <obj>, which can be a name or a stream. Sets - // the initial reference count to 1. Returns NULL on failure. - static CMap *parse(CMapCache *cache, GooString *collectionA, Object *obj); - - // Create the CMap specified by <collection> and <cMapName>. Sets - // the initial reference count to 1. Returns NULL on failure. - static CMap *parse(CMapCache *cache, GooString *collectionA, - GooString *cMapNameA); - - // Parse a CMap from <str>. Sets the initial reference count to 1. - // Returns NULL on failure. - static CMap *parse(CMapCache *cache, GooString *collectionA, Stream *str); - - // Create the CMap specified by <collection> and <cMapName>. Sets - // the initial reference count to 1. - // Stream is a stream containing the CMap, can be NULL and - // this means the CMap will be searched in the CMap files - // Returns NULL on failure. - static CMap *parse(CMapCache *cache, GooString *collectionA, - GooString *cMapNameA, Stream *stream); - - ~CMap(); - - CMap(const CMap &) = delete; - CMap& operator=(const CMap &) = delete; - - void incRefCnt(); - void decRefCnt(); - - // Return collection name (<registry>-<ordering>). - GooString *getCollection() { return collection; } - - GooString *getCMapName() { return cMapName; } - - // Return true if this CMap matches the specified <collectionA>, and - // <cMapNameA>. - GBool match(GooString *collectionA, GooString *cMapNameA); - - // Return the CID corresponding to the character code starting at - // <s>, which contains <len> bytes. Sets *<c> to the char code, and - // *<nUsed> to the number of bytes used by the char code. - CID getCID(const char *s, int len, CharCode *c, int *nUsed); - - // Return the writing mode (0=horizontal, 1=vertical). - int getWMode() { return wMode; } - - void setReverseMap(Guint *rmap, Guint rmapSize, Guint ncand); - -private: - - void parse2(CMapCache *cache, int (*getCharFunc)(void *), void *data); - CMap(GooString *collectionA, GooString *cMapNameA); - CMap(GooString *collectionA, GooString *cMapNameA, int wModeA); - void useCMap(CMapCache *cache, char *useName); - void useCMap(CMapCache *cache, Object *obj); - void copyVector(CMapVectorEntry *dest, CMapVectorEntry *src); - void addCIDs(Guint start, Guint end, Guint nBytes, CID firstCID); - void freeCMapVector(CMapVectorEntry *vec); - void setReverseMapVector(Guint startCode, CMapVectorEntry *vec, - Guint *rmap, Guint rmapSize, Guint ncand); - - GooString *collection; - GooString *cMapName; - GBool isIdent; // true if this CMap is an identity mapping, - // or is based on one (via usecmap) - int wMode; // writing mode (0=horizontal, 1=vertical) - CMapVectorEntry *vector; // vector for first byte (NULL for - // identity CMap) - int refCnt; -#ifdef MULTITHREADED - GooMutex mutex; -#endif -}; - -//------------------------------------------------------------------------ - -#define cMapCacheSize 4 - -class CMapCache { -public: - - CMapCache(); - ~CMapCache(); - - CMapCache(const CMapCache &) = delete; - CMapCache& operator=(const CMapCache &) = delete; - - // Get the <cMapName> CMap for the specified character collection. - // Increments its reference count; there will be one reference for - // the cache plus one for the caller of this function. - // Stream is a stream containing the CMap, can be NULL and - // this means the CMap will be searched in the CMap files - // Returns NULL on failure. - CMap *getCMap(GooString *collection, GooString *cMapName, Stream *stream); - -private: - - CMap *cache[cMapCacheSize]; -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/CachedFile.cc b/Build/source/libs/poppler/poppler-src/poppler/CachedFile.cc deleted file mode 100644 index 1e76d913b99..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/CachedFile.cc +++ /dev/null @@ -1,257 +0,0 @@ -//======================================================================== -// -// CachedFile.cc -// -// This file is licensed under the GPLv2 or later -// -// Copyright 2009 Stefan Thomas <thomas@eload24.com> -// Copyright 2010, 2011 Hib Eris <hib@hiberis.nl> -// Copyright 2010, 2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2013 Julien Nabet <serval2412@yahoo.fr> -// -//======================================================================== - -#include <config.h> -#include "CachedFile.h" - -//------------------------------------------------------------------------ -// CachedFile -//------------------------------------------------------------------------ - -CachedFile::CachedFile(CachedFileLoader *cachedFileLoaderA, GooString *uriA) -{ - uri = uriA; - loader = cachedFileLoaderA; - - streamPos = 0; - chunks = new std::vector<Chunk>(); - length = 0; - - length = loader->init(uri, this); - refCnt = 1; - - if (length != ((size_t) -1)) { - chunks->resize(length/CachedFileChunkSize + 1); - } - else { - error(errInternal, -1, "Failed to initialize file cache for '{0:t}'.", uri); - chunks->resize(0); - } -} - -CachedFile::~CachedFile() -{ - delete uri; - delete loader; - delete chunks; -} - -void CachedFile::incRefCnt() { - refCnt++; -} - -void CachedFile::decRefCnt() { - if (--refCnt == 0) - delete this; -} - -long int CachedFile::tell() { - return streamPos; -} - -int CachedFile::seek(long int offset, int origin) -{ - if (origin == SEEK_SET) { - streamPos = offset; - } else if (origin == SEEK_CUR) { - streamPos += offset; - } else { - streamPos = length + offset; - } - - if (streamPos > length) { - streamPos = 0; - return 1; - } - - return 0; -} - -int CachedFile::cache(const std::vector<ByteRange> &origRanges) -{ - std::vector<int> loadChunks; - int numChunks = length/CachedFileChunkSize + 1; - std::vector<bool> chunkNeeded(numChunks); - int startChunk, endChunk; - std::vector<ByteRange> chunk_ranges, all; - ByteRange range; - const std::vector<ByteRange> *ranges = &origRanges; - - if (ranges->empty()) { - range.offset = 0; - range.length = length; - all.push_back(range); - ranges = &all; - } - - for (int i = 0; i < numChunks; ++i) - chunkNeeded[i] = false; - for (size_t i = 0; i < ranges->size(); i++) { - - if ((*ranges)[i].length == 0) continue; - if ((*ranges)[i].offset >= length) continue; - - size_t start = (*ranges)[i].offset; - size_t end = start + (*ranges)[i].length - 1; - if (end >= length) end = length - 1; - - startChunk = start / CachedFileChunkSize; - endChunk = end / CachedFileChunkSize; - for (int chunk = startChunk; chunk <= endChunk; chunk++) { - if ((*chunks)[chunk].state == chunkStateNew) { - chunkNeeded[chunk] = true; - } - } - } - - int chunk = 0; - while (chunk < numChunks) { - while (!chunkNeeded[chunk] && (++chunk != numChunks)) ; - if (chunk == numChunks) break; - startChunk = chunk; - loadChunks.push_back(chunk); - - while ((++chunk != numChunks) && chunkNeeded[chunk]) { - loadChunks.push_back(chunk); - } - endChunk = chunk - 1; - - range.offset = startChunk * CachedFileChunkSize; - range.length = (endChunk - startChunk + 1) * CachedFileChunkSize; - - chunk_ranges.push_back(range); - } - - if (chunk_ranges.size() > 0) { - CachedFileWriter writer = - CachedFileWriter(this, &loadChunks); - return loader->load(chunk_ranges, &writer); - } - - return 0; -} - -size_t CachedFile::read(void *ptr, size_t unitsize, size_t count) -{ - size_t bytes = unitsize*count; - if (length < (streamPos + bytes)) { - bytes = length - streamPos; - } - - if (bytes == 0) return 0; - - // Load data - if (cache(streamPos, bytes) != 0) return 0; - - // Copy data to buffer - size_t toCopy = bytes; - while (toCopy) { - int chunk = streamPos / CachedFileChunkSize; - int offset = streamPos % CachedFileChunkSize; - size_t len = CachedFileChunkSize-offset; - - if (len > toCopy) - len = toCopy; - - memcpy(ptr, (*chunks)[chunk].data + offset, len); - streamPos += len; - toCopy -= len; - ptr = (char*)ptr + len; - } - - return bytes; -} - -int CachedFile::cache(size_t rangeOffset, size_t rangeLength) -{ - std::vector<ByteRange> r; - ByteRange range; - range.offset = rangeOffset; - range.length = rangeLength; - r.push_back(range); - return cache(r); -} - -//------------------------------------------------------------------------ -// CachedFileWriter -//------------------------------------------------------------------------ - -CachedFileWriter::CachedFileWriter(CachedFile *cachedFileA, std::vector<int> *chunksA) -{ - cachedFile = cachedFileA; - chunks = chunksA; - - if (chunks) { - offset = 0; - it = (*chunks).begin(); - } -} - -CachedFileWriter::~CachedFileWriter() -{ -} - -size_t CachedFileWriter::write(const char *ptr, size_t size) -{ - const char *cp = ptr; - size_t len = size; - size_t nfree, ncopy; - size_t written = 0; - size_t chunk; - - if (!len) return 0; - - while (len) { - if (chunks) { - if (offset == CachedFileChunkSize) { - ++it; - if (it == (*chunks).end()) return written; - offset = 0; - } - chunk = *it; - } else { - offset = cachedFile->length % CachedFileChunkSize; - chunk = cachedFile->length / CachedFileChunkSize; - } - - if (chunk >= cachedFile->chunks->size()) { - cachedFile->chunks->resize(chunk + 1); - } - - nfree = CachedFileChunkSize - offset; - ncopy = (len >= nfree) ? nfree : len; - memcpy(&((*cachedFile->chunks)[chunk].data[offset]), cp, ncopy); - len -= ncopy; - cp += ncopy; - offset += ncopy; - written += ncopy; - - if (!chunks) { - cachedFile->length += ncopy; - } - - if (offset == CachedFileChunkSize) { - (*cachedFile->chunks)[chunk].state = CachedFile::chunkStateLoaded; - } - } - - if ((chunk == (cachedFile->length / CachedFileChunkSize)) && - (offset == (cachedFile->length % CachedFileChunkSize))) { - (*cachedFile->chunks)[chunk].state = CachedFile::chunkStateLoaded; - } - - return written; -} - -//------------------------------------------------------------------------ - diff --git a/Build/source/libs/poppler/poppler-src/poppler/CachedFile.h b/Build/source/libs/poppler/poppler-src/poppler/CachedFile.h deleted file mode 100644 index 51edec8ec95..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/CachedFile.h +++ /dev/null @@ -1,153 +0,0 @@ -//======================================================================== -// -// CachedFile.h -// -// Caching files support. -// -// This file is licensed under the GPLv2 or later -// -// Copyright 2009 Stefan Thomas <thomas@eload24.com> -// Copyright 2010 Hib Eris <hib@hiberis.nl> -// Copyright 2010, 2018 Albert Astals Cid <aacid@kde.org> -// -//======================================================================== - -#ifndef CACHEDFILE_H -#define CACHEDFILE_H - -#include "poppler-config.h" - -#include "goo/gtypes.h" -#include "Object.h" -#include "Stream.h" - -#include <vector> - -//------------------------------------------------------------------------ - -#define CachedFileChunkSize 8192 // This should be a multiple of cachedStreamBufSize - -class GooString; -class CachedFileLoader; - -//------------------------------------------------------------------------ -// CachedFile -// -// CachedFile gives FILE-like access to a document at a specified URI. -// In the constructor, you specify a CachedFileLoader that handles loading -// the data from the document. The CachedFile requests no more data then it -// needs from the CachedFileLoader. -//------------------------------------------------------------------------ - -class CachedFile { - -friend class CachedFileWriter; - -public: - - CachedFile(CachedFileLoader *cacheLoader, GooString *uri); - - CachedFile(const CachedFile &) = delete; - CachedFile& operator=(const CachedFile &) = delete; - - Guint getLength() { return length; } - long int tell(); - int seek(long int offset, int origin); - size_t read(void * ptr, size_t unitsize, size_t count); - size_t write(const char *ptr, size_t size, size_t fromByte); - int cache(const std::vector<ByteRange> &ranges); - - // Reference counting. - void incRefCnt(); - void decRefCnt(); - -private: - - ~CachedFile(); - - enum ChunkState { - chunkStateNew = 0, - chunkStateLoaded - }; - - typedef struct { - ChunkState state; - char data[CachedFileChunkSize]; - } Chunk; - - int cache(size_t offset, size_t length); - - CachedFileLoader *loader; - GooString *uri; - - size_t length; - size_t streamPos; - - std::vector<Chunk> *chunks; - - int refCnt; // reference count - -}; - -//------------------------------------------------------------------------ -// CachedFileWriter -// -// CachedFileWriter handles sequential writes to a CachedFile. -// On construction, you specify the CachedFile and the chunks of it to which data -// should be written. -//------------------------------------------------------------------------ - -class CachedFileWriter { - -public: - - // Construct a CachedFile Writer. - // The caller is responsible for deleting the cachedFile and chunksA. - CachedFileWriter(CachedFile *cachedFile, std::vector<int> *chunksA); - - ~CachedFileWriter(); - - // Writes size bytes from ptr to cachedFile, returns number of bytes written. - size_t write(const char *ptr, size_t size); - -private: - - CachedFile *cachedFile; - std::vector<int> *chunks; - std::vector<int>::iterator it; - size_t offset; - -}; - -//------------------------------------------------------------------------ -// CachedFileLoader -// -// CachedFileLoader is an abstact class that specifies the interface for -// loadng data from an URI into a CachedFile. -//------------------------------------------------------------------------ - -class CachedFileLoader { - -public: - - CachedFileLoader() = default; - virtual ~CachedFileLoader() {}; - - CachedFileLoader(const CachedFileLoader &) = delete; - CachedFileLoader& operator=(const CachedFileLoader &) = delete; - - // Initializes the file load. - // Returns the length of the file. - // The caller is responsible for deleting uri and cachedFile. - virtual size_t init(GooString *uri, CachedFile *cachedFile) = 0; - - // Loads speficified byte ranges and passes it to the writer to store them. - // Returns 0 on success, Anything but 0 on failure. - // The caller is responsible for deleting the writer. - virtual int load(const std::vector<ByteRange> &ranges, CachedFileWriter *writer) = 0; - -}; - -//------------------------------------------------------------------------ - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/CairoFontEngine.cc b/Build/source/libs/poppler/poppler-src/poppler/CairoFontEngine.cc deleted file mode 100644 index 91deac465d5..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/CairoFontEngine.cc +++ /dev/null @@ -1,871 +0,0 @@ -//======================================================================== -// -// CairoFontEngine.cc -// -// Copyright 2003 Glyph & Cog, LLC -// Copyright 2004 Red Hat, Inc -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2005-2007 Jeff Muizelaar <jeff@infidigm.net> -// Copyright (C) 2005, 2006 Kristian Høgsberg <krh@redhat.com> -// Copyright (C) 2005 Martin Kretzschmar <martink@gnome.org> -// Copyright (C) 2005, 2009, 2012, 2013, 2015, 2017, 2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2006, 2007, 2010, 2011 Carlos Garcia Campos <carlosgc@gnome.org> -// Copyright (C) 2007 Koji Otani <sho@bbr.jp> -// Copyright (C) 2008, 2009 Chris Wilson <chris@chris-wilson.co.uk> -// Copyright (C) 2008, 2012, 2014, 2016, 2017 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2009 Darren Kenny <darren.kenny@sun.com> -// Copyright (C) 2010 Suzuki Toshiya <mpsuzuki@hiroshima-u.ac.jp> -// Copyright (C) 2010 Jan Kümmel <jan+freedesktop@snorc.org> -// Copyright (C) 2012 Hib Eris <hib@hiberis.nl> -// Copyright (C) 2013 Thomas Freitag <Thomas.Freitag@alfa.de> -// Copyright (C) 2015, 2016 Jason Crain <jason@aquaticape.us> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include <config.h> - -#include "config.h" -#include <string.h> -#include "CairoFontEngine.h" -#include "CairoOutputDev.h" -#include "GlobalParams.h" -#include <fofi/FoFiTrueType.h> -#include <fofi/FoFiType1C.h> -#include "goo/gfile.h" -#include "Error.h" -#include "XRef.h" -#include "Gfx.h" -#include "Page.h" - -#if defined(HAVE_FCNTL_H) && defined(HAVE_SYS_MMAN_H) && defined(HAVE_SYS_STAT_H) -#include <fcntl.h> -#include <sys/stat.h> -#include <sys/mman.h> -#define CAN_CHECK_OPEN_FACES 1 -#endif - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#ifdef MULTITHREADED -# define fontEngineLocker() MutexLocker locker(&mutex) -#else -# define fontEngineLocker() -#endif - -//------------------------------------------------------------------------ -// CairoFont -//------------------------------------------------------------------------ - -CairoFont::CairoFont(Ref refA, - cairo_font_face_t *cairo_font_faceA, - int *codeToGIDA, - Guint codeToGIDLenA, - GBool substituteA, - GBool printingA) : ref(refA), - cairo_font_face(cairo_font_faceA), - codeToGID(codeToGIDA), - codeToGIDLen(codeToGIDLenA), - substitute(substituteA), - printing(printingA) { } - -CairoFont::~CairoFont() { - cairo_font_face_destroy (cairo_font_face); - gfree(codeToGID); -} - -GBool -CairoFont::matches(Ref &other, GBool printingA) { - return (other.num == ref.num && other.gen == ref.gen); -} - -cairo_font_face_t * -CairoFont::getFontFace(void) { - return cairo_font_face; -} - -unsigned long -CairoFont::getGlyph(CharCode code, - Unicode *u, int uLen) { - FT_UInt gid; - - if (codeToGID && code < codeToGIDLen) { - gid = (FT_UInt)codeToGID[code]; - } else { - gid = (FT_UInt)code; - } - return gid; -} - -double -CairoFont::getSubstitutionCorrection(GfxFont *gfxFont) -{ - double w1, w2, w3; - CharCode code; - char *name; - - // for substituted fonts: adjust the font matrix -- compare the - // width of 'm' in the original font and the substituted font - if (isSubstitute() && !gfxFont->isCIDFont()) { - for (code = 0; code < 256; ++code) { - if ((name = ((Gfx8BitFont *)gfxFont)->getCharName(code)) && - name[0] == 'm' && name[1] == '\0') { - break; - } - } - if (code < 256) { - w1 = ((Gfx8BitFont *)gfxFont)->getWidth(code); - { - cairo_matrix_t m; - cairo_matrix_init_identity(&m); - cairo_font_options_t *options = cairo_font_options_create(); - cairo_font_options_set_hint_style(options, CAIRO_HINT_STYLE_NONE); - cairo_font_options_set_hint_metrics(options, CAIRO_HINT_METRICS_OFF); - cairo_scaled_font_t *scaled_font = cairo_scaled_font_create(cairo_font_face, &m, &m, options); - - cairo_text_extents_t extents; - cairo_scaled_font_text_extents(scaled_font, "m", &extents); - - cairo_scaled_font_destroy(scaled_font); - cairo_font_options_destroy(options); - w2 = extents.x_advance; - } - w3 = ((Gfx8BitFont *)gfxFont)->getWidth(0); - if (!gfxFont->isSymbolic() && w2 > 0 && w1 > w3) { - // if real font is substantially narrower than substituted - // font, reduce the font size accordingly - if (w1 > 0.01 && w1 < 0.9 * w2) { - w1 /= w2; - return w1; - } - } - } - } - return 1.0; -} - -//------------------------------------------------------------------------ -// CairoFreeTypeFont -//------------------------------------------------------------------------ - -static cairo_user_data_key_t _ft_cairo_key; - -static void -_ft_done_face_uncached (void *closure) -{ - FT_Face face = (FT_Face) closure; - FT_Done_Face (face); -} - -static GBool -_ft_new_face_uncached (FT_Library lib, - const char *filename, - char *font_data, - int font_data_len, - FT_Face *face_out, - cairo_font_face_t **font_face_out) -{ - FT_Face face; - cairo_font_face_t *font_face; - - if (font_data == nullptr) { - if (FT_New_Face (lib, filename, 0, &face)) - return gFalse; - } else { - if (FT_New_Memory_Face (lib, (unsigned char *)font_data, font_data_len, 0, &face)) - return gFalse; - } - - font_face = cairo_ft_font_face_create_for_ft_face (face, - FT_LOAD_NO_HINTING | - FT_LOAD_NO_BITMAP); - if (cairo_font_face_set_user_data (font_face, - &_ft_cairo_key, - face, - _ft_done_face_uncached)) - { - _ft_done_face_uncached (face); - cairo_font_face_destroy (font_face); - return gFalse; - } - - *face_out = face; - *font_face_out = font_face; - return gTrue; -} - -#ifdef CAN_CHECK_OPEN_FACES -static struct _ft_face_data { - struct _ft_face_data *prev, *next, **head; - - int fd; - unsigned long hash; - size_t size; - unsigned char *bytes; - - FT_Library lib; - FT_Face face; - cairo_font_face_t *font_face; -} *_ft_open_faces; - -static unsigned long -_djb_hash (const unsigned char *bytes, size_t len) -{ - unsigned long hash = 5381; - while (len--) { - unsigned char c = *bytes++; - hash *= 33; - hash ^= c; - } - return hash; -} - -static GBool -_ft_face_data_equal (struct _ft_face_data *a, struct _ft_face_data *b) -{ - if (a->lib != b->lib) - return gFalse; - if (a->size != b->size) - return gFalse; - if (a->hash != b->hash) - return gFalse; - - return memcmp (a->bytes, b->bytes, a->size) == 0; -} - -static void -_ft_done_face (void *closure) -{ - struct _ft_face_data *data = (struct _ft_face_data *) closure; - - if (data->next) - data->next->prev = data->prev; - if (data->prev) - data->prev->next = data->next; - else - _ft_open_faces = data->next; - - if (data->fd != -1) { -#if defined(__SUNPRO_CC) && defined(__sun) && defined(__SVR4) - munmap ((char*)data->bytes, data->size); -#else - munmap (data->bytes, data->size); -#endif - close (data->fd); - } else { - gfree (data->bytes); - } - - FT_Done_Face (data->face); - gfree (data); -} - -static GBool -_ft_new_face (FT_Library lib, - const char *filename, - char *font_data, - int font_data_len, - FT_Face *face_out, - cairo_font_face_t **font_face_out) -{ - struct _ft_face_data *l; - struct stat st; - struct _ft_face_data tmpl; - - tmpl.fd = -1; - - if (font_data == nullptr) { - /* if we fail to mmap the file, just pass it to FreeType instead */ - tmpl.fd = open (filename, O_RDONLY); - if (tmpl.fd == -1) - return _ft_new_face_uncached (lib, filename, font_data, font_data_len, face_out, font_face_out); - - if (fstat (tmpl.fd, &st) == -1) { - close (tmpl.fd); - return _ft_new_face_uncached (lib, filename, font_data, font_data_len, face_out, font_face_out); - } - - tmpl.bytes = (unsigned char *) mmap (nullptr, st.st_size, - PROT_READ, MAP_PRIVATE, - tmpl.fd, 0); - if (tmpl.bytes == MAP_FAILED) { - close (tmpl.fd); - return _ft_new_face_uncached (lib, filename, font_data, font_data_len, face_out, font_face_out); - } - tmpl.size = st.st_size; - } else { - tmpl.bytes = (unsigned char*) font_data; - tmpl.size = font_data_len; - } - - /* check to see if this is a duplicate of any of the currently open fonts */ - tmpl.lib = lib; - tmpl.hash = _djb_hash (tmpl.bytes, tmpl.size); - - for (l = _ft_open_faces; l; l = l->next) { - if (_ft_face_data_equal (l, &tmpl)) { - if (tmpl.fd != -1) { -#if defined(__SUNPRO_CC) && defined(__sun) && defined(__SVR4) - munmap ((char*)tmpl.bytes, tmpl.size); -#else - munmap (tmpl.bytes, tmpl.size); -#endif - close (tmpl.fd); - } else { - gfree (tmpl.bytes); - } - *face_out = l->face; - *font_face_out = cairo_font_face_reference (l->font_face); - return gTrue; - } - } - - /* not a dup, open and insert into list */ - if (FT_New_Memory_Face (lib, - (FT_Byte *) tmpl.bytes, tmpl.size, - 0, &tmpl.face)) - { - if (tmpl.fd != -1) { -#if defined(__SUNPRO_CC) && defined(__sun) && defined(__SVR4) - munmap ((char*)tmpl.bytes, tmpl.size); -#else - munmap (tmpl.bytes, tmpl.size); -#endif - - close (tmpl.fd); - } - return gFalse; - } - - l = (struct _ft_face_data *) gmallocn (1, sizeof (struct _ft_face_data)); - *l = tmpl; - l->prev = nullptr; - l->next = _ft_open_faces; - if (_ft_open_faces) - _ft_open_faces->prev = l; - _ft_open_faces = l; - - l->font_face = cairo_ft_font_face_create_for_ft_face (tmpl.face, - FT_LOAD_NO_HINTING | - FT_LOAD_NO_BITMAP); - if (cairo_font_face_set_user_data (l->font_face, - &_ft_cairo_key, - l, - _ft_done_face)) - { - cairo_font_face_destroy (l->font_face); - _ft_done_face (l); - return gFalse; - } - - *face_out = l->face; - *font_face_out = l->font_face; - return gTrue; -} -#else -#define _ft_new_face _ft_new_face_uncached -#endif - -CairoFreeTypeFont::CairoFreeTypeFont(Ref refA, - cairo_font_face_t *cairo_font_faceA, - int *codeToGIDA, - Guint codeToGIDLenA, - GBool substituteA) : CairoFont(refA, - cairo_font_faceA, - codeToGIDA, - codeToGIDLenA, - substituteA, - gTrue) { } - -CairoFreeTypeFont::~CairoFreeTypeFont() { } - -CairoFreeTypeFont *CairoFreeTypeFont::create(GfxFont *gfxFont, XRef *xref, - FT_Library lib, GBool useCIDs) { - GooString *fileName; - char *fileNameC; - char *font_data; - int font_data_len; - int i, n; - GfxFontType fontType; - GfxFontLoc *fontLoc; - char **enc; - const char *name; - FoFiTrueType *ff; - FoFiType1C *ff1c; - Ref ref; - FT_Face face; - cairo_font_face_t *font_face; - - int *codeToGID; - Guint codeToGIDLen; - - codeToGID = nullptr; - codeToGIDLen = 0; - font_data = nullptr; - font_data_len = 0; - fileName = nullptr; - fileNameC = nullptr; - - GBool substitute = gFalse; - - ref = *gfxFont->getID(); - fontType = gfxFont->getType(); - - if (!(fontLoc = gfxFont->locateFont(xref, nullptr))) { - error(errSyntaxError, -1, "Couldn't find a font for '{0:s}'", - gfxFont->getName() ? gfxFont->getName()->getCString() - : "(unnamed)"); - goto err2; - } - - // embedded font - if (fontLoc->locType == gfxFontLocEmbedded) { - font_data = gfxFont->readEmbFontFile(xref, &font_data_len); - if (nullptr == font_data) - goto err2; - - // external font - } else { // gfxFontLocExternal - fileName = fontLoc->path; - fontType = fontLoc->fontType; - substitute = gTrue; - } - - if (fileName != nullptr) { - fileNameC = fileName->getCString(); - } - - switch (fontType) { - case fontType1: - case fontType1C: - case fontType1COT: - if (! _ft_new_face (lib, fileNameC, font_data, font_data_len, &face, &font_face)) { - error(errSyntaxError, -1, "could not create type1 face"); - goto err2; - } - - enc = ((Gfx8BitFont *)gfxFont)->getEncoding(); - - codeToGID = (int *)gmallocn(256, sizeof(int)); - codeToGIDLen = 256; - for (i = 0; i < 256; ++i) { - codeToGID[i] = 0; - if ((name = enc[i])) { - codeToGID[i] = FT_Get_Name_Index(face, (char*)name); - if (codeToGID[i] == 0) { - Unicode u; - u = globalParams->mapNameToUnicodeText (name); - codeToGID[i] = FT_Get_Char_Index (face, u); - } - if (codeToGID[i] == 0) { - name = GfxFont::getAlternateName(name); - if (name) { - codeToGID[i] = FT_Get_Name_Index(face, (char*)name); - } - } - } - } - break; - case fontCIDType2: - case fontCIDType2OT: - codeToGID = nullptr; - n = 0; - if (((GfxCIDFont *)gfxFont)->getCIDToGID()) { - n = ((GfxCIDFont *)gfxFont)->getCIDToGIDLen(); - if (n) { - codeToGID = (int *)gmallocn(n, sizeof(int)); - memcpy(codeToGID, ((GfxCIDFont *)gfxFont)->getCIDToGID(), - n * sizeof(int)); - } - } else { - if (font_data != nullptr) { - ff = FoFiTrueType::make(font_data, font_data_len); - } else { - ff = FoFiTrueType::load(fileNameC); - } - if (! ff) - goto err2; - codeToGID = ((GfxCIDFont *)gfxFont)->getCodeToGIDMap(ff, &n); - delete ff; - } - codeToGIDLen = n; - /* Fall through */ - case fontTrueType: - case fontTrueTypeOT: - if (font_data != nullptr) { - ff = FoFiTrueType::make(font_data, font_data_len); - } else { - ff = FoFiTrueType::load(fileNameC); - } - if (! ff) { - error(errSyntaxError, -1, "failed to load truetype font\n"); - goto err2; - } - /* This might be set already for the CIDType2 case */ - if (fontType == fontTrueType || fontType == fontTrueTypeOT) { - codeToGID = ((Gfx8BitFont *)gfxFont)->getCodeToGIDMap(ff); - codeToGIDLen = 256; - } - delete ff; - if (! _ft_new_face (lib, fileNameC, font_data, font_data_len, &face, &font_face)) { - error(errSyntaxError, -1, "could not create truetype face\n"); - goto err2; - } - break; - - case fontCIDType0: - case fontCIDType0C: - - codeToGID = nullptr; - codeToGIDLen = 0; - - if (!useCIDs) - { - if (font_data != nullptr) { - ff1c = FoFiType1C::make(font_data, font_data_len); - } else { - ff1c = FoFiType1C::load(fileNameC); - } - if (ff1c) { - codeToGID = ff1c->getCIDToGIDMap((int *)&codeToGIDLen); - delete ff1c; - } - } - - if (! _ft_new_face (lib, fileNameC, font_data, font_data_len, &face, &font_face)) { - error(errSyntaxError, -1, "could not create cid face\n"); - goto err2; - } - break; - - case fontCIDType0COT: - codeToGID = nullptr; - n = 0; - if (((GfxCIDFont *)gfxFont)->getCIDToGID()) { - n = ((GfxCIDFont *)gfxFont)->getCIDToGIDLen(); - if (n) { - codeToGID = (int *)gmallocn(n, sizeof(int)); - memcpy(codeToGID, ((GfxCIDFont *)gfxFont)->getCIDToGID(), - n * sizeof(int)); - } - } - codeToGIDLen = n; - - if (!codeToGID) { - if (!useCIDs) { - if (font_data != nullptr) { - ff = FoFiTrueType::make(font_data, font_data_len); - } else { - ff = FoFiTrueType::load(fileNameC); - } - if (ff) { - if (ff->isOpenTypeCFF()) { - codeToGID = ff->getCIDToGIDMap((int *)&codeToGIDLen); - } - delete ff; - } - } - } - if (! _ft_new_face (lib, fileNameC, font_data, font_data_len, &face, &font_face)) { - error(errSyntaxError, -1, "could not create cid (OT) face\n"); - goto err2; - } - break; - - default: - fprintf (stderr, "font type %d not handled\n", (int)fontType); - goto err2; - break; - } - - delete fontLoc; - return new CairoFreeTypeFont(ref, - font_face, - codeToGID, codeToGIDLen, - substitute); - - err2: - /* hmm? */ - delete fontLoc; - gfree (codeToGID); - gfree (font_data); - fprintf (stderr, "some font thing failed\n"); - return nullptr; -} - -//------------------------------------------------------------------------ -// CairoType3Font -//------------------------------------------------------------------------ - -static const cairo_user_data_key_t type3_font_key = {0}; - -typedef struct _type3_font_info { - GfxFont *font; - PDFDoc *doc; - CairoFontEngine *fontEngine; - GBool printing; - XRef *xref; -} type3_font_info_t; - -static void -_free_type3_font_info(void *closure) -{ - type3_font_info_t *info = (type3_font_info_t *) closure; - - info->font->decRefCnt(); - free (info); -} - -static cairo_status_t -_init_type3_glyph (cairo_scaled_font_t *scaled_font, - cairo_t *cr, - cairo_font_extents_t *extents) -{ - type3_font_info_t *info; - GfxFont *font; - double *mat; - - info = (type3_font_info_t *) - cairo_font_face_get_user_data (cairo_scaled_font_get_font_face (scaled_font), - &type3_font_key); - font = info->font; - mat = font->getFontBBox(); - extents->ascent = mat[3]; /* y2 */ - extents->descent = -mat[3]; /* -y1 */ - extents->height = extents->ascent + extents->descent; - extents->max_x_advance = mat[2] - mat[1]; /* x2 - x1 */ - extents->max_y_advance = 0; - - return CAIRO_STATUS_SUCCESS; -} - -static cairo_status_t -_render_type3_glyph (cairo_scaled_font_t *scaled_font, - unsigned long glyph, - cairo_t *cr, - cairo_text_extents_t *metrics) -{ - Dict *charProcs; - Object charProc; - CairoOutputDev *output_dev; - cairo_matrix_t matrix, invert_y_axis; - double *mat; - double wx, wy; - PDFRectangle box; - type3_font_info_t *info; - GfxFont *font; - Dict *resDict; - Gfx *gfx; - - info = (type3_font_info_t *) - cairo_font_face_get_user_data (cairo_scaled_font_get_font_face (scaled_font), - &type3_font_key); - - font = info->font; - resDict = ((Gfx8BitFont *)font)->getResources(); - charProcs = ((Gfx8BitFont *)(info->font))->getCharProcs(); - if (!charProcs) - return CAIRO_STATUS_USER_FONT_ERROR; - - if ((int)glyph >= charProcs->getLength()) - return CAIRO_STATUS_USER_FONT_ERROR; - - mat = font->getFontMatrix(); - matrix.xx = mat[0]; - matrix.yx = mat[1]; - matrix.xy = mat[2]; - matrix.yy = mat[3]; - matrix.x0 = mat[4]; - matrix.y0 = mat[5]; - cairo_matrix_init_scale (&invert_y_axis, 1, -1); - cairo_matrix_multiply (&matrix, &matrix, &invert_y_axis); - cairo_transform (cr, &matrix); - - output_dev = new CairoOutputDev(); - output_dev->setCairo(cr); - output_dev->setPrinting(info->printing); - - mat = font->getFontBBox(); - box.x1 = mat[0]; - box.y1 = mat[1]; - box.x2 = mat[2]; - box.y2 = mat[3]; - gfx = new Gfx(info->doc, output_dev, resDict, &box, nullptr); - output_dev->startDoc(info->doc, info->fontEngine); - output_dev->startPage (1, gfx->getState(), gfx->getXRef()); - output_dev->setInType3Char(gTrue); - charProc = charProcs->getVal(glyph); - gfx->display(&charProc); - - output_dev->getType3GlyphWidth (&wx, &wy); - cairo_matrix_transform_distance (&matrix, &wx, &wy); - metrics->x_advance = wx; - metrics->y_advance = wy; - if (output_dev->hasType3GlyphBBox()) { - double *bbox = output_dev->getType3GlyphBBox(); - - cairo_matrix_transform_point (&matrix, &bbox[0], &bbox[1]); - cairo_matrix_transform_point (&matrix, &bbox[2], &bbox[3]); - metrics->x_bearing = bbox[0]; - metrics->y_bearing = bbox[1]; - metrics->width = bbox[2] - bbox[0]; - metrics->height = bbox[3] - bbox[1]; - } - - delete gfx; - delete output_dev; - - return CAIRO_STATUS_SUCCESS; -} - - -CairoType3Font *CairoType3Font::create(GfxFont *gfxFont, PDFDoc *doc, - CairoFontEngine *fontEngine, - GBool printing, XRef *xref) { - type3_font_info_t *info; - cairo_font_face_t *font_face; - Ref ref; - int *codeToGID; - Guint codeToGIDLen; - int i, j; - char **enc; - Dict *charProcs; - char *name; - - charProcs = ((Gfx8BitFont *)gfxFont)->getCharProcs(); - info = (type3_font_info_t *) malloc(sizeof(*info)); - ref = *gfxFont->getID(); - font_face = cairo_user_font_face_create(); - cairo_user_font_face_set_init_func (font_face, _init_type3_glyph); - cairo_user_font_face_set_render_glyph_func (font_face, _render_type3_glyph); - gfxFont->incRefCnt(); - info->font = gfxFont; - info->doc = doc; - info->fontEngine = fontEngine; - info->printing = printing; - info->xref = xref; - - cairo_font_face_set_user_data (font_face, &type3_font_key, (void *) info, _free_type3_font_info); - - enc = ((Gfx8BitFont *)gfxFont)->getEncoding(); - codeToGID = (int *)gmallocn(256, sizeof(int)); - codeToGIDLen = 256; - for (i = 0; i < 256; ++i) { - codeToGID[i] = 0; - if (charProcs && (name = enc[i])) { - for (j = 0; j < charProcs->getLength(); j++) { - if (strcmp(name, charProcs->getKey(j)) == 0) { - codeToGID[i] = j; - } - } - } - } - - return new CairoType3Font(ref, doc, font_face, codeToGID, codeToGIDLen, printing, xref); -} - -CairoType3Font::CairoType3Font(Ref refA, - PDFDoc *docA, - cairo_font_face_t *cairo_font_faceA, - int *codeToGIDA, - Guint codeToGIDLenA, - GBool printingA, XRef *xref) : CairoFont(refA, - cairo_font_faceA, - codeToGIDA, - codeToGIDLenA, - gFalse, - printingA), - doc(docA) { } - -CairoType3Font::~CairoType3Font() { } - -GBool -CairoType3Font::matches(Ref &other, GBool printingA) { - return (other.num == ref.num && other.gen == ref.gen && printing == printingA); -} - - -//------------------------------------------------------------------------ -// CairoFontEngine -//------------------------------------------------------------------------ - -CairoFontEngine::CairoFontEngine(FT_Library libA) { - int i; - - lib = libA; - for (i = 0; i < cairoFontCacheSize; ++i) { - fontCache[i] = nullptr; - } - - FT_Int major, minor, patch; - // as of FT 2.1.8, CID fonts are indexed by CID instead of GID - FT_Library_Version(lib, &major, &minor, &patch); - useCIDs = major > 2 || - (major == 2 && (minor > 1 || (minor == 1 && patch > 7))); -#ifdef MULTITHREADED - gInitMutex(&mutex); -#endif -} - -CairoFontEngine::~CairoFontEngine() { - int i; - - for (i = 0; i < cairoFontCacheSize; ++i) { - if (fontCache[i]) - delete fontCache[i]; - } -#ifdef MULTITHREADED - gDestroyMutex(&mutex); -#endif -} - -CairoFont * -CairoFontEngine::getFont(GfxFont *gfxFont, PDFDoc *doc, GBool printing, XRef *xref) { - int i, j; - Ref ref; - CairoFont *font; - GfxFontType fontType; - - fontEngineLocker(); - ref = *gfxFont->getID(); - - for (i = 0; i < cairoFontCacheSize; ++i) { - font = fontCache[i]; - if (font && font->matches(ref, printing)) { - for (j = i; j > 0; --j) { - fontCache[j] = fontCache[j-1]; - } - fontCache[0] = font; - return font; - } - } - - fontType = gfxFont->getType(); - if (fontType == fontType3) - font = CairoType3Font::create (gfxFont, doc, this, printing, xref); - else - font = CairoFreeTypeFont::create (gfxFont, xref, lib, useCIDs); - - //XXX: if font is null should we still insert it into the cache? - if (fontCache[cairoFontCacheSize - 1]) { - delete fontCache[cairoFontCacheSize - 1]; - } - for (j = cairoFontCacheSize - 1; j > 0; --j) { - fontCache[j] = fontCache[j-1]; - } - fontCache[0] = font; - return font; -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/CairoFontEngine.h b/Build/source/libs/poppler/poppler-src/poppler/CairoFontEngine.h deleted file mode 100644 index 601fbae84c3..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/CairoFontEngine.h +++ /dev/null @@ -1,133 +0,0 @@ -//======================================================================== -// -// CairoFontEngine.h -// -// Copyright 2003 Glyph & Cog, LLC -// Copyright 2004 Red Hat, Inc -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2005, 2006 Kristian Høgsberg <krh@redhat.com> -// Copyright (C) 2005, 2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2006, 2007 Jeff Muizelaar <jeff@infidigm.net> -// Copyright (C) 2006, 2010 Carlos Garcia Campos <carlosgc@gnome.org> -// Copyright (C) 2008, 2017 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2013 Thomas Freitag <Thomas.Freitag@alfa.de> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef CAIROFONTENGINE_H -#define CAIROFONTENGINE_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "poppler-config.h" -#include "goo/gtypes.h" -#include <cairo-ft.h> - -#include "GfxFont.h" -#include "PDFDoc.h" - -class CairoFontEngine; - -class CairoFont { -public: - CairoFont(Ref ref, - cairo_font_face_t *face, - int *codeToGID, - Guint codeToGIDLen, - GBool substitute, - GBool printing); - virtual ~CairoFont(); - CairoFont(const CairoFont &) = delete; - CairoFont& operator=(const CairoFont &other) = delete; - - virtual GBool matches(Ref &other, GBool printing); - cairo_font_face_t *getFontFace(void); - unsigned long getGlyph(CharCode code, Unicode *u, int uLen); - double getSubstitutionCorrection(GfxFont *gfxFont); - - GBool isSubstitute() { return substitute; } -protected: - Ref ref; - cairo_font_face_t *cairo_font_face; - - int *codeToGID; - Guint codeToGIDLen; - - GBool substitute; - GBool printing; -}; - -//------------------------------------------------------------------------ - -class CairoFreeTypeFont : public CairoFont { -public: - static CairoFreeTypeFont *create(GfxFont *gfxFont, XRef *xref, FT_Library lib, GBool useCIDs); - ~CairoFreeTypeFont(); - -private: - CairoFreeTypeFont(Ref ref, cairo_font_face_t *cairo_font_face, - int *codeToGID, Guint codeToGIDLen, GBool substitute); -}; - -//------------------------------------------------------------------------ - -class CairoType3Font : public CairoFont { -public: - static CairoType3Font *create(GfxFont *gfxFont, PDFDoc *doc, - CairoFontEngine *fontEngine, - GBool printing, XRef *xref); - ~CairoType3Font(); - - GBool matches(Ref &other, GBool printing) override; - -private: - CairoType3Font(Ref ref, PDFDoc *doc, - cairo_font_face_t *cairo_font_face, - int *codeToGID, Guint codeToGIDLen, - GBool printing, XRef *xref); - PDFDoc *doc; -}; - -//------------------------------------------------------------------------ - -#define cairoFontCacheSize 64 - -//------------------------------------------------------------------------ -// CairoFontEngine -//------------------------------------------------------------------------ - -class CairoFontEngine { -public: - - // Create a font engine. - CairoFontEngine(FT_Library libA); - ~CairoFontEngine(); - CairoFontEngine(const CairoFontEngine &) = delete; - CairoFontEngine& operator=(const CairoFontEngine &other) = delete; - - CairoFont *getFont(GfxFont *gfxFont, PDFDoc *doc, GBool printing, XRef *xref); - -private: - CairoFont *fontCache[cairoFontCacheSize]; - FT_Library lib; - GBool useCIDs; -#ifdef MULTITHREADED - GooMutex mutex; -#endif -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/CairoOutputDev.cc b/Build/source/libs/poppler/poppler-src/poppler/CairoOutputDev.cc deleted file mode 100644 index 8e8102e9e3f..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/CairoOutputDev.cc +++ /dev/null @@ -1,3573 +0,0 @@ -//======================================================================== -// -// CairoOutputDev.cc -// -// Copyright 2003 Glyph & Cog, LLC -// Copyright 2004 Red Hat, Inc -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2005-2008 Jeff Muizelaar <jeff@infidigm.net> -// Copyright (C) 2005, 2006 Kristian Høgsberg <krh@redhat.com> -// Copyright (C) 2005, 2009, 2012, 2017, 2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2005 Nickolay V. Shmyrev <nshmyrev@yandex.ru> -// Copyright (C) 2006-2011, 2013, 2014, 2017, 2018 Carlos Garcia Campos <carlosgc@gnome.org> -// Copyright (C) 2008 Carl Worth <cworth@cworth.org> -// Copyright (C) 2008-2017 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2008 Michael Vrable <mvrable@cs.ucsd.edu> -// Copyright (C) 2008, 2009 Chris Wilson <chris@chris-wilson.co.uk> -// Copyright (C) 2008, 2012 Hib Eris <hib@hiberis.nl> -// Copyright (C) 2009, 2010 David Benjamin <davidben@mit.edu> -// Copyright (C) 2011-2014 Thomas Freitag <Thomas.Freitag@alfa.de> -// Copyright (C) 2012 Patrick Pfeifer <p2000@mailinator.com> -// Copyright (C) 2012, 2015, 2016 Jason Crain <jason@aquaticape.us> -// Copyright (C) 2015 Suzuki Toshiya <mpsuzuki@hiroshima-u.ac.jp> -// 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 -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include <config.h> - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include <cstdint> -#include <string.h> -#include <math.h> -#include <assert.h> -#include <cairo.h> - -#include "goo/gfile.h" -#include "GlobalParams.h" -#include "Error.h" -#include "Object.h" -#include "Gfx.h" -#include "GfxState.h" -#include "GfxFont.h" -#include "Page.h" -#include "Link.h" -#include "FontEncodingTables.h" -#include "PDFDocEncoding.h" -#include <fofi/FoFiTrueType.h> -#include <splash/SplashBitmap.h> -#include "CairoOutputDev.h" -#include "CairoFontEngine.h" -#include "CairoRescaleBox.h" -#include "UnicodeMap.h" -#include "JBIG2Stream.h" -//------------------------------------------------------------------------ - -// #define LOG_CAIRO - -// To limit memory usage and improve performance when printing, limit -// cairo images to this size. 8192 is sufficient for an A2 sized -// 300ppi image. -#define MAX_PRINT_IMAGE_SIZE 8192 - -#ifdef LOG_CAIRO -#define LOG(x) (x) -#else -#define LOG(x) -#endif - -static inline void printMatrix(cairo_matrix_t *matrix){ - printf("%f %f, %f %f (%f %f)\n", matrix->xx, matrix->yx, - matrix->xy, matrix->yy, - matrix->x0, matrix->y0); -} - - -#define MIN(a,b) (((a) < (b)) ? (a) : (b)) -#define MAX(a,b) (((a) > (b)) ? (a) : (b)) - - -//------------------------------------------------------------------------ -// CairoImage -//------------------------------------------------------------------------ - -CairoImage::CairoImage (double x1, double y1, double x2, double y2) { - this->image = nullptr; - this->x1 = x1; - this->y1 = y1; - this->x2 = x2; - this->y2 = y2; -} - -CairoImage::~CairoImage () { - if (image) - cairo_surface_destroy (image); -} - -void CairoImage::setImage (cairo_surface_t *image) { - if (this->image) - cairo_surface_destroy (this->image); - this->image = cairo_surface_reference (image); -} - -//------------------------------------------------------------------------ -// CairoOutputDev -//------------------------------------------------------------------------ - -// We cannot tie the lifetime of an FT_Library object to that of -// CairoOutputDev, since any FT_Faces created with it may end up with a -// reference by Cairo which can be held long after the CairoOutputDev is -// deleted. The simplest way to avoid problems is to never tear down the -// FT_Library instance; to avoid leaks, just use a single global instance -// initialized the first time it is needed. -FT_Library CairoOutputDev::ft_lib; -GBool CairoOutputDev::ft_lib_initialized = gFalse; - -CairoOutputDev::CairoOutputDev() { - doc = nullptr; - - if (!ft_lib_initialized) { - FT_Init_FreeType(&ft_lib); - ft_lib_initialized = gTrue; - } - - fontEngine = nullptr; - fontEngine_owner = gFalse; - glyphs = nullptr; - fill_pattern = nullptr; - fill_color.r = fill_color.g = fill_color.b = 0; - stroke_pattern = nullptr; - stroke_color.r = stroke_color.g = stroke_color.b = 0; - stroke_opacity = 1.0; - fill_opacity = 1.0; - textClipPath = nullptr; - strokePathClip = nullptr; - cairo = nullptr; - currentFont = nullptr; -#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 14, 0) - prescaleImages = gFalse; -#else - prescaleImages = gTrue; -#endif - printing = gTrue; - use_show_text_glyphs = gFalse; - inUncoloredPattern = gFalse; - inType3Char = gFalse; - t3_glyph_has_bbox = gFalse; - text_matrix_valid = gTrue; - antialias = CAIRO_ANTIALIAS_DEFAULT; - - groupColorSpaceStack = nullptr; - maskStack = nullptr; - group = nullptr; - mask = nullptr; - shape = nullptr; - cairo_shape = nullptr; - knockoutCount = 0; - - text = nullptr; - actualText = nullptr; - - // the SA parameter supposedly defaults to false, but Acrobat - // apparently hardwires it to true - stroke_adjust = gTrue; - align_stroke_coords = gFalse; - adjusted_stroke_width = gFalse; - xref = nullptr; -} - -CairoOutputDev::~CairoOutputDev() { - if (fontEngine_owner && fontEngine) { - delete fontEngine; - } - - if (cairo) - cairo_destroy (cairo); - cairo_pattern_destroy (stroke_pattern); - cairo_pattern_destroy (fill_pattern); - if (group) - cairo_pattern_destroy (group); - if (mask) - cairo_pattern_destroy (mask); - if (shape) - cairo_pattern_destroy (shape); - if (text) - text->decRefCnt(); - if (actualText) - delete actualText; -} - -void CairoOutputDev::setCairo(cairo_t *cairo) -{ - if (this->cairo != nullptr) { - cairo_status_t status = cairo_status (this->cairo); - if (status) { - error(errInternal, -1, "cairo context error: {0:s}\n", cairo_status_to_string(status)); - } - cairo_destroy (this->cairo); - assert(!cairo_shape); - } - if (cairo != nullptr) { - this->cairo = cairo_reference (cairo); - /* save the initial matrix so that we can use it for type3 fonts. */ - //XXX: is this sufficient? could we miss changes to the matrix somehow? - cairo_get_matrix(cairo, &orig_matrix); - setContextAntialias(cairo, antialias); - } else { - this->cairo = nullptr; - this->cairo_shape = nullptr; - } -} - -void CairoOutputDev::setTextPage(TextPage *text) -{ - if (this->text) - this->text->decRefCnt(); - if (actualText) - delete actualText; - if (text) { - this->text = text; - this->text->incRefCnt(); - actualText = new ActualText(text); - } else { - this->text = nullptr; - actualText = nullptr; - } -} - -void CairoOutputDev::setAntialias(cairo_antialias_t antialias) -{ - this->antialias = antialias; - if (cairo) - setContextAntialias (cairo, antialias); - if (cairo_shape) - setContextAntialias (cairo_shape, antialias); -} - -void CairoOutputDev::setContextAntialias(cairo_t *cr, cairo_antialias_t antialias) -{ - cairo_font_options_t *font_options; - cairo_set_antialias (cr, antialias); - font_options = cairo_font_options_create (); - cairo_get_font_options (cr, font_options); - cairo_font_options_set_antialias (font_options, antialias); - cairo_set_font_options (cr, font_options); - cairo_font_options_destroy (font_options); -} - -void CairoOutputDev::startDoc(PDFDoc *docA, - CairoFontEngine *parentFontEngine) { - doc = docA; - if (parentFontEngine) { - fontEngine = parentFontEngine; - } else { - if (fontEngine) { - delete fontEngine; - } - fontEngine = new CairoFontEngine(ft_lib); - fontEngine_owner = gTrue; - } - xref = doc->getXRef(); -} - -void CairoOutputDev::startPage(int pageNum, GfxState *state, XRef *xrefA) { - /* set up some per page defaults */ - cairo_pattern_destroy(fill_pattern); - cairo_pattern_destroy(stroke_pattern); - - fill_pattern = cairo_pattern_create_rgb(0., 0., 0.); - fill_color.r = fill_color.g = fill_color.b = 0; - stroke_pattern = cairo_pattern_reference(fill_pattern); - stroke_color.r = stroke_color.g = stroke_color.b = 0; - - if (text) - text->startPage(state); - if (xrefA != nullptr) { - xref = xrefA; - } -} - -void CairoOutputDev::endPage() { - if (text) { - text->endPage(); - text->coalesce(gTrue, 0, gFalse); - } -} - -void CairoOutputDev::saveState(GfxState *state) { - LOG(printf ("save\n")); - cairo_save (cairo); - if (cairo_shape) - cairo_save (cairo_shape); - - MaskStack *ms = new MaskStack; - ms->mask = cairo_pattern_reference(mask); - ms->mask_matrix = mask_matrix; - ms->next = maskStack; - maskStack = ms; - - if (strokePathClip) - strokePathClip->ref_count++; -} - -void CairoOutputDev::restoreState(GfxState *state) { - LOG(printf ("restore\n")); - cairo_restore (cairo); - if (cairo_shape) - cairo_restore (cairo_shape); - - text_matrix_valid = gTrue; - - /* These aren't restored by cairo_restore() since we keep them in - * the output device. */ - updateFillColor(state); - updateStrokeColor(state); - updateFillOpacity(state); - updateStrokeOpacity(state); - updateBlendMode(state); - - MaskStack* ms = maskStack; - if (ms) { - if (mask) - cairo_pattern_destroy(mask); - mask = ms->mask; - mask_matrix = ms->mask_matrix; - maskStack = ms->next; - delete ms; - } - - if (strokePathClip && --strokePathClip->ref_count == 0) { - delete strokePathClip->path; - if (strokePathClip->dashes) - gfree (strokePathClip->dashes); - gfree (strokePathClip); - strokePathClip = nullptr; - } -} - -void CairoOutputDev::updateAll(GfxState *state) { - updateLineDash(state); - updateLineJoin(state); - updateLineCap(state); - updateLineWidth(state); - updateFlatness(state); - updateMiterLimit(state); - updateFillColor(state); - updateStrokeColor(state); - updateFillOpacity(state); - updateStrokeOpacity(state); - updateBlendMode(state); - needFontUpdate = gTrue; - if (text) - text->updateFont(state); -} - -void CairoOutputDev::setDefaultCTM(double *ctm) { - cairo_matrix_t matrix; - matrix.xx = ctm[0]; - matrix.yx = ctm[1]; - matrix.xy = ctm[2]; - matrix.yy = ctm[3]; - matrix.x0 = ctm[4]; - matrix.y0 = ctm[5]; - - cairo_transform (cairo, &matrix); - if (cairo_shape) - cairo_transform (cairo_shape, &matrix); - - OutputDev::setDefaultCTM(ctm); -} - -void CairoOutputDev::updateCTM(GfxState *state, double m11, double m12, - double m21, double m22, - double m31, double m32) { - cairo_matrix_t matrix, invert_matrix; - matrix.xx = m11; - matrix.yx = m12; - matrix.xy = m21; - matrix.yy = m22; - matrix.x0 = m31; - matrix.y0 = m32; - - /* Make sure the matrix is invertible before setting it. - * cairo will blow up if we give it a matrix that's not - * invertible, so we need to check before passing it - * to cairo_transform. Ignoring it is likely to give better - * results than not rendering anything at all. See #14398 - * - * Ideally, we could do the cairo_transform - * and then check if anything went wrong and fix it then - * instead of having to invert the matrix. */ - invert_matrix = matrix; - if (cairo_matrix_invert(&invert_matrix)) { - error(errSyntaxWarning, -1, "matrix not invertible\n"); - return; - } - - cairo_transform (cairo, &matrix); - if (cairo_shape) - cairo_transform (cairo_shape, &matrix); - updateLineDash(state); - updateLineJoin(state); - updateLineCap(state); - updateLineWidth(state); -} - -void CairoOutputDev::updateLineDash(GfxState *state) { - double *dashPattern; - int dashLength; - double dashStart; - - state->getLineDash(&dashPattern, &dashLength, &dashStart); - cairo_set_dash (cairo, dashPattern, dashLength, dashStart); - if (cairo_shape) - cairo_set_dash (cairo_shape, dashPattern, dashLength, dashStart); -} - -void CairoOutputDev::updateFlatness(GfxState *state) { - // cairo_set_tolerance (cairo, state->getFlatness()); -} - -void CairoOutputDev::updateLineJoin(GfxState *state) { - switch (state->getLineJoin()) { - case 0: - cairo_set_line_join (cairo, CAIRO_LINE_JOIN_MITER); - break; - case 1: - cairo_set_line_join (cairo, CAIRO_LINE_JOIN_ROUND); - break; - case 2: - cairo_set_line_join (cairo, CAIRO_LINE_JOIN_BEVEL); - break; - } - if (cairo_shape) - cairo_set_line_join (cairo_shape, cairo_get_line_join(cairo)); -} - -void CairoOutputDev::updateLineCap(GfxState *state) { - switch (state->getLineCap()) { - case 0: - cairo_set_line_cap (cairo, CAIRO_LINE_CAP_BUTT); - break; - case 1: - cairo_set_line_cap (cairo, CAIRO_LINE_CAP_ROUND); - break; - case 2: - cairo_set_line_cap (cairo, CAIRO_LINE_CAP_SQUARE); - break; - } - if (cairo_shape) - cairo_set_line_cap (cairo_shape, cairo_get_line_cap(cairo)); -} - -void CairoOutputDev::updateMiterLimit(GfxState *state) { - cairo_set_miter_limit (cairo, state->getMiterLimit()); - if (cairo_shape) - cairo_set_miter_limit (cairo_shape, state->getMiterLimit()); -} - -void CairoOutputDev::updateLineWidth(GfxState *state) { - LOG(printf ("line width: %f\n", state->getLineWidth())); - adjusted_stroke_width = gFalse; - double width = state->getLineWidth(); - if (stroke_adjust && !printing) { - double x, y; - x = y = width; - - /* find out line width in device units */ - cairo_user_to_device_distance(cairo, &x, &y); - if (fabs(x) <= 1.0 && fabs(y) <= 1.0) { - /* adjust width to at least one device pixel */ - x = y = 1.0; - cairo_device_to_user_distance(cairo, &x, &y); - width = MIN(fabs(x),fabs(y)); - adjusted_stroke_width = gTrue; - } - } else if (width == 0.0) { - /* Cairo does not support 0 line width == 1 device pixel. Find out - * how big pixels (device unit) are in the x and y - * directions. Choose the smaller of the two as our line width. - */ - double x = 1.0, y = 1.0; - if (printing) { - // assume printer pixel size is 1/600 inch - x = 72.0/600; - y = 72.0/600; - } - cairo_device_to_user_distance(cairo, &x, &y); - width = MIN(fabs(x),fabs(y)); - } - cairo_set_line_width (cairo, width); - if (cairo_shape) - cairo_set_line_width (cairo_shape, cairo_get_line_width (cairo)); -} - -void CairoOutputDev::updateFillColor(GfxState *state) { - GfxRGB color = fill_color; - - if (inUncoloredPattern) - return; - - state->getFillRGB(&fill_color); - if (cairo_pattern_get_type (fill_pattern) != CAIRO_PATTERN_TYPE_SOLID || - color.r != fill_color.r || - color.g != fill_color.g || - color.b != fill_color.b) - { - cairo_pattern_destroy(fill_pattern); - fill_pattern = cairo_pattern_create_rgba(colToDbl(fill_color.r), - colToDbl(fill_color.g), - colToDbl(fill_color.b), - fill_opacity); - - LOG(printf ("fill color: %d %d %d\n", - fill_color.r, fill_color.g, fill_color.b)); - } -} - -void CairoOutputDev::updateStrokeColor(GfxState *state) { - GfxRGB color = stroke_color; - - if (inUncoloredPattern) - return; - - state->getStrokeRGB(&stroke_color); - if (cairo_pattern_get_type (fill_pattern) != CAIRO_PATTERN_TYPE_SOLID || - color.r != stroke_color.r || - color.g != stroke_color.g || - color.b != stroke_color.b) - { - cairo_pattern_destroy(stroke_pattern); - stroke_pattern = cairo_pattern_create_rgba(colToDbl(stroke_color.r), - colToDbl(stroke_color.g), - colToDbl(stroke_color.b), - stroke_opacity); - - LOG(printf ("stroke color: %d %d %d\n", - stroke_color.r, stroke_color.g, stroke_color.b)); - } -} - -void CairoOutputDev::updateFillOpacity(GfxState *state) { - double opacity = fill_opacity; - - if (inUncoloredPattern) - return; - - fill_opacity = state->getFillOpacity(); - if (opacity != fill_opacity) { - cairo_pattern_destroy(fill_pattern); - fill_pattern = cairo_pattern_create_rgba(colToDbl(fill_color.r), - colToDbl(fill_color.g), - colToDbl(fill_color.b), - fill_opacity); - - LOG(printf ("fill opacity: %f\n", fill_opacity)); - } -} - -void CairoOutputDev::updateStrokeOpacity(GfxState *state) { - double opacity = stroke_opacity; - - if (inUncoloredPattern) - return; - - stroke_opacity = state->getStrokeOpacity(); - if (opacity != stroke_opacity) { - cairo_pattern_destroy(stroke_pattern); - stroke_pattern = cairo_pattern_create_rgba(colToDbl(stroke_color.r), - colToDbl(stroke_color.g), - colToDbl(stroke_color.b), - stroke_opacity); - - LOG(printf ("stroke opacity: %f\n", stroke_opacity)); - } -} - -void CairoOutputDev::updateFillColorStop(GfxState *state, double offset) { - if (inUncoloredPattern) - return; - - state->getFillRGB(&fill_color); - - cairo_pattern_add_color_stop_rgba(fill_pattern, offset, - colToDbl(fill_color.r), - colToDbl(fill_color.g), - colToDbl(fill_color.b), - fill_opacity); - LOG(printf ("fill color stop: %f (%d, %d, %d)\n", - offset, fill_color.r, fill_color.g, fill_color.b)); -} - -void CairoOutputDev::updateBlendMode(GfxState *state) { - switch (state->getBlendMode()) { - default: - case gfxBlendNormal: - cairo_set_operator (cairo, CAIRO_OPERATOR_OVER); - break; - case gfxBlendMultiply: - cairo_set_operator (cairo, CAIRO_OPERATOR_MULTIPLY); - break; - case gfxBlendScreen: - cairo_set_operator (cairo, CAIRO_OPERATOR_SCREEN); - break; - case gfxBlendOverlay: - cairo_set_operator (cairo, CAIRO_OPERATOR_OVERLAY); - break; - case gfxBlendDarken: - cairo_set_operator (cairo, CAIRO_OPERATOR_DARKEN); - break; - case gfxBlendLighten: - cairo_set_operator (cairo, CAIRO_OPERATOR_LIGHTEN); - break; - case gfxBlendColorDodge: - cairo_set_operator (cairo, CAIRO_OPERATOR_COLOR_DODGE); - break; - case gfxBlendColorBurn: - cairo_set_operator (cairo, CAIRO_OPERATOR_COLOR_BURN); - break; - case gfxBlendHardLight: - cairo_set_operator (cairo, CAIRO_OPERATOR_HARD_LIGHT); - break; - case gfxBlendSoftLight: - cairo_set_operator (cairo, CAIRO_OPERATOR_SOFT_LIGHT); - break; - case gfxBlendDifference: - cairo_set_operator (cairo, CAIRO_OPERATOR_DIFFERENCE); - break; - case gfxBlendExclusion: - cairo_set_operator (cairo, CAIRO_OPERATOR_EXCLUSION); - break; - case gfxBlendHue: - cairo_set_operator (cairo, CAIRO_OPERATOR_HSL_HUE); - break; - case gfxBlendSaturation: - cairo_set_operator (cairo, CAIRO_OPERATOR_HSL_SATURATION); - break; - case gfxBlendColor: - cairo_set_operator (cairo, CAIRO_OPERATOR_HSL_COLOR); - break; - case gfxBlendLuminosity: - cairo_set_operator (cairo, CAIRO_OPERATOR_HSL_LUMINOSITY); - break; - } - LOG(printf ("blend mode: %d\n", (int)state->getBlendMode())); -} - -void CairoOutputDev::updateFont(GfxState *state) { - cairo_font_face_t *font_face; - cairo_matrix_t matrix, invert_matrix; - - LOG(printf ("updateFont() font=%s\n", state->getFont()->getName()->getCString())); - - needFontUpdate = gFalse; - - //FIXME: use cairo font engine? - if (text) - text->updateFont(state); - - currentFont = fontEngine->getFont (state->getFont(), doc, printing, xref); - - if (!currentFont) - return; - - font_face = currentFont->getFontFace(); - cairo_set_font_face (cairo, font_face); - - use_show_text_glyphs = state->getFont()->hasToUnicodeCMap() && - cairo_surface_has_show_text_glyphs (cairo_get_target (cairo)); - - double fontSize = state->getFontSize(); - double *m = state->getTextMat(); - /* NOTE: adjusting by a constant is hack. The correct solution - * is probably to use user-fonts and compute the scale on a per - * glyph basis instead of for the entire font */ - double w = currentFont->getSubstitutionCorrection(state->getFont()); - matrix.xx = m[0] * fontSize * state->getHorizScaling() * w; - matrix.yx = m[1] * fontSize * state->getHorizScaling() * w; - matrix.xy = -m[2] * fontSize; - matrix.yy = -m[3] * fontSize; - matrix.x0 = 0; - matrix.y0 = 0; - - LOG(printf ("font matrix: %f %f %f %f\n", matrix.xx, matrix.yx, matrix.xy, matrix.yy)); - - /* Make sure the font matrix is invertible before setting it. cairo - * will blow up if we give it a matrix that's not invertible, so we - * need to check before passing it to cairo_set_font_matrix. Ignoring it - * is likely to give better results than not rendering anything at - * all. See #18254. - */ - invert_matrix = matrix; - if (cairo_matrix_invert(&invert_matrix)) { - error(errSyntaxWarning, -1, "font matrix not invertible"); - text_matrix_valid = gFalse; - return; - } - - cairo_set_font_matrix (cairo, &matrix); - text_matrix_valid = gTrue; -} - -/* Tolerance in pixels for checking if strokes are horizontal or vertical - * lines in device space */ -#define STROKE_COORD_TOLERANCE 0.5 - -/* Align stroke coordinate i if the point is the start or end of a - * horizontal or vertical line */ -void CairoOutputDev::alignStrokeCoords(GfxSubpath *subpath, int i, double *x, double *y) -{ - double x1, y1, x2, y2; - GBool align = gFalse; - - x1 = subpath->getX(i); - y1 = subpath->getY(i); - cairo_user_to_device (cairo, &x1, &y1); - - // Does the current coord and prev coord form a horiz or vert line? - if (i > 0 && !subpath->getCurve(i - 1)) { - x2 = subpath->getX(i - 1); - y2 = subpath->getY(i - 1); - cairo_user_to_device (cairo, &x2, &y2); - if (fabs(x2 - x1) < STROKE_COORD_TOLERANCE || fabs(y2 - y1) < STROKE_COORD_TOLERANCE) - align = gTrue; - } - - // Does the current coord and next coord form a horiz or vert line? - if (i < subpath->getNumPoints() - 1 && !subpath->getCurve(i + 1)) { - x2 = subpath->getX(i + 1); - y2 = subpath->getY(i + 1); - cairo_user_to_device (cairo, &x2, &y2); - if (fabs(x2 - x1) < STROKE_COORD_TOLERANCE || fabs(y2 - y1) < STROKE_COORD_TOLERANCE) - align = gTrue; - } - - *x = subpath->getX(i); - *y = subpath->getY(i); - if (align) { - /* see http://www.cairographics.org/FAQ/#sharp_lines */ - cairo_user_to_device (cairo, x, y); - *x = floor(*x) + 0.5; - *y = floor(*y) + 0.5; - cairo_device_to_user (cairo, x, y); - } -} - -#undef STROKE_COORD_TOLERANCE - -void CairoOutputDev::doPath(cairo_t *cairo, GfxState *state, GfxPath *path) { - GfxSubpath *subpath; - int i, j; - double x, y; - cairo_new_path (cairo); - for (i = 0; i < path->getNumSubpaths(); ++i) { - subpath = path->getSubpath(i); - if (subpath->getNumPoints() > 0) { - if (align_stroke_coords) { - alignStrokeCoords(subpath, 0, &x, &y); - } else { - x = subpath->getX(0); - y = subpath->getY(0); - } - cairo_move_to (cairo, x, y); - j = 1; - while (j < subpath->getNumPoints()) { - if (subpath->getCurve(j)) { - if (align_stroke_coords) { - alignStrokeCoords(subpath, j + 2, &x, &y); - } else { - x = subpath->getX(j+2); - y = subpath->getY(j+2); - } - cairo_curve_to( cairo, - subpath->getX(j), subpath->getY(j), - subpath->getX(j+1), subpath->getY(j+1), - x, y); - - j += 3; - } else { - if (align_stroke_coords) { - alignStrokeCoords(subpath, j, &x, &y); - } else { - x = subpath->getX(j); - y = subpath->getY(j); - } - cairo_line_to (cairo, x, y); - ++j; - } - } - if (subpath->isClosed()) { - LOG (printf ("close\n")); - cairo_close_path (cairo); - } - } - } -} - -void CairoOutputDev::stroke(GfxState *state) { - if (inType3Char) { - GfxGray gray; - state->getFillGray(&gray); - if (colToDbl(gray) > 0.5) - return; - } - - if (adjusted_stroke_width) - align_stroke_coords = gTrue; - doPath (cairo, state, state->getPath()); - align_stroke_coords = gFalse; - cairo_set_source (cairo, stroke_pattern); - LOG(printf ("stroke\n")); - if (strokePathClip) { - cairo_push_group (cairo); - cairo_stroke (cairo); - cairo_pop_group_to_source (cairo); - fillToStrokePathClip (state); - } else { - cairo_stroke (cairo); - } - if (cairo_shape) { - doPath (cairo_shape, state, state->getPath()); - cairo_stroke (cairo_shape); - } -} - -void CairoOutputDev::fill(GfxState *state) { - if (inType3Char) { - GfxGray gray; - state->getFillGray(&gray); - if (colToDbl(gray) > 0.5) - return; - } - - doPath (cairo, state, state->getPath()); - cairo_set_fill_rule (cairo, CAIRO_FILL_RULE_WINDING); - cairo_set_source (cairo, fill_pattern); - LOG(printf ("fill\n")); - //XXX: how do we get the path - if (mask) { - cairo_save (cairo); - cairo_clip (cairo); - if (strokePathClip) { - cairo_push_group (cairo); - fillToStrokePathClip (state); - cairo_pop_group_to_source (cairo); - } - cairo_set_matrix (cairo, &mask_matrix); - cairo_mask (cairo, mask); - cairo_restore (cairo); - } else if (strokePathClip) { - fillToStrokePathClip(state); - } else { - cairo_fill (cairo); - } - if (cairo_shape) { - cairo_set_fill_rule (cairo_shape, CAIRO_FILL_RULE_WINDING); - doPath (cairo_shape, state, state->getPath()); - cairo_fill (cairo_shape); - } -} - -void CairoOutputDev::eoFill(GfxState *state) { - doPath (cairo, state, state->getPath()); - cairo_set_fill_rule (cairo, CAIRO_FILL_RULE_EVEN_ODD); - cairo_set_source (cairo, fill_pattern); - LOG(printf ("fill-eo\n")); - - if (mask) { - cairo_save (cairo); - cairo_clip (cairo); - cairo_set_matrix (cairo, &mask_matrix); - cairo_mask (cairo, mask); - cairo_restore (cairo); - } else { - cairo_fill (cairo); - } - if (cairo_shape) { - cairo_set_fill_rule (cairo_shape, CAIRO_FILL_RULE_EVEN_ODD); - doPath (cairo_shape, state, state->getPath()); - cairo_fill (cairo_shape); - } - -} - -GBool CairoOutputDev::tilingPatternFill(GfxState *state, Gfx *gfxA, Catalog *cat, Object *str, - double *pmat, int paintType, int /*tilingType*/, Dict *resDict, - double *mat, double *bbox, - int x0, int y0, int x1, int y1, - double xStep, double yStep) -{ - PDFRectangle box; - Gfx *gfx; - cairo_pattern_t *pattern; - cairo_surface_t *surface; - cairo_matrix_t matrix; - cairo_matrix_t pattern_matrix; - cairo_t *old_cairo; - double xMin, yMin, xMax, yMax; - double width, height; - double scaleX, scaleY; - int surface_width, surface_height; - StrokePathClip *strokePathTmp; - GBool adjusted_stroke_width_tmp; - cairo_pattern_t *maskTmp; - - width = bbox[2] - bbox[0]; - height = bbox[3] - bbox[1]; - - if (xStep != width || yStep != height) - return gFalse; - /* TODO: implement the other cases here too */ - - // Find the width and height of the transformed pattern - cairo_get_matrix (cairo, &matrix); - cairo_matrix_init (&pattern_matrix, mat[0], mat[1], mat[2], mat[3], mat[4], mat[5]); - cairo_matrix_multiply (&matrix, &matrix, &pattern_matrix); - - double widthX = width, widthY = 0; - cairo_matrix_transform_distance (&matrix, &widthX, &widthY); - surface_width = ceil (sqrt (widthX * widthX + widthY * widthY)); - - double heightX = 0, heightY = height; - cairo_matrix_transform_distance (&matrix, &heightX, &heightY); - surface_height = ceil (sqrt (heightX * heightX + heightY * heightY)); - scaleX = surface_width / width; - scaleY = surface_height / height; - - surface = cairo_surface_create_similar (cairo_get_target (cairo), - CAIRO_CONTENT_COLOR_ALPHA, - surface_width, surface_height); - if (cairo_surface_status (surface)) - return gFalse; - - old_cairo = cairo; - cairo = cairo_create (surface); - cairo_surface_destroy (surface); - setContextAntialias(cairo, antialias); - - box.x1 = bbox[0]; box.y1 = bbox[1]; - box.x2 = bbox[2]; box.y2 = bbox[3]; - cairo_scale (cairo, scaleX, scaleY); - cairo_translate (cairo, -box.x1, -box.y1); - - strokePathTmp = strokePathClip; - strokePathClip = nullptr; - adjusted_stroke_width_tmp = adjusted_stroke_width; - maskTmp = mask; - mask = nullptr; - gfx = new Gfx(doc, this, resDict, &box, nullptr, nullptr, nullptr, gfxA); - if (paintType == 2) - inUncoloredPattern = gTrue; - gfx->display(str); - if (paintType == 2) - inUncoloredPattern = gFalse; - delete gfx; - strokePathClip = strokePathTmp; - adjusted_stroke_width = adjusted_stroke_width_tmp; - mask = maskTmp; - - pattern = cairo_pattern_create_for_surface (cairo_get_target (cairo)); - cairo_destroy (cairo); - cairo = old_cairo; - if (cairo_pattern_status (pattern)) - return gFalse; - - state->getUserClipBBox(&xMin, &yMin, &xMax, &yMax); - cairo_rectangle (cairo, xMin, yMin, xMax - xMin, yMax - yMin); - - cairo_matrix_init_scale (&matrix, scaleX, scaleY); - cairo_matrix_translate (&matrix, -box.x1, -box.y1); - cairo_pattern_set_matrix (pattern, &matrix); - - cairo_transform (cairo, &pattern_matrix); - cairo_set_source (cairo, pattern); - cairo_pattern_set_extend (pattern, CAIRO_EXTEND_REPEAT); - if (strokePathClip) { - fillToStrokePathClip(state); - } else { - cairo_fill (cairo); - } - - cairo_pattern_destroy (pattern); - - return gTrue; -} - -#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 12, 0) -GBool CairoOutputDev::functionShadedFill(GfxState *state, GfxFunctionShading *shading) -{ - // Function shaded fills are subdivided to rectangles that are the - // following size in device space. Note when printing this size is - // in points. - const int subdivide_pixels = 10; - - double x_begin, x_end, x1, x2; - double y_begin, y_end, y1, y2; - double x_step; - double y_step; - GfxColor color; - GfxRGB rgb; - double *matrix; - cairo_matrix_t mat; - - matrix = shading->getMatrix(); - mat.xx = matrix[0]; - mat.yx = matrix[1]; - mat.xy = matrix[2]; - mat.yy = matrix[3]; - mat.x0 = matrix[4]; - mat.y0 = matrix[5]; - if (cairo_matrix_invert(&mat)) { - error(errSyntaxWarning, -1, "matrix not invertible\n"); - return gFalse; - } - - // get cell size in pattern space - x_step = y_step = subdivide_pixels; - cairo_matrix_transform_distance (&mat, &x_step, &y_step); - - cairo_pattern_destroy(fill_pattern); - fill_pattern = cairo_pattern_create_mesh (); - cairo_pattern_set_matrix(fill_pattern, &mat); - shading->getDomain(&x_begin, &y_begin, &x_end, &y_end); - - for (x1 = x_begin; x1 < x_end; x1 += x_step) { - x2 = x1 + x_step; - if (x2 > x_end) - x2 = x_end; - - for (y1 = y_begin; y1 < y_end; y1 += y_step) { - y2 = y1 + y_step; - if (y2 > y_end) - y2 = y_end; - - cairo_mesh_pattern_begin_patch (fill_pattern); - cairo_mesh_pattern_move_to (fill_pattern, x1, y1); - cairo_mesh_pattern_line_to (fill_pattern, x2, y1); - cairo_mesh_pattern_line_to (fill_pattern, x2, y2); - cairo_mesh_pattern_line_to (fill_pattern, x1, y2); - - shading->getColor(x1, y1, &color); - shading->getColorSpace()->getRGB(&color, &rgb); - cairo_mesh_pattern_set_corner_color_rgb (fill_pattern, 0, - colToDbl(rgb.r), - colToDbl(rgb.g), - colToDbl(rgb.b)); - - shading->getColor(x2, y1, &color); - shading->getColorSpace()->getRGB(&color, &rgb); - cairo_mesh_pattern_set_corner_color_rgb (fill_pattern, 1, - colToDbl(rgb.r), - colToDbl(rgb.g), - colToDbl(rgb.b)); - - shading->getColor(x2, y2, &color); - shading->getColorSpace()->getRGB(&color, &rgb); - cairo_mesh_pattern_set_corner_color_rgb (fill_pattern, 2, - colToDbl(rgb.r), - colToDbl(rgb.g), - colToDbl(rgb.b)); - - shading->getColor(x1, y2, &color); - shading->getColorSpace()->getRGB(&color, &rgb); - cairo_mesh_pattern_set_corner_color_rgb (fill_pattern, 3, - colToDbl(rgb.r), - colToDbl(rgb.g), - colToDbl(rgb.b)); - - cairo_mesh_pattern_end_patch (fill_pattern); - } - } - - double xMin, yMin, xMax, yMax; - // get the clip region bbox - state->getUserClipBBox(&xMin, &yMin, &xMax, &yMax); - state->moveTo(xMin, yMin); - state->lineTo(xMin, yMax); - state->lineTo(xMax, yMax); - state->lineTo(xMax, yMin); - state->closePath(); - fill(state); - state->clearPath(); - - return gTrue; -} -#endif /* CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 12, 0) */ - -GBool CairoOutputDev::axialShadedFill(GfxState *state, GfxAxialShading *shading, double tMin, double tMax) { - double x0, y0, x1, y1; - double dx, dy; - - shading->getCoords(&x0, &y0, &x1, &y1); - dx = x1 - x0; - dy = y1 - y0; - - cairo_pattern_destroy(fill_pattern); - fill_pattern = cairo_pattern_create_linear (x0 + tMin * dx, y0 + tMin * dy, - x0 + tMax * dx, y0 + tMax * dy); - if (!shading->getExtend0() && !shading->getExtend1()) - cairo_pattern_set_extend (fill_pattern, CAIRO_EXTEND_NONE); - else - cairo_pattern_set_extend (fill_pattern, CAIRO_EXTEND_PAD); - - LOG (printf ("axial-sh\n")); - - // TODO: use the actual stops in the shading in the case - // of linear interpolation (Type 2 Exponential functions with N=1) - return gFalse; -} - -GBool CairoOutputDev::axialShadedSupportExtend(GfxState *state, GfxAxialShading *shading) -{ - return (shading->getExtend0() == shading->getExtend1()); -} - -GBool CairoOutputDev::radialShadedFill(GfxState *state, GfxRadialShading *shading, double sMin, double sMax) { - double x0, y0, r0, x1, y1, r1; - double dx, dy, dr; - cairo_matrix_t matrix; - double scale; - - shading->getCoords(&x0, &y0, &r0, &x1, &y1, &r1); - dx = x1 - x0; - dy = y1 - y0; - dr = r1 - r0; - - // Cairo/pixman do not work well with a very large or small scaled - // matrix. See cairo bug #81657. - // - // As a workaround, scale the pattern by the average of the vertical - // and horizontal scaling of the current transformation matrix. - cairo_get_matrix(cairo, &matrix); - scale = (sqrt(matrix.xx * matrix.xx + matrix.yx * matrix.yx) - + sqrt(matrix.xy * matrix.xy + matrix.yy * matrix.yy)) / 2; - cairo_matrix_init_scale(&matrix, scale, scale); - - cairo_pattern_destroy(fill_pattern); - fill_pattern = cairo_pattern_create_radial ((x0 + sMin * dx) * scale, - (y0 + sMin * dy) * scale, - (r0 + sMin * dr) * scale, - (x0 + sMax * dx) * scale, - (y0 + sMax * dy) * scale, - (r0 + sMax * dr) * scale); - cairo_pattern_set_matrix(fill_pattern, &matrix); - if (shading->getExtend0() && shading->getExtend1()) - cairo_pattern_set_extend (fill_pattern, CAIRO_EXTEND_PAD); - else - cairo_pattern_set_extend (fill_pattern, CAIRO_EXTEND_NONE); - - LOG (printf ("radial-sh\n")); - - return gFalse; -} - -GBool CairoOutputDev::radialShadedSupportExtend(GfxState *state, GfxRadialShading *shading) -{ - return (shading->getExtend0() == shading->getExtend1()); -} - -#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 12, 0) -GBool CairoOutputDev::gouraudTriangleShadedFill(GfxState *state, GfxGouraudTriangleShading *shading) -{ - double x0, y0, x1, y1, x2, y2; - GfxColor color[3]; - int i, j; - GfxRGB rgb; - - cairo_pattern_destroy(fill_pattern); - fill_pattern = cairo_pattern_create_mesh (); - - for (i = 0; i < shading->getNTriangles(); i++) { - if (shading->isParameterized()) { - double color0, color1, color2; - shading->getTriangle(i, &x0, &y0, &color0, - &x1, &y1, &color1, - &x2, &y2, &color2); - shading->getParameterizedColor(color0, &color[0]); - shading->getParameterizedColor(color1, &color[1]); - shading->getParameterizedColor(color2, &color[2]); - } else { - shading->getTriangle(i, - &x0, &y0, &color[0], - &x1, &y1, &color[1], - &x2, &y2, &color[2]); - - } - - cairo_mesh_pattern_begin_patch (fill_pattern); - - cairo_mesh_pattern_move_to (fill_pattern, x0, y0); - cairo_mesh_pattern_line_to (fill_pattern, x1, y1); - cairo_mesh_pattern_line_to (fill_pattern, x2, y2); - - for (j = 0; j < 3; j++) { - shading->getColorSpace()->getRGB(&color[j], &rgb); - cairo_mesh_pattern_set_corner_color_rgb (fill_pattern, j, - colToDbl(rgb.r), - colToDbl(rgb.g), - colToDbl(rgb.b)); - } - - cairo_mesh_pattern_end_patch (fill_pattern); - } - - double xMin, yMin, xMax, yMax; - // get the clip region bbox - state->getUserClipBBox(&xMin, &yMin, &xMax, &yMax); - state->moveTo(xMin, yMin); - state->lineTo(xMin, yMax); - state->lineTo(xMax, yMax); - state->lineTo(xMax, yMin); - state->closePath(); - fill(state); - state->clearPath(); - - return gTrue; -} - -GBool CairoOutputDev::patchMeshShadedFill(GfxState *state, GfxPatchMeshShading *shading) -{ - int i, j, k; - - cairo_pattern_destroy(fill_pattern); - fill_pattern = cairo_pattern_create_mesh (); - - for (i = 0; i < shading->getNPatches(); i++) { - GfxPatch *patch = shading->getPatch(i); - GfxColor color; - GfxRGB rgb; - - cairo_mesh_pattern_begin_patch (fill_pattern); - - cairo_mesh_pattern_move_to (fill_pattern, patch->x[0][0], patch->y[0][0]); - cairo_mesh_pattern_curve_to (fill_pattern, - patch->x[0][1], patch->y[0][1], - patch->x[0][2], patch->y[0][2], - patch->x[0][3], patch->y[0][3]); - - cairo_mesh_pattern_curve_to (fill_pattern, - patch->x[1][3], patch->y[1][3], - patch->x[2][3], patch->y[2][3], - patch->x[3][3], patch->y[3][3]); - - cairo_mesh_pattern_curve_to (fill_pattern, - patch->x[3][2], patch->y[3][2], - patch->x[3][1], patch->y[3][1], - patch->x[3][0], patch->y[3][0]); - - cairo_mesh_pattern_curve_to (fill_pattern, - patch->x[2][0], patch->y[2][0], - patch->x[1][0], patch->y[1][0], - patch->x[0][0], patch->y[0][0]); - - cairo_mesh_pattern_set_control_point (fill_pattern, 0, patch->x[1][1], patch->y[1][1]); - cairo_mesh_pattern_set_control_point (fill_pattern, 1, patch->x[1][2], patch->y[1][2]); - cairo_mesh_pattern_set_control_point (fill_pattern, 2, patch->x[2][2], patch->y[2][2]); - cairo_mesh_pattern_set_control_point (fill_pattern, 3, patch->x[2][1], patch->y[2][1]); - - for (j = 0; j < 4; j++) { - int u, v; - - switch (j) { - case 0: - u = 0; v = 0; - break; - case 1: - u = 0; v = 1; - break; - case 2: - u = 1; v = 1; - break; - case 3: - u = 1; v = 0; - break; - } - - if (shading->isParameterized()) { - shading->getParameterizedColor (patch->color[u][v].c[0], &color); - } else { - for (k = 0; k < shading->getColorSpace()->getNComps(); k++) { - // simply cast to the desired type; that's all what is needed. - color.c[k] = GfxColorComp (patch->color[u][v].c[k]); - } - } - - shading->getColorSpace()->getRGB(&color, &rgb); - cairo_mesh_pattern_set_corner_color_rgb (fill_pattern, j, - colToDbl(rgb.r), - colToDbl(rgb.g), - colToDbl(rgb.b)); - } - cairo_mesh_pattern_end_patch (fill_pattern); - } - - double xMin, yMin, xMax, yMax; - // get the clip region bbox - state->getUserClipBBox(&xMin, &yMin, &xMax, &yMax); - state->moveTo(xMin, yMin); - state->lineTo(xMin, yMax); - state->lineTo(xMax, yMax); - state->lineTo(xMax, yMin); - state->closePath(); - fill(state); - state->clearPath(); - - return gTrue; -} -#endif /* CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 12, 0) */ - -void CairoOutputDev::clip(GfxState *state) { - doPath (cairo, state, state->getPath()); - cairo_set_fill_rule (cairo, CAIRO_FILL_RULE_WINDING); - cairo_clip (cairo); - LOG (printf ("clip\n")); - if (cairo_shape) { - doPath (cairo_shape, state, state->getPath()); - cairo_set_fill_rule (cairo_shape, CAIRO_FILL_RULE_WINDING); - cairo_clip (cairo_shape); - } -} - -void CairoOutputDev::eoClip(GfxState *state) { - doPath (cairo, state, state->getPath()); - cairo_set_fill_rule (cairo, CAIRO_FILL_RULE_EVEN_ODD); - cairo_clip (cairo); - LOG (printf ("clip-eo\n")); - if (cairo_shape) { - doPath (cairo_shape, state, state->getPath()); - cairo_set_fill_rule (cairo_shape, CAIRO_FILL_RULE_EVEN_ODD); - cairo_clip (cairo_shape); - } - -} - -void CairoOutputDev::clipToStrokePath(GfxState *state) { - LOG(printf("clip-to-stroke-path\n")); - strokePathClip = (StrokePathClip*)gmalloc (sizeof(*strokePathClip)); - strokePathClip->path = state->getPath()->copy(); - cairo_get_matrix (cairo, &strokePathClip->ctm); - strokePathClip->line_width = cairo_get_line_width (cairo); - strokePathClip->dash_count = cairo_get_dash_count (cairo); - if (strokePathClip->dash_count) { - strokePathClip->dashes = (double*) gmallocn (sizeof(double), strokePathClip->dash_count); - cairo_get_dash (cairo, strokePathClip->dashes, &strokePathClip->dash_offset); - } else { - strokePathClip->dashes = nullptr; - } - strokePathClip->cap = cairo_get_line_cap (cairo); - strokePathClip->join = cairo_get_line_join (cairo); - strokePathClip->miter = cairo_get_miter_limit (cairo); - strokePathClip->ref_count = 1; -} - -void CairoOutputDev::fillToStrokePathClip(GfxState *state) { - cairo_save (cairo); - - cairo_set_matrix (cairo, &strokePathClip->ctm); - cairo_set_line_width (cairo, strokePathClip->line_width); - cairo_set_dash (cairo, strokePathClip->dashes, strokePathClip->dash_count, strokePathClip->dash_offset); - cairo_set_line_cap (cairo, strokePathClip->cap); - cairo_set_line_join (cairo, strokePathClip->join); - cairo_set_miter_limit (cairo, strokePathClip->miter); - doPath (cairo, state, strokePathClip->path); - cairo_stroke (cairo); - - cairo_restore (cairo); -} - -void CairoOutputDev::beginString(GfxState *state, const GooString *s) -{ - int len = s->getLength(); - - if (needFontUpdate) - updateFont(state); - - if (!currentFont) - return; - - glyphs = (cairo_glyph_t *) gmallocn (len, sizeof (cairo_glyph_t)); - glyphCount = 0; - if (use_show_text_glyphs) { - clusters = (cairo_text_cluster_t *) gmallocn (len, sizeof (cairo_text_cluster_t)); - clusterCount = 0; - utf8Max = len*2; // start with twice the number of glyphs. we will realloc if we need more. - utf8 = (char *) gmalloc (utf8Max); - utf8Count = 0; - } -} - -void CairoOutputDev::drawChar(GfxState *state, double x, double y, - double dx, double dy, - double originX, double originY, - CharCode code, int nBytes, Unicode *u, int uLen) -{ - if (currentFont) { - glyphs[glyphCount].index = currentFont->getGlyph (code, u, uLen); - glyphs[glyphCount].x = x - originX; - glyphs[glyphCount].y = y - originY; - glyphCount++; - if (use_show_text_glyphs) { - GooString enc("UTF-8"); - UnicodeMap *utf8Map = globalParams->getUnicodeMap(&enc); - if (utf8Max - utf8Count < uLen*6) { - // utf8 encoded characters can be up to 6 bytes - if (utf8Max > uLen*6) - utf8Max *= 2; - else - utf8Max += 2*uLen*6; - utf8 = (char *) grealloc (utf8, utf8Max); - } - clusters[clusterCount].num_bytes = 0; - for (int i = 0; i < uLen; i++) { - int size = utf8Map->mapUnicode(u[i], utf8 + utf8Count, utf8Max - utf8Count); - utf8Count += size; - clusters[clusterCount].num_bytes += size; - } - clusters[clusterCount].num_glyphs = 1; - clusterCount++; - } - } - - if (!text) - return; - actualText->addChar (state, x, y, dx, dy, code, nBytes, u, uLen); -} - -void CairoOutputDev::endString(GfxState *state) -{ - int render; - - if (!currentFont) - return; - - // endString can be called without a corresponding beginString. If this - // happens glyphs will be null so don't draw anything, just return. - // XXX: OutputDevs should probably not have to deal with this... - if (!glyphs) - return; - - // ignore empty strings and invisible text -- this is used by - // Acrobat Capture - render = state->getRender(); - if (render == 3 || glyphCount == 0 || !text_matrix_valid) { - goto finish; - } - - if (!(render & 1)) { - LOG (printf ("fill string\n")); - cairo_set_source (cairo, fill_pattern); - if (use_show_text_glyphs) - cairo_show_text_glyphs (cairo, utf8, utf8Count, glyphs, glyphCount, clusters, clusterCount, (cairo_text_cluster_flags_t)0); - else - cairo_show_glyphs (cairo, glyphs, glyphCount); - if (cairo_shape) - cairo_show_glyphs (cairo_shape, glyphs, glyphCount); - } - - // stroke - if ((render & 3) == 1 || (render & 3) == 2) { - LOG (printf ("stroke string\n")); - cairo_set_source (cairo, stroke_pattern); - cairo_glyph_path (cairo, glyphs, glyphCount); - cairo_stroke (cairo); - if (cairo_shape) { - cairo_glyph_path (cairo_shape, glyphs, glyphCount); - cairo_stroke (cairo_shape); - } - } - - // clip - if ((render & 4)) { - LOG (printf ("clip string\n")); - // append the glyph path to textClipPath. - - // set textClipPath as the currentPath - if (textClipPath) { - cairo_append_path (cairo, textClipPath); - if (cairo_shape) { - cairo_append_path (cairo_shape, textClipPath); - } - cairo_path_destroy (textClipPath); - } - - // append the glyph path - cairo_glyph_path (cairo, glyphs, glyphCount); - - // move the path back into textClipPath - // and clear the current path - textClipPath = cairo_copy_path (cairo); - cairo_new_path (cairo); - if (cairo_shape) { - cairo_new_path (cairo_shape); - } - } - -finish: - gfree (glyphs); - glyphs = nullptr; - if (use_show_text_glyphs) { - gfree (clusters); - clusters = nullptr; - gfree (utf8); - utf8 = nullptr; - } -} - - -GBool CairoOutputDev::beginType3Char(GfxState *state, double x, double y, - double dx, double dy, - CharCode code, Unicode *u, int uLen) { - - cairo_save (cairo); - double *ctm; - cairo_matrix_t matrix; - - ctm = state->getCTM(); - matrix.xx = ctm[0]; - matrix.yx = ctm[1]; - matrix.xy = ctm[2]; - matrix.yy = ctm[3]; - matrix.x0 = ctm[4]; - matrix.y0 = ctm[5]; - /* Restore the original matrix and then transform to matrix needed for the - * type3 font. This is ugly but seems to work. Perhaps there is a better way to do it?*/ - cairo_set_matrix(cairo, &orig_matrix); - cairo_transform(cairo, &matrix); - if (cairo_shape) { - cairo_save (cairo_shape); - cairo_set_matrix(cairo_shape, &orig_matrix); - cairo_transform(cairo_shape, &matrix); - } - cairo_pattern_destroy(stroke_pattern); - cairo_pattern_reference(fill_pattern); - stroke_pattern = fill_pattern; - return gFalse; -} - -void CairoOutputDev::endType3Char(GfxState *state) { - cairo_restore (cairo); - if (cairo_shape) { - cairo_restore (cairo_shape); - } -} - -void CairoOutputDev::type3D0(GfxState *state, double wx, double wy) { - t3_glyph_wx = wx; - t3_glyph_wy = wy; -} - -void CairoOutputDev::type3D1(GfxState *state, double wx, double wy, - double llx, double lly, double urx, double ury) { - t3_glyph_wx = wx; - t3_glyph_wy = wy; - t3_glyph_bbox[0] = llx; - t3_glyph_bbox[1] = lly; - t3_glyph_bbox[2] = urx; - t3_glyph_bbox[3] = ury; - t3_glyph_has_bbox = gTrue; -} - -void CairoOutputDev::beginTextObject(GfxState *state) { -} - -void CairoOutputDev::endTextObject(GfxState *state) { - if (textClipPath) { - // clip the accumulated text path - cairo_append_path (cairo, textClipPath); - cairo_clip (cairo); - if (cairo_shape) { - cairo_append_path (cairo_shape, textClipPath); - cairo_clip (cairo_shape); - } - cairo_path_destroy (textClipPath); - textClipPath = nullptr; - } -} - -void CairoOutputDev::beginActualText(GfxState *state, const GooString *text) -{ - if (this->text) - actualText->begin(state, text); -} - -void CairoOutputDev::endActualText(GfxState *state) -{ - if (text) - actualText->end(state); -} - -static inline int splashRound(SplashCoord x) { - return (int)floor(x + 0.5); -} - -static inline int splashCeil(SplashCoord x) { - return (int)ceil(x); -} - -static inline int splashFloor(SplashCoord x) { - return (int)floor(x); -} - -static -cairo_surface_t *cairo_surface_create_similar_clip (cairo_t *cairo, cairo_content_t content) -{ - cairo_pattern_t *pattern; - cairo_surface_t *surface = nullptr; - - cairo_push_group_with_content (cairo, content); - pattern = cairo_pop_group (cairo); - cairo_pattern_get_surface (pattern, &surface); - cairo_surface_reference (surface); - cairo_pattern_destroy (pattern); - return surface; -} - - - -void CairoOutputDev::beginTransparencyGroup(GfxState * /*state*/, double * /*bbox*/, - GfxColorSpace * blendingColorSpace, - GBool /*isolated*/, GBool knockout, - GBool forSoftMask) { - /* push color space */ - ColorSpaceStack* css = new ColorSpaceStack; - css->cs = blendingColorSpace; - css->knockout = knockout; - cairo_get_matrix(cairo, &css->group_matrix); - css->next = groupColorSpaceStack; - groupColorSpaceStack = css; - - LOG(printf ("begin transparency group. knockout: %s\n", knockout ? "yes":"no")); - - if (knockout) { - knockoutCount++; - if (!cairo_shape) { - /* create a surface for tracking the shape */ - cairo_surface_t *cairo_shape_surface = cairo_surface_create_similar_clip (cairo, CAIRO_CONTENT_ALPHA); - cairo_shape = cairo_create (cairo_shape_surface); - cairo_surface_destroy (cairo_shape_surface); - setContextAntialias(cairo_shape, antialias); - - /* the color doesn't matter as long as it is opaque */ - cairo_set_source_rgb (cairo_shape, 0, 0, 0); - cairo_matrix_t matrix; - cairo_get_matrix (cairo, &matrix); - //printMatrix(&matrix); - cairo_set_matrix (cairo_shape, &matrix); - } - } - if (groupColorSpaceStack->next && groupColorSpaceStack->next->knockout) { - /* we need to track the shape */ - cairo_push_group (cairo_shape); - } - if (0 && forSoftMask) - cairo_push_group_with_content (cairo, CAIRO_CONTENT_ALPHA); - else - cairo_push_group (cairo); - - /* push_group has an implicit cairo_save() */ - if (knockout) { - /*XXX: let's hope this matches the semantics needed */ - cairo_set_operator(cairo, CAIRO_OPERATOR_SOURCE); - } else { - cairo_set_operator(cairo, CAIRO_OPERATOR_OVER); - } -} - -void CairoOutputDev::endTransparencyGroup(GfxState * /*state*/) { - if (group) - cairo_pattern_destroy(group); - group = cairo_pop_group (cairo); - - LOG(printf ("end transparency group\n")); - - if (groupColorSpaceStack->next && groupColorSpaceStack->next->knockout) { - if (shape) - cairo_pattern_destroy(shape); - shape = cairo_pop_group (cairo_shape); - } -} - -void CairoOutputDev::paintTransparencyGroup(GfxState * /*state*/, double * /*bbox*/) { - LOG(printf ("paint transparency group\n")); - - cairo_save (cairo); - cairo_set_matrix (cairo, &groupColorSpaceStack->group_matrix); - - if (shape) { - /* OPERATOR_SOURCE w/ a mask is defined as (src IN mask) ADD (dest OUT mask) - * however our source has already been clipped to mask so we only need to - * do ADD and OUT */ - - /* clear the shape mask */ - cairo_set_source (cairo, shape); - cairo_set_operator (cairo, CAIRO_OPERATOR_DEST_OUT); - cairo_paint (cairo); - cairo_set_operator (cairo, CAIRO_OPERATOR_ADD); - } - cairo_set_source (cairo, group); - - if (!mask) { - cairo_paint_with_alpha (cairo, fill_opacity); - cairo_status_t status = cairo_status(cairo); - if (status) - printf("BAD status: %s\n", cairo_status_to_string(status)); - } else { - if (fill_opacity < 1.0) { - cairo_push_group(cairo); - } - cairo_save(cairo); - cairo_set_matrix(cairo, &mask_matrix); - cairo_mask(cairo, mask); - cairo_restore(cairo); - if (fill_opacity < 1.0) { - cairo_pop_group_to_source(cairo); - cairo_paint_with_alpha (cairo, fill_opacity); - } - cairo_pattern_destroy(mask); - mask = nullptr; - } - - if (shape) { - if (cairo_shape) { - cairo_set_source (cairo_shape, shape); - cairo_paint (cairo_shape); - cairo_set_source_rgb (cairo_shape, 0, 0, 0); - } - cairo_pattern_destroy (shape); - shape = nullptr; - } - - popTransparencyGroup(); - cairo_restore(cairo); -} - -static int luminocity(uint32_t x) -{ - int r = (x >> 16) & 0xff; - int g = (x >> 8) & 0xff; - int b = (x >> 0) & 0xff; - // an arbitrary integer approximation of .3*r + .59*g + .11*b - int y = (r*19661+g*38666+b*7209 + 32829)>>16; - return y; -} - - -/* XXX: do we need to deal with shape here? */ -void CairoOutputDev::setSoftMask(GfxState * state, double * bbox, GBool alpha, - Function * transferFunc, GfxColor * backdropColor) { - cairo_pattern_destroy(mask); - - LOG(printf ("set softMask\n")); - - if (!alpha || transferFunc) { - /* We need to mask according to the luminocity of the group. - * So we paint the group to an image surface convert it to a luminocity map - * and then use that as the mask. */ - - /* Get clip extents in device space */ - double x1, y1, x2, y2, x_min, y_min, x_max, y_max; - cairo_clip_extents(cairo, &x1, &y1, &x2, &y2); - cairo_user_to_device(cairo, &x1, &y1); - cairo_user_to_device(cairo, &x2, &y2); - x_min = MIN(x1, x2); - y_min = MIN(y1, y2); - x_max = MAX(x1, x2); - y_max = MAX(y1, y2); - cairo_clip_extents(cairo, &x1, &y1, &x2, &y2); - cairo_user_to_device(cairo, &x1, &y2); - cairo_user_to_device(cairo, &x2, &y1); - x_min = MIN(x_min,MIN(x1, x2)); - y_min = MIN(y_min,MIN(y1, y2)); - x_max = MAX(x_max,MAX(x1, x2)); - y_max = MAX(y_max,MAX(y1, y2)); - - int width = (int)(ceil(x_max) - floor(x_min)); - int height = (int)(ceil(y_max) - floor(y_min)); - - /* Get group device offset */ - double x_offset, y_offset; - if (cairo_get_group_target(cairo) == cairo_get_target(cairo)) { - cairo_surface_get_device_offset(cairo_get_group_target(cairo), &x_offset, &y_offset); - } else { - cairo_surface_t *pats; - cairo_pattern_get_surface(group, &pats); - cairo_surface_get_device_offset(pats, &x_offset, &y_offset); - } - - /* Adjust extents by group offset */ - x_min += x_offset; - y_min += y_offset; - - cairo_surface_t *source = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, width, height); - cairo_t *maskCtx = cairo_create(source); - setContextAntialias(maskCtx, antialias); - - //XXX: hopefully this uses the correct color space */ - if (!alpha && groupColorSpaceStack->cs) { - GfxRGB backdropColorRGB; - groupColorSpaceStack->cs->getRGB(backdropColor, &backdropColorRGB); - /* paint the backdrop */ - cairo_set_source_rgb(maskCtx, - colToDbl(backdropColorRGB.r), - colToDbl(backdropColorRGB.g), - colToDbl(backdropColorRGB.b)); - } - cairo_paint(maskCtx); - - /* Copy source ctm to mask ctm and translate origin so that the - * mask appears it the same location on the source surface. */ - cairo_matrix_t mat, tmat; - cairo_matrix_init_translate(&tmat, -x_min, -y_min); - cairo_get_matrix(cairo, &mat); - cairo_matrix_multiply(&mat, &mat, &tmat); - cairo_set_matrix(maskCtx, &mat); - - /* make the device offset of the new mask match that of the group */ - cairo_surface_set_device_offset(source, x_offset, y_offset); - - /* paint the group */ - cairo_set_source(maskCtx, group); - cairo_paint(maskCtx); - - /* XXX status = cairo_status(maskCtx); */ - cairo_destroy(maskCtx); - - /* convert to a luminocity map */ - uint32_t *source_data = (uint32_t*)cairo_image_surface_get_data(source); - /* get stride in units of 32 bits */ - ptrdiff_t stride = cairo_image_surface_get_stride(source)/4; - for (int y=0; y<height; y++) { - for (int x=0; x<width; x++) { - int lum = alpha ? fill_opacity : luminocity(source_data[y*stride + x]); - if (transferFunc) { - double lum_in, lum_out; - lum_in = lum/256.0; - transferFunc->transform(&lum_in, &lum_out); - lum = (int)(lum_out * 255.0 + 0.5); - } - source_data[y*stride + x] = lum << 24; - } - } - cairo_surface_mark_dirty (source); - - /* setup the new mask pattern */ - mask = cairo_pattern_create_for_surface(source); - cairo_get_matrix(cairo, &mask_matrix); - - if (cairo_get_group_target(cairo) == cairo_get_target(cairo)) { - cairo_pattern_set_matrix(mask, &mat); - } else { - cairo_matrix_t patMatrix; - cairo_pattern_get_matrix(group, &patMatrix); - /* Apply x_min, y_min offset to it appears in the same location as source. */ - cairo_matrix_multiply(&patMatrix, &patMatrix, &tmat); - cairo_pattern_set_matrix(mask, &patMatrix); - } - - cairo_surface_destroy(source); - } else if (alpha) { - mask = cairo_pattern_reference(group); - cairo_get_matrix(cairo, &mask_matrix); - } - - popTransparencyGroup(); -} - -void CairoOutputDev::popTransparencyGroup() { - /* pop color space */ - ColorSpaceStack *css = groupColorSpaceStack; - if (css->knockout) { - knockoutCount--; - if (!knockoutCount) { - /* we don't need to track the shape anymore because - * we are not above any knockout groups */ - cairo_destroy(cairo_shape); - cairo_shape = nullptr; - } - } - groupColorSpaceStack = css->next; - delete css; -} - - -void CairoOutputDev::clearSoftMask(GfxState * /*state*/) { - if (mask) - cairo_pattern_destroy(mask); - mask = nullptr; -} - -/* Taken from cairo/doc/tutorial/src/singular.c */ -static void -get_singular_values (const cairo_matrix_t *matrix, - double *major, - double *minor) -{ - double xx = matrix->xx, xy = matrix->xy; - double yx = matrix->yx, yy = matrix->yy; - - double a = xx*xx+yx*yx; - double b = xy*xy+yy*yy; - double k = xx*xy+yx*yy; - - double f = (a+b) * .5; - double g = (a-b) * .5; - double delta = sqrt (g*g + k*k); - - if (major) - *major = sqrt (f + delta); - if (minor) - *minor = sqrt (f - delta); -} - -void CairoOutputDev::getScaledSize(const cairo_matrix_t *matrix, - int orig_width, - int orig_height, - int *scaledWidth, - int *scaledHeight) -{ - double xScale; - double yScale; - if (orig_width > orig_height) - get_singular_values (matrix, &xScale, &yScale); - else - get_singular_values (matrix, &yScale, &xScale); - - int tx, tx2, ty, ty2; /* the integer co-oridinates of the resulting image */ - if (xScale >= 0) { - tx = splashRound(matrix->x0 - 0.01); - tx2 = splashRound(matrix->x0 + xScale + 0.01) - 1; - } else { - tx = splashRound(matrix->x0 + 0.01) - 1; - tx2 = splashRound(matrix->x0 + xScale - 0.01); - } - *scaledWidth = abs(tx2 - tx) + 1; - //scaledWidth = splashRound(fabs(xScale)); - if (*scaledWidth == 0) { - // technically, this should draw nothing, but it generally seems - // better to draw a one-pixel-wide stripe rather than throwing it - // away - *scaledWidth = 1; - } - if (yScale >= 0) { - ty = splashFloor(matrix->y0 + 0.01); - ty2 = splashCeil(matrix->y0 + yScale - 0.01); - } else { - ty = splashCeil(matrix->y0 - 0.01); - ty2 = splashFloor(matrix->y0 + yScale + 0.01); - } - *scaledHeight = abs(ty2 - ty); - if (*scaledHeight == 0) { - *scaledHeight = 1; - } -} - -cairo_filter_t -CairoOutputDev::getFilterForSurface(cairo_surface_t *image, - GBool interpolate) -{ - if (interpolate) - return CAIRO_FILTER_GOOD; - - int orig_width = cairo_image_surface_get_width (image); - int orig_height = cairo_image_surface_get_height (image); - if (orig_width == 0 || orig_height == 0) - return CAIRO_FILTER_NEAREST; - - /* When printing, don't change the interpolation. */ - if (printing) - return CAIRO_FILTER_NEAREST; - - cairo_matrix_t matrix; - cairo_get_matrix(cairo, &matrix); - int scaled_width, scaled_height; - getScaledSize (&matrix, orig_width, orig_height, &scaled_width, &scaled_height); - - /* When scale factor is >= 400% we don't interpolate. See bugs #25268, #9860 */ - if (scaled_width / orig_width >= 4 || scaled_height / orig_height >= 4) - return CAIRO_FILTER_NEAREST; - - return CAIRO_FILTER_GOOD; -} - -void CairoOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str, - int width, int height, GBool invert, - GBool interpolate, GBool inlineImg) { - - /* FIXME: Doesn't the image mask support any colorspace? */ - cairo_set_source (cairo, fill_pattern); - - /* work around a cairo bug when scaling 1x1 surfaces */ - if (width == 1 && height == 1) { - ImageStream *imgStr; - Guchar pix; - int invert_bit; - - imgStr = new ImageStream(str, width, 1, 1); - imgStr->reset(); - imgStr->getPixel(&pix); - imgStr->close(); - delete imgStr; - - invert_bit = invert ? 1 : 0; - if (pix ^ invert_bit) - return; - - cairo_save (cairo); - cairo_rectangle (cairo, 0., 0., width, height); - cairo_fill (cairo); - cairo_restore (cairo); - if (cairo_shape) { - cairo_save (cairo_shape); - cairo_rectangle (cairo_shape, 0., 0., width, height); - cairo_fill (cairo_shape); - cairo_restore (cairo_shape); - } - return; - } - - /* shape is 1.0 for painted areas, 0.0 for unpainted ones */ - - cairo_matrix_t matrix; - cairo_get_matrix (cairo, &matrix); - //XXX: it is possible that we should only do sub pixel positioning if - // we are rendering fonts */ - if (!printing && prescaleImages - /* not rotated */ - && matrix.xy == 0 && matrix.yx == 0 - /* axes not flipped / not 180 deg rotated */ - && matrix.xx > 0 && (upsideDown() ? -1 : 1) * matrix.yy > 0) { - drawImageMaskPrescaled(state, ref, str, width, height, invert, interpolate, inlineImg); - } else { - drawImageMaskRegular(state, ref, str, width, height, invert, interpolate, inlineImg); - } - -} - -void CairoOutputDev::setSoftMaskFromImageMask(GfxState *state, Object *ref, Stream *str, - int width, int height, GBool invert, - GBool inlineImg, double *baseMatrix) { - - /* FIXME: Doesn't the image mask support any colorspace? */ - cairo_set_source (cairo, fill_pattern); - - /* work around a cairo bug when scaling 1x1 surfaces */ - if (width == 1 && height == 1) { - ImageStream *imgStr; - Guchar pix; - int invert_bit; - - imgStr = new ImageStream(str, width, 1, 1); - imgStr->reset(); - imgStr->getPixel(&pix); - imgStr->close(); - delete imgStr; - - invert_bit = invert ? 1 : 0; - if (!(pix ^ invert_bit)) { - cairo_save (cairo); - cairo_rectangle (cairo, 0., 0., width, height); - cairo_fill (cairo); - cairo_restore (cairo); - if (cairo_shape) { - cairo_save (cairo_shape); - cairo_rectangle (cairo_shape, 0., 0., width, height); - cairo_fill (cairo_shape); - cairo_restore (cairo_shape); - } - } - } else { - cairo_push_group_with_content (cairo, CAIRO_CONTENT_ALPHA); - - /* shape is 1.0 for painted areas, 0.0 for unpainted ones */ - - cairo_matrix_t matrix; - cairo_get_matrix (cairo, &matrix); - //XXX: it is possible that we should only do sub pixel positioning if - // we are rendering fonts */ - if (!printing && prescaleImages && matrix.xy == 0.0 && matrix.yx == 0.0) { - drawImageMaskPrescaled(state, ref, str, width, height, invert, gFalse, inlineImg); - } else { - drawImageMaskRegular(state, ref, str, width, height, invert, gFalse, inlineImg); - } - - if (state->getFillColorSpace()->getMode() == csPattern) { - cairo_set_source_rgb (cairo, 1, 1, 1); - cairo_set_matrix (cairo, &mask_matrix); - cairo_mask (cairo, mask); - } - - if (mask) - cairo_pattern_destroy (mask); - mask = cairo_pop_group (cairo); - } - - saveState(state); - double bbox[4] = {0,0,1,1}; // dummy - beginTransparencyGroup(state, bbox, state->getFillColorSpace(), - gTrue, gFalse, gFalse); -} - -void CairoOutputDev::unsetSoftMaskFromImageMask(GfxState *state, double *baseMatrix) { - double bbox[4] = {0,0,1,1}; // dummy - - endTransparencyGroup(state); - restoreState(state); - paintTransparencyGroup(state, bbox); - clearSoftMask(state); -} - -void CairoOutputDev::drawImageMaskRegular(GfxState *state, Object *ref, Stream *str, - int width, int height, GBool invert, - GBool interpolate, GBool inlineImg) { - unsigned char *buffer; - unsigned char *dest; - cairo_surface_t *image; - cairo_pattern_t *pattern; - int x, y, i, bit; - ImageStream *imgStr; - Guchar *pix; - cairo_matrix_t matrix; - int invert_bit; - ptrdiff_t row_stride; - cairo_filter_t filter; - - /* TODO: Do we want to cache these? */ - imgStr = new ImageStream(str, width, 1, 1); - imgStr->reset(); - - image = cairo_image_surface_create (CAIRO_FORMAT_A1, width, height); - if (cairo_surface_status (image)) - goto cleanup; - - buffer = cairo_image_surface_get_data (image); - row_stride = cairo_image_surface_get_stride (image); - - invert_bit = invert ? 1 : 0; - - for (y = 0; y < height; y++) { - pix = imgStr->getLine(); - dest = buffer + y * row_stride; - i = 0; - bit = 0; - for (x = 0; x < width; x++) { - if (bit == 0) - dest[i] = 0; - if (!(pix[x] ^ invert_bit)) { -#ifdef WORDS_BIGENDIAN - dest[i] |= (1 << (7 - bit)); -#else - dest[i] |= (1 << bit); -#endif - } - bit++; - if (bit > 7) { - bit = 0; - i++; - } - } - } - - filter = getFilterForSurface (image, interpolate); - - cairo_surface_mark_dirty (image); - pattern = cairo_pattern_create_for_surface (image); - cairo_surface_destroy (image); - if (cairo_pattern_status (pattern)) - goto cleanup; - - LOG (printf ("drawImageMask %dx%d\n", width, height)); - - cairo_pattern_set_filter (pattern, filter); - - cairo_matrix_init_translate (&matrix, 0, height); - cairo_matrix_scale (&matrix, width, -height); - cairo_pattern_set_matrix (pattern, &matrix); - if (cairo_pattern_status (pattern)) { - cairo_pattern_destroy (pattern); - goto cleanup; - } - - if (state->getFillColorSpace()->getMode() == csPattern) { - mask = cairo_pattern_reference (pattern); - cairo_get_matrix (cairo, &mask_matrix); - } else if (!printing) { - cairo_save (cairo); - cairo_rectangle (cairo, 0., 0., 1., 1.); - cairo_clip (cairo); - if (strokePathClip) { - cairo_push_group (cairo); - fillToStrokePathClip (state); - cairo_pop_group_to_source (cairo); - } - cairo_mask (cairo, pattern); - cairo_restore (cairo); - } else { - cairo_mask (cairo, pattern); - } - - if (cairo_shape) { - cairo_save (cairo_shape); - cairo_set_source (cairo_shape, pattern); - if (!printing) { - cairo_rectangle (cairo_shape, 0., 0., 1., 1.); - cairo_fill (cairo_shape); - } else { - cairo_mask (cairo_shape, pattern); - } - cairo_restore (cairo_shape); - } - - cairo_pattern_destroy (pattern); - -cleanup: - imgStr->close(); - delete imgStr; -} - - -void CairoOutputDev::drawImageMaskPrescaled(GfxState *state, Object *ref, Stream *str, - int width, int height, GBool invert, - GBool interpolate, GBool inlineImg) { - unsigned char *buffer; - cairo_surface_t *image; - cairo_pattern_t *pattern; - ImageStream *imgStr; - Guchar *pix; - cairo_matrix_t matrix; - int invert_bit; - ptrdiff_t row_stride; - - /* cairo does a very poor job of scaling down images so we scale them ourselves */ - - LOG (printf ("drawImageMaskPrescaled %dx%d\n", width, height)); - - /* this scaling code is adopted from the splash image scaling code */ - cairo_get_matrix(cairo, &matrix); -#if 0 - printf("[%f %f], [%f %f], %f %f\n", matrix.xx, matrix.xy, matrix.yx, matrix.yy, matrix.x0, matrix.y0); -#endif - /* this whole computation should be factored out */ - double xScale = matrix.xx; - double yScale = matrix.yy; - int tx, tx2, ty, ty2; /* the integer co-oridinates of the resulting image */ - int scaledHeight; - int scaledWidth; - if (xScale >= 0) { - tx = splashRound(matrix.x0 - 0.01); - tx2 = splashRound(matrix.x0 + xScale + 0.01) - 1; - } else { - tx = splashRound(matrix.x0 + 0.01) - 1; - tx2 = splashRound(matrix.x0 + xScale - 0.01); - } - scaledWidth = abs(tx2 - tx) + 1; - //scaledWidth = splashRound(fabs(xScale)); - if (scaledWidth == 0) { - // technically, this should draw nothing, but it generally seems - // better to draw a one-pixel-wide stripe rather than throwing it - // away - scaledWidth = 1; - } - if (yScale >= 0) { - ty = splashFloor(matrix.y0 + 0.01); - ty2 = splashCeil(matrix.y0 + yScale - 0.01); - } else { - ty = splashCeil(matrix.y0 - 0.01); - ty2 = splashFloor(matrix.y0 + yScale + 0.01); - } - scaledHeight = abs(ty2 - ty); - if (scaledHeight == 0) { - scaledHeight = 1; - } -#if 0 - printf("xscale: %g, yscale: %g\n", xScale, yScale); - printf("width: %d, height: %d\n", width, height); - printf("scaledWidth: %d, scaledHeight: %d\n", scaledWidth, scaledHeight); -#endif - - /* compute the required padding */ - /* Padding is used to preserve the aspect ratio. - We compute total_pad to make (height+total_pad)/scaledHeight as close to height/yScale as possible */ - int head_pad = 0; - int tail_pad = 0; - int total_pad = splashRound(height*(scaledHeight/fabs(yScale)) - height); - - /* compute the two pieces of padding */ - if (total_pad > 0) { - //XXX: i'm not positive fabs() is correct - float tail_error = fabs(matrix.y0 - ty); - float head_error = fabs(ty2 - (matrix.y0 + yScale)); - float tail_fraction = tail_error/(tail_error + head_error); - tail_pad = splashRound(total_pad*tail_fraction); - head_pad = total_pad - tail_pad; - } else { - tail_pad = 0; - head_pad = 0; - } - int origHeight = height; - height += tail_pad; - height += head_pad; -#if 0 - printf("head_pad: %d tail_pad: %d\n", head_pad, tail_pad); - printf("origHeight: %d height: %d\n", origHeight, height); - printf("ty: %d, ty2: %d\n", ty, ty2); -#endif - - /* TODO: Do we want to cache these? */ - imgStr = new ImageStream(str, width, 1, 1); - imgStr->reset(); - - invert_bit = invert ? 1 : 0; - - image = cairo_image_surface_create (CAIRO_FORMAT_A8, scaledWidth, scaledHeight); - if (cairo_surface_status (image)) { - imgStr->close(); - delete imgStr; - return; - } - - buffer = cairo_image_surface_get_data (image); - row_stride = cairo_image_surface_get_stride (image); - - int yp = height / scaledHeight; - int yq = height % scaledHeight; - int xp = width / scaledWidth; - int xq = width % scaledWidth; - int yt = 0; - int origHeight_c = origHeight; - /* use MIN() because yp might be > origHeight because of padding */ - unsigned char *pixBuf = (unsigned char *)malloc(MIN(yp+1, origHeight)*width); - int lastYStep = 1; - int total = 0; - for (int y = 0; y < scaledHeight; y++) { - // y scale Bresenham - int yStep = yp; - yt += yq; - - if (yt >= scaledHeight) { - yt -= scaledHeight; - ++yStep; - } - - // read row (s) from image ignoring the padding as appropriate - { - int n = (yp > 0) ? yStep : lastYStep; - total += n; - if (n > 0) { - unsigned char *p = pixBuf; - int head_pad_count = head_pad; - int origHeight_count = origHeight; - int tail_pad_count = tail_pad; - for (int i=0; i<n; i++) { - // get row - if (head_pad_count) { - head_pad_count--; - } else if (origHeight_count) { - pix = imgStr->getLine(); - for (int j=0; j<width; j++) { - if (pix[j] ^ invert_bit) - p[j] = 0; - else - p[j] = 255; - } - origHeight_count--; - p += width; - } else if (tail_pad_count) { - tail_pad_count--; - } else { - printf("%d %d\n", n, total); - assert(0 && "over run\n"); - } - } - } - } - - lastYStep = yStep; - int k1 = y; - - int xt = 0; - int xSrc = 0; - int x1 = k1; - int n = yStep > 0 ? yStep : 1; - int origN = n; - - /* compute the size of padding and pixels that will be used for this row */ - int head_pad_size = MIN(n, head_pad); - n -= head_pad_size; - head_pad -= MIN(head_pad_size, yStep); - - int pix_size = MIN(n, origHeight); - n -= pix_size; - origHeight -= MIN(pix_size, yStep); - - int tail_pad_size = MIN(n, tail_pad); - n -= tail_pad_size; - tail_pad -= MIN(tail_pad_size, yStep); - if (n != 0) { - printf("n = %d (%d %d %d)\n", n, head_pad_size, pix_size, tail_pad_size); - assert(n == 0); - } - - for (int x = 0; x < scaledWidth; ++x) { - int xStep = xp; - xt += xq; - if (xt >= scaledWidth) { - xt -= scaledWidth; - ++xStep; - } - int m = xStep > 0 ? xStep : 1; - float pixAcc0 = 0; - /* could m * head_pad_size * tail_pad_size overflow? */ - if (invert_bit) { - pixAcc0 += m * head_pad_size * tail_pad_size * 255; - } else { - pixAcc0 += m * head_pad_size * tail_pad_size * 0; - } - /* Accumulate all of the source pixels for the destination pixel */ - for (int i = 0; i < pix_size; ++i) { - for (int j = 0; j< m; ++j) { - if (xSrc + i*width + j > MIN(yp + 1, origHeight_c)*width) { - printf("%d > %d (%d %d %d %d) (%d %d %d)\n", xSrc + i*width + j, MIN(yp + 1, origHeight_c)*width, xSrc, i , width, j, yp, origHeight_c, width); - printf("%d %d %d\n", head_pad_size, pix_size, tail_pad_size); - assert(0 && "bad access\n"); - } - pixAcc0 += pixBuf[xSrc + i*width + j]; - } - } - buffer[y * row_stride + x] = splashFloor(pixAcc0 / (origN*m)); - xSrc += xStep; - x1 += 1; - } - - } - free(pixBuf); - - cairo_surface_mark_dirty (image); - pattern = cairo_pattern_create_for_surface (image); - cairo_surface_destroy (image); - if (cairo_pattern_status (pattern)) { - imgStr->close(); - delete imgStr; - return; - } - - /* we should actually be using CAIRO_FILTER_NEAREST here. However, - * cairo doesn't yet do minifaction filtering causing scaled down - * images with CAIRO_FILTER_NEAREST to look really bad */ - cairo_pattern_set_filter (pattern, - interpolate ? CAIRO_FILTER_GOOD : CAIRO_FILTER_FAST); - - if (state->getFillColorSpace()->getMode() == csPattern) { - cairo_matrix_init_translate (&matrix, 0, scaledHeight); - cairo_matrix_scale (&matrix, scaledWidth, -scaledHeight); - cairo_pattern_set_matrix (pattern, &matrix); - if (cairo_pattern_status (pattern)) { - cairo_pattern_destroy (pattern); - imgStr->close(); - delete imgStr; - return; - } - - mask = cairo_pattern_reference (pattern); - cairo_get_matrix (cairo, &mask_matrix); - } else { - cairo_save (cairo); - - /* modify our current transformation so that the prescaled image - * goes where it is supposed to */ - cairo_get_matrix(cairo, &matrix); - cairo_scale(cairo, 1.0/matrix.xx, 1.0/matrix.yy); - // get integer co-ords - cairo_translate (cairo, tx - matrix.x0, ty2 - matrix.y0); - if (yScale > 0) - cairo_scale(cairo, 1, -1); - - cairo_rectangle (cairo, 0., 0., scaledWidth, scaledHeight); - cairo_clip (cairo); - if (strokePathClip) { - cairo_push_group (cairo); - fillToStrokePathClip (state); - cairo_pop_group_to_source (cairo); - } - cairo_mask (cairo, pattern); - - //cairo_get_matrix(cairo, &matrix); - //printf("mask at: [%f %f], [%f %f], %f %f\n\n", matrix.xx, matrix.xy, matrix.yx, matrix.yy, matrix.x0, matrix.y0); - cairo_restore(cairo); - } - - if (cairo_shape) { - cairo_save (cairo_shape); - - /* modify our current transformation so that the prescaled image - * goes where it is supposed to */ - cairo_get_matrix(cairo_shape, &matrix); - cairo_scale(cairo_shape, 1.0/matrix.xx, 1.0/matrix.yy); - // get integer co-ords - cairo_translate (cairo_shape, tx - matrix.x0, ty2 - matrix.y0); - if (yScale > 0) - cairo_scale(cairo_shape, 1, -1); - - cairo_rectangle (cairo_shape, 0., 0., scaledWidth, scaledHeight); - cairo_fill (cairo_shape); - - cairo_restore(cairo_shape); - } - - cairo_pattern_destroy (pattern); - - imgStr->close(); - delete imgStr; -} - -void CairoOutputDev::drawMaskedImage(GfxState *state, Object *ref, - Stream *str, int width, int height, - GfxImageColorMap *colorMap, - GBool interpolate, - Stream *maskStr, int maskWidth, - int maskHeight, GBool maskInvert, - GBool maskInterpolate) -{ - ImageStream *maskImgStr, *imgStr; - ptrdiff_t row_stride; - unsigned char *maskBuffer, *buffer; - unsigned char *maskDest; - unsigned int *dest; - cairo_surface_t *maskImage, *image; - cairo_pattern_t *maskPattern, *pattern; - cairo_matrix_t matrix; - cairo_matrix_t maskMatrix; - Guchar *pix; - int x, y; - int invert_bit; - cairo_filter_t filter; - cairo_filter_t maskFilter; - - maskImgStr = new ImageStream(maskStr, maskWidth, 1, 1); - maskImgStr->reset(); - - maskImage = cairo_image_surface_create (CAIRO_FORMAT_A8, maskWidth, maskHeight); - if (cairo_surface_status (maskImage)) { - maskImgStr->close(); - delete maskImgStr; - return; - } - - maskBuffer = cairo_image_surface_get_data (maskImage); - row_stride = cairo_image_surface_get_stride (maskImage); - - invert_bit = maskInvert ? 1 : 0; - - for (y = 0; y < maskHeight; y++) { - pix = maskImgStr->getLine(); - maskDest = maskBuffer + y * row_stride; - for (x = 0; x < maskWidth; x++) { - if (pix[x] ^ invert_bit) - *maskDest++ = 0; - else - *maskDest++ = 255; - } - } - - maskImgStr->close(); - delete maskImgStr; - - maskFilter = getFilterForSurface (maskImage, maskInterpolate); - - cairo_surface_mark_dirty (maskImage); - maskPattern = cairo_pattern_create_for_surface (maskImage); - cairo_surface_destroy (maskImage); - if (cairo_pattern_status (maskPattern)) - return; - -#if 0 - /* ICCBased color space doesn't do any color correction - * so check its underlying color space as well */ - int is_identity_transform; - is_identity_transform = colorMap->getColorSpace()->getMode() == csDeviceRGB || - (colorMap->getColorSpace()->getMode() == csICCBased && - ((GfxICCBasedColorSpace*)colorMap->getColorSpace())->getAlt()->getMode() == csDeviceRGB); -#endif - - /* TODO: Do we want to cache these? */ - imgStr = new ImageStream(str, width, - colorMap->getNumPixelComps(), - colorMap->getBits()); - imgStr->reset(); - - image = cairo_image_surface_create (CAIRO_FORMAT_RGB24, width, height); - if (cairo_surface_status (image)) - goto cleanup; - - buffer = cairo_image_surface_get_data (image); - row_stride = cairo_image_surface_get_stride (image); - for (y = 0; y < height; y++) { - dest = (unsigned int *) (buffer + y * row_stride); - pix = imgStr->getLine(); - colorMap->getRGBLine (pix, dest, width); - } - - filter = getFilterForSurface (image, interpolate); - - cairo_surface_mark_dirty (image); - pattern = cairo_pattern_create_for_surface (image); - cairo_surface_destroy (image); - if (cairo_pattern_status (pattern)) - goto cleanup; - - LOG (printf ("drawMaskedImage %dx%d\n", width, height)); - - cairo_pattern_set_filter (pattern, filter); - cairo_pattern_set_filter (maskPattern, maskFilter); - - if (!printing) { - cairo_pattern_set_extend (pattern, CAIRO_EXTEND_PAD); - cairo_pattern_set_extend (maskPattern, CAIRO_EXTEND_PAD); - } - - cairo_matrix_init_translate (&matrix, 0, height); - cairo_matrix_scale (&matrix, width, -height); - cairo_pattern_set_matrix (pattern, &matrix); - if (cairo_pattern_status (pattern)) { - cairo_pattern_destroy (pattern); - cairo_pattern_destroy (maskPattern); - goto cleanup; - } - - cairo_matrix_init_translate (&maskMatrix, 0, maskHeight); - cairo_matrix_scale (&maskMatrix, maskWidth, -maskHeight); - cairo_pattern_set_matrix (maskPattern, &maskMatrix); - if (cairo_pattern_status (maskPattern)) { - cairo_pattern_destroy (maskPattern); - cairo_pattern_destroy (pattern); - goto cleanup; - } - - if (!printing) { - cairo_save (cairo); - cairo_set_source (cairo, pattern); - cairo_rectangle (cairo, 0., 0., 1., 1.); - cairo_clip (cairo); - cairo_mask (cairo, maskPattern); - cairo_restore (cairo); - } else { - cairo_set_source (cairo, pattern); - cairo_mask (cairo, maskPattern); - } - - if (cairo_shape) { - cairo_save (cairo_shape); - cairo_set_source (cairo_shape, pattern); - if (!printing) { - cairo_rectangle (cairo_shape, 0., 0., 1., 1.); - cairo_fill (cairo_shape); - } else { - cairo_mask (cairo_shape, pattern); - } - cairo_restore (cairo_shape); - } - - cairo_pattern_destroy (maskPattern); - cairo_pattern_destroy (pattern); - -cleanup: - imgStr->close(); - delete imgStr; -} - - -//XXX: is this affect by AIS(alpha is shape)? -void CairoOutputDev::drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str, - int width, int height, - GfxImageColorMap *colorMap, - GBool interpolate, - Stream *maskStr, - int maskWidth, int maskHeight, - GfxImageColorMap *maskColorMap, - GBool maskInterpolate) -{ - ImageStream *maskImgStr, *imgStr; - ptrdiff_t row_stride; - unsigned char *maskBuffer, *buffer; - unsigned char *maskDest; - unsigned int *dest; - cairo_surface_t *maskImage, *image; - cairo_pattern_t *maskPattern, *pattern; - cairo_matrix_t maskMatrix, matrix; - Guchar *pix; - int y; - cairo_filter_t filter; - cairo_filter_t maskFilter; - - maskImgStr = new ImageStream(maskStr, maskWidth, - maskColorMap->getNumPixelComps(), - maskColorMap->getBits()); - maskImgStr->reset(); - - maskImage = cairo_image_surface_create (CAIRO_FORMAT_A8, maskWidth, maskHeight); - if (cairo_surface_status (maskImage)) { - maskImgStr->close(); - delete maskImgStr; - return; - } - - maskBuffer = cairo_image_surface_get_data (maskImage); - row_stride = cairo_image_surface_get_stride (maskImage); - for (y = 0; y < maskHeight; y++) { - maskDest = (unsigned char *) (maskBuffer + y * row_stride); - pix = maskImgStr->getLine(); - if (likely(pix != nullptr)) { - maskColorMap->getGrayLine (pix, maskDest, maskWidth); - } - } - - maskImgStr->close(); - delete maskImgStr; - - maskFilter = getFilterForSurface (maskImage, maskInterpolate); - - cairo_surface_mark_dirty (maskImage); - maskPattern = cairo_pattern_create_for_surface (maskImage); - cairo_surface_destroy (maskImage); - if (cairo_pattern_status (maskPattern)) - return; - -#if 0 - /* ICCBased color space doesn't do any color correction - * so check its underlying color space as well */ - int is_identity_transform; - is_identity_transform = colorMap->getColorSpace()->getMode() == csDeviceRGB || - (colorMap->getColorSpace()->getMode() == csICCBased && - ((GfxICCBasedColorSpace*)colorMap->getColorSpace())->getAlt()->getMode() == csDeviceRGB); -#endif - - /* TODO: Do we want to cache these? */ - imgStr = new ImageStream(str, width, - colorMap->getNumPixelComps(), - colorMap->getBits()); - imgStr->reset(); - - image = cairo_image_surface_create (CAIRO_FORMAT_RGB24, width, height); - if (cairo_surface_status (image)) - goto cleanup; - - buffer = cairo_image_surface_get_data (image); - row_stride = cairo_image_surface_get_stride (image); - for (y = 0; y < height; y++) { - dest = (unsigned int *) (buffer + y * row_stride); - pix = imgStr->getLine(); - colorMap->getRGBLine (pix, dest, width); - } - - filter = getFilterForSurface (image, interpolate); - - cairo_surface_mark_dirty (image); - - setMimeData(state, str, ref, colorMap, image, height); - - pattern = cairo_pattern_create_for_surface (image); - cairo_surface_destroy (image); - if (cairo_pattern_status (pattern)) - goto cleanup; - - LOG (printf ("drawSoftMaskedImage %dx%d\n", width, height)); - - cairo_pattern_set_filter (pattern, filter); - cairo_pattern_set_filter (maskPattern, maskFilter); - - if (!printing) { - cairo_pattern_set_extend (pattern, CAIRO_EXTEND_PAD); - cairo_pattern_set_extend (maskPattern, CAIRO_EXTEND_PAD); - } - - cairo_matrix_init_translate (&matrix, 0, height); - cairo_matrix_scale (&matrix, width, -height); - cairo_pattern_set_matrix (pattern, &matrix); - if (cairo_pattern_status (pattern)) { - cairo_pattern_destroy (pattern); - cairo_pattern_destroy (maskPattern); - goto cleanup; - } - - cairo_matrix_init_translate (&maskMatrix, 0, maskHeight); - cairo_matrix_scale (&maskMatrix, maskWidth, -maskHeight); - cairo_pattern_set_matrix (maskPattern, &maskMatrix); - if (cairo_pattern_status (maskPattern)) { - cairo_pattern_destroy (maskPattern); - cairo_pattern_destroy (pattern); - goto cleanup; - } - - if (fill_opacity != 1.0) - cairo_push_group (cairo); - else - cairo_save (cairo); - - cairo_set_source (cairo, pattern); - if (!printing) { - cairo_rectangle (cairo, 0., 0., 1., 1.); - cairo_clip (cairo); - } - cairo_mask (cairo, maskPattern); - - if (fill_opacity != 1.0) { - cairo_pop_group_to_source (cairo); - cairo_save (cairo); - if (!printing) { - cairo_rectangle (cairo, 0., 0., 1., 1.); - cairo_clip (cairo); - } - cairo_paint_with_alpha (cairo, fill_opacity); - } - cairo_restore (cairo); - - if (cairo_shape) { - cairo_save (cairo_shape); - cairo_set_source (cairo_shape, pattern); - if (!printing) { - cairo_rectangle (cairo_shape, 0., 0., 1., 1.); - cairo_fill (cairo_shape); - } else { - cairo_mask (cairo_shape, pattern); - } - cairo_restore (cairo_shape); - } - - cairo_pattern_destroy (maskPattern); - cairo_pattern_destroy (pattern); - -cleanup: - imgStr->close(); - delete imgStr; -} - -GBool CairoOutputDev::getStreamData (Stream *str, char **buffer, int *length) -{ - int len, i; - char *strBuffer; - - len = 0; - str->close(); - str->reset(); - while (str->getChar() != EOF) len++; - if (len == 0) - return gFalse; - - strBuffer = (char *)gmalloc (len); - - str->close(); - str->reset(); - for (i = 0; i < len; ++i) - strBuffer[i] = str->getChar(); - - *buffer = strBuffer; - *length = len; - - return gTrue; -} - -static GBool colorMapHasIdentityDecodeMap(GfxImageColorMap *colorMap) -{ - for (int i = 0; i < colorMap->getNumPixelComps(); i++) { - if (colorMap->getDecodeLow(i) != 0.0 || colorMap->getDecodeHigh(i) != 1.0) - return gFalse; - } - return gTrue; -} - -#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 11, 2) -static cairo_status_t setMimeIdFromRef(cairo_surface_t *surface, - const char *mime_type, - const char *mime_id_prefix, - Ref ref) -{ - GooString *mime_id; - char *idBuffer; - cairo_status_t status; - - mime_id = new GooString; - - if (mime_id_prefix) - mime_id->append(mime_id_prefix); - - mime_id->appendf("{0:d}-{1:d}", ref.gen, ref.num); - - idBuffer = copyString(mime_id->getCString()); - status = cairo_surface_set_mime_data (surface, mime_type, - (const unsigned char *)idBuffer, - mime_id->getLength(), - gfree, idBuffer); - delete mime_id; - if (status) - gfree (idBuffer); - return status; -} -#endif - -#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 14, 0) -GBool CairoOutputDev::setMimeDataForJBIG2Globals(Stream *str, - cairo_surface_t *image) -{ - JBIG2Stream *jb2Str = static_cast<JBIG2Stream *>(str); - Object* globalsStr = jb2Str->getGlobalsStream(); - char *globalsBuffer; - int globalsLength; - - // nothing to do for JBIG2 stream without Globals - if (!globalsStr->isStream()) - return gTrue; - - if (setMimeIdFromRef(image, CAIRO_MIME_TYPE_JBIG2_GLOBAL_ID, nullptr, - jb2Str->getGlobalsStreamRef())) - return gFalse; - - if (!getStreamData(globalsStr->getStream(), &globalsBuffer, &globalsLength)) - return gFalse; - - if (cairo_surface_set_mime_data (image, CAIRO_MIME_TYPE_JBIG2_GLOBAL, - (const unsigned char*)globalsBuffer, - globalsLength, - gfree, (void*)globalsBuffer)) - { - gfree (globalsBuffer); - return gFalse; - } - - return gTrue; -} -#endif - -#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 15, 10) -GBool CairoOutputDev::setMimeDataForCCITTParams(Stream *str, - cairo_surface_t *image, int height) -{ - CCITTFaxStream *ccittStr = static_cast<CCITTFaxStream *>(str); - - GooString params; - params.appendf("Columns={0:d}", ccittStr->getColumns()); - params.appendf(" Rows={0:d}", height); - params.appendf(" K={0:d}", ccittStr->getEncoding()); - params.appendf(" EndOfLine={0:d}", ccittStr->getEndOfLine() ? 1 : 0); - params.appendf(" EncodedByteAlign={0:d}", ccittStr->getEncodedByteAlign() ? 1 : 0); - params.appendf(" EndOfBlock={0:d}", ccittStr->getEndOfBlock() ? 1 : 0); - params.appendf(" BlackIs1={0:d}", ccittStr->getBlackIs1() ? 1 : 0); - params.appendf(" DamagedRowsBeforeError={0:d}", ccittStr->getDamagedRowsBeforeError()); - - char *p = strdup(params.getCString()); - if (cairo_surface_set_mime_data (image, CAIRO_MIME_TYPE_CCITT_FAX_PARAMS, - (const unsigned char*)p, - params.getLength(), - gfree, (void*)p)) - { - gfree (p); - return gFalse; - } - - return gTrue; -} -#endif - -void CairoOutputDev::setMimeData(GfxState *state, Stream *str, Object *ref, - GfxImageColorMap *colorMap, cairo_surface_t *image, int height) -{ - char *strBuffer; - int len; - Object obj; - GfxColorSpace *colorSpace; - StreamKind strKind = str->getKind(); - const char *mime_type; - - if (!printing) - return; - - switch (strKind) { - case strDCT: - mime_type = CAIRO_MIME_TYPE_JPEG; - break; - case strJPX: - mime_type = CAIRO_MIME_TYPE_JP2; - break; -#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 14, 0) - case strJBIG2: - mime_type = CAIRO_MIME_TYPE_JBIG2; - break; -#endif -#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 15, 10) - case strCCITTFax: - mime_type = CAIRO_MIME_TYPE_CCITT_FAX; - break; -#endif - default: - return; - } - - obj = str->getDict()->lookup("ColorSpace"); - colorSpace = GfxColorSpace::parse(nullptr, &obj, this, state); - - // colorspace in stream dict may be different from colorspace in jpx - // data - if (strKind == strJPX && colorSpace) - return; - - // only embed mime data for gray, rgb, and cmyk colorspaces. - if (colorSpace) { - GfxColorSpaceMode mode = colorSpace->getMode(); - delete colorSpace; - switch (mode) { - case csDeviceGray: - case csCalGray: - case csDeviceRGB: - case csCalRGB: - case csDeviceCMYK: - case csICCBased: - break; - - case csLab: - case csIndexed: - case csSeparation: - case csDeviceN: - case csPattern: - return; - } - } - - if (!colorMapHasIdentityDecodeMap(colorMap)) - return; - -#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 14, 0) - if (strKind == strJBIG2 && !setMimeDataForJBIG2Globals(str, image)) - return; -#endif - -#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 15, 10) - if (strKind == strCCITTFax && !setMimeDataForCCITTParams(str, image, height)) - return; -#endif - - if (getStreamData (str->getNextStream(), &strBuffer, &len)) { - cairo_status_t status = CAIRO_STATUS_SUCCESS; - -#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 11, 2) - if (ref && ref->isRef()) { - status = setMimeIdFromRef(image, CAIRO_MIME_TYPE_UNIQUE_ID, - "poppler-surface-", ref->getRef()); - } -#endif - if (!status) { - status = cairo_surface_set_mime_data (image, mime_type, - (const unsigned char *)strBuffer, len, - gfree, strBuffer); - } - - if (status) - gfree (strBuffer); - } -} - -class RescaleDrawImage : public CairoRescaleBox { -private: - ImageStream *imgStr; - GfxRGB *lookup; - int width; - GfxImageColorMap *colorMap; - int *maskColors; - int current_row; - GBool imageError; - -public: - cairo_surface_t *getSourceImage(Stream *str, - int widthA, int height, - int scaledWidth, int scaledHeight, - GBool printing, - GfxImageColorMap *colorMapA, - int *maskColorsA) { - cairo_surface_t *image = nullptr; - int i; - - lookup = nullptr; - colorMap = colorMapA; - maskColors = maskColorsA; - width = widthA; - current_row = -1; - imageError = gFalse; - - /* TODO: Do we want to cache these? */ - imgStr = new ImageStream(str, width, - colorMap->getNumPixelComps(), - colorMap->getBits()); - imgStr->reset(); - -#if 0 - /* ICCBased color space doesn't do any color correction - * so check its underlying color space as well */ - int is_identity_transform; - is_identity_transform = colorMap->getColorSpace()->getMode() == csDeviceRGB || - (colorMap->getColorSpace()->getMode() == csICCBased && - ((GfxICCBasedColorSpace*)colorMap->getColorSpace())->getAlt()->getMode() == csDeviceRGB); -#endif - - // special case for one-channel (monochrome/gray/separation) images: - // build a lookup table here - if (colorMap->getNumPixelComps() == 1) { - int n; - Guchar pix; - - n = 1 << colorMap->getBits(); - lookup = (GfxRGB *)gmallocn(n, sizeof(GfxRGB)); - for (i = 0; i < n; ++i) { - pix = (Guchar)i; - - colorMap->getRGB(&pix, &lookup[i]); - } - } - -#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 14, 0) - bool needsCustomDownscaling = false; -#else - bool needsCustomDownscaling = true; -#endif - - if (printing) { - if (width > MAX_PRINT_IMAGE_SIZE || height > MAX_PRINT_IMAGE_SIZE) { - if (width > height) { - scaledWidth = MAX_PRINT_IMAGE_SIZE; - scaledHeight = MAX_PRINT_IMAGE_SIZE * (double)height/width; - } else { - scaledHeight = MAX_PRINT_IMAGE_SIZE; - scaledWidth = MAX_PRINT_IMAGE_SIZE * (double)width/height; - } - needsCustomDownscaling = true; - } else { - needsCustomDownscaling = false; - } - } - - if (!needsCustomDownscaling || scaledWidth >= width || scaledHeight >= height) { - // No downscaling. Create cairo image containing the source image data. - unsigned char *buffer; - ptrdiff_t stride; - - image = cairo_image_surface_create (maskColors ? - CAIRO_FORMAT_ARGB32 : - CAIRO_FORMAT_RGB24, - width, height); - if (cairo_surface_status (image)) - goto cleanup; - - buffer = cairo_image_surface_get_data (image); - stride = cairo_image_surface_get_stride (image); - for (int y = 0; y < height; y++) { - uint32_t *dest = (uint32_t *) (buffer + y * stride); - getRow(y, dest); - } - } else { - // // Downscaling required. Create cairo image the size of the - // rescaled image and // downscale the source image data into - // the cairo image. downScaleImage() will call getRow() to read - // source image data from the image stream. This avoids having - // to create an image the size of the source image which may - // exceed cairo's 32676x32767 image size limit (and also saves a - // lot of memory). - image = cairo_image_surface_create (maskColors ? - CAIRO_FORMAT_ARGB32 : - CAIRO_FORMAT_RGB24, - scaledWidth, scaledHeight); - if (cairo_surface_status (image)) - goto cleanup; - - downScaleImage(width, height, - scaledWidth, scaledHeight, - 0, 0, scaledWidth, scaledHeight, - image); - } - cairo_surface_mark_dirty (image); - - cleanup: - gfree(lookup); - imgStr->close(); - delete imgStr; - return image; - } - - void getRow(int row_num, uint32_t *row_data) override { - Guchar *pix; - - if (row_num <= current_row) - return; - - while (current_row < row_num) { - pix = imgStr->getLine(); - current_row++; - } - - if (unlikely(pix == nullptr)) { - memset(row_data, 0, width*4); - if (!imageError) { - error(errInternal, -1, "Bad image stream"); - imageError = gTrue; - } - } else if (lookup) { - Guchar *p = pix; - GfxRGB rgb; - - for (int i = 0; i < width; i++) { - rgb = lookup[*p]; - row_data[i] = - ((int) colToByte(rgb.r) << 16) | - ((int) colToByte(rgb.g) << 8) | - ((int) colToByte(rgb.b) << 0); - p++; - } - } else { - colorMap->getRGBLine (pix, row_data, width); - } - - if (maskColors) { - for (int x = 0; x < width; x++) { - bool is_opaque = false; - for (int i = 0; i < colorMap->getNumPixelComps(); ++i) { - if (pix[i] < maskColors[2*i] || - pix[i] > maskColors[2*i+1]) { - is_opaque = true; - break; - } - } - if (is_opaque) - *row_data |= 0xff000000; - else - *row_data = 0; - row_data++; - pix += colorMap->getNumPixelComps(); - } - } - } - -}; - -void CairoOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, - int widthA, int heightA, - GfxImageColorMap *colorMap, - GBool interpolate, - int *maskColors, GBool inlineImg) -{ - cairo_surface_t *image; - cairo_pattern_t *pattern, *maskPattern; - cairo_matrix_t matrix; - int width, height; - int scaledWidth, scaledHeight; - cairo_filter_t filter = CAIRO_FILTER_GOOD; - RescaleDrawImage rescale; - - LOG (printf ("drawImage %dx%d\n", widthA, heightA)); - - cairo_get_matrix(cairo, &matrix); - getScaledSize (&matrix, widthA, heightA, &scaledWidth, &scaledHeight); - image = rescale.getSourceImage(str, widthA, heightA, scaledWidth, scaledHeight, printing, colorMap, maskColors); - if (!image) - return; - - width = cairo_image_surface_get_width (image); - height = cairo_image_surface_get_height (image); - if (width == widthA && height == heightA) - filter = getFilterForSurface (image, interpolate); - - if (!inlineImg) { /* don't read stream twice if it is an inline image */ - // cairo 1.15.10 allows mime image data to have different size to cairo image - // mime image size will be scaled to same size as cairo image -#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 15, 10) - bool requireSameSize = false; -#else - bool requireSameSize = true; -#endif - if (!requireSameSize || (width == widthA && height == heightA)) - setMimeData(state, str, ref, colorMap, image, heightA); - } - - pattern = cairo_pattern_create_for_surface (image); - cairo_surface_destroy (image); - if (cairo_pattern_status (pattern)) - return; - - cairo_pattern_set_filter (pattern, filter); - - if (!printing) - cairo_pattern_set_extend (pattern, CAIRO_EXTEND_PAD); - - cairo_matrix_init_translate (&matrix, 0, height); - cairo_matrix_scale (&matrix, width, -height); - cairo_pattern_set_matrix (pattern, &matrix); - if (cairo_pattern_status (pattern)) { - cairo_pattern_destroy (pattern); - return; - } - - if (!mask && fill_opacity != 1.0) { - maskPattern = cairo_pattern_create_rgba (1., 1., 1., fill_opacity); - } else if (mask) { - maskPattern = cairo_pattern_reference (mask); - } else { - maskPattern = nullptr; - } - - cairo_save (cairo); - cairo_set_source (cairo, pattern); - if (!printing) - cairo_rectangle (cairo, 0., 0., 1., 1.); - if (maskPattern) { - if (!printing) - cairo_clip (cairo); - if (mask) - cairo_set_matrix (cairo, &mask_matrix); - cairo_mask (cairo, maskPattern); - } else { - if (printing) - cairo_paint (cairo); - else - cairo_fill (cairo); - } - cairo_restore (cairo); - - cairo_pattern_destroy (maskPattern); - - if (cairo_shape) { - cairo_save (cairo_shape); - cairo_set_source (cairo_shape, pattern); - if (printing) { - cairo_paint (cairo_shape); - } else { - cairo_rectangle (cairo_shape, 0., 0., 1., 1.); - cairo_fill (cairo_shape); - } - cairo_restore (cairo_shape); - } - - cairo_pattern_destroy (pattern); -} - - -//------------------------------------------------------------------------ -// ImageOutputDev -//------------------------------------------------------------------------ - -CairoImageOutputDev::CairoImageOutputDev() -{ - images = nullptr; - numImages = 0; - size = 0; - imgDrawCbk = nullptr; - imgDrawCbkData = nullptr; -} - -CairoImageOutputDev::~CairoImageOutputDev() -{ - int i; - - for (i = 0; i < numImages; i++) - delete images[i]; - gfree (images); -} - -void CairoImageOutputDev::saveImage(CairoImage *image) -{ - if (numImages >= size) { - size += 16; - images = (CairoImage **) greallocn (images, size, sizeof (CairoImage *)); - } - images[numImages++] = image; -} - -void CairoImageOutputDev::getBBox(GfxState *state, int width, int height, - double *x1, double *y1, double *x2, double *y2) -{ - double *ctm = state->getCTM(); - cairo_matrix_t matrix; - cairo_matrix_init(&matrix, - ctm[0], ctm[1], - -ctm[2], -ctm[3], - ctm[2] + ctm[4], ctm[3] + ctm[5]); - - int scaledWidth, scaledHeight; - getScaledSize (&matrix, width, height, &scaledWidth, &scaledHeight); - - if (matrix.xx >= 0) { - *x1 = matrix.x0; - } else { - *x1 = matrix.x0 - scaledWidth; - } - *x2 = *x1 + scaledWidth; - - if (matrix.yy >= 0) { - *y1 = matrix.y0; - } else { - *y1 = matrix.y0 - scaledHeight; - } - *y2 = *y1 + scaledHeight; -} - -void CairoImageOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str, - int width, int height, GBool invert, - GBool interpolate, GBool inlineImg) -{ - cairo_t *cr; - cairo_surface_t *surface; - double x1, y1, x2, y2; - CairoImage *image; - - getBBox(state, width, height, &x1, &y1, &x2, &y2); - - image = new CairoImage (x1, y1, x2, y2); - saveImage (image); - - if (imgDrawCbk && imgDrawCbk (numImages - 1, imgDrawCbkData)) { - surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height); - cr = cairo_create (surface); - setCairo (cr); - cairo_translate (cr, 0, height); - cairo_scale (cr, width, -height); - - CairoOutputDev::drawImageMask(state, ref, str, width, height, invert, interpolate, inlineImg); - image->setImage (surface); - - setCairo (nullptr); - cairo_surface_destroy (surface); - cairo_destroy (cr); - } -} - -void CairoImageOutputDev::setSoftMaskFromImageMask(GfxState *state, Object *ref, Stream *str, - int width, int height, GBool invert, - GBool inlineImg, double *baseMatrix) -{ - cairo_t *cr; - cairo_surface_t *surface; - double x1, y1, x2, y2; - CairoImage *image; - - getBBox(state, width, height, &x1, &y1, &x2, &y2); - - image = new CairoImage (x1, y1, x2, y2); - saveImage (image); - - if (imgDrawCbk && imgDrawCbk (numImages - 1, imgDrawCbkData)) { - surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height); - cr = cairo_create (surface); - setCairo (cr); - cairo_translate (cr, 0, height); - cairo_scale (cr, width, -height); - - CairoOutputDev::drawImageMask(state, ref, str, width, height, invert, inlineImg, gFalse); - if (state->getFillColorSpace()->getMode() == csPattern) { - cairo_mask (cairo, mask); - } - image->setImage (surface); - - setCairo (nullptr); - cairo_surface_destroy (surface); - cairo_destroy (cr); - } -} - -void CairoImageOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, - int width, int height, GfxImageColorMap *colorMap, - GBool interpolate, int *maskColors, GBool inlineImg) -{ - cairo_t *cr; - cairo_surface_t *surface; - double x1, y1, x2, y2; - CairoImage *image; - - getBBox(state, width, height, &x1, &y1, &x2, &y2); - - image = new CairoImage (x1, y1, x2, y2); - saveImage (image); - - if (imgDrawCbk && imgDrawCbk (numImages - 1, imgDrawCbkData)) { - surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height); - cr = cairo_create (surface); - setCairo (cr); - cairo_translate (cr, 0, height); - cairo_scale (cr, width, -height); - - CairoOutputDev::drawImage(state, ref, str, width, height, colorMap, interpolate, maskColors, inlineImg); - image->setImage (surface); - - setCairo (nullptr); - cairo_surface_destroy (surface); - cairo_destroy (cr); - } -} - -void CairoImageOutputDev::drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str, - int width, int height, - GfxImageColorMap *colorMap, - GBool interpolate, - Stream *maskStr, - int maskWidth, int maskHeight, - GfxImageColorMap *maskColorMap, - GBool maskInterpolate) -{ - cairo_t *cr; - cairo_surface_t *surface; - double x1, y1, x2, y2; - CairoImage *image; - - getBBox(state, width, height, &x1, &y1, &x2, &y2); - - image = new CairoImage (x1, y1, x2, y2); - saveImage (image); - - if (imgDrawCbk && imgDrawCbk (numImages - 1, imgDrawCbkData)) { - surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height); - cr = cairo_create (surface); - setCairo (cr); - cairo_translate (cr, 0, height); - cairo_scale (cr, width, -height); - - CairoOutputDev::drawSoftMaskedImage(state, ref, str, width, height, colorMap, interpolate, - maskStr, maskWidth, maskHeight, maskColorMap, maskInterpolate); - image->setImage (surface); - - setCairo (nullptr); - cairo_surface_destroy (surface); - cairo_destroy (cr); - } -} - -void CairoImageOutputDev::drawMaskedImage(GfxState *state, Object *ref, Stream *str, - int width, int height, - GfxImageColorMap *colorMap, - GBool interpolate, - Stream *maskStr, - int maskWidth, int maskHeight, - GBool maskInvert, GBool maskInterpolate) -{ - cairo_t *cr; - cairo_surface_t *surface; - double x1, y1, x2, y2; - CairoImage *image; - - getBBox(state, width, height, &x1, &y1, &x2, &y2); - - image = new CairoImage (x1, y1, x2, y2); - saveImage (image); - - if (imgDrawCbk && imgDrawCbk (numImages - 1, imgDrawCbkData)) { - surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height); - cr = cairo_create (surface); - setCairo (cr); - cairo_translate (cr, 0, height); - cairo_scale (cr, width, -height); - - CairoOutputDev::drawMaskedImage(state, ref, str, width, height, colorMap, interpolate, - maskStr, maskWidth, maskHeight, maskInvert, maskInterpolate); - image->setImage (surface); - - setCairo (nullptr); - cairo_surface_destroy (surface); - cairo_destroy (cr); - } -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/CairoOutputDev.h b/Build/source/libs/poppler/poppler-src/poppler/CairoOutputDev.h deleted file mode 100644 index 6ee6f9e8ee3..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/CairoOutputDev.h +++ /dev/null @@ -1,530 +0,0 @@ -//======================================================================== -// -// CairoOutputDev.h -// -// Copyright 2003 Glyph & Cog, LLC -// Copyright 2004 Red Hat, INC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2005-2008 Jeff Muizelaar <jeff@infidigm.net> -// Copyright (C) 2005, 2006 Kristian Høgsberg <krh@redhat.com> -// Copyright (C) 2005 Nickolay V. Shmyrev <nshmyrev@yandex.ru> -// Copyright (C) 2006-2011, 2013 Carlos Garcia Campos <carlosgc@gnome.org> -// Copyright (C) 2008, 2009, 2011-2017 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2008 Michael Vrable <mvrable@cs.ucsd.edu> -// Copyright (C) 2010-2013 Thomas Freitag <Thomas.Freitag@alfa.de> -// Copyright (C) 2015 Suzuki Toshiya <mpsuzuki@hiroshima-u.ac.jp> -// Copyright (C) 2016 Jason Crain <jason@aquaticape.us> -// Copyright (C) 2018 Albert Astals Cid <aacid@kde.org> -// 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 -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef CAIROOUTPUTDEV_H -#define CAIROOUTPUTDEV_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "goo/gtypes.h" -#include <cairo-ft.h> -#include "OutputDev.h" -#include "TextOutputDev.h" -#include "GfxState.h" - -class PDFDoc; -class GfxState; -class GfxPath; -class Gfx8BitFont; -struct GfxRGB; -class CairoFontEngine; -class CairoFont; - -//------------------------------------------------------------------------ - -//------------------------------------------------------------------------ -// CairoImage -//------------------------------------------------------------------------ -class CairoImage { -public: - // Constructor. - CairoImage (double x1, double y1, double x2, double y2); - - // Destructor. - ~CairoImage (); - - CairoImage(const CairoImage &) = delete; - CairoImage& operator=(const CairoImage &) = delete; - - // Set the image cairo surface - void setImage (cairo_surface_t *image); - - // Get the image cairo surface - cairo_surface_t *getImage () const { return image; } - - // Get the image rectangle - void getRect (double *xa1, double *ya1, double *xa2, double *ya2) - { *xa1 = x1; *ya1 = y1; *xa2 = x2; *ya2 = y2; } - -private: - cairo_surface_t *image; // image cairo surface - double x1, y1; // upper left corner - double x2, y2; // lower right corner -}; - - -//------------------------------------------------------------------------ -// CairoOutputDev -//------------------------------------------------------------------------ - -class CairoOutputDev: public OutputDev { -public: - - // Constructor. - CairoOutputDev(); - - // Destructor. - virtual ~CairoOutputDev(); - - //----- get info about output device - - // Does this device use upside-down coordinates? - // (Upside-down means (0,0) is the top left corner of the page.) - GBool upsideDown() override { return gTrue; } - - // Does this device use drawChar() or drawString()? - GBool useDrawChar() override { return gTrue; } - - // Does this device use tilingPatternFill()? If this returns false, - // tiling pattern fills will be reduced to a series of other drawing - // operations. - GBool useTilingPatternFill() override { return gTrue; } - - // Does this device use functionShadedFill(), axialShadedFill(), and - // radialShadedFill()? If this returns false, these shaded fills - // will be reduced to a series of other drawing operations. -#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 12, 0) - GBool useShadedFills(int type) override { return type <= 7; } -#else - GBool useShadedFills(int type) override { return type > 1 && type < 4; } -#endif - - // Does this device use FillColorStop()? - GBool useFillColorStop() override { return gTrue; } - - // Does this device use beginType3Char/endType3Char? Otherwise, - // text in Type 3 fonts will be drawn with drawChar/drawString. - GBool interpretType3Chars() override { return gFalse; } - - // Does this device need to clip pages to the crop box even when the - // box is the crop box? - GBool needClipToCropBox() override { return gTrue; } - - //----- initialization and control - - // Start a page. - void startPage(int pageNum, GfxState *state, XRef *xref) override; - - // End a page. - void endPage() override; - - //----- save/restore graphics state - void saveState(GfxState *state) override; - void restoreState(GfxState *state) override; - - //----- update graphics state - void updateAll(GfxState *state) override; - void setDefaultCTM(double *ctm) override; - void updateCTM(GfxState *state, double m11, double m12, - double m21, double m22, double m31, double m32) override; - void updateLineDash(GfxState *state) override; - void updateFlatness(GfxState *state) override; - void updateLineJoin(GfxState *state) override; - void updateLineCap(GfxState *state) override; - void updateMiterLimit(GfxState *state) override; - void updateLineWidth(GfxState *state) override; - void updateFillColor(GfxState *state) override; - void updateStrokeColor(GfxState *state) override; - void updateFillOpacity(GfxState *state) override; - void updateStrokeOpacity(GfxState *state) override; - void updateFillColorStop(GfxState *state, double offset) override; - void updateBlendMode(GfxState *state) override; - - //----- update text state - void updateFont(GfxState *state) override; - - //----- path painting - void stroke(GfxState *state) override; - void fill(GfxState *state) override; - void eoFill(GfxState *state) override; - void clipToStrokePath(GfxState *state) override; - GBool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, Object *str, - double *pmat, int paintType, int tilingType, Dict *resDict, - double *mat, double *bbox, - int x0, int y0, int x1, int y1, - double xStep, double yStep) override; -#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 12, 0) - GBool functionShadedFill(GfxState *state, GfxFunctionShading *shading) override; -#endif - GBool axialShadedFill(GfxState *state, GfxAxialShading *shading, double tMin, double tMax) override; - GBool axialShadedSupportExtend(GfxState *state, GfxAxialShading *shading) override; - GBool radialShadedFill(GfxState *state, GfxRadialShading *shading, double sMin, double sMax) override; - GBool radialShadedSupportExtend(GfxState *state, GfxRadialShading *shading) override; -#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 12, 0) - GBool gouraudTriangleShadedFill(GfxState *state, GfxGouraudTriangleShading *shading) override; - GBool patchMeshShadedFill(GfxState *state, GfxPatchMeshShading *shading) override; -#endif - - //----- path clipping - void clip(GfxState *state) override; - void eoClip(GfxState *state) override; - - //----- text drawing - void beginString(GfxState *state, const GooString *s) override; - void endString(GfxState *state) override; - void drawChar(GfxState *state, double x, double y, - double dx, double dy, - double originX, double originY, - CharCode code, int nBytes, Unicode *u, int uLen) override; - void beginActualText(GfxState *state, const GooString *text) override; - void endActualText(GfxState *state) override; - - GBool beginType3Char(GfxState *state, double x, double y, - double dx, double dy, - CharCode code, Unicode *u, int uLen) override; - void endType3Char(GfxState *state) override; - void beginTextObject(GfxState *state) override; - void endTextObject(GfxState *state) override; - - //----- image drawing - void drawImageMask(GfxState *state, Object *ref, Stream *str, - int width, int height, GBool invert, GBool interpolate, - GBool inlineImg) override; - void setSoftMaskFromImageMask(GfxState *state, - Object *ref, Stream *str, - int width, int height, GBool invert, - GBool inlineImg, double *baseMatrix) override; - void unsetSoftMaskFromImageMask(GfxState *state, double *baseMatrix) override; - void drawImageMaskPrescaled(GfxState *state, Object *ref, Stream *str, - int width, int height, GBool invert, GBool interpolate, - GBool inlineImg); - void drawImageMaskRegular(GfxState *state, Object *ref, Stream *str, - int width, int height, GBool invert, GBool interpolate, - GBool inlineImg); - - void drawImage(GfxState *state, Object *ref, Stream *str, - int width, int height, GfxImageColorMap *colorMap, - GBool interpolate, int *maskColors, GBool inlineImg) override; - void drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str, - int width, int height, - GfxImageColorMap *colorMap, - GBool interpolate, - Stream *maskStr, - int maskWidth, int maskHeight, - GfxImageColorMap *maskColorMap, - GBool maskInterpolate) override; - - void drawMaskedImage(GfxState *state, Object *ref, Stream *str, - int width, int height, - GfxImageColorMap *colorMap, - GBool interpolate, - Stream *maskStr, - int maskWidth, int maskHeight, - GBool maskInvert, GBool maskInterpolate) override; - - //----- transparency groups and soft masks - void beginTransparencyGroup(GfxState * /*state*/, double * /*bbox*/, - GfxColorSpace * /*blendingColorSpace*/, - GBool /*isolated*/, GBool /*knockout*/, - GBool /*forSoftMask*/) override; - void endTransparencyGroup(GfxState * /*state*/) override; - void popTransparencyGroup(); - void paintTransparencyGroup(GfxState * /*state*/, double * /*bbox*/) override; - void setSoftMask(GfxState * /*state*/, double * /*bbox*/, GBool /*alpha*/, - Function * /*transferFunc*/, GfxColor * /*backdropColor*/) override; - void clearSoftMask(GfxState * /*state*/) override; - - //----- Type 3 font operators - void type3D0(GfxState *state, double wx, double wy) override; - void type3D1(GfxState *state, double wx, double wy, - double llx, double lly, double urx, double ury) override; - - //----- special access - - // Called to indicate that a new PDF document has been loaded. - void startDoc(PDFDoc *docA, CairoFontEngine *fontEngine = NULL); - - GBool isReverseVideo() { return gFalse; } - - void setCairo (cairo_t *cr); - void setTextPage (TextPage *text); - void setPrinting (GBool printingA) { printing = printingA; needFontUpdate = gTrue; } - void setAntialias(cairo_antialias_t antialias); - - void setInType3Char(GBool inType3CharA) { inType3Char = inType3CharA; } - void getType3GlyphWidth (double *wx, double *wy) { *wx = t3_glyph_wx; *wy = t3_glyph_wy; } - GBool hasType3GlyphBBox () { return t3_glyph_has_bbox; } - double *getType3GlyphBBox () { return t3_glyph_bbox; } - -protected: - void doPath(cairo_t *cairo, GfxState *state, GfxPath *path); - cairo_surface_t *downscaleSurface(cairo_surface_t *orig_surface); - void getScaledSize(const cairo_matrix_t *matrix, - int orig_width, int orig_height, - int *scaledWidth, int *scaledHeight); - cairo_filter_t getFilterForSurface(cairo_surface_t *image, - GBool interpolate); - GBool getStreamData (Stream *str, char **buffer, int *length); - void setMimeData(GfxState *state, Stream *str, Object *ref, - GfxImageColorMap *colorMap, cairo_surface_t *image, int height); - void fillToStrokePathClip(GfxState *state); - void alignStrokeCoords(GfxSubpath *subpath, int i, double *x, double *y); -#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 14, 0) - GBool setMimeDataForJBIG2Globals (Stream *str, cairo_surface_t *image); -#endif -#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 15, 10) - GBool setMimeDataForCCITTParams(Stream *str, cairo_surface_t *image, int height); -#endif - static void setContextAntialias(cairo_t *cr, cairo_antialias_t antialias); - - GfxRGB fill_color, stroke_color; - cairo_pattern_t *fill_pattern, *stroke_pattern; - double fill_opacity; - double stroke_opacity; - GBool stroke_adjust; - GBool adjusted_stroke_width; - GBool align_stroke_coords; - CairoFont *currentFont; - XRef *xref; - - struct StrokePathClip { - GfxPath *path; - cairo_matrix_t ctm; - double line_width; - double *dashes; - int dash_count; - double dash_offset; - cairo_line_cap_t cap; - cairo_line_join_t join; - double miter; - int ref_count; - } *strokePathClip; - - PDFDoc *doc; // the current document - - static FT_Library ft_lib; - static GBool ft_lib_initialized; - - CairoFontEngine *fontEngine; - GBool fontEngine_owner; - - cairo_t *cairo; - cairo_matrix_t orig_matrix; - GBool needFontUpdate; // set when the font needs to be updated - GBool printing; - GBool use_show_text_glyphs; - GBool text_matrix_valid; - cairo_glyph_t *glyphs; - int glyphCount; - cairo_text_cluster_t *clusters; - int clusterCount; - char *utf8; - int utf8Count; - int utf8Max; - cairo_path_t *textClipPath; - GBool inUncoloredPattern; // inside a uncolored pattern (PaintType = 2) - GBool inType3Char; // inside a Type 3 CharProc - double t3_glyph_wx, t3_glyph_wy; - GBool t3_glyph_has_bbox; - double t3_glyph_bbox[4]; - cairo_antialias_t antialias; - GBool prescaleImages; - - TextPage *text; // text for the current page - ActualText *actualText; - - cairo_pattern_t *group; - cairo_pattern_t *shape; - cairo_pattern_t *mask; - cairo_matrix_t mask_matrix; - cairo_t *cairo_shape; - int knockoutCount; - struct ColorSpaceStack { - GBool knockout; - GfxColorSpace *cs; - cairo_matrix_t group_matrix; - struct ColorSpaceStack *next; - } * groupColorSpaceStack; - - struct MaskStack { - cairo_pattern_t *mask; - cairo_matrix_t mask_matrix; - struct MaskStack *next; - } *maskStack; - -}; - -//------------------------------------------------------------------------ -// CairoImageOutputDev -//------------------------------------------------------------------------ - -//XXX: this should ideally not inherit from CairoOutputDev but use it instead perhaps -class CairoImageOutputDev: public CairoOutputDev { -public: - - // Constructor. - CairoImageOutputDev(); - - // Destructor. - virtual ~CairoImageOutputDev(); - - //----- get info about output device - - // Does this device use upside-down coordinates? - // (Upside-down means (0,0) is the top left corner of the page.) - GBool upsideDown() override { return gTrue; } - - // Does this device use drawChar() or drawString()? - GBool useDrawChar() override { return gFalse; } - - // Does this device use tilingPatternFill()? If this returns false, - // tiling pattern fills will be reduced to a series of other drawing - // operations. - GBool useTilingPatternFill() override { return gTrue; } - - // Does this device use functionShadedFill(), axialShadedFill(), and - // radialShadedFill()? If this returns false, these shaded fills - // will be reduced to a series of other drawing operations. -#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 11, 2) - GBool useShadedFills(int type) override { return type <= 7; } -#else - GBool useShadedFills(int type) override { return type < 4; } -#endif - - // Does this device use FillColorStop()? - GBool useFillColorStop() override { return gFalse; } - - // Does this device use beginType3Char/endType3Char? Otherwise, - // text in Type 3 fonts will be drawn with drawChar/drawString. - GBool interpretType3Chars() override { return gFalse; } - - // Does this device need non-text content? - GBool needNonText() override { return gTrue; } - - //----- save/restore graphics state - void saveState(GfxState *state) override { } - void restoreState(GfxState *state) override { } - - //----- update graphics state - void updateAll(GfxState *state) override { } - void setDefaultCTM(double *ctm) override { } - void updateCTM(GfxState *state, double m11, double m12, - double m21, double m22, double m31, double m32) override { } - void updateLineDash(GfxState *state) override { } - void updateFlatness(GfxState *state) override { } - void updateLineJoin(GfxState *state) override { } - void updateLineCap(GfxState *state) override { } - void updateMiterLimit(GfxState *state) override { } - void updateLineWidth(GfxState *state) override { } - void updateFillColor(GfxState *state) override { } - void updateStrokeColor(GfxState *state) override { } - void updateFillOpacity(GfxState *state) override { } - void updateStrokeOpacity(GfxState *state) override { } - void updateBlendMode(GfxState *state) override { } - - //----- update text state - void updateFont(GfxState *state) override { } - - //----- path painting - void stroke(GfxState *state) override { } - void fill(GfxState *state) override { } - void eoFill(GfxState *state) override { } - void clipToStrokePath(GfxState *state) override { } - GBool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, Object *str, - double *pmat, int paintType, int tilingType, Dict *resDict, - double *mat, double *bbox, - int x0, int y0, int x1, int y1, - double xStep, double yStep) override { return gTrue; } - GBool axialShadedFill(GfxState *state, - GfxAxialShading *shading, - double tMin, double tMax) override { return gTrue; } - GBool radialShadedFill(GfxState *state, - GfxRadialShading *shading, - double sMin, double sMax) override { return gTrue; } - - //----- path clipping - void clip(GfxState *state) override { } - void eoClip(GfxState *state) override { } - - //----- image drawing - void drawImageMask(GfxState *state, Object *ref, Stream *str, - int width, int height, GBool invert, - GBool interpolate, GBool inlineImg) override; - void drawImage(GfxState *state, Object *ref, Stream *str, - int width, int height, GfxImageColorMap *colorMap, - GBool interpolate, int *maskColors, GBool inlineImg) override; - void drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str, - int width, int height, - GfxImageColorMap *colorMap, - GBool interpolate, - Stream *maskStr, - int maskWidth, int maskHeight, - GfxImageColorMap *maskColorMap, - GBool maskInterpolate) override; - void drawMaskedImage(GfxState *state, Object *ref, Stream *str, - int width, int height, - GfxImageColorMap *colorMap, - GBool interpolate, - Stream *maskStr, - int maskWidth, int maskHeight, - GBool maskInvert, GBool maskInterpolate) override; - void setSoftMaskFromImageMask(GfxState *state, Object *ref, Stream *str, - int width, int height, GBool invert, - GBool inlineImg, double *baseMatrix) override; - void unsetSoftMaskFromImageMask(GfxState *state, double *baseMatrix) override {} - - - //----- transparency groups and soft masks - void beginTransparencyGroup(GfxState * /*state*/, double * /*bbox*/, - GfxColorSpace * /*blendingColorSpace*/, - GBool /*isolated*/, GBool /*knockout*/, - GBool /*forSoftMask*/) override {} - void endTransparencyGroup(GfxState * /*state*/) override {} - void paintTransparencyGroup(GfxState * /*state*/, double * /*bbox*/) override {} - void setSoftMask(GfxState * /*state*/, double * /*bbox*/, GBool /*alpha*/, - Function * /*transferFunc*/, GfxColor * /*backdropColor*/) override {} - void clearSoftMask(GfxState * /*state*/) override {} - - //----- Image list - // By default images are not rendred - void setImageDrawDecideCbk(GBool (*cbk)(int img_id, void *data), - void *data) { imgDrawCbk = cbk; imgDrawCbkData = data; } - // Iterate through list of images. - int getNumImages() const { return numImages; } - CairoImage *getImage(int i) const { return images[i]; } - -private: - void saveImage(CairoImage *image); - void getBBox(GfxState *state, int width, int height, - double *x1, double *y1, double *x2, double *y2); - - CairoImage **images; - int numImages; - int size; - GBool (*imgDrawCbk)(int img_id, void *data); - void *imgDrawCbkData; -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/CairoRescaleBox.cc b/Build/source/libs/poppler/poppler-src/poppler/CairoRescaleBox.cc deleted file mode 100644 index f34b1e1c79c..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/CairoRescaleBox.cc +++ /dev/null @@ -1,376 +0,0 @@ -/* -*- Mode: c; c-basic-offset: 4; tab-width: 8; indent-tabs-mode: t; -*- */ -/* - * Copyright © 2009 Mozilla Corporation - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Mozilla Corporation not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Mozilla Corporation makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * MOZILLA CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT - * SHALL MOZILLA CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - * - * Author: Jeff Muizelaar, Mozilla Corp. - */ - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2012 Hib Eris <hib@hiberis.nl> -// Copyright (C) 2012, 2017 Adrian Johnson <ajohnson@redneon.com> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - - -/* This implements a box filter that supports non-integer box sizes */ - -#include <config.h> - -#include <cstdint> -#include <stdint.h> -#include <stdio.h> -#include <assert.h> -#include <stdlib.h> -#include <math.h> -#include "goo/gmem.h" -#include "CairoRescaleBox.h" - - -/* we work in fixed point where 1. == 1 << 24 */ -#define FIXED_SHIFT 24 - - -static void downsample_row_box_filter ( - int start, int width, - uint32_t *src, uint32_t *dest, - int coverage[], int pixel_coverage) -{ - /* we need an array of the pixel contribution of each destination pixel on the boundaries. - * we invert the value to get the value on the other size of the box */ - /* - - value = a * contribution * 1/box_size - value += a * 1/box_size - value += a * 1/box_size - value += a * 1/box_size - value += a * (1 - contribution) * 1/box_size - a * (1/box_size - contribution * 1/box_size) - - box size is constant - - - value = a * contribtion_a * 1/box_size + b * contribution_b * 1/box_size - contribution_b = (1 - contribution_a) - = (1 - contribution_a_next) - */ - - /* box size = ceil(src_width/dest_width) */ - int x = 0; - - /* skip to start */ - /* XXX: it might be possible to do this directly instead of iteratively, however - * the iterative solution is simple */ - while (x < start) - { - int box = 1 << FIXED_SHIFT; - int start_coverage = coverage[x]; - box -= start_coverage; - src++; - while (box >= pixel_coverage) - { - src++; - box -= pixel_coverage; - } - x++; - } - - while (x < start + width) - { - uint32_t a = 0; - uint32_t r = 0; - uint32_t g = 0; - uint32_t b = 0; - int box = 1 << FIXED_SHIFT; - int start_coverage = coverage[x]; - - a = ((*src >> 24) & 0xff) * start_coverage; - r = ((*src >> 16) & 0xff) * start_coverage; - g = ((*src >> 8) & 0xff) * start_coverage; - b = ((*src >> 0) & 0xff) * start_coverage; - src++; - x++; - box -= start_coverage; - - while (box >= pixel_coverage) - { - a += ((*src >> 24) & 0xff) * pixel_coverage; - r += ((*src >> 16) & 0xff) * pixel_coverage; - g += ((*src >> 8) & 0xff) * pixel_coverage; - b += ((*src >> 0) & 0xff) * pixel_coverage; - src++; - - box -= pixel_coverage; - } - - /* multiply by whatever is leftover - * this ensures that we don't bias down. - * i.e. start_coverage + n*pixel_coverage + box == 1 << 24 */ - if (box > 0) - { - a += ((*src >> 24) & 0xff) * box; - r += ((*src >> 16) & 0xff) * box; - g += ((*src >> 8) & 0xff) * box; - b += ((*src >> 0) & 0xff) * box; - } - - a >>= FIXED_SHIFT; - r >>= FIXED_SHIFT; - g >>= FIXED_SHIFT; - b >>= FIXED_SHIFT; - - *dest = (a << 24) | (r << 16) | (g << 8) | b; - dest++; - } -} - -static void downsample_columns_box_filter ( - int n, - int start_coverage, - int pixel_coverage, - uint32_t *src, uint32_t *dest) -{ - int stride = n; - while (n--) { - uint32_t a = 0; - uint32_t r = 0; - uint32_t g = 0; - uint32_t b = 0; - uint32_t *column_src = src; - int box = 1 << FIXED_SHIFT; - - a = ((*column_src >> 24) & 0xff) * start_coverage; - r = ((*column_src >> 16) & 0xff) * start_coverage; - g = ((*column_src >> 8) & 0xff) * start_coverage; - b = ((*column_src >> 0) & 0xff) * start_coverage; - column_src += stride; - box -= start_coverage; - - while (box >= pixel_coverage) - { - a += ((*column_src >> 24) & 0xff) * pixel_coverage; - r += ((*column_src >> 16) & 0xff) * pixel_coverage; - g += ((*column_src >> 8) & 0xff) * pixel_coverage; - b += ((*column_src >> 0) & 0xff) * pixel_coverage; - column_src += stride; - box -= pixel_coverage; - } - - if (box > 0) { - a += ((*column_src >> 24) & 0xff) * box; - r += ((*column_src >> 16) & 0xff) * box; - g += ((*column_src >> 8) & 0xff) * box; - b += ((*column_src >> 0) & 0xff) * box; - } - - a >>= FIXED_SHIFT; - r >>= FIXED_SHIFT; - g >>= FIXED_SHIFT; - b >>= FIXED_SHIFT; - - *dest = (a << 24) | (r << 16) | (g << 8) | b; - dest++; - src++; - } -} - -static int compute_coverage (int coverage[], int src_length, int dest_length) -{ - int i; - /* num = src_length/dest_length - total = sum(pixel) / num - - pixel * 1/num == pixel * dest_length / src_length - */ - /* the average contribution of each source pixel */ - int ratio = ((1 << 24)*(long long int)dest_length)/src_length; - /* because ((1 << 24)*(long long int)dest_length) won't always be divisible by src_length - * we'll need someplace to put the other bits. - * - * We want to ensure a + n*ratio < 1<<24 - * - * 1<<24 - * */ - - double scale = (double)src_length/dest_length; - - /* for each destination pixel compute the coverage of the left most pixel included in the box */ - /* I have a proof of this, which this margin is too narrow to contain */ - for (i=0; i<dest_length; i++) - { - float left_side = i*scale; - float right_side = (i+1)*scale; - float right_fract = right_side - floor (right_side); - float left_fract = ceil (left_side) - left_side; - int overage; - /* find out how many source pixels will be used to fill the box */ - int count = floor (right_side) - ceil (left_side); - /* what's the maximum value this expression can become? - floor((i+1)*scale) - ceil(i*scale) - - (i+1)*scale - i*scale == scale - - since floor((i+1)*scale) <= (i+1)*scale - and ceil(i*scale) >= i*scale - - floor((i+1)*scale) - ceil(i*scale) <= scale - - further since: floor((i+1)*scale) - ceil(i*scale) is an integer - - therefore: - floor((i+1)*scale) - ceil(i*scale) <= floor(scale) - */ - - if (left_fract == 0.) - count--; - - /* compute how much the right-most pixel contributes */ - overage = ratio*(right_fract); - - /* the remainder is the the amount that the left-most pixel - * contributes */ - coverage[i] = (1<<24) - (count * ratio + overage); - } - - return ratio; -} - - -GBool CairoRescaleBox::downScaleImage(unsigned orig_width, unsigned orig_height, - signed scaled_width, signed scaled_height, - unsigned short int start_column, unsigned short int start_row, - unsigned short int width, unsigned short int height, - cairo_surface_t *dest_surface) { - int pixel_coverage_x, pixel_coverage_y; - int dest_y; - int src_y = 0; - uint32_t *scanline; - int *x_coverage = nullptr; - int *y_coverage = nullptr; - uint32_t *temp_buf = nullptr; - GBool retval = gFalse; - unsigned int *dest; - int dst_stride; - - dest = (unsigned int *)cairo_image_surface_get_data (dest_surface); - dst_stride = cairo_image_surface_get_stride (dest_surface); - - scanline = (uint32_t*)gmallocn3 (orig_width, 1, sizeof(int)); - - x_coverage = (int *)gmallocn3 (orig_width, 1, sizeof(int)); - y_coverage = (int *)gmallocn3 (orig_height, 1, sizeof(int)); - - /* we need to allocate enough room for ceil(src_height/dest_height)+1 - Example: - src_height = 140 - dest_height = 50 - src_height/dest_height = 2.8 - - |-------------| 2.8 pixels - |----|----|----|----| 4 pixels - need to sample 3 pixels - - |-------------| 2.8 pixels - |----|----|----|----| 4 pixels - need to sample 4 pixels - */ - - temp_buf = (uint32_t *)gmallocn3 ((orig_height + scaled_height-1)/scaled_height+1, scaled_width, sizeof(uint32_t)); - - if (!x_coverage || !y_coverage || !scanline || !temp_buf) - goto cleanup; - - pixel_coverage_x = compute_coverage (x_coverage, orig_width, scaled_width); - pixel_coverage_y = compute_coverage (y_coverage, orig_height, scaled_height); - - assert (width + start_column <= scaled_width); - - - - /* skip the rows at the beginning */ - for (dest_y = 0; dest_y < start_row; dest_y++) - { - int box = 1 << FIXED_SHIFT; - int start_coverage_y = y_coverage[dest_y]; - box -= start_coverage_y; - src_y++; - while (box >= pixel_coverage_y) - { - box -= pixel_coverage_y; - src_y++; - } - } - - for (; dest_y < start_row + height; dest_y++) - { - int columns = 0; - int box = 1 << FIXED_SHIFT; - int start_coverage_y = y_coverage[dest_y]; - - getRow(src_y, scanline); - downsample_row_box_filter (start_column, width, scanline, temp_buf + width * columns, x_coverage, pixel_coverage_x); - columns++; - src_y++; - box -= start_coverage_y; - - while (box >= pixel_coverage_y) - { - getRow(src_y, scanline); - downsample_row_box_filter (start_column, width, scanline, temp_buf + width * columns, x_coverage, pixel_coverage_x); - columns++; - src_y++; - box -= pixel_coverage_y; - } - - /* downsample any leftovers */ - if (box > 0) - { - getRow(src_y, scanline); - downsample_row_box_filter (start_column, width, scanline, temp_buf + width * columns, x_coverage, pixel_coverage_x); - columns++; - } - - /* now scale the rows we just downsampled in the y direction */ - downsample_columns_box_filter (width, start_coverage_y, pixel_coverage_y, temp_buf, dest); - dest += dst_stride / 4; - -// assert(width*columns <= ((orig_height + scaled_height-1)/scaled_height+1) * width); - } -// assert (src_y<=orig_height); - - retval = gTrue; - -cleanup: - free (x_coverage); - free (y_coverage); - free (temp_buf); - free (scanline); - - return retval; -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/CairoRescaleBox.h b/Build/source/libs/poppler/poppler-src/poppler/CairoRescaleBox.h deleted file mode 100644 index ca307cb7dc8..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/CairoRescaleBox.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright © 2009 Mozilla Corporation - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Mozilla Corporation not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Mozilla Corporation makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * MOZILLA CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT - * SHALL MOZILLA CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - * - * Author: Jeff Muizelaar, Mozilla Corp. - */ - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2012 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2018 Albert Astals Cid <aacid@kde.org> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef CAIRO_RESCALE_BOX_H -#define CAIRO_RESCALE_BOX_H - -#include "goo/gtypes.h" -#include <cairo.h> - -class CairoRescaleBox { -public: - - CairoRescaleBox() {}; - virtual ~CairoRescaleBox() {}; - - CairoRescaleBox(const CairoRescaleBox &) = delete; - CairoRescaleBox& operator=(const CairoRescaleBox &) = delete; - - virtual GBool downScaleImage(unsigned orig_width, unsigned orig_height, - signed scaled_width, signed scaled_height, - unsigned short int start_column, unsigned short int start_row, - unsigned short int width, unsigned short int height, - cairo_surface_t *dest_surface); - - virtual void getRow(int row_num, uint32_t *row_data) = 0; - -}; - -#endif /* CAIRO_RESCALE_BOX_H */ diff --git a/Build/source/libs/poppler/poppler-src/poppler/Catalog.cc b/Build/source/libs/poppler/poppler-src/poppler/Catalog.cc deleted file mode 100644 index e6fde7ab34d..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/Catalog.cc +++ /dev/null @@ -1,1065 +0,0 @@ -//======================================================================== -// -// Catalog.cc -// -// Copyright 1996-2007 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2005 Kristian Høgsberg <krh@redhat.com> -// Copyright (C) 2005-2013, 2015, 2017, 2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2005 Jeff Muizelaar <jrmuizel@nit.ca> -// Copyright (C) 2005 Jonathan Blandford <jrb@redhat.com> -// Copyright (C) 2005 Marco Pesenti Gritti <mpg@redhat.com> -// Copyright (C) 2005, 2006, 2008 Brad Hards <bradh@frogmouth.net> -// Copyright (C) 2006, 2008, 2011 Carlos Garcia Campos <carlosgc@gnome.org> -// Copyright (C) 2007 Julien Rebetez <julienr@svn.gnome.org> -// Copyright (C) 2008, 2011 Pino Toscano <pino@kde.org> -// Copyright (C) 2009 Ilya Gorenbein <igorenbein@finjan.com> -// Copyright (C) 2010 Hib Eris <hib@hiberis.nl> -// Copyright (C) 2012 Fabio D'Urso <fabiodurso@hotmail.it> -// Copyright (C) 2013 Thomas Freitag <Thomas.Freitag@alfa.de> -// Copyright (C) 2013 Julien Nabet <serval2412@yahoo.fr> -// Copyright (C) 2013 Adrian Perez de Castro <aperez@igalia.com> -// Copyright (C) 2013, 2017 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2013 José Aliste <jaliste@src.gnome.org> -// Copyright (C) 2014 Ed Porras <ed@moto-research.com> -// Copyright (C) 2015 Even Rouault <even.rouault@spatialys.com> -// Copyright (C) 2016 Masamichi Hosoda <trueroad@trueroad.jp> -// 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 -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include <config.h> - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include <stddef.h> -#include <stdlib.h> -#include "goo/gmem.h" -#include "Object.h" -#include "PDFDoc.h" -#include "XRef.h" -#include "Array.h" -#include "Dict.h" -#include "Page.h" -#include "Error.h" -#include "Link.h" -#include "PageLabelInfo.h" -#include "Catalog.h" -#include "Form.h" -#include "OptionalContent.h" -#include "ViewerPreferences.h" -#include "FileSpec.h" -#include "StructTreeRoot.h" - -#ifdef MULTITHREADED -# define catalogLocker() MutexLocker locker(&mutex) -#else -# define catalogLocker() -#endif -//------------------------------------------------------------------------ -// Catalog -//------------------------------------------------------------------------ - -Catalog::Catalog(PDFDoc *docA) { -#ifdef MULTITHREADED - gInitMutex(&mutex); -#endif - ok = gTrue; - doc = docA; - xref = doc->getXRef(); - pages = nullptr; - pageRefs = nullptr; - numPages = -1; - pagesSize = 0; - baseURI = nullptr; - pageLabelInfo = nullptr; - form = nullptr; - optContent = nullptr; - pageMode = pageModeNull; - pageLayout = pageLayoutNull; - destNameTree = nullptr; - embeddedFileNameTree = nullptr; - jsNameTree = nullptr; - viewerPrefs = nullptr; - structTreeRoot = nullptr; - - pagesList = nullptr; - pagesRefList = nullptr; - attrsList = nullptr; - kidsIdxList = nullptr; - lastCachedPage = 0; - markInfo = markInfoNull; - - Object catDict = xref->getCatalog(); - if (!catDict.isDict()) { - error(errSyntaxError, -1, "Catalog object is wrong type ({0:s})", catDict.getTypeName()); - ok = gFalse; - return; - } - // get the AcroForm dictionary - acroForm = catDict.dictLookup("AcroForm"); - - // read base URI - Object obj = catDict.dictLookup("URI"); - if (obj.isDict()) { - Object obj2 = obj.dictLookup("Base"); - if (obj2.isString()) { - baseURI = obj2.getString()->copy(); - } - } - - // get the Optional Content dictionary - Object optContentProps = catDict.dictLookup("OCProperties"); - if (optContentProps.isDict()) { - optContent = new OCGs(&optContentProps, xref); - if (!optContent->isOk ()) { - delete optContent; - optContent = nullptr; - } - } - - // actions - additionalActions = catDict.dictLookupNF("AA"); - - // get the ViewerPreferences dictionary - viewerPreferences = catDict.dictLookup("ViewerPreferences"); -} - -Catalog::~Catalog() { - delete kidsIdxList; - if (attrsList) { - std::vector<PageAttrs *>::iterator it; - for (it = attrsList->begin() ; it != attrsList->end(); ++it ) { - delete *it; - } - delete attrsList; - } - delete pagesRefList; - delete pagesList; - if (pages) { - for (int i = 0; i < pagesSize; ++i) { - if (pages[i]) { - delete pages[i]; - } - } - gfree(pages); - } - gfree(pageRefs); - delete destNameTree; - delete embeddedFileNameTree; - delete jsNameTree; - if (baseURI) { - delete baseURI; - } - delete pageLabelInfo; - delete form; - delete optContent; - delete viewerPrefs; - delete structTreeRoot; -#ifdef MULTITHREADED - gDestroyMutex(&mutex); -#endif -} - -GooString *Catalog::readMetadata() { - catalogLocker(); - if (metadata.isNone()) { - Object catDict = xref->getCatalog(); - if (catDict.isDict()) { - metadata = catDict.dictLookup("Metadata"); - } else { - error(errSyntaxError, -1, "Catalog object is wrong type ({0:s})", catDict.getTypeName()); - metadata.setToNull(); - } - } - - if (!metadata.isStream()) { - return nullptr; - } - Object obj = metadata.streamGetDict()->lookup("Subtype"); - if (!obj.isName("XML")) { - error(errSyntaxWarning, -1, "Unknown Metadata type: '{0:s}'", - obj.isName() ? obj.getName() : "???"); - } - GooString *s = new GooString(); - metadata.getStream()->fillGooString(s); - metadata.streamClose(); - return s; -} - -Page *Catalog::getPage(int i) -{ - if (i < 1) return nullptr; - - catalogLocker(); - if (i > lastCachedPage) { - GBool cached = cachePageTree(i); - if ( cached == gFalse) { - return nullptr; - } - } - return pages[i-1]; -} - -Ref *Catalog::getPageRef(int i) -{ - if (i < 1) return nullptr; - - catalogLocker(); - if (i > lastCachedPage) { - GBool cached = cachePageTree(i); - if ( cached == gFalse) { - return nullptr; - } - } - return &pageRefs[i-1]; -} - -GBool Catalog::cachePageTree(int page) -{ - if (pagesList == nullptr) { - - Ref pagesRef; - - Object catDict = xref->getCatalog(); - - if (catDict.isDict()) { - Object pagesDictRef = catDict.dictLookupNF("Pages"); - if (pagesDictRef.isRef() && - pagesDictRef.getRefNum() >= 0 && - pagesDictRef.getRefNum() < xref->getNumObjects()) { - pagesRef = pagesDictRef.getRef(); - } else { - error(errSyntaxError, -1, "Catalog dictionary does not contain a valid \"Pages\" entry"); - return gFalse; - } - } else { - error(errSyntaxError, -1, "Could not find catalog dictionary"); - return gFalse; - } - - Object obj = catDict.dictLookup("Pages"); - // This should really be isDict("Pages"), but I've seen at least one - // PDF file where the /Type entry is missing. - if (!obj.isDict()) { - error(errSyntaxError, -1, "Top-level pages object is wrong type ({0:s})", obj.getTypeName()); - return gFalse; - } - - pagesSize = getNumPages(); - pages = (Page **)gmallocn_checkoverflow(pagesSize, sizeof(Page *)); - pageRefs = (Ref *)gmallocn_checkoverflow(pagesSize, sizeof(Ref)); - if (pages == nullptr || pageRefs == nullptr ) { - error(errSyntaxError, -1, "Cannot allocate page cache"); - pagesSize = 0; - return gFalse; - } - for (int i = 0; i < pagesSize; ++i) { - pages[i] = nullptr; - pageRefs[i].num = -1; - pageRefs[i].gen = -1; - } - - attrsList = new std::vector<PageAttrs *>(); - attrsList->push_back(new PageAttrs(nullptr, obj.getDict())); - pagesList = new std::vector<Object>(); - pagesList->push_back(std::move(obj)); - pagesRefList = new std::vector<Ref>(); - pagesRefList->push_back(pagesRef); - kidsIdxList = new std::vector<int>(); - kidsIdxList->push_back(0); - lastCachedPage = 0; - - } - - while(1) { - - if (page <= lastCachedPage) return gTrue; - - if (pagesList->empty()) return gFalse; - - Object pagesDict = pagesList->back().copy(); - Object kids = pagesDict.dictLookup("Kids"); - if (!kids.isArray()) { - error(errSyntaxError, -1, "Kids object (page {0:d}) is wrong type ({1:s})", - lastCachedPage+1, kids.getTypeName()); - return gFalse; - } - - int kidsIdx = kidsIdxList->back(); - if (kidsIdx >= kids.arrayGetLength()) { - pagesList->pop_back(); - pagesRefList->pop_back(); - delete attrsList->back(); - attrsList->pop_back(); - kidsIdxList->pop_back(); - if (!kidsIdxList->empty()) kidsIdxList->back()++; - continue; - } - - Object kidRef = kids.arrayGetNF(kidsIdx); - if (!kidRef.isRef()) { - error(errSyntaxError, -1, "Kid object (page {0:d}) is not an indirect reference ({1:s})", - lastCachedPage+1, kidRef.getTypeName()); - return gFalse; - } - - GBool loop = gFalse;; - for (size_t i = 0; i < pagesRefList->size(); i++) { - if (((*pagesRefList)[i]).num == kidRef.getRefNum()) { - loop = gTrue; - break; - } - } - if (loop) { - error(errSyntaxError, -1, "Loop in Pages tree"); - kidsIdxList->back()++; - continue; - } - - Object kid = kids.arrayGet(kidsIdx); - if (kid.isDict("Page") || (kid.isDict() && !kid.getDict()->hasKey("Kids"))) { - PageAttrs *attrs = new PageAttrs(attrsList->back(), kid.getDict()); - Page *p = new Page(doc, lastCachedPage+1, &kid, - kidRef.getRef(), attrs, form); - if (!p->isOk()) { - error(errSyntaxError, -1, "Failed to create page (page {0:d})", lastCachedPage+1); - delete p; - return gFalse; - } - - if (lastCachedPage >= numPages) { - error(errSyntaxError, -1, "Page count in top-level pages object is incorrect"); - delete p; - return gFalse; - } - - pages[lastCachedPage] = p; - pageRefs[lastCachedPage].num = kidRef.getRefNum(); - pageRefs[lastCachedPage].gen = kidRef.getRefGen(); - - lastCachedPage++; - kidsIdxList->back()++; - - // This should really be isDict("Pages"), but I've seen at least one - // PDF file where the /Type entry is missing. - } else if (kid.isDict()) { - attrsList->push_back(new PageAttrs(attrsList->back(), kid.getDict())); - pagesRefList->push_back(kidRef.getRef()); - pagesList->push_back(std::move(kid)); - kidsIdxList->push_back(0); - } else { - error(errSyntaxError, -1, "Kid object (page {0:d}) is wrong type ({1:s})", - lastCachedPage+1, kid.getTypeName()); - kidsIdxList->back()++; - } - } - - return gFalse; -} - -int Catalog::findPage(int num, int gen) { - int i; - - for (i = 0; i < getNumPages(); ++i) { - Ref *ref = getPageRef(i+1); - if (ref != nullptr && ref->num == num && ref->gen == gen) - return i + 1; - } - return 0; -} - -LinkDest *Catalog::findDest(const GooString *name) { - // try named destination dictionary then name tree - if (getDests()->isDict()) { - Object obj1 = getDests()->dictLookup(name->getCString()); - return createLinkDest(&obj1); - } - - catalogLocker(); - Object obj2 = getDestNameTree()->lookup(name); - return createLinkDest(&obj2); -} - -LinkDest *Catalog::createLinkDest(Object *obj) -{ - LinkDest *dest = nullptr; - if (obj->isArray()) { - dest = new LinkDest(obj->getArray()); - } else if (obj->isDict()) { - Object obj2 = obj->dictLookup("D"); - if (obj2.isArray()) - dest = new LinkDest(obj2.getArray()); - else - error(errSyntaxWarning, -1, "Bad named destination value"); - } else { - error(errSyntaxWarning, -1, "Bad named destination value"); - } - if (dest && !dest->isOk()) { - delete dest; - dest = nullptr; - } - - return dest; -} - -int Catalog::numDests() -{ - Object *obj; - - obj= getDests(); - if (!obj->isDict()) { - return 0; - } - return obj->dictGetLength(); -} - -char *Catalog::getDestsName(int i) -{ - Object *obj; - - obj= getDests(); - if (!obj->isDict()) { - return nullptr; - } - return obj->dictGetKey(i); -} - -LinkDest *Catalog::getDestsDest(int i) -{ - Object *obj = getDests(); - if (!obj->isDict()) { - return nullptr; - } - Object obj1 = obj->dictGetVal(i); - return createLinkDest(&obj1); -} - -LinkDest *Catalog::getDestNameTreeDest(int i) -{ - Object obj; - - catalogLocker(); - Object *aux = getDestNameTree()->getValue(i); - if (aux) { - obj = aux->fetch(xref); - } - return createLinkDest(&obj); -} - -FileSpec *Catalog::embeddedFile(int i) -{ - catalogLocker(); - Object *obj = getEmbeddedFileNameTree()->getValue(i); - FileSpec *embeddedFile = nullptr; - if (obj->isRef()) { - Object fsDict = obj->fetch(xref); - embeddedFile = new FileSpec(&fsDict); - } else if (obj->isDict()) { - embeddedFile = new FileSpec(obj); - } else { - Object null; - embeddedFile = new FileSpec(&null); - } - return embeddedFile; -} - -GooString *Catalog::getJS(int i) -{ - Object obj; - // getJSNameTree()->getValue(i) returns a shallow copy of the object so we - // do not need to free it - catalogLocker(); - Object *aux = getJSNameTree()->getValue(i); - if (aux) { - obj = aux->fetch(xref); - } - - if (!obj.isDict()) { - return nullptr; - } - Object obj2 = obj.dictLookup("S"); - if (!obj2.isName()) { - return nullptr; - } - if (strcmp(obj2.getName(), "JavaScript")) { - return nullptr; - } - obj2 = obj.dictLookup("JS"); - GooString *js = nullptr; - if (obj2.isString()) { - js = new GooString(obj2.getString()); - } - else if (obj2.isStream()) { - Stream *stream = obj2.getStream(); - js = new GooString(); - stream->fillGooString(js); - } - return js; -} - -Catalog::PageMode Catalog::getPageMode() { - - catalogLocker(); - if (pageMode == pageModeNull) { - - pageMode = pageModeNone; - - Object catDict = xref->getCatalog(); - if (!catDict.isDict()) { - error(errSyntaxError, -1, "Catalog object is wrong type ({0:s})", catDict.getTypeName()); - return pageMode; - } - - Object obj = catDict.dictLookup("PageMode"); - if (obj.isName()) { - if (obj.isName("UseNone")) - pageMode = pageModeNone; - else if (obj.isName("UseOutlines")) - pageMode = pageModeOutlines; - else if (obj.isName("UseThumbs")) - pageMode = pageModeThumbs; - else if (obj.isName("FullScreen")) - pageMode = pageModeFullScreen; - else if (obj.isName("UseOC")) - pageMode = pageModeOC; - else if (obj.isName("UseAttachments")) - pageMode = pageModeAttach; - } - } - return pageMode; -} - -Catalog::PageLayout Catalog::getPageLayout() { - - catalogLocker(); - if (pageLayout == pageLayoutNull) { - - pageLayout = pageLayoutNone; - - Object catDict = xref->getCatalog(); - if (!catDict.isDict()) { - error(errSyntaxError, -1, "Catalog object is wrong type ({0:s})", catDict.getTypeName()); - return pageLayout; - } - - pageLayout = pageLayoutNone; - Object obj = catDict.dictLookup("PageLayout"); - if (obj.isName()) { - if (obj.isName("SinglePage")) - pageLayout = pageLayoutSinglePage; - if (obj.isName("OneColumn")) - pageLayout = pageLayoutOneColumn; - if (obj.isName("TwoColumnLeft")) - pageLayout = pageLayoutTwoColumnLeft; - if (obj.isName("TwoColumnRight")) - pageLayout = pageLayoutTwoColumnRight; - if (obj.isName("TwoPageLeft")) - pageLayout = pageLayoutTwoPageLeft; - if (obj.isName("TwoPageRight")) - pageLayout = pageLayoutTwoPageRight; - } - } - return pageLayout; -} - -NameTree::NameTree() -{ - size = 0; - length = 0; - entries = nullptr; -} - -NameTree::~NameTree() -{ - int i; - - for (i = 0; i < length; i++) - delete entries[i]; - - gfree(entries); -} - -NameTree::Entry::Entry(Array *array, int index) { - if (!array->getString(index, &name)) { - Object aux = array->get(index); - if (aux.isString()) - { - name.append(aux.getString()); - } - else - error(errSyntaxError, -1, "Invalid page tree"); - } - value = array->getNF(index + 1); -} - -NameTree::Entry::~Entry() { -} - -void NameTree::addEntry(Entry *entry) -{ - if (length == size) { - if (length == 0) { - size = 8; - } else { - size *= 2; - } - entries = (Entry **) grealloc (entries, sizeof (Entry *) * size); - } - - entries[length] = entry; - ++length; -} - -int NameTree::Entry::cmpEntry(const void *voidEntry, const void *voidOtherEntry) -{ - Entry *entry = *(NameTree::Entry **) voidEntry; - Entry *otherEntry = *(NameTree::Entry **) voidOtherEntry; - - return entry->name.cmp(&otherEntry->name); -} - -void NameTree::init(XRef *xrefA, Object *tree) { - xref = xrefA; - std::set<int> seen; - parse(tree, seen); - if (entries && length > 0) { - qsort(entries, length, sizeof(Entry *), Entry::cmpEntry); - } -} - -void NameTree::parse(Object *tree, std::set<int> &seen) { - if (!tree->isDict()) - return; - - // leaf node - Object names = tree->dictLookup("Names"); - if (names.isArray()) { - for (int i = 0; i < names.arrayGetLength(); i += 2) { - NameTree::Entry *entry; - - entry = new Entry(names.getArray(), i); - addEntry(entry); - } - } - - // root or intermediate node - Object kids = tree->dictLookup("Kids"); - if (kids.isArray()) { - for (int i = 0; i < kids.arrayGetLength(); ++i) { - Object kidRef = kids.arrayGetNF(i); - if (kidRef.isRef()) { - const int numObj = kidRef.getRef().num; - if (seen.find(numObj) != seen.end()) { - error(errSyntaxError, -1, "loop in NameTree (numObj: {0:d})", numObj); - continue; - } - seen.insert(numObj); - } - Object kid = kids.arrayGet(i); - if (kid.isDict()) - parse(&kid, seen); - } - } -} - -int NameTree::Entry::cmp(const void *voidKey, const void *voidEntry) -{ - GooString *key = (GooString *) voidKey; - Entry *entry = *(NameTree::Entry **) voidEntry; - - return key->cmp(&entry->name); -} - -Object NameTree::lookup(const GooString *name) -{ - Entry **entry; - - entry = (Entry **) bsearch(name, entries, - length, sizeof(Entry *), Entry::cmp); - if (entry != nullptr) { - return (*entry)->value.fetch(xref); - } else { - error(errSyntaxError, -1, "failed to look up ({0:s})", name->getCString()); - return Object(objNull); - } -} - -Object *NameTree::getValue(int index) -{ - if (index < length) { - return &entries[index]->value; - } else { - return nullptr; - } -} - -GooString *NameTree::getName(int index) -{ - if (index < length) { - return &entries[index]->name; - } else { - return nullptr; - } -} - -GBool Catalog::labelToIndex(GooString *label, int *index) -{ - char *end; - - PageLabelInfo *pli = getPageLabelInfo(); - if (pli != nullptr) { - if (!pli->labelToIndex(label, index)) - return gFalse; - } else { - *index = strtol(label->getCString(), &end, 10) - 1; - if (*end != '\0') - return gFalse; - } - - if (*index < 0 || *index >= getNumPages()) - return gFalse; - - return gTrue; -} - -GBool Catalog::indexToLabel(int index, GooString *label) -{ - char buffer[32]; - - if (index < 0 || index >= getNumPages()) - return gFalse; - - PageLabelInfo *pli = getPageLabelInfo(); - if (pli != nullptr) { - return pli->indexToLabel(index, label); - } else { - snprintf(buffer, sizeof (buffer), "%d", index + 1); - label->append(buffer); - return gTrue; - } -} - -int Catalog::getNumPages() -{ - catalogLocker(); - if (numPages == -1) - { - Object catDict = xref->getCatalog(); - if (!catDict.isDict()) { - error(errSyntaxError, -1, "Catalog object is wrong type ({0:s})", catDict.getTypeName()); - return 0; - } - Object pagesDict = catDict.dictLookup("Pages"); - - // This should really be isDict("Pages"), but I've seen at least one - // PDF file where the /Type entry is missing. - if (!pagesDict.isDict()) { - error(errSyntaxError, -1, "Top-level pages object is wrong type ({0:s})", - pagesDict.getTypeName()); - return 0; - } - - Object obj = pagesDict.dictLookup("Count"); - // some PDF files actually use real numbers here ("/Count 9.0") - if (!obj.isNum()) { - if (pagesDict.dictIs("Page")) { - Object pageRootRef = catDict.dictLookupNF("Pages"); - - error(errSyntaxError, -1, "Pages top-level is a single Page. The document is malformed, trying to recover..."); - - Dict *pageDict = pagesDict.getDict(); - if (pageRootRef.isRef()) { - const Ref pageRef = pageRootRef.getRef(); - Page *p = new Page(doc, 1, &pagesDict, pageRef, new PageAttrs(nullptr, pageDict), form); - if (p->isOk()) { - pages = (Page **)gmallocn(1, sizeof(Page *)); - pageRefs = (Ref *)gmallocn(1, sizeof(Ref)); - - pages[0] = p; - pageRefs[0].num = pageRef.num; - pageRefs[0].gen = pageRef.gen; - - numPages = 1; - lastCachedPage = 1; - pagesSize = 1; - } else { - delete p; - numPages = 0; - } - } else { - numPages = 0; - } - } else { - error(errSyntaxError, -1, "Page count in top-level pages object is wrong type ({0:s})", - obj.getTypeName()); - numPages = 0; - } - } else { - numPages = (int)obj.getNum(); - if (numPages <= 0) { - error(errSyntaxError, -1, - "Invalid page count {0:d}", numPages); - numPages = 0; - } else if (numPages > xref->getNumObjects()) { - error(errSyntaxError, -1, - "Page count ({0:d}) larger than number of objects ({1:d})", - numPages, xref->getNumObjects()); - numPages = 0; - } - - } - } - - return numPages; -} - -PageLabelInfo *Catalog::getPageLabelInfo() -{ - catalogLocker(); - if (!pageLabelInfo) { - Object catDict = xref->getCatalog(); - if (!catDict.isDict()) { - error(errSyntaxError, -1, "Catalog object is wrong type ({0:s})", catDict.getTypeName()); - return nullptr; - } - - Object obj = catDict.dictLookup("PageLabels"); - if (obj.isDict()) { - pageLabelInfo = new PageLabelInfo(&obj, getNumPages()); - } - } - - return pageLabelInfo; -} - -StructTreeRoot *Catalog::getStructTreeRoot() -{ - catalogLocker(); - if (!structTreeRoot) { - Object catalog = xref->getCatalog(); - if (!catalog.isDict()) { - error(errSyntaxError, -1, "Catalog object is wrong type ({0:s})", catalog.getTypeName()); - return nullptr; - } - - Object root = catalog.dictLookup("StructTreeRoot"); - if (root.isDict("StructTreeRoot")) { - structTreeRoot = new StructTreeRoot(doc, root.getDict()); - } - } - return structTreeRoot; -} - -Guint Catalog::getMarkInfo() -{ - if (markInfo == markInfoNull) { - markInfo = 0; - - catalogLocker(); - Object catDict = xref->getCatalog(); - - if (catDict.isDict()) { - Object markInfoDict = catDict.dictLookup("MarkInfo"); - if (markInfoDict.isDict()) { - Object value = markInfoDict.dictLookup("Marked"); - if (value.isBool()) { - if (value.getBool()) { - markInfo |= markInfoMarked; - } - } else if (!value.isNull()) { - error(errSyntaxError, -1, "Marked object is wrong type ({0:s})", value.getTypeName()); - } - - value = markInfoDict.dictLookup("Suspects"); - if (value.isBool() && value.getBool()) - markInfo |= markInfoSuspects; - else if (!value.isNull()) - error(errSyntaxError, -1, "Suspects object is wrong type ({0:s})", value.getTypeName()); - - value = markInfoDict.dictLookup("UserProperties"); - if (value.isBool() && value.getBool()) - markInfo |= markInfoUserProperties; - else if (!value.isNull()) - error(errSyntaxError, -1, "UserProperties object is wrong type ({0:s})", value.getTypeName()); - } else if (!markInfoDict.isNull()) { - error(errSyntaxError, -1, "MarkInfo object is wrong type ({0:s})", markInfoDict.getTypeName()); - } - } else { - error(errSyntaxError, -1, "Catalog object is wrong type ({0:s})", catDict.getTypeName()); - } - } - return markInfo; -} - -Object *Catalog::getOutline() -{ - catalogLocker(); - if (outline.isNone()) - { - Object catDict = xref->getCatalog(); - if (catDict.isDict()) { - outline = catDict.dictLookup("Outlines"); - } else { - error(errSyntaxError, -1, "Catalog object is wrong type ({0:s})", catDict.getTypeName()); - outline.setToNull(); - } - } - - return &outline; -} - -Object *Catalog::getDests() -{ - catalogLocker(); - if (dests.isNone()) - { - Object catDict = xref->getCatalog(); - if (catDict.isDict()) { - dests = catDict.dictLookup("Dests"); - } else { - error(errSyntaxError, -1, "Catalog object is wrong type ({0:s})", catDict.getTypeName()); - dests.setToNull(); - } - } - - return &dests; -} - -Catalog::FormType Catalog::getFormType() -{ - Object xfa; - FormType res = NoForm; - - if (acroForm.isDict()) { - xfa = acroForm.dictLookup("XFA"); - if (xfa.isStream() || xfa.isArray()) { - res = XfaForm; - } else { - res = AcroForm; - } - } - - return res; -} - -Form *Catalog::getForm() -{ - catalogLocker(); - if (!form) { - if (acroForm.isDict()) { - form = new Form(doc, &acroForm); - // perform form-related loading after all widgets have been loaded - form->postWidgetsLoad(); - } - } - - return form; -} - -ViewerPreferences *Catalog::getViewerPreferences() -{ - catalogLocker(); - if (!viewerPrefs) { - if (viewerPreferences.isDict()) { - viewerPrefs = new ViewerPreferences(viewerPreferences.getDict()); - } - } - - return viewerPrefs; -} - -Object *Catalog::getNames() -{ - if (names.isNone()) - { - Object catDict = xref->getCatalog(); - if (catDict.isDict()) { - names = catDict.dictLookup("Names"); - } else { - error(errSyntaxError, -1, "Catalog object is wrong type ({0:s})", catDict.getTypeName()); - names.setToNull(); - } - } - - return &names; -} - -NameTree *Catalog::getDestNameTree() -{ - if (!destNameTree) { - - destNameTree = new NameTree(); - - if (getNames()->isDict()) { - Object obj = getNames()->dictLookup("Dests"); - destNameTree->init(xref, &obj); - } - - } - - return destNameTree; -} - -NameTree *Catalog::getEmbeddedFileNameTree() -{ - if (!embeddedFileNameTree) { - - embeddedFileNameTree = new NameTree(); - - if (getNames()->isDict()) { - Object obj = getNames()->dictLookup("EmbeddedFiles"); - embeddedFileNameTree->init(xref, &obj); - } - - } - - return embeddedFileNameTree; -} - -NameTree *Catalog::getJSNameTree() -{ - if (!jsNameTree) { - - jsNameTree = new NameTree(); - - if (getNames()->isDict()) { - Object obj = getNames()->dictLookup("JavaScript"); - jsNameTree->init(xref, &obj); - } - - } - - return jsNameTree; -} - -LinkAction* Catalog::getAdditionalAction(DocumentAdditionalActionsType type) { - LinkAction *linkAction = nullptr; - Object additionalActionsObject = additionalActions.fetch(doc->getXRef()); - if (additionalActionsObject.isDict()) { - const char *key = (type == actionCloseDocument ? "WC" : - type == actionSaveDocumentStart ? "WS" : - type == actionSaveDocumentFinish ? "DS" : - type == actionPrintDocumentStart ? "WP" : - type == actionPrintDocumentFinish ? "DP" : nullptr); - - Object actionObject = additionalActionsObject.dictLookup(key); - if (actionObject.isDict()) - linkAction = LinkAction::parseAction(&actionObject, doc->getCatalog()->getBaseURI()); - } - return linkAction; -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/Catalog.h b/Build/source/libs/poppler/poppler-src/poppler/Catalog.h deleted file mode 100644 index 0467159a2d4..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/Catalog.h +++ /dev/null @@ -1,300 +0,0 @@ -//======================================================================== -// -// Catalog.h -// -// Copyright 1996-2007 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2005 Kristian Høgsberg <krh@redhat.com> -// Copyright (C) 2005, 2007, 2009-2011, 2013, 2017, 2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2005 Jonathan Blandford <jrb@redhat.com> -// Copyright (C) 2005, 2006, 2008 Brad Hards <bradh@frogmouth.net> -// Copyright (C) 2007 Julien Rebetez <julienr@svn.gnome.org> -// Copyright (C) 2008, 2011 Pino Toscano <pino@kde.org> -// Copyright (C) 2010 Hib Eris <hib@hiberis.nl> -// Copyright (C) 2012 Fabio D'Urso <fabiodurso@hotmail.it> -// Copyright (C) 2013 Thomas Freitag <Thomas.Freitag@alfa.de> -// Copyright (C) 2013 Adrian Perez de Castro <aperez@igalia.com> -// Copyright (C) 2013, 2017 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2013 José Aliste <jaliste@src.gnome.org> -// Copyright (C) 2016 Masamichi Hosoda <trueroad@trueroad.jp> -// 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 -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef CATALOG_H -#define CATALOG_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "poppler-config.h" -#include "Object.h" -#include "goo/GooMutex.h" - -#include <vector> - -class PDFDoc; -class XRef; -class Object; -class Page; -class PageAttrs; -struct Ref; -class LinkDest; -class LinkAction; -class PageLabelInfo; -class Form; -class OCGs; -class ViewerPreferences; -class FileSpec; -class StructTreeRoot; - -//------------------------------------------------------------------------ -// NameTree -//------------------------------------------------------------------------ - -class NameTree { -public: - NameTree(); - ~NameTree(); - - NameTree(const NameTree &) = delete; - NameTree& operator=(const NameTree &) = delete; - - void init(XRef *xref, Object *tree); - Object lookup(const GooString *name); - int numEntries() { return length; }; - // iterator accessor, note it returns a pointer to the internal object, do not free nor delete it - Object *getValue(int i); - GooString *getName(int i); - -private: - struct Entry { - Entry(Array *array, int index); - ~Entry(); - GooString name; - Object value; - void free(); - static int cmpEntry(const void *voidEntry, const void *voidOtherEntry); - static int cmp(const void *key, const void *entry); - }; - - void parse(Object *tree, std::set<int> &seen); - void addEntry(Entry *entry); - - XRef *xref; - Object *root; - Entry **entries; - int size, length; // size is the number of entries in - // the array of Entry* - // length is the number of real Entry -}; - -//------------------------------------------------------------------------ -// Catalog -//------------------------------------------------------------------------ - -class Catalog { -public: - - // Constructor. - Catalog(PDFDoc *docA); - - // Destructor. - ~Catalog(); - - Catalog(const Catalog &) = delete; - Catalog& operator=(const Catalog &) = delete; - - // Is catalog valid? - GBool isOk() { return ok; } - - // Get number of pages. - int getNumPages(); - - // Get a page. - Page *getPage(int i); - - // Get the reference for a page object. - Ref *getPageRef(int i); - - // Return base URI, or NULL if none. - GooString *getBaseURI() { return baseURI; } - - // Return the contents of the metadata stream, or NULL if there is - // no metadata. - GooString *readMetadata(); - - // Return the structure tree root object. - StructTreeRoot *getStructTreeRoot(); - - // Return values from the MarkInfo dictionary as flags in a bitfield. - enum MarkInfoFlags { - markInfoNull = 1 << 0, - markInfoMarked = 1 << 1, - markInfoUserProperties = 1 << 2, - markInfoSuspects = 1 << 3, - }; - Guint getMarkInfo(); - - // Find a page, given its object ID. Returns page number, or 0 if - // not found. - int findPage(int num, int gen); - - // Find a named destination. Returns the link destination, or - // NULL if <name> is not a destination. - LinkDest *findDest(const GooString *name); - - Object *getDests(); - - // Get the number of named destinations in name-dict - int numDests(); - - // Get the i'th named destination name in name-dict - char *getDestsName(int i); - - // Get the i'th named destination link destination in name-dict - LinkDest *getDestsDest(int i); - - // Get the number of named destinations in name-tree - int numDestNameTree() { return getDestNameTree()->numEntries(); } - - // Get the i'th named destination name in name-tree - GooString *getDestNameTreeName(int i) { return getDestNameTree()->getName(i); } - - // Get the i'th named destination link destination in name-tree - LinkDest *getDestNameTreeDest(int i); - - // Get the number of embedded files - int numEmbeddedFiles() { return getEmbeddedFileNameTree()->numEntries(); } - - // Get the i'th file embedded (at the Document level) in the document - FileSpec *embeddedFile(int i); - - // Get the number of javascript scripts - int numJS() { return getJSNameTree()->numEntries(); } - GooString *getJSName(int i) { return getJSNameTree()->getName(i); } - - // Get the i'th JavaScript script (at the Document level) in the document - GooString *getJS(int i); - - // Convert between page indices and page labels. - GBool labelToIndex(GooString *label, int *index); - GBool indexToLabel(int index, GooString *label); - - Object *getOutline(); - - Object *getAcroForm() { return &acroForm; } - - OCGs *getOptContentConfig() { return optContent; } - - enum FormType - { - NoForm, - AcroForm, - XfaForm - }; - - FormType getFormType(); - Form* getForm(); - - ViewerPreferences *getViewerPreferences(); - - enum PageMode { - pageModeNone, - pageModeOutlines, - pageModeThumbs, - pageModeFullScreen, - pageModeOC, - pageModeAttach, - pageModeNull - }; - enum PageLayout { - pageLayoutNone, - pageLayoutSinglePage, - pageLayoutOneColumn, - pageLayoutTwoColumnLeft, - pageLayoutTwoColumnRight, - pageLayoutTwoPageLeft, - pageLayoutTwoPageRight, - pageLayoutNull - }; - - // Returns the page mode. - PageMode getPageMode(); - PageLayout getPageLayout(); - - enum DocumentAdditionalActionsType { - actionCloseDocument, ///< Performed before closing the document - actionSaveDocumentStart, ///< Performed before saving the document - actionSaveDocumentFinish, ///< Performed after saving the document - actionPrintDocumentStart, ///< Performed before printing the document - actionPrintDocumentFinish, ///< Performed after printing the document - }; - - LinkAction *getAdditionalAction(DocumentAdditionalActionsType type); - -private: - - // Get page label info. - PageLabelInfo *getPageLabelInfo(); - - PDFDoc *doc; - XRef *xref; // the xref table for this PDF file - Page **pages; // array of pages - Ref *pageRefs; // object ID for each page - int lastCachedPage; - std::vector<Object> *pagesList; - std::vector<Ref> *pagesRefList; - std::vector<PageAttrs *> *attrsList; - std::vector<int> *kidsIdxList; - Form *form; - ViewerPreferences *viewerPrefs; - int numPages; // number of pages - int pagesSize; // size of pages array - Object dests; // named destination dictionary - Object names; // named names dictionary - NameTree *destNameTree; // named destination name-tree - NameTree *embeddedFileNameTree; // embedded file name-tree - NameTree *jsNameTree; // Java Script name-tree - GooString *baseURI; // base URI for URI-type links - Object metadata; // metadata stream - StructTreeRoot *structTreeRoot; // structure tree root - Guint markInfo; // Flags from MarkInfo dictionary - Object outline; // outline dictionary - Object acroForm; // AcroForm dictionary - Object viewerPreferences; // ViewerPreference dictionary - OCGs *optContent; // Optional Content groups - GBool ok; // true if catalog is valid - PageLabelInfo *pageLabelInfo; // info about page labels - PageMode pageMode; // page mode - PageLayout pageLayout; // page layout - Object additionalActions; // page additional actions - - GBool cachePageTree(int page); // Cache first <page> pages. - Object *findDestInTree(Object *tree, GooString *name, Object *obj); - - Object *getNames(); - NameTree *getDestNameTree(); - NameTree *getEmbeddedFileNameTree(); - NameTree *getJSNameTree(); - LinkDest *createLinkDest(Object *obj); -#ifdef MULTITHREADED - GooMutex mutex; -#endif - -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/CharCodeToUnicode.cc b/Build/source/libs/poppler/poppler-src/poppler/CharCodeToUnicode.cc deleted file mode 100644 index fed6cdb730c..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/CharCodeToUnicode.cc +++ /dev/null @@ -1,734 +0,0 @@ -//======================================================================== -// -// CharCodeToUnicode.cc -// -// Copyright 2001-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2006, 2008-2010, 2012 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2007 Julien Rebetez <julienr@svn.gnome.org> -// Copyright (C) 2007 Koji Otani <sho@bbr.jp> -// Copyright (C) 2008 Michael Vrable <mvrable@cs.ucsd.edu> -// Copyright (C) 2008 Vasile Gaburici <gaburici@cs.umd.edu> -// Copyright (C) 2010 William Bader <williambader@hotmail.com> -// Copyright (C) 2010 Jakub Wilk <jwilk@jwilk.net> -// Copyright (C) 2012 Thomas Freitag <Thomas.Freitag@alfa.de> -// Copyright (C) 2012, 2017 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2014 Jiri Slaby <jirislaby@gmail.com> -// Copyright (C) 2015 Marek Kasik <mkasik@redhat.com> -// Copyright (C) 2017 Jean Ghali <jghali@libertysurf.fr> -// 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 -// Copyright (C) 2018 Adam Reichold <adam.reichold@t-online.de> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include <config.h> - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include <stdio.h> -#include <string.h> -#include "goo/glibc.h" -#include "goo/gmem.h" -#include "goo/gfile.h" -#include "goo/GooLikely.h" -#include "goo/GooString.h" -#include "Error.h" -#include "GlobalParams.h" -#include "PSTokenizer.h" -#include "CharCodeToUnicode.h" -#include "UTF.h" - -//------------------------------------------------------------------------ - -struct CharCodeToUnicodeString { - CharCode c; - Unicode *u; - int len; -}; - -//------------------------------------------------------------------------ - -static int getCharFromString(void *data) { - char *p; - int c; - - p = *(char **)data; - if (*p) { - c = *p++; - *(char **)data = p; - } else { - c = EOF; - } - return c; -} - -static int getCharFromFile(void *data) { - return fgetc((FILE *)data); -} - -//------------------------------------------------------------------------ - -static int hexCharVals[256] = { - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 0x - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 1x - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 2x - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1, // 3x - -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 4x - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 5x - -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 6x - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 7x - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 8x - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 9x - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // Ax - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // Bx - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // Cx - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // Dx - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // Ex - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 // Fx -}; - -// Parse a <len>-byte hex string <s> into *<val>. Returns false on -// error. -static GBool parseHex(char *s, int len, Guint *val) { - int i, x; - - *val = 0; - for (i = 0; i < len; ++i) { - x = hexCharVals[s[i] & 0xff]; - if (x < 0) { - return gFalse; - } - *val = (*val << 4) + x; - } - return gTrue; -} - -//------------------------------------------------------------------------ - -CharCodeToUnicode *CharCodeToUnicode::makeIdentityMapping() { - CharCodeToUnicode *ctu = new CharCodeToUnicode(); - ctu->isIdentity = gTrue; - ctu->mapLen = 1; - ctu->map = (Unicode *)gmallocn(ctu->mapLen, sizeof(Unicode)); - return ctu; -} - -CharCodeToUnicode *CharCodeToUnicode::parseCIDToUnicode(const char *fileName, - GooString *collection) { - FILE *f; - Unicode *mapA; - CharCode size, mapLenA; - char buf[64]; - Unicode u; - CharCodeToUnicode *ctu; - - if (!(f = openFile(fileName, "r"))) { - error(errIO, -1, "Couldn't open cidToUnicode file '{0:s}'", - fileName); - return nullptr; - } - - size = 32768; - mapA = (Unicode *)gmallocn(size, sizeof(Unicode)); - mapLenA = 0; - - while (getLine(buf, sizeof(buf), f)) { - if (mapLenA == size) { - size *= 2; - mapA = (Unicode *)greallocn(mapA, size, sizeof(Unicode)); - } - if (sscanf(buf, "%x", &u) == 1) { - mapA[mapLenA] = u; - } else { - error(errSyntaxWarning, -1, "Bad line ({0:d}) in cidToUnicode file '{1:s}'", - (int)(mapLenA + 1), fileName); - mapA[mapLenA] = 0; - } - ++mapLenA; - } - fclose(f); - - ctu = new CharCodeToUnicode(collection->copy(), mapA, mapLenA, gTrue, - nullptr, 0, 0); - gfree(mapA); - return ctu; -} - -CharCodeToUnicode *CharCodeToUnicode::parseUnicodeToUnicode( - GooString *fileName) { - FILE *f; - Unicode *mapA; - CharCodeToUnicodeString *sMapA; - CharCode size, oldSize, len, sMapSizeA, sMapLenA; - char buf[256]; - char *tok; - Unicode u0; - int uBufSize = 8; - Unicode *uBuf = (Unicode *)gmallocn(uBufSize, sizeof(Unicode)); - CharCodeToUnicode *ctu; - int line, n, i; - char *tokptr; - - if (!(f = openFile(fileName->getCString(), "r"))) { - gfree(uBuf); - error(errIO, -1, "Couldn't open unicodeToUnicode file '{0:t}'", - fileName); - return nullptr; - } - - size = 4096; - mapA = (Unicode *)gmallocn(size, sizeof(Unicode)); - memset(mapA, 0, size * sizeof(Unicode)); - len = 0; - sMapA = nullptr; - sMapSizeA = sMapLenA = 0; - - line = 0; - while (getLine(buf, sizeof(buf), f)) { - ++line; - if (!(tok = strtok_r(buf, " \t\r\n", &tokptr)) || - !parseHex(tok, strlen(tok), &u0)) { - error(errSyntaxWarning, -1, "Bad line ({0:d}) in unicodeToUnicode file '{1:t}'", - line, fileName); - continue; - } - n = 0; - while ((tok = strtok_r(nullptr, " \t\r\n", &tokptr))) { - if (n >= uBufSize) - { - uBufSize += 8; - uBuf = (Unicode *)greallocn(uBuf, uBufSize, sizeof(Unicode)); - } - if (!parseHex(tok, strlen(tok), &uBuf[n])) { - error(errSyntaxWarning, -1, "Bad line ({0:d}) in unicodeToUnicode file '{1:t}'", - line, fileName); - break; - } - ++n; - } - if (n < 1) { - error(errSyntaxWarning, -1, "Bad line ({0:d}) in unicodeToUnicode file '{1:t}'", - line, fileName); - continue; - } - if (u0 >= size) { - oldSize = size; - while (u0 >= size) { - size *= 2; - } - mapA = (Unicode *)greallocn(mapA, size, sizeof(Unicode)); - memset(mapA + oldSize, 0, (size - oldSize) * sizeof(Unicode)); - } - if (n == 1) { - mapA[u0] = uBuf[0]; - } else { - mapA[u0] = 0; - if (sMapLenA == sMapSizeA) { - sMapSizeA += 16; - sMapA = (CharCodeToUnicodeString *) - greallocn(sMapA, sMapSizeA, sizeof(CharCodeToUnicodeString)); - } - sMapA[sMapLenA].c = u0; - sMapA[sMapLenA].u = (Unicode*)gmallocn(n, sizeof(Unicode)); - for (i = 0; i < n; ++i) { - sMapA[sMapLenA].u[i] = uBuf[i]; - } - sMapA[sMapLenA].len = n; - ++sMapLenA; - } - if (u0 >= len) { - len = u0 + 1; - } - } - fclose(f); - - ctu = new CharCodeToUnicode(fileName->copy(), mapA, len, gTrue, - sMapA, sMapLenA, sMapSizeA); - gfree(mapA); - gfree(uBuf); - return ctu; -} - -CharCodeToUnicode *CharCodeToUnicode::make8BitToUnicode(Unicode *toUnicode) { - return new CharCodeToUnicode(nullptr, toUnicode, 256, gTrue, nullptr, 0, 0); -} - -CharCodeToUnicode *CharCodeToUnicode::parseCMap(GooString *buf, int nBits) { - CharCodeToUnicode *ctu; - char *p; - - ctu = new CharCodeToUnicode(nullptr); - p = buf->getCString(); - ctu->parseCMap1(&getCharFromString, &p, nBits); - return ctu; -} - -CharCodeToUnicode *CharCodeToUnicode::parseCMapFromFile(GooString *fileName, - int nBits) { - CharCodeToUnicode *ctu; - FILE *f; - - ctu = new CharCodeToUnicode(nullptr); - if ((f = globalParams->findToUnicodeFile(fileName))) { - ctu->parseCMap1(&getCharFromFile, f, nBits); - fclose(f); - } else { - error(errSyntaxError, -1, "Couldn't find ToUnicode CMap file for '{0:t}'", - fileName); - } - return ctu; -} - -void CharCodeToUnicode::mergeCMap(GooString *buf, int nBits) { - char *p; - - p = buf->getCString(); - parseCMap1(&getCharFromString, &p, nBits); -} - -void CharCodeToUnicode::parseCMap1(int (*getCharFunc)(void *), void *data, - int nBits) { - PSTokenizer *pst; - char tok1[256], tok2[256], tok3[256]; - int n1, n2, n3; - CharCode i; - CharCode maxCode, code1, code2; - GooString *name; - FILE *f; - - maxCode = (nBits == 8) ? 0xff : (nBits == 16) ? 0xffff : 0xffffffff; - pst = new PSTokenizer(getCharFunc, data); - pst->getToken(tok1, sizeof(tok1), &n1); - while (pst->getToken(tok2, sizeof(tok2), &n2)) { - if (!strcmp(tok2, "usecmap")) { - if (tok1[0] == '/') { - name = new GooString(tok1 + 1); - if ((f = globalParams->findToUnicodeFile(name))) { - parseCMap1(&getCharFromFile, f, nBits); - fclose(f); - } else { - error(errSyntaxError, -1, "Couldn't find ToUnicode CMap file for '{0:t}'", - name); - } - delete name; - } - pst->getToken(tok1, sizeof(tok1), &n1); - } else if (!strcmp(tok2, "beginbfchar")) { - while (pst->getToken(tok1, sizeof(tok1), &n1)) { - if (!strcmp(tok1, "endbfchar")) { - break; - } - if (!pst->getToken(tok2, sizeof(tok2), &n2) || - !strcmp(tok2, "endbfchar")) { - error(errSyntaxWarning, -1, "Illegal entry in bfchar block in ToUnicode CMap"); - break; - } - if (!(tok1[0] == '<' && tok1[n1 - 1] == '>' && - tok2[0] == '<' && tok2[n2 - 1] == '>')) { - error(errSyntaxWarning, -1, "Illegal entry in bfchar block in ToUnicode CMap"); - continue; - } - tok1[n1 - 1] = tok2[n2 - 1] = '\0'; - if (!parseHex(tok1 + 1, n1 - 2, &code1)) { - error(errSyntaxWarning, -1, "Illegal entry in bfchar block in ToUnicode CMap"); - continue; - } - if (code1 > maxCode) { - error(errSyntaxWarning, -1, - "Invalid entry in bfchar block in ToUnicode CMap"); - } - addMapping(code1, tok2 + 1, n2 - 2, 0); - } - pst->getToken(tok1, sizeof(tok1), &n1); - } else if (!strcmp(tok2, "beginbfrange")) { - while (pst->getToken(tok1, sizeof(tok1), &n1)) { - if (!strcmp(tok1, "endbfrange")) { - break; - } - if (!pst->getToken(tok2, sizeof(tok2), &n2) || - !strcmp(tok2, "endbfrange") || - !pst->getToken(tok3, sizeof(tok3), &n3) || - !strcmp(tok3, "endbfrange")) { - error(errSyntaxWarning, -1, "Illegal entry in bfrange block in ToUnicode CMap"); - break; - } - if (!(tok1[0] == '<' && tok1[n1 - 1] == '>' && - tok2[0] == '<' && tok2[n2 - 1] == '>')) { - error(errSyntaxWarning, -1, "Illegal entry in bfrange block in ToUnicode CMap"); - continue; - } - tok1[n1 - 1] = tok2[n2 - 1] = '\0'; - if (!parseHex(tok1 + 1, n1 - 2, &code1) || - !parseHex(tok2 + 1, n2 - 2, &code2)) { - error(errSyntaxWarning, -1, "Illegal entry in bfrange block in ToUnicode CMap"); - continue; - } - if (code1 > maxCode || code2 > maxCode) { - error(errSyntaxWarning, -1, - "Invalid entry in bfrange block in ToUnicode CMap"); - if (code1 > maxCode) { - code1 = maxCode; - } - if (code2 > maxCode) { - code2 = maxCode; - } - } - if (!strcmp(tok3, "[")) { - i = 0; - while (pst->getToken(tok1, sizeof(tok1), &n1) && - code1 + i <= code2) { - if (!strcmp(tok1, "]")) { - break; - } - if (tok1[0] == '<' && tok1[n1 - 1] == '>') { - tok1[n1 - 1] = '\0'; - addMapping(code1 + i, tok1 + 1, n1 - 2, 0); - } else { - error(errSyntaxWarning, -1, "Illegal entry in bfrange block in ToUnicode CMap"); - } - ++i; - } - } else if (tok3[0] == '<' && tok3[n3 - 1] == '>') { - tok3[n3 - 1] = '\0'; - for (i = 0; code1 <= code2; ++code1, ++i) { - addMapping(code1, tok3 + 1, n3 - 2, i); - } - - } else { - error(errSyntaxWarning, -1, "Illegal entry in bfrange block in ToUnicode CMap"); - } - } - pst->getToken(tok1, sizeof(tok1), &n1); - } else { - strcpy(tok1, tok2); - } - } - delete pst; -} - -void CharCodeToUnicode::addMapping(CharCode code, char *uStr, int n, - int offset) { - CharCode oldLen, i; - Unicode u; - int j; - - if (code > 0xffffff) { - // This is an arbitrary limit to avoid integer overflow issues. - // (I've seen CMaps with mappings for <ffffffff>.) - return; - } - if (code >= mapLen) { - oldLen = mapLen; - mapLen = mapLen ? 2 * mapLen : 256; - if (code >= mapLen) { - mapLen = (code + 256) & ~255; - } - if (unlikely(code >= mapLen)) { - error(errSyntaxWarning, -1, "Illegal code value in CharCodeToUnicode::addMapping"); - return; - } else { - map = (Unicode *)greallocn(map, mapLen, sizeof(Unicode)); - for (i = oldLen; i < mapLen; ++i) { - map[i] = 0; - } - } - } - if (n <= 4) { - if (!parseHex(uStr, n, &u)) { - error(errSyntaxWarning, -1, "Illegal entry in ToUnicode CMap"); - return; - } - map[code] = u + offset; - if (!UnicodeIsValid(map[code])) { - map[code] = 0xfffd; - } - } else { - if (sMapLen >= sMapSize) { - sMapSize = sMapSize + 16; - sMap = (CharCodeToUnicodeString *) - greallocn(sMap, sMapSize, sizeof(CharCodeToUnicodeString)); - } - map[code] = 0; - sMap[sMapLen].c = code; - int utf16Len = n / 4; - Unicode *utf16 = (Unicode*)gmallocn(utf16Len, sizeof(Unicode)); - for (j = 0; j < utf16Len; ++j) { - if (!parseHex(uStr + j*4, 4, &utf16[j])) { - gfree(utf16); - error(errSyntaxWarning, -1, "Illegal entry in ToUnicode CMap"); - return; - } - } - utf16[utf16Len - 1] += offset; - sMap[sMapLen].len = UTF16toUCS4(utf16, utf16Len, &sMap[sMapLen].u); - gfree(utf16); - ++sMapLen; - } -} - -CharCodeToUnicode::CharCodeToUnicode() { - tag = nullptr; - map = nullptr; - mapLen = 0; - sMap = nullptr; - sMapLen = sMapSize = 0; - refCnt = 1; - isIdentity = gFalse; -#ifdef MULTITHREADED - gInitMutex(&mutex); -#endif -} - -CharCodeToUnicode::CharCodeToUnicode(GooString *tagA) { - CharCode i; - - tag = tagA; - mapLen = 256; - map = (Unicode *)gmallocn(mapLen, sizeof(Unicode)); - for (i = 0; i < mapLen; ++i) { - map[i] = 0; - } - sMap = nullptr; - sMapLen = sMapSize = 0; - refCnt = 1; - isIdentity = gFalse; -#ifdef MULTITHREADED - gInitMutex(&mutex); -#endif -} - -CharCodeToUnicode::CharCodeToUnicode(GooString *tagA, Unicode *mapA, - CharCode mapLenA, GBool copyMap, - CharCodeToUnicodeString *sMapA, - int sMapLenA, int sMapSizeA) { - tag = tagA; - mapLen = mapLenA; - if (copyMap) { - map = (Unicode *)gmallocn(mapLen, sizeof(Unicode)); - memcpy(map, mapA, mapLen * sizeof(Unicode)); - } else { - map = mapA; - } - sMap = sMapA; - sMapLen = sMapLenA; - sMapSize = sMapSizeA; - refCnt = 1; - isIdentity = gFalse; -#ifdef MULTITHREADED - gInitMutex(&mutex); -#endif -} - -CharCodeToUnicode::~CharCodeToUnicode() { - if (tag) { - delete tag; - } - gfree(map); - if (sMap) { - for (int i = 0; i < sMapLen; ++i) gfree(sMap[i].u); - gfree(sMap); - } -#ifdef MULTITHREADED - gDestroyMutex(&mutex); -#endif -} - -void CharCodeToUnicode::incRefCnt() { -#ifdef MULTITHREADED - gLockMutex(&mutex); -#endif - ++refCnt; -#ifdef MULTITHREADED - gUnlockMutex(&mutex); -#endif -} - -void CharCodeToUnicode::decRefCnt() { - GBool done; - -#ifdef MULTITHREADED - gLockMutex(&mutex); -#endif - done = --refCnt == 0; -#ifdef MULTITHREADED - gUnlockMutex(&mutex); -#endif - if (done) { - delete this; - } -} - -GBool CharCodeToUnicode::match(GooString *tagA) { - return tag && !tag->cmp(tagA); -} - -void CharCodeToUnicode::setMapping(CharCode c, Unicode *u, int len) { - int i, j; - - if (!map || isIdentity) { - return; - } - if (len == 1) { - map[c] = u[0]; - } else { - for (i = 0; i < sMapLen; ++i) { - if (sMap[i].c == c) { - gfree(sMap[i].u); - break; - } - } - if (i == sMapLen) { - if (sMapLen == sMapSize) { - sMapSize += 8; - sMap = (CharCodeToUnicodeString *) - greallocn(sMap, sMapSize, sizeof(CharCodeToUnicodeString)); - } - ++sMapLen; - } - map[c] = 0; - sMap[i].c = c; - sMap[i].len = len; - sMap[i].u = (Unicode*)gmallocn(len, sizeof(Unicode)); - for (j = 0; j < len; ++j) { - if (UnicodeIsValid(u[j])) { - sMap[i].u[j] = u[j]; - } else { - sMap[i].u[j] = 0xfffd; - } - } - } -} - -int CharCodeToUnicode::mapToUnicode(CharCode c, Unicode **u) { - int i; - - if (isIdentity) { - map[0] = (Unicode)c; - *u = map; - return 1; - } - if (c >= mapLen) { - return 0; - } - if (map[c]) { - *u = &map[c]; - return 1; - } - for (i = sMapLen - 1; i >= 0; --i) { // in reverse so CMap takes precedence - if (sMap[i].c == c) { - *u = sMap[i].u; - return sMap[i].len; - } - } - return 0; -} - -int CharCodeToUnicode::mapToCharCode(Unicode* u, CharCode *c, int usize) const { - //look for charcode in map - if (usize == 1 || (usize > 1 && !(*u & ~0xff))) { - if (isIdentity) { - *c = (CharCode) *u; - return 1; - } - for (CharCode i=0; i<mapLen; i++) { - if (map[i] == *u) { - *c = i; - return 1; - } - } - *c = 'x'; - } else { - int i, j; - //for each entry in the sMap - for (i=0; i<sMapLen; i++) { - //if the entry's unicode length isn't the same are usize, the strings - // are obviously differents - if (sMap[i].len != usize) continue; - //compare the string char by char - for (j=0; j<sMap[i].len; j++) { - if (sMap[i].u[j] != u[j]) { - break; - } - } - - //we have the same strings - if (j==sMap[i].len) { - *c = sMap[i].c; - return 1; - } - } - } - return 0; -} - -//------------------------------------------------------------------------ - -CharCodeToUnicodeCache::CharCodeToUnicodeCache(int sizeA) { - int i; - - size = sizeA; - cache = (CharCodeToUnicode **)gmallocn(size, sizeof(CharCodeToUnicode *)); - for (i = 0; i < size; ++i) { - cache[i] = nullptr; - } -} - -CharCodeToUnicodeCache::~CharCodeToUnicodeCache() { - int i; - - for (i = 0; i < size; ++i) { - if (cache[i]) { - cache[i]->decRefCnt(); - } - } - gfree(cache); -} - -CharCodeToUnicode *CharCodeToUnicodeCache::getCharCodeToUnicode(GooString *tag) { - CharCodeToUnicode *ctu; - int i, j; - - if (cache[0] && cache[0]->match(tag)) { - cache[0]->incRefCnt(); - return cache[0]; - } - for (i = 1; i < size; ++i) { - if (cache[i] && cache[i]->match(tag)) { - ctu = cache[i]; - for (j = i; j >= 1; --j) { - cache[j] = cache[j - 1]; - } - cache[0] = ctu; - ctu->incRefCnt(); - return ctu; - } - } - return nullptr; -} - -void CharCodeToUnicodeCache::add(CharCodeToUnicode *ctu) { - int i; - - if (cache[size - 1]) { - cache[size - 1]->decRefCnt(); - } - for (i = size - 1; i >= 1; --i) { - cache[i] = cache[i - 1]; - } - cache[0] = ctu; - ctu->incRefCnt(); -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/CharCodeToUnicode.h b/Build/source/libs/poppler/poppler-src/poppler/CharCodeToUnicode.h deleted file mode 100644 index 5a10fa243d4..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/CharCodeToUnicode.h +++ /dev/null @@ -1,155 +0,0 @@ -//======================================================================== -// -// CharCodeToUnicode.h -// -// Mapping from character codes to Unicode. -// -// Copyright 2001-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2007 Julien Rebetez <julienr@svn.gnome.org> -// Copyright (C) 2007 Koji Otani <sho@bbr.jp> -// Copyright (C) 2008, 2011, 2012, 2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2017 Adrian Johnson <ajohnson@redneon.com> -// 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 -// Copyright (C) 2018 Adam Reichold <adam.reichold@t-online.de> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef CHARCODETOUNICODE_H -#define CHARCODETOUNICODE_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "poppler-config.h" -#include "CharTypes.h" -#include "goo/gtypes.h" - -#ifdef MULTITHREADED -#include "goo/GooMutex.h" -#endif - -struct CharCodeToUnicodeString; -class GooString; - -//------------------------------------------------------------------------ - -class CharCodeToUnicode { -friend class UnicodeToCharCode; -public: - - // Create an identity mapping (Unicode = CharCode). - static CharCodeToUnicode *makeIdentityMapping(); - - // Read the CID-to-Unicode mapping for <collection> from the file - // specified by <fileName>. Sets the initial reference count to 1. - // Returns NULL on failure. - static CharCodeToUnicode *parseCIDToUnicode(const char *fileName, - GooString *collection); - - // Create a Unicode-to-Unicode mapping from the file specified by - // <fileName>. Sets the initial reference count to 1. Returns NULL - // on failure. - static CharCodeToUnicode *parseUnicodeToUnicode(GooString *fileName); - - // Create the CharCode-to-Unicode mapping for an 8-bit font. - // <toUnicode> is an array of 256 Unicode indexes. Sets the initial - // reference count to 1. - static CharCodeToUnicode *make8BitToUnicode(Unicode *toUnicode); - - // Parse a ToUnicode CMap for an 8- or 16-bit font. - static CharCodeToUnicode *parseCMap(GooString *buf, int nBits); - static CharCodeToUnicode *parseCMapFromFile(GooString *fileName, int nBits); - - // Parse a ToUnicode CMap for an 8- or 16-bit font, merging it into - // <this>. - void mergeCMap(GooString *buf, int nBits); - - ~CharCodeToUnicode(); - - CharCodeToUnicode(const CharCodeToUnicode &) = delete; - CharCodeToUnicode& operator=(const CharCodeToUnicode &) = delete; - - void incRefCnt(); - void decRefCnt(); - - // Return true if this mapping matches the specified <tagA>. - GBool match(GooString *tagA); - - // Set the mapping for <c>. - void setMapping(CharCode c, Unicode *u, int len); - - // Map a CharCode to Unicode. Returns a pointer in u to internal storage - // so never store the pointers it returns, just the data, otherwise - // your pointed values might get changed by future calls - int mapToUnicode(CharCode c, Unicode **u); - - // Map a Unicode to CharCode. - int mapToCharCode(Unicode* u, CharCode *c, int usize) const; - - // Return the mapping's length, i.e., one more than the max char - // code supported by the mapping. - CharCode getLength() { return mapLen; } - -private: - - void parseCMap1(int (*getCharFunc)(void *), void *data, int nBits); - void addMapping(CharCode code, char *uStr, int n, int offset); - CharCodeToUnicode(); - CharCodeToUnicode(GooString *tagA); - CharCodeToUnicode(GooString *tagA, Unicode *mapA, - CharCode mapLenA, GBool copyMap, - CharCodeToUnicodeString *sMapA, - int sMapLenA, int sMapSizeA); - - GooString *tag; - Unicode *map; - CharCode mapLen; - CharCodeToUnicodeString *sMap; - int sMapLen, sMapSize; - int refCnt; - GBool isIdentity; -#ifdef MULTITHREADED - GooMutex mutex; -#endif -}; - -//------------------------------------------------------------------------ - -class CharCodeToUnicodeCache { -public: - - CharCodeToUnicodeCache(int sizeA); - ~CharCodeToUnicodeCache(); - - CharCodeToUnicodeCache(const CharCodeToUnicodeCache &) = delete; - CharCodeToUnicodeCache& operator=(const CharCodeToUnicodeCache &) = delete; - - // Get the CharCodeToUnicode object for <tag>. Increments its - // reference count; there will be one reference for the cache plus - // one for the caller of this function. Returns NULL on failure. - CharCodeToUnicode *getCharCodeToUnicode(GooString *tag); - - // Insert <ctu> into the cache, in the most-recently-used position. - void add(CharCodeToUnicode *ctu); - -private: - - CharCodeToUnicode **cache; - int size; -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/CharTypes.h b/Build/source/libs/poppler/poppler-src/poppler/CharTypes.h deleted file mode 100644 index d0df630d0c9..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/CharTypes.h +++ /dev/null @@ -1,24 +0,0 @@ -//======================================================================== -// -// CharTypes.h -// -// Copyright 2001-2003 Glyph & Cog, LLC -// -//======================================================================== - -#ifndef CHARTYPES_H -#define CHARTYPES_H - -// Unicode character. -typedef unsigned int Unicode; - -// Character ID for CID character collections. -typedef unsigned int CID; - -// This is large enough to hold any of the following: -// - 8-bit char code -// - 16-bit CID -// - Unicode -typedef unsigned int CharCode; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/CompactFontTables.h b/Build/source/libs/poppler/poppler-src/poppler/CompactFontTables.h deleted file mode 100644 index cfbfdaf5752..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/CompactFontTables.h +++ /dev/null @@ -1,480 +0,0 @@ -//======================================================================== -// -// CompactFontTables.h -// -// Copyright 1999-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2011 Albert Astals Cid <aacid@kde.org> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef COMPACTFONTINFO_H -#define COMPACTFONTINFO_H - -#include "goo/gtypes.h" - -static char *type1CStdStrings[391] = { - ".notdef", - "space", - "exclam", - "quotedbl", - "numbersign", - "dollar", - "percent", - "ampersand", - "quoteright", - "parenleft", - "parenright", - "asterisk", - "plus", - "comma", - "hyphen", - "period", - "slash", - "zero", - "one", - "two", - "three", - "four", - "five", - "six", - "seven", - "eight", - "nine", - "colon", - "semicolon", - "less", - "equal", - "greater", - "question", - "at", - "A", - "B", - "C", - "D", - "E", - "F", - "G", - "H", - "I", - "J", - "K", - "L", - "M", - "N", - "O", - "P", - "Q", - "R", - "S", - "T", - "U", - "V", - "W", - "X", - "Y", - "Z", - "bracketleft", - "backslash", - "bracketright", - "asciicircum", - "underscore", - "quoteleft", - "a", - "b", - "c", - "d", - "e", - "f", - "g", - "h", - "i", - "j", - "k", - "l", - "m", - "n", - "o", - "p", - "q", - "r", - "s", - "t", - "u", - "v", - "w", - "x", - "y", - "z", - "braceleft", - "bar", - "braceright", - "asciitilde", - "exclamdown", - "cent", - "sterling", - "fraction", - "yen", - "florin", - "section", - "currency", - "quotesingle", - "quotedblleft", - "guillemotleft", - "guilsinglleft", - "guilsinglright", - "fi", - "fl", - "endash", - "dagger", - "daggerdbl", - "periodcentered", - "paragraph", - "bullet", - "quotesinglbase", - "quotedblbase", - "quotedblright", - "guillemotright", - "ellipsis", - "perthousand", - "questiondown", - "grave", - "acute", - "circumflex", - "tilde", - "macron", - "breve", - "dotaccent", - "dieresis", - "ring", - "cedilla", - "hungarumlaut", - "ogonek", - "caron", - "emdash", - "AE", - "ordfeminine", - "Lslash", - "Oslash", - "OE", - "ordmasculine", - "ae", - "dotlessi", - "lslash", - "oslash", - "oe", - "germandbls", - "onesuperior", - "logicalnot", - "mu", - "trademark", - "Eth", - "onehalf", - "plusminus", - "Thorn", - "onequarter", - "divide", - "brokenbar", - "degree", - "thorn", - "threequarters", - "twosuperior", - "registered", - "minus", - "eth", - "multiply", - "threesuperior", - "copyright", - "Aacute", - "Acircumflex", - "Adieresis", - "Agrave", - "Aring", - "Atilde", - "Ccedilla", - "Eacute", - "Ecircumflex", - "Edieresis", - "Egrave", - "Iacute", - "Icircumflex", - "Idieresis", - "Igrave", - "Ntilde", - "Oacute", - "Ocircumflex", - "Odieresis", - "Ograve", - "Otilde", - "Scaron", - "Uacute", - "Ucircumflex", - "Udieresis", - "Ugrave", - "Yacute", - "Ydieresis", - "Zcaron", - "aacute", - "acircumflex", - "adieresis", - "agrave", - "aring", - "atilde", - "ccedilla", - "eacute", - "ecircumflex", - "edieresis", - "egrave", - "iacute", - "icircumflex", - "idieresis", - "igrave", - "ntilde", - "oacute", - "ocircumflex", - "odieresis", - "ograve", - "otilde", - "scaron", - "uacute", - "ucircumflex", - "udieresis", - "ugrave", - "yacute", - "ydieresis", - "zcaron", - "exclamsmall", - "Hungarumlautsmall", - "dollaroldstyle", - "dollarsuperior", - "ampersandsmall", - "Acutesmall", - "parenleftsuperior", - "parenrightsuperior", - "twodotenleader", - "onedotenleader", - "zerooldstyle", - "oneoldstyle", - "twooldstyle", - "threeoldstyle", - "fouroldstyle", - "fiveoldstyle", - "sixoldstyle", - "sevenoldstyle", - "eightoldstyle", - "nineoldstyle", - "commasuperior", - "threequartersemdash", - "periodsuperior", - "questionsmall", - "asuperior", - "bsuperior", - "centsuperior", - "dsuperior", - "esuperior", - "isuperior", - "lsuperior", - "msuperior", - "nsuperior", - "osuperior", - "rsuperior", - "ssuperior", - "tsuperior", - "ff", - "ffi", - "ffl", - "parenleftinferior", - "parenrightinferior", - "Circumflexsmall", - "hyphensuperior", - "Gravesmall", - "Asmall", - "Bsmall", - "Csmall", - "Dsmall", - "Esmall", - "Fsmall", - "Gsmall", - "Hsmall", - "Ismall", - "Jsmall", - "Ksmall", - "Lsmall", - "Msmall", - "Nsmall", - "Osmall", - "Psmall", - "Qsmall", - "Rsmall", - "Ssmall", - "Tsmall", - "Usmall", - "Vsmall", - "Wsmall", - "Xsmall", - "Ysmall", - "Zsmall", - "colonmonetary", - "onefitted", - "rupiah", - "Tildesmall", - "exclamdownsmall", - "centoldstyle", - "Lslashsmall", - "Scaronsmall", - "Zcaronsmall", - "Dieresissmall", - "Brevesmall", - "Caronsmall", - "Dotaccentsmall", - "Macronsmall", - "figuredash", - "hypheninferior", - "Ogoneksmall", - "Ringsmall", - "Cedillasmall", - "questiondownsmall", - "oneeighth", - "threeeighths", - "fiveeighths", - "seveneighths", - "onethird", - "twothirds", - "zerosuperior", - "foursuperior", - "fivesuperior", - "sixsuperior", - "sevensuperior", - "eightsuperior", - "ninesuperior", - "zeroinferior", - "oneinferior", - "twoinferior", - "threeinferior", - "fourinferior", - "fiveinferior", - "sixinferior", - "seveninferior", - "eightinferior", - "nineinferior", - "centinferior", - "dollarinferior", - "periodinferior", - "commainferior", - "Agravesmall", - "Aacutesmall", - "Acircumflexsmall", - "Atildesmall", - "Adieresissmall", - "Aringsmall", - "AEsmall", - "Ccedillasmall", - "Egravesmall", - "Eacutesmall", - "Ecircumflexsmall", - "Edieresissmall", - "Igravesmall", - "Iacutesmall", - "Icircumflexsmall", - "Idieresissmall", - "Ethsmall", - "Ntildesmall", - "Ogravesmall", - "Oacutesmall", - "Ocircumflexsmall", - "Otildesmall", - "Odieresissmall", - "OEsmall", - "Oslashsmall", - "Ugravesmall", - "Uacutesmall", - "Ucircumflexsmall", - "Udieresissmall", - "Yacutesmall", - "Thornsmall", - "Ydieresissmall", - "001.000", - "001.001", - "001.002", - "001.003", - "Black", - "Bold", - "Book", - "Light", - "Medium", - "Regular", - "Roman", - "Semibold" -}; - -static Gushort type1CISOAdobeCharset[229] = { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, - 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, - 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, - 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, - 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, - 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, - 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, - 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, - 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, - 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, - 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, - 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, - 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, - 220, 221, 222, 223, 224, 225, 226, 227, 228 -}; - -static const Gushort type1CExpertCharset[166] = { - 0, 1, 229, 230, 231, 232, 233, 234, 235, 236, - 237, 238, 13, 14, 15, 99, 239, 240, 241, 242, - 243, 244, 245, 246, 247, 248, 27, 28, 249, 250, - 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, - 261, 262, 263, 264, 265, 266, 109, 110, 267, 268, - 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, - 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, - 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, - 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, - 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, - 158, 155, 163, 319, 320, 321, 322, 323, 324, 325, - 326, 150, 164, 169, 327, 328, 329, 330, 331, 332, - 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, - 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, - 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, - 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, - 373, 374, 375, 376, 377, 378 -}; - -static Gushort type1CExpertSubsetCharset[87] = { - 0, 1, 231, 232, 235, 236, 237, 238, 13, 14, - 15, 99, 239, 240, 241, 242, 243, 244, 245, 246, - 247, 248, 27, 28, 249, 250, 251, 253, 254, 255, - 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, - 266, 109, 110, 267, 268, 269, 270, 272, 300, 301, - 302, 305, 314, 315, 158, 155, 163, 320, 321, 322, - 323, 324, 325, 326, 150, 164, 169, 327, 328, 329, - 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, - 340, 341, 342, 343, 344, 345, 346 -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/CurlCachedFile.cc b/Build/source/libs/poppler/poppler-src/poppler/CurlCachedFile.cc deleted file mode 100644 index 907baafe5af..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/CurlCachedFile.cc +++ /dev/null @@ -1,99 +0,0 @@ -//======================================================================== -// -// CurlCachedFile.cc -// -// This file is licensed under the GPLv2 or later -// -// Copyright 2009 Stefan Thomas <thomas@eload24.com> -// Copyright 2010, 2011 Hib Eris <hib@hiberis.nl> -// Copyright 2010 Albert Astals Cid <aacid@kde.org> -// -//======================================================================== - -#include <config.h> - -#include "CurlCachedFile.h" - -#include "goo/GooString.h" - -//------------------------------------------------------------------------ - -CurlCachedFileLoader::CurlCachedFileLoader() -{ - url = nullptr; - cachedFile = nullptr; - curl = nullptr; -} - -CurlCachedFileLoader::~CurlCachedFileLoader() { - curl_easy_cleanup(curl); -} - -static size_t -noop_cb(char *ptr, size_t size, size_t nmemb, void *ptr2) -{ - return size*nmemb; -} - -size_t -CurlCachedFileLoader::init(GooString *urlA, CachedFile *cachedFileA) -{ - double contentLength = -1; - long code = 0; - size_t size; - - url = urlA; - cachedFile = cachedFileA; - curl = curl_easy_init(); - - curl_easy_setopt(curl, CURLOPT_URL, url->getCString()); - curl_easy_setopt(curl, CURLOPT_HEADER, 1); - curl_easy_setopt(curl, CURLOPT_NOBODY, 1); - curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, &noop_cb); - curl_easy_perform(curl); - curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &code); - if (code) { - curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &contentLength); - size = contentLength; - } else { - error(errInternal, -1, "Failed to get size of '{0:t}'.", url); - size = -1; - } - curl_easy_reset(curl); - - return size; -} - -static -size_t load_cb(const char *ptr, size_t size, size_t nmemb, void *data) -{ - CachedFileWriter *writer = (CachedFileWriter *) data; - return (writer->write) (ptr, size*nmemb); -} - -int CurlCachedFileLoader::load(const std::vector<ByteRange> &ranges, CachedFileWriter *writer) -{ - CURLcode r = CURLE_OK; - size_t fromByte, toByte; - for (size_t i = 0; i < ranges.size(); i++) { - - fromByte = ranges[i].offset; - toByte = fromByte + ranges[i].length - 1; - GooString *range = GooString::format("{0:ud}-{1:ud}", fromByte, toByte); - - curl_easy_setopt(curl, CURLOPT_URL, url->getCString()); - curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, load_cb); - curl_easy_setopt(curl, CURLOPT_WRITEDATA, writer); - curl_easy_setopt(curl, CURLOPT_RANGE, range->getCString()); - r = curl_easy_perform(curl); - curl_easy_reset(curl); - - delete range; - - if (r != CURLE_OK) break; - } - return r; -} - -//------------------------------------------------------------------------ - diff --git a/Build/source/libs/poppler/poppler-src/poppler/CurlCachedFile.h b/Build/source/libs/poppler/poppler-src/poppler/CurlCachedFile.h deleted file mode 100644 index 80e69727a48..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/CurlCachedFile.h +++ /dev/null @@ -1,40 +0,0 @@ -//======================================================================== -// -// CurlCachedFile.h -// -// This file is licensed under the GPLv2 or later -// -// Copyright 2010 Hib Eris <hib@hiberis.nl> -// Copyright 2010 Albert Astals Cid <aacid@kde.org> -// -//======================================================================== - -#ifndef CURLCACHELOADER_H -#define CURLCACHELOADER_H - -#include "poppler-config.h" -#include "CachedFile.h" - -#include <curl/curl.h> - -//------------------------------------------------------------------------ - -class CurlCachedFileLoader : public CachedFileLoader { - -public: - - CurlCachedFileLoader(); - ~CurlCachedFileLoader(); - size_t init(GooString *url, CachedFile* cachedFile) override; - int load(const std::vector<ByteRange> &ranges, CachedFileWriter *writer) override; - -private: - - GooString *url; - CachedFile *cachedFile; - CURL *curl; - -}; - -#endif - diff --git a/Build/source/libs/poppler/poppler-src/poppler/CurlPDFDocBuilder.cc b/Build/source/libs/poppler/poppler-src/poppler/CurlPDFDocBuilder.cc deleted file mode 100644 index 4dae58e7e3d..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/CurlPDFDocBuilder.cc +++ /dev/null @@ -1,50 +0,0 @@ -//======================================================================== -// -// CurlPDFDocBuilder.cc -// -// This file is licensed under the GPLv2 or later -// -// Copyright 2010 Hib Eris <hib@hiberis.nl> -// Copyright 2010, 2017 Albert Astals Cid <aacid@kde.org> -// -//======================================================================== - -#include <config.h> - -#include "CurlPDFDocBuilder.h" - -#include "CachedFile.h" -#include "CurlCachedFile.h" -#include "ErrorCodes.h" - -//------------------------------------------------------------------------ -// CurlPDFDocBuilder -//------------------------------------------------------------------------ - -PDFDoc * -CurlPDFDocBuilder::buildPDFDoc(const GooString &uri, - GooString *ownerPassword, GooString *userPassword, void *guiDataA) -{ - CachedFile *cachedFile = new CachedFile( - new CurlCachedFileLoader(), uri.copy()); - - if (cachedFile->getLength() == ((Guint) -1)) { - cachedFile->decRefCnt(); - return PDFDoc::ErrorPDFDoc(errOpenFile, uri.copy()); - } - - BaseStream *str = new CachedFileStream( - cachedFile, 0, gFalse, cachedFile->getLength(), Object(objNull)); - - return new PDFDoc(str, ownerPassword, userPassword, guiDataA); -} - -GBool CurlPDFDocBuilder::supports(const GooString &uri) -{ - if (uri.cmpN("http://", 7) == 0 || uri.cmpN("https://", 8) == 0) { - return gTrue; - } else { - return gFalse; - } -} - diff --git a/Build/source/libs/poppler/poppler-src/poppler/CurlPDFDocBuilder.h b/Build/source/libs/poppler/poppler-src/poppler/CurlPDFDocBuilder.h deleted file mode 100644 index 43b442db25e..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/CurlPDFDocBuilder.h +++ /dev/null @@ -1,33 +0,0 @@ -//======================================================================== -// -// CurlPDFDocBuilder.h -// -// This file is licensed under the GPLv2 or later -// -// Copyright 2010 Hib Eris <hib@hiberis.nl> -// Copyright 2010 Albert Astals Cid <aacid@kde.org> -// -//======================================================================== - -#ifndef CURLPDFDOCBUILDER_H -#define CURLPDFDOCBUILDER_H - -#include "PDFDocBuilder.h" - -//------------------------------------------------------------------------ -// CurlPDFDocBuilder -// -// The CurlPDFDocBuilder implements a PDFDocBuilder for 'http(s)://'. -//------------------------------------------------------------------------ - -class CurlPDFDocBuilder : public PDFDocBuilder { - -public: - - PDFDoc *buildPDFDoc(const GooString &uri, GooString *ownerPassword = NULL, - GooString *userPassword = NULL, void *guiDataA = NULL) override; - GBool supports(const GooString &uri) override; - -}; - -#endif /* CURLPDFDOCBUILDER_H */ diff --git a/Build/source/libs/poppler/poppler-src/poppler/DCTStream.cc b/Build/source/libs/poppler/poppler-src/poppler/DCTStream.cc deleted file mode 100644 index 4665ca83889..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/DCTStream.cc +++ /dev/null @@ -1,265 +0,0 @@ -//======================================================================== -// -// DCTStream.cc -// -// This file is licensed under the GPLv2 or later -// -// Copyright 2005 Jeff Muizelaar <jeff@infidigm.net> -// Copyright 2005-2010, 2012, 2017 Albert Astals Cid <aacid@kde.org> -// Copyright 2009 Ryszard Trojnacki <rysiek@menel.com> -// Copyright 2010 Carlos Garcia Campos <carlosgc@gnome.org> -// Copyright 2011 Daiki Ueno <ueno@unixuser.org> -// Copyright 2011 Tomas Hoger <thoger@redhat.com> -// Copyright 2012, 2013 Thomas Freitag <Thomas.Freitag@alfa.de> -// Copyright 2017 Adrian Johnson <ajohnson@redneon.com> -// -//======================================================================== - -#include "DCTStream.h" - -static void str_init_source(j_decompress_ptr cinfo) -{ -} - -static boolean str_fill_input_buffer(j_decompress_ptr cinfo) -{ - int c; - struct str_src_mgr * src = (struct str_src_mgr *)cinfo->src; - if (src->index == 0) { - c = 0xFF; - src->index++; - } - else if (src->index == 1) { - c = 0xD8; - src->index++; - } - else c = src->str->getChar(); - if (c != EOF) - { - src->buffer = c; - src->pub.next_input_byte = &src->buffer; - src->pub.bytes_in_buffer = 1; - return TRUE; - } - else return FALSE; -} - -static void str_skip_input_data(j_decompress_ptr cinfo, long num_bytes) -{ - struct str_src_mgr * src = (struct str_src_mgr *)cinfo->src; - if (num_bytes > 0) { - while (num_bytes > (long) src->pub.bytes_in_buffer) { - num_bytes -= (long) src->pub.bytes_in_buffer; - str_fill_input_buffer(cinfo); - } - src->pub.next_input_byte += (size_t) num_bytes; - src->pub.bytes_in_buffer -= (size_t) num_bytes; - } -} - -static void str_term_source(j_decompress_ptr cinfo) -{ -} - -DCTStream::DCTStream(Stream *strA, int colorXformA, Dict *dict, int recursion) : - FilterStream(strA) { - colorXform = colorXformA; - if (dict != nullptr) { - Object obj = dict->lookup("Width", recursion); - err.width = (obj.isInt() && obj.getInt() <= JPEG_MAX_DIMENSION) ? obj.getInt() : 0; - obj = dict->lookup("Height", recursion); - err.height = (obj.isInt() && obj.getInt() <= JPEG_MAX_DIMENSION) ? obj.getInt() : 0; - } else - err.height = err.width = 0; - init(); -} - -DCTStream::~DCTStream() { - jpeg_destroy_decompress(&cinfo); - delete str; -} - -static void exitErrorHandler(jpeg_common_struct *error) { - j_decompress_ptr cinfo = (j_decompress_ptr)error; - str_error_mgr * err = (struct str_error_mgr *)cinfo->err; - if (cinfo->err->msg_code == JERR_IMAGE_TOO_BIG && err->width != 0 && err->height != 0) { - cinfo->image_height = err->height; - cinfo->image_width = err->width; - } else { - longjmp(err->setjmp_buffer, 1); - } -} - -void DCTStream::init() -{ - jpeg_std_error(&err.pub); - err.pub.error_exit = &exitErrorHandler; - src.pub.init_source = str_init_source; - src.pub.fill_input_buffer = str_fill_input_buffer; - src.pub.skip_input_data = str_skip_input_data; - src.pub.resync_to_restart = jpeg_resync_to_restart; - src.pub.term_source = str_term_source; - src.pub.bytes_in_buffer = 0; - src.pub.next_input_byte = nullptr; - src.str = str; - src.index = 0; - current = nullptr; - limit = nullptr; - - cinfo.err = &err.pub; - if (!setjmp(err.setjmp_buffer)) { - jpeg_create_decompress(&cinfo); - cinfo.src = (jpeg_source_mgr *)&src; - } - row_buffer = nullptr; -} - -void DCTStream::reset() { - int row_stride; - - str->reset(); - - if (row_buffer) - { - jpeg_destroy_decompress(&cinfo); - init(); - } - - // JPEG data has to start with 0xFF 0xD8 - // but some pdf like the one on - // https://bugs.freedesktop.org/show_bug.cgi?id=3299 - // does have some garbage before that this seeks for - // the start marker... - bool startFound = false; - int c = 0, c2 = 0; - while (!startFound) - { - if (!c) - { - c = str->getChar(); - if (c == -1) - { - error(errSyntaxError, -1, "Could not find start of jpeg data"); - return; - } - if (c != 0xFF) c = 0; - } - else - { - c2 = str->getChar(); - if (c2 != 0xD8) - { - c = 0; - c2 = 0; - } - else startFound = true; - } - } - - if (!setjmp(err.setjmp_buffer)) - { - if (jpeg_read_header(&cinfo, TRUE) != JPEG_SUSPENDED) - { - // figure out color transform - if (colorXform == -1 && !cinfo.saw_Adobe_marker) { - if (cinfo.num_components == 3) { - if (cinfo.saw_JFIF_marker) { - colorXform = 1; - } else if (cinfo.cur_comp_info[0]->component_id == 82 && - cinfo.cur_comp_info[1]->component_id == 71 && - cinfo.cur_comp_info[2]->component_id == 66) { // ASCII "RGB" - colorXform = 0; - } else { - colorXform = 1; - } - } else { - colorXform = 0; - } - } else if (cinfo.saw_Adobe_marker) { - colorXform = cinfo.Adobe_transform; - } - - switch (cinfo.num_components) { - case 3: - cinfo.jpeg_color_space = colorXform ? JCS_YCbCr : JCS_RGB; - break; - case 4: - cinfo.jpeg_color_space = colorXform ? JCS_YCCK : JCS_CMYK; - break; - } - - jpeg_start_decompress(&cinfo); - - row_stride = cinfo.output_width * cinfo.output_components; - row_buffer = cinfo.mem->alloc_sarray((j_common_ptr) &cinfo, JPOOL_IMAGE, row_stride, 1); - } - } -} - -// we can not go with inline since gcc -// refuses to inline because of setjmp -#define DO_GET_CHAR \ - if (current == limit) { \ - if (cinfo.output_scanline < cinfo.output_height) \ - { \ - if (!setjmp(err.setjmp_buffer)) \ - { \ - if (!jpeg_read_scanlines(&cinfo, row_buffer, 1)) c = EOF; \ - else { \ - current = &row_buffer[0][0]; \ - limit = &row_buffer[0][(cinfo.output_width - 1) * cinfo.output_components] + cinfo.output_components; \ - c = *current; \ - ++current; \ - } \ - } \ - else c = EOF; \ - } \ - else c = EOF; \ - } else { \ - c = *current; \ - ++current; \ - } \ - -int DCTStream::getChar() { - int c; - - DO_GET_CHAR - - return c; -} - -int DCTStream::getChars(int nChars, Guchar *buffer) { - // Use volatile to prevent the compiler optimizing - // variables into registers. See setjmp man page. - volatile int i, c; - for (i = 0; i < nChars; ++i) { - DO_GET_CHAR - if (likely(c != EOF)) buffer[i] = c; - else return i; - } - return nChars; -} - -int DCTStream::lookChar() { - if (unlikely(current == nullptr)) { - return EOF; - } - return *current; -} - -GooString *DCTStream::getPSFilter(int psLevel, const char *indent) { - GooString *s; - - if (psLevel < 2) { - return nullptr; - } - if (!(s = str->getPSFilter(psLevel, indent))) { - return nullptr; - } - s->append(indent)->append("<< >> /DCTDecode filter\n"); - return s; -} - -GBool DCTStream::isBinary(GBool last) { - return str->isBinary(gTrue); -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/DCTStream.h b/Build/source/libs/poppler/poppler-src/poppler/DCTStream.h deleted file mode 100644 index 00e0484c861..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/DCTStream.h +++ /dev/null @@ -1,91 +0,0 @@ -//======================================================================== -// -// DCTStream.h -// -// This file is licensed under the GPLv2 or later -// -// Copyright 2005 Jeff Muizelaar <jeff@infidigm.net> -// Copyright 2005 Martin Kretzschmar <martink@gnome.org> -// Copyright 2005-2007, 2009-2011, 2017 Albert Astals Cid <aacid@kde.org> -// Copyright 2010 Carlos Garcia Campos <carlosgc@gnome.org> -// Copyright 2011 Daiki Ueno <ueno@unixuser.org> -// Copyright 2013 Thomas Freitag <Thomas.Freitag@alfa.de> -// -//======================================================================== - -#ifndef DCTSTREAM_H -#define DCTSTREAM_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include "poppler-config.h" -#include <stdio.h> -#include <stdlib.h> -#include <stddef.h> -#include <setjmp.h> -#ifdef HAVE_UNISTD_H -#include <unistd.h> -#endif -#include <string.h> -#include <ctype.h> -#include "goo/gmem.h" -#include "goo/gfile.h" -#include "Error.h" -#include "Object.h" -#include "Decrypt.h" -#include "Stream.h" - -extern "C" { -#include <jpeglib.h> -#include <jerror.h> -} - -struct str_src_mgr { - struct jpeg_source_mgr pub; - JOCTET buffer; - Stream *str; - int index; -}; - -struct str_error_mgr { - struct jpeg_error_mgr pub; - jmp_buf setjmp_buffer; - int width; - int height; -}; - -class DCTStream: public FilterStream { -public: - - DCTStream(Stream *strA, int colorXformA, Dict *dict, int recursion); - ~DCTStream(); - StreamKind getKind() override { return strDCT; } - void reset() override; - int getChar() override; - int lookChar() override; - GooString *getPSFilter(int psLevel, const char *indent) override; - GBool isBinary(GBool last = gTrue) override; - -private: - void init(); - - GBool hasGetChars() override { return true; } - int getChars(int nChars, Guchar *buffer) override; - - int colorXform; - JSAMPLE *current; - JSAMPLE *limit; - struct jpeg_decompress_struct cinfo; - struct str_error_mgr err; - struct str_src_mgr src; - JSAMPARRAY row_buffer; -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/DateInfo.cc b/Build/source/libs/poppler/poppler-src/poppler/DateInfo.cc deleted file mode 100644 index b2251004e8f..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/DateInfo.cc +++ /dev/null @@ -1,150 +0,0 @@ -//======================================================================== -// -// DateInfo.cc -// -// Copyright (C) 2008, 2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2009 Carlos Garcia Campos <carlosgc@gnome.org> -// Copyright (C) 2015 André Guerreiro <aguerreiro1985@gmail.com> -// Copyright (C) 2015 André Esser <bepandre@hotmail.com> -// Copyright (C) 2016 Adrian Johnson <ajohnson@redneon.com> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -//======================================================================== -// -// Based on code from pdfinfo.cc -// -// Copyright 1998-2003 Glyph & Cog, LLC -// -//======================================================================== - -#include <config.h> - -#include "glibc.h" -#include "DateInfo.h" - -#include <stdio.h> -#include <string.h> - -/* See PDF Reference 1.3, Section 3.8.2 for PDF Date representation */ -GBool parseDateString(const char *dateString, int *year, int *month, int *day, int *hour, int *minute, int *second, char *tz, int *tzHour, int *tzMinute) -{ - if ( dateString == nullptr ) return gFalse; - if ( strlen(dateString) < 2 ) return gFalse; - - if ( dateString[0] == 'D' && dateString[1] == ':' ) - dateString += 2; - - *month = 1; - *day = 1; - *hour = 0; - *minute = 0; - *second = 0; - *tz = 0x00; - *tzHour = 0; - *tzMinute = 0; - - if ( sscanf( dateString, - "%4d%2d%2d%2d%2d%2d%c%2d%*c%2d", - year, month, day, hour, minute, second, - tz, tzHour, tzMinute ) > 0 ) { - /* Workaround for y2k bug in Distiller 3 stolen from gpdf, hoping that it won't - * be used after y2.2k */ - if ( *year < 1930 && strlen (dateString) > 14) - { - int century, years_since_1900; - if ( sscanf( dateString, - "%2d%3d%2d%2d%2d%2d%2d", - ¢ury, &years_since_1900, month, day, hour, minute, second) == 7 ) - { - *year = century * 100 + years_since_1900; - } - else - { - return gFalse; - } - } - - if (*year <= 0) return gFalse; - - return gTrue; - } - - return gFalse; -} - -// Convert time to PDF date string -GooString *timeToDateString(time_t *timet) { - GooString *dateString; - char s[5]; - struct tm *gt; - size_t len; - time_t timep = timet ? *timet : time(nullptr); - struct tm t; - - gt = gmtime_r (&timep, &t); - - dateString = new GooString ("D:"); - - /* Year YYYY */ - len = strftime (s, sizeof(s), "%Y", gt); - dateString->append (s, len); - - /* Month MM */ - len = strftime (s, sizeof(s), "%m", gt); - dateString->append (s, len); - - /* Day DD */ - len = strftime (s, sizeof(s), "%d", gt); - dateString->append (s, len); - - /* Hour HH */ - len = strftime (s, sizeof(s), "%H", gt); - dateString->append (s, len); - - /* Minute mm */ - len = strftime (s, sizeof(s), "%M", gt); - dateString->append (s, len); - - /* Second SS */ - len = strftime (s, sizeof(s), "%S", gt); - dateString->append (s, len); - - return dateString; -} - -// Convert PDF date string to time. Returns -1 if conversion fails. -time_t dateStringToTime(const GooString *dateString) { - int year, mon, day, hour, min, sec, tz_hour, tz_minute; - char tz; - struct tm tm; - time_t time; - - if (!parseDateString (dateString->getCString(), &year, &mon, &day, &hour, &min, &sec, &tz, &tz_hour, &tz_minute)) - return -1; - - tm.tm_year = year - 1900; - tm.tm_mon = mon - 1; - tm.tm_mday = day; - tm.tm_hour = hour; - tm.tm_min = min; - tm.tm_sec = sec; - tm.tm_wday = -1; - tm.tm_yday = -1; - tm.tm_isdst = -1; /* 0 = DST off, 1 = DST on, -1 = don't know */ - - /* compute tm_wday and tm_yday and check date */ - time = timegm (&tm); - if (time == (time_t)-1) - return time; - - time_t offset = (tz_hour*60 + tz_minute)*60; - if (tz == '-') - offset *= -1; - time -= offset; - - return time; -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/DateInfo.h b/Build/source/libs/poppler/poppler-src/poppler/DateInfo.h deleted file mode 100644 index 90570d4248a..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/DateInfo.h +++ /dev/null @@ -1,43 +0,0 @@ -//======================================================================== -// -// DateInfo.h -// -// Copyright (C) 2008, 2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2009 Carlos Garcia Campos <carlosgc@gnome.org> -// Copyright (C) 2015 André Guerreiro <aguerreiro1985@gmail.com> -// Copyright (C) 2015 André Esser <bepandre@hotmail.com> -// Copyright (C) 2016 Adrian Johnson <ajohnson@redneon.com> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -//======================================================================== -// -// Based on code from pdfinfo.cc -// -// Copyright 1998-2003 Glyph & Cog, LLC -// -//======================================================================== - -#ifndef DATE_INFO_H -#define DATE_INFO_H - -#include "goo/gtypes.h" -#include "goo/GooString.h" -#include <time.h> - -GBool parseDateString(const char *string, int *year, int *month, int *day, int *hour, int *minute, int *second, char *tz, int *tzHour, int *tzMinute); - -/* Converts the time_t into a PDF Date format string. - * If timet is NULL, current time is used. - */ -GooString *timeToDateString(time_t *timet); - -/* Convert PDF date string to time. - * Returns -1 if conversion fails. - */ -time_t dateStringToTime(const GooString *dateString); - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/Decrypt.cc b/Build/source/libs/poppler/poppler-src/poppler/Decrypt.cc deleted file mode 100644 index 9577b655234..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/Decrypt.cc +++ /dev/null @@ -1,1781 +0,0 @@ -//======================================================================== -// -// Decrypt.cc -// -// Copyright 1996-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2008 Julien Rebetez <julien@fhtagn.net> -// Copyright (C) 2008, 2010, 2016-2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2009 Matthias Franz <matthias@ktug.or.kr> -// Copyright (C) 2009 David Benjamin <davidben@mit.edu> -// Copyright (C) 2012 Fabio D'Urso <fabiodurso@hotmail.it> -// Copyright (C) 2013, 2017 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2016 Alok Anand <alok4nand@gmail.com> -// Copyright (C) 2016 Thomas Freitag <Thomas.Freitag@alfa.de> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include <config.h> - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include <cstdint> -#include <string.h> -#include "goo/gmem.h" -#include "goo/grandom.h" -#include "Decrypt.h" -#include "Error.h" - -static void rc4InitKey(Guchar *key, int keyLen, Guchar *state); -static Guchar rc4DecryptByte(Guchar *state, Guchar *x, Guchar *y, Guchar c); - -static GBool aesReadBlock(Stream *str, Guchar *in, GBool addPadding); - -static void aesKeyExpansion(DecryptAESState *s, Guchar *objKey, int objKeyLen, GBool decrypt); -static void aesEncryptBlock(DecryptAESState *s, Guchar *in); -static void aesDecryptBlock(DecryptAESState *s, Guchar *in, GBool last); - -static void aes256KeyExpansion(DecryptAES256State *s, Guchar *objKey, int objKeyLen, GBool decrypt); -static void aes256EncryptBlock(DecryptAES256State *s, Guchar *in); -static void aes256DecryptBlock(DecryptAES256State *s, Guchar *in, GBool last); - -static void sha256(Guchar *msg, int msgLen, Guchar *hash); -static void sha384(Guchar *msg, int msgLen, Guchar *hash); -static void sha512(Guchar *msg, int msgLen, Guchar *hash); - -static void revision6Hash(GooString *inputPassword, Guchar *K, char *userKey); - -static const Guchar passwordPad[32] = { - 0x28, 0xbf, 0x4e, 0x5e, 0x4e, 0x75, 0x8a, 0x41, - 0x64, 0x00, 0x4e, 0x56, 0xff, 0xfa, 0x01, 0x08, - 0x2e, 0x2e, 0x00, 0xb6, 0xd0, 0x68, 0x3e, 0x80, - 0x2f, 0x0c, 0xa9, 0xfe, 0x64, 0x53, 0x69, 0x7a -}; - -//------------------------------------------------------------------------ -// Decrypt -//------------------------------------------------------------------------ - -GBool Decrypt::makeFileKey(int encVersion, int encRevision, int keyLength, - GooString *ownerKey, GooString *userKey, - GooString *ownerEnc, GooString *userEnc, - int permissions, GooString *fileID, - GooString *ownerPassword, GooString *userPassword, - Guchar *fileKey, GBool encryptMetadata, - GBool *ownerPasswordOk) { - DecryptAES256State state; - Guchar test[127 + 56], test2[32]; - GooString *userPassword2; - Guchar fState[256]; - Guchar tmpKey[16]; - Guchar fx, fy; - int len, i, j; - - *ownerPasswordOk = gFalse; - - if (encRevision == 5 || encRevision == 6) { - - // check the owner password - if (ownerPassword) { - //~ this is supposed to convert the password to UTF-8 using "SASLprep" - len = ownerPassword->getLength(); - if (len > 127) { - len = 127; - } - memcpy(test, ownerPassword->getCString(), len); - memcpy(test + len, ownerKey->getCString() + 32, 8); - memcpy(test + len + 8, userKey->getCString(), 48); - sha256(test, len + 56, test); - if (encRevision == 6) { - //test contains the initial SHA-256 hash as input K. - revision6Hash(ownerPassword, test, userKey->getCString()); - } - if (!memcmp(test, ownerKey->getCString(), 32)) { - - // compute the file key from the owner password - memcpy(test, ownerPassword->getCString(), len); - memcpy(test + len, ownerKey->getCString() + 40, 8); - memcpy(test + len + 8, userKey->getCString(), 48); - sha256(test, len + 56, test); - if (encRevision == 6) { - //test contains the initial SHA-256 hash input K. - revision6Hash(ownerPassword, test, userKey->getCString()); - } - aes256KeyExpansion(&state, test, 32, gTrue); - for (i = 0; i < 16; ++i) { - state.cbc[i] = 0; - } - aes256DecryptBlock(&state, (Guchar *)ownerEnc->getCString(), gFalse); - memcpy(fileKey, state.buf, 16); - aes256DecryptBlock(&state, (Guchar *)ownerEnc->getCString() + 16, - gFalse); - memcpy(fileKey + 16, state.buf, 16); - - *ownerPasswordOk = gTrue; - return gTrue; - } - } - - // check the user password - if (userPassword) { - //~ this is supposed to convert the password to UTF-8 using "SASLprep" - len = userPassword->getLength(); - if (len > 127) { - len = 127; - } - memcpy(test, userPassword->getCString(), len); - memcpy(test + len, userKey->getCString() + 32, 8); - sha256(test, len + 8, test); - if(encRevision == 6) { - // test contains the initial SHA-256 hash input K. - // user key is not used in checking user password. - revision6Hash(userPassword, test, nullptr); - } - if (!memcmp(test, userKey->getCString(), 32)) { - - // compute the file key from the user password - memcpy(test, userPassword->getCString(), len); - memcpy(test + len, userKey->getCString() + 40, 8); - sha256(test, len + 8, test); - if(encRevision == 6) { - //test contains the initial SHA-256 hash input K. - //user key is not used in computing intermediate user key. - revision6Hash(userPassword, test, nullptr); - } - aes256KeyExpansion(&state, test, 32, gTrue); - for (i = 0; i < 16; ++i) { - state.cbc[i] = 0; - } - aes256DecryptBlock(&state, (Guchar *)userEnc->getCString(), gFalse); - memcpy(fileKey, state.buf, 16); - aes256DecryptBlock(&state, (Guchar *)userEnc->getCString() + 16, - gFalse); - memcpy(fileKey + 16, state.buf, 16); - - return gTrue; - } - } - - return gFalse; - } else { - - // try using the supplied owner password to generate the user password - if (ownerPassword) { - len = ownerPassword->getLength(); - if (len < 32) { - memcpy(test, ownerPassword->getCString(), len); - memcpy(test + len, passwordPad, 32 - len); - } else { - memcpy(test, ownerPassword->getCString(), 32); - } - md5(test, 32, test); - if (encRevision == 3) { - for (i = 0; i < 50; ++i) { - md5(test, keyLength, test); - } - } - if (encRevision == 2) { - rc4InitKey(test, keyLength, fState); - fx = fy = 0; - for (i = 0; i < 32; ++i) { - test2[i] = rc4DecryptByte(fState, &fx, &fy, ownerKey->getChar(i)); - } - } else { - memcpy(test2, ownerKey->getCString(), 32); - for (i = 19; i >= 0; --i) { - for (j = 0; j < keyLength; ++j) { - tmpKey[j] = test[j] ^ i; - } - rc4InitKey(tmpKey, keyLength, fState); - fx = fy = 0; - for (j = 0; j < 32; ++j) { - test2[j] = rc4DecryptByte(fState, &fx, &fy, test2[j]); - } - } - } - userPassword2 = new GooString((char *)test2, 32); - if (makeFileKey2(encVersion, encRevision, keyLength, ownerKey, userKey, - permissions, fileID, userPassword2, fileKey, - encryptMetadata)) { - *ownerPasswordOk = gTrue; - delete userPassword2; - return gTrue; - } - delete userPassword2; - } - - // try using the supplied user password - return makeFileKey2(encVersion, encRevision, keyLength, ownerKey, userKey, - permissions, fileID, userPassword, fileKey, - encryptMetadata); - } -} - -GBool Decrypt::makeFileKey2(int encVersion, int encRevision, int keyLength, - GooString *ownerKey, GooString *userKey, - int permissions, GooString *fileID, - GooString *userPassword, Guchar *fileKey, - GBool encryptMetadata) { - Guchar *buf; - Guchar test[32]; - Guchar fState[256]; - Guchar tmpKey[16]; - Guchar fx, fy; - int len, i, j; - GBool ok; - - // generate file key - buf = (Guchar *)gmalloc(72 + fileID->getLength()); - if (userPassword) { - len = userPassword->getLength(); - if (len < 32) { - memcpy(buf, userPassword->getCString(), len); - memcpy(buf + len, passwordPad, 32 - len); - } else { - memcpy(buf, userPassword->getCString(), 32); - } - } else { - memcpy(buf, passwordPad, 32); - } - memcpy(buf + 32, ownerKey->getCString(), 32); - buf[64] = permissions & 0xff; - buf[65] = (permissions >> 8) & 0xff; - buf[66] = (permissions >> 16) & 0xff; - buf[67] = (permissions >> 24) & 0xff; - memcpy(buf + 68, fileID->getCString(), fileID->getLength()); - len = 68 + fileID->getLength(); - if (!encryptMetadata) { - buf[len++] = 0xff; - buf[len++] = 0xff; - buf[len++] = 0xff; - buf[len++] = 0xff; - } - md5(buf, len, fileKey); - if (encRevision == 3) { - for (i = 0; i < 50; ++i) { - md5(fileKey, keyLength, fileKey); - } - } - - // test user password - if (encRevision == 2) { - rc4InitKey(fileKey, keyLength, fState); - fx = fy = 0; - for (i = 0; i < 32; ++i) { - test[i] = rc4DecryptByte(fState, &fx, &fy, userKey->getChar(i)); - } - ok = memcmp(test, passwordPad, 32) == 0; - } else if (encRevision == 3) { - memcpy(test, userKey->getCString(), 32); - for (i = 19; i >= 0; --i) { - for (j = 0; j < keyLength; ++j) { - tmpKey[j] = fileKey[j] ^ i; - } - rc4InitKey(tmpKey, keyLength, fState); - fx = fy = 0; - for (j = 0; j < 32; ++j) { - test[j] = rc4DecryptByte(fState, &fx, &fy, test[j]); - } - } - memcpy(buf, passwordPad, 32); - memcpy(buf + 32, fileID->getCString(), fileID->getLength()); - md5(buf, 32 + fileID->getLength(), buf); - ok = memcmp(test, buf, 16) == 0; - } else { - ok = gFalse; - } - - gfree(buf); - return ok; -} - -//------------------------------------------------------------------------ -// BaseCryptStream -//------------------------------------------------------------------------ - -BaseCryptStream::BaseCryptStream(Stream *strA, Guchar *fileKey, CryptAlgorithm algoA, - int keyLength, int objNum, int objGen): - FilterStream(strA) -{ - algo = algoA; - - // construct object key - for (int i = 0; i < keyLength; ++i) { - objKey[i] = fileKey[i]; - } - for (std::size_t i = keyLength; i < sizeof(objKey); ++i) { - objKey[i] = 0; - } - - switch (algo) { - case cryptRC4: - if (likely(keyLength < static_cast<int>(sizeof(objKey) - 4))) { - objKey[keyLength] = objNum & 0xff; - objKey[keyLength + 1] = (objNum >> 8) & 0xff; - objKey[keyLength + 2] = (objNum >> 16) & 0xff; - objKey[keyLength + 3] = objGen & 0xff; - objKey[keyLength + 4] = (objGen >> 8) & 0xff; - md5(objKey, keyLength + 5, objKey); - } - if ((objKeyLength = keyLength + 5) > 16) { - objKeyLength = 16; - } - break; - case cryptAES: - objKey[keyLength] = objNum & 0xff; - objKey[keyLength + 1] = (objNum >> 8) & 0xff; - objKey[keyLength + 2] = (objNum >> 16) & 0xff; - objKey[keyLength + 3] = objGen & 0xff; - objKey[keyLength + 4] = (objGen >> 8) & 0xff; - objKey[keyLength + 5] = 0x73; // 's' - objKey[keyLength + 6] = 0x41; // 'A' - objKey[keyLength + 7] = 0x6c; // 'l' - objKey[keyLength + 8] = 0x54; // 'T' - md5(objKey, keyLength + 9, objKey); - if ((objKeyLength = keyLength + 5) > 16) { - objKeyLength = 16; - } - break; - case cryptAES256: - objKeyLength = keyLength; - break; - case cryptNone: - break; - } - - charactersRead = 0; - autoDelete = gTrue; -} - -BaseCryptStream::~BaseCryptStream() { - if (autoDelete) { - delete str; - } -} - -void BaseCryptStream::reset() { - charactersRead = 0; - nextCharBuff = EOF; - str->reset(); -} - -Goffset BaseCryptStream::getPos() { - return charactersRead; -} - -int BaseCryptStream::getChar() { - // Read next character and empty the buffer, so that a new character will be read next time - int c = lookChar(); - nextCharBuff = EOF; - - if (c != EOF) - charactersRead++; - return c; -} - -GBool BaseCryptStream::isBinary(GBool last) { - return str->isBinary(last); -} - -void BaseCryptStream::setAutoDelete(GBool val) { - autoDelete = val; -} - -//------------------------------------------------------------------------ -// EncryptStream -//------------------------------------------------------------------------ - -EncryptStream::EncryptStream(Stream *strA, Guchar *fileKey, CryptAlgorithm algoA, - int keyLength, int objNum, int objGen): - BaseCryptStream(strA, fileKey, algoA, keyLength, objNum, objGen) -{ - // Fill the CBC initialization vector for AES and AES-256 - switch (algo) { - case cryptAES: - grandom_fill(state.aes.cbc, 16); - break; - case cryptAES256: - grandom_fill(state.aes256.cbc, 16); - break; - default: - break; - } -} - -EncryptStream::~EncryptStream() { -} - -void EncryptStream::reset() { - BaseCryptStream::reset(); - - switch (algo) { - case cryptRC4: - state.rc4.x = state.rc4.y = 0; - rc4InitKey(objKey, objKeyLength, state.rc4.state); - break; - case cryptAES: - aesKeyExpansion(&state.aes, objKey, objKeyLength, gFalse); - memcpy(state.aes.buf, state.aes.cbc, 16); // Copy CBC IV to buf - state.aes.bufIdx = 0; - state.aes.paddingReached = gFalse; - break; - case cryptAES256: - aes256KeyExpansion(&state.aes256, objKey, objKeyLength, gFalse); - memcpy(state.aes256.buf, state.aes256.cbc, 16); // Copy CBC IV to buf - state.aes256.bufIdx = 0; - state.aes256.paddingReached = gFalse; - break; - case cryptNone: - break; - } -} - -int EncryptStream::lookChar() { - Guchar in[16]; - int c; - - if (nextCharBuff != EOF) - return nextCharBuff; - - c = EOF; // make gcc happy - switch (algo) { - case cryptRC4: - if ((c = str->getChar()) != EOF) { - // RC4 is XOR-based: the decryption algorithm works for encryption too - c = rc4DecryptByte(state.rc4.state, &state.rc4.x, &state.rc4.y, (Guchar)c); - } - break; - case cryptAES: - if (state.aes.bufIdx == 16 && !state.aes.paddingReached) { - state.aes.paddingReached = !aesReadBlock(str, in, gTrue); - aesEncryptBlock(&state.aes, in); - } - if (state.aes.bufIdx == 16) { - c = EOF; - } else { - c = state.aes.buf[state.aes.bufIdx++]; - } - break; - case cryptAES256: - if (state.aes256.bufIdx == 16 && !state.aes256.paddingReached) { - state.aes256.paddingReached = !aesReadBlock(str, in, gTrue); - aes256EncryptBlock(&state.aes256, in); - } - if (state.aes256.bufIdx == 16) { - c = EOF; - } else { - c = state.aes256.buf[state.aes256.bufIdx++]; - } - break; - case cryptNone: - break; - } - return (nextCharBuff = c); -} - -//------------------------------------------------------------------------ -// DecryptStream -//------------------------------------------------------------------------ - -DecryptStream::DecryptStream(Stream *strA, Guchar *fileKey, CryptAlgorithm algoA, - int keyLength, int objNum, int objGen): - BaseCryptStream(strA, fileKey, algoA, keyLength, objNum, objGen) -{ -} - -DecryptStream::~DecryptStream() { -} - -void DecryptStream::reset() { - int i; - BaseCryptStream::reset(); - - switch (algo) { - case cryptRC4: - state.rc4.x = state.rc4.y = 0; - rc4InitKey(objKey, objKeyLength, state.rc4.state); - break; - case cryptAES: - aesKeyExpansion(&state.aes, objKey, objKeyLength, gTrue); - for (i = 0; i < 16; ++i) { - state.aes.cbc[i] = str->getChar(); - } - state.aes.bufIdx = 16; - break; - case cryptAES256: - aes256KeyExpansion(&state.aes256, objKey, objKeyLength, gTrue); - for (i = 0; i < 16; ++i) { - state.aes256.cbc[i] = str->getChar(); - } - state.aes256.bufIdx = 16; - break; - case cryptNone: - break; - } -} - -int DecryptStream::lookChar() { - Guchar in[16]; - int c; - - if (nextCharBuff != EOF) - return nextCharBuff; - - c = EOF; // make gcc happy - switch (algo) { - case cryptRC4: - if ((c = str->getChar()) != EOF) { - c = rc4DecryptByte(state.rc4.state, &state.rc4.x, &state.rc4.y, (Guchar)c); - } - break; - case cryptAES: - if (state.aes.bufIdx == 16) { - if (aesReadBlock(str, in, gFalse)) { - aesDecryptBlock(&state.aes, in, str->lookChar() == EOF); - } - } - if (state.aes.bufIdx == 16) { - c = EOF; - } else { - c = state.aes.buf[state.aes.bufIdx++]; - } - break; - case cryptAES256: - if (state.aes256.bufIdx == 16) { - if (aesReadBlock(str, in, gFalse)) { - aes256DecryptBlock(&state.aes256, in, str->lookChar() == EOF); - } - } - if (state.aes256.bufIdx == 16) { - c = EOF; - } else { - c = state.aes256.buf[state.aes256.bufIdx++]; - } - break; - case cryptNone: - break; - } - return (nextCharBuff = c); -} - -//------------------------------------------------------------------------ -// RC4-compatible decryption -//------------------------------------------------------------------------ - -static void rc4InitKey(Guchar *key, int keyLen, Guchar *state) { - Guchar index1, index2; - Guchar t; - int i; - - for (i = 0; i < 256; ++i) - state[i] = i; - - if (unlikely(keyLen == 0)) - return; - - index1 = index2 = 0; - for (i = 0; i < 256; ++i) { - index2 = (key[index1] + state[i] + index2) % 256; - t = state[i]; - state[i] = state[index2]; - state[index2] = t; - index1 = (index1 + 1) % keyLen; - } -} - -static Guchar rc4DecryptByte(Guchar *state, Guchar *x, Guchar *y, Guchar c) { - Guchar x1, y1, tx, ty; - - x1 = *x = (*x + 1) % 256; - y1 = *y = (state[*x] + *y) % 256; - tx = state[x1]; - ty = state[y1]; - state[x1] = ty; - state[y1] = tx; - return c ^ state[(tx + ty) % 256]; -} - -//------------------------------------------------------------------------ -// AES decryption -//------------------------------------------------------------------------ - -// Returns gFalse if EOF was reached, gTrue otherwise -static GBool aesReadBlock(Stream *str, Guchar *in, GBool addPadding) -{ - int c, i; - - for (i = 0; i < 16; ++i) { - if ((c = str->getChar()) != EOF) { - in[i] = (Guchar)c; - } else { - break; - } - } - - if (i == 16) { - return gTrue; - } else { - if (addPadding) { - c = 16 - i; - while (i < 16) { - in[i++] = (Guchar)c; - } - } - return gFalse; - } -} - -static const Guchar sbox[256] = { - 0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76, - 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0, - 0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15, - 0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, 0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75, - 0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0, 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84, - 0x53, 0xd1, 0x00, 0xed, 0x20, 0xfc, 0xb1, 0x5b, 0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf, - 0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d, 0x33, 0x85, 0x45, 0xf9, 0x02, 0x7f, 0x50, 0x3c, 0x9f, 0xa8, - 0x51, 0xa3, 0x40, 0x8f, 0x92, 0x9d, 0x38, 0xf5, 0xbc, 0xb6, 0xda, 0x21, 0x10, 0xff, 0xf3, 0xd2, - 0xcd, 0x0c, 0x13, 0xec, 0x5f, 0x97, 0x44, 0x17, 0xc4, 0xa7, 0x7e, 0x3d, 0x64, 0x5d, 0x19, 0x73, - 0x60, 0x81, 0x4f, 0xdc, 0x22, 0x2a, 0x90, 0x88, 0x46, 0xee, 0xb8, 0x14, 0xde, 0x5e, 0x0b, 0xdb, - 0xe0, 0x32, 0x3a, 0x0a, 0x49, 0x06, 0x24, 0x5c, 0xc2, 0xd3, 0xac, 0x62, 0x91, 0x95, 0xe4, 0x79, - 0xe7, 0xc8, 0x37, 0x6d, 0x8d, 0xd5, 0x4e, 0xa9, 0x6c, 0x56, 0xf4, 0xea, 0x65, 0x7a, 0xae, 0x08, - 0xba, 0x78, 0x25, 0x2e, 0x1c, 0xa6, 0xb4, 0xc6, 0xe8, 0xdd, 0x74, 0x1f, 0x4b, 0xbd, 0x8b, 0x8a, - 0x70, 0x3e, 0xb5, 0x66, 0x48, 0x03, 0xf6, 0x0e, 0x61, 0x35, 0x57, 0xb9, 0x86, 0xc1, 0x1d, 0x9e, - 0xe1, 0xf8, 0x98, 0x11, 0x69, 0xd9, 0x8e, 0x94, 0x9b, 0x1e, 0x87, 0xe9, 0xce, 0x55, 0x28, 0xdf, - 0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16 -}; - -static const Guchar invSbox[256] = { - 0x52, 0x09, 0x6a, 0xd5, 0x30, 0x36, 0xa5, 0x38, 0xbf, 0x40, 0xa3, 0x9e, 0x81, 0xf3, 0xd7, 0xfb, - 0x7c, 0xe3, 0x39, 0x82, 0x9b, 0x2f, 0xff, 0x87, 0x34, 0x8e, 0x43, 0x44, 0xc4, 0xde, 0xe9, 0xcb, - 0x54, 0x7b, 0x94, 0x32, 0xa6, 0xc2, 0x23, 0x3d, 0xee, 0x4c, 0x95, 0x0b, 0x42, 0xfa, 0xc3, 0x4e, - 0x08, 0x2e, 0xa1, 0x66, 0x28, 0xd9, 0x24, 0xb2, 0x76, 0x5b, 0xa2, 0x49, 0x6d, 0x8b, 0xd1, 0x25, - 0x72, 0xf8, 0xf6, 0x64, 0x86, 0x68, 0x98, 0x16, 0xd4, 0xa4, 0x5c, 0xcc, 0x5d, 0x65, 0xb6, 0x92, - 0x6c, 0x70, 0x48, 0x50, 0xfd, 0xed, 0xb9, 0xda, 0x5e, 0x15, 0x46, 0x57, 0xa7, 0x8d, 0x9d, 0x84, - 0x90, 0xd8, 0xab, 0x00, 0x8c, 0xbc, 0xd3, 0x0a, 0xf7, 0xe4, 0x58, 0x05, 0xb8, 0xb3, 0x45, 0x06, - 0xd0, 0x2c, 0x1e, 0x8f, 0xca, 0x3f, 0x0f, 0x02, 0xc1, 0xaf, 0xbd, 0x03, 0x01, 0x13, 0x8a, 0x6b, - 0x3a, 0x91, 0x11, 0x41, 0x4f, 0x67, 0xdc, 0xea, 0x97, 0xf2, 0xcf, 0xce, 0xf0, 0xb4, 0xe6, 0x73, - 0x96, 0xac, 0x74, 0x22, 0xe7, 0xad, 0x35, 0x85, 0xe2, 0xf9, 0x37, 0xe8, 0x1c, 0x75, 0xdf, 0x6e, - 0x47, 0xf1, 0x1a, 0x71, 0x1d, 0x29, 0xc5, 0x89, 0x6f, 0xb7, 0x62, 0x0e, 0xaa, 0x18, 0xbe, 0x1b, - 0xfc, 0x56, 0x3e, 0x4b, 0xc6, 0xd2, 0x79, 0x20, 0x9a, 0xdb, 0xc0, 0xfe, 0x78, 0xcd, 0x5a, 0xf4, - 0x1f, 0xdd, 0xa8, 0x33, 0x88, 0x07, 0xc7, 0x31, 0xb1, 0x12, 0x10, 0x59, 0x27, 0x80, 0xec, 0x5f, - 0x60, 0x51, 0x7f, 0xa9, 0x19, 0xb5, 0x4a, 0x0d, 0x2d, 0xe5, 0x7a, 0x9f, 0x93, 0xc9, 0x9c, 0xef, - 0xa0, 0xe0, 0x3b, 0x4d, 0xae, 0x2a, 0xf5, 0xb0, 0xc8, 0xeb, 0xbb, 0x3c, 0x83, 0x53, 0x99, 0x61, - 0x17, 0x2b, 0x04, 0x7e, 0xba, 0x77, 0xd6, 0x26, 0xe1, 0x69, 0x14, 0x63, 0x55, 0x21, 0x0c, 0x7d -}; - -static const Guint rcon[11] = { - 0x00000000, // unused - 0x01000000, - 0x02000000, - 0x04000000, - 0x08000000, - 0x10000000, - 0x20000000, - 0x40000000, - 0x80000000, - 0x1b000000, - 0x36000000 -}; - -static inline Guint subWord(Guint x) { - return (sbox[x >> 24] << 24) - | (sbox[(x >> 16) & 0xff] << 16) - | (sbox[(x >> 8) & 0xff] << 8) - | sbox[x & 0xff]; -} - -static inline Guint rotWord(Guint x) { - return ((x << 8) & 0xffffffff) | (x >> 24); -} - -static inline void subBytes(Guchar *state) { - int i; - - for (i = 0; i < 16; ++i) { - state[i] = sbox[state[i]]; - } -} - -static inline void invSubBytes(Guchar *state) { - int i; - - for (i = 0; i < 16; ++i) { - state[i] = invSbox[state[i]]; - } -} - -static inline void shiftRows(Guchar *state) { - Guchar t; - - t = state[4]; - state[4] = state[5]; - state[5] = state[6]; - state[6] = state[7]; - state[7] = t; - - t = state[8]; - state[8] = state[10]; - state[10] = t; - t = state[9]; - state[9] = state[11]; - state[11] = t; - - t = state[15]; - state[15] = state[14]; - state[14] = state[13]; - state[13] = state[12]; - state[12] = t; -} - -static inline void invShiftRows(Guchar *state) { - Guchar t; - - t = state[7]; - state[7] = state[6]; - state[6] = state[5]; - state[5] = state[4]; - state[4] = t; - - t = state[8]; - state[8] = state[10]; - state[10] = t; - t = state[9]; - state[9] = state[11]; - state[11] = t; - - t = state[12]; - state[12] = state[13]; - state[13] = state[14]; - state[14] = state[15]; - state[15] = t; -} - -// {02} \cdot s -static inline Guchar mul02(Guchar s) { - return (s & 0x80) ? ((s << 1) ^ 0x1b) : (s << 1); -} - -// {03} \cdot s -static inline Guchar mul03(Guchar s) { - Guchar s2 = (s & 0x80) ? ((s << 1) ^ 0x1b) : (s << 1); - return s ^ s2; -} - -// {09} \cdot s -static inline Guchar mul09(Guchar s) { - Guchar s2, s4, s8; - - s2 = (s & 0x80) ? ((s << 1) ^ 0x1b) : (s << 1); - s4 = (s2 & 0x80) ? ((s2 << 1) ^ 0x1b) : (s2 << 1); - s8 = (s4 & 0x80) ? ((s4 << 1) ^ 0x1b) : (s4 << 1); - return s ^ s8; -} - -// {0b} \cdot s -static inline Guchar mul0b(Guchar s) { - Guchar s2, s4, s8; - - s2 = (s & 0x80) ? ((s << 1) ^ 0x1b) : (s << 1); - s4 = (s2 & 0x80) ? ((s2 << 1) ^ 0x1b) : (s2 << 1); - s8 = (s4 & 0x80) ? ((s4 << 1) ^ 0x1b) : (s4 << 1); - return s ^ s2 ^ s8; -} - -// {0d} \cdot s -static inline Guchar mul0d(Guchar s) { - Guchar s2, s4, s8; - - s2 = (s & 0x80) ? ((s << 1) ^ 0x1b) : (s << 1); - s4 = (s2 & 0x80) ? ((s2 << 1) ^ 0x1b) : (s2 << 1); - s8 = (s4 & 0x80) ? ((s4 << 1) ^ 0x1b) : (s4 << 1); - return s ^ s4 ^ s8; -} - -// {0e} \cdot s -static inline Guchar mul0e(Guchar s) { - Guchar s2, s4, s8; - - s2 = (s & 0x80) ? ((s << 1) ^ 0x1b) : (s << 1); - s4 = (s2 & 0x80) ? ((s2 << 1) ^ 0x1b) : (s2 << 1); - s8 = (s4 & 0x80) ? ((s4 << 1) ^ 0x1b) : (s4 << 1); - return s2 ^ s4 ^ s8; -} - -static inline void mixColumns(Guchar *state) { - int c; - Guchar s0, s1, s2, s3; - - for (c = 0; c < 4; ++c) { - s0 = state[c]; - s1 = state[4+c]; - s2 = state[8+c]; - s3 = state[12+c]; - state[c] = mul02(s0) ^ mul03(s1) ^ s2 ^ s3; - state[4+c] = s0 ^ mul02(s1) ^ mul03(s2) ^ s3; - state[8+c] = s0 ^ s1 ^ mul02(s2) ^ mul03(s3); - state[12+c] = mul03(s0) ^ s1 ^ s2 ^ mul02(s3); - } -} - -static inline void invMixColumns(Guchar *state) { - int c; - Guchar s0, s1, s2, s3; - - for (c = 0; c < 4; ++c) { - s0 = state[c]; - s1 = state[4+c]; - s2 = state[8+c]; - s3 = state[12+c]; - state[c] = mul0e(s0) ^ mul0b(s1) ^ mul0d(s2) ^ mul09(s3); - state[4+c] = mul09(s0) ^ mul0e(s1) ^ mul0b(s2) ^ mul0d(s3); - state[8+c] = mul0d(s0) ^ mul09(s1) ^ mul0e(s2) ^ mul0b(s3); - state[12+c] = mul0b(s0) ^ mul0d(s1) ^ mul09(s2) ^ mul0e(s3); - } -} - -static inline void invMixColumnsW(Guint *w) { - int c; - Guchar s0, s1, s2, s3; - - for (c = 0; c < 4; ++c) { - s0 = w[c] >> 24; - s1 = w[c] >> 16; - s2 = w[c] >> 8; - s3 = w[c]; - w[c] = ((mul0e(s0) ^ mul0b(s1) ^ mul0d(s2) ^ mul09(s3)) << 24) - | ((mul09(s0) ^ mul0e(s1) ^ mul0b(s2) ^ mul0d(s3)) << 16) - | ((mul0d(s0) ^ mul09(s1) ^ mul0e(s2) ^ mul0b(s3)) << 8) - | (mul0b(s0) ^ mul0d(s1) ^ mul09(s2) ^ mul0e(s3)); - } -} - -static inline void addRoundKey(Guchar *state, Guint *w) { - int c; - - for (c = 0; c < 4; ++c) { - state[c] ^= w[c] >> 24; - state[4+c] ^= w[c] >> 16; - state[8+c] ^= w[c] >> 8; - state[12+c] ^= w[c]; - } -} - -static void aesKeyExpansion(DecryptAESState *s, - Guchar *objKey, int /*objKeyLen*/, GBool decrypt) { - Guint temp; - int i, round; - - //~ this assumes objKeyLen == 16 - - for (i = 0; i < 4; ++i) { - s->w[i] = (objKey[4*i] << 24) + (objKey[4*i+1] << 16) + - (objKey[4*i+2] << 8) + objKey[4*i+3]; - } - for (i = 4; i < 44; ++i) { - temp = s->w[i-1]; - if (!(i & 3)) { - temp = subWord(rotWord(temp)) ^ rcon[i/4]; - } - s->w[i] = s->w[i-4] ^ temp; - } - - /* In case of decryption, adjust the key schedule for the equivalent inverse cipher */ - if (decrypt) { - for (round = 1; round <= 9; ++round) { - invMixColumnsW(&s->w[round * 4]); - } - } -} - -static void aesEncryptBlock(DecryptAESState *s, Guchar *in) { - int c, round; - - // initial state (input is xor'd with previous output because of CBC) - for (c = 0; c < 4; ++c) { - s->state[c] = in[4*c] ^ s->buf[4*c]; - s->state[4+c] = in[4*c+1] ^ s->buf[4*c+1]; - s->state[8+c] = in[4*c+2] ^ s->buf[4*c+2]; - s->state[12+c] = in[4*c+3] ^ s->buf[4*c+3]; - } - - // round 0 - addRoundKey(s->state, &s->w[0]); - - // rounds 1-9 - for (round = 1; round <= 9; ++round) { - subBytes(s->state); - shiftRows(s->state); - mixColumns(s->state); - addRoundKey(s->state, &s->w[round * 4]); - } - - // round 10 - subBytes(s->state); - shiftRows(s->state); - addRoundKey(s->state, &s->w[10 * 4]); - - for (c = 0; c < 4; ++c) { - s->buf[4*c] = s->state[c]; - s->buf[4*c+1] = s->state[4+c]; - s->buf[4*c+2] = s->state[8+c]; - s->buf[4*c+3] = s->state[12+c]; - } - - s->bufIdx = 0; -} - -static void aesDecryptBlock(DecryptAESState *s, Guchar *in, GBool last) { - int c, round, n, i; - - // initial state - for (c = 0; c < 4; ++c) { - s->state[c] = in[4*c]; - s->state[4+c] = in[4*c+1]; - s->state[8+c] = in[4*c+2]; - s->state[12+c] = in[4*c+3]; - } - - // round 0 - addRoundKey(s->state, &s->w[10 * 4]); - - // rounds 1-9 - for (round = 9; round >= 1; --round) { - invSubBytes(s->state); - invShiftRows(s->state); - invMixColumns(s->state); - addRoundKey(s->state, &s->w[round * 4]); - } - - // round 10 - invSubBytes(s->state); - invShiftRows(s->state); - addRoundKey(s->state, &s->w[0]); - - // CBC - for (c = 0; c < 4; ++c) { - s->buf[4*c] = s->state[c] ^ s->cbc[4*c]; - s->buf[4*c+1] = s->state[4+c] ^ s->cbc[4*c+1]; - s->buf[4*c+2] = s->state[8+c] ^ s->cbc[4*c+2]; - s->buf[4*c+3] = s->state[12+c] ^ s->cbc[4*c+3]; - } - - // save the input block for the next CBC - for (i = 0; i < 16; ++i) { - s->cbc[i] = in[i]; - } - - // remove padding - s->bufIdx = 0; - if (last) { - n = s->buf[15]; - if (n < 1 || n > 16) { // this should never happen - n = 16; - } - for (i = 15; i >= n; --i) { - s->buf[i] = s->buf[i-n]; - } - s->bufIdx = n; - } -} - -//------------------------------------------------------------------------ -// AES-256 decryption -//------------------------------------------------------------------------ - -static void aes256KeyExpansion(DecryptAES256State *s, - Guchar *objKey, int objKeyLen, GBool decrypt) { - Guint temp; - int i, round; - - //~ this assumes objKeyLen == 32 - - for (i = 0; i < 8; ++i) { - s->w[i] = (objKey[4*i] << 24) + (objKey[4*i+1] << 16) + - (objKey[4*i+2] << 8) + objKey[4*i+3]; - } - for (i = 8; i < 60; ++i) { - temp = s->w[i-1]; - if ((i & 7) == 0) { - temp = subWord(rotWord(temp)) ^ rcon[i/8]; - } else if ((i & 7) == 4) { - temp = subWord(temp); - } - s->w[i] = s->w[i-8] ^ temp; - } - - /* In case of decryption, adjust the key schedule for the equivalent inverse cipher */ - if (decrypt) { - for (round = 1; round <= 13; ++round) { - invMixColumnsW(&s->w[round * 4]); - } - } -} - -static void aes256EncryptBlock(DecryptAES256State *s, Guchar *in) { - int c, round; - - // initial state (input is xor'd with previous output because of CBC) - for (c = 0; c < 4; ++c) { - s->state[c] = in[4*c] ^ s->buf[4*c]; - s->state[4+c] = in[4*c+1] ^ s->buf[4*c+1]; - s->state[8+c] = in[4*c+2] ^ s->buf[4*c+2]; - s->state[12+c] = in[4*c+3] ^ s->buf[4*c+3]; - } - - // round 0 - addRoundKey(s->state, &s->w[0]); - - // rounds 1-13 - for (round = 1; round <= 13; ++round) { - subBytes(s->state); - shiftRows(s->state); - mixColumns(s->state); - addRoundKey(s->state, &s->w[round * 4]); - } - - // round 14 - subBytes(s->state); - shiftRows(s->state); - addRoundKey(s->state, &s->w[14 * 4]); - - for (c = 0; c < 4; ++c) { - s->buf[4*c] = s->state[c]; - s->buf[4*c+1] = s->state[4+c]; - s->buf[4*c+2] = s->state[8+c]; - s->buf[4*c+3] = s->state[12+c]; - } - - s->bufIdx = 0; -} - -static void aes256DecryptBlock(DecryptAES256State *s, Guchar *in, GBool last) { - int c, round, n, i; - - // initial state - for (c = 0; c < 4; ++c) { - s->state[c] = in[4*c]; - s->state[4+c] = in[4*c+1]; - s->state[8+c] = in[4*c+2]; - s->state[12+c] = in[4*c+3]; - } - - // round 0 - addRoundKey(s->state, &s->w[14 * 4]); - - // rounds 13-1 - for (round = 13; round >= 1; --round) { - invSubBytes(s->state); - invShiftRows(s->state); - invMixColumns(s->state); - addRoundKey(s->state, &s->w[round * 4]); - } - - // round 14 - invSubBytes(s->state); - invShiftRows(s->state); - addRoundKey(s->state, &s->w[0]); - - // CBC - for (c = 0; c < 4; ++c) { - s->buf[4*c] = s->state[c] ^ s->cbc[4*c]; - s->buf[4*c+1] = s->state[4+c] ^ s->cbc[4*c+1]; - s->buf[4*c+2] = s->state[8+c] ^ s->cbc[4*c+2]; - s->buf[4*c+3] = s->state[12+c] ^ s->cbc[4*c+3]; - } - - // save the input block for the next CBC - for (i = 0; i < 16; ++i) { - s->cbc[i] = in[i]; - } - - // remove padding - s->bufIdx = 0; - if (last) { - n = s->buf[15]; - if (n < 1 || n > 16) { // this should never happen - n = 16; - } - for (i = 15; i >= n; --i) { - s->buf[i] = s->buf[i-n]; - } - s->bufIdx = n; - if (n > 16) - { - error(errSyntaxError, -1, "Reducing bufIdx from {0:d} to 16 to not crash", n); - s->bufIdx = 16; - } - } -} - -//------------------------------------------------------------------------ -// MD5 message digest -//------------------------------------------------------------------------ - -// this works around a bug in older Sun compilers -static inline Gulong rotateLeft(Gulong x, int r) { - x &= 0xffffffff; - return ((x << r) | (x >> (32 - r))) & 0xffffffff; -} - -static inline Gulong md5Round1(Gulong a, Gulong b, Gulong c, Gulong d, - Gulong Xk, Gulong s, Gulong Ti) { - return b + rotateLeft((a + ((b & c) | (~b & d)) + Xk + Ti), s); -} - -static inline Gulong md5Round2(Gulong a, Gulong b, Gulong c, Gulong d, - Gulong Xk, Gulong s, Gulong Ti) { - return b + rotateLeft((a + ((b & d) | (c & ~d)) + Xk + Ti), s); -} - -static inline Gulong md5Round3(Gulong a, Gulong b, Gulong c, Gulong d, - Gulong Xk, Gulong s, Gulong Ti) { - return b + rotateLeft((a + (b ^ c ^ d) + Xk + Ti), s); -} - -static inline Gulong md5Round4(Gulong a, Gulong b, Gulong c, Gulong d, - Gulong Xk, Gulong s, Gulong Ti) { - return b + rotateLeft((a + (c ^ (b | ~d)) + Xk + Ti), s); -} - -void md5(Guchar *msg, int msgLen, Guchar *digest) { - Gulong x[16] = {}; - Gulong a, b, c, d, aa, bb, cc, dd; - int n64; - int i, j, k; - - // sanity check - if (msgLen < 0) { - return; - } - - // compute number of 64-byte blocks - // (length + pad byte (0x80) + 8 bytes for length) - n64 = (msgLen + 1 + 8 + 63) / 64; - - // initialize a, b, c, d - a = 0x67452301; - b = 0xefcdab89; - c = 0x98badcfe; - d = 0x10325476; - - // loop through blocks - k = 0; - for (i = 0; i < n64; ++i) { - - // grab a 64-byte block - for (j = 0; j < 16 && k < msgLen - 3; ++j, k += 4) - x[j] = (((((msg[k+3] << 8) + msg[k+2]) << 8) + msg[k+1]) << 8) + msg[k]; - if (i == n64 - 1) { - if (k == msgLen - 3) - x[j] = 0x80000000 + (((msg[k+2] << 8) + msg[k+1]) << 8) + msg[k]; - else if (k == msgLen - 2) - x[j] = 0x800000 + (msg[k+1] << 8) + msg[k]; - else if (k == msgLen - 1) - x[j] = 0x8000 + msg[k]; - else - x[j] = 0x80; - ++j; - while (j < 16) - x[j++] = 0; - x[14] = msgLen << 3; - } - - // save a, b, c, d - aa = a; - bb = b; - cc = c; - dd = d; - - // round 1 - a = md5Round1(a, b, c, d, x[0], 7, 0xd76aa478); - d = md5Round1(d, a, b, c, x[1], 12, 0xe8c7b756); - c = md5Round1(c, d, a, b, x[2], 17, 0x242070db); - b = md5Round1(b, c, d, a, x[3], 22, 0xc1bdceee); - a = md5Round1(a, b, c, d, x[4], 7, 0xf57c0faf); - d = md5Round1(d, a, b, c, x[5], 12, 0x4787c62a); - c = md5Round1(c, d, a, b, x[6], 17, 0xa8304613); - b = md5Round1(b, c, d, a, x[7], 22, 0xfd469501); - a = md5Round1(a, b, c, d, x[8], 7, 0x698098d8); - d = md5Round1(d, a, b, c, x[9], 12, 0x8b44f7af); - c = md5Round1(c, d, a, b, x[10], 17, 0xffff5bb1); - b = md5Round1(b, c, d, a, x[11], 22, 0x895cd7be); - a = md5Round1(a, b, c, d, x[12], 7, 0x6b901122); - d = md5Round1(d, a, b, c, x[13], 12, 0xfd987193); - c = md5Round1(c, d, a, b, x[14], 17, 0xa679438e); - b = md5Round1(b, c, d, a, x[15], 22, 0x49b40821); - - // round 2 - a = md5Round2(a, b, c, d, x[1], 5, 0xf61e2562); - d = md5Round2(d, a, b, c, x[6], 9, 0xc040b340); - c = md5Round2(c, d, a, b, x[11], 14, 0x265e5a51); - b = md5Round2(b, c, d, a, x[0], 20, 0xe9b6c7aa); - a = md5Round2(a, b, c, d, x[5], 5, 0xd62f105d); - d = md5Round2(d, a, b, c, x[10], 9, 0x02441453); - c = md5Round2(c, d, a, b, x[15], 14, 0xd8a1e681); - b = md5Round2(b, c, d, a, x[4], 20, 0xe7d3fbc8); - a = md5Round2(a, b, c, d, x[9], 5, 0x21e1cde6); - d = md5Round2(d, a, b, c, x[14], 9, 0xc33707d6); - c = md5Round2(c, d, a, b, x[3], 14, 0xf4d50d87); - b = md5Round2(b, c, d, a, x[8], 20, 0x455a14ed); - a = md5Round2(a, b, c, d, x[13], 5, 0xa9e3e905); - d = md5Round2(d, a, b, c, x[2], 9, 0xfcefa3f8); - c = md5Round2(c, d, a, b, x[7], 14, 0x676f02d9); - b = md5Round2(b, c, d, a, x[12], 20, 0x8d2a4c8a); - - // round 3 - a = md5Round3(a, b, c, d, x[5], 4, 0xfffa3942); - d = md5Round3(d, a, b, c, x[8], 11, 0x8771f681); - c = md5Round3(c, d, a, b, x[11], 16, 0x6d9d6122); - b = md5Round3(b, c, d, a, x[14], 23, 0xfde5380c); - a = md5Round3(a, b, c, d, x[1], 4, 0xa4beea44); - d = md5Round3(d, a, b, c, x[4], 11, 0x4bdecfa9); - c = md5Round3(c, d, a, b, x[7], 16, 0xf6bb4b60); - b = md5Round3(b, c, d, a, x[10], 23, 0xbebfbc70); - a = md5Round3(a, b, c, d, x[13], 4, 0x289b7ec6); - d = md5Round3(d, a, b, c, x[0], 11, 0xeaa127fa); - c = md5Round3(c, d, a, b, x[3], 16, 0xd4ef3085); - b = md5Round3(b, c, d, a, x[6], 23, 0x04881d05); - a = md5Round3(a, b, c, d, x[9], 4, 0xd9d4d039); - d = md5Round3(d, a, b, c, x[12], 11, 0xe6db99e5); - c = md5Round3(c, d, a, b, x[15], 16, 0x1fa27cf8); - b = md5Round3(b, c, d, a, x[2], 23, 0xc4ac5665); - - // round 4 - a = md5Round4(a, b, c, d, x[0], 6, 0xf4292244); - d = md5Round4(d, a, b, c, x[7], 10, 0x432aff97); - c = md5Round4(c, d, a, b, x[14], 15, 0xab9423a7); - b = md5Round4(b, c, d, a, x[5], 21, 0xfc93a039); - a = md5Round4(a, b, c, d, x[12], 6, 0x655b59c3); - d = md5Round4(d, a, b, c, x[3], 10, 0x8f0ccc92); - c = md5Round4(c, d, a, b, x[10], 15, 0xffeff47d); - b = md5Round4(b, c, d, a, x[1], 21, 0x85845dd1); - a = md5Round4(a, b, c, d, x[8], 6, 0x6fa87e4f); - d = md5Round4(d, a, b, c, x[15], 10, 0xfe2ce6e0); - c = md5Round4(c, d, a, b, x[6], 15, 0xa3014314); - b = md5Round4(b, c, d, a, x[13], 21, 0x4e0811a1); - a = md5Round4(a, b, c, d, x[4], 6, 0xf7537e82); - d = md5Round4(d, a, b, c, x[11], 10, 0xbd3af235); - c = md5Round4(c, d, a, b, x[2], 15, 0x2ad7d2bb); - b = md5Round4(b, c, d, a, x[9], 21, 0xeb86d391); - - // increment a, b, c, d - a += aa; - b += bb; - c += cc; - d += dd; - } - - // break digest into bytes - digest[0] = (Guchar)(a & 0xff); - digest[1] = (Guchar)((a >>= 8) & 0xff); - digest[2] = (Guchar)((a >>= 8) & 0xff); - digest[3] = (Guchar)((a >>= 8) & 0xff); - digest[4] = (Guchar)(b & 0xff); - digest[5] = (Guchar)((b >>= 8) & 0xff); - digest[6] = (Guchar)((b >>= 8) & 0xff); - digest[7] = (Guchar)((b >>= 8) & 0xff); - digest[8] = (Guchar)(c & 0xff); - digest[9] = (Guchar)((c >>= 8) & 0xff); - digest[10] = (Guchar)((c >>= 8) & 0xff); - digest[11] = (Guchar)((c >>= 8) & 0xff); - digest[12] = (Guchar)(d & 0xff); - digest[13] = (Guchar)((d >>= 8) & 0xff); - digest[14] = (Guchar)((d >>= 8) & 0xff); - digest[15] = (Guchar)((d >>= 8) & 0xff); -} - -//------------------------------------------------------------------------ -// SHA-256 hash -//------------------------------------------------------------------------ - -static Guint sha256K[64] = { - 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, - 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, - 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, - 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, - 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, - 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, - 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, - 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, - 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, - 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, - 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, - 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, - 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, - 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, - 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, - 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 -}; - -static inline Guint rotr(Guint x, Guint n) { - return (x >> n) | (x << (32 - n)); -} - -static inline Guint sha256Ch(Guint x, Guint y, Guint z) { - return (x & y) ^ (~x & z); -} - -static inline Guint sha256Maj(Guint x, Guint y, Guint z) { - return (x & y) ^ (x & z) ^ (y & z); -} - -static inline Guint sha256Sigma0(Guint x) { - return rotr(x, 2) ^ rotr(x, 13) ^ rotr(x, 22); -} - -static inline Guint sha256Sigma1(Guint x) { - return rotr(x, 6) ^ rotr(x, 11) ^ rotr(x, 25); -} - -static inline Guint sha256sigma0(Guint x) { - return rotr(x, 7) ^ rotr(x, 18) ^ (x >> 3); -} - -static inline Guint sha256sigma1(Guint x) { - return rotr(x, 17) ^ rotr(x, 19) ^ (x >> 10); -} - -static void sha256HashBlock(Guchar *blk, Guint *H) { - Guint W[64]; - Guint a, b, c, d, e, f, g, h; - Guint T1, T2; - Guint t; - - // 1. prepare the message schedule - for (t = 0; t < 16; ++t) { - W[t] = (blk[t*4] << 24) | - (blk[t*4 + 1] << 16) | - (blk[t*4 + 2] << 8) | - blk[t*4 + 3]; - } - for (t = 16; t < 64; ++t) { - W[t] = sha256sigma1(W[t-2]) + W[t-7] + sha256sigma0(W[t-15]) + W[t-16]; - } - - // 2. initialize the eight working variables - a = H[0]; - b = H[1]; - c = H[2]; - d = H[3]; - e = H[4]; - f = H[5]; - g = H[6]; - h = H[7]; - - // 3. - for (t = 0; t < 64; ++t) { - T1 = h + sha256Sigma1(e) + sha256Ch(e,f,g) + sha256K[t] + W[t]; - T2 = sha256Sigma0(a) + sha256Maj(a,b,c); - h = g; - g = f; - f = e; - e = d + T1; - d = c; - c = b; - b = a; - a = T1 + T2; - } - - // 4. compute the intermediate hash value - H[0] += a; - H[1] += b; - H[2] += c; - H[3] += d; - H[4] += e; - H[5] += f; - H[6] += g; - H[7] += h; -} - -static void sha256(Guchar *msg, int msgLen, Guchar *hash) { - Guchar blk[64]; - Guint H[8]; - int blkLen, i; - - H[0] = 0x6a09e667; - H[1] = 0xbb67ae85; - H[2] = 0x3c6ef372; - H[3] = 0xa54ff53a; - H[4] = 0x510e527f; - H[5] = 0x9b05688c; - H[6] = 0x1f83d9ab; - H[7] = 0x5be0cd19; - - blkLen = 0; - for (i = 0; i + 64 <= msgLen; i += 64) { - sha256HashBlock(msg + i, H); - } - blkLen = msgLen - i; - if (blkLen > 0) { - memcpy(blk, msg + i, blkLen); - } - - // pad the message - blk[blkLen++] = 0x80; - if (blkLen > 56) { - while (blkLen < 64) { - blk[blkLen++] = 0; - } - sha256HashBlock(blk, H); - blkLen = 0; - } - while (blkLen < 56) { - blk[blkLen++] = 0; - } - blk[56] = 0; - blk[57] = 0; - blk[58] = 0; - blk[59] = 0; - blk[60] = (Guchar)(msgLen >> 21); - blk[61] = (Guchar)(msgLen >> 13); - blk[62] = (Guchar)(msgLen >> 5); - blk[63] = (Guchar)(msgLen << 3); - sha256HashBlock(blk, H); - - // copy the output into the buffer (convert words to bytes) - for (i = 0; i < 8; ++i) { - hash[i*4] = (Guchar)(H[i] >> 24); - hash[i*4 + 1] = (Guchar)(H[i] >> 16); - hash[i*4 + 2] = (Guchar)(H[i] >> 8); - hash[i*4 + 3] = (Guchar)H[i]; - } -} -//------------------------------------------------------------------------ -// SHA-512 hash (see FIPS 180-4) -//------------------------------------------------------------------------ -// SHA 384 and SHA 512 use the same sequence of eighty constant 64 bit words. -static const uint64_t shaK[80] = { - 0x428a2f98d728ae22ull, 0x7137449123ef65cdull, 0xb5c0fbcfec4d3b2full, 0xe9b5dba58189dbbcull, 0x3956c25bf348b538ull, - 0x59f111f1b605d019ull, 0x923f82a4af194f9bull, 0xab1c5ed5da6d8118ull, 0xd807aa98a3030242ull, 0x12835b0145706fbeull, - 0x243185be4ee4b28cull, 0x550c7dc3d5ffb4e2ull, 0x72be5d74f27b896full, 0x80deb1fe3b1696b1ull, 0x9bdc06a725c71235ull, - 0xc19bf174cf692694ull, 0xe49b69c19ef14ad2ull, 0xefbe4786384f25e3ull, 0x0fc19dc68b8cd5b5ull, 0x240ca1cc77ac9c65ull, - 0x2de92c6f592b0275ull, 0x4a7484aa6ea6e483ull, 0x5cb0a9dcbd41fbd4ull, 0x76f988da831153b5ull, 0x983e5152ee66dfabull, - 0xa831c66d2db43210ull, 0xb00327c898fb213full, 0xbf597fc7beef0ee4ull, 0xc6e00bf33da88fc2ull, 0xd5a79147930aa725ull, - 0x06ca6351e003826full, 0x142929670a0e6e70ull, 0x27b70a8546d22ffcull, 0x2e1b21385c26c926ull, 0x4d2c6dfc5ac42aedull, - 0x53380d139d95b3dfull, 0x650a73548baf63deull, 0x766a0abb3c77b2a8ull, 0x81c2c92e47edaee6ull, 0x92722c851482353bull, - 0xa2bfe8a14cf10364ull, 0xa81a664bbc423001ull, 0xc24b8b70d0f89791ull, 0xc76c51a30654be30ull, 0xd192e819d6ef5218ull, - 0xd69906245565a910ull, 0xf40e35855771202aull, 0x106aa07032bbd1b8ull, 0x19a4c116b8d2d0c8ull, 0x1e376c085141ab53ull, - 0x2748774cdf8eeb99ull, 0x34b0bcb5e19b48a8ull, 0x391c0cb3c5c95a63ull, 0x4ed8aa4ae3418acbull, 0x5b9cca4f7763e373ull, - 0x682e6ff3d6b2b8a3ull, 0x748f82ee5defb2fcull, 0x78a5636f43172f60ull, 0x84c87814a1f0ab72ull, 0x8cc702081a6439ecull, - 0x90befffa23631e28ull, 0xa4506cebde82bde9ull, 0xbef9a3f7b2c67915ull, 0xc67178f2e372532bull, 0xca273eceea26619cull, - 0xd186b8c721c0c207ull, 0xeada7dd6cde0eb1eull, 0xf57d4f7fee6ed178ull, 0x06f067aa72176fbaull, 0x0a637dc5a2c898a6ull, - 0x113f9804bef90daeull, 0x1b710b35131c471bull, 0x28db77f523047d84ull, 0x32caab7b40c72493ull, 0x3c9ebe0a15c9bebcull, - 0x431d67c49c100d4cull, 0x4cc5d4becb3e42b6ull, 0x597f299cfc657e2aull, 0x5fcb6fab3ad6faecull, 0x6c44198c4a475817ull -}; - -static inline uint64_t rotr(uint64_t x, uint64_t n) { - return (x >> n) | (x << (64 - n)); -} -static inline uint64_t rotl(uint64_t x, uint64_t n){ - return (x << n) | (x >> (64 - n)); -} -static inline uint64_t sha512Ch(uint64_t x, uint64_t y, uint64_t z) { - return (x & y) ^ (~x & z); -} -static inline uint64_t sha512Maj(uint64_t x, uint64_t y, uint64_t z) { - return (x & y) ^ (x & z) ^ (y & z); -} -static inline uint64_t sha512Sigma0(uint64_t x) { - return rotr(x, 28) ^ rotr(x, 34) ^ rotr(x, 39); -} -static inline uint64_t sha512Sigma1(uint64_t x) { - return rotr(x, 14) ^ rotr(x, 18) ^ rotr(x, 41); -} -static inline uint64_t sha512sigma0(uint64_t x) { - return rotr(x, 1) ^ rotr(x, 8) ^ (x >> 7); -} -static inline uint64_t sha512sigma1(uint64_t x) { - return rotr(x, 19) ^ rotr(x, 61) ^ (x >> 6); -} - -static void sha512HashBlock(Guchar *blk, uint64_t *H) { - uint64_t W[80]; - uint64_t a, b, c, d, e, f, g, h; - uint64_t T1, T2; - Guint t; - - // 1. prepare the message schedule - for (t = 0; t < 16; ++t) { - W[t] = (((uint64_t)blk[t*8] << 56) | - ((uint64_t)blk[t*8 + 1] << 48) | - ((uint64_t)blk[t*8 + 2] << 40) | - ((uint64_t)blk[t*8 + 3] << 32) | - ((uint64_t)blk[t*8 + 4] << 24) | - ((uint64_t)blk[t*8 + 5] << 16) | - ((uint64_t)blk[t*8 + 6] << 8 ) | - ((uint64_t)blk[t*8 + 7])); - } - for (t = 16; t < 80; ++t) { - W[t] = sha512sigma1(W[t-2]) + W[t-7] + sha512sigma0(W[t-15]) + W[t-16]; - } - - // 2. initialize the eight working variables - a = H[0]; - b = H[1]; - c = H[2]; - d = H[3]; - e = H[4]; - f = H[5]; - g = H[6]; - h = H[7]; - - // 3. - for (t = 0; t < 80; ++t) { - T1 = h + sha512Sigma1(e) + sha512Ch(e,f,g) + shaK[t] + W[t]; - T2 = sha512Sigma0(a) + sha512Maj(a,b,c); - h = g; - g = f; - f = e; - e = d + T1; - d = c; - c = b; - b = a; - a = T1 + T2; - } - - // 4. compute the intermediate hash value - H[0] += a; - H[1] += b; - H[2] += c; - H[3] += d; - H[4] += e; - H[5] += f; - H[6] += g; - H[7] += h; -} - -static void sha512(Guchar *msg, int msgLen, Guchar *hash) { - Guchar blk[128]; - uint64_t H[8]; - int blkLen = 0, i; - // setting the initial hash value. - H[0] = 0x6a09e667f3bcc908ull; - H[1] = 0xbb67ae8584caa73bull; - H[2] = 0x3c6ef372fe94f82bull; - H[3] = 0xa54ff53a5f1d36f1ull; - H[4] = 0x510e527fade682d1ull; - H[5] = 0x9b05688c2b3e6c1full; - H[6] = 0x1f83d9abfb41bd6bull; - H[7] = 0x5be0cd19137e2179ull; - - for (i = 0; i + 128 <= msgLen; i += 128) { - sha512HashBlock(msg + i, H); - } - blkLen = msgLen - i; - if (blkLen > 0) { - memcpy(blk, msg + i, blkLen); - } - - // pad the message - blk[blkLen++] = 0x80; - if (blkLen > 112) { - while (blkLen < 128) { - blk[blkLen++] = 0; - } - sha512HashBlock(blk, H); - blkLen = 0; - } - while (blkLen < 112) { - blk[blkLen++] = 0; - } - blk[112] = 0; - blk[113] = 0; - blk[114] = 0; - blk[115] = 0; - blk[116] = 0; - blk[117] = 0; - blk[118] = 0; - blk[119] = 0; - blk[120] = 0; - blk[121] = 0; - blk[122] = 0; - blk[123] = 0; - blk[124] = (Guchar)(msgLen >> 21); - blk[125] = (Guchar)(msgLen >> 13); - blk[126] = (Guchar)(msgLen >> 5); - blk[127] = (Guchar)(msgLen << 3); - - sha512HashBlock(blk, H); - - // copy the output into the buffer (convert words to bytes) - for (i = 0; i < 8; ++i) { - hash[i*8] = (Guchar)(H[i] >> 56); - hash[i*8 + 1] = (Guchar)(H[i] >> 48); - hash[i*8 + 2] = (Guchar)(H[i] >> 40); - hash[i*8 + 3] = (Guchar)(H[i] >> 32); - hash[i*8 + 4] = (Guchar)(H[i] >> 24); - hash[i*8 + 5] = (Guchar)(H[i] >> 16); - hash[i*8 + 6] = (Guchar)(H[i] >> 8); - hash[i*8 + 7] = (Guchar)H[i]; - } -} - -//------------------------------------------------------------------------ -// SHA-384 (see FIPS 180-4) -//------------------------------------------------------------------------ -//The algorithm is defined in the exact same manner as SHA 512 with 2 exceptions -//1.Initial hash value is different. -//2.A 384 bit message digest is obtained by truncating the final hash value. -static void sha384(Guchar *msg, int msgLen, Guchar *hash) { - Guchar blk[128]; - uint64_t H[8]; - int blkLen, i; -//setting initial hash values - H[0] = 0xcbbb9d5dc1059ed8ull; - H[1] = 0x629a292a367cd507ull; - H[2] = 0x9159015a3070dd17ull; - H[3] = 0x152fecd8f70e5939ull; - H[4] = 0x67332667ffc00b31ull; - H[5] = 0x8eb44a8768581511ull; - H[6] = 0xdb0c2e0d64f98fa7ull; - H[7] = 0x47b5481dbefa4fa4ull; -//SHA 384 will use the same sha512HashBlock function. - blkLen = 0; - for (i = 0; i + 128 <= msgLen; i += 128) { - sha512HashBlock(msg + i, H); - } - blkLen = msgLen - i; - if (blkLen > 0) { - memcpy(blk, msg + i, blkLen); - } - - // pad the message - blk[blkLen++] = 0x80; - if (blkLen > 112) { - while (blkLen < 128) { - blk[blkLen++] = 0; - } - sha512HashBlock(blk, H); - blkLen = 0; - } - while (blkLen < 112) { - blk[blkLen++] = 0; - } - blk[112] = 0; - blk[113] = 0; - blk[114] = 0; - blk[115] = 0; - blk[116] = 0; - blk[117] = 0; - blk[118] = 0; - blk[119] = 0; - blk[120] = 0; - blk[121] = 0; - blk[122] = 0; - blk[123] = 0; - blk[124] = (Guchar)(msgLen >> 21); - blk[125] = (Guchar)(msgLen >> 13); - blk[126] = (Guchar)(msgLen >> 5); - blk[127] = (Guchar)(msgLen << 3); - - sha512HashBlock(blk, H); - - // copy the output into the buffer (convert words to bytes) - // hash is truncated to 384 bits. - for (i = 0; i < 6; ++i) { - hash[i*8] = (Guchar)(H[i] >> 56); - hash[i*8 + 1] = (Guchar)(H[i] >> 48); - hash[i*8 + 2] = (Guchar)(H[i] >> 40); - hash[i*8 + 3] = (Guchar)(H[i] >> 32); - hash[i*8 + 4] = (Guchar)(H[i] >> 24); - hash[i*8 + 5] = (Guchar)(H[i] >> 16); - hash[i*8 + 6] = (Guchar)(H[i] >> 8); - hash[i*8 + 7] = (Guchar)H[i]; - } -} - -//------------------------------------------------------------------------ -// Section 7.6.3.3 (Encryption Key algorithm) of ISO/DIS 32000-2 -// Algorithm 2.B:Computing a hash (for revision 6). -//------------------------------------------------------------------------ -static void revision6Hash(GooString *inputPassword, Guchar *K, char *userKey) { - Guchar K1[64*(127+64+48)]; - Guchar E[64*(127+64+48)]; - DecryptAESState state; - Guchar aesKey[16]; - Guchar BE16byteNumber[16]; - - int inputPasswordLength = inputPassword->getLength(); - int KLength = 32; - int userKeyLength = 0; - if (userKey) { - userKeyLength = 48; - } - int sequenceLength; - int totalLength; - int rounds = 0; - - while(rounds < 64 || rounds < E[totalLength-1] + 32 ) { - sequenceLength = inputPasswordLength + KLength + userKeyLength; - totalLength = 64 * sequenceLength; - //a.make the string K1 - memcpy(K1, inputPassword, inputPasswordLength); - memcpy(K1 + inputPasswordLength, K , KLength); - memcpy(K1 + inputPasswordLength + KLength, userKey, userKeyLength); - for(int i = 1; i < 64 ; ++i) { - memcpy(K1 + (i * sequenceLength),K1,sequenceLength); - } - //b.Encrypt K1 - memcpy(aesKey,K,16); - memcpy(state.cbc,K + 16,16); - memcpy(state.buf, state.cbc, 16); // Copy CBC IV to buf - state.bufIdx = 0; - state.paddingReached = gFalse; - aesKeyExpansion(&state,aesKey,16,gFalse); - - for(int i = 0; i < (4 * sequenceLength); i++) { - aesEncryptBlock(&state,K1 + (16 * i)); - memcpy(E +(16 * i),state.buf,16); - } - memcpy(BE16byteNumber,E,16); - //c.Taking the first 16 Bytes of E as unsigned big-endian integer, - //compute the remainder,modulo 3. - uint64_t N1 = 0,N2 = 0,N3 = 0; - // N1 contains first 8 bytes of BE16byteNumber - N1 = ((uint64_t)BE16byteNumber[0] << 56 | (uint64_t)BE16byteNumber[1] << 48 - |(uint64_t)BE16byteNumber[2] << 40 | (uint64_t)BE16byteNumber[3] << 32 - |(uint64_t)BE16byteNumber[4] << 24 | (uint64_t)BE16byteNumber[5] << 16 - |(uint64_t)BE16byteNumber[6] << 8 | (uint64_t)BE16byteNumber[7] ); - uint64_t rem = N1 % 3 ; - // N2 conatains 0s in higer 4 bytes and 9th to 12 th bytes of BE16byteNumber in lower 4 bytes. - N2 = ((uint64_t)BE16byteNumber[8] << 24 | (uint64_t)BE16byteNumber[9] << 16 - |(uint64_t)BE16byteNumber[10] << 8 | (uint64_t)BE16byteNumber[11] ); - rem = ((rem << 32 ) | N2) % 3 ; - // N3 conatains 0s in higer 4 bytes and 13th to 16th bytes of BE16byteNumber in lower 4 bytes. - N3 = ((uint64_t)BE16byteNumber[12] << 24 | (uint64_t)BE16byteNumber[13] << 16 - |(uint64_t)BE16byteNumber[14] << 8 | (uint64_t)BE16byteNumber[15] ); - rem = ((rem << 32 ) | N3) % 3 ; - - //d.If remainder is 0 perform SHA-256 - if(rem == 0) { - KLength = 32; - sha256(E, totalLength, K); - } - // remainder is 1 perform SHA-384 - else if(rem == 1) { - KLength = 48; - sha384(E, totalLength, K); - } - // remainder is 2 perform SHA-512 - else if(rem == 2) { - KLength = 64; - sha512(E, totalLength, K); - } - rounds++; - } - // the first 32 bytes of the final K are the output of the function. -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/Decrypt.h b/Build/source/libs/poppler/poppler-src/poppler/Decrypt.h deleted file mode 100644 index 61b0b453a24..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/Decrypt.h +++ /dev/null @@ -1,161 +0,0 @@ -//======================================================================== -// -// Decrypt.h -// -// Copyright 1996-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2008 Julien Rebetez <julien@fhtagn.net> -// Copyright (C) 2009 David Benjamin <davidben@mit.edu> -// Copyright (C) 2012 Fabio D'Urso <fabiodurso@hotmail.it> -// Copyright (C) 2013 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2013 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2013 Thomas Freitag <Thomas.Freitag@alfa.de> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef DECRYPT_H -#define DECRYPT_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "goo/gtypes.h" -#include "goo/GooString.h" -#include "Object.h" -#include "Stream.h" - -//------------------------------------------------------------------------ -// Decrypt -//------------------------------------------------------------------------ - -class Decrypt { -public: - - // Generate a file key. The <fileKey> buffer must have space for at - // least 16 bytes. Checks <ownerPassword> and then <userPassword> - // and returns true if either is correct. Sets <ownerPasswordOk> if - // the owner password was correct. Either or both of the passwords - // may be NULL, which is treated as an empty string. - static GBool makeFileKey(int encVersion, int encRevision, int keyLength, - GooString *ownerKey, GooString *userKey, - GooString *ownerEnc, GooString *userEnc, - int permissions, GooString *fileID, - GooString *ownerPassword, GooString *userPassword, - Guchar *fileKey, GBool encryptMetadata, - GBool *ownerPasswordOk); - -private: - - static GBool makeFileKey2(int encVersion, int encRevision, int keyLength, - GooString *ownerKey, GooString *userKey, - int permissions, GooString *fileID, - GooString *userPassword, Guchar *fileKey, - GBool encryptMetadata); -}; - -//------------------------------------------------------------------------ -// Helper classes -//------------------------------------------------------------------------ - -/* DecryptRC4State, DecryptAESState, DecryptAES256State are named like this for - * historical reasons, but they're used for encryption too. - * In case of decryption, the cbc field in AES and AES-256 contains the previous - * input block or the CBC initialization vector (IV) if the stream has just been - * reset). In case of encryption, it always contains the IV, whereas the - * previous output is kept in buf. The paddingReached field is only used in - * case of encryption. */ -struct DecryptRC4State { - Guchar state[256]; - Guchar x, y; -}; - -struct DecryptAESState { - Guint w[44]; - Guchar state[16]; - Guchar cbc[16]; - Guchar buf[16]; - GBool paddingReached; // encryption only - int bufIdx; -}; - -struct DecryptAES256State { - Guint w[60]; - Guchar state[16]; - Guchar cbc[16]; - Guchar buf[16]; - GBool paddingReached; // encryption only - int bufIdx; -}; - -class BaseCryptStream : public FilterStream { -public: - - BaseCryptStream(Stream *strA, Guchar *fileKey, CryptAlgorithm algoA, - int keyLength, int objNum, int objGen); - ~BaseCryptStream(); - StreamKind getKind() override { return strCrypt; } - void reset() override; - int getChar() override; - int lookChar() override = 0; - Goffset getPos() override; - GBool isBinary(GBool last) override; - Stream *getUndecodedStream() override { return this; } - void setAutoDelete(GBool val); - -protected: - CryptAlgorithm algo; - int objKeyLength; - Guchar objKey[32]; - Goffset charactersRead; // so that getPos() can be correct - int nextCharBuff; // EOF means not read yet - GBool autoDelete; - - union { - DecryptRC4State rc4; - DecryptAESState aes; - DecryptAES256State aes256; - } state; -}; - -//------------------------------------------------------------------------ -// EncryptStream / DecryptStream -//------------------------------------------------------------------------ - -class EncryptStream : public BaseCryptStream { -public: - - EncryptStream(Stream *strA, Guchar *fileKey, CryptAlgorithm algoA, - int keyLength, int objNum, int objGen); - ~EncryptStream(); - void reset() override; - int lookChar() override; -}; - -class DecryptStream : public BaseCryptStream { -public: - - DecryptStream(Stream *strA, Guchar *fileKey, CryptAlgorithm algoA, - int keyLength, int objNum, int objGen); - ~DecryptStream(); - void reset() override; - int lookChar() override; -}; - -//------------------------------------------------------------------------ - -extern void md5(Guchar *msg, int msgLen, Guchar *digest); - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/Dict.cc b/Build/source/libs/poppler/poppler-src/poppler/Dict.cc deleted file mode 100644 index bc86fd77ad9..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/Dict.cc +++ /dev/null @@ -1,297 +0,0 @@ -//======================================================================== -// -// Dict.cc -// -// Copyright 1996-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2005 Kristian Høgsberg <krh@redhat.com> -// Copyright (C) 2006 Krzysztof Kowalczyk <kkowalczyk@gmail.com> -// Copyright (C) 2007-2008 Julien Rebetez <julienr@svn.gnome.org> -// Copyright (C) 2008, 2010, 2013, 2014, 2017 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2010 PaweÅ‚ Wiejacha <pawel.wiejacha@gmail.com> -// Copyright (C) 2012 Fabio D'Urso <fabiodurso@hotmail.it> -// Copyright (C) 2013 Thomas Freitag <Thomas.Freitag@alfa.de> -// Copyright (C) 2014 Scott West <scott.gregory.west@gmail.com> -// Copyright (C) 2017 Adrian Johnson <ajohnson@redneon.com> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include <config.h> - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include <algorithm> -#include <stddef.h> -#include <string.h> -#include "goo/gmem.h" -#include "Object.h" -#include "XRef.h" -#include "Dict.h" - -#ifdef MULTITHREADED -# define dictLocker() MutexLocker locker(&mutex) -#else -# define dictLocker() -#endif -//------------------------------------------------------------------------ -// Dict -//------------------------------------------------------------------------ - -static const int SORT_LENGTH_LOWER_LIMIT = 32; - -static inline bool cmpDictEntries(const DictEntry &e1, const DictEntry &e2) -{ - return strcmp(e1.key, e2.key) < 0; -} - -static int binarySearch(const char *key, DictEntry *entries, int length) -{ - int first = 0; - int end = length - 1; - while (first <= end) { - const int middle = (first + end) / 2; - const int res = strcmp(key, entries[middle].key); - if (res == 0) { - return middle; - } else if (res < 0) { - end = middle - 1; - } else { - first = middle + 1; - } - } - return -1; -} - -Dict::Dict(XRef *xrefA) { - xref = xrefA; - entries = nullptr; - size = length = 0; - ref = 1; - sorted = gFalse; -#ifdef MULTITHREADED - gInitMutex(&mutex); -#endif -} - -Dict::Dict(Dict* dictA) { - xref = dictA->xref; - size = length = dictA->length; - ref = 1; -#ifdef MULTITHREADED - gInitMutex(&mutex); -#endif - - sorted = dictA->sorted; - entries = (DictEntry *)gmallocn(size, sizeof(DictEntry)); - for (int i=0; i<length; i++) { - entries[i].key = copyString(dictA->entries[i].key); - entries[i].val.initNullAfterMalloc(); - entries[i].val = dictA->entries[i].val.copy(); - } -} - -Dict *Dict::copy(XRef *xrefA) { - dictLocker(); - Dict *dictA = new Dict(this); - dictA->xref = xrefA; - for (int i=0; i<length; i++) { - if (dictA->entries[i].val.getType() == objDict) { - Dict *copy = dictA->entries[i].val.getDict()->copy(xrefA); - dictA->entries[i].val = Object(copy); - } - } - return dictA; -} - -Dict::~Dict() { - int i; - - for (i = 0; i < length; ++i) { - gfree(entries[i].key); - entries[i].val.free(); - } - gfree(entries); -#ifdef MULTITHREADED - gDestroyMutex(&mutex); -#endif -} - -int Dict::incRef() { - dictLocker(); - ++ref; - return ref; -} - -int Dict::decRef() { - dictLocker(); - --ref; - return ref; -} - -void Dict::add(char *key, Object &&val) { - dictLocker(); - if (sorted) { - // We use add on very few occasions so - // virtually this will never be hit - sorted = gFalse; - } - - if (length == size) { - if (length == 0) { - size = 8; - } else { - size *= 2; - } - entries = (DictEntry *)greallocn(entries, size, sizeof(DictEntry)); - } - entries[length].key = key; - entries[length].val.initNullAfterMalloc(); - entries[length].val = std::move(val); - ++length; -} - -inline DictEntry *Dict::find(const char *key) const { - if (!sorted && length >= SORT_LENGTH_LOWER_LIMIT) - { - dictLocker(); - sorted = gTrue; - std::sort(entries, entries+length, cmpDictEntries); - } - - if (sorted) { - const int pos = binarySearch(key, entries, length); - if (pos != -1) { - return &entries[pos]; - } - } else { - int i; - - for (i = length - 1; i >=0; --i) { - if (!strcmp(key, entries[i].key)) - return &entries[i]; - } - } - return nullptr; -} - -GBool Dict::hasKey(const char *key) const { - return find(key) != nullptr; -} - -void Dict::remove(const char *key) { - dictLocker(); - if (sorted) { - const int pos = binarySearch(key, entries, length); - if (pos != -1) { - length -= 1; - gfree(entries[pos].key); - entries[pos].val.free(); - if (pos != length) { - memmove(static_cast<void*>(&entries[pos]), &entries[pos + 1], (length - pos) * sizeof(DictEntry)); - } - } - } else { - int i; - bool found = false; - if(length == 0) { - return; - } - - for(i=0; i<length; i++) { - if (!strcmp(key, entries[i].key)) { - found = true; - break; - } - } - if(!found) { - return; - } - //replace the deleted entry with the last entry - gfree(entries[i].key); - entries[i].val.free(); - length -= 1; - if (i!=length) { - //don't copy the last entry if it is deleted - entries[i].key = entries[length].key; - entries[i].val = std::move(entries[length].val); - } - } -} - -void Dict::set(const char *key, Object &&val) { - DictEntry *e; - if (val.isNull()) { - remove(key); - return; - } - e = find (key); - if (e) { - dictLocker(); - e->val = std::move(val); - } else { - add (copyString(key), std::move(val)); - } -} - - -GBool Dict::is(const char *type) const { - DictEntry *e; - - return (e = find("Type")) && e->val.isName(type); -} - -Object Dict::lookup(const char *key, int recursion) const { - DictEntry *e; - - return (e = find(key)) ? e->val.fetch(xref, recursion) : Object(objNull); -} - -Object Dict::lookupNF(const char *key) const { - DictEntry *e; - - return (e = find(key)) ? e->val.copy() : Object(objNull); -} - -GBool Dict::lookupInt(const char *key, const char *alt_key, int *value) const -{ - GBool success = gFalse; - Object obj1 = lookup ((char *) key); - if (obj1.isNull () && alt_key != nullptr) { - obj1.free (); - obj1 = lookup ((char *) alt_key); - } - if (obj1.isInt ()) { - *value = obj1.getInt (); - success = gTrue; - } - - obj1.free (); - - return success; -} - -char *Dict::getKey(int i) const { - return entries[i].key; -} - -Object Dict::getVal(int i) const { - return entries[i].val.fetch(xref); -} - -Object Dict::getValNF(int i) const { - return entries[i].val.copy(); -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/Dict.h b/Build/source/libs/poppler/poppler-src/poppler/Dict.h deleted file mode 100644 index 9fd732a1561..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/Dict.h +++ /dev/null @@ -1,119 +0,0 @@ -//======================================================================== -// -// Dict.h -// -// Copyright 1996-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2005 Kristian Høgsberg <krh@redhat.com> -// Copyright (C) 2006 Krzysztof Kowalczyk <kkowalczyk@gmail.com> -// Copyright (C) 2007-2008 Julien Rebetez <julienr@svn.gnome.org> -// Copyright (C) 2010, 2017, 2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2010 PaweÅ‚ Wiejacha <pawel.wiejacha@gmail.com> -// Copyright (C) 2013 Thomas Freitag <Thomas.Freitag@alfa.de> -// Copyright (C) 2017 Adrian Johnson <ajohnson@redneon.com> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef DICT_H -#define DICT_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "poppler-config.h" -#include "Object.h" -#include "goo/GooMutex.h" - -//------------------------------------------------------------------------ -// Dict -//------------------------------------------------------------------------ - -struct DictEntry { - char *key; - Object val; -}; - -class Dict { -public: - - // Constructor. - Dict(XRef *xrefA); - Dict(Dict* dictA); - Dict *copy(XRef *xrefA); - - // Destructor. - ~Dict(); - - Dict(const Dict &) = delete; - Dict& operator=(const Dict &) = delete; - - // Get number of entries. - int getLength() const { return length; } - - // Add an entry. NB: does not copy key. - // val becomes a dead object after the call - void add(char *key, Object &&val); - - // Update the value of an existing entry, otherwise create it - // val becomes a dead object after the call - void set(const char *key, Object &&val); - // Remove an entry. This invalidate indexes - void remove(const char *key); - - // Check if dictionary is of specified type. - GBool is(const char *type) const; - - // Look up an entry and return the value. Returns a null object - // if <key> is not in the dictionary. - Object lookup(const char *key, int recursion = 0) const; - Object lookupNF(const char *key) const; - GBool lookupInt(const char *key, const char *alt_key, int *value) const; - - // Iterative accessors. - char *getKey(int i) const; - Object getVal(int i) const; - Object getValNF(int i) const; - - // Set the xref pointer. This is only used in one special case: the - // trailer dictionary, which is read before the xref table is - // parsed. - void setXRef(XRef *xrefA) { xref = xrefA; } - - XRef *getXRef() const { return xref; } - - GBool hasKey(const char *key) const; - -private: - friend class Object; // for incRef/decRef - - // Reference counting. - int incRef(); - int decRef(); - - mutable GBool sorted; - XRef *xref; // the xref table for this PDF file - DictEntry *entries; // array of entries - int size; // size of <entries> array - int length; // number of entries in dictionary - int ref; // reference count -#ifdef MULTITHREADED - mutable GooMutex mutex; -#endif - - DictEntry *find(const char *key) const; -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/Error.cc b/Build/source/libs/poppler/poppler-src/poppler/Error.cc deleted file mode 100644 index 356f797260e..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/Error.cc +++ /dev/null @@ -1,99 +0,0 @@ -//======================================================================== -// -// Error.cc -// -// Copyright 1996-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2005, 2007 Jeff Muizelaar <jeff@infidigm.net> -// Copyright (C) 2005 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2007 Krzysztof Kowalczyk <kkowalczyk@gmail.com> -// Copyright (C) 2012 Marek Kasik <mkasik@redhat.com> -// Copyright (C) 2013, 2017 Adrian Johnson <ajohnson@redneon.com> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include <config.h> -#include <poppler-config.h> - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include <stdio.h> -#include <stddef.h> -#include <stdarg.h> -#include "GooString.h" -#include "GlobalParams.h" -#include "Error.h" - -static const char *errorCategoryNames[] = { - "Syntax Warning", - "Syntax Error", - "Config Error", - "Command Line Error", - "I/O Error", - "Permission Error", - "Unimplemented Feature", - "Internal Error" -}; - -static void (*errorCbk)(void *data, ErrorCategory category, - Goffset pos, char *msg) = nullptr; -static void *errorCbkData = nullptr; - -void setErrorCallback(void (*cbk)(void *data, ErrorCategory category, - Goffset pos, char *msg), - void *data) { - errorCbk = cbk; - errorCbkData = data; -} - -void CDECL error(ErrorCategory category, Goffset pos, const char *msg, ...) { - va_list args; - GooString *s, *sanitized; - - // NB: this can be called before the globalParams object is created - if (!errorCbk && globalParams && globalParams->getErrQuiet()) { - return; - } - va_start(args, msg); - s = GooString::formatv(msg, args); - va_end(args); - - sanitized = new GooString (); - for (int i = 0; i < s->getLength(); ++i) { - const char c = s->getChar(i); - if (c < (char)0x20 || c >= (char)0x7f) { - sanitized->appendf("<{0:02x}>", c & 0xff); - } else { - sanitized->append(c); - } - } - - if (errorCbk) { - (*errorCbk)(errorCbkData, category, pos, sanitized->getCString()); - } else { - if (pos >= 0) { - fprintf(stderr, "%s (%lld): %s\n", - errorCategoryNames[category], (long long)pos, sanitized->getCString()); - } else { - fprintf(stderr, "%s: %s\n", - errorCategoryNames[category], sanitized->getCString()); - } - fflush(stderr); - } - delete s; - delete sanitized; -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/Error.h b/Build/source/libs/poppler/poppler-src/poppler/Error.h deleted file mode 100644 index 9e11733d803..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/Error.h +++ /dev/null @@ -1,60 +0,0 @@ -//======================================================================== -// -// Error.h -// -// Copyright 1996-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2005, 2007 Jeff Muizelaar <jeff@infidigm.net> -// Copyright (C) 2005 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2005 Kristian Høgsberg <krh@redhat.com> -// Copyright (C) 2013 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2014 Fabio D'Urso <fabiodurso@hotmail.it> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef ERROR_H -#define ERROR_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include <stdarg.h> -#include "poppler-config.h" -#include "goo/gtypes.h" -#include "goo/GooString.h" - -enum ErrorCategory { - errSyntaxWarning, // PDF syntax error which can be worked around; - // output will probably be correct - errSyntaxError, // PDF syntax error which can be worked around; - // output will probably be incorrect - errConfig, // error in Xpdf config info (xpdfrc file, etc.) - errCommandLine, // error in user-supplied parameters, action not - // allowed, etc. (only used by command-line tools) - errIO, // error in file I/O - errNotAllowed, // action not allowed by PDF permission bits - errUnimplemented, // unimplemented PDF feature - display will be - // incorrect - errInternal // internal error - malfunction within the Xpdf code -}; - -extern void setErrorCallback(void (*cbk)(void *data, ErrorCategory category, - Goffset pos, char *msg), - void *data); - -extern void CDECL error(ErrorCategory category, Goffset pos, const char *msg, ...) GOOSTRING_FORMAT; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/ErrorCodes.h b/Build/source/libs/poppler/poppler-src/poppler/ErrorCodes.h deleted file mode 100644 index 15b172a7ea0..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/ErrorCodes.h +++ /dev/null @@ -1,52 +0,0 @@ -//======================================================================== -// -// ErrorCodes.h -// -// Copyright 2002-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2017 Albert Astals Cid <aacid@kde.org> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef ERRORCODES_H -#define ERRORCODES_H - -#define errNone 0 // no error - -#define errOpenFile 1 // couldn't open the PDF file - -#define errBadCatalog 2 // couldn't read the page catalog - -#define errDamaged 3 // PDF file was damaged and couldn't be - // repaired - -#define errEncrypted 4 // file was encrypted and password was - // incorrect or not supplied - -#define errHighlightFile 5 // nonexistent or invalid highlight file - -#define errBadPrinter 6 // invalid printer - -#define errPrinting 7 // error during printing - -#define errPermission 8 // PDF file doesn't allow that operation - -#define errBadPageNum 9 // invalid page number - -#define errFileIO 10 // file I/O error - -#define errFileChangedSinceOpen 11 // file has changed since opening and save can't be done - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/FileSpec.cc b/Build/source/libs/poppler/poppler-src/poppler/FileSpec.cc deleted file mode 100644 index 2628c363193..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/FileSpec.cc +++ /dev/null @@ -1,282 +0,0 @@ -//======================================================================== -// -// FileSpec.cc -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2008-2009 Carlos Garcia Campos <carlosgc@gnome.org> -// Copyright (C) 2009 Kovid Goyal <kovid@kovidgoyal.net> -// Copyright (C) 2012, 2017, 2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2012 Hib Eris <hib@hiberis.nl> -// 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 -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -//======================================================================== -// -// Most of the code from Link.cc and PSOutputDev.cc -// -// Copyright 1996-2003 Glyph & Cog, LLC -// -//======================================================================== - -#include <config.h> - -#include "FileSpec.h" - -EmbFile::EmbFile(const Object *efStream) -{ - m_size = -1; - m_createDate = nullptr; - m_modDate = nullptr; - m_checksum = nullptr; - m_mimetype = nullptr; - - m_objStr = efStream->copy(); - - if (efStream->isStream()) { - // dataDict corresponds to Table 3.41 in the PDF1.6 spec. - Dict *dataDict = efStream->streamGetDict(); - - // subtype is normally the mimetype - Object subtypeName = dataDict->lookup("Subtype"); - if (subtypeName.isName()) { - m_mimetype = new GooString(subtypeName.getName()); - } - - // paramDict corresponds to Table 3.42 in the PDF1.6 spec - Object paramDict = dataDict->lookup("Params"); - if (paramDict.isDict()) { - Object paramObj = paramDict.dictLookup("ModDate"); - if (paramObj.isString()) - m_modDate = new GooString(paramObj.getString()); - - paramObj = paramDict.dictLookup("CreationDate"); - if (paramObj.isString()) - m_createDate = new GooString(paramObj.getString()); - - paramObj = paramDict.dictLookup("Size"); - if (paramObj.isInt()) - m_size = paramObj.getInt(); - - paramObj = paramDict.dictLookup("CheckSum"); - if (paramObj.isString()) - m_checksum = new GooString(paramObj.getString()); - } - } -} - -EmbFile::~EmbFile() -{ - delete m_createDate; - delete m_modDate; - delete m_checksum; - delete m_mimetype; -} - -GBool EmbFile::save(const char *path) { - FILE *f; - GBool ret; - - if (!(f = fopen(path, "wb"))) { - return gFalse; - } - ret = save2(f); - fclose(f); - return ret; -} - -GBool EmbFile::save2(FILE *f) { - int c; - - m_objStr.streamReset(); - while ((c = m_objStr.streamGetChar()) != EOF) { - fputc(c, f); - } - return gTrue; -} - -FileSpec::FileSpec(const Object *fileSpecA) -{ - ok = gTrue; - fileName = nullptr; - platformFileName = nullptr; - embFile = nullptr; - desc = nullptr; - fileSpec = fileSpecA->copy(); - - Object obj1 = getFileSpecName(fileSpecA); - if (!obj1.isString()) { - ok = gFalse; - error(errSyntaxError, -1, "Invalid FileSpec"); - return; - } - - fileName = obj1.getString()->copy(); - - if (fileSpec.isDict()) { - obj1 = fileSpec.dictLookup("EF"); - if (obj1.isDict()) { - fileStream = obj1.dictLookupNF("F"); - if (!fileStream.isRef()) { - ok = gFalse; - fileStream.setToNull(); - error(errSyntaxError, -1, "Invalid FileSpec: Embedded file stream is not an indirect reference"); - return; - } - } - } - - obj1 = fileSpec.dictLookup("Desc"); - if (obj1.isString()) - desc = obj1.getString()->copy(); -} - -FileSpec::~FileSpec() -{ - delete fileName; - delete platformFileName; - delete embFile; - delete desc; -} - -EmbFile *FileSpec::getEmbeddedFile() -{ - if(!ok) - return nullptr; - - if (embFile) - return embFile; - - Object obj1; - XRef *xref = fileSpec.getDict()->getXRef(); - obj1 = fileStream.fetch(xref); - embFile = new EmbFile(&obj1); - - return embFile; -} - -GooString *FileSpec::getFileNameForPlatform() -{ - if (platformFileName) - return platformFileName; - - Object obj1 = getFileSpecNameForPlatform(&fileSpec); - if (obj1.isString()) - platformFileName = obj1.getString()->copy(); - - return platformFileName; -} - -Object getFileSpecName (const Object *fileSpec) -{ - if (fileSpec->isString()) { - return fileSpec->copy(); - } - - if (fileSpec->isDict()) { - Object fileName = fileSpec->dictLookup("UF"); - if (fileName.isString()) { - return fileName; - } - fileName = fileSpec->dictLookup("F"); - if (fileName.isString()) { - return fileName; - } - fileName = fileSpec->dictLookup("DOS"); - if (fileName.isString()) { - return fileName; - } - fileName = fileSpec->dictLookup("Mac"); - if (fileName.isString()) { - return fileName; - } - fileName = fileSpec->dictLookup("Unix"); - if (fileName.isString()) { - return fileName; - } - } - return Object(); -} - -Object getFileSpecNameForPlatform (const Object *fileSpec) -{ - if (fileSpec->isString()) { - return fileSpec->copy(); - } - - Object fileName; - if (fileSpec->isDict()) { - fileName = fileSpec->dictLookup("UF"); - if (!fileName.isString ()) { - fileName = fileSpec->dictLookup("F"); - if (!fileName.isString ()) { -#ifdef _WIN32 - const char *platform = "DOS"; -#else - const char *platform = "Unix"; -#endif - fileName = fileSpec->dictLookup(platform); - if (!fileName.isString ()) { - error(errSyntaxError, -1, "Illegal file spec"); - return Object(); - } - } - } - } else { - error(errSyntaxError, -1, "Illegal file spec"); - return Object(); - } - - // system-dependent path manipulation -#ifdef _WIN32 - int i, j; - GooString *name = fileName.getString()->copy(); - // "//...." --> "\...." - // "/x/...." --> "x:\...." - // "/server/share/...." --> "\\server\share\...." - // convert escaped slashes to slashes and unescaped slashes to backslashes - i = 0; - if (name->getChar(0) == '/') { - if (name->getLength() >= 2 && name->getChar(1) == '/') { - name->del(0); - i = 0; - } else if (name->getLength() >= 2 && - ((name->getChar(1) >= 'a' && name->getChar(1) <= 'z') || - (name->getChar(1) >= 'A' && name->getChar(1) <= 'Z')) && - (name->getLength() == 2 || name->getChar(2) == '/')) { - name->setChar(0, name->getChar(1)); - name->setChar(1, ':'); - i = 2; - } else { - for (j = 2; j < name->getLength(); ++j) { - if (name->getChar(j-1) != '\\' && - name->getChar(j) == '/') { - break; - } - } - if (j < name->getLength()) { - name->setChar(0, '\\'); - name->insert(0, '\\'); - i = 2; - } - } - } - for (; i < name->getLength(); ++i) { - if (name->getChar(i) == '/') { - name->setChar(i, '\\'); - } else if (name->getChar(i) == '\\' && - i+1 < name->getLength() && - name->getChar(i+1) == '/') { - name->del(i); - } - } - fileName = Object(name); -#endif /* _WIN32 */ - - return fileName; -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/FileSpec.h b/Build/source/libs/poppler/poppler-src/poppler/FileSpec.h deleted file mode 100644 index f40f77054fb..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/FileSpec.h +++ /dev/null @@ -1,84 +0,0 @@ -//======================================================================== -// -// FileSpec.h -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2008 Carlos Garcia Campos <carlosgc@gnome.org> -// Copyright (C) 2017, 2018 Albert Astals Cid <aacid@kde.org> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef FILE_SPEC_H -#define FILE_SPEC_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "Object.h" - -class EmbFile { -public: - EmbFile(const Object *efStream); - ~EmbFile(); - - EmbFile(const EmbFile &) = delete; - EmbFile& operator=(const EmbFile &) = delete; - - int size() const { return m_size; } - const GooString *modDate() const { return m_modDate; } - const GooString *createDate() const { return m_createDate; } - const GooString *checksum() const { return m_checksum; } - const GooString *mimeType() const { return m_mimetype; } - Object *streamObject() { return &m_objStr; } - Stream *stream() { return isOk() ? m_objStr.getStream() : NULL; } - GBool isOk() const { return m_objStr.isStream(); } - GBool save(const char *path); - -private: - GBool save2(FILE *f); - - int m_size; - GooString *m_createDate; - GooString *m_modDate; - GooString *m_checksum; - GooString *m_mimetype; - Object m_objStr; -}; - -class FileSpec { -public: - FileSpec(const Object *fileSpec); - ~FileSpec(); - - FileSpec(const FileSpec &) = delete; - FileSpec& operator=(const FileSpec &) = delete; - - GBool isOk() const { return ok; } - - const GooString *getFileName() const { return fileName; } - GooString *getFileNameForPlatform(); - const GooString *getDescription() const { return desc; } - EmbFile *getEmbeddedFile(); - -private: - GBool ok; - - Object fileSpec; - - GooString *fileName; // F, UF, DOS, Mac, Unix - GooString *platformFileName; - Object fileStream; // Ref to F entry in UF - EmbFile *embFile; - GooString *desc; // Desc -}; - -Object getFileSpecName (const Object *fileSpec); -Object getFileSpecNameForPlatform (const Object *fileSpec); - -#endif /* FILE_SPEC_H */ diff --git a/Build/source/libs/poppler/poppler-src/poppler/FlateEncoder.cc b/Build/source/libs/poppler/poppler-src/poppler/FlateEncoder.cc deleted file mode 100644 index c6e4a042c3e..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/FlateEncoder.cc +++ /dev/null @@ -1,148 +0,0 @@ -//======================================================================== -// -// FlateEncoder.cc -// -// Copyright (C) 2016, William Bader <williambader@hotmail.com> -// Copyright (C) 2017 Adrian Johnson <ajohnson@redneon.com> -// -// This file is under the GPLv2 or later license -// -//======================================================================== - -#include <config.h> - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include "FlateEncoder.h" - -//------------------------------------------------------------------------ -// FlateEncoder -//------------------------------------------------------------------------ - -FlateEncoder::FlateEncoder(Stream *strA): - FilterStream(strA) -{ - int zlib_status; - - outBufPtr = outBufEnd = outBuf; - inBufEof = outBufEof = gFalse; - - zlib_stream.zalloc = Z_NULL; - zlib_stream.zfree = Z_NULL; - zlib_stream.opaque = Z_NULL; - - zlib_status = deflateInit(&zlib_stream, Z_DEFAULT_COMPRESSION); - - if (zlib_status != Z_OK) { - inBufEof = outBufEof = gTrue; - error(errInternal, -1, "Internal: deflateInit() failed in FlateEncoder::FlateEncoder()"); - } - - zlib_stream.next_out = outBufEnd; - zlib_stream.avail_out = 1; /* anything but 0 to trigger a read */ -} - -FlateEncoder::~FlateEncoder() { - deflateEnd(&zlib_stream); - if (str->isEncoder()) { - delete str; - } -} - -void FlateEncoder::reset() { - int zlib_status; - - str->reset(); - - outBufPtr = outBufEnd = outBuf; - inBufEof = outBufEof = gFalse; - - deflateEnd(&zlib_stream); - - zlib_status = deflateInit(&zlib_stream, Z_DEFAULT_COMPRESSION); - - if (zlib_status != Z_OK) { - inBufEof = outBufEof = gTrue; - error(errInternal, -1, "Internal: deflateInit() failed in FlateEncoder::reset()"); - } - - zlib_stream.next_out = outBufEnd; - zlib_stream.avail_out = 1; /* anything but 0 to trigger a read */ -} - -GBool FlateEncoder::fillBuf() { - int n; - unsigned int starting_avail_out; - int zlib_status; - - /* If the output is done, don't try to read more. */ - - if (outBufEof) { - return gFalse; - } - - /* The output buffer should be empty. */ - /* If it is not empty, push any processed data to the start. */ - - if (outBufPtr > outBuf && outBufPtr < outBufEnd) { - n = outBufEnd - outBufPtr; - memmove(outBuf, outBufPtr, n); - outBufEnd = &outBuf[n]; - } else { - outBufEnd = outBuf; - } - outBufPtr = outBuf; - - /* Keep feeding zlib until we get output. */ - /* zlib might consume a few input buffers */ - /* before it starts producing output. */ - - do { - - /* avail_out > 0 means that zlib has depleted its input */ - /* and needs a new chunk of input in order to generate */ - /* more output. */ - - if (zlib_stream.avail_out != 0) { - - /* Fill the input buffer */ - - n = (inBufEof? 0: str->doGetChars(inBufSize, inBuf)); - - if (n == 0) { - inBufEof = gTrue; - } - - zlib_stream.next_in = inBuf; - zlib_stream.avail_in = n; - } - - /* Ask zlib for output. */ - - zlib_stream.next_out = outBufEnd; - starting_avail_out = &outBuf[ outBufSize ] - outBufEnd; - zlib_stream.avail_out = starting_avail_out; - - zlib_status = deflate(&zlib_stream, (inBufEof? Z_FINISH: Z_NO_FLUSH)); - - if (zlib_status == Z_STREAM_ERROR || - zlib_stream.avail_out > starting_avail_out) { - /* Unrecoverable error */ - inBufEof = outBufEof = gTrue; - error(errInternal, -1, "Internal: deflate() failed in FlateEncoder::fillBuf()"); - return gFalse; - } - - } while (zlib_stream.avail_out == outBufSize && !inBufEof); - - outBufEnd = &outBuf[ outBufSize ] - zlib_stream.avail_out; - - if (inBufEof && zlib_stream.avail_out != 0) { - outBufEof = gTrue; - } - - return outBufPtr < outBufEnd; -} - diff --git a/Build/source/libs/poppler/poppler-src/poppler/FlateEncoder.h b/Build/source/libs/poppler/poppler-src/poppler/FlateEncoder.h deleted file mode 100644 index 093104ade1f..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/FlateEncoder.h +++ /dev/null @@ -1,73 +0,0 @@ -//======================================================================== -// -// FlateEncoder.h -// -// Copyright (C) 2016, William Bader <williambader@hotmail.com> -// -// This file is under the GPLv2 or later license -// -//======================================================================== - -#ifndef FLATEENCODE_H -#define FLATEENCODE_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "poppler-config.h" -#include <stdio.h> -#include <stdlib.h> -#include <stddef.h> -#ifdef HAVE_UNISTD_H -#include <unistd.h> -#endif -#include <string.h> -#include <ctype.h> -#include "goo/gmem.h" -#include "goo/gfile.h" -#include "Error.h" -#include "Object.h" -#include "Decrypt.h" - -#include "Stream.h" - -extern "C" { -#include <zlib.h> -} - -//------------------------------------------------------------------------ -// FlateEncoder -//------------------------------------------------------------------------ - -class FlateEncoder: public FilterStream { -public: - - FlateEncoder(Stream *strA); - ~FlateEncoder(); - StreamKind getKind() override { return strWeird; } - void reset() override; - int getChar() override - { return (outBufPtr >= outBufEnd && !fillBuf()) ? EOF : (*outBufPtr++ & 0xff); } - int lookChar() override - { return (outBufPtr >= outBufEnd && !fillBuf()) ? EOF : (*outBufPtr & 0xff); } - GooString *getPSFilter(int psLevel, const char *indent) override { return NULL; } - GBool isBinary(GBool last = gTrue) override { return gTrue; } - GBool isEncoder() override { return gTrue; } - -private: - - static const int inBufSize = 16384; - static const int outBufSize = inBufSize; - Guchar inBuf[ inBufSize ]; - Guchar outBuf[ outBufSize ]; - Guchar *outBufPtr; - Guchar *outBufEnd; - GBool inBufEof; - GBool outBufEof; - z_stream zlib_stream; - - GBool fillBuf(); -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/FlateStream.cc b/Build/source/libs/poppler/poppler-src/poppler/FlateStream.cc deleted file mode 100644 index d23435ff649..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/FlateStream.cc +++ /dev/null @@ -1,144 +0,0 @@ -//======================================================================== -// -// FlateStream.cc -// -// Copyright (C) 2005, Jeff Muizelaar <jeff@infidigm.net> -// Copyright (C) 2010, Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2016, William Bader <williambader@hotmail.com> -// Copyright (C) 2017, Adrian Johnson <ajohnson@redneon.com> -// -// This file is under the GPLv2 or later license -// -//======================================================================== - -#include <config.h> - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include "poppler-config.h" - -#ifdef ENABLE_ZLIB_UNCOMPRESS - -#include "FlateStream.h" - -FlateStream::FlateStream(Stream *strA, int predictor, int columns, int colors, int bits) : - FilterStream(strA) -{ - if (predictor != 1) { - pred = new StreamPredictor(this, predictor, columns, colors, bits); - } else { - pred = NULL; - } - out_pos = 0; - memset(&d_stream, 0, sizeof(d_stream)); - inflateInit(&d_stream); -} - -FlateStream::~FlateStream() { - inflateEnd(&d_stream); - delete pred; - delete str; -} - -void FlateStream::reset() { - //FIXME: what are the semantics of reset? - //i.e. how much intialization has to happen in the constructor? - - /* reinitialize zlib */ - inflateEnd(&d_stream); - memset(&d_stream, 0, sizeof(d_stream)); - inflateInit(&d_stream); - - str->reset(); - d_stream.avail_in = 0; - status = Z_OK; - out_pos = 0; - out_buf_len = 0; -} - -int FlateStream::getRawChar() { - return doGetRawChar(); -} - -void FlateStream::getRawChars(int nChars, int *buffer) { - for (int i = 0; i < nChars; ++i) - buffer[i] = doGetRawChar(); -} - -int FlateStream::getChar() { - if (pred) - return pred->getChar(); - else - return getRawChar(); -} - -int FlateStream::lookChar() { - if (pred) - return pred->lookChar(); - - if (fill_buffer()) - return EOF; - - return out_buf[out_pos]; -} - -int FlateStream::fill_buffer() { - /* only fill the buffer if it has all been used */ - if (out_pos >= out_buf_len) { - /* check if the flatestream has been exhausted */ - if (status == Z_STREAM_END) { - return -1; - } - - /* set to the begining of out_buf */ - d_stream.avail_out = sizeof(out_buf); - d_stream.next_out = out_buf; - out_pos = 0; - - while (1) { - /* buffer is empty so we need to fill it */ - if (d_stream.avail_in == 0) { - int c; - /* read from the source stream */ - while (d_stream.avail_in < sizeof(in_buf) && (c = str->getChar()) != EOF) { - in_buf[d_stream.avail_in++] = c; - } - d_stream.next_in = in_buf; - } - - /* keep decompressing until we can't anymore */ - if (d_stream.avail_out == 0 || d_stream.avail_in == 0 || (status != Z_OK && status != Z_BUF_ERROR)) - break; - status = inflate(&d_stream, Z_SYNC_FLUSH); - } - - out_buf_len = sizeof(out_buf) - d_stream.avail_out; - if (status != Z_OK && status != Z_STREAM_END) - return -1; - if (!out_buf_len) - return -1; - } - - return 0; -} - -GooString *FlateStream::getPSFilter(int psLevel, const char *indent) { - GooString *s; - - if (psLevel < 3 || pred) { - return NULL; - } - if (!(s = str->getPSFilter(psLevel, indent))) { - return NULL; - } - s->append(indent)->append("<< >> /FlateDecode filter\n"); - return s; -} - -GBool FlateStream::isBinary(GBool last) { - return str->isBinary(gTrue); -} - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/FlateStream.h b/Build/source/libs/poppler/poppler-src/poppler/FlateStream.h deleted file mode 100644 index 6a88a234e7d..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/FlateStream.h +++ /dev/null @@ -1,77 +0,0 @@ -//======================================================================== -// -// FlateStream.h -// -// Copyright (C) 2005, Jeff Muizelaar <jeff@infidigm.net> -// Copyright (C) 2010, 2011, Albert Astals Cid <aacid@kde.org> -// -// This file is under the GPLv2 or later license -// -//======================================================================== - -#ifndef FLATESTREAM_H -#define FLATESTREAM_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include "poppler-config.h" -#include <stdio.h> -#include <stdlib.h> -#include <stddef.h> -#ifdef HAVE_UNISTD_H -#include <unistd.h> -#endif -#include <string.h> -#include <ctype.h> -#include "goo/gmem.h" -#include "goo/gfile.h" -#include "Error.h" -#include "Object.h" -#include "Decrypt.h" -#include "Stream.h" - -extern "C" { -#include <zlib.h> -} - -class FlateStream: public FilterStream { -public: - - FlateStream(Stream *strA, int predictor, int columns, int colors, int bits); - virtual ~FlateStream(); - virtual StreamKind getKind() override { return strFlate; } - virtual void reset() override; - virtual int getChar() override; - virtual int lookChar() override; - virtual int getRawChar() override; - virtual void getRawChars(int nChars, int *buffer) override; - virtual GooString *getPSFilter(int psLevel, const char *indent) override; - virtual GBool isBinary(GBool last = gTrue) override; - -private: - inline int doGetRawChar() { - if (fill_buffer()) - return EOF; - - return out_buf[out_pos++]; - } - - int fill_buffer(void); - z_stream d_stream; - StreamPredictor *pred; - int status; - /* in_buf currently needs to be 1 or we over read from EmbedStreams */ - unsigned char in_buf[1]; - unsigned char out_buf[4096]; - int out_pos; - int out_buf_len; -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/FontEncodingTables.cc b/Build/source/libs/poppler/poppler-src/poppler/FontEncodingTables.cc deleted file mode 100644 index 4a1f64a6464..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/FontEncodingTables.cc +++ /dev/null @@ -1,1824 +0,0 @@ -//======================================================================== -// -// FontEncodingTables.cc -// -// Copyright 2001-2003 Glyph & Cog, LLC -// -//======================================================================== - -#include <config.h> -#include <stdlib.h> -#include "FontEncodingTables.h" - -const char *macRomanEncoding[256] = { - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - "space", - "exclam", - "quotedbl", - "numbersign", - "dollar", - "percent", - "ampersand", - "quotesingle", - "parenleft", - "parenright", - "asterisk", - "plus", - "comma", - "hyphen", - "period", - "slash", - "zero", - "one", - "two", - "three", - "four", - "five", - "six", - "seven", - "eight", - "nine", - "colon", - "semicolon", - "less", - "equal", - "greater", - "question", - "at", - "A", - "B", - "C", - "D", - "E", - "F", - "G", - "H", - "I", - "J", - "K", - "L", - "M", - "N", - "O", - "P", - "Q", - "R", - "S", - "T", - "U", - "V", - "W", - "X", - "Y", - "Z", - "bracketleft", - "backslash", - "bracketright", - "asciicircum", - "underscore", - "grave", - "a", - "b", - "c", - "d", - "e", - "f", - "g", - "h", - "i", - "j", - "k", - "l", - "m", - "n", - "o", - "p", - "q", - "r", - "s", - "t", - "u", - "v", - "w", - "x", - "y", - "z", - "braceleft", - "bar", - "braceright", - "asciitilde", - nullptr, - "Adieresis", - "Aring", - "Ccedilla", - "Eacute", - "Ntilde", - "Odieresis", - "Udieresis", - "aacute", - "agrave", - "acircumflex", - "adieresis", - "atilde", - "aring", - "ccedilla", - "eacute", - "egrave", - "ecircumflex", - "edieresis", - "iacute", - "igrave", - "icircumflex", - "idieresis", - "ntilde", - "oacute", - "ograve", - "ocircumflex", - "odieresis", - "otilde", - "uacute", - "ugrave", - "ucircumflex", - "udieresis", - "dagger", - "degree", - "cent", - "sterling", - "section", - "bullet", - "paragraph", - "germandbls", - "registered", - "copyright", - "trademark", - "acute", - "dieresis", - "notequal", - "AE", - "Oslash", - "infinity", - "plusminus", - "lessequal", - "greaterequal", - "yen", - "mu", - "partialdiff", - "summation", - "product", - "pi", - "integral", - "ordfeminine", - "ordmasculine", - "Omega", - "ae", - "oslash", - "questiondown", - "exclamdown", - "logicalnot", - "radical", - "florin", - "approxequal", - "Delta", - "guillemotleft", - "guillemotright", - "ellipsis", - "space", - "Agrave", - "Atilde", - "Otilde", - "OE", - "oe", - "endash", - "emdash", - "quotedblleft", - "quotedblright", - "quoteleft", - "quoteright", - "divide", - "lozenge", - "ydieresis", - "Ydieresis", - "fraction", - "currency", - "guilsinglleft", - "guilsinglright", - "fi", - "fl", - "daggerdbl", - "periodcentered", - "quotesinglbase", - "quotedblbase", - "perthousand", - "Acircumflex", - "Ecircumflex", - "Aacute", - "Edieresis", - "Egrave", - "Iacute", - "Icircumflex", - "Idieresis", - "Igrave", - "Oacute", - "Ocircumflex", - "apple", - "Ograve", - "Uacute", - "Ucircumflex", - "Ugrave", - "dotlessi", - "circumflex", - "tilde", - "macron", - "breve", - "dotaccent", - "ring", - "cedilla", - "hungarumlaut", - "ogonek", - "caron" -}; - -const char *macExpertEncoding[256] = { - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - "space", - "exclamsmall", - "Hungarumlautsmall", - "centoldstyle", - "dollaroldstyle", - "dollarsuperior", - "ampersandsmall", - "Acutesmall", - "parenleftsuperior", - "parenrightsuperior", - "twodotenleader", - "onedotenleader", - "comma", - "hyphen", - "period", - "fraction", - "zerooldstyle", - "oneoldstyle", - "twooldstyle", - "threeoldstyle", - "fouroldstyle", - "fiveoldstyle", - "sixoldstyle", - "sevenoldstyle", - "eightoldstyle", - "nineoldstyle", - "colon", - "semicolon", - nullptr, - "threequartersemdash", - nullptr, - "questionsmall", - nullptr, - nullptr, - nullptr, - nullptr, - "Ethsmall", - nullptr, - nullptr, - "onequarter", - "onehalf", - "threequarters", - "oneeighth", - "threeeighths", - "fiveeighths", - "seveneighths", - "onethird", - "twothirds", - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - "ff", - "fi", - "fl", - "ffi", - "ffl", - "parenleftinferior", - nullptr, - "parenrightinferior", - "Circumflexsmall", - "hypheninferior", - "Gravesmall", - "Asmall", - "Bsmall", - "Csmall", - "Dsmall", - "Esmall", - "Fsmall", - "Gsmall", - "Hsmall", - "Ismall", - "Jsmall", - "Ksmall", - "Lsmall", - "Msmall", - "Nsmall", - "Osmall", - "Psmall", - "Qsmall", - "Rsmall", - "Ssmall", - "Tsmall", - "Usmall", - "Vsmall", - "Wsmall", - "Xsmall", - "Ysmall", - "Zsmall", - "colonmonetary", - "onefitted", - "rupiah", - "Tildesmall", - nullptr, - nullptr, - "asuperior", - "centsuperior", - nullptr, - nullptr, - nullptr, - nullptr, - "Aacutesmall", - "Agravesmall", - "Acircumflexsmall", - "Adieresissmall", - "Atildesmall", - "Aringsmall", - "Ccedillasmall", - "Eacutesmall", - "Egravesmall", - "Ecircumflexsmall", - "Edieresissmall", - "Iacutesmall", - "Igravesmall", - "Icircumflexsmall", - "Idieresissmall", - "Ntildesmall", - "Oacutesmall", - "Ogravesmall", - "Ocircumflexsmall", - "Odieresissmall", - "Otildesmall", - "Uacutesmall", - "Ugravesmall", - "Ucircumflexsmall", - "Udieresissmall", - nullptr, - "eightsuperior", - "fourinferior", - "threeinferior", - "sixinferior", - "eightinferior", - "seveninferior", - "Scaronsmall", - nullptr, - "centinferior", - "twoinferior", - nullptr, - "Dieresissmall", - nullptr, - "Caronsmall", - "osuperior", - "fiveinferior", - nullptr, - "commainferior", - "periodinferior", - "Yacutesmall", - nullptr, - "dollarinferior", - nullptr, - nullptr, - "Thornsmall", - nullptr, - "nineinferior", - "zeroinferior", - "Zcaronsmall", - "AEsmall", - "Oslashsmall", - "questiondownsmall", - "oneinferior", - "Lslashsmall", - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - "Cedillasmall", - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - "OEsmall", - "figuredash", - "hyphensuperior", - nullptr, - nullptr, - nullptr, - nullptr, - "exclamdownsmall", - nullptr, - "Ydieresissmall", - nullptr, - "onesuperior", - "twosuperior", - "threesuperior", - "foursuperior", - "fivesuperior", - "sixsuperior", - "sevensuperior", - "ninesuperior", - "zerosuperior", - nullptr, - "esuperior", - "rsuperior", - "tsuperior", - nullptr, - nullptr, - "isuperior", - "ssuperior", - "dsuperior", - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - "lsuperior", - "Ogoneksmall", - "Brevesmall", - "Macronsmall", - "bsuperior", - "nsuperior", - "msuperior", - "commasuperior", - "periodsuperior", - "Dotaccentsmall", - "Ringsmall", - nullptr, - nullptr, - nullptr, - nullptr -}; - -const char *winAnsiEncoding[256] = { - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - "space", - "exclam", - "quotedbl", - "numbersign", - "dollar", - "percent", - "ampersand", - "quotesingle", - "parenleft", - "parenright", - "asterisk", - "plus", - "comma", - "hyphen", - "period", - "slash", - "zero", - "one", - "two", - "three", - "four", - "five", - "six", - "seven", - "eight", - "nine", - "colon", - "semicolon", - "less", - "equal", - "greater", - "question", - "at", - "A", - "B", - "C", - "D", - "E", - "F", - "G", - "H", - "I", - "J", - "K", - "L", - "M", - "N", - "O", - "P", - "Q", - "R", - "S", - "T", - "U", - "V", - "W", - "X", - "Y", - "Z", - "bracketleft", - "backslash", - "bracketright", - "asciicircum", - "underscore", - "grave", - "a", - "b", - "c", - "d", - "e", - "f", - "g", - "h", - "i", - "j", - "k", - "l", - "m", - "n", - "o", - "p", - "q", - "r", - "s", - "t", - "u", - "v", - "w", - "x", - "y", - "z", - "braceleft", - "bar", - "braceright", - "asciitilde", - "bullet", - "Euro", - "bullet", - "quotesinglbase", - "florin", - "quotedblbase", - "ellipsis", - "dagger", - "daggerdbl", - "circumflex", - "perthousand", - "Scaron", - "guilsinglleft", - "OE", - "bullet", - "Zcaron", - "bullet", - "bullet", - "quoteleft", - "quoteright", - "quotedblleft", - "quotedblright", - "bullet", - "endash", - "emdash", - "tilde", - "trademark", - "scaron", - "guilsinglright", - "oe", - "bullet", - "zcaron", - "Ydieresis", - "space", - "exclamdown", - "cent", - "sterling", - "currency", - "yen", - "brokenbar", - "section", - "dieresis", - "copyright", - "ordfeminine", - "guillemotleft", - "logicalnot", - "hyphen", - "registered", - "macron", - "degree", - "plusminus", - "twosuperior", - "threesuperior", - "acute", - "mu", - "paragraph", - "periodcentered", - "cedilla", - "onesuperior", - "ordmasculine", - "guillemotright", - "onequarter", - "onehalf", - "threequarters", - "questiondown", - "Agrave", - "Aacute", - "Acircumflex", - "Atilde", - "Adieresis", - "Aring", - "AE", - "Ccedilla", - "Egrave", - "Eacute", - "Ecircumflex", - "Edieresis", - "Igrave", - "Iacute", - "Icircumflex", - "Idieresis", - "Eth", - "Ntilde", - "Ograve", - "Oacute", - "Ocircumflex", - "Otilde", - "Odieresis", - "multiply", - "Oslash", - "Ugrave", - "Uacute", - "Ucircumflex", - "Udieresis", - "Yacute", - "Thorn", - "germandbls", - "agrave", - "aacute", - "acircumflex", - "atilde", - "adieresis", - "aring", - "ae", - "ccedilla", - "egrave", - "eacute", - "ecircumflex", - "edieresis", - "igrave", - "iacute", - "icircumflex", - "idieresis", - "eth", - "ntilde", - "ograve", - "oacute", - "ocircumflex", - "otilde", - "odieresis", - "divide", - "oslash", - "ugrave", - "uacute", - "ucircumflex", - "udieresis", - "yacute", - "thorn", - "ydieresis" -}; - -const char *standardEncoding[256] = { - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - "space", - "exclam", - "quotedbl", - "numbersign", - "dollar", - "percent", - "ampersand", - "quoteright", - "parenleft", - "parenright", - "asterisk", - "plus", - "comma", - "hyphen", - "period", - "slash", - "zero", - "one", - "two", - "three", - "four", - "five", - "six", - "seven", - "eight", - "nine", - "colon", - "semicolon", - "less", - "equal", - "greater", - "question", - "at", - "A", - "B", - "C", - "D", - "E", - "F", - "G", - "H", - "I", - "J", - "K", - "L", - "M", - "N", - "O", - "P", - "Q", - "R", - "S", - "T", - "U", - "V", - "W", - "X", - "Y", - "Z", - "bracketleft", - "backslash", - "bracketright", - "asciicircum", - "underscore", - "quoteleft", - "a", - "b", - "c", - "d", - "e", - "f", - "g", - "h", - "i", - "j", - "k", - "l", - "m", - "n", - "o", - "p", - "q", - "r", - "s", - "t", - "u", - "v", - "w", - "x", - "y", - "z", - "braceleft", - "bar", - "braceright", - "asciitilde", - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - "exclamdown", - "cent", - "sterling", - "fraction", - "yen", - "florin", - "section", - "currency", - "quotesingle", - "quotedblleft", - "guillemotleft", - "guilsinglleft", - "guilsinglright", - "fi", - "fl", - nullptr, - "endash", - "dagger", - "daggerdbl", - "periodcentered", - nullptr, - "paragraph", - "bullet", - "quotesinglbase", - "quotedblbase", - "quotedblright", - "guillemotright", - "ellipsis", - "perthousand", - nullptr, - "questiondown", - nullptr, - "grave", - "acute", - "circumflex", - "tilde", - "macron", - "breve", - "dotaccent", - "dieresis", - nullptr, - "ring", - "cedilla", - nullptr, - "hungarumlaut", - "ogonek", - "caron", - "emdash", - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - "AE", - nullptr, - "ordfeminine", - nullptr, - nullptr, - nullptr, - nullptr, - "Lslash", - "Oslash", - "OE", - "ordmasculine", - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - "ae", - nullptr, - nullptr, - nullptr, - "dotlessi", - nullptr, - nullptr, - "lslash", - "oslash", - "oe", - "germandbls", - nullptr, - nullptr, - nullptr, - nullptr -}; - -const char *expertEncoding[256] = { - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - "space", - "exclamsmall", - "Hungarumlautsmall", - nullptr, - "dollaroldstyle", - "dollarsuperior", - "ampersandsmall", - "Acutesmall", - "parenleftsuperior", - "parenrightsuperior", - "twodotenleader", - "onedotenleader", - "comma", - "hyphen", - "period", - "fraction", - "zerooldstyle", - "oneoldstyle", - "twooldstyle", - "threeoldstyle", - "fouroldstyle", - "fiveoldstyle", - "sixoldstyle", - "sevenoldstyle", - "eightoldstyle", - "nineoldstyle", - "colon", - "semicolon", - "commasuperior", - "threequartersemdash", - "periodsuperior", - "questionsmall", - nullptr, - "asuperior", - "bsuperior", - "centsuperior", - "dsuperior", - "esuperior", - nullptr, - nullptr, - nullptr, - "isuperior", - nullptr, - nullptr, - "lsuperior", - "msuperior", - "nsuperior", - "osuperior", - nullptr, - nullptr, - "rsuperior", - "ssuperior", - "tsuperior", - nullptr, - "ff", - "fi", - "fl", - "ffi", - "ffl", - "parenleftinferior", - nullptr, - "parenrightinferior", - "Circumflexsmall", - "hyphensuperior", - "Gravesmall", - "Asmall", - "Bsmall", - "Csmall", - "Dsmall", - "Esmall", - "Fsmall", - "Gsmall", - "Hsmall", - "Ismall", - "Jsmall", - "Ksmall", - "Lsmall", - "Msmall", - "Nsmall", - "Osmall", - "Psmall", - "Qsmall", - "Rsmall", - "Ssmall", - "Tsmall", - "Usmall", - "Vsmall", - "Wsmall", - "Xsmall", - "Ysmall", - "Zsmall", - "colonmonetary", - "onefitted", - "rupiah", - "Tildesmall", - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - "exclamdownsmall", - "centoldstyle", - "Lslashsmall", - nullptr, - nullptr, - "Scaronsmall", - "Zcaronsmall", - "Dieresissmall", - "Brevesmall", - "Caronsmall", - nullptr, - "Dotaccentsmall", - nullptr, - nullptr, - "Macronsmall", - nullptr, - nullptr, - "figuredash", - "hypheninferior", - nullptr, - nullptr, - "Ogoneksmall", - "Ringsmall", - "Cedillasmall", - nullptr, - nullptr, - nullptr, - "onequarter", - "onehalf", - "threequarters", - "questiondownsmall", - "oneeighth", - "threeeighths", - "fiveeighths", - "seveneighths", - "onethird", - "twothirds", - nullptr, - nullptr, - "zerosuperior", - "onesuperior", - "twosuperior", - "threesuperior", - "foursuperior", - "fivesuperior", - "sixsuperior", - "sevensuperior", - "eightsuperior", - "ninesuperior", - "zeroinferior", - "oneinferior", - "twoinferior", - "threeinferior", - "fourinferior", - "fiveinferior", - "sixinferior", - "seveninferior", - "eightinferior", - "nineinferior", - "centinferior", - "dollarinferior", - "periodinferior", - "commainferior", - "Agravesmall", - "Aacutesmall", - "Acircumflexsmall", - "Atildesmall", - "Adieresissmall", - "Aringsmall", - "AEsmall", - "Ccedillasmall", - "Egravesmall", - "Eacutesmall", - "Ecircumflexsmall", - "Edieresissmall", - "Igravesmall", - "Iacutesmall", - "Icircumflexsmall", - "Idieresissmall", - "Ethsmall", - "Ntildesmall", - "Ogravesmall", - "Oacutesmall", - "Ocircumflexsmall", - "Otildesmall", - "Odieresissmall", - "OEsmall", - "Oslashsmall", - "Ugravesmall", - "Uacutesmall", - "Ucircumflexsmall", - "Udieresissmall", - "Yacutesmall", - "Thornsmall", - "Ydieresissmall" -}; - -const char *symbolEncoding[256] = { - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - "space", - "exclam", - "universal", - "numbersign", - "existential", - "percent", - "ampersand", - "suchthat", - "parenleft", - "parenright", - "asteriskmath", - "plus", - "comma", - "minus", - "period", - "slash", - "zero", - "one", - "two", - "three", - "four", - "five", - "six", - "seven", - "eight", - "nine", - "colon", - "semicolon", - "less", - "equal", - "greater", - "question", - "congruent", - "Alpha", - "Beta", - "Chi", - "Delta", - "Epsilon", - "Phi", - "Gamma", - "Eta", - "Iota", - "theta1", - "Kappa", - "Lambda", - "Mu", - "Nu", - "Omicron", - "Pi", - "Theta", - "Rho", - "Sigma", - "Tau", - "Upsilon", - "sigma1", - "Omega", - "Xi", - "Psi", - "Zeta", - "bracketleft", - "therefore", - "bracketright", - "perpendicular", - "underscore", - "radicalex", - "alpha", - "beta", - "chi", - "delta", - "epsilon", - "phi", - "gamma", - "eta", - "iota", - "phi1", - "kappa", - "lambda", - "mu", - "nu", - "omicron", - "pi", - "theta", - "rho", - "sigma", - "tau", - "upsilon", - "omega1", - "omega", - "xi", - "psi", - "zeta", - "braceleft", - "bar", - "braceright", - "similar", - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - "Upsilon1", - "minute", - "lessequal", - "fraction", - "infinity", - "florin", - "club", - "diamond", - "heart", - "spade", - "arrowboth", - "arrowleft", - "arrowup", - "arrowright", - "arrowdown", - "degree", - "plusminus", - "second", - "greaterequal", - "multiply", - "proportional", - "partialdiff", - "bullet", - "divide", - "notequal", - "equivalence", - "approxequal", - "ellipsis", - "arrowvertex", - "arrowhorizex", - "carriagereturn", - "aleph", - "Ifraktur", - "Rfraktur", - "weierstrass", - "circlemultiply", - "circleplus", - "emptyset", - "intersection", - "union", - "propersuperset", - "reflexsuperset", - "notsubset", - "propersubset", - "reflexsubset", - "element", - "notelement", - "angle", - "gradient", - "registerserif", - "copyrightserif", - "trademarkserif", - "product", - "radical", - "dotmath", - "logicalnot", - "logicaland", - "logicalor", - "arrowdblboth", - "arrowdblleft", - "arrowdblup", - "arrowdblright", - "arrowdbldown", - "lozenge", - "angleleft", - "registersans", - "copyrightsans", - "trademarksans", - "summation", - "parenlefttp", - "parenleftex", - "parenleftbt", - "bracketlefttp", - "bracketleftex", - "bracketleftbt", - "bracelefttp", - "braceleftmid", - "braceleftbt", - "braceex", - nullptr, - "angleright", - "integral", - "integraltp", - "integralex", - "integralbt", - "parenrighttp", - "parenrightex", - "parenrightbt", - "bracketrighttp", - "bracketrightex", - "bracketrightbt", - "bracerighttp", - "bracerightmid", - "bracerightbt", - nullptr -}; - -const char *zapfDingbatsEncoding[256] = { - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - "space", - "a1", - "a2", - "a202", - "a3", - "a4", - "a5", - "a119", - "a118", - "a117", - "a11", - "a12", - "a13", - "a14", - "a15", - "a16", - "a105", - "a17", - "a18", - "a19", - "a20", - "a21", - "a22", - "a23", - "a24", - "a25", - "a26", - "a27", - "a28", - "a6", - "a7", - "a8", - "a9", - "a10", - "a29", - "a30", - "a31", - "a32", - "a33", - "a34", - "a35", - "a36", - "a37", - "a38", - "a39", - "a40", - "a41", - "a42", - "a43", - "a44", - "a45", - "a46", - "a47", - "a48", - "a49", - "a50", - "a51", - "a52", - "a53", - "a54", - "a55", - "a56", - "a57", - "a58", - "a59", - "a60", - "a61", - "a62", - "a63", - "a64", - "a65", - "a66", - "a67", - "a68", - "a69", - "a70", - "a71", - "a72", - "a73", - "a74", - "a203", - "a75", - "a204", - "a76", - "a77", - "a78", - "a79", - "a81", - "a82", - "a83", - "a84", - "a97", - "a98", - "a99", - "a100", - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - "a101", - "a102", - "a103", - "a104", - "a106", - "a107", - "a108", - "a112", - "a111", - "a110", - "a109", - "a120", - "a121", - "a122", - "a123", - "a124", - "a125", - "a126", - "a127", - "a128", - "a129", - "a130", - "a131", - "a132", - "a133", - "a134", - "a135", - "a136", - "a137", - "a138", - "a139", - "a140", - "a141", - "a142", - "a143", - "a144", - "a145", - "a146", - "a147", - "a148", - "a149", - "a150", - "a151", - "a152", - "a153", - "a154", - "a155", - "a156", - "a157", - "a158", - "a159", - "a160", - "a161", - "a163", - "a164", - "a196", - "a165", - "a192", - "a166", - "a167", - "a168", - "a169", - "a170", - "a171", - "a172", - "a173", - "a162", - "a174", - "a175", - "a176", - "a177", - "a178", - "a179", - "a193", - "a180", - "a199", - "a181", - "a200", - "a182", - nullptr, - "a201", - "a183", - "a184", - "a197", - "a185", - "a194", - "a198", - "a186", - "a195", - "a187", - "a188", - "a189", - "a190", - "a191", - nullptr -}; diff --git a/Build/source/libs/poppler/poppler-src/poppler/FontEncodingTables.h b/Build/source/libs/poppler/poppler-src/poppler/FontEncodingTables.h deleted file mode 100644 index a417b324e48..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/FontEncodingTables.h +++ /dev/null @@ -1,20 +0,0 @@ -//======================================================================== -// -// FontEncodingTables.h -// -// Copyright 2001-2003 Glyph & Cog, LLC -// -//======================================================================== - -#ifndef FONTENCODINGTABLES_H -#define FONTENCODINGTABLES_H - -extern const char *macRomanEncoding[]; -extern const char *macExpertEncoding[]; -extern const char *winAnsiEncoding[]; -extern const char *standardEncoding[]; -extern const char *expertEncoding[]; -extern const char *symbolEncoding[]; -extern const char *zapfDingbatsEncoding[]; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/FontInfo.cc b/Build/source/libs/poppler/poppler-src/poppler/FontInfo.cc deleted file mode 100644 index 18f21f40aff..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/FontInfo.cc +++ /dev/null @@ -1,232 +0,0 @@ -//======================================================================== -// -// FontInfo.cc -// -// Copyright (C) 2005, 2006 Kristian Høgsberg <krh@redhat.com> -// Copyright (C) 2005-2008, 2010, 2017, 2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2005 Brad Hards <bradh@frogmouth.net> -// Copyright (C) 2006 Kouhei Sutou <kou@cozmixng.org> -// Copyright (C) 2009 Pino Toscano <pino@kde.org> -// Copyright (C) 2010 Hib Eris <hib@hiberis.nl> -// Copyright (C) 2010, 2012 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2010, 2013 Thomas Freitag <Thomas.Freitag@alfa.de> -// Copyright (C) 2011 Carlos Garcia Campos <carlosgc@gnome.org> -// Copyright (C) 2012 Fabio D'Urso <fabiodurso@hotmail.it> -// 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 -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -//======================================================================== -// -// Based on code from pdffonts.cc -// -// Copyright 2001-2007 Glyph & Cog, LLC -// -//======================================================================== - -#include "config.h" -#include <stdio.h> -#include <stdlib.h> -#include <stddef.h> -#include <string.h> -#include <math.h> -#include "GlobalParams.h" -#include "Error.h" -#include "Object.h" -#include "Dict.h" -#include "GfxFont.h" -#include "Annot.h" -#include "PDFDoc.h" -#include "FontInfo.h" - -FontInfoScanner::FontInfoScanner(PDFDoc *docA, int firstPage) { - doc = docA; - currentPage = firstPage + 1; -} - -FontInfoScanner::~FontInfoScanner() { -} - -GooList *FontInfoScanner::scan(int nPages) { - GooList *result; - Page *page; - Dict *resDict; - Annots *annots; - int lastPage; - - if (currentPage > doc->getNumPages()) { - return nullptr; - } - - result = new GooList(); - - lastPage = currentPage + nPages; - if (lastPage > doc->getNumPages() + 1) { - lastPage = doc->getNumPages() + 1; - } - - XRef *xrefA = doc->getXRef()->copy(); - for (int pg = currentPage; pg < lastPage; ++pg) { - page = doc->getPage(pg); - if (!page) continue; - - if ((resDict = page->getResourceDictCopy(xrefA))) { - scanFonts(xrefA, resDict, result); - delete resDict; - } - annots = page->getAnnots(); - for (int i = 0; i < annots->getNumAnnots(); ++i) { - Object obj1 = annots->getAnnot(i)->getAppearanceResDict(); - if (obj1.isDict()) { - scanFonts(xrefA, obj1.getDict(), result); - } - } - } - - currentPage = lastPage; - - delete xrefA; - return result; -} - -void FontInfoScanner::scanFonts(XRef *xrefA, Dict *resDict, GooList *fontsList) { - GfxFontDict *gfxFontDict; - GfxFont *font; - - // scan the fonts in this resource dictionary - gfxFontDict = nullptr; - Object obj1 = resDict->lookupNF("Font"); - if (obj1.isRef()) { - Object obj2 = obj1.fetch(xrefA); - if (obj2.isDict()) { - Ref r = obj1.getRef(); - gfxFontDict = new GfxFontDict(xrefA, &r, obj2.getDict()); - } - } else if (obj1.isDict()) { - gfxFontDict = new GfxFontDict(xrefA, nullptr, obj1.getDict()); - } - if (gfxFontDict) { - for (int i = 0; i < gfxFontDict->getNumFonts(); ++i) { - if ((font = gfxFontDict->getFont(i))) { - Ref fontRef = *font->getID(); - - // add this font to the list if not already found - if (fonts.find(fontRef.num) == fonts.end()) { - fontsList->append(new FontInfo(font, xrefA)); - fonts.insert(fontRef.num); - } - } - } - delete gfxFontDict; - } - - // recursively scan any resource dictionaries in objects in this - // resource dictionary - const char *resTypes[] = { "XObject", "Pattern" }; - for (Guint resType = 0; resType < sizeof(resTypes) / sizeof(resTypes[0]); ++resType) { - Object objDict = resDict->lookup(resTypes[resType]); - if (objDict.isDict()) { - for (int i = 0; i < objDict.dictGetLength(); ++i) { - obj1 = objDict.dictGetValNF(i); - if (obj1.isRef()) { - // check for an already-seen object - const Ref r = obj1.getRef(); - if (visitedObjects.find(r.num) != visitedObjects.end()) { - continue; - } - - visitedObjects.insert(r.num); - } - - Object obj2 = obj1.fetch(xrefA); - if (obj2.isStream()) { - Object resObj = obj2.streamGetDict()->lookup("Resources"); - if (resObj.isDict() && resObj.getDict() != resDict) { - scanFonts(xrefA, resObj.getDict(), fontsList); - } - } - } - } - } -} - -FontInfo::FontInfo(GfxFont *font, XRef *xref) { - const GooString *origName; - - fontRef = *font->getID(); - - // font name - origName = font->getName(); - if (origName != nullptr) { - name = font->getName()->copy(); - } else { - name = nullptr; - } - - // font type - type = (FontInfo::Type)font->getType(); - - // check for an embedded font - if (font->getType() == fontType3) { - emb = gTrue; - } else { - emb = font->getEmbeddedFontID(&embRef); - } - - file = nullptr; - substituteName = nullptr; - if (!emb) - { - SysFontType dummy; - int dummy2; - GooString substituteNameAux; - file = globalParams->findSystemFontFile(font, &dummy, &dummy2, &substituteNameAux); - if (substituteNameAux.getLength() > 0) - substituteName = substituteNameAux.copy(); - } - encoding = font->getEncodingName()->copy(); - - // look for a ToUnicode map - hasToUnicode = gFalse; - Object fontObj = xref->fetch(fontRef.num, fontRef.gen); - if (fontObj.isDict()) { - hasToUnicode = fontObj.dictLookup("ToUnicode").isStream(); - } - - // check for a font subset name: capital letters followed by a '+' - // sign - subset = gFalse; - if (name) { - int i; - for (i = 0; i < name->getLength(); ++i) { - if (name->getChar(i) < 'A' || name->getChar(i) > 'Z') { - break; - } - } - subset = i > 0 && i < name->getLength() && name->getChar(i) == '+'; - } -} - -FontInfo::FontInfo(FontInfo& f) { - name = f.name ? f.name->copy() : nullptr; - file = f.file ? f.file->copy() : nullptr; - encoding = f.encoding ? f.encoding->copy() : nullptr; - substituteName = f.substituteName ? f.substituteName->copy() : nullptr; - type = f.type; - emb = f.emb; - subset = f.subset; - hasToUnicode = f.hasToUnicode; - fontRef = f.fontRef; - embRef = f.embRef; -} - -FontInfo::~FontInfo() { - delete name; - delete file; - delete encoding; - if (substituteName) - delete substituteName; -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/FontInfo.h b/Build/source/libs/poppler/poppler-src/poppler/FontInfo.h deleted file mode 100644 index f6501466b52..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/FontInfo.h +++ /dev/null @@ -1,105 +0,0 @@ -//======================================================================== -// -// FontInfo.h -// -// Copyright (C) 2005 Kristian Høgsberg <krh@redhat.com> -// Copyright (C) 2005-2008, 2010, 2011, 2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2005 Brad Hards <bradh@frogmouth.net> -// Copyright (C) 2009 Pino Toscano <pino@kde.org> -// Copyright (C) 2012 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2013 Thomas Freitag <Thomas.Freitag@alfa.de> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -//======================================================================== -// -// Based on code from pdffonts.cc -// -// Copyright 2001-2007 Glyph & Cog, LLC -// -//======================================================================== - -#ifndef FONT_INFO_H -#define FONT_INFO_H - -#include "Object.h" -#include "goo/gtypes.h" -#include "goo/GooList.h" - -class GfxFont; -class PDFDoc; - -class FontInfo { -public: - enum Type { - unknown, - Type1, - Type1C, - Type1COT, - Type3, - TrueType, - TrueTypeOT, - CIDType0, - CIDType0C, - CIDType0COT, - CIDTrueType, - CIDTrueTypeOT - }; - - // Constructor. - FontInfo(GfxFont *fontA, XRef *xrefA); - // Copy constructor - FontInfo(FontInfo& f); - // Destructor. - ~FontInfo(); - - FontInfo& operator=(const FontInfo &) = delete; - - GooString *getName() { return name; }; - GooString *getSubstituteName() { return substituteName; }; - GooString *getFile() { return file; }; - GooString *getEncoding() { return encoding; }; - Type getType() { return type; }; - GBool getEmbedded() { return emb; }; - GBool getSubset() { return subset; }; - GBool getToUnicode() { return hasToUnicode; }; - Ref getRef() { return fontRef; }; - Ref getEmbRef() { return embRef; }; - -private: - GooString *name; - GooString *substituteName; - GooString *file; - GooString *encoding; - Type type; - GBool emb; - GBool subset; - GBool hasToUnicode; - Ref fontRef; - Ref embRef; -}; - -class FontInfoScanner { -public: - - // Constructor. - FontInfoScanner(PDFDoc *doc, int firstPage = 0); - // Destructor. - ~FontInfoScanner(); - - GooList *scan(int nPages); - -private: - - PDFDoc *doc; - int currentPage; - std::set<int> fonts; - std::set<int> visitedObjects; - - void scanFonts(XRef *xrefA, Dict *resDict, GooList *fontsList); -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/Form.cc b/Build/source/libs/poppler/poppler-src/poppler/Form.cc deleted file mode 100644 index 3f2ab9a10bf..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/Form.cc +++ /dev/null @@ -1,2003 +0,0 @@ -//======================================================================== -// -// Form.cc -// -// This file is licensed under the GPLv2 or later -// -// Copyright 2006-2008 Julien Rebetez <julienr@svn.gnome.org> -// Copyright 2007-2012, 2015-2017 Albert Astals Cid <aacid@kde.org> -// Copyright 2007-2008, 2011 Carlos Garcia Campos <carlosgc@gnome.org> -// Copyright 2007, 2013, 2016 Adrian Johnson <ajohnson@redneon.com> -// Copyright 2007 Iñigo Martínez <inigomartinez@gmail.com> -// Copyright 2008, 2011 Pino Toscano <pino@kde.org> -// Copyright 2008 Michael Vrable <mvrable@cs.ucsd.edu> -// Copyright 2009 Matthias Drochner <M.Drochner@fz-juelich.de> -// Copyright 2009 KDAB via Guillermo Amaral <gamaral@amaral.com.mx> -// Copyright 2010, 2012 Mark Riedesel <mark@klowner.com> -// Copyright 2012 Fabio D'Urso <fabiodurso@hotmail.it> -// Copyright 2015 André Guerreiro <aguerreiro1985@gmail.com> -// Copyright 2015 André Esser <bepandre@hotmail.com> -// Copyright 2017 Hans-Ulrich Jüttner <huj@froreich-bioscientia.de> -// Copyright 2017 Bernd Kuhls <berndkuhls@hotmail.com> -// Copyright 2018 Andre Heinecke <aheinecke@intevation.de> -// Copyright 2018 Klarälvdalens Datakonsult AB, a KDAB Group company, <info@kdab.com>. Work sponsored by the LiMux project of the city of Munich -// Copyright 2018 Chinmoy Ranjan Pradhan <chinmoyrp65@protonmail.com> -// -//======================================================================== - -#include <config.h> - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include <set> -#include <limits> -#include <stddef.h> -#include <stdlib.h> -#include <string.h> -#include <ctype.h> -#include "goo/gmem.h" -#include "goo/GooString.h" -#include "Error.h" -#include "Object.h" -#include "Array.h" -#include "Dict.h" -#include "Gfx.h" -#include "Form.h" -#include "PDFDoc.h" -#include "DateInfo.h" -#ifdef ENABLE_NSS3 -#include "SignatureHandler.h" -#endif -#include "SignatureInfo.h" -#include "XRef.h" -#include "PDFDocEncoding.h" -#include "Annot.h" -#include "Link.h" -#include "Lexer.h" - -//return a newly allocated char* containing an UTF16BE string of size length -char* pdfDocEncodingToUTF16 (const GooString* orig, int* length) -{ - //double size, a unicode char takes 2 char, add 2 for the unicode marker - *length = 2+2*orig->getLength(); - char *result = new char[(*length)]; - const char *cstring = orig->getCString(); - //unicode marker - result[0] = (char)0xfe; - result[1] = (char)0xff; - //convert to utf16 - for(int i=2,j=0; i<(*length); i+=2,j++) { - Unicode u = pdfDocEncoding[(unsigned int)((unsigned char)cstring[j])]&0xffff; - result[i] = (u >> 8) & 0xff; - result[i+1] = u & 0xff; - } - return result; -} - -static GooString *convertToUtf16(GooString *pdfDocEncodingString) -{ - int tmp_length; - char* tmp_str = pdfDocEncodingToUTF16(pdfDocEncodingString, &tmp_length); - delete pdfDocEncodingString; - pdfDocEncodingString = new GooString(tmp_str, tmp_length); - delete [] tmp_str; - return pdfDocEncodingString; -} - - -FormWidget::FormWidget(PDFDoc *docA, Object *aobj, unsigned num, Ref aref, FormField *fieldA) -{ - ref = aref; - ID = 0; - childNum = num; - doc = docA; - xref = doc->getXRef(); - obj = aobj->copy(); - type = formUndef; - field = fieldA; - widget = nullptr; -} - -FormWidget::~FormWidget() -{ - if (widget) - widget->decRefCnt(); -} - -#ifdef DEBUG_FORMS -void FormWidget::print(int indent) { - printf ("%*s+ (%d %d): [widget]\n", indent, "", ref.num, ref.gen); -} -#endif - -void FormWidget::createWidgetAnnotation() { - if (widget) - return; - - Object obj1(ref.num, ref.gen); - widget = new AnnotWidget(doc, &obj, &obj1, field); -} - -GBool FormWidget::inRect(double x, double y) const { - return widget ? widget->inRect(x, y) : gFalse; -} - -void FormWidget::getRect(double *x1, double *y1, double *x2, double *y2) const { - if (widget) - widget->getRect(x1, y1, x2, y2); -} - -bool FormWidget::isReadOnly() const -{ - return field->isReadOnly(); -} - -void FormWidget::setReadOnly(bool value) -{ - field->setReadOnly(value); -} - -int FormWidget::encodeID (unsigned pageNum, unsigned fieldNum) -{ - return (pageNum << 4*sizeof(unsigned)) + fieldNum; -} - -void FormWidget::decodeID (unsigned id, unsigned* pageNum, unsigned* fieldNum) -{ - *pageNum = id >> 4*sizeof(unsigned); - *fieldNum = (id << 4*sizeof(unsigned)) >> 4*sizeof(unsigned); -} - -const GooString *FormWidget::getPartialName() const { - return field->getPartialName(); -} - -void FormWidget::setPartialName(const GooString &name) -{ - field->setPartialName(name); -} - -const GooString *FormWidget::getAlternateUiName() const { - return field->getAlternateUiName(); -} - -const GooString *FormWidget::getMappingName() const { - return field->getMappingName(); -} - -GooString *FormWidget::getFullyQualifiedName() { - return field->getFullyQualifiedName(); -} - -LinkAction *FormWidget::getActivationAction() { - return widget ? widget->getAction() : nullptr; -} - -LinkAction *FormWidget::getAdditionalAction(Annot::FormAdditionalActionsType type) { - return widget ? widget->getFormAdditionalAction(type) : nullptr; -} - -FormWidgetButton::FormWidgetButton (PDFDoc *docA, Object *aobj, unsigned num, Ref ref, FormField *p) : - FormWidget(docA, aobj, num, ref, p) -{ - type = formButton; - onStr = nullptr; - - // Find the name of the ON state in the AP dictionnary - // The reference say the Off state, if it existe, _must_ be stored in the AP dict under the name /Off - // The "on" state may be stored under any other name - Object obj1 = obj.dictLookup("AP"); - if (obj1.isDict()) { - Object obj2 = obj1.dictLookup("N"); - if (obj2.isDict()) { - for (int i = 0; i < obj2.dictGetLength(); i++) { - char *key = obj2.dictGetKey(i); - if (strcmp (key, "Off") != 0) { - onStr = new GooString (key); - break; - } - } - } - } -} - -char *FormWidgetButton::getOnStr() { - if (onStr) - return onStr->getCString(); - - // 12.7.4.2.3 Check Boxes - // Yes should be used as the name for the on state - return parent()->getButtonType() == formButtonCheck ? (char *)"Yes" : nullptr; -} - -FormWidgetButton::~FormWidgetButton () -{ - delete onStr; -} - -FormButtonType FormWidgetButton::getButtonType () const -{ - return parent()->getButtonType (); -} - -void FormWidgetButton::setAppearanceState(const char *state) { - if (!widget) - return; - widget->setAppearanceState(state); -} - -void FormWidgetButton::updateWidgetAppearance() -{ - // The appearance stream must NOT be regenerated for this widget type -} - -void FormWidgetButton::setState (GBool astate) -{ - //pushButtons don't have state - if (parent()->getButtonType() == formButtonPush) - return; - - // Silently return if can't set ON state - if (astate && !onStr) - return; - - parent()->setState(astate ? onStr->getCString() : (char *)"Off"); - // Parent will call setAppearanceState() -} - -GBool FormWidgetButton::getState () -{ - return onStr ? parent()->getState(onStr->getCString()) : gFalse; -} - -FormFieldButton *FormWidgetButton::parent() const -{ - return static_cast<FormFieldButton*>(field); -} - - -FormWidgetText::FormWidgetText (PDFDoc *docA, Object *aobj, unsigned num, Ref ref, FormField *p) : - FormWidget(docA, aobj, num, ref, p) -{ - type = formText; -} - -const GooString* FormWidgetText::getContent () const -{ - return parent()->getContent(); -} - -void FormWidgetText::updateWidgetAppearance() -{ - if (widget) - widget->updateAppearanceStream(); -} - -bool FormWidgetText::isMultiline () const -{ - return parent()->isMultiline(); -} - -bool FormWidgetText::isPassword () const -{ - return parent()->isPassword(); -} - -bool FormWidgetText::isFileSelect () const -{ - return parent()->isFileSelect(); -} - -bool FormWidgetText::noSpellCheck () const -{ - return parent()->noSpellCheck(); -} - -bool FormWidgetText::noScroll () const -{ - return parent()->noScroll(); -} - -bool FormWidgetText::isComb () const -{ - return parent()->isComb(); -} - -bool FormWidgetText::isRichText () const -{ - return parent()->isRichText(); -} - -int FormWidgetText::getMaxLen () const -{ - return parent()->getMaxLen (); -} - -double FormWidgetText::getTextFontSize() -{ - return parent()->getTextFontSize(); -} - -void FormWidgetText::setTextFontSize(int fontSize) -{ - parent()->setTextFontSize(fontSize); -} - -void FormWidgetText::setContent(const GooString* new_content) -{ - parent()->setContentCopy(new_content); -} - -FormFieldText *FormWidgetText::parent() const -{ - return static_cast<FormFieldText*>(field); -} - -FormWidgetChoice::FormWidgetChoice(PDFDoc *docA, Object *aobj, unsigned num, Ref ref, FormField *p) : - FormWidget(docA, aobj, num, ref, p) -{ - type = formChoice; -} - -FormWidgetChoice::~FormWidgetChoice() -{ -} - -bool FormWidgetChoice::_checkRange (int i) const -{ - if (i < 0 || i >= parent()->getNumChoices()) { - error(errInternal, -1, "FormWidgetChoice::_checkRange i out of range : {0:d}", i); - return false; - } - return true; -} - -void FormWidgetChoice::select (int i) -{ - if (!_checkRange(i)) return; - parent()->select(i); -} - -void FormWidgetChoice::toggle (int i) -{ - if (!_checkRange(i)) return; - parent()->toggle(i); -} - -void FormWidgetChoice::deselectAll () -{ - parent()->deselectAll(); -} - -const GooString* FormWidgetChoice::getEditChoice () const -{ - if (!hasEdit()) { - error(errInternal, -1, "FormFieldChoice::getEditChoice called on a non-editable choice\n"); - return nullptr; - } - return parent()->getEditChoice(); -} - -void FormWidgetChoice::updateWidgetAppearance() -{ - if (widget) - widget->updateAppearanceStream(); -} - -bool FormWidgetChoice::isSelected (int i) const -{ - if (!_checkRange(i)) return false; - return parent()->isSelected(i); -} - -void FormWidgetChoice::setEditChoice (const GooString* new_content) -{ - if (!hasEdit()) { - error(errInternal, -1, "FormFieldChoice::setEditChoice : trying to edit an non-editable choice\n"); - return; - } - - parent()->setEditChoice(new_content); -} - -int FormWidgetChoice::getNumChoices() const -{ - return parent()->getNumChoices(); -} - -const GooString* FormWidgetChoice::getChoice(int i) const -{ - return parent()->getChoice(i); -} - -bool FormWidgetChoice::isCombo () const -{ - return parent()->isCombo(); -} - -bool FormWidgetChoice::hasEdit () const -{ - return parent()->hasEdit(); -} - -bool FormWidgetChoice::isMultiSelect () const -{ - return parent()->isMultiSelect(); -} - -bool FormWidgetChoice::noSpellCheck () const -{ - return parent()->noSpellCheck(); -} - -bool FormWidgetChoice::commitOnSelChange () const -{ - return parent()->commitOnSelChange(); -} - -bool FormWidgetChoice::isListBox () const -{ - return parent()->isListBox(); -} - -FormFieldChoice *FormWidgetChoice::parent() const -{ - return static_cast<FormFieldChoice*>(field); -} - -FormWidgetSignature::FormWidgetSignature(PDFDoc *docA, Object *aobj, unsigned num, Ref ref, FormField *p) : - FormWidget(docA, aobj, num, ref, p) -{ - type = formSignature; -} - -const GooString *FormWidgetSignature::getSignature() const -{ - return static_cast<FormFieldSignature*>(field)->getSignature(); -} - -SignatureInfo *FormWidgetSignature::validateSignature(bool doVerifyCert, bool forceRevalidation, time_t validationTime) -{ - return static_cast<FormFieldSignature*>(field)->validateSignature(doVerifyCert, forceRevalidation, validationTime); -} - -std::vector<Goffset> FormWidgetSignature::getSignedRangeBounds() -{ - Object* obj = static_cast<FormFieldSignature*>(field)->getByteRange(); - std::vector<Goffset> range_vec; - if (obj->isArray()) - { - if (obj->arrayGetLength() == 4) - { - for (int i = 0; i < 2; ++i) - { - Object offsetObj(obj->arrayGet(2*i)); - Object lenObj(obj->arrayGet(2*i+1)); - if (offsetObj.isIntOrInt64() && lenObj.isIntOrInt64()) - { - Goffset offset = offsetObj.getIntOrInt64(); - Goffset len = lenObj.getIntOrInt64(); - range_vec.push_back(offset); - range_vec.push_back(offset+len); - } - } - } - } - return range_vec; -} - -GooString* FormWidgetSignature::getCheckedSignature(Goffset *checkedFileSize) -{ - Goffset start = 0; - Goffset end = 0; - const std::vector<Goffset> ranges = getSignedRangeBounds(); - if (ranges.size() == 4) - { - start = ranges[1]; - end = ranges[2]; - } - if (end >= start+6) - { - BaseStream* stream = doc->getBaseStream(); - *checkedFileSize = stream->getLength(); - Goffset len = end-start; - stream->setPos(end-1); - int c2 = stream->lookChar(); - stream->setPos(start); - int c1 = stream->getChar(); - // PDF signatures are first ASN1 DER, then hex encoded PKCS#7 structures, - // possibly padded with 0 characters and enclosed in '<' and '>'. - // The ASN1 DER encoding of a PKCS#7 structure must start with the tag 0x30 - // for SEQUENCE. The next byte must be 0x80 for ASN1 DER indefinite length - // encoding or (0x80 + n) for ASN1 DER definite length encoding - // where n is the number of subsequent "length bytes" which big-endian - // encode the length of the content of the SEQUENCE following them. - if (len <= std::numeric_limits<int>::max() && *checkedFileSize > end && c1 == '<' && c2 == '>') - { - GooString gstr; - ++start; - --end; - len = end-start; - Goffset pos = 0; - do - { - c1 = stream->getChar(); - if (c1 == EOF) - return nullptr; - gstr.append(static_cast<char>(c1)); - } while (++pos < len); - if (gstr.getChar(0) == '3' && gstr.getChar(1) == '0') - { - if (gstr.getChar(2) == '8' && gstr.getChar(3) == '0') - { - // ASN1 DER indefinite length encoding: - // We only check that all characters up to the enclosing '>' - // are hex characters and that there are two hex encoded 0 bytes - // just before the enclosing '>' marking the end of the indefinite - // length encoding. - int paddingCount = 0; - while (gstr.getChar(len-1) == '0' && gstr.getChar(len-2) == '0') - { - ++paddingCount; - len -= 2; - } - if (paddingCount < 2 || len%2 == 1) - len = 0; - } - else if (gstr.getChar(2) == '8') - { - // ASN1 DER definite length encoding: - // We calculate the length of the following bytes from the length bytes and - // check that after the length bytes and the following calculated number of - // bytes all bytes up to the enclosing '>' character are hex encoded 0 bytes. - int lenBytes = gstr.getChar(3) - '0'; - if (lenBytes > 0 && lenBytes <= 4) - { - int sigLen = 0; - for (int i = 0; i < 2*lenBytes; ++i) - { - sigLen <<= 4; - char c = gstr.getChar(i+4); - if (isdigit(c)) - sigLen += c - '0'; - else if (isxdigit(c) && c >= 'a') - sigLen += c - 'a' + 10; - else if (isxdigit(c) && c >= 'A') - sigLen += c - 'A' + 10; - else - { - len = 0; - break; - } - } - if (sigLen > 0 && 2*(sigLen+lenBytes) <= len-4) - { - for (int i = 2*(sigLen+lenBytes)+4; i < len; ++i) - { - if (gstr.getChar(i) != '0') - { - len = 0; - break; - } - } - } - else - len = 0; - } - } - for (int i = 0; i < len; ++i) - { - if (!isxdigit(gstr.getChar(i))) - len = 0; - } - if (len > 0) - { - return new GooString(&gstr, 0, len); - } - } - } - } - return nullptr; -} - -void FormWidgetSignature::updateWidgetAppearance() -{ - // Unimplemented -} - - -//======================================================================== -// FormField -//======================================================================== - -FormField::FormField(PDFDoc *docA, Object *aobj, const Ref& aref, FormField *parentA, std::set<int> *usedParents, FormFieldType ty) -{ - doc = docA; - xref = doc->getXRef(); - obj = aobj->copy(); - Dict* dict = obj.getDict(); - ref.num = ref.gen = 0; - type = ty; - parent = parentA; - numChildren = 0; - children = nullptr; - terminal = false; - widgets = nullptr; - readOnly = false; - defaultAppearance = nullptr; - fullyQualifiedName = nullptr; - quadding = quaddingLeftJustified; - hasQuadding = gFalse; - - ref = aref; - - //childs - Object obj1 = dict->lookup("Kids"); - if (obj1.isArray()) { - // Load children - for (int i = 0 ; i < obj1.arrayGetLength(); i++) { - Object childRef = obj1.arrayGetNF(i); - if (!childRef.isRef()) { - error (errSyntaxError, -1, "Invalid form field renference"); - continue; - } - Object childObj = obj1.arrayGet(i); - if (!childObj.isDict()) { - error (errSyntaxError, -1, "Form field child is not a dictionary"); - continue; - } - - const Ref ref = childRef.getRef(); - if (usedParents->find(ref.num) == usedParents->end()) { - // Field child: it could be a form field or a widget or composed dict - Object obj2 = childObj.dictLookupNF("Parent"); - Object obj3 = childObj.dictLookup("Parent"); - if (obj2.isRef() || obj3.isDict()) { - // Child is a form field or composed dict - // We create the field, if it's composed - // it will create the widget as a child - std::set<int> usedParentsAux = *usedParents; - usedParentsAux.insert(ref.num); - - if (terminal) { - error(errSyntaxWarning, -1, "Field can't have both Widget AND Field as kids\n"); - continue; - } - - numChildren++; - children = (FormField**)greallocn(children, numChildren, sizeof(FormField*)); - children[numChildren - 1] = Form::createFieldFromDict(&childObj, doc, ref, this, &usedParentsAux); - } else { - obj2 = childObj.dictLookup("Subtype"); - if (obj2.isName("Widget")) { - // Child is a widget annotation - if (!terminal && numChildren > 0) { - error(errSyntaxWarning, -1, "Field can't have both Widget AND Field as kids\n"); - continue; - } - _createWidget(&childObj, ref); - } - } - } - } - } else { - // No children, if it's a composed dict, create the child widget - obj1 = dict->lookup("Subtype"); - if (obj1.isName("Widget")) - _createWidget(&obj, ref); - } - - //flags - obj1 = Form::fieldLookup(dict, "Ff"); - if (obj1.isInt()) { - int flags = obj1.getInt(); - if (flags & 0x1) { // 1 -> ReadOnly - readOnly = true; - } - if (flags & 0x2) { // 2 -> Required - //TODO - } - if (flags & 0x4) { // 3 -> NoExport - //TODO - } - } - - // Variable Text - obj1 = Form::fieldLookup(dict, "DA"); - if (obj1.isString()) - defaultAppearance = obj1.getString()->copy(); - - obj1 = Form::fieldLookup(dict, "Q"); - if (obj1.isInt()) { - quadding = static_cast<VariableTextQuadding>(obj1.getInt()); - hasQuadding = gTrue; - } - - obj1 = dict->lookup("T"); - if (obj1.isString()) { - partialName = obj1.getString()->copy(); - } else { - partialName = nullptr; - } - - obj1 = dict->lookup("TU"); - if (obj1.isString()) { - alternateUiName = obj1.getString()->copy(); - } else { - alternateUiName = nullptr; - } - - obj1 = dict->lookup("TM"); - if(obj1.isString()) { - mappingName = obj1.getString()->copy(); - } else { - mappingName = nullptr; - } -} - -void FormField::setPartialName(const GooString &name) -{ - delete partialName; - partialName = name.copy(); - - obj.getDict()->set("T", Object(name.copy())); - xref->setModifiedObject(&obj, ref); -} - -FormField::~FormField() -{ - if (!terminal) { - if(children) { - for (int i=0; i<numChildren; i++) - delete children[i]; - gfree(children); - } - } else { - for (int i = 0; i < numChildren; ++i) - delete widgets[i]; - gfree (widgets); - } - - delete defaultAppearance; - delete partialName; - delete alternateUiName; - delete mappingName; - delete fullyQualifiedName; -} - -#ifdef DEBUG_FORMS -void FormField::print(int indent) -{ - printf ("%*s- (%d %d): [container] terminal: %s children: %d\n", indent, "", ref.num, ref.gen, - terminal ? "Yes" : "No", numChildren); -} - -void FormField::printTree(int indent) -{ - print(indent); - if (terminal) { - for (int i = 0; i < numChildren; i++) - widgets[i]->print(indent + 4); - } else { - for (int i = 0; i < numChildren; i++) - children[i]->printTree(indent + 4); - } -} -#endif - -void FormField::fillChildrenSiblingsID() -{ - if (terminal) - return; - for (int i = 0; i < numChildren; i++) { - children[i]->fillChildrenSiblingsID(); - } -} - -void FormField::createWidgetAnnotations() { - if (terminal) { - for (int i = 0; i < numChildren; i++) - widgets[i]->createWidgetAnnotation(); - } else { - for (int i = 0; i < numChildren; i++) - children[i]->createWidgetAnnotations(); - } -} - -void FormField::_createWidget (Object *obj, Ref aref) -{ - terminal = true; - numChildren++; - widgets = (FormWidget**)greallocn(widgets, numChildren, sizeof(FormWidget*)); - //ID = index in "widgets" table - switch (type) { - case formButton: - widgets[numChildren-1] = new FormWidgetButton(doc, obj, numChildren-1, aref, this); - break; - case formText: - widgets[numChildren-1] = new FormWidgetText(doc, obj, numChildren-1, aref, this); - break; - case formChoice: - widgets[numChildren-1] = new FormWidgetChoice(doc, obj, numChildren-1, aref, this); - break; - case formSignature: - widgets[numChildren-1] = new FormWidgetSignature(doc, obj, numChildren-1, aref, this); - break; - default: - error(errSyntaxWarning, -1, "SubType on non-terminal field, invalid document?"); - numChildren--; - } -} - -FormWidget* FormField::findWidgetByRef (Ref aref) -{ - if (terminal) { - for(int i=0; i<numChildren; i++) { - if (widgets[i]->getRef().num == aref.num - && widgets[i]->getRef().gen == aref.gen) - return widgets[i]; - } - } else { - for(int i=0; i<numChildren; i++) { - FormWidget* result = children[i]->findWidgetByRef(aref); - if(result) return result; - } - } - return nullptr; -} - -GooString* FormField::getFullyQualifiedName() { - Object obj1; - Object parent; - const GooString *parent_name; - GooString *full_name; - GBool unicode_encoded = gFalse; - - if (fullyQualifiedName) - return fullyQualifiedName; - - full_name = new GooString(); - - obj1 = obj.copy(); - while (parent = obj1.dictLookup("Parent"), parent.isDict()) { - Object obj2 = parent.dictLookup("T"); - if (obj2.isString()) { - parent_name = obj2.getString(); - - if (unicode_encoded) { - full_name->insert(0, "\0.", 2); // 2-byte unicode period - if (parent_name->hasUnicodeMarker()) { - full_name->insert(0, parent_name->getCString() + 2, parent_name->getLength() - 2); // Remove the unicode BOM - } else { - int tmp_length; - char* tmp_str = pdfDocEncodingToUTF16(parent_name, &tmp_length); - full_name->insert(0, tmp_str + 2, tmp_length - 2); // Remove the unicode BOM - delete [] tmp_str; - } - } else { - full_name->insert(0, '.'); // 1-byte ascii period - if (parent_name->hasUnicodeMarker()) { - unicode_encoded = gTrue; - full_name = convertToUtf16(full_name); - full_name->insert(0, parent_name->getCString() + 2, parent_name->getLength() - 2); // Remove the unicode BOM - } else { - full_name->insert(0, parent_name); - } - } - } - obj1 = parent.copy(); - } - - if (partialName) { - if (unicode_encoded) { - if (partialName->hasUnicodeMarker()) { - full_name->append(partialName->getCString() + 2, partialName->getLength() - 2); // Remove the unicode BOM - } else { - int tmp_length; - char* tmp_str = pdfDocEncodingToUTF16(partialName, &tmp_length); - full_name->append(tmp_str + 2, tmp_length - 2); // Remove the unicode BOM - delete [] tmp_str; - } - } else { - if (partialName->hasUnicodeMarker()) { - unicode_encoded = gTrue; - full_name = convertToUtf16(full_name); - full_name->append(partialName->getCString() + 2, partialName->getLength() - 2); // Remove the unicode BOM - } else { - full_name->append(partialName); - } - } - } else { - int len = full_name->getLength(); - // Remove the last period - if (unicode_encoded) { - if (len > 1) { - full_name->del(len - 2, 2); - } - } else { - if (len > 0) { - full_name->del(len - 1, 1); - } - } - } - - if (unicode_encoded) { - full_name->prependUnicodeMarker(); - } - - fullyQualifiedName = full_name; - return fullyQualifiedName; -} - -void FormField::updateChildrenAppearance() -{ - // Recursively update each child's appearance - if (terminal) { - for (int i = 0; i < numChildren; i++) - widgets[i]->updateWidgetAppearance(); - } else { - for (int i = 0; i < numChildren; i++) - children[i]->updateChildrenAppearance(); - } -} - -void FormField::setReadOnly (bool value) -{ - if (value == readOnly) { - return; - } - - readOnly = value; - - Dict* dict = obj.getDict(); - - const Object obj1 = Form::fieldLookup(dict, "Ff"); - int flags = 0; - if (obj1.isInt()) { - flags = obj1.getInt(); - } - if (value) { - flags |= 1; - } else { - flags &= ~1; - } - - dict->set("Ff", Object(flags)); - xref->setModifiedObject(&obj, ref); - updateChildrenAppearance(); -} - -//------------------------------------------------------------------------ -// FormFieldButton -//------------------------------------------------------------------------ -FormFieldButton::FormFieldButton(PDFDoc *docA, Object *aobj, const Ref& ref, FormField *parent, std::set<int> *usedParents) - : FormField(docA, aobj, ref, parent, usedParents, formButton) -{ - Dict* dict = obj.getDict(); - active_child = -1; - noAllOff = false; - siblings = nullptr; - numSiblings = 0; - appearanceState.setToNull(); - - btype = formButtonCheck; - Object obj1 = Form::fieldLookup(dict, "Ff"); - if (obj1.isInt()) { - int flags = obj1.getInt(); - - if (flags & 0x10000) { // 17 -> push button - btype = formButtonPush; - } else if (flags & 0x8000) { // 16 -> radio button - btype = formButtonRadio; - if (flags & 0x4000) { // 15 -> noToggleToOff - noAllOff = true; - } - } - if (flags & 0x1000000) { // 26 -> radiosInUnison - error(errUnimplemented, -1, "FormFieldButton:: radiosInUnison flag unimplemented, please report a bug with a testcase\n"); - } - } - - if (btype != formButtonPush) { - // Even though V is inheritable we are interested in the value of this - // field, if not present it's probably because it's a button in a set. - appearanceState = dict->lookup("V"); - } -} - -#ifdef DEBUG_FORMS -static char *_getButtonType(FormButtonType type) -{ - switch (type) { - case formButtonPush: - return "push"; - case formButtonCheck: - return "check"; - case formButtonRadio: - return "radio"; - default: - break; - } - return "unknown"; -} - -void FormFieldButton::print(int indent) -{ - printf ("%*s- (%d %d): [%s] terminal: %s children: %d\n", indent, "", ref.num, ref.gen, - _getButtonType(btype), terminal ? "Yes" : "No", numChildren); -} -#endif - -void FormFieldButton::setNumSiblings (int num) -{ - numSiblings = num; - siblings = (FormFieldButton**)greallocn(siblings, numSiblings, sizeof(FormFieldButton*)); -} - -void FormFieldButton::fillChildrenSiblingsID() -{ - if (!terminal) { - for(int i=0; i<numChildren; i++) { - FormFieldButton *child = dynamic_cast<FormFieldButton*>(children[i]); - if (child != nullptr) { - // Fill the siblings of this node childs - child->setNumSiblings(numChildren-1); - for(int j=0, counter=0; j<numChildren; j++) { - FormFieldButton *otherChild = dynamic_cast<FormFieldButton*>(children[j]); - if (i == j) continue; - if (child == otherChild) continue; - child->setSibling(counter, otherChild); - counter++; - } - - // now call ourselves on the child - // to fill its children data - child->fillChildrenSiblingsID(); - } - } - } -} - -GBool FormFieldButton::setState(char *state) -{ - // A check button could behave as a radio button - // when it's in a set of more than 1 buttons - if (btype != formButtonRadio && btype != formButtonCheck) - return gFalse; - - if (terminal && parent && parent->getType() == formButton && appearanceState.isNull()) { - // It's button in a set, set state on parent - if (static_cast<FormFieldButton*>(parent)->setState(state)) { - return gTrue; - } - return gFalse; - } - - GBool isOn = strcmp(state, "Off") != 0; - - if (!isOn && noAllOff) - return gFalse; // Don't allow to set all radio to off - - const char *current = getAppearanceState(); - GBool currentFound = gFalse, newFound = gFalse; - - for (int i = 0; i < numChildren; i++) { - FormWidgetButton *widget; - - // If radio button is a terminal field we want the widget at i, but - // if it's not terminal, the child widget is a composed dict, so - // we want the ony child widget of the children at i - if (terminal) - widget = static_cast<FormWidgetButton*>(widgets[i]); - else - widget = static_cast<FormWidgetButton*>(children[i]->getWidget(0)); - - if (!widget->getOnStr()) - continue; - - char *onStr = widget->getOnStr(); - if (current && strcmp(current, onStr) == 0) { - widget->setAppearanceState("Off"); - if (!isOn) - break; - currentFound = gTrue; - } - - if (isOn && strcmp(state, onStr) == 0) { - widget->setAppearanceState(state); - newFound = gTrue; - } - - if (currentFound && newFound) - break; - } - - updateState(state); - - return gTrue; -} - -GBool FormFieldButton::getState(const char *state) const { - if (appearanceState.isName(state)) - return gTrue; - - return (parent && parent->getType() == formButton) ? static_cast<FormFieldButton*>(parent)->getState(state) : gFalse; -} - -void FormFieldButton::updateState(char *state) { - appearanceState = Object(objName, state); - obj.getDict()->set("V", appearanceState.copy()); - xref->setModifiedObject(&obj, ref); -} - -FormFieldButton::~FormFieldButton() -{ - if (siblings) - gfree(siblings); -} - -//------------------------------------------------------------------------ -// FormFieldText -//------------------------------------------------------------------------ -FormFieldText::FormFieldText(PDFDoc *docA, Object *aobj, const Ref& ref, FormField *parent, std::set<int> *usedParents) - : FormField(docA, aobj, ref, parent, usedParents, formText) -{ - Dict* dict = obj.getDict(); - Object obj1; - content = nullptr; - multiline = password = fileSelect = doNotSpellCheck = doNotScroll = comb = richText = false; - maxLen = 0; - - obj1 = Form::fieldLookup(dict, "Ff"); - if (obj1.isInt()) { - int flags = obj1.getInt(); - if (flags & 0x1000) // 13 -> Multiline - multiline = true; - if (flags & 0x2000) // 14 -> Password - password = true; - if (flags & 0x100000) // 21 -> FileSelect - fileSelect = true; - if (flags & 0x400000)// 23 -> DoNotSpellCheck - doNotSpellCheck = true; - if (flags & 0x800000) // 24 -> DoNotScroll - doNotScroll = true; - if (flags & 0x1000000) // 25 -> Comb - comb = true; - if (flags & 0x2000000)// 26 -> RichText - richText = true; - } - - obj1 = Form::fieldLookup(dict, "MaxLen"); - if (obj1.isInt()) { - maxLen = obj1.getInt(); - } - - obj1 = Form::fieldLookup(dict, "V"); - if (obj1.isString()) { - if (obj1.getString()->hasUnicodeMarker()) { - if (obj1.getString()->getLength() > 2) - content = obj1.getString()->copy(); - } else if (obj1.getString()->getLength() > 0) { - //non-unicode string -- assume pdfDocEncoding and try to convert to UTF16BE - int tmp_length; - char* tmp_str = pdfDocEncodingToUTF16(obj1.getString(), &tmp_length); - content = new GooString(tmp_str, tmp_length); - delete [] tmp_str; - } - } -} - -#ifdef DEBUG_FORMS -void FormFieldText::print(int indent) -{ - printf ("%*s- (%d %d): [text] terminal: %s children: %d\n", indent, "", ref.num, ref.gen, - terminal ? "Yes" : "No", numChildren); -} -#endif - -void FormFieldText::setContentCopy (const GooString* new_content) -{ - delete content; - content = nullptr; - - if (new_content) { - content = new_content->copy(); - - //append the unicode marker <FE FF> if needed - if (!content->hasUnicodeMarker()) { - content->prependUnicodeMarker(); - } - } - - obj.getDict()->set("V", Object(content ? content->copy() : new GooString(""))); - xref->setModifiedObject(&obj, ref); - updateChildrenAppearance(); -} - -FormFieldText::~FormFieldText() -{ - delete content; -} - -double FormFieldText::getTextFontSize() -{ - GooList* daToks = new GooList(); - int idx = parseDA(daToks); - double fontSize = -1; - if (idx >= 0) { - char* p = nullptr; - fontSize = strtod(static_cast<GooString*>(daToks->get(idx))->getCString(), &p); - if (!p || *p) - fontSize = -1; - } - deleteGooList(daToks, GooString); - return fontSize; -} - -void FormFieldText::setTextFontSize(int fontSize) -{ - if (fontSize > 0 && obj.isDict()) { - GooList* daToks = new GooList(); - int idx = parseDA(daToks); - if (idx == -1) { - error(errSyntaxError, -1, "FormFieldText:: invalid DA object\n"); - deleteGooList(daToks, GooString); - return; - } - if (defaultAppearance) - delete defaultAppearance; - defaultAppearance = new GooString; - for (int i = 0; i < daToks->getLength(); ++i) { - if (i > 0) - defaultAppearance->append(' '); - if (i == idx) { - defaultAppearance->appendf("{0:d}", fontSize); - } else { - defaultAppearance->append(static_cast<GooString*>(daToks->get(i))); - } - } - deleteGooList(daToks, GooString); - obj.dictSet("DA", Object(defaultAppearance->copy())); - xref->setModifiedObject(&obj, ref); - updateChildrenAppearance(); - } -} - -int FormFieldText::tokenizeDA(const GooString* da, GooList* daToks, const char* searchTok) -{ - int idx = -1; - if(da && daToks) { - int i = 0; - int j = 0; - while (i < da->getLength()) { - while (i < da->getLength() && Lexer::isSpace(da->getChar(i))) { - ++i; - } - if (i < da->getLength()) { - for (j = i + 1; j < da->getLength() && !Lexer::isSpace(da->getChar(j)); ++j) { - } - GooString* tok = new GooString(da, i, j - i); - if (searchTok && !tok->cmp(searchTok)) - idx = daToks->getLength(); - daToks->append(tok); - i = j; - } - } - } - return idx; -} - -int FormFieldText::parseDA(GooList* daToks) -{ - int idx = -1; - if (obj.isDict()) { - Object objDA(obj.dictLookup("DA")); - if (objDA.isString()) { - const GooString* da = objDA.getString(); - idx = tokenizeDA(da, daToks, "Tf") - 1; - } - } - return idx; -} - - -//------------------------------------------------------------------------ -// FormFieldChoice -//------------------------------------------------------------------------ -FormFieldChoice::FormFieldChoice(PDFDoc *docA, Object *aobj, const Ref& ref, FormField *parent, std::set<int> *usedParents) - : FormField(docA, aobj, ref, parent, usedParents, formChoice) -{ - numChoices = 0; - choices = nullptr; - editedChoice = nullptr; - topIdx = 0; - - Dict* dict = obj.getDict(); - Object obj1; - - combo = edit = multiselect = doNotSpellCheck = doCommitOnSelChange = false; - - obj1 = Form::fieldLookup(dict, "Ff"); - if (obj1.isInt()) { - int flags = obj1.getInt(); - if (flags & 0x20000) // 18 -> Combo - combo = true; - if (flags & 0x40000) // 19 -> Edit - edit = true; - if (flags & 0x200000) // 22 -> MultiSelect - multiselect = true; - if (flags & 0x400000) // 23 -> DoNotSpellCheck - doNotSpellCheck = true; - if (flags & 0x4000000) // 27 -> CommitOnSelChange - doCommitOnSelChange = true; - } - - obj1 = dict->lookup("TI"); - if (obj1.isInt()) - topIdx = obj1.getInt(); - - obj1 = dict->lookup("Opt"); - if (obj1.isArray()) { - numChoices = obj1.arrayGetLength(); - choices = new ChoiceOpt[numChoices]; - memset(choices, 0, sizeof(ChoiceOpt) * numChoices); - - for (int i = 0; i < numChoices; i++) { - Object obj2 = obj1.arrayGet(i); - if (obj2.isString()) { - choices[i].optionName = obj2.getString()->copy(); - } else if (obj2.isArray()) { // [Export_value, Displayed_text] - if (obj2.arrayGetLength() < 2) { - error(errSyntaxError, -1, "FormWidgetChoice:: invalid Opt entry -- array's length < 2\n"); - continue; - } - Object obj3 = obj2.arrayGet(0); - if (obj3.isString()) - choices[i].exportVal = obj3.getString()->copy(); - else - error(errSyntaxError, -1, "FormWidgetChoice:: invalid Opt entry -- exported value not a string\n"); - - obj3 = obj2.arrayGet(1); - if (obj3.isString()) - choices[i].optionName = obj3.getString()->copy(); - else - error(errSyntaxError, -1, "FormWidgetChoice:: invalid Opt entry -- choice name not a string\n"); - } else { - error(errSyntaxError, -1, "FormWidgetChoice:: invalid {0:d} Opt entry\n", i); - } - } - } else { - //empty choice - } - - // Find selected items - // Note: PDF specs say that /V has precedence over /I, but acroread seems to - // do the opposite. We do the same. - obj1 = Form::fieldLookup(dict, "I"); - if (obj1.isArray()) { - for (int i = 0; i < obj1.arrayGetLength(); i++) { - Object obj2 = obj1.arrayGet(i); - if (obj2.isInt() && obj2.getInt() >= 0 && obj2.getInt() < numChoices) { - choices[obj2.getInt()].selected = true; - } - } - } else { - // Note: According to PDF specs, /V should *never* contain the exportVal. - // However, if /Opt is an array of (exportVal,optionName) pairs, acroread - // seems to expect the exportVal instead of the optionName and so we do too. - obj1 = Form::fieldLookup(dict, "V"); - if (obj1.isString()) { - GBool optionFound = gFalse; - - for (int i = 0; i < numChoices; i++) { - if (choices[i].exportVal) { - if (choices[i].exportVal->cmp(obj1.getString()) == 0) { - optionFound = gTrue; - } - } else if (choices[i].optionName) { - if (choices[i].optionName->cmp(obj1.getString()) == 0) { - optionFound = gTrue; - } - } - - if (optionFound) { - choices[i].selected = true; - break; // We've determined that this option is selected. No need to keep on scanning - } - } - - // Set custom value if /V doesn't refer to any predefined option and the field is user-editable - if (!optionFound && edit) { - editedChoice = obj1.getString()->copy(); - } - } else if (obj1.isArray()) { - for (int i = 0; i < numChoices; i++) { - for (int j = 0; j < obj1.arrayGetLength(); j++) { - Object obj2 = obj1.arrayGet(j); - GBool matches = gFalse; - - if (choices[i].exportVal) { - if (choices[i].exportVal->cmp(obj2.getString()) == 0) { - matches = gTrue; - } - } else if (choices[i].optionName) { - if (choices[i].optionName->cmp(obj2.getString()) == 0) { - matches = gTrue; - } - } - - if (matches) { - choices[i].selected = true; - break; // We've determined that this option is selected. No need to keep on scanning - } - } - } - } - } -} - -FormFieldChoice::~FormFieldChoice() -{ - for (int i = 0; i < numChoices; i++) { - delete choices[i].exportVal; - delete choices[i].optionName; - } - delete [] choices; - delete editedChoice; -} - -#ifdef DEBUG_FORMS -void FormFieldChoice::print(int indent) -{ - printf ("%*s- (%d %d): [choice] terminal: %s children: %d\n", indent, "", ref.num, ref.gen, - terminal ? "Yes" : "No", numChildren); -} -#endif - -void FormFieldChoice::updateSelection() { - Object objV; - Object objI(objNull); - - if (edit && editedChoice) { - // This is an editable combo-box with user-entered text - objV = Object(editedChoice->copy()); - } else { - const int numSelected = getNumSelected(); - - // Create /I array only if multiple selection is allowed (as per PDF spec) - if (multiselect) { - objI = Object(new Array(xref)); - } - - if (numSelected == 0) { - // No options are selected - objV = Object(new GooString("")); - } else if (numSelected == 1) { - // Only one option is selected - for (int i = 0; i < numChoices; i++) { - if (choices[i].selected) { - if (multiselect) { - objI.arrayAdd(Object(i)); - } - - if (choices[i].exportVal) { - objV = Object(choices[i].exportVal->copy()); - } else if (choices[i].optionName) { - objV = Object(choices[i].optionName->copy()); - } - - break; // We've just written the selected option. No need to keep on scanning - } - } - } else { - // More than one option is selected - objV = Object(new Array(xref)); - for (int i = 0; i < numChoices; i++) { - if (choices[i].selected) { - if (multiselect) { - objI.arrayAdd(Object(i)); - } - - if (choices[i].exportVal) { - objV.arrayAdd(Object(choices[i].exportVal->copy())); - } else if (choices[i].optionName) { - objV.arrayAdd(Object(choices[i].optionName->copy())); - } - } - } - } - } - - obj.getDict()->set("V", std::move(objV)); - obj.getDict()->set("I", std::move(objI)); - xref->setModifiedObject(&obj, ref); - updateChildrenAppearance(); -} - -void FormFieldChoice::unselectAll () -{ - for (int i = 0; i < numChoices; i++) { - choices[i].selected = false; - } -} - -void FormFieldChoice::deselectAll () { - delete editedChoice; - editedChoice = nullptr; - - unselectAll(); - updateSelection(); -} - -void FormFieldChoice::toggle (int i) -{ - delete editedChoice; - editedChoice = nullptr; - - choices[i].selected = !choices[i].selected; - updateSelection(); -} - -void FormFieldChoice::select (int i) -{ - delete editedChoice; - editedChoice = nullptr; - - if (!multiselect) - unselectAll(); - - choices[i].selected = true; - updateSelection(); -} - -void FormFieldChoice::setEditChoice (const GooString* new_content) -{ - delete editedChoice; - editedChoice = nullptr; - - unselectAll(); - - if (new_content) { - editedChoice = new_content->copy(); - - //append the unicode marker <FE FF> if needed - if (!editedChoice->hasUnicodeMarker()) { - editedChoice->prependUnicodeMarker(); - } - } - updateSelection(); -} - -const GooString* FormFieldChoice::getEditChoice () const -{ - return editedChoice; -} - -int FormFieldChoice::getNumSelected () -{ - int cnt = 0; - for(int i=0; i<numChoices; i++) { - if (choices[i].selected) - cnt++; - } - return cnt; -} - -const GooString *FormFieldChoice::getSelectedChoice() const { - if (edit && editedChoice) - return editedChoice; - - for (int i = 0; i < numChoices; i++) { - if (choices[i].optionName && choices[i].selected) - return choices[i].optionName; - } - - return nullptr; -} - -//------------------------------------------------------------------------ -// FormFieldSignature -//------------------------------------------------------------------------ -FormFieldSignature::FormFieldSignature(PDFDoc *docA, Object *dict, const Ref& ref, FormField *parent, std::set<int> *usedParents) - : FormField(docA, dict, ref, parent, usedParents, formSignature), - signature_type(adbe_pkcs7_detached), - signature(nullptr), signature_info(nullptr) -{ - signature = nullptr; - - signature_info = new SignatureInfo(); - parseInfo(); -} - -FormFieldSignature::~FormFieldSignature() -{ - delete signature_info; - delete signature; -} - -void FormFieldSignature::parseInfo() -{ - if (!obj.isDict()) - return; - - // retrieve PKCS#7 - Object sig_dict = obj.dictLookup("V"); - if (!sig_dict.isDict()) { - return; - } - - Object contents_obj = sig_dict.dictLookup("Contents"); - if (contents_obj.isString()) { - signature = contents_obj.getString()->copy(); - } - - byte_range = sig_dict.dictLookup("ByteRange"); - - const Object location_obj = sig_dict.dictLookup("Location"); - if (location_obj.isString()) { - signature_info->setLocation(location_obj.getString()->copy()->getCString()); - } - - const Object reason_obj = sig_dict.dictLookup("Reason"); - if (reason_obj.isString()) { - signature_info->setReason(reason_obj.getString()->copy()->getCString()); - } - - // retrieve SigningTime - Object time_of_signing = sig_dict.dictLookup("M"); - if (time_of_signing.isString()) { - const GooString *time_str = time_of_signing.getString(); - signature_info->setSigningTime(dateStringToTime(time_str)); // Put this information directly in SignatureInfo object - } - - // check if subfilter is supported for signature validation, only detached signatures work for now - Object subfilterName = sig_dict.dictLookup("SubFilter"); - if (subfilterName.isName("adbe.pkcs7.sha1")) { - signature_type = adbe_pkcs7_sha1; - signature_info->setSubFilterSupport(true); - } - else if (subfilterName.isName("adbe.pkcs7.detached")) { - signature_type = adbe_pkcs7_detached; - signature_info->setSubFilterSupport(true); - } - else if (subfilterName.isName("ETSI.CAdES.detached")) { - signature_type = ETSI_CAdES_detached; - signature_info->setSubFilterSupport(true); - } -} - -void FormFieldSignature::hashSignedDataBlock(SignatureHandler *handler, Goffset block_len) -{ -#ifdef ENABLE_NSS3 - const int BLOCK_SIZE = 4096; - unsigned char signed_data_buffer[BLOCK_SIZE]; - - Goffset i = 0; - while(i < block_len) - { - Goffset bytes_left = block_len - i; - if (bytes_left < BLOCK_SIZE) - { - doc->getBaseStream()->doGetChars(bytes_left, signed_data_buffer); - handler->updateHash(signed_data_buffer, bytes_left); - i = block_len; - } - else - { - doc->getBaseStream()->doGetChars(BLOCK_SIZE, signed_data_buffer); - handler->updateHash(signed_data_buffer, BLOCK_SIZE); - i += BLOCK_SIZE; - } - } -#endif -} - -FormSignatureType FormWidgetSignature::signatureType() -{ - return static_cast<FormFieldSignature*>(field)->signature_type; -} - -SignatureInfo *FormFieldSignature::validateSignature(bool doVerifyCert, bool forceRevalidation, time_t validationTime) -{ -#ifdef ENABLE_NSS3 - if (!signature_info->isSubfilterSupported()) { - error(errUnimplemented, 0, "Unable to validate this type of signature"); - return signature_info; - } - - if (signature_info->getSignatureValStatus() != SIGNATURE_NOT_VERIFIED && !forceRevalidation) { - return signature_info; - } - - if (signature == nullptr) { - error(errSyntaxError, 0, "Invalid or missing Signature string"); - return signature_info; - } - - if (!byte_range.isArray()) { - error(errSyntaxError, 0, "Invalid or missing ByteRange array"); - return signature_info; - } - - int arrayLen = byte_range.arrayGetLength(); - if (arrayLen < 2) { - error(errSyntaxError, 0, "Too few elements in ByteRange array"); - return signature_info; - } - - NSSCMSVerificationStatus sig_val_state; - SECErrorCodes cert_val_state; - const int signature_len = signature->getLength(); - unsigned char *signatureuchar = (unsigned char *)gmalloc(signature_len); - memcpy(signatureuchar, signature->getCString(), signature_len); - SignatureHandler signature_handler(signatureuchar, signature_len); - - Goffset fileLength = doc->getBaseStream()->getLength(); - for (int i = 0; i < arrayLen/2; i++) { - Object offsetObj = byte_range.arrayGet(i*2); - Object lenObj = byte_range.arrayGet(i*2+1); - - if (!offsetObj.isIntOrInt64() || !lenObj.isIntOrInt64()) { - error(errSyntaxError, 0, "Illegal values in ByteRange array"); - return signature_info; - } - - Goffset offset = offsetObj.getIntOrInt64(); - Goffset len = lenObj.getIntOrInt64(); - - if (offset < 0 || offset >= fileLength || len < 0 || len > fileLength || offset + len > fileLength) { - error(errSyntaxError, 0, "Illegal values in ByteRange array"); - return signature_info; - } - - doc->getBaseStream()->setPos(offset); - hashSignedDataBlock(&signature_handler, len); - } - - sig_val_state = signature_handler.validateSignature(); - signature_info->setSignatureValStatus(SignatureHandler::NSS_SigTranslate(sig_val_state)); - signature_info->setSignerName(signature_handler.getSignerName()); - signature_info->setSubjectDN(signature_handler.getSignerSubjectDN()); - signature_info->setHashAlgorithm(signature_handler.getHashAlgorithm()); - - // verify if signature contains a 'signing time' attribute - if (signature_handler.getSigningTime() != 0) { - signature_info->setSigningTime(signature_handler.getSigningTime()); - } - - if (sig_val_state != NSSCMSVS_GoodSignature || !doVerifyCert) { - return signature_info; - } - - cert_val_state = signature_handler.validateCertificate(validationTime); - signature_info->setCertificateValStatus(SignatureHandler::NSS_CertTranslate(cert_val_state)); - -#endif - return signature_info; -} - -#ifdef DEBUG_FORMS -void FormFieldSignature::print(int indent) -{ - printf ("%*s- (%d %d): [signature] terminal: %s children: %d\n", indent, "", ref.num, ref.gen, - terminal ? "Yes" : "No", numChildren); -} -#endif - -//------------------------------------------------------------------------ -// Form -//------------------------------------------------------------------------ - -Form::Form(PDFDoc *docA, Object* acroFormA) -{ - Object obj1; - - doc = docA; - xref = doc->getXRef(); - acroForm = acroFormA; - - size = 0; - numFields = 0; - rootFields = nullptr; - quadding = quaddingLeftJustified; - defaultAppearance = nullptr; - defaultResources = nullptr; - - obj1 = acroForm->dictLookup("NeedAppearances"); - needAppearances = (obj1.isBool() && obj1.getBool()); - - obj1 = acroForm->dictLookup("DA"); - if (obj1.isString()) - defaultAppearance = obj1.getString()->copy(); - - obj1 = acroForm->dictLookup("Q"); - if (obj1.isInt()) - quadding = static_cast<VariableTextQuadding>(obj1.getInt()); - - resDict = acroForm->dictLookup("DR"); - if (resDict.isDict()) { - // At a minimum, this dictionary shall contain a Font entry - obj1 = resDict.dictLookup("Font"); - if (obj1.isDict()) - defaultResources = new GfxResources(xref, resDict.getDict(), nullptr); - } - if (!defaultResources) { - resDict.setToNull(); - } - - obj1 = acroForm->dictLookup("Fields"); - if (obj1.isArray()) { - Array *array = obj1.getArray(); - for(int i=0; i<array->getLength(); i++) { - Object obj2 = array->get(i); - Object oref = array->getNF(i); - if (!oref.isRef()) { - error(errSyntaxWarning, -1, "Direct object in rootFields"); - continue; - } - - if (!obj2.isDict()) { - error(errSyntaxWarning, -1, "Reference in Fields array to an invalid or non existent object"); - continue; - } - - if (numFields >= size) { - size += 16; - rootFields = (FormField**)greallocn(rootFields,size,sizeof(FormField*)); - } - - std::set<int> usedParents; - rootFields[numFields++] = createFieldFromDict (&obj2, doc, oref.getRef(), nullptr, &usedParents); - - } - } else { - error(errSyntaxError, -1, "Can't get Fields array\n"); - } - - obj1 = acroForm->dictLookup("CO"); - if (obj1.isArray()) { - Array *array = obj1.getArray(); - calculateOrder.reserve(array->getLength()); - for(int i=0; i<array->getLength(); i++) { - Object oref = array->getNF(i); - if (!oref.isRef()) { - error(errSyntaxWarning, -1, "Direct object in CO"); - continue; - } - calculateOrder.push_back(oref.getRef()); - } - } - -#ifdef DEBUG_FORMS - for (int i = 0; i < numFields; i++) - rootFields[i]->printTree(); -#endif -} - -Form::~Form() { - int i; - for(i = 0; i < numFields; ++i) - delete rootFields[i]; - gfree (rootFields); - delete defaultAppearance; - delete defaultResources; -} - -// Look up an inheritable field dictionary entry. -static Object fieldLookup(Dict *field, const char *key, std::set<int> *usedParents) { - Dict *dict = field; - Object obj = dict->lookup(key); - if (!obj.isNull()) { - return obj; - } - Object parent = dict->lookupNF("Parent"); - if (parent.isRef()) { - const Ref ref = parent.getRef(); - if (usedParents->find(ref.num) == usedParents->end()) { - usedParents->insert(ref.num); - - Object obj2 = parent.fetch(dict->getXRef()); - if (obj2.isDict()) { - return fieldLookup(obj2.getDict(), key, usedParents); - } - } - } else if (parent.isDict()) { - return fieldLookup(parent.getDict(), key, usedParents); - } - return Object(objNull); -} - -Object Form::fieldLookup(Dict *field, const char *key) { - std::set<int> usedParents; - return ::fieldLookup(field, key, &usedParents); -} - -FormField *Form::createFieldFromDict (Object* obj, PDFDoc *docA, const Ref& pref, FormField *parent, std::set<int> *usedParents) -{ - FormField *field; - - Object obj2 = Form::fieldLookup(obj->getDict (), "FT"); - if (obj2.isName("Btn")) { - field = new FormFieldButton(docA, obj, pref, parent, usedParents); - } else if (obj2.isName("Tx")) { - field = new FormFieldText(docA, obj, pref, parent, usedParents); - } else if (obj2.isName("Ch")) { - field = new FormFieldChoice(docA, obj, pref, parent, usedParents); - } else if (obj2.isName("Sig")) { - field = new FormFieldSignature(docA, obj, pref, parent, usedParents); - } else { //we don't have an FT entry => non-terminal field - field = new FormField(docA, obj, pref, parent, usedParents); - } - - return field; -} - -void Form::postWidgetsLoad() -{ - // We create the widget annotations associated to - // every form widget here, because the AnnotWidget constructor - // needs the form object that gets from the catalog. When constructing - // a FormWidget the Catalog is still creating the form object - for (int i = 0; i < numFields; i++) { - rootFields[i]->fillChildrenSiblingsID(); - rootFields[i]->createWidgetAnnotations(); - } -} - -FormWidget* Form::findWidgetByRef (Ref aref) -{ - for(int i=0; i<numFields; i++) { - FormWidget *result = rootFields[i]->findWidgetByRef(aref); - if(result) return result; - } - return nullptr; -} - -//------------------------------------------------------------------------ -// FormPageWidgets -//------------------------------------------------------------------------ - -FormPageWidgets::FormPageWidgets (Annots *annots, unsigned int page, Form *form) -{ - numWidgets = 0; - widgets = nullptr; - - if (annots && annots->getNumAnnots() > 0 && form) { - size = annots->getNumAnnots(); - widgets = (FormWidget**)greallocn(widgets, size, sizeof(FormWidget*)); - - /* For each entry in the page 'Annots' dict, try to find - a matching form field */ - for (int i = 0; i < size; ++i) { - Annot *annot = annots->getAnnot(i); - - if (annot->getType() != Annot::typeWidget) - continue; - - if (!annot->getHasRef()) { - /* Since all entry in a form field's kid dict needs to be - indirect references, if this annot isn't indirect, it isn't - related to a form field */ - continue; - } - - Ref r = annot->getRef(); - - /* Try to find a form field which either has this Annot in its Kids entry - or is merged with this Annot */ - FormWidget* tmp = form->findWidgetByRef(r); - if (tmp) { - // We've found a corresponding form field, link it - tmp->setID(FormWidget::encodeID(page, numWidgets)); - widgets[numWidgets++] = tmp; - } - } - } -} - -FormPageWidgets::~FormPageWidgets() -{ - gfree (widgets); -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/Form.h b/Build/source/libs/poppler/poppler-src/poppler/Form.h deleted file mode 100644 index 02fc52fb192..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/Form.h +++ /dev/null @@ -1,634 +0,0 @@ -//======================================================================== -// -// Form.h -// -// This file is licensed under the GPLv2 or later -// -// Copyright 2006 Julien Rebetez <julienr@svn.gnome.org> -// Copyright 2007, 2008, 2011 Carlos Garcia Campos <carlosgc@gnome.org> -// Copyright 2007-2010, 2012, 2015-2018 Albert Astals Cid <aacid@kde.org> -// Copyright 2010 Mark Riedesel <mark@klowner.com> -// Copyright 2011 Pino Toscano <pino@kde.org> -// Copyright 2012 Fabio D'Urso <fabiodurso@hotmail.it> -// Copyright 2013 Adrian Johnson <ajohnson@redneon.com> -// Copyright 2015 André Guerreiro <aguerreiro1985@gmail.com> -// Copyright 2015 André Esser <bepandre@hotmail.com> -// Copyright 2017 Roland Hieber <r.hieber@pengutronix.de> -// Copyright 2017 Hans-Ulrich Jüttner <huj@froreich-bioscientia.de> -// Copyright 2018 Andre Heinecke <aheinecke@intevation.de> -// Copyright 2018 Klarälvdalens Datakonsult AB, a KDAB Group company, <info@kdab.com>. Work sponsored by the LiMux project of the city of Munich -// Copyright 2018 Chinmoy Ranjan Pradhan <chinmoyrp65@protonmail.com> -// -//======================================================================== - -#ifndef FORM_H -#define FORM_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "goo/GooList.h" -#include "Object.h" -#include "Annot.h" - -#include <time.h> - -#include <set> -#include <vector> -#include <ctime> - -class GooString; -class Array; -class Dict; -class Annot; -class AnnotWidget; -class Annots; -class LinkAction; -class GfxResources; -class PDFDoc; -class SignatureInfo; -class SignatureHandler; - -enum FormFieldType { - formButton, - formText, - formChoice, - formSignature, - formUndef -}; - -enum FormButtonType { - formButtonCheck, - formButtonPush, - formButtonRadio -}; - -enum VariableTextQuadding { - quaddingLeftJustified, - quaddingCentered, - quaddingRightJustified -}; - -enum FormSignatureType { - adbe_pkcs7_sha1, - adbe_pkcs7_detached, - ETSI_CAdES_detached -}; - -class Form; -class FormField; -class FormFieldButton; -class FormFieldText; -class FormFieldSignature; -class FormFieldChoice; - -//------------------------------------------------------------------------ -// FormWidget -// A FormWidget represents the graphical part of a field and is "attached" -// to a page. -//------------------------------------------------------------------------ - -class FormWidget { -public: - virtual ~FormWidget(); - - // Check if point is inside the field bounding rect - GBool inRect(double x, double y) const; - - // Get the field bounding rect - void getRect(double *x1, double *y1, double *x2, double *y2) const; - - unsigned getID () { return ID; } - void setID (unsigned int i) { ID=i; } - - FormField *getField () { return field; } - FormFieldType getType() { return type; } - - Object* getObj() { return &obj; } - Ref getRef() { return ref; } - - void setChildNum (unsigned i) { childNum = i; } - unsigned getChildNum () { return childNum; } - - const GooString *getPartialName() const; - void setPartialName(const GooString &name); - const GooString *getAlternateUiName() const; - const GooString *getMappingName() const; - GooString *getFullyQualifiedName(); - - GBool isModified () const; - - bool isReadOnly() const; - void setReadOnly(bool value); - - LinkAction *getActivationAction(); // The caller should not delete the result - LinkAction *getAdditionalAction(Annot::FormAdditionalActionsType type); // The caller should delete the result - - // return the unique ID corresponding to pageNum/fieldNum - static int encodeID (unsigned pageNum, unsigned fieldNum); - // decode id and retrieve pageNum and fieldNum - static void decodeID (unsigned id, unsigned* pageNum, unsigned* fieldNum); - - void createWidgetAnnotation(); - AnnotWidget *getWidgetAnnotation() const { return widget; } - - virtual void updateWidgetAppearance() = 0; - -#ifdef DEBUG_FORMS - void print(int indent = 0); -#endif - -protected: - FormWidget(PDFDoc *docA, Object *aobj, unsigned num, Ref aref, FormField *fieldA); - - AnnotWidget *widget; - FormField* field; - FormFieldType type; - Object obj; - Ref ref; - PDFDoc *doc; - XRef *xref; - - //index of this field in the parent's child list - unsigned childNum; - - /* - Field ID is an (unsigned) integer, calculated as follow : - the first sizeof/2 bits are the field number, relative to the page - the last sizeof/2 bits are the page number - [page number | field number] - (encoding) id = (pageNum << 4*sizeof(unsigned)) + fieldNum; - (decoding) pageNum = id >> 4*sizeof(unsigned); fieldNum = (id << 4*sizeof(unsigned)) >> 4*sizeof(unsigned); - */ - unsigned ID; -}; - -//------------------------------------------------------------------------ -// FormWidgetButton -//------------------------------------------------------------------------ - -class FormWidgetButton: public FormWidget { -public: - FormWidgetButton(PDFDoc *docA, Object *dict, unsigned num, Ref ref, FormField *p); - ~FormWidgetButton (); - - FormButtonType getButtonType() const; - - void setState (GBool state); - GBool getState (); - - char* getOnStr(); - void setAppearanceState(const char *state); - void updateWidgetAppearance() override; - -protected: - FormFieldButton *parent() const; - GooString *onStr; -}; - -//------------------------------------------------------------------------ -// FormWidgetText -//------------------------------------------------------------------------ - -class FormWidgetText: public FormWidget { -public: - FormWidgetText(PDFDoc *docA, Object *dict, unsigned num, Ref ref, FormField *p); - //return the field's content (UTF16BE) - const GooString* getContent() const; - - //expects a UTF16BE string - void setContent(const GooString* new_content); - - void updateWidgetAppearance() override; - - bool isMultiline () const; - bool isPassword () const; - bool isFileSelect () const; - bool noSpellCheck () const; - bool noScroll () const; - bool isComb () const; - bool isRichText () const; - int getMaxLen () const; - //return the font size of the field's text - double getTextFontSize(); - //set the font size of the field's text (currently only integer values) - void setTextFontSize(int fontSize); - -protected: - FormFieldText *parent() const; -}; - -//------------------------------------------------------------------------ -// FormWidgetChoice -//------------------------------------------------------------------------ - -class FormWidgetChoice: public FormWidget { -public: - FormWidgetChoice(PDFDoc *docA, Object *dict, unsigned num, Ref ref, FormField *p); - ~FormWidgetChoice(); - - int getNumChoices() const; - //return the display name of the i-th choice (UTF16BE) - const GooString* getChoice(int i) const; - //select the i-th choice - void select (int i); - - //toggle selection of the i-th choice - void toggle (int i); - - //deselect everything - void deselectAll (); - - //except a UTF16BE string - //only work for editable combo box, set the user-entered text as the current choice - void setEditChoice(const GooString* new_content); - - const GooString* getEditChoice () const; - - void updateWidgetAppearance() override; - bool isSelected (int i) const; - - bool isCombo () const; - bool hasEdit () const; - bool isMultiSelect () const; - bool noSpellCheck () const; - bool commitOnSelChange () const; - bool isListBox () const; -protected: - bool _checkRange (int i) const; - FormFieldChoice *parent() const; -}; - -//------------------------------------------------------------------------ -// FormWidgetSignature -//------------------------------------------------------------------------ - -class FormWidgetSignature: public FormWidget { -public: - FormWidgetSignature(PDFDoc *docA, Object *dict, unsigned num, Ref ref, FormField *p); - void updateWidgetAppearance() override; - - FormSignatureType signatureType(); - // Use -1 for now as validationTime - SignatureInfo *validateSignature(bool doVerifyCert, bool forceRevalidation, time_t validationTime); - - // returns a list with the boundaries of the signed ranges - // the elements of the list are of type Goffset - std::vector<Goffset> getSignedRangeBounds(); - - // checks the length encoding of the signature and returns the hex encoded signature - // if the check passed (and the checked file size as output parameter in checkedFileSize) - // otherwise a nullptr is returned - GooString* getCheckedSignature(Goffset *checkedFileSize); - - const GooString *getSignature() const; -}; - -//------------------------------------------------------------------------ -// FormField -// A FormField implements the logical side of a field and is "attached" to -// the Catalog. This is an internal class and client applications should -// only interact with FormWidgets. -//------------------------------------------------------------------------ - -class FormField { -public: - FormField(PDFDoc *docA, Object *aobj, const Ref& aref, FormField *parent, std::set<int> *usedParents, FormFieldType t=formUndef); - - virtual ~FormField(); - - // Accessors. - FormFieldType getType() const { return type; } - Object* getObj() { return &obj; } - Ref getRef() { return ref; } - - void setReadOnly (bool b); - bool isReadOnly () const { return readOnly; } - - GooString* getDefaultAppearance() const { return defaultAppearance; } - GBool hasTextQuadding() const { return hasQuadding; } - VariableTextQuadding getTextQuadding() const { return quadding; } - - const GooString *getPartialName() const { return partialName; } - void setPartialName(const GooString &name); - const GooString *getAlternateUiName() const { return alternateUiName; } - const GooString *getMappingName() const { return mappingName; } - GooString *getFullyQualifiedName(); - - FormWidget* findWidgetByRef (Ref aref); - int getNumWidgets() { return terminal ? numChildren : 0; } - FormWidget *getWidget(int i) { return terminal ? widgets[i] : NULL; } - - // only implemented in FormFieldButton - virtual void fillChildrenSiblingsID (); - - void createWidgetAnnotations(); - -#ifdef DEBUG_FORMS - void printTree(int indent = 0); - virtual void print(int indent = 0); -#endif - - - protected: - void _createWidget (Object *obj, Ref aref); - void createChildren(std::set<int> *usedParents); - void updateChildrenAppearance(); - - FormFieldType type; // field type - Ref ref; - bool terminal; - Object obj; - PDFDoc *doc; - XRef *xref; - FormField **children; - FormField *parent; - int numChildren; - FormWidget **widgets; - bool readOnly; - - GooString *partialName; // T field - GooString *alternateUiName; // TU field - GooString *mappingName; // TM field - GooString *fullyQualifiedName; - - // Variable Text - GooString *defaultAppearance; - GBool hasQuadding; - VariableTextQuadding quadding; - -private: - FormField() {} -}; - - -//------------------------------------------------------------------------ -// FormFieldButton -//------------------------------------------------------------------------ - -class FormFieldButton: public FormField { -public: - FormFieldButton(PDFDoc *docA, Object *dict, const Ref& ref, FormField *parent, std::set<int> *usedParents); - - FormButtonType getButtonType () const { return btype; } - - bool noToggleToOff () const { return noAllOff; } - - // returns gTrue if the state modification is accepted - GBool setState (char *state); - GBool getState(const char *state) const; - - const char *getAppearanceState() const { return appearanceState.isName() ? appearanceState.getName() : nullptr; } - - void fillChildrenSiblingsID () override; - - void setNumSiblings (int num); - void setSibling (int i, FormFieldButton *id) { siblings[i] = id; } - - //For radio buttons, return the fields of the other radio buttons in the same group - FormFieldButton* getSibling (int i) const { return siblings[i]; } - int getNumSiblings () const { return numSiblings; } - -#ifdef DEBUG_FORMS - void print(int indent = 0); -#endif - - ~FormFieldButton(); -protected: - void updateState(char *state); - - FormFieldButton** siblings; // IDs of dependent buttons (each button of a radio field has all the others buttons - // of the same field in this array) - int numSiblings; - - FormButtonType btype; - int size; - int active_child; //only used for combo box - bool noAllOff; - Object appearanceState; // V -}; - -//------------------------------------------------------------------------ -// FormFieldText -//------------------------------------------------------------------------ - -class FormFieldText: public FormField { -public: - FormFieldText(PDFDoc *docA, Object *dict, const Ref& ref, FormField *parent, std::set<int> *usedParents); - - const GooString* getContent () const { return content; } - void setContentCopy (const GooString* new_content); - ~FormFieldText(); - - bool isMultiline () const { return multiline; } - bool isPassword () const { return password; } - bool isFileSelect () const { return fileSelect; } - bool noSpellCheck () const { return doNotSpellCheck; } - bool noScroll () const { return doNotScroll; } - bool isComb () const { return comb; } - bool isRichText () const { return richText; } - - int getMaxLen () const { return maxLen; } - - //return the font size of the field's text - double getTextFontSize(); - //set the font size of the field's text (currently only integer values) - void setTextFontSize(int fontSize); - -#ifdef DEBUG_FORMS - void print(int indent = 0); -#endif - - static int tokenizeDA(const GooString* daString, GooList* daToks, const char* searchTok); - -protected: - int parseDA(GooList* daToks); - - GooString* content; - bool multiline; - bool password; - bool fileSelect; - bool doNotSpellCheck; - bool doNotScroll; - bool comb; - bool richText; - int maxLen; -}; - -//------------------------------------------------------------------------ -// FormFieldChoice -//------------------------------------------------------------------------ - -class FormFieldChoice: public FormField { -public: - FormFieldChoice(PDFDoc *docA, Object *aobj, const Ref& ref, FormField *parent, std::set<int> *usedParents); - - ~FormFieldChoice(); - - int getNumChoices() const { return numChoices; } - const GooString* getChoice(int i) const { return choices ? choices[i].optionName : NULL; } - const GooString* getExportVal (int i) const { return choices ? choices[i].exportVal : NULL; } - // For multi-select choices it returns the first one - const GooString* getSelectedChoice() const; - - //select the i-th choice - void select (int i); - - //toggle selection of the i-th choice - void toggle (int i); - - //deselect everything - void deselectAll (); - - //only work for editable combo box, set the user-entered text as the current choice - void setEditChoice(const GooString* new_content); - - const GooString* getEditChoice () const; - - bool isSelected (int i) const { return choices[i].selected; } - - int getNumSelected (); - - bool isCombo () const { return combo; } - bool hasEdit () const { return edit; } - bool isMultiSelect () const { return multiselect; } - bool noSpellCheck () const { return doNotSpellCheck; } - bool commitOnSelChange () const { return doCommitOnSelChange; } - bool isListBox () const { return !combo; } - - int getTopIndex() const { return topIdx; } - -#ifdef DEBUG_FORMS - void print(int indent = 0); -#endif - -protected: - void unselectAll(); - void updateSelection(); - - bool combo; - bool edit; - bool multiselect; - bool doNotSpellCheck; - bool doCommitOnSelChange; - - struct ChoiceOpt { - GooString* exportVal; //the export value ("internal" name) - GooString* optionName; //displayed name - bool selected; //if this choice is selected - }; - - int numChoices; - ChoiceOpt* choices; - GooString* editedChoice; - int topIdx; // TI -}; - -//------------------------------------------------------------------------ -// FormFieldSignature -//------------------------------------------------------------------------ - -class FormFieldSignature: public FormField { - friend class FormWidgetSignature; -public: - FormFieldSignature(PDFDoc *docA, Object *dict, const Ref& ref, FormField *parent, std::set<int> *usedParents); - - // Use -1 for now as validationTime - SignatureInfo *validateSignature(bool doVerifyCert, bool forceRevalidation, time_t validationTime); - - ~FormFieldSignature(); - Object* getByteRange() { return &byte_range; } - const GooString* getSignature() const { return signature; } - -private: - void parseInfo(); - void hashSignedDataBlock(SignatureHandler *handler, Goffset block_len); - - FormSignatureType signature_type; - Object byte_range; - GooString *signature; - SignatureInfo *signature_info; - -#ifdef DEBUG_FORMS - void print(int indent = 0); -#endif -}; - -//------------------------------------------------------------------------ -// Form -// This class handle the document-wide part of Form (things in the acroForm -// Catalog entry). -//------------------------------------------------------------------------ - -class Form { -public: - Form(PDFDoc *docA, Object* acroForm); - - ~Form(); - - Form(const Form &) = delete; - Form& operator=(const Form &) = delete; - - // Look up an inheritable field dictionary entry. - static Object fieldLookup(Dict *field, const char *key); - - /* Creates a new Field of the type specified in obj's dict. - used in Form::Form and FormField::FormField */ - static FormField *createFieldFromDict (Object* obj, PDFDoc *docA, const Ref& aref, FormField *parent, std::set<int> *usedParents); - - Object *getObj () const { return acroForm; } - GBool getNeedAppearances () const { return needAppearances; } - int getNumFields() const { return numFields; } - FormField* getRootField(int i) const { return rootFields[i]; } - const GooString* getDefaultAppearance() const { return defaultAppearance; } - VariableTextQuadding getTextQuadding() const { return quadding; } - GfxResources* getDefaultResources() const { return defaultResources; } - Object* getDefaultResourcesObj() { return &resDict; } - - FormWidget* findWidgetByRef (Ref aref); - - void postWidgetsLoad(); - - const std::vector<Ref> &getCalculateOrder() const { return calculateOrder; } - -private: - FormField** rootFields; - int numFields; - int size; - PDFDoc *doc; - XRef* xref; - Object *acroForm; - GBool needAppearances; - GfxResources *defaultResources; - Object resDict; - std::vector<Ref> calculateOrder; - - // Variable Text - GooString *defaultAppearance; - VariableTextQuadding quadding; -}; - -//------------------------------------------------------------------------ -// FormPageWidgets -//------------------------------------------------------------------------ - -class FormPageWidgets { -public: - FormPageWidgets (Annots* annots, unsigned int page, Form *form); - ~FormPageWidgets(); - - FormPageWidgets(const FormPageWidgets &) = delete; - FormPageWidgets& operator=(const FormPageWidgets &) = delete; - - int getNumWidgets() const { return numWidgets; } - FormWidget* getWidget(int i) const { return widgets[i]; } - -private: - FormWidget** widgets; - int numWidgets; - int size; -}; - -#endif - diff --git a/Build/source/libs/poppler/poppler-src/poppler/Function.cc b/Build/source/libs/poppler/poppler-src/poppler/Function.cc deleted file mode 100644 index cc32414b87b..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/Function.cc +++ /dev/null @@ -1,1758 +0,0 @@ -//======================================================================== -// -// Function.cc -// -// Copyright 2001-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2006, 2008-2010, 2013-2015, 2017, 2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2006 Jeff Muizelaar <jeff@infidigm.net> -// Copyright (C) 2010 Christian Feuersänger <cfeuersaenger@googlemail.com> -// Copyright (C) 2011 Andrea Canciani <ranma42@gmail.com> -// Copyright (C) 2012 Thomas Freitag <Thomas.Freitag@alfa.de> -// Copyright (C) 2012 Adam Reichold <adamreichold@myopera.com> -// Copyright (C) 2013 Fabio D'Urso <fabiodurso@hotmail.it> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include <config.h> - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include <stdlib.h> -#include <string.h> -#include <ctype.h> -#include <math.h> -#include "goo/gmem.h" -#include "goo/gstrtod.h" -#include "Object.h" -#include "Dict.h" -#include "Stream.h" -#include "Error.h" -#include "Function.h" - -#ifndef M_PI -#define M_PI 3.14159265358979323846 -#endif - -//------------------------------------------------------------------------ -// Function -//------------------------------------------------------------------------ - -Function::Function() { -} - -Function::~Function() { -} - -Function *Function::parse(Object *funcObj) { - std::set<int> usedParents; - return parse(funcObj, &usedParents); -} - -Function *Function::parse(Object *funcObj, std::set<int> *usedParents) { - Function *func; - Dict *dict; - int funcType; - - if (funcObj->isStream()) { - dict = funcObj->streamGetDict(); - } else if (funcObj->isDict()) { - dict = funcObj->getDict(); - } else if (funcObj->isName("Identity")) { - return new IdentityFunction(); - } else { - error(errSyntaxError, -1, "Expected function dictionary or stream"); - return nullptr; - } - - Object obj1 = dict->lookup("FunctionType"); - if (!obj1.isInt()) { - error(errSyntaxError, -1, "Function type is missing or wrong type"); - return nullptr; - } - funcType = obj1.getInt(); - - if (funcType == 0) { - func = new SampledFunction(funcObj, dict); - } else if (funcType == 2) { - func = new ExponentialFunction(funcObj, dict); - } else if (funcType == 3) { - func = new StitchingFunction(funcObj, dict, usedParents); - } else if (funcType == 4) { - func = new PostScriptFunction(funcObj, dict); - } else { - error(errSyntaxError, -1, "Unimplemented function type ({0:d})", funcType); - return nullptr; - } - if (!func->isOk()) { - delete func; - return nullptr; - } - - return func; -} - -Function::Function(const Function *func) { - m = func->m; - n = func->n; - - memcpy(domain, func->domain, funcMaxInputs * 2 * sizeof(double)); - memcpy(range, func->range, funcMaxOutputs * 2 * sizeof(double)); - - hasRange = func->hasRange; -} - -GBool Function::init(Dict *dict) { - Object obj1; - int i; - - //----- Domain - obj1 = dict->lookup("Domain"); - if (!obj1.isArray()) { - error(errSyntaxError, -1, "Function is missing domain"); - return gFalse; - } - m = obj1.arrayGetLength() / 2; - if (m > funcMaxInputs) { - error(errSyntaxError, -1, "Functions with more than {0:d} inputs are unsupported", - funcMaxInputs); - return gFalse; - } - for (i = 0; i < m; ++i) { - Object obj2 = obj1.arrayGet(2*i); - if (!obj2.isNum()) { - error(errSyntaxError, -1, "Illegal value in function domain array"); - return gFalse; - } - domain[i][0] = obj2.getNum(); - obj2 = obj1.arrayGet(2*i+1); - if (!obj2.isNum()) { - error(errSyntaxError, -1, "Illegal value in function domain array"); - return gFalse; - } - domain[i][1] = obj2.getNum(); - } - - //----- Range - hasRange = gFalse; - n = 0; - obj1 = dict->lookup("Range"); - if (obj1.isArray()) { - hasRange = gTrue; - n = obj1.arrayGetLength() / 2; - if (n > funcMaxOutputs) { - error(errSyntaxError, -1, "Functions with more than {0:d} outputs are unsupported", - funcMaxOutputs); - return gFalse; - } - for (i = 0; i < n; ++i) { - Object obj2 = obj1.arrayGet(2*i); - if (!obj2.isNum()) { - error(errSyntaxError, -1, "Illegal value in function range array"); - return gFalse; - } - range[i][0] = obj2.getNum(); - obj2 = obj1.arrayGet(2*i+1); - if (!obj2.isNum()) { - error(errSyntaxError, -1, "Illegal value in function range array"); - return gFalse; - } - range[i][1] = obj2.getNum(); - } - } - - return gTrue; -} - -//------------------------------------------------------------------------ -// IdentityFunction -//------------------------------------------------------------------------ - -IdentityFunction::IdentityFunction() { - int i; - - // fill these in with arbitrary values just in case they get used - // somewhere - m = funcMaxInputs; - n = funcMaxOutputs; - for (i = 0; i < funcMaxInputs; ++i) { - domain[i][0] = 0; - domain[i][1] = 1; - } - hasRange = gFalse; -} - -IdentityFunction::~IdentityFunction() { -} - -void IdentityFunction::transform(double *in, double *out) { - int i; - - for (i = 0; i < funcMaxOutputs; ++i) { - out[i] = in[i]; - } -} - -//------------------------------------------------------------------------ -// SampledFunction -//------------------------------------------------------------------------ - -SampledFunction::SampledFunction(Object *funcObj, Dict *dict) { - Stream *str; - int sampleBits; - double sampleMul; - Object obj1; - Guint buf, bitMask; - int bits; - Guint s; - double in[funcMaxInputs]; - int i, j, t, bit, idx; - - idxOffset = nullptr; - samples = nullptr; - sBuf = nullptr; - ok = gFalse; - - //----- initialize the generic stuff - if (!init(dict)) { - return; - } - if (!hasRange) { - error(errSyntaxError, -1, "Type 0 function is missing range"); - return; - } - if (m > sampledFuncMaxInputs) { - error(errSyntaxError, -1, "Sampled functions with more than {0:d} inputs are unsupported", - sampledFuncMaxInputs); - return; - } - - //----- buffer - sBuf = (double *)gmallocn(1 << m, sizeof(double)); - - //----- get the stream - if (!funcObj->isStream()) { - error(errSyntaxError, -1, "Type 0 function isn't a stream"); - return; - } - str = funcObj->getStream(); - - //----- Size - obj1 = dict->lookup("Size"); - if (!obj1.isArray() || obj1.arrayGetLength() != m) { - error(errSyntaxError, -1, "Function has missing or invalid size array"); - return; - } - for (i = 0; i < m; ++i) { - Object obj2 = obj1.arrayGet(i); - if (!obj2.isInt()) { - error(errSyntaxError, -1, "Illegal value in function size array"); - return; - } - sampleSize[i] = obj2.getInt(); - if (sampleSize[i] <= 0) { - error(errSyntaxError, -1, "Illegal non-positive value in function size array"); - return; - } - } - idxOffset = (int *)gmallocn(1 << m, sizeof(int)); - for (i = 0; i < (1<<m); ++i) { - idx = 0; - for (j = m - 1, t = i; j >= 1; --j, t <<= 1) { - if (sampleSize[j] == 1) { - bit = 0; - } else { - bit = (t >> (m - 1)) & 1; - } - idx = (idx + bit) * sampleSize[j-1]; - } - if (sampleSize[0] == 1) { - bit = 0; - } else { - bit = (t >> (m - 1)) & 1; - } - idxOffset[i] = (idx + bit) * n; - } - - //----- BitsPerSample - obj1 = dict->lookup("BitsPerSample"); - if (!obj1.isInt()) { - error(errSyntaxError, -1, "Function has missing or invalid BitsPerSample"); - return; - } - sampleBits = obj1.getInt(); - if (unlikely(sampleBits < 1 || sampleBits > 32)) { - error(errSyntaxError, -1, "Function invalid BitsPerSample"); - return; - } - sampleMul = 1.0 / (pow(2.0, (double)sampleBits) - 1); - - //----- Encode - obj1 = dict->lookup("Encode"); - if (obj1.isArray() && obj1.arrayGetLength() == 2*m) { - for (i = 0; i < m; ++i) { - Object obj2 = obj1.arrayGet(2*i); - if (!obj2.isNum()) { - error(errSyntaxError, -1, "Illegal value in function encode array"); - return; - } - encode[i][0] = obj2.getNum(); - obj2 = obj1.arrayGet(2*i+1); - if (!obj2.isNum()) { - error(errSyntaxError, -1, "Illegal value in function encode array"); - return; - } - encode[i][1] = obj2.getNum(); - } - } else { - for (i = 0; i < m; ++i) { - encode[i][0] = 0; - encode[i][1] = sampleSize[i] - 1; - } - } - for (i = 0; i < m; ++i) { - if (unlikely((domain[i][1] - domain[i][0]) == 0)) { - error(errSyntaxError, -1, "Illegal value in function domain array"); - return; - } - inputMul[i] = (encode[i][1] - encode[i][0]) / - (domain[i][1] - domain[i][0]); - } - - //----- Decode - obj1 = dict->lookup("Decode"); - if (obj1.isArray() && - obj1.arrayGetLength() == 2*n) { - for (i = 0; i < n; ++i) { - Object obj2 = obj1.arrayGet(2*i); - if (!obj2.isNum()) { - error(errSyntaxError, -1, "Illegal value in function decode array"); - return; - } - decode[i][0] = obj2.getNum(); - obj2 = obj1.arrayGet(2*i+1); - if (!obj2.isNum()) { - error(errSyntaxError, -1, "Illegal value in function decode array"); - return; - } - decode[i][1] = obj2.getNum(); - } - } else { - for (i = 0; i < n; ++i) { - decode[i][0] = range[i][0]; - decode[i][1] = range[i][1]; - } - } - - //----- samples - nSamples = n; - for (i = 0; i < m; ++i) - nSamples *= sampleSize[i]; - samples = (double *)gmallocn(nSamples, sizeof(double)); - buf = 0; - bits = 0; - bitMask = (1 << sampleBits) - 1; - str->reset(); - for (i = 0; i < nSamples; ++i) { - if (sampleBits == 8) { - s = str->getChar(); - } else if (sampleBits == 16) { - s = str->getChar(); - s = (s << 8) + str->getChar(); - } else if (sampleBits == 32) { - s = str->getChar(); - s = (s << 8) + str->getChar(); - s = (s << 8) + str->getChar(); - s = (s << 8) + str->getChar(); - } else { - while (bits < sampleBits) { - buf = (buf << 8) | (str->getChar() & 0xff); - bits += 8; - } - s = (buf >> (bits - sampleBits)) & bitMask; - bits -= sampleBits; - } - samples[i] = (double)s * sampleMul; - } - str->close(); - - // set up the cache - for (i = 0; i < m; ++i) { - in[i] = domain[i][0]; - cacheIn[i] = in[i] - 1; - } - transform(in, cacheOut); - - ok = gTrue; -} - -SampledFunction::~SampledFunction() { - if (idxOffset) { - gfree(idxOffset); - } - if (samples) { - gfree(samples); - } - if (sBuf) { - gfree(sBuf); - } -} - -SampledFunction::SampledFunction(const SampledFunction *func) : Function(func) { - memcpy(sampleSize, func->sampleSize, funcMaxInputs * sizeof(int)); - - memcpy(encode, func->encode, funcMaxInputs * 2 * sizeof(double)); - memcpy(decode, func->decode, funcMaxOutputs * 2 * sizeof(double)); - - memcpy(inputMul, func->inputMul, funcMaxInputs * sizeof(double)); - - nSamples = func->nSamples; - - idxOffset = (int *)gmallocn(1 << m, sizeof(int)); - memcpy(idxOffset, func->idxOffset, (1 << m) * (int)sizeof(int)); - - samples = (double *)gmallocn(nSamples, sizeof(double)); - memcpy(samples, func->samples, nSamples * sizeof(double)); - - sBuf = (double *)gmallocn(1 << m, sizeof(double)); - - memcpy(cacheIn, func->cacheIn, funcMaxInputs * sizeof(double)); - memcpy(cacheOut, func->cacheOut, funcMaxOutputs * sizeof(double)); - - ok = func->ok; -} - -void SampledFunction::transform(double *in, double *out) { - double x; - int e[funcMaxInputs]; - double efrac0[funcMaxInputs]; - double efrac1[funcMaxInputs]; - int i, j, k, idx0, t; - - // check the cache - for (i = 0; i < m; ++i) { - if (in[i] != cacheIn[i]) { - break; - } - } - if (i == m) { - for (i = 0; i < n; ++i) { - out[i] = cacheOut[i]; - } - return; - } - - // map input values into sample array - for (i = 0; i < m; ++i) { - x = (in[i] - domain[i][0]) * inputMul[i] + encode[i][0]; - if (x < 0 || x != x) { // x!=x is a more portable version of isnan(x) - x = 0; - } else if (x > sampleSize[i] - 1) { - x = sampleSize[i] - 1; - } - e[i] = (int)x; - if (e[i] == sampleSize[i] - 1 && sampleSize[i] > 1) { - // this happens if in[i] = domain[i][1] - e[i] = sampleSize[i] - 2; - } - efrac1[i] = x - e[i]; - efrac0[i] = 1 - efrac1[i]; - } - - // compute index for the first sample to be used - idx0 = 0; - for (k = m - 1; k >= 1; --k) { - idx0 = (idx0 + e[k]) * sampleSize[k-1]; - } - idx0 = (idx0 + e[0]) * n; - - // for each output, do m-linear interpolation - for (i = 0; i < n; ++i) { - - // pull 2^m values out of the sample array - for (j = 0; j < (1<<m); ++j) { - int idx = idx0 + idxOffset[j] + i; - if (likely(idx >= 0 && idx < nSamples)) { - sBuf[j] = samples[idx]; - } else { - sBuf[j] = 0; // TODO Investigate if this is what Adobe does - } - } - - // do m sets of interpolations - for (j = 0, t = (1<<m); j < m; ++j, t >>= 1) { - for (k = 0; k < t; k += 2) { - sBuf[k >> 1] = efrac0[j] * sBuf[k] + efrac1[j] * sBuf[k+1]; - } - } - - // map output value to range - out[i] = sBuf[0] * (decode[i][1] - decode[i][0]) + decode[i][0]; - if (out[i] < range[i][0]) { - out[i] = range[i][0]; - } else if (out[i] > range[i][1]) { - out[i] = range[i][1]; - } - } - - // save current result in the cache - for (i = 0; i < m; ++i) { - cacheIn[i] = in[i]; - } - for (i = 0; i < n; ++i) { - cacheOut[i] = out[i]; - } -} - -GBool SampledFunction::hasDifferentResultSet(Function *func) { - if (func->getType() == 0) { - SampledFunction *compTo = (SampledFunction *) func; - if (compTo->getSampleNumber() != nSamples) - return gTrue; - double *compSamples = compTo->getSamples(); - for (int i = 0; i < nSamples; i++) { - if (samples[i] != compSamples[i]) - return gTrue; - } - } - return gFalse; -} - -//------------------------------------------------------------------------ -// ExponentialFunction -//------------------------------------------------------------------------ - -ExponentialFunction::ExponentialFunction(Object *funcObj, Dict *dict) { - Object obj1; - - ok = gFalse; - - //----- initialize the generic stuff - if (!init(dict)) { - return; - } - if (m != 1) { - error(errSyntaxError, -1, "Exponential function with more than one input"); - return; - } - - //----- C0 - obj1 = dict->lookup("C0"); - if (obj1.isArray()) { - if (hasRange && obj1.arrayGetLength() != n) { - error(errSyntaxError, -1, "Function's C0 array is wrong length"); - return; - } - n = obj1.arrayGetLength(); - if (unlikely(n > funcMaxOutputs)) { - error(errSyntaxError, -1, "Function's C0 array is wrong length"); - n = funcMaxOutputs; - } - for (int i = 0; i < n; ++i) { - Object obj2 = obj1.arrayGet(i); - if (!obj2.isNum()) { - error(errSyntaxError, -1, "Illegal value in function C0 array"); - return; - } - c0[i] = obj2.getNum(); - } - } else { - if (hasRange && n != 1) { - error(errSyntaxError, -1, "Function's C0 array is wrong length"); - return; - } - n = 1; - c0[0] = 0; - } - - //----- C1 - obj1 = dict->lookup("C1"); - if (obj1.isArray()) { - if (obj1.arrayGetLength() != n) { - error(errSyntaxError, -1, "Function's C1 array is wrong length"); - return; - } - for (int i = 0; i < n; ++i) { - Object obj2 = obj1.arrayGet(i); - if (!obj2.isNum()) { - error(errSyntaxError, -1, "Illegal value in function C1 array"); - return; - } - c1[i] = obj2.getNum(); - } - } else { - if (n != 1) { - error(errSyntaxError, -1, "Function's C1 array is wrong length"); - return; - } - c1[0] = 1; - } - - //----- N (exponent) - obj1 = dict->lookup("N"); - if (!obj1.isNum()) { - error(errSyntaxError, -1, "Function has missing or invalid N"); - return; - } - e = obj1.getNum(); - - isLinear = fabs(e-1.) < 1e-10; - ok = gTrue; -} - -ExponentialFunction::~ExponentialFunction() { -} - -ExponentialFunction::ExponentialFunction(const ExponentialFunction *func) : Function(func) { - memcpy(c0, func->c0, funcMaxOutputs * sizeof(double)); - memcpy(c1, func->c1, funcMaxOutputs * sizeof(double)); - - e = func->e; - isLinear = func->isLinear; - ok = func->ok; -} - -void ExponentialFunction::transform(double *in, double *out) { - double x; - int i; - - if (in[0] < domain[0][0]) { - x = domain[0][0]; - } else if (in[0] > domain[0][1]) { - x = domain[0][1]; - } else { - x = in[0]; - } - for (i = 0; i < n; ++i) { - out[i] = c0[i] + (isLinear ? x : pow(x, e)) * (c1[i] - c0[i]); - if (hasRange) { - if (out[i] < range[i][0]) { - out[i] = range[i][0]; - } else if (out[i] > range[i][1]) { - out[i] = range[i][1]; - } - } - } - return; -} - -//------------------------------------------------------------------------ -// StitchingFunction -//------------------------------------------------------------------------ - -StitchingFunction::StitchingFunction(Object *funcObj, Dict *dict, std::set<int> *usedParents) { - Object obj1; - int i; - - ok = gFalse; - funcs = nullptr; - bounds = nullptr; - encode = nullptr; - scale = nullptr; - - //----- initialize the generic stuff - if (!init(dict)) { - return; - } - if (m != 1) { - error(errSyntaxError, -1, "Stitching function with more than one input"); - return; - } - - //----- Functions - obj1 = dict->lookup("Functions"); - if (!obj1.isArray()) { - error(errSyntaxError, -1, "Missing 'Functions' entry in stitching function"); - return; - } - k = obj1.arrayGetLength(); - funcs = (Function **)gmallocn(k, sizeof(Function *)); - bounds = (double *)gmallocn(k + 1, sizeof(double)); - encode = (double *)gmallocn(2 * k, sizeof(double)); - scale = (double *)gmallocn(k, sizeof(double)); - for (i = 0; i < k; ++i) { - funcs[i] = nullptr; - } - for (i = 0; i < k; ++i) { - std::set<int> usedParentsAux = *usedParents; - Object obj2 = obj1.arrayGetNF(i); - if (obj2.isRef()) { - const Ref ref = obj2.getRef(); - if (usedParentsAux.find(ref.num) == usedParentsAux.end()) { - usedParentsAux.insert(ref.num); - obj2 = obj1.arrayGet(i); - } else { - return; - } - } - if (!(funcs[i] = Function::parse(&obj2, &usedParentsAux))) { - return; - } - if (funcs[i]->getInputSize() != 1 || - (i > 0 && funcs[i]->getOutputSize() != funcs[0]->getOutputSize())) { - error(errSyntaxError, -1, - "Incompatible subfunctions in stitching function"); - return; - } - } - - //----- Bounds - obj1 = dict->lookup("Bounds"); - if (!obj1.isArray() || obj1.arrayGetLength() != k - 1) { - error(errSyntaxError, -1, "Missing or invalid 'Bounds' entry in stitching function"); - return; - } - bounds[0] = domain[0][0]; - for (i = 1; i < k; ++i) { - Object obj2 = obj1.arrayGet(i - 1); - if (!obj2.isNum()) { - error(errSyntaxError, -1, "Invalid type in 'Bounds' array in stitching function"); - return; - } - bounds[i] = obj2.getNum(); - } - bounds[k] = domain[0][1]; - - //----- Encode - obj1 = dict->lookup("Encode"); - if (!obj1.isArray() || obj1.arrayGetLength() != 2 * k) { - error(errSyntaxError, -1, "Missing or invalid 'Encode' entry in stitching function"); - return; - } - for (i = 0; i < 2 * k; ++i) { - Object obj2 = obj1.arrayGet(i); - if (!obj2.isNum()) { - error(errSyntaxError, -1, "Invalid type in 'Encode' array in stitching function"); - return; - } - encode[i] = obj2.getNum(); - } - - //----- pre-compute the scale factors - for (i = 0; i < k; ++i) { - if (bounds[i] == bounds[i+1]) { - // avoid a divide-by-zero -- in this situation, function i will - // never be used anyway - scale[i] = 0; - } else { - scale[i] = (encode[2*i+1] - encode[2*i]) / (bounds[i+1] - bounds[i]); - } - } - - n = funcs[0]->getOutputSize(); - ok = gTrue; - return; -} - -StitchingFunction::StitchingFunction(const StitchingFunction *func) : Function(func) { - k = func->k; - - funcs = (Function **)gmallocn(k, sizeof(Function *)); - for (int i = 0; i < k; ++i) { - funcs[i] = func->funcs[i]->copy(); - } - - bounds = (double *)gmallocn(k + 1, sizeof(double)); - memcpy(bounds, func->bounds, (k + 1) * sizeof(double)); - - encode = (double *)gmallocn(2 * k, sizeof(double)); - memcpy(encode, func->encode, 2 * k * sizeof(double)); - - scale = (double *)gmallocn(k, sizeof(double)); - memcpy(scale, func->scale, k * sizeof(double)); - - ok = func->ok; -} - -StitchingFunction::~StitchingFunction() { - int i; - - if (funcs) { - for (i = 0; i < k; ++i) { - if (funcs[i]) { - delete funcs[i]; - } - } - } - gfree(funcs); - gfree(bounds); - gfree(encode); - gfree(scale); -} - -void StitchingFunction::transform(double *in, double *out) { - double x; - int i; - - if (in[0] < domain[0][0]) { - x = domain[0][0]; - } else if (in[0] > domain[0][1]) { - x = domain[0][1]; - } else { - x = in[0]; - } - for (i = 0; i < k - 1; ++i) { - if (x < bounds[i+1]) { - break; - } - } - x = encode[2*i] + (x - bounds[i]) * scale[i]; - funcs[i]->transform(&x, out); -} - -//------------------------------------------------------------------------ -// PostScriptFunction -//------------------------------------------------------------------------ - -enum PSOp { - psOpAbs, - psOpAdd, - psOpAnd, - psOpAtan, - psOpBitshift, - psOpCeiling, - psOpCopy, - psOpCos, - psOpCvi, - psOpCvr, - psOpDiv, - psOpDup, - psOpEq, - psOpExch, - psOpExp, - psOpFalse, - psOpFloor, - psOpGe, - psOpGt, - psOpIdiv, - psOpIndex, - psOpLe, - psOpLn, - psOpLog, - psOpLt, - psOpMod, - psOpMul, - psOpNe, - psOpNeg, - psOpNot, - psOpOr, - psOpPop, - psOpRoll, - psOpRound, - psOpSin, - psOpSqrt, - psOpSub, - psOpTrue, - psOpTruncate, - psOpXor, - psOpIf, - psOpIfelse, - psOpReturn -}; - -// Note: 'if' and 'ifelse' are parsed separately. -// The rest are listed here in alphabetical order. -// The index in this table is equivalent to the entry in PSOp. -static const char *psOpNames[] = { - "abs", - "add", - "and", - "atan", - "bitshift", - "ceiling", - "copy", - "cos", - "cvi", - "cvr", - "div", - "dup", - "eq", - "exch", - "exp", - "false", - "floor", - "ge", - "gt", - "idiv", - "index", - "le", - "ln", - "log", - "lt", - "mod", - "mul", - "ne", - "neg", - "not", - "or", - "pop", - "roll", - "round", - "sin", - "sqrt", - "sub", - "true", - "truncate", - "xor" -}; - -#define nPSOps (sizeof(psOpNames) / sizeof(char *)) - -enum PSObjectType { - psBool, - psInt, - psReal, - psOperator, - psBlock -}; - -// In the code array, 'if'/'ifelse' operators take up three slots -// plus space for the code in the subclause(s). -// -// +---------------------------------+ -// | psOperator: psOpIf / psOpIfelse | -// +---------------------------------+ -// | psBlock: ptr=<A> | -// +---------------------------------+ -// | psBlock: ptr=<B> | -// +---------------------------------+ -// | if clause | -// | ... | -// | psOperator: psOpReturn | -// +---------------------------------+ -// <A> | else clause | -// | ... | -// | psOperator: psOpReturn | -// +---------------------------------+ -// <B> | ... | -// -// For 'if', pointer <A> is present in the code stream but unused. - -struct PSObject { - PSObjectType type; - union { - GBool booln; // boolean (stack only) - int intg; // integer (stack and code) - double real; // real (stack and code) - PSOp op; // operator (code only) - int blk; // if/ifelse block pointer (code only) - }; -}; - -#define psStackSize 100 - -class PSStack { -public: - - PSStack() {sp = psStackSize; } - void clear() { sp = psStackSize; } - void pushBool(GBool booln) - { - if (checkOverflow()) { - stack[--sp].type = psBool; - stack[sp].booln = booln; - } - } - void pushInt(int intg) - { - if (checkOverflow()) { - stack[--sp].type = psInt; - stack[sp].intg = intg; - } - } - void pushReal(double real) - { - if (checkOverflow()) { - stack[--sp].type = psReal; - stack[sp].real = real; - } - } - GBool popBool() - { - if (checkUnderflow() && checkType(psBool, psBool)) { - return stack[sp++].booln; - } - return gFalse; - } - int popInt() - { - if (checkUnderflow() && checkType(psInt, psInt)) { - return stack[sp++].intg; - } - return 0; - } - double popNum() - { - double ret; - - if (checkUnderflow() && checkType(psInt, psReal)) { - ret = (stack[sp].type == psInt) ? (double)stack[sp].intg : stack[sp].real; - ++sp; - return ret; - } - return 0; - } - GBool empty() { return sp == psStackSize; } - GBool topIsInt() { return sp < psStackSize && stack[sp].type == psInt; } - GBool topTwoAreInts() - { return sp < psStackSize - 1 && - stack[sp].type == psInt && - stack[sp+1].type == psInt; } - GBool topIsReal() { return sp < psStackSize && stack[sp].type == psReal; } - GBool topTwoAreNums() - { return sp < psStackSize - 1 && - (stack[sp].type == psInt || stack[sp].type == psReal) && - (stack[sp+1].type == psInt || stack[sp+1].type == psReal); } - void copy(int n); - void roll(int n, int j); - void index(int i) - { - if (!checkOverflow()) { - return; - } - --sp; - if (unlikely(sp + i + 1 >= psStackSize)) { - error(errSyntaxError, -1, "Stack underflow in PostScript function"); - return; - } - if (unlikely(sp + i + 1 < 0)) { - error(errSyntaxError, -1, "Stack overflow in PostScript function"); - return; - } - stack[sp] = stack[sp + 1 + i]; - } - void pop() - { - if (!checkUnderflow()) { - return; - } - ++sp; - } - -private: - - GBool checkOverflow(int n = 1) - { - if (sp - n < 0) { - error(errSyntaxError, -1, "Stack overflow in PostScript function"); - return gFalse; - } - return gTrue; - } - GBool checkUnderflow() - { - if (sp == psStackSize) { - error(errSyntaxError, -1, "Stack underflow in PostScript function"); - return gFalse; - } - return gTrue; - } - GBool checkType(PSObjectType t1, PSObjectType t2) - { - if (stack[sp].type != t1 && stack[sp].type != t2) { - error(errSyntaxError, -1, "Type mismatch in PostScript function"); - return gFalse; - } - return gTrue; - } - PSObject stack[psStackSize]; - int sp; -}; - - -void PSStack::copy(int n) { - int i; - - if (sp + n > psStackSize) { - error(errSyntaxError, -1, "Stack underflow in PostScript function"); - return; - } - if (unlikely(sp - n > psStackSize)) { - error(errSyntaxError, -1, "Stack underflow in PostScript function"); - return; - } - if (!checkOverflow(n)) { - return; - } - for (i = sp + n - 1; i >= sp; --i) { - stack[i - n] = stack[i]; - } - sp -= n; -} - -void PSStack::roll(int n, int j) { - PSObject obj; - int i, k; - - if (unlikely(n == 0)) { - return; - } - if (j >= 0) { - j %= n; - } else { - j = -j % n; - if (j != 0) { - j = n - j; - } - } - if (n <= 0 || j == 0 || n > psStackSize || sp + n > psStackSize) { - return; - } - if (j <= n / 2) { - for (i = 0; i < j; ++i) { - obj = stack[sp]; - for (k = sp; k < sp + n - 1; ++k) { - stack[k] = stack[k+1]; - } - stack[sp + n - 1] = obj; - } - } else { - j = n - j; - for (i = 0; i < j; ++i) { - obj = stack[sp + n - 1]; - for (k = sp + n - 1; k > sp; --k) { - stack[k] = stack[k-1]; - } - stack[sp] = obj; - } - } -} - -PostScriptFunction::PostScriptFunction(Object *funcObj, Dict *dict) { - Stream *str; - int codePtr; - GooString *tok; - double in[funcMaxInputs]; - int i; - - code = nullptr; - codeString = nullptr; - codeSize = 0; - ok = gFalse; - - //----- initialize the generic stuff - if (!init(dict)) { - goto err1; - } - if (!hasRange) { - error(errSyntaxError, -1, "Type 4 function is missing range"); - goto err1; - } - - //----- get the stream - if (!funcObj->isStream()) { - error(errSyntaxError, -1, "Type 4 function isn't a stream"); - goto err1; - } - str = funcObj->getStream(); - - //----- parse the function - codeString = new GooString(); - str->reset(); - if (!(tok = getToken(str)) || tok->cmp("{")) { - error(errSyntaxError, -1, "Expected '{{' at start of PostScript function"); - if (tok) { - delete tok; - } - goto err1; - } - delete tok; - codePtr = 0; - if (!parseCode(str, &codePtr)) { - goto err2; - } - str->close(); - - //----- set up the cache - for (i = 0; i < m; ++i) { - in[i] = domain[i][0]; - cacheIn[i] = in[i] - 1; - } - transform(in, cacheOut); - - ok = gTrue; - - err2: - str->close(); - err1: - return; -} - -PostScriptFunction::PostScriptFunction(const PostScriptFunction *func) : Function(func) { - codeSize = func->codeSize; - - code = (PSObject *)gmallocn(codeSize, sizeof(PSObject)); - memcpy(code, func->code, codeSize * sizeof(PSObject)); - - codeString = func->codeString->copy(); - - memcpy(cacheIn, func->cacheIn, funcMaxInputs * sizeof(double)); - memcpy(cacheOut, func->cacheOut, funcMaxOutputs * sizeof(double)); - - ok = func->ok; -} - -PostScriptFunction::~PostScriptFunction() { - gfree(code); - delete codeString; -} - -void PostScriptFunction::transform(double *in, double *out) { - PSStack stack; - int i; - - // check the cache - for (i = 0; i < m; ++i) { - if (in[i] != cacheIn[i]) { - break; - } - } - if (i == m) { - for (i = 0; i < n; ++i) { - out[i] = cacheOut[i]; - } - return; - } - - for (i = 0; i < m; ++i) { - //~ may need to check for integers here - stack.pushReal(in[i]); - } - exec(&stack, 0); - for (i = n - 1; i >= 0; --i) { - out[i] = stack.popNum(); - if (out[i] < range[i][0]) { - out[i] = range[i][0]; - } else if (out[i] > range[i][1]) { - out[i] = range[i][1]; - } - } - stack.clear(); - - // if (!stack->empty()) { - // error(errSyntaxWarning, -1, - // "Extra values on stack at end of PostScript function"); - // } - - // save current result in the cache - for (i = 0; i < m; ++i) { - cacheIn[i] = in[i]; - } - for (i = 0; i < n; ++i) { - cacheOut[i] = out[i]; - } -} - -GBool PostScriptFunction::parseCode(Stream *str, int *codePtr) { - GooString *tok; - char *p; - GBool isReal; - int opPtr, elsePtr; - int a, b, mid, cmp; - - while (1) { - if (!(tok = getToken(str))) { - error(errSyntaxError, -1, "Unexpected end of PostScript function stream"); - return gFalse; - } - p = tok->getCString(); - if (isdigit(*p) || *p == '.' || *p == '-') { - isReal = gFalse; - for (; *p; ++p) { - if (*p == '.') { - isReal = gTrue; - break; - } - } - resizeCode(*codePtr); - if (isReal) { - code[*codePtr].type = psReal; - code[*codePtr].real = gatof(tok->getCString()); - } else { - code[*codePtr].type = psInt; - code[*codePtr].intg = atoi(tok->getCString()); - } - ++*codePtr; - delete tok; - } else if (!tok->cmp("{")) { - delete tok; - opPtr = *codePtr; - *codePtr += 3; - resizeCode(opPtr + 2); - if (!parseCode(str, codePtr)) { - return gFalse; - } - if (!(tok = getToken(str))) { - error(errSyntaxError, -1, "Unexpected end of PostScript function stream"); - return gFalse; - } - if (!tok->cmp("{")) { - elsePtr = *codePtr; - if (!parseCode(str, codePtr)) { - delete tok; - return gFalse; - } - delete tok; - if (!(tok = getToken(str))) { - error(errSyntaxError, -1, "Unexpected end of PostScript function stream"); - return gFalse; - } - } else { - elsePtr = -1; - } - if (!tok->cmp("if")) { - if (elsePtr >= 0) { - error(errSyntaxError, -1, - "Got 'if' operator with two blocks in PostScript function"); - return gFalse; - } - code[opPtr].type = psOperator; - code[opPtr].op = psOpIf; - code[opPtr+2].type = psBlock; - code[opPtr+2].blk = *codePtr; - } else if (!tok->cmp("ifelse")) { - if (elsePtr < 0) { - error(errSyntaxError, -1, - "Got 'ifelse' operator with one block in PostScript function"); - return gFalse; - } - code[opPtr].type = psOperator; - code[opPtr].op = psOpIfelse; - code[opPtr+1].type = psBlock; - code[opPtr+1].blk = elsePtr; - code[opPtr+2].type = psBlock; - code[opPtr+2].blk = *codePtr; - } else { - error(errSyntaxError, -1, - "Expected if/ifelse operator in PostScript function"); - delete tok; - return gFalse; - } - delete tok; - } else if (!tok->cmp("}")) { - delete tok; - resizeCode(*codePtr); - code[*codePtr].type = psOperator; - code[*codePtr].op = psOpReturn; - ++*codePtr; - break; - } else { - a = -1; - b = nPSOps; - cmp = 0; // make gcc happy - // invariant: psOpNames[a] < tok < psOpNames[b] - while (b - a > 1) { - mid = (a + b) / 2; - cmp = tok->cmp(psOpNames[mid]); - if (cmp > 0) { - a = mid; - } else if (cmp < 0) { - b = mid; - } else { - a = b = mid; - } - } - if (cmp != 0) { - error(errSyntaxError, -1, - "Unknown operator '{0:t}' in PostScript function", - tok); - delete tok; - return gFalse; - } - delete tok; - resizeCode(*codePtr); - code[*codePtr].type = psOperator; - code[*codePtr].op = (PSOp)a; - ++*codePtr; - } - } - return gTrue; -} - -GooString *PostScriptFunction::getToken(Stream *str) { - GooString *s; - int c; - GBool comment; - - s = new GooString(); - comment = gFalse; - while (1) { - if ((c = str->getChar()) == EOF) { - break; - } - codeString->append(c); - if (comment) { - if (c == '\x0a' || c == '\x0d') { - comment = gFalse; - } - } else if (c == '%') { - comment = gTrue; - } else if (!isspace(c)) { - break; - } - } - if (c == '{' || c == '}') { - s->append((char)c); - } else if (isdigit(c) || c == '.' || c == '-') { - while (1) { - s->append((char)c); - c = str->lookChar(); - if (c == EOF || !(isdigit(c) || c == '.' || c == '-')) { - break; - } - str->getChar(); - codeString->append(c); - } - } else { - while (1) { - s->append((char)c); - c = str->lookChar(); - if (c == EOF || !isalnum(c)) { - break; - } - str->getChar(); - codeString->append(c); - } - } - return s; -} - -void PostScriptFunction::resizeCode(int newSize) { - if (newSize >= codeSize) { - codeSize += 64; - code = (PSObject *)greallocn(code, codeSize, sizeof(PSObject)); - } -} - -void PostScriptFunction::exec(PSStack *stack, int codePtr) { - int i1, i2; - double r1, r2, result; - GBool b1, b2; - - while (1) { - switch (code[codePtr].type) { - case psInt: - stack->pushInt(code[codePtr++].intg); - break; - case psReal: - stack->pushReal(code[codePtr++].real); - break; - case psOperator: - switch (code[codePtr++].op) { - case psOpAbs: - if (stack->topIsInt()) { - stack->pushInt(abs(stack->popInt())); - } else { - stack->pushReal(fabs(stack->popNum())); - } - break; - case psOpAdd: - if (stack->topTwoAreInts()) { - i2 = stack->popInt(); - i1 = stack->popInt(); - stack->pushInt(i1 + i2); - } else { - r2 = stack->popNum(); - r1 = stack->popNum(); - stack->pushReal(r1 + r2); - } - break; - case psOpAnd: - if (stack->topTwoAreInts()) { - i2 = stack->popInt(); - i1 = stack->popInt(); - stack->pushInt(i1 & i2); - } else { - b2 = stack->popBool(); - b1 = stack->popBool(); - stack->pushBool(b1 && b2); - } - break; - case psOpAtan: - r2 = stack->popNum(); - r1 = stack->popNum(); - result = atan2(r1, r2) * 180.0 / M_PI; - if (result < 0) result += 360.0; - stack->pushReal(result); - break; - case psOpBitshift: - i2 = stack->popInt(); - i1 = stack->popInt(); - if (i2 > 0) { - stack->pushInt(i1 << i2); - } else if (i2 < 0) { - stack->pushInt((int)((Guint)i1 >> -i2)); - } else { - stack->pushInt(i1); - } - break; - case psOpCeiling: - if (!stack->topIsInt()) { - stack->pushReal(ceil(stack->popNum())); - } - break; - case psOpCopy: - stack->copy(stack->popInt()); - break; - case psOpCos: - stack->pushReal(cos(stack->popNum() * M_PI / 180.0)); - break; - case psOpCvi: - if (!stack->topIsInt()) { - stack->pushInt((int)stack->popNum()); - } - break; - case psOpCvr: - if (!stack->topIsReal()) { - stack->pushReal(stack->popNum()); - } - break; - case psOpDiv: - r2 = stack->popNum(); - r1 = stack->popNum(); - stack->pushReal(r1 / r2); - break; - case psOpDup: - stack->copy(1); - break; - case psOpEq: - if (stack->topTwoAreInts()) { - i2 = stack->popInt(); - i1 = stack->popInt(); - stack->pushBool(i1 == i2); - } else if (stack->topTwoAreNums()) { - r2 = stack->popNum(); - r1 = stack->popNum(); - stack->pushBool(r1 == r2); - } else { - b2 = stack->popBool(); - b1 = stack->popBool(); - stack->pushBool(b1 == b2); - } - break; - case psOpExch: - stack->roll(2, 1); - break; - case psOpExp: - r2 = stack->popNum(); - r1 = stack->popNum(); - stack->pushReal(pow(r1, r2)); - break; - case psOpFalse: - stack->pushBool(gFalse); - break; - case psOpFloor: - if (!stack->topIsInt()) { - stack->pushReal(floor(stack->popNum())); - } - break; - case psOpGe: - if (stack->topTwoAreInts()) { - i2 = stack->popInt(); - i1 = stack->popInt(); - stack->pushBool(i1 >= i2); - } else { - r2 = stack->popNum(); - r1 = stack->popNum(); - stack->pushBool(r1 >= r2); - } - break; - case psOpGt: - if (stack->topTwoAreInts()) { - i2 = stack->popInt(); - i1 = stack->popInt(); - stack->pushBool(i1 > i2); - } else { - r2 = stack->popNum(); - r1 = stack->popNum(); - stack->pushBool(r1 > r2); - } - break; - case psOpIdiv: - i2 = stack->popInt(); - i1 = stack->popInt(); - if (likely(i2 != 0)) { - stack->pushInt(i1 / i2); - } - break; - case psOpIndex: - stack->index(stack->popInt()); - break; - case psOpLe: - if (stack->topTwoAreInts()) { - i2 = stack->popInt(); - i1 = stack->popInt(); - stack->pushBool(i1 <= i2); - } else { - r2 = stack->popNum(); - r1 = stack->popNum(); - stack->pushBool(r1 <= r2); - } - break; - case psOpLn: - stack->pushReal(log(stack->popNum())); - break; - case psOpLog: - stack->pushReal(log10(stack->popNum())); - break; - case psOpLt: - if (stack->topTwoAreInts()) { - i2 = stack->popInt(); - i1 = stack->popInt(); - stack->pushBool(i1 < i2); - } else { - r2 = stack->popNum(); - r1 = stack->popNum(); - stack->pushBool(r1 < r2); - } - break; - case psOpMod: - i2 = stack->popInt(); - i1 = stack->popInt(); - if (likely(i2 != 0)) { - stack->pushInt(i1 % i2); - } - break; - case psOpMul: - if (stack->topTwoAreInts()) { - i2 = stack->popInt(); - i1 = stack->popInt(); - //~ should check for out-of-range, and push a real instead - stack->pushInt(i1 * i2); - } else { - r2 = stack->popNum(); - r1 = stack->popNum(); - stack->pushReal(r1 * r2); - } - break; - case psOpNe: - if (stack->topTwoAreInts()) { - i2 = stack->popInt(); - i1 = stack->popInt(); - stack->pushBool(i1 != i2); - } else if (stack->topTwoAreNums()) { - r2 = stack->popNum(); - r1 = stack->popNum(); - stack->pushBool(r1 != r2); - } else { - b2 = stack->popBool(); - b1 = stack->popBool(); - stack->pushBool(b1 != b2); - } - break; - case psOpNeg: - if (stack->topIsInt()) { - stack->pushInt(-stack->popInt()); - } else { - stack->pushReal(-stack->popNum()); - } - break; - case psOpNot: - if (stack->topIsInt()) { - stack->pushInt(~stack->popInt()); - } else { - stack->pushBool(!stack->popBool()); - } - break; - case psOpOr: - if (stack->topTwoAreInts()) { - i2 = stack->popInt(); - i1 = stack->popInt(); - stack->pushInt(i1 | i2); - } else { - b2 = stack->popBool(); - b1 = stack->popBool(); - stack->pushBool(b1 || b2); - } - break; - case psOpPop: - stack->pop(); - break; - case psOpRoll: - i2 = stack->popInt(); - i1 = stack->popInt(); - stack->roll(i1, i2); - break; - case psOpRound: - if (!stack->topIsInt()) { - r1 = stack->popNum(); - stack->pushReal((r1 >= 0) ? floor(r1 + 0.5) : ceil(r1 - 0.5)); - } - break; - case psOpSin: - stack->pushReal(sin(stack->popNum() * M_PI / 180.0)); - break; - case psOpSqrt: - stack->pushReal(sqrt(stack->popNum())); - break; - case psOpSub: - if (stack->topTwoAreInts()) { - i2 = stack->popInt(); - i1 = stack->popInt(); - stack->pushInt(i1 - i2); - } else { - r2 = stack->popNum(); - r1 = stack->popNum(); - stack->pushReal(r1 - r2); - } - break; - case psOpTrue: - stack->pushBool(gTrue); - break; - case psOpTruncate: - if (!stack->topIsInt()) { - r1 = stack->popNum(); - stack->pushReal((r1 >= 0) ? floor(r1) : ceil(r1)); - } - break; - case psOpXor: - if (stack->topTwoAreInts()) { - i2 = stack->popInt(); - i1 = stack->popInt(); - stack->pushInt(i1 ^ i2); - } else { - b2 = stack->popBool(); - b1 = stack->popBool(); - stack->pushBool(b1 ^ b2); - } - break; - case psOpIf: - b1 = stack->popBool(); - if (b1) { - exec(stack, codePtr + 2); - } - codePtr = code[codePtr + 1].blk; - break; - case psOpIfelse: - b1 = stack->popBool(); - if (b1) { - exec(stack, codePtr + 2); - } else { - exec(stack, code[codePtr].blk); - } - codePtr = code[codePtr + 1].blk; - break; - case psOpReturn: - return; - } - break; - default: - error(errSyntaxError, -1, "Internal: bad object in PostScript function code"); - break; - } - } -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/Function.h b/Build/source/libs/poppler/poppler-src/poppler/Function.h deleted file mode 100644 index 10adf7051c9..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/Function.h +++ /dev/null @@ -1,261 +0,0 @@ -//======================================================================== -// -// Function.h -// -// Copyright 2001-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2009, 2010, 2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2010 Christian Feuersänger <cfeuersaenger@googlemail.com> -// Copyright (C) 2011 Andrea Canciani <ranma42@gmail.com> -// Copyright (C) 2012 Thomas Freitag <Thomas.Freitag@alfa.de> -// Copyright (C) 2012 Adam Reichold <adamreichold@myopera.com> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef FUNCTION_H -#define FUNCTION_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "goo/gtypes.h" -#include "Object.h" -#include <set> - -class Dict; -class Stream; -struct PSObject; -class PSStack; -class PopplerCache; - -//------------------------------------------------------------------------ -// Function -//------------------------------------------------------------------------ - -#define funcMaxInputs 32 -#define funcMaxOutputs 32 -#define sampledFuncMaxInputs 16 - -class Function { -public: - - Function(); - - virtual ~Function(); - - Function(const Function &) = delete; - Function& operator=(const Function &other) = delete; - - // Construct a function. Returns NULL if unsuccessful. - static Function *parse(Object *funcObj); - - // Initialize the entries common to all function types. - GBool init(Dict *dict); - - virtual Function *copy() = 0; - - // Return the function type: - // -1 : identity - // 0 : sampled - // 2 : exponential - // 3 : stitching - // 4 : PostScript - virtual int getType() = 0; - - // Return size of input and output tuples. - int getInputSize() { return m; } - int getOutputSize() { return n; } - - double getDomainMin(int i) { return domain[i][0]; } - double getDomainMax(int i) { return domain[i][1]; } - double getRangeMin(int i) { return range[i][0]; } - double getRangeMax(int i) { return range[i][1]; } - GBool getHasRange() { return hasRange; } - virtual GBool hasDifferentResultSet(Function *func) { return gFalse; } - - // Transform an input tuple into an output tuple. - virtual void transform(double *in, double *out) = 0; - - virtual GBool isOk() = 0; - -protected: - static Function *parse(Object *funcObj, std::set<int> *usedParents); - - Function(const Function *func); - - int m, n; // size of input and output tuples - double // min and max values for function domain - domain[funcMaxInputs][2]; - double // min and max values for function range - range[funcMaxOutputs][2]; - GBool hasRange; // set if range is defined -}; - -//------------------------------------------------------------------------ -// IdentityFunction -//------------------------------------------------------------------------ - -class IdentityFunction: public Function { -public: - - IdentityFunction(); - ~IdentityFunction(); - Function *copy() override { return new IdentityFunction(); } - int getType() override { return -1; } - void transform(double *in, double *out) override; - GBool isOk() override { return gTrue; } - -private: -}; - -//------------------------------------------------------------------------ -// SampledFunction -//------------------------------------------------------------------------ - -class SampledFunction: public Function { -public: - - SampledFunction(Object *funcObj, Dict *dict); - ~SampledFunction(); - Function *copy() override { return new SampledFunction(this); } - int getType() override { return 0; } - void transform(double *in, double *out) override; - GBool isOk() override { return ok; } - GBool hasDifferentResultSet(Function *func) override; - - int getSampleSize(int i) { return sampleSize[i]; } - double getEncodeMin(int i) { return encode[i][0]; } - double getEncodeMax(int i) { return encode[i][1]; } - double getDecodeMin(int i) { return decode[i][0]; } - double getDecodeMax(int i) { return decode[i][1]; } - double *getSamples() { return samples; } - int getSampleNumber() { return nSamples; } - -private: - - SampledFunction(const SampledFunction *func); - - int // number of samples for each domain element - sampleSize[funcMaxInputs]; - double // min and max values for domain encoder - encode[funcMaxInputs][2]; - double // min and max values for range decoder - decode[funcMaxOutputs][2]; - double // input multipliers - inputMul[funcMaxInputs]; - int *idxOffset; - double *samples; // the samples - int nSamples; // size of the samples array - double *sBuf; // buffer for the transform function - double cacheIn[funcMaxInputs]; - double cacheOut[funcMaxOutputs]; - GBool ok; -}; - -//------------------------------------------------------------------------ -// ExponentialFunction -//------------------------------------------------------------------------ - -class ExponentialFunction: public Function { -public: - - ExponentialFunction(Object *funcObj, Dict *dict); - ~ExponentialFunction(); - Function *copy() override { return new ExponentialFunction(this); } - int getType() override { return 2; } - void transform(double *in, double *out) override; - GBool isOk() override { return ok; } - - double *getC0() { return c0; } - double *getC1() { return c1; } - double getE() { return e; } - -private: - - ExponentialFunction(const ExponentialFunction *func); - - double c0[funcMaxOutputs]; - double c1[funcMaxOutputs]; - double e; - bool isLinear; - GBool ok; -}; - -//------------------------------------------------------------------------ -// StitchingFunction -//------------------------------------------------------------------------ - -class StitchingFunction: public Function { -public: - - StitchingFunction(Object *funcObj, Dict *dict, std::set<int> *usedParents); - ~StitchingFunction(); - Function *copy() override { return new StitchingFunction(this); } - int getType() override { return 3; } - void transform(double *in, double *out) override; - GBool isOk() override { return ok; } - - int getNumFuncs() { return k; } - Function *getFunc(int i) { return funcs[i]; } - double *getBounds() { return bounds; } - double *getEncode() { return encode; } - double *getScale() { return scale; } - -private: - - StitchingFunction(const StitchingFunction *func); - - int k; - Function **funcs; - double *bounds; - double *encode; - double *scale; - GBool ok; -}; - -//------------------------------------------------------------------------ -// PostScriptFunction -//------------------------------------------------------------------------ - -class PostScriptFunction: public Function { -public: - - PostScriptFunction(Object *funcObj, Dict *dict); - ~PostScriptFunction(); - Function *copy() override { return new PostScriptFunction(this); } - int getType() override { return 4; } - void transform(double *in, double *out) override; - GBool isOk() override { return ok; } - - const GooString *getCodeString() const { return codeString; } - -private: - - PostScriptFunction(const PostScriptFunction *func); - GBool parseCode(Stream *str, int *codePtr); - GooString *getToken(Stream *str); - void resizeCode(int newSize); - void exec(PSStack *stack, int codePtr); - - GooString *codeString; - PSObject *code; - int codeSize; - double cacheIn[funcMaxInputs]; - double cacheOut[funcMaxOutputs]; - GBool ok; -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/Gfx.cc b/Build/source/libs/poppler/poppler-src/poppler/Gfx.cc deleted file mode 100644 index 8f2c62d24a7..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/Gfx.cc +++ /dev/null @@ -1,5397 +0,0 @@ -//======================================================================== -// -// Gfx.cc -// -// Copyright 1996-2013 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2005 Jonathan Blandford <jrb@redhat.com> -// Copyright (C) 2005-2013, 2015-2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2006 Thorkild Stray <thorkild@ifi.uio.no> -// Copyright (C) 2006 Kristian Høgsberg <krh@redhat.com> -// Copyright (C) 2006-2011 Carlos Garcia Campos <carlosgc@gnome.org> -// Copyright (C) 2006, 2007 Jeff Muizelaar <jeff@infidigm.net> -// Copyright (C) 2007, 2008 Brad Hards <bradh@kde.org> -// Copyright (C) 2007, 2011, 2017 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2007, 2008 Iñigo Martínez <inigomartinez@gmail.com> -// Copyright (C) 2007 Koji Otani <sho@bbr.jp> -// Copyright (C) 2007 Krzysztof Kowalczyk <kkowalczyk@gmail.com> -// Copyright (C) 2008 Pino Toscano <pino@kde.org> -// Copyright (C) 2008 Michael Vrable <mvrable@cs.ucsd.edu> -// Copyright (C) 2008 Hib Eris <hib@hiberis.nl> -// Copyright (C) 2009 M Joonas Pihlaja <jpihlaja@cc.helsinki.fi> -// Copyright (C) 2009-2016 Thomas Freitag <Thomas.Freitag@alfa.de> -// Copyright (C) 2009 William Bader <williambader@hotmail.com> -// Copyright (C) 2009, 2010 David Benjamin <davidben@mit.edu> -// Copyright (C) 2010 Nils Höglund <nils.hoglund@gmail.com> -// Copyright (C) 2010 Christian Feuersänger <cfeuersaenger@googlemail.com> -// Copyright (C) 2011 Axel Strübing <axel.struebing@freenet.de> -// Copyright (C) 2012 Even Rouault <even.rouault@mines-paris.org> -// Copyright (C) 2012, 2013 Fabio D'Urso <fabiodurso@hotmail.it> -// Copyright (C) 2012 Lu Wang <coolwanglu@gmail.com> -// Copyright (C) 2014 Jason Crain <jason@aquaticape.us> -// Copyright (C) 2017, 2018 Klarälvdalens Datakonsult AB, a KDAB Group company, <info@kdab.com>. Work sponsored by the LiMux project of the city of Munich -// Copyright (C) 2018 Adam Reichold <adam.reichold@t-online.de> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include <config.h> - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include <stdlib.h> -#include <stdio.h> -#include <stddef.h> -#include <string.h> -#include <math.h> -#include <memory> -#include "goo/gmem.h" -#include "goo/GooTimer.h" -#include "GlobalParams.h" -#include "CharTypes.h" -#include "Object.h" -#include "PDFDoc.h" -#include "Array.h" -#include "Annot.h" -#include "Dict.h" -#include "Stream.h" -#include "Lexer.h" -#include "Parser.h" -#include "GfxFont.h" -#include "GfxState.h" -#include "OutputDev.h" -#include "Page.h" -#include "Annot.h" -#include "Error.h" -#include "Gfx.h" -#include "ProfileData.h" -#include "Catalog.h" -#include "OptionalContent.h" - -// the MSVC math.h doesn't define this -#ifndef M_PI -#define M_PI 3.14159265358979323846 -#endif - -//------------------------------------------------------------------------ -// constants -//------------------------------------------------------------------------ - -// Max recursive depth for a function shading fill. -#define functionMaxDepth 6 - -// Max delta allowed in any color component for a function shading fill. -#define functionColorDelta (dblToCol(1 / 256.0)) - -// Max number of splits along the t axis for an axial shading fill. -#define axialMaxSplits 256 - -// Max delta allowed in any color component for an axial shading fill. -#define axialColorDelta (dblToCol(1 / 256.0)) - -// Max number of splits along the t axis for a radial shading fill. -#define radialMaxSplits 256 - -// Max delta allowed in any color component for a radial shading fill. -#define radialColorDelta (dblToCol(1 / 256.0)) - -// Max recursive depth for a Gouraud triangle shading fill. -// -// Triangles will be split at most gouraudMaxDepth times (each time into 4 -// smaller ones). That makes pow(4,gouraudMaxDepth) many triangles for -// every triangle. -#define gouraudMaxDepth 6 - -// Max delta allowed in any color component for a Gouraud triangle -// shading fill. -#define gouraudColorDelta (dblToCol(3. / 256.0)) - -// Gouraud triangle: if the three color parameters differ by at more than this percend of -// the total color parameter range, the triangle will be refined -#define gouraudParameterizedColorDelta 5e-3 - -// Max recursive depth for a patch mesh shading fill. -#define patchMaxDepth 6 - -// Max delta allowed in any color component for a patch mesh shading -// fill. -#define patchColorDelta (dblToCol((3. / 256.0))) - -//------------------------------------------------------------------------ -// Operator table -//------------------------------------------------------------------------ - -Operator Gfx::opTab[] = { - {"\"", 3, {tchkNum, tchkNum, tchkString}, - &Gfx::opMoveSetShowText}, - {"'", 1, {tchkString}, - &Gfx::opMoveShowText}, - {"B", 0, {tchkNone}, - &Gfx::opFillStroke}, - {"B*", 0, {tchkNone}, - &Gfx::opEOFillStroke}, - {"BDC", 2, {tchkName, tchkProps}, - &Gfx::opBeginMarkedContent}, - {"BI", 0, {tchkNone}, - &Gfx::opBeginImage}, - {"BMC", 1, {tchkName}, - &Gfx::opBeginMarkedContent}, - {"BT", 0, {tchkNone}, - &Gfx::opBeginText}, - {"BX", 0, {tchkNone}, - &Gfx::opBeginIgnoreUndef}, - {"CS", 1, {tchkName}, - &Gfx::opSetStrokeColorSpace}, - {"DP", 2, {tchkName, tchkProps}, - &Gfx::opMarkPoint}, - {"Do", 1, {tchkName}, - &Gfx::opXObject}, - {"EI", 0, {tchkNone}, - &Gfx::opEndImage}, - {"EMC", 0, {tchkNone}, - &Gfx::opEndMarkedContent}, - {"ET", 0, {tchkNone}, - &Gfx::opEndText}, - {"EX", 0, {tchkNone}, - &Gfx::opEndIgnoreUndef}, - {"F", 0, {tchkNone}, - &Gfx::opFill}, - {"G", 1, {tchkNum}, - &Gfx::opSetStrokeGray}, - {"ID", 0, {tchkNone}, - &Gfx::opImageData}, - {"J", 1, {tchkInt}, - &Gfx::opSetLineCap}, - {"K", 4, {tchkNum, tchkNum, tchkNum, tchkNum}, - &Gfx::opSetStrokeCMYKColor}, - {"M", 1, {tchkNum}, - &Gfx::opSetMiterLimit}, - {"MP", 1, {tchkName}, - &Gfx::opMarkPoint}, - {"Q", 0, {tchkNone}, - &Gfx::opRestore}, - {"RG", 3, {tchkNum, tchkNum, tchkNum}, - &Gfx::opSetStrokeRGBColor}, - {"S", 0, {tchkNone}, - &Gfx::opStroke}, - {"SC", -4, {tchkNum, tchkNum, tchkNum, tchkNum}, - &Gfx::opSetStrokeColor}, - {"SCN", -33, {tchkSCN, tchkSCN, tchkSCN, tchkSCN, - tchkSCN, tchkSCN, tchkSCN, tchkSCN, - tchkSCN, tchkSCN, tchkSCN, tchkSCN, - tchkSCN, tchkSCN, tchkSCN, tchkSCN, - tchkSCN, tchkSCN, tchkSCN, tchkSCN, - tchkSCN, tchkSCN, tchkSCN, tchkSCN, - tchkSCN, tchkSCN, tchkSCN, tchkSCN, - tchkSCN, tchkSCN, tchkSCN, tchkSCN, - tchkSCN}, - &Gfx::opSetStrokeColorN}, - {"T*", 0, {tchkNone}, - &Gfx::opTextNextLine}, - {"TD", 2, {tchkNum, tchkNum}, - &Gfx::opTextMoveSet}, - {"TJ", 1, {tchkArray}, - &Gfx::opShowSpaceText}, - {"TL", 1, {tchkNum}, - &Gfx::opSetTextLeading}, - {"Tc", 1, {tchkNum}, - &Gfx::opSetCharSpacing}, - {"Td", 2, {tchkNum, tchkNum}, - &Gfx::opTextMove}, - {"Tf", 2, {tchkName, tchkNum}, - &Gfx::opSetFont}, - {"Tj", 1, {tchkString}, - &Gfx::opShowText}, - {"Tm", 6, {tchkNum, tchkNum, tchkNum, tchkNum, - tchkNum, tchkNum}, - &Gfx::opSetTextMatrix}, - {"Tr", 1, {tchkInt}, - &Gfx::opSetTextRender}, - {"Ts", 1, {tchkNum}, - &Gfx::opSetTextRise}, - {"Tw", 1, {tchkNum}, - &Gfx::opSetWordSpacing}, - {"Tz", 1, {tchkNum}, - &Gfx::opSetHorizScaling}, - {"W", 0, {tchkNone}, - &Gfx::opClip}, - {"W*", 0, {tchkNone}, - &Gfx::opEOClip}, - {"b", 0, {tchkNone}, - &Gfx::opCloseFillStroke}, - {"b*", 0, {tchkNone}, - &Gfx::opCloseEOFillStroke}, - {"c", 6, {tchkNum, tchkNum, tchkNum, tchkNum, - tchkNum, tchkNum}, - &Gfx::opCurveTo}, - {"cm", 6, {tchkNum, tchkNum, tchkNum, tchkNum, - tchkNum, tchkNum}, - &Gfx::opConcat}, - {"cs", 1, {tchkName}, - &Gfx::opSetFillColorSpace}, - {"d", 2, {tchkArray, tchkNum}, - &Gfx::opSetDash}, - {"d0", 2, {tchkNum, tchkNum}, - &Gfx::opSetCharWidth}, - {"d1", 6, {tchkNum, tchkNum, tchkNum, tchkNum, - tchkNum, tchkNum}, - &Gfx::opSetCacheDevice}, - {"f", 0, {tchkNone}, - &Gfx::opFill}, - {"f*", 0, {tchkNone}, - &Gfx::opEOFill}, - {"g", 1, {tchkNum}, - &Gfx::opSetFillGray}, - {"gs", 1, {tchkName}, - &Gfx::opSetExtGState}, - {"h", 0, {tchkNone}, - &Gfx::opClosePath}, - {"i", 1, {tchkNum}, - &Gfx::opSetFlat}, - {"j", 1, {tchkInt}, - &Gfx::opSetLineJoin}, - {"k", 4, {tchkNum, tchkNum, tchkNum, tchkNum}, - &Gfx::opSetFillCMYKColor}, - {"l", 2, {tchkNum, tchkNum}, - &Gfx::opLineTo}, - {"m", 2, {tchkNum, tchkNum}, - &Gfx::opMoveTo}, - {"n", 0, {tchkNone}, - &Gfx::opEndPath}, - {"q", 0, {tchkNone}, - &Gfx::opSave}, - {"re", 4, {tchkNum, tchkNum, tchkNum, tchkNum}, - &Gfx::opRectangle}, - {"rg", 3, {tchkNum, tchkNum, tchkNum}, - &Gfx::opSetFillRGBColor}, - {"ri", 1, {tchkName}, - &Gfx::opSetRenderingIntent}, - {"s", 0, {tchkNone}, - &Gfx::opCloseStroke}, - {"sc", -4, {tchkNum, tchkNum, tchkNum, tchkNum}, - &Gfx::opSetFillColor}, - {"scn", -33, {tchkSCN, tchkSCN, tchkSCN, tchkSCN, - tchkSCN, tchkSCN, tchkSCN, tchkSCN, - tchkSCN, tchkSCN, tchkSCN, tchkSCN, - tchkSCN, tchkSCN, tchkSCN, tchkSCN, - tchkSCN, tchkSCN, tchkSCN, tchkSCN, - tchkSCN, tchkSCN, tchkSCN, tchkSCN, - tchkSCN, tchkSCN, tchkSCN, tchkSCN, - tchkSCN, tchkSCN, tchkSCN, tchkSCN, - tchkSCN}, - &Gfx::opSetFillColorN}, - {"sh", 1, {tchkName}, - &Gfx::opShFill}, - {"v", 4, {tchkNum, tchkNum, tchkNum, tchkNum}, - &Gfx::opCurveTo1}, - {"w", 1, {tchkNum}, - &Gfx::opSetLineWidth}, - {"y", 4, {tchkNum, tchkNum, tchkNum, tchkNum}, - &Gfx::opCurveTo2}, -}; - -#define numOps (sizeof(opTab) / sizeof(Operator)) - -static inline GBool isSameGfxColor(const GfxColor &colorA, const GfxColor &colorB, Guint nComps, double delta) { - for (Guint k = 0; k < nComps; ++k) { - if (abs(colorA.c[k] - colorB.c[k]) > delta) { - return false; - } - } - return true; -} - -//------------------------------------------------------------------------ -// GfxResources -//------------------------------------------------------------------------ - -GfxResources::GfxResources(XRef *xref, Dict *resDictA, GfxResources *nextA) : - gStateCache(2, xref) { - Object obj1, obj2; - Ref r; - - if (resDictA) { - - // build font dictionary - Dict *resDict = resDictA->copy(xref); - fonts = nullptr; - obj1 = resDict->lookupNF("Font"); - if (obj1.isRef()) { - obj2 = obj1.fetch(xref); - if (obj2.isDict()) { - r = obj1.getRef(); - fonts = new GfxFontDict(xref, &r, obj2.getDict()); - } - } else if (obj1.isDict()) { - fonts = new GfxFontDict(xref, nullptr, obj1.getDict()); - } - - // get XObject dictionary - xObjDict = resDict->lookup("XObject"); - - // get color space dictionary - colorSpaceDict = resDict->lookup("ColorSpace"); - - // get pattern dictionary - patternDict = resDict->lookup("Pattern"); - - // get shading dictionary - shadingDict = resDict->lookup("Shading"); - - // get graphics state parameter dictionary - gStateDict = resDict->lookup("ExtGState"); - - // get properties dictionary - propertiesDict = resDict->lookup("Properties"); - - delete resDict; - } else { - fonts = nullptr; - xObjDict.setToNull(); - colorSpaceDict.setToNull(); - patternDict.setToNull(); - shadingDict.setToNull(); - gStateDict.setToNull(); - propertiesDict.setToNull(); - } - - next = nextA; -} - -GfxResources::~GfxResources() { - delete fonts; -} - -GfxFont *GfxResources::doLookupFont(const char *name) const -{ - GfxFont *font; - const GfxResources *resPtr; - - for (resPtr = this; resPtr; resPtr = resPtr->next) { - if (resPtr->fonts) { - if ((font = resPtr->fonts->lookup(name))) - return font; - } - } - error(errSyntaxError, -1, "Unknown font tag '{0:s}'", name); - return nullptr; -} - -GfxFont *GfxResources::lookupFont(const char *name) { - return doLookupFont(name); -} - -const GfxFont *GfxResources::lookupFont(const char *name) const { - return doLookupFont(name); -} - -Object GfxResources::lookupXObject(const char *name) { - GfxResources *resPtr; - - for (resPtr = this; resPtr; resPtr = resPtr->next) { - if (resPtr->xObjDict.isDict()) { - Object obj = resPtr->xObjDict.dictLookup(name); - if (!obj.isNull()) - return obj; - } - } - error(errSyntaxError, -1, "XObject '{0:s}' is unknown", name); - return Object(objNull); -} - -Object GfxResources::lookupXObjectNF(const char *name) { - GfxResources *resPtr; - - for (resPtr = this; resPtr; resPtr = resPtr->next) { - if (resPtr->xObjDict.isDict()) { - Object obj = resPtr->xObjDict.dictLookupNF(name); - if (!obj.isNull()) - return obj; - } - } - error(errSyntaxError, -1, "XObject '{0:s}' is unknown", name); - return Object(objNull); -} - -Object GfxResources::lookupMarkedContentNF(const char *name) { - GfxResources *resPtr; - - for (resPtr = this; resPtr; resPtr = resPtr->next) { - if (resPtr->propertiesDict.isDict()) { - Object obj = resPtr->propertiesDict.dictLookupNF(name); - if (!obj.isNull()) - return obj; - } - } - error(errSyntaxError, -1, "Marked Content '{0:s}' is unknown", name); - return Object(objNull); -} - -Object GfxResources::lookupColorSpace(const char *name) { - GfxResources *resPtr; - - for (resPtr = this; resPtr; resPtr = resPtr->next) { - if (resPtr->colorSpaceDict.isDict()) { - Object obj = resPtr->colorSpaceDict.dictLookup(name); - if (!obj.isNull()) { - return obj; - } - } - } - return Object(objNull); -} - -GfxPattern *GfxResources::lookupPattern(const char *name, OutputDev *out, GfxState *state) { - GfxResources *resPtr; - GfxPattern *pattern; - - for (resPtr = this; resPtr; resPtr = resPtr->next) { - if (resPtr->patternDict.isDict()) { - Object obj = resPtr->patternDict.dictLookupNF(name); - if (!obj.isNull()) { - Ref patternRef = { -1, -1 }; - if (obj.isRef()) { - patternRef = obj.getRef(); - obj = obj.fetch(resPtr->patternDict.getDict()->getXRef()); - } - - pattern = GfxPattern::parse(resPtr, &obj, out, state, patternRef.num); - return pattern; - } - } - } - error(errSyntaxError, -1, "Unknown pattern '{0:s}'", name); - return nullptr; -} - -GfxShading *GfxResources::lookupShading(const char *name, OutputDev *out, GfxState *state) { - GfxResources *resPtr; - GfxShading *shading; - - for (resPtr = this; resPtr; resPtr = resPtr->next) { - if (resPtr->shadingDict.isDict()) { - Object obj = resPtr->shadingDict.dictLookup(name); - if (!obj.isNull()) { - shading = GfxShading::parse(resPtr, &obj, out, state); - return shading; - } - } - } - error(errSyntaxError, -1, "ExtGState '{0:s}' is unknown", name); - return nullptr; -} - -Object GfxResources::lookupGState(const char *name) { - Object obj = lookupGStateNF(name); - if (obj.isNull()) - return Object(objNull); - - if (!obj.isRef()) - return obj; - - const Ref ref = obj.getRef(); - obj = gStateCache.lookup(ref); - if (!obj.isNull()) - return obj; - - obj = gStateCache.put(ref)->copy(); - return obj; -} - -Object GfxResources::lookupGStateNF(const char *name) { - GfxResources *resPtr; - - for (resPtr = this; resPtr; resPtr = resPtr->next) { - if (resPtr->gStateDict.isDict()) { - Object obj = resPtr->gStateDict.dictLookupNF(name); - if (!obj.isNull()) { - return obj; - } - } - } - error(errSyntaxError, -1, "ExtGState '{0:s}' is unknown", name); - return Object(objNull); -} - -//------------------------------------------------------------------------ -// Gfx -//------------------------------------------------------------------------ - -Gfx::Gfx(PDFDoc *docA, OutputDev *outA, int pageNum, Dict *resDict, - double hDPI, double vDPI, PDFRectangle *box, - PDFRectangle *cropBox, int rotate, - GBool (*abortCheckCbkA)(void *data), - void *abortCheckCbkDataA, XRef *xrefA) -{ - int i; - - doc = docA; - xref = (xrefA == nullptr) ? doc->getXRef() : xrefA; - catalog = doc->getCatalog(); - subPage = gFalse; - printCommands = globalParams->getPrintCommands(); - profileCommands = globalParams->getProfileCommands(); - mcStack = nullptr; - parser = nullptr; - - // start the resource stack - res = new GfxResources(xref, resDict, nullptr); - - // initialize - out = outA; - state = new GfxState(hDPI, vDPI, box, rotate, out->upsideDown()); - stackHeight = 1; - pushStateGuard(); - fontChanged = gFalse; - clip = clipNone; - ignoreUndef = 0; - out->startPage(pageNum, state, xref); - out->setDefaultCTM(state->getCTM()); - out->updateAll(state); - for (i = 0; i < 6; ++i) { - baseMatrix[i] = state->getCTM()[i]; - } - formDepth = 0; - ocState = gTrue; - parser = nullptr; - abortCheckCbk = abortCheckCbkA; - abortCheckCbkData = abortCheckCbkDataA; - - // set crop box - if (cropBox) { - state->moveTo(cropBox->x1, cropBox->y1); - state->lineTo(cropBox->x2, cropBox->y1); - state->lineTo(cropBox->x2, cropBox->y2); - state->lineTo(cropBox->x1, cropBox->y2); - state->closePath(); - state->clip(); - out->clip(state); - state->clearPath(); - } -#ifdef USE_CMS - initDisplayProfile(); -#endif -} - -Gfx::Gfx(PDFDoc *docA, OutputDev *outA, Dict *resDict, - PDFRectangle *box, PDFRectangle *cropBox, - GBool (*abortCheckCbkA)(void *data), - void *abortCheckCbkDataA, Gfx *gfxA) -{ - int i; - - doc = docA; - if (gfxA) { - xref = gfxA->getXRef(); - formsDrawing = gfxA->formsDrawing; - charProcDrawing = gfxA->charProcDrawing; - } else { - xref = doc->getXRef(); - } - catalog = doc->getCatalog(); - subPage = gTrue; - printCommands = globalParams->getPrintCommands(); - profileCommands = globalParams->getProfileCommands(); - mcStack = nullptr; - parser = nullptr; - - // start the resource stack - res = new GfxResources(xref, resDict, nullptr); - - // initialize - out = outA; - state = new GfxState(72, 72, box, 0, gFalse); - stackHeight = 1; - pushStateGuard(); - fontChanged = gFalse; - clip = clipNone; - ignoreUndef = 0; - for (i = 0; i < 6; ++i) { - baseMatrix[i] = state->getCTM()[i]; - } - formDepth = 0; - ocState = gTrue; - parser = nullptr; - abortCheckCbk = abortCheckCbkA; - abortCheckCbkData = abortCheckCbkDataA; - - // set crop box - if (cropBox) { - state->moveTo(cropBox->x1, cropBox->y1); - state->lineTo(cropBox->x2, cropBox->y1); - state->lineTo(cropBox->x2, cropBox->y2); - state->lineTo(cropBox->x1, cropBox->y2); - state->closePath(); - state->clip(); - out->clip(state); - state->clearPath(); - } -#ifdef USE_CMS - initDisplayProfile(); -#endif -} - -#ifdef USE_CMS - -#include <lcms2.h> - -void Gfx::initDisplayProfile() { - Object catDict = xref->getCatalog(); - if (catDict.isDict()) { - Object outputIntents = catDict.dictLookup("OutputIntents"); - if (outputIntents.isArray() && outputIntents.arrayGetLength() == 1) { - Object firstElement = outputIntents.arrayGet(0); - if (firstElement.isDict()) { - Object profile = firstElement.dictLookup("DestOutputProfile"); - if (profile.isStream()) { - Stream *iccStream = profile.getStream(); - int length = 0; - Guchar *profBuf = iccStream->toUnsignedChars(&length, 65536, 65536); - cmsHPROFILE hp = cmsOpenProfileFromMem(profBuf,length); - if (hp == nullptr) { - error(errSyntaxWarning, -1, "read ICCBased color space profile error"); - } else { - state->setDisplayProfile(hp); - } - gfree(profBuf); - } - } - } - } -} - -#endif - -Gfx::~Gfx() { - while (stateGuards.size()) { - popStateGuard(); - } - if (!subPage) { - out->endPage(); - } - // There shouldn't be more saves, but pop them if there were any - while (state->hasSaves()) { - error(errSyntaxError, -1, "Found state under last state guard. Popping."); - restoreState(); - } - delete state; - while (res) { - popResources(); - } - while (mcStack) { - popMarkedContent(); - } -} - -void Gfx::display(Object *obj, GBool topLevel) { - int i; - - if (obj->isArray()) { - for (i = 0; i < obj->arrayGetLength(); ++i) { - Object obj2 = obj->arrayGet(i); - if (!obj2.isStream()) { - error(errSyntaxError, -1, "Weird page contents"); - return; - } - } - } else if (!obj->isStream()) { - error(errSyntaxError, -1, "Weird page contents"); - return; - } - parser = new Parser(xref, new Lexer(xref, obj), gFalse); - go(topLevel); - delete parser; - parser = nullptr; -} - -void Gfx::go(GBool topLevel) { - Object obj; - Object args[maxArgs]; - int numArgs, i; - int lastAbortCheck; - - // scan a sequence of objects - pushStateGuard(); - updateLevel = 1; // make sure even empty pages trigger a call to dump() - lastAbortCheck = 0; - numArgs = 0; - obj = parser->getObj(); - while (!obj.isEOF()) { - commandAborted = gFalse; - - // got a command - execute it - if (obj.isCmd()) { - if (printCommands) { - obj.print(stdout); - for (i = 0; i < numArgs; ++i) { - printf(" "); - args[i].print(stdout); - } - printf("\n"); - fflush(stdout); - } - GooTimer *timer = nullptr; - - if (unlikely(profileCommands)) { - timer = new GooTimer(); - } - - // Run the operation - execOp(&obj, args, numArgs); - - // Update the profile information - if (unlikely(profileCommands)) { - if (auto* const hash = out->getProfileHash()) { - auto& data = (*hash)[obj.getCmd()]; - data.addElement(timer->getElapsed()); - } - delete timer; - } - for (i = 0; i < numArgs; ++i) - args[i].setToNull(); // Free memory early - numArgs = 0; - - // periodically update display - if (++updateLevel >= 20000) { - out->dump(); - updateLevel = 0; - lastAbortCheck = 0; - } - - // did the command throw an exception - if (commandAborted) { - // don't propogate; recursive drawing comes from Form XObjects which - // should probably be drawn in a separate context anyway for caching - commandAborted = gFalse; - break; - } - - // check for an abort - if (abortCheckCbk) { - if (updateLevel - lastAbortCheck > 10) { - if ((*abortCheckCbk)(abortCheckCbkData)) { - break; - } - lastAbortCheck = updateLevel; - } - } - - // got an argument - save it - } else if (numArgs < maxArgs) { - args[numArgs++] = std::move(obj); - // too many arguments - something is wrong - } else { - error(errSyntaxError, getPos(), "Too many args in content stream"); - if (printCommands) { - printf("throwing away arg: "); - obj.print(stdout); - printf("\n"); - fflush(stdout); - } - } - - // grab the next object - obj = parser->getObj(); - } - - // args at end with no command - if (numArgs > 0) { - error(errSyntaxError, getPos(), "Leftover args in content stream"); - if (printCommands) { - printf("%d leftovers:", numArgs); - for (i = 0; i < numArgs; ++i) { - printf(" "); - args[i].print(stdout); - } - printf("\n"); - fflush(stdout); - } - } - - popStateGuard(); - - // update display - if (topLevel && updateLevel > 0) { - out->dump(); - } -} - -void Gfx::execOp(Object *cmd, Object args[], int numArgs) { - Operator *op; - char *name; - Object *argPtr; - int i; - - // find operator - name = cmd->getCmd(); - if (!(op = findOp(name))) { - if (ignoreUndef == 0) - error(errSyntaxError, getPos(), "Unknown operator '{0:s}'", name); - return; - } - - // type check args - argPtr = args; - if (op->numArgs >= 0) { - if (numArgs < op->numArgs) { - error(errSyntaxError, getPos(), "Too few ({0:d}) args to '{1:s}' operator", numArgs, name); - commandAborted = gTrue; - return; - } - if (numArgs > op->numArgs) { -#if 0 - error(errSyntaxWarning, getPos(), - "Too many ({0:d}) args to '{1:s}' operator", numArgs, name); -#endif - argPtr += numArgs - op->numArgs; - numArgs = op->numArgs; - } - } else { - if (numArgs > -op->numArgs) { - error(errSyntaxError, getPos(), "Too many ({0:d}) args to '{1:s}' operator", - numArgs, name); - return; - } - } - for (i = 0; i < numArgs; ++i) { - if (!checkArg(&argPtr[i], op->tchk[i])) { - error(errSyntaxError, getPos(), "Arg #{0:d} to '{1:s}' operator is wrong type ({2:s})", - i, name, argPtr[i].getTypeName()); - return; - } - } - - // do it - (this->*op->func)(argPtr, numArgs); -} - -Operator *Gfx::findOp(char *name) { - int a, b, m, cmp; - - a = -1; - b = numOps; - cmp = 0; // make gcc happy - // invariant: opTab[a] < name < opTab[b] - while (b - a > 1) { - m = (a + b) / 2; - cmp = strcmp(opTab[m].name, name); - if (cmp < 0) - a = m; - else if (cmp > 0) - b = m; - else - a = b = m; - } - if (cmp != 0) - return nullptr; - return &opTab[a]; -} - -GBool Gfx::checkArg(Object *arg, TchkType type) { - switch (type) { - case tchkBool: return arg->isBool(); - case tchkInt: return arg->isInt(); - case tchkNum: return arg->isNum(); - case tchkString: return arg->isString(); - case tchkName: return arg->isName(); - case tchkArray: return arg->isArray(); - case tchkProps: return arg->isDict() || arg->isName(); - case tchkSCN: return arg->isNum() || arg->isName(); - case tchkNone: return gFalse; - } - return gFalse; -} - -Goffset Gfx::getPos() { - return parser ? parser->getPos() : -1; -} - -//------------------------------------------------------------------------ -// graphics state operators -//------------------------------------------------------------------------ - -void Gfx::opSave(Object args[], int numArgs) { - saveState(); -} - -void Gfx::opRestore(Object args[], int numArgs) { - restoreState(); -} - -void Gfx::opConcat(Object args[], int numArgs) { - state->concatCTM(args[0].getNum(), args[1].getNum(), - args[2].getNum(), args[3].getNum(), - args[4].getNum(), args[5].getNum()); - out->updateCTM(state, args[0].getNum(), args[1].getNum(), - args[2].getNum(), args[3].getNum(), - args[4].getNum(), args[5].getNum()); - fontChanged = gTrue; -} - -void Gfx::opSetDash(Object args[], int numArgs) { - Array *a; - int length; - double *dash; - int i; - - a = args[0].getArray(); - length = a->getLength(); - if (length == 0) { - dash = nullptr; - } else { - dash = (double *)gmallocn(length, sizeof(double)); - bool dummyOk; - for (i = 0; i < length; ++i) { - const Object obj = a->get(i); - dash[i] = obj.getNum(&dummyOk); - } - } - state->setLineDash(dash, length, args[1].getNum()); - out->updateLineDash(state); -} - -void Gfx::opSetFlat(Object args[], int numArgs) { - state->setFlatness((int)args[0].getNum()); - out->updateFlatness(state); -} - -void Gfx::opSetLineJoin(Object args[], int numArgs) { - state->setLineJoin(args[0].getInt()); - out->updateLineJoin(state); -} - -void Gfx::opSetLineCap(Object args[], int numArgs) { - state->setLineCap(args[0].getInt()); - out->updateLineCap(state); -} - -void Gfx::opSetMiterLimit(Object args[], int numArgs) { - state->setMiterLimit(args[0].getNum()); - out->updateMiterLimit(state); -} - -void Gfx::opSetLineWidth(Object args[], int numArgs) { - state->setLineWidth(args[0].getNum()); - out->updateLineWidth(state); -} - -void Gfx::opSetExtGState(Object args[], int numArgs) { - Object obj1, obj2; - GfxBlendMode mode; - GBool haveFillOP; - Function *funcs[4]; - GfxColor backdropColor; - GBool haveBackdropColor; - GBool alpha, isolated, knockout; - double opac; - int i; - - obj1 = res->lookupGState(args[0].getName()); - if (obj1.isNull()) { - return; - } - if (!obj1.isDict()) { - error(errSyntaxError, getPos(), "ExtGState '{0:s}' is wrong type", args[0].getName()); - return; - } - if (printCommands) { - printf(" gfx state dict: "); - obj1.print(); - printf("\n"); - } - - // parameters that are also set by individual PDF operators - obj2 = obj1.dictLookup("LW"); - if (obj2.isNum()) { - opSetLineWidth(&obj2, 1); - } - obj2 = obj1.dictLookup("LC"); - if (obj2.isInt()) { - opSetLineCap(&obj2, 1); - } - obj2 = obj1.dictLookup("LJ"); - if (obj2.isInt()) { - opSetLineJoin(&obj2, 1); - } - obj2 = obj1.dictLookup("ML"); - if (obj2.isNum()) { - opSetMiterLimit(&obj2, 1); - } - obj2 = obj1.dictLookup("D"); - if (obj2.isArray() && obj2.arrayGetLength() == 2) { - Object args2[2]; - args2[0] = obj2.arrayGet(0); - args2[1] = obj2.arrayGet(1); - if (args2[0].isArray() && args2[1].isNum()) { - opSetDash(args2, 2); - } - } -#if 0 //~ need to add a new version of GfxResources::lookupFont() that - //~ takes an indirect ref instead of a name - if (obj1.dictLookup("Font", &obj2)->isArray() && - obj2.arrayGetLength() == 2) { - obj2.arrayGet(0, &args2[0]); - obj2.arrayGet(1, &args2[1]); - if (args2[0].isDict() && args2[1].isNum()) { - opSetFont(args2, 2); - } - args2[0].free(); - args2[1].free(); - } - obj2.free(); -#endif - obj2 = obj1.dictLookup("FL"); - if (obj2.isNum()) { - opSetFlat(&obj2, 1); - } - - // transparency support: blend mode, fill/stroke opacity - obj2 = obj1.dictLookup("BM"); - if (!obj2.isNull()) { - if (state->parseBlendMode(&obj2, &mode)) { - state->setBlendMode(mode); - out->updateBlendMode(state); - } else { - error(errSyntaxError, getPos(), "Invalid blend mode in ExtGState"); - } - } - obj2 = obj1.dictLookup("ca"); - if (obj2.isNum()) { - opac = obj2.getNum(); - state->setFillOpacity(opac < 0 ? 0 : opac > 1 ? 1 : opac); - out->updateFillOpacity(state); - } - obj2 = obj1.dictLookup("CA"); - if (obj2.isNum()) { - opac = obj2.getNum(); - state->setStrokeOpacity(opac < 0 ? 0 : opac > 1 ? 1 : opac); - out->updateStrokeOpacity(state); - } - - // fill/stroke overprint, overprint mode - obj2 = obj1.dictLookup("op"); - if ((haveFillOP = obj2.isBool())) { - state->setFillOverprint(obj2.getBool()); - out->updateFillOverprint(state); - } - obj2 = obj1.dictLookup("OP"); - if (obj2.isBool()) { - state->setStrokeOverprint(obj2.getBool()); - out->updateStrokeOverprint(state); - if (!haveFillOP) { - state->setFillOverprint(obj2.getBool()); - out->updateFillOverprint(state); - } - } - obj2 = obj1.dictLookup("OPM"); - if (obj2.isInt()) { - state->setOverprintMode(obj2.getInt()); - out->updateOverprintMode(state); - } - - // stroke adjust - obj2 = obj1.dictLookup("SA"); - if (obj2.isBool()) { - state->setStrokeAdjust(obj2.getBool()); - out->updateStrokeAdjust(state); - } - - // transfer function - obj2 = obj1.dictLookup("TR2"); - if (obj2.isNull()) { - obj2 = obj1.dictLookup("TR"); - } - if (obj2.isName("Default") || - obj2.isName("Identity")) { - funcs[0] = funcs[1] = funcs[2] = funcs[3] = nullptr; - state->setTransfer(funcs); - out->updateTransfer(state); - } else if (obj2.isArray() && obj2.arrayGetLength() == 4) { - for (i = 0; i < 4; ++i) { - Object obj3 = obj2.arrayGet(i); - funcs[i] = Function::parse(&obj3); - if (!funcs[i]) { - break; - } - } - if (i == 4) { - state->setTransfer(funcs); - out->updateTransfer(state); - } - } else if (obj2.isName() || obj2.isDict() || obj2.isStream()) { - if ((funcs[0] = Function::parse(&obj2))) { - funcs[1] = funcs[2] = funcs[3] = nullptr; - state->setTransfer(funcs); - out->updateTransfer(state); - } - } else if (!obj2.isNull()) { - error(errSyntaxError, getPos(), "Invalid transfer function in ExtGState"); - } - - // alpha is shape - obj2 = obj1.dictLookup("AIS"); - if (obj2.isBool()) { - state->setAlphaIsShape(obj2.getBool()); - out->updateAlphaIsShape(state); - } - - // text knockout - obj2 = obj1.dictLookup("TK"); - if (obj2.isBool()) { - state->setTextKnockout(obj2.getBool()); - out->updateTextKnockout(state); - } - - // soft mask - obj2 = obj1.dictLookup("SMask"); - if (!obj2.isNull()) { - if (obj2.isName("None")) { - out->clearSoftMask(state); - } else if (obj2.isDict()) { - Object obj3 = obj2.dictLookup("S"); - if (obj3.isName("Alpha")) { - alpha = gTrue; - } else { // "Luminosity" - alpha = gFalse; - } - funcs[0] = nullptr; - obj3 = obj2.dictLookup("TR"); - if (!obj3.isNull()) { - if (obj3.isName("Default") || - obj3.isName("Identity")) { - funcs[0] = nullptr; - } else { - funcs[0] = Function::parse(&obj3); - if (funcs[0] == nullptr || - funcs[0]->getInputSize() != 1 || - funcs[0]->getOutputSize() != 1) { - error(errSyntaxError, getPos(), - "Invalid transfer function in soft mask in ExtGState"); - delete funcs[0]; - funcs[0] = nullptr; - } - } - } - obj3 = obj2.dictLookup("BC"); - if ((haveBackdropColor = obj3.isArray())) { - for (i = 0; i < gfxColorMaxComps; ++i) { - backdropColor.c[i] = 0; - } - for (i = 0; i < obj3.arrayGetLength() && i < gfxColorMaxComps; ++i) { - Object obj4 = obj3.arrayGet(i); - if (obj4.isNum()) { - backdropColor.c[i] = dblToCol(obj4.getNum()); - } - } - } - obj3 = obj2.dictLookup("G"); - if (obj3.isStream()) { - Object obj4 = obj3.streamGetDict()->lookup("Group"); - if (obj4.isDict()) { - GfxColorSpace *blendingColorSpace = nullptr; - isolated = knockout = gFalse; - Object obj5 = obj4.dictLookup("CS"); - if (!obj5.isNull()) { - blendingColorSpace = GfxColorSpace::parse(res, &obj5, out, state); - } - obj5 = obj4.dictLookup("I"); - if (obj5.isBool()) { - isolated = obj5.getBool(); - } - obj5 = obj4.dictLookup("K"); - if (obj5.isBool()) { - knockout = obj5.getBool(); - } - if (!haveBackdropColor) { - if (blendingColorSpace) { - blendingColorSpace->getDefaultColor(&backdropColor); - } else { - //~ need to get the parent or default color space (?) - for (i = 0; i < gfxColorMaxComps; ++i) { - backdropColor.c[i] = 0; - } - } - } - doSoftMask(&obj3, alpha, blendingColorSpace, - isolated, knockout, funcs[0], &backdropColor); - delete blendingColorSpace; - } else { - error(errSyntaxError, getPos(), "Invalid soft mask in ExtGState - missing group"); - } - } else { - error(errSyntaxError, getPos(), "Invalid soft mask in ExtGState - missing group"); - } - delete funcs[0]; - } else if (!obj2.isNull()) { - error(errSyntaxError, getPos(), "Invalid soft mask in ExtGState"); - } - } - obj2 = obj1.dictLookup("Font"); - if (obj2.isArray()) { - GfxFont *font; - if (obj2.arrayGetLength() == 2) { - Object fargs0 = obj2.arrayGetNF(0); - Object fargs1 = obj2.arrayGet(1); - if (fargs0.isRef() && fargs1.isNum()) { - Object fobj = fargs0.fetch(xref); - if (fobj.isDict()) { - Ref r = fargs0.getRef(); - font = GfxFont::makeFont(xref,args[0].getName(),r,fobj.getDict()); - state->setFont(font,fargs1.getNum()); - fontChanged = gTrue; - } - } - } else { - error(errSyntaxError, getPos(), "Number of args mismatch for /Font in ExtGState"); - } - } - obj2 = obj1.dictLookup("LW"); - if (obj2.isNum()) { - opSetLineWidth(&obj2,1); - } - obj2 = obj1.dictLookup("LC"); - if (obj2.isInt()) { - opSetLineCap(&obj2,1); - } - obj2 = obj1.dictLookup("LJ"); - if (obj2.isInt()) { - opSetLineJoin(&obj2,1); - } - obj2 = obj1.dictLookup("ML"); - if (obj2.isNum()) { - opSetMiterLimit(&obj2,1); - } - obj2 = obj1.dictLookup("D"); - if (obj2.isArray()) { - if (obj2.arrayGetLength() == 2) { - Object dargs[2]; - - dargs[0] = obj2.arrayGetNF(0); - dargs[1] = obj2.arrayGet(1); - if (dargs[0].isArray() && dargs[1].isInt()) { - opSetDash(dargs,2); - } - } else { - error(errSyntaxError, getPos(), "Number of args mismatch for /D in ExtGState"); - } - } - obj2 = obj1.dictLookup("RI"); - if (obj2.isName()) { - opSetRenderingIntent(&obj2,1); - } - obj2 = obj1.dictLookup("FL"); - if (obj2.isNum()) { - opSetFlat(&obj2,1); - } -} - -void Gfx::doSoftMask(Object *str, GBool alpha, - GfxColorSpace *blendingColorSpace, - GBool isolated, GBool knockout, - Function *transferFunc, GfxColor *backdropColor) { - Dict *dict, *resDict; - double m[6], bbox[4]; - Object obj1; - int i; - - // check for excessive recursion - if (formDepth > 20) { - return; - } - - // get stream dict - dict = str->streamGetDict(); - - // check form type - obj1 = dict->lookup("FormType"); - if (!(obj1.isNull() || (obj1.isInt() && obj1.getInt() == 1))) { - error(errSyntaxError, getPos(), "Unknown form type"); - } - - // get bounding box - obj1 = dict->lookup("BBox"); - if (!obj1.isArray()) { - error(errSyntaxError, getPos(), "Bad form bounding box"); - return; - } - for (i = 0; i < 4; ++i) { - Object obj2 = obj1.arrayGet(i); - if (likely(obj2.isNum())) bbox[i] = obj2.getNum(); - else { - error(errSyntaxError, getPos(), "Bad form bounding box (non number)"); - return; - } - } - - // get matrix - obj1 = dict->lookup("Matrix"); - if (obj1.isArray()) { - for (i = 0; i < 6; ++i) { - Object obj2 = obj1.arrayGet(i); - if (likely(obj2.isNum())) m[i] = obj2.getNum(); - else m[i] = 0; - } - } else { - m[0] = 1; m[1] = 0; - m[2] = 0; m[3] = 1; - m[4] = 0; m[5] = 0; - } - - // get resources - obj1 = dict->lookup("Resources"); - resDict = obj1.isDict() ? obj1.getDict() : (Dict *)nullptr; - - // draw it - ++formDepth; - drawForm(str, resDict, m, bbox, gTrue, gTrue, - blendingColorSpace, isolated, knockout, - alpha, transferFunc, backdropColor); - --formDepth; -} - -void Gfx::opSetRenderingIntent(Object args[], int numArgs) { - state->setRenderingIntent(args[0].getName()); -} - -//------------------------------------------------------------------------ -// color operators -//------------------------------------------------------------------------ - -void Gfx::opSetFillGray(Object args[], int numArgs) { - GfxColor color; - GfxColorSpace *colorSpace = nullptr; - - state->setFillPattern(nullptr); - Object obj = res->lookupColorSpace("DefaultGray"); - if (!obj.isNull()) { - colorSpace = GfxColorSpace::parse(res, &obj, out, state); - } - if (colorSpace == nullptr) { - colorSpace = new GfxDeviceGrayColorSpace(); - } - state->setFillColorSpace(colorSpace); - out->updateFillColorSpace(state); - color.c[0] = dblToCol(args[0].getNum()); - state->setFillColor(&color); - out->updateFillColor(state); -} - -void Gfx::opSetStrokeGray(Object args[], int numArgs) { - GfxColor color; - GfxColorSpace *colorSpace = nullptr; - - state->setStrokePattern(nullptr); - Object obj = res->lookupColorSpace("DefaultGray"); - if (!obj.isNull()) { - colorSpace = GfxColorSpace::parse(res, &obj, out, state); - } - if (colorSpace == nullptr) { - colorSpace = new GfxDeviceGrayColorSpace(); - } - state->setStrokeColorSpace(colorSpace); - out->updateStrokeColorSpace(state); - color.c[0] = dblToCol(args[0].getNum()); - state->setStrokeColor(&color); - out->updateStrokeColor(state); -} - -void Gfx::opSetFillCMYKColor(Object args[], int numArgs) { - GfxColor color; - GfxColorSpace *colorSpace = nullptr; - int i; - - Object obj = res->lookupColorSpace("DefaultCMYK"); - if (!obj.isNull()) { - colorSpace = GfxColorSpace::parse(res, &obj, out, state); - } - if (colorSpace == nullptr) { - colorSpace = new GfxDeviceCMYKColorSpace(); - } - state->setFillPattern(nullptr); - state->setFillColorSpace(colorSpace); - out->updateFillColorSpace(state); - for (i = 0; i < 4; ++i) { - color.c[i] = dblToCol(args[i].getNum()); - } - state->setFillColor(&color); - out->updateFillColor(state); -} - -void Gfx::opSetStrokeCMYKColor(Object args[], int numArgs) { - GfxColor color; - GfxColorSpace *colorSpace = nullptr; - int i; - - state->setStrokePattern(nullptr); - Object obj = res->lookupColorSpace("DefaultCMYK"); - if (!obj.isNull()) { - colorSpace = GfxColorSpace::parse(res, &obj, out, state); - } - if (colorSpace == nullptr) { - colorSpace = new GfxDeviceCMYKColorSpace(); - } - state->setStrokeColorSpace(colorSpace); - out->updateStrokeColorSpace(state); - for (i = 0; i < 4; ++i) { - color.c[i] = dblToCol(args[i].getNum()); - } - state->setStrokeColor(&color); - out->updateStrokeColor(state); -} - -void Gfx::opSetFillRGBColor(Object args[], int numArgs) { - GfxColorSpace *colorSpace = nullptr; - GfxColor color; - int i; - - state->setFillPattern(nullptr); - Object obj = res->lookupColorSpace("DefaultRGB"); - if (!obj.isNull()) { - colorSpace = GfxColorSpace::parse(res, &obj, out, state); - } - if (colorSpace == nullptr) { - colorSpace = new GfxDeviceRGBColorSpace(); - } - state->setFillColorSpace(colorSpace); - out->updateFillColorSpace(state); - for (i = 0; i < 3; ++i) { - color.c[i] = dblToCol(args[i].getNum()); - } - state->setFillColor(&color); - out->updateFillColor(state); -} - -void Gfx::opSetStrokeRGBColor(Object args[], int numArgs) { - GfxColorSpace *colorSpace = nullptr; - GfxColor color; - int i; - - state->setStrokePattern(nullptr); - Object obj = res->lookupColorSpace("DefaultRGB"); - if (!obj.isNull()) { - colorSpace = GfxColorSpace::parse(res, &obj, out, state); - } - if (colorSpace == nullptr) { - colorSpace = new GfxDeviceRGBColorSpace(); - } - state->setStrokeColorSpace(colorSpace); - out->updateStrokeColorSpace(state); - for (i = 0; i < 3; ++i) { - color.c[i] = dblToCol(args[i].getNum()); - } - state->setStrokeColor(&color); - out->updateStrokeColor(state); -} - -void Gfx::opSetFillColorSpace(Object args[], int numArgs) { - GfxColorSpace *colorSpace; - GfxColor color; - - Object obj = res->lookupColorSpace(args[0].getName()); - if (obj.isNull()) { - colorSpace = GfxColorSpace::parse(res, &args[0], out, state); - } else { - colorSpace = GfxColorSpace::parse(res, &obj, out, state); - } - if (colorSpace) { - state->setFillPattern(nullptr); - state->setFillColorSpace(colorSpace); - out->updateFillColorSpace(state); - colorSpace->getDefaultColor(&color); - state->setFillColor(&color); - out->updateFillColor(state); - } else { - error(errSyntaxError, getPos(), "Bad color space (fill)"); - } -} - -void Gfx::opSetStrokeColorSpace(Object args[], int numArgs) { - GfxColorSpace *colorSpace; - GfxColor color; - - state->setStrokePattern(nullptr); - Object obj = res->lookupColorSpace(args[0].getName()); - if (obj.isNull()) { - colorSpace = GfxColorSpace::parse(res, &args[0], out, state); - } else { - colorSpace = GfxColorSpace::parse(res, &obj, out, state); - } - if (colorSpace) { - state->setStrokeColorSpace(colorSpace); - out->updateStrokeColorSpace(state); - colorSpace->getDefaultColor(&color); - state->setStrokeColor(&color); - out->updateStrokeColor(state); - } else { - error(errSyntaxError, getPos(), "Bad color space (stroke)"); - } -} - -void Gfx::opSetFillColor(Object args[], int numArgs) { - GfxColor color; - int i; - - if (numArgs != state->getFillColorSpace()->getNComps()) { - error(errSyntaxError, getPos(), "Incorrect number of arguments in 'sc' command"); - return; - } - state->setFillPattern(nullptr); - for (i = 0; i < numArgs; ++i) { - color.c[i] = dblToCol(args[i].getNum()); - } - state->setFillColor(&color); - out->updateFillColor(state); -} - -void Gfx::opSetStrokeColor(Object args[], int numArgs) { - GfxColor color; - int i; - - if (numArgs != state->getStrokeColorSpace()->getNComps()) { - error(errSyntaxError, getPos(), "Incorrect number of arguments in 'SC' command"); - return; - } - state->setStrokePattern(nullptr); - for (i = 0; i < numArgs; ++i) { - color.c[i] = dblToCol(args[i].getNum()); - } - state->setStrokeColor(&color); - out->updateStrokeColor(state); -} - -void Gfx::opSetFillColorN(Object args[], int numArgs) { - GfxColor color; - GfxPattern *pattern; - int i; - - if (state->getFillColorSpace()->getMode() == csPattern) { - if (numArgs > 1) { - if (!((GfxPatternColorSpace *)state->getFillColorSpace())->getUnder() || - numArgs - 1 != ((GfxPatternColorSpace *)state->getFillColorSpace()) - ->getUnder()->getNComps()) { - error(errSyntaxError, getPos(), "Incorrect number of arguments in 'scn' command"); - return; - } - for (i = 0; i < numArgs - 1 && i < gfxColorMaxComps; ++i) { - if (args[i].isNum()) { - color.c[i] = dblToCol(args[i].getNum()); - } else { - color.c[i] = 0; // TODO Investigate if this is what Adobe does - } - } - state->setFillColor(&color); - out->updateFillColor(state); - } - if (numArgs > 0) { - if (args[numArgs-1].isName() && - (pattern = res->lookupPattern(args[numArgs-1].getName(), out, state))) { - state->setFillPattern(pattern); - } - } - - } else { - if (numArgs != state->getFillColorSpace()->getNComps()) { - error(errSyntaxError, getPos(), "Incorrect number of arguments in 'scn' command"); - return; - } - state->setFillPattern(nullptr); - for (i = 0; i < numArgs && i < gfxColorMaxComps; ++i) { - if (args[i].isNum()) { - color.c[i] = dblToCol(args[i].getNum()); - } else { - color.c[i] = 0; // TODO Investigate if this is what Adobe does - } - } - state->setFillColor(&color); - out->updateFillColor(state); - } -} - -void Gfx::opSetStrokeColorN(Object args[], int numArgs) { - GfxColor color; - GfxPattern *pattern; - int i; - - if (state->getStrokeColorSpace()->getMode() == csPattern) { - if (numArgs > 1) { - if (!((GfxPatternColorSpace *)state->getStrokeColorSpace()) - ->getUnder() || - numArgs - 1 != ((GfxPatternColorSpace *)state->getStrokeColorSpace()) - ->getUnder()->getNComps()) { - error(errSyntaxError, getPos(), "Incorrect number of arguments in 'SCN' command"); - return; - } - for (i = 0; i < numArgs - 1 && i < gfxColorMaxComps; ++i) { - if (args[i].isNum()) { - color.c[i] = dblToCol(args[i].getNum()); - } else { - color.c[i] = 0; // TODO Investigate if this is what Adobe does - } - } - state->setStrokeColor(&color); - out->updateStrokeColor(state); - } - if (unlikely(numArgs <= 0)) { - error(errSyntaxError, getPos(), "Incorrect number of arguments in 'SCN' command"); - return; - } - if (args[numArgs-1].isName() && - (pattern = res->lookupPattern(args[numArgs-1].getName(), out, state))) { - state->setStrokePattern(pattern); - } - - } else { - if (numArgs != state->getStrokeColorSpace()->getNComps()) { - error(errSyntaxError, getPos(), "Incorrect number of arguments in 'SCN' command"); - return; - } - state->setStrokePattern(nullptr); - for (i = 0; i < numArgs && i < gfxColorMaxComps; ++i) { - if (args[i].isNum()) { - color.c[i] = dblToCol(args[i].getNum()); - } else { - color.c[i] = 0; // TODO Investigate if this is what Adobe does - } - } - state->setStrokeColor(&color); - out->updateStrokeColor(state); - } -} - -//------------------------------------------------------------------------ -// path segment operators -//------------------------------------------------------------------------ - -void Gfx::opMoveTo(Object args[], int numArgs) { - state->moveTo(args[0].getNum(), args[1].getNum()); -} - -void Gfx::opLineTo(Object args[], int numArgs) { - if (!state->isCurPt()) { - error(errSyntaxError, getPos(), "No current point in lineto"); - return; - } - state->lineTo(args[0].getNum(), args[1].getNum()); -} - -void Gfx::opCurveTo(Object args[], int numArgs) { - double x1, y1, x2, y2, x3, y3; - - if (!state->isCurPt()) { - error(errSyntaxError, getPos(), "No current point in curveto"); - return; - } - x1 = args[0].getNum(); - y1 = args[1].getNum(); - x2 = args[2].getNum(); - y2 = args[3].getNum(); - x3 = args[4].getNum(); - y3 = args[5].getNum(); - state->curveTo(x1, y1, x2, y2, x3, y3); -} - -void Gfx::opCurveTo1(Object args[], int numArgs) { - double x1, y1, x2, y2, x3, y3; - - if (!state->isCurPt()) { - error(errSyntaxError, getPos(), "No current point in curveto1"); - return; - } - x1 = state->getCurX(); - y1 = state->getCurY(); - x2 = args[0].getNum(); - y2 = args[1].getNum(); - x3 = args[2].getNum(); - y3 = args[3].getNum(); - state->curveTo(x1, y1, x2, y2, x3, y3); -} - -void Gfx::opCurveTo2(Object args[], int numArgs) { - double x1, y1, x2, y2, x3, y3; - - if (!state->isCurPt()) { - error(errSyntaxError, getPos(), "No current point in curveto2"); - return; - } - x1 = args[0].getNum(); - y1 = args[1].getNum(); - x2 = args[2].getNum(); - y2 = args[3].getNum(); - x3 = x2; - y3 = y2; - state->curveTo(x1, y1, x2, y2, x3, y3); -} - -void Gfx::opRectangle(Object args[], int numArgs) { - double x, y, w, h; - - x = args[0].getNum(); - y = args[1].getNum(); - w = args[2].getNum(); - h = args[3].getNum(); - state->moveTo(x, y); - state->lineTo(x + w, y); - state->lineTo(x + w, y + h); - state->lineTo(x, y + h); - state->closePath(); -} - -void Gfx::opClosePath(Object args[], int numArgs) { - if (!state->isCurPt()) { - error(errSyntaxError, getPos(), "No current point in closepath"); - return; - } - state->closePath(); -} - -//------------------------------------------------------------------------ -// path painting operators -//------------------------------------------------------------------------ - -void Gfx::opEndPath(Object args[], int numArgs) { - doEndPath(); -} - -void Gfx::opStroke(Object args[], int numArgs) { - if (!state->isCurPt()) { - //error(errSyntaxError, getPos(), "No path in stroke"); - return; - } - if (state->isPath()) { - if (ocState) { - if (state->getStrokeColorSpace()->getMode() == csPattern) { - doPatternStroke(); - } else { - out->stroke(state); - } - } - } - doEndPath(); -} - -void Gfx::opCloseStroke(Object * /*args[]*/, int /*numArgs*/) { - if (!state->isCurPt()) { - //error(errSyntaxError, getPos(), "No path in closepath/stroke"); - return; - } - if (state->isPath()) { - state->closePath(); - if (ocState) { - if (state->getStrokeColorSpace()->getMode() == csPattern) { - doPatternStroke(); - } else { - out->stroke(state); - } - } - } - doEndPath(); -} - -void Gfx::opFill(Object args[], int numArgs) { - if (!state->isCurPt()) { - //error(errSyntaxError, getPos(), "No path in fill"); - return; - } - if (state->isPath()) { - if (ocState) { - if (state->getFillColorSpace()->getMode() == csPattern) { - doPatternFill(gFalse); - } else { - out->fill(state); - } - } - } - doEndPath(); -} - -void Gfx::opEOFill(Object args[], int numArgs) { - if (!state->isCurPt()) { - //error(errSyntaxError, getPos(), "No path in eofill"); - return; - } - if (state->isPath()) { - if (ocState) { - if (state->getFillColorSpace()->getMode() == csPattern) { - doPatternFill(gTrue); - } else { - out->eoFill(state); - } - } - } - doEndPath(); -} - -void Gfx::opFillStroke(Object args[], int numArgs) { - if (!state->isCurPt()) { - //error(errSyntaxError, getPos(), "No path in fill/stroke"); - return; - } - if (state->isPath()) { - if (ocState) { - if (state->getFillColorSpace()->getMode() == csPattern) { - doPatternFill(gFalse); - } else { - out->fill(state); - } - if (state->getStrokeColorSpace()->getMode() == csPattern) { - doPatternStroke(); - } else { - out->stroke(state); - } - } - } - doEndPath(); -} - -void Gfx::opCloseFillStroke(Object args[], int numArgs) { - if (!state->isCurPt()) { - //error(errSyntaxError, getPos(), "No path in closepath/fill/stroke"); - return; - } - if (state->isPath()) { - state->closePath(); - if (ocState) { - if (state->getFillColorSpace()->getMode() == csPattern) { - doPatternFill(gFalse); - } else { - out->fill(state); - } - if (state->getStrokeColorSpace()->getMode() == csPattern) { - doPatternStroke(); - } else { - out->stroke(state); - } - } - } - doEndPath(); -} - -void Gfx::opEOFillStroke(Object args[], int numArgs) { - if (!state->isCurPt()) { - //error(errSyntaxError, getPos(), "No path in eofill/stroke"); - return; - } - if (state->isPath()) { - if (ocState) { - if (state->getFillColorSpace()->getMode() == csPattern) { - doPatternFill(gTrue); - } else { - out->eoFill(state); - } - if (state->getStrokeColorSpace()->getMode() == csPattern) { - doPatternStroke(); - } else { - out->stroke(state); - } - } - } - doEndPath(); -} - -void Gfx::opCloseEOFillStroke(Object args[], int numArgs) { - if (!state->isCurPt()) { - //error(errSyntaxError, getPos(), "No path in closepath/eofill/stroke"); - return; - } - if (state->isPath()) { - state->closePath(); - if (ocState) { - if (state->getFillColorSpace()->getMode() == csPattern) { - doPatternFill(gTrue); - } else { - out->eoFill(state); - } - if (state->getStrokeColorSpace()->getMode() == csPattern) { - doPatternStroke(); - } else { - out->stroke(state); - } - } - } - doEndPath(); -} - -void Gfx::doPatternFill(GBool eoFill) { - GfxPattern *pattern; - - // this is a bit of a kludge -- patterns can be really slow, so we - // skip them if we're only doing text extraction, since they almost - // certainly don't contain any text - if (!out->needNonText()) { - return; - } - - if (!(pattern = state->getFillPattern())) { - return; - } - switch (pattern->getType()) { - case 1: - doTilingPatternFill((GfxTilingPattern *)pattern, gFalse, eoFill, gFalse); - break; - case 2: - doShadingPatternFill((GfxShadingPattern *)pattern, gFalse, eoFill, gFalse); - break; - default: - error(errSyntaxError, getPos(), "Unknown pattern type ({0:d}) in fill", - pattern->getType()); - break; - } -} - -void Gfx::doPatternStroke() { - GfxPattern *pattern; - - // this is a bit of a kludge -- patterns can be really slow, so we - // skip them if we're only doing text extraction, since they almost - // certainly don't contain any text - if (!out->needNonText()) { - return; - } - - if (!(pattern = state->getStrokePattern())) { - return; - } - switch (pattern->getType()) { - case 1: - doTilingPatternFill((GfxTilingPattern *)pattern, gTrue, gFalse, gFalse); - break; - case 2: - doShadingPatternFill((GfxShadingPattern *)pattern, gTrue, gFalse, gFalse); - break; - default: - error(errSyntaxError, getPos(), "Unknown pattern type ({0:d}) in stroke", - pattern->getType()); - break; - } -} - -void Gfx::doPatternText() { - GfxPattern *pattern; - - // this is a bit of a kludge -- patterns can be really slow, so we - // skip them if we're only doing text extraction, since they almost - // certainly don't contain any text - if (!out->needNonText()) { - return; - } - - if (!(pattern = state->getFillPattern())) { - return; - } - switch (pattern->getType()) { - case 1: - doTilingPatternFill((GfxTilingPattern *)pattern, gFalse, gFalse, gTrue); - break; - case 2: - doShadingPatternFill((GfxShadingPattern *)pattern, gFalse, gFalse, gTrue); - break; - default: - error(errSyntaxError, getPos(), "Unknown pattern type ({0:d}) in fill", - pattern->getType()); - break; - } -} - -void Gfx::doPatternImageMask(Object *ref, Stream *str, int width, int height, - GBool invert, GBool inlineImg) { - saveState(); - - out->setSoftMaskFromImageMask(state, ref, str, - width, height, invert, inlineImg, baseMatrix); - - state->clearPath(); - state->moveTo(0, 0); - state->lineTo(1, 0); - state->lineTo(1, 1); - state->lineTo(0, 1); - state->closePath(); - doPatternText(); - - out->unsetSoftMaskFromImageMask(state, baseMatrix); - restoreState(); -} - -void Gfx::doTilingPatternFill(GfxTilingPattern *tPat, - GBool stroke, GBool eoFill, GBool text) { - GfxPatternColorSpace *patCS; - GfxColorSpace *cs; - GfxColor color; - GfxState *savedState; - double xMin, yMin, xMax, yMax, x, y, x1, y1; - double cxMin, cyMin, cxMax, cyMax; - int xi0, yi0, xi1, yi1, xi, yi; - double *ctm, *btm, *ptm; - double m[6], ictm[6], m1[6], imb[6]; - double det; - double xstep, ystep; - int i; - - // get color space - patCS = (GfxPatternColorSpace *)(stroke ? state->getStrokeColorSpace() - : state->getFillColorSpace()); - - // construct a (pattern space) -> (current space) transform matrix - ctm = state->getCTM(); - btm = baseMatrix; - ptm = tPat->getMatrix(); - // iCTM = invert CTM - det = ctm[0] * ctm[3] - ctm[1] * ctm[2]; - if (fabs(det) < 0.000001) { - error(errSyntaxError, getPos(), "Singular matrix in tiling pattern fill"); - return; - } - det = 1 / det; - ictm[0] = ctm[3] * det; - ictm[1] = -ctm[1] * det; - ictm[2] = -ctm[2] * det; - ictm[3] = ctm[0] * det; - ictm[4] = (ctm[2] * ctm[5] - ctm[3] * ctm[4]) * det; - ictm[5] = (ctm[1] * ctm[4] - ctm[0] * ctm[5]) * det; - // m1 = PTM * BTM = PTM * base transform matrix - m1[0] = ptm[0] * btm[0] + ptm[1] * btm[2]; - m1[1] = ptm[0] * btm[1] + ptm[1] * btm[3]; - m1[2] = ptm[2] * btm[0] + ptm[3] * btm[2]; - m1[3] = ptm[2] * btm[1] + ptm[3] * btm[3]; - m1[4] = ptm[4] * btm[0] + ptm[5] * btm[2] + btm[4]; - m1[5] = ptm[4] * btm[1] + ptm[5] * btm[3] + btm[5]; - // m = m1 * iCTM = (PTM * BTM) * (iCTM) - m[0] = m1[0] * ictm[0] + m1[1] * ictm[2]; - m[1] = m1[0] * ictm[1] + m1[1] * ictm[3]; - m[2] = m1[2] * ictm[0] + m1[3] * ictm[2]; - m[3] = m1[2] * ictm[1] + m1[3] * ictm[3]; - m[4] = m1[4] * ictm[0] + m1[5] * ictm[2] + ictm[4]; - m[5] = m1[4] * ictm[1] + m1[5] * ictm[3] + ictm[5]; - - // construct a (device space) -> (pattern space) transform matrix - det = m1[0] * m1[3] - m1[1] * m1[2]; - if (fabs(det) < 0.000001) { - error(errSyntaxError, getPos(), "Singular matrix in tiling pattern fill"); - return; - } - det = 1 / det; - imb[0] = m1[3] * det; - imb[1] = -m1[1] * det; - imb[2] = -m1[2] * det; - imb[3] = m1[0] * det; - imb[4] = (m1[2] * m1[5] - m1[3] * m1[4]) * det; - imb[5] = (m1[1] * m1[4] - m1[0] * m1[5]) * det; - - // save current graphics state - savedState = saveStateStack(); - - // set underlying color space (for uncolored tiling patterns); set - // various other parameters (stroke color, line width) to match - // Adobe's behavior - state->setFillPattern(nullptr); - state->setStrokePattern(nullptr); - if (tPat->getPaintType() == 2 && (cs = patCS->getUnder())) { - state->setFillColorSpace(cs->copy()); - out->updateFillColorSpace(state); - state->setStrokeColorSpace(cs->copy()); - out->updateStrokeColorSpace(state); - if (stroke) { - state->setFillColor(state->getStrokeColor()); - } else { - state->setStrokeColor(state->getFillColor()); - } - out->updateFillColor(state); - out->updateStrokeColor(state); - } else { - cs = new GfxDeviceGrayColorSpace(); - state->setFillColorSpace(cs); - cs->getDefaultColor(&color); - state->setFillColor(&color); - out->updateFillColorSpace(state); - state->setStrokeColorSpace(new GfxDeviceGrayColorSpace()); - state->setStrokeColor(&color); - out->updateStrokeColorSpace(state); - } - if (!stroke) { - state->setLineWidth(0); - out->updateLineWidth(state); - } - - // clip to current path - if (stroke) { - state->clipToStrokePath(); - out->clipToStrokePath(state); - } else if (!text) { - state->clip(); - if (eoFill) { - out->eoClip(state); - } else { - out->clip(state); - } - } - state->clearPath(); - - // get the clip region, check for empty - state->getClipBBox(&cxMin, &cyMin, &cxMax, &cyMax); - if (cxMin > cxMax || cyMin > cyMax) { - goto restore; - } - - // transform clip region bbox to pattern space - xMin = xMax = cxMin * imb[0] + cyMin * imb[2] + imb[4]; - yMin = yMax = cxMin * imb[1] + cyMin * imb[3] + imb[5]; - x1 = cxMin * imb[0] + cyMax * imb[2] + imb[4]; - y1 = cxMin * imb[1] + cyMax * imb[3] + imb[5]; - if (x1 < xMin) { - xMin = x1; - } else if (x1 > xMax) { - xMax = x1; - } - if (y1 < yMin) { - yMin = y1; - } else if (y1 > yMax) { - yMax = y1; - } - x1 = cxMax * imb[0] + cyMin * imb[2] + imb[4]; - y1 = cxMax * imb[1] + cyMin * imb[3] + imb[5]; - if (x1 < xMin) { - xMin = x1; - } else if (x1 > xMax) { - xMax = x1; - } - if (y1 < yMin) { - yMin = y1; - } else if (y1 > yMax) { - yMax = y1; - } - x1 = cxMax * imb[0] + cyMax * imb[2] + imb[4]; - y1 = cxMax * imb[1] + cyMax * imb[3] + imb[5]; - if (x1 < xMin) { - xMin = x1; - } else if (x1 > xMax) { - xMax = x1; - } - if (y1 < yMin) { - yMin = y1; - } else if (y1 > yMax) { - yMax = y1; - } - - // draw the pattern - //~ this should treat negative steps differently -- start at right/top - //~ edge instead of left/bottom (?) - xstep = fabs(tPat->getXStep()); - ystep = fabs(tPat->getYStep()); - if (tPat->getBBox()[0] < tPat->getBBox()[2]) { - xi0 = (int)ceil((xMin - tPat->getBBox()[2]) / xstep); - xi1 = (int)floor((xMax - tPat->getBBox()[0]) / xstep) + 1; - } else { - xi0 = (int)ceil((xMin - tPat->getBBox()[0]) / xstep); - xi1 = (int)floor((xMax - tPat->getBBox()[2]) / xstep) + 1; - } - if (tPat->getBBox()[1] < tPat->getBBox()[3]) { - yi0 = (int)ceil((yMin - tPat->getBBox()[3]) / ystep); - yi1 = (int)floor((yMax - tPat->getBBox()[1]) / ystep) + 1; - } else { - yi0 = (int)ceil((yMin - tPat->getBBox()[1]) / ystep); - yi1 = (int)floor((yMax - tPat->getBBox()[3]) / ystep) + 1; - } - for (i = 0; i < 4; ++i) { - m1[i] = m[i]; - } - m1[4] = m[4]; - m1[5] = m[5]; - { - bool shouldDrawPattern = gTrue; - std::set<int>::iterator patternRefIt; - const int patternRefNum = tPat->getPatternRefNum(); - if (patternRefNum != -1) { - if (formsDrawing.find(patternRefNum) == formsDrawing.end()) { - patternRefIt = formsDrawing.insert(patternRefNum).first; - } else { - shouldDrawPattern = gFalse; - } - } - if (shouldDrawPattern) { - if (out->useTilingPatternFill() && - out->tilingPatternFill(state, this, catalog, tPat->getContentStream(), - tPat->getMatrix(), tPat->getPaintType(), tPat->getTilingType(), - tPat->getResDict(), m1, tPat->getBBox(), - xi0, yi0, xi1, yi1, xstep, ystep)) { - // do nothing - } else { - out->updatePatternOpacity(state); - for (yi = yi0; yi < yi1; ++yi) { - for (xi = xi0; xi < xi1; ++xi) { - x = xi * xstep; - y = yi * ystep; - m1[4] = x * m[0] + y * m[2] + m[4]; - m1[5] = x * m[1] + y * m[3] + m[5]; - drawForm(tPat->getContentStream(), tPat->getResDict(), - m1, tPat->getBBox()); - } - } - out->clearPatternOpacity(state); - } - if (patternRefNum != -1) { - formsDrawing.erase(patternRefIt); - } - } - } - - // restore graphics state - restore: - restoreStateStack(savedState); -} - -void Gfx::doShadingPatternFill(GfxShadingPattern *sPat, - GBool stroke, GBool eoFill, GBool text) { - GfxShading *shading; - GfxState *savedState; - double *ctm, *btm, *ptm; - double m[6], ictm[6], m1[6]; - double xMin, yMin, xMax, yMax; - double det; - - shading = sPat->getShading(); - - // save current graphics state - savedState = saveStateStack(); - - // clip to current path - if (stroke) { - state->clipToStrokePath(); - out->clipToStrokePath(state); - } else if (!text) { - state->clip(); - if (eoFill) { - out->eoClip(state); - } else { - out->clip(state); - } - } - state->clearPath(); - - // construct a (pattern space) -> (current space) transform matrix - ctm = state->getCTM(); - btm = baseMatrix; - ptm = sPat->getMatrix(); - // iCTM = invert CTM - det = ctm[0] * ctm[3] - ctm[1] * ctm[2]; - if (fabs(det) < 0.000001) { - error(errSyntaxError, getPos(), "Singular matrix in shading pattern fill"); - restoreStateStack(savedState); - return; - } - det = 1 / det; - ictm[0] = ctm[3] * det; - ictm[1] = -ctm[1] * det; - ictm[2] = -ctm[2] * det; - ictm[3] = ctm[0] * det; - ictm[4] = (ctm[2] * ctm[5] - ctm[3] * ctm[4]) * det; - ictm[5] = (ctm[1] * ctm[4] - ctm[0] * ctm[5]) * det; - // m1 = PTM * BTM = PTM * base transform matrix - m1[0] = ptm[0] * btm[0] + ptm[1] * btm[2]; - m1[1] = ptm[0] * btm[1] + ptm[1] * btm[3]; - m1[2] = ptm[2] * btm[0] + ptm[3] * btm[2]; - m1[3] = ptm[2] * btm[1] + ptm[3] * btm[3]; - m1[4] = ptm[4] * btm[0] + ptm[5] * btm[2] + btm[4]; - m1[5] = ptm[4] * btm[1] + ptm[5] * btm[3] + btm[5]; - // m = m1 * iCTM = (PTM * BTM) * (iCTM) - m[0] = m1[0] * ictm[0] + m1[1] * ictm[2]; - m[1] = m1[0] * ictm[1] + m1[1] * ictm[3]; - m[2] = m1[2] * ictm[0] + m1[3] * ictm[2]; - m[3] = m1[2] * ictm[1] + m1[3] * ictm[3]; - m[4] = m1[4] * ictm[0] + m1[5] * ictm[2] + ictm[4]; - m[5] = m1[4] * ictm[1] + m1[5] * ictm[3] + ictm[5]; - - // set the new matrix - state->concatCTM(m[0], m[1], m[2], m[3], m[4], m[5]); - out->updateCTM(state, m[0], m[1], m[2], m[3], m[4], m[5]); - - // clip to bbox - if (shading->getHasBBox()) { - shading->getBBox(&xMin, &yMin, &xMax, &yMax); - state->moveTo(xMin, yMin); - state->lineTo(xMax, yMin); - state->lineTo(xMax, yMax); - state->lineTo(xMin, yMax); - state->closePath(); - state->clip(); - out->clip(state); - state->clearPath(); - } - - // set the color space - state->setFillColorSpace(shading->getColorSpace()->copy()); - out->updateFillColorSpace(state); - - // background color fill - if (shading->getHasBackground()) { - state->setFillColor(shading->getBackground()); - out->updateFillColor(state); - state->getUserClipBBox(&xMin, &yMin, &xMax, &yMax); - state->moveTo(xMin, yMin); - state->lineTo(xMax, yMin); - state->lineTo(xMax, yMax); - state->lineTo(xMin, yMax); - state->closePath(); - out->fill(state); - state->clearPath(); - } - -#if 1 //~tmp: turn off anti-aliasing temporarily - GBool vaa = out->getVectorAntialias(); - if (vaa) { - out->setVectorAntialias(gFalse); - } -#endif - - // do shading type-specific operations - switch (shading->getType()) { - case 1: - doFunctionShFill((GfxFunctionShading *)shading); - break; - case 2: - doAxialShFill((GfxAxialShading *)shading); - break; - case 3: - doRadialShFill((GfxRadialShading *)shading); - break; - case 4: - case 5: - doGouraudTriangleShFill((GfxGouraudTriangleShading *)shading); - break; - case 6: - case 7: - doPatchMeshShFill((GfxPatchMeshShading *)shading); - break; - } - -#if 1 //~tmp: turn off anti-aliasing temporarily - if (vaa) { - out->setVectorAntialias(gTrue); - } -#endif - - // restore graphics state - restoreStateStack(savedState); -} - -void Gfx::opShFill(Object args[], int numArgs) { - GfxShading *shading; - GfxState *savedState; - double xMin, yMin, xMax, yMax; - - if (!ocState) { - return; - } - - if (!(shading = res->lookupShading(args[0].getName(), out, state))) { - return; - } - - // save current graphics state - savedState = saveStateStack(); - - // clip to bbox - if (shading->getHasBBox()) { - shading->getBBox(&xMin, &yMin, &xMax, &yMax); - state->moveTo(xMin, yMin); - state->lineTo(xMax, yMin); - state->lineTo(xMax, yMax); - state->lineTo(xMin, yMax); - state->closePath(); - state->clip(); - out->clip(state); - state->clearPath(); - } - - // set the color space - state->setFillColorSpace(shading->getColorSpace()->copy()); - out->updateFillColorSpace(state); - -#if 1 //~tmp: turn off anti-aliasing temporarily - GBool vaa = out->getVectorAntialias(); - if (vaa) { - out->setVectorAntialias(gFalse); - } -#endif - - // do shading type-specific operations - switch (shading->getType()) { - case 1: - doFunctionShFill((GfxFunctionShading *)shading); - break; - case 2: - doAxialShFill((GfxAxialShading *)shading); - break; - case 3: - doRadialShFill((GfxRadialShading *)shading); - break; - case 4: - case 5: - doGouraudTriangleShFill((GfxGouraudTriangleShading *)shading); - break; - case 6: - case 7: - doPatchMeshShFill((GfxPatchMeshShading *)shading); - break; - } - -#if 1 //~tmp: turn off anti-aliasing temporarily - if (vaa) { - out->setVectorAntialias(gTrue); - } -#endif - - // restore graphics state - restoreStateStack(savedState); - - delete shading; -} - -void Gfx::doFunctionShFill(GfxFunctionShading *shading) { - double x0, y0, x1, y1; - GfxColor colors[4]; - - if (out->useShadedFills( shading->getType() ) && - out->functionShadedFill(state, shading)) { - return; - } - - shading->getDomain(&x0, &y0, &x1, &y1); - shading->getColor(x0, y0, &colors[0]); - shading->getColor(x0, y1, &colors[1]); - shading->getColor(x1, y0, &colors[2]); - shading->getColor(x1, y1, &colors[3]); - doFunctionShFill1(shading, x0, y0, x1, y1, colors, 0); -} - -void Gfx::doFunctionShFill1(GfxFunctionShading *shading, - double x0, double y0, - double x1, double y1, - GfxColor *colors, int depth) { - GfxColor fillColor; - GfxColor color0M, color1M, colorM0, colorM1, colorMM; - GfxColor colors2[4]; - double *matrix; - double xM, yM; - int nComps, i, j; - - nComps = shading->getColorSpace()->getNComps(); - matrix = shading->getMatrix(); - - // compare the four corner colors - for (i = 0; i < 4; ++i) { - for (j = 0; j < nComps; ++j) { - if (abs(colors[i].c[j] - colors[(i+1)&3].c[j]) > functionColorDelta) { - break; - } - } - if (j < nComps) { - break; - } - } - - // center of the rectangle - xM = 0.5 * (x0 + x1); - yM = 0.5 * (y0 + y1); - - // the four corner colors are close (or we hit the recursive limit) - // -- fill the rectangle; but require at least one subdivision - // (depth==0) to avoid problems when the four outer corners of the - // shaded region are the same color - if ((i == 4 && depth > 0) || depth == functionMaxDepth) { - - // use the center color - shading->getColor(xM, yM, &fillColor); - state->setFillColor(&fillColor); - out->updateFillColor(state); - - // fill the rectangle - state->moveTo(x0 * matrix[0] + y0 * matrix[2] + matrix[4], - x0 * matrix[1] + y0 * matrix[3] + matrix[5]); - state->lineTo(x1 * matrix[0] + y0 * matrix[2] + matrix[4], - x1 * matrix[1] + y0 * matrix[3] + matrix[5]); - state->lineTo(x1 * matrix[0] + y1 * matrix[2] + matrix[4], - x1 * matrix[1] + y1 * matrix[3] + matrix[5]); - state->lineTo(x0 * matrix[0] + y1 * matrix[2] + matrix[4], - x0 * matrix[1] + y1 * matrix[3] + matrix[5]); - state->closePath(); - out->fill(state); - state->clearPath(); - - // the four corner colors are not close enough -- subdivide the - // rectangle - } else { - - // colors[0] colorM0 colors[2] - // (x0,y0) (xM,y0) (x1,y0) - // +----------+----------+ - // | | | - // | UL | UR | - // color0M | colorMM | color1M - // (x0,yM) +----------+----------+ (x1,yM) - // | (xM,yM) | - // | LL | LR | - // | | | - // +----------+----------+ - // colors[1] colorM1 colors[3] - // (x0,y1) (xM,y1) (x1,y1) - - shading->getColor(x0, yM, &color0M); - shading->getColor(x1, yM, &color1M); - shading->getColor(xM, y0, &colorM0); - shading->getColor(xM, y1, &colorM1); - shading->getColor(xM, yM, &colorMM); - - // upper-left sub-rectangle - colors2[0] = colors[0]; - colors2[1] = color0M; - colors2[2] = colorM0; - colors2[3] = colorMM; - doFunctionShFill1(shading, x0, y0, xM, yM, colors2, depth + 1); - - // lower-left sub-rectangle - colors2[0] = color0M; - colors2[1] = colors[1]; - colors2[2] = colorMM; - colors2[3] = colorM1; - doFunctionShFill1(shading, x0, yM, xM, y1, colors2, depth + 1); - - // upper-right sub-rectangle - colors2[0] = colorM0; - colors2[1] = colorMM; - colors2[2] = colors[2]; - colors2[3] = color1M; - doFunctionShFill1(shading, xM, y0, x1, yM, colors2, depth + 1); - - // lower-right sub-rectangle - colors2[0] = colorMM; - colors2[1] = colorM1; - colors2[2] = color1M; - colors2[3] = colors[3]; - doFunctionShFill1(shading, xM, yM, x1, y1, colors2, depth + 1); - } -} - -static void bubbleSort(double array[]) -{ - for (int j = 0; j < 3; ++j) { - int kk = j; - for (int k = j + 1; k < 4; ++k) { - if (array[k] < array[kk]) { - kk = k; - } - } - double tmp = array[j]; - array[j] = array[kk]; - array[kk] = tmp; - } -} - -void Gfx::doAxialShFill(GfxAxialShading *shading) { - double xMin, yMin, xMax, yMax; - double x0, y0, x1, y1; - double dx, dy, mul; - GBool dxZero, dyZero; - double bboxIntersections[4]; - double tMin, tMax, tx, ty; - double s[4], sMin, sMax, tmp; - double ux0, uy0, ux1, uy1, vx0, vy0, vx1, vy1; - double t0, t1, tt; - double ta[axialMaxSplits + 1]; - int next[axialMaxSplits + 1]; - GfxColor color0 = {}, color1 = {}; - int nComps; - int i, j, k; - GBool needExtend = gTrue; - - // get the clip region bbox - state->getUserClipBBox(&xMin, &yMin, &xMax, &yMax); - - // compute min and max t values, based on the four corners of the - // clip region bbox - shading->getCoords(&x0, &y0, &x1, &y1); - dx = x1 - x0; - dy = y1 - y0; - dxZero = fabs(dx) < 0.01; - dyZero = fabs(dy) < 0.01; - if (dxZero && dyZero) { - tMin = tMax = 0; - } else { - mul = 1 / (dx * dx + dy * dy); - bboxIntersections[0] = ((xMin - x0) * dx + (yMin - y0) * dy) * mul; - bboxIntersections[1] = ((xMin - x0) * dx + (yMax - y0) * dy) * mul; - bboxIntersections[2] = ((xMax - x0) * dx + (yMin - y0) * dy) * mul; - bboxIntersections[3] = ((xMax - x0) * dx + (yMax - y0) * dy) * mul; - bubbleSort(bboxIntersections); - tMin = bboxIntersections[0]; - tMax = bboxIntersections[3]; - if (tMin < 0 && !shading->getExtend0()) { - tMin = 0; - } - if (tMax > 1 && !shading->getExtend1()) { - tMax = 1; - } - } - - if (out->useShadedFills( shading->getType() ) && - out->axialShadedFill(state, shading, tMin, tMax)) { - return; - } - - // get the function domain - t0 = shading->getDomain0(); - t1 = shading->getDomain1(); - - // Traverse the t axis and do the shading. - // - // For each point (tx, ty) on the t axis, consider a line through - // that point perpendicular to the t axis: - // - // x(s) = tx + s * -dy --> s = (x - tx) / -dy - // y(s) = ty + s * dx --> s = (y - ty) / dx - // - // Then look at the intersection of this line with the bounding box - // (xMin, yMin, xMax, yMax). In the general case, there are four - // intersection points: - // - // s0 = (xMin - tx) / -dy - // s1 = (xMax - tx) / -dy - // s2 = (yMin - ty) / dx - // s3 = (yMax - ty) / dx - // - // and we want the middle two s values. - // - // In the case where dx = 0, take s0 and s1; in the case where dy = - // 0, take s2 and s3. - // - // Each filled polygon is bounded by two of these line segments - // perpdendicular to the t axis. - // - // The t axis is bisected into smaller regions until the color - // difference across a region is small enough, and then the region - // is painted with a single color. - - // set up: require at least one split to avoid problems when the two - // ends of the t axis have the same color - nComps = shading->getColorSpace()->getNComps(); - ta[0] = tMin; - next[0] = axialMaxSplits / 2; - ta[axialMaxSplits / 2] = 0.5 * (tMin + tMax); - next[axialMaxSplits / 2] = axialMaxSplits; - ta[axialMaxSplits] = tMax; - - // compute the color at t = tMin - if (tMin < 0) { - tt = t0; - } else if (tMin > 1) { - tt = t1; - } else { - tt = t0 + (t1 - t0) * tMin; - } - shading->getColor(tt, &color0); - - if (out->useFillColorStop()) { - // make sure we add stop color when t = tMin - state->setFillColor(&color0); - out->updateFillColorStop(state, 0); - } - - // compute the coordinates of the point on the t axis at t = tMin; - // then compute the intersection of the perpendicular line with the - // bounding box - tx = x0 + tMin * dx; - ty = y0 + tMin * dy; - if (dxZero && dyZero) { - sMin = sMax = 0; - } else if (dxZero) { - sMin = (xMin - tx) / -dy; - sMax = (xMax - tx) / -dy; - if (sMin > sMax) { tmp = sMin; sMin = sMax; sMax = tmp; } - } else if (dyZero) { - sMin = (yMin - ty) / dx; - sMax = (yMax - ty) / dx; - if (sMin > sMax) { tmp = sMin; sMin = sMax; sMax = tmp; } - } else { - s[0] = (yMin - ty) / dx; - s[1] = (yMax - ty) / dx; - s[2] = (xMin - tx) / -dy; - s[3] = (xMax - tx) / -dy; - bubbleSort(s); - sMin = s[1]; - sMax = s[2]; - } - ux0 = tx - sMin * dy; - uy0 = ty + sMin * dx; - vx0 = tx - sMax * dy; - vy0 = ty + sMax * dx; - - i = 0; - bool doneBBox1, doneBBox2; - if (dxZero && dyZero) { - doneBBox1 = doneBBox2 = true; - } else { - doneBBox1 = bboxIntersections[1] < tMin; - doneBBox2 = bboxIntersections[2] > tMax; - } - - // If output device doesn't support the extended mode required - // we have to do it here - needExtend = !out->axialShadedSupportExtend(state, shading); - - while (i < axialMaxSplits) { - - // bisect until color difference is small enough or we hit the - // bisection limit - j = next[i]; - while (j > i + 1) { - if (ta[j] < 0) { - tt = t0; - } else if (ta[j] > 1) { - tt = t1; - } else { - tt = t0 + (t1 - t0) * ta[j]; - } - shading->getColor(tt, &color1); - if (isSameGfxColor(color1, color0, nComps, axialColorDelta)) { - // in these two if what we guarantee is that if we are skipping lots of - // positions because the colors are the same, we still create a region - // with vertexs passing by bboxIntersections[1] and bboxIntersections[2] - // otherwise we can have empty regions that should really be painted - // like happened in bug 19896 - // What we do to ensure that we pass a line through this points - // is making sure use the exact bboxIntersections[] value as one of the used ta[] values - if (!doneBBox1 && ta[i] < bboxIntersections[1] && ta[j] > bboxIntersections[1]) { - int teoricalj = (int) ((bboxIntersections[1] - tMin) * axialMaxSplits / (tMax - tMin)); - if (teoricalj <= i) teoricalj = i + 1; - if (teoricalj < j) { - next[i] = teoricalj; - next[teoricalj] = j; - } - else { - teoricalj = j; - } - ta[teoricalj] = bboxIntersections[1]; - j = teoricalj; - doneBBox1 = true; - } - if (!doneBBox2 && ta[i] < bboxIntersections[2] && ta[j] > bboxIntersections[2]) { - int teoricalj = (int) ((bboxIntersections[2] - tMin) * axialMaxSplits / (tMax - tMin)); - if (teoricalj <= i) teoricalj = i + 1; - if (teoricalj < j) { - next[i] = teoricalj; - next[teoricalj] = j; - } - else { - teoricalj = j; - } - ta[teoricalj] = bboxIntersections[2]; - j = teoricalj; - doneBBox2 = true; - } - break; - } - k = (i + j) / 2; - ta[k] = 0.5 * (ta[i] + ta[j]); - next[i] = k; - next[k] = j; - j = k; - } - - // use the average of the colors of the two sides of the region - for (k = 0; k < nComps; ++k) { - color0.c[k] = (color0.c[k] + color1.c[k]) / 2; - } - - // compute the coordinates of the point on the t axis; then - // compute the intersection of the perpendicular line with the - // bounding box - tx = x0 + ta[j] * dx; - ty = y0 + ta[j] * dy; - if (dxZero && dyZero) { - sMin = sMax = 0; - } else if (dxZero) { - sMin = (xMin - tx) / -dy; - sMax = (xMax - tx) / -dy; - if (sMin > sMax) { tmp = sMin; sMin = sMax; sMax = tmp; } - } else if (dyZero) { - sMin = (yMin - ty) / dx; - sMax = (yMax - ty) / dx; - if (sMin > sMax) { tmp = sMin; sMin = sMax; sMax = tmp; } - } else { - s[0] = (yMin - ty) / dx; - s[1] = (yMax - ty) / dx; - s[2] = (xMin - tx) / -dy; - s[3] = (xMax - tx) / -dy; - bubbleSort(s); - sMin = s[1]; - sMax = s[2]; - } - ux1 = tx - sMin * dy; - uy1 = ty + sMin * dx; - vx1 = tx - sMax * dy; - vy1 = ty + sMax * dx; - - // set the color - state->setFillColor(&color0); - if (out->useFillColorStop()) - out->updateFillColorStop(state, (ta[j] - tMin)/(tMax - tMin)); - else - out->updateFillColor(state); - - if (needExtend) { - // fill the region - state->moveTo(ux0, uy0); - state->lineTo(vx0, vy0); - state->lineTo(vx1, vy1); - state->lineTo(ux1, uy1); - state->closePath(); - } - - if (!out->useFillColorStop()) { - out->fill(state); - state->clearPath(); - } - - // set up for next region - ux0 = ux1; - uy0 = uy1; - vx0 = vx1; - vy0 = vy1; - color0 = color1; - i = next[i]; - } - - if (out->useFillColorStop()) { - if (!needExtend) { - state->moveTo(xMin, yMin); - state->lineTo(xMin, yMax); - state->lineTo(xMax, yMax); - state->lineTo(xMax, yMin); - state->closePath(); - } - out->fill(state); - state->clearPath(); - } -} - -static inline void getShadingColorRadialHelper(double t0, double t1, double t, GfxRadialShading *shading, GfxColor *color) -{ - if (t0 < t1) { - if (t < t0) { - shading->getColor(t0, color); - } else if (t > t1) { - shading->getColor(t1, color); - } else { - shading->getColor(t, color); - } - } else { - if (t > t0) { - shading->getColor(t0, color); - } else if (t < t1) { - shading->getColor(t1, color); - } else { - shading->getColor(t, color); - } - } -} - -void Gfx::doRadialShFill(GfxRadialShading *shading) { - double xMin, yMin, xMax, yMax; - double x0, y0, r0, x1, y1, r1, t0, t1; - int nComps; - GfxColor colorA = {}, colorB = {}, colorC = {}; - double xa, ya, xb, yb, ra, rb; - double ta, tb, sa, sb; - double sz, xz, yz, sMin, sMax; - GBool enclosed; - int ia, ib, k, n; - double *ctm; - double theta, alpha, angle, t; - GBool needExtend = gTrue; - - // get the shading info - shading->getCoords(&x0, &y0, &r0, &x1, &y1, &r1); - t0 = shading->getDomain0(); - t1 = shading->getDomain1(); - nComps = shading->getColorSpace()->getNComps(); - - // Compute the point at which r(s) = 0; check for the enclosed - // circles case; and compute the angles for the tangent lines. - if (x0 == x1 && y0 == y1) { - enclosed = gTrue; - theta = 0; // make gcc happy - sz = 0; // make gcc happy - } else if (r0 == r1) { - enclosed = gFalse; - theta = 0; - sz = 0; // make gcc happy - } else { - sz = (r1 > r0) ? -r0 / (r1 - r0) : -r1 / (r0 - r1); - xz = x0 + sz * (x1 - x0); - yz = y0 + sz * (y1 - y0); - enclosed = (xz - x0) * (xz - x0) + (yz - y0) * (yz - y0) <= r0 * r0; - const double theta_aux = sqrt((x0 - xz) * (x0 - xz) + (y0 - yz) * (y0 - yz)); - if (likely(theta_aux != 0)) { - theta = asin(r0 / theta_aux); - } else { - theta = 0; - } - if (r0 > r1) { - theta = -theta; - } - } - if (enclosed) { - alpha = 0; - } else { - alpha = atan2(y1 - y0, x1 - x0); - } - - // compute the (possibly extended) s range - state->getUserClipBBox(&xMin, &yMin, &xMax, &yMax); - if (enclosed) { - sMin = 0; - sMax = 1; - } else { - sMin = 1; - sMax = 0; - // solve for x(s) + r(s) = xMin - if ((x1 + r1) - (x0 + r0) != 0) { - sa = (xMin - (x0 + r0)) / ((x1 + r1) - (x0 + r0)); - if (sa < sMin) { - sMin = sa; - } else if (sa > sMax) { - sMax = sa; - } - } - // solve for x(s) - r(s) = xMax - if ((x1 - r1) - (x0 - r0) != 0) { - sa = (xMax - (x0 - r0)) / ((x1 - r1) - (x0 - r0)); - if (sa < sMin) { - sMin = sa; - } else if (sa > sMax) { - sMax = sa; - } - } - // solve for y(s) + r(s) = yMin - if ((y1 + r1) - (y0 + r0) != 0) { - sa = (yMin - (y0 + r0)) / ((y1 + r1) - (y0 + r0)); - if (sa < sMin) { - sMin = sa; - } else if (sa > sMax) { - sMax = sa; - } - } - // solve for y(s) - r(s) = yMax - if ((y1 - r1) - (y0 - r0) != 0) { - sa = (yMax - (y0 - r0)) / ((y1 - r1) - (y0 - r0)); - if (sa < sMin) { - sMin = sa; - } else if (sa > sMax) { - sMax = sa; - } - } - // check against sz - if (r0 < r1) { - if (sMin < sz) { - sMin = sz; - } - } else if (r0 > r1) { - if (sMax > sz) { - sMax = sz; - } - } - // check the 'extend' flags - if (!shading->getExtend0() && sMin < 0) { - sMin = 0; - } - if (!shading->getExtend1() && sMax > 1) { - sMax = 1; - } - } - - if (out->useShadedFills( shading->getType() ) && - out->radialShadedFill(state, shading, sMin, sMax)) { - return; - } - - // compute the number of steps into which circles must be divided to - // achieve a curve flatness of 0.1 pixel in device space for the - // largest circle (note that "device space" is 72 dpi when generating - // PostScript, hence the relatively small 0.1 pixel accuracy) - ctm = state->getCTM(); - t = fabs(ctm[0]); - if (fabs(ctm[1]) > t) { - t = fabs(ctm[1]); - } - if (fabs(ctm[2]) > t) { - t = fabs(ctm[2]); - } - if (fabs(ctm[3]) > t) { - t = fabs(ctm[3]); - } - if (r0 > r1) { - t *= r0; - } else { - t *= r1; - } - if (t < 1) { - n = 3; - } else { - const double tmp = 1 - 0.1 / t; - if (unlikely(tmp == 1)) - n = 200; - else - n = (int)(M_PI / acos(tmp)); - if (n < 3) { - n = 3; - } else if (n > 200) { - n = 200; - } - } - - // setup for the start circle - ia = 0; - sa = sMin; - ta = t0 + sa * (t1 - t0); - xa = x0 + sa * (x1 - x0); - ya = y0 + sa * (y1 - y0); - ra = r0 + sa * (r1 - r0); - getShadingColorRadialHelper(t0, t1, ta, shading, &colorA); - - needExtend = !out->radialShadedSupportExtend(state, shading); - - // fill the circles - while (ia < radialMaxSplits) { - - // go as far along the t axis (toward t1) as we can, such that the - // color difference is within the tolerance (radialColorDelta) -- - // this uses bisection (between the current value, t, and t1), - // limited to radialMaxSplits points along the t axis; require at - // least one split to avoid problems when the innermost and - // outermost colors are the same - ib = radialMaxSplits; - sb = sMax; - tb = t0 + sb * (t1 - t0); - getShadingColorRadialHelper(t0, t1, tb, shading, &colorB); - while (ib - ia > 1) { - if (isSameGfxColor(colorB, colorA, nComps, radialColorDelta)) { - // The shading is not necessarily lineal so having two points with the - // same color does not mean all the areas in between have the same color too - int ic = ia + 1; - for (; ic <= ib; ic++) { - const double sc = sMin + ((double)ic / (double)radialMaxSplits) * (sMax - sMin); - const double tc = t0 + sc * (t1 - t0); - getShadingColorRadialHelper(t0, t1, tc, shading, &colorC); - if (!isSameGfxColor(colorC, colorA, nComps, radialColorDelta)) { - break; - } - } - ib = (ic > ia + 1) ? ic - 1 : ia + 1; - sb = sMin + ((double)ib / (double)radialMaxSplits) * (sMax - sMin); - tb = t0 + sb * (t1 - t0); - getShadingColorRadialHelper(t0, t1, tb, shading, &colorB); - break; - } - ib = (ia + ib) / 2; - sb = sMin + ((double)ib / (double)radialMaxSplits) * (sMax - sMin); - tb = t0 + sb * (t1 - t0); - getShadingColorRadialHelper(t0, t1, tb, shading, &colorB); - } - - // compute center and radius of the circle - xb = x0 + sb * (x1 - x0); - yb = y0 + sb * (y1 - y0); - rb = r0 + sb * (r1 - r0); - - // use the average of the colors at the two circles - for (k = 0; k < nComps; ++k) { - colorA.c[k] = (colorA.c[k] + colorB.c[k]) / 2; - } - state->setFillColor(&colorA); - if (out->useFillColorStop()) - out->updateFillColorStop(state, (sa - sMin)/(sMax - sMin)); - else - out->updateFillColor(state); - - if (needExtend) { - if (enclosed) { - // construct path for first circle (counterclockwise) - state->moveTo(xa + ra, ya); - for (k = 1; k < n; ++k) { - angle = ((double)k / (double)n) * 2 * M_PI; - state->lineTo(xa + ra * cos(angle), ya + ra * sin(angle)); - } - state->closePath(); - - // construct and append path for second circle (clockwise) - state->moveTo(xb + rb, yb); - for (k = 1; k < n; ++k) { - angle = -((double)k / (double)n) * 2 * M_PI; - state->lineTo(xb + rb * cos(angle), yb + rb * sin(angle)); - } - state->closePath(); - } else { - // construct the first subpath (clockwise) - state->moveTo(xa + ra * cos(alpha + theta + 0.5 * M_PI), - ya + ra * sin(alpha + theta + 0.5 * M_PI)); - for (k = 0; k < n; ++k) { - angle = alpha + theta + 0.5 * M_PI - - ((double)k / (double)n) * (2 * theta + M_PI); - state->lineTo(xb + rb * cos(angle), yb + rb * sin(angle)); - } - for (k = 0; k < n; ++k) { - angle = alpha - theta - 0.5 * M_PI - + ((double)k / (double)n) * (2 * theta - M_PI); - state->lineTo(xa + ra * cos(angle), ya + ra * sin(angle)); - } - state->closePath(); - - // construct the second subpath (counterclockwise) - state->moveTo(xa + ra * cos(alpha + theta + 0.5 * M_PI), - ya + ra * sin(alpha + theta + 0.5 * M_PI)); - for (k = 0; k < n; ++k) { - angle = alpha + theta + 0.5 * M_PI - + ((double)k / (double)n) * (-2 * theta + M_PI); - state->lineTo(xb + rb * cos(angle), yb + rb * sin(angle)); - } - for (k = 0; k < n; ++k) { - angle = alpha - theta - 0.5 * M_PI - + ((double)k / (double)n) * (2 * theta + M_PI); - state->lineTo(xa + ra * cos(angle), ya + ra * sin(angle)); - } - state->closePath(); - } - } - - if (!out->useFillColorStop()) { - // fill the path - out->fill(state); - state->clearPath(); - } - - // step to the next value of t - ia = ib; - sa = sb; - ta = tb; - xa = xb; - ya = yb; - ra = rb; - colorA = colorB; - } - - if (out->useFillColorStop()) { - // make sure we add stop color when sb = sMax - state->setFillColor(&colorA); - out->updateFillColorStop(state, (sb - sMin)/(sMax - sMin)); - - // fill the path - state->moveTo(xMin, yMin); - state->lineTo(xMin, yMax); - state->lineTo(xMax, yMax); - state->lineTo(xMax, yMin); - state->closePath(); - - out->fill(state); - state->clearPath(); - } - - if (!needExtend) - return; - - if (enclosed) { - // extend the smaller circle - if ((shading->getExtend0() && r0 <= r1) || - (shading->getExtend1() && r1 < r0)) { - if (r0 <= r1) { - ta = t0; - ra = r0; - xa = x0; - ya = y0; - } else { - ta = t1; - ra = r1; - xa = x1; - ya = y1; - } - shading->getColor(ta, &colorA); - state->setFillColor(&colorA); - out->updateFillColor(state); - state->moveTo(xa + ra, ya); - for (k = 1; k < n; ++k) { - angle = ((double)k / (double)n) * 2 * M_PI; - state->lineTo(xa + ra * cos(angle), ya + ra * sin(angle)); - } - state->closePath(); - out->fill(state); - state->clearPath(); - } - - // extend the larger circle - if ((shading->getExtend0() && r0 > r1) || - (shading->getExtend1() && r1 >= r0)) { - if (r0 > r1) { - ta = t0; - ra = r0; - xa = x0; - ya = y0; - } else { - ta = t1; - ra = r1; - xa = x1; - ya = y1; - } - shading->getColor(ta, &colorA); - state->setFillColor(&colorA); - out->updateFillColor(state); - state->moveTo(xMin, yMin); - state->lineTo(xMin, yMax); - state->lineTo(xMax, yMax); - state->lineTo(xMax, yMin); - state->closePath(); - state->moveTo(xa + ra, ya); - for (k = 1; k < n; ++k) { - angle = ((double)k / (double)n) * 2 * M_PI; - state->lineTo(xa + ra * cos(angle), ya + ra * sin(angle)); - } - state->closePath(); - out->fill(state); - state->clearPath(); - } - } -} - -void Gfx::doGouraudTriangleShFill(GfxGouraudTriangleShading *shading) { - double x0, y0, x1, y1, x2, y2; - int i; - - if (out->useShadedFills( shading->getType())) { - if (out->gouraudTriangleShadedFill( state, shading)) - return; - } - - // preallocate a path (speed improvements) - state->moveTo(0., 0.); - state->lineTo(1., 0.); - state->lineTo(0., 1.); - state->closePath(); - - GfxState::ReusablePathIterator *reusablePath = state->getReusablePath(); - - if (shading->isParameterized()) { - // work with parameterized values: - double color0, color1, color2; - // a relative threshold: - const double refineColorThreshold = gouraudParameterizedColorDelta * - (shading->getParameterDomainMax() - shading->getParameterDomainMin()); - for (i = 0; i < shading->getNTriangles(); ++i) { - shading->getTriangle(i, &x0, &y0, &color0, - &x1, &y1, &color1, - &x2, &y2, &color2); - gouraudFillTriangle(x0, y0, color0, x1, y1, color1, x2, y2, color2, refineColorThreshold, 0, shading, reusablePath); - } - - } else { - // this always produces output -- even for parameterized ranges. - // But it ignores the parameterized color map (the function). - // - // Note that using this code in for parameterized shadings might be - // correct in circumstances (namely if the function is linear in the actual - // triangle), but in general, it will simply be wrong. - GfxColor color0, color1, color2; - for (i = 0; i < shading->getNTriangles(); ++i) { - shading->getTriangle(i, &x0, &y0, &color0, - &x1, &y1, &color1, - &x2, &y2, &color2); - gouraudFillTriangle(x0, y0, &color0, x1, y1, &color1, x2, y2, &color2, shading->getColorSpace()->getNComps(), 0, reusablePath); - } - } - - delete reusablePath; -} - -static inline void checkTrue(bool b, const char *message) { - if (unlikely(!b)) { - error(errSyntaxError, -1, message); - } -} - -void Gfx::gouraudFillTriangle(double x0, double y0, GfxColor *color0, - double x1, double y1, GfxColor *color1, - double x2, double y2, GfxColor *color2, - int nComps, int depth, GfxState::ReusablePathIterator *path) { - double x01, y01, x12, y12, x20, y20; - GfxColor color01, color12, color20; - int i; - - for (i = 0; i < nComps; ++i) { - if (abs(color0->c[i] - color1->c[i]) > gouraudColorDelta || - abs(color1->c[i] - color2->c[i]) > gouraudColorDelta) { - break; - } - } - if (i == nComps || depth == gouraudMaxDepth) { - state->setFillColor(color0); - out->updateFillColor(state); - - path->reset(); checkTrue(!path->isEnd(), "Path should not be at end"); - path->setCoord(x0,y0); path->next(); checkTrue(!path->isEnd(), "Path should not be at end"); - path->setCoord(x1,y1); path->next(); checkTrue(!path->isEnd(), "Path should not be at end"); - path->setCoord(x2,y2); path->next(); checkTrue(!path->isEnd(), "Path should not be at end"); - path->setCoord(x0,y0); path->next(); checkTrue( path->isEnd(), "Path should be at end"); - out->fill(state); - - } else { - x01 = 0.5 * (x0 + x1); - y01 = 0.5 * (y0 + y1); - x12 = 0.5 * (x1 + x2); - y12 = 0.5 * (y1 + y2); - x20 = 0.5 * (x2 + x0); - y20 = 0.5 * (y2 + y0); - for (i = 0; i < nComps; ++i) { - color01.c[i] = (color0->c[i] + color1->c[i]) / 2; - color12.c[i] = (color1->c[i] + color2->c[i]) / 2; - color20.c[i] = (color2->c[i] + color0->c[i]) / 2; - } - gouraudFillTriangle(x0, y0, color0, x01, y01, &color01, - x20, y20, &color20, nComps, depth + 1, path); - gouraudFillTriangle(x01, y01, &color01, x1, y1, color1, - x12, y12, &color12, nComps, depth + 1, path); - gouraudFillTriangle(x01, y01, &color01, x12, y12, &color12, - x20, y20, &color20, nComps, depth + 1, path); - gouraudFillTriangle(x20, y20, &color20, x12, y12, &color12, - x2, y2, color2, nComps, depth + 1, path); - } -} -void Gfx::gouraudFillTriangle(double x0, double y0, double color0, - double x1, double y1, double color1, - double x2, double y2, double color2, - double refineColorThreshold, int depth, GfxGouraudTriangleShading *shading, GfxState::ReusablePathIterator *path) { - const double meanColor = (color0 + color1 + color2) / 3; - - const bool isFineEnough = - fabs(color0 - meanColor) < refineColorThreshold && - fabs(color1 - meanColor) < refineColorThreshold && - fabs(color2 - meanColor) < refineColorThreshold; - - if (isFineEnough || depth == gouraudMaxDepth) { - GfxColor color; - - shading->getParameterizedColor(meanColor, &color); - state->setFillColor(&color); - out->updateFillColor(state); - - path->reset(); checkTrue(!path->isEnd(), "Path should not be at end"); - path->setCoord(x0,y0); path->next(); checkTrue(!path->isEnd(), "Path should not be at end"); - path->setCoord(x1,y1); path->next(); checkTrue(!path->isEnd(), "Path should not be at end"); - path->setCoord(x2,y2); path->next(); checkTrue(!path->isEnd(), "Path should not be at end"); - path->setCoord(x0,y0); path->next(); checkTrue( path->isEnd(), "Path should be at end"); - out->fill(state); - - } else { - const double x01 = 0.5 * (x0 + x1); - const double y01 = 0.5 * (y0 + y1); - const double x12 = 0.5 * (x1 + x2); - const double y12 = 0.5 * (y1 + y2); - const double x20 = 0.5 * (x2 + x0); - const double y20 = 0.5 * (y2 + y0); - const double color01 = (color0 + color1) / 2.; - const double color12 = (color1 + color2) / 2.; - const double color20 = (color2 + color0) / 2.; - ++depth; - gouraudFillTriangle(x0, y0, color0, - x01, y01, color01, - x20, y20, color20, - refineColorThreshold, depth, shading, path); - gouraudFillTriangle(x01, y01, color01, - x1, y1, color1, - x12, y12, color12, - refineColorThreshold, depth, shading, path); - gouraudFillTriangle(x01, y01, color01, - x12, y12, color12, - x20, y20, color20, - refineColorThreshold, depth, shading, path); - gouraudFillTriangle(x20, y20, color20, - x12, y12, color12, - x2, y2, color2, - refineColorThreshold, depth, shading, path); - } -} - -void Gfx::doPatchMeshShFill(GfxPatchMeshShading *shading) { - int start, i; - - if (out->useShadedFills( shading->getType())) { - if (out->patchMeshShadedFill( state, shading)) - return; - } - - if (shading->getNPatches() > 128) { - start = 3; - } else if (shading->getNPatches() > 64) { - start = 2; - } else if (shading->getNPatches() > 16) { - start = 1; - } else { - start = 0; - } - /* - * Parameterized shadings take one parameter [t_0,t_e] - * and map it into the color space. - * - * Consequently, all color values are stored as doubles. - * - * These color values are interpreted as parameters for parameterized - * shadings and as colorspace entities otherwise. - * - * The only difference is that color space entities are stored into - * DOUBLE arrays, not into arrays of type GfxColorComp. - */ - const int colorComps = shading->getColorSpace()->getNComps(); - double refineColorThreshold; - if( shading->isParameterized() ) { - refineColorThreshold = gouraudParameterizedColorDelta * - (shading->getParameterDomainMax() - shading->getParameterDomainMin()); - - } else { - refineColorThreshold = patchColorDelta; - } - - for (i = 0; i < shading->getNPatches(); ++i) { - fillPatch(shading->getPatch(i), - colorComps, - shading->isParameterized() ? 1 : colorComps, - refineColorThreshold, - start, - shading); - } -} - - -void Gfx::fillPatch(GfxPatch *patch, int colorComps, int patchColorComps, double refineColorThreshold, int depth, GfxPatchMeshShading *shading) { - GfxPatch patch00, patch01, patch10, patch11; - double xx[4][8], yy[4][8]; - double xxm, yym; - int i; - - for (i = 0; i < patchColorComps; ++i) { - // these comparisons are done in double arithmetics. - // - // For non-parameterized shadings, they are done in color space - // components. - if (fabs(patch->color[0][0].c[i] - patch->color[0][1].c[i]) > refineColorThreshold || - fabs(patch->color[0][1].c[i] - patch->color[1][1].c[i]) > refineColorThreshold || - fabs(patch->color[1][1].c[i] - patch->color[1][0].c[i]) > refineColorThreshold || - fabs(patch->color[1][0].c[i] - patch->color[0][0].c[i]) > refineColorThreshold) { - break; - } - } - if (i == patchColorComps || depth == patchMaxDepth) { - GfxColor flatColor; - if( shading->isParameterized() ) { - shading->getParameterizedColor( patch->color[0][0].c[0], &flatColor ); - } else { - for( i = 0; i<colorComps; ++i ) { - // simply cast to the desired type; that's all what is needed. - flatColor.c[i] = GfxColorComp(patch->color[0][0].c[i]); - } - } - state->setFillColor(&flatColor); - out->updateFillColor(state); - state->moveTo(patch->x[0][0], patch->y[0][0]); - state->curveTo(patch->x[0][1], patch->y[0][1], - patch->x[0][2], patch->y[0][2], - patch->x[0][3], patch->y[0][3]); - state->curveTo(patch->x[1][3], patch->y[1][3], - patch->x[2][3], patch->y[2][3], - patch->x[3][3], patch->y[3][3]); - state->curveTo(patch->x[3][2], patch->y[3][2], - patch->x[3][1], patch->y[3][1], - patch->x[3][0], patch->y[3][0]); - state->curveTo(patch->x[2][0], patch->y[2][0], - patch->x[1][0], patch->y[1][0], - patch->x[0][0], patch->y[0][0]); - state->closePath(); - out->fill(state); - state->clearPath(); - } else { - for (i = 0; i < 4; ++i) { - xx[i][0] = patch->x[i][0]; - yy[i][0] = patch->y[i][0]; - xx[i][1] = 0.5 * (patch->x[i][0] + patch->x[i][1]); - yy[i][1] = 0.5 * (patch->y[i][0] + patch->y[i][1]); - xxm = 0.5 * (patch->x[i][1] + patch->x[i][2]); - yym = 0.5 * (patch->y[i][1] + patch->y[i][2]); - xx[i][6] = 0.5 * (patch->x[i][2] + patch->x[i][3]); - yy[i][6] = 0.5 * (patch->y[i][2] + patch->y[i][3]); - xx[i][2] = 0.5 * (xx[i][1] + xxm); - yy[i][2] = 0.5 * (yy[i][1] + yym); - xx[i][5] = 0.5 * (xxm + xx[i][6]); - yy[i][5] = 0.5 * (yym + yy[i][6]); - xx[i][3] = xx[i][4] = 0.5 * (xx[i][2] + xx[i][5]); - yy[i][3] = yy[i][4] = 0.5 * (yy[i][2] + yy[i][5]); - xx[i][7] = patch->x[i][3]; - yy[i][7] = patch->y[i][3]; - } - for (i = 0; i < 4; ++i) { - patch00.x[0][i] = xx[0][i]; - patch00.y[0][i] = yy[0][i]; - patch00.x[1][i] = 0.5 * (xx[0][i] + xx[1][i]); - patch00.y[1][i] = 0.5 * (yy[0][i] + yy[1][i]); - xxm = 0.5 * (xx[1][i] + xx[2][i]); - yym = 0.5 * (yy[1][i] + yy[2][i]); - patch10.x[2][i] = 0.5 * (xx[2][i] + xx[3][i]); - patch10.y[2][i] = 0.5 * (yy[2][i] + yy[3][i]); - patch00.x[2][i] = 0.5 * (patch00.x[1][i] + xxm); - patch00.y[2][i] = 0.5 * (patch00.y[1][i] + yym); - patch10.x[1][i] = 0.5 * (xxm + patch10.x[2][i]); - patch10.y[1][i] = 0.5 * (yym + patch10.y[2][i]); - patch00.x[3][i] = 0.5 * (patch00.x[2][i] + patch10.x[1][i]); - patch00.y[3][i] = 0.5 * (patch00.y[2][i] + patch10.y[1][i]); - patch10.x[0][i] = patch00.x[3][i]; - patch10.y[0][i] = patch00.y[3][i]; - patch10.x[3][i] = xx[3][i]; - patch10.y[3][i] = yy[3][i]; - } - for (i = 4; i < 8; ++i) { - patch01.x[0][i-4] = xx[0][i]; - patch01.y[0][i-4] = yy[0][i]; - patch01.x[1][i-4] = 0.5 * (xx[0][i] + xx[1][i]); - patch01.y[1][i-4] = 0.5 * (yy[0][i] + yy[1][i]); - xxm = 0.5 * (xx[1][i] + xx[2][i]); - yym = 0.5 * (yy[1][i] + yy[2][i]); - patch11.x[2][i-4] = 0.5 * (xx[2][i] + xx[3][i]); - patch11.y[2][i-4] = 0.5 * (yy[2][i] + yy[3][i]); - patch01.x[2][i-4] = 0.5 * (patch01.x[1][i-4] + xxm); - patch01.y[2][i-4] = 0.5 * (patch01.y[1][i-4] + yym); - patch11.x[1][i-4] = 0.5 * (xxm + patch11.x[2][i-4]); - patch11.y[1][i-4] = 0.5 * (yym + patch11.y[2][i-4]); - patch01.x[3][i-4] = 0.5 * (patch01.x[2][i-4] + patch11.x[1][i-4]); - patch01.y[3][i-4] = 0.5 * (patch01.y[2][i-4] + patch11.y[1][i-4]); - patch11.x[0][i-4] = patch01.x[3][i-4]; - patch11.y[0][i-4] = patch01.y[3][i-4]; - patch11.x[3][i-4] = xx[3][i]; - patch11.y[3][i-4] = yy[3][i]; - } - for (i = 0; i < patchColorComps; ++i) { - patch00.color[0][0].c[i] = patch->color[0][0].c[i]; - patch00.color[0][1].c[i] = (patch->color[0][0].c[i] + - patch->color[0][1].c[i]) / 2; - patch01.color[0][0].c[i] = patch00.color[0][1].c[i]; - patch01.color[0][1].c[i] = patch->color[0][1].c[i]; - patch01.color[1][1].c[i] = (patch->color[0][1].c[i] + - patch->color[1][1].c[i]) / 2; - patch11.color[0][1].c[i] = patch01.color[1][1].c[i]; - patch11.color[1][1].c[i] = patch->color[1][1].c[i]; - patch11.color[1][0].c[i] = (patch->color[1][1].c[i] + - patch->color[1][0].c[i]) / 2; - patch10.color[1][1].c[i] = patch11.color[1][0].c[i]; - patch10.color[1][0].c[i] = patch->color[1][0].c[i]; - patch10.color[0][0].c[i] = (patch->color[1][0].c[i] + - patch->color[0][0].c[i]) / 2; - patch00.color[1][0].c[i] = patch10.color[0][0].c[i]; - patch00.color[1][1].c[i] = (patch00.color[1][0].c[i] + - patch01.color[1][1].c[i]) / 2; - patch01.color[1][0].c[i] = patch00.color[1][1].c[i]; - patch11.color[0][0].c[i] = patch00.color[1][1].c[i]; - patch10.color[0][1].c[i] = patch00.color[1][1].c[i]; - } - fillPatch(&patch00, colorComps, patchColorComps, refineColorThreshold, depth + 1, shading); - fillPatch(&patch10, colorComps, patchColorComps, refineColorThreshold, depth + 1, shading); - fillPatch(&patch01, colorComps, patchColorComps, refineColorThreshold, depth + 1, shading); - fillPatch(&patch11, colorComps, patchColorComps, refineColorThreshold, depth + 1, shading); - } -} - -void Gfx::doEndPath() { - if (state->isCurPt() && clip != clipNone) { - state->clip(); - if (clip == clipNormal) { - out->clip(state); - } else { - out->eoClip(state); - } - } - clip = clipNone; - state->clearPath(); -} - -//------------------------------------------------------------------------ -// path clipping operators -//------------------------------------------------------------------------ - -void Gfx::opClip(Object args[], int numArgs) { - clip = clipNormal; -} - -void Gfx::opEOClip(Object args[], int numArgs) { - clip = clipEO; -} - -//------------------------------------------------------------------------ -// text object operators -//------------------------------------------------------------------------ - -void Gfx::opBeginText(Object args[], int numArgs) { - out->beginTextObject(state); - state->setTextMat(1, 0, 0, 1, 0, 0); - state->textMoveTo(0, 0); - out->updateTextMat(state); - out->updateTextPos(state); - fontChanged = gTrue; -} - -void Gfx::opEndText(Object args[], int numArgs) { - out->endTextObject(state); -} - -//------------------------------------------------------------------------ -// text state operators -//------------------------------------------------------------------------ - -void Gfx::opSetCharSpacing(Object args[], int numArgs) { - state->setCharSpace(args[0].getNum()); - out->updateCharSpace(state); -} - -void Gfx::opSetFont(Object args[], int numArgs) { - GfxFont *font; - - if (!(font = res->lookupFont(args[0].getName()))) { - // unsetting the font (drawing no text) is better than using the - // previous one and drawing random glyphs from it - state->setFont(nullptr, args[1].getNum()); - fontChanged = gTrue; - return; - } - if (printCommands) { - printf(" font: tag=%s name='%s' %g\n", - font->getTag()->getCString(), - font->getName() ? font->getName()->getCString() : "???", - args[1].getNum()); - fflush(stdout); - } - - font->incRefCnt(); - state->setFont(font, args[1].getNum()); - fontChanged = gTrue; -} - -void Gfx::opSetTextLeading(Object args[], int numArgs) { - state->setLeading(args[0].getNum()); -} - -void Gfx::opSetTextRender(Object args[], int numArgs) { - state->setRender(args[0].getInt()); - out->updateRender(state); -} - -void Gfx::opSetTextRise(Object args[], int numArgs) { - state->setRise(args[0].getNum()); - out->updateRise(state); -} - -void Gfx::opSetWordSpacing(Object args[], int numArgs) { - state->setWordSpace(args[0].getNum()); - out->updateWordSpace(state); -} - -void Gfx::opSetHorizScaling(Object args[], int numArgs) { - state->setHorizScaling(args[0].getNum()); - out->updateHorizScaling(state); - fontChanged = gTrue; -} - -//------------------------------------------------------------------------ -// text positioning operators -//------------------------------------------------------------------------ - -void Gfx::opTextMove(Object args[], int numArgs) { - double tx, ty; - - tx = state->getLineX() + args[0].getNum(); - ty = state->getLineY() + args[1].getNum(); - state->textMoveTo(tx, ty); - out->updateTextPos(state); -} - -void Gfx::opTextMoveSet(Object args[], int numArgs) { - double tx, ty; - - tx = state->getLineX() + args[0].getNum(); - ty = args[1].getNum(); - state->setLeading(-ty); - ty += state->getLineY(); - state->textMoveTo(tx, ty); - out->updateTextPos(state); -} - -void Gfx::opSetTextMatrix(Object args[], int numArgs) { - state->setTextMat(args[0].getNum(), args[1].getNum(), - args[2].getNum(), args[3].getNum(), - args[4].getNum(), args[5].getNum()); - state->textMoveTo(0, 0); - out->updateTextMat(state); - out->updateTextPos(state); - fontChanged = gTrue; -} - -void Gfx::opTextNextLine(Object args[], int numArgs) { - double tx, ty; - - tx = state->getLineX(); - ty = state->getLineY() - state->getLeading(); - state->textMoveTo(tx, ty); - out->updateTextPos(state); -} - -//------------------------------------------------------------------------ -// text string operators -//------------------------------------------------------------------------ - -void Gfx::opShowText(Object args[], int numArgs) { - if (!state->getFont()) { - error(errSyntaxError, getPos(), "No font in show"); - return; - } - if (fontChanged) { - out->updateFont(state); - fontChanged = gFalse; - } - out->beginStringOp(state); - doShowText(args[0].getString()); - out->endStringOp(state); - if (!ocState) { - doIncCharCount(args[0].getString()); - } -} - -void Gfx::opMoveShowText(Object args[], int numArgs) { - double tx, ty; - - if (!state->getFont()) { - error(errSyntaxError, getPos(), "No font in move/show"); - return; - } - if (fontChanged) { - out->updateFont(state); - fontChanged = gFalse; - } - tx = state->getLineX(); - ty = state->getLineY() - state->getLeading(); - state->textMoveTo(tx, ty); - out->updateTextPos(state); - out->beginStringOp(state); - doShowText(args[0].getString()); - out->endStringOp(state); - if (!ocState) { - doIncCharCount(args[0].getString()); - } -} - -void Gfx::opMoveSetShowText(Object args[], int numArgs) { - double tx, ty; - - if (!state->getFont()) { - error(errSyntaxError, getPos(), "No font in move/set/show"); - return; - } - if (fontChanged) { - out->updateFont(state); - fontChanged = gFalse; - } - state->setWordSpace(args[0].getNum()); - state->setCharSpace(args[1].getNum()); - tx = state->getLineX(); - ty = state->getLineY() - state->getLeading(); - state->textMoveTo(tx, ty); - out->updateWordSpace(state); - out->updateCharSpace(state); - out->updateTextPos(state); - out->beginStringOp(state); - doShowText(args[2].getString()); - out->endStringOp(state); - if (ocState) { - doIncCharCount(args[2].getString()); - } -} - -void Gfx::opShowSpaceText(Object args[], int numArgs) { - Array *a; - int wMode; - int i; - - if (!state->getFont()) { - error(errSyntaxError, getPos(), "No font in show/space"); - return; - } - if (fontChanged) { - out->updateFont(state); - fontChanged = gFalse; - } - out->beginStringOp(state); - wMode = state->getFont()->getWMode(); - a = args[0].getArray(); - for (i = 0; i < a->getLength(); ++i) { - Object obj = a->get(i); - if (obj.isNum()) { - // this uses the absolute value of the font size to match - // Acrobat's behavior - if (wMode) { - state->textShift(0, -obj.getNum() * 0.001 * - state->getFontSize()); - } else { - state->textShift(-obj.getNum() * 0.001 * - state->getFontSize() * - state->getHorizScaling(), 0); - } - out->updateTextShift(state, obj.getNum()); - } else if (obj.isString()) { - doShowText(obj.getString()); - } else { - error(errSyntaxError, getPos(), - "Element of show/space array must be number or string"); - } - } - out->endStringOp(state); - if (!ocState) { - a = args[0].getArray(); - for (i = 0; i < a->getLength(); ++i) { - Object obj = a->get(i); - if (obj.isString()) { - doIncCharCount(obj.getString()); - } - } - } -} - -void Gfx::doShowText(const GooString *s) { - GfxFont *font; - int wMode; - double riseX, riseY; - CharCode code; - Unicode *u = nullptr; - double x, y, dx, dy, dx2, dy2, curX, curY, tdx, tdy, ddx, ddy; - double originX, originY, tOriginX, tOriginY; - double x0, y0, x1, y1; - double oldCTM[6], newCTM[6]; - double *mat; - Dict *resDict; - Parser *oldParser; - GfxState *savedState; - const char *p; - int render; - GBool patternFill; - int len, n, uLen, nChars, nSpaces, i; - - font = state->getFont(); - wMode = font->getWMode(); - - if (out->useDrawChar()) { - out->beginString(state, s); - } - - // if we're doing a pattern fill, set up clipping - render = state->getRender(); - if (!(render & 1) && - state->getFillColorSpace()->getMode() == csPattern) { - patternFill = gTrue; - saveState(); - // disable fill, enable clipping, leave stroke unchanged - if ((render ^ (render >> 1)) & 1) { - render = 5; - } else { - render = 7; - } - state->setRender(render); - out->updateRender(state); - } else { - patternFill = gFalse; - } - - state->textTransformDelta(0, state->getRise(), &riseX, &riseY); - x0 = state->getCurX() + riseX; - y0 = state->getCurY() + riseY; - - // handle a Type 3 char - if (font->getType() == fontType3 && out->interpretType3Chars()) { - mat = state->getCTM(); - for (i = 0; i < 6; ++i) { - oldCTM[i] = mat[i]; - } - mat = state->getTextMat(); - newCTM[0] = mat[0] * oldCTM[0] + mat[1] * oldCTM[2]; - newCTM[1] = mat[0] * oldCTM[1] + mat[1] * oldCTM[3]; - newCTM[2] = mat[2] * oldCTM[0] + mat[3] * oldCTM[2]; - newCTM[3] = mat[2] * oldCTM[1] + mat[3] * oldCTM[3]; - mat = font->getFontMatrix(); - newCTM[0] = mat[0] * newCTM[0] + mat[1] * newCTM[2]; - newCTM[1] = mat[0] * newCTM[1] + mat[1] * newCTM[3]; - newCTM[2] = mat[2] * newCTM[0] + mat[3] * newCTM[2]; - newCTM[3] = mat[2] * newCTM[1] + mat[3] * newCTM[3]; - newCTM[0] *= state->getFontSize(); - newCTM[1] *= state->getFontSize(); - newCTM[2] *= state->getFontSize(); - newCTM[3] *= state->getFontSize(); - newCTM[0] *= state->getHorizScaling(); - newCTM[2] *= state->getHorizScaling(); - curX = state->getCurX(); - curY = state->getCurY(); - oldParser = parser; - p = s->getCString(); - len = s->getLength(); - while (len > 0) { - n = font->getNextChar(p, len, &code, - &u, &uLen, - &dx, &dy, &originX, &originY); - dx = dx * state->getFontSize() + state->getCharSpace(); - if (n == 1 && *p == ' ') { - dx += state->getWordSpace(); - } - dx *= state->getHorizScaling(); - dy *= state->getFontSize(); - state->textTransformDelta(dx, dy, &tdx, &tdy); - state->transform(curX + riseX, curY + riseY, &x, &y); - savedState = saveStateStack(); - state->setCTM(newCTM[0], newCTM[1], newCTM[2], newCTM[3], x, y); - //~ the CTM concat values here are wrong (but never used) - out->updateCTM(state, 1, 0, 0, 1, 0, 0); - state->transformDelta(dx, dy, &ddx, &ddy); - if (!out->beginType3Char(state, curX + riseX, curY + riseY, ddx, ddy, - code, u, uLen)) { - Object charProc = ((Gfx8BitFont *)font)->getCharProcNF(code); - int refNum = -1; - if (charProc.isRef()) { - refNum = charProc.getRef().num; - charProc = charProc.fetch(((Gfx8BitFont *)font)->getCharProcs()->getXRef()); - } - if ((resDict = ((Gfx8BitFont *)font)->getResources())) { - pushResources(resDict); - } - if (charProc.isStream()) { - std::set<int>::iterator charProcDrawingIt; - bool displayCharProc = true; - if (refNum != -1) { - if (charProcDrawing.find(refNum) == charProcDrawing.end()) { - charProcDrawingIt = charProcDrawing.insert(refNum).first; - } else { - displayCharProc = false; - error(errSyntaxError, -1, "CharProc wants to draw a CharProc that is already beign drawn"); - } - } - if (displayCharProc) { - display(&charProc, gFalse); - - if (refNum != -1) { - charProcDrawing.erase(charProcDrawingIt); - } - } - } else { - error(errSyntaxError, getPos(), "Missing or bad Type3 CharProc entry"); - } - out->endType3Char(state); - if (resDict) { - popResources(); - } - } - restoreStateStack(savedState); - // GfxState::restore() does *not* restore the current position, - // so we deal with it here using (curX, curY) and (lineX, lineY) - curX += tdx; - curY += tdy; - state->moveTo(curX, curY); - out->updateCTM(state, 0, 0, 0, 0, 0, 0); - p += n; - len -= n; - } - parser = oldParser; - - } else if (out->useDrawChar()) { - p = s->getCString(); - len = s->getLength(); - while (len > 0) { - n = font->getNextChar(p, len, &code, - &u, &uLen, - &dx, &dy, &originX, &originY); - if (wMode) { - dx *= state->getFontSize(); - dy = dy * state->getFontSize() + state->getCharSpace(); - if (n == 1 && *p == ' ') { - dy += state->getWordSpace(); - } - } else { - dx = dx * state->getFontSize() + state->getCharSpace(); - if (n == 1 && *p == ' ') { - dx += state->getWordSpace(); - } - dx *= state->getHorizScaling(); - dy *= state->getFontSize(); - } - state->textTransformDelta(dx, dy, &tdx, &tdy); - originX *= state->getFontSize(); - originY *= state->getFontSize(); - state->textTransformDelta(originX, originY, &tOriginX, &tOriginY); - if (ocState) - out->drawChar(state, state->getCurX() + riseX, state->getCurY() + riseY, - tdx, tdy, tOriginX, tOriginY, code, n, u, uLen); - state->shift(tdx, tdy); - p += n; - len -= n; - } - } else { - dx = dy = 0; - p = s->getCString(); - len = s->getLength(); - nChars = nSpaces = 0; - while (len > 0) { - n = font->getNextChar(p, len, &code, - &u, &uLen, - &dx2, &dy2, &originX, &originY); - dx += dx2; - dy += dy2; - if (n == 1 && *p == ' ') { - ++nSpaces; - } - ++nChars; - p += n; - len -= n; - } - if (wMode) { - dx *= state->getFontSize(); - dy = dy * state->getFontSize() - + nChars * state->getCharSpace() - + nSpaces * state->getWordSpace(); - } else { - dx = dx * state->getFontSize() - + nChars * state->getCharSpace() - + nSpaces * state->getWordSpace(); - dx *= state->getHorizScaling(); - dy *= state->getFontSize(); - } - state->textTransformDelta(dx, dy, &tdx, &tdy); - if (ocState) - out->drawString(state, s); - state->shift(tdx, tdy); - } - - if (out->useDrawChar()) { - out->endString(state); - } - - if (patternFill && ocState) { - out->saveTextPos(state); - // tell the OutputDev to do the clipping - out->endTextObject(state); - // set up a clipping bbox so doPatternText will work -- assume - // that the text bounding box does not extend past the baseline in - // any direction by more than twice the font size - x1 = state->getCurX() + riseX; - y1 = state->getCurY() + riseY; - if (x0 > x1) { - x = x0; x0 = x1; x1 = x; - } - if (y0 > y1) { - y = y0; y0 = y1; y1 = y; - } - state->textTransformDelta(0, state->getFontSize(), &dx, &dy); - state->textTransformDelta(state->getFontSize(), 0, &dx2, &dy2); - dx = fabs(dx); - dx2 = fabs(dx2); - if (dx2 > dx) { - dx = dx2; - } - dy = fabs(dy); - dy2 = fabs(dy2); - if (dy2 > dy) { - dy = dy2; - } - state->clipToRect(x0 - 2 * dx, y0 - 2 * dy, x1 + 2 * dx, y1 + 2 * dy); - // set render mode to fill-only - state->setRender(0); - out->updateRender(state); - doPatternText(); - restoreState(); - out->restoreTextPos(state); - } - - updateLevel += 10 * s->getLength(); -} - -// NB: this is only called when ocState is false. -void Gfx::doIncCharCount(const GooString *s) { - if (out->needCharCount()) { - out->incCharCount(s->getLength()); - } -} - -//------------------------------------------------------------------------ -// XObject operators -//------------------------------------------------------------------------ - -void Gfx::opXObject(Object args[], int numArgs) { - const char *name; - - if (!ocState && !out->needCharCount()) { - return; - } - name = args[0].getName(); - Object obj1 = res->lookupXObject(name); - if (obj1.isNull()) { - return; - } - if (!obj1.isStream()) { - error(errSyntaxError, getPos(), "XObject '{0:s}' is wrong type", name); - return; - } - -#ifdef OPI_SUPPORT - Object opiDict = obj1.streamGetDict()->lookup("OPI"); - if (opiDict.isDict()) { - out->opiBegin(state, opiDict.getDict()); - } -#endif - Object obj2 = obj1.streamGetDict()->lookup("Subtype"); - if (obj2.isName("Image")) { - if (out->needNonText()) { - Object refObj = res->lookupXObjectNF(name); - doImage(&refObj, obj1.getStream(), gFalse); - } - } else if (obj2.isName("Form")) { - Object refObj = res->lookupXObjectNF(name); - GBool shouldDoForm = gTrue; - std::set<int>::iterator drawingFormIt; - if (refObj.isRef()) { - const int num = refObj.getRef().num; - if (formsDrawing.find(num) == formsDrawing.end()) { - drawingFormIt = formsDrawing.insert(num).first; - } else { - shouldDoForm = gFalse; - } - } - if (shouldDoForm) { - if (out->useDrawForm() && refObj.isRef()) { - out->drawForm(refObj.getRef()); - } else { - doForm(&obj1); - } - } - if (refObj.isRef() && shouldDoForm) { - formsDrawing.erase(drawingFormIt); - } - } else if (obj2.isName("PS")) { - Object obj3 = obj1.streamGetDict()->lookup("Level1"); - out->psXObject(obj1.getStream(), - obj3.isStream() ? obj3.getStream() : (Stream *)nullptr); - } else if (obj2.isName()) { - error(errSyntaxError, getPos(), "Unknown XObject subtype '{0:s}'", obj2.getName()); - } else { - error(errSyntaxError, getPos(), "XObject subtype is missing or wrong type"); - } -#ifdef OPI_SUPPORT - if (opiDict.isDict()) { - out->opiEnd(state, opiDict.getDict()); - } -#endif -} - -void Gfx::doImage(Object *ref, Stream *str, GBool inlineImg) { - Dict *dict, *maskDict; - int width, height; - int bits, maskBits; - GBool interpolate; - StreamColorSpaceMode csMode; - GBool mask; - GBool invert; - GfxColorSpace *colorSpace, *maskColorSpace; - GBool haveColorKeyMask, haveExplicitMask, haveSoftMask; - int maskColors[2*gfxColorMaxComps]; - int maskWidth, maskHeight; - GBool maskInvert; - GBool maskInterpolate; - Stream *maskStr; - Object obj1; - int i, n; - - // get info from the stream - bits = 0; - csMode = streamCSNone; - str->getImageParams(&bits, &csMode); - - // get stream dict - dict = str->getDict(); - - // check for optional content key - if (ref) { - obj1 = dict->lookupNF("OC"); - if (catalog->getOptContentConfig() && !catalog->getOptContentConfig()->optContentIsVisible(&obj1)) { - return; - } - } - - // get size - obj1 = dict->lookup("Width"); - if (obj1.isNull()) { - obj1 = dict->lookup("W"); - } - if (obj1.isInt()) - width = obj1.getInt(); - else if (obj1.isReal()) - width = (int)obj1.getReal(); - else - goto err1; - obj1 = dict->lookup("Height"); - if (obj1.isNull()) { - obj1 = dict->lookup("H"); - } - if (obj1.isInt()) - height = obj1.getInt(); - else if (obj1.isReal()) - height = (int)obj1.getReal(); - else - goto err1; - - if (width < 1 || height < 1) - goto err1; - - // image interpolation - obj1 = dict->lookup("Interpolate"); - if (obj1.isNull()) { - obj1 = dict->lookup("I"); - } - if (obj1.isBool()) - interpolate = obj1.getBool(); - else - interpolate = gFalse; - maskInterpolate = gFalse; - - // image or mask? - obj1 = dict->lookup("ImageMask"); - if (obj1.isNull()) { - obj1 = dict->lookup("IM"); - } - mask = gFalse; - if (obj1.isBool()) - mask = obj1.getBool(); - else if (!obj1.isNull()) - goto err1; - - // bit depth - if (bits == 0) { - obj1 = dict->lookup("BitsPerComponent"); - if (obj1.isNull()) { - obj1 = dict->lookup("BPC"); - } - if (obj1.isInt()) { - bits = obj1.getInt(); - } else if (mask) { - bits = 1; - } else { - goto err1; - } - } - - // display a mask - if (mask) { - - // check for inverted mask - if (bits != 1) - goto err1; - invert = gFalse; - obj1 = dict->lookup("Decode"); - if (obj1.isNull()) { - obj1 = dict->lookup("D"); - } - if (obj1.isArray()) { - Object obj2; - obj2 = obj1.arrayGet(0); - // Table 4.39 says /Decode must be [1 0] or [0 1]. Adobe - // accepts [1.0 0.0] as well. - if (obj2.isNum() && obj2.getNum() >= 0.9) - invert = gTrue; - } else if (!obj1.isNull()) { - goto err1; - } - - // if drawing is disabled, skip over inline image data - if (!ocState || !out->needNonText()) { - str->reset(); - n = height * ((width + 7) / 8); - for (i = 0; i < n; ++i) { - str->getChar(); - } - str->close(); - - // draw it - } else { - if (state->getFillColorSpace()->getMode() == csPattern) { - doPatternImageMask(ref, str, width, height, invert, inlineImg); - } else { - out->drawImageMask(state, ref, str, width, height, invert, interpolate, inlineImg); - } - } - } else { - if (bits == 0) { - goto err1; - } - - // get color space and color map - obj1 = dict->lookup("ColorSpace"); - if (obj1.isNull()) { - obj1 = dict->lookup("CS"); - } - if (obj1.isName() && inlineImg) { - Object obj2 = res->lookupColorSpace(obj1.getName()); - if (!obj2.isNull()) { - obj1 = std::move(obj2); - } - } - if (!obj1.isNull()) { - char *tempIntent = nullptr; - Object objIntent = dict->lookup("Intent"); - if (objIntent.isName()) { - tempIntent = state->getRenderingIntent(); - if (tempIntent != nullptr) { - tempIntent = strdup(tempIntent); - } - state->setRenderingIntent(objIntent.getName()); - } - colorSpace = GfxColorSpace::parse(res, &obj1, out, state); - if (objIntent.isName()) { - state->setRenderingIntent(tempIntent); - free(tempIntent); - } - } else if (csMode == streamCSDeviceGray) { - Object objCS = res->lookupColorSpace("DefaultGray"); - if (objCS.isNull()) { - colorSpace = new GfxDeviceGrayColorSpace(); - } else { - colorSpace = GfxColorSpace::parse(res, &objCS, out, state); - } - } else if (csMode == streamCSDeviceRGB) { - Object objCS = res->lookupColorSpace("DefaultRGB"); - if (objCS.isNull()) { - colorSpace = new GfxDeviceRGBColorSpace(); - } else { - colorSpace = GfxColorSpace::parse(res, &objCS, out, state); - } - } else if (csMode == streamCSDeviceCMYK) { - Object objCS = res->lookupColorSpace("DefaultCMYK"); - if (objCS.isNull()) { - colorSpace = new GfxDeviceCMYKColorSpace(); - } else { - colorSpace = GfxColorSpace::parse(res, &objCS, out, state); - } - } else { - colorSpace = nullptr; - } - if (!colorSpace) { - goto err1; - } - obj1 = dict->lookup("Decode"); - if (obj1.isNull()) { - obj1 = dict->lookup("D"); - } - GfxImageColorMap colorMap(bits, &obj1, colorSpace); - if (!colorMap.isOk()) { - goto err1; - } - - // get the mask - haveColorKeyMask = haveExplicitMask = haveSoftMask = gFalse; - maskStr = nullptr; // make gcc happy - maskWidth = maskHeight = 0; // make gcc happy - maskInvert = gFalse; // make gcc happy - std::unique_ptr<GfxImageColorMap> maskColorMap; - Object maskObj = dict->lookup("Mask"); - Object smaskObj = dict->lookup("SMask"); - if (smaskObj.isStream()) { - // soft mask - if (inlineImg) { - goto err1; - } - maskStr = smaskObj.getStream(); - maskDict = smaskObj.streamGetDict(); - obj1 = maskDict->lookup("Width"); - if (obj1.isNull()) { - obj1 = maskDict->lookup("W"); - } - if (!obj1.isInt()) { - goto err1; - } - maskWidth = obj1.getInt(); - obj1 = maskDict->lookup("Height"); - if (obj1.isNull()) { - obj1 = maskDict->lookup("H"); - } - if (!obj1.isInt()) { - goto err1; - } - maskHeight = obj1.getInt(); - obj1 = maskDict->lookup("Interpolate"); - if (obj1.isNull()) { - obj1 = maskDict->lookup("I"); - } - if (obj1.isBool()) - maskInterpolate = obj1.getBool(); - else - maskInterpolate = gFalse; - obj1 = maskDict->lookup("BitsPerComponent"); - if (obj1.isNull()) { - obj1 = maskDict->lookup("BPC"); - } - if (!obj1.isInt()) { - goto err1; - } - maskBits = obj1.getInt(); - obj1 = maskDict->lookup("ColorSpace"); - if (obj1.isNull()) { - obj1 = maskDict->lookup("CS"); - } - if (obj1.isName()) { - Object obj2 = res->lookupColorSpace(obj1.getName()); - if (!obj2.isNull()) { - obj1 = std::move(obj2); - } - } - maskColorSpace = GfxColorSpace::parse(nullptr, &obj1, out, state); - if (!maskColorSpace || maskColorSpace->getMode() != csDeviceGray) { - delete maskColorSpace; - goto err1; - } - obj1 = maskDict->lookup("Decode"); - if (obj1.isNull()) { - obj1 = maskDict->lookup("D"); - } - maskColorMap.reset(new GfxImageColorMap(maskBits, &obj1, maskColorSpace)); - if (!maskColorMap->isOk()) { - goto err1; - } - // handle the Matte entry - obj1 = maskDict->lookup("Matte"); - if (obj1.isArray()) { - if (obj1.getArray()->getLength() != colorSpace->getNComps()) { - error(errSyntaxError, -1, "Matte entry should have {0:d} components but has {1:d}", - colorSpace->getNComps(), obj1.getArray()->getLength()); - } else if (maskWidth != width || maskHeight != height) { - error(errSyntaxError, -1, "Softmask with matte entry {0:d} x {1:d} must have same geometry as the image {2:d} x {3:d}", - maskWidth, maskHeight, width, height); - } else { - GfxColor matteColor; - for (i = 0; i < colorSpace->getNComps(); i++) { - Object obj2 = obj1.getArray()->get(i); - if (!obj2.isNum()) { - error(errSyntaxError, -1, "Matte entry {0:d} should be a number but it's of type {1:d}", i, obj2.getType()); - - break; - } - matteColor.c[i] = dblToCol(obj2.getNum()); - } - if (i == colorSpace->getNComps()) { - maskColorMap->setMatteColor(&matteColor); - } - } - } - haveSoftMask = gTrue; - } else if (maskObj.isArray()) { - // color key mask - for (i = 0; - i < maskObj.arrayGetLength() && i < 2*gfxColorMaxComps; - ++i) { - obj1 = maskObj.arrayGet(i); - if (obj1.isInt()) { - maskColors[i] = obj1.getInt(); - } else if (obj1.isReal()) { - error(errSyntaxError, -1, "Mask entry should be an integer but it's a real, trying to use it"); - maskColors[i] = (int) obj1.getReal(); - } else { - error(errSyntaxError, -1, "Mask entry should be an integer but it's of type {0:d}", obj1.getType()); - goto err1; - } - } - haveColorKeyMask = gTrue; - } else if (maskObj.isStream()) { - // explicit mask - if (inlineImg) { - goto err1; - } - maskStr = maskObj.getStream(); - maskDict = maskObj.streamGetDict(); - obj1 = maskDict->lookup("Width"); - if (obj1.isNull()) { - obj1 = maskDict->lookup("W"); - } - if (!obj1.isInt()) { - goto err1; - } - maskWidth = obj1.getInt(); - obj1 = maskDict->lookup("Height"); - if (obj1.isNull()) { - obj1 = maskDict->lookup("H"); - } - if (!obj1.isInt()) { - goto err1; - } - maskHeight = obj1.getInt(); - obj1 = maskDict->lookup("Interpolate"); - if (obj1.isNull()) { - obj1 = maskDict->lookup("I"); - } - if (obj1.isBool()) - maskInterpolate = obj1.getBool(); - else - maskInterpolate = gFalse; - obj1 = maskDict->lookup("ImageMask"); - if (obj1.isNull()) { - obj1 = maskDict->lookup("IM"); - } - if (!obj1.isBool() || !obj1.getBool()) { - goto err1; - } - maskInvert = gFalse; - obj1 = maskDict->lookup("Decode"); - if (obj1.isNull()) { - obj1 = maskDict->lookup("D"); - } - if (obj1.isArray()) { - Object obj2 = obj1.arrayGet(0); - // Table 4.39 says /Decode must be [1 0] or [0 1]. Adobe - // accepts [1.0 0.0] as well. - if (obj2.isNum() && obj2.getNum() >= 0.9) { - maskInvert = gTrue; - } - } else if (!obj1.isNull()) { - goto err1; - } - haveExplicitMask = gTrue; - } - - // if drawing is disabled, skip over inline image data - if (!ocState || !out->needNonText()) { - str->reset(); - n = height * ((width * colorMap.getNumPixelComps() * - colorMap.getBits() + 7) / 8); - for (i = 0; i < n; ++i) { - str->getChar(); - } - str->close(); - - // draw it - } else { - if (haveSoftMask) { - out->drawSoftMaskedImage(state, ref, str, width, height, &colorMap, interpolate, - maskStr, maskWidth, maskHeight, maskColorMap.get(), maskInterpolate); - } else if (haveExplicitMask) { - out->drawMaskedImage(state, ref, str, width, height, &colorMap, interpolate, - maskStr, maskWidth, maskHeight, maskInvert, maskInterpolate); - } else { - out->drawImage(state, ref, str, width, height, &colorMap, interpolate, - haveColorKeyMask ? maskColors : (int *)nullptr, inlineImg); - } - } - } - - if ((i = width * height) > 1000) { - i = 1000; - } - updateLevel += i; - - return; - - err1: - error(errSyntaxError, getPos(), "Bad image parameters"); -} - -GBool Gfx::checkTransparencyGroup(Dict *resDict) { - // check the effect of compositing objects as a group: - // look for ExtGState entries with ca != 1 or CA != 1 or BM != normal - GBool transpGroup = gFalse; - double opac; - - if (resDict == nullptr) - return gFalse; - pushResources(resDict); - Object extGStates = resDict->lookup("ExtGState"); - if (extGStates.isDict()) { - Dict *dict = extGStates.getDict(); - for (int i = 0; i < dict->getLength() && !transpGroup; i++) { - GfxBlendMode mode; - - Object obj1 = res->lookupGState(dict->getKey(i)); - if (obj1.isDict()) { - Object obj2 = obj1.dictLookup("BM"); - if (!obj2.isNull()) { - if (state->parseBlendMode(&obj2, &mode)) { - if (mode != gfxBlendNormal) - transpGroup = gTrue; - } else { - error(errSyntaxError, getPos(), "Invalid blend mode in ExtGState"); - } - } - obj2 = obj1.dictLookup("ca"); - if (obj2.isNum()) { - opac = obj2.getNum(); - opac = opac < 0 ? 0 : opac > 1 ? 1 : opac; - if (opac != 1) - transpGroup = gTrue; - } - obj2 = obj1.dictLookup("CA"); - if (obj2.isNum()) { - opac = obj2.getNum(); - opac = opac < 0 ? 0 : opac > 1 ? 1 : opac; - if (opac != 1) - transpGroup = gTrue; - } - // alpha is shape - obj2 = obj1.dictLookup("AIS"); - if (!transpGroup && obj2.isBool()) { - transpGroup = obj2.getBool(); - } - // soft mask - obj2 = obj1.dictLookup("SMask"); - if (!transpGroup && !obj2.isNull()) { - if (!obj2.isName("None")) { - transpGroup = gTrue; - } - } - } - } - } - popResources(); - return transpGroup; -} - -void Gfx::doForm(Object *str) { - Dict *dict; - GBool transpGroup, isolated, knockout; - GfxColorSpace *blendingColorSpace; - double m[6], bbox[4]; - Dict *resDict; - GBool ocSaved; - Object obj1; - int i; - - // check for excessive recursion - if (formDepth > 100) { - return; - } - - // get stream dict - dict = str->streamGetDict(); - - // check form type - obj1 = dict->lookup("FormType"); - if (!(obj1.isNull() || (obj1.isInt() && obj1.getInt() == 1))) { - error(errSyntaxError, getPos(), "Unknown form type"); - } - - // check for optional content key - ocSaved = ocState; - obj1 = dict->lookupNF("OC"); - if (catalog->getOptContentConfig() && !catalog->getOptContentConfig()->optContentIsVisible(&obj1)) { - if (out->needCharCount()) { - ocState = gFalse; - } else { - return; - } - } - - // get bounding box - Object bboxObj = dict->lookup("BBox"); - if (!bboxObj.isArray()) { - error(errSyntaxError, getPos(), "Bad form bounding box"); - ocState = ocSaved; - return; - } - for (i = 0; i < 4; ++i) { - obj1 = bboxObj.arrayGet(i); - if (likely(obj1.isNum())) { - bbox[i] = obj1.getNum(); - } else { - error(errSyntaxError, getPos(), "Bad form bounding box value"); - return; - } - } - - // get matrix - Object matrixObj = dict->lookup("Matrix"); - if (matrixObj.isArray()) { - for (i = 0; i < 6; ++i) { - obj1 = matrixObj.arrayGet(i); - if (likely(obj1.isNum())) m[i] = obj1.getNum(); - else m[i] = 0; - } - } else { - m[0] = 1; m[1] = 0; - m[2] = 0; m[3] = 1; - m[4] = 0; m[5] = 0; - } - - // get resources - Object resObj = dict->lookup("Resources"); - resDict = resObj.isDict() ? resObj.getDict() : (Dict *)nullptr; - - // check for a transparency group - transpGroup = isolated = knockout = gFalse; - blendingColorSpace = nullptr; - obj1 = dict->lookup("Group"); - if (obj1.isDict()) { - Object obj2 = obj1.dictLookup("S"); - if (obj2.isName("Transparency")) { - Object obj3 = obj1.dictLookup("CS"); - if (!obj3.isNull()) { - blendingColorSpace = GfxColorSpace::parse(res, &obj3, out, state); - } - obj3 = obj1.dictLookup("I"); - if (obj3.isBool()) { - isolated = obj3.getBool(); - } - obj3 = obj1.dictLookup("K"); - if (obj3.isBool()) { - knockout = obj3.getBool(); - } - transpGroup = isolated || out->checkTransparencyGroup(state, knockout) || checkTransparencyGroup(resDict); - } - } - - // draw it - ++formDepth; - drawForm(str, resDict, m, bbox, - transpGroup, gFalse, blendingColorSpace, isolated, knockout); - --formDepth; - - if (blendingColorSpace) { - delete blendingColorSpace; - } - - ocState = ocSaved; -} - -void Gfx::drawForm(Object *str, Dict *resDict, double *matrix, double *bbox, - GBool transpGroup, GBool softMask, - GfxColorSpace *blendingColorSpace, - GBool isolated, GBool knockout, - GBool alpha, Function *transferFunc, - GfxColor *backdropColor) { - Parser *oldParser; - GfxState *savedState; - double oldBaseMatrix[6]; - int i; - - // push new resources on stack - pushResources(resDict); - - // save current graphics state - savedState = saveStateStack(); - - // kill any pre-existing path - state->clearPath(); - - // save current parser - oldParser = parser; - - // set form transformation matrix - state->concatCTM(matrix[0], matrix[1], matrix[2], - matrix[3], matrix[4], matrix[5]); - out->updateCTM(state, matrix[0], matrix[1], matrix[2], - matrix[3], matrix[4], matrix[5]); - - // set form bounding box - state->moveTo(bbox[0], bbox[1]); - state->lineTo(bbox[2], bbox[1]); - state->lineTo(bbox[2], bbox[3]); - state->lineTo(bbox[0], bbox[3]); - state->closePath(); - state->clip(); - out->clip(state); - state->clearPath(); - - if (softMask || transpGroup) { - if (state->getBlendMode() != gfxBlendNormal) { - state->setBlendMode(gfxBlendNormal); - out->updateBlendMode(state); - } - if (state->getFillOpacity() != 1) { - state->setFillOpacity(1); - out->updateFillOpacity(state); - } - if (state->getStrokeOpacity() != 1) { - state->setStrokeOpacity(1); - out->updateStrokeOpacity(state); - } - out->clearSoftMask(state); - out->beginTransparencyGroup(state, bbox, blendingColorSpace, - isolated, knockout, softMask); - } - - // set new base matrix - for (i = 0; i < 6; ++i) { - oldBaseMatrix[i] = baseMatrix[i]; - baseMatrix[i] = state->getCTM()[i]; - } - - GfxState *stateBefore = state; - - // draw the form - display(str, gFalse); - - if (stateBefore != state) { - if (state->isParentState(stateBefore)) { - error(errSyntaxError, -1, "There's a form with more q than Q, trying to fix"); - while (stateBefore != state) { - restoreState(); - } - } else { - error(errSyntaxError, -1, "There's a form with more Q than q"); - } - } - - if (softMask || transpGroup) { - out->endTransparencyGroup(state); - } - - // restore base matrix - for (i = 0; i < 6; ++i) { - baseMatrix[i] = oldBaseMatrix[i]; - } - - // restore parser - parser = oldParser; - - // restore graphics state - restoreStateStack(savedState); - - // pop resource stack - popResources(); - - if (softMask) { - out->setSoftMask(state, bbox, alpha, transferFunc, backdropColor); - } else if (transpGroup) { - out->paintTransparencyGroup(state, bbox); - } - - return; -} - -//------------------------------------------------------------------------ -// in-line image operators -//------------------------------------------------------------------------ - -void Gfx::opBeginImage(Object args[], int numArgs) { - Stream *str; - int c1, c2; - - // NB: this function is run even if ocState is false -- doImage() is - // responsible for skipping over the inline image data - - // build dict/stream - str = buildImageStream(); - - // display the image - if (str) { - doImage(nullptr, str, gTrue); - - // skip 'EI' tag - c1 = str->getUndecodedStream()->getChar(); - c2 = str->getUndecodedStream()->getChar(); - while (!(c1 == 'E' && c2 == 'I') && c2 != EOF) { - c1 = c2; - c2 = str->getUndecodedStream()->getChar(); - } - delete str; - } -} - -Stream *Gfx::buildImageStream() { - char *key; - Stream *str; - - // build dictionary - Object dict(new Dict(xref)); - Object obj = parser->getObj(); - while (!obj.isCmd("ID") && !obj.isEOF()) { - if (!obj.isName()) { - error(errSyntaxError, getPos(), "Inline image dictionary key must be a name object"); - } else { - key = copyString(obj.getName()); - obj = parser->getObj(); - if (obj.isEOF() || obj.isError()) { - gfree(key); - break; - } - dict.dictAdd(key, std::move(obj)); - } - obj = parser->getObj(); - } - if (obj.isEOF()) { - error(errSyntaxError, getPos(), "End of file in inline image"); - return nullptr; - } - - // make stream - if (parser->getStream()) { - str = new EmbedStream(parser->getStream(), std::move(dict), gFalse, 0, gTrue); - str = str->addFilters(str->getDict()); - } else { - str = nullptr; - } - - return str; -} - -void Gfx::opImageData(Object args[], int numArgs) { - error(errInternal, getPos(), "Got 'ID' operator"); -} - -void Gfx::opEndImage(Object args[], int numArgs) { - error(errInternal, getPos(), "Got 'EI' operator"); -} - -//------------------------------------------------------------------------ -// type 3 font operators -//------------------------------------------------------------------------ - -void Gfx::opSetCharWidth(Object args[], int numArgs) { - out->type3D0(state, args[0].getNum(), args[1].getNum()); -} - -void Gfx::opSetCacheDevice(Object args[], int numArgs) { - out->type3D1(state, args[0].getNum(), args[1].getNum(), - args[2].getNum(), args[3].getNum(), - args[4].getNum(), args[5].getNum()); -} - -//------------------------------------------------------------------------ -// compatibility operators -//------------------------------------------------------------------------ - -void Gfx::opBeginIgnoreUndef(Object args[], int numArgs) { - ++ignoreUndef; -} - -void Gfx::opEndIgnoreUndef(Object args[], int numArgs) { - if (ignoreUndef > 0) - --ignoreUndef; -} - -//------------------------------------------------------------------------ -// marked content operators -//------------------------------------------------------------------------ - -enum GfxMarkedContentKind { - gfxMCOptionalContent, - gfxMCActualText, - gfxMCOther -}; - -struct MarkedContentStack { - GfxMarkedContentKind kind; - GBool ocSuppressed; // are we ignoring content based on OptionalContent? - MarkedContentStack *next; // next object on stack -}; - -void Gfx::popMarkedContent() { - MarkedContentStack *mc = mcStack; - mcStack = mc->next; - delete mc; -} - -void Gfx::pushMarkedContent() { - MarkedContentStack *mc = new MarkedContentStack(); - mc->ocSuppressed = gFalse; - mc->kind = gfxMCOther; - mc->next = mcStack; - mcStack = mc; -} - -GBool Gfx::contentIsHidden() { - MarkedContentStack *mc = mcStack; - bool hidden = mc && mc->ocSuppressed; - while (!hidden && mc && mc->next) { - mc = mc->next; - hidden = mc->ocSuppressed; - } - return hidden; -} - -void Gfx::opBeginMarkedContent(Object args[], int numArgs) { - // push a new stack entry - pushMarkedContent(); - - OCGs *contentConfig = catalog->getOptContentConfig(); - const char* name0 = args[0].getName(); - if ( strncmp( name0, "OC", 2) == 0 && contentConfig) { - if ( numArgs >= 2 ) { - if (args[1].isName()) { - const char* name1 = args[1].getName(); - MarkedContentStack *mc = mcStack; - mc->kind = gfxMCOptionalContent; - Object markedContent = res->lookupMarkedContentNF( name1 ); - if (!markedContent.isNull()) { - bool visible = contentConfig->optContentIsVisible(&markedContent); - mc->ocSuppressed = !(visible); - } else { - error(errSyntaxError, getPos(), "DID NOT find {0:s}", name1); - } - } else { - error(errSyntaxError, getPos(), "Unexpected MC Type: {0:d}", args[1].getType()); - } - } else { - error(errSyntaxError, getPos(), "insufficient arguments for Marked Content"); - } - } else if (args[0].isName("Span") && numArgs == 2 && args[1].isDict()) { - Object obj = args[1].dictLookup("ActualText"); - if (obj.isString()) { - out->beginActualText(state, obj.getString()); - MarkedContentStack *mc = mcStack; - mc->kind = gfxMCActualText; - } - } - - if (printCommands) { - printf(" marked content: %s ", args[0].getName()); - if (numArgs == 2) - args[1].print(stdout); - printf("\n"); - fflush(stdout); - } - ocState = !contentIsHidden(); - - if (numArgs == 2 && args[1].isDict()) { - out->beginMarkedContent(args[0].getName(), args[1].getDict()); - } else if(numArgs == 1) { - out->beginMarkedContent(args[0].getName(), nullptr); - } -} - -void Gfx::opEndMarkedContent(Object args[], int numArgs) { - if (!mcStack) { - error(errSyntaxWarning, getPos(), "Mismatched EMC operator"); - return; - } - - MarkedContentStack *mc = mcStack; - GfxMarkedContentKind mcKind = mc->kind; - - // pop the stack - popMarkedContent(); - - if (mcKind == gfxMCActualText) - out->endActualText(state); - ocState = !contentIsHidden(); - - out->endMarkedContent(state); -} - -void Gfx::opMarkPoint(Object args[], int numArgs) { - if (printCommands) { - printf(" mark point: %s ", args[0].getName()); - if (numArgs == 2) - args[1].print(stdout); - printf("\n"); - fflush(stdout); - } - - if(numArgs == 2 && args[1].isDict()) { - out->markPoint(args[0].getName(),args[1].getDict()); - } else { - out->markPoint(args[0].getName()); - } - -} - -//------------------------------------------------------------------------ -// misc -//------------------------------------------------------------------------ - -struct GfxStackStateSaver { - GfxStackStateSaver(Gfx *gfxA) : gfx(gfxA) { - gfx->saveState(); - } - - ~GfxStackStateSaver() { - gfx->restoreState(); - } - - GfxStackStateSaver(const GfxStackStateSaver &) = delete; - GfxStackStateSaver& operator=(const GfxStackStateSaver &) = delete; - - Gfx * const gfx; -}; - -void Gfx::drawAnnot(Object *str, AnnotBorder *border, AnnotColor *aColor, - double xMin, double yMin, double xMax, double yMax, int rotate) { - Dict *dict, *resDict; - double formXMin, formYMin, formXMax, formYMax; - double x, y, sx, sy, tx, ty; - double m[6], bbox[4]; - double r, g, b; - GfxColor color; - double *dash, *dash2; - int dashLength; - int i; - - // this function assumes that we are in the default user space, - // i.e., baseMatrix = ctm - - // if the bounding box has zero width or height, don't draw anything - // at all - if (xMin == xMax || yMin == yMax) { - return; - } - - // saves gfx state and automatically restores it on return - GfxStackStateSaver stackStateSaver(this); - - // Rotation around the topleft corner (for the NoRotate flag) - if (rotate != 0) { - const double angle_rad = rotate * M_PI / 180; - const double c = cos(angle_rad); - const double s = sin(angle_rad); - - // (xMin, yMax) is the pivot - const double unrotateMTX[6] = { - +c, -s, - +s, +c, - -c*xMin - s*yMax + xMin, -c*yMax + s*xMin + yMax - }; - - state->concatCTM(unrotateMTX[0], unrotateMTX[1], unrotateMTX[2], - unrotateMTX[3], unrotateMTX[4], unrotateMTX[5]); - out->updateCTM(state, unrotateMTX[0], unrotateMTX[1], unrotateMTX[2], - unrotateMTX[3], unrotateMTX[4], unrotateMTX[5]); - } - - // draw the appearance stream (if there is one) - if (str->isStream()) { - - // get stream dict - dict = str->streamGetDict(); - - // get the form bounding box - Object bboxObj = dict->lookup("BBox"); - if (!bboxObj.isArray()) { - error(errSyntaxError, getPos(), "Bad form bounding box"); - return; - } - for (i = 0; i < 4; ++i) { - Object obj1 = bboxObj.arrayGet(i); - if (likely(obj1.isNum())) { - bbox[i] = obj1.getNum(); - } else { - error(errSyntaxError, getPos(), "Bad form bounding box value"); - return; - } - } - - // get the form matrix - Object matrixObj = dict->lookup("Matrix"); - if (matrixObj.isArray() && matrixObj.arrayGetLength() >= 6) { - for (i = 0; i < 6; ++i) { - Object obj1 = matrixObj.arrayGet(i); - if (likely(obj1.isNum())) { - m[i] = obj1.getNum(); - } else { - error(errSyntaxError, getPos(), "Bad form matrix"); - return; - } - } - } else { - m[0] = 1; m[1] = 0; - m[2] = 0; m[3] = 1; - m[4] = 0; m[5] = 0; - } - - // transform the four corners of the form bbox to default user - // space, and construct the transformed bbox - x = bbox[0] * m[0] + bbox[1] * m[2] + m[4]; - y = bbox[0] * m[1] + bbox[1] * m[3] + m[5]; - formXMin = formXMax = x; - formYMin = formYMax = y; - x = bbox[0] * m[0] + bbox[3] * m[2] + m[4]; - y = bbox[0] * m[1] + bbox[3] * m[3] + m[5]; - if (x < formXMin) { - formXMin = x; - } else if (x > formXMax) { - formXMax = x; - } - if (y < formYMin) { - formYMin = y; - } else if (y > formYMax) { - formYMax = y; - } - x = bbox[2] * m[0] + bbox[1] * m[2] + m[4]; - y = bbox[2] * m[1] + bbox[1] * m[3] + m[5]; - if (x < formXMin) { - formXMin = x; - } else if (x > formXMax) { - formXMax = x; - } - if (y < formYMin) { - formYMin = y; - } else if (y > formYMax) { - formYMax = y; - } - x = bbox[2] * m[0] + bbox[3] * m[2] + m[4]; - y = bbox[2] * m[1] + bbox[3] * m[3] + m[5]; - if (x < formXMin) { - formXMin = x; - } else if (x > formXMax) { - formXMax = x; - } - if (y < formYMin) { - formYMin = y; - } else if (y > formYMax) { - formYMax = y; - } - - // construct a mapping matrix, [sx 0 0], which maps the transformed - // [0 sy 0] - // [tx ty 1] - // bbox to the annotation rectangle - if (formXMin == formXMax) { - // this shouldn't happen - sx = 1; - } else { - sx = (xMax - xMin) / (formXMax - formXMin); - } - if (formYMin == formYMax) { - // this shouldn't happen - sy = 1; - } else { - sy = (yMax - yMin) / (formYMax - formYMin); - } - tx = -formXMin * sx + xMin; - ty = -formYMin * sy + yMin; - - // the final transform matrix is (form matrix) * (mapping matrix) - m[0] *= sx; - m[1] *= sy; - m[2] *= sx; - m[3] *= sy; - m[4] = m[4] * sx + tx; - m[5] = m[5] * sy + ty; - - // get the resources - Object resObj = dict->lookup("Resources"); - resDict = resObj.isDict() ? resObj.getDict() : (Dict *)nullptr; - - // draw it - drawForm(str, resDict, m, bbox); - } - - // draw the border - if (border && border->getWidth() > 0) { - if (state->getStrokeColorSpace()->getMode() != csDeviceRGB) { - state->setStrokePattern(nullptr); - state->setStrokeColorSpace(new GfxDeviceRGBColorSpace()); - out->updateStrokeColorSpace(state); - } - if (aColor && (aColor->getSpace() == AnnotColor::colorRGB)) { - const double *values = aColor->getValues(); - r = values[0]; - g = values[1]; - b = values[2]; - } else { - r = g = b = 0; - }; - color.c[0] = dblToCol(r); - color.c[1] = dblToCol(g); - color.c[2] = dblToCol(b); - state->setStrokeColor(&color); - out->updateStrokeColor(state); - state->setLineWidth(border->getWidth()); - out->updateLineWidth(state); - dashLength = border->getDashLength(); - dash = border->getDash(); - if (border->getStyle() == AnnotBorder::borderDashed && dashLength > 0) { - dash2 = (double *)gmallocn(dashLength, sizeof(double)); - memcpy(dash2, dash, dashLength * sizeof(double)); - state->setLineDash(dash2, dashLength, 0); - out->updateLineDash(state); - } - //~ this doesn't currently handle the beveled and engraved styles - state->clearPath(); - state->moveTo(xMin, yMin); - state->lineTo(xMax, yMin); - if (border->getStyle() != AnnotBorder::borderUnderlined) { - state->lineTo(xMax, yMax); - state->lineTo(xMin, yMax); - state->closePath(); - } - out->stroke(state); - } -} - -int Gfx::bottomGuard() { - return stateGuards[stateGuards.size()-1]; -} - -void Gfx::pushStateGuard() { - stateGuards.push_back(stackHeight); -} - -void Gfx::popStateGuard() { - while (stackHeight > bottomGuard() && state->hasSaves()) - restoreState(); - stateGuards.pop_back(); -} - -void Gfx::saveState() { - out->saveState(state); - state = state->save(); - stackHeight++; -} - -void Gfx::restoreState() { - if (stackHeight <= bottomGuard() || !state->hasSaves()) { - error(errSyntaxError, -1, "Restoring state when no valid states to pop"); - commandAborted = gTrue; - return; - } - state = state->restore(); - out->restoreState(state); - stackHeight--; -} - -// Create a new state stack, and initialize it with a copy of the -// current state. -GfxState *Gfx::saveStateStack() { - GfxState *oldState; - - out->saveState(state); - oldState = state; - state = state->copy(gTrue); - return oldState; -} - -// Switch back to the previous state stack. -void Gfx::restoreStateStack(GfxState *oldState) { - while (state->hasSaves()) { - restoreState(); - } - delete state; - state = oldState; - out->restoreState(state); -} - -void Gfx::pushResources(Dict *resDict) { - res = new GfxResources(xref, resDict, res); -} - -void Gfx::popResources() { - GfxResources *resPtr; - - resPtr = res->getNext(); - delete res; - res = resPtr; -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/Gfx.h b/Build/source/libs/poppler/poppler-src/poppler/Gfx.h deleted file mode 100644 index 3ac4c929fc8..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/Gfx.h +++ /dev/null @@ -1,397 +0,0 @@ -//======================================================================== -// -// Gfx.h -// -// Copyright 1996-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2005 Jonathan Blandford <jrb@redhat.com> -// Copyright (C) 2007 Iñigo Martínez <inigomartinez@gmail.com> -// Copyright (C) 2008 Brad Hards <bradh@kde.org> -// Copyright (C) 2008, 2010 Carlos Garcia Campos <carlosgc@gnome.org> -// Copyright (C) 2009-2013, 2017, 2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2009, 2010, 2012, 2013 Thomas Freitag <Thomas.Freitag@alfa.de> -// Copyright (C) 2010 David Benjamin <davidben@mit.edu> -// Copyright (C) 2010 Christian Feuersänger <cfeuersaenger@googlemail.com> -// Copyright (C) 2013 Fabio D'Urso <fabiodurso@hotmail.it> -// 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 -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef GFX_H -#define GFX_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "poppler-config.h" -#include "goo/gtypes.h" -#include "goo/GooList.h" -#include "GfxState.h" -#include "Object.h" -#include "PopplerCache.h" - -#include <vector> - -class GooString; -class PDFDoc; -class XRef; -class Array; -class Stream; -class Parser; -class Dict; -class Function; -class OutputDev; -class GfxFontDict; -class GfxFont; -class GfxPattern; -class GfxTilingPattern; -class GfxShadingPattern; -class GfxShading; -class GfxFunctionShading; -class GfxAxialShading; -class GfxRadialShading; -class GfxGouraudTriangleShading; -class GfxPatchMeshShading; -struct GfxPatch; -class GfxState; -struct GfxColor; -class GfxColorSpace; -class Gfx; -class PDFRectangle; -class AnnotBorder; -class AnnotColor; -class Catalog; -struct MarkedContentStack; - -//------------------------------------------------------------------------ - -enum GfxClipType { - clipNone, - clipNormal, - clipEO -}; - -enum TchkType { - tchkBool, // boolean - tchkInt, // integer - tchkNum, // number (integer or real) - tchkString, // string - tchkName, // name - tchkArray, // array - tchkProps, // properties (dictionary or name) - tchkSCN, // scn/SCN args (number of name) - tchkNone // used to avoid empty initializer lists -}; - -#define maxArgs 33 - -struct Operator { - char name[4]; - int numArgs; - TchkType tchk[maxArgs]; - void (Gfx::*func)(Object args[], int numArgs); -}; - -//------------------------------------------------------------------------ - -class GfxResources { -public: - - GfxResources(XRef *xref, Dict *resDict, GfxResources *nextA); - ~GfxResources(); - - GfxResources(const GfxResources &) = delete; - GfxResources& operator=(const GfxResources &other) = delete; - - GfxFont *lookupFont(const char *name); - const GfxFont *lookupFont(const char *name) const; - Object lookupXObject(const char *name); - Object lookupXObjectNF(const char *name); - Object lookupMarkedContentNF(const char *name); - Object lookupColorSpace(const char *name); - GfxPattern *lookupPattern(const char *name, OutputDev *out, GfxState *state); - GfxShading *lookupShading(const char *name, OutputDev *out, GfxState *state); - Object lookupGState(const char *name); - Object lookupGStateNF(const char *name); - - GfxResources *getNext() { return next; } - -private: - GfxFont *doLookupFont(const char *name) const; - - GfxFontDict *fonts; - Object xObjDict; - Object colorSpaceDict; - Object patternDict; - Object shadingDict; - Object gStateDict; - PopplerObjectCache gStateCache; - Object propertiesDict; - GfxResources *next; -}; - -//------------------------------------------------------------------------ -// Gfx -//------------------------------------------------------------------------ - -class Gfx { -public: - - // Constructor for regular output. - Gfx(PDFDoc *docA, OutputDev *outA, int pageNum, Dict *resDict, - double hDPI, double vDPI, PDFRectangle *box, - PDFRectangle *cropBox, int rotate, - GBool (*abortCheckCbkA)(void *data) = NULL, - void *abortCheckCbkDataA = NULL, XRef *xrefA = NULL); - - // Constructor for a sub-page object. - Gfx(PDFDoc *docA, OutputDev *outA, Dict *resDict, - PDFRectangle *box, PDFRectangle *cropBox, - GBool (*abortCheckCbkA)(void *data) = NULL, - void *abortCheckCbkDataA = NULL, Gfx *gfxA = NULL); -#ifdef USE_CMS - void initDisplayProfile(); -#endif - ~Gfx(); - - Gfx(const Gfx &) = delete; - Gfx& operator=(const Gfx &other) = delete; - - XRef *getXRef() { return xref; } - - // Interpret a stream or array of streams. - void display(Object *obj, GBool topLevel = gTrue); - - // Display an annotation, given its appearance (a Form XObject), - // border style, and bounding box (in default user space). - void drawAnnot(Object *str, AnnotBorder *border, AnnotColor *aColor, - double xMin, double yMin, double xMax, double yMax, int rotate); - - // Save graphics state. - void saveState(); - - // Push a new state guard - void pushStateGuard(); - - // Restore graphics state. - void restoreState(); - - // Pop to state guard and pop guard - void popStateGuard(); - - // Get the current graphics state object. - GfxState *getState() { return state; } - - GBool checkTransparencyGroup(Dict *resDict); - - void drawForm(Object *str, Dict *resDict, double *matrix, double *bbox, - GBool transpGroup = gFalse, GBool softMask = gFalse, - GfxColorSpace *blendingColorSpace = NULL, - GBool isolated = gFalse, GBool knockout = gFalse, - GBool alpha = gFalse, Function *transferFunc = NULL, - GfxColor *backdropColor = NULL); - - void pushResources(Dict *resDict); - void popResources(); - -private: - - PDFDoc *doc; - XRef *xref; // the xref table for this PDF file - Catalog *catalog; // the Catalog for this PDF file - OutputDev *out; // output device - GBool subPage; // is this a sub-page object? - GBool printCommands; // print the drawing commands (for debugging) - GBool profileCommands; // profile the drawing commands (for debugging) - GBool commandAborted; // did the previous command abort the drawing? - GfxResources *res; // resource stack - int updateLevel; - - GfxState *state; // current graphics state - int stackHeight; // the height of the current graphics stack - std::vector<int> stateGuards; // a stack of state limits; to guard against unmatched pops - GBool fontChanged; // set if font or text matrix has changed - GfxClipType clip; // do a clip? - int ignoreUndef; // current BX/EX nesting level - double baseMatrix[6]; // default matrix for most recent - // page/form/pattern - int formDepth; - GBool ocState; // true if drawing is enabled, false if - // disabled - - MarkedContentStack *mcStack; // current BMC/EMC stack - - Parser *parser; // parser for page content stream(s) - - std::set<int> formsDrawing; // the forms/patterns that are being drawn - std::set<int> charProcDrawing; // the charProc that are being drawn - - GBool // callback to check for an abort - (*abortCheckCbk)(void *data); - void *abortCheckCbkData; - - static Operator opTab[]; // table of operators - - void go(GBool topLevel); - void execOp(Object *cmd, Object args[], int numArgs); - Operator *findOp(char *name); - GBool checkArg(Object *arg, TchkType type); - Goffset getPos(); - - int bottomGuard(); - - // graphics state operators - void opSave(Object args[], int numArgs); - void opRestore(Object args[], int numArgs); - void opConcat(Object args[], int numArgs); - void opSetDash(Object args[], int numArgs); - void opSetFlat(Object args[], int numArgs); - void opSetLineJoin(Object args[], int numArgs); - void opSetLineCap(Object args[], int numArgs); - void opSetMiterLimit(Object args[], int numArgs); - void opSetLineWidth(Object args[], int numArgs); - void opSetExtGState(Object args[], int numArgs); - void doSoftMask(Object *str, GBool alpha, - GfxColorSpace *blendingColorSpace, - GBool isolated, GBool knockout, - Function *transferFunc, GfxColor *backdropColor); - void opSetRenderingIntent(Object args[], int numArgs); - - // color operators - void opSetFillGray(Object args[], int numArgs); - void opSetStrokeGray(Object args[], int numArgs); - void opSetFillCMYKColor(Object args[], int numArgs); - void opSetStrokeCMYKColor(Object args[], int numArgs); - void opSetFillRGBColor(Object args[], int numArgs); - void opSetStrokeRGBColor(Object args[], int numArgs); - void opSetFillColorSpace(Object args[], int numArgs); - void opSetStrokeColorSpace(Object args[], int numArgs); - void opSetFillColor(Object args[], int numArgs); - void opSetStrokeColor(Object args[], int numArgs); - void opSetFillColorN(Object args[], int numArgs); - void opSetStrokeColorN(Object args[], int numArgs); - - // path segment operators - void opMoveTo(Object args[], int numArgs); - void opLineTo(Object args[], int numArgs); - void opCurveTo(Object args[], int numArgs); - void opCurveTo1(Object args[], int numArgs); - void opCurveTo2(Object args[], int numArgs); - void opRectangle(Object args[], int numArgs); - void opClosePath(Object args[], int numArgs); - - // path painting operators - void opEndPath(Object args[], int numArgs); - void opStroke(Object args[], int numArgs); - void opCloseStroke(Object args[], int numArgs); - void opFill(Object args[], int numArgs); - void opEOFill(Object args[], int numArgs); - void opFillStroke(Object args[], int numArgs); - void opCloseFillStroke(Object args[], int numArgs); - void opEOFillStroke(Object args[], int numArgs); - void opCloseEOFillStroke(Object args[], int numArgs); - void doPatternFill(GBool eoFill); - void doPatternStroke(); - void doPatternText(); - void doPatternImageMask(Object *ref, Stream *str, int width, int height, - GBool invert, GBool inlineImg); - void doTilingPatternFill(GfxTilingPattern *tPat, - GBool stroke, GBool eoFill, GBool text); - void doShadingPatternFill(GfxShadingPattern *sPat, - GBool stroke, GBool eoFill, GBool text); - void opShFill(Object args[], int numArgs); - void doFunctionShFill(GfxFunctionShading *shading); - void doFunctionShFill1(GfxFunctionShading *shading, - double x0, double y0, - double x1, double y1, - GfxColor *colors, int depth); - void doAxialShFill(GfxAxialShading *shading); - void doRadialShFill(GfxRadialShading *shading); - void doGouraudTriangleShFill(GfxGouraudTriangleShading *shading); - void gouraudFillTriangle(double x0, double y0, GfxColor *color0, - double x1, double y1, GfxColor *color1, - double x2, double y2, GfxColor *color2, - int nComps, int depth, GfxState::ReusablePathIterator *path); - void gouraudFillTriangle(double x0, double y0, double color0, - double x1, double y1, double color1, - double x2, double y2, double color2, - double refineColorThreshold, int depth, GfxGouraudTriangleShading *shading, GfxState::ReusablePathIterator *path); - void doPatchMeshShFill(GfxPatchMeshShading *shading); - void fillPatch(GfxPatch *patch, int colorComps, int patchColorComps, double refineColorThreshold, int depth, GfxPatchMeshShading *shading); - void doEndPath(); - - // path clipping operators - void opClip(Object args[], int numArgs); - void opEOClip(Object args[], int numArgs); - - // text object operators - void opBeginText(Object args[], int numArgs); - void opEndText(Object args[], int numArgs); - - // text state operators - void opSetCharSpacing(Object args[], int numArgs); - void opSetFont(Object args[], int numArgs); - void opSetTextLeading(Object args[], int numArgs); - void opSetTextRender(Object args[], int numArgs); - void opSetTextRise(Object args[], int numArgs); - void opSetWordSpacing(Object args[], int numArgs); - void opSetHorizScaling(Object args[], int numArgs); - - // text positioning operators - void opTextMove(Object args[], int numArgs); - void opTextMoveSet(Object args[], int numArgs); - void opSetTextMatrix(Object args[], int numArgs); - void opTextNextLine(Object args[], int numArgs); - - // text string operators - void opShowText(Object args[], int numArgs); - void opMoveShowText(Object args[], int numArgs); - void opMoveSetShowText(Object args[], int numArgs); - void opShowSpaceText(Object args[], int numArgs); - void doShowText(const GooString *s); - void doIncCharCount(const GooString *s); - - // XObject operators - void opXObject(Object args[], int numArgs); - void doImage(Object *ref, Stream *str, GBool inlineImg); - void doForm(Object *str); - - // in-line image operators - void opBeginImage(Object args[], int numArgs); - Stream *buildImageStream(); - void opImageData(Object args[], int numArgs); - void opEndImage(Object args[], int numArgs); - - // type 3 font operators - void opSetCharWidth(Object args[], int numArgs); - void opSetCacheDevice(Object args[], int numArgs); - - // compatibility operators - void opBeginIgnoreUndef(Object args[], int numArgs); - void opEndIgnoreUndef(Object args[], int numArgs); - - // marked content operators - void opBeginMarkedContent(Object args[], int numArgs); - void opEndMarkedContent(Object args[], int numArgs); - void opMarkPoint(Object args[], int numArgs); - GfxState *saveStateStack(); - void restoreStateStack(GfxState *oldState); - GBool contentIsHidden(); - void pushMarkedContent(); - void popMarkedContent(); -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/GfxFont.cc b/Build/source/libs/poppler/poppler-src/poppler/GfxFont.cc deleted file mode 100644 index 7b4d4b5487a..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/GfxFont.cc +++ /dev/null @@ -1,2554 +0,0 @@ -//======================================================================== -// -// GfxFont.cc -// -// Copyright 1996-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2005, 2006, 2008-2010, 2012, 2014, 2015, 2017, 2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2005, 2006 Kristian Høgsberg <krh@redhat.com> -// Copyright (C) 2006 Takashi Iwai <tiwai@suse.de> -// Copyright (C) 2007 Julien Rebetez <julienr@svn.gnome.org> -// Copyright (C) 2007 Jeff Muizelaar <jeff@infidigm.net> -// Copyright (C) 2007 Koji Otani <sho@bbr.jp> -// Copyright (C) 2007 Ed Catmur <ed@catmur.co.uk> -// Copyright (C) 2008 Jonathan Kew <jonathan_kew@sil.org> -// Copyright (C) 2008 Ed Avis <eda@waniasset.com> -// Copyright (C) 2008, 2010 Hib Eris <hib@hiberis.nl> -// Copyright (C) 2009 Peter Kerzum <kerzum@yandex-team.ru> -// Copyright (C) 2009, 2010 David Benjamin <davidben@mit.edu> -// Copyright (C) 2011 Axel Strübing <axel.struebing@freenet.de> -// Copyright (C) 2011, 2012, 2014 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2012 Yi Yang <ahyangyi@gmail.com> -// Copyright (C) 2012 Suzuki Toshiya <mpsuzuki@hiroshima-u.ac.jp> -// Copyright (C) 2012, 2017 Thomas Freitag <Thomas.Freitag@alfa.de> -// Copyright (C) 2013-2016, 2018 Jason Crain <jason@aquaticape.us> -// Copyright (C) 2014 Olly Betts <olly@survex.com> -// 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 -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include <config.h> - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <ctype.h> -#include <math.h> -#include <limits.h> -#include <algorithm> -#include "goo/gmem.h" -#include "Error.h" -#include "Object.h" -#include "Dict.h" -#include "GlobalParams.h" -#include "CMap.h" -#include "CharCodeToUnicode.h" -#include "FontEncodingTables.h" -#include "BuiltinFontTables.h" -#include "UnicodeTypeTable.h" -#include <fofi/FoFiIdentifier.h> -#include <fofi/FoFiType1.h> -#include <fofi/FoFiType1C.h> -#include <fofi/FoFiTrueType.h> -#include "GfxFont.h" -#include "PSOutputDev.h" - -//------------------------------------------------------------------------ - -struct Base14FontMapEntry { - const char *altName; - const char *base14Name; -}; - -static const Base14FontMapEntry base14FontMap[] = { - { "Arial", "Helvetica" }, - { "Arial,Bold", "Helvetica-Bold" }, - { "Arial,BoldItalic", "Helvetica-BoldOblique" }, - { "Arial,Italic", "Helvetica-Oblique" }, - { "Arial-Bold", "Helvetica-Bold" }, - { "Arial-BoldItalic", "Helvetica-BoldOblique" }, - { "Arial-BoldItalicMT", "Helvetica-BoldOblique" }, - { "Arial-BoldMT", "Helvetica-Bold" }, - { "Arial-Italic", "Helvetica-Oblique" }, - { "Arial-ItalicMT", "Helvetica-Oblique" }, - { "ArialMT", "Helvetica" }, - { "Courier", "Courier" }, - { "Courier,Bold", "Courier-Bold" }, - { "Courier,BoldItalic", "Courier-BoldOblique" }, - { "Courier,Italic", "Courier-Oblique" }, - { "Courier-Bold", "Courier-Bold" }, - { "Courier-BoldOblique", "Courier-BoldOblique" }, - { "Courier-Oblique", "Courier-Oblique" }, - { "CourierNew", "Courier" }, - { "CourierNew,Bold", "Courier-Bold" }, - { "CourierNew,BoldItalic", "Courier-BoldOblique" }, - { "CourierNew,Italic", "Courier-Oblique" }, - { "CourierNew-Bold", "Courier-Bold" }, - { "CourierNew-BoldItalic", "Courier-BoldOblique" }, - { "CourierNew-Italic", "Courier-Oblique" }, - { "CourierNewPS-BoldItalicMT", "Courier-BoldOblique" }, - { "CourierNewPS-BoldMT", "Courier-Bold" }, - { "CourierNewPS-ItalicMT", "Courier-Oblique" }, - { "CourierNewPSMT", "Courier" }, - { "Helvetica", "Helvetica" }, - { "Helvetica,Bold", "Helvetica-Bold" }, - { "Helvetica,BoldItalic", "Helvetica-BoldOblique" }, - { "Helvetica,Italic", "Helvetica-Oblique" }, - { "Helvetica-Bold", "Helvetica-Bold" }, - { "Helvetica-BoldItalic", "Helvetica-BoldOblique" }, - { "Helvetica-BoldOblique", "Helvetica-BoldOblique" }, - { "Helvetica-Italic", "Helvetica-Oblique" }, - { "Helvetica-Oblique", "Helvetica-Oblique" }, - { "Symbol", "Symbol" }, - { "Symbol,Bold", "Symbol" }, - { "Symbol,BoldItalic", "Symbol" }, - { "Symbol,Italic", "Symbol" }, - { "SymbolMT", "Symbol" }, - { "SymbolMT,Bold", "Symbol" }, - { "SymbolMT,BoldItalic", "Symbol" }, - { "SymbolMT,Italic", "Symbol" }, - { "Times-Bold", "Times-Bold" }, - { "Times-BoldItalic", "Times-BoldItalic" }, - { "Times-Italic", "Times-Italic" }, - { "Times-Roman", "Times-Roman" }, - { "TimesNewRoman", "Times-Roman" }, - { "TimesNewRoman,Bold", "Times-Bold" }, - { "TimesNewRoman,BoldItalic", "Times-BoldItalic" }, - { "TimesNewRoman,Italic", "Times-Italic" }, - { "TimesNewRoman-Bold", "Times-Bold" }, - { "TimesNewRoman-BoldItalic", "Times-BoldItalic" }, - { "TimesNewRoman-Italic", "Times-Italic" }, - { "TimesNewRomanPS", "Times-Roman" }, - { "TimesNewRomanPS-Bold", "Times-Bold" }, - { "TimesNewRomanPS-BoldItalic", "Times-BoldItalic" }, - { "TimesNewRomanPS-BoldItalicMT", "Times-BoldItalic" }, - { "TimesNewRomanPS-BoldMT", "Times-Bold" }, - { "TimesNewRomanPS-Italic", "Times-Italic" }, - { "TimesNewRomanPS-ItalicMT", "Times-Italic" }, - { "TimesNewRomanPSMT", "Times-Roman" }, - { "TimesNewRomanPSMT,Bold", "Times-Bold" }, - { "TimesNewRomanPSMT,BoldItalic", "Times-BoldItalic" }, - { "TimesNewRomanPSMT,Italic", "Times-Italic" }, - { "ZapfDingbats", "ZapfDingbats" } -}; - -//------------------------------------------------------------------------ - -// index: {fixed:0, sans-serif:4, serif:8} + bold*2 + italic -// NB: must be in same order as psSubstFonts in PSOutputDev.cc -static const char *base14SubstFonts[14] = { - "Courier", - "Courier-Oblique", - "Courier-Bold", - "Courier-BoldOblique", - "Helvetica", - "Helvetica-Oblique", - "Helvetica-Bold", - "Helvetica-BoldOblique", - "Times-Roman", - "Times-Italic", - "Times-Bold", - "Times-BoldItalic", - // the last two are never used for substitution - "Symbol", - "ZapfDingbats" -}; - -//------------------------------------------------------------------------ - -static int parseCharName(char *charName, Unicode *uBuf, int uLen, - GBool names, GBool ligatures, - GBool numeric, GBool hex, GBool variants); - -//------------------------------------------------------------------------ - -static int readFromStream(void *data) { - return ((Stream *)data)->getChar(); -} - -//------------------------------------------------------------------------ -// GfxFontLoc -//------------------------------------------------------------------------ - -GfxFontLoc::GfxFontLoc() { - path = nullptr; - fontNum = 0; - encoding = nullptr; - substIdx = -1; -} - -GfxFontLoc::~GfxFontLoc() { - if (path) { - delete path; - } - if (encoding) { - delete encoding; - } -} - -//------------------------------------------------------------------------ -// GfxFont -//------------------------------------------------------------------------ - -GfxFont *GfxFont::makeFont(XRef *xref, const char *tagA, Ref idA, Dict *fontDict) { - GooString *nameA; - Ref embFontIDA; - GfxFontType typeA; - GfxFont *font; - - // get base font name - nameA = nullptr; - Object obj1 = fontDict->lookup("BaseFont"); - if (obj1.isName()) { - nameA = new GooString(obj1.getName()); - } - - // get embedded font ID and font type - typeA = getFontType(xref, fontDict, &embFontIDA); - - // create the font object - font = nullptr; - if (typeA < fontCIDType0) { - font = new Gfx8BitFont(xref, tagA, idA, nameA, typeA, embFontIDA, - fontDict); - } else { - font = new GfxCIDFont(xref, tagA, idA, nameA, typeA, embFontIDA, - fontDict); - } - - return font; -} - -GfxFont::GfxFont(const char *tagA, Ref idA, GooString *nameA, - GfxFontType typeA, Ref embFontIDA) { - ok = gFalse; - tag = new GooString(tagA); - id = idA; - name = nameA; - type = typeA; - embFontID = embFontIDA; - embFontName = nullptr; - family = nullptr; - stretch = StretchNotDefined; - weight = WeightNotDefined; - refCnt = 1; - encodingName = new GooString(""); - hasToUnicode = gFalse; -} - -GfxFont::~GfxFont() { - delete tag; - delete family; - if (name) { - delete name; - } - if (embFontName) { - delete embFontName; - } - if (encodingName) { - delete encodingName; - } -} - -void GfxFont::incRefCnt() { - refCnt++; -} - -void GfxFont::decRefCnt() { - if (--refCnt == 0) - delete this; -} - -// This function extracts three pieces of information: -// 1. the "expected" font type, i.e., the font type implied by -// Font.Subtype, DescendantFont.Subtype, and -// FontDescriptor.FontFile3.Subtype -// 2. the embedded font object ID -// 3. the actual font type - determined by examining the embedded font -// if there is one, otherwise equal to the expected font type -// If the expected and actual font types don't match, a warning -// message is printed. The expected font type is not used for -// anything else. -GfxFontType GfxFont::getFontType(XRef *xref, Dict *fontDict, Ref *embID) { - GfxFontType t, expectedType; - FoFiIdentifierType fft; - Dict *fontDict2; - GBool isType0, err; - - t = fontUnknownType; - embID->num = embID->gen = -1; - err = gFalse; - - Object subtype = fontDict->lookup("Subtype"); - expectedType = fontUnknownType; - isType0 = gFalse; - if (subtype.isName("Type1") || subtype.isName("MMType1")) { - expectedType = fontType1; - } else if (subtype.isName("Type1C")) { - expectedType = fontType1C; - } else if (subtype.isName("Type3")) { - expectedType = fontType3; - } else if (subtype.isName("TrueType")) { - expectedType = fontTrueType; - } else if (subtype.isName("Type0")) { - isType0 = gTrue; - } else { - error(errSyntaxWarning, -1, "Unknown font type: '{0:s}'", - subtype.isName() ? subtype.getName() : "???"); - } - - fontDict2 = fontDict; - Object obj1 = fontDict->lookup("DescendantFonts"); - Object obj2; // Do not move to inside the if - // we need it around so that fontDict2 remains valid - if (obj1.isArray()) { - if (obj1.arrayGetLength() == 0) { - error(errSyntaxWarning, -1, "Empty DescendantFonts array in font"); - } else { - obj2 = obj1.arrayGet(0); - if (obj2.isDict()) { - if (!isType0) { - error(errSyntaxWarning, -1, "Non-CID font with DescendantFonts array"); - } - fontDict2 = obj2.getDict(); - subtype = fontDict2->lookup("Subtype"); - if (subtype.isName("CIDFontType0")) { - if (isType0) { - expectedType = fontCIDType0; - } - } else if (subtype.isName("CIDFontType2")) { - if (isType0) { - expectedType = fontCIDType2; - } - } - } - } - } - - Object fontDesc = fontDict2->lookup("FontDescriptor"); - if (fontDesc.isDict()) { - Object obj3 = fontDesc.dictLookupNF("FontFile"); - if (obj3.isRef()) { - *embID = obj3.getRef(); - if (expectedType != fontType1) { - err = gTrue; - } - } - if (embID->num == -1 && (obj3 = fontDesc.dictLookupNF("FontFile2"), obj3.isRef())) { - *embID = obj3.getRef(); - if (isType0) { - expectedType = fontCIDType2; - } else if (expectedType != fontTrueType) { - err = gTrue; - } - } - if (embID->num == -1 && (obj3 = fontDesc.dictLookupNF("FontFile3"), obj3.isRef())) { - *embID = obj3.getRef(); - Object obj4 = obj3.fetch(xref); - if (obj4.isStream()) { - subtype = obj4.streamGetDict()->lookup("Subtype"); - if (subtype.isName("Type1")) { - if (expectedType != fontType1) { - err = gTrue; - expectedType = isType0 ? fontCIDType0 : fontType1; - } - } else if (subtype.isName("Type1C")) { - if (expectedType == fontType1) { - expectedType = fontType1C; - } else if (expectedType != fontType1C) { - err = gTrue; - expectedType = isType0 ? fontCIDType0C : fontType1C; - } - } else if (subtype.isName("TrueType")) { - if (expectedType != fontTrueType) { - err = gTrue; - expectedType = isType0 ? fontCIDType2 : fontTrueType; - } - } else if (subtype.isName("CIDFontType0C")) { - if (expectedType == fontCIDType0) { - expectedType = fontCIDType0C; - } else { - err = gTrue; - expectedType = isType0 ? fontCIDType0C : fontType1C; - } - } else if (subtype.isName("OpenType")) { - if (expectedType == fontTrueType) { - expectedType = fontTrueTypeOT; - } else if (expectedType == fontType1) { - expectedType = fontType1COT; - } else if (expectedType == fontCIDType0) { - expectedType = fontCIDType0COT; - } else if (expectedType == fontCIDType2) { - expectedType = fontCIDType2OT; - } else { - err = gTrue; - } - } else { - error(errSyntaxError, -1, "Unknown font type '{0:s}'", - subtype.isName() ? subtype.getName() : "???"); - } - } - } - } - - t = fontUnknownType; - if (embID->num >= 0) { - Object obj3(embID->num, embID->gen); - Object obj4 = obj3.fetch(xref); - if (obj4.isStream()) { - obj4.streamReset(); - fft = FoFiIdentifier::identifyStream(&readFromStream, obj4.getStream()); - obj4.streamClose(); - switch (fft) { - case fofiIdType1PFA: - case fofiIdType1PFB: - t = fontType1; - break; - case fofiIdCFF8Bit: - t = isType0 ? fontCIDType0C : fontType1C; - break; - case fofiIdCFFCID: - t = fontCIDType0C; - break; - case fofiIdTrueType: - case fofiIdTrueTypeCollection: - t = isType0 ? fontCIDType2 : fontTrueType; - break; - case fofiIdOpenTypeCFF8Bit: - t = expectedType; // hack: open type always == expected type? s. bug-poppler20605.pdf - break; - case fofiIdOpenTypeCFFCID: - t = fontCIDType0COT; - break; - default: - error(errSyntaxError, -1, "Embedded font file may be invalid"); - break; - } - } - } - - if (t == fontUnknownType) { - t = expectedType; - } - - if (t != expectedType) { - err = gTrue; - } - - if (err) { - error(errSyntaxWarning, -1, - "Mismatch between font type and embedded font file"); - } - - return t; -} - -void GfxFont::readFontDescriptor(XRef *xref, Dict *fontDict) { - double t; - - // assume Times-Roman by default (for substitution purposes) - flags = fontSerif; - - missingWidth = 0; - - Object obj1 = fontDict->lookup("FontDescriptor"); - if (obj1.isDict()) { - - // get flags - Object obj2 = obj1.dictLookup("Flags"); - if (obj2.isInt()) { - flags = obj2.getInt(); - } - - // get name - obj2 = obj1.dictLookup("FontName"); - if (obj2.isName()) { - embFontName = new GooString(obj2.getName()); - } - if (embFontName == nullptr) { - // get name with typo - obj2 = obj1.dictLookup("Fontname"); - if (obj2.isName()) { - embFontName = new GooString(obj2.getName()); - error(errSyntaxWarning, -1, "The file uses Fontname instead of FontName please notify the creator that the file is broken"); - } - } - - // get family - obj2 = obj1.dictLookup("FontFamily"); - if (obj2.isString()) family = new GooString(obj2.getString()); - - // get stretch - obj2 = obj1.dictLookup("FontStretch"); - if (obj2.isName()) { - if (strcmp(obj2.getName(), "UltraCondensed") == 0) stretch = UltraCondensed; - else if (strcmp(obj2.getName(), "ExtraCondensed") == 0) stretch = ExtraCondensed; - else if (strcmp(obj2.getName(), "Condensed") == 0) stretch = Condensed; - else if (strcmp(obj2.getName(), "SemiCondensed") == 0) stretch = SemiCondensed; - else if (strcmp(obj2.getName(), "Normal") == 0) stretch = Normal; - else if (strcmp(obj2.getName(), "SemiExpanded") == 0) stretch = SemiExpanded; - else if (strcmp(obj2.getName(), "Expanded") == 0) stretch = Expanded; - else if (strcmp(obj2.getName(), "ExtraExpanded") == 0) stretch = ExtraExpanded; - else if (strcmp(obj2.getName(), "UltraExpanded") == 0) stretch = UltraExpanded; - else error(errSyntaxWarning, -1, "Invalid Font Stretch"); - } - - // get weight - obj2 = obj1.dictLookup("FontWeight"); - if (obj2.isNum()) { - if (obj2.getNum() == 100) weight = W100; - else if (obj2.getNum() == 200) weight = W200; - else if (obj2.getNum() == 300) weight = W300; - else if (obj2.getNum() == 400) weight = W400; - else if (obj2.getNum() == 500) weight = W500; - else if (obj2.getNum() == 600) weight = W600; - else if (obj2.getNum() == 700) weight = W700; - else if (obj2.getNum() == 800) weight = W800; - else if (obj2.getNum() == 900) weight = W900; - else error(errSyntaxWarning, -1, "Invalid Font Weight"); - } - - // look for MissingWidth - obj2 = obj1.dictLookup("MissingWidth"); - if (obj2.isNum()) { - missingWidth = obj2.getNum(); - } - - // get Ascent and Descent - obj2 = obj1.dictLookup("Ascent"); - if (obj2.isNum()) { - t = 0.001 * obj2.getNum(); - // some broken font descriptors specify a negative ascent - if (t < 0) { - t = -t; - } - // some broken font descriptors set ascent and descent to 0; - // others set it to ridiculous values (e.g., 32768) - if (t != 0 && t < 3) { - ascent = t; - } - } - obj2 = obj1.dictLookup("Descent"); - if (obj2.isNum()) { - t = 0.001 * obj2.getNum(); - // some broken font descriptors specify a positive descent - if (t > 0) { - t = -t; - } - // some broken font descriptors set ascent and descent to 0 - if (t != 0 && t > -3) { - descent = t; - } - } - - // font FontBBox - obj2 = obj1.dictLookup("FontBBox"); - if (obj2.isArray()) { - for (int i = 0; i < 4 && i < obj2.arrayGetLength(); ++i) { - Object obj3 = obj2.arrayGet(i); - if (obj3.isNum()) { - fontBBox[i] = 0.001 * obj3.getNum(); - } - } - } - } -} - -CharCodeToUnicode *GfxFont::readToUnicodeCMap(Dict *fontDict, int nBits, - CharCodeToUnicode *ctu) { - GooString *buf; - - Object obj1 = fontDict->lookup("ToUnicode"); - if (!obj1.isStream()) { - return nullptr; - } - buf = new GooString(); - obj1.getStream()->fillGooString(buf); - obj1.streamClose(); - if (ctu) { - ctu->mergeCMap(buf, nBits); - } else { - ctu = CharCodeToUnicode::parseCMap(buf, nBits); - } - hasToUnicode = gTrue; - delete buf; - return ctu; -} - -GfxFontLoc *GfxFont::locateFont(XRef *xref, PSOutputDev *ps) { - GfxFontLoc *fontLoc; - SysFontType sysFontType; - GooString *path, *base14Name, *substName; - int substIdx, fontNum; - GBool embed; - - if (type == fontType3) { - return nullptr; - } - - //----- embedded font - if (embFontID.num >= 0) { - embed = gTrue; - Object refObj(embFontID.num, embFontID.gen); - Object embFontObj = refObj.fetch(xref); - if (!embFontObj.isStream()) { - error(errSyntaxError, -1, "Embedded font object is wrong type"); - embed = gFalse; - } - if (embed) { - if (ps) { - switch (type) { - case fontType1: - case fontType1C: - case fontType1COT: - embed = ps->getEmbedType1(); - break; - case fontTrueType: - case fontTrueTypeOT: - embed = ps->getEmbedTrueType(); - break; - case fontCIDType0C: - case fontCIDType0COT: - embed = ps->getEmbedCIDPostScript(); - break; - case fontCIDType2: - case fontCIDType2OT: - embed = ps->getEmbedCIDTrueType(); - break; - default: - break; - } - } - if (embed) { - fontLoc = new GfxFontLoc(); - fontLoc->locType = gfxFontLocEmbedded; - fontLoc->fontType = type; - fontLoc->embFontID = embFontID; - return fontLoc; - } - } - } - - //----- PS passthrough - if (ps && !isCIDFont() && ps->getFontPassthrough()) { - fontLoc = new GfxFontLoc(); - fontLoc->locType = gfxFontLocResident; - fontLoc->fontType = fontType1; - fontLoc->path = name->copy(); - return fontLoc; - } - - //----- PS resident Base-14 font - if (ps && !isCIDFont() && ((Gfx8BitFont *)this)->base14) { - fontLoc = new GfxFontLoc(); - fontLoc->locType = gfxFontLocResident; - fontLoc->fontType = fontType1; - fontLoc->path = new GooString(((Gfx8BitFont *)this)->base14->base14Name); - return fontLoc; - } - - //----- external font file (fontFile, fontDir) - if (name && (path = globalParams->findFontFile(name))) { - if ((fontLoc = getExternalFont(path, isCIDFont()))) { - return fontLoc; - } - } - - //----- external font file for Base-14 font - if (!ps && !isCIDFont() && ((Gfx8BitFont *)this)->base14) { - base14Name = new GooString(((Gfx8BitFont *)this)->base14->base14Name); - if ((path = globalParams->findBase14FontFile(base14Name, this))) { - if ((fontLoc = getExternalFont(path, gFalse))) { - delete base14Name; - return fontLoc; - } - } - delete base14Name; - } - - //----- system font - if ((path = globalParams->findSystemFontFile(this, &sysFontType, - &fontNum))) { - if (isCIDFont()) { - if (sysFontType == sysFontTTF || sysFontType == sysFontTTC) { - fontLoc = new GfxFontLoc(); - fontLoc->locType = gfxFontLocExternal; - fontLoc->fontType = fontCIDType2; - fontLoc->path = path; - fontLoc->fontNum = fontNum; - return fontLoc; - } - } else { - if (sysFontType == sysFontTTF || sysFontType == sysFontTTC) { - fontLoc = new GfxFontLoc(); - fontLoc->locType = gfxFontLocExternal; - fontLoc->fontType = fontTrueType; - fontLoc->path = path; - return fontLoc; - } else if (sysFontType == sysFontPFA || sysFontType == sysFontPFB) { - fontLoc = new GfxFontLoc(); - fontLoc->locType = gfxFontLocExternal; - fontLoc->fontType = fontType1; - fontLoc->path = path; - fontLoc->fontNum = fontNum; - return fontLoc; - } - } - delete path; - } - - if (!isCIDFont()) { - - //----- 8-bit font substitution - if (flags & fontFixedWidth) { - substIdx = 0; - } else if (flags & fontSerif) { - substIdx = 8; - } else { - substIdx = 4; - } - if (isBold()) { - substIdx += 2; - } - if (isItalic()) { - substIdx += 1; - } - substName = new GooString(base14SubstFonts[substIdx]); - if (ps) { - error(errSyntaxWarning, -1, "Substituting font '{0:s}' for '{1:s}'", - base14SubstFonts[substIdx], name ? name->getCString() : "null"); - fontLoc = new GfxFontLoc(); - fontLoc->locType = gfxFontLocResident; - fontLoc->fontType = fontType1; - fontLoc->path = substName; - fontLoc->substIdx = substIdx; - return fontLoc; - } else { - path = globalParams->findFontFile(substName); - delete substName; - if (path) { - if ((fontLoc = getExternalFont(path, gFalse))) { - error(errSyntaxWarning, -1, "Substituting font '{0:s}' for '{1:s}'", - base14SubstFonts[substIdx], name ? name->getCString() : ""); - name = new GooString(base14SubstFonts[substIdx]); - fontLoc->substIdx = substIdx; - return fontLoc; - } - } - } - - // failed to find a substitute font - return nullptr; - } - - // failed to find a substitute font - return nullptr; -} - -GfxFontLoc *GfxFont::locateBase14Font(GooString *base14Name) { - GooString *path; - - path = globalParams->findFontFile(base14Name); - if (!path) { - return nullptr; - } - return getExternalFont(path, gFalse); -} - -GfxFontLoc *GfxFont::getExternalFont(GooString *path, GBool cid) { - FoFiIdentifierType fft; - GfxFontType fontType; - GfxFontLoc *fontLoc; - - fft = FoFiIdentifier::identifyFile(path->getCString()); - switch (fft) { - case fofiIdType1PFA: - case fofiIdType1PFB: - fontType = fontType1; - break; - case fofiIdCFF8Bit: - fontType = fontType1C; - break; - case fofiIdCFFCID: - fontType = fontCIDType0C; - break; - case fofiIdTrueType: - case fofiIdTrueTypeCollection: - fontType = cid ? fontCIDType2 : fontTrueType; - break; - case fofiIdOpenTypeCFF8Bit: - fontType = fontType1COT; - break; - case fofiIdOpenTypeCFFCID: - fontType = fontCIDType0COT; - break; - case fofiIdUnknown: - case fofiIdError: - default: - fontType = fontUnknownType; - break; - } - if (fontType == fontUnknownType || - (cid ? (fontType < fontCIDType0) - : (fontType >= fontCIDType0))) { - delete path; - return nullptr; - } - fontLoc = new GfxFontLoc(); - fontLoc->locType = gfxFontLocExternal; - fontLoc->fontType = fontType; - fontLoc->path = path; - return fontLoc; -} - -char *GfxFont::readEmbFontFile(XRef *xref, int *len) { - char *buf; - Stream *str; - - Object obj1(embFontID.num, embFontID.gen); - Object obj2 = obj1.fetch(xref); - if (!obj2.isStream()) { - error(errSyntaxError, -1, "Embedded font file is not a stream"); - embFontID.num = -1; - *len = 0; - return nullptr; - } - str = obj2.getStream(); - - buf = (char*)str->toUnsignedChars(len); - str->close(); - - return buf; -} - - -struct AlternateNameMap { - const char *name; - const char *alt; -}; - -static const AlternateNameMap alternateNameMap[] = -{ - { "fi", "f_i" }, - { "fl", "f_l" }, - { "ff", "f_f" }, - { "ffi", "f_f_i" }, - { "ffl", "f_f_l" }, - { nullptr, nullptr } -}; - -const char *GfxFont::getAlternateName(const char *name) { - const AlternateNameMap *map = alternateNameMap; - while (map->name) { - if (strcmp(name, map->name) == 0) { - return map->alt; - } - map++; - } - return nullptr; -} - -//------------------------------------------------------------------------ -// Gfx8BitFont -//------------------------------------------------------------------------ - -// Parse character names of the form 'Axx', 'xx', 'Ann', 'ABnn', or -// 'nn', where 'A' and 'B' are any letters, 'xx' is two hex digits, -// and 'nn' is decimal digits. -static GBool parseNumericName(const char *s, GBool hex, unsigned int *u) { - char *endptr; - - // Strip leading alpha characters. - if (hex) { - int n = 0; - - // Get string length while ignoring junk at end. - while (isalnum(s[n])) - ++n; - - // Only 2 hex characters with optional leading alpha is allowed. - if (n == 3 && isalpha(*s)) { - ++s; - } else if (n != 2) { - return gFalse; - } - } else { - // Strip up to two alpha characters. - for (int i = 0; i < 2 && isalpha(*s); ++i) - ++s; - } - - int v = strtol(s, &endptr, hex ? 16 : 10); - - if (endptr == s) - return gFalse; - - // Skip trailing junk characters. - while (*endptr != '\0' && !isalnum(*endptr)) - ++endptr; - - if (*endptr == '\0') { - if (u) - *u = v; - return gTrue; - } - return gFalse; -} - -// Returns gTrue if the font has character names like xx or Axx which -// should be parsed for hex or decimal values. -static GBool testForNumericNames(Dict *fontDict, GBool hex) { - GBool numeric = gTrue; - - Object enc = fontDict->lookup("Encoding"); - if (!enc.isDict()) { - return gFalse; - } - - Object diff = enc.dictLookup("Differences"); - if (!diff.isArray()) { - return gFalse; - } - - for (int i = 0; i < diff.arrayGetLength() && numeric; ++i) { - Object obj = diff.arrayGet(i); - if (obj.isInt()) { - // All sequences must start between character codes 0 and 5. - if (obj.getInt() > 5) - numeric = gFalse; - } else if (obj.isName()) { - // All character names must sucessfully parse. - if (!parseNumericName(obj.getName(), hex, nullptr)) - numeric = gFalse; - } else { - numeric = gFalse; - } - } - - return numeric; -} - -Gfx8BitFont::Gfx8BitFont(XRef *xref, const char *tagA, Ref idA, GooString *nameA, - GfxFontType typeA, Ref embFontIDA, Dict *fontDict): - GfxFont(tagA, idA, nameA, typeA, embFontIDA) { - GooString *name2; - BuiltinFont *builtinFont; - const char **baseEnc; - GBool baseEncFromFontFile; - char *buf; - int len; - FoFiType1 *ffT1; - FoFiType1C *ffT1C; - int code; - char *charName; - GBool missing, hex; - GBool numeric; - Unicode toUnicode[256]; - Unicode uBuf[8]; - double mul; - int firstChar, lastChar; - Gushort w; - Object obj1; - int n, i, a, b, m; - - refCnt = 1; - ctu = nullptr; - - // do font name substitution for various aliases of the Base 14 font - // names - base14 = nullptr; - if (name) { - name2 = name->copy(); - i = 0; - while (i < name2->getLength()) { - if (name2->getChar(i) == ' ') { - name2->del(i); - } else { - ++i; - } - } - a = 0; - b = sizeof(base14FontMap) / sizeof(Base14FontMapEntry); - // invariant: base14FontMap[a].altName <= name2 < base14FontMap[b].altName - while (b - a > 1) { - m = (a + b) / 2; - if (name2->cmp(base14FontMap[m].altName) >= 0) { - a = m; - } else { - b = m; - } - } - if (!name2->cmp(base14FontMap[a].altName)) { - base14 = &base14FontMap[a]; - } - delete name2; - } - - // is it a built-in font? - builtinFont = nullptr; - if (base14) { - for (i = 0; i < nBuiltinFonts; ++i) { - if (!strcmp(base14->base14Name, builtinFonts[i].name)) { - builtinFont = &builtinFonts[i]; - break; - } - } - } - - // default ascent/descent values - if (builtinFont) { - ascent = 0.001 * builtinFont->ascent; - descent = 0.001 * builtinFont->descent; - fontBBox[0] = 0.001 * builtinFont->bbox[0]; - fontBBox[1] = 0.001 * builtinFont->bbox[1]; - fontBBox[2] = 0.001 * builtinFont->bbox[2]; - fontBBox[3] = 0.001 * builtinFont->bbox[3]; - } else { - ascent = 0.95; - descent = -0.35; - fontBBox[0] = fontBBox[1] = fontBBox[2] = fontBBox[3] = 0; - } - - // get info from font descriptor - readFontDescriptor(xref, fontDict); - - // for non-embedded fonts, don't trust the ascent/descent/bbox - // values from the font descriptor - if (builtinFont && embFontID.num < 0) { - ascent = 0.001 * builtinFont->ascent; - descent = 0.001 * builtinFont->descent; - fontBBox[0] = 0.001 * builtinFont->bbox[0]; - fontBBox[1] = 0.001 * builtinFont->bbox[1]; - fontBBox[2] = 0.001 * builtinFont->bbox[2]; - fontBBox[3] = 0.001 * builtinFont->bbox[3]; - } - - // get font matrix - fontMat[0] = fontMat[3] = 1; - fontMat[1] = fontMat[2] = fontMat[4] = fontMat[5] = 0; - obj1 = fontDict->lookup("FontMatrix"); - if (obj1.isArray()) { - for (i = 0; i < 6 && i < obj1.arrayGetLength(); ++i) { - Object obj2 = obj1.arrayGet(i); - if (obj2.isNum()) { - fontMat[i] = obj2.getNum(); - } - } - } - - // get Type 3 bounding box, font definition, and resources - if (type == fontType3) { - obj1 = fontDict->lookup("FontBBox"); - if (obj1.isArray()) { - for (i = 0; i < 4 && i < obj1.arrayGetLength(); ++i) { - Object obj2 = obj1.arrayGet(i); - if (obj2.isNum()) { - fontBBox[i] = obj2.getNum(); - } - } - } - charProcs = fontDict->lookup("CharProcs"); - if (!charProcs.isDict()) { - error(errSyntaxError, -1, - "Missing or invalid CharProcs dictionary in Type 3 font"); - charProcs.setToNull(); - } - resources = fontDict->lookup("Resources"); - if (!resources.isDict()) { - resources.setToNull(); - } - } - - //----- build the font encoding ----- - - // Encodings start with a base encoding, which can come from - // (in order of priority): - // 1. FontDict.Encoding or FontDict.Encoding.BaseEncoding - // - MacRoman / MacExpert / WinAnsi / Standard - // 2. embedded or external font file - // 3. default: - // - builtin --> builtin encoding - // - TrueType --> WinAnsiEncoding - // - others --> StandardEncoding - // and then add a list of differences (if any) from - // FontDict.Encoding.Differences. - - // check FontDict for base encoding - hasEncoding = gFalse; - usesMacRomanEnc = gFalse; - baseEnc = nullptr; - baseEncFromFontFile = gFalse; - obj1 = fontDict->lookup("Encoding"); - if (obj1.isDict()) { - Object obj2 = obj1.dictLookup("BaseEncoding"); - if (obj2.isName("MacRomanEncoding")) { - hasEncoding = gTrue; - usesMacRomanEnc = gTrue; - baseEnc = macRomanEncoding; - } else if (obj2.isName("MacExpertEncoding")) { - hasEncoding = gTrue; - baseEnc = macExpertEncoding; - } else if (obj2.isName("WinAnsiEncoding")) { - hasEncoding = gTrue; - baseEnc = winAnsiEncoding; - } - } else if (obj1.isName("MacRomanEncoding")) { - hasEncoding = gTrue; - usesMacRomanEnc = gTrue; - baseEnc = macRomanEncoding; - } else if (obj1.isName("MacExpertEncoding")) { - hasEncoding = gTrue; - baseEnc = macExpertEncoding; - } else if (obj1.isName("WinAnsiEncoding")) { - hasEncoding = gTrue; - baseEnc = winAnsiEncoding; - } - - // check embedded font file for base encoding - // (only for Type 1 fonts - trying to get an encoding out of a - // TrueType font is a losing proposition) - ffT1 = nullptr; - ffT1C = nullptr; - buf = nullptr; - if (type == fontType1 && embFontID.num >= 0) { - if ((buf = readEmbFontFile(xref, &len))) { - if ((ffT1 = FoFiType1::make(buf, len))) { - if (ffT1->getName()) { - if (embFontName) { - delete embFontName; - } - embFontName = new GooString(ffT1->getName()); - } - if (!baseEnc) { - baseEnc = (const char **)ffT1->getEncoding(); - baseEncFromFontFile = gTrue; - } - } - gfree(buf); - } - } else if (type == fontType1C && embFontID.num >= 0) { - if ((buf = readEmbFontFile(xref, &len))) { - if ((ffT1C = FoFiType1C::make(buf, len))) { - if (ffT1C->getName()) { - if (embFontName) { - delete embFontName; - } - embFontName = new GooString(ffT1C->getName()); - } - if (!baseEnc) { - baseEnc = (const char **)ffT1C->getEncoding(); - baseEncFromFontFile = gTrue; - } - } - gfree(buf); - } - } - - // get default base encoding - if (!baseEnc) { - if (builtinFont && embFontID.num < 0) { - baseEnc = builtinFont->defaultBaseEnc; - hasEncoding = gTrue; - } else if (type == fontTrueType) { - baseEnc = winAnsiEncoding; - } else { - baseEnc = standardEncoding; - } - } - - if (baseEncFromFontFile) { - encodingName->Set("Builtin"); - } else if (baseEnc == winAnsiEncoding) { - encodingName->Set("WinAnsi"); - } else if (baseEnc == macRomanEncoding) { - encodingName->Set("MacRoman"); - } else if (baseEnc == macExpertEncoding) { - encodingName->Set("MacExpert"); - } else if (baseEnc == symbolEncoding) { - encodingName->Set("Symbol"); - } else if (baseEnc == zapfDingbatsEncoding) { - encodingName->Set("ZapfDingbats"); - } else { - encodingName->Set("Standard"); - } - - // copy the base encoding - for (i = 0; i < 256; ++i) { - enc[i] = (char *)baseEnc[i]; - if ((encFree[i] = baseEncFromFontFile) && enc[i]) { - enc[i] = copyString(baseEnc[i]); - } - } - - // some Type 1C font files have empty encodings, which can break the - // T1C->T1 conversion (since the 'seac' operator depends on having - // the accents in the encoding), so we fill in any gaps from - // StandardEncoding - if (type == fontType1C && embFontID.num >= 0 && baseEncFromFontFile) { - for (i = 0; i < 256; ++i) { - if (!enc[i] && standardEncoding[i]) { - enc[i] = (char *)standardEncoding[i]; - encFree[i] = gFalse; - } - } - } - - // merge differences into encoding - if (obj1.isDict()) { - Object obj2 = obj1.dictLookup("Differences"); - if (obj2.isArray()) { - encodingName->Set("Custom"); - hasEncoding = gTrue; - code = 0; - for (i = 0; i < obj2.arrayGetLength(); ++i) { - Object obj3 = obj2.arrayGet(i); - if (obj3.isInt()) { - code = obj3.getInt(); - } else if (obj3.isName()) { - if (code >= 0 && code < 256) { - if (encFree[code]) { - gfree(enc[code]); - } - enc[code] = copyString(obj3.getName()); - encFree[code] = gTrue; - } - ++code; - } else { - error(errSyntaxError, -1, - "Wrong type in font encoding resource differences ({0:s})", - obj3.getTypeName()); - } - } - } - } - delete ffT1; - delete ffT1C; - - //----- build the mapping to Unicode ----- - - // pass 1: use the name-to-Unicode mapping table - missing = hex = gFalse; - GBool isZapfDingbats = name && name->endsWith("ZapfDingbats"); - for (code = 0; code < 256; ++code) { - if ((charName = enc[code])) { - if (isZapfDingbats) { - // include ZapfDingbats names - toUnicode[code] = globalParams->mapNameToUnicodeAll(charName); - } else { - toUnicode[code] = globalParams->mapNameToUnicodeText(charName); - } - if (!toUnicode[code] && strcmp(charName, ".notdef")) { - // if it wasn't in the name-to-Unicode table, check for a - // name that looks like 'Axx' or 'xx', where 'A' is any letter - // and 'xx' is two hex digits - if ((strlen(charName) == 3 && - isalpha(charName[0]) && - isxdigit(charName[1]) && isxdigit(charName[2]) && - ((charName[1] >= 'a' && charName[1] <= 'f') || - (charName[1] >= 'A' && charName[1] <= 'F') || - (charName[2] >= 'a' && charName[2] <= 'f') || - (charName[2] >= 'A' && charName[2] <= 'F'))) || - (strlen(charName) == 2 && - isxdigit(charName[0]) && isxdigit(charName[1]) && - // Only check idx 1 to avoid misidentifying a decimal - // number like a0 - ((charName[1] >= 'a' && charName[1] <= 'f') || - (charName[1] >= 'A' && charName[1] <= 'F')))) { - hex = gTrue; - } - missing = gTrue; - } - } else { - toUnicode[code] = 0; - } - } - - numeric = testForNumericNames(fontDict, hex); - - // construct the char code -> Unicode mapping object - ctu = CharCodeToUnicode::make8BitToUnicode(toUnicode); - - // pass 1a: Expand ligatures in the Alphabetic Presentation Form - // block (eg "fi", "ffi") to normal form - for (code = 0; code < 256; ++code) { - if (unicodeIsAlphabeticPresentationForm(toUnicode[code])) { - Unicode *normalized = unicodeNormalizeNFKC(&toUnicode[code], 1, &len, nullptr); - if (len > 1) - ctu->setMapping((CharCode)code, normalized, len); - gfree(normalized); - } - } - - // pass 2: try to fill in the missing chars, looking for ligatures, numeric - // references and variants - if (missing) { - for (code = 0; code < 256; ++code) { - if (!toUnicode[code]) { - if ((charName = enc[code]) && strcmp(charName, ".notdef") - && (n = parseCharName(charName, uBuf, sizeof(uBuf)/sizeof(*uBuf), - gFalse, // don't check simple names (pass 1) - gTrue, // do check ligatures - numeric, - hex, - gTrue))) { // do check variants - ctu->setMapping((CharCode)code, uBuf, n); - continue; - } - - // do a simple pass-through - // mapping for unknown character names - uBuf[0] = code; - ctu->setMapping((CharCode)code, uBuf, 1); - } - } - } - - // merge in a ToUnicode CMap, if there is one -- this overwrites - // existing entries in ctu, i.e., the ToUnicode CMap takes - // precedence, but the other encoding info is allowed to fill in any - // holes - readToUnicodeCMap(fontDict, 16, ctu); - - //----- get the character widths ----- - - // initialize all widths - for (code = 0; code < 256; ++code) { - widths[code] = missingWidth * 0.001; - } - - // use widths from font dict, if present - obj1 = fontDict->lookup("FirstChar"); - firstChar = obj1.isInt() ? obj1.getInt() : 0; - if (firstChar < 0 || firstChar > 255) { - firstChar = 0; - } - obj1 = fontDict->lookup("LastChar"); - lastChar = obj1.isInt() ? obj1.getInt() : 255; - if (lastChar < 0 || lastChar > 255) { - lastChar = 255; - } - mul = (type == fontType3) ? fontMat[0] : 0.001; - obj1 = fontDict->lookup("Widths"); - if (obj1.isArray()) { - flags |= fontFixedWidth; - if (obj1.arrayGetLength() < lastChar - firstChar + 1) { - lastChar = firstChar + obj1.arrayGetLength() - 1; - } - for (code = firstChar; code <= lastChar; ++code) { - Object obj2 = obj1.arrayGet(code - firstChar); - if (obj2.isNum()) { - widths[code] = obj2.getNum() * mul; - if (fabs(widths[code] - widths[firstChar]) > 0.00001) { - flags &= ~fontFixedWidth; - } - } - } - - // use widths from built-in font - } else if (builtinFont) { - // this is a kludge for broken PDF files that encode char 32 - // as .notdef - if (builtinFont->widths->getWidth("space", &w)) { - widths[32] = 0.001 * w; - } - for (code = 0; code < 256; ++code) { - if (enc[code] && builtinFont->widths->getWidth(enc[code], &w)) { - widths[code] = 0.001 * w; - } - } - - // couldn't find widths -- use defaults - } else { - // this is technically an error -- the Widths entry is required - // for all but the Base-14 fonts -- but certain PDF generators - // apparently don't include widths for Arial and TimesNewRoman - if (isFixedWidth()) { - i = 0; - } else if (isSerif()) { - i = 8; - } else { - i = 4; - } - if (isBold()) { - i += 2; - } - if (isItalic()) { - i += 1; - } - builtinFont = builtinFontSubst[i]; - // this is a kludge for broken PDF files that encode char 32 - // as .notdef - if (builtinFont->widths->getWidth("space", &w)) { - widths[32] = 0.001 * w; - } - for (code = 0; code < 256; ++code) { - if (enc[code] && builtinFont->widths->getWidth(enc[code], &w)) { - widths[code] = 0.001 * w; - } - } - } - - ok = gTrue; -} - -Gfx8BitFont::~Gfx8BitFont() { - int i; - - for (i = 0; i < 256; ++i) { - if (encFree[i] && enc[i]) { - gfree(enc[i]); - } - } - ctu->decRefCnt(); -} - -// This function is in part a derived work of the Adobe Glyph Mapping -// Convention: http://www.adobe.com/devnet/opentype/archives/glyph.html -// Algorithmic comments are excerpted from that document to aid -// maintainability. -static int parseCharName(char *charName, Unicode *uBuf, int uLen, - GBool names, GBool ligatures, - GBool numeric, GBool hex, GBool variants) -{ - if (uLen <= 0) { - error(errInternal, -1, "Zero-length output buffer (recursion overflow?) in " - "parseCharName, component \"{0:s}\"", charName); - return 0; - } - // Step 1: drop all the characters from the glyph name starting with the - // first occurrence of a period (U+002E FULL STOP), if any. - if (variants) { - char *var_part = strchr(charName, '.'); - if (var_part == charName) { - return 0; // .notdef or similar - } else if (var_part != nullptr) { - // parse names of the form 7.oldstyle, P.swash, s.sc, etc. - char *main_part = gstrndup(charName, var_part - charName); - GBool namesRecurse = gTrue, variantsRecurse = gFalse; - int n = parseCharName(main_part, uBuf, uLen, namesRecurse, ligatures, - numeric, hex, variantsRecurse); - gfree(main_part); - return n; - } - } - // Step 2: split the remaining string into a sequence of components, using - // underscore (U+005F LOW LINE) as the delimiter. - if (ligatures && strchr(charName, '_')) { - // parse names of the form A_a (e.g. f_i, T_h, l_quotesingle) - char *lig_part, *lig_end, *lig_copy; - int n = 0, m; - lig_part = lig_copy = copyString(charName); - do { - if ((lig_end = strchr(lig_part, '_'))) - *lig_end = '\0'; - if (lig_part[0] != '\0') { - GBool namesRecurse = gTrue, ligaturesRecurse = gFalse; - if ((m = parseCharName(lig_part, uBuf + n, uLen - n, namesRecurse, - ligaturesRecurse, numeric, hex, variants))) - n += m; - else - error(errSyntaxWarning, -1, "Could not parse ligature component \"{0:s}\" of \"{1:s}\" in " - "parseCharName", lig_part, charName); - } - lig_part = lig_end + 1; - } while (lig_end && n < uLen); - gfree(lig_copy); - return n; - } - // Step 3: map each component to a character string according to the - // procedure below, and concatenate those strings; the result is the - // character string to which the glyph name is mapped. - // 3.1. if the font is Zapf Dingbats (PostScript FontName ZapfDingbats), and - // the component is in the ZapfDingbats list, then map it to the - // corresponding character in that list. - // 3.2. otherwise, if the component is in the Adobe Glyph List, then map it - // to the corresponding character in that list. - if (names && (uBuf[0] = globalParams->mapNameToUnicodeText(charName))) { - return 1; - } - unsigned int n = strlen(charName); - // 3.3. otherwise, if the component is of the form "uni" (U+0075 U+006E - // U+0069) followed by a sequence of uppercase hexadecimal digits (0 .. 9, - // A .. F, i.e. U+0030 .. U+0039, U+0041 .. U+0046), the length of that - // sequence is a multiple of four, and each group of four digits represents - // a number in the set {0x0000 .. 0xD7FF, 0xE000 .. 0xFFFF}, then interpret - // each such number as a Unicode scalar value and map the component to the - // string made of those scalar values. Note that the range and digit length - // restrictions mean that the "uni" prefix can be used only with Unicode - // values from the Basic Multilingual Plane (BMP). - if (n >= 7 && (n % 4) == 3 && !strncmp(charName, "uni", 3)) { - int i; - unsigned int m; - for (i = 0, m = 3; i < uLen && m < n; m += 4) { - if (isxdigit(charName[m]) && isxdigit(charName[m + 1]) && - isxdigit(charName[m + 2]) && isxdigit(charName[m + 3])) { - unsigned int u; - sscanf(charName + m, "%4x", &u); - if (u <= 0xD7FF || (0xE000 <= u && u <= 0xFFFF)) { - uBuf[i++] = u; - } - } - } - return i; - } - // 3.4. otherwise, if the component is of the form "u" (U+0075) followed by - // a sequence of four to six uppercase hexadecimal digits {0 .. 9, A .. F} - // (U+0030 .. U+0039, U+0041 .. U+0046), and those digits represent a - // number in {0x0000 .. 0xD7FF, 0xE000 .. 0x10FFFF}, then interpret this - // number as a Unicode scalar value and map the component to the string - // made of this scalar value. - if (n >= 5 && n <= 7 && charName[0] == 'u' && isxdigit(charName[1]) && - isxdigit(charName[2]) && isxdigit(charName[3]) && isxdigit(charName[4]) - && (n <= 5 || isxdigit(charName[5])) - && (n <= 6 || isxdigit(charName[6]))) { - unsigned int u; - sscanf(charName + 1, "%x", &u); - if (u <= 0xD7FF || (0xE000 <= u && u <= 0x10FFFF)) { - uBuf[0] = u; - return 1; - } - } - // Not in Adobe Glyph Mapping convention: look for names like xx - // or Axx and parse for hex or decimal values. - if (numeric && parseNumericName(charName, hex, uBuf)) - return 1; - // 3.5. otherwise, map the component to the empty string - return 0; -} - -int Gfx8BitFont::getNextChar(const char *s, int len, CharCode *code, - Unicode **u, int *uLen, - double *dx, double *dy, double *ox, double *oy) const { - CharCode c; - - *code = c = (CharCode)(*s & 0xff); - *uLen = ctu->mapToUnicode(c, u); - *dx = widths[c]; - *dy = *ox = *oy = 0; - return 1; -} - -const CharCodeToUnicode *Gfx8BitFont::getToUnicode() const { - return ctu; -} - -int *Gfx8BitFont::getCodeToGIDMap(FoFiTrueType *ff) { - int *map; - int cmapPlatform, cmapEncoding; - int unicodeCmap, macRomanCmap, msSymbolCmap, cmap; - GBool useMacRoman, useUnicode; - char *charName; - Unicode u; - int code, i, n; - - map = (int *)gmallocn(256, sizeof(int)); - for (i = 0; i < 256; ++i) { - map[i] = 0; - } - - // To match up with the Adobe-defined behaviour, we choose a cmap - // like this: - // 1. If the PDF font has an encoding: - // 1a. If the TrueType font has a Microsoft Unicode - // cmap or a non-Microsoft Unicode cmap, use it, and use the - // Unicode indexes, not the char codes. - // 1b. If the PDF font specified MacRomanEncoding and the - // TrueType font has a Macintosh Roman cmap, use it, and - // reverse map the char names through MacRomanEncoding to - // get char codes. - // 1c. If the PDF font is symbolic and the TrueType font has a - // Microsoft Symbol cmap, use it, and use char codes - // directly (possibly with an offset of 0xf000). - // 1d. If the TrueType font has a Macintosh Roman cmap, use it, - // as in case 1a. - // 2. If the PDF font does not have an encoding or the PDF font is - // symbolic: - // 2a. If the TrueType font has a Macintosh Roman cmap, use it, - // and use char codes directly (possibly with an offset of - // 0xf000). - // 2b. If the TrueType font has a Microsoft Symbol cmap, use it, - // and use char codes directly (possible with an offset of - // 0xf000). - // 3. If none of these rules apply, use the first cmap and hope for - // the best (this shouldn't happen). - unicodeCmap = macRomanCmap = msSymbolCmap = -1; - for (i = 0; i < ff->getNumCmaps(); ++i) { - cmapPlatform = ff->getCmapPlatform(i); - cmapEncoding = ff->getCmapEncoding(i); - if ((cmapPlatform == 3 && cmapEncoding == 1) || - cmapPlatform == 0) { - unicodeCmap = i; - } else if (cmapPlatform == 1 && cmapEncoding == 0) { - macRomanCmap = i; - } else if (cmapPlatform == 3 && cmapEncoding == 0) { - msSymbolCmap = i; - } - } - cmap = 0; - useMacRoman = gFalse; - useUnicode = gFalse; - if (hasEncoding || type == fontType1) { - if (unicodeCmap >= 0) { - cmap = unicodeCmap; - useUnicode = gTrue; - } else if (usesMacRomanEnc && macRomanCmap >= 0) { - cmap = macRomanCmap; - useMacRoman = gTrue; - } else if ((flags & fontSymbolic) && msSymbolCmap >= 0) { - cmap = msSymbolCmap; - } else if ((flags & fontSymbolic) && macRomanCmap >= 0) { - cmap = macRomanCmap; - } else if (macRomanCmap >= 0) { - cmap = macRomanCmap; - useMacRoman = gTrue; - } - } else { - if (msSymbolCmap >= 0) { - cmap = msSymbolCmap; - } else if (macRomanCmap >= 0) { - cmap = macRomanCmap; - } - } - - // reverse map the char names through MacRomanEncoding, then map the - // char codes through the cmap - if (useMacRoman) { - for (i = 0; i < 256; ++i) { - if ((charName = enc[i])) { - if ((code = globalParams->getMacRomanCharCode(charName))) { - map[i] = ff->mapCodeToGID(cmap, code); - } - } else { - map[i] = -1; - } - } - - // map Unicode through the cmap - } else if (useUnicode) { - Unicode *uAux; - for (i = 0; i < 256; ++i) { - if (((charName = enc[i]) && (u = globalParams->mapNameToUnicodeAll(charName)))) - map[i] = ff->mapCodeToGID(cmap, u); - else - { - n = ctu->mapToUnicode((CharCode)i, &uAux); - if (n > 0) map[i] = ff->mapCodeToGID(cmap, uAux[0]); - else map[i] = -1; - } - } - - // map the char codes through the cmap, possibly with an offset of - // 0xf000 - } else { - for (i = 0; i < 256; ++i) { - if (!(map[i] = ff->mapCodeToGID(cmap, i))) { - map[i] = ff->mapCodeToGID(cmap, 0xf000 + i); - } - } - } - - // try the TrueType 'post' table to handle any unmapped characters - for (i = 0; i < 256; ++i) { - if (map[i] <= 0 && (charName = enc[i])) { - map[i] = ff->mapNameToGID(charName); - } - } - - return map; -} - -Dict *Gfx8BitFont::getCharProcs() { - return charProcs.isDict() ? charProcs.getDict() : (Dict *)nullptr; -} - -Object Gfx8BitFont::getCharProc(int code) { - if (enc[code] && charProcs.isDict()) { - return charProcs.dictLookup(enc[code]); - } else { - return Object(objNull); - } -} - -Object Gfx8BitFont::getCharProcNF(int code) { - if (enc[code] && charProcs.isDict()) { - return charProcs.dictLookupNF(enc[code]); - } else { - return Object(objNull); - } -} - -Dict *Gfx8BitFont::getResources() { - return resources.isDict() ? resources.getDict() : (Dict *)nullptr; -} - -//------------------------------------------------------------------------ -// GfxCIDFont -//------------------------------------------------------------------------ - -struct cmpWidthExcepFunctor { - bool operator()(const GfxFontCIDWidthExcep &w1, - const GfxFontCIDWidthExcep &w2) { - return w1.first < w2.first; - } -}; - -struct cmpWidthExcepVFunctor { - bool operator()(const GfxFontCIDWidthExcepV &w1, - const GfxFontCIDWidthExcepV &w2) { - return w1.first < w2.first; - } -}; - -GfxCIDFont::GfxCIDFont(XRef *xref, const char *tagA, Ref idA, GooString *nameA, - GfxFontType typeA, Ref embFontIDA, Dict *fontDict): - GfxFont(tagA, idA, nameA, typeA, embFontIDA) -{ - Dict *desFontDict; - Object desFontDictObj; - Object obj1, obj2, obj3, obj4, obj5, obj6; - int c1, c2; - int excepsSize, j, k; - - refCnt = 1; - ascent = 0.95; - descent = -0.35; - fontBBox[0] = fontBBox[1] = fontBBox[2] = fontBBox[3] = 0; - collection = nullptr; - cMap = nullptr; - ctu = nullptr; - ctuUsesCharCode = gTrue; - widths.defWidth = 1.0; - widths.defHeight = -1.0; - widths.defVY = 0.880; - widths.exceps = nullptr; - widths.nExceps = 0; - widths.excepsV = nullptr; - widths.nExcepsV = 0; - cidToGID = nullptr; - cidToGIDLen = 0; - - // get the descendant font - obj1 = fontDict->lookup("DescendantFonts"); - if (!obj1.isArray() || obj1.arrayGetLength() == 0) { - error(errSyntaxError, -1, "Missing or empty DescendantFonts entry in Type 0 font"); - return; - } - desFontDictObj = obj1.arrayGet(0); - if (!desFontDictObj.isDict()) { - error(errSyntaxError, -1, "Bad descendant font in Type 0 font"); - return; - } - desFontDict = desFontDictObj.getDict(); - - // get info from font descriptor - readFontDescriptor(xref, desFontDict); - - //----- encoding info ----- - - // char collection - obj1 = desFontDict->lookup("CIDSystemInfo"); - if (!obj1.isDict()) { - error(errSyntaxError, -1, "Missing CIDSystemInfo dictionary in Type 0 descendant font"); - return; - } - obj2 = obj1.dictLookup("Registry"); - obj3 = obj1.dictLookup("Ordering"); - if (!obj2.isString() || !obj3.isString()) { - error(errSyntaxError, -1, "Invalid CIDSystemInfo dictionary in Type 0 descendant font"); - return; - } - collection = obj2.getString()->copy()->append('-')->append(obj3.getString()); - - // look for a ToUnicode CMap - if (!(ctu = readToUnicodeCMap(fontDict, 16, nullptr))) { - ctuUsesCharCode = gFalse; - - // use an identity mapping for the "Adobe-Identity" and - // "Adobe-UCS" collections - if (!collection->cmp("Adobe-Identity") || - !collection->cmp("Adobe-UCS")) { - ctu = CharCodeToUnicode::makeIdentityMapping(); - } else { - // look for a user-supplied .cidToUnicode file - if (!(ctu = globalParams->getCIDToUnicode(collection))) { - // I'm not completely sure that this is the best thing to do - // but it seems to produce better results when the .cidToUnicode - // files from the poppler-data package are missing. At least - // we know that assuming the Identity mapping is definitely wrong. - // -- jrmuizel - static const char * knownCollections [] = { - "Adobe-CNS1", - "Adobe-GB1", - "Adobe-Japan1", - "Adobe-Japan2", - "Adobe-Korea1", - }; - for (size_t i = 0; i < sizeof(knownCollections)/sizeof(knownCollections[0]); i++) { - if (collection->cmp(knownCollections[i]) == 0) { - error(errSyntaxError, -1, "Missing language pack for '{0:t}' mapping", collection); - return; - } - } - error(errSyntaxError, -1, "Unknown character collection '{0:t}'", - collection); - // fall-through, assuming the Identity mapping -- this appears - // to match Adobe's behavior - } - } - } - - // encoding (i.e., CMap) - obj1 = fontDict->lookup("Encoding"); - if (obj1.isNull()) { - error(errSyntaxError, -1, "Missing Encoding entry in Type 0 font"); - return; - } - if (!(cMap = CMap::parse(nullptr, collection, &obj1))) { - return; - } - if (cMap->getCMapName()) { - encodingName->Set(cMap->getCMapName()->getCString()); - } else { - encodingName->Set("Custom"); - } - - // CIDToGIDMap (for embedded TrueType fonts) - if (type == fontCIDType2 || type == fontCIDType2OT) { - obj1 = desFontDict->lookup("CIDToGIDMap"); - if (obj1.isStream()) { - cidToGIDLen = 0; - int i = 64; - cidToGID = (int *)gmallocn(i, sizeof(int)); - obj1.streamReset(); - while ((c1 = obj1.streamGetChar()) != EOF && - (c2 = obj1.streamGetChar()) != EOF) { - if (cidToGIDLen == i) { - i *= 2; - cidToGID = (int *)greallocn(cidToGID, i, sizeof(int)); - } - cidToGID[cidToGIDLen++] = (c1 << 8) + c2; - } - } else if (!obj1.isName("Identity") && !obj1.isNull()) { - error(errSyntaxError, -1, "Invalid CIDToGIDMap entry in CID font"); - } - } - - //----- character metrics ----- - - // default char width - obj1 = desFontDict->lookup("DW"); - if (obj1.isInt()) { - widths.defWidth = obj1.getInt() * 0.001; - } - - // char width exceptions - obj1 = desFontDict->lookup("W"); - if (obj1.isArray()) { - excepsSize = 0; - int i = 0; - while (i + 1 < obj1.arrayGetLength()) { - obj2 = obj1.arrayGet(i); - obj3 = obj1.arrayGet(i + 1); - if (obj2.isInt() && obj3.isInt() && i + 2 < obj1.arrayGetLength()) { - obj4 = obj1.arrayGet(i + 2); - if (obj4.isNum()) { - if (widths.nExceps == excepsSize) { - excepsSize += 16; - widths.exceps = (GfxFontCIDWidthExcep *) - greallocn(widths.exceps, - excepsSize, sizeof(GfxFontCIDWidthExcep)); - } - widths.exceps[widths.nExceps].first = obj2.getInt(); - widths.exceps[widths.nExceps].last = obj3.getInt(); - widths.exceps[widths.nExceps].width = obj4.getNum() * 0.001; - ++widths.nExceps; - } else { - error(errSyntaxError, -1, "Bad widths array in Type 0 font"); - } - i += 3; - } else if (obj2.isInt() && obj3.isArray()) { - if (widths.nExceps + obj3.arrayGetLength() > excepsSize) { - excepsSize = (widths.nExceps + obj3.arrayGetLength() + 15) & ~15; - widths.exceps = (GfxFontCIDWidthExcep *) - greallocn(widths.exceps, - excepsSize, sizeof(GfxFontCIDWidthExcep)); - } - j = obj2.getInt(); - for (k = 0; k < obj3.arrayGetLength(); ++k) { - obj4 = obj3.arrayGet(k); - if (obj4.isNum()) { - widths.exceps[widths.nExceps].first = j; - widths.exceps[widths.nExceps].last = j; - widths.exceps[widths.nExceps].width = obj4.getNum() * 0.001; - ++j; - ++widths.nExceps; - } else { - error(errSyntaxError, -1, "Bad widths array in Type 0 font"); - } - } - i += 2; - } else { - error(errSyntaxError, -1, "Bad widths array in Type 0 font"); - ++i; - } - } - std::sort(widths.exceps, widths.exceps + widths.nExceps, - cmpWidthExcepFunctor()); - } - - // default metrics for vertical font - obj1 = desFontDict->lookup("DW2"); - if (obj1.isArray() && - obj1.arrayGetLength() == 2) { - obj2 = obj1.arrayGet(0); - if (obj2.isNum()) { - widths.defVY = obj2.getNum() * 0.001; - } - obj2 = obj1.arrayGet(1); - if (obj2.isNum()) { - widths.defHeight = obj2.getNum() * 0.001; - } - } - - // char metric exceptions for vertical font - obj1 = desFontDict->lookup("W2"); - if (obj1.isArray()) { - excepsSize = 0; - int i = 0; - while (i + 1 < obj1.arrayGetLength()) { - obj2 = obj1.arrayGet(i); - obj3 = obj1.arrayGet(i+ 1); - if (obj2.isInt() && obj3.isInt() && i + 4 < obj1.arrayGetLength()) { - if ((obj4 = obj1.arrayGet(i + 2), obj4.isNum()) && - (obj5 = obj1.arrayGet(i + 3), obj5.isNum()) && - (obj6 = obj1.arrayGet(i + 4), obj6.isNum())) { - if (widths.nExcepsV == excepsSize) { - excepsSize += 16; - widths.excepsV = (GfxFontCIDWidthExcepV *) - greallocn(widths.excepsV, - excepsSize, sizeof(GfxFontCIDWidthExcepV)); - } - widths.excepsV[widths.nExcepsV].first = obj2.getInt(); - widths.excepsV[widths.nExcepsV].last = obj3.getInt(); - widths.excepsV[widths.nExcepsV].height = obj4.getNum() * 0.001; - widths.excepsV[widths.nExcepsV].vx = obj5.getNum() * 0.001; - widths.excepsV[widths.nExcepsV].vy = obj6.getNum() * 0.001; - ++widths.nExcepsV; - } else { - error(errSyntaxError, -1, "Bad widths (W2) array in Type 0 font"); - } - i += 5; - } else if (obj2.isInt() && obj3.isArray()) { - if (widths.nExcepsV + obj3.arrayGetLength() / 3 > excepsSize) { - excepsSize = - (widths.nExcepsV + obj3.arrayGetLength() / 3 + 15) & ~15; - widths.excepsV = (GfxFontCIDWidthExcepV *) - greallocn(widths.excepsV, - excepsSize, sizeof(GfxFontCIDWidthExcepV)); - } - j = obj2.getInt(); - for (k = 0; k < obj3.arrayGetLength(); k += 3) { - if ((obj4 = obj3.arrayGet(k), obj4.isNum()) && - (obj5 = obj3.arrayGet(k+1), obj5.isNum()) && - (obj6 = obj3.arrayGet(k+2), obj6.isNum())) { - widths.excepsV[widths.nExcepsV].first = j; - widths.excepsV[widths.nExcepsV].last = j; - widths.excepsV[widths.nExcepsV].height = obj4.getNum() * 0.001; - widths.excepsV[widths.nExcepsV].vx = obj5.getNum() * 0.001; - widths.excepsV[widths.nExcepsV].vy = obj6.getNum() * 0.001; - ++j; - ++widths.nExcepsV; - } else { - error(errSyntaxError, -1, "Bad widths (W2) array in Type 0 font"); - } - } - i += 2; - } else { - error(errSyntaxError, -1, "Bad widths (W2) array in Type 0 font"); - ++i; - } - } - std::sort(widths.excepsV, widths.excepsV + widths.nExcepsV, - cmpWidthExcepVFunctor()); - } - - ok = gTrue; -} - -GfxCIDFont::~GfxCIDFont() { - if (collection) { - delete collection; - } - if (cMap) { - cMap->decRefCnt(); - } - if (ctu) { - ctu->decRefCnt(); - } - gfree(widths.exceps); - gfree(widths.excepsV); - if (cidToGID) { - gfree(cidToGID); - } -} - -int GfxCIDFont::getNextChar(const char *s, int len, CharCode *code, - Unicode **u, int *uLen, - double *dx, double *dy, double *ox, double *oy) const { - CID cid; - CharCode dummy; - double w, h, vx, vy; - int n, a, b, m; - - if (!cMap) { - *code = 0; - *uLen = 0; - *dx = *dy = 0; - return 1; - } - - *code = (CharCode)(cid = cMap->getCID(s, len, &dummy, &n)); - if (ctu) { - if (hasToUnicode) { - int i = 0, c = 0; - while (i < n) { - c = (c << 8 ) + (s[i] & 0xff); - ++i; - } - *uLen = ctu->mapToUnicode(c, u); - } else { - *uLen = ctu->mapToUnicode(cid, u); - } - } else { - *uLen = 0; - } - - // horizontal - if (cMap->getWMode() == 0) { - w = getWidth(cid); - h = vx = vy = 0; - - // vertical - } else { - w = 0; - h = widths.defHeight; - vx = getWidth(cid) / 2; - vy = widths.defVY; - if (widths.nExcepsV > 0 && cid >= widths.excepsV[0].first) { - a = 0; - b = widths.nExcepsV; - // invariant: widths.excepsV[a].first <= cid < widths.excepsV[b].first - while (b - a > 1) { - m = (a + b) / 2; - if (widths.excepsV[m].last <= cid) { - a = m; - } else { - b = m; - } - } - if (cid <= widths.excepsV[a].last) { - h = widths.excepsV[a].height; - vx = widths.excepsV[a].vx; - vy = widths.excepsV[a].vy; - } - } - } - - *dx = w; - *dy = h; - *ox = vx; - *oy = vy; - - return n; -} - -int GfxCIDFont::getWMode() { - return cMap ? cMap->getWMode() : 0; -} - -const CharCodeToUnicode *GfxCIDFont::getToUnicode() const { - return ctu; -} - -GooString *GfxCIDFont::getCollection() { - return cMap ? cMap->getCollection() : (GooString *)nullptr; -} - -int GfxCIDFont::mapCodeToGID(FoFiTrueType *ff, int cmapi, - Unicode unicode, GBool wmode) { - Gushort gid = ff->mapCodeToGID(cmapi,unicode); - if (wmode) { - Gushort vgid = ff->mapToVertGID(gid); - if (vgid != 0) gid = vgid; - } - return gid; -} - -int *GfxCIDFont::getCodeToGIDMap(FoFiTrueType *ff, int *mapsizep) { -#define N_UCS_CANDIDATES 2 - /* space characters */ - static const unsigned long spaces[] = { - 0x2000,0x2001,0x2002,0x2003,0x2004,0x2005,0x2006,0x2007, - 0x2008,0x2009,0x200A,0x00A0,0x200B,0x2060,0x3000,0xFEFF, - 0 - }; - static const char *adobe_cns1_cmaps[] = { - "UniCNS-UTF32-V", - "UniCNS-UCS2-V", - "UniCNS-UTF32-H", - "UniCNS-UCS2-H", - nullptr - }; - static const char *adobe_gb1_cmaps[] = { - "UniGB-UTF32-V", - "UniGB-UCS2-V", - "UniGB-UTF32-H", - "UniGB-UCS2-H", - nullptr - }; - static const char *adobe_japan1_cmaps[] = { - "UniJIS-UTF32-V", - "UniJIS-UCS2-V", - "UniJIS-UTF32-H", - "UniJIS-UCS2-H", - nullptr - }; - static const char *adobe_japan2_cmaps[] = { - "UniHojo-UTF32-V", - "UniHojo-UCS2-V", - "UniHojo-UTF32-H", - "UniHojo-UCS2-H", - nullptr - }; - static const char *adobe_korea1_cmaps[] = { - "UniKS-UTF32-V", - "UniKS-UCS2-V", - "UniKS-UTF32-H", - "UniKS-UCS2-H", - nullptr - }; - static struct CMapListEntry { - const char *collection; - const char *scriptTag; - const char *languageTag; - const char *toUnicodeMap; - const char **CMaps; - } CMapList[] = { - { - "Adobe-CNS1", - "hani", "CHN ", - "Adobe-CNS1-UCS2", - adobe_cns1_cmaps, - }, - { - "Adobe-GB1", - "hani", "CHN ", - "Adobe-GB1-UCS2", - adobe_gb1_cmaps, - }, - { - "Adobe-Japan1", - "kana", "JAN ", - "Adobe-Japan1-UCS2", - adobe_japan1_cmaps, - }, - { - "Adobe-Japan2", - "kana", "JAN ", - "Adobe-Japan2-UCS2", - adobe_japan2_cmaps, - }, - { - "Adobe-Korea1", - "hang", "KOR ", - "Adobe-Korea1-UCS2", - adobe_korea1_cmaps, - }, - {nullptr, nullptr, nullptr, nullptr, nullptr} - }; - Unicode *humap = nullptr; - Unicode *vumap = nullptr; - Unicode *tumap = nullptr; - int *codeToGID = nullptr; - unsigned long n; - int i; - unsigned long code; - int wmode; - const char **cmapName; - CMap *cMap; - CMapListEntry *lp; - int cmap; - int cmapPlatform, cmapEncoding; - Ref embID; - - *mapsizep = 0; - if (!ctu || !getCollection()) return nullptr; - if (getCollection()->cmp("Adobe-Identity") == 0) return nullptr; - if (getEmbeddedFontID(&embID)) { - /* if this font is embedded font, - * CIDToGIDMap should be embedded in PDF file - * and already set. So return it. - */ - *mapsizep = getCIDToGIDLen(); - return getCIDToGID(); - } - - /* we use only unicode cmap */ - cmap = -1; - for (i = 0; i < ff->getNumCmaps(); ++i) { - cmapPlatform = ff->getCmapPlatform(i); - cmapEncoding = ff->getCmapEncoding(i); - if (cmapPlatform == 3 && cmapEncoding == 10) { - /* UCS-4 */ - cmap = i; - /* use UCS-4 cmap */ - break; - } else if (cmapPlatform == 3 && cmapEncoding == 1) { - /* Unicode */ - cmap = i; - } else if (cmapPlatform == 0 && cmap < 0) { - cmap = i; - } - } - if (cmap < 0) - return nullptr; - - wmode = getWMode(); - for (lp = CMapList;lp->collection != nullptr;lp++) { - if (strcmp(lp->collection,getCollection()->getCString()) == 0) { - break; - } - } - n = 65536; - tumap = new Unicode[n]; - humap = new Unicode[n*N_UCS_CANDIDATES]; - memset(humap,0,sizeof(Unicode)*n*N_UCS_CANDIDATES); - if (lp->collection != nullptr) { - CharCodeToUnicode *tctu; - GooString tname(lp->toUnicodeMap); - - if ((tctu = CharCodeToUnicode::parseCMapFromFile(&tname,16)) != nullptr) { - CharCode cid; - for (cid = 0;cid < n ;cid++) { - int len; - Unicode *ucodes; - - len = tctu->mapToUnicode(cid,&ucodes); - if (len == 1) { - tumap[cid] = ucodes[0]; - } else { - /* if not single character, ignore it */ - tumap[cid] = 0; - } - } - delete tctu; - } - vumap = new Unicode[n]; - memset(vumap,0,sizeof(Unicode)*n); - for (cmapName = lp->CMaps;*cmapName != nullptr;cmapName++) { - GooString cname(*cmapName); - - if ((cMap = globalParams->getCMap(getCollection(),&cname)) - != nullptr) { - if (cMap->getWMode()) { - cMap->setReverseMap(vumap,n,1); - } else { - cMap->setReverseMap(humap,n,N_UCS_CANDIDATES); - } - cMap->decRefCnt(); - } - } - ff->setupGSUB(lp->scriptTag, lp->languageTag); - } else { - error(errSyntaxError, -1, "Unknown character collection {0:t}\n", - getCollection()); - if (ctu) { - CharCode cid; - for (cid = 0;cid < n ;cid++) { - Unicode *ucode; - - if (ctu->mapToUnicode(cid, &ucode)) - humap[cid*N_UCS_CANDIDATES] = ucode[0]; - else - humap[cid*N_UCS_CANDIDATES] = 0; - for (i = 1;i < N_UCS_CANDIDATES;i++) { - humap[cid*N_UCS_CANDIDATES+i] = 0; - } - } - } - } - // map CID -> Unicode -> GID - codeToGID = (int *)gmallocn(n, sizeof(int)); - for (code = 0; code < n; ++code) { - Unicode unicode; - unsigned long gid; - - unicode = 0; - gid = 0; - if (humap != nullptr) { - for (i = 0;i < N_UCS_CANDIDATES - && gid == 0 && (unicode = humap[code*N_UCS_CANDIDATES+i]) != 0;i++) { - gid = mapCodeToGID(ff,cmap,unicode,gFalse); - } - } - if (gid == 0 && vumap != nullptr) { - unicode = vumap[code]; - if (unicode != 0) { - gid = mapCodeToGID(ff,cmap,unicode,gTrue); - if (gid == 0 && tumap != nullptr) { - if ((unicode = tumap[code]) != 0) { - gid = mapCodeToGID(ff,cmap,unicode,gTrue); - } - } - } - } - if (gid == 0 && tumap != nullptr) { - if ((unicode = tumap[code]) != 0) { - gid = mapCodeToGID(ff,cmap,unicode,gFalse); - } - } - if (gid == 0) { - /* special handling space characters */ - const unsigned long *p; - - if (humap != nullptr) unicode = humap[code]; - if (unicode != 0) { - /* check if code is space character , so map code to 0x0020 */ - for (p = spaces;*p != 0;p++) { - if (*p == unicode) { - unicode = 0x20; - gid = mapCodeToGID(ff,cmap,unicode,wmode); - break; - } - } - } - } - codeToGID[code] = gid; - } - *mapsizep = n; - if (humap != nullptr) delete[] humap; - if (tumap != nullptr) delete[] tumap; - if (vumap != nullptr) delete[] vumap; - return codeToGID; -} - -double GfxCIDFont::getWidth(CID cid) const { - double w; - int a, b, m; - - w = widths.defWidth; - if (widths.nExceps > 0 && cid >= widths.exceps[0].first) { - a = 0; - b = widths.nExceps; - // invariant: widths.exceps[a].first <= cid < widths.exceps[b].first - while (b - a > 1) { - m = (a + b) / 2; - if (widths.exceps[m].first <= cid) { - a = m; - } else { - b = m; - } - } - if (cid <= widths.exceps[a].last) { - w = widths.exceps[a].width; - } - } - return w; -} - -double GfxCIDFont::getWidth (char* s, int len) const { - int nUsed; - CharCode c; - - CID cid = cMap->getCID(s, len, &c, &nUsed); - return getWidth(cid); -} - -//------------------------------------------------------------------------ -// GfxFontDict -//------------------------------------------------------------------------ - -GfxFontDict::GfxFontDict(XRef *xref, Ref *fontDictRef, Dict *fontDict) { - int i; - Ref r; - - numFonts = fontDict->getLength(); - fonts = (GfxFont **)gmallocn(numFonts, sizeof(GfxFont *)); - for (i = 0; i < numFonts; ++i) { - Object obj1 = fontDict->getValNF(i); - Object obj2 = obj1.fetch(xref); - if (obj2.isDict()) { - if (obj1.isRef()) { - r = obj1.getRef(); - } else if (fontDictRef) { - // legal generation numbers are five digits, so we use a - // 6-digit number here - r.gen = 100000 + fontDictRef->num; - r.num = i; - } else { - // no indirect reference for this font, or for the containing - // font dict, so hash the font and use that - r.gen = 100000; - r.num = hashFontObject(&obj2); - } - fonts[i] = GfxFont::makeFont(xref, fontDict->getKey(i), - r, obj2.getDict()); - if (fonts[i] && !fonts[i]->isOk()) { - // XXX: it may be meaningful to distinguish between - // NULL and !isOk() so that when we do lookups - // we can tell the difference between a missing font - // and a font that is just !isOk() - fonts[i]->decRefCnt(); - fonts[i] = nullptr; - } - } else { - error(errSyntaxError, -1, "font resource is not a dictionary"); - fonts[i] = nullptr; - } - } -} - -GfxFontDict::~GfxFontDict() { - int i; - - for (i = 0; i < numFonts; ++i) { - if (fonts[i]) { - fonts[i]->decRefCnt(); - } - } - gfree(fonts); -} - -GfxFont *GfxFontDict::lookup(const char *tag) { - int i; - - for (i = 0; i < numFonts; ++i) { - if (fonts[i] && fonts[i]->matches(tag)) { - return fonts[i]; - } - } - return nullptr; -} - -// FNV-1a hash -class FNVHash { -public: - - FNVHash() { - h = 2166136261U; - } - - void hash(char c) { - h ^= c & 0xff; - h *= 16777619; - } - - void hash(const char *p, int n) { - int i; - for (i = 0; i < n; ++i) { - hash(p[i]); - } - } - - int get31() { - return (h ^ (h >> 31)) & 0x7fffffff; - } - -private: - - Guint h; -}; - -int GfxFontDict::hashFontObject(Object *obj) { - FNVHash h; - - hashFontObject1(obj, &h); - return h.get31(); -} - -void GfxFontDict::hashFontObject1(Object *obj, FNVHash *h) { - Object obj2; - const GooString *s; - const char *p; - double r; - int n, i; - - switch (obj->getType()) { - case objBool: - h->hash('b'); - h->hash(obj->getBool() ? 1 : 0); - break; - case objInt: - h->hash('i'); - n = obj->getInt(); - h->hash((char *)&n, sizeof(int)); - break; - case objReal: - h->hash('r'); - r = obj->getReal(); - h->hash((char *)&r, sizeof(double)); - break; - case objString: - h->hash('s'); - s = obj->getString(); - h->hash(s->getCString(), s->getLength()); - break; - case objName: - h->hash('n'); - p = obj->getName(); - h->hash(p, (int)strlen(p)); - break; - case objNull: - h->hash('z'); - break; - case objArray: - h->hash('a'); - n = obj->arrayGetLength(); - h->hash((char *)&n, sizeof(int)); - for (i = 0; i < n; ++i) { - obj2 = obj->arrayGetNF(i); - hashFontObject1(&obj2, h); - } - break; - case objDict: - h->hash('d'); - n = obj->dictGetLength(); - h->hash((char *)&n, sizeof(int)); - for (i = 0; i < n; ++i) { - p = obj->dictGetKey(i); - h->hash(p, (int)strlen(p)); - obj2 = obj->dictGetValNF(i); - hashFontObject1(&obj2, h); - } - break; - case objStream: - // this should never happen - streams must be indirect refs - break; - case objRef: - h->hash('f'); - n = obj->getRefNum(); - h->hash((char *)&n, sizeof(int)); - n = obj->getRefGen(); - h->hash((char *)&n, sizeof(int)); - break; - default: - h->hash('u'); - break; - } -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/GfxFont.h b/Build/source/libs/poppler/poppler-src/poppler/GfxFont.h deleted file mode 100644 index 1ae0608b9bd..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/GfxFont.h +++ /dev/null @@ -1,470 +0,0 @@ -//======================================================================== -// -// GfxFont.h -// -// Copyright 1996-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2005, 2008, 2015, 2017, 2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2006 Takashi Iwai <tiwai@suse.de> -// Copyright (C) 2006 Kristian Høgsberg <krh@redhat.com> -// Copyright (C) 2007 Julien Rebetez <julienr@svn.gnome.org> -// Copyright (C) 2007 Jeff Muizelaar <jeff@infidigm.net> -// Copyright (C) 2007 Koji Otani <sho@bbr.jp> -// Copyright (C) 2011 Axel Strübing <axel.struebing@freenet.de> -// Copyright (C) 2011, 2012, 2014 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2015, 2018 Jason Crain <jason@aquaticape.us> -// Copyright (C) 2015 Thomas Freitag <Thomas.Freitag@alfa.de> -// 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 -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef GFXFONT_H -#define GFXFONT_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "goo/gtypes.h" -#include "goo/GooString.h" -#include "Object.h" -#include "CharTypes.h" - -class Dict; -class CMap; -class CharCodeToUnicode; -class FoFiTrueType; -class PSOutputDev; -struct GfxFontCIDWidths; -struct Base14FontMapEntry; -class FNVHash; - -//------------------------------------------------------------------------ -// GfxFontType -//------------------------------------------------------------------------ - -enum GfxFontType { - //----- Gfx8BitFont - fontUnknownType, - fontType1, - fontType1C, - fontType1COT, - fontType3, - fontTrueType, - fontTrueTypeOT, - //----- GfxCIDFont - fontCIDType0, - fontCIDType0C, - fontCIDType0COT, - fontCIDType2, - fontCIDType2OT -}; - -//------------------------------------------------------------------------ -// GfxFontCIDWidths -//------------------------------------------------------------------------ - -struct GfxFontCIDWidthExcep { - CID first; // this record applies to - CID last; // CIDs <first>..<last> - double width; // char width -}; - -struct GfxFontCIDWidthExcepV { - CID first; // this record applies to - CID last; // CIDs <first>..<last> - double height; // char height - double vx, vy; // origin position -}; - -struct GfxFontCIDWidths { - double defWidth; // default char width - double defHeight; // default char height - double defVY; // default origin position - GfxFontCIDWidthExcep *exceps; // exceptions - int nExceps; // number of valid entries in exceps - GfxFontCIDWidthExcepV * // exceptions for vertical font - excepsV; - int nExcepsV; // number of valid entries in excepsV -}; - -//------------------------------------------------------------------------ -// GfxFontLoc -//------------------------------------------------------------------------ - -enum GfxFontLocType { - gfxFontLocEmbedded, // font embedded in PDF file - gfxFontLocExternal, // external font file - gfxFontLocResident // font resident in PS printer -}; - -class GfxFontLoc { -public: - - GfxFontLoc(); - ~GfxFontLoc(); - - GfxFontLoc(const GfxFontLoc &) = delete; - GfxFontLoc& operator=(const GfxFontLoc &) = delete; - - GfxFontLocType locType; - GfxFontType fontType; - Ref embFontID; // embedded stream obj ID - // (if locType == gfxFontLocEmbedded) - GooString *path; // font file path - // (if locType == gfxFontLocExternal) - // PS font name - // (if locType == gfxFontLocResident) - int fontNum; // for TrueType collections - // (if locType == gfxFontLocExternal) - GooString *encoding; // PS font encoding, only for 16-bit fonts - // (if locType == gfxFontLocResident) - int wMode; // writing mode, only for 16-bit fonts - // (if locType == gfxFontLocResident) - int substIdx; // substitute font index - // (if locType == gfxFontLocExternal, - // and a Base-14 substitution was made) -}; - -//------------------------------------------------------------------------ -// GfxFont -//------------------------------------------------------------------------ - -#define fontFixedWidth (1 << 0) -#define fontSerif (1 << 1) -#define fontSymbolic (1 << 2) -#define fontItalic (1 << 6) -#define fontBold (1 << 18) - -class GfxFont { -public: - - enum Stretch { - StretchNotDefined, - UltraCondensed, - ExtraCondensed, - Condensed, - SemiCondensed, - Normal, - SemiExpanded, - Expanded, - ExtraExpanded, - UltraExpanded }; - - enum Weight { - WeightNotDefined, - W100, - W200, - W300, - W400, // Normal - W500, - W600, - W700, // Bold - W800, - W900 }; - - // Build a GfxFont object. - static GfxFont *makeFont(XRef *xref, const char *tagA, Ref idA, Dict *fontDict); - - GfxFont(const char *tagA, Ref idA, GooString *nameA, - GfxFontType typeA, Ref embFontIDA); - - GfxFont(const GfxFont &) = delete; - GfxFont& operator=(const GfxFont &other) = delete; - - GBool isOk() { return ok; } - - void incRefCnt(); - void decRefCnt(); - - // Get font tag. - const GooString *getTag() const { return tag; } - - // Get font dictionary ID. - const Ref *getID() const { return &id; } - - // Does this font match the tag? - GBool matches(const char *tagA) const { return !tag->cmp(tagA); } - - // Get font family name. - GooString *getFamily() { return family; } - - // Get font stretch. - Stretch getStretch() const { return stretch; } - - // Get font weight. - Weight getWeight() const { return weight; } - - // Get the original font name (ignornig any munging that might have - // been done to map to a canonical Base-14 font name). - const GooString *getName() const { return name; } - - // Get font type. - GfxFontType getType() const { return type; } - virtual GBool isCIDFont() const { return gFalse; } - - // Get embedded font ID, i.e., a ref for the font file stream. - // Returns false if there is no embedded font. - GBool getEmbeddedFontID(Ref *embID) - { *embID = embFontID; return embFontID.num >= 0; } - - // Invalidate an embedded font - // Returns false if there is no embedded font. - GBool invalidateEmbeddedFont() { - if (embFontID.num >= 0) { - embFontID.num = -1; - return gTrue; - } - return gFalse; - } - - // Get the PostScript font name for the embedded font. Returns - // NULL if there is no embedded font. - GooString *getEmbeddedFontName() { return embFontName; } - - // Get font descriptor flags. - int getFlags() { return flags; } - GBool isFixedWidth() { return flags & fontFixedWidth; } - GBool isSerif() { return flags & fontSerif; } - GBool isSymbolic() { return flags & fontSymbolic; } - GBool isItalic() { return flags & fontItalic; } - GBool isBold() { return flags & fontBold; } - - // Return the Unicode map. - virtual const CharCodeToUnicode *getToUnicode() const = 0; - - // Return the font matrix. - double *getFontMatrix() { return fontMat; } - - // Return the font bounding box. - double *getFontBBox() { return fontBBox; } - - // Return the ascent and descent values. - double getAscent() { return ascent; } - double getDescent() { return descent; } - - // Return the writing mode (0=horizontal, 1=vertical). - virtual int getWMode() { return 0; } - - // Locate the font file for this font. If <ps> is not null, includes PS - // printer-resident fonts. Returns NULL on failure. - GfxFontLoc *locateFont(XRef *xref, PSOutputDev *ps); - - // Locate a Base-14 font file for a specified font name. - static GfxFontLoc *locateBase14Font(GooString *base14Name); - - // Read an external or embedded font file into a buffer. - char *readEmbFontFile(XRef *xref, int *len); - - // Get the next char from a string <s> of <len> bytes, returning the - // char <code>, its Unicode mapping <u>, its displacement vector - // (<dx>, <dy>), and its origin offset vector (<ox>, <oy>). <uSize> - // is the number of entries available in <u>, and <uLen> is set to - // the number actually used. Returns the number of bytes used by - // the char code. - virtual int getNextChar(const char *s, int len, CharCode *code, - Unicode **u, int *uLen, - double *dx, double *dy, double *ox, double *oy) const = 0; - - // Does this font have a toUnicode map? - GBool hasToUnicodeCMap() { return hasToUnicode; } - - // Return the name of the encoding - GooString *getEncodingName() { return encodingName; } - - // Return AGLFN names of ligatures in the Standard and Expert encodings - // for use with fonts that are not compatible with the Standard 14 fonts. - // http://sourceforge.net/adobe/aglfn/wiki/AGL%20Specification/ - static const char *getAlternateName(const char *name); - -protected: - - virtual ~GfxFont(); - - static GfxFontType getFontType(XRef *xref, Dict *fontDict, Ref *embID); - void readFontDescriptor(XRef *xref, Dict *fontDict); - CharCodeToUnicode *readToUnicodeCMap(Dict *fontDict, int nBits, - CharCodeToUnicode *ctu); - static GfxFontLoc *getExternalFont(GooString *path, GBool cid); - - GooString *tag; // PDF font tag - Ref id; // reference (used as unique ID) - GooString *name; // font name - GooString *family; // font family - Stretch stretch; // font stretch - Weight weight; // font weight - GfxFontType type; // type of font - int flags; // font descriptor flags - GooString *embFontName; // name of embedded font - Ref embFontID; // ref to embedded font file stream - double fontMat[6]; // font matrix (Type 3 only) - double fontBBox[4]; // font bounding box (Type 3 only) - double missingWidth; // "default" width - double ascent; // max height above baseline - double descent; // max depth below baseline - int refCnt; - GBool ok; - GBool hasToUnicode; - GooString *encodingName; -}; - -//------------------------------------------------------------------------ -// Gfx8BitFont -//------------------------------------------------------------------------ - -class Gfx8BitFont: public GfxFont { -public: - - Gfx8BitFont(XRef *xref, const char *tagA, Ref idA, GooString *nameA, - GfxFontType typeA, Ref embFontIDA, Dict *fontDict); - - int getNextChar(const char *s, int len, CharCode *code, - Unicode **u, int *uLen, - double *dx, double *dy, double *ox, double *oy) const override; - - // Return the encoding. - char **getEncoding() { return enc; } - - // Return the Unicode map. - const CharCodeToUnicode *getToUnicode() const override; - - // Return the character name associated with <code>. - char *getCharName(int code) { return enc[code]; } - - // Returns true if the PDF font specified an encoding. - GBool getHasEncoding() { return hasEncoding; } - - // Returns true if the PDF font specified MacRomanEncoding. - GBool getUsesMacRomanEnc() { return usesMacRomanEnc; } - - // Get width of a character. - double getWidth(Guchar c) { return widths[c]; } - - // Return a char code-to-GID mapping for the provided font file. - // (This is only useful for TrueType fonts.) - int *getCodeToGIDMap(FoFiTrueType *ff); - - // Return the Type 3 CharProc dictionary, or NULL if none. - Dict *getCharProcs(); - - // Return the Type 3 CharProc for the character associated with <code>. - Object getCharProc(int code); - Object getCharProcNF(int code); - - // Return the Type 3 Resources dictionary, or NULL if none. - Dict *getResources(); - -private: - ~Gfx8BitFont(); - - const Base14FontMapEntry *base14; // for Base-14 fonts only; NULL otherwise - char *enc[256]; // char code --> char name - char encFree[256]; // boolean for each char name: if set, - // the string is malloc'ed - CharCodeToUnicode *ctu; // char code --> Unicode - GBool hasEncoding; - GBool usesMacRomanEnc; - double widths[256]; // character widths - Object charProcs; // Type 3 CharProcs dictionary - Object resources; // Type 3 Resources dictionary - - friend class GfxFont; -}; - -//------------------------------------------------------------------------ -// GfxCIDFont -//------------------------------------------------------------------------ - -class GfxCIDFont: public GfxFont { -public: - - GfxCIDFont(XRef *xref, const char *tagA, Ref idA, GooString *nameA, - GfxFontType typeA, Ref embFontIDA, Dict *fontDict); - - GBool isCIDFont() const override { return gTrue; } - - int getNextChar(const char *s, int len, CharCode *code, - Unicode **u, int *uLen, - double *dx, double *dy, double *ox, double *oy) const override; - - // Return the writing mode (0=horizontal, 1=vertical). - int getWMode() override; - - // Return the Unicode map. - const CharCodeToUnicode *getToUnicode() const override; - - // Get the collection name (<registry>-<ordering>). - GooString *getCollection(); - - // Return the CID-to-GID mapping table. These should only be called - // if type is fontCIDType2. - int *getCIDToGID() { return cidToGID; } - int getCIDToGIDLen() { return cidToGIDLen; } - - int *getCodeToGIDMap(FoFiTrueType *ff, int *length); - - double getWidth(char* s, int len) const; - -private: - ~GfxCIDFont(); - - int mapCodeToGID(FoFiTrueType *ff, int cmapi, - Unicode unicode, GBool wmode); - double getWidth(CID cid) const; // Get width of a character. - - GooString *collection; // collection name - CMap *cMap; // char code --> CID - CharCodeToUnicode *ctu; // CID --> Unicode - GBool ctuUsesCharCode; // true: ctu maps char code to Unicode; - // false: ctu maps CID to Unicode - GfxFontCIDWidths widths; // character widths - int *cidToGID; // CID --> GID mapping (for embedded - // TrueType fonts) - int cidToGIDLen; -}; - -//------------------------------------------------------------------------ -// GfxFontDict -//------------------------------------------------------------------------ - -class GfxFontDict { -public: - - // Build the font dictionary, given the PDF font dictionary. - GfxFontDict(XRef *xref, Ref *fontDictRef, Dict *fontDict); - - // Destructor. - ~GfxFontDict(); - - GfxFontDict(const GfxFontDict &) = delete; - GfxFontDict& operator=(const GfxFontDict &) = delete; - - // Get the specified font. - GfxFont *lookup(const char *tag); - - // Iterative access. - int getNumFonts() { return numFonts; } - GfxFont *getFont(int i) { return fonts[i]; } - -private: - - int hashFontObject(Object *obj); - void hashFontObject1(Object *obj, FNVHash *h); - - GfxFont **fonts; // list of fonts - int numFonts; // number of fonts -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/GfxState.cc b/Build/source/libs/poppler/poppler-src/poppler/GfxState.cc deleted file mode 100644 index 956a214bf84..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/GfxState.cc +++ /dev/null @@ -1,7213 +0,0 @@ -//======================================================================== -// -// GfxState.cc -// -// Copyright 1996-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2005 Kristian Høgsberg <krh@redhat.com> -// Copyright (C) 2006, 2007 Jeff Muizelaar <jeff@infidigm.net> -// Copyright (C) 2006, 2010 Carlos Garcia Campos <carlosgc@gnome.org> -// Copyright (C) 2006-2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2009, 2012 Koji Otani <sho@bbr.jp> -// Copyright (C) 2009, 2011-2016 Thomas Freitag <Thomas.Freitag@alfa.de> -// Copyright (C) 2009 Christian Persch <chpe@gnome.org> -// Copyright (C) 2010 PaweÅ‚ Wiejacha <pawel.wiejacha@gmail.com> -// Copyright (C) 2010 Christian Feuersänger <cfeuersaenger@googlemail.com> -// Copyright (C) 2011 Andrea Canciani <ranma42@gmail.com> -// Copyright (C) 2012 William Bader <williambader@hotmail.com> -// Copyright (C) 2013 Lu Wang <coolwanglu@gmail.com> -// Copyright (C) 2013 Hib Eris <hib@hiberis.nl> -// Copyright (C) 2013 Fabio D'Urso <fabiodurso@hotmail.it> -// Copyright (C) 2015 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2016 Marek Kasik <mkasik@redhat.com> -// Copyright (C) 2017 Oliver Sander <oliver.sander@tu-dresden.de> -// 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 -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include <config.h> - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include <algorithm> -#include <memory> -#include <stddef.h> -#include <math.h> -#include <string.h> -#include "goo/gmem.h" -#include "Error.h" -#include "Object.h" -#include "Array.h" -#include "Page.h" -#include "Gfx.h" -#include "GfxState.h" -#include "GfxState_helpers.h" -#include "GfxFont.h" -#include "GlobalParams.h" -#include "PopplerCache.h" -#include "OutputDev.h" -#include "splash/SplashTypes.h" - -//------------------------------------------------------------------------ - -// Max depth of nested color spaces. This is used to catch infinite -// loops in the color space object structure. -#define colorSpaceRecursionLimit 8 - -//------------------------------------------------------------------------ - -GBool Matrix::invertTo(Matrix *other) const -{ - const double det_denominator = determinant(); - if (unlikely(det_denominator == 0)) { - *other = {1, 0, 0, 1, 0, 0}; - return gFalse; - } - - const double det = 1 / det_denominator; - other->m[0] = m[3] * det; - other->m[1] = -m[1] * det; - other->m[2] = -m[2] * det; - other->m[3] = m[0] * det; - other->m[4] = (m[2] * m[5] - m[3] * m[4]) * det; - other->m[5] = (m[1] * m[4] - m[0] * m[5]) * det; - - return gTrue; -} - -void Matrix::translate(double tx, double ty) -{ - double x0 = tx*m[0] + ty*m[2] + m[4]; - double y0 = tx*m[1] + ty*m[3] + m[5]; - m[4] = x0; - m[5] = y0; -} - -void Matrix::scale(double sx, double sy) -{ - m[0] *= sx; - m[1] *= sx; - m[2] *= sy; - m[3] *= sy; -} - -void Matrix::transform(double x, double y, double *tx, double *ty) const -{ - double temp_x, temp_y; - - temp_x = m[0] * x + m[2] * y + m[4]; - temp_y = m[1] * x + m[3] * y + m[5]; - - *tx = temp_x; - *ty = temp_y; -} - -// Matrix norm, taken from _cairo_matrix_transformed_circle_major_axis -double Matrix::norm() const -{ - double f, g, h, i, j; - - i = m[0]*m[0] + m[1]*m[1]; - j = m[2]*m[2] + m[3]*m[3]; - - f = 0.5 * (i + j); - g = 0.5 * (i - j); - h = m[0]*m[2] + m[1]*m[3]; - - return sqrt (f + hypot (g, h)); -} - -//------------------------------------------------------------------------ - -struct GfxBlendModeInfo { - const char *name; - GfxBlendMode mode; -}; - -static const GfxBlendModeInfo gfxBlendModeNames[] = { - { "Normal", gfxBlendNormal }, - { "Compatible", gfxBlendNormal }, - { "Multiply", gfxBlendMultiply }, - { "Screen", gfxBlendScreen }, - { "Overlay", gfxBlendOverlay }, - { "Darken", gfxBlendDarken }, - { "Lighten", gfxBlendLighten }, - { "ColorDodge", gfxBlendColorDodge }, - { "ColorBurn", gfxBlendColorBurn }, - { "HardLight", gfxBlendHardLight }, - { "SoftLight", gfxBlendSoftLight }, - { "Difference", gfxBlendDifference }, - { "Exclusion", gfxBlendExclusion }, - { "Hue", gfxBlendHue }, - { "Saturation", gfxBlendSaturation }, - { "Color", gfxBlendColor }, - { "Luminosity", gfxBlendLuminosity } -}; - -#define nGfxBlendModeNames \ - ((int)((sizeof(gfxBlendModeNames) / sizeof(GfxBlendModeInfo)))) - -//------------------------------------------------------------------------ -// -// NB: This must match the GfxColorSpaceMode enum defined in -// GfxState.h -static const char *gfxColorSpaceModeNames[] = { - "DeviceGray", - "CalGray", - "DeviceRGB", - "CalRGB", - "DeviceCMYK", - "Lab", - "ICCBased", - "Indexed", - "Separation", - "DeviceN", - "Pattern" -}; - -#define nGfxColorSpaceModes ((sizeof(gfxColorSpaceModeNames) / sizeof(char *))) - -#ifdef USE_CMS - -static const std::map<unsigned int, unsigned int>::size_type CMSCACHE_LIMIT = 2048; - -#include <lcms2.h> -#define LCMS_FLAGS cmsFLAGS_NOOPTIMIZE | cmsFLAGS_BLACKPOINTCOMPENSATION - -#define COLOR_PROFILE_DIR "/ColorProfiles/" -#define GLOBAL_COLOR_PROFILE_DIR POPPLER_DATADIR COLOR_PROFILE_DIR - -void GfxColorTransform::doTransform(void *in, void *out, unsigned int size) { - cmsDoTransform(transform, in, out, size); -} - -// transformA should be a cmsHTRANSFORM -GfxColorTransform::GfxColorTransform(void *transformA, int cmsIntentA, unsigned int inputPixelTypeA, unsigned int transformPixelTypeA) { - transform = transformA; - refCount = 1; - cmsIntent = cmsIntentA; - inputPixelType = inputPixelTypeA; - transformPixelType = transformPixelTypeA; -} - -GfxColorTransform::~GfxColorTransform() { - cmsDeleteTransform(transform); -} - -void GfxColorTransform::ref() { - refCount++; -} - -unsigned int GfxColorTransform::unref() { - return --refCount; -} - -static cmsHPROFILE RGBProfile = nullptr; -static GooString *displayProfileName = nullptr; // display profile file Name -static cmsHPROFILE displayProfile = nullptr; // display profile -static unsigned int displayPixelType = 0; -static GfxColorTransform *XYZ2DisplayTransform = nullptr; - -// convert color space signature to cmsColor type -static unsigned int getCMSColorSpaceType(cmsColorSpaceSignature cs); -static unsigned int getCMSNChannels(cmsColorSpaceSignature cs); -static cmsHPROFILE loadColorProfile(const char *fileName); - -void GfxColorSpace::setDisplayProfile(void *displayProfileA) { - displayProfile = displayProfileA; - if (displayProfile != nullptr) { - cmsHTRANSFORM transform; - unsigned int nChannels; - - displayPixelType = getCMSColorSpaceType(cmsGetColorSpace(displayProfile)); - nChannels = getCMSNChannels(cmsGetColorSpace(displayProfile)); - // create transform from XYZ - cmsHPROFILE XYZProfile = cmsCreateXYZProfile(); - if ((transform = cmsCreateTransform(XYZProfile, TYPE_XYZ_DBL, - displayProfile, - COLORSPACE_SH(displayPixelType) | - CHANNELS_SH(nChannels) | BYTES_SH(1), - INTENT_RELATIVE_COLORIMETRIC,LCMS_FLAGS)) == nullptr) { - error(errSyntaxWarning, -1, "Can't create Lab transform"); - } else { - XYZ2DisplayTransform = new GfxColorTransform(transform, INTENT_RELATIVE_COLORIMETRIC, PT_XYZ, displayPixelType); - } - cmsCloseProfile(XYZProfile); - } -} - -void GfxColorSpace::setDisplayProfileName(GooString *name) { - displayProfileName = name->copy(); -} - -cmsHPROFILE GfxColorSpace::getRGBProfile() { - return RGBProfile; -} - -cmsHPROFILE GfxColorSpace::getDisplayProfile() { - return displayProfile; -} - -#endif - -//------------------------------------------------------------------------ -// GfxColorSpace -//------------------------------------------------------------------------ - -GfxColorSpace::GfxColorSpace() { - overprintMask = 0x0f; - mapping = nullptr; -} - -GfxColorSpace::~GfxColorSpace() { -} - -GfxColorSpace *GfxColorSpace::parse(GfxResources *res, Object *csObj, OutputDev *out, GfxState *state, int recursion) { - GfxColorSpace *cs; - Object obj1; - - if (recursion > colorSpaceRecursionLimit) { - error(errSyntaxError, -1, "Loop detected in color space objects"); - return nullptr; - } - - cs = nullptr; - if (csObj->isName()) { - if (csObj->isName("DeviceGray") || csObj->isName("G")) { - if (res != nullptr) { - Object objCS = res->lookupColorSpace("DefaultGray"); - if (objCS.isNull()) { - cs = new GfxDeviceGrayColorSpace(); - } else { - cs = GfxColorSpace::parse(nullptr, &objCS, out, state); - } - } else { - cs = new GfxDeviceGrayColorSpace(); - } - } else if (csObj->isName("DeviceRGB") || csObj->isName("RGB")) { - if (res != nullptr) { - Object objCS = res->lookupColorSpace("DefaultRGB"); - if (objCS.isNull()) { - cs = new GfxDeviceRGBColorSpace(); - } else { - cs = GfxColorSpace::parse(nullptr, &objCS, out, state); - } - } else { - cs = new GfxDeviceRGBColorSpace(); - } - } else if (csObj->isName("DeviceCMYK") || csObj->isName("CMYK")) { - if (res != nullptr) { - Object objCS = res->lookupColorSpace("DefaultCMYK"); - if (objCS.isNull()) { - cs = new GfxDeviceCMYKColorSpace(); - } else { - cs = GfxColorSpace::parse(nullptr, &objCS, out, state); - } - } else { - cs = new GfxDeviceCMYKColorSpace(); - } - } else if (csObj->isName("Pattern")) { - cs = new GfxPatternColorSpace(nullptr); - } else { - error(errSyntaxWarning, -1, "Bad color space '{0:s}'", csObj->getName()); - } - } else if (csObj->isArray() && csObj->arrayGetLength() > 0) { - obj1 = csObj->arrayGet(0); - if (obj1.isName("DeviceGray") || obj1.isName("G")) { - if (res != nullptr) { - Object objCS = res->lookupColorSpace("DefaultGray"); - if (objCS.isNull()) { - cs = new GfxDeviceGrayColorSpace(); - } else { - cs = GfxColorSpace::parse(nullptr, &objCS, out, state); - } - } else { - cs = new GfxDeviceGrayColorSpace(); - } - } else if (obj1.isName("DeviceRGB") || obj1.isName("RGB")) { - if (res != nullptr) { - Object objCS = res->lookupColorSpace("DefaultRGB"); - if (objCS.isNull()) { - cs = new GfxDeviceRGBColorSpace(); - } else { - cs = GfxColorSpace::parse(nullptr, &objCS, out, state); - } - } else { - cs = new GfxDeviceRGBColorSpace(); - } - } else if (obj1.isName("DeviceCMYK") || obj1.isName("CMYK")) { - if (res != nullptr) { - Object objCS = res->lookupColorSpace("DefaultCMYK"); - if (objCS.isNull()) { - cs = new GfxDeviceCMYKColorSpace(); - } else { - cs = GfxColorSpace::parse(nullptr, &objCS, out, state); - } - } else { - cs = new GfxDeviceCMYKColorSpace(); - } - } else if (obj1.isName("CalGray")) { - cs = GfxCalGrayColorSpace::parse(csObj->getArray(), state); - } else if (obj1.isName("CalRGB")) { - cs = GfxCalRGBColorSpace::parse(csObj->getArray(), state); - } else if (obj1.isName("Lab")) { - cs = GfxLabColorSpace::parse(csObj->getArray(), state); - } else if (obj1.isName("ICCBased")) { - cs = GfxICCBasedColorSpace::parse(csObj->getArray(), out, state, recursion); - } else if (obj1.isName("Indexed") || obj1.isName("I")) { - cs = GfxIndexedColorSpace::parse(res, csObj->getArray(), out, state, recursion); - } else if (obj1.isName("Separation")) { - cs = GfxSeparationColorSpace::parse(res, csObj->getArray(), out, state, recursion); - } else if (obj1.isName("DeviceN")) { - cs = GfxDeviceNColorSpace::parse(res, csObj->getArray(), out, state, recursion); - } else if (obj1.isName("Pattern")) { - cs = GfxPatternColorSpace::parse(res, csObj->getArray(), out, state, recursion); - } else { - error(errSyntaxWarning, -1, "Bad color space"); - } - } else if (csObj->isDict()) { - obj1 = csObj->dictLookup("ColorSpace"); - if (obj1.isName("DeviceGray")) { - if (res != nullptr) { - Object objCS = res->lookupColorSpace("DefaultGray"); - if (objCS.isNull()) { - cs = new GfxDeviceGrayColorSpace(); - } else { - cs = GfxColorSpace::parse(nullptr, &objCS, out, state); - } - } else { - cs = new GfxDeviceGrayColorSpace(); - } - } else if (obj1.isName("DeviceRGB")) { - if (res != nullptr) { - Object objCS = res->lookupColorSpace("DefaultRGB"); - if (objCS.isNull()) { - cs = new GfxDeviceRGBColorSpace(); - } else { - cs = GfxColorSpace::parse(nullptr, &objCS, out, state); - } - } else { - cs = new GfxDeviceRGBColorSpace(); - } - } else if (obj1.isName("DeviceCMYK")) { - if (res != nullptr) { - Object objCS = res->lookupColorSpace("DefaultCMYK"); - if (objCS.isNull()) { - cs = new GfxDeviceCMYKColorSpace(); - } else { - cs = GfxColorSpace::parse(nullptr, &objCS, out, state); - } - } else { - cs = new GfxDeviceCMYKColorSpace(); - } - } else { - error(errSyntaxWarning, -1, "Bad color space dict'"); - } - } else { - error(errSyntaxWarning, -1, "Bad color space - expected name or array or dict"); - } - return cs; -} - -void GfxColorSpace::createMapping(GooList *separationList, int maxSepComps) { - return; -} - -void GfxColorSpace::getDefaultRanges(double *decodeLow, double *decodeRange, - int maxImgPixel) { - int i; - - for (i = 0; i < getNComps(); ++i) { - decodeLow[i] = 0; - decodeRange[i] = 1; - } -} - -int GfxColorSpace::getNumColorSpaceModes() { - return nGfxColorSpaceModes; -} - -const char *GfxColorSpace::getColorSpaceModeName(int idx) { - return gfxColorSpaceModeNames[idx]; -} - -#ifdef USE_CMS -cmsHPROFILE loadColorProfile(const char *fileName) -{ - cmsHPROFILE hp = nullptr; - FILE *fp; - - if (fileName[0] == '/') { - // full path - // check if open the file - if ((fp = fopen(fileName,"r")) != nullptr) { - fclose(fp); - hp = cmsOpenProfileFromFile(fileName,"r"); - } - return hp; - } - // try to load from global directory - GooString *path = new GooString(GLOBAL_COLOR_PROFILE_DIR); - path->append(fileName); - // check if open the file - if ((fp = fopen(path->getCString(),"r")) != nullptr) { - fclose(fp); - hp = cmsOpenProfileFromFile(path->getCString(),"r"); - } - delete path; - return hp; -} - -static void CMSError(cmsContext /*contextId*/, cmsUInt32Number /*ecode*/, const char *text) -{ - error(errSyntaxWarning, -1, "{0:s}", text); -} - -int GfxColorSpace::setupColorProfiles() -{ - static GBool initialized = gFalse; - cmsHTRANSFORM transform; - unsigned int nChannels; - - // do only once - if (initialized) return 0; - initialized = gTrue; - - // set error handlor - cmsSetLogErrorHandler(CMSError); - - if (displayProfile == nullptr) { - // load display profile if it was not already loaded. - if (displayProfileName == nullptr) { - displayProfile = loadColorProfile("display.icc"); - } else if (displayProfileName->getLength() > 0) { - displayProfile = loadColorProfile(displayProfileName->getCString()); - } - } - // load RGB profile - RGBProfile = loadColorProfile("RGB.icc"); - if (RGBProfile == nullptr) { - /* use built in sRGB profile */ - RGBProfile = cmsCreate_sRGBProfile(); - } - // create transforms - if (displayProfile != nullptr) { - displayPixelType = getCMSColorSpaceType(cmsGetColorSpace(displayProfile)); - nChannels = getCMSNChannels(cmsGetColorSpace(displayProfile)); - // create transform from XYZ - cmsHPROFILE XYZProfile = cmsCreateXYZProfile(); - if ((transform = cmsCreateTransform(XYZProfile, TYPE_XYZ_DBL, - displayProfile, - COLORSPACE_SH(displayPixelType) | - CHANNELS_SH(nChannels) | BYTES_SH(1), - INTENT_RELATIVE_COLORIMETRIC,LCMS_FLAGS)) == nullptr) { - error(errSyntaxWarning, -1, "Can't create Lab transform"); - } else { - XYZ2DisplayTransform = new GfxColorTransform(transform, INTENT_RELATIVE_COLORIMETRIC, PT_XYZ, displayPixelType); - } - cmsCloseProfile(XYZProfile); - } - return 0; -} - -unsigned int getCMSColorSpaceType(cmsColorSpaceSignature cs) -{ - switch (cs) { - case cmsSigXYZData: - return PT_XYZ; - break; - case cmsSigLabData: - return PT_Lab; - break; - case cmsSigLuvData: - return PT_YUV; - break; - case cmsSigYCbCrData: - return PT_YCbCr; - break; - case cmsSigYxyData: - return PT_Yxy; - break; - case cmsSigRgbData: - return PT_RGB; - break; - case cmsSigGrayData: - return PT_GRAY; - break; - case cmsSigHsvData: - return PT_HSV; - break; - case cmsSigHlsData: - return PT_HLS; - break; - case cmsSigCmykData: - return PT_CMYK; - break; - case cmsSigCmyData: - return PT_CMY; - break; - case cmsSig2colorData: - case cmsSig3colorData: - case cmsSig4colorData: - case cmsSig5colorData: - case cmsSig6colorData: - case cmsSig7colorData: - case cmsSig8colorData: - case cmsSig9colorData: - case cmsSig10colorData: - case cmsSig11colorData: - case cmsSig12colorData: - case cmsSig13colorData: - case cmsSig14colorData: - case cmsSig15colorData: - default: - break; - } - return PT_RGB; -} - -unsigned int getCMSNChannels(cmsColorSpaceSignature cs) -{ - switch (cs) { - case cmsSigXYZData: - case cmsSigLuvData: - case cmsSigLabData: - case cmsSigYCbCrData: - case cmsSigYxyData: - case cmsSigRgbData: - case cmsSigHsvData: - case cmsSigHlsData: - case cmsSigCmyData: - case cmsSig3colorData: - return 3; - break; - case cmsSigGrayData: - return 1; - break; - case cmsSigCmykData: - case cmsSig4colorData: - return 4; - break; - case cmsSig2colorData: - return 2; - break; - case cmsSig5colorData: - return 5; - break; - case cmsSig6colorData: - return 6; - break; - case cmsSig7colorData: - return 7; - break; - case cmsSig8colorData: - return 8; - break; - case cmsSig9colorData: - return 9; - break; - case cmsSig10colorData: - return 10; - break; - case cmsSig11colorData: - return 11; - break; - case cmsSig12colorData: - return 12; - break; - case cmsSig13colorData: - return 13; - break; - case cmsSig14colorData: - return 14; - break; - case cmsSig15colorData: - return 15; - default: - break; - } - return 3; -} -#endif - -//------------------------------------------------------------------------ -// GfxDeviceGrayColorSpace -//------------------------------------------------------------------------ - -GfxDeviceGrayColorSpace::GfxDeviceGrayColorSpace() { -} - -GfxDeviceGrayColorSpace::~GfxDeviceGrayColorSpace() { -} - -GfxColorSpace *GfxDeviceGrayColorSpace::copy() { - return new GfxDeviceGrayColorSpace(); -} - -void GfxDeviceGrayColorSpace::getGray(GfxColor *color, GfxGray *gray) { - *gray = clip01(color->c[0]); -} - -void GfxDeviceGrayColorSpace::getGrayLine(Guchar *in, Guchar *out, int length) { - memcpy (out, in, length); -} - -void GfxDeviceGrayColorSpace::getRGB(GfxColor *color, GfxRGB *rgb) { - rgb->r = rgb->g = rgb->b = clip01(color->c[0]); -} - -void GfxDeviceGrayColorSpace::getRGBLine(Guchar *in, unsigned int *out, - int length) { - int i; - - for (i = 0; i < length; i++) - out[i] = (in[i] << 16) | (in[i] << 8) | (in[i] << 0); -} - -void GfxDeviceGrayColorSpace::getRGBLine(Guchar *in, Guchar *out, int length) { - for (int i = 0; i < length; i++) { - *out++ = in[i]; - *out++ = in[i]; - *out++ = in[i]; - } -} - -void GfxDeviceGrayColorSpace::getRGBXLine(Guchar *in, Guchar *out, int length) { - for (int i = 0; i < length; i++) { - *out++ = in[i]; - *out++ = in[i]; - *out++ = in[i]; - *out++ = 255; - } -} - -void GfxDeviceGrayColorSpace::getCMYKLine(Guchar *in, Guchar *out, int length) { - for (int i = 0; i < length; i++) { - *out++ = 0; - *out++ = 0; - *out++ = 0; - *out++ = in[i]; - } -} - -void GfxDeviceGrayColorSpace::getDeviceNLine(Guchar *in, Guchar *out, int length) { - for (int i = 0; i < length; i++) { - for (int j = 0; j < SPOT_NCOMPS+4; j++) - out[j] = 0; - out[4] = in[i]; - out += (SPOT_NCOMPS+4); - } -} - -void GfxDeviceGrayColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk) { - cmyk->c = cmyk->m = cmyk->y = 0; - cmyk->k = clip01(gfxColorComp1 - color->c[0]); -} - -void GfxDeviceGrayColorSpace::getDeviceN(GfxColor *color, GfxColor *deviceN) { - for (int i = 0; i < gfxColorMaxComps; i++) - deviceN->c[i] = 0; - deviceN->c[3] = clip01(gfxColorComp1 - color->c[0]); -} - -void GfxDeviceGrayColorSpace::getDefaultColor(GfxColor *color) { - color->c[0] = 0; -} - -//------------------------------------------------------------------------ -// GfxCalGrayColorSpace -//------------------------------------------------------------------------ - -GfxCalGrayColorSpace::GfxCalGrayColorSpace() { - whiteX = whiteY = whiteZ = 1; - blackX = blackY = blackZ = 0; - gamma = 1; -} - -GfxCalGrayColorSpace::~GfxCalGrayColorSpace() { -#ifdef USE_CMS - if (transform != nullptr) { - if (transform->unref() == 0) delete transform; - } -#endif -} - -GfxColorSpace *GfxCalGrayColorSpace::copy() { - GfxCalGrayColorSpace *cs; - - cs = new GfxCalGrayColorSpace(); - cs->whiteX = whiteX; - cs->whiteY = whiteY; - cs->whiteZ = whiteZ; - cs->blackX = blackX; - cs->blackY = blackY; - cs->blackZ = blackZ; - cs->gamma = gamma; - cs->kr = kr; - cs->kg = kg; - cs->kb = kb; -#ifdef USE_CMS - cs->transform = transform; - if (transform != nullptr) transform->ref(); -#endif - return cs; -} - -// This is the inverse of MatrixLMN in Example 4.10 from the PostScript -// Language Reference, Third Edition. -static const double xyzrgb[3][3] = { - { 3.240449, -1.537136, -0.498531 }, - { -0.969265, 1.876011, 0.041556 }, - { 0.055643, -0.204026, 1.057229 } -}; - -GfxColorSpace *GfxCalGrayColorSpace::parse(Array *arr, GfxState *state) { - GfxCalGrayColorSpace *cs; - Object obj1, obj2; - - obj1 = arr->get(1); - if (!obj1.isDict()) { - error(errSyntaxWarning, -1, "Bad CalGray color space"); - return nullptr; - } - cs = new GfxCalGrayColorSpace(); - obj2 = obj1.dictLookup("WhitePoint"); - if (obj2.isArray() && obj2.arrayGetLength() == 3) { - Object obj3 = obj2.arrayGet(0); - if (likely(obj3.isNum())) - cs->whiteX = obj3.getNum(); - obj3 = obj2.arrayGet(1); - if (likely(obj3.isNum())) - cs->whiteY = obj3.getNum(); - obj3 = obj2.arrayGet(2); - if (likely(obj3.isNum())) - cs->whiteZ = obj3.getNum(); - } - obj2 = obj1.dictLookup("BlackPoint"); - if (obj2.isArray() && obj2.arrayGetLength() == 3) { - Object obj3 = obj2.arrayGet(0); - if (likely(obj3.isNum())) - cs->blackX = obj3.getNum(); - obj3 = obj2.arrayGet(1); - if (likely(obj3.isNum())) - cs->blackY = obj3.getNum(); - obj3 = obj2.arrayGet(2); - if (likely(obj3.isNum())) - cs->blackZ = obj3.getNum(); - } - obj2 = obj1.dictLookup("Gamma"); - if (obj2.isNum()) { - cs->gamma = obj2.getNum(); - } - - cs->kr = 1 / (xyzrgb[0][0] * cs->whiteX + - xyzrgb[0][1] * cs->whiteY + - xyzrgb[0][2] * cs->whiteZ); - cs->kg = 1 / (xyzrgb[1][0] * cs->whiteX + - xyzrgb[1][1] * cs->whiteY + - xyzrgb[1][2] * cs->whiteZ); - cs->kb = 1 / (xyzrgb[2][0] * cs->whiteX + - xyzrgb[2][1] * cs->whiteY + - xyzrgb[2][2] * cs->whiteZ); -#ifdef USE_CMS - cs->transform = (state != nullptr) ? state->getXYZ2DisplayTransform() : XYZ2DisplayTransform; - if (cs->transform != nullptr) cs->transform->ref(); -#endif - return cs; -} - -// convert CalGray to media XYZ color space -// (not multiply by the white point) -void GfxCalGrayColorSpace::getXYZ(GfxColor *color, - double *pX, double *pY, double *pZ) { - const double A = colToDbl(color->c[0]); - const double xyzColor = pow(A,gamma); - *pX = xyzColor; - *pY = xyzColor; - *pZ = xyzColor; -} - -void GfxCalGrayColorSpace::getGray(GfxColor *color, GfxGray *gray) { - GfxRGB rgb; - -#ifdef USE_CMS - if (transform != nullptr && transform->getTransformPixelType() == PT_GRAY) { - Guchar out[gfxColorMaxComps]; - double in[gfxColorMaxComps]; - double X, Y, Z; - - getXYZ(color,&X,&Y,&Z); - in[0] = clip01(X); - in[1] = clip01(Y); - in[2] = clip01(Z); - transform->doTransform(in,out,1); - *gray = byteToCol(out[0]); - return; - } -#endif - getRGB(color, &rgb); - *gray = clip01((GfxColorComp)(0.299 * rgb.r + - 0.587 * rgb.g + - 0.114 * rgb.b + 0.5)); -} - -void GfxCalGrayColorSpace::getRGB(GfxColor *color, GfxRGB *rgb) { - double X, Y, Z; - double r, g, b; - - getXYZ(color,&X,&Y,&Z); -#ifdef USE_CMS - if (transform != nullptr && transform->getTransformPixelType() == PT_RGB) { - Guchar out[gfxColorMaxComps]; - double in[gfxColorMaxComps]; - - in[0] = clip01(X); - in[1] = clip01(Y); - in[2] = clip01(Z); - transform->doTransform(in,out,1); - rgb->r = byteToCol(out[0]); - rgb->g = byteToCol(out[1]); - rgb->b = byteToCol(out[2]); - return; - } -#endif - X *= whiteX; - Y *= whiteY; - Z *= whiteZ; - // convert XYZ to RGB, including gamut mapping and gamma correction - r = xyzrgb[0][0] * X + xyzrgb[0][1] * Y + xyzrgb[0][2] * Z; - g = xyzrgb[1][0] * X + xyzrgb[1][1] * Y + xyzrgb[1][2] * Z; - b = xyzrgb[2][0] * X + xyzrgb[2][1] * Y + xyzrgb[2][2] * Z; - rgb->r = dblToCol(sqrt(clip01(r * kr))); - rgb->g = dblToCol(sqrt(clip01(g * kg))); - rgb->b = dblToCol(sqrt(clip01(b * kb))); -} - -void GfxCalGrayColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk) { - GfxRGB rgb; - GfxColorComp c, m, y, k; - -#ifdef USE_CMS - if (transform != nullptr && transform->getTransformPixelType() == PT_CMYK) { - double in[gfxColorMaxComps]; - Guchar out[gfxColorMaxComps]; - double X, Y, Z; - - getXYZ(color,&X,&Y,&Z); - in[0] = clip01(X); - in[1] = clip01(Y); - in[2] = clip01(Z); - - transform->doTransform(in,out,1); - cmyk->c = byteToCol(out[0]); - cmyk->m = byteToCol(out[1]); - cmyk->y = byteToCol(out[2]); - cmyk->k = byteToCol(out[3]); - return; - } -#endif - getRGB(color, &rgb); - c = clip01(gfxColorComp1 - rgb.r); - m = clip01(gfxColorComp1 - rgb.g); - y = clip01(gfxColorComp1 - rgb.b); - k = c; - if (m < k) { - k = m; - } - if (y < k) { - k = y; - } - cmyk->c = c - k; - cmyk->m = m - k; - cmyk->y = y - k; - cmyk->k = k; -} - -void GfxCalGrayColorSpace::getDeviceN(GfxColor *color, GfxColor *deviceN) { - GfxCMYK cmyk; - for (int i = 0; i < gfxColorMaxComps; i++) - deviceN->c[i] = 0; - getCMYK(color, &cmyk); - deviceN->c[0] = cmyk.c; - deviceN->c[1] = cmyk.m; - deviceN->c[2] = cmyk.y; - deviceN->c[3] = cmyk.k; -} - -void GfxCalGrayColorSpace::getDefaultColor(GfxColor *color) { - color->c[0] = 0; -} - -//------------------------------------------------------------------------ -// GfxDeviceRGBColorSpace -//------------------------------------------------------------------------ - -GfxDeviceRGBColorSpace::GfxDeviceRGBColorSpace() { -} - -GfxDeviceRGBColorSpace::~GfxDeviceRGBColorSpace() { -} - -GfxColorSpace *GfxDeviceRGBColorSpace::copy() { - return new GfxDeviceRGBColorSpace(); -} - -void GfxDeviceRGBColorSpace::getGray(GfxColor *color, GfxGray *gray) { - *gray = clip01((GfxColorComp)(0.3 * color->c[0] + - 0.59 * color->c[1] + - 0.11 * color->c[2] + 0.5)); -} - -void GfxDeviceRGBColorSpace::getGrayLine(Guchar *in, Guchar *out, int length) { - int i; - - for (i = 0; i < length; i++) { - out[i] = - (in[i * 3 + 0] * 19595 + - in[i * 3 + 1] * 38469 + - in[i * 3 + 2] * 7472) / 65536; - } -} - -void GfxDeviceRGBColorSpace::getRGB(GfxColor *color, GfxRGB *rgb) { - rgb->r = clip01(color->c[0]); - rgb->g = clip01(color->c[1]); - rgb->b = clip01(color->c[2]); -} - -void GfxDeviceRGBColorSpace::getRGBLine(Guchar *in, unsigned int *out, - int length) { - Guchar *p; - int i; - - for (i = 0, p = in; i < length; i++, p += 3) - out[i] = (p[0] << 16) | (p[1] << 8) | (p[2] << 0); -} - -void GfxDeviceRGBColorSpace::getRGBLine(Guchar *in, Guchar *out, int length) { - for (int i = 0; i < length; i++) { - *out++ = *in++; - *out++ = *in++; - *out++ = *in++; - } -} - -void GfxDeviceRGBColorSpace::getRGBXLine(Guchar *in, Guchar *out, int length) { - for (int i = 0; i < length; i++) { - *out++ = *in++; - *out++ = *in++; - *out++ = *in++; - *out++ = 255; - } -} - -void GfxDeviceRGBColorSpace::getCMYKLine(Guchar *in, Guchar *out, int length) { - GfxColorComp c, m, y, k; - - for (int i = 0; i < length; i++) { - c = byteToCol(255 - *in++); - m = byteToCol(255 - *in++); - y = byteToCol(255 - *in++); - k = c; - if (m < k) { - k = m; - } - if (y < k) { - k = y; - } - *out++ = colToByte(c - k); - *out++ = colToByte(m - k); - *out++ = colToByte(y - k); - *out++ = colToByte(k); - } -} - -void GfxDeviceRGBColorSpace::getDeviceNLine(Guchar *in, Guchar *out, int length) { - GfxColorComp c, m, y, k; - - for (int i = 0; i < length; i++) { - for (int j = 0; j < SPOT_NCOMPS+4; j++) - out[j] = 0; - c = byteToCol(255 - *in++); - m = byteToCol(255 - *in++); - y = byteToCol(255 - *in++); - k = c; - if (m < k) { - k = m; - } - if (y < k) { - k = y; - } - out[0] = colToByte(c - k); - out[1] = colToByte(m - k); - out[2] = colToByte(y - k); - out[3] = colToByte(k); - out += (SPOT_NCOMPS+4); - } -} - -void GfxDeviceRGBColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk) { - GfxColorComp c, m, y, k; - - c = clip01(gfxColorComp1 - color->c[0]); - m = clip01(gfxColorComp1 - color->c[1]); - y = clip01(gfxColorComp1 - color->c[2]); - k = c; - if (m < k) { - k = m; - } - if (y < k) { - k = y; - } - cmyk->c = c - k; - cmyk->m = m - k; - cmyk->y = y - k; - cmyk->k = k; -} - -void GfxDeviceRGBColorSpace::getDeviceN(GfxColor *color, GfxColor *deviceN) { - GfxCMYK cmyk; - for (int i = 0; i < gfxColorMaxComps; i++) - deviceN->c[i] = 0; - getCMYK(color, &cmyk); - deviceN->c[0] = cmyk.c; - deviceN->c[1] = cmyk.m; - deviceN->c[2] = cmyk.y; - deviceN->c[3] = cmyk.k; -} - -void GfxDeviceRGBColorSpace::getDefaultColor(GfxColor *color) { - color->c[0] = 0; - color->c[1] = 0; - color->c[2] = 0; -} - -//------------------------------------------------------------------------ -// GfxCalRGBColorSpace -//------------------------------------------------------------------------ - -GfxCalRGBColorSpace::GfxCalRGBColorSpace() { - whiteX = whiteY = whiteZ = 1; - blackX = blackY = blackZ = 0; - gammaR = gammaG = gammaB = 1; - mat[0] = 1; mat[1] = 0; mat[2] = 0; - mat[3] = 0; mat[4] = 1; mat[5] = 0; - mat[6] = 0; mat[7] = 0; mat[8] = 1; -} - -GfxCalRGBColorSpace::~GfxCalRGBColorSpace() { -#ifdef USE_CMS - if (transform != nullptr) { - if (transform->unref() == 0) delete transform; - } -#endif -} - -GfxColorSpace *GfxCalRGBColorSpace::copy() { - GfxCalRGBColorSpace *cs; - int i; - - cs = new GfxCalRGBColorSpace(); - cs->whiteX = whiteX; - cs->whiteY = whiteY; - cs->whiteZ = whiteZ; - cs->blackX = blackX; - cs->blackY = blackY; - cs->blackZ = blackZ; - cs->gammaR = gammaR; - cs->gammaG = gammaG; - cs->gammaB = gammaB; - cs->kr = kr; - cs->kg = kg; - cs->kb = kb; - for (i = 0; i < 9; ++i) { - cs->mat[i] = mat[i]; - } -#ifdef USE_CMS - cs->transform = transform; - if (transform != nullptr) transform->ref(); -#endif - return cs; -} - -GfxColorSpace *GfxCalRGBColorSpace::parse(Array *arr, GfxState *state) { - GfxCalRGBColorSpace *cs; - Object obj1, obj2; - int i; - - obj1 = arr->get(1); - if (!obj1.isDict()) { - error(errSyntaxWarning, -1, "Bad CalRGB color space"); - return nullptr; - } - cs = new GfxCalRGBColorSpace(); - obj2 = obj1.dictLookup("WhitePoint"); - if (obj2.isArray() && obj2.arrayGetLength() == 3) { - Object obj3 = obj2.arrayGet(0); - if (likely(obj3.isNum())) - cs->whiteX = obj3.getNum(); - obj3 = obj2.arrayGet(1); - if (likely(obj3.isNum())) - cs->whiteY = obj3.getNum(); - obj3 = obj2.arrayGet(2); - if (likely(obj3.isNum())) - cs->whiteZ = obj3.getNum(); - } - obj2 = obj1.dictLookup("BlackPoint"); - if (obj2.isArray() && obj2.arrayGetLength() == 3) { - Object obj3 = obj2.arrayGet(0); - if (likely(obj3.isNum())) - cs->blackX = obj3.getNum(); - obj3 = obj2.arrayGet(1); - if (likely(obj3.isNum())) - cs->blackY = obj3.getNum(); - obj3 = obj2.arrayGet(2); - if (likely(obj3.isNum())) - cs->blackZ = obj3.getNum(); - } - obj2 = obj1.dictLookup("Gamma"); - if (obj2.isArray() && obj2.arrayGetLength() == 3) { - Object obj3 = obj2.arrayGet(0); - if (likely(obj3.isNum())) - cs->gammaR = obj3.getNum(); - obj3 = obj2.arrayGet(1); - if (likely(obj3.isNum())) - cs->gammaG = obj3.getNum(); - obj3 = obj2.arrayGet(2); - if (likely(obj3.isNum())) - cs->gammaB = obj3.getNum(); - } - obj2 = obj1.dictLookup("Matrix"); - if (obj2.isArray() && obj2.arrayGetLength() == 9) { - for (i = 0; i < 9; ++i) { - Object obj3 = obj2.arrayGet(i); - if (likely(obj3.isNum())) - cs->mat[i] = obj3.getNum(); - } - } - - cs->kr = 1 / (xyzrgb[0][0] * cs->whiteX + - xyzrgb[0][1] * cs->whiteY + - xyzrgb[0][2] * cs->whiteZ); - cs->kg = 1 / (xyzrgb[1][0] * cs->whiteX + - xyzrgb[1][1] * cs->whiteY + - xyzrgb[1][2] * cs->whiteZ); - cs->kb = 1 / (xyzrgb[2][0] * cs->whiteX + - xyzrgb[2][1] * cs->whiteY + - xyzrgb[2][2] * cs->whiteZ); - -#ifdef USE_CMS - cs->transform = (state != nullptr) ? state->getXYZ2DisplayTransform() : XYZ2DisplayTransform; - if (cs->transform != nullptr) cs->transform->ref(); -#endif - return cs; -} - -// convert CalRGB to XYZ color space -void GfxCalRGBColorSpace::getXYZ(GfxColor *color, - double *pX, double *pY, double *pZ) { - double A, B, C; - - A = pow(colToDbl(color->c[0]), gammaR); - B = pow(colToDbl(color->c[1]), gammaG); - C = pow(colToDbl(color->c[2]), gammaB); - *pX = mat[0] * A + mat[3] * B + mat[6] * C; - *pY = mat[1] * A + mat[4] * B + mat[7] * C; - *pZ = mat[2] * A + mat[5] * B + mat[8] * C; -} - -void GfxCalRGBColorSpace::getGray(GfxColor *color, GfxGray *gray) { - GfxRGB rgb; - -#ifdef USE_CMS - if (transform != nullptr && transform->getTransformPixelType() == PT_GRAY) { - Guchar out[gfxColorMaxComps]; - double in[gfxColorMaxComps]; - double X, Y, Z; - - getXYZ(color,&X,&Y,&Z); - in[0] = clip01(X); - in[1] = clip01(Y); - in[2] = clip01(Z); - transform->doTransform(in,out,1); - *gray = byteToCol(out[0]); - return; - } -#endif - getRGB(color, &rgb); - *gray = clip01((GfxColorComp)(0.299 * rgb.r + - 0.587 * rgb.g + - 0.114 * rgb.b + 0.5)); -} - -void GfxCalRGBColorSpace::getRGB(GfxColor *color, GfxRGB *rgb) { - double X, Y, Z; - double r, g, b; - - getXYZ(color,&X,&Y,&Z); -#ifdef USE_CMS - if (transform != nullptr && transform->getTransformPixelType() == PT_RGB) { - Guchar out[gfxColorMaxComps]; - double in[gfxColorMaxComps]; - - in[0] = clip01(X/whiteX); - in[1] = clip01(Y/whiteY); - in[2] = clip01(Z/whiteZ); - transform->doTransform(in,out,1); - rgb->r = byteToCol(out[0]); - rgb->g = byteToCol(out[1]); - rgb->b = byteToCol(out[2]); - return; - } -#endif - // convert XYZ to RGB, including gamut mapping and gamma correction - r = xyzrgb[0][0] * X + xyzrgb[0][1] * Y + xyzrgb[0][2] * Z; - g = xyzrgb[1][0] * X + xyzrgb[1][1] * Y + xyzrgb[1][2] * Z; - b = xyzrgb[2][0] * X + xyzrgb[2][1] * Y + xyzrgb[2][2] * Z; - rgb->r = dblToCol(sqrt(clip01(r))); - rgb->g = dblToCol(sqrt(clip01(g))); - rgb->b = dblToCol(sqrt(clip01(b))); -} - -void GfxCalRGBColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk) { - GfxRGB rgb; - GfxColorComp c, m, y, k; - -#ifdef USE_CMS - if (transform != nullptr && transform->getTransformPixelType() == PT_CMYK) { - double in[gfxColorMaxComps]; - Guchar out[gfxColorMaxComps]; - double X, Y, Z; - - getXYZ(color,&X,&Y,&Z); - in[0] = clip01(X); - in[1] = clip01(Y); - in[2] = clip01(Z); - transform->doTransform(in,out,1); - cmyk->c = byteToCol(out[0]); - cmyk->m = byteToCol(out[1]); - cmyk->y = byteToCol(out[2]); - cmyk->k = byteToCol(out[3]); - return; - } -#endif - getRGB(color, &rgb); - c = clip01(gfxColorComp1 - rgb.r); - m = clip01(gfxColorComp1 - rgb.g); - y = clip01(gfxColorComp1 - rgb.b); - k = c; - if (m < k) { - k = m; - } - if (y < k) { - k = y; - } - cmyk->c = c - k; - cmyk->m = m - k; - cmyk->y = y - k; - cmyk->k = k; -} - -void GfxCalRGBColorSpace::getDeviceN(GfxColor *color, GfxColor *deviceN) { - GfxCMYK cmyk; - for (int i = 0; i < gfxColorMaxComps; i++) - deviceN->c[i] = 0; - getCMYK(color, &cmyk); - deviceN->c[0] = cmyk.c; - deviceN->c[1] = cmyk.m; - deviceN->c[2] = cmyk.y; - deviceN->c[3] = cmyk.k; -} - -void GfxCalRGBColorSpace::getDefaultColor(GfxColor *color) { - color->c[0] = 0; - color->c[1] = 0; - color->c[2] = 0; -} - -//------------------------------------------------------------------------ -// GfxDeviceCMYKColorSpace -//------------------------------------------------------------------------ - -GfxDeviceCMYKColorSpace::GfxDeviceCMYKColorSpace() { -} - -GfxDeviceCMYKColorSpace::~GfxDeviceCMYKColorSpace() { -} - -GfxColorSpace *GfxDeviceCMYKColorSpace::copy() { - return new GfxDeviceCMYKColorSpace(); -} - -void GfxDeviceCMYKColorSpace::getGray(GfxColor *color, GfxGray *gray) { - *gray = clip01((GfxColorComp)(gfxColorComp1 - color->c[3] - - 0.3 * color->c[0] - - 0.59 * color->c[1] - - 0.11 * color->c[2] + 0.5)); -} - -void GfxDeviceCMYKColorSpace::getRGB(GfxColor *color, GfxRGB *rgb) { - double c, m, y, k, c1, m1, y1, k1, r, g, b; - - c = colToDbl(color->c[0]); - m = colToDbl(color->c[1]); - y = colToDbl(color->c[2]); - k = colToDbl(color->c[3]); - c1 = 1 - c; - m1 = 1 - m; - y1 = 1 - y; - k1 = 1 - k; - cmykToRGBMatrixMultiplication(c, m, y, k, c1, m1, y1, k1, r, g, b); - rgb->r = clip01(dblToCol(r)); - rgb->g = clip01(dblToCol(g)); - rgb->b = clip01(dblToCol(b)); -} - -static inline void GfxDeviceCMYKColorSpacegetRGBLineHelper(Guchar *&in, double &r, double &g, double &b) -{ - double c, m, y, k, c1, m1, y1, k1; - - c = byteToDbl(*in++); - m = byteToDbl(*in++); - y = byteToDbl(*in++); - k = byteToDbl(*in++); - c1 = 1 - c; - m1 = 1 - m; - y1 = 1 - y; - k1 = 1 - k; - cmykToRGBMatrixMultiplication(c, m, y, k, c1, m1, y1, k1, r, g, b); -} - -void GfxDeviceCMYKColorSpace::getRGBLine(Guchar *in, unsigned int *out, int length) -{ - double r, g, b; - for (int i = 0; i < length; i++) { - GfxDeviceCMYKColorSpacegetRGBLineHelper(in, r, g, b); - *out++ = (dblToByte(clip01(r)) << 16) | (dblToByte(clip01(g)) << 8) | dblToByte(clip01(b)); - } -} - -void GfxDeviceCMYKColorSpace::getRGBLine(Guchar *in, Guchar *out, int length) -{ - double r, g, b; - - for (int i = 0; i < length; i++) { - GfxDeviceCMYKColorSpacegetRGBLineHelper(in, r, g, b); - *out++ = dblToByte(clip01(r)); - *out++ = dblToByte(clip01(g)); - *out++ = dblToByte(clip01(b)); - } -} - -void GfxDeviceCMYKColorSpace::getRGBXLine(Guchar *in, Guchar *out, int length) -{ - double r, g, b; - - for (int i = 0; i < length; i++) { - GfxDeviceCMYKColorSpacegetRGBLineHelper(in, r, g, b); - *out++ = dblToByte(clip01(r)); - *out++ = dblToByte(clip01(g)); - *out++ = dblToByte(clip01(b)); - *out++ = 255; - } -} - -void GfxDeviceCMYKColorSpace::getCMYKLine(Guchar *in, Guchar *out, int length) -{ - for (int i = 0; i < length; i++) { - *out++ = *in++; - *out++ = *in++; - *out++ = *in++; - *out++ = *in++; - } -} - -void GfxDeviceCMYKColorSpace::getDeviceNLine(Guchar *in, Guchar *out, int length) -{ - for (int i = 0; i < length; i++) { - for (int j = 0; j < SPOT_NCOMPS+4; j++) - out[j] = 0; - out[0] = *in++; - out[1] = *in++; - out[2] = *in++; - out[3] = *in++; - out += (SPOT_NCOMPS+4); - } -} - -void GfxDeviceCMYKColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk) { - cmyk->c = clip01(color->c[0]); - cmyk->m = clip01(color->c[1]); - cmyk->y = clip01(color->c[2]); - cmyk->k = clip01(color->c[3]); -} - -void GfxDeviceCMYKColorSpace::getDeviceN(GfxColor *color, GfxColor *deviceN) { - for (int i = 0; i < gfxColorMaxComps; i++) - deviceN->c[i] = 0; - deviceN->c[0] = clip01(color->c[0]); - deviceN->c[1] = clip01(color->c[1]); - deviceN->c[2] = clip01(color->c[2]); - deviceN->c[3] = clip01(color->c[3]); -} - -void GfxDeviceCMYKColorSpace::getDefaultColor(GfxColor *color) { - color->c[0] = 0; - color->c[1] = 0; - color->c[2] = 0; - color->c[3] = gfxColorComp1; -} - -//------------------------------------------------------------------------ -// GfxLabColorSpace -//------------------------------------------------------------------------ - -GfxLabColorSpace::GfxLabColorSpace() { - whiteX = whiteY = whiteZ = 1; - blackX = blackY = blackZ = 0; - aMin = bMin = -100; - aMax = bMax = 100; -} - -GfxLabColorSpace::~GfxLabColorSpace() { -#ifdef USE_CMS - if (transform != nullptr) { - if (transform->unref() == 0) delete transform; - } -#endif -} - -GfxColorSpace *GfxLabColorSpace::copy() { - GfxLabColorSpace *cs; - - cs = new GfxLabColorSpace(); - cs->whiteX = whiteX; - cs->whiteY = whiteY; - cs->whiteZ = whiteZ; - cs->blackX = blackX; - cs->blackY = blackY; - cs->blackZ = blackZ; - cs->aMin = aMin; - cs->aMax = aMax; - cs->bMin = bMin; - cs->bMax = bMax; - cs->kr = kr; - cs->kg = kg; - cs->kb = kb; -#ifdef USE_CMS - cs->transform = transform; - if (transform != nullptr) transform->ref(); -#endif - return cs; -} - -GfxColorSpace *GfxLabColorSpace::parse(Array *arr, GfxState *state) { - GfxLabColorSpace *cs; - Object obj1, obj2; - - obj1 = arr->get(1); - if (!obj1.isDict()) { - error(errSyntaxWarning, -1, "Bad Lab color space"); - return nullptr; - } - cs = new GfxLabColorSpace(); - bool ok = true; - obj2 = obj1.dictLookup("WhitePoint"); - if (obj2.isArray() && obj2.arrayGetLength() == 3) { - Object obj3 = obj2.arrayGet(0); - cs->whiteX = obj3.getNum(&ok); - obj3 = obj2.arrayGet(1); - cs->whiteY = obj3.getNum(&ok); - obj3 = obj2.arrayGet(2); - cs->whiteZ = obj3.getNum(&ok); - } - obj2 = obj1.dictLookup("BlackPoint"); - if (obj2.isArray() && obj2.arrayGetLength() == 3) { - Object obj3 = obj2.arrayGet(0); - cs->blackX = obj3.getNum(&ok); - obj3 = obj2.arrayGet(1); - cs->blackY = obj3.getNum(&ok); - obj3 = obj2.arrayGet(2); - cs->blackZ = obj3.getNum(&ok); - } - obj2 = obj1.dictLookup("Range"); - if (obj2.isArray() && obj2.arrayGetLength() == 4) { - Object obj3 = obj2.arrayGet(0); - cs->aMin = obj3.getNum(&ok); - obj3 = obj2.arrayGet(1); - cs->aMax = obj3.getNum(&ok); - obj3 = obj2.arrayGet(2); - cs->bMin = obj3.getNum(&ok); - obj3 = obj2.arrayGet(3); - cs->bMax = obj3.getNum(&ok); - } - - if (!ok) { - error(errSyntaxWarning, -1, "Bad Lab color space"); -#ifdef USE_CMS - cs->transform = nullptr; -#endif - delete cs; - return nullptr; - } - - cs->kr = 1 / (xyzrgb[0][0] * cs->whiteX + - xyzrgb[0][1] * cs->whiteY + - xyzrgb[0][2] * cs->whiteZ); - cs->kg = 1 / (xyzrgb[1][0] * cs->whiteX + - xyzrgb[1][1] * cs->whiteY + - xyzrgb[1][2] * cs->whiteZ); - cs->kb = 1 / (xyzrgb[2][0] * cs->whiteX + - xyzrgb[2][1] * cs->whiteY + - xyzrgb[2][2] * cs->whiteZ); - -#ifdef USE_CMS - cs->transform = (state != nullptr) ? state->getXYZ2DisplayTransform() : XYZ2DisplayTransform; - if (cs->transform != nullptr) cs->transform->ref(); -#endif - return cs; -} - -void GfxLabColorSpace::getGray(GfxColor *color, GfxGray *gray) { - GfxRGB rgb; - -#ifdef USE_CMS - if (transform != nullptr && transform->getTransformPixelType() == PT_GRAY) { - Guchar out[gfxColorMaxComps]; - double in[gfxColorMaxComps]; - - getXYZ(color, &in[0], &in[1], &in[2]); - transform->doTransform(in,out,1); - *gray = byteToCol(out[0]); - return; - } -#endif - getRGB(color, &rgb); - *gray = clip01((GfxColorComp)(0.299 * rgb.r + - 0.587 * rgb.g + - 0.114 * rgb.b + 0.5)); -} - -// convert L*a*b* to media XYZ color space -// (not multiply by the white point) -void GfxLabColorSpace::getXYZ(GfxColor *color, - double *pX, double *pY, double *pZ) { - double X, Y, Z; - double t1, t2; - - t1 = (colToDbl(color->c[0]) + 16) / 116; - t2 = t1 + colToDbl(color->c[1]) / 500; - if (t2 >= (6.0 / 29.0)) { - X = t2 * t2 * t2; - } else { - X = (108.0 / 841.0) * (t2 - (4.0 / 29.0)); - } - if (t1 >= (6.0 / 29.0)) { - Y = t1 * t1 * t1; - } else { - Y = (108.0 / 841.0) * (t1 - (4.0 / 29.0)); - } - t2 = t1 - colToDbl(color->c[2]) / 200; - if (t2 >= (6.0 / 29.0)) { - Z = t2 * t2 * t2; - } else { - Z = (108.0 / 841.0) * (t2 - (4.0 / 29.0)); - } - *pX = X; - *pY = Y; - *pZ = Z; -} - -void GfxLabColorSpace::getRGB(GfxColor *color, GfxRGB *rgb) { - double X, Y, Z; - - getXYZ(color, &X, &Y, &Z); -#ifdef USE_CMS - if (transform != nullptr && transform->getTransformPixelType() == PT_RGB) { - Guchar out[gfxColorMaxComps]; - double in[gfxColorMaxComps]; - - in[0] = clip01(X); - in[1] = clip01(Y); - in[2] = clip01(Z); - transform->doTransform(in,out,1); - rgb->r = byteToCol(out[0]); - rgb->g = byteToCol(out[1]); - rgb->b = byteToCol(out[2]); - return; - } else if (transform != nullptr && transform->getTransformPixelType() == PT_CMYK) { - Guchar out[gfxColorMaxComps]; - double in[gfxColorMaxComps]; - double c, m, y, k, c1, m1, y1, k1, r, g, b; - - in[0] = clip01(X); - in[1] = clip01(Y); - in[2] = clip01(Z); - transform->doTransform(in,out,1); - c = byteToDbl(out[0]); - m = byteToDbl(out[1]); - y = byteToDbl(out[2]); - k = byteToDbl(out[3]); - c1 = 1 - c; - m1 = 1 - m; - y1 = 1 - y; - k1 = 1 - k; - cmykToRGBMatrixMultiplication(c, m, y, k, c1, m1, y1, k1, r, g, b); - rgb->r = clip01(dblToCol(r)); - rgb->g = clip01(dblToCol(g)); - rgb->b = clip01(dblToCol(b)); - return; - } -#endif - X *= whiteX; - Y *= whiteY; - Z *= whiteZ; - // convert XYZ to RGB, including gamut mapping and gamma correction - const double r = xyzrgb[0][0] * X + xyzrgb[0][1] * Y + xyzrgb[0][2] * Z; - const double g = xyzrgb[1][0] * X + xyzrgb[1][1] * Y + xyzrgb[1][2] * Z; - const double b = xyzrgb[2][0] * X + xyzrgb[2][1] * Y + xyzrgb[2][2] * Z; - rgb->r = dblToCol(sqrt(clip01(r * kr))); - rgb->g = dblToCol(sqrt(clip01(g * kg))); - rgb->b = dblToCol(sqrt(clip01(b * kb))); -} - -void GfxLabColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk) { - GfxRGB rgb; - GfxColorComp c, m, y, k; - -#ifdef USE_CMS - if (transform != nullptr && transform->getTransformPixelType() == PT_CMYK) { - double in[gfxColorMaxComps]; - Guchar out[gfxColorMaxComps]; - - getXYZ(color, &in[0], &in[1], &in[2]); - transform->doTransform(in,out,1); - cmyk->c = byteToCol(out[0]); - cmyk->m = byteToCol(out[1]); - cmyk->y = byteToCol(out[2]); - cmyk->k = byteToCol(out[3]); - return; - } -#endif - getRGB(color, &rgb); - c = clip01(gfxColorComp1 - rgb.r); - m = clip01(gfxColorComp1 - rgb.g); - y = clip01(gfxColorComp1 - rgb.b); - k = c; - if (m < k) { - k = m; - } - if (y < k) { - k = y; - } - cmyk->c = c - k; - cmyk->m = m - k; - cmyk->y = y - k; - cmyk->k = k; -} - -void GfxLabColorSpace::getDeviceN(GfxColor *color, GfxColor *deviceN) { - GfxCMYK cmyk; - for (int i = 0; i < gfxColorMaxComps; i++) - deviceN->c[i] = 0; - getCMYK(color, &cmyk); - deviceN->c[0] = cmyk.c; - deviceN->c[1] = cmyk.m; - deviceN->c[2] = cmyk.y; - deviceN->c[3] = cmyk.k; -} - -void GfxLabColorSpace::getDefaultColor(GfxColor *color) { - color->c[0] = 0; - if (aMin > 0) { - color->c[1] = dblToCol(aMin); - } else if (aMax < 0) { - color->c[1] = dblToCol(aMax); - } else { - color->c[1] = 0; - } - if (bMin > 0) { - color->c[2] = dblToCol(bMin); - } else if (bMax < 0) { - color->c[2] = dblToCol(bMax); - } else { - color->c[2] = 0; - } -} - -void GfxLabColorSpace::getDefaultRanges(double *decodeLow, double *decodeRange, - int maxImgPixel) { - decodeLow[0] = 0; - decodeRange[0] = 100; - decodeLow[1] = aMin; - decodeRange[1] = aMax - aMin; - decodeLow[2] = bMin; - decodeRange[2] = bMax - bMin; -} - -//------------------------------------------------------------------------ -// GfxICCBasedColorSpace -//------------------------------------------------------------------------ - -class GfxICCBasedColorSpaceKey : public PopplerCacheKey -{ - public: - GfxICCBasedColorSpaceKey(int numA, int genA) : num(numA), gen(genA) - { - } - - bool operator==(const PopplerCacheKey &key) const override - { - const GfxICCBasedColorSpaceKey *k = static_cast<const GfxICCBasedColorSpaceKey*>(&key); - return k->num == num && k->gen == gen; - } - - int num, gen; -}; - -class GfxICCBasedColorSpaceItem : public PopplerCacheItem -{ - public: - GfxICCBasedColorSpaceItem(GfxICCBasedColorSpace *csA) - { - cs = static_cast<GfxICCBasedColorSpace*>(csA->copy()); - } - - ~GfxICCBasedColorSpaceItem() - { - delete cs; - } - - GfxICCBasedColorSpace *cs; -}; - -GfxICCBasedColorSpace::GfxICCBasedColorSpace(int nCompsA, GfxColorSpace *altA, - Ref *iccProfileStreamA) { - nComps = nCompsA; - alt = altA; - iccProfileStream = *iccProfileStreamA; - rangeMin[0] = rangeMin[1] = rangeMin[2] = rangeMin[3] = 0; - rangeMax[0] = rangeMax[1] = rangeMax[2] = rangeMax[3] = 1; -#ifdef USE_CMS - transform = nullptr; - lineTransform = nullptr; -#endif -} - -GfxICCBasedColorSpace::~GfxICCBasedColorSpace() { - delete alt; -#ifdef USE_CMS - if (transform != nullptr) { - if (transform->unref() == 0) delete transform; - } - if (lineTransform != nullptr) { - if (lineTransform->unref() == 0) delete lineTransform; - } -#endif -} - -GfxColorSpace *GfxICCBasedColorSpace::copy() { - GfxICCBasedColorSpace *cs; - int i; - - cs = new GfxICCBasedColorSpace(nComps, alt->copy(), &iccProfileStream); - for (i = 0; i < 4; ++i) { - cs->rangeMin[i] = rangeMin[i]; - cs->rangeMax[i] = rangeMax[i]; - } -#ifdef USE_CMS - cs->transform = transform; - if (transform != nullptr) transform->ref(); - cs->lineTransform = lineTransform; - if (lineTransform != nullptr) lineTransform->ref(); -#endif - return cs; -} - -GfxColorSpace *GfxICCBasedColorSpace::parse(Array *arr, OutputDev *out, GfxState *state, int recursion) { - GfxICCBasedColorSpace *cs; - Ref iccProfileStreamA; - int nCompsA; - GfxColorSpace *altA; - Dict *dict; - Object obj1, obj2, obj3; - int i; - - if (arr->getLength() < 2) { - error(errSyntaxError, -1, "Bad ICCBased color space"); - return nullptr; - } - obj1 = arr->getNF(1); - if (obj1.isRef()) { - iccProfileStreamA = obj1.getRef(); - } else { - iccProfileStreamA.num = 0; - iccProfileStreamA.gen = 0; - } -#ifdef USE_CMS - // check cache - if (out && iccProfileStreamA.num > 0) { - GfxICCBasedColorSpaceKey k(iccProfileStreamA.num, iccProfileStreamA.gen); - GfxICCBasedColorSpaceItem *item = static_cast<GfxICCBasedColorSpaceItem *>(out->getIccColorSpaceCache()->lookup(k)); - if (item != nullptr) - { - cs = static_cast<GfxICCBasedColorSpace*>(item->cs->copy()); - int transformIntent = cs->getIntent(); - int cmsIntent = INTENT_RELATIVE_COLORIMETRIC; - if (state != nullptr) { - const char *intent = state->getRenderingIntent(); - if (intent != nullptr) { - if (strcmp(intent, "AbsoluteColorimetric") == 0) { - cmsIntent = INTENT_ABSOLUTE_COLORIMETRIC; - } else if (strcmp(intent, "Saturation") == 0) { - cmsIntent = INTENT_SATURATION; - } else if (strcmp(intent, "Perceptual") == 0) { - cmsIntent = INTENT_PERCEPTUAL; - } - } - } - if (transformIntent == cmsIntent) { - return cs; - } - delete cs; - } - } -#endif - obj1 = arr->get(1); - if (!obj1.isStream()) { - error(errSyntaxWarning, -1, "Bad ICCBased color space (stream)"); - return nullptr; - } - dict = obj1.streamGetDict(); - obj2 = dict->lookup("N"); - if (!obj2.isInt()) { - error(errSyntaxWarning, -1, "Bad ICCBased color space (N)"); - return nullptr; - } - nCompsA = obj2.getInt(); - if (nCompsA > 4) { - error(errSyntaxError, -1, - "ICCBased color space with too many ({0:d} > 4) components", - nCompsA); - nCompsA = 4; - } - obj2 = dict->lookup("Alternate"); - if (obj2.isNull() || - !(altA = GfxColorSpace::parse(nullptr, &obj2, out, state, recursion + 1))) { - switch (nCompsA) { - case 1: - altA = new GfxDeviceGrayColorSpace(); - break; - case 3: - altA = new GfxDeviceRGBColorSpace(); - break; - case 4: - altA = new GfxDeviceCMYKColorSpace(); - break; - default: - error(errSyntaxWarning, -1, "Bad ICCBased color space - invalid N"); - return nullptr; - } - } - if (altA->getNComps() != nCompsA) { - error(errSyntaxWarning, -1, "Bad ICCBased color space - N doesn't match alt color space"); - delete altA; - return nullptr; - } - cs = new GfxICCBasedColorSpace(nCompsA, altA, &iccProfileStreamA); - obj2 = dict->lookup("Range"); - if (obj2.isArray() && obj2.arrayGetLength() == 2 * nCompsA) { - Object obj4; - for (i = 0; i < nCompsA; ++i) { - obj3 = obj2.arrayGet(2*i); - obj4 = obj2.arrayGet(2*i+1); - if (obj3.isNum() && obj4.isNum()) { - cs->rangeMin[i] = obj3.getNum(); - cs->rangeMax[i] = obj4.getNum(); - } - } - } - -#ifdef USE_CMS - obj1 = arr->get(1); - Guchar *profBuf; - Stream *iccStream = obj1.getStream(); - int length = 0; - - profBuf = iccStream->toUnsignedChars(&length, 65536, 65536); - cmsHPROFILE hp = cmsOpenProfileFromMem(profBuf,length); - gfree(profBuf); - if (hp == nullptr) { - error(errSyntaxWarning, -1, "read ICCBased color space profile error"); - } else { - cmsHPROFILE dhp = (state != nullptr && state->getDisplayProfile() != nullptr) ? state->getDisplayProfile() : displayProfile; - if (dhp == nullptr) { - if (unlikely(RGBProfile == nullptr)) { - GfxColorSpace::setupColorProfiles(); - } - dhp = RGBProfile; - } - unsigned int cst = getCMSColorSpaceType(cmsGetColorSpace(hp)); - unsigned int dNChannels = getCMSNChannels(cmsGetColorSpace(dhp)); - unsigned int dcst = getCMSColorSpaceType(cmsGetColorSpace(dhp)); - cmsHTRANSFORM transform; - - int cmsIntent = INTENT_RELATIVE_COLORIMETRIC; - if (state != nullptr) { - const char *intent = state->getRenderingIntent(); - if (intent != nullptr) { - if (strcmp(intent, "AbsoluteColorimetric") == 0) { - cmsIntent = INTENT_ABSOLUTE_COLORIMETRIC; - } else if (strcmp(intent, "Saturation") == 0) { - cmsIntent = INTENT_SATURATION; - } else if (strcmp(intent, "Perceptual") == 0) { - cmsIntent = INTENT_PERCEPTUAL; - } - } - } - if ((transform = cmsCreateTransform(hp, - COLORSPACE_SH(cst) |CHANNELS_SH(nCompsA) | BYTES_SH(1), - dhp, - COLORSPACE_SH(dcst) | - CHANNELS_SH(dNChannels) | BYTES_SH(1), - cmsIntent, LCMS_FLAGS)) == nullptr) { - error(errSyntaxWarning, -1, "Can't create transform"); - cs->transform = nullptr; - } else { - cs->transform = new GfxColorTransform(transform, cmsIntent, cst, dcst); - } - if (dcst == PT_RGB || dcst == PT_CMYK) { - // create line transform only when the display is RGB type color space - if ((transform = cmsCreateTransform(hp, - CHANNELS_SH(nCompsA) | BYTES_SH(1),dhp, - (dcst == PT_RGB) ? TYPE_RGB_8 : TYPE_CMYK_8, cmsIntent, LCMS_FLAGS)) == nullptr) { - error(errSyntaxWarning, -1, "Can't create transform"); - cs->lineTransform = nullptr; - } else { - cs->lineTransform = new GfxColorTransform(transform, cmsIntent, cst, dcst); - } - } - cmsCloseProfile(hp); - } - // put this colorSpace into cache - if (out && iccProfileStreamA.num > 0) { - GfxICCBasedColorSpaceKey *k = new GfxICCBasedColorSpaceKey(iccProfileStreamA.num, iccProfileStreamA.gen); - GfxICCBasedColorSpaceItem *item = new GfxICCBasedColorSpaceItem(cs); - out->getIccColorSpaceCache()->put(k, item); - } -#endif - return cs; -} - -void GfxICCBasedColorSpace::getGray(GfxColor *color, GfxGray *gray) { -#ifdef USE_CMS - if (transform != nullptr && transform->getTransformPixelType() == PT_GRAY) { - Guchar in[gfxColorMaxComps]; - Guchar out[gfxColorMaxComps]; - - if (nComps == 3 && transform->getInputPixelType() == PT_Lab) { - in[0] = colToByte(dblToCol(colToDbl(color->c[0]) / 100.0)); - in[1] = colToByte(dblToCol((colToDbl(color->c[1]) + 128.0) / 255.0)); - in[2] = colToByte(dblToCol((colToDbl(color->c[2]) + 128.0) / 255.0)); - } else { - for (int i = 0;i < nComps;i++) { - in[i] = colToByte(color->c[i]); - } - } - if (nComps <= 4) { - unsigned int key = 0; - for (int j = 0; j < nComps; j++) { - key = (key << 8) + in[j]; - } - std::map<unsigned int, unsigned int>::iterator it = cmsCache.find(key); - if (it != cmsCache.end()) { - unsigned int value = it->second; - *gray = byteToCol(value & 0xff); - return; - } - } - transform->doTransform(in,out,1); - *gray = byteToCol(out[0]); - if (nComps <= 4 && cmsCache.size() <= CMSCACHE_LIMIT) { - unsigned int key = 0; - for (int j = 0; j < nComps; j++) { - key = (key << 8) + in[j]; - } - unsigned int value = out[0]; - cmsCache.insert(std::pair<unsigned int, unsigned int>(key, value)); - } - } else { - GfxRGB rgb; - getRGB(color,&rgb); - *gray = clip01((GfxColorComp)(0.3 * rgb.r + - 0.59 * rgb.g + - 0.11 * rgb.b + 0.5)); - } -#else - alt->getGray(color, gray); -#endif -} - -void GfxICCBasedColorSpace::getRGB(GfxColor *color, GfxRGB *rgb) { -#ifdef USE_CMS - if (transform != nullptr && transform->getTransformPixelType() == PT_RGB) { - Guchar in[gfxColorMaxComps]; - Guchar out[gfxColorMaxComps]; - - if (nComps == 3 && transform->getInputPixelType() == PT_Lab) { - in[0] = colToByte(dblToCol(colToDbl(color->c[0]) / 100.0)); - in[1] = colToByte(dblToCol((colToDbl(color->c[1]) + 128.0) / 255.0)); - in[2] = colToByte(dblToCol((colToDbl(color->c[2]) + 128.0) / 255.0)); - } else { - for (int i = 0;i < nComps;i++) { - in[i] = colToByte(color->c[i]); - } - } - if (nComps <= 4) { - unsigned int key = 0; - for (int j = 0; j < nComps; j++) { - key = (key << 8) + in[j]; - } - std::map<unsigned int, unsigned int>::iterator it = cmsCache.find(key); - if (it != cmsCache.end()) { - unsigned int value = it->second; - rgb->r = byteToCol(value >> 16); - rgb->g = byteToCol((value >> 8) & 0xff); - rgb->b = byteToCol(value & 0xff); - return; - } - } - transform->doTransform(in,out,1); - rgb->r = byteToCol(out[0]); - rgb->g = byteToCol(out[1]); - rgb->b = byteToCol(out[2]); - if (nComps <= 4 && cmsCache.size() <= CMSCACHE_LIMIT) { - unsigned int key = 0; - for (int j = 0; j < nComps; j++) { - key = (key << 8) + in[j]; - } - unsigned int value = (out[0] << 16) + (out[1] << 8) + out[2]; - cmsCache.insert(std::pair<unsigned int, unsigned int>(key, value)); - } - } else if (transform != nullptr && transform->getTransformPixelType() == PT_CMYK) { - Guchar in[gfxColorMaxComps]; - Guchar out[gfxColorMaxComps]; - double c, m, y, k, c1, m1, y1, k1, r, g, b; - - if (nComps == 3 && transform->getInputPixelType() == PT_Lab) { - in[0] = colToByte(dblToCol(colToDbl(color->c[0]) / 100.0)); - in[1] = colToByte(dblToCol((colToDbl(color->c[1]) + 128.0) / 255.0)); - in[2] = colToByte(dblToCol((colToDbl(color->c[2]) + 128.0) / 255.0)); - } else { - for (int i = 0;i < nComps;i++) { - in[i] = colToByte(color->c[i]); - } - } - if (nComps <= 4) { - unsigned int key = 0; - for (int j = 0; j < nComps; j++) { - key = (key << 8) + in[j]; - } - std::map<unsigned int, unsigned int>::iterator it = cmsCache.find(key); - if (it != cmsCache.end()) { - unsigned int value = it->second; - rgb->r = byteToCol(value >> 16); - rgb->g = byteToCol((value >> 8) & 0xff); - rgb->b = byteToCol(value & 0xff); - return; - } - } - transform->doTransform(in,out,1); - c = byteToDbl(out[0]); - m = byteToDbl(out[1]); - y = byteToDbl(out[2]); - k = byteToDbl(out[3]); - c1 = 1 - c; - m1 = 1 - m; - y1 = 1 - y; - k1 = 1 - k; - cmykToRGBMatrixMultiplication(c, m, y, k, c1, m1, y1, k1, r, g, b); - rgb->r = clip01(dblToCol(r)); - rgb->g = clip01(dblToCol(g)); - rgb->b = clip01(dblToCol(b)); - if (nComps <= 4 && cmsCache.size() <= CMSCACHE_LIMIT) { - unsigned int key = 0; - for (int j = 0; j < nComps; j++) { - key = (key << 8) + in[j]; - } - unsigned int value = (dblToByte(r) << 16) + (dblToByte(g) << 8) + dblToByte(b); - cmsCache.insert(std::pair<unsigned int, unsigned int>(key, value)); - } - } else { - alt->getRGB(color, rgb); - } -#else - alt->getRGB(color, rgb); -#endif -} - -void GfxICCBasedColorSpace::getRGBLine(Guchar *in, unsigned int *out, - int length) { -#ifdef USE_CMS - if (lineTransform != nullptr && lineTransform->getTransformPixelType() == PT_RGB) { - Guchar* tmp = (Guchar *)gmallocn(3 * length, sizeof(Guchar)); - lineTransform->doTransform(in, tmp, length); - for (int i = 0; i < length; ++i) { - Guchar *current = tmp + (i * 3); - out[i] = (current[0] << 16) | (current[1] << 8) | current[2]; - } - gfree(tmp); - } else { - alt->getRGBLine(in, out, length); - } -#else - alt->getRGBLine(in, out, length); -#endif -} - -void GfxICCBasedColorSpace::getRGBLine(Guchar *in, Guchar *out, int length) { -#ifdef USE_CMS - if (lineTransform != nullptr && lineTransform->getTransformPixelType() == PT_RGB) { - Guchar* tmp = (Guchar *)gmallocn(3 * length, sizeof(Guchar)); - lineTransform->doTransform(in, tmp, length); - Guchar *current = tmp; - for (int i = 0; i < length; ++i) { - *out++ = *current++; - *out++ = *current++; - *out++ = *current++; - } - gfree(tmp); - } else if (lineTransform != nullptr && lineTransform->getTransformPixelType() == PT_CMYK) { - Guchar* tmp = (Guchar *)gmallocn(4 * length, sizeof(Guchar)); - lineTransform->doTransform(in, tmp, length); - Guchar *current = tmp; - double c, m, y, k, c1, m1, y1, k1, r, g, b; - for (int i = 0; i < length; ++i) { - c = byteToDbl(*current++); - m = byteToDbl(*current++); - y = byteToDbl(*current++); - k = byteToDbl(*current++); - c1 = 1 - c; - m1 = 1 - m; - y1 = 1 - y; - k1 = 1 - k; - cmykToRGBMatrixMultiplication(c, m, y, k, c1, m1, y1, k1, r, g, b); - *out++ = dblToByte(r); - *out++ = dblToByte(g); - *out++ = dblToByte(b); - } - gfree(tmp); - } else { - alt->getRGBLine(in, out, length); - } -#else - alt->getRGBLine(in, out, length); -#endif -} - -void GfxICCBasedColorSpace::getRGBXLine(Guchar *in, Guchar *out, int length) { -#ifdef USE_CMS - if (lineTransform != nullptr && lineTransform->getTransformPixelType() == PT_RGB) { - Guchar* tmp = (Guchar *)gmallocn(3 * length, sizeof(Guchar)); - lineTransform->doTransform(in, tmp, length); - Guchar *current = tmp; - for (int i = 0; i < length; ++i) { - *out++ = *current++; - *out++ = *current++; - *out++ = *current++; - *out++ = 255; - } - gfree(tmp); - } else { - alt->getRGBXLine(in, out, length); - } -#else - alt->getRGBXLine(in, out, length); -#endif -} - -void GfxICCBasedColorSpace::getCMYKLine(Guchar *in, Guchar *out, int length) { -#ifdef USE_CMS - if (lineTransform != nullptr && lineTransform->getTransformPixelType() == PT_CMYK) { - transform->doTransform(in,out,length); - } else if (lineTransform != nullptr && nComps != 4) { - GfxColorComp c, m, y, k; - Guchar* tmp = (Guchar *)gmallocn(3 * length, sizeof(Guchar)); - getRGBLine(in, tmp, length); - Guchar *p = tmp; - for (int i = 0; i < length; i++) { - c = byteToCol(255 - *p++); - m = byteToCol(255 - *p++); - y = byteToCol(255 - *p++); - k = c; - if (m < k) { - k = m; - } - if (y < k) { - k = y; - } - *out++ = colToByte(c - k); - *out++ = colToByte(m - k); - *out++ = colToByte(y - k); - *out++ = colToByte(k); - } - gfree(tmp); - } else { - alt->getCMYKLine(in, out, length); - } -#else - alt->getCMYKLine(in, out, length); -#endif -} - -void GfxICCBasedColorSpace::getDeviceNLine(Guchar *in, Guchar *out, int length) { -#ifdef USE_CMS - if (lineTransform != nullptr && lineTransform->getTransformPixelType() == PT_CMYK) { - Guchar* tmp = (Guchar *)gmallocn(4 * length, sizeof(Guchar)); - transform->doTransform(in,tmp,length); - Guchar *p = tmp; - for (int i = 0; i < length; i++) { - for (int j = 0; j < 4; j++) - *out++ = *p++; - for (int j = 4; j < SPOT_NCOMPS+4; j++) - *out++ = 0; - } - gfree(tmp); - } else if (lineTransform != nullptr && nComps != 4) { - GfxColorComp c, m, y, k; - Guchar* tmp = (Guchar *)gmallocn(3 * length, sizeof(Guchar)); - getRGBLine(in, tmp, length); - Guchar *p = tmp; - for (int i = 0; i < length; i++) { - for (int j = 0; j < SPOT_NCOMPS+4; j++) - out[j] = 0; - c = byteToCol(255 - *p++); - m = byteToCol(255 - *p++); - y = byteToCol(255 - *p++); - k = c; - if (m < k) { - k = m; - } - if (y < k) { - k = y; - } - out[0] = colToByte(c - k); - out[1] = colToByte(m - k); - out[2] = colToByte(y - k); - out[3] = colToByte(k); - out += (SPOT_NCOMPS+4); - } - gfree(tmp); - } else { - alt->getDeviceNLine(in, out, length); - } -#else - alt->getDeviceNLine(in, out, length); -#endif -} - -void GfxICCBasedColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk) { -#ifdef USE_CMS - if (transform != nullptr && transform->getTransformPixelType() == PT_CMYK) { - Guchar in[gfxColorMaxComps]; - Guchar out[gfxColorMaxComps]; - - if (nComps == 3 && transform->getInputPixelType() == PT_Lab) { - in[0] = colToByte(dblToCol(colToDbl(color->c[0]) / 100.0)); - in[1] = colToByte(dblToCol((colToDbl(color->c[1]) + 128.0) / 255.0)); - in[2] = colToByte(dblToCol((colToDbl(color->c[2]) + 128.0) / 255.0)); - } else { - for (int i = 0;i < nComps;i++) { - in[i] = colToByte(color->c[i]); - } - } - if (nComps <= 4) { - unsigned int key = 0; - for (int j = 0; j < nComps; j++) { - key = (key << 8) + in[j]; - } - std::map<unsigned int, unsigned int>::iterator it = cmsCache.find(key); - if (it != cmsCache.end()) { - unsigned int value = it->second; - cmyk->c = byteToCol(value >> 24); - cmyk->m = byteToCol((value >> 16) & 0xff); - cmyk->y = byteToCol((value >> 8) & 0xff); - cmyk->k = byteToCol(value & 0xff); - return; - } - } - transform->doTransform(in,out,1); - cmyk->c = byteToCol(out[0]); - cmyk->m = byteToCol(out[1]); - cmyk->y = byteToCol(out[2]); - cmyk->k = byteToCol(out[3]); - if (nComps <= 4 && cmsCache.size() <= CMSCACHE_LIMIT) { - unsigned int key = 0; - for (int j = 0; j < nComps; j++) { - key = (key << 8) + in[j]; - } - unsigned int value = (out[0] << 24) + (out[1] << 16) + (out[2] << 8) + out[3]; - cmsCache.insert(std::pair<unsigned int, unsigned int>(key, value)); - } - } else if (nComps != 4 && transform != nullptr && transform->getTransformPixelType() == PT_RGB) { - GfxRGB rgb; - GfxColorComp c, m, y, k; - - getRGB(color,&rgb); - c = clip01(gfxColorComp1 - rgb.r); - m = clip01(gfxColorComp1 - rgb.g); - y = clip01(gfxColorComp1 - rgb.b); - k = c; - if (m < k) { - k = m; - } - if (y < k) { - k = y; - } - cmyk->c = c - k; - cmyk->m = m - k; - cmyk->y = y - k; - cmyk->k = k; - } else { - alt->getCMYK(color, cmyk); - } -#else - alt->getCMYK(color, cmyk); -#endif -} - -GBool GfxICCBasedColorSpace::useGetRGBLine() { -#ifdef USE_CMS - return lineTransform != nullptr || alt->useGetRGBLine(); -#else - return alt->useGetRGBLine(); -#endif -} - -GBool GfxICCBasedColorSpace::useGetCMYKLine() { -#ifdef USE_CMS - return lineTransform != nullptr || alt->useGetCMYKLine(); -#else - return alt->useGetCMYKLine(); -#endif -} - -GBool GfxICCBasedColorSpace::useGetDeviceNLine() { -#ifdef USE_CMS - return lineTransform != nullptr || alt->useGetDeviceNLine(); -#else - return alt->useGetDeviceNLine(); -#endif -} - -void GfxICCBasedColorSpace::getDeviceN(GfxColor *color, GfxColor *deviceN) { - GfxCMYK cmyk; - for (int i = 0; i < gfxColorMaxComps; i++) - deviceN->c[i] = 0; - getCMYK(color, &cmyk); - deviceN->c[0] = cmyk.c; - deviceN->c[1] = cmyk.m; - deviceN->c[2] = cmyk.y; - deviceN->c[3] = cmyk.k; -} - -void GfxICCBasedColorSpace::getDefaultColor(GfxColor *color) { - int i; - - for (i = 0; i < nComps; ++i) { - if (rangeMin[i] > 0) { - color->c[i] = dblToCol(rangeMin[i]); - } else if (rangeMax[i] < 0) { - color->c[i] = dblToCol(rangeMax[i]); - } else { - color->c[i] = 0; - } - } -} - -void GfxICCBasedColorSpace::getDefaultRanges(double *decodeLow, - double *decodeRange, - int maxImgPixel) { - alt->getDefaultRanges(decodeLow, decodeRange, maxImgPixel); - -#if 0 - // this is nominally correct, but some PDF files don't set the - // correct ranges in the ICCBased dict - int i; - - for (i = 0; i < nComps; ++i) { - decodeLow[i] = rangeMin[i]; - decodeRange[i] = rangeMax[i] - rangeMin[i]; - } -#endif -} - -//------------------------------------------------------------------------ -// GfxIndexedColorSpace -//------------------------------------------------------------------------ - -GfxIndexedColorSpace::GfxIndexedColorSpace(GfxColorSpace *baseA, - int indexHighA) { - base = baseA; - indexHigh = indexHighA; - lookup = (Guchar *)gmallocn((indexHigh + 1) * base->getNComps(), - sizeof(Guchar)); - overprintMask = base->getOverprintMask(); -} - -GfxIndexedColorSpace::~GfxIndexedColorSpace() { - delete base; - gfree(lookup); -} - -GfxColorSpace *GfxIndexedColorSpace::copy() { - GfxIndexedColorSpace *cs; - - cs = new GfxIndexedColorSpace(base->copy(), indexHigh); - memcpy(cs->lookup, lookup, - (indexHigh + 1) * base->getNComps() * sizeof(Guchar)); - return cs; -} - -GfxColorSpace *GfxIndexedColorSpace::parse(GfxResources *res, Array *arr, OutputDev *out, GfxState *state, int recursion) { - GfxColorSpace *baseA; - int indexHighA; - Object obj1; - const char *s; - int i, j; - - if (arr->getLength() != 4) { - error(errSyntaxWarning, -1, "Bad Indexed color space"); - return nullptr; - } - obj1 = arr->get(1); - if (!(baseA = GfxColorSpace::parse(res, &obj1, out, state, recursion + 1))) { - error(errSyntaxWarning, -1, "Bad Indexed color space (base color space)"); - return nullptr; - } - obj1 = arr->get(2); - if (!obj1.isInt()) { - error(errSyntaxWarning, -1, "Bad Indexed color space (hival)"); - delete baseA; - return nullptr; - } - indexHighA = obj1.getInt(); - if (indexHighA < 0 || indexHighA > 255) { - // the PDF spec requires indexHigh to be in [0,255] -- allowing - // values larger than 255 creates a security hole: if nComps * - // indexHigh is greater than 2^31, the loop below may overwrite - // past the end of the array - int previousValue = indexHighA; - if (indexHighA < 0) indexHighA = 0; - else indexHighA = 255; - error(errSyntaxWarning, -1, "Bad Indexed color space (invalid indexHigh value, was {0:d} using {1:d} to try to recover)", previousValue, indexHighA); - } - GfxIndexedColorSpace *cs = new GfxIndexedColorSpace(baseA, indexHighA); - obj1 = arr->get(3); - const int n = baseA->getNComps(); - if (obj1.isStream()) { - obj1.streamReset(); - for (i = 0; i <= indexHighA; ++i) { - const int readChars = obj1.streamGetChars(n, &cs->lookup[i*n]); - for (j = readChars; j < n; ++j) { - error(errSyntaxWarning, -1, "Bad Indexed color space (lookup table stream too short) padding with zeroes"); - cs->lookup[i*n + j] = 0; - } - } - obj1.streamClose(); - } else if (obj1.isString()) { - if (obj1.getString()->getLength() < (indexHighA + 1) * n) { - error(errSyntaxWarning, -1, "Bad Indexed color space (lookup table string too short)"); - goto err3; - } - s = obj1.getString()->getCString(); - for (i = 0; i <= indexHighA; ++i) { - for (j = 0; j < n; ++j) { - cs->lookup[i*n + j] = (Guchar)*s++; - } - } - } else { - error(errSyntaxWarning, -1, "Bad Indexed color space (lookup table)"); - goto err3; - } - return cs; - - err3: - delete cs; - return nullptr; -} - -GfxColor *GfxIndexedColorSpace::mapColorToBase(GfxColor *color, - GfxColor *baseColor) { - Guchar *p; - double low[gfxColorMaxComps], range[gfxColorMaxComps]; - int n, i; - - n = base->getNComps(); - base->getDefaultRanges(low, range, indexHigh); - const int idx = (int)(colToDbl(color->c[0]) + 0.5) * n; - if (likely((idx + n - 1 < (indexHigh + 1) * base->getNComps()) && idx >= 0)) { - p = &lookup[idx]; - for (i = 0; i < n; ++i) { - baseColor->c[i] = dblToCol(low[i] + (p[i] / 255.0) * range[i]); - } - } else { - for (i = 0; i < n; ++i) { - baseColor->c[i] = 0; - } - } - return baseColor; -} - -void GfxIndexedColorSpace::getGray(GfxColor *color, GfxGray *gray) { - GfxColor color2; - - base->getGray(mapColorToBase(color, &color2), gray); -} - -void GfxIndexedColorSpace::getRGB(GfxColor *color, GfxRGB *rgb) { - GfxColor color2; - - base->getRGB(mapColorToBase(color, &color2), rgb); -} - -void GfxIndexedColorSpace::getRGBLine(Guchar *in, unsigned int *out, int length) { - Guchar *line; - int i, j, n; - - n = base->getNComps(); - line = (Guchar *) gmallocn (length, n); - for (i = 0; i < length; i++) - for (j = 0; j < n; j++) - line[i * n + j] = lookup[in[i] * n + j]; - - base->getRGBLine(line, out, length); - - gfree (line); -} - -void GfxIndexedColorSpace::getRGBLine(Guchar *in, Guchar *out, int length) -{ - Guchar *line; - int i, j, n; - - n = base->getNComps(); - line = (Guchar *) gmallocn (length, n); - for (i = 0; i < length; i++) - for (j = 0; j < n; j++) - line[i * n + j] = lookup[in[i] * n + j]; - - base->getRGBLine(line, out, length); - - gfree (line); -} - -void GfxIndexedColorSpace::getRGBXLine(Guchar *in, Guchar *out, int length) -{ - Guchar *line; - int i, j, n; - - n = base->getNComps(); - line = (Guchar *) gmallocn (length, n); - for (i = 0; i < length; i++) - for (j = 0; j < n; j++) - line[i * n + j] = lookup[in[i] * n + j]; - - base->getRGBXLine(line, out, length); - - gfree (line); -} - -void GfxIndexedColorSpace::getCMYKLine(Guchar *in, Guchar *out, int length) { - Guchar *line; - int i, j, n; - - n = base->getNComps(); - line = (Guchar *) gmallocn (length, n); - for (i = 0; i < length; i++) - for (j = 0; j < n; j++) - line[i * n + j] = lookup[in[i] * n + j]; - - base->getCMYKLine(line, out, length); - - gfree (line); -} - -void GfxIndexedColorSpace::getDeviceNLine(Guchar *in, Guchar *out, int length) { - Guchar *line; - int i, j, n; - - n = base->getNComps(); - line = (Guchar *) gmallocn (length, n); - for (i = 0; i < length; i++) - for (j = 0; j < n; j++) - line[i * n + j] = lookup[in[i] * n + j]; - - base->getDeviceNLine(line, out, length); - - gfree (line); -} - -void GfxIndexedColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk) { - GfxColor color2; - - base->getCMYK(mapColorToBase(color, &color2), cmyk); -} - -void GfxIndexedColorSpace::getDeviceN(GfxColor *color, GfxColor *deviceN) { - GfxColor color2; - - base->getDeviceN(mapColorToBase(color, &color2), deviceN); -} - -void GfxIndexedColorSpace::getDefaultColor(GfxColor *color) { - color->c[0] = 0; -} - -void GfxIndexedColorSpace::getDefaultRanges(double *decodeLow, - double *decodeRange, - int maxImgPixel) { - decodeLow[0] = 0; - decodeRange[0] = maxImgPixel; -} - -//------------------------------------------------------------------------ -// GfxSeparationColorSpace -//------------------------------------------------------------------------ - -GfxSeparationColorSpace::GfxSeparationColorSpace(GooString *nameA, - GfxColorSpace *altA, - Function *funcA) { - name = nameA; - alt = altA; - func = funcA; - nonMarking = !name->cmp("None"); - if (!name->cmp("Cyan")) { - overprintMask = 0x01; - } else if (!name->cmp("Magenta")) { - overprintMask = 0x02; - } else if (!name->cmp("Yellow")) { - overprintMask = 0x04; - } else if (!name->cmp("Black")) { - overprintMask = 0x08; - } else if (!name->cmp("All")) { - overprintMask = 0xffffffff; - } -} - -GfxSeparationColorSpace::GfxSeparationColorSpace(GooString *nameA, - GfxColorSpace *altA, - Function *funcA, - GBool nonMarkingA, - Guint overprintMaskA, - int *mappingA) { - name = nameA; - alt = altA; - func = funcA; - nonMarking = nonMarkingA; - overprintMask = overprintMaskA; - mapping = mappingA; -} - -GfxSeparationColorSpace::~GfxSeparationColorSpace() { - delete name; - delete alt; - delete func; - if (mapping != nullptr) - gfree(mapping); -} - -GfxColorSpace *GfxSeparationColorSpace::copy() { - int *mappingA = nullptr; - if (mapping != nullptr) { - mappingA = (int *) gmalloc(sizeof(int)); - *mappingA = *mapping; - } - return new GfxSeparationColorSpace(name->copy(), alt->copy(), func->copy(), - nonMarking, overprintMask, mappingA); -} - -//~ handle the 'All' and 'None' colorants -GfxColorSpace *GfxSeparationColorSpace::parse(GfxResources *res, Array *arr, OutputDev *out, GfxState *state, int recursion) { - GfxSeparationColorSpace *cs; - GooString *nameA; - GfxColorSpace *altA; - Function *funcA; - Object obj1; - - if (arr->getLength() != 4) { - error(errSyntaxWarning, -1, "Bad Separation color space"); - goto err1; - } - obj1 = arr->get(1); - if (!obj1.isName()) { - error(errSyntaxWarning, -1, "Bad Separation color space (name)"); - goto err1; - } - nameA = new GooString(obj1.getName()); - obj1 = arr->get(2); - if (!(altA = GfxColorSpace::parse(res, &obj1, out, state, recursion + 1))) { - error(errSyntaxWarning, -1, "Bad Separation color space (alternate color space)"); - goto err3; - } - obj1 = arr->get(3); - if (!(funcA = Function::parse(&obj1))) { - goto err4; - } - if (funcA->getInputSize() != 1) { - error(errSyntaxWarning, -1, "Bad SeparationColorSpace function"); - goto err5; - } - cs = new GfxSeparationColorSpace(nameA, altA, funcA); - return cs; - - err5: - delete funcA; - err4: - delete altA; - err3: - delete nameA; - err1: - return nullptr; -} - -void GfxSeparationColorSpace::getGray(GfxColor *color, GfxGray *gray) { - double x; - double c[gfxColorMaxComps]; - GfxColor color2; - int i; - - if (alt->getMode() == csDeviceGray && name->cmp("Black") == 0) { - *gray = clip01(gfxColorComp1 - color->c[0]); - } else { - x = colToDbl(color->c[0]); - func->transform(&x, c); - for (i = 0; i < alt->getNComps(); ++i) { - color2.c[i] = dblToCol(c[i]); - } - alt->getGray(&color2, gray); - } -} - -void GfxSeparationColorSpace::getRGB(GfxColor *color, GfxRGB *rgb) { - double x; - double c[gfxColorMaxComps]; - GfxColor color2; - int i; - - if (alt->getMode() == csDeviceGray && name->cmp("Black") == 0) { - rgb->r = clip01(gfxColorComp1 - color->c[0]); - rgb->g = clip01(gfxColorComp1 - color->c[0]); - rgb->b = clip01(gfxColorComp1 - color->c[0]); - } else { - x = colToDbl(color->c[0]); - func->transform(&x, c); - const int altNComps = alt->getNComps(); - for (i = 0; i < altNComps; ++i) { - color2.c[i] = dblToCol(c[i]); - } - if (unlikely(altNComps > func->getOutputSize())) { - for (i = func->getOutputSize(); i < altNComps; ++i) { - color2.c[i] = 0; - } - } - alt->getRGB(&color2, rgb); - } -} - -void GfxSeparationColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk) { - double x; - double c[gfxColorMaxComps]; - GfxColor color2; - int i; - - if (name->cmp("Black") == 0) { - cmyk->c = 0; - cmyk->m = 0; - cmyk->y = 0; - cmyk->k = color->c[0]; - } else if (name->cmp("Cyan") == 0) { - cmyk->c = color->c[0]; - cmyk->m = 0; - cmyk->y = 0; - cmyk->k = 0; - } else if (name->cmp("Magenta") == 0) { - cmyk->c = 0; - cmyk->m = color->c[0]; - cmyk->y = 0; - cmyk->k = 0; - } else if (name->cmp("Yellow") == 0) { - cmyk->c = 0; - cmyk->m = 0; - cmyk->y = color->c[0]; - cmyk->k = 0; - } else { - x = colToDbl(color->c[0]); - func->transform(&x, c); - for (i = 0; i < alt->getNComps(); ++i) { - color2.c[i] = dblToCol(c[i]); - } - alt->getCMYK(&color2, cmyk); - } -} - -void GfxSeparationColorSpace::getDeviceN(GfxColor *color, GfxColor *deviceN) { - for (int i = 0; i < gfxColorMaxComps; i++) - deviceN->c[i] = 0; - if (mapping == nullptr || mapping[0] == -1) { - GfxCMYK cmyk; - - getCMYK(color, &cmyk); - deviceN->c[0] = cmyk.c; - deviceN->c[1] = cmyk.m; - deviceN->c[2] = cmyk.y; - deviceN->c[3] = cmyk.k; - } else { - deviceN->c[mapping[0]] = color->c[0]; - } -} - -void GfxSeparationColorSpace::getDefaultColor(GfxColor *color) { - color->c[0] = gfxColorComp1; -} - -void GfxSeparationColorSpace::createMapping(GooList *separationList, int maxSepComps) { - if (nonMarking) - return; - mapping = (int *)gmalloc(sizeof(int)); - switch (overprintMask) { - case 0x01: - *mapping = 0; - break; - case 0x02: - *mapping = 1; - break; - case 0x04: - *mapping = 2; - break; - case 0x08: - *mapping = 3; - break; - default: - Guint newOverprintMask = 0x10; - for (int i = 0; i < separationList->getLength(); i++) { - GfxSeparationColorSpace *sepCS = (GfxSeparationColorSpace *)separationList->get(i); - if (!sepCS->getName()->cmp(name)) { - if (sepCS->getFunc()->hasDifferentResultSet(func)) { - error(errSyntaxWarning, -1, - "Different functions found for '{0:t}', convert immediately", name); - gfree(mapping); - mapping = nullptr; - return; - } - *mapping = i+4; - overprintMask = newOverprintMask; - return; - } - newOverprintMask <<=1; - } - if (separationList->getLength() == maxSepComps) { - error(errSyntaxWarning, -1, - "Too many ({0:d}) spots, convert '{1:t}' immediately", maxSepComps, name); - gfree(mapping); - mapping = nullptr; - return; - } - *mapping = separationList->getLength() + 4; - separationList->append(copy()); - overprintMask = newOverprintMask; - break; - } -} - -//------------------------------------------------------------------------ -// GfxDeviceNColorSpace -//------------------------------------------------------------------------ - -GfxDeviceNColorSpace::GfxDeviceNColorSpace(int nCompsA, - GooString **namesA, - GfxColorSpace *altA, - Function *funcA, - GooList *sepsCSA) { - int i; - - nComps = nCompsA; - alt = altA; - func = funcA; - sepsCS = sepsCSA; - nonMarking = gTrue; - overprintMask = 0; - mapping = nullptr; - for (i = 0; i < nComps; ++i) { - names[i] = namesA[i]; - if (names[i]->cmp("None")) { - nonMarking = gFalse; - } - if (!names[i]->cmp("Cyan")) { - overprintMask |= 0x01; - } else if (!names[i]->cmp("Magenta")) { - overprintMask |= 0x02; - } else if (!names[i]->cmp("Yellow")) { - overprintMask |= 0x04; - } else if (!names[i]->cmp("Black")) { - overprintMask |= 0x08; - } else if (!names[i]->cmp("All")) { - overprintMask = 0xffffffff; - } else { - overprintMask = 0x0f; - } - } -} - -GfxDeviceNColorSpace::GfxDeviceNColorSpace(int nCompsA, - GooString **namesA, - GfxColorSpace *altA, - Function *funcA, - GooList *sepsCSA, - int *mappingA, - GBool nonMarkingA, - Guint overprintMaskA) { - int i; - - nComps = nCompsA; - alt = altA; - func = funcA; - sepsCS = sepsCSA; - mapping = mappingA; - nonMarking = nonMarkingA; - overprintMask = overprintMaskA; - for (i = 0; i < nComps; ++i) { - names[i] = namesA[i]->copy(); - } -} - -GfxDeviceNColorSpace::~GfxDeviceNColorSpace() { - int i; - - for (i = 0; i < nComps; ++i) { - delete names[i]; - } - delete alt; - delete func; - deleteGooList(sepsCS, GfxSeparationColorSpace); - if (mapping != nullptr) - gfree(mapping); -} - -GfxColorSpace *GfxDeviceNColorSpace::copy() { - int i; - int *mappingA = nullptr; - - GooList *sepsCSA = new GooList(sepsCS->getLength()); - for (i = 0; i < sepsCS->getLength(); i++) { - GfxSeparationColorSpace *scs = (GfxSeparationColorSpace *) sepsCS->get(i); - if (likely(scs != nullptr)) { - sepsCSA->append(scs->copy()); - } - } - if (mapping != nullptr) { - mappingA = (int *)gmalloc(sizeof(int) * nComps); - for (i = 0; i < nComps; i++) - mappingA[i] = mapping[i]; - } - return new GfxDeviceNColorSpace(nComps, names, alt->copy(), func->copy(), - sepsCSA, mappingA, nonMarking, overprintMask); -} - -//~ handle the 'None' colorant -GfxColorSpace *GfxDeviceNColorSpace::parse(GfxResources *res, Array *arr, OutputDev *out, GfxState *state, int recursion) { - int nCompsA; - GooString *namesA[gfxColorMaxComps]; - GfxColorSpace *altA; - Function *funcA; - Object obj1; - int i; - GooList *separationList = new GooList(); - - if (arr->getLength() != 4 && arr->getLength() != 5) { - error(errSyntaxWarning, -1, "Bad DeviceN color space"); - goto err1; - } - obj1 = arr->get(1); - if (!obj1.isArray()) { - error(errSyntaxWarning, -1, "Bad DeviceN color space (names)"); - goto err1; - } - nCompsA = obj1.arrayGetLength(); - if (nCompsA > gfxColorMaxComps) { - error(errSyntaxWarning, -1, "DeviceN color space with too many ({0:d} > {1:d}) components", - nCompsA, gfxColorMaxComps); - nCompsA = gfxColorMaxComps; - } - for (i = 0; i < nCompsA; ++i) { - Object obj2 = obj1.arrayGet(i); - if (!obj2.isName()) { - error(errSyntaxWarning, -1, "Bad DeviceN color space (names)"); - nCompsA = i; - goto err3; - } - namesA[i] = new GooString(obj2.getName()); - } - obj1 = arr->get(2); - if (!(altA = GfxColorSpace::parse(res, &obj1, out, state, recursion + 1))) { - error(errSyntaxWarning, -1, "Bad DeviceN color space (alternate color space)"); - goto err3; - } - obj1 = arr->get(3); - if (!(funcA = Function::parse(&obj1))) { - goto err4; - } - if (arr->getLength() == 5) { - obj1 = arr->get(4); - if (!obj1.isDict()) { - error(errSyntaxWarning, -1, "Bad DeviceN color space (attributes)"); - goto err5; - } - Dict *attribs = obj1.getDict(); - Object obj2 = attribs->lookup("Colorants"); - if (obj2.isDict()) { - Dict *colorants = obj2.getDict(); - for (i = 0; i < colorants->getLength(); i++) { - Object obj3 = colorants->getVal(i); - if (obj3.isArray()) { - separationList->append(GfxSeparationColorSpace::parse(res, obj3.getArray(), out, state, recursion)); - } else { - error(errSyntaxWarning, -1, "Bad DeviceN color space (colorant value entry is not an Array)"); - goto err5; - } - } - } - } - return new GfxDeviceNColorSpace(nCompsA, namesA, altA, funcA, separationList); - - err5: - delete funcA; - err4: - delete altA; - err3: - for (i = 0; i < nCompsA; ++i) { - delete namesA[i]; - } - err1: - delete separationList; - return nullptr; -} - -void GfxDeviceNColorSpace::getGray(GfxColor *color, GfxGray *gray) { - double x[gfxColorMaxComps], c[gfxColorMaxComps]; - GfxColor color2; - int i; - - for (i = 0; i < nComps; ++i) { - x[i] = colToDbl(color->c[i]); - } - func->transform(x, c); - for (i = 0; i < alt->getNComps(); ++i) { - color2.c[i] = dblToCol(c[i]); - } - alt->getGray(&color2, gray); -} - -void GfxDeviceNColorSpace::getRGB(GfxColor *color, GfxRGB *rgb) { - double x[gfxColorMaxComps], c[gfxColorMaxComps]; - GfxColor color2; - int i; - - for (i = 0; i < nComps; ++i) { - x[i] = colToDbl(color->c[i]); - } - func->transform(x, c); - for (i = 0; i < alt->getNComps(); ++i) { - color2.c[i] = dblToCol(c[i]); - } - alt->getRGB(&color2, rgb); -} - -void GfxDeviceNColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk) { - double x[gfxColorMaxComps], c[gfxColorMaxComps]; - GfxColor color2; - int i; - - for (i = 0; i < nComps; ++i) { - x[i] = colToDbl(color->c[i]); - } - func->transform(x, c); - for (i = 0; i < alt->getNComps(); ++i) { - color2.c[i] = dblToCol(c[i]); - } - alt->getCMYK(&color2, cmyk); -} - -void GfxDeviceNColorSpace::getDeviceN(GfxColor *color, GfxColor *deviceN) { - for (int i = 0; i < gfxColorMaxComps; i++) - deviceN->c[i] = 0; - if (mapping == nullptr) { - GfxCMYK cmyk; - - getCMYK(color, &cmyk); - deviceN->c[0] = cmyk.c; - deviceN->c[1] = cmyk.m; - deviceN->c[2] = cmyk.y; - deviceN->c[3] = cmyk.k; - } else { - for (int j = 0; j < nComps; j++) - if (mapping[j] != -1) - deviceN->c[mapping[j]] = color->c[j]; - } -} - -void GfxDeviceNColorSpace::getDefaultColor(GfxColor *color) { - int i; - - for (i = 0; i < nComps; ++i) { - color->c[i] = gfxColorComp1; - } -} - -void GfxDeviceNColorSpace::createMapping(GooList *separationList, int maxSepComps) { - if (nonMarking) // None - return; - mapping = (int *)gmalloc(sizeof(int) * nComps); - Guint newOverprintMask = 0; - for (int i = 0; i < nComps; i++) { - if (!names[i]->cmp("None")) { - mapping[i] = -1; - } else if (!names[i]->cmp("Cyan")) { - newOverprintMask |= 0x01; - mapping[i] = 0; - } else if (!names[i]->cmp("Magenta")) { - newOverprintMask |= 0x02; - mapping[i] = 1; - } else if (!names[i]->cmp("Yellow")) { - newOverprintMask |= 0x04; - mapping[i] = 2; - } else if (!names[i]->cmp("Black")) { - newOverprintMask |= 0x08; - mapping[i] = 3; - } else { - Guint startOverprintMask = 0x10; - GBool found = gFalse; - Function *sepFunc = nullptr; - if (nComps == 1) - sepFunc = func; - else { - for (int k = 0; k < sepsCS->getLength(); k++) { - GfxSeparationColorSpace *sepCS = (GfxSeparationColorSpace *)sepsCS->get(k); - if (!sepCS->getName()->cmp(names[i])) { - sepFunc = sepCS->getFunc(); - break; - } - } - } - for (int j = 0; j < separationList->getLength(); j++) { - GfxSeparationColorSpace *sepCS = (GfxSeparationColorSpace *)separationList->get(j); - if (!sepCS->getName()->cmp(names[i])) { - if (sepFunc != nullptr && sepCS->getFunc()->hasDifferentResultSet(sepFunc)) { - error(errSyntaxWarning, -1, - "Different functions found for '{0:t}', convert immediately", names[i]); - gfree(mapping); - mapping = nullptr; - overprintMask = 0xffffffff; - return; - } - mapping[i] = j+4; - newOverprintMask |= startOverprintMask; - found = gTrue; - break; - } - startOverprintMask <<=1; - } - if (!found) { - if (separationList->getLength() == maxSepComps) { - error(errSyntaxWarning, -1, - "Too many ({0:d}) spots, convert '{1:t}' immediately", maxSepComps, names[i]); - gfree(mapping); - mapping = nullptr; - overprintMask = 0xffffffff; - return; - } - mapping[i] = separationList->getLength() + 4; - newOverprintMask |= startOverprintMask; - if (nComps == 1) - separationList->append(new GfxSeparationColorSpace(names[i]->copy(),alt->copy(), func->copy())); - else { - for (int k = 0; k < sepsCS->getLength(); k++) { - GfxSeparationColorSpace *sepCS = (GfxSeparationColorSpace *)sepsCS->get(k); - if (!sepCS->getName()->cmp(names[i])) { - found = gTrue; - separationList->append(sepCS->copy()); - break; - } - } - if(!found) { - error(errSyntaxWarning, -1, "DeviceN has no suitable colorant"); - gfree(mapping); - mapping = nullptr; - overprintMask = 0xffffffff; - return; - } - } - } - } - } - overprintMask = newOverprintMask; -} - -//------------------------------------------------------------------------ -// GfxPatternColorSpace -//------------------------------------------------------------------------ - -GfxPatternColorSpace::GfxPatternColorSpace(GfxColorSpace *underA) { - under = underA; -} - -GfxPatternColorSpace::~GfxPatternColorSpace() { - if (under) { - delete under; - } -} - -GfxColorSpace *GfxPatternColorSpace::copy() { - return new GfxPatternColorSpace(under ? under->copy() : - (GfxColorSpace *)nullptr); -} - -GfxColorSpace *GfxPatternColorSpace::parse(GfxResources *res, Array *arr, OutputDev *out, GfxState *state, int recursion) { - GfxPatternColorSpace *cs; - GfxColorSpace *underA; - Object obj1; - - if (arr->getLength() != 1 && arr->getLength() != 2) { - error(errSyntaxWarning, -1, "Bad Pattern color space"); - return nullptr; - } - underA = nullptr; - if (arr->getLength() == 2) { - obj1 = arr->get(1); - if (!(underA = GfxColorSpace::parse(res, &obj1, out, state, recursion + 1))) { - error(errSyntaxWarning, -1, "Bad Pattern color space (underlying color space)"); - return nullptr; - } - } - cs = new GfxPatternColorSpace(underA); - return cs; -} - -void GfxPatternColorSpace::getGray(GfxColor *color, GfxGray *gray) { - *gray = 0; -} - -void GfxPatternColorSpace::getRGB(GfxColor *color, GfxRGB *rgb) { - rgb->r = rgb->g = rgb->b = 0; -} - -void GfxPatternColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk) { - cmyk->c = cmyk->m = cmyk->y = 0; - cmyk->k = 1; -} - -void GfxPatternColorSpace::getDeviceN(GfxColor *color, GfxColor *deviceN) { - for (int i = 0; i < gfxColorMaxComps; i++) - deviceN->c[i] = 0; - deviceN->c[3] = 1; -} - -void GfxPatternColorSpace::getDefaultColor(GfxColor *color) { - color->c[0]=0; -} - -//------------------------------------------------------------------------ -// Pattern -//------------------------------------------------------------------------ - -GfxPattern::GfxPattern(int typeA, int patternRefNumA) - : type(typeA) - , patternRefNum(patternRefNumA) -{ - -} - -GfxPattern::~GfxPattern() { -} - -GfxPattern *GfxPattern::parse(GfxResources *res, Object *obj, OutputDev *out, GfxState *state, int patternRefNum) { - GfxPattern *pattern; - Object obj1; - - if (obj->isDict()) { - obj1 = obj->dictLookup("PatternType"); - } else if (obj->isStream()) { - obj1 = obj->streamGetDict()->lookup("PatternType"); - } else { - return nullptr; - } - pattern = nullptr; - if (obj1.isInt() && obj1.getInt() == 1) { - pattern = GfxTilingPattern::parse(obj, patternRefNum); - } else if (obj1.isInt() && obj1.getInt() == 2) { - pattern = GfxShadingPattern::parse(res, obj, out, state, patternRefNum); - } - return pattern; -} - -//------------------------------------------------------------------------ -// GfxTilingPattern -//------------------------------------------------------------------------ - -GfxTilingPattern *GfxTilingPattern::parse(Object *patObj, int patternRefNum) { - Dict *dict; - int paintTypeA, tilingTypeA; - double bboxA[4], matrixA[6]; - double xStepA, yStepA; - Object resDictA; - Object obj1; - int i; - - if (!patObj->isStream()) { - return nullptr; - } - dict = patObj->streamGetDict(); - - obj1 = dict->lookup("PaintType"); - if (obj1.isInt()) { - paintTypeA = obj1.getInt(); - } else { - paintTypeA = 1; - error(errSyntaxWarning, -1, "Invalid or missing PaintType in pattern"); - } - obj1 = dict->lookup("TilingType"); - if (obj1.isInt()) { - tilingTypeA = obj1.getInt(); - } else { - tilingTypeA = 1; - error(errSyntaxWarning, -1, "Invalid or missing TilingType in pattern"); - } - bboxA[0] = bboxA[1] = 0; - bboxA[2] = bboxA[3] = 1; - obj1 = dict->lookup("BBox"); - if (obj1.isArray() && obj1.arrayGetLength() == 4) { - for (i = 0; i < 4; ++i) { - Object obj2 = obj1.arrayGet(i); - if (obj2.isNum()) { - bboxA[i] = obj2.getNum(); - } - } - } else { - error(errSyntaxWarning, -1, "Invalid or missing BBox in pattern"); - } - obj1 = dict->lookup("XStep"); - if (obj1.isNum()) { - xStepA = obj1.getNum(); - } else { - xStepA = 1; - error(errSyntaxWarning, -1, "Invalid or missing XStep in pattern"); - } - obj1 = dict->lookup("YStep"); - if (obj1.isNum()) { - yStepA = obj1.getNum(); - } else { - yStepA = 1; - error(errSyntaxWarning, -1, "Invalid or missing YStep in pattern"); - } - resDictA = dict->lookup("Resources"); - if (!resDictA.isDict()) { - error(errSyntaxWarning, -1, "Invalid or missing Resources in pattern"); - } - matrixA[0] = 1; matrixA[1] = 0; - matrixA[2] = 0; matrixA[3] = 1; - matrixA[4] = 0; matrixA[5] = 0; - obj1 = dict->lookup("Matrix"); - if (obj1.isArray() && obj1.arrayGetLength() == 6) { - for (i = 0; i < 6; ++i) { - Object obj2 = obj1.arrayGet(i); - if (obj2.isNum()) { - matrixA[i] = obj2.getNum(); - } - } - } - - return new GfxTilingPattern(paintTypeA, tilingTypeA, bboxA, xStepA, yStepA, - &resDictA, matrixA, patObj, patternRefNum); -} - -GfxTilingPattern::GfxTilingPattern(int paintTypeA, int tilingTypeA, - double *bboxA, double xStepA, double yStepA, - Object *resDictA, double *matrixA, - Object *contentStreamA, int patternRefNumA) : - GfxPattern(1, patternRefNumA) -{ - int i; - - paintType = paintTypeA; - tilingType = tilingTypeA; - for (i = 0; i < 4; ++i) { - bbox[i] = bboxA[i]; - } - xStep = xStepA; - yStep = yStepA; - resDict = resDictA->copy(); - for (i = 0; i < 6; ++i) { - matrix[i] = matrixA[i]; - } - contentStream = contentStreamA->copy(); -} - -GfxTilingPattern::~GfxTilingPattern() { -} - -GfxPattern *GfxTilingPattern::copy() { - return new GfxTilingPattern(paintType, tilingType, bbox, xStep, yStep, - &resDict, matrix, &contentStream, getPatternRefNum()); -} - -//------------------------------------------------------------------------ -// GfxShadingPattern -//------------------------------------------------------------------------ - -GfxShadingPattern *GfxShadingPattern::parse(GfxResources *res, Object *patObj, OutputDev *out, GfxState *state, int patternRefNum) { - Dict *dict; - GfxShading *shadingA; - double matrixA[6]; - Object obj1; - int i; - - if (!patObj->isDict()) { - return nullptr; - } - dict = patObj->getDict(); - - obj1 = dict->lookup("Shading"); - shadingA = GfxShading::parse(res, &obj1, out, state); - if (!shadingA) { - return nullptr; - } - - matrixA[0] = 1; matrixA[1] = 0; - matrixA[2] = 0; matrixA[3] = 1; - matrixA[4] = 0; matrixA[5] = 0; - obj1 = dict->lookup("Matrix"); - if (obj1.isArray() && obj1.arrayGetLength() == 6) { - for (i = 0; i < 6; ++i) { - Object obj2 = obj1.arrayGet(i); - if (obj2.isNum()) { - matrixA[i] = obj2.getNum(); - } - } - } - - return new GfxShadingPattern(shadingA, matrixA, patternRefNum); -} - -GfxShadingPattern::GfxShadingPattern(GfxShading *shadingA, double *matrixA, int patternRefNumA): - GfxPattern(2, patternRefNumA) -{ - int i; - - shading = shadingA; - for (i = 0; i < 6; ++i) { - matrix[i] = matrixA[i]; - } -} - -GfxShadingPattern::~GfxShadingPattern() { - delete shading; -} - -GfxPattern *GfxShadingPattern::copy() { - return new GfxShadingPattern(shading->copy(), matrix, getPatternRefNum()); -} - -//------------------------------------------------------------------------ -// GfxShading -//------------------------------------------------------------------------ - -GfxShading::GfxShading(int typeA) { - type = typeA; - colorSpace = nullptr; -} - -GfxShading::GfxShading(GfxShading *shading) { - int i; - - type = shading->type; - colorSpace = shading->colorSpace->copy(); - for (i = 0; i < gfxColorMaxComps; ++i) { - background.c[i] = shading->background.c[i]; - } - hasBackground = shading->hasBackground; - xMin = shading->xMin; - yMin = shading->yMin; - xMax = shading->xMax; - yMax = shading->yMax; - hasBBox = shading->hasBBox; -} - -GfxShading::~GfxShading() { - if (colorSpace) { - delete colorSpace; - } -} - -GfxShading *GfxShading::parse(GfxResources *res, Object *obj, OutputDev *out, GfxState *state) { - GfxShading *shading; - Dict *dict; - int typeA; - Object obj1; - - if (obj->isDict()) { - dict = obj->getDict(); - } else if (obj->isStream()) { - dict = obj->streamGetDict(); - } else { - return nullptr; - } - - obj1 = dict->lookup("ShadingType"); - if (!obj1.isInt()) { - error(errSyntaxWarning, -1, "Invalid ShadingType in shading dictionary"); - return nullptr; - } - typeA = obj1.getInt(); - - switch (typeA) { - case 1: - shading = GfxFunctionShading::parse(res, dict, out, state); - break; - case 2: - shading = GfxAxialShading::parse(res, dict, out, state); - break; - case 3: - shading = GfxRadialShading::parse(res, dict, out, state); - break; - case 4: - if (obj->isStream()) { - shading = GfxGouraudTriangleShading::parse(res, 4, dict, obj->getStream(), out, state); - } else { - error(errSyntaxWarning, -1, "Invalid Type 4 shading object"); - goto err1; - } - break; - case 5: - if (obj->isStream()) { - shading = GfxGouraudTriangleShading::parse(res, 5, dict, obj->getStream(), out, state); - } else { - error(errSyntaxWarning, -1, "Invalid Type 5 shading object"); - goto err1; - } - break; - case 6: - if (obj->isStream()) { - shading = GfxPatchMeshShading::parse(res, 6, dict, obj->getStream(), out, state); - } else { - error(errSyntaxWarning, -1, "Invalid Type 6 shading object"); - goto err1; - } - break; - case 7: - if (obj->isStream()) { - shading = GfxPatchMeshShading::parse(res, 7, dict, obj->getStream(), out, state); - } else { - error(errSyntaxWarning, -1, "Invalid Type 7 shading object"); - goto err1; - } - break; - default: - error(errSyntaxWarning, -1, "Unimplemented shading type {0:d}", typeA); - goto err1; - } - - return shading; - - err1: - return nullptr; -} - -GBool GfxShading::init(GfxResources *res, Dict *dict, OutputDev *out, GfxState *state) { - Object obj1; - int i; - - obj1 = dict->lookup("ColorSpace"); - if (!(colorSpace = GfxColorSpace::parse(res, &obj1, out, state))) { - error(errSyntaxWarning, -1, "Bad color space in shading dictionary"); - return gFalse; - } - - for (i = 0; i < gfxColorMaxComps; ++i) { - background.c[i] = 0; - } - hasBackground = gFalse; - obj1 = dict->lookup("Background"); - if (obj1.isArray()) { - if (obj1.arrayGetLength() == colorSpace->getNComps()) { - hasBackground = gTrue; - for (i = 0; i < colorSpace->getNComps(); ++i) { - Object obj2 = obj1.arrayGet(i); - background.c[i] = dblToCol(obj2.getNum()); - } - } else { - error(errSyntaxWarning, -1, "Bad Background in shading dictionary"); - } - } - - xMin = yMin = xMax = yMax = 0; - hasBBox = gFalse; - obj1 = dict->lookup("BBox"); - if (obj1.isArray()) { - if (obj1.arrayGetLength() == 4) { - Object obj2 = obj1.arrayGet(0); - Object obj3 = obj1.arrayGet(1); - Object obj4 = obj1.arrayGet(2); - Object obj5 = obj1.arrayGet(3); - if (obj2.isNum() && obj3.isNum() && obj4.isNum() && obj5.isNum()) - { - hasBBox = gTrue; - xMin = obj2.getNum(); - yMin = obj3.getNum(); - xMax = obj4.getNum(); - yMax = obj5.getNum(); - } else { - error(errSyntaxWarning, -1, "Bad BBox in shading dictionary (Values not numbers)"); - } - } else { - error(errSyntaxWarning, -1, "Bad BBox in shading dictionary"); - } - } - - return gTrue; -} - -//------------------------------------------------------------------------ -// GfxFunctionShading -//------------------------------------------------------------------------ - -GfxFunctionShading::GfxFunctionShading(double x0A, double y0A, - double x1A, double y1A, - double *matrixA, - Function **funcsA, int nFuncsA): - GfxShading(1) -{ - int i; - - x0 = x0A; - y0 = y0A; - x1 = x1A; - y1 = y1A; - for (i = 0; i < 6; ++i) { - matrix[i] = matrixA[i]; - } - nFuncs = nFuncsA; - for (i = 0; i < nFuncs; ++i) { - funcs[i] = funcsA[i]; - } -} - -GfxFunctionShading::GfxFunctionShading(GfxFunctionShading *shading): - GfxShading(shading) -{ - int i; - - x0 = shading->x0; - y0 = shading->y0; - x1 = shading->x1; - y1 = shading->y1; - for (i = 0; i < 6; ++i) { - matrix[i] = shading->matrix[i]; - } - nFuncs = shading->nFuncs; - for (i = 0; i < nFuncs; ++i) { - funcs[i] = shading->funcs[i]->copy(); - } -} - -GfxFunctionShading::~GfxFunctionShading() { - int i; - - for (i = 0; i < nFuncs; ++i) { - delete funcs[i]; - } -} - -GfxFunctionShading *GfxFunctionShading::parse(GfxResources *res, Dict *dict, OutputDev *out, GfxState *state) { - GfxFunctionShading *shading; - double x0A, y0A, x1A, y1A; - double matrixA[6]; - Function *funcsA[gfxColorMaxComps]; - int nFuncsA; - Object obj1; - int i; - - x0A = y0A = 0; - x1A = y1A = 1; - obj1 = dict->lookup("Domain"); - if (obj1.isArray() && obj1.arrayGetLength() == 4) { - bool decodeOk = true; - Object obj2; - x0A = (obj2 = obj1.arrayGet(0), obj2.getNum(&decodeOk)); - x1A = (obj2 = obj1.arrayGet(1), obj2.getNum(&decodeOk)); - y0A = (obj2 = obj1.arrayGet(2), obj2.getNum(&decodeOk)); - y1A = (obj2 = obj1.arrayGet(3), obj2.getNum(&decodeOk)); - - if (!decodeOk) { - error(errSyntaxWarning, -1, "Invalid Domain array in function shading dictionary"); - return nullptr; - } - } - - matrixA[0] = 1; matrixA[1] = 0; - matrixA[2] = 0; matrixA[3] = 1; - matrixA[4] = 0; matrixA[5] = 0; - obj1 = dict->lookup("Matrix"); - if (obj1.isArray() && obj1.arrayGetLength() == 6) { - bool decodeOk = true; - Object obj2; - matrixA[0] = (obj2 = obj1.arrayGet(0), obj2.getNum(&decodeOk)); - matrixA[1] = (obj2 = obj1.arrayGet(1), obj2.getNum(&decodeOk)); - matrixA[2] = (obj2 = obj1.arrayGet(2), obj2.getNum(&decodeOk)); - matrixA[3] = (obj2 = obj1.arrayGet(3), obj2.getNum(&decodeOk)); - matrixA[4] = (obj2 = obj1.arrayGet(4), obj2.getNum(&decodeOk)); - matrixA[5] = (obj2 = obj1.arrayGet(5), obj2.getNum(&decodeOk)); - - if (!decodeOk) { - error(errSyntaxWarning, -1, "Invalid Matrix array in function shading dictionary"); - return nullptr; - } - } - - obj1 = dict->lookup("Function"); - if (obj1.isArray()) { - nFuncsA = obj1.arrayGetLength(); - if (nFuncsA > gfxColorMaxComps || nFuncsA <= 0) { - error(errSyntaxWarning, -1, "Invalid Function array in shading dictionary"); - return nullptr; - } - for (i = 0; i < nFuncsA; ++i) { - Object obj2 = obj1.arrayGet(i); - if (!(funcsA[i] = Function::parse(&obj2))) { - return nullptr; - } - } - } else { - nFuncsA = 1; - if (!(funcsA[0] = Function::parse(&obj1))) { - return nullptr; - } - } - - shading = new GfxFunctionShading(x0A, y0A, x1A, y1A, matrixA, - funcsA, nFuncsA); - if (!shading->init(res, dict, out, state)) { - delete shading; - return nullptr; - } - return shading; -} - -GfxShading *GfxFunctionShading::copy() { - return new GfxFunctionShading(this); -} - -void GfxFunctionShading::getColor(double x, double y, GfxColor *color) { - double in[2], out[gfxColorMaxComps]; - int i; - - // NB: there can be one function with n outputs or n functions with - // one output each (where n = number of color components) - for (i = 0; i < gfxColorMaxComps; ++i) { - out[i] = 0; - } - in[0] = x; - in[1] = y; - for (i = 0; i < nFuncs; ++i) { - funcs[i]->transform(in, &out[i]); - } - for (i = 0; i < gfxColorMaxComps; ++i) { - color->c[i] = dblToCol(out[i]); - } -} - -//------------------------------------------------------------------------ -// GfxUnivariateShading -//------------------------------------------------------------------------ - -GfxUnivariateShading::GfxUnivariateShading(int typeA, - double t0A, double t1A, - Function **funcsA, int nFuncsA, - GBool extend0A, GBool extend1A): - GfxShading(typeA) -{ - int i; - - t0 = t0A; - t1 = t1A; - nFuncs = nFuncsA; - for (i = 0; i < nFuncs; ++i) { - funcs[i] = funcsA[i]; - } - extend0 = extend0A; - extend1 = extend1A; - - cacheSize = 0; - lastMatch = 0; - cacheBounds = nullptr; - cacheCoeff = nullptr; - cacheValues = nullptr; -} - -GfxUnivariateShading::GfxUnivariateShading(GfxUnivariateShading *shading): - GfxShading(shading) -{ - int i; - - t0 = shading->t0; - t1 = shading->t1; - nFuncs = shading->nFuncs; - for (i = 0; i < nFuncs; ++i) { - funcs[i] = shading->funcs[i]->copy(); - } - extend0 = shading->extend0; - extend1 = shading->extend1; - - cacheSize = 0; - lastMatch = 0; - cacheBounds = nullptr; - cacheCoeff = nullptr; - cacheValues = nullptr; -} - -GfxUnivariateShading::~GfxUnivariateShading() { - int i; - - for (i = 0; i < nFuncs; ++i) { - delete funcs[i]; - } - - gfree (cacheBounds); -} - -int GfxUnivariateShading::getColor(double t, GfxColor *color) { - double out[gfxColorMaxComps]; - int nComps; - - if (likely(nFuncs >= 1)) { - // NB: there can be one function with n outputs or n functions with - // one output each (where n = number of color components) - nComps = nFuncs * funcs[0]->getOutputSize(); - } - - if (unlikely(nFuncs < 1 || nComps > gfxColorMaxComps)) { - for (int i = 0; i < gfxColorMaxComps; i++) - color->c[i] = 0; - return gfxColorMaxComps; - } - - if (cacheSize > 0) { - double x, ix, *l, *u, *upper; - - if (cacheBounds[lastMatch - 1] >= t) { - upper = std::lower_bound (cacheBounds, cacheBounds + lastMatch - 1, t); - lastMatch = upper - cacheBounds; - lastMatch = std::min<int>(std::max<int>(1, lastMatch), cacheSize - 1); - } else if (cacheBounds[lastMatch] < t) { - upper = std::lower_bound (cacheBounds + lastMatch + 1, cacheBounds + cacheSize, t); - lastMatch = upper - cacheBounds; - lastMatch = std::min<int>(std::max<int>(1, lastMatch), cacheSize - 1); - } - - x = (t - cacheBounds[lastMatch-1]) * cacheCoeff[lastMatch]; - ix = 1.0 - x; - u = cacheValues + lastMatch * nComps; - l = u - nComps; - - for (int i = 0; i < nComps; ++i) { - out[i] = ix * l[i] + x * u[i]; - } - } else { - for (int i = 0; i < nComps; ++i) { - out[i] = 0; - } - for (int i = 0; i < nFuncs; ++i) { - if (funcs[i]->getInputSize() != 1) { - error(errSyntaxWarning, -1, "Invalid shading function (input != 1)"); - break; - } - funcs[i]->transform(&t, &out[i]); - } - } - - for (int i = 0; i < nComps; ++i) { - color->c[i] = dblToCol(out[i]); - } - return nComps; -} - -void GfxUnivariateShading::setupCache(const Matrix *ctm, - double xMin, double yMin, - double xMax, double yMax) { - double sMin, sMax, tMin, tMax, upperBound; - int i, j, nComps, maxSize; - - gfree (cacheBounds); - cacheBounds = nullptr; - cacheSize = 0; - - if (unlikely(nFuncs < 1)) - return; - - // NB: there can be one function with n outputs or n functions with - // one output each (where n = number of color components) - nComps = nFuncs * funcs[0]->getOutputSize(); - - getParameterRange(&sMin, &sMax, xMin, yMin, xMax, yMax); - upperBound = ctm->norm() * getDistance(sMin, sMax); - maxSize = ceil(upperBound); - maxSize = std::max<int>(maxSize, 2); - - { - double x[4], y[4]; - - ctm->transform(xMin, yMin, &x[0], &y[0]); - ctm->transform(xMax, yMin, &x[1], &y[1]); - ctm->transform(xMin, yMax, &x[2], &y[2]); - ctm->transform(xMax, yMax, &x[3], &y[3]); - - xMin = xMax = x[0]; - yMin = yMax = y[0]; - for (i = 1; i < 4; i++) { - xMin = std::min<double>(xMin, x[i]); - yMin = std::min<double>(yMin, y[i]); - xMax = std::max<double>(xMax, x[i]); - yMax = std::max<double>(yMax, y[i]); - } - } - - if (maxSize > (xMax-xMin) * (yMax-yMin)) { - return; - } - - if (t0 < t1) { - tMin = t0 + sMin * (t1 - t0); - tMax = t0 + sMax * (t1 - t0); - } else { - tMin = t0 + sMax * (t1 - t0); - tMax = t0 + sMin * (t1 - t0); - } - - cacheBounds = (double *)gmallocn(maxSize, sizeof(double) * (nComps + 2)); - cacheCoeff = cacheBounds + maxSize; - cacheValues = cacheCoeff + maxSize; - - if (cacheSize != 0) { - for (j = 0; j < cacheSize; ++j) { - cacheCoeff[j] = 1 / (cacheBounds[j+1] - cacheBounds[j]); - } - } else if (tMax != tMin) { - double step = (tMax - tMin) / (maxSize - 1); - double coeff = (maxSize - 1) / (tMax - tMin); - - cacheSize = maxSize; - - for (j = 0; j < cacheSize; ++j) { - cacheBounds[j] = tMin + j * step; - cacheCoeff[j] = coeff; - - for (i = 0; i < nComps; ++i) { - cacheValues[j*nComps + i] = 0; - } - for (i = 0; i < nFuncs; ++i) { - funcs[i]->transform(&cacheBounds[j], &cacheValues[j*nComps + i]); - } - } - } - - lastMatch = 1; -} - - -//------------------------------------------------------------------------ -// GfxAxialShading -//------------------------------------------------------------------------ - -GfxAxialShading::GfxAxialShading(double x0A, double y0A, - double x1A, double y1A, - double t0A, double t1A, - Function **funcsA, int nFuncsA, - GBool extend0A, GBool extend1A): - GfxUnivariateShading(2, t0A, t1A, funcsA, nFuncsA, extend0A, extend1A) -{ - x0 = x0A; - y0 = y0A; - x1 = x1A; - y1 = y1A; -} - -GfxAxialShading::GfxAxialShading(GfxAxialShading *shading): - GfxUnivariateShading(shading) -{ - x0 = shading->x0; - y0 = shading->y0; - x1 = shading->x1; - y1 = shading->y1; -} - -GfxAxialShading::~GfxAxialShading() { -} - -GfxAxialShading *GfxAxialShading::parse(GfxResources *res, Dict *dict, OutputDev *out, GfxState *state) { - GfxAxialShading *shading; - double x0A, y0A, x1A, y1A; - double t0A, t1A; - Function *funcsA[gfxColorMaxComps]; - int nFuncsA; - GBool extend0A, extend1A; - Object obj1; - - x0A = y0A = x1A = y1A = 0; - obj1 = dict->lookup("Coords"); - if (obj1.isArray() && obj1.arrayGetLength() == 4) { - Object obj2 = obj1.arrayGet(0); - Object obj3 = obj1.arrayGet(1); - Object obj4 = obj1.arrayGet(2); - Object obj5 = obj1.arrayGet(3); - if (obj2.isNum() && obj3.isNum() && obj4.isNum() && obj5.isNum()) { - x0A = obj2.getNum(); - y0A = obj3.getNum(); - x1A = obj4.getNum(); - y1A = obj5.getNum(); - } - } else { - error(errSyntaxWarning, -1, "Missing or invalid Coords in shading dictionary"); - return nullptr; - } - - t0A = 0; - t1A = 1; - obj1 = dict->lookup("Domain"); - if (obj1.isArray() && obj1.arrayGetLength() == 2) { - Object obj2 = obj1.arrayGet(0); - Object obj3 = obj1.arrayGet(1); - if (obj2.isNum() && obj3.isNum()) { - t0A = obj2.getNum(); - t1A = obj3.getNum(); - } - } - - obj1 = dict->lookup("Function"); - if (obj1.isArray()) { - nFuncsA = obj1.arrayGetLength(); - if (nFuncsA > gfxColorMaxComps || nFuncsA == 0) { - error(errSyntaxWarning, -1, "Invalid Function array in shading dictionary"); - return nullptr; - } - for (int i = 0; i < nFuncsA; ++i) { - Object obj2 = obj1.arrayGet(i); - if (!(funcsA[i] = Function::parse(&obj2))) { - for (int j = 0; j < i; ++j) - delete funcsA[j]; - return nullptr; - } - } - } else { - nFuncsA = 1; - if (!(funcsA[0] = Function::parse(&obj1))) { - return nullptr; - } - } - - extend0A = extend1A = gFalse; - obj1 = dict->lookup("Extend"); - if (obj1.isArray() && obj1.arrayGetLength() == 2) { - Object obj2 = obj1.arrayGet(0); - if (obj2.isBool()) { - extend0A = obj2.getBool(); - } else { - error(errSyntaxWarning, -1, "Invalid axial shading extend (0)"); - } - obj2 = obj1.arrayGet(1); - if (obj2.isBool()) { - extend1A = obj2.getBool(); - } else { - error(errSyntaxWarning, -1, "Invalid axial shading extend (1)"); - } - } - - shading = new GfxAxialShading(x0A, y0A, x1A, y1A, t0A, t1A, - funcsA, nFuncsA, extend0A, extend1A); - if (!shading->init(res, dict, out, state)) { - delete shading; - shading = nullptr; - } - return shading; -} - -GfxShading *GfxAxialShading::copy() { - return new GfxAxialShading(this); -} - -double GfxAxialShading::getDistance(double sMin, double sMax) { - double xMin, yMin, xMax, yMax; - - xMin = x0 + sMin * (x1 - x0); - yMin = y0 + sMin * (y1 - y0); - xMax = x0 + sMax * (x1 - x0); - yMax = y0 + sMax * (y1 - y0); - - return hypot(xMax-xMin, yMax-yMin); -} - -void GfxAxialShading::getParameterRange(double *lower, double *upper, - double xMin, double yMin, - double xMax, double yMax) { - double pdx, pdy, invsqnorm, tdx, tdy, t, range[2]; - - // Linear gradients are orthogonal to the line passing through their - // extremes. Because of convexity, the parameter range can be - // computed as the convex hull (one the real line) of the parameter - // values of the 4 corners of the box. - // - // The parameter value t for a point (x,y) can be computed as: - // - // t = (p2 - p1) . (x,y) / |p2 - p1|^2 - // - // t0 is the t value for the top left corner - // tdx is the difference between left and right corners - // tdy is the difference between top and bottom corners - - pdx = x1 - x0; - pdy = y1 - y0; - const double invsqnorm_denominator = (pdx * pdx + pdy * pdy); - if (unlikely(invsqnorm_denominator == 0)) { - *lower = 0; - *upper = 0; - return; - } - invsqnorm = 1.0 / invsqnorm_denominator; - pdx *= invsqnorm; - pdy *= invsqnorm; - - t = (xMin - x0) * pdx + (yMin - y0) * pdy; - tdx = (xMax - xMin) * pdx; - tdy = (yMax - yMin) * pdy; - - // Because of the linearity of the t value, tdx can simply be added - // the t0 to move along the top edge. After this, *lower and *upper - // represent the parameter range for the top edge, so extending it - // to include the whole box simply requires adding tdy to the - // correct extreme. - - range[0] = range[1] = t; - if (tdx < 0) - range[0] += tdx; - else - range[1] += tdx; - - if (tdy < 0) - range[0] += tdy; - else - range[1] += tdy; - - *lower = std::max<double>(0., std::min<double>(1., range[0])); - *upper = std::max<double>(0., std::min<double>(1., range[1])); -} - -//------------------------------------------------------------------------ -// GfxRadialShading -//------------------------------------------------------------------------ - -#ifndef RADIAL_EPSILON -#define RADIAL_EPSILON (1. / 1024 / 1024) -#endif - -GfxRadialShading::GfxRadialShading(double x0A, double y0A, double r0A, - double x1A, double y1A, double r1A, - double t0A, double t1A, - Function **funcsA, int nFuncsA, - GBool extend0A, GBool extend1A): - GfxUnivariateShading(3, t0A, t1A, funcsA, nFuncsA, extend0A, extend1A) -{ - x0 = x0A; - y0 = y0A; - r0 = r0A; - x1 = x1A; - y1 = y1A; - r1 = r1A; -} - -GfxRadialShading::GfxRadialShading(GfxRadialShading *shading): - GfxUnivariateShading(shading) -{ - x0 = shading->x0; - y0 = shading->y0; - r0 = shading->r0; - x1 = shading->x1; - y1 = shading->y1; - r1 = shading->r1; -} - -GfxRadialShading::~GfxRadialShading() { -} - -GfxRadialShading *GfxRadialShading::parse(GfxResources *res, Dict *dict, OutputDev *out, GfxState *state) { - GfxRadialShading *shading; - double x0A, y0A, r0A, x1A, y1A, r1A; - double t0A, t1A; - Function *funcsA[gfxColorMaxComps]; - int nFuncsA; - GBool extend0A, extend1A; - Object obj1; - int i; - - x0A = y0A = r0A = x1A = y1A = r1A = 0; - obj1 = dict->lookup("Coords"); - if (obj1.isArray() && obj1.arrayGetLength() == 6) { - Object obj2; - bool dummy; // just so that we can use the getNum that returns 0 on obj2 not being a num instead of aborting - x0A = (obj2 = obj1.arrayGet(0), obj2.getNum(&dummy)); - y0A = (obj2 = obj1.arrayGet(1), obj2.getNum(&dummy)); - r0A = (obj2 = obj1.arrayGet(2), obj2.getNum(&dummy)); - x1A = (obj2 = obj1.arrayGet(3), obj2.getNum(&dummy)); - y1A = (obj2 = obj1.arrayGet(4), obj2.getNum(&dummy)); - r1A = (obj2 = obj1.arrayGet(5), obj2.getNum(&dummy)); - } else { - error(errSyntaxWarning, -1, "Missing or invalid Coords in shading dictionary"); - return nullptr; - } - - t0A = 0; - t1A = 1; - obj1 = dict->lookup("Domain"); - if (obj1.isArray() && obj1.arrayGetLength() == 2) { - Object obj2; - t0A = (obj2 = obj1.arrayGet(0), obj2.isNum() ? obj2.getNum() : 0); - t1A = (obj2 = obj1.arrayGet(1), obj2.isNum() ? obj2.getNum() : 1); - } - - obj1 = dict->lookup("Function"); - if (obj1.isArray()) { - nFuncsA = obj1.arrayGetLength(); - if (nFuncsA > gfxColorMaxComps) { - error(errSyntaxWarning, -1, "Invalid Function array in shading dictionary"); - return nullptr; - } - for (i = 0; i < nFuncsA; ++i) { - Object obj2 = obj1.arrayGet(i); - if (!(funcsA[i] = Function::parse(&obj2))) { - return nullptr; - } - } - } else { - nFuncsA = 1; - if (!(funcsA[0] = Function::parse(&obj1))) { - return nullptr; - } - } - - extend0A = extend1A = gFalse; - obj1 = dict->lookup("Extend"); - if (obj1.isArray() && obj1.arrayGetLength() == 2) { - Object obj2; - extend0A = (obj2 = obj1.arrayGet(0), obj2.isBool() ? obj2.getBool() : gFalse); - extend1A = (obj2 = obj1.arrayGet(1), obj2.isBool() ? obj2.getBool() : gFalse); - } - - shading = new GfxRadialShading(x0A, y0A, r0A, x1A, y1A, r1A, t0A, t1A, - funcsA, nFuncsA, extend0A, extend1A); - if (!shading->init(res, dict, out, state)) { - delete shading; - return nullptr; - } - return shading; -} - -GfxShading *GfxRadialShading::copy() { - return new GfxRadialShading(this); -} - -double GfxRadialShading::getDistance(double sMin, double sMax) { - double xMin, yMin, rMin, xMax, yMax, rMax; - - xMin = x0 + sMin * (x1 - x0); - yMin = y0 + sMin * (y1 - y0); - rMin = r0 + sMin * (r1 - r0); - - xMax = x0 + sMax * (x1 - x0); - yMax = y0 + sMax * (y1 - y0); - rMax = r0 + sMax * (r1 - r0); - - return hypot(xMax-xMin, yMax-yMin) + fabs(rMax-rMin); -} - -// extend range, adapted from cairo, radialExtendRange -static GBool -radialExtendRange (double range[2], double value, GBool valid) -{ - if (!valid) - range[0] = range[1] = value; - else if (value < range[0]) - range[0] = value; - else if (value > range[1]) - range[1] = value; - - return gTrue; -} - -inline void radialEdge(double num, double den, double delta, double lower, double upper, - double dr, double mindr, GBool &valid, double *range) -{ - if (fabs (den) >= RADIAL_EPSILON) { - double t_edge, v; - t_edge = (num) / (den); - v = t_edge * (delta); - if (t_edge * dr >= mindr && (lower) <= v && v <= (upper)) - valid = radialExtendRange (range, t_edge, valid); - } -} - -inline void radialCorner1(double x, double y, double &b, double dx, double dy, double cr, - double dr, double mindr, GBool &valid, double *range) -{ - b = (x) * dx + (y) * dy + cr * dr; - if (fabs (b) >= RADIAL_EPSILON) { - double t_corner; - double x2 = (x) * (x); - double y2 = (y) * (y); - double cr2 = (cr) * (cr); - double c = x2 + y2 - cr2; - - t_corner = 0.5 * c / b; - if (t_corner * dr >= mindr) - valid = radialExtendRange (range, t_corner, valid); - } -} - -inline void radialCorner2(double x, double y, double a, double &b, double &c, double &d, double dx, double dy, double cr, - double inva, double dr, double mindr, GBool &valid, double *range) -{ - b = (x) * dx + (y) * dy + cr * dr; - c = (x) * (x) + (y) * (y) - cr * cr; - d = b * b - a * c; - if (d >= 0) { - double t_corner; - - d = sqrt (d); - t_corner = (b + d) * inva; - if (t_corner * dr >= mindr) - valid = radialExtendRange (range, t_corner, valid); - t_corner = (b - d) * inva; - if (t_corner * dr >= mindr) - valid = radialExtendRange (range, t_corner, valid); - } -} -void GfxRadialShading::getParameterRange(double *lower, double *upper, - double xMin, double yMin, - double xMax, double yMax) { - double cx, cy, cr, dx, dy, dr; - double a, x_focus, y_focus; - double mindr, minx, miny, maxx, maxy; - double range[2]; - GBool valid; - - // A radial pattern is considered degenerate if it can be - // represented as a solid or clear pattern. This corresponds to one - // of the two cases: - // - // 1) The radii are both very small: - // |dr| < FLT_EPSILON && min (r0, r1) < FLT_EPSILON - // - // 2) The two circles have about the same radius and are very - // close to each other (approximately a cylinder gradient that - // doesn't move with the parameter): - // |dr| < FLT_EPSILON && max (|dx|, |dy|) < 2 * FLT_EPSILON - - if (xMin >= xMax || yMin >=yMax || - (fabs (r0 - r1) < RADIAL_EPSILON && - (std::min<double>(r0, r1) < RADIAL_EPSILON || - std::max<double>(fabs (x0 - x1), fabs (y0 - y1)) < 2 * RADIAL_EPSILON))) { - *lower = *upper = 0; - return; - } - - range[0] = range[1] = 0; - valid = gFalse; - - x_focus = y_focus = 0; // silence gcc - - cx = x0; - cy = y0; - cr = r0; - dx = x1 - cx; - dy = y1 - cy; - dr = r1 - cr; - - // translate by -(cx, cy) to simplify computations - xMin -= cx; - yMin -= cy; - xMax -= cx; - yMax -= cy; - - // enlarge boundaries slightly to avoid rounding problems in the - // parameter range computation - xMin -= RADIAL_EPSILON; - yMin -= RADIAL_EPSILON; - xMax += RADIAL_EPSILON; - yMax += RADIAL_EPSILON; - - // enlarge boundaries even more to avoid rounding problems when - // testing if a point belongs to the box - minx = xMin - RADIAL_EPSILON; - miny = yMin - RADIAL_EPSILON; - maxx = xMax + RADIAL_EPSILON; - maxy = yMax + RADIAL_EPSILON; - - // we dont' allow negative radiuses, so we will be checking that - // t*dr >= mindr to consider t valid - mindr = -(cr + RADIAL_EPSILON); - - // After the previous transformations, the start circle is centered - // in the origin and has radius cr. A 1-unit change in the t - // parameter corresponds to dx,dy,dr changes in the x,y,r of the - // circle (center coordinates, radius). - // - // To compute the minimum range needed to correctly draw the - // pattern, we start with an empty range and extend it to include - // the circles touching the bounding box or within it. - - // Focus, the point where the circle has radius == 0. - // - // r = cr + t * dr = 0 - // t = -cr / dr - // - // If the radius is constant (dr == 0) there is no focus (the - // gradient represents a cylinder instead of a cone). - if (fabs (dr) >= RADIAL_EPSILON) { - double t_focus; - - t_focus = -cr / dr; - x_focus = t_focus * dx; - y_focus = t_focus * dy; - if (minx <= x_focus && x_focus <= maxx && - miny <= y_focus && y_focus <= maxy) - { - valid = radialExtendRange (range, t_focus, valid); - } - } - - // Circles externally tangent to box edges. - // - // All circles have center in (dx, dy) * t - // - // If the circle is tangent to the line defined by the edge of the - // box, then at least one of the following holds true: - // - // (dx*t) + (cr + dr*t) == x0 (left edge) - // (dx*t) - (cr + dr*t) == x1 (right edge) - // (dy*t) + (cr + dr*t) == y0 (top edge) - // (dy*t) - (cr + dr*t) == y1 (bottom edge) - // - // The solution is only valid if the tangent point is actually on - // the edge, i.e. if its y coordinate is in [y0,y1] for left/right - // edges and if its x coordinate is in [x0,x1] for top/bottom edges. - // - // For the first equation: - // - // (dx + dr) * t = x0 - cr - // t = (x0 - cr) / (dx + dr) - // y = dy * t - // - // in the code this becomes: - // - // t_edge = (num) / (den) - // v = (delta) * t_edge - // - // If the denominator in t is 0, the pattern is tangent to a line - // parallel to the edge under examination. The corner-case where the - // boundary line is the same as the edge is handled by the focus - // point case and/or by the a==0 case. - - // circles tangent (externally) to left/right/top/bottom edge - radialEdge(xMin - cr, dx + dr, dy, miny, maxy, dr, mindr, valid, range); - radialEdge(xMax + cr, dx - dr, dy, miny, maxy, dr, mindr, valid, range); - radialEdge(yMin - cr, dy + dr, dx, minx, maxx, dr, mindr, valid, range); - radialEdge(yMax + cr, dy - dr, dx, minx, maxx, dr, mindr, valid, range); - - // Circles passing through a corner. - // - // A circle passing through the point (x,y) satisfies: - // - // (x-t*dx)^2 + (y-t*dy)^2 == (cr + t*dr)^2 - // - // If we set: - // a = dx^2 + dy^2 - dr^2 - // b = x*dx + y*dy + cr*dr - // c = x^2 + y^2 - cr^2 - // we have: - // a*t^2 - 2*b*t + c == 0 - - a = dx * dx + dy * dy - dr * dr; - if (fabs (a) < RADIAL_EPSILON * RADIAL_EPSILON) { - double b; - - // Ensure that gradients with both a and dr small are - // considered degenerate. - // The floating point version of the degeneracy test implemented - // in _radial_pattern_is_degenerate() is: - // - // 1) The circles are practically the same size: - // |dr| < RADIAL_EPSILON - // AND - // 2a) The circles are both very small: - // min (r0, r1) < RADIAL_EPSILON - // OR - // 2b) The circles are very close to each other: - // max (|dx|, |dy|) < 2 * RADIAL_EPSILON - // - // Assuming that the gradient is not degenerate, we want to - // show that |a| < RADIAL_EPSILON^2 implies |dr| >= RADIAL_EPSILON. - // - // If the gradient is not degenerate yet it has |dr| < - // RADIAL_EPSILON, (2b) is false, thus: - // - // max (|dx|, |dy|) >= 2*RADIAL_EPSILON - // which implies: - // 4*RADIAL_EPSILON^2 <= max (|dx|, |dy|)^2 <= dx^2 + dy^2 - // - // From the definition of a, we get: - // a = dx^2 + dy^2 - dr^2 < RADIAL_EPSILON^2 - // dx^2 + dy^2 - RADIAL_EPSILON^2 < dr^2 - // 3*RADIAL_EPSILON^2 < dr^2 - // - // which is inconsistent with the hypotheses, thus |dr| < - // RADIAL_EPSILON is false or the gradient is degenerate. - - assert (fabs (dr) >= RADIAL_EPSILON); - - // If a == 0, all the circles are tangent to a line in the - // focus point. If this line is within the box extents, we - // should add the circle with infinite radius, but this would - // make the range unbounded. We will be limiting the range to - // [0,1] anyway, so we simply add the biggest legitimate - // circle (it happens for 0 or for 1). - if (dr < 0) { - valid = radialExtendRange (range, 0, valid); - } else { - valid = radialExtendRange (range, 1, valid); - } - - // Nondegenerate, nonlimit circles passing through the corners. - // - // a == 0 && a*t^2 - 2*b*t + c == 0 - // - // t = c / (2*b) - // - // The b == 0 case has just been handled, so we only have to - // compute this if b != 0. - - // circles touching each corner - radialCorner1(xMin, yMin, b, dx, dy, cr, dr, mindr, valid, range); - radialCorner1(xMin, yMax, b, dx, dy, cr, dr, mindr, valid, range); - radialCorner1(xMax, yMin, b, dx, dy, cr, dr, mindr, valid, range); - radialCorner1(xMax, yMax, b, dx, dy, cr, dr, mindr, valid, range); - } else { - double inva, b, c, d; - - inva = 1 / a; - - // Nondegenerate, nonlimit circles passing through the corners. - // - // a != 0 && a*t^2 - 2*b*t + c == 0 - // - // t = (b +- sqrt (b*b - a*c)) / a - // - // If the argument of sqrt() is negative, then no circle - // passes through the corner. - - // circles touching each corner - radialCorner2(xMin, yMin, a, b, c, d, dx, dy, cr, inva, dr, mindr, valid, range); - radialCorner2(xMin, yMax, a, b, c, d, dx, dy, cr, inva, dr, mindr, valid, range); - radialCorner2(xMax, yMin, a, b, c, d, dx, dy, cr, inva, dr, mindr, valid, range); - radialCorner2(xMax, yMax, a, b, c, d, dx, dy, cr, inva, dr, mindr, valid, range); - } - - *lower = std::max<double>(0., std::min<double>(1., range[0])); - *upper = std::max<double>(0., std::min<double>(1., range[1])); -} - -//------------------------------------------------------------------------ -// GfxShadingBitBuf -//------------------------------------------------------------------------ - -class GfxShadingBitBuf { -public: - - GfxShadingBitBuf(Stream *strA); - ~GfxShadingBitBuf(); - GfxShadingBitBuf(const GfxShadingBitBuf &) = delete; - GfxShadingBitBuf& operator=(const GfxShadingBitBuf &) = delete; - GBool getBits(int n, Guint *val); - void flushBits(); - -private: - - Stream *str; - int bitBuf; - int nBits; -}; - -GfxShadingBitBuf::GfxShadingBitBuf(Stream *strA) { - str = strA; - str->reset(); - bitBuf = 0; - nBits = 0; -} - -GfxShadingBitBuf::~GfxShadingBitBuf() { - str->close(); -} - -GBool GfxShadingBitBuf::getBits(int n, Guint *val) { - int x; - - if (nBits >= n) { - x = (bitBuf >> (nBits - n)) & ((1 << n) - 1); - nBits -= n; - } else { - x = 0; - if (nBits > 0) { - x = bitBuf & ((1 << nBits) - 1); - n -= nBits; - nBits = 0; - } - while (n > 0) { - if ((bitBuf = str->getChar()) == EOF) { - nBits = 0; - return gFalse; - } - if (n >= 8) { - x = (x << 8) | bitBuf; - n -= 8; - } else { - x = (x << n) | (bitBuf >> (8 - n)); - nBits = 8 - n; - n = 0; - } - } - } - *val = x; - return gTrue; -} - -void GfxShadingBitBuf::flushBits() { - bitBuf = 0; - nBits = 0; -} - -//------------------------------------------------------------------------ -// GfxGouraudTriangleShading -//------------------------------------------------------------------------ - -GfxGouraudTriangleShading::GfxGouraudTriangleShading( - int typeA, - GfxGouraudVertex *verticesA, int nVerticesA, - int (*trianglesA)[3], int nTrianglesA, - Function **funcsA, int nFuncsA): - GfxShading(typeA) -{ - int i; - - vertices = verticesA; - nVertices = nVerticesA; - triangles = trianglesA; - nTriangles = nTrianglesA; - nFuncs = nFuncsA; - for (i = 0; i < nFuncs; ++i) { - funcs[i] = funcsA[i]; - } -} - -GfxGouraudTriangleShading::GfxGouraudTriangleShading( - GfxGouraudTriangleShading *shading): - GfxShading(shading) -{ - int i; - - nVertices = shading->nVertices; - vertices = (GfxGouraudVertex *)gmallocn(nVertices, sizeof(GfxGouraudVertex)); - memcpy(vertices, shading->vertices, nVertices * sizeof(GfxGouraudVertex)); - nTriangles = shading->nTriangles; - triangles = (int (*)[3])gmallocn(nTriangles * 3, sizeof(int)); - memcpy(triangles, shading->triangles, nTriangles * 3 * sizeof(int)); - nFuncs = shading->nFuncs; - for (i = 0; i < nFuncs; ++i) { - funcs[i] = shading->funcs[i]->copy(); - } -} - -GfxGouraudTriangleShading::~GfxGouraudTriangleShading() { - int i; - - gfree(vertices); - gfree(triangles); - for (i = 0; i < nFuncs; ++i) { - delete funcs[i]; - } -} - -GfxGouraudTriangleShading *GfxGouraudTriangleShading::parse(GfxResources *res, int typeA, - Dict *dict, - Stream *str, - OutputDev *out, GfxState *gfxState) { - GfxGouraudTriangleShading *shading; - Function *funcsA[gfxColorMaxComps]; - int nFuncsA; - int coordBits, compBits, flagBits, vertsPerRow, nRows; - double xMin, xMax, yMin, yMax; - double cMin[gfxColorMaxComps], cMax[gfxColorMaxComps]; - double xMul, yMul; - double cMul[gfxColorMaxComps]; - GfxGouraudVertex *verticesA; - int (*trianglesA)[3]; - int nComps, nVerticesA, nTrianglesA, vertSize, triSize; - Guint x, y, flag; - Guint c[gfxColorMaxComps]; - GfxShadingBitBuf *bitBuf; - Object obj1; - int i, j, k, state; - - obj1 = dict->lookup("BitsPerCoordinate"); - if (obj1.isInt()) { - coordBits = obj1.getInt(); - } else { - error(errSyntaxWarning, -1, "Missing or invalid BitsPerCoordinate in shading dictionary"); - return nullptr; - } - if (unlikely(coordBits <= 0)) { - error(errSyntaxWarning, -1, "Invalid BitsPerCoordinate in shading dictionary"); - return nullptr; - } - obj1 = dict->lookup("BitsPerComponent"); - if (obj1.isInt()) { - compBits = obj1.getInt(); - } else { - error(errSyntaxWarning, -1, "Missing or invalid BitsPerComponent in shading dictionary"); - return nullptr; - } - if (unlikely(compBits <= 0 || compBits > 31)) { - error(errSyntaxWarning, -1, "Invalid BitsPerComponent in shading dictionary"); - return nullptr; - } - flagBits = vertsPerRow = 0; // make gcc happy - if (typeA == 4) { - obj1 = dict->lookup("BitsPerFlag"); - if (obj1.isInt()) { - flagBits = obj1.getInt(); - } else { - error(errSyntaxWarning, -1, "Missing or invalid BitsPerFlag in shading dictionary"); - return nullptr; - } - } else { - obj1 = dict->lookup("VerticesPerRow"); - if (obj1.isInt()) { - vertsPerRow = obj1.getInt(); - } else { - error(errSyntaxWarning, -1, "Missing or invalid VerticesPerRow in shading dictionary"); - return nullptr; - } - } - obj1 = dict->lookup("Decode"); - if (obj1.isArray() && obj1.arrayGetLength() >= 6) { - Object obj2; - bool decodeOk = true; - xMin = (obj2 = obj1.arrayGet(0), obj2.getNum(&decodeOk)); - xMax = (obj2 = obj1.arrayGet(1), obj2.getNum(&decodeOk)); - xMul = (xMax - xMin) / (pow(2.0, coordBits) - 1); - yMin = (obj2 = obj1.arrayGet(2), obj2.getNum(&decodeOk)); - yMax = (obj2 = obj1.arrayGet(3), obj2.getNum(&decodeOk)); - yMul = (yMax - yMin) / (pow(2.0, coordBits) - 1); - for (i = 0; 5 + 2*i < obj1.arrayGetLength() && i < gfxColorMaxComps; ++i) { - cMin[i] = (obj2 = obj1.arrayGet(4 + 2*i), obj2.getNum(&decodeOk)); - cMax[i] = (obj2 = obj1.arrayGet(5 + 2*i), obj2.getNum(&decodeOk)); - cMul[i] = (cMax[i] - cMin[i]) / (double)((1u << compBits) - 1); - } - nComps = i; - - if (!decodeOk) { - error(errSyntaxWarning, -1, "Missing or invalid Decode array in shading dictionary"); - return nullptr; - } - } else { - error(errSyntaxWarning, -1, "Missing or invalid Decode array in shading dictionary"); - return nullptr; - } - - obj1 = dict->lookup("Function"); - if (!obj1.isNull()) { - if (obj1.isArray()) { - nFuncsA = obj1.arrayGetLength(); - if (nFuncsA > gfxColorMaxComps) { - error(errSyntaxWarning, -1, "Invalid Function array in shading dictionary"); - return nullptr; - } - for (i = 0; i < nFuncsA; ++i) { - Object obj2 = obj1.arrayGet(i); - if (!(funcsA[i] = Function::parse(&obj2))) { - return nullptr; - } - } - } else { - nFuncsA = 1; - if (!(funcsA[0] = Function::parse(&obj1))) { - return nullptr; - } - } - } else { - nFuncsA = 0; - } - - nVerticesA = nTrianglesA = 0; - verticesA = nullptr; - trianglesA = nullptr; - vertSize = triSize = 0; - state = 0; - flag = 0; // make gcc happy - bitBuf = new GfxShadingBitBuf(str); - while (1) { - if (typeA == 4) { - if (!bitBuf->getBits(flagBits, &flag)) { - break; - } - } - if (!bitBuf->getBits(coordBits, &x) || - !bitBuf->getBits(coordBits, &y)) { - break; - } - for (i = 0; i < nComps; ++i) { - if (!bitBuf->getBits(compBits, &c[i])) { - break; - } - } - if (i < nComps) { - break; - } - if (nVerticesA == vertSize) { - int oldVertSize = vertSize; - vertSize = (vertSize == 0) ? 16 : 2 * vertSize; - verticesA = (GfxGouraudVertex *) - greallocn(verticesA, vertSize, sizeof(GfxGouraudVertex)); - memset(verticesA + oldVertSize, 0, (vertSize - oldVertSize) * sizeof(GfxGouraudVertex)); - } - verticesA[nVerticesA].x = xMin + xMul * (double)x; - verticesA[nVerticesA].y = yMin + yMul * (double)y; - for (i = 0; i < nComps; ++i) { - verticesA[nVerticesA].color.c[i] = - dblToCol(cMin[i] + cMul[i] * (double)c[i]); - } - ++nVerticesA; - bitBuf->flushBits(); - if (typeA == 4) { - if (state == 0 || state == 1) { - ++state; - } else if (state == 2 || flag > 0) { - if (nTrianglesA == triSize) { - triSize = (triSize == 0) ? 16 : 2 * triSize; - trianglesA = (int (*)[3]) - greallocn(trianglesA, triSize * 3, sizeof(int)); - } - if (state == 2) { - trianglesA[nTrianglesA][0] = nVerticesA - 3; - trianglesA[nTrianglesA][1] = nVerticesA - 2; - trianglesA[nTrianglesA][2] = nVerticesA - 1; - ++state; - } else if (flag == 1) { - trianglesA[nTrianglesA][0] = trianglesA[nTrianglesA - 1][1]; - trianglesA[nTrianglesA][1] = trianglesA[nTrianglesA - 1][2]; - trianglesA[nTrianglesA][2] = nVerticesA - 1; - } else { // flag == 2 - trianglesA[nTrianglesA][0] = trianglesA[nTrianglesA - 1][0]; - trianglesA[nTrianglesA][1] = trianglesA[nTrianglesA - 1][2]; - trianglesA[nTrianglesA][2] = nVerticesA - 1; - } - ++nTrianglesA; - } else { // state == 3 && flag == 0 - state = 1; - } - } - } - delete bitBuf; - if (typeA == 5 && nVerticesA > 0 && vertsPerRow > 0) { - nRows = nVerticesA / vertsPerRow; - nTrianglesA = (nRows - 1) * 2 * (vertsPerRow - 1); - trianglesA = (int (*)[3])gmallocn_checkoverflow(nTrianglesA * 3, sizeof(int)); - if (unlikely(!trianglesA)) { - gfree(verticesA); - for (i = 0; i < nFuncsA; ++i) { - delete funcsA[i]; - } - return nullptr; - } - k = 0; - for (i = 0; i < nRows - 1; ++i) { - for (j = 0; j < vertsPerRow - 1; ++j) { - trianglesA[k][0] = i * vertsPerRow + j; - trianglesA[k][1] = i * vertsPerRow + j+1; - trianglesA[k][2] = (i+1) * vertsPerRow + j; - ++k; - trianglesA[k][0] = i * vertsPerRow + j+1; - trianglesA[k][1] = (i+1) * vertsPerRow + j; - trianglesA[k][2] = (i+1) * vertsPerRow + j+1; - ++k; - } - } - } - - shading = new GfxGouraudTriangleShading(typeA, verticesA, nVerticesA, - trianglesA, nTrianglesA, - funcsA, nFuncsA); - if (!shading->init(res, dict, out, gfxState)) { - delete shading; - return nullptr; - } - return shading; -} - -GfxShading *GfxGouraudTriangleShading::copy() { - return new GfxGouraudTriangleShading(this); -} - -void GfxGouraudTriangleShading::getTriangle( - int i, - double *x0, double *y0, GfxColor *color0, - double *x1, double *y1, GfxColor *color1, - double *x2, double *y2, GfxColor *color2) { - double in; - double out[gfxColorMaxComps]; - int v, j; - - assert(!isParameterized()); - - v = triangles[i][0]; - *x0 = vertices[v].x; - *y0 = vertices[v].y; - if (nFuncs > 0) { - in = colToDbl(vertices[v].color.c[0]); - for (j = 0; j < nFuncs; ++j) { - funcs[j]->transform(&in, &out[j]); - } - for (j = 0; j < gfxColorMaxComps; ++j) { - color0->c[j] = dblToCol(out[j]); - } - } else { - *color0 = vertices[v].color; - } - v = triangles[i][1]; - *x1 = vertices[v].x; - *y1 = vertices[v].y; - if (nFuncs > 0) { - in = colToDbl(vertices[v].color.c[0]); - for (j = 0; j < nFuncs; ++j) { - funcs[j]->transform(&in, &out[j]); - } - for (j = 0; j < gfxColorMaxComps; ++j) { - color1->c[j] = dblToCol(out[j]); - } - } else { - *color1 = vertices[v].color; - } - v = triangles[i][2]; - *x2 = vertices[v].x; - *y2 = vertices[v].y; - if (nFuncs > 0) { - in = colToDbl(vertices[v].color.c[0]); - for (j = 0; j < nFuncs; ++j) { - funcs[j]->transform(&in, &out[j]); - } - for (j = 0; j < gfxColorMaxComps; ++j) { - color2->c[j] = dblToCol(out[j]); - } - } else { - *color2 = vertices[v].color; - } -} - -void GfxGouraudTriangleShading::getParameterizedColor(double t, GfxColor *color) { - double out[gfxColorMaxComps]; - - for (int j = 0; j < nFuncs; ++j) { - funcs[j]->transform(&t, &out[j]); - } - for (int j = 0; j < gfxColorMaxComps; ++j) { - color->c[j] = dblToCol(out[j]); - } -} - -void GfxGouraudTriangleShading::getTriangle(int i, - double *x0, double *y0, double *color0, - double *x1, double *y1, double *color1, - double *x2, double *y2, double *color2) { - int v; - - assert(isParameterized()); - - v = triangles[i][0]; - if (likely(v >= 0 && v < nVertices)) { - *x0 = vertices[v].x; - *y0 = vertices[v].y; - *color0 = colToDbl(vertices[v].color.c[0]); - } - v = triangles[i][1]; - if (likely(v >= 0 && v < nVertices)) { - *x1 = vertices[v].x; - *y1 = vertices[v].y; - *color1 = colToDbl(vertices[v].color.c[0]); - } - v = triangles[i][2]; - if (likely(v >= 0 && v < nVertices)) { - *x2 = vertices[v].x; - *y2 = vertices[v].y; - *color2 = colToDbl(vertices[v].color.c[0]); - } -} - -//------------------------------------------------------------------------ -// GfxPatchMeshShading -//------------------------------------------------------------------------ - -GfxPatchMeshShading::GfxPatchMeshShading(int typeA, - GfxPatch *patchesA, int nPatchesA, - Function **funcsA, int nFuncsA): - GfxShading(typeA) -{ - int i; - - patches = patchesA; - nPatches = nPatchesA; - nFuncs = nFuncsA; - for (i = 0; i < nFuncs; ++i) { - funcs[i] = funcsA[i]; - } -} - -GfxPatchMeshShading::GfxPatchMeshShading(GfxPatchMeshShading *shading): - GfxShading(shading) -{ - int i; - - nPatches = shading->nPatches; - patches = (GfxPatch *)gmallocn(nPatches, sizeof(GfxPatch)); - memcpy(patches, shading->patches, nPatches * sizeof(GfxPatch)); - nFuncs = shading->nFuncs; - for (i = 0; i < nFuncs; ++i) { - funcs[i] = shading->funcs[i]->copy(); - } -} - -GfxPatchMeshShading::~GfxPatchMeshShading() { - int i; - - gfree(patches); - for (i = 0; i < nFuncs; ++i) { - delete funcs[i]; - } -} - -GfxPatchMeshShading *GfxPatchMeshShading::parse(GfxResources *res, int typeA, Dict *dict, - Stream *str, OutputDev *out, GfxState *state) { - GfxPatchMeshShading *shading; - Function *funcsA[gfxColorMaxComps]; - int nFuncsA; - int coordBits, compBits, flagBits; - double xMin, xMax, yMin, yMax; - double cMin[gfxColorMaxComps], cMax[gfxColorMaxComps]; - double xMul, yMul; - double cMul[gfxColorMaxComps]; - GfxPatch *patchesA, *p; - int nComps, nPatchesA, patchesSize, nPts, nColors; - Guint flag; - double x[16], y[16]; - Guint xi, yi; - double c[4][gfxColorMaxComps]; - Guint ci; - Object obj1; - int i, j; - - obj1 = dict->lookup("BitsPerCoordinate"); - if (obj1.isInt()) { - coordBits = obj1.getInt(); - } else { - error(errSyntaxWarning, -1, "Missing or invalid BitsPerCoordinate in shading dictionary"); - return nullptr; - } - if (unlikely(coordBits <= 0)) { - error(errSyntaxWarning, -1, "Invalid BitsPerCoordinate in shading dictionary"); - return nullptr; - } - obj1 = dict->lookup("BitsPerComponent"); - if (obj1.isInt()) { - compBits = obj1.getInt(); - } else { - error(errSyntaxWarning, -1, "Missing or invalid BitsPerComponent in shading dictionary"); - return nullptr; - } - if (unlikely(compBits <= 0 || compBits > 31)) { - error(errSyntaxWarning, -1, "Invalid BitsPerComponent in shading dictionary"); - return nullptr; - } - obj1 = dict->lookup("BitsPerFlag"); - if (obj1.isInt()) { - flagBits = obj1.getInt(); - } else { - error(errSyntaxWarning, -1, "Missing or invalid BitsPerFlag in shading dictionary"); - return nullptr; - } - obj1 = dict->lookup("Decode"); - if (obj1.isArray() && obj1.arrayGetLength() >= 6) { - bool decodeOk = true; - Object obj2; - xMin = (obj2 = obj1.arrayGet(0), obj2.getNum(&decodeOk)); - xMax = (obj2 = obj1.arrayGet(1), obj2.getNum(&decodeOk)); - xMul = (xMax - xMin) / (pow(2.0, coordBits) - 1); - yMin = (obj2 = obj1.arrayGet(2), obj2.getNum(&decodeOk)); - yMax = (obj2 = obj1.arrayGet(3), obj2.getNum(&decodeOk)); - yMul = (yMax - yMin) / (pow(2.0, coordBits) - 1); - for (i = 0; 5 + 2*i < obj1.arrayGetLength() && i < gfxColorMaxComps; ++i) { - cMin[i] = (obj2 = obj1.arrayGet(4 + 2*i), obj2.getNum(&decodeOk)); - cMax[i] = (obj2 = obj1.arrayGet(5 + 2*i), obj2.getNum(&decodeOk)); - cMul[i] = (cMax[i] - cMin[i]) / (double)((1u << compBits) - 1); - } - nComps = i; - - if (!decodeOk) { - error(errSyntaxWarning, -1, "Missing or invalid Decode array in shading dictionary"); - return nullptr; - } - } else { - error(errSyntaxWarning, -1, "Missing or invalid Decode array in shading dictionary"); - return nullptr; - } - - obj1 = dict->lookup("Function"); - if (!obj1.isNull()) { - if (obj1.isArray()) { - nFuncsA = obj1.arrayGetLength(); - if (nFuncsA > gfxColorMaxComps) { - error(errSyntaxWarning, -1, "Invalid Function array in shading dictionary"); - return nullptr; - } - for (i = 0; i < nFuncsA; ++i) { - Object obj2 = obj1.arrayGet(i); - if (!(funcsA[i] = Function::parse(&obj2))) { - return nullptr; - } - } - } else { - nFuncsA = 1; - if (!(funcsA[0] = Function::parse(&obj1))) { - return nullptr; - } - } - } else { - nFuncsA = 0; - } - - nPatchesA = 0; - patchesA = nullptr; - patchesSize = 0; - std::unique_ptr<GfxShadingBitBuf> bitBuf(new GfxShadingBitBuf(str)); - while (1) { - if (!bitBuf->getBits(flagBits, &flag)) { - break; - } - if (typeA == 6) { - switch (flag) { - case 0: nPts = 12; nColors = 4; break; - case 1: - case 2: - case 3: - default: nPts = 8; nColors = 2; break; - } - } else { - switch (flag) { - case 0: nPts = 16; nColors = 4; break; - case 1: - case 2: - case 3: - default: nPts = 12; nColors = 2; break; - } - } - for (i = 0; i < nPts; ++i) { - if (!bitBuf->getBits(coordBits, &xi) || - !bitBuf->getBits(coordBits, &yi)) { - break; - } - x[i] = xMin + xMul * (double)xi; - y[i] = yMin + yMul * (double)yi; - } - if (i < nPts) { - break; - } - for (i = 0; i < nColors; ++i) { - for (j = 0; j < nComps; ++j) { - if (!bitBuf->getBits(compBits, &ci)) { - break; - } - c[i][j] = cMin[j] + cMul[j] * (double)ci; - if( nFuncsA == 0 ) { - // ... and colorspace values can also be stored into doubles. - // They will be casted later. - c[i][j] = dblToCol(c[i][j]); - } - } - if (j < nComps) { - break; - } - } - if (i < nColors) { - break; - } - if (nPatchesA == patchesSize) { - int oldPatchesSize = patchesSize; - patchesSize = (patchesSize == 0) ? 16 : 2 * patchesSize; - patchesA = (GfxPatch *)greallocn(patchesA, - patchesSize, sizeof(GfxPatch)); - memset(patchesA + oldPatchesSize, 0, (patchesSize - oldPatchesSize) * sizeof(GfxPatch)); - } - p = &patchesA[nPatchesA]; - if (typeA == 6) { - switch (flag) { - case 0: - p->x[0][0] = x[0]; - p->y[0][0] = y[0]; - p->x[0][1] = x[1]; - p->y[0][1] = y[1]; - p->x[0][2] = x[2]; - p->y[0][2] = y[2]; - p->x[0][3] = x[3]; - p->y[0][3] = y[3]; - p->x[1][3] = x[4]; - p->y[1][3] = y[4]; - p->x[2][3] = x[5]; - p->y[2][3] = y[5]; - p->x[3][3] = x[6]; - p->y[3][3] = y[6]; - p->x[3][2] = x[7]; - p->y[3][2] = y[7]; - p->x[3][1] = x[8]; - p->y[3][1] = y[8]; - p->x[3][0] = x[9]; - p->y[3][0] = y[9]; - p->x[2][0] = x[10]; - p->y[2][0] = y[10]; - p->x[1][0] = x[11]; - p->y[1][0] = y[11]; - for (j = 0; j < nComps; ++j) { - p->color[0][0].c[j] = c[0][j]; - p->color[0][1].c[j] = c[1][j]; - p->color[1][1].c[j] = c[2][j]; - p->color[1][0].c[j] = c[3][j]; - } - break; - case 1: - if (nPatchesA == 0) { - gfree(patchesA); - for (int k = 0; k < nFuncsA; ++k) delete funcsA[k]; - return nullptr; - } - p->x[0][0] = patchesA[nPatchesA-1].x[0][3]; - p->y[0][0] = patchesA[nPatchesA-1].y[0][3]; - p->x[0][1] = patchesA[nPatchesA-1].x[1][3]; - p->y[0][1] = patchesA[nPatchesA-1].y[1][3]; - p->x[0][2] = patchesA[nPatchesA-1].x[2][3]; - p->y[0][2] = patchesA[nPatchesA-1].y[2][3]; - p->x[0][3] = patchesA[nPatchesA-1].x[3][3]; - p->y[0][3] = patchesA[nPatchesA-1].y[3][3]; - p->x[1][3] = x[0]; - p->y[1][3] = y[0]; - p->x[2][3] = x[1]; - p->y[2][3] = y[1]; - p->x[3][3] = x[2]; - p->y[3][3] = y[2]; - p->x[3][2] = x[3]; - p->y[3][2] = y[3]; - p->x[3][1] = x[4]; - p->y[3][1] = y[4]; - p->x[3][0] = x[5]; - p->y[3][0] = y[5]; - p->x[2][0] = x[6]; - p->y[2][0] = y[6]; - p->x[1][0] = x[7]; - p->y[1][0] = y[7]; - for (j = 0; j < nComps; ++j) { - p->color[0][0].c[j] = patchesA[nPatchesA-1].color[0][1].c[j]; - p->color[0][1].c[j] = patchesA[nPatchesA-1].color[1][1].c[j]; - p->color[1][1].c[j] = c[0][j]; - p->color[1][0].c[j] = c[1][j]; - } - break; - case 2: - if (nPatchesA == 0) { - gfree(patchesA); - for (int k = 0; k < nFuncsA; ++k) delete funcsA[k]; - return nullptr; - } - p->x[0][0] = patchesA[nPatchesA-1].x[3][3]; - p->y[0][0] = patchesA[nPatchesA-1].y[3][3]; - p->x[0][1] = patchesA[nPatchesA-1].x[3][2]; - p->y[0][1] = patchesA[nPatchesA-1].y[3][2]; - p->x[0][2] = patchesA[nPatchesA-1].x[3][1]; - p->y[0][2] = patchesA[nPatchesA-1].y[3][1]; - p->x[0][3] = patchesA[nPatchesA-1].x[3][0]; - p->y[0][3] = patchesA[nPatchesA-1].y[3][0]; - p->x[1][3] = x[0]; - p->y[1][3] = y[0]; - p->x[2][3] = x[1]; - p->y[2][3] = y[1]; - p->x[3][3] = x[2]; - p->y[3][3] = y[2]; - p->x[3][2] = x[3]; - p->y[3][2] = y[3]; - p->x[3][1] = x[4]; - p->y[3][1] = y[4]; - p->x[3][0] = x[5]; - p->y[3][0] = y[5]; - p->x[2][0] = x[6]; - p->y[2][0] = y[6]; - p->x[1][0] = x[7]; - p->y[1][0] = y[7]; - for (j = 0; j < nComps; ++j) { - p->color[0][0].c[j] = patchesA[nPatchesA-1].color[1][1].c[j]; - p->color[0][1].c[j] = patchesA[nPatchesA-1].color[1][0].c[j]; - p->color[1][1].c[j] = c[0][j]; - p->color[1][0].c[j] = c[1][j]; - } - break; - case 3: - if (nPatchesA == 0) { - gfree(patchesA); - for (int k = 0; k < nFuncsA; ++k) delete funcsA[k]; - return nullptr; - } - p->x[0][0] = patchesA[nPatchesA-1].x[3][0]; - p->y[0][0] = patchesA[nPatchesA-1].y[3][0]; - p->x[0][1] = patchesA[nPatchesA-1].x[2][0]; - p->y[0][1] = patchesA[nPatchesA-1].y[2][0]; - p->x[0][2] = patchesA[nPatchesA-1].x[1][0]; - p->y[0][2] = patchesA[nPatchesA-1].y[1][0]; - p->x[0][3] = patchesA[nPatchesA-1].x[0][0]; - p->y[0][3] = patchesA[nPatchesA-1].y[0][0]; - p->x[1][3] = x[0]; - p->y[1][3] = y[0]; - p->x[2][3] = x[1]; - p->y[2][3] = y[1]; - p->x[3][3] = x[2]; - p->y[3][3] = y[2]; - p->x[3][2] = x[3]; - p->y[3][2] = y[3]; - p->x[3][1] = x[4]; - p->y[3][1] = y[4]; - p->x[3][0] = x[5]; - p->y[3][0] = y[5]; - p->x[2][0] = x[6]; - p->y[2][0] = y[6]; - p->x[1][0] = x[7]; - p->y[1][0] = y[7]; - for (j = 0; j < nComps; ++j) { - p->color[0][0].c[j] = patchesA[nPatchesA-1].color[1][0].c[j]; - p->color[0][1].c[j] = patchesA[nPatchesA-1].color[0][0].c[j]; - p->color[1][1].c[j] = c[0][j]; - p->color[1][0].c[j] = c[1][j]; - } - break; - } - } else { - switch (flag) { - case 0: - p->x[0][0] = x[0]; - p->y[0][0] = y[0]; - p->x[0][1] = x[1]; - p->y[0][1] = y[1]; - p->x[0][2] = x[2]; - p->y[0][2] = y[2]; - p->x[0][3] = x[3]; - p->y[0][3] = y[3]; - p->x[1][3] = x[4]; - p->y[1][3] = y[4]; - p->x[2][3] = x[5]; - p->y[2][3] = y[5]; - p->x[3][3] = x[6]; - p->y[3][3] = y[6]; - p->x[3][2] = x[7]; - p->y[3][2] = y[7]; - p->x[3][1] = x[8]; - p->y[3][1] = y[8]; - p->x[3][0] = x[9]; - p->y[3][0] = y[9]; - p->x[2][0] = x[10]; - p->y[2][0] = y[10]; - p->x[1][0] = x[11]; - p->y[1][0] = y[11]; - p->x[1][1] = x[12]; - p->y[1][1] = y[12]; - p->x[1][2] = x[13]; - p->y[1][2] = y[13]; - p->x[2][2] = x[14]; - p->y[2][2] = y[14]; - p->x[2][1] = x[15]; - p->y[2][1] = y[15]; - for (j = 0; j < nComps; ++j) { - p->color[0][0].c[j] = c[0][j]; - p->color[0][1].c[j] = c[1][j]; - p->color[1][1].c[j] = c[2][j]; - p->color[1][0].c[j] = c[3][j]; - } - break; - case 1: - if (nPatchesA == 0) { - gfree(patchesA); - for (int k = 0; k < nFuncsA; ++k) delete funcsA[k]; - return nullptr; - } - p->x[0][0] = patchesA[nPatchesA-1].x[0][3]; - p->y[0][0] = patchesA[nPatchesA-1].y[0][3]; - p->x[0][1] = patchesA[nPatchesA-1].x[1][3]; - p->y[0][1] = patchesA[nPatchesA-1].y[1][3]; - p->x[0][2] = patchesA[nPatchesA-1].x[2][3]; - p->y[0][2] = patchesA[nPatchesA-1].y[2][3]; - p->x[0][3] = patchesA[nPatchesA-1].x[3][3]; - p->y[0][3] = patchesA[nPatchesA-1].y[3][3]; - p->x[1][3] = x[0]; - p->y[1][3] = y[0]; - p->x[2][3] = x[1]; - p->y[2][3] = y[1]; - p->x[3][3] = x[2]; - p->y[3][3] = y[2]; - p->x[3][2] = x[3]; - p->y[3][2] = y[3]; - p->x[3][1] = x[4]; - p->y[3][1] = y[4]; - p->x[3][0] = x[5]; - p->y[3][0] = y[5]; - p->x[2][0] = x[6]; - p->y[2][0] = y[6]; - p->x[1][0] = x[7]; - p->y[1][0] = y[7]; - p->x[1][1] = x[8]; - p->y[1][1] = y[8]; - p->x[1][2] = x[9]; - p->y[1][2] = y[9]; - p->x[2][2] = x[10]; - p->y[2][2] = y[10]; - p->x[2][1] = x[11]; - p->y[2][1] = y[11]; - for (j = 0; j < nComps; ++j) { - p->color[0][0].c[j] = patchesA[nPatchesA-1].color[0][1].c[j]; - p->color[0][1].c[j] = patchesA[nPatchesA-1].color[1][1].c[j]; - p->color[1][1].c[j] = c[0][j]; - p->color[1][0].c[j] = c[1][j]; - } - break; - case 2: - if (nPatchesA == 0) { - gfree(patchesA); - for (int k = 0; k < nFuncsA; ++k) delete funcsA[k]; - return nullptr; - } - p->x[0][0] = patchesA[nPatchesA-1].x[3][3]; - p->y[0][0] = patchesA[nPatchesA-1].y[3][3]; - p->x[0][1] = patchesA[nPatchesA-1].x[3][2]; - p->y[0][1] = patchesA[nPatchesA-1].y[3][2]; - p->x[0][2] = patchesA[nPatchesA-1].x[3][1]; - p->y[0][2] = patchesA[nPatchesA-1].y[3][1]; - p->x[0][3] = patchesA[nPatchesA-1].x[3][0]; - p->y[0][3] = patchesA[nPatchesA-1].y[3][0]; - p->x[1][3] = x[0]; - p->y[1][3] = y[0]; - p->x[2][3] = x[1]; - p->y[2][3] = y[1]; - p->x[3][3] = x[2]; - p->y[3][3] = y[2]; - p->x[3][2] = x[3]; - p->y[3][2] = y[3]; - p->x[3][1] = x[4]; - p->y[3][1] = y[4]; - p->x[3][0] = x[5]; - p->y[3][0] = y[5]; - p->x[2][0] = x[6]; - p->y[2][0] = y[6]; - p->x[1][0] = x[7]; - p->y[1][0] = y[7]; - p->x[1][1] = x[8]; - p->y[1][1] = y[8]; - p->x[1][2] = x[9]; - p->y[1][2] = y[9]; - p->x[2][2] = x[10]; - p->y[2][2] = y[10]; - p->x[2][1] = x[11]; - p->y[2][1] = y[11]; - for (j = 0; j < nComps; ++j) { - p->color[0][0].c[j] = patchesA[nPatchesA-1].color[1][1].c[j]; - p->color[0][1].c[j] = patchesA[nPatchesA-1].color[1][0].c[j]; - p->color[1][1].c[j] = c[0][j]; - p->color[1][0].c[j] = c[1][j]; - } - break; - case 3: - if (nPatchesA == 0) { - gfree(patchesA); - for (int k = 0; k < nFuncsA; ++k) delete funcsA[k]; - return nullptr; - } - p->x[0][0] = patchesA[nPatchesA-1].x[3][0]; - p->y[0][0] = patchesA[nPatchesA-1].y[3][0]; - p->x[0][1] = patchesA[nPatchesA-1].x[2][0]; - p->y[0][1] = patchesA[nPatchesA-1].y[2][0]; - p->x[0][2] = patchesA[nPatchesA-1].x[1][0]; - p->y[0][2] = patchesA[nPatchesA-1].y[1][0]; - p->x[0][3] = patchesA[nPatchesA-1].x[0][0]; - p->y[0][3] = patchesA[nPatchesA-1].y[0][0]; - p->x[1][3] = x[0]; - p->y[1][3] = y[0]; - p->x[2][3] = x[1]; - p->y[2][3] = y[1]; - p->x[3][3] = x[2]; - p->y[3][3] = y[2]; - p->x[3][2] = x[3]; - p->y[3][2] = y[3]; - p->x[3][1] = x[4]; - p->y[3][1] = y[4]; - p->x[3][0] = x[5]; - p->y[3][0] = y[5]; - p->x[2][0] = x[6]; - p->y[2][0] = y[6]; - p->x[1][0] = x[7]; - p->y[1][0] = y[7]; - p->x[1][1] = x[8]; - p->y[1][1] = y[8]; - p->x[1][2] = x[9]; - p->y[1][2] = y[9]; - p->x[2][2] = x[10]; - p->y[2][2] = y[10]; - p->x[2][1] = x[11]; - p->y[2][1] = y[11]; - for (j = 0; j < nComps; ++j) { - p->color[0][0].c[j] = patchesA[nPatchesA-1].color[1][0].c[j]; - p->color[0][1].c[j] = patchesA[nPatchesA-1].color[0][0].c[j]; - p->color[1][1].c[j] = c[0][j]; - p->color[1][0].c[j] = c[1][j]; - } - break; - } - } - ++nPatchesA; - bitBuf->flushBits(); - } - - if (typeA == 6) { - for (i = 0; i < nPatchesA; ++i) { - p = &patchesA[i]; - p->x[1][1] = (-4 * p->x[0][0] - +6 * (p->x[0][1] + p->x[1][0]) - -2 * (p->x[0][3] + p->x[3][0]) - +3 * (p->x[3][1] + p->x[1][3]) - - p->x[3][3]) / 9; - p->y[1][1] = (-4 * p->y[0][0] - +6 * (p->y[0][1] + p->y[1][0]) - -2 * (p->y[0][3] + p->y[3][0]) - +3 * (p->y[3][1] + p->y[1][3]) - - p->y[3][3]) / 9; - p->x[1][2] = (-4 * p->x[0][3] - +6 * (p->x[0][2] + p->x[1][3]) - -2 * (p->x[0][0] + p->x[3][3]) - +3 * (p->x[3][2] + p->x[1][0]) - - p->x[3][0]) / 9; - p->y[1][2] = (-4 * p->y[0][3] - +6 * (p->y[0][2] + p->y[1][3]) - -2 * (p->y[0][0] + p->y[3][3]) - +3 * (p->y[3][2] + p->y[1][0]) - - p->y[3][0]) / 9; - p->x[2][1] = (-4 * p->x[3][0] - +6 * (p->x[3][1] + p->x[2][0]) - -2 * (p->x[3][3] + p->x[0][0]) - +3 * (p->x[0][1] + p->x[2][3]) - - p->x[0][3]) / 9; - p->y[2][1] = (-4 * p->y[3][0] - +6 * (p->y[3][1] + p->y[2][0]) - -2 * (p->y[3][3] + p->y[0][0]) - +3 * (p->y[0][1] + p->y[2][3]) - - p->y[0][3]) / 9; - p->x[2][2] = (-4 * p->x[3][3] - +6 * (p->x[3][2] + p->x[2][3]) - -2 * (p->x[3][0] + p->x[0][3]) - +3 * (p->x[0][2] + p->x[2][0]) - - p->x[0][0]) / 9; - p->y[2][2] = (-4 * p->y[3][3] - +6 * (p->y[3][2] + p->y[2][3]) - -2 * (p->y[3][0] + p->y[0][3]) - +3 * (p->y[0][2] + p->y[2][0]) - - p->y[0][0]) / 9; - } - } - - shading = new GfxPatchMeshShading(typeA, patchesA, nPatchesA, - funcsA, nFuncsA); - if (!shading->init(res, dict, out, state)) { - delete shading; - return nullptr; - } - return shading; -} - -void GfxPatchMeshShading::getParameterizedColor(double t, GfxColor *color) { - double out[gfxColorMaxComps] = {}; - - for (int j = 0; j < nFuncs; ++j) { - funcs[j]->transform(&t, &out[j]); - } - for (int j = 0; j < gfxColorMaxComps; ++j) { - color->c[j] = dblToCol(out[j]); - } -} - -GfxShading *GfxPatchMeshShading::copy() { - return new GfxPatchMeshShading(this); -} - -//------------------------------------------------------------------------ -// GfxImageColorMap -//------------------------------------------------------------------------ - -GfxImageColorMap::GfxImageColorMap(int bitsA, Object *decode, - GfxColorSpace *colorSpaceA) { - GfxIndexedColorSpace *indexedCS; - GfxSeparationColorSpace *sepCS; - int maxPixel, indexHigh; - Guchar *indexedLookup; - Function *sepFunc; - double x[gfxColorMaxComps]; - double y[gfxColorMaxComps] = {}; - int i, j, k; - double mapped; - GBool useByteLookup; - - ok = gTrue; - useMatte = gFalse; - - // bits per component and color space - bits = bitsA; - maxPixel = (1 << bits) - 1; - colorSpace = colorSpaceA; - - // this is a hack to support 16 bits images, everywhere - // we assume a component fits in 8 bits, with this hack - // we treat 16 bit images as 8 bit ones until it's fixed correctly. - // The hack has another part on ImageStream::getLine - if (maxPixel > 255) maxPixel = 255; - - // initialize - for (k = 0; k < gfxColorMaxComps; ++k) { - lookup[k] = nullptr; - lookup2[k] = nullptr; - } - byte_lookup = nullptr; - - if (unlikely(bits <= 0)) - goto err1; - - // get decode map - if (decode->isNull()) { - nComps = colorSpace->getNComps(); - colorSpace->getDefaultRanges(decodeLow, decodeRange, maxPixel); - } else if (decode->isArray()) { - nComps = decode->arrayGetLength() / 2; - if (nComps < colorSpace->getNComps()) { - goto err1; - } - if (nComps > colorSpace->getNComps()) { - error(errSyntaxWarning, -1, "Too many elements in Decode array"); - nComps = colorSpace->getNComps(); - } - for (i = 0; i < nComps; ++i) { - Object obj = decode->arrayGet(2*i); - if (!obj.isNum()) { - goto err1; - } - decodeLow[i] = obj.getNum(); - obj = decode->arrayGet(2*i+1); - if (!obj.isNum()) { - goto err1; - } - decodeRange[i] = obj.getNum() - decodeLow[i]; - } - } else { - goto err1; - } - - // Construct a lookup table -- this stores pre-computed decoded - // values for each component, i.e., the result of applying the - // decode mapping to each possible image pixel component value. - for (k = 0; k < nComps; ++k) { - lookup[k] = (GfxColorComp *)gmallocn(maxPixel + 1, - sizeof(GfxColorComp)); - for (i = 0; i <= maxPixel; ++i) { - lookup[k][i] = dblToCol(decodeLow[k] + - (i * decodeRange[k]) / maxPixel); - } - } - - // Optimization: for Indexed and Separation color spaces (which have - // only one component), we pre-compute a second lookup table with - // color values - colorSpace2 = nullptr; - nComps2 = 0; - useByteLookup = gFalse; - switch (colorSpace->getMode()) { - case csIndexed: - // Note that indexHigh may not be the same as maxPixel -- - // Distiller will remove unused palette entries, resulting in - // indexHigh < maxPixel. - indexedCS = (GfxIndexedColorSpace *)colorSpace; - colorSpace2 = indexedCS->getBase(); - indexHigh = indexedCS->getIndexHigh(); - nComps2 = colorSpace2->getNComps(); - indexedLookup = indexedCS->getLookup(); - colorSpace2->getDefaultRanges(x, y, indexHigh); - if (colorSpace2->useGetGrayLine() || colorSpace2->useGetRGBLine() || colorSpace2->useGetCMYKLine() || colorSpace2->useGetDeviceNLine()) { - byte_lookup = (Guchar *)gmallocn ((maxPixel + 1), nComps2); - useByteLookup = gTrue; - } - for (k = 0; k < nComps2; ++k) { - lookup2[k] = (GfxColorComp *)gmallocn(maxPixel + 1, - sizeof(GfxColorComp)); - for (i = 0; i <= maxPixel; ++i) { - j = (int)(decodeLow[0] + (i * decodeRange[0]) / maxPixel + 0.5); - if (j < 0) { - j = 0; - } else if (j > indexHigh) { - j = indexHigh; - } - - mapped = x[k] + (indexedLookup[j*nComps2 + k] / 255.0) * y[k]; - lookup2[k][i] = dblToCol(mapped); - if (useByteLookup) - byte_lookup[i * nComps2 + k] = (Guchar) (mapped * 255); - } - } - break; - case csSeparation: - sepCS = (GfxSeparationColorSpace *)colorSpace; - colorSpace2 = sepCS->getAlt(); - nComps2 = colorSpace2->getNComps(); - sepFunc = sepCS->getFunc(); - if (colorSpace2->useGetGrayLine() || colorSpace2->useGetRGBLine() || colorSpace2->useGetCMYKLine() || colorSpace2->useGetDeviceNLine()) { - byte_lookup = (Guchar *)gmallocn ((maxPixel + 1), nComps2); - useByteLookup = gTrue; - } - for (k = 0; k < nComps2; ++k) { - lookup2[k] = (GfxColorComp *)gmallocn(maxPixel + 1, - sizeof(GfxColorComp)); - for (i = 0; i <= maxPixel; ++i) { - x[0] = decodeLow[0] + (i * decodeRange[0]) / maxPixel; - sepFunc->transform(x, y); - lookup2[k][i] = dblToCol(y[k]); - if (useByteLookup) - byte_lookup[i*nComps2 + k] = (Guchar) (y[k] * 255); - } - } - break; - default: - if (colorSpace->useGetGrayLine() || colorSpace->useGetRGBLine() || colorSpace->useGetCMYKLine() || colorSpace->useGetDeviceNLine()) { - byte_lookup = (Guchar *)gmallocn ((maxPixel + 1), nComps); - useByteLookup = gTrue; - } - for (k = 0; k < nComps; ++k) { - lookup2[k] = (GfxColorComp *)gmallocn(maxPixel + 1, - sizeof(GfxColorComp)); - for (i = 0; i <= maxPixel; ++i) { - mapped = decodeLow[k] + (i * decodeRange[k]) / maxPixel; - lookup2[k][i] = dblToCol(mapped); - if (useByteLookup) { - int byte; - - byte = (int) (mapped * 255.0 + 0.5); - if (byte < 0) - byte = 0; - else if (byte > 255) - byte = 255; - byte_lookup[i * nComps + k] = byte; - } - } - } - } - - return; - - err1: - ok = gFalse; -} - -GfxImageColorMap::GfxImageColorMap(GfxImageColorMap *colorMap) { - int n, i, k; - - colorSpace = colorMap->colorSpace->copy(); - bits = colorMap->bits; - nComps = colorMap->nComps; - nComps2 = colorMap->nComps2; - useMatte = colorMap->useMatte; - matteColor = colorMap->matteColor; - colorSpace2 = nullptr; - for (k = 0; k < gfxColorMaxComps; ++k) { - lookup[k] = nullptr; - } - n = 1 << bits; - if (colorSpace->getMode() == csIndexed) { - colorSpace2 = ((GfxIndexedColorSpace *)colorSpace)->getBase(); - for (k = 0; k < nComps2; ++k) { - lookup[k] = (GfxColorComp *)gmallocn(n, sizeof(GfxColorComp)); - memcpy(lookup[k], colorMap->lookup[k], n * sizeof(GfxColorComp)); - } - } else if (colorSpace->getMode() == csSeparation) { - colorSpace2 = ((GfxSeparationColorSpace *)colorSpace)->getAlt(); - for (k = 0; k < nComps2; ++k) { - lookup[k] = (GfxColorComp *)gmallocn(n, sizeof(GfxColorComp)); - memcpy(lookup[k], colorMap->lookup[k], n * sizeof(GfxColorComp)); - } - } else { - for (k = 0; k < nComps; ++k) { - lookup[k] = (GfxColorComp *)gmallocn(n, sizeof(GfxColorComp)); - memcpy(lookup[k], colorMap->lookup[k], n * sizeof(GfxColorComp)); - } - } - if (colorMap->byte_lookup) { - int nc = colorSpace2 ? nComps2 : nComps; - - byte_lookup = (Guchar *)gmallocn (n, nc); - memcpy(byte_lookup, colorMap->byte_lookup, n * nc); - } - for (i = 0; i < nComps; ++i) { - decodeLow[i] = colorMap->decodeLow[i]; - decodeRange[i] = colorMap->decodeRange[i]; - } - ok = gTrue; -} - -GfxImageColorMap::~GfxImageColorMap() { - int i; - - delete colorSpace; - for (i = 0; i < gfxColorMaxComps; ++i) { - gfree(lookup[i]); - gfree(lookup2[i]); - } - gfree(byte_lookup); -} - -void GfxImageColorMap::getGray(Guchar *x, GfxGray *gray) { - GfxColor color; - int i; - - if (colorSpace2) { - for (i = 0; i < nComps2; ++i) { - color.c[i] = lookup2[i][x[0]]; - } - colorSpace2->getGray(&color, gray); - } else { - for (i = 0; i < nComps; ++i) { - color.c[i] = lookup2[i][x[i]]; - } - colorSpace->getGray(&color, gray); - } -} - -void GfxImageColorMap::getRGB(Guchar *x, GfxRGB *rgb) { - GfxColor color; - int i; - - if (colorSpace2) { - for (i = 0; i < nComps2; ++i) { - color.c[i] = lookup2[i][x[0]]; - } - colorSpace2->getRGB(&color, rgb); - } else { - for (i = 0; i < nComps; ++i) { - color.c[i] = lookup2[i][x[i]]; - } - colorSpace->getRGB(&color, rgb); - } -} - -void GfxImageColorMap::getGrayLine(Guchar *in, Guchar *out, int length) { - int i, j; - Guchar *inp, *tmp_line; - - if ((colorSpace2 && !colorSpace2->useGetGrayLine ()) || - (!colorSpace2 && !colorSpace->useGetGrayLine ())) { - GfxGray gray; - - inp = in; - for (i = 0; i < length; i++) { - getGray (inp, &gray); - out[i] = colToByte(gray); - inp += nComps; - } - return; - } - - switch (colorSpace->getMode()) { - case csIndexed: - case csSeparation: - tmp_line = (Guchar *) gmallocn (length, nComps2); - for (i = 0; i < length; i++) { - for (j = 0; j < nComps2; j++) { - tmp_line[i * nComps2 + j] = byte_lookup[in[i] * nComps2 + j]; - } - } - colorSpace2->getGrayLine(tmp_line, out, length); - gfree (tmp_line); - break; - - default: - inp = in; - for (j = 0; j < length; j++) - for (i = 0; i < nComps; i++) { - *inp = byte_lookup[*inp * nComps + i]; - inp++; - } - colorSpace->getGrayLine(in, out, length); - break; - } - -} - -void GfxImageColorMap::getRGBLine(Guchar *in, unsigned int *out, int length) { - int i, j; - Guchar *inp, *tmp_line; - - if (!useRGBLine()) { - GfxRGB rgb; - - inp = in; - for (i = 0; i < length; i++) { - getRGB (inp, &rgb); - out[i] = - ((int) colToByte(rgb.r) << 16) | - ((int) colToByte(rgb.g) << 8) | - ((int) colToByte(rgb.b) << 0); - inp += nComps; - } - return; - } - - switch (colorSpace->getMode()) { - case csIndexed: - case csSeparation: - tmp_line = (Guchar *) gmallocn (length, nComps2); - for (i = 0; i < length; i++) { - for (j = 0; j < nComps2; j++) { - tmp_line[i * nComps2 + j] = byte_lookup[in[i] * nComps2 + j]; - } - } - colorSpace2->getRGBLine(tmp_line, out, length); - gfree (tmp_line); - break; - - default: - inp = in; - for (j = 0; j < length; j++) - for (i = 0; i < nComps; i++) { - *inp = byte_lookup[*inp * nComps + i]; - inp++; - } - colorSpace->getRGBLine(in, out, length); - break; - } - -} - -void GfxImageColorMap::getRGBLine(Guchar *in, Guchar *out, int length) { - int i, j; - Guchar *inp, *tmp_line; - - if (!useRGBLine()) { - GfxRGB rgb; - - inp = in; - for (i = 0; i < length; i++) { - getRGB (inp, &rgb); - *out++ = colToByte(rgb.r); - *out++ = colToByte(rgb.g); - *out++ = colToByte(rgb.b); - inp += nComps; - } - return; - } - - switch (colorSpace->getMode()) { - case csIndexed: - case csSeparation: - tmp_line = (Guchar *) gmallocn (length, nComps2); - for (i = 0; i < length; i++) { - for (j = 0; j < nComps2; j++) { - tmp_line[i * nComps2 + j] = byte_lookup[in[i] * nComps2 + j]; - } - } - colorSpace2->getRGBLine(tmp_line, out, length); - gfree (tmp_line); - break; - - default: - inp = in; - for (j = 0; j < length; j++) - for (i = 0; i < nComps; i++) { - *inp = byte_lookup[*inp * nComps + i]; - inp++; - } - colorSpace->getRGBLine(in, out, length); - break; - } - -} - -void GfxImageColorMap::getRGBXLine(Guchar *in, Guchar *out, int length) { - int i, j; - Guchar *inp, *tmp_line; - - if (!useRGBLine()) { - GfxRGB rgb; - - inp = in; - for (i = 0; i < length; i++) { - getRGB (inp, &rgb); - *out++ = colToByte(rgb.r); - *out++ = colToByte(rgb.g); - *out++ = colToByte(rgb.b); - *out++ = 255; - inp += nComps; - } - return; - } - - switch (colorSpace->getMode()) { - case csIndexed: - case csSeparation: - tmp_line = (Guchar *) gmallocn (length, nComps2); - for (i = 0; i < length; i++) { - for (j = 0; j < nComps2; j++) { - tmp_line[i * nComps2 + j] = byte_lookup[in[i] * nComps2 + j]; - } - } - colorSpace2->getRGBXLine(tmp_line, out, length); - gfree (tmp_line); - break; - - default: - inp = in; - for (j = 0; j < length; j++) - for (i = 0; i < nComps; i++) { - *inp = byte_lookup[*inp * nComps + i]; - inp++; - } - colorSpace->getRGBXLine(in, out, length); - break; - } - -} - -void GfxImageColorMap::getCMYKLine(Guchar *in, Guchar *out, int length) { - int i, j; - Guchar *inp, *tmp_line; - - if (!useCMYKLine()) { - GfxCMYK cmyk; - - inp = in; - for (i = 0; i < length; i++) { - getCMYK (inp, &cmyk); - *out++ = colToByte(cmyk.c); - *out++ = colToByte(cmyk.m); - *out++ = colToByte(cmyk.y); - *out++ = colToByte(cmyk.k); - inp += nComps; - } - return; - } - - switch (colorSpace->getMode()) { - case csIndexed: - case csSeparation: - tmp_line = (Guchar *) gmallocn (length, nComps2); - for (i = 0; i < length; i++) { - for (j = 0; j < nComps2; j++) { - tmp_line[i * nComps2 + j] = byte_lookup[in[i] * nComps2 + j]; - } - } - colorSpace2->getCMYKLine(tmp_line, out, length); - gfree (tmp_line); - break; - - default: - inp = in; - for (j = 0; j < length; j++) - for (i = 0; i < nComps; i++) { - *inp = byte_lookup[*inp * nComps + i]; - inp++; - } - colorSpace->getCMYKLine(in, out, length); - break; - } - -} - -void GfxImageColorMap::getDeviceNLine(Guchar *in, Guchar *out, int length) { - Guchar *inp, *tmp_line; - - if (!useDeviceNLine()) { - GfxColor deviceN; - - inp = in; - for (int i = 0; i < length; i++) { - getDeviceN (inp, &deviceN); - for (int j = 0; j < SPOT_NCOMPS+4; j++) - *out++ = deviceN.c[j]; - inp += nComps; - } - return; - } - - switch (colorSpace->getMode()) { - case csIndexed: - case csSeparation: - tmp_line = (Guchar *) gmallocn (length, nComps2); - for (int i = 0; i < length; i++) { - for (int j = 0; j < nComps2; j++) { - tmp_line[i * nComps2 + j] = byte_lookup[in[i] * nComps2 + j]; - } - } - colorSpace2->getDeviceNLine(tmp_line, out, length); - gfree (tmp_line); - break; - - default: - inp = in; - for (int j = 0; j < length; j++) - for (int i = 0; i < nComps; i++) { - *inp = byte_lookup[*inp * nComps + i]; - inp++; - } - colorSpace->getDeviceNLine(in, out, length); - break; - } - -} - -void GfxImageColorMap::getCMYK(Guchar *x, GfxCMYK *cmyk) { - GfxColor color; - int i; - - if (colorSpace2) { - for (i = 0; i < nComps2; ++i) { - color.c[i] = lookup2[i][x[0]]; - } - colorSpace2->getCMYK(&color, cmyk); - } else { - for (i = 0; i < nComps; ++i) { - color.c[i] = lookup[i][x[i]]; - } - colorSpace->getCMYK(&color, cmyk); - } -} - -void GfxImageColorMap::getDeviceN(Guchar *x, GfxColor *deviceN) { - GfxColor color; - int i; - - if (colorSpace2) { - for (i = 0; i < nComps2; ++i) { - color.c[i] = lookup2[i][x[0]]; - } - colorSpace2->getDeviceN(&color, deviceN); - } else { - for (i = 0; i < nComps; ++i) { - color.c[i] = lookup[i][x[i]]; - } - colorSpace->getDeviceN(&color, deviceN); - } -} - -void GfxImageColorMap::getColor(Guchar *x, GfxColor *color) { - int maxPixel, i; - - maxPixel = (1 << bits) - 1; - for (i = 0; i < nComps; ++i) { - color->c[i] = dblToCol(decodeLow[i] + (x[i] * decodeRange[i]) / maxPixel); - } -} - -//------------------------------------------------------------------------ -// GfxSubpath and GfxPath -//------------------------------------------------------------------------ - -GfxSubpath::GfxSubpath(double x1, double y1) { - size = 16; - x = (double *)gmallocn(size, sizeof(double)); - y = (double *)gmallocn(size, sizeof(double)); - curve = (GBool *)gmallocn(size, sizeof(GBool)); - n = 1; - x[0] = x1; - y[0] = y1; - curve[0] = gFalse; - closed = gFalse; -} - -GfxSubpath::~GfxSubpath() { - gfree(x); - gfree(y); - gfree(curve); -} - -// Used for copy(). -GfxSubpath::GfxSubpath(GfxSubpath *subpath) { - size = subpath->size; - n = subpath->n; - x = (double *)gmallocn(size, sizeof(double)); - y = (double *)gmallocn(size, sizeof(double)); - curve = (GBool *)gmallocn(size, sizeof(GBool)); - memcpy(x, subpath->x, n * sizeof(double)); - memcpy(y, subpath->y, n * sizeof(double)); - memcpy(curve, subpath->curve, n * sizeof(GBool)); - closed = subpath->closed; -} - -void GfxSubpath::lineTo(double x1, double y1) { - if (n >= size) { - size *= 2; - x = (double *)greallocn(x, size, sizeof(double)); - y = (double *)greallocn(y, size, sizeof(double)); - curve = (GBool *)greallocn(curve, size, sizeof(GBool)); - } - x[n] = x1; - y[n] = y1; - curve[n] = gFalse; - ++n; -} - -void GfxSubpath::curveTo(double x1, double y1, double x2, double y2, - double x3, double y3) { - if (n+3 > size) { - size *= 2; - x = (double *)greallocn(x, size, sizeof(double)); - y = (double *)greallocn(y, size, sizeof(double)); - curve = (GBool *)greallocn(curve, size, sizeof(GBool)); - } - x[n] = x1; - y[n] = y1; - x[n+1] = x2; - y[n+1] = y2; - x[n+2] = x3; - y[n+2] = y3; - curve[n] = curve[n+1] = gTrue; - curve[n+2] = gFalse; - n += 3; -} - -void GfxSubpath::close() { - if (x[n-1] != x[0] || y[n-1] != y[0]) { - lineTo(x[0], y[0]); - } - closed = gTrue; -} - -void GfxSubpath::offset(double dx, double dy) { - int i; - - for (i = 0; i < n; ++i) { - x[i] += dx; - y[i] += dy; - } -} - -GfxPath::GfxPath() { - justMoved = gFalse; - size = 16; - n = 0; - firstX = firstY = 0; - subpaths = (GfxSubpath **)gmallocn(size, sizeof(GfxSubpath *)); -} - -GfxPath::~GfxPath() { - int i; - - for (i = 0; i < n; ++i) - delete subpaths[i]; - gfree(subpaths); -} - -// Used for copy(). -GfxPath::GfxPath(GBool justMoved1, double firstX1, double firstY1, - GfxSubpath **subpaths1, int n1, int size1) { - int i; - - justMoved = justMoved1; - firstX = firstX1; - firstY = firstY1; - size = size1; - n = n1; - subpaths = (GfxSubpath **)gmallocn(size, sizeof(GfxSubpath *)); - for (i = 0; i < n; ++i) - subpaths[i] = subpaths1[i]->copy(); -} - -void GfxPath::moveTo(double x, double y) { - justMoved = gTrue; - firstX = x; - firstY = y; -} - -void GfxPath::lineTo(double x, double y) { - if (justMoved || (n > 0 && subpaths[n-1]->isClosed())) { - if (n >= size) { - size *= 2; - subpaths = (GfxSubpath **) - greallocn(subpaths, size, sizeof(GfxSubpath *)); - } - if (justMoved) { - subpaths[n] = new GfxSubpath(firstX, firstY); - } else { - subpaths[n] = new GfxSubpath(subpaths[n-1]->getLastX(), - subpaths[n-1]->getLastY()); - } - ++n; - justMoved = gFalse; - } - subpaths[n-1]->lineTo(x, y); -} - -void GfxPath::curveTo(double x1, double y1, double x2, double y2, - double x3, double y3) { - if (justMoved || (n > 0 && subpaths[n-1]->isClosed())) { - if (n >= size) { - size *= 2; - subpaths = (GfxSubpath **) - greallocn(subpaths, size, sizeof(GfxSubpath *)); - } - if (justMoved) { - subpaths[n] = new GfxSubpath(firstX, firstY); - } else { - subpaths[n] = new GfxSubpath(subpaths[n-1]->getLastX(), - subpaths[n-1]->getLastY()); - } - ++n; - justMoved = gFalse; - } - subpaths[n-1]->curveTo(x1, y1, x2, y2, x3, y3); -} - -void GfxPath::close() { - // this is necessary to handle the pathological case of - // moveto/closepath/clip, which defines an empty clipping region - if (justMoved) { - if (n >= size) { - size *= 2; - subpaths = (GfxSubpath **) - greallocn(subpaths, size, sizeof(GfxSubpath *)); - } - subpaths[n] = new GfxSubpath(firstX, firstY); - ++n; - justMoved = gFalse; - } - subpaths[n-1]->close(); -} - -void GfxPath::append(GfxPath *path) { - int i; - - if (n + path->n > size) { - size = n + path->n; - subpaths = (GfxSubpath **) - greallocn(subpaths, size, sizeof(GfxSubpath *)); - } - for (i = 0; i < path->n; ++i) { - subpaths[n++] = path->subpaths[i]->copy(); - } - justMoved = gFalse; -} - -void GfxPath::offset(double dx, double dy) { - int i; - - for (i = 0; i < n; ++i) { - subpaths[i]->offset(dx, dy); - } -} - -//------------------------------------------------------------------------ -// -//------------------------------------------------------------------------ -GfxState::ReusablePathIterator::ReusablePathIterator(GfxPath *pathA) - : path(pathA), - subPathOff(0), - coordOff(0), - numCoords(0), - curSubPath(nullptr) -{ - if( path->getNumSubpaths() ) { - curSubPath = path->getSubpath(subPathOff); - numCoords = curSubPath->getNumPoints(); - } -} - -bool GfxState::ReusablePathIterator::isEnd() const { - return coordOff >= numCoords; -} - -void GfxState::ReusablePathIterator::next() { - ++coordOff; - if (coordOff == numCoords) { - ++subPathOff; - if (subPathOff < path->getNumSubpaths()) { - coordOff = 0; - curSubPath = path->getSubpath(subPathOff); - numCoords = curSubPath->getNumPoints(); - } - } -} - -void GfxState::ReusablePathIterator::setCoord(double x, double y) { - curSubPath->setX(coordOff, x); - curSubPath->setY(coordOff, y); -} - -void GfxState::ReusablePathIterator::reset() { - coordOff = 0; - subPathOff = 0; - curSubPath = path->getSubpath(0); - numCoords = curSubPath->getNumPoints(); -} - -GfxState::GfxState(double hDPIA, double vDPIA, PDFRectangle *pageBox, - int rotateA, GBool upsideDown) { - double kx, ky; - - hDPI = hDPIA; - vDPI = vDPIA; - rotate = rotateA; - px1 = pageBox->x1; - py1 = pageBox->y1; - px2 = pageBox->x2; - py2 = pageBox->y2; - kx = hDPI / 72.0; - ky = vDPI / 72.0; - if (rotate == 90) { - ctm[0] = 0; - ctm[1] = upsideDown ? ky : -ky; - ctm[2] = kx; - ctm[3] = 0; - ctm[4] = -kx * py1; - ctm[5] = ky * (upsideDown ? -px1 : px2); - pageWidth = kx * (py2 - py1); - pageHeight = ky * (px2 - px1); - } else if (rotate == 180) { - ctm[0] = -kx; - ctm[1] = 0; - ctm[2] = 0; - ctm[3] = upsideDown ? ky : -ky; - ctm[4] = kx * px2; - ctm[5] = ky * (upsideDown ? -py1 : py2); - pageWidth = kx * (px2 - px1); - pageHeight = ky * (py2 - py1); - } else if (rotate == 270) { - ctm[0] = 0; - ctm[1] = upsideDown ? -ky : ky; - ctm[2] = -kx; - ctm[3] = 0; - ctm[4] = kx * py2; - ctm[5] = ky * (upsideDown ? px2 : -px1); - pageWidth = kx * (py2 - py1); - pageHeight = ky * (px2 - px1); - } else { - ctm[0] = kx; - ctm[1] = 0; - ctm[2] = 0; - ctm[3] = upsideDown ? -ky : ky; - ctm[4] = -kx * px1; - ctm[5] = ky * (upsideDown ? py2 : -py1); - pageWidth = kx * (px2 - px1); - pageHeight = ky * (py2 - py1); - } - - fillColorSpace = new GfxDeviceGrayColorSpace(); - strokeColorSpace = new GfxDeviceGrayColorSpace(); - fillColor.c[0] = 0; - strokeColor.c[0] = 0; - fillPattern = nullptr; - strokePattern = nullptr; - blendMode = gfxBlendNormal; - fillOpacity = 1; - strokeOpacity = 1; - fillOverprint = gFalse; - strokeOverprint = gFalse; - overprintMode = 0; - transfer[0] = transfer[1] = transfer[2] = transfer[3] = nullptr; - - lineWidth = 1; - lineDash = nullptr; - lineDashLength = 0; - lineDashStart = 0; - flatness = 1; - lineJoin = 0; - lineCap = 0; - miterLimit = 10; - strokeAdjust = gFalse; - alphaIsShape = gFalse; - textKnockout = gFalse; - - font = nullptr; - fontSize = 0; - textMat[0] = 1; textMat[1] = 0; - textMat[2] = 0; textMat[3] = 1; - textMat[4] = 0; textMat[5] = 0; - charSpace = 0; - wordSpace = 0; - horizScaling = 1; - leading = 0; - rise = 0; - render = 0; - - path = new GfxPath(); - curX = curY = 0; - lineX = lineY = 0; - - clipXMin = 0; - clipYMin = 0; - clipXMax = pageWidth; - clipYMax = pageHeight; - - renderingIntent[0] = 0; - - saved = nullptr; -#ifdef USE_CMS - GfxColorSpace::setupColorProfiles(); - XYZ2DisplayTransformRelCol = nullptr; - XYZ2DisplayTransformAbsCol = nullptr; - XYZ2DisplayTransformSat = nullptr; - XYZ2DisplayTransformPerc = nullptr; - localDisplayProfile = nullptr; - displayProfileRef = 0; -#endif -} - -GfxState::~GfxState() { - int i; - - if (fillColorSpace) { - delete fillColorSpace; - } - if (strokeColorSpace) { - delete strokeColorSpace; - } - if (fillPattern) { - delete fillPattern; - } - if (strokePattern) { - delete strokePattern; - } - for (i = 0; i < 4; ++i) { - if (transfer[i]) { - delete transfer[i]; - } - } - gfree(lineDash); - if (path) { - // this gets set to NULL by restore() - delete path; - } - if (font) { - font->decRefCnt(); - } -#ifdef USE_CMS - if (XYZ2DisplayTransformRelCol) { - if (XYZ2DisplayTransformRelCol->unref() == 0) - delete XYZ2DisplayTransformRelCol; - } - if (XYZ2DisplayTransformAbsCol) { - if (XYZ2DisplayTransformAbsCol->unref() == 0) - delete XYZ2DisplayTransformAbsCol; - } - if (XYZ2DisplayTransformSat) { - if (XYZ2DisplayTransformSat->unref() == 0) - delete XYZ2DisplayTransformSat; - } - if (XYZ2DisplayTransformPerc) { - if (XYZ2DisplayTransformPerc->unref() == 0) - delete XYZ2DisplayTransformPerc; - } - if (--displayProfileRef == 0 && localDisplayProfile != nullptr) { - cmsCloseProfile(localDisplayProfile); - } -#endif -} - -// Used for copy(); -GfxState::GfxState(GfxState *state, GBool copyPath) { - int i; - - memcpy(this, state, sizeof(GfxState)); - if (fillColorSpace) { - fillColorSpace = state->fillColorSpace->copy(); - } - if (strokeColorSpace) { - strokeColorSpace = state->strokeColorSpace->copy(); - } - if (fillPattern) { - fillPattern = state->fillPattern->copy(); - } - if (strokePattern) { - strokePattern = state->strokePattern->copy(); - } - for (i = 0; i < 4; ++i) { - if (transfer[i]) { - transfer[i] = state->transfer[i]->copy(); - } - } - if (lineDashLength > 0) { - lineDash = (double *)gmallocn(lineDashLength, sizeof(double)); - memcpy(lineDash, state->lineDash, lineDashLength * sizeof(double)); - } - if (font) - font->incRefCnt(); - - if (copyPath) { - path = state->path->copy(); - } - saved = nullptr; -#ifdef USE_CMS - if (XYZ2DisplayTransformRelCol) { - XYZ2DisplayTransformRelCol->ref(); - } - if (XYZ2DisplayTransformAbsCol) { - XYZ2DisplayTransformAbsCol->ref(); - } - if (XYZ2DisplayTransformSat) { - XYZ2DisplayTransformSat->ref(); - } - if (XYZ2DisplayTransformPerc) { - XYZ2DisplayTransformPerc->ref(); - } - if (localDisplayProfile) { - displayProfileRef++; - } -#endif -} - -#ifdef USE_CMS -void GfxState::setDisplayProfile(cmsHPROFILE localDisplayProfileA) { - if (localDisplayProfile != nullptr) { - cmsCloseProfile(localDisplayProfile); - } - localDisplayProfile = localDisplayProfileA; - if (localDisplayProfileA != nullptr) { - cmsHTRANSFORM transform; - unsigned int nChannels; - unsigned int localDisplayPixelType; - - localDisplayPixelType = getCMSColorSpaceType(cmsGetColorSpace(localDisplayProfile)); - nChannels = getCMSNChannels(cmsGetColorSpace(localDisplayProfile)); - displayProfileRef = 1; - // create transform from XYZ - cmsHPROFILE XYZProfile = cmsCreateXYZProfile(); - if ((transform = cmsCreateTransform(XYZProfile, TYPE_XYZ_DBL, - localDisplayProfile, - COLORSPACE_SH(localDisplayPixelType) | - CHANNELS_SH(nChannels) | BYTES_SH(1), - INTENT_RELATIVE_COLORIMETRIC,LCMS_FLAGS)) == nullptr) { - error(errSyntaxWarning, -1, "Can't create Lab transform"); - } else { - XYZ2DisplayTransformRelCol = new GfxColorTransform(transform, INTENT_RELATIVE_COLORIMETRIC, PT_XYZ, localDisplayPixelType); - } - if ((transform = cmsCreateTransform(XYZProfile, TYPE_XYZ_DBL, - localDisplayProfile, - COLORSPACE_SH(localDisplayPixelType) | - CHANNELS_SH(nChannels) | BYTES_SH(1), - INTENT_ABSOLUTE_COLORIMETRIC,LCMS_FLAGS)) == nullptr) { - error(errSyntaxWarning, -1, "Can't create Lab transform"); - } else { - XYZ2DisplayTransformAbsCol = new GfxColorTransform(transform, INTENT_ABSOLUTE_COLORIMETRIC, PT_XYZ, localDisplayPixelType); - } - if ((transform = cmsCreateTransform(XYZProfile, TYPE_XYZ_DBL, - localDisplayProfile, - COLORSPACE_SH(localDisplayPixelType) | - CHANNELS_SH(nChannels) | BYTES_SH(1), - INTENT_SATURATION,LCMS_FLAGS)) == nullptr) { - error(errSyntaxWarning, -1, "Can't create Lab transform"); - } else { - XYZ2DisplayTransformSat = new GfxColorTransform(transform, INTENT_SATURATION, PT_XYZ, localDisplayPixelType); - } - if ((transform = cmsCreateTransform(XYZProfile, TYPE_XYZ_DBL, - localDisplayProfile, - COLORSPACE_SH(localDisplayPixelType) | - CHANNELS_SH(nChannels) | BYTES_SH(1), - INTENT_PERCEPTUAL,LCMS_FLAGS)) == nullptr) { - error(errSyntaxWarning, -1, "Can't create Lab transform"); - } else { - XYZ2DisplayTransformPerc = new GfxColorTransform(transform, INTENT_PERCEPTUAL, PT_XYZ, localDisplayPixelType); - } - cmsCloseProfile(XYZProfile); - } -} - -GfxColorTransform *GfxState::getXYZ2DisplayTransform() { - GfxColorTransform *transform; - - transform = XYZ2DisplayTransformRelCol; - if (strcmp(renderingIntent, "AbsoluteColorimetric") == 0) { - transform = XYZ2DisplayTransformAbsCol; - } else if (strcmp(renderingIntent, "Saturation") == 0) { - transform = XYZ2DisplayTransformSat; - } else if (strcmp(renderingIntent, "Perceptual") == 0) { - transform = XYZ2DisplayTransformPerc; - } - if (transform == nullptr) { - transform = XYZ2DisplayTransform; - } - return transform; -} - -#endif - -void GfxState::setPath(GfxPath *pathA) { - delete path; - path = pathA; -} - -void GfxState::getUserClipBBox(double *xMin, double *yMin, - double *xMax, double *yMax) { - double ictm[6]; - double xMin1, yMin1, xMax1, yMax1, tx, ty; - - // invert the CTM - const double det_denominator = (ctm[0] * ctm[3] - ctm[1] * ctm[2]); - if (unlikely(det_denominator == 0)) { - *xMin = 0; - *yMin = 0; - *xMax = 0; - *yMax = 0; - return; - } - const double det = 1 / det_denominator; - ictm[0] = ctm[3] * det; - ictm[1] = -ctm[1] * det; - ictm[2] = -ctm[2] * det; - ictm[3] = ctm[0] * det; - ictm[4] = (ctm[2] * ctm[5] - ctm[3] * ctm[4]) * det; - ictm[5] = (ctm[1] * ctm[4] - ctm[0] * ctm[5]) * det; - - // transform all four corners of the clip bbox; find the min and max - // x and y values - xMin1 = xMax1 = clipXMin * ictm[0] + clipYMin * ictm[2] + ictm[4]; - yMin1 = yMax1 = clipXMin * ictm[1] + clipYMin * ictm[3] + ictm[5]; - tx = clipXMin * ictm[0] + clipYMax * ictm[2] + ictm[4]; - ty = clipXMin * ictm[1] + clipYMax * ictm[3] + ictm[5]; - if (tx < xMin1) { - xMin1 = tx; - } else if (tx > xMax1) { - xMax1 = tx; - } - if (ty < yMin1) { - yMin1 = ty; - } else if (ty > yMax1) { - yMax1 = ty; - } - tx = clipXMax * ictm[0] + clipYMin * ictm[2] + ictm[4]; - ty = clipXMax * ictm[1] + clipYMin * ictm[3] + ictm[5]; - if (tx < xMin1) { - xMin1 = tx; - } else if (tx > xMax1) { - xMax1 = tx; - } - if (ty < yMin1) { - yMin1 = ty; - } else if (ty > yMax1) { - yMax1 = ty; - } - tx = clipXMax * ictm[0] + clipYMax * ictm[2] + ictm[4]; - ty = clipXMax * ictm[1] + clipYMax * ictm[3] + ictm[5]; - if (tx < xMin1) { - xMin1 = tx; - } else if (tx > xMax1) { - xMax1 = tx; - } - if (ty < yMin1) { - yMin1 = ty; - } else if (ty > yMax1) { - yMax1 = ty; - } - - *xMin = xMin1; - *yMin = yMin1; - *xMax = xMax1; - *yMax = yMax1; -} - -double GfxState::transformWidth(double w) { - double x, y; - - x = ctm[0] + ctm[2]; - y = ctm[1] + ctm[3]; - return w * sqrt(0.5 * (x * x + y * y)); -} - -double GfxState::getTransformedFontSize() { - double x1, y1, x2, y2; - - x1 = textMat[2] * fontSize; - y1 = textMat[3] * fontSize; - x2 = ctm[0] * x1 + ctm[2] * y1; - y2 = ctm[1] * x1 + ctm[3] * y1; - return sqrt(x2 * x2 + y2 * y2); -} - -void GfxState::getFontTransMat(double *m11, double *m12, - double *m21, double *m22) { - *m11 = (textMat[0] * ctm[0] + textMat[1] * ctm[2]) * fontSize; - *m12 = (textMat[0] * ctm[1] + textMat[1] * ctm[3]) * fontSize; - *m21 = (textMat[2] * ctm[0] + textMat[3] * ctm[2]) * fontSize; - *m22 = (textMat[2] * ctm[1] + textMat[3] * ctm[3]) * fontSize; -} - -void GfxState::setCTM(double a, double b, double c, - double d, double e, double f) { - ctm[0] = a; - ctm[1] = b; - ctm[2] = c; - ctm[3] = d; - ctm[4] = e; - ctm[5] = f; -} - -void GfxState::concatCTM(double a, double b, double c, - double d, double e, double f) { - double a1 = ctm[0]; - double b1 = ctm[1]; - double c1 = ctm[2]; - double d1 = ctm[3]; - - ctm[0] = a * a1 + b * c1; - ctm[1] = a * b1 + b * d1; - ctm[2] = c * a1 + d * c1; - ctm[3] = c * b1 + d * d1; - ctm[4] = e * a1 + f * c1 + ctm[4]; - ctm[5] = e * b1 + f * d1 + ctm[5]; -} - -void GfxState::shiftCTMAndClip(double tx, double ty) { - ctm[4] += tx; - ctm[5] += ty; - clipXMin += tx; - clipYMin += ty; - clipXMax += tx; - clipYMax += ty; -} - -void GfxState::setFillColorSpace(GfxColorSpace *colorSpace) { - if (fillColorSpace) { - delete fillColorSpace; - } - fillColorSpace = colorSpace; -} - -void GfxState::setStrokeColorSpace(GfxColorSpace *colorSpace) { - if (strokeColorSpace) { - delete strokeColorSpace; - } - strokeColorSpace = colorSpace; -} - -void GfxState::setFillPattern(GfxPattern *pattern) { - if (fillPattern) { - delete fillPattern; - } - fillPattern = pattern; -} - -void GfxState::setStrokePattern(GfxPattern *pattern) { - if (strokePattern) { - delete strokePattern; - } - strokePattern = pattern; -} - -void GfxState::setFont(GfxFont *fontA, double fontSizeA) { - if (font) - font->decRefCnt(); - - font = fontA; - fontSize = fontSizeA; -} - -void GfxState::setTransfer(Function **funcs) { - int i; - - for (i = 0; i < 4; ++i) { - if (transfer[i]) { - delete transfer[i]; - } - transfer[i] = funcs[i]; - } -} - -void GfxState::setLineDash(double *dash, int length, double start) { - if (lineDash) - gfree(lineDash); - lineDash = dash; - lineDashLength = length; - lineDashStart = start; -} - -void GfxState::clearPath() { - delete path; - path = new GfxPath(); -} - -void GfxState::clip() { - double xMin, yMin, xMax, yMax, x, y; - GfxSubpath *subpath; - int i, j; - - xMin = xMax = yMin = yMax = 0; // make gcc happy - for (i = 0; i < path->getNumSubpaths(); ++i) { - subpath = path->getSubpath(i); - for (j = 0; j < subpath->getNumPoints(); ++j) { - transform(subpath->getX(j), subpath->getY(j), &x, &y); - if (i == 0 && j == 0) { - xMin = xMax = x; - yMin = yMax = y; - } else { - if (x < xMin) { - xMin = x; - } else if (x > xMax) { - xMax = x; - } - if (y < yMin) { - yMin = y; - } else if (y > yMax) { - yMax = y; - } - } - } - } - if (xMin > clipXMin) { - clipXMin = xMin; - } - if (yMin > clipYMin) { - clipYMin = yMin; - } - if (xMax < clipXMax) { - clipXMax = xMax; - } - if (yMax < clipYMax) { - clipYMax = yMax; - } -} - -void GfxState::clipToStrokePath() { - double xMin, yMin, xMax, yMax, x, y, t0, t1; - GfxSubpath *subpath; - int i, j; - - xMin = xMax = yMin = yMax = 0; // make gcc happy - for (i = 0; i < path->getNumSubpaths(); ++i) { - subpath = path->getSubpath(i); - for (j = 0; j < subpath->getNumPoints(); ++j) { - transform(subpath->getX(j), subpath->getY(j), &x, &y); - if (i == 0 && j == 0) { - xMin = xMax = x; - yMin = yMax = y; - } else { - if (x < xMin) { - xMin = x; - } else if (x > xMax) { - xMax = x; - } - if (y < yMin) { - yMin = y; - } else if (y > yMax) { - yMax = y; - } - } - } - } - - // allow for the line width - //~ miter joins can extend farther than this - t0 = fabs(ctm[0]); - t1 = fabs(ctm[2]); - if (t0 > t1) { - xMin -= 0.5 * lineWidth * t0; - xMax += 0.5 * lineWidth * t0; - } else { - xMin -= 0.5 * lineWidth * t1; - xMax += 0.5 * lineWidth * t1; - } - t0 = fabs(ctm[0]); - t1 = fabs(ctm[3]); - if (t0 > t1) { - yMin -= 0.5 * lineWidth * t0; - yMax += 0.5 * lineWidth * t0; - } else { - yMin -= 0.5 * lineWidth * t1; - yMax += 0.5 * lineWidth * t1; - } - - if (xMin > clipXMin) { - clipXMin = xMin; - } - if (yMin > clipYMin) { - clipYMin = yMin; - } - if (xMax < clipXMax) { - clipXMax = xMax; - } - if (yMax < clipYMax) { - clipYMax = yMax; - } -} - -void GfxState::clipToRect(double xMin, double yMin, double xMax, double yMax) { - double x, y, xMin1, yMin1, xMax1, yMax1; - - transform(xMin, yMin, &x, &y); - xMin1 = xMax1 = x; - yMin1 = yMax1 = y; - transform(xMax, yMin, &x, &y); - if (x < xMin1) { - xMin1 = x; - } else if (x > xMax1) { - xMax1 = x; - } - if (y < yMin1) { - yMin1 = y; - } else if (y > yMax1) { - yMax1 = y; - } - transform(xMax, yMax, &x, &y); - if (x < xMin1) { - xMin1 = x; - } else if (x > xMax1) { - xMax1 = x; - } - if (y < yMin1) { - yMin1 = y; - } else if (y > yMax1) { - yMax1 = y; - } - transform(xMin, yMax, &x, &y); - if (x < xMin1) { - xMin1 = x; - } else if (x > xMax1) { - xMax1 = x; - } - if (y < yMin1) { - yMin1 = y; - } else if (y > yMax1) { - yMax1 = y; - } - - if (xMin1 > clipXMin) { - clipXMin = xMin1; - } - if (yMin1 > clipYMin) { - clipYMin = yMin1; - } - if (xMax1 < clipXMax) { - clipXMax = xMax1; - } - if (yMax1 < clipYMax) { - clipYMax = yMax1; - } -} - -void GfxState::textShift(double tx, double ty) { - double dx, dy; - - textTransformDelta(tx, ty, &dx, &dy); - curX += dx; - curY += dy; -} - -void GfxState::shift(double dx, double dy) { - curX += dx; - curY += dy; -} - -GfxState *GfxState::save() { - GfxState *newState; - - newState = copy(); - newState->saved = this; - return newState; -} - -GfxState *GfxState::restore() { - GfxState *oldState; - - if (saved) { - oldState = saved; - - // these attributes aren't saved/restored by the q/Q operators - oldState->path = path; - oldState->curX = curX; - oldState->curY = curY; - oldState->lineX = lineX; - oldState->lineY = lineY; - - path = nullptr; - saved = nullptr; - delete this; - - } else { - oldState = this; - } - - return oldState; -} - -GBool GfxState::parseBlendMode(Object *obj, GfxBlendMode *mode) { - int i, j; - - if (obj->isName()) { - for (i = 0; i < nGfxBlendModeNames; ++i) { - if (!strcmp(obj->getName(), gfxBlendModeNames[i].name)) { - *mode = gfxBlendModeNames[i].mode; - return gTrue; - } - } - return gFalse; - } else if (obj->isArray()) { - for (i = 0; i < obj->arrayGetLength(); ++i) { - Object obj2 = obj->arrayGet(i); - if (!obj2.isName()) { - return gFalse; - } - for (j = 0; j < nGfxBlendModeNames; ++j) { - if (!strcmp(obj2.getName(), gfxBlendModeNames[j].name)) { - *mode = gfxBlendModeNames[j].mode; - return gTrue; - } - } - } - *mode = gfxBlendNormal; - return gTrue; - } else { - return gFalse; - } -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/GfxState.h b/Build/source/libs/poppler/poppler-src/poppler/GfxState.h deleted file mode 100644 index cd109045472..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/GfxState.h +++ /dev/null @@ -1,1703 +0,0 @@ -//======================================================================== -// -// GfxState.h -// -// Copyright 1996-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2005 Kristian Høgsberg <krh@redhat.com> -// Copyright (C) 2006, 2007 Jeff Muizelaar <jeff@infidigm.net> -// Copyright (C) 2006 Carlos Garcia Campos <carlosgc@gnome.org> -// Copyright (C) 2009 Koji Otani <sho@bbr.jp> -// Copyright (C) 2009-2011, 2013, 2016-2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2010 Christian Feuersänger <cfeuersaenger@googlemail.com> -// Copyright (C) 2011 Andrea Canciani <ranma42@gmail.com> -// Copyright (C) 2011-2014, 2016 Thomas Freitag <Thomas.Freitag@alfa.de> -// Copyright (C) 2013 Lu Wang <coolwanglu@gmail.com> -// Copyright (C) 2015, 2017 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2017 Oliver Sander <oliver.sander@tu-dresden.de> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef GFXSTATE_H -#define GFXSTATE_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "poppler-config.h" - -#include "goo/gtypes.h" -#include "Object.h" -#include "Function.h" - -#include <assert.h> -#include <map> - -class Array; -class Gfx; -class GfxFont; -class PDFRectangle; -class GfxShading; -class PopplerCache; -class GooList; -class OutputDev; -class GfxState; -class GfxResources; - -class Matrix { -public: - double m[6]; - - void init(double xx, double yx, double xy, double yy, double x0, double y0) { - m[0] = xx; m[1] = yx; m[2] = xy; m[3] = yy; m[4] = x0; m[5] = y0; - } - GBool invertTo(Matrix *other) const; - void translate(double tx, double ty); - void scale(double sx, double sy); - void transform(double x, double y, double *tx, double *ty) const; - double determinant() const { return m[0] * m[3] - m[1] * m[2]; } - double norm() const; -}; - -//------------------------------------------------------------------------ -// GfxBlendMode -//------------------------------------------------------------------------ - -enum GfxBlendMode { - gfxBlendNormal, - gfxBlendMultiply, - gfxBlendScreen, - gfxBlendOverlay, - gfxBlendDarken, - gfxBlendLighten, - gfxBlendColorDodge, - gfxBlendColorBurn, - gfxBlendHardLight, - gfxBlendSoftLight, - gfxBlendDifference, - gfxBlendExclusion, - gfxBlendHue, - gfxBlendSaturation, - gfxBlendColor, - gfxBlendLuminosity -}; - -//------------------------------------------------------------------------ -// GfxColorComp -//------------------------------------------------------------------------ - -// 16.16 fixed point color component -typedef int GfxColorComp; - -#define gfxColorComp1 0x10000 - -static inline GfxColorComp dblToCol(double x) { - return (GfxColorComp)(x * gfxColorComp1); -} - -static inline double colToDbl(GfxColorComp x) { - return (double)x / (double)gfxColorComp1; -} - -static inline Guchar dblToByte(double x) { - return (x * 255.0); -} - -static inline double byteToDbl(Guchar x) { - return (double)x / (double)255.0; -} - -static inline GfxColorComp byteToCol(Guchar x) { - // (x / 255) << 16 = (0.0000000100000001... * x) << 16 - // = ((x << 8) + (x) + (x >> 8) + ...) << 16 - // = (x << 8) + (x) + (x >> 7) - // [for rounding] - return (GfxColorComp)((x << 8) + x + (x >> 7)); -} - -static inline Guchar colToByte(GfxColorComp x) { - // 255 * x + 0.5 = 256 * x - x + 0x8000 - return (Guchar)(((x << 8) - x + 0x8000) >> 16); -} - -static inline Gushort colToShort(GfxColorComp x) { - return (Gushort)(x); -} - -//------------------------------------------------------------------------ -// GfxColor -//------------------------------------------------------------------------ - -#define gfxColorMaxComps funcMaxOutputs - -struct GfxColor { - GfxColorComp c[gfxColorMaxComps]; -}; - -//------------------------------------------------------------------------ -// GfxGray -//------------------------------------------------------------------------ - -typedef GfxColorComp GfxGray; - -//------------------------------------------------------------------------ -// GfxRGB -//------------------------------------------------------------------------ - -struct GfxRGB { - GfxColorComp r, g, b; -}; - -//------------------------------------------------------------------------ -// GfxCMYK -//------------------------------------------------------------------------ - -struct GfxCMYK { - GfxColorComp c, m, y, k; -}; - -//------------------------------------------------------------------------ -// GfxColorSpace -//------------------------------------------------------------------------ - -// NB: The nGfxColorSpaceModes constant and the gfxColorSpaceModeNames -// array defined in GfxState.cc must match this enum. -enum GfxColorSpaceMode { - csDeviceGray, - csCalGray, - csDeviceRGB, - csCalRGB, - csDeviceCMYK, - csLab, - csICCBased, - csIndexed, - csSeparation, - csDeviceN, - csPattern -}; - -// wrapper of cmsHTRANSFORM to copy -class GfxColorTransform { -public: - void doTransform(void *in, void *out, unsigned int size); - // transformA should be a cmsHTRANSFORM - GfxColorTransform(void *transformA, int cmsIntent, unsigned int inputPixelType, unsigned int transformPixelType); - ~GfxColorTransform(); - GfxColorTransform(const GfxColorTransform &) = delete; - GfxColorTransform& operator=(const GfxColorTransform &) = delete; - int getIntent() { return cmsIntent; } - int getInputPixelType() { return inputPixelType; } - int getTransformPixelType() { return transformPixelType; } - void ref(); - unsigned int unref(); -private: - GfxColorTransform() {} - void *transform; - unsigned int refCount; - int cmsIntent; - unsigned int inputPixelType; - unsigned int transformPixelType; -}; - -class GfxColorSpace { -public: - - GfxColorSpace(); - virtual ~GfxColorSpace(); - - GfxColorSpace(const GfxColorSpace &) = delete; - GfxColorSpace& operator=(const GfxColorSpace &other) = delete; - - virtual GfxColorSpace *copy() = 0; - virtual GfxColorSpaceMode getMode() = 0; - - // Construct a color space. Returns NULL if unsuccessful. - static GfxColorSpace *parse(GfxResources *res, Object *csObj, OutputDev *out, GfxState *state, int recursion = 0); - - // Convert to gray, RGB, or CMYK. - virtual void getGray(GfxColor *color, GfxGray *gray) = 0; - virtual void getRGB(GfxColor *color, GfxRGB *rgb) = 0; - virtual void getCMYK(GfxColor *color, GfxCMYK *cmyk) = 0; - virtual void getDeviceN(GfxColor *color, GfxColor *deviceN) = 0; - virtual void getGrayLine(Guchar * /*in*/, Guchar * /*out*/, int /*length*/) { error(errInternal, -1, "GfxColorSpace::getGrayLine this should not happen"); } - virtual void getRGBLine(Guchar * /*in*/, unsigned int * /*out*/, int /*length*/) { error(errInternal, -1, "GfxColorSpace::getRGBLine (first variant) this should not happen"); } - virtual void getRGBLine(Guchar * /*in*/, Guchar * /*out*/, int /*length*/) { error(errInternal, -1, "GfxColorSpace::getRGBLine (second variant) this should not happen"); } - virtual void getRGBXLine(Guchar * /*in*/, Guchar * /*out*/, int /*length*/) { error(errInternal, -1, "GfxColorSpace::getRGBXLine this should not happen"); } - virtual void getCMYKLine(Guchar * /*in*/, Guchar * /*out*/, int /*length*/) { error(errInternal, -1, "GfxColorSpace::getCMYKLine this should not happen"); } - virtual void getDeviceNLine(Guchar * /*in*/, Guchar * /*out*/, int /*length*/) { error(errInternal, -1, "GfxColorSpace::getDeviceNLine this should not happen"); } - - // create mapping for spot colorants - virtual void createMapping(GooList *separationList, int maxSepComps); - - // Does this ColorSpace support getRGBLine? - virtual GBool useGetRGBLine() { return gFalse; } - // Does this ColorSpace support getGrayLine? - virtual GBool useGetGrayLine() { return gFalse; } - // Does this ColorSpace support getCMYKLine? - virtual GBool useGetCMYKLine() { return gFalse; } - // Does this ColorSpace support getDeviceNLine? - virtual GBool useGetDeviceNLine() { return gFalse; } - - // Return the number of color components. - virtual int getNComps() = 0; - - // Get this color space's default color. - virtual void getDefaultColor(GfxColor *color) = 0; - - // Return the default ranges for each component, assuming an image - // with a max pixel value of <maxImgPixel>. - virtual void getDefaultRanges(double *decodeLow, double *decodeRange, - int maxImgPixel); - - // Returns true if painting operations in this color space never - // mark the page (e.g., the "None" colorant). - virtual GBool isNonMarking() { return gFalse; } - - // Return the color space's overprint mask. - Guint getOverprintMask() { return overprintMask; } - - // Return the number of color space modes - static int getNumColorSpaceModes(); - - // Return the name of the <idx>th color space mode. - static const char *getColorSpaceModeName(int idx); - -#ifdef USE_CMS - static int setupColorProfiles(); - // displayProfileA should be a cmsHPROFILE - static void setDisplayProfile(void *displayProfileA); - static void setDisplayProfileName(GooString *name); - // result will be a cmsHPROFILE - static void *getRGBProfile(); - // result will be a cmsHPROFILE - static void *getDisplayProfile(); -#endif -protected: - - Guint overprintMask; - int *mapping; -}; - -//------------------------------------------------------------------------ -// GfxDeviceGrayColorSpace -//------------------------------------------------------------------------ - -class GfxDeviceGrayColorSpace: public GfxColorSpace { -public: - - GfxDeviceGrayColorSpace(); - ~GfxDeviceGrayColorSpace(); - GfxColorSpace *copy() override; - GfxColorSpaceMode getMode() override { return csDeviceGray; } - - void getGray(GfxColor *color, GfxGray *gray) override; - void getRGB(GfxColor *color, GfxRGB *rgb) override; - void getCMYK(GfxColor *color, GfxCMYK *cmyk) override; - void getDeviceN(GfxColor *color, GfxColor *deviceN) override; - void getGrayLine(Guchar *in, Guchar *out, int length) override; - void getRGBLine(Guchar *in, unsigned int *out, int length) override; - void getRGBLine(Guchar *in, Guchar *out, int length) override; - void getRGBXLine(Guchar *in, Guchar *out, int length) override; - void getCMYKLine(Guchar *in, Guchar *out, int length) override; - void getDeviceNLine(Guchar *in, Guchar *out, int length) override; - - GBool useGetRGBLine() override { return gTrue; } - GBool useGetGrayLine() override { return gTrue; } - GBool useGetCMYKLine() override { return gTrue; } - GBool useGetDeviceNLine() override { return gTrue; } - - int getNComps() override { return 1; } - void getDefaultColor(GfxColor *color) override; - -private: -}; - -//------------------------------------------------------------------------ -// GfxCalGrayColorSpace -//------------------------------------------------------------------------ - -class GfxCalGrayColorSpace: public GfxColorSpace { -public: - - GfxCalGrayColorSpace(); - ~GfxCalGrayColorSpace(); - GfxColorSpace *copy() override; - GfxColorSpaceMode getMode() override { return csCalGray; } - - // Construct a CalGray color space. Returns NULL if unsuccessful. - static GfxColorSpace *parse(Array *arr, GfxState *state); - - void getGray(GfxColor *color, GfxGray *gray) override; - void getRGB(GfxColor *color, GfxRGB *rgb) override; - void getCMYK(GfxColor *color, GfxCMYK *cmyk) override; - void getDeviceN(GfxColor *color, GfxColor *deviceN) override; - - int getNComps() override { return 1; } - void getDefaultColor(GfxColor *color) override; - - // CalGray-specific access. - double getWhiteX() { return whiteX; } - double getWhiteY() { return whiteY; } - double getWhiteZ() { return whiteZ; } - double getBlackX() { return blackX; } - double getBlackY() { return blackY; } - double getBlackZ() { return blackZ; } - double getGamma() { return gamma; } - -private: - - double whiteX, whiteY, whiteZ; // white point - double blackX, blackY, blackZ; // black point - double gamma; // gamma value - double kr, kg, kb; // gamut mapping mulitpliers - void getXYZ(GfxColor *color, double *pX, double *pY, double *pZ); -#ifdef USE_CMS - GfxColorTransform *transform; -#endif -}; - -//------------------------------------------------------------------------ -// GfxDeviceRGBColorSpace -//------------------------------------------------------------------------ - -class GfxDeviceRGBColorSpace: public GfxColorSpace { -public: - - GfxDeviceRGBColorSpace(); - ~GfxDeviceRGBColorSpace(); - GfxColorSpace *copy() override; - GfxColorSpaceMode getMode() override { return csDeviceRGB; } - - void getGray(GfxColor *color, GfxGray *gray) override; - void getRGB(GfxColor *color, GfxRGB *rgb) override; - void getCMYK(GfxColor *color, GfxCMYK *cmyk) override; - void getDeviceN(GfxColor *color, GfxColor *deviceN) override; - void getGrayLine(Guchar *in, Guchar *out, int length) override; - void getRGBLine(Guchar *in, unsigned int *out, int length) override; - void getRGBLine(Guchar *in, Guchar *out, int length) override; - void getRGBXLine(Guchar *in, Guchar *out, int length) override; - void getCMYKLine(Guchar *in, Guchar *out, int length) override; - void getDeviceNLine(Guchar *in, Guchar *out, int length) override; - - GBool useGetRGBLine() override { return gTrue; } - GBool useGetGrayLine() override { return gTrue; } - GBool useGetCMYKLine() override { return gTrue; } - GBool useGetDeviceNLine() override { return gTrue; } - - int getNComps() override { return 3; } - void getDefaultColor(GfxColor *color) override; - -private: -}; - -//------------------------------------------------------------------------ -// GfxCalRGBColorSpace -//------------------------------------------------------------------------ - -class GfxCalRGBColorSpace: public GfxColorSpace { -public: - - GfxCalRGBColorSpace(); - ~GfxCalRGBColorSpace(); - GfxColorSpace *copy() override; - GfxColorSpaceMode getMode() override { return csCalRGB; } - - // Construct a CalRGB color space. Returns NULL if unsuccessful. - static GfxColorSpace *parse(Array *arr, GfxState *state); - - void getGray(GfxColor *color, GfxGray *gray) override; - void getRGB(GfxColor *color, GfxRGB *rgb) override; - void getCMYK(GfxColor *color, GfxCMYK *cmyk) override; - void getDeviceN(GfxColor *color, GfxColor *deviceN) override; - - int getNComps() override { return 3; } - void getDefaultColor(GfxColor *color) override; - - // CalRGB-specific access. - double getWhiteX() { return whiteX; } - double getWhiteY() { return whiteY; } - double getWhiteZ() { return whiteZ; } - double getBlackX() { return blackX; } - double getBlackY() { return blackY; } - double getBlackZ() { return blackZ; } - double getGammaR() { return gammaR; } - double getGammaG() { return gammaG; } - double getGammaB() { return gammaB; } - double *getMatrix() { return mat; } - -private: - - double whiteX, whiteY, whiteZ; // white point - double blackX, blackY, blackZ; // black point - double gammaR, gammaG, gammaB; // gamma values - double mat[9]; // ABC -> XYZ transform matrix - double kr, kg, kb; // gamut mapping mulitpliers - void getXYZ(GfxColor *color, double *pX, double *pY, double *pZ); -#ifdef USE_CMS - GfxColorTransform *transform; -#endif -}; - -//------------------------------------------------------------------------ -// GfxDeviceCMYKColorSpace -//------------------------------------------------------------------------ - -class GfxDeviceCMYKColorSpace: public GfxColorSpace { -public: - - GfxDeviceCMYKColorSpace(); - ~GfxDeviceCMYKColorSpace(); - GfxColorSpace *copy() override; - GfxColorSpaceMode getMode() override { return csDeviceCMYK; } - - void getGray(GfxColor *color, GfxGray *gray) override; - void getRGB(GfxColor *color, GfxRGB *rgb) override; - void getCMYK(GfxColor *color, GfxCMYK *cmyk) override; - void getDeviceN(GfxColor *color, GfxColor *deviceN) override; - void getRGBLine(Guchar *in, unsigned int *out, int length) override; - void getRGBLine(Guchar *, Guchar *out, int length) override; - void getRGBXLine(Guchar *in, Guchar *out, int length) override; - void getCMYKLine(Guchar *in, Guchar *out, int length) override; - void getDeviceNLine(Guchar *in, Guchar *out, int length) override; - GBool useGetRGBLine() override { return gTrue; } - GBool useGetCMYKLine() override { return gTrue; } - GBool useGetDeviceNLine() override { return gTrue; } - - int getNComps() override { return 4; } - void getDefaultColor(GfxColor *color) override; - -private: -}; - -//------------------------------------------------------------------------ -// GfxLabColorSpace -//------------------------------------------------------------------------ - -class GfxLabColorSpace: public GfxColorSpace { -public: - - GfxLabColorSpace(); - ~GfxLabColorSpace(); - GfxColorSpace *copy() override; - GfxColorSpaceMode getMode() override { return csLab; } - - // Construct a Lab color space. Returns NULL if unsuccessful. - static GfxColorSpace *parse(Array *arr, GfxState *state); - - void getGray(GfxColor *color, GfxGray *gray) override; - void getRGB(GfxColor *color, GfxRGB *rgb) override; - void getCMYK(GfxColor *color, GfxCMYK *cmyk) override; - void getDeviceN(GfxColor *color, GfxColor *deviceN) override; - - int getNComps() override { return 3; } - void getDefaultColor(GfxColor *color) override; - - void getDefaultRanges(double *decodeLow, double *decodeRange, - int maxImgPixel) override; - - // Lab-specific access. - double getWhiteX() { return whiteX; } - double getWhiteY() { return whiteY; } - double getWhiteZ() { return whiteZ; } - double getBlackX() { return blackX; } - double getBlackY() { return blackY; } - double getBlackZ() { return blackZ; } - double getAMin() { return aMin; } - double getAMax() { return aMax; } - double getBMin() { return bMin; } - double getBMax() { return bMax; } - -private: - - double whiteX, whiteY, whiteZ; // white point - double blackX, blackY, blackZ; // black point - double aMin, aMax, bMin, bMax; // range for the a and b components - double kr, kg, kb; // gamut mapping mulitpliers - void getXYZ(GfxColor *color, double *pX, double *pY, double *pZ); -#ifdef USE_CMS - GfxColorTransform *transform; -#endif -}; - -//------------------------------------------------------------------------ -// GfxICCBasedColorSpace -//------------------------------------------------------------------------ - -class GfxICCBasedColorSpace: public GfxColorSpace { -public: - - GfxICCBasedColorSpace(int nCompsA, GfxColorSpace *altA, - Ref *iccProfileStreamA); - ~GfxICCBasedColorSpace(); - GfxColorSpace *copy() override; - GfxColorSpaceMode getMode() override { return csICCBased; } - - // Construct an ICCBased color space. Returns NULL if unsuccessful. - static GfxColorSpace *parse(Array *arr, OutputDev *out, GfxState *state, int recursion); - - void getGray(GfxColor *color, GfxGray *gray) override; - void getRGB(GfxColor *color, GfxRGB *rgb) override; - void getCMYK(GfxColor *color, GfxCMYK *cmyk) override; - void getDeviceN(GfxColor *color, GfxColor *deviceN) override; - void getRGBLine(Guchar *in, unsigned int *out, int length) override; - void getRGBLine(Guchar *in, Guchar *out, int length) override; - void getRGBXLine(Guchar *in, Guchar *out, int length) override; - void getCMYKLine(Guchar *in, Guchar *out, int length) override; - void getDeviceNLine(Guchar *in, Guchar *out, int length) override; - - GBool useGetRGBLine() override; - GBool useGetCMYKLine() override; - GBool useGetDeviceNLine() override; - - int getNComps() override { return nComps; } - void getDefaultColor(GfxColor *color) override; - - void getDefaultRanges(double *decodeLow, double *decodeRange, - int maxImgPixel) override; - - // ICCBased-specific access. - GfxColorSpace *getAlt() { return alt; } - -private: - - int nComps; // number of color components (1, 3, or 4) - GfxColorSpace *alt; // alternate color space - double rangeMin[4]; // min values for each component - double rangeMax[4]; // max values for each component - Ref iccProfileStream; // the ICC profile -#ifdef USE_CMS - int getIntent() { return (transform != NULL) ? transform->getIntent() : 0; } - GfxColorTransform *transform; - GfxColorTransform *lineTransform; // color transform for line - std::map<unsigned int, unsigned int> cmsCache; -#endif -}; -//------------------------------------------------------------------------ -// GfxIndexedColorSpace -//------------------------------------------------------------------------ - -class GfxIndexedColorSpace: public GfxColorSpace { -public: - - GfxIndexedColorSpace(GfxColorSpace *baseA, int indexHighA); - ~GfxIndexedColorSpace(); - GfxColorSpace *copy() override; - GfxColorSpaceMode getMode() override { return csIndexed; } - - // Construct an Indexed color space. Returns NULL if unsuccessful. - static GfxColorSpace *parse(GfxResources *res, Array *arr, OutputDev *out, GfxState *state, int recursion); - - void getGray(GfxColor *color, GfxGray *gray) override; - void getRGB(GfxColor *color, GfxRGB *rgb) override; - void getCMYK(GfxColor *color, GfxCMYK *cmyk) override; - void getDeviceN(GfxColor *color, GfxColor *deviceN) override; - void getRGBLine(Guchar *in, unsigned int *out, int length) override; - void getRGBLine(Guchar *in, Guchar *out, int length) override; - void getRGBXLine(Guchar *in, Guchar *out, int length) override; - void getCMYKLine(Guchar *in, Guchar *out, int length) override; - void getDeviceNLine(Guchar *in, Guchar *out, int length) override; - - GBool useGetRGBLine() override { return gTrue; } - GBool useGetCMYKLine() override { return gTrue; } - GBool useGetDeviceNLine() override { return gTrue; } - - int getNComps() override { return 1; } - void getDefaultColor(GfxColor *color) override; - - void getDefaultRanges(double *decodeLow, double *decodeRange, - int maxImgPixel) override; - - // Indexed-specific access. - GfxColorSpace *getBase() { return base; } - int getIndexHigh() { return indexHigh; } - Guchar *getLookup() { return lookup; } - GfxColor *mapColorToBase(GfxColor *color, GfxColor *baseColor); - Guint getOverprintMask() { return base->getOverprintMask(); } - void createMapping(GooList *separationList, int maxSepComps) override - { base->createMapping(separationList, maxSepComps); } - - -private: - - GfxColorSpace *base; // base color space - int indexHigh; // max pixel value - Guchar *lookup; // lookup table -}; - -//------------------------------------------------------------------------ -// GfxSeparationColorSpace -//------------------------------------------------------------------------ - -class GfxSeparationColorSpace: public GfxColorSpace { -public: - - GfxSeparationColorSpace(GooString *nameA, GfxColorSpace *altA, - Function *funcA); - ~GfxSeparationColorSpace(); - GfxColorSpace *copy() override; - GfxColorSpaceMode getMode() override { return csSeparation; } - - // Construct a Separation color space. Returns NULL if unsuccessful. - static GfxColorSpace *parse(GfxResources *res, Array *arr, OutputDev *out, GfxState *state, int recursion); - - void getGray(GfxColor *color, GfxGray *gray) override; - void getRGB(GfxColor *color, GfxRGB *rgb) override; - void getCMYK(GfxColor *color, GfxCMYK *cmyk) override; - void getDeviceN(GfxColor *color, GfxColor *deviceN) override; - - void createMapping(GooList *separationList, int maxSepComps) override; - - int getNComps() override { return 1; } - void getDefaultColor(GfxColor *color) override; - - GBool isNonMarking() override { return nonMarking; } - - // Separation-specific access. - GooString *getName() { return name; } - GfxColorSpace *getAlt() { return alt; } - Function *getFunc() { return func; } - -private: - - GfxSeparationColorSpace(GooString *nameA, GfxColorSpace *altA, - Function *funcA, GBool nonMarkingA, - Guint overprintMaskA, int *mappingA); - - GooString *name; // colorant name - GfxColorSpace *alt; // alternate color space - Function *func; // tint transform (into alternate color space) - GBool nonMarking; -}; - -//------------------------------------------------------------------------ -// GfxDeviceNColorSpace -//------------------------------------------------------------------------ - -class GfxDeviceNColorSpace: public GfxColorSpace { -public: - - GfxDeviceNColorSpace(int nCompsA, GooString **namesA, - GfxColorSpace *alt, Function *func, GooList *sepsCS); - ~GfxDeviceNColorSpace(); - GfxColorSpace *copy() override; - GfxColorSpaceMode getMode() override { return csDeviceN; } - - // Construct a DeviceN color space. Returns NULL if unsuccessful. - static GfxColorSpace *parse(GfxResources *res, Array *arr, OutputDev *out, GfxState *state, int recursion); - - void getGray(GfxColor *color, GfxGray *gray) override; - void getRGB(GfxColor *color, GfxRGB *rgb) override; - void getCMYK(GfxColor *color, GfxCMYK *cmyk) override; - void getDeviceN(GfxColor *color, GfxColor *deviceN) override; - - void createMapping(GooList *separationList, int maxSepComps) override; - - int getNComps() override { return nComps; } - void getDefaultColor(GfxColor *color) override; - - GBool isNonMarking() override { return nonMarking; } - - // DeviceN-specific access. - GooString *getColorantName(int i) { return names[i]; } - GfxColorSpace *getAlt() { return alt; } - Function *getTintTransformFunc() { return func; } - -private: - - GfxDeviceNColorSpace(int nCompsA, GooString **namesA, - GfxColorSpace *alt, Function *func, GooList *sepsCSA, - int *mappingA, GBool nonMarkingA, Guint overprintMaskA); - - int nComps; // number of components - GooString // colorant names - *names[gfxColorMaxComps]; - GfxColorSpace *alt; // alternate color space - Function *func; // tint transform (into alternate color space) - GBool nonMarking; - GooList *sepsCS; // list of separation cs for spot colorants; -}; - -//------------------------------------------------------------------------ -// GfxPatternColorSpace -//------------------------------------------------------------------------ - -class GfxPatternColorSpace: public GfxColorSpace { -public: - - GfxPatternColorSpace(GfxColorSpace *underA); - ~GfxPatternColorSpace(); - GfxColorSpace *copy() override; - GfxColorSpaceMode getMode() override { return csPattern; } - - // Construct a Pattern color space. Returns NULL if unsuccessful. - static GfxColorSpace *parse(GfxResources *res, Array *arr, OutputDev *out, GfxState *state, int recursion); - - void getGray(GfxColor *color, GfxGray *gray) override; - void getRGB(GfxColor *color, GfxRGB *rgb) override; - void getCMYK(GfxColor *color, GfxCMYK *cmyk) override; - void getDeviceN(GfxColor *color, GfxColor *deviceN) override; - - int getNComps() override { return 0; } - void getDefaultColor(GfxColor *color) override; - - // Pattern-specific access. - GfxColorSpace *getUnder() { return under; } - -private: - - GfxColorSpace *under; // underlying color space (for uncolored - // patterns) -}; - -//------------------------------------------------------------------------ -// GfxPattern -//------------------------------------------------------------------------ - -class GfxPattern { -public: - - GfxPattern(int typeA, int patternRefNumA); - virtual ~GfxPattern(); - - GfxPattern(const GfxPattern &) = delete; - GfxPattern& operator=(const GfxPattern &other) = delete; - - static GfxPattern *parse(GfxResources *res, Object *obj, OutputDev *out, GfxState *state, int patternRefNum); - - virtual GfxPattern *copy() = 0; - - int getType() { return type; } - - int getPatternRefNum() const { return patternRefNum; } - -private: - - int type; - int patternRefNum; -}; - -//------------------------------------------------------------------------ -// GfxTilingPattern -//------------------------------------------------------------------------ - -class GfxTilingPattern: public GfxPattern { -public: - - static GfxTilingPattern *parse(Object *patObj, int patternRefNum); - ~GfxTilingPattern(); - - GfxPattern *copy() override; - - int getPaintType() { return paintType; } - int getTilingType() { return tilingType; } - double *getBBox() { return bbox; } - double getXStep() { return xStep; } - double getYStep() { return yStep; } - Dict *getResDict() - { return resDict.isDict() ? resDict.getDict() : (Dict *)NULL; } - double *getMatrix() { return matrix; } - Object *getContentStream() { return &contentStream; } - -private: - - GfxTilingPattern(int paintTypeA, int tilingTypeA, - double *bboxA, double xStepA, double yStepA, - Object *resDictA, double *matrixA, - Object *contentStreamA, int patternRefNumA); - - int paintType; - int tilingType; - double bbox[4]; - double xStep, yStep; - Object resDict; - double matrix[6]; - Object contentStream; -}; - -//------------------------------------------------------------------------ -// GfxShadingPattern -//------------------------------------------------------------------------ - -class GfxShadingPattern: public GfxPattern { -public: - - static GfxShadingPattern *parse(GfxResources *res, Object *patObj, OutputDev *out, GfxState *state, int patternRefNum); - ~GfxShadingPattern(); - - GfxPattern *copy() override; - - GfxShading *getShading() { return shading; } - double *getMatrix() { return matrix; } - -private: - - GfxShadingPattern(GfxShading *shadingA, double *matrixA, int patternRefNumA); - - GfxShading *shading; - double matrix[6]; -}; - -//------------------------------------------------------------------------ -// GfxShading -//------------------------------------------------------------------------ - -class GfxShading { -public: - - GfxShading(int typeA); - GfxShading(GfxShading *shading); - virtual ~GfxShading(); - - GfxShading(const GfxShading &) = delete; - GfxShading& operator=(const GfxShading &other) = delete; - - static GfxShading *parse(GfxResources *res, Object *obj, OutputDev *out, GfxState *state); - - virtual GfxShading *copy() = 0; - - int getType() { return type; } - GfxColorSpace *getColorSpace() { return colorSpace; } - GfxColor *getBackground() { return &background; } - GBool getHasBackground() { return hasBackground; } - void getBBox(double *xMinA, double *yMinA, double *xMaxA, double *yMaxA) - { *xMinA = xMin; *yMinA = yMin; *xMaxA = xMax; *yMaxA = yMax; } - GBool getHasBBox() { return hasBBox; } - -protected: - - GBool init(GfxResources *res, Dict *dict, OutputDev *out, GfxState *state); - - // 1: Function-based shading - // 2: Axial shading - // 3: Radial shading - // 4: Free-form Gouraud-shaded triangle mesh - // 5: Lattice-form Gouraud-shaded triangle mesh - // 6: Coons patch mesh - // 7: Tensor-product patch mesh - int type; - GBool hasBackground; - GBool hasBBox; - GfxColorSpace *colorSpace; - GfxColor background; - double xMin, yMin, xMax, yMax; -}; - -//------------------------------------------------------------------------ -// GfxUnivariateShading -//------------------------------------------------------------------------ - -class GfxUnivariateShading: public GfxShading { -public: - - GfxUnivariateShading(int typeA, - double t0A, double t1A, - Function **funcsA, int nFuncsA, - GBool extend0A, GBool extend1A); - GfxUnivariateShading(GfxUnivariateShading *shading); - ~GfxUnivariateShading(); - - double getDomain0() { return t0; } - double getDomain1() { return t1; } - GBool getExtend0() { return extend0; } - GBool getExtend1() { return extend1; } - int getNFuncs() { return nFuncs; } - Function *getFunc(int i) { return funcs[i]; } - // returns the nComps of the shading - // i.e. how many positions of color have been set - int getColor(double t, GfxColor *color); - - void setupCache(const Matrix *ctm, - double xMin, double yMin, - double xMax, double yMax); - - virtual void getParameterRange(double *lower, double *upper, - double xMin, double yMin, - double xMax, double yMax) = 0; - - virtual double getDistance(double tMin, double tMax) = 0; - -private: - - double t0, t1; - Function *funcs[gfxColorMaxComps]; - int nFuncs; - GBool extend0, extend1; - - int cacheSize, lastMatch; - double *cacheBounds; - double *cacheCoeff; - double *cacheValues; -}; - -//------------------------------------------------------------------------ -// GfxFunctionShading -//------------------------------------------------------------------------ - -class GfxFunctionShading: public GfxShading { -public: - - GfxFunctionShading(double x0A, double y0A, - double x1A, double y1A, - double *matrixA, - Function **funcsA, int nFuncsA); - GfxFunctionShading(GfxFunctionShading *shading); - ~GfxFunctionShading(); - - static GfxFunctionShading *parse(GfxResources *res, Dict *dict, OutputDev *out, GfxState *state); - - GfxShading *copy() override; - - void getDomain(double *x0A, double *y0A, double *x1A, double *y1A) - { *x0A = x0; *y0A = y0; *x1A = x1; *y1A = y1; } - double *getMatrix() { return matrix; } - int getNFuncs() { return nFuncs; } - Function *getFunc(int i) { return funcs[i]; } - void getColor(double x, double y, GfxColor *color); - -private: - - double x0, y0, x1, y1; - double matrix[6]; - Function *funcs[gfxColorMaxComps]; - int nFuncs; -}; - -//------------------------------------------------------------------------ -// GfxAxialShading -//------------------------------------------------------------------------ - -class GfxAxialShading: public GfxUnivariateShading { -public: - - GfxAxialShading(double x0A, double y0A, - double x1A, double y1A, - double t0A, double t1A, - Function **funcsA, int nFuncsA, - GBool extend0A, GBool extend1A); - GfxAxialShading(GfxAxialShading *shading); - ~GfxAxialShading(); - - static GfxAxialShading *parse(GfxResources *res, Dict *dict, OutputDev *out, GfxState *state); - - GfxShading *copy() override; - - void getCoords(double *x0A, double *y0A, double *x1A, double *y1A) - { *x0A = x0; *y0A = y0; *x1A = x1; *y1A = y1; } - - void getParameterRange(double *lower, double *upper, - double xMin, double yMin, - double xMax, double yMax) override; - - double getDistance(double tMin, double tMax) override; - -private: - - double x0, y0, x1, y1; -}; - -//------------------------------------------------------------------------ -// GfxRadialShading -//------------------------------------------------------------------------ - -class GfxRadialShading: public GfxUnivariateShading { -public: - - GfxRadialShading(double x0A, double y0A, double r0A, - double x1A, double y1A, double r1A, - double t0A, double t1A, - Function **funcsA, int nFuncsA, - GBool extend0A, GBool extend1A); - GfxRadialShading(GfxRadialShading *shading); - ~GfxRadialShading(); - - static GfxRadialShading *parse(GfxResources *res, Dict *dict, OutputDev *out, GfxState *state); - - GfxShading *copy() override; - - void getCoords(double *x0A, double *y0A, double *r0A, - double *x1A, double *y1A, double *r1A) - { *x0A = x0; *y0A = y0; *r0A = r0; *x1A = x1; *y1A = y1; *r1A = r1; } - - void getParameterRange(double *lower, double *upper, - double xMin, double yMin, - double xMax, double yMax) override; - - double getDistance(double tMin, double tMax) override; - -private: - - double x0, y0, r0, x1, y1, r1; -}; - -//------------------------------------------------------------------------ -// GfxGouraudTriangleShading -//------------------------------------------------------------------------ - -struct GfxGouraudVertex { - double x, y; - GfxColor color; -}; - -class GfxGouraudTriangleShading: public GfxShading { -public: - - GfxGouraudTriangleShading(int typeA, - GfxGouraudVertex *verticesA, int nVerticesA, - int (*trianglesA)[3], int nTrianglesA, - Function **funcsA, int nFuncsA); - GfxGouraudTriangleShading(GfxGouraudTriangleShading *shading); - ~GfxGouraudTriangleShading(); - - static GfxGouraudTriangleShading *parse(GfxResources *res, int typeA, Dict *dict, Stream *str, OutputDev *out, GfxState *state); - - GfxShading *copy() override; - - int getNTriangles() { return nTriangles; } - - bool isParameterized() const { return nFuncs > 0; } - - /** - * @precondition isParameterized() == true - */ - double getParameterDomainMin() const { assert(isParameterized()); return funcs[0]->getDomainMin(0); } - - /** - * @precondition isParameterized() == true - */ - double getParameterDomainMax() const { assert(isParameterized()); return funcs[0]->getDomainMax(0); } - - /** - * @precondition isParameterized() == false - */ - void getTriangle(int i, double *x0, double *y0, GfxColor *color0, - double *x1, double *y1, GfxColor *color1, - double *x2, double *y2, GfxColor *color2); - - /** - * Variant for functions. - * - * @precondition isParameterized() == true - */ - void getTriangle(int i, double *x0, double *y0, double *color0, - double *x1, double *y1, double *color1, - double *x2, double *y2, double *color2); - - void getParameterizedColor(double t, GfxColor *color); - -private: - - GfxGouraudVertex *vertices; - int nVertices; - int (*triangles)[3]; - int nTriangles; - Function *funcs[gfxColorMaxComps]; - int nFuncs; -}; - -//------------------------------------------------------------------------ -// GfxPatchMeshShading -//------------------------------------------------------------------------ - -/** - * A tensor product cubic bezier patch consisting of 4x4 points and 4 color - * values. - * - * See the Shading Type 7 specifications. Note that Shading Type 6 is also - * represented using GfxPatch. - */ -struct GfxPatch { - /** - * Represents a single color value for the patch. - */ - struct ColorValue { - /** - * For parameterized patches, only element 0 is valid; it contains - * the single parameter. - * - * For non-parameterized patches, c contains all color components - * as decoded from the input stream. In this case, you will need to - * use dblToCol() before assigning them to GfxColor. - */ - double c[gfxColorMaxComps]; - }; - - double x[4][4]; - double y[4][4]; - ColorValue color[2][2]; -}; - -class GfxPatchMeshShading: public GfxShading { -public: - - GfxPatchMeshShading(int typeA, GfxPatch *patchesA, int nPatchesA, - Function **funcsA, int nFuncsA); - GfxPatchMeshShading(GfxPatchMeshShading *shading); - ~GfxPatchMeshShading(); - - static GfxPatchMeshShading *parse(GfxResources *res, int typeA, Dict *dict, Stream *str, OutputDev *out, GfxState *state); - - GfxShading *copy() override; - - int getNPatches() { return nPatches; } - GfxPatch *getPatch(int i) { return &patches[i]; } - - bool isParameterized() const { return nFuncs > 0; } - - /** - * @precondition isParameterized() == true - */ - double getParameterDomainMin() const { assert(isParameterized()); return funcs[0]->getDomainMin(0); } - - /** - * @precondition isParameterized() == true - */ - double getParameterDomainMax() const { assert(isParameterized()); return funcs[0]->getDomainMax(0); } - - void getParameterizedColor(double t, GfxColor *color); - -private: - - GfxPatch *patches; - int nPatches; - Function *funcs[gfxColorMaxComps]; - int nFuncs; -}; - -//------------------------------------------------------------------------ -// GfxImageColorMap -//------------------------------------------------------------------------ - -class GfxImageColorMap { -public: - - // Constructor. - GfxImageColorMap(int bitsA, Object *decode, GfxColorSpace *colorSpaceA); - - // Destructor. - ~GfxImageColorMap(); - - GfxImageColorMap(const GfxImageColorMap &) = delete; - GfxImageColorMap& operator=(const GfxImageColorMap &) = delete; - - // Return a copy of this color map. - GfxImageColorMap *copy() { return new GfxImageColorMap(this); } - - // Is color map valid? - GBool isOk() { return ok; } - - // Get the color space. - GfxColorSpace *getColorSpace() { return colorSpace; } - - // Get stream decoding info. - int getNumPixelComps() { return nComps; } - int getBits() { return bits; } - - // Get decode table. - double getDecodeLow(int i) { return decodeLow[i]; } - double getDecodeHigh(int i) { return decodeLow[i] + decodeRange[i]; } - - bool useRGBLine() { return (colorSpace2 && colorSpace2->useGetRGBLine ()) || (!colorSpace2 && colorSpace->useGetRGBLine ()); } - bool useCMYKLine() { return (colorSpace2 && colorSpace2->useGetCMYKLine ()) || (!colorSpace2 && colorSpace->useGetCMYKLine ()); } - bool useDeviceNLine() { return (colorSpace2 && colorSpace2->useGetDeviceNLine ()) || (!colorSpace2 && colorSpace->useGetDeviceNLine ()); } - - // Convert an image pixel to a color. - void getGray(Guchar *x, GfxGray *gray); - void getRGB(Guchar *x, GfxRGB *rgb); - void getRGBLine(Guchar *in, unsigned int *out, int length); - void getRGBLine(Guchar *in, Guchar *out, int length); - void getRGBXLine(Guchar *in, Guchar *out, int length); - void getGrayLine(Guchar *in, Guchar *out, int length); - void getCMYKLine(Guchar *in, Guchar *out, int length); - void getDeviceNLine(Guchar *in, Guchar *out, int length); - void getCMYK(Guchar *x, GfxCMYK *cmyk); - void getDeviceN(Guchar *x, GfxColor *deviceN); - void getColor(Guchar *x, GfxColor *color); - - // Matte color ops - void setMatteColor(GfxColor *color) { useMatte = gTrue; matteColor = *color; } - GfxColor *getMatteColor() { return (useMatte) ? &matteColor : NULL; } -private: - - GfxImageColorMap(GfxImageColorMap *colorMap); - - GfxColorSpace *colorSpace; // the image color space - int bits; // bits per component - int nComps; // number of components in a pixel - GfxColorSpace *colorSpace2; // secondary color space - int nComps2; // number of components in colorSpace2 - GfxColorComp * // lookup table - lookup[gfxColorMaxComps]; - GfxColorComp * // optimized case lookup table - lookup2[gfxColorMaxComps]; - Guchar *byte_lookup; - double // minimum values for each component - decodeLow[gfxColorMaxComps]; - double // max - min value for each component - decodeRange[gfxColorMaxComps]; - GBool useMatte; - GfxColor matteColor; - GBool ok; -}; - -//------------------------------------------------------------------------ -// GfxSubpath and GfxPath -//------------------------------------------------------------------------ - -class GfxSubpath { -public: - - // Constructor. - GfxSubpath(double x1, double y1); - - // Destructor. - ~GfxSubpath(); - - GfxSubpath(const GfxSubpath &) = delete; - GfxSubpath& operator=(const GfxSubpath &) = delete; - - // Copy. - GfxSubpath *copy() { return new GfxSubpath(this); } - - // Get points. - int getNumPoints() { return n; } - double getX(int i) { return x[i]; } - double getY(int i) { return y[i]; } - GBool getCurve(int i) { return curve[i]; } - - void setX(int i, double a) { x[i] = a; } - void setY(int i, double a) { y[i] = a; } - - // Get last point. - double getLastX() { return x[n-1]; } - double getLastY() { return y[n-1]; } - - // Add a line segment. - void lineTo(double x1, double y1); - - // Add a Bezier curve. - void curveTo(double x1, double y1, double x2, double y2, - double x3, double y3); - - // Close the subpath. - void close(); - GBool isClosed() { return closed; } - - // Add (<dx>, <dy>) to each point in the subpath. - void offset(double dx, double dy); - -private: - - double *x, *y; // points - GBool *curve; // curve[i] => point i is a control point - // for a Bezier curve - int n; // number of points - int size; // size of x/y arrays - GBool closed; // set if path is closed - - GfxSubpath(GfxSubpath *subpath); -}; - -class GfxPath { -public: - - // Constructor. - GfxPath(); - - // Destructor. - ~GfxPath(); - - GfxPath(const GfxPath &) = delete; - GfxPath& operator=(const GfxPath &) = delete; - - // Copy. - GfxPath *copy() - { return new GfxPath(justMoved, firstX, firstY, subpaths, n, size); } - - // Is there a current point? - GBool isCurPt() { return n > 0 || justMoved; } - - // Is the path non-empty, i.e., is there at least one segment? - GBool isPath() { return n > 0; } - - // Get subpaths. - int getNumSubpaths() { return n; } - GfxSubpath *getSubpath(int i) { return subpaths[i]; } - - // Get last point on last subpath. - double getLastX() { return subpaths[n-1]->getLastX(); } - double getLastY() { return subpaths[n-1]->getLastY(); } - - // Move the current point. - void moveTo(double x, double y); - - // Add a segment to the last subpath. - void lineTo(double x, double y); - - // Add a Bezier curve to the last subpath - void curveTo(double x1, double y1, double x2, double y2, - double x3, double y3); - - // Close the last subpath. - void close(); - - // Append <path> to <this>. - void append(GfxPath *path); - - // Add (<dx>, <dy>) to each point in the path. - void offset(double dx, double dy); - -private: - - GBool justMoved; // set if a new subpath was just started - double firstX, firstY; // first point in new subpath - GfxSubpath **subpaths; // subpaths - int n; // number of subpaths - int size; // size of subpaths array - - GfxPath(GBool justMoved1, double firstX1, double firstY1, - GfxSubpath **subpaths1, int n1, int size1); -}; - -//------------------------------------------------------------------------ -// GfxState -//------------------------------------------------------------------------ - -class GfxState { -public: - /** - * When GfxState::getReusablePath() is invoked, the currently active - * path is taken per reference and its coordinates can be re-edited. - * - * A ReusablePathIterator is intented to reduce overhead when the same - * path type is used a lot of times, only with different coordinates. It - * allows just to update the coordinates (occuring in the same order as - * in the original path). - */ - class ReusablePathIterator { - public: - /** - * Creates the ReusablePathIterator. This should only be done from - * GfxState::getReusablePath(). - * - * @param path the path as it is used so far. Changing this path, - * deleting it or starting a new path from scratch will most likely - * invalidate the iterator (and may cause serious problems). Make - * sure the path's memory structure is not changed during the - * lifetime of the ReusablePathIterator. - */ - ReusablePathIterator( GfxPath* path ); - - /** - * Returns true if and only if the current iterator position is - * beyond the last valid point. - * - * A call to setCoord() will be undefined. - */ - bool isEnd() const; - - /** - * Advances the iterator. - */ - void next(); - - /** - * Updates the coordinates associated to the current iterator - * position. - */ - void setCoord( double x, double y ); - - /** - * Resets the iterator. - */ - void reset(); - private: - GfxPath *path; - int subPathOff; - - int coordOff; - int numCoords; - - GfxSubpath *curSubPath; - }; - - // Construct a default GfxState, for a device with resolution <hDPI> - // x <vDPI>, page box <pageBox>, page rotation <rotateA>, and - // coordinate system specified by <upsideDown>. - GfxState(double hDPIA, double vDPIA, PDFRectangle *pageBox, - int rotateA, GBool upsideDown); - - // Destructor. - ~GfxState(); - - GfxState(const GfxState &) = delete; - GfxState& operator=(const GfxState &) = delete; - - // Copy. - GfxState *copy(GBool copyPath = gFalse) - { return new GfxState(this, copyPath); } - - // Accessors. - double getHDPI() { return hDPI; } - double getVDPI() { return vDPI; } - double *getCTM() { return ctm; } - void getCTM(Matrix *m) { memcpy (m->m, ctm, sizeof m->m); } - double getX1() { return px1; } - double getY1() { return py1; } - double getX2() { return px2; } - double getY2() { return py2; } - double getPageWidth() { return pageWidth; } - double getPageHeight() { return pageHeight; } - int getRotate() { return rotate; } - GfxColor *getFillColor() { return &fillColor; } - GfxColor *getStrokeColor() { return &strokeColor; } - void getFillGray(GfxGray *gray) - { fillColorSpace->getGray(&fillColor, gray); } - void getStrokeGray(GfxGray *gray) - { strokeColorSpace->getGray(&strokeColor, gray); } - void getFillRGB(GfxRGB *rgb) - { fillColorSpace->getRGB(&fillColor, rgb); } - void getStrokeRGB(GfxRGB *rgb) - { strokeColorSpace->getRGB(&strokeColor, rgb); } - void getFillCMYK(GfxCMYK *cmyk) - { fillColorSpace->getCMYK(&fillColor, cmyk); } - void getFillDeviceN(GfxColor *deviceN) - { fillColorSpace->getDeviceN(&fillColor, deviceN); } - void getStrokeCMYK(GfxCMYK *cmyk) - { strokeColorSpace->getCMYK(&strokeColor, cmyk); } - void getStrokeDeviceN(GfxColor *deviceN) - { strokeColorSpace->getDeviceN(&strokeColor, deviceN); } - GfxColorSpace *getFillColorSpace() { return fillColorSpace; } - GfxColorSpace *getStrokeColorSpace() { return strokeColorSpace; } - GfxPattern *getFillPattern() { return fillPattern; } - GfxPattern *getStrokePattern() { return strokePattern; } - GfxBlendMode getBlendMode() { return blendMode; } - double getFillOpacity() { return fillOpacity; } - double getStrokeOpacity() { return strokeOpacity; } - GBool getFillOverprint() { return fillOverprint; } - GBool getStrokeOverprint() { return strokeOverprint; } - int getOverprintMode() { return overprintMode; } - Function **getTransfer() { return transfer; } - double getLineWidth() { return lineWidth; } - void getLineDash(double **dash, int *length, double *start) - { *dash = lineDash; *length = lineDashLength; *start = lineDashStart; } - int getFlatness() { return flatness; } - int getLineJoin() { return lineJoin; } - int getLineCap() { return lineCap; } - double getMiterLimit() { return miterLimit; } - GBool getStrokeAdjust() { return strokeAdjust; } - GBool getAlphaIsShape() { return alphaIsShape; } - GBool getTextKnockout() { return textKnockout; } - GfxFont *getFont() { return font; } - double getFontSize() { return fontSize; } - double *getTextMat() { return textMat; } - double getCharSpace() { return charSpace; } - double getWordSpace() { return wordSpace; } - double getHorizScaling() { return horizScaling; } - double getLeading() { return leading; } - double getRise() { return rise; } - int getRender() { return render; } - char *getRenderingIntent() { return renderingIntent; } - GfxPath *getPath() { return path; } - void setPath(GfxPath *pathA); - double getCurX() { return curX; } - double getCurY() { return curY; } - void getClipBBox(double *xMin, double *yMin, double *xMax, double *yMax) - { *xMin = clipXMin; *yMin = clipYMin; *xMax = clipXMax; *yMax = clipYMax; } - void getUserClipBBox(double *xMin, double *yMin, double *xMax, double *yMax); - double getLineX() { return lineX; } - double getLineY() { return lineY; } - - // Is there a current point/path? - GBool isCurPt() { return path->isCurPt(); } - GBool isPath() { return path->isPath(); } - - // Transforms. - void transform(double x1, double y1, double *x2, double *y2) - { *x2 = ctm[0] * x1 + ctm[2] * y1 + ctm[4]; - *y2 = ctm[1] * x1 + ctm[3] * y1 + ctm[5]; } - void transformDelta(double x1, double y1, double *x2, double *y2) - { *x2 = ctm[0] * x1 + ctm[2] * y1; - *y2 = ctm[1] * x1 + ctm[3] * y1; } - void textTransform(double x1, double y1, double *x2, double *y2) - { *x2 = textMat[0] * x1 + textMat[2] * y1 + textMat[4]; - *y2 = textMat[1] * x1 + textMat[3] * y1 + textMat[5]; } - void textTransformDelta(double x1, double y1, double *x2, double *y2) - { *x2 = textMat[0] * x1 + textMat[2] * y1; - *y2 = textMat[1] * x1 + textMat[3] * y1; } - double transformWidth(double w); - double getTransformedLineWidth() - { return transformWidth(lineWidth); } - double getTransformedFontSize(); - void getFontTransMat(double *m11, double *m12, double *m21, double *m22); - - // Change state parameters. - void setCTM(double a, double b, double c, - double d, double e, double f); - void concatCTM(double a, double b, double c, - double d, double e, double f); - void shiftCTMAndClip(double tx, double ty); - void setFillColorSpace(GfxColorSpace *colorSpace); - void setStrokeColorSpace(GfxColorSpace *colorSpace); - void setFillColor(GfxColor *color) { fillColor = *color; } - void setStrokeColor(GfxColor *color) { strokeColor = *color; } - void setFillPattern(GfxPattern *pattern); - void setStrokePattern(GfxPattern *pattern); - void setBlendMode(GfxBlendMode mode) { blendMode = mode; } - void setFillOpacity(double opac) { fillOpacity = opac; } - void setStrokeOpacity(double opac) { strokeOpacity = opac; } - void setFillOverprint(GBool op) { fillOverprint = op; } - void setStrokeOverprint(GBool op) { strokeOverprint = op; } - void setOverprintMode(int op) { overprintMode = op; } - void setTransfer(Function **funcs); - void setLineWidth(double width) { lineWidth = width; } - void setLineDash(double *dash, int length, double start); - void setFlatness(int flatness1) { flatness = flatness1; } - void setLineJoin(int lineJoin1) { lineJoin = lineJoin1; } - void setLineCap(int lineCap1) { lineCap = lineCap1; } - void setMiterLimit(double limit) { miterLimit = limit; } - void setStrokeAdjust(GBool sa) { strokeAdjust = sa; } - void setAlphaIsShape(GBool ais) { alphaIsShape = ais; } - void setTextKnockout(GBool tk) { textKnockout = tk; } - void setFont(GfxFont *fontA, double fontSizeA); - void setTextMat(double a, double b, double c, - double d, double e, double f) - { textMat[0] = a; textMat[1] = b; textMat[2] = c; - textMat[3] = d; textMat[4] = e; textMat[5] = f; } - void setCharSpace(double space) - { charSpace = space; } - void setWordSpace(double space) - { wordSpace = space; } - void setHorizScaling(double scale) - { horizScaling = 0.01 * scale; } - void setLeading(double leadingA) - { leading = leadingA; } - void setRise(double riseA) - { rise = riseA; } - void setRender(int renderA) - { render = renderA; } - void setRenderingIntent(const char *intent) - { strncpy(renderingIntent, intent, 31); } - -#ifdef USE_CMS - void setDisplayProfile(void *localDisplayProfileA); - void *getDisplayProfile() { return localDisplayProfile; } - GfxColorTransform *getXYZ2DisplayTransform(); -#endif - - // Add to path. - void moveTo(double x, double y) - { path->moveTo(curX = x, curY = y); } - void lineTo(double x, double y) - { path->lineTo(curX = x, curY = y); } - void curveTo(double x1, double y1, double x2, double y2, - double x3, double y3) - { path->curveTo(x1, y1, x2, y2, curX = x3, curY = y3); } - void closePath() - { path->close(); curX = path->getLastX(); curY = path->getLastY(); } - void clearPath(); - - // Update clip region. - void clip(); - void clipToStrokePath(); - void clipToRect(double xMin, double yMin, double xMax, double yMax); - - // Text position. - void textSetPos(double tx, double ty) { lineX = tx; lineY = ty; } - void textMoveTo(double tx, double ty) - { lineX = tx; lineY = ty; textTransform(tx, ty, &curX, &curY); } - void textShift(double tx, double ty); - void shift(double dx, double dy); - - // Push/pop GfxState on/off stack. - GfxState *save(); - GfxState *restore(); - GBool hasSaves() { return saved != NULL; } - GBool isParentState(GfxState *state) { return saved == state || (saved && saved->isParentState(state)); } - - // Misc - GBool parseBlendMode(Object *obj, GfxBlendMode *mode); - - ReusablePathIterator *getReusablePath() { return new ReusablePathIterator(path); } -private: - - double hDPI, vDPI; // resolution - double ctm[6]; // coord transform matrix - double px1, py1, px2, py2; // page corners (user coords) - double pageWidth, pageHeight; // page size (pixels) - int rotate; // page rotation angle - - GfxColorSpace *fillColorSpace; // fill color space - GfxColorSpace *strokeColorSpace; // stroke color space - GfxColor fillColor; // fill color - GfxColor strokeColor; // stroke color - GfxPattern *fillPattern; // fill pattern - GfxPattern *strokePattern; // stroke pattern - GfxBlendMode blendMode; // transparency blend mode - double fillOpacity; // fill opacity - double strokeOpacity; // stroke opacity - GBool fillOverprint; // fill overprint - GBool strokeOverprint; // stroke overprint - int overprintMode; // overprint mode - Function *transfer[4]; // transfer function (entries may be: all - // NULL = identity; last three NULL = - // single function; all four non-NULL = - // R,G,B,gray functions) - - double lineWidth; // line width - double *lineDash; // line dash - int lineDashLength; - double lineDashStart; - int flatness; // curve flatness - int lineJoin; // line join style - int lineCap; // line cap style - double miterLimit; // line miter limit - GBool strokeAdjust; // stroke adjustment - GBool alphaIsShape; // alpha is shape - GBool textKnockout; // text knockout - - GfxFont *font; // font - double fontSize; // font size - double textMat[6]; // text matrix - double charSpace; // character spacing - double wordSpace; // word spacing - double horizScaling; // horizontal scaling - double leading; // text leading - double rise; // text rise - int render; // text rendering mode - - GfxPath *path; // array of path elements - double curX, curY; // current point (user coords) - double lineX, lineY; // start of current text line (text coords) - - double clipXMin, clipYMin, // bounding box for clip region - clipXMax, clipYMax; - char renderingIntent[32]; - - GfxState *saved; // next GfxState on stack - - GfxState(GfxState *state, GBool copyPath); - -#ifdef USE_CMS - void *localDisplayProfile; - int displayProfileRef; - GfxColorTransform *XYZ2DisplayTransformRelCol; - GfxColorTransform *XYZ2DisplayTransformAbsCol; - GfxColorTransform *XYZ2DisplayTransformSat; - GfxColorTransform *XYZ2DisplayTransformPerc; -#endif -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/GfxState_helpers.h b/Build/source/libs/poppler/poppler-src/poppler/GfxState_helpers.h deleted file mode 100644 index bc0024edd79..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/GfxState_helpers.h +++ /dev/null @@ -1,82 +0,0 @@ -//======================================================================== -// -// GfxState.cc -// -// Copyright 1996-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2009, 2011 Albert Astals Cid <aacid@kde.org> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include "GfxState.h" - -static inline GfxColorComp clip01(GfxColorComp x) { - return (x < 0) ? 0 : (x > gfxColorComp1) ? gfxColorComp1 : x; -} - -static inline double clip01(double x) { - return (x < 0) ? 0 : (x > 1) ? 1 : x; -} - -static inline void cmykToRGBMatrixMultiplication(const double &c, const double &m, const double &y, const double &k, const double &c1, const double &m1, const double &y1, const double &k1, double &r, double &g, double &b) -{ - double x; - // this is a matrix multiplication, unrolled for performance - // C M Y K - x = c1 * m1 * y1 * k1; // 0 0 0 0 - r = g = b = x; - x = c1 * m1 * y1 * k; // 0 0 0 1 - r += 0.1373 * x; - g += 0.1216 * x; - b += 0.1255 * x; - x = c1 * m1 * y * k1; // 0 0 1 0 - r += x; - g += 0.9490 * x; - x = c1 * m1 * y * k; // 0 0 1 1 - r += 0.1098 * x; - g += 0.1020 * x; - x = c1 * m * y1 * k1; // 0 1 0 0 - r += 0.9255 * x; - b += 0.5490 * x; - x = c1 * m * y1 * k; // 0 1 0 1 - r += 0.1412 * x; - x = c1 * m * y * k1; // 0 1 1 0 - r += 0.9294 * x; - g += 0.1098 * x; - b += 0.1412 * x; - x = c1 * m * y * k; // 0 1 1 1 - r += 0.1333 * x; - x = c * m1 * y1 * k1; // 1 0 0 0 - g += 0.6784 * x; - b += 0.9373 * x; - x = c * m1 * y1 * k; // 1 0 0 1 - g += 0.0588 * x; - b += 0.1412 * x; - x = c * m1 * y * k1; // 1 0 1 0 - g += 0.6510 * x; - b += 0.3137 * x; - x = c * m1 * y * k; // 1 0 1 1 - g += 0.0745 * x; - x = c * m * y1 * k1; // 1 1 0 0 - r += 0.1804 * x; - g += 0.1922 * x; - b += 0.5725 * x; - x = c * m * y1 * k; // 1 1 0 1 - b += 0.0078 * x; - x = c * m * y * k1; // 1 1 1 0 - r += 0.2118 * x; - g += 0.2119 * x; - b += 0.2235 * x; -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/GlobalParams.cc b/Build/source/libs/poppler/poppler-src/poppler/GlobalParams.cc deleted file mode 100644 index 6d8941ea3bc..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/GlobalParams.cc +++ /dev/null @@ -1,1607 +0,0 @@ -//======================================================================== -// -// GlobalParams.cc -// -// Copyright 2001-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2005 Martin Kretzschmar <martink@gnome.org> -// Copyright (C) 2005, 2006 Kristian Høgsberg <krh@redhat.com> -// Copyright (C) 2005, 2007-2010, 2012, 2015, 2017, 2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2005 Jonathan Blandford <jrb@redhat.com> -// Copyright (C) 2006, 2007 Jeff Muizelaar <jeff@infidigm.net> -// Copyright (C) 2006 Takashi Iwai <tiwai@suse.de> -// Copyright (C) 2006 Ed Catmur <ed@catmur.co.uk> -// Copyright (C) 2007 Krzysztof Kowalczyk <kkowalczyk@gmail.com> -// Copyright (C) 2007, 2009 Jonathan Kew <jonathan_kew@sil.org> -// Copyright (C) 2009 Petr Gajdos <pgajdos@novell.com> -// Copyright (C) 2009, 2011, 2012, 2015 William Bader <williambader@hotmail.com> -// Copyright (C) 2009 Kovid Goyal <kovid@kovidgoyal.net> -// Copyright (C) 2010, 2012 Hib Eris <hib@hiberis.nl> -// Copyright (C) 2010 Patrick Spendrin <ps_ml@gmx.de> -// Copyright (C) 2010 Jakub Wilk <jwilk@jwilk.net> -// Copyright (C) 2011 Pino Toscano <pino@kde.org> -// Copyright (C) 2011 Koji Otani <sho@bbr.jp> -// Copyright (C) 2012 Yi Yang <ahyangyi@gmail.com> -// Copyright (C) 2012, 2017 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2012 Thomas Freitag <Thomas.Freitag@alfa.de> -// Copyright (C) 2012 Peter Breitenlohner <peb@mppmu.mpg.de> -// Copyright (C) 2013, 2014 Jason Crain <jason@aquaticape.us> -// Copyright (C) 2017 Christoph Cullmann <cullmann@kde.org> -// Copyright (C) 2017 Jean Ghali <jghali@libertysurf.fr> -// 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 -// Copyright (C) 2018 Adam Reichold <adam.reichold@t-online.de> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include <config.h> - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include <string.h> -#include <stdio.h> -#include <ctype.h> -#ifdef ENABLE_PLUGINS -# ifndef _WIN32 -# include <dlfcn.h> -# endif -#endif -#ifdef _WIN32 -# include <shlobj.h> -# include <mbstring.h> -#endif -#include "goo/glibc.h" -#include "goo/gmem.h" -#include "goo/GooString.h" -#include "goo/GooList.h" -#include "goo/gfile.h" -#include "Error.h" -#include "NameToCharCode.h" -#include "CharCodeToUnicode.h" -#include "UnicodeMap.h" -#include "CMap.h" -#include "BuiltinFontTables.h" -#include "FontEncodingTables.h" -#ifdef ENABLE_PLUGINS -# include "XpdfPluginAPI.h" -#endif -#include "GlobalParams.h" -#include "GfxFont.h" - -#ifdef WITH_FONTCONFIGURATION_FONTCONFIG -#include <fontconfig/fontconfig.h> -#endif - -#ifdef _MSC_VER -# define strcasecmp stricmp -#else -# include <strings.h> -#endif - -#ifdef MULTITHREADED -# define lockGlobalParams gLockMutex(&mutex) -# define lockUnicodeMapCache gLockMutex(&unicodeMapCacheMutex) -# define lockCMapCache gLockMutex(&cMapCacheMutex) -# define unlockGlobalParams gUnlockMutex(&mutex) -# define unlockUnicodeMapCache gUnlockMutex(&unicodeMapCacheMutex) -# define unlockCMapCache gUnlockMutex(&cMapCacheMutex) -#else -# define lockGlobalParams -# define lockUnicodeMapCache -# define lockCMapCache -# define unlockGlobalParams -# define unlockUnicodeMapCache -# define unlockCMapCache -#endif - -#ifndef FC_WEIGHT_BOOK -#define FC_WEIGHT_BOOK 75 -#endif - -#include "NameToUnicodeTable.h" -#include "UnicodeMapTables.h" -#include "UnicodeMapFuncs.h" - -#ifdef ENABLE_PLUGINS -# ifdef _WIN32 -extern XpdfPluginVecTable xpdfPluginVecTable; -# endif -#endif - -//------------------------------------------------------------------------ - -#define cidToUnicodeCacheSize 4 -#define unicodeToUnicodeCacheSize 4 - -//------------------------------------------------------------------------ - -GlobalParams *globalParams = nullptr; - -#if defined(ENABLE_RELOCATABLE) && defined(_WIN32) - -/* search for data relative to where we are installed */ - -static HMODULE hmodule; - -extern "C" { - /* Provide declaration to squelch -Wmissing-declarations warning */ - BOOL WINAPI - DllMain (HINSTANCE hinstDLL, - DWORD fdwReason, - LPVOID lpvReserved); - - BOOL WINAPI - DllMain (HINSTANCE hinstDLL, - DWORD fdwReason, - LPVOID lpvReserved) - { - switch (fdwReason) { - case DLL_PROCESS_ATTACH: - hmodule = hinstDLL; - break; - } - - return TRUE; - } -} - -static const char * -get_poppler_datadir (void) -{ - static char retval[MAX_PATH]; - static int beenhere = 0; - - unsigned char *p; - - if (beenhere) - return retval; - - if (!GetModuleFileNameA (hmodule, (CHAR *) retval, sizeof(retval) - 20)) - return POPPLER_DATADIR; - - p = _mbsrchr ((unsigned char *) retval, '\\'); - *p = '\0'; - p = _mbsrchr ((unsigned char *) retval, '\\'); - if (p) { - if (stricmp ((const char *) (p+1), "bin") == 0) - *p = '\0'; - } - strcat (retval, "\\share\\poppler"); - - beenhere = 1; - - return retval; -} - -#undef POPPLER_DATADIR -#define POPPLER_DATADIR get_poppler_datadir () - -#endif - -//------------------------------------------------------------------------ -// SysFontInfo -//------------------------------------------------------------------------ - -class SysFontInfo { -public: - - GooString *name; - GBool bold; - GBool italic; - GBool oblique; - GBool fixedWidth; - GooString *path; - SysFontType type; - int fontNum; // for TrueType collections - GooString *substituteName; - - SysFontInfo(GooString *nameA, GBool boldA, GBool italicA, GBool obliqueA, GBool fixedWidthA, - GooString *pathA, SysFontType typeA, int fontNumA, GooString *substituteNameA); - ~SysFontInfo(); - SysFontInfo(const SysFontInfo &) = delete; - SysFontInfo& operator=(const SysFontInfo&) = delete; - GBool match(SysFontInfo *fi); - GBool match(GooString *nameA, GBool boldA, GBool italicA, GBool obliqueA, GBool fixedWidthA); - GBool match(GooString *nameA, GBool boldA, GBool italicA); -}; - -SysFontInfo::SysFontInfo(GooString *nameA, GBool boldA, GBool italicA, GBool obliqueA, GBool fixedWidthA, - GooString *pathA, SysFontType typeA, int fontNumA, GooString *substituteNameA) { - name = nameA; - bold = boldA; - italic = italicA; - oblique = obliqueA; - fixedWidth = fixedWidthA; - path = pathA; - type = typeA; - fontNum = fontNumA; - substituteName = substituteNameA; -} - -SysFontInfo::~SysFontInfo() { - delete name; - delete path; - delete substituteName; -} - -GBool SysFontInfo::match(SysFontInfo *fi) { - return !strcasecmp(name->getCString(), fi->name->getCString()) && - bold == fi->bold && italic == fi->italic && oblique == fi->oblique && fixedWidth == fi->fixedWidth; -} - -GBool SysFontInfo::match(GooString *nameA, GBool boldA, GBool italicA, GBool obliqueA, GBool fixedWidthA) { - return !strcasecmp(name->getCString(), nameA->getCString()) && - bold == boldA && italic == italicA && oblique == obliqueA && fixedWidth == fixedWidthA; -} - -GBool SysFontInfo::match(GooString *nameA, GBool boldA, GBool italicA) { - return !strcasecmp(name->getCString(), nameA->getCString()) && - bold == boldA && italic == italicA; -} - -//------------------------------------------------------------------------ -// SysFontList -//------------------------------------------------------------------------ - -class SysFontList { -public: - - SysFontList(); - ~SysFontList(); - SysFontList(const SysFontList &) = delete; - SysFontList& operator=(const SysFontList &) = delete; - SysFontInfo *find(const GooString *name, GBool isFixedWidth, GBool exact); - -#ifdef _WIN32 - void scanWindowsFonts(GooString *winFontDir); -#endif -#ifdef WITH_FONTCONFIGURATION_FONTCONFIG - void addFcFont(SysFontInfo *si) {fonts->append(si);} -#endif -private: - -#ifdef _WIN32 - SysFontInfo *makeWindowsFont(char *name, int fontNum, - char *path); -#endif - - GooList *fonts; // [SysFontInfo] -}; - -SysFontList::SysFontList() { - fonts = new GooList(); -} - -SysFontList::~SysFontList() { - deleteGooList(fonts, SysFontInfo); -} - -SysFontInfo *SysFontList::find(const GooString *name, GBool fixedWidth, GBool exact) { - GooString *name2; - GBool bold, italic, oblique; - SysFontInfo *fi; - char c; - int n, i; - - name2 = name->copy(); - - // remove space, comma, dash chars - i = 0; - while (i < name2->getLength()) { - c = name2->getChar(i); - if (c == ' ' || c == ',' || c == '-') { - name2->del(i); - } else { - ++i; - } - } - n = name2->getLength(); - - // remove trailing "MT" (Foo-MT, Foo-BoldMT, etc.) - if (n > 2 && !strcmp(name2->getCString() + n - 2, "MT")) { - name2->del(n - 2, 2); - n -= 2; - } - - // look for "Regular" - if (n > 7 && !strcmp(name2->getCString() + n - 7, "Regular")) { - name2->del(n - 7, 7); - n -= 7; - } - - // look for "Italic" - if (n > 6 && !strcmp(name2->getCString() + n - 6, "Italic")) { - name2->del(n - 6, 6); - italic = gTrue; - n -= 6; - } else { - italic = gFalse; - } - - // look for "Oblique" - if (n > 6 && !strcmp(name2->getCString() + n - 7, "Oblique")) { - name2->del(n - 7, 7); - oblique = gTrue; - n -= 6; - } else { - oblique = gFalse; - } - - // look for "Bold" - if (n > 4 && !strcmp(name2->getCString() + n - 4, "Bold")) { - name2->del(n - 4, 4); - bold = gTrue; - n -= 4; - } else { - bold = gFalse; - } - - // remove trailing "MT" (FooMT-Bold, etc.) - if (n > 2 && !strcmp(name2->getCString() + n - 2, "MT")) { - name2->del(n - 2, 2); - n -= 2; - } - - // remove trailing "PS" - if (n > 2 && !strcmp(name2->getCString() + n - 2, "PS")) { - name2->del(n - 2, 2); - n -= 2; - } - - // remove trailing "IdentityH" - if (n > 9 && !strcmp(name2->getCString() + n - 9, "IdentityH")) { - name2->del(n - 9, 9); - n -= 9; - } - - // search for the font - fi = nullptr; - for (i = 0; i < fonts->getLength(); ++i) { - fi = (SysFontInfo *)fonts->get(i); - if (fi->match(name2, bold, italic, oblique, fixedWidth)) { - break; - } - fi = nullptr; - } - if (!fi && !exact && bold) { - // try ignoring the bold flag - for (i = 0; i < fonts->getLength(); ++i) { - fi = (SysFontInfo *)fonts->get(i); - if (fi->match(name2, gFalse, italic)) { - break; - } - fi = nullptr; - } - } - if (!fi && !exact && (bold || italic)) { - // try ignoring the bold and italic flags - for (i = 0; i < fonts->getLength(); ++i) { - fi = (SysFontInfo *)fonts->get(i); - if (fi->match(name2, gFalse, gFalse)) { - break; - } - fi = nullptr; - } - } - - delete name2; - return fi; -} - - -#ifdef ENABLE_PLUGINS -//------------------------------------------------------------------------ -// Plugin -//------------------------------------------------------------------------ - -class Plugin { -public: - - static Plugin *load(char *type, char *name); - ~Plugin(); - -private: - -#ifdef _WIN32 - Plugin(HMODULE libA); - HMODULE lib; -#else - Plugin(void *dlA); - void *dl; -#endif -}; - -Plugin *Plugin::load(char *type, char *name) { - GooString *path; - Plugin *plugin; - XpdfPluginVecTable *vt; - XpdfBool (*xpdfInitPlugin)(void); -#ifdef _WIN32 - HMODULE libA; -#else - void *dlA; -#endif - - path = new GooString(POPPLER_DATADIR); - appendToPath(path, "plugins"); - appendToPath(path, type); - appendToPath(path, name); - -#ifdef _WIN32 - path->append(".dll"); - if (!(libA = LoadLibrary(path->getCString()))) { - error(errIO, -1, "Failed to load plugin '{0:t}'", path); - goto err1; - } - if (!(vt = (XpdfPluginVecTable *) - GetProcAddress(libA, "xpdfPluginVecTable"))) { - error(errIO, -1, "Failed to find xpdfPluginVecTable in plugin '{0:t}'", - path); - goto err2; - } -#else - //~ need to deal with other extensions here - path->append(".so"); - if (!(dlA = dlopen(path->getCString(), RTLD_NOW))) { - error(errIO, -1, "Failed to load plugin '{0:t}': {1:s}", - path, dlerror()); - goto err1; - } - if (!(vt = (XpdfPluginVecTable *)dlsym(dlA, "xpdfPluginVecTable"))) { - error(errIO, -1, "Failed to find xpdfPluginVecTable in plugin '{0:t}'", - path); - goto err2; - } -#endif - - if (vt->version != xpdfPluginVecTable.version) { - error(errIO, -1, "Plugin '{0:t}' is wrong version", path); - goto err2; - } - memcpy(vt, &xpdfPluginVecTable, sizeof(xpdfPluginVecTable)); - -#ifdef _WIN32 - if (!(xpdfInitPlugin = (XpdfBool (*)(void)) - GetProcAddress(libA, "xpdfInitPlugin"))) { - error(errIO, -1, "Failed to find xpdfInitPlugin in plugin '{0:t}'", - path); - goto err2; - } -#else - if (!(xpdfInitPlugin = (XpdfBool (*)(void))dlsym(dlA, "xpdfInitPlugin"))) { - error(errIO, -1, "Failed to find xpdfInitPlugin in plugin '{0:t}'", - path); - goto err2; - } -#endif - - if (!(*xpdfInitPlugin)()) { - error(errIO, -1, "Initialization of plugin '{0:t}' failed", path); - goto err2; - } - -#ifdef _WIN32 - plugin = new Plugin(libA); -#else - plugin = new Plugin(dlA); -#endif - - delete path; - return plugin; - - err2: -#ifdef _WIN32 - FreeLibrary(libA); -#else - dlclose(dlA); -#endif - err1: - delete path; - return NULL; -} - -#ifdef _WIN32 -Plugin::Plugin(HMODULE libA) { - lib = libA; -} -#else -Plugin::Plugin(void *dlA) { - dl = dlA; -} -#endif - -Plugin::~Plugin() { - void (*xpdfFreePlugin)(void); - -#ifdef _WIN32 - if ((xpdfFreePlugin = (void (*)(void)) - GetProcAddress(lib, "xpdfFreePlugin"))) { - (*xpdfFreePlugin)(); - } - FreeLibrary(lib); -#else - if ((xpdfFreePlugin = (void (*)(void))dlsym(dl, "xpdfFreePlugin"))) { - (*xpdfFreePlugin)(); - } - dlclose(dl); -#endif -} - -#endif // ENABLE_PLUGINS - -//------------------------------------------------------------------------ -// parsing -//------------------------------------------------------------------------ - -GlobalParams::GlobalParams(const char *customPopplerDataDir) - : popplerDataDir(customPopplerDataDir) -{ -#ifdef MULTITHREADED - gInitMutex(&mutex); - gInitMutex(&unicodeMapCacheMutex); - gInitMutex(&cMapCacheMutex); -#endif - - initBuiltinFontTables(); - - // scan the encoding in reverse because we want the lowest-numbered - // index for each char name ('space' is encoded twice) - macRomanReverseMap = new NameToCharCode(); - for (int i = 255; i >= 0; --i) { - if (macRomanEncoding[i]) { - macRomanReverseMap->add(macRomanEncoding[i], (CharCode)i); - } - } - - nameToUnicodeZapfDingbats = new NameToCharCode(); - nameToUnicodeText = new NameToCharCode(); - toUnicodeDirs = new GooList(); - sysFonts = new SysFontList(); - psExpandSmaller = gFalse; - psShrinkLarger = gTrue; - psLevel = psLevel2; - textEncoding = new GooString("UTF-8"); -#if defined(_WIN32) - textEOL = eolDOS; -#elif defined(MACOS) - textEOL = eolMac; -#else - textEOL = eolUnix; -#endif - textPageBreaks = gTrue; - enableFreeType = gTrue; - overprintPreview = gFalse; - printCommands = gFalse; - profileCommands = gFalse; - errQuiet = gFalse; - - cidToUnicodeCache = new CharCodeToUnicodeCache(cidToUnicodeCacheSize); - unicodeToUnicodeCache = - new CharCodeToUnicodeCache(unicodeToUnicodeCacheSize); - unicodeMapCache = new UnicodeMapCache(); - cMapCache = new CMapCache(); - - baseFontsInitialized = gFalse; -#ifdef ENABLE_PLUGINS - plugins = new GooList(); - securityHandlers = new GooList(); -#endif - - // set up the initial nameToUnicode tables - for (int i = 0; nameToUnicodeZapfDingbatsTab[i].name; ++i) { - nameToUnicodeZapfDingbats->add(nameToUnicodeZapfDingbatsTab[i].name, nameToUnicodeZapfDingbatsTab[i].u); - } - - for (int i = 0; nameToUnicodeTextTab[i].name; ++i) { - nameToUnicodeText->add(nameToUnicodeTextTab[i].name, nameToUnicodeTextTab[i].u); - } - - // set up the residentUnicodeMaps table - residentUnicodeMaps.reserve(6); - UnicodeMap map = {"Latin1", gFalse, latin1UnicodeMapRanges, latin1UnicodeMapLen}; - residentUnicodeMaps.emplace(map.getEncodingName()->toStr(), std::move(map)); - map = {"ASCII7", gFalse, ascii7UnicodeMapRanges, ascii7UnicodeMapLen}; - residentUnicodeMaps.emplace(map.getEncodingName()->toStr(), std::move(map)); - map = {"Symbol", gFalse, symbolUnicodeMapRanges, symbolUnicodeMapLen}; - residentUnicodeMaps.emplace(map.getEncodingName()->toStr(), std::move(map)); - map = {"ZapfDingbats", gFalse, zapfDingbatsUnicodeMapRanges, zapfDingbatsUnicodeMapLen}; - residentUnicodeMaps.emplace(map.getEncodingName()->toStr(), std::move(map)); - map = {"UTF-8", gTrue, &mapUTF8}; - residentUnicodeMaps.emplace(map.getEncodingName()->toStr(), std::move(map)); - map = {"UTF-16", gTrue, &mapUTF16}; - residentUnicodeMaps.emplace(map.getEncodingName()->toStr(), std::move(map)); - - scanEncodingDirs(); -} - -void GlobalParams::scanEncodingDirs() { - GDir *dir; - GDirEntry *entry; - const char *dataRoot = popplerDataDir ? popplerDataDir : POPPLER_DATADIR; - - // allocate buffer large enough to append "/nameToUnicode" - size_t bufSize = strlen(dataRoot) + strlen("/nameToUnicode") + 1; - char *dataPathBuffer = new char[bufSize]; - - snprintf(dataPathBuffer, bufSize, "%s/nameToUnicode", dataRoot); - dir = new GDir(dataPathBuffer, gTrue); - while (entry = dir->getNextEntry(), entry != nullptr) { - if (!entry->isDir()) { - parseNameToUnicode(entry->getFullPath()); - } - delete entry; - } - delete dir; - - snprintf(dataPathBuffer, bufSize, "%s/cidToUnicode", dataRoot); - dir = new GDir(dataPathBuffer, gFalse); - while (entry = dir->getNextEntry(), entry != nullptr) { - addCIDToUnicode(entry->getName(), entry->getFullPath()); - delete entry; - } - delete dir; - - snprintf(dataPathBuffer, bufSize, "%s/unicodeMap", dataRoot); - dir = new GDir(dataPathBuffer, gFalse); - while (entry = dir->getNextEntry(), entry != nullptr) { - addUnicodeMap(entry->getName(), entry->getFullPath()); - delete entry; - } - delete dir; - - snprintf(dataPathBuffer, bufSize, "%s/cMap", dataRoot); - dir = new GDir(dataPathBuffer, gFalse); - while (entry = dir->getNextEntry(), entry != nullptr) { - addCMapDir(entry->getName(), entry->getFullPath()); - toUnicodeDirs->append(entry->getFullPath()->copy()); - delete entry; - } - delete dir; - - delete[] dataPathBuffer; -} - -void GlobalParams::parseNameToUnicode(GooString *name) { - char *tok1, *tok2; - FILE *f; - char buf[256]; - int line; - Unicode u; - char *tokptr; - - if (!(f = openFile(name->getCString(), "r"))) { - error(errIO, -1, "Couldn't open 'nameToUnicode' file '{0:t}'", - name); - return; - } - line = 1; - while (getLine(buf, sizeof(buf), f)) { - tok1 = strtok_r(buf, " \t\r\n", &tokptr); - tok2 = strtok_r(nullptr, " \t\r\n", &tokptr); - if (tok1 && tok2) { - sscanf(tok1, "%x", &u); - nameToUnicodeText->add(tok2, u); - } else { - error(errConfig, -1, "Bad line in 'nameToUnicode' file ({0:t}:{1:d})", - name, line); - } - ++line; - } - fclose(f); -} - -void GlobalParams::addCIDToUnicode(GooString *collection, GooString *fileName) { - cidToUnicodes[collection->toStr()] = fileName->toStr(); -} - -void GlobalParams::addUnicodeMap(GooString *encodingName, GooString *fileName) { - unicodeMaps[encodingName->toStr()] = fileName->toStr(); -} - -void GlobalParams::addCMapDir(GooString *collection, GooString *dir) { - cMapDirs.emplace(collection->toStr(), dir->toStr()); -} - -GBool GlobalParams::parseYesNo2(const char *token, GBool *flag) { - if (!strcmp(token, "yes")) { - *flag = gTrue; - } else if (!strcmp(token, "no")) { - *flag = gFalse; - } else { - return gFalse; - } - return gTrue; -} - -GlobalParams::~GlobalParams() { - freeBuiltinFontTables(); - - delete macRomanReverseMap; - - delete nameToUnicodeZapfDingbats; - delete nameToUnicodeText; - deleteGooList(toUnicodeDirs, GooString); - delete sysFonts; - delete textEncoding; - - delete cidToUnicodeCache; - delete unicodeToUnicodeCache; - delete unicodeMapCache; - delete cMapCache; - -#ifdef ENABLE_PLUGINS - delete securityHandlers; - deleteGooList(plugins, Plugin); -#endif - -#ifdef MULTITHREADED - gDestroyMutex(&mutex); - gDestroyMutex(&unicodeMapCacheMutex); - gDestroyMutex(&cMapCacheMutex); -#endif -} - -//------------------------------------------------------------------------ -// accessors -//------------------------------------------------------------------------ - -CharCode GlobalParams::getMacRomanCharCode(char *charName) { - // no need to lock - macRomanReverseMap is constant - return macRomanReverseMap->lookup(charName); -} - -Unicode GlobalParams::mapNameToUnicodeAll(const char *charName) { - // no need to lock - nameToUnicodeZapfDingbats and nameToUnicodeText are constant - Unicode u = nameToUnicodeZapfDingbats->lookup(charName); - if (!u) - u = nameToUnicodeText->lookup(charName); - return u; -} - -Unicode GlobalParams::mapNameToUnicodeText(const char *charName) { - // no need to lock - nameToUnicodeText is constant - return nameToUnicodeText->lookup(charName); -} - -UnicodeMap *GlobalParams::getResidentUnicodeMap(GooString *encodingName) { - UnicodeMap *map = nullptr; - - lockGlobalParams; - const auto unicodeMap = residentUnicodeMaps.find(encodingName->toStr()); - if (unicodeMap != residentUnicodeMaps.end()) { - map = &unicodeMap->second; - map->incRefCnt(); - } - unlockGlobalParams; - - return map; -} - -FILE *GlobalParams::getUnicodeMapFile(GooString *encodingName) { - FILE *file = nullptr; - - lockGlobalParams; - const auto unicodeMap = unicodeMaps.find(encodingName->toStr()); - if (unicodeMap != unicodeMaps.end()) { - file = openFile(unicodeMap->second.c_str(), "r"); - } - unlockGlobalParams; - - return file; -} - -FILE *GlobalParams::findCMapFile(GooString *collection, GooString *cMapName) { - FILE *file = nullptr; - - lockGlobalParams; - const auto cMapDirs = this->cMapDirs.equal_range(collection->toStr()); - for (auto cMapDir = cMapDirs.first; cMapDir != cMapDirs.second; ++cMapDir) { - auto* const path = new GooString(cMapDir->second); - appendToPath(path, cMapName->getCString()); - file = openFile(path->getCString(), "r"); - delete path; - if (file) { - break; - } - } - unlockGlobalParams; - return file; -} - -FILE *GlobalParams::findToUnicodeFile(GooString *name) { - GooString *dir, *fileName; - FILE *f; - int i; - - lockGlobalParams; - for (i = 0; i < toUnicodeDirs->getLength(); ++i) { - dir = (GooString *)toUnicodeDirs->get(i); - fileName = appendToPath(dir->copy(), name->getCString()); - f = openFile(fileName->getCString(), "r"); - delete fileName; - if (f) { - unlockGlobalParams; - return f; - } - } - unlockGlobalParams; - return nullptr; -} - -#ifdef WITH_FONTCONFIGURATION_FONTCONFIG -static GBool findModifier(const char *name, const char *modifier, const char **start) -{ - const char *match; - - if (name == nullptr) - return gFalse; - - match = strstr(name, modifier); - if (match) { - if (*start == nullptr || match < *start) - *start = match; - return gTrue; - } - else { - return gFalse; - } -} - -static const char *getFontLang(GfxFont *font) -{ - const char *lang; - - // find the language we want the font to support - if (font->isCIDFont()) - { - GooString *collection = ((GfxCIDFont *)font)->getCollection(); - if (collection) - { - if (strcmp(collection->getCString(), "Adobe-GB1") == 0) - lang = "zh-cn"; // Simplified Chinese - else if (strcmp(collection->getCString(), "Adobe-CNS1") == 0) - lang = "zh-tw"; // Traditional Chinese - else if (strcmp(collection->getCString(), "Adobe-Japan1") == 0) - lang = "ja"; // Japanese - else if (strcmp(collection->getCString(), "Adobe-Japan2") == 0) - lang = "ja"; // Japanese - else if (strcmp(collection->getCString(), "Adobe-Korea1") == 0) - lang = "ko"; // Korean - else if (strcmp(collection->getCString(), "Adobe-UCS") == 0) - lang = "xx"; - else if (strcmp(collection->getCString(), "Adobe-Identity") == 0) - lang = "xx"; - else - { - error(errUnimplemented, -1, "Unknown CID font collection, please report to poppler bugzilla."); - lang = "xx"; - } - } - else lang = "xx"; - } - else lang = "xx"; - return lang; -} - -static FcPattern *buildFcPattern(GfxFont *font, const GooString *base14Name) -{ - int weight = -1, - slant = -1, - width = -1, - spacing = -1; - bool deleteFamily = false; - char *family, *name, *modifiers; - const char *start; - FcPattern *p; - - // this is all heuristics will be overwritten if font had proper info - GooString copiedNameGooString(((base14Name == nullptr) ? font->getName() : base14Name)->getCString()); - name = copiedNameGooString.getCString(); - - modifiers = strchr (name, ','); - if (modifiers == nullptr) - modifiers = strchr (name, '-'); - - // remove the - from the names, for some reason, Fontconfig does not - // understand "MS-Mincho" but does with "MS Mincho" - int len = strlen(name); - for (int i = 0; i < len; i++) - name[i] = (name[i] == '-' ? ' ' : name[i]); - - start = nullptr; - findModifier(modifiers, "Regular", &start); - findModifier(modifiers, "Roman", &start); - - if (findModifier(modifiers, "Oblique", &start)) - slant = FC_SLANT_OBLIQUE; - if (findModifier(modifiers, "Italic", &start)) - slant = FC_SLANT_ITALIC; - if (findModifier(modifiers, "Bold", &start)) - weight = FC_WEIGHT_BOLD; - if (findModifier(modifiers, "Light", &start)) - weight = FC_WEIGHT_LIGHT; - if (findModifier(modifiers, "Medium", &start)) - weight = FC_WEIGHT_MEDIUM; - if (findModifier(modifiers, "Condensed", &start)) - width = FC_WIDTH_CONDENSED; - - if (start) { - // There have been "modifiers" in the name, crop them to obtain - // the family name - family = new char[len+1]; - strcpy(family, name); - int pos = (modifiers - name); - family[pos] = '\0'; - deleteFamily = true; - } - else { - family = name; - } - - // use font flags - if (font->isFixedWidth()) - spacing = FC_MONO; - if (font->isBold()) - weight = FC_WEIGHT_BOLD; - if (font->isItalic()) - slant = FC_SLANT_ITALIC; - - // if the FontDescriptor specified a family name use it - if (font->getFamily()) { - if (deleteFamily) { - delete[] family; - deleteFamily = false; - } - family = font->getFamily()->getCString(); - } - - // if the FontDescriptor specified a weight use it - switch (font -> getWeight()) - { - case GfxFont::W100: weight = FC_WEIGHT_EXTRALIGHT; break; - case GfxFont::W200: weight = FC_WEIGHT_LIGHT; break; - case GfxFont::W300: weight = FC_WEIGHT_BOOK; break; - case GfxFont::W400: weight = FC_WEIGHT_NORMAL; break; - case GfxFont::W500: weight = FC_WEIGHT_MEDIUM; break; - case GfxFont::W600: weight = FC_WEIGHT_DEMIBOLD; break; - case GfxFont::W700: weight = FC_WEIGHT_BOLD; break; - case GfxFont::W800: weight = FC_WEIGHT_EXTRABOLD; break; - case GfxFont::W900: weight = FC_WEIGHT_BLACK; break; - default: break; - } - - // if the FontDescriptor specified a width use it - switch (font -> getStretch()) - { - case GfxFont::UltraCondensed: width = FC_WIDTH_ULTRACONDENSED; break; - case GfxFont::ExtraCondensed: width = FC_WIDTH_EXTRACONDENSED; break; - case GfxFont::Condensed: width = FC_WIDTH_CONDENSED; break; - case GfxFont::SemiCondensed: width = FC_WIDTH_SEMICONDENSED; break; - case GfxFont::Normal: width = FC_WIDTH_NORMAL; break; - case GfxFont::SemiExpanded: width = FC_WIDTH_SEMIEXPANDED; break; - case GfxFont::Expanded: width = FC_WIDTH_EXPANDED; break; - case GfxFont::ExtraExpanded: width = FC_WIDTH_EXTRAEXPANDED; break; - case GfxFont::UltraExpanded: width = FC_WIDTH_ULTRAEXPANDED; break; - default: break; - } - - const char *lang = getFontLang(font); - - p = FcPatternBuild(nullptr, - FC_FAMILY, FcTypeString, family, - FC_LANG, FcTypeString, lang, - NULL); - if (slant != -1) FcPatternAddInteger(p, FC_SLANT, slant); - if (weight != -1) FcPatternAddInteger(p, FC_WEIGHT, weight); - if (width != -1) FcPatternAddInteger(p, FC_WIDTH, width); - if (spacing != -1) FcPatternAddInteger(p, FC_SPACING, spacing); - - if (deleteFamily) - delete[] family; - return p; -} -#endif - -GooString *GlobalParams::findFontFile(GooString *fontName) { - GooString *path = nullptr; - - setupBaseFonts(nullptr); - lockGlobalParams; - const auto fontFile = fontFiles.find(fontName->toStr()); - if (fontFile != fontFiles.end()) { - path = new GooString(fontFile->second); - } - unlockGlobalParams; - return path; -} - -/* if you can't or don't want to use Fontconfig, you need to implement - this function for your platform. For Windows, it's in GlobalParamsWin.cc -*/ -#ifdef WITH_FONTCONFIGURATION_FONTCONFIG -// not needed for fontconfig -void GlobalParams::setupBaseFonts(char *) { -} - -GooString *GlobalParams::findBase14FontFile(GooString *base14Name, GfxFont *font) { - SysFontType type; - int fontNum; - - return findSystemFontFile(font, &type, &fontNum, nullptr, base14Name); -} - -GooString *GlobalParams::findSystemFontFile(GfxFont *font, - SysFontType *type, - int *fontNum, GooString *substituteFontName, GooString *base14Name) { - SysFontInfo *fi = nullptr; - FcPattern *p=nullptr; - GooString *path = nullptr; - const GooString *fontName = font->getName(); - GooString substituteName; - if (!fontName) return nullptr; - lockGlobalParams; - - if ((fi = sysFonts->find(fontName, font->isFixedWidth(), gTrue))) { - path = fi->path->copy(); - *type = fi->type; - *fontNum = fi->fontNum; - substituteName.Set(fi->substituteName->getCString()); - } else { - FcChar8* s; - char * ext; - FcResult res; - FcFontSet *set; - int i; - FcLangSet *lb = nullptr; - p = buildFcPattern(font, base14Name); - - if (!p) - goto fin; - FcConfigSubstitute(nullptr, p, FcMatchPattern); - FcDefaultSubstitute(p); - set = FcFontSort(nullptr, p, FcFalse, nullptr, &res); - if (!set) - goto fin; - - // find the language we want the font to support - const char *lang = getFontLang(font); - if (strcmp(lang,"xx") != 0) { - lb = FcLangSetCreate(); - FcLangSetAdd(lb,(FcChar8 *)lang); - } - - /* - scan twice. - first: fonts support the language - second: all fonts (fall back) - */ - while (fi == nullptr) - { - for (i = 0; i < set->nfont; ++i) - { - res = FcPatternGetString(set->fonts[i], FC_FILE, 0, &s); - if (res != FcResultMatch || !s) - continue; - if (lb != nullptr) { - FcLangSet *l; - res = FcPatternGetLangSet(set->fonts[i], FC_LANG, 0, &l); - if (res != FcResultMatch || !FcLangSetContains(l,lb)) { - continue; - } - } - FcChar8* s2; - res = FcPatternGetString(set->fonts[i], FC_FULLNAME, 0, &s2); - if (res == FcResultMatch && s2) { - substituteName.Set((char*)s2); - } else { - // fontconfig does not extract fullname for some fonts - // create the fullname from family and style - res = FcPatternGetString(set->fonts[i], FC_FAMILY, 0, &s2); - if (res == FcResultMatch && s2) { - substituteName.Set((char*)s2); - res = FcPatternGetString(set->fonts[i], FC_STYLE, 0, &s2); - if (res == FcResultMatch && s2) { - GooString *style = new GooString((char*)s2); - if (style->cmp("Regular") != 0) { - substituteName.append(" "); - substituteName.append(style); - } - delete style; - } - } - } - ext = strrchr((char*)s,'.'); - if (!ext) - continue; - if (!strncasecmp(ext,".ttf",4) || !strncasecmp(ext, ".ttc", 4) || !strncasecmp(ext, ".otf", 4)) - { - int weight, slant; - GBool bold = font->isBold(); - GBool italic = font->isItalic(); - GBool oblique = gFalse; - FcPatternGetInteger(set->fonts[i], FC_WEIGHT, 0, &weight); - FcPatternGetInteger(set->fonts[i], FC_SLANT, 0, &slant); - if (weight == FC_WEIGHT_DEMIBOLD || weight == FC_WEIGHT_BOLD - || weight == FC_WEIGHT_EXTRABOLD || weight == FC_WEIGHT_BLACK) - { - bold = gTrue; - } - if (slant == FC_SLANT_ITALIC) - italic = gTrue; - if (slant == FC_SLANT_OBLIQUE) - oblique = gTrue; - *fontNum = 0; - *type = (!strncasecmp(ext,".ttc",4)) ? sysFontTTC : sysFontTTF; - FcPatternGetInteger(set->fonts[i], FC_INDEX, 0, fontNum); - fi = new SysFontInfo(fontName->copy(), bold, italic, oblique, font->isFixedWidth(), - new GooString((char*)s), *type, *fontNum, substituteName.copy()); - sysFonts->addFcFont(fi); - path = new GooString((char*)s); - } - else if (!strncasecmp(ext,".pfa",4) || !strncasecmp(ext,".pfb",4)) - { - int weight, slant; - GBool bold = font->isBold(); - GBool italic = font->isItalic(); - GBool oblique = gFalse; - FcPatternGetInteger(set->fonts[i], FC_WEIGHT, 0, &weight); - FcPatternGetInteger(set->fonts[i], FC_SLANT, 0, &slant); - if (weight == FC_WEIGHT_DEMIBOLD || weight == FC_WEIGHT_BOLD - || weight == FC_WEIGHT_EXTRABOLD || weight == FC_WEIGHT_BLACK) - { - bold = gTrue; - } - if (slant == FC_SLANT_ITALIC) - italic = gTrue; - if (slant == FC_SLANT_OBLIQUE) - oblique = gTrue; - *fontNum = 0; - *type = (!strncasecmp(ext,".pfa",4)) ? sysFontPFA : sysFontPFB; - FcPatternGetInteger(set->fonts[i], FC_INDEX, 0, fontNum); - fi = new SysFontInfo(fontName->copy(), bold, italic, oblique, font->isFixedWidth(), - new GooString((char*)s), *type, *fontNum, substituteName.copy()); - sysFonts->addFcFont(fi); - path = new GooString((char*)s); - } - else - continue; - break; - } - if (lb != nullptr) { - FcLangSetDestroy(lb); - lb = nullptr; - } else { - /* scan all fonts of the list */ - break; - } - } - FcFontSetDestroy(set); - } - if (path == nullptr && (fi = sysFonts->find(fontName, font->isFixedWidth(), gFalse))) { - path = fi->path->copy(); - *type = fi->type; - *fontNum = fi->fontNum; - } - if (substituteFontName) { - substituteFontName->Set(substituteName.getCString()); - } -fin: - if (p) - FcPatternDestroy(p); - unlockGlobalParams; - return path; -} - -#elif WITH_FONTCONFIGURATION_WIN32 -#include "GlobalParamsWin.cc" - -GooString *GlobalParams::findBase14FontFile(GooString *base14Name, GfxFont *font) { - return findFontFile(base14Name); -} -#else -GooString *GlobalParams::findBase14FontFile(GooString *base14Name, GfxFont *font) { - return findFontFile(base14Name); -} - -static struct { - const char *name; - const char *t1FileName; - const char *ttFileName; -} displayFontTab[] = { - {"Courier", "n022003l.pfb", "cour.ttf"}, - {"Courier-Bold", "n022004l.pfb", "courbd.ttf"}, - {"Courier-BoldOblique", "n022024l.pfb", "courbi.ttf"}, - {"Courier-Oblique", "n022023l.pfb", "couri.ttf"}, - {"Helvetica", "n019003l.pfb", "arial.ttf"}, - {"Helvetica-Bold", "n019004l.pfb", "arialbd.ttf"}, - {"Helvetica-BoldOblique", "n019024l.pfb", "arialbi.ttf"}, - {"Helvetica-Oblique", "n019023l.pfb", "ariali.ttf"}, - {"Symbol", "s050000l.pfb", NULL}, - {"Times-Bold", "n021004l.pfb", "timesbd.ttf"}, - {"Times-BoldItalic", "n021024l.pfb", "timesbi.ttf"}, - {"Times-Italic", "n021023l.pfb", "timesi.ttf"}, - {"Times-Roman", "n021003l.pfb", "times.ttf"}, - {"ZapfDingbats", "d050000l.pfb", NULL}, - {NULL} -}; - -static const char *displayFontDirs[] = { - "/usr/share/ghostscript/fonts", - "/usr/local/share/ghostscript/fonts", - "/usr/share/fonts/default/Type1", - "/usr/share/fonts/default/ghostscript", - "/usr/share/fonts/type1/gsfonts", - NULL -}; - -void GlobalParams::setupBaseFonts(char *dir) { - GooString *fontName; - GooString *fileName; - FILE *f; - int i, j; - - for (i = 0; displayFontTab[i].name; ++i) { - if (fontFiles.count(displayFontTab[i].name) > 0) { - continue; - } - fontName = new GooString(displayFontTab[i].name); - fileName = NULL; - if (dir) { - fileName = appendToPath(new GooString(dir), displayFontTab[i].t1FileName); - if ((f = fopen(fileName->getCString(), "rb"))) { - fclose(f); - } else { - delete fileName; - fileName = NULL; - } - } - for (j = 0; !fileName && displayFontDirs[j]; ++j) { - fileName = appendToPath(new GooString(displayFontDirs[j]), - displayFontTab[i].t1FileName); - if ((f = fopen(fileName->getCString(), "rb"))) { - fclose(f); - } else { - delete fileName; - fileName = NULL; - } - } - if (!fileName) { - error(errConfig, -1, "No display font for '{0:s}'", - displayFontTab[i].name); - delete fontName; - continue; - } - addFontFile(fontName, fileName); - } - -} - -GooString *GlobalParams::findSystemFontFile(GfxFont *font, - SysFontType *type, - int *fontNum, GooString * /*substituteFontName*/, - GooString * /*base14Name*/) { - SysFontInfo *fi; - GooString *path; - - const GooString *fontName = font->getName(); - if (!fontName) return nullptr; - - path = NULL; - lockGlobalParams; - if ((fi = sysFonts->find(fontName, font->isFixedWidth(), gFalse))) { - path = fi->path->copy(); - *type = fi->type; - *fontNum = fi->fontNum; - } - unlockGlobalParams; - return path; -} -#endif - -GBool GlobalParams::getPSExpandSmaller() { - GBool f; - - lockGlobalParams; - f = psExpandSmaller; - unlockGlobalParams; - return f; -} - -GBool GlobalParams::getPSShrinkLarger() { - GBool f; - - lockGlobalParams; - f = psShrinkLarger; - unlockGlobalParams; - return f; -} - -PSLevel GlobalParams::getPSLevel() { - PSLevel level; - - lockGlobalParams; - level = psLevel; - unlockGlobalParams; - return level; -} - -GooString *GlobalParams::getTextEncodingName() { - GooString *s; - - lockGlobalParams; - s = textEncoding->copy(); - unlockGlobalParams; - return s; -} - -EndOfLineKind GlobalParams::getTextEOL() { - EndOfLineKind eol; - - lockGlobalParams; - eol = textEOL; - unlockGlobalParams; - return eol; -} - -GBool GlobalParams::getTextPageBreaks() { - GBool pageBreaks; - - lockGlobalParams; - pageBreaks = textPageBreaks; - unlockGlobalParams; - return pageBreaks; -} - -GBool GlobalParams::getEnableFreeType() { - GBool f; - - lockGlobalParams; - f = enableFreeType; - unlockGlobalParams; - return f; -} - -GBool GlobalParams::getPrintCommands() { - GBool p; - - lockGlobalParams; - p = printCommands; - unlockGlobalParams; - return p; -} - -GBool GlobalParams::getProfileCommands() { - GBool p; - - lockGlobalParams; - p = profileCommands; - unlockGlobalParams; - return p; -} - -GBool GlobalParams::getErrQuiet() { - // no locking -- this function may get called from inside a locked - // section - return errQuiet; -} - -CharCodeToUnicode *GlobalParams::getCIDToUnicode(GooString *collection) { - CharCodeToUnicode *ctu; - - lockGlobalParams; - if (!(ctu = cidToUnicodeCache->getCharCodeToUnicode(collection))) { - const auto cidToUnicode = cidToUnicodes.find(collection->toStr()); - if (cidToUnicode != cidToUnicodes.end()) { - if((ctu = CharCodeToUnicode::parseCIDToUnicode(cidToUnicode->second.c_str(), collection))) { - cidToUnicodeCache->add(ctu); - } - } - } - unlockGlobalParams; - return ctu; -} - -UnicodeMap *GlobalParams::getUnicodeMap(GooString *encodingName) { - return getUnicodeMap2(encodingName); -} - -UnicodeMap *GlobalParams::getUnicodeMap2(GooString *encodingName) { - UnicodeMap *map; - - if (!(map = getResidentUnicodeMap(encodingName))) { - lockUnicodeMapCache; - map = unicodeMapCache->getUnicodeMap(encodingName); - unlockUnicodeMapCache; - } - return map; -} - -CMap *GlobalParams::getCMap(GooString *collection, GooString *cMapName, Stream *stream) { - CMap *cMap; - - lockCMapCache; - cMap = cMapCache->getCMap(collection, cMapName, stream); - unlockCMapCache; - return cMap; -} - -UnicodeMap *GlobalParams::getTextEncoding() { - return getUnicodeMap2(textEncoding); -} - -GooList *GlobalParams::getEncodingNames() -{ - auto* const result = new GooList; - for (const auto& unicodeMap : residentUnicodeMaps) { - result->append(new GooString(unicodeMap.first)); - } - for (const auto& unicodeMap : unicodeMaps) { - result->append(new GooString(unicodeMap.first)); - } - return result; -} - -//------------------------------------------------------------------------ -// functions to set parameters -//------------------------------------------------------------------------ - -void GlobalParams::addFontFile(GooString *fontName, GooString *path) { - lockGlobalParams; - fontFiles[fontName->toStr()] = path->toStr(); - unlockGlobalParams; -} - -void GlobalParams::setPSExpandSmaller(GBool expand) { - lockGlobalParams; - psExpandSmaller = expand; - unlockGlobalParams; -} - -void GlobalParams::setPSShrinkLarger(GBool shrink) { - lockGlobalParams; - psShrinkLarger = shrink; - unlockGlobalParams; -} - -void GlobalParams::setPSLevel(PSLevel level) { - lockGlobalParams; - psLevel = level; - unlockGlobalParams; -} - -void GlobalParams::setTextEncoding(char *encodingName) { - lockGlobalParams; - delete textEncoding; - textEncoding = new GooString(encodingName); - unlockGlobalParams; -} - -GBool GlobalParams::setTextEOL(char *s) { - lockGlobalParams; - if (!strcmp(s, "unix")) { - textEOL = eolUnix; - } else if (!strcmp(s, "dos")) { - textEOL = eolDOS; - } else if (!strcmp(s, "mac")) { - textEOL = eolMac; - } else { - unlockGlobalParams; - return gFalse; - } - unlockGlobalParams; - return gTrue; -} - -void GlobalParams::setTextPageBreaks(GBool pageBreaks) { - lockGlobalParams; - textPageBreaks = pageBreaks; - unlockGlobalParams; -} - -GBool GlobalParams::setEnableFreeType(char *s) { - GBool ok; - - lockGlobalParams; - ok = parseYesNo2(s, &enableFreeType); - unlockGlobalParams; - return ok; -} - -void GlobalParams::setOverprintPreview(GBool overprintPreviewA) { - lockGlobalParams; - overprintPreview = overprintPreviewA; - unlockGlobalParams; -} - -void GlobalParams::setPrintCommands(GBool printCommandsA) { - lockGlobalParams; - printCommands = printCommandsA; - unlockGlobalParams; -} - -void GlobalParams::setProfileCommands(GBool profileCommandsA) { - lockGlobalParams; - profileCommands = profileCommandsA; - unlockGlobalParams; -} - -void GlobalParams::setErrQuiet(GBool errQuietA) { - lockGlobalParams; - errQuiet = errQuietA; - unlockGlobalParams; -} - -void GlobalParams::addSecurityHandler(XpdfSecurityHandler *handler) { -#ifdef ENABLE_PLUGINS - lockGlobalParams; - securityHandlers->append(handler); - unlockGlobalParams; -#endif -} - -XpdfSecurityHandler *GlobalParams::getSecurityHandler(char *name) { -#ifdef ENABLE_PLUGINS - XpdfSecurityHandler *hdlr; - int i; - - lockGlobalParams; - for (i = 0; i < securityHandlers->getLength(); ++i) { - hdlr = (XpdfSecurityHandler *)securityHandlers->get(i); - if (!strcasecmp(hdlr->name, name)) { - unlockGlobalParams; - return hdlr; - } - } - unlockGlobalParams; - - if (!loadPlugin("security", name)) { - return NULL; - } - - lockGlobalParams; - for (i = 0; i < securityHandlers->getLength(); ++i) { - hdlr = (XpdfSecurityHandler *)securityHandlers->get(i); - if (!strcmp(hdlr->name, name)) { - unlockGlobalParams; - return hdlr; - } - } - unlockGlobalParams; -#else - (void)name; -#endif - - return nullptr; -} - -#ifdef ENABLE_PLUGINS -//------------------------------------------------------------------------ -// plugins -//------------------------------------------------------------------------ - -GBool GlobalParams::loadPlugin(char *type, char *name) { - Plugin *plugin; - - if (!(plugin = Plugin::load(type, name))) { - return gFalse; - } - lockGlobalParams; - plugins->append(plugin); - unlockGlobalParams; - return gTrue; -} - -#endif // ENABLE_PLUGINS diff --git a/Build/source/libs/poppler/poppler-src/poppler/GlobalParams.h b/Build/source/libs/poppler/poppler-src/poppler/GlobalParams.h deleted file mode 100644 index 37124f6bc0c..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/GlobalParams.h +++ /dev/null @@ -1,257 +0,0 @@ -//======================================================================== -// -// GlobalParams.h -// -// Copyright 2001-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2005, 2007-2010, 2012, 2015, 2017, 2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2005 Jonathan Blandford <jrb@redhat.com> -// Copyright (C) 2006 Takashi Iwai <tiwai@suse.de> -// Copyright (C) 2006 Kristian Høgsberg <krh@redhat.com> -// Copyright (C) 2007 Krzysztof Kowalczyk <kkowalczyk@gmail.com> -// Copyright (C) 2009 Jonathan Kew <jonathan_kew@sil.org> -// Copyright (C) 2009 Petr Gajdos <pgajdos@novell.com> -// Copyright (C) 2009, 2011, 2012, 2014, 2015 William Bader <williambader@hotmail.com> -// Copyright (C) 2010 Hib Eris <hib@hiberis.nl> -// Copyright (C) 2011 Pino Toscano <pino@kde.org> -// Copyright (C) 2012, 2017 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2012 Thomas Freitag <Thomas.Freitag@alfa.de> -// Copyright (C) 2013 Jason Crain <jason@aquaticape.us> -// Copyright (C) 2018 Adam Reichold <adam.reichold@t-online.de> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef GLOBALPARAMS_H -#define GLOBALPARAMS_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include <assert.h> -#include "poppler-config.h" -#include <stdio.h> -#include "goo/gtypes.h" -#include "CharTypes.h" -#include "UnicodeMap.h" -#include <unordered_map> -#include <string> - -#ifdef MULTITHREADED -#include "goo/GooMutex.h" -#endif - -class GooString; -class GooList; -class NameToCharCode; -class CharCodeToUnicode; -class CharCodeToUnicodeCache; -class UnicodeMapCache; -class CMap; -class CMapCache; -struct XpdfSecurityHandler; -class GlobalParams; -class GfxFont; -class Stream; -class SysFontList; - -//------------------------------------------------------------------------ - -// The global parameters object. -extern GlobalParams *globalParams; - -//------------------------------------------------------------------------ - -enum SysFontType { - sysFontPFA, - sysFontPFB, - sysFontTTF, - sysFontTTC -}; - -//------------------------------------------------------------------------ - -enum PSLevel { - psLevel1, - psLevel1Sep, - psLevel2, - psLevel2Sep, - psLevel3, - psLevel3Sep -}; - -//------------------------------------------------------------------------ - -enum EndOfLineKind { - eolUnix, // LF - eolDOS, // CR+LF - eolMac // CR -}; - -//------------------------------------------------------------------------ - -class GlobalParams { -public: - - // Initialize the global parameters - GlobalParams(const char *customPopplerDataDir = NULL); - - ~GlobalParams(); - - GlobalParams(const GlobalParams &) = delete; - GlobalParams& operator=(const GlobalParams &) = delete; - - void setupBaseFonts(char *dir); - - //----- accessors - - CharCode getMacRomanCharCode(char *charName); - - // Return Unicode values for character names. Used for general text - // extraction. - Unicode mapNameToUnicodeText(const char *charName); - - // Return Unicode values for character names. Used for glyph - // lookups or text extraction with ZapfDingbats fonts. - Unicode mapNameToUnicodeAll(const char *charName); - - UnicodeMap *getResidentUnicodeMap(GooString *encodingName); - FILE *getUnicodeMapFile(GooString *encodingName); - FILE *findCMapFile(GooString *collection, GooString *cMapName); - FILE *findToUnicodeFile(GooString *name); - GooString *findFontFile(GooString *fontName); - GooString *findBase14FontFile(GooString *base14Name, GfxFont *font); - GooString *findSystemFontFile(GfxFont *font, SysFontType *type, - int *fontNum, GooString *substituteFontName = NULL, - GooString *base14Name = NULL); - GBool getPSExpandSmaller(); - GBool getPSShrinkLarger(); - PSLevel getPSLevel(); - GooString *getTextEncodingName(); - EndOfLineKind getTextEOL(); - GBool getTextPageBreaks(); - GBool getEnableFreeType(); - GBool getOverprintPreview() { return overprintPreview; } - GBool getPrintCommands(); - GBool getProfileCommands(); - GBool getErrQuiet(); - - CharCodeToUnicode *getCIDToUnicode(GooString *collection); - UnicodeMap *getUnicodeMap(GooString *encodingName); - CMap *getCMap(GooString *collection, GooString *cMapName, Stream *stream = NULL); - UnicodeMap *getTextEncoding(); -#ifdef ENABLE_PLUGINS - GBool loadPlugin(char *type, char *name); -#endif - - GooList *getEncodingNames(); - - //----- functions to set parameters - void addFontFile(GooString *fontName, GooString *path); - void setPSExpandSmaller(GBool expand); - void setPSShrinkLarger(GBool shrink); - void setPSLevel(PSLevel level); - void setTextEncoding(char *encodingName); - GBool setTextEOL(char *s); - void setTextPageBreaks(GBool pageBreaks); - GBool setEnableFreeType(char *s); - void setOverprintPreview(GBool overprintPreviewA); - void setPrintCommands(GBool printCommandsA); - void setProfileCommands(GBool profileCommandsA); - void setErrQuiet(GBool errQuietA); - - static GBool parseYesNo2(const char *token, GBool *flag); - - //----- security handlers - - void addSecurityHandler(XpdfSecurityHandler *handler); - XpdfSecurityHandler *getSecurityHandler(char *name); - -private: - - void parseNameToUnicode(GooString *name); - UnicodeMap *getUnicodeMap2(GooString *encodingName); - - void scanEncodingDirs(); - void addCIDToUnicode(GooString *collection, GooString *fileName); - void addUnicodeMap(GooString *encodingName, GooString *fileName); - void addCMapDir(GooString *collection, GooString *dir); - - //----- static tables - - NameToCharCode * // mapping from char name to - macRomanReverseMap; // MacRomanEncoding index - - //----- user-modifiable settings - - NameToCharCode * // mapping from char name to Unicode for ZapfDingbats - nameToUnicodeZapfDingbats; - NameToCharCode * // mapping from char name to Unicode for text - nameToUnicodeText; // extraction - // files for mappings from char collections - // to Unicode, indexed by collection name - std::unordered_map<std::string, std::string> cidToUnicodes; - // mappings from Unicode to char codes, - // indexed by encoding name - std::unordered_map<std::string, UnicodeMap> residentUnicodeMaps; - // files for mappings from Unicode to char - // codes, indexed by encoding name - std::unordered_map<std::string, std::string> unicodeMaps; - // list of CMap dirs, indexed by collection - std::unordered_multimap<std::string, std::string> cMapDirs; - GooList *toUnicodeDirs; // list of ToUnicode CMap dirs [GooString] - GBool baseFontsInitialized; -#ifdef _WIN32 - // windows font substitutes (for CID fonts) - std::unordered_map<std::string, std::string> substFiles; -#endif - // font files: font name mapped to path - std::unordered_map<std::string, std::string> fontFiles; - SysFontList *sysFonts; // system fonts - GBool psExpandSmaller; // expand smaller pages to fill paper - GBool psShrinkLarger; // shrink larger pages to fit paper - PSLevel psLevel; // PostScript level to generate - GooString *textEncoding; // encoding (unicodeMap) to use for text - // output - EndOfLineKind textEOL; // type of EOL marker to use for text - // output - GBool textPageBreaks; // insert end-of-page markers? - GBool enableFreeType; // FreeType enable flag - GBool overprintPreview; // enable overprint preview - GBool printCommands; // print the drawing commands - GBool profileCommands; // profile the drawing commands - GBool errQuiet; // suppress error messages? - - CharCodeToUnicodeCache *cidToUnicodeCache; - CharCodeToUnicodeCache *unicodeToUnicodeCache; - UnicodeMapCache *unicodeMapCache; - CMapCache *cMapCache; - -#ifdef ENABLE_PLUGINS - GooList *plugins; // list of plugins [Plugin] - GooList *securityHandlers; // list of loaded security handlers - // [XpdfSecurityHandler] -#endif - -#ifdef MULTITHREADED - GooMutex mutex; - GooMutex unicodeMapCacheMutex; - GooMutex cMapCacheMutex; -#endif - - const char *popplerDataDir; -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/GlobalParamsWin.cc b/Build/source/libs/poppler/poppler-src/poppler/GlobalParamsWin.cc deleted file mode 100644 index 9e041777653..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/GlobalParamsWin.cc +++ /dev/null @@ -1,592 +0,0 @@ -/* Written by Krzysztof Kowalczyk (http://blog.kowalczyk.info) - but mostly based on xpdf code. - - // Copyright (C) 2010, 2012 Hib Eris <hib@hiberis.nl> - // Copyright (C) 2012, 2013 Thomas Freitag <Thomas.Freitag@alfa.de> - // Copyright (C) 2012 Suzuki Toshiya <mpsuzuki@hiroshima-u.ac.jp> - // Copyright (C) 2012, 2017 Adrian Johnson <ajohnson@redneon.com> - // Copyright (C) 2012 Mark Brand <mabrand@mabrand.nl> - // Copyright (C) 2013, 2018 Adam Reichold <adamreichold@myopera.com> - // Copyright (C) 2013 Dmytro Morgun <lztoad@gmail.com> - // Copyright (C) 2017 Christoph Cullmann <cullmann@kde.org> - // Copyright (C) 2017, 2018 Albert Astals Cid <aacid@kde.org> - // 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 - -TODO: instead of a fixed mapping defined in displayFontTab, it could -scan the whole fonts directory, parse TTF files and build font -description for all fonts available in Windows. That's how MuPDF works. -*/ - -#ifndef PACKAGE_NAME -#include <config.h> -#endif - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include <windows.h> -#if !(_WIN32_IE >= 0x0500) -#error "_WIN32_IE must be defined >= 0x0500 for SHGFP_TYPE_CURRENT from shlobj.h" -#endif -#include <shlobj.h> -#include <string.h> -#include <stdio.h> -#include <ctype.h> -#include <assert.h> - -#include "goo/gmem.h" -#include "goo/GooString.h" -#include "goo/GooList.h" -#include "goo/gfile.h" -#include "Error.h" -#include "NameToCharCode.h" -#include "CharCodeToUnicode.h" -#include "UnicodeMap.h" -#include "CMap.h" -#include "BuiltinFontTables.h" -#include "FontEncodingTables.h" -#include "GlobalParams.h" -#include "GfxFont.h" -#include <sys/stat.h> -#include "Object.h" -#include "Stream.h" -#include "Lexer.h" -#include "Parser.h" - -#ifdef MULTITHREADED -# define lockGlobalParams gLockMutex(&mutex) -# define lockUnicodeMapCache gLockMutex(&unicodeMapCacheMutex) -# define lockCMapCache gLockMutex(&cMapCacheMutex) -# define unlockGlobalParams gUnlockMutex(&mutex) -# define unlockUnicodeMapCache gUnlockMutex(&unicodeMapCacheMutex) -# define unlockCMapCache gUnlockMutex(&cMapCacheMutex) -#else -# define lockGlobalParams -# define lockUnicodeMapCache -# define lockCMapCache -# define unlockGlobalParams -# define unlockUnicodeMapCache -# define unlockCMapCache -#endif - -#define DEFAULT_SUBSTITUTE_FONT "Helvetica" -#define DEFAULT_CID_FONT_AC1_MSWIN "MingLiU" /* Adobe-CNS1 for Taiwan, HongKong */ -#define DEFAULT_CID_FONT_AG1_MSWIN "SimSun" /* Adobe-GB1 for PRC, Singapore */ -#define DEFAULT_CID_FONT_AJ1_MSWIN "MS-Mincho" /* Adobe-Japan1 */ -#define DEFAULT_CID_FONT_AJ2_MSWIN "MS-Mincho" /* Adobe-Japan2 (legacy) */ -#define DEFAULT_CID_FONT_AK1_MSWIN "Batang" /* Adobe-Korea1 */ -#define DEFAULT_CID_FONT_MSWIN "ArialUnicode" /* Unknown */ - -static const struct { - const char *name; - const char *t1FileName; - const char *ttFileName; - GBool warnIfMissing; -} displayFontTab[] = { - {"Courier", "n022003l.pfb", "cour.ttf", gTrue}, - {"Courier-Bold", "n022004l.pfb", "courbd.ttf", gTrue}, - {"Courier-BoldOblique", "n022024l.pfb", "courbi.ttf", gTrue}, - {"Courier-Oblique", "n022023l.pfb", "couri.ttf", gTrue}, - {"Helvetica", "n019003l.pfb", "arial.ttf", gTrue}, - {"Helvetica-Bold", "n019004l.pfb", "arialbd.ttf", gTrue}, - {"Helvetica-BoldOblique", "n019024l.pfb", "arialbi.ttf", gTrue}, - {"Helvetica-Oblique", "n019023l.pfb", "ariali.ttf", gTrue}, - // TODO: not sure if "symbol.ttf" is right - {"Symbol", "s050000l.pfb", "symbol.ttf", gTrue}, - {"Times-Bold", "n021004l.pfb", "timesbd.ttf", gTrue}, - {"Times-BoldItalic", "n021024l.pfb", "timesbi.ttf", gTrue}, - {"Times-Italic", "n021023l.pfb", "timesi.ttf", gTrue}, - {"Times-Roman", "n021003l.pfb", "times.ttf", gTrue}, - // TODO: not sure if "wingding.ttf" is right - {"ZapfDingbats", "d050000l.pfb", "wingding.ttf", gTrue}, - - // those seem to be frequently accessed by PDF files and I kind of guess - // which font file do the refer to - {"Palatino", nullptr, "pala.ttf", gTrue}, - {"Palatino-Roman", nullptr, "pala.ttf", gTrue}, - {"Palatino-Bold", nullptr, "palab.ttf", gTrue}, - {"Palatino-Italic", nullptr, "palai.ttf", gTrue}, - {"Palatino,Italic", nullptr, "palai.ttf", gTrue}, - {"Palatino-BoldItalic", nullptr, "palabi.ttf", gTrue}, - - {"ArialBlack", nullptr, "arialbd.ttf", gTrue}, - - {"ArialNarrow", nullptr, "arialn.ttf", gTrue}, - {"ArialNarrow,Bold", nullptr, "arialnb.ttf", gTrue}, - {"ArialNarrow,Italic", nullptr, "arialni.ttf", gTrue}, - {"ArialNarrow,BoldItalic", nullptr, "arialnbi.ttf", gTrue}, - {"ArialNarrow-Bold", nullptr, "arialnb.ttf", gTrue}, - {"ArialNarrow-Italic", nullptr, "arialni.ttf", gTrue}, - {"ArialNarrow-BoldItalic", nullptr, "arialnbi.ttf", gTrue}, - - {"HelveticaNarrow", nullptr, "arialn.ttf", gTrue}, - {"HelveticaNarrow,Bold", nullptr, "arialnb.ttf", gTrue}, - {"HelveticaNarrow,Italic", nullptr, "arialni.ttf", gTrue}, - {"HelveticaNarrow,BoldItalic", nullptr, "arialnbi.ttf", gTrue}, - {"HelveticaNarrow-Bold", nullptr, "arialnb.ttf", gTrue}, - {"HelveticaNarrow-Italic", nullptr, "arialni.ttf", gTrue}, - {"HelveticaNarrow-BoldItalic", nullptr, "arialnbi.ttf", gTrue}, - - {"BookAntiqua", nullptr, "bkant.ttf", gTrue}, - {"BookAntiqua,Bold", nullptr, "bkant.ttf", gTrue}, - {"BookAntiqua,Italic", nullptr, "bkant.ttf", gTrue}, - {"BookAntiqua,BoldItalic", nullptr, "bkant.ttf", gTrue}, - {"BookAntiqua-Bold", nullptr, "bkant.ttf", gTrue}, - {"BookAntiqua-Italic", nullptr, "bkant.ttf", gTrue}, - {"BookAntiqua-BoldItalic", nullptr, "bkant.ttf", gTrue}, - - {"Verdana", nullptr, "verdana.ttf", gTrue}, - {"Verdana,Bold", nullptr, "verdanab.ttf", gTrue}, - {"Verdana,Italic", nullptr, "verdanai.ttf", gTrue}, - {"Verdana,BoldItalic", nullptr, "verdanaz.ttf", gTrue}, - {"Verdana-Bold", nullptr, "verdanab.ttf", gTrue}, - {"Verdana-Italic", nullptr, "verdanai.ttf", gTrue}, - {"Verdana-BoldItalic", nullptr, "verdanaz.ttf", gTrue}, - - {"Tahoma", nullptr, "tahoma.ttf", gTrue}, - {"Tahoma,Bold", nullptr, "tahomabd.ttf", gTrue}, - {"Tahoma,Italic", nullptr, "tahoma.ttf", gTrue}, - {"Tahoma,BoldItalic", nullptr, "tahomabd.ttf", gTrue}, - {"Tahoma-Bold", nullptr, "tahomabd.ttf", gTrue}, - {"Tahoma-Italic", nullptr, "tahoma.ttf", gTrue}, - {"Tahoma-BoldItalic", nullptr, "tahomabd.ttf", gTrue}, - - {"CCRIKH+Verdana", nullptr, "verdana.ttf", gTrue}, - {"CCRIKH+Verdana,Bold", nullptr, "verdanab.ttf", gTrue}, - {"CCRIKH+Verdana,Italic", nullptr, "verdanai.ttf", gTrue}, - {"CCRIKH+Verdana,BoldItalic", nullptr, "verdanaz.ttf", gTrue}, - {"CCRIKH+Verdana-Bold", nullptr, "verdanab.ttf", gTrue}, - {"CCRIKH+Verdana-Italic", nullptr, "verdanai.ttf", gTrue}, - {"CCRIKH+Verdana-BoldItalic", nullptr, "verdanaz.ttf", gTrue}, - - {"Georgia", nullptr, "georgia.ttf", gTrue}, - {"Georgia,Bold", nullptr, "georgiab.ttf", gTrue}, - {"Georgia,Italic", nullptr, "georgiai.ttf", gTrue}, - {"Georgia,BoldItalic", nullptr, "georgiaz.ttf", gTrue}, - {"Georgia-Bold", nullptr, "georgiab.ttf", gTrue}, - {"Georgia-Italic", nullptr, "georgiai.ttf", gTrue}, - {"Georgia-BoldItalic", nullptr, "georgiaz.ttf", gTrue}, - - // fallback for Adobe CID fonts: - {"MingLiU", nullptr, "mingliu.ttf", gFalse}, - {"SimSun", nullptr, "simsun.ttf", gFalse}, - {"MS-Mincho", nullptr, "msmincho.ttf", gFalse}, - {"Batang", nullptr, "batang.ttf", gFalse}, - {"ArialUnicode", nullptr, "arialuni.ttf", gTrue}, - { } -}; - -#define FONTS_SUBDIR "\\fonts" - -static void GetWindowsFontDir(char *winFontDir, int cbWinFontDirLen) -{ - BOOL (__stdcall *SHGetSpecialFolderPathFunc)(HWND hwndOwner, - LPSTR lpszPath, - int nFolder, - BOOL fCreate); - HRESULT (__stdcall *SHGetFolderPathFunc)(HWND hwndOwner, - int nFolder, - HANDLE hToken, - DWORD dwFlags, - LPSTR pszPath); - - // SHGetSpecialFolderPath isn't available in older versions of shell32.dll (Win95 and - // WinNT4), so do a dynamic load of ANSI versions. - winFontDir[0] = '\0'; - - HMODULE hLib = LoadLibraryA("shell32.dll"); - if (hLib) { - SHGetFolderPathFunc = (HRESULT (__stdcall *)(HWND, int, HANDLE, DWORD, LPSTR)) - GetProcAddress(hLib, "SHGetFolderPathA"); - if (SHGetFolderPathFunc) - (*SHGetFolderPathFunc)(nullptr, CSIDL_FONTS, nullptr, SHGFP_TYPE_CURRENT, winFontDir); - - if (!winFontDir[0]) { - // Try an older function - SHGetSpecialFolderPathFunc = (BOOL (__stdcall *)(HWND, LPSTR, int, BOOL)) - GetProcAddress(hLib, "SHGetSpecialFolderPathA"); - if (SHGetSpecialFolderPathFunc) - (*SHGetSpecialFolderPathFunc)(nullptr, winFontDir, CSIDL_FONTS, FALSE); - } - FreeLibrary(hLib); - } - if (winFontDir[0]) - return; - - // Try older DLL - hLib = LoadLibraryA("SHFolder.dll"); - if (hLib) { - SHGetFolderPathFunc = (HRESULT (__stdcall *)(HWND, int, HANDLE, DWORD, LPSTR)) - GetProcAddress(hLib, "SHGetFolderPathA"); - if (SHGetFolderPathFunc) - (*SHGetFolderPathFunc)(nullptr, CSIDL_FONTS, nullptr, SHGFP_TYPE_CURRENT, winFontDir); - FreeLibrary(hLib); - } - if (winFontDir[0]) - return; - - // Everything else failed so the standard fonts directory. - GetWindowsDirectoryA(winFontDir, cbWinFontDirLen); - if (winFontDir[0]) { - strncat(winFontDir, FONTS_SUBDIR, cbWinFontDirLen); - winFontDir[cbWinFontDirLen-1] = 0; - } -} - -static bool FileExists(const char *path) -{ - FILE * f = fopen(path, "rb"); - if (f) { - fclose(f); - return true; - } - return false; -} - -void SysFontList::scanWindowsFonts(GooString *winFontDir) { - OSVERSIONINFO version; - const char *path; - DWORD idx, valNameLen, dataLen, type; - HKEY regKey; - char valName[1024], data[1024]; - int n, fontNum; - char *p0, *p1; - GooString *fontPath; - - version.dwOSVersionInfoSize = sizeof(version); - GetVersionEx(&version); - if (version.dwPlatformId == VER_PLATFORM_WIN32_NT) { - path = "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Fonts\\"; - } else { - path = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Fonts\\"; - } - if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, path, 0, - KEY_QUERY_VALUE | KEY_ENUMERATE_SUB_KEYS, - ®Key) == ERROR_SUCCESS) { - idx = 0; - while (1) { - valNameLen = sizeof(valName) - 1; - dataLen = sizeof(data) - 1; - if (RegEnumValueA(regKey, idx, valName, &valNameLen, nullptr, - &type, (LPBYTE)data, &dataLen) != ERROR_SUCCESS) { - break; - } - if (type == REG_SZ && - valNameLen > 0 && valNameLen < sizeof(valName) && - dataLen > 0 && dataLen < sizeof(data)) { - valName[valNameLen] = '\0'; - data[dataLen] = '\0'; - n = strlen(data); - if (!strcasecmp(data + n - 4, ".ttf") || - !strcasecmp(data + n - 4, ".ttc") || - !strcasecmp(data + n - 4, ".otf")) { - fontPath = new GooString(data); - if (!(dataLen >= 3 && data[1] == ':' && data[2] == '\\')) { - fontPath->insert(0, '\\'); - fontPath->insert(0, winFontDir); - fontPath->append('\0'); - } - p0 = valName; - fontNum = 0; - while (*p0) { - p1 = strstr(p0, " & "); - if (p1) { - *p1 = '\0'; - p1 = p1 + 3; - } else { - p1 = p0 + strlen(p0); - } - fonts->append(makeWindowsFont(p0, fontNum, - fontPath->getCString())); - p0 = p1; - ++fontNum; - } - delete fontPath; - } - } - ++idx; - } - RegCloseKey(regKey); - } -} - -SysFontInfo *SysFontList::makeWindowsFont(char *name, int fontNum, - char *path) { - int n; - GBool bold, italic, oblique, fixedWidth; - GooString *s; - char c; - int i; - SysFontType type; - GooString substituteName; - - n = strlen(name); - bold = italic = oblique = fixedWidth = gFalse; - - // remove trailing ' (TrueType)' - if (n > 11 && !strncmp(name + n - 11, " (TrueType)", 11)) { - n -= 11; - } - - // remove trailing ' (OpenType)' - if (n > 11 && !strncmp(name + n - 11, " (OpenType)", 11)) { - n -= 11; - } - - // remove trailing ' Italic' - if (n > 7 && !strncmp(name + n - 7, " Italic", 7)) { - n -= 7; - italic = gTrue; - } - - // remove trailing ' Oblique' - if (n > 7 && !strncmp(name + n - 8, " Oblique", 8)) { - n -= 8; - oblique = gTrue; - } - - // remove trailing ' Bold' - if (n > 5 && !strncmp(name + n - 5, " Bold", 5)) { - n -= 5; - bold = gTrue; - } - - // remove trailing ' Regular' - if (n > 5 && !strncmp(name + n - 8, " Regular", 8)) { - n -= 8; - } - - // the familyname cannot indicate whether a font is fixedWidth or not. - // some well-known fixedWidth typeface family names or keyword are checked. - if ( strstr(name, "Courier") || - strstr(name, "Fixed") || - (strstr(name, "Mono") && !strstr(name, "Monotype")) || - strstr(name, "Typewriter") ) - fixedWidth = gTrue; - else - fixedWidth = gFalse; - - - //----- normalize the font name - s = new GooString(name, n); - i = 0; - while (i < s->getLength()) { - c = s->getChar(i); - if (c == ' ' || c == ',' || c == '-') { - s->del(i); - } else { - ++i; - } - } - - if (!strcasecmp(path + strlen(path) - 4, ".ttc")) { - type = sysFontTTC; - } else { - type = sysFontTTF; - } - - return new SysFontInfo(s, bold, italic, oblique, fixedWidth, - new GooString(path), type, fontNum, substituteName.copy()); -} - -static GooString* replaceSuffix(GooString *path, - const char* suffixA, const char* suffixB) -{ - int suffLenA = strlen(suffixA); - int suffLenB = strlen(suffixB); - int baseLenA = path->getLength() - suffLenA; - int baseLenB = path->getLength() - suffLenB; - - if (!strcasecmp(path->getCString()+baseLenA, suffixA)) { - path->del(baseLenA,suffLenA)->append(suffixB); - } else if (!strcasecmp(path->getCString()+baseLenB, suffixB)) { - path->del(baseLenB,suffLenB)->append(suffixA); - } - - return path; -} - - -void GlobalParams::setupBaseFonts(char * dir) -{ - const char *dataRoot = popplerDataDir ? popplerDataDir : POPPLER_DATADIR; - GooString *fileName = nullptr; - GooFile *file; - - if (baseFontsInitialized) - return; - baseFontsInitialized = true; - - char winFontDir[MAX_PATH]; - GetWindowsFontDir(winFontDir, sizeof(winFontDir)); - - for (int i = 0; displayFontTab[i].name; ++i) { - if (fontFiles.count(displayFontTab[i].name) > 0) - continue; - - GooString *fontName = new GooString(displayFontTab[i].name); - - if (dir) { - GooString *fontPath = appendToPath(new GooString(dir), displayFontTab[i].t1FileName); - if (FileExists(fontPath->getCString()) || - FileExists(replaceSuffix(fontPath, ".pfb", ".pfa")->getCString())) { - addFontFile(fontName, fontPath); - continue; - } - delete fontPath; - } - - if (winFontDir[0] && displayFontTab[i].ttFileName) { - GooString *fontPath = appendToPath(new GooString(winFontDir), displayFontTab[i].ttFileName); - if (FileExists(fontPath->getCString()) || - FileExists(replaceSuffix(fontPath, ".ttc", ".ttf")->getCString())) { - addFontFile(fontName, fontPath); - continue; - } - delete fontPath; - } - - if (displayFontTab[i].warnIfMissing) { - error(errSyntaxError, -1, "No display font for '{0:s}'", displayFontTab[i].name); - delete fontName; - } - } - if (winFontDir[0]) { - GooString gooWinFontsDir(winFontDir); - sysFonts->scanWindowsFonts(&gooWinFontsDir); - } - - fileName = new GooString(dataRoot); - fileName->append("/cidfmap"); - - // try to open file - file = GooFile::open(fileName); - - if (file != nullptr) { - Parser *parser; - parser = new Parser(nullptr, - new Lexer(nullptr, - new FileStream(file, 0, gFalse, file->size(), Object(objNull))), - gTrue); - Object obj1 = parser->getObj(); - while (!obj1.isEOF()) { - Object obj2 = parser->getObj(); - if (obj1.isName()) { - // Substitutions - if (obj2.isDict()) { - Object obj3 = obj2.getDict()->lookup("Path"); - if (obj3.isString()) - addFontFile(new GooString(obj1.getName()), obj3.getString()->copy()); - // Aliases - } else if (obj2.isName()) { - substFiles.emplace(obj1.getName(), obj2.getName()); - } - } - obj1 = parser->getObj(); - // skip trailing ';' - while (obj1.isCmd(";")) { - obj1 = parser->getObj(); - } - } - delete file; - delete parser; - } - else { - delete fileName; - } -} - -static const char *findSubstituteName(GfxFont *font, const std::unordered_map<std::string, std::string>& fontFiles, - const std::unordered_map<std::string, std::string>& substFiles, - const char *origName) -{ - assert(origName); - if (!origName) return nullptr; - GooString *name2 = new GooString(origName); - int n = strlen(origName); - // remove trailing "-Identity-H" - if (n > 11 && !strcmp(name2->getCString() + n - 11, "-Identity-H")) { - name2->del(n - 11, 11); - n -= 11; - } - // remove trailing "-Identity-V" - if (n > 11 && !strcmp(name2->getCString() + n - 11, "-Identity-V")) { - name2->del(n - 11, 11); - n -= 11; - } - const auto substFile = substFiles.find(name2->getCString()); - if (substFile != substFiles.end()) { - delete name2; - return substFile->second.c_str(); - } - - /* TODO: try to at least guess bold/italic/bolditalic from the name */ - delete name2; - if (font->isCIDFont()) { - GooString *collection = ((GfxCIDFont *)font)->getCollection(); - - const char* name3 = nullptr; - if ( !collection->cmp("Adobe-CNS1") ) - name3 = DEFAULT_CID_FONT_AC1_MSWIN; - else if ( !collection->cmp("Adobe-GB1") ) - name3 = DEFAULT_CID_FONT_AG1_MSWIN; - else if ( !collection->cmp("Adobe-Japan1") ) - name3 = DEFAULT_CID_FONT_AJ1_MSWIN; - else if ( !collection->cmp("Adobe-Japan2") ) - name3 = DEFAULT_CID_FONT_AJ2_MSWIN; - else if ( !collection->cmp("Adobe-Korea1") ) - name3 = DEFAULT_CID_FONT_AK1_MSWIN; - - if (name3 && fontFiles.count(name3) != 0) - return name3; - - if (fontFiles.count(DEFAULT_CID_FONT_MSWIN) != 0) - return DEFAULT_CID_FONT_MSWIN; - } - return DEFAULT_SUBSTITUTE_FONT; -} - -/* Windows implementation of external font matching code */ -GooString *GlobalParams::findSystemFontFile(GfxFont *font, - SysFontType *type, - int *fontNum, GooString *substituteFontName, - GooString *base14Name) { - SysFontInfo *fi; - GooString *path = nullptr; - const GooString *fontName = font->getName(); - if (!fontName) return nullptr; - lockGlobalParams; - setupBaseFonts(nullptr); - - // TODO: base14Name should be changed? - // In the system using FontConfig, findSystemFontFile() uses - // base14Name only for the creation of query pattern. - - if ((fi = sysFonts->find(fontName, gFalse, gFalse))) { - path = fi->path->copy(); - *type = fi->type; - *fontNum = fi->fontNum; - if (substituteFontName) - substituteFontName->Set(fi->substituteName->getCString()); - } else { - GooString *substFontName = new GooString(findSubstituteName(font, fontFiles, - substFiles, - fontName->getCString())); - error(errSyntaxError, -1, "Couldn't find a font for '{0:t}', subst is '{1:t}'", fontName, substFontName); - const auto fontFile = fontFiles.find(substFontName->toStr()); - if (fontFile != fontFiles.end()) { - path = new GooString(fontFile->second.c_str()); - if (substituteFontName) - substituteFontName->Set(path->getCString()); - if (!strcasecmp(path->getCString() + path->getLength() - 4, ".ttc")) { - *type = sysFontTTC; - } else { - *type = sysFontTTF; - } - *fontNum = 0; - } - } - unlockGlobalParams; - return path; -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/Hints.cc b/Build/source/libs/poppler/poppler-src/poppler/Hints.cc deleted file mode 100644 index ecee04681c6..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/Hints.cc +++ /dev/null @@ -1,510 +0,0 @@ -//======================================================================== -// -// Hints.cc -// -// This file is licensed under the GPLv2 or later -// -// Copyright 2010, 2012 Hib Eris <hib@hiberis.nl> -// Copyright 2010, 2011, 2013, 2014, 2016-2018 Albert Astals Cid <aacid@kde.org> -// Copyright 2010, 2013 Pino Toscano <pino@kde.org> -// Copyright 2013 Adrian Johnson <ajohnson@redneon.com> -// Copyright 2014 Fabio D'Urso <fabiodurso@hotmail.it> -// Copyright 2016 Jeffrey Morlan <jmmorlan@sonic.net> -// -//======================================================================== - -#include <config.h> - -#include "Hints.h" - -#include "Linearization.h" -#include "Object.h" -#include "Stream.h" -#include "XRef.h" -#include "Parser.h" -#include "Lexer.h" -#include "SecurityHandler.h" - -#include <limits.h> - -class StreamBitReader { -public: - StreamBitReader(Stream *strA) - : str(strA) - , inputBits(0) - , isAtEof(gFalse) - { - } - - void resetInputBits() - { - inputBits = 0; - } - - GBool atEOF() const - { - return isAtEof; - } - - Guint readBit() - { - Guint bit; - int c; - - if (inputBits == 0) { - if ((c = str->getChar()) == EOF) { - isAtEof = gTrue; - return (Guint) -1; - } - bitsBuffer = c; - inputBits = 8; - } - bit = (bitsBuffer >> (inputBits - 1)) & 1; - --inputBits; - return bit; - } - - Guint readBits(int n) - { - Guint bit, bits; - - if (n < 0) return -1; - if (n == 0) return 0; - - if (n == 1) - return readBit(); - - bit = readBit(); - if (bit == (Guint) -1) - return -1; - - bit = bit << (n-1); - - bits = readBits(n - 1); - if (bits == (Guint) -1) - return -1; - - return bit | bits; - } - -private: - Stream *str; - int inputBits; - char bitsBuffer; - GBool isAtEof; -}; - -//------------------------------------------------------------------------ -// Hints -//------------------------------------------------------------------------ - -Hints::Hints(BaseStream *str, Linearization *linearization, XRef *xref, SecurityHandler *secHdlr) -{ - mainXRefEntriesOffset = linearization->getMainXRefEntriesOffset(); - nPages = linearization->getNumPages(); - pageFirst = linearization->getPageFirst(); - pageEndFirst = linearization->getEndFirst(); - pageObjectFirst = linearization->getObjectNumberFirst(); - if (pageObjectFirst < 0 || pageObjectFirst >= xref->getNumObjects()) { - error(errSyntaxWarning, -1, - "Invalid reference for first page object ({0:d}) in linearization table ", - pageObjectFirst); - pageObjectFirst = 0; - } - XRefEntry *pageObjectFirstXRefEntry = xref->getEntry(pageObjectFirst); - if (!pageObjectFirstXRefEntry) { - error(errSyntaxWarning, -1, "No XRef entry for first page object"); - pageOffsetFirst = 0; - } else { - pageOffsetFirst = pageObjectFirstXRefEntry->offset; - } - - if (nPages >= INT_MAX / (int)sizeof(Guint)) { - error(errSyntaxWarning, -1, "Invalid number of pages ({0:d}) for hints table", nPages); - nPages = 0; - } - nObjects = (Guint *) gmallocn_checkoverflow(nPages, sizeof(Guint)); - pageObjectNum = (int *) gmallocn_checkoverflow(nPages, sizeof(int)); - xRefOffset = (Guint *) gmallocn_checkoverflow(nPages, sizeof(Guint)); - pageLength = (Guint *) gmallocn_checkoverflow(nPages, sizeof(Guint)); - pageOffset = (Goffset *) gmallocn_checkoverflow(nPages, sizeof(Goffset)); - numSharedObject = (Guint *) gmallocn_checkoverflow(nPages, sizeof(Guint)); - sharedObjectId = (Guint **) gmallocn_checkoverflow(nPages, sizeof(Guint*)); - if (!nObjects || !pageObjectNum || !xRefOffset || !pageLength || !pageOffset || - !numSharedObject || !sharedObjectId) { - error(errSyntaxWarning, -1, "Failed to allocate memory for hints table"); - nPages = 0; - } - - memset(pageLength, 0, nPages * sizeof(Guint)); - memset(pageOffset, 0, nPages * sizeof(Guint)); - memset(numSharedObject, 0, nPages * sizeof(Guint)); - memset(pageObjectNum, 0, nPages * sizeof(int)); - - groupLength = nullptr; - groupOffset = nullptr; - groupHasSignature = nullptr; - groupNumObjects = nullptr; - groupXRefOffset = nullptr; - - ok = gTrue; - readTables(str, linearization, xref, secHdlr); -} - -Hints::~Hints() -{ - gfree(nObjects); - gfree(pageObjectNum); - gfree(xRefOffset); - gfree(pageLength); - gfree(pageOffset); - for (int i=0; i< nPages; i++) { - if (numSharedObject[i]) { - gfree(sharedObjectId[i]); - } - } - gfree(sharedObjectId); - gfree(numSharedObject); - - gfree(groupLength); - gfree(groupOffset); - gfree(groupHasSignature); - gfree(groupNumObjects); - gfree(groupXRefOffset); -} - -void Hints::readTables(BaseStream *str, Linearization *linearization, XRef *xref, SecurityHandler *secHdlr) -{ - hintsOffset = linearization->getHintsOffset(); - hintsLength = linearization->getHintsLength(); - hintsOffset2 = linearization->getHintsOffset2(); - hintsLength2 = linearization->getHintsLength2(); - - Parser *parser; - - int bufLength = hintsLength + hintsLength2; - - std::vector<char> buf(bufLength); - char *p = &buf[0]; - - Stream *s = str->makeSubStream(hintsOffset, gFalse, hintsLength, Object(objNull)); - s->reset(); - for (Guint i=0; i < hintsLength; i++) { *p++ = s->getChar(); } - delete s; - - if (hintsOffset2 && hintsLength2) { - s = str->makeSubStream(hintsOffset2, gFalse, hintsLength2, Object(objNull)); - s->reset(); - for (Guint i=0; i < hintsLength2; i++) { *p++ = s->getChar(); } - delete s; - } - - MemStream *memStream = new MemStream (&buf[0], 0, bufLength, Object(objNull)); - - parser = new Parser(xref, new Lexer(xref, memStream), gTrue); - - int num, gen; - Object obj; - if ((obj = parser->getObj(), obj.isInt()) && - (num = obj.getInt(), obj = parser->getObj(), obj.isInt()) && - (gen = obj.getInt(), obj = parser->getObj(), obj.isCmd("obj")) && - (obj = parser->getObj(gFalse, - secHdlr ? secHdlr->getFileKey() : (Guchar *)nullptr, - secHdlr ? secHdlr->getEncAlgorithm() : cryptRC4, - secHdlr ? secHdlr->getFileKeyLength() : 0, - num, gen, 0, gTrue), obj.isStream())) { - Stream *hintsStream = obj.getStream(); - Dict *hintsDict = obj.streamGetDict(); - - int sharedStreamOffset = 0; - if (hintsDict->lookupInt("S", nullptr, &sharedStreamOffset) && - sharedStreamOffset > 0) { - - hintsStream->reset(); - ok = readPageOffsetTable(hintsStream); - - if (ok) { - hintsStream->reset(); - for (int i=0; i<sharedStreamOffset; i++) hintsStream->getChar(); - ok = readSharedObjectsTable(hintsStream); - } - } else { - error(errSyntaxWarning, -1, "Invalid shared object hint table offset"); - } - } else { - error(errSyntaxWarning, -1, "Failed parsing hints table object"); - } - - delete parser; -} - -GBool Hints::readPageOffsetTable(Stream *str) -{ - if (nPages < 1) { - error(errSyntaxWarning, -1, "Invalid number of pages reading page offset hints table"); - return gFalse; - } - - StreamBitReader sbr(str); - - nObjectLeast = sbr.readBits(32); - if (nObjectLeast < 1) { - error(errSyntaxWarning, -1, "Invalid least number of objects reading page offset hints table"); - nPages = 0; - return gFalse; - } - - objectOffsetFirst = sbr.readBits(32); - if (objectOffsetFirst >= hintsOffset) objectOffsetFirst += hintsLength; - - nBitsDiffObjects = sbr.readBits(16); - if (nBitsDiffObjects > 32) { - error(errSyntaxWarning, -1, "Invalid number of bits needed to represent the difference between the greatest and least number of objects in a page"); - nPages = 0; - return gFalse; - } - - pageLengthLeast = sbr.readBits(32); - - nBitsDiffPageLength = sbr.readBits(16); - - OffsetStreamLeast = sbr.readBits(32); - - nBitsOffsetStream = sbr.readBits(16); - - lengthStreamLeast = sbr.readBits(32); - - nBitsLengthStream = sbr.readBits(16); - - nBitsNumShared = sbr.readBits(16); - - nBitsShared = sbr.readBits(16); - - nBitsNumerator = sbr.readBits(16); - - denominator = sbr.readBits(16); - - for (int i = 0; i < nPages && !sbr.atEOF(); i++) { - nObjects[i] = nObjectLeast + sbr.readBits(nBitsDiffObjects); - } - if (sbr.atEOF()) - return gFalse; - - nObjects[0] = 0; - xRefOffset[0] = mainXRefEntriesOffset + 20; - for (int i=1; i<nPages; i++) { - xRefOffset[i] = xRefOffset[i-1] + 20*nObjects[i-1]; - } - - pageObjectNum[0] = 1; - for (int i=1; i<nPages; i++) { - pageObjectNum[i] = pageObjectNum[i-1] + nObjects[i-1]; - } - pageObjectNum[0] = pageObjectFirst; - - sbr.resetInputBits(); // reset on byte boundary. Not in specs! - for (int i = 0; i < nPages && !sbr.atEOF(); i++) { - pageLength[i] = pageLengthLeast + sbr.readBits(nBitsDiffPageLength); - } - if (sbr.atEOF()) - return gFalse; - - sbr.resetInputBits(); // reset on byte boundary. Not in specs! - numSharedObject[0] = sbr.readBits(nBitsNumShared); - numSharedObject[0] = 0; // Do not trust the read value to be 0. - sharedObjectId[0] = nullptr; - for (int i = 1; i < nPages && !sbr.atEOF(); i++) { - numSharedObject[i] = sbr.readBits(nBitsNumShared); - if (numSharedObject[i] >= INT_MAX / (int)sizeof(Guint)) { - error(errSyntaxWarning, -1, "Invalid number of shared objects"); - numSharedObject[i] = 0; - return gFalse; - } - sharedObjectId[i] = (Guint *) gmallocn_checkoverflow(numSharedObject[i], sizeof(Guint)); - if (numSharedObject[i] && !sharedObjectId[i]) { - error(errSyntaxWarning, -1, "Failed to allocate memory for shared object IDs"); - numSharedObject[i] = 0; - return gFalse; - } - } - if (sbr.atEOF()) - return gFalse; - - sbr.resetInputBits(); // reset on byte boundary. Not in specs! - for (int i=1; i<nPages; i++) { - for (Guint j = 0; j < numSharedObject[i] && !sbr.atEOF(); j++) { - sharedObjectId[i][j] = sbr.readBits(nBitsShared); - } - } - - pageOffset[0] = pageOffsetFirst; - // find pageOffsets. - for (int i=1; i<nPages; i++) { - pageOffset[i] = pageOffset[i-1] + pageLength[i-1]; - } - - return !sbr.atEOF(); -} - -GBool Hints::readSharedObjectsTable(Stream *str) -{ - StreamBitReader sbr(str); - - const Guint firstSharedObjectNumber = sbr.readBits(32); - - const Guint firstSharedObjectOffset = sbr.readBits(32) + hintsLength; - - const Guint nSharedGroupsFirst = sbr.readBits(32); - - const Guint nSharedGroups = sbr.readBits(32); - - const Guint nBitsNumObjects = sbr.readBits(16); - - const Guint groupLengthLeast = sbr.readBits(32); - - const Guint nBitsDiffGroupLength = sbr.readBits(16); - - if ((!nSharedGroups) || (nSharedGroups >= INT_MAX / (int)sizeof(Guint))) { - error(errSyntaxWarning, -1, "Invalid number of shared object groups"); - return gFalse; - } - if ((!nSharedGroupsFirst) || (nSharedGroupsFirst > nSharedGroups)) { - error(errSyntaxWarning, -1, "Invalid number of first page shared object groups"); - return gFalse; - } - if (nBitsNumObjects > 32 || nBitsDiffGroupLength > 32) { - error(errSyntaxWarning, -1, "Invalid shared object groups bit length"); - return gFalse; - } - - groupLength = (Guint *) gmallocn_checkoverflow(nSharedGroups, sizeof(Guint)); - groupOffset = (Guint *) gmallocn_checkoverflow(nSharedGroups, sizeof(Guint)); - groupHasSignature = (Guint *) gmallocn_checkoverflow(nSharedGroups, sizeof(Guint)); - groupNumObjects = (Guint *) gmallocn_checkoverflow(nSharedGroups, sizeof(Guint)); - groupXRefOffset = (Guint *) gmallocn_checkoverflow(nSharedGroups, sizeof(Guint)); - if (!groupLength || !groupOffset || !groupHasSignature || - !groupNumObjects || !groupXRefOffset) { - error(errSyntaxWarning, -1, "Failed to allocate memory for shared object groups"); - return gFalse; - } - - sbr.resetInputBits(); // reset on byte boundary. Not in specs! - for (Guint i = 0; i < nSharedGroups && !sbr.atEOF(); i++) { - groupLength[i] = groupLengthLeast + sbr.readBits(nBitsDiffGroupLength); - } - if (sbr.atEOF()) - return gFalse; - - groupOffset[0] = objectOffsetFirst; - for (Guint i=1; i<nSharedGroupsFirst; i++) { - groupOffset[i] = groupOffset[i-1] + groupLength[i-1]; - } - if (nSharedGroups > nSharedGroupsFirst ) { - groupOffset[nSharedGroupsFirst] = firstSharedObjectOffset; - for (Guint i=nSharedGroupsFirst+1; i<nSharedGroups; i++) { - groupOffset[i] = groupOffset[i-1] + groupLength[i-1]; - } - } - - sbr.resetInputBits(); // reset on byte boundary. Not in specs! - for (Guint i = 0; i < nSharedGroups && !sbr.atEOF(); i++) { - groupHasSignature[i] = sbr.readBits(1); - } - if (sbr.atEOF()) - return gFalse; - - sbr.resetInputBits(); // reset on byte boundary. Not in specs! - for (Guint i = 0; i < nSharedGroups && !sbr.atEOF(); i++) { - if (groupHasSignature[i]) { - sbr.readBits(128); - } - } - if (sbr.atEOF()) - return gFalse; - - sbr.resetInputBits(); // reset on byte boundary. Not in specs! - for (Guint i = 0; i < nSharedGroups && !sbr.atEOF(); i++) { - groupNumObjects[i] = - nBitsNumObjects ? 1 + sbr.readBits(nBitsNumObjects) : 1; - } - - for (Guint i=0; i<nSharedGroupsFirst; i++) { - groupNumObjects[i] = 0; - groupXRefOffset[i] = 0; - } - if (nSharedGroups > nSharedGroupsFirst ) { - groupXRefOffset[nSharedGroupsFirst] = - mainXRefEntriesOffset + 20*firstSharedObjectNumber; - for (Guint i=nSharedGroupsFirst+1; i<nSharedGroups; i++) { - groupXRefOffset[i] = groupXRefOffset[i-1] + 20*groupNumObjects[i-1]; - } - } - - return !sbr.atEOF(); -} - -GBool Hints::isOk() const -{ - return ok; -} - -Goffset Hints::getPageOffset(int page) -{ - if ((page < 1) || (page > nPages)) return 0; - - if (page-1 > pageFirst) - return pageOffset[page-1]; - else if (page-1 < pageFirst) - return pageOffset[page]; - else - return pageOffset[0]; -} - -std::vector<ByteRange>* Hints::getPageRanges(int page) -{ - if ((page < 1) || (page > nPages)) return nullptr; - - int idx; - if (page-1 > pageFirst) - idx = page-1; - else if (page-1 < pageFirst) - idx = page; - else - idx = 0; - - ByteRange pageRange; - std::vector<ByteRange> *v = new std::vector<ByteRange>; - - pageRange.offset = pageOffset[idx]; - pageRange.length = pageLength[idx]; - v->push_back(pageRange); - - pageRange.offset = xRefOffset[idx]; - pageRange.length = 20*nObjects[idx]; - v->push_back(pageRange); - - for (Guint j=0; j<numSharedObject[idx]; j++) { - Guint k = sharedObjectId[idx][j]; - - pageRange.offset = groupOffset[k]; - pageRange.length = groupLength[k]; - v->push_back(pageRange); - - pageRange.offset = groupXRefOffset[k]; - pageRange.length = 20*groupNumObjects[k]; - v->push_back(pageRange); - } - - return v; -} - -int Hints::getPageObjectNum(int page) { - if ((page < 1) || (page > nPages)) return 0; - - if (page-1 > pageFirst) - return pageObjectNum[page-1]; - else if (page-1 < pageFirst) - return pageObjectNum[page]; - else - return pageObjectNum[0]; -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/Hints.h b/Build/source/libs/poppler/poppler-src/poppler/Hints.h deleted file mode 100644 index a9062265365..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/Hints.h +++ /dev/null @@ -1,93 +0,0 @@ -//======================================================================== -// -// Hints.h -// -// This file is licensed under the GPLv2 or later -// -// Copyright 2010 Hib Eris <hib@hiberis.nl> -// Copyright 2010, 2013, 2016, 2018 Albert Astals Cid <aacid@kde.org> -// Copyright 2013 Adrian Johnson <ajohnson@redneon.com> -// -//======================================================================== - -#ifndef HINTS_H -#define HINTS_H - -#include <string.h> -#include "goo/gtypes.h" -#include <vector> -#include "PDFDoc.h" - -class Stream; -class BaseStream; -class Linearization; -class XRef; - -//------------------------------------------------------------------------ -// Hints -//------------------------------------------------------------------------ - -class Hints { -public: - - Hints(BaseStream *str, Linearization *linearization, XRef *xref, SecurityHandler *secHdlr); - ~Hints(); - - Hints(const Hints &) = delete; - Hints& operator=(const Hints &) = delete; - - GBool isOk() const; - - int getPageObjectNum(int page); - Goffset getPageOffset(int page); - std::vector<ByteRange>* getPageRanges(int page); - -private: - - void readTables(BaseStream *str, Linearization *linearization, XRef *xref, SecurityHandler *secHdlr); - GBool readPageOffsetTable(Stream *str); - GBool readSharedObjectsTable(Stream *str); - - Guint hintsOffset; - Guint hintsLength; - Guint hintsOffset2; - Guint hintsLength2; - Guint mainXRefEntriesOffset; - - int nPages; - int pageFirst; - int pageObjectFirst; - Goffset pageOffsetFirst; - Guint pageEndFirst; - - Guint nObjectLeast; - Guint objectOffsetFirst; - Guint nBitsDiffObjects; - Guint pageLengthLeast; - Guint nBitsDiffPageLength; - Guint OffsetStreamLeast; - Guint nBitsOffsetStream; - Guint lengthStreamLeast; - Guint nBitsLengthStream; - Guint nBitsNumShared; - Guint nBitsShared; - Guint nBitsNumerator; - Guint denominator; - - Guint *nObjects; - int *pageObjectNum; - Guint *xRefOffset; - Guint *pageLength; - Goffset *pageOffset; - Guint *numSharedObject; - Guint **sharedObjectId; - - Guint *groupLength; - Guint *groupOffset; - Guint *groupHasSignature; - Guint *groupNumObjects; - Guint *groupXRefOffset; - GBool ok; -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/JArithmeticDecoder.cc b/Build/source/libs/poppler/poppler-src/poppler/JArithmeticDecoder.cc deleted file mode 100644 index b8bb3b90825..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/JArithmeticDecoder.cc +++ /dev/null @@ -1,355 +0,0 @@ -//======================================================================== -// -// JArithmeticDecoder.cc -// -// Copyright 2002-2004 Glyph & Cog, LLC -// -//======================================================================== - -#include <config.h> - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include "Object.h" -#include "Stream.h" -#include "JArithmeticDecoder.h" - -//------------------------------------------------------------------------ -// JArithmeticDecoderStates -//------------------------------------------------------------------------ - -JArithmeticDecoderStats::JArithmeticDecoderStats(int contextSizeA) { - contextSize = contextSizeA; - cxTab = (Guchar *)gmallocn(contextSize, sizeof(Guchar)); - reset(); -} - -JArithmeticDecoderStats::~JArithmeticDecoderStats() { - gfree(cxTab); -} - -JArithmeticDecoderStats *JArithmeticDecoderStats::copy() { - JArithmeticDecoderStats *stats; - - stats = new JArithmeticDecoderStats(contextSize); - memcpy(stats->cxTab, cxTab, contextSize); - return stats; -} - -void JArithmeticDecoderStats::reset() { - memset(cxTab, 0, contextSize); -} - -void JArithmeticDecoderStats::copyFrom(JArithmeticDecoderStats *stats) { - memcpy(cxTab, stats->cxTab, contextSize); -} - -void JArithmeticDecoderStats::setEntry(Guint cx, int i, int mps) { - cxTab[cx] = (i << 1) + mps; -} - -//------------------------------------------------------------------------ -// JArithmeticDecoder -//------------------------------------------------------------------------ - -Guint JArithmeticDecoder::qeTab[47] = { - 0x56010000, 0x34010000, 0x18010000, 0x0AC10000, - 0x05210000, 0x02210000, 0x56010000, 0x54010000, - 0x48010000, 0x38010000, 0x30010000, 0x24010000, - 0x1C010000, 0x16010000, 0x56010000, 0x54010000, - 0x51010000, 0x48010000, 0x38010000, 0x34010000, - 0x30010000, 0x28010000, 0x24010000, 0x22010000, - 0x1C010000, 0x18010000, 0x16010000, 0x14010000, - 0x12010000, 0x11010000, 0x0AC10000, 0x09C10000, - 0x08A10000, 0x05210000, 0x04410000, 0x02A10000, - 0x02210000, 0x01410000, 0x01110000, 0x00850000, - 0x00490000, 0x00250000, 0x00150000, 0x00090000, - 0x00050000, 0x00010000, 0x56010000 -}; - -int JArithmeticDecoder::nmpsTab[47] = { - 1, 2, 3, 4, 5, 38, 7, 8, 9, 10, 11, 12, 13, 29, 15, 16, - 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, - 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 45, 46 -}; - -int JArithmeticDecoder::nlpsTab[47] = { - 1, 6, 9, 12, 29, 33, 6, 14, 14, 14, 17, 18, 20, 21, 14, 14, - 15, 16, 17, 18, 19, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 46 -}; - -int JArithmeticDecoder::switchTab[47] = { - 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 -}; - -JArithmeticDecoder::JArithmeticDecoder() { - str = nullptr; - dataLen = 0; - limitStream = gFalse; - nBytesRead = 0; -} - -inline Guint JArithmeticDecoder::readByte() { - if (limitStream) { - --dataLen; - if (dataLen < 0) { - return 0xff; - } - } - ++nBytesRead; - return (Guint)str->getChar() & 0xff; -} - -JArithmeticDecoder::~JArithmeticDecoder() { - cleanup(); -} - -void JArithmeticDecoder::start() { - buf0 = readByte(); - buf1 = readByte(); - - // INITDEC - c = (buf0 ^ 0xff) << 16; - byteIn(); - c <<= 7; - ct -= 7; - a = 0x80000000; -} - -void JArithmeticDecoder::restart(int dataLenA) { - Guint cAdd; - GBool prevFF; - int k, nBits; - - if (dataLen >= 0) { - dataLen = dataLenA; - } else if (dataLen == -1) { - dataLen = dataLenA; - buf1 = readByte(); - } else { - k = (-dataLen - 1) * 8 - ct; - dataLen = dataLenA; - cAdd = 0; - prevFF = gFalse; - while (k > 0) { - buf0 = readByte(); - if (prevFF) { - cAdd += 0xfe00 - (buf0 << 9); - nBits = 7; - } else { - cAdd += 0xff00 - (buf0 << 8); - nBits = 8; - } - prevFF = buf0 == 0xff; - if (k > nBits) { - cAdd <<= nBits; - k -= nBits; - } else { - cAdd <<= k; - ct = nBits - k; - k = 0; - } - } - c += cAdd; - buf1 = readByte(); - } -} - -void JArithmeticDecoder::cleanup() { - if (limitStream) { - while (dataLen > 0) { - buf0 = buf1; - buf1 = readByte(); - } - } -} - -int JArithmeticDecoder::decodeBit(Guint context, - JArithmeticDecoderStats *stats) { - int bit; - Guint qe; - int iCX, mpsCX; - - iCX = stats->cxTab[context] >> 1; - mpsCX = stats->cxTab[context] & 1; - qe = qeTab[iCX]; - a -= qe; - if (c < a) { - if (a & 0x80000000) { - bit = mpsCX; - } else { - // MPS_EXCHANGE - if (a < qe) { - bit = 1 - mpsCX; - if (switchTab[iCX]) { - stats->cxTab[context] = (nlpsTab[iCX] << 1) | (1 - mpsCX); - } else { - stats->cxTab[context] = (nlpsTab[iCX] << 1) | mpsCX; - } - } else { - bit = mpsCX; - stats->cxTab[context] = (nmpsTab[iCX] << 1) | mpsCX; - } - // RENORMD - do { - if (ct == 0) { - byteIn(); - } - a <<= 1; - c <<= 1; - --ct; - } while (!(a & 0x80000000)); - } - } else { - c -= a; - // LPS_EXCHANGE - if (a < qe) { - bit = mpsCX; - stats->cxTab[context] = (nmpsTab[iCX] << 1) | mpsCX; - } else { - bit = 1 - mpsCX; - if (switchTab[iCX]) { - stats->cxTab[context] = (nlpsTab[iCX] << 1) | (1 - mpsCX); - } else { - stats->cxTab[context] = (nlpsTab[iCX] << 1) | mpsCX; - } - } - a = qe; - // RENORMD - do { - if (ct == 0) { - byteIn(); - } - a <<= 1; - c <<= 1; - --ct; - } while (!(a & 0x80000000)); - } - return bit; -} - -int JArithmeticDecoder::decodeByte(Guint context, - JArithmeticDecoderStats *stats) { - int byte; - int i; - - byte = 0; - for (i = 0; i < 8; ++i) { - byte = (byte << 1) | decodeBit(context, stats); - } - return byte; -} - -GBool JArithmeticDecoder::decodeInt(int *x, JArithmeticDecoderStats *stats) { - int s; - Guint v; - int i; - - prev = 1; - s = decodeIntBit(stats); - if (decodeIntBit(stats)) { - if (decodeIntBit(stats)) { - if (decodeIntBit(stats)) { - if (decodeIntBit(stats)) { - if (decodeIntBit(stats)) { - v = 0; - for (i = 0; i < 32; ++i) { - v = (v << 1) | decodeIntBit(stats); - } - v += 4436; - } else { - v = 0; - for (i = 0; i < 12; ++i) { - v = (v << 1) | decodeIntBit(stats); - } - v += 340; - } - } else { - v = 0; - for (i = 0; i < 8; ++i) { - v = (v << 1) | decodeIntBit(stats); - } - v += 84; - } - } else { - v = 0; - for (i = 0; i < 6; ++i) { - v = (v << 1) | decodeIntBit(stats); - } - v += 20; - } - } else { - v = decodeIntBit(stats); - v = (v << 1) | decodeIntBit(stats); - v = (v << 1) | decodeIntBit(stats); - v = (v << 1) | decodeIntBit(stats); - v += 4; - } - } else { - v = decodeIntBit(stats); - v = (v << 1) | decodeIntBit(stats); - } - - if (s) { - if (v == 0) { - return gFalse; - } - *x = -(int)v; - } else { - *x = (int)v; - } - return gTrue; -} - -int JArithmeticDecoder::decodeIntBit(JArithmeticDecoderStats *stats) { - int bit; - - bit = decodeBit(prev, stats); - if (prev < 0x100) { - prev = (prev << 1) | bit; - } else { - prev = (((prev << 1) | bit) & 0x1ff) | 0x100; - } - return bit; -} - -Guint JArithmeticDecoder::decodeIAID(Guint codeLen, - JArithmeticDecoderStats *stats) { - Guint i; - int bit; - - prev = 1; - for (i = 0; i < codeLen; ++i) { - bit = decodeBit(prev, stats); - prev = (prev << 1) | bit; - } - return prev - (1 << codeLen); -} - -void JArithmeticDecoder::byteIn() { - if (buf0 == 0xff) { - if (buf1 > 0x8f) { - if (limitStream) { - buf0 = buf1; - buf1 = readByte(); - c = c + 0xff00 - (buf0 << 8); - } - ct = 8; - } else { - buf0 = buf1; - buf1 = readByte(); - c = c + 0xfe00 - (buf0 << 9); - ct = 7; - } - } else { - buf0 = buf1; - buf1 = readByte(); - c = c + 0xff00 - (buf0 << 8); - ct = 8; - } -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/JArithmeticDecoder.h b/Build/source/libs/poppler/poppler-src/poppler/JArithmeticDecoder.h deleted file mode 100644 index cb8f481f9b4..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/JArithmeticDecoder.h +++ /dev/null @@ -1,129 +0,0 @@ -//======================================================================== -// -// JArithmeticDecoder.h -// -// Arithmetic decoder used by the JBIG2 and JPEG2000 decoders. -// -// Copyright 2002-2004 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2018 Albert Astals Cid <aacid@kde.org> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef JARITHMETICDECODER_H -#define JARITHMETICDECODER_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "goo/gtypes.h" - -class Stream; - -//------------------------------------------------------------------------ -// JArithmeticDecoderStats -//------------------------------------------------------------------------ - -class JArithmeticDecoderStats { -public: - - JArithmeticDecoderStats(int contextSizeA); - ~JArithmeticDecoderStats(); - JArithmeticDecoderStats(const JArithmeticDecoderStats &) = delete; - JArithmeticDecoderStats& operator=(const JArithmeticDecoderStats &) = delete; - JArithmeticDecoderStats *copy(); - void reset(); - int getContextSize() { return contextSize; } - void copyFrom(JArithmeticDecoderStats *stats); - void setEntry(Guint cx, int i, int mps); - -private: - - Guchar *cxTab; // cxTab[cx] = (i[cx] << 1) + mps[cx] - int contextSize; - - friend class JArithmeticDecoder; -}; - -//------------------------------------------------------------------------ -// JArithmeticDecoder -//------------------------------------------------------------------------ - -class JArithmeticDecoder { -public: - - JArithmeticDecoder(); - ~JArithmeticDecoder(); - JArithmeticDecoder(const JArithmeticDecoder &) = delete; - JArithmeticDecoder& operator=(const JArithmeticDecoder &) = delete; - - void setStream(Stream *strA) - { str = strA; dataLen = 0; limitStream = gFalse; } - void setStream(Stream *strA, int dataLenA) - { str = strA; dataLen = dataLenA; limitStream = gTrue; } - - // Start decoding on a new stream. This fills the byte buffers and - // runs INITDEC. - void start(); - - // Restart decoding on an interrupted stream. This refills the - // buffers if needed, but does not run INITDEC. (This is used in - // JPEG 2000 streams when codeblock data is split across multiple - // packets/layers.) - void restart(int dataLenA); - - // Read any leftover data in the stream. - void cleanup(); - - // Decode one bit. - int decodeBit(Guint context, JArithmeticDecoderStats *stats); - - // Decode eight bits. - int decodeByte(Guint context, JArithmeticDecoderStats *stats); - - // Returns false for OOB, otherwise sets *<x> and returns true. - GBool decodeInt(int *x, JArithmeticDecoderStats *stats); - - Guint decodeIAID(Guint codeLen, - JArithmeticDecoderStats *stats); - - void resetByteCounter() { nBytesRead = 0; } - Guint getByteCounter() { return nBytesRead; } - -private: - - Guint readByte(); - int decodeIntBit(JArithmeticDecoderStats *stats); - void byteIn(); - - static Guint qeTab[47]; - static int nmpsTab[47]; - static int nlpsTab[47]; - static int switchTab[47]; - - Guint buf0, buf1; - Guint c, a; - int ct; - - Guint prev; // for the integer decoder - - Stream *str; - Guint nBytesRead; - int dataLen; - GBool limitStream; -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/JBIG2Stream.cc b/Build/source/libs/poppler/poppler-src/poppler/JBIG2Stream.cc deleted file mode 100644 index 25df3db8ae0..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/JBIG2Stream.cc +++ /dev/null @@ -1,4314 +0,0 @@ -//======================================================================== -// -// JBIG2Stream.cc -// -// Copyright 2002-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2006 Raj Kumar <rkumar@archive.org> -// Copyright (C) 2006 Paul Walmsley <paul@booyaka.com> -// Copyright (C) 2006-2010, 2012, 2014-2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2009 David Benjamin <davidben@mit.edu> -// Copyright (C) 2011 Edward Jiang <ejiang@google.com> -// Copyright (C) 2012 William Bader <williambader@hotmail.com> -// Copyright (C) 2012 Thomas Freitag <Thomas.Freitag@alfa.de> -// Copyright (C) 2013 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2013, 2014 Fabio D'Urso <fabiodurso@hotmail.it> -// Copyright (C) 2015 Suzuki Toshiya <mpsuzuki@hiroshima-u.ac.jp> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include <config.h> - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include <stdlib.h> -#include <limits.h> -#include "goo/GooList.h" -#include "Error.h" -#include "JArithmeticDecoder.h" -#include "JBIG2Stream.h" - -//~ share these tables -#include "Stream-CCITT.h" - -//------------------------------------------------------------------------ - -static const int contextSize[4] = { 16, 13, 10, 10 }; -static const int refContextSize[2] = { 13, 10 }; - -//------------------------------------------------------------------------ -// JBIG2HuffmanTable -//------------------------------------------------------------------------ - -#define jbig2HuffmanLOW 0xfffffffd -#define jbig2HuffmanOOB 0xfffffffe -#define jbig2HuffmanEOT 0xffffffff - -struct JBIG2HuffmanTable { - int val; - Guint prefixLen; - Guint rangeLen; // can also be LOW, OOB, or EOT - Guint prefix; -}; - -static JBIG2HuffmanTable huffTableA[] = { - { 0, 1, 4, 0x000 }, - { 16, 2, 8, 0x002 }, - { 272, 3, 16, 0x006 }, - { 65808, 3, 32, 0x007 }, - { 0, 0, jbig2HuffmanEOT, 0 } -}; - -static JBIG2HuffmanTable huffTableB[] = { - { 0, 1, 0, 0x000 }, - { 1, 2, 0, 0x002 }, - { 2, 3, 0, 0x006 }, - { 3, 4, 3, 0x00e }, - { 11, 5, 6, 0x01e }, - { 75, 6, 32, 0x03e }, - { 0, 6, jbig2HuffmanOOB, 0x03f }, - { 0, 0, jbig2HuffmanEOT, 0 } -}; - -static JBIG2HuffmanTable huffTableC[] = { - { 0, 1, 0, 0x000 }, - { 1, 2, 0, 0x002 }, - { 2, 3, 0, 0x006 }, - { 3, 4, 3, 0x00e }, - { 11, 5, 6, 0x01e }, - { 0, 6, jbig2HuffmanOOB, 0x03e }, - { 75, 7, 32, 0x0fe }, - { -256, 8, 8, 0x0fe }, - { -257, 8, jbig2HuffmanLOW, 0x0ff }, - { 0, 0, jbig2HuffmanEOT, 0 } -}; - -static JBIG2HuffmanTable huffTableD[] = { - { 1, 1, 0, 0x000 }, - { 2, 2, 0, 0x002 }, - { 3, 3, 0, 0x006 }, - { 4, 4, 3, 0x00e }, - { 12, 5, 6, 0x01e }, - { 76, 5, 32, 0x01f }, - { 0, 0, jbig2HuffmanEOT, 0 } -}; - -static JBIG2HuffmanTable huffTableE[] = { - { 1, 1, 0, 0x000 }, - { 2, 2, 0, 0x002 }, - { 3, 3, 0, 0x006 }, - { 4, 4, 3, 0x00e }, - { 12, 5, 6, 0x01e }, - { 76, 6, 32, 0x03e }, - { -255, 7, 8, 0x07e }, - { -256, 7, jbig2HuffmanLOW, 0x07f }, - { 0, 0, jbig2HuffmanEOT, 0 } -}; - -static JBIG2HuffmanTable huffTableF[] = { - { 0, 2, 7, 0x000 }, - { 128, 3, 7, 0x002 }, - { 256, 3, 8, 0x003 }, - { -1024, 4, 9, 0x008 }, - { -512, 4, 8, 0x009 }, - { -256, 4, 7, 0x00a }, - { -32, 4, 5, 0x00b }, - { 512, 4, 9, 0x00c }, - { 1024, 4, 10, 0x00d }, - { -2048, 5, 10, 0x01c }, - { -128, 5, 6, 0x01d }, - { -64, 5, 5, 0x01e }, - { -2049, 6, jbig2HuffmanLOW, 0x03e }, - { 2048, 6, 32, 0x03f }, - { 0, 0, jbig2HuffmanEOT, 0 } -}; - -static JBIG2HuffmanTable huffTableG[] = { - { -512, 3, 8, 0x000 }, - { 256, 3, 8, 0x001 }, - { 512, 3, 9, 0x002 }, - { 1024, 3, 10, 0x003 }, - { -1024, 4, 9, 0x008 }, - { -256, 4, 7, 0x009 }, - { -32, 4, 5, 0x00a }, - { 0, 4, 5, 0x00b }, - { 128, 4, 7, 0x00c }, - { -128, 5, 6, 0x01a }, - { -64, 5, 5, 0x01b }, - { 32, 5, 5, 0x01c }, - { 64, 5, 6, 0x01d }, - { -1025, 5, jbig2HuffmanLOW, 0x01e }, - { 2048, 5, 32, 0x01f }, - { 0, 0, jbig2HuffmanEOT, 0 } -}; - -static JBIG2HuffmanTable huffTableH[] = { - { 0, 2, 1, 0x000 }, - { 0, 2, jbig2HuffmanOOB, 0x001 }, - { 4, 3, 4, 0x004 }, - { -1, 4, 0, 0x00a }, - { 22, 4, 4, 0x00b }, - { 38, 4, 5, 0x00c }, - { 2, 5, 0, 0x01a }, - { 70, 5, 6, 0x01b }, - { 134, 5, 7, 0x01c }, - { 3, 6, 0, 0x03a }, - { 20, 6, 1, 0x03b }, - { 262, 6, 7, 0x03c }, - { 646, 6, 10, 0x03d }, - { -2, 7, 0, 0x07c }, - { 390, 7, 8, 0x07d }, - { -15, 8, 3, 0x0fc }, - { -5, 8, 1, 0x0fd }, - { -7, 9, 1, 0x1fc }, - { -3, 9, 0, 0x1fd }, - { -16, 9, jbig2HuffmanLOW, 0x1fe }, - { 1670, 9, 32, 0x1ff }, - { 0, 0, jbig2HuffmanEOT, 0 } -}; - -static JBIG2HuffmanTable huffTableI[] = { - { 0, 2, jbig2HuffmanOOB, 0x000 }, - { -1, 3, 1, 0x002 }, - { 1, 3, 1, 0x003 }, - { 7, 3, 5, 0x004 }, - { -3, 4, 1, 0x00a }, - { 43, 4, 5, 0x00b }, - { 75, 4, 6, 0x00c }, - { 3, 5, 1, 0x01a }, - { 139, 5, 7, 0x01b }, - { 267, 5, 8, 0x01c }, - { 5, 6, 1, 0x03a }, - { 39, 6, 2, 0x03b }, - { 523, 6, 8, 0x03c }, - { 1291, 6, 11, 0x03d }, - { -5, 7, 1, 0x07c }, - { 779, 7, 9, 0x07d }, - { -31, 8, 4, 0x0fc }, - { -11, 8, 2, 0x0fd }, - { -15, 9, 2, 0x1fc }, - { -7, 9, 1, 0x1fd }, - { -32, 9, jbig2HuffmanLOW, 0x1fe }, - { 3339, 9, 32, 0x1ff }, - { 0, 0, jbig2HuffmanEOT, 0 } -}; - -static JBIG2HuffmanTable huffTableJ[] = { - { -2, 2, 2, 0x000 }, - { 6, 2, 6, 0x001 }, - { 0, 2, jbig2HuffmanOOB, 0x002 }, - { -3, 5, 0, 0x018 }, - { 2, 5, 0, 0x019 }, - { 70, 5, 5, 0x01a }, - { 3, 6, 0, 0x036 }, - { 102, 6, 5, 0x037 }, - { 134, 6, 6, 0x038 }, - { 198, 6, 7, 0x039 }, - { 326, 6, 8, 0x03a }, - { 582, 6, 9, 0x03b }, - { 1094, 6, 10, 0x03c }, - { -21, 7, 4, 0x07a }, - { -4, 7, 0, 0x07b }, - { 4, 7, 0, 0x07c }, - { 2118, 7, 11, 0x07d }, - { -5, 8, 0, 0x0fc }, - { 5, 8, 0, 0x0fd }, - { -22, 8, jbig2HuffmanLOW, 0x0fe }, - { 4166, 8, 32, 0x0ff }, - { 0, 0, jbig2HuffmanEOT, 0 } -}; - -static JBIG2HuffmanTable huffTableK[] = { - { 1, 1, 0, 0x000 }, - { 2, 2, 1, 0x002 }, - { 4, 4, 0, 0x00c }, - { 5, 4, 1, 0x00d }, - { 7, 5, 1, 0x01c }, - { 9, 5, 2, 0x01d }, - { 13, 6, 2, 0x03c }, - { 17, 7, 2, 0x07a }, - { 21, 7, 3, 0x07b }, - { 29, 7, 4, 0x07c }, - { 45, 7, 5, 0x07d }, - { 77, 7, 6, 0x07e }, - { 141, 7, 32, 0x07f }, - { 0, 0, jbig2HuffmanEOT, 0 } -}; - -static JBIG2HuffmanTable huffTableL[] = { - { 1, 1, 0, 0x000 }, - { 2, 2, 0, 0x002 }, - { 3, 3, 1, 0x006 }, - { 5, 5, 0, 0x01c }, - { 6, 5, 1, 0x01d }, - { 8, 6, 1, 0x03c }, - { 10, 7, 0, 0x07a }, - { 11, 7, 1, 0x07b }, - { 13, 7, 2, 0x07c }, - { 17, 7, 3, 0x07d }, - { 25, 7, 4, 0x07e }, - { 41, 8, 5, 0x0fe }, - { 73, 8, 32, 0x0ff }, - { 0, 0, jbig2HuffmanEOT, 0 } -}; - -static JBIG2HuffmanTable huffTableM[] = { - { 1, 1, 0, 0x000 }, - { 2, 3, 0, 0x004 }, - { 7, 3, 3, 0x005 }, - { 3, 4, 0, 0x00c }, - { 5, 4, 1, 0x00d }, - { 4, 5, 0, 0x01c }, - { 15, 6, 1, 0x03a }, - { 17, 6, 2, 0x03b }, - { 21, 6, 3, 0x03c }, - { 29, 6, 4, 0x03d }, - { 45, 6, 5, 0x03e }, - { 77, 7, 6, 0x07e }, - { 141, 7, 32, 0x07f }, - { 0, 0, jbig2HuffmanEOT, 0 } -}; - -static JBIG2HuffmanTable huffTableN[] = { - { 0, 1, 0, 0x000 }, - { -2, 3, 0, 0x004 }, - { -1, 3, 0, 0x005 }, - { 1, 3, 0, 0x006 }, - { 2, 3, 0, 0x007 }, - { 0, 0, jbig2HuffmanEOT, 0 } -}; - -static JBIG2HuffmanTable huffTableO[] = { - { 0, 1, 0, 0x000 }, - { -1, 3, 0, 0x004 }, - { 1, 3, 0, 0x005 }, - { -2, 4, 0, 0x00c }, - { 2, 4, 0, 0x00d }, - { -4, 5, 1, 0x01c }, - { 3, 5, 1, 0x01d }, - { -8, 6, 2, 0x03c }, - { 5, 6, 2, 0x03d }, - { -24, 7, 4, 0x07c }, - { 9, 7, 4, 0x07d }, - { -25, 7, jbig2HuffmanLOW, 0x07e }, - { 25, 7, 32, 0x07f }, - { 0, 0, jbig2HuffmanEOT, 0 } -}; - -//------------------------------------------------------------------------ -// JBIG2HuffmanDecoder -//------------------------------------------------------------------------ - -class JBIG2HuffmanDecoder { -public: - - JBIG2HuffmanDecoder(); - ~JBIG2HuffmanDecoder(); - void setStream(Stream *strA) { str = strA; } - - void reset(); - - // Returns false for OOB, otherwise sets *<x> and returns true. - GBool decodeInt(int *x, JBIG2HuffmanTable *table); - - Guint readBits(Guint n); - Guint readBit(); - - // Sort the table by prefix length and assign prefix values. - void buildTable(JBIG2HuffmanTable *table, Guint len); - -private: - - Stream *str; - Guint buf; - Guint bufLen; -}; - -JBIG2HuffmanDecoder::JBIG2HuffmanDecoder() { - str = nullptr; - reset(); -} - -JBIG2HuffmanDecoder::~JBIG2HuffmanDecoder() { -} - -void JBIG2HuffmanDecoder::reset() { - buf = 0; - bufLen = 0; -} - -//~ optimize this -GBool JBIG2HuffmanDecoder::decodeInt(int *x, JBIG2HuffmanTable *table) { - Guint i, len, prefix; - - i = 0; - len = 0; - prefix = 0; - while (table[i].rangeLen != jbig2HuffmanEOT) { - while (len < table[i].prefixLen) { - prefix = (prefix << 1) | readBit(); - ++len; - } - if (prefix == table[i].prefix) { - if (table[i].rangeLen == jbig2HuffmanOOB) { - return gFalse; - } - if (table[i].rangeLen == jbig2HuffmanLOW) { - *x = table[i].val - readBits(32); - } else if (table[i].rangeLen > 0) { - *x = table[i].val + readBits(table[i].rangeLen); - } else { - *x = table[i].val; - } - return gTrue; - } - ++i; - } - return gFalse; -} - -Guint JBIG2HuffmanDecoder::readBits(Guint n) { - Guint x, mask, nLeft; - - mask = (n == 32) ? 0xffffffff : ((1 << n) - 1); - if (bufLen >= n) { - x = (buf >> (bufLen - n)) & mask; - bufLen -= n; - } else { - x = buf & ((1 << bufLen) - 1); - nLeft = n - bufLen; - bufLen = 0; - while (nLeft >= 8) { - x = (x << 8) | (str->getChar() & 0xff); - nLeft -= 8; - } - if (nLeft > 0) { - buf = str->getChar(); - bufLen = 8 - nLeft; - x = (x << nLeft) | ((buf >> bufLen) & ((1 << nLeft) - 1)); - } - } - return x; -} - -Guint JBIG2HuffmanDecoder::readBit() { - if (bufLen == 0) { - buf = str->getChar(); - bufLen = 8; - } - --bufLen; - return (buf >> bufLen) & 1; -} - -void JBIG2HuffmanDecoder::buildTable(JBIG2HuffmanTable *table, Guint len) { - Guint i, j, k, prefix; - JBIG2HuffmanTable tab; - - // stable selection sort: - // - entries with prefixLen > 0, in ascending prefixLen order - // - entry with prefixLen = 0, rangeLen = EOT - // - all other entries with prefixLen = 0 - // (on entry, table[len] has prefixLen = 0, rangeLen = EOT) - for (i = 0; i < len; ++i) { - for (j = i; j < len && table[j].prefixLen == 0; ++j) ; - if (j == len) { - break; - } - for (k = j + 1; k < len; ++k) { - if (table[k].prefixLen > 0 && - table[k].prefixLen < table[j].prefixLen) { - j = k; - } - } - if (j != i) { - tab = table[j]; - for (k = j; k > i; --k) { - table[k] = table[k - 1]; - } - table[i] = tab; - } - } - table[i] = table[len]; - - // assign prefixes - if (table[0].rangeLen != jbig2HuffmanEOT) { - i = 0; - prefix = 0; - table[i++].prefix = prefix++; - for (; table[i].rangeLen != jbig2HuffmanEOT; ++i) { - prefix <<= table[i].prefixLen - table[i-1].prefixLen; - table[i].prefix = prefix++; - } - } -} - -//------------------------------------------------------------------------ -// JBIG2MMRDecoder -//------------------------------------------------------------------------ - -class JBIG2MMRDecoder { -public: - - JBIG2MMRDecoder(); - ~JBIG2MMRDecoder(); - void setStream(Stream *strA) { str = strA; } - void reset(); - int get2DCode(); - int getBlackCode(); - int getWhiteCode(); - Guint get24Bits(); - void skipTo(Guint length); - -private: - - Stream *str; - Guint buf; - Guint bufLen; - Guint nBytesRead; -}; - -JBIG2MMRDecoder::JBIG2MMRDecoder() { - str = nullptr; - reset(); -} - -JBIG2MMRDecoder::~JBIG2MMRDecoder() { -} - -void JBIG2MMRDecoder::reset() { - buf = 0; - bufLen = 0; - nBytesRead = 0; -} - -int JBIG2MMRDecoder::get2DCode() { - const CCITTCode *p; - - if (bufLen == 0) { - buf = str->getChar() & 0xff; - bufLen = 8; - ++nBytesRead; - p = &twoDimTab1[(buf >> 1) & 0x7f]; - } else if (bufLen == 8) { - p = &twoDimTab1[(buf >> 1) & 0x7f]; - } else { - p = &twoDimTab1[(buf << (7 - bufLen)) & 0x7f]; - if (p->bits < 0 || p->bits > (int)bufLen) { - buf = (buf << 8) | (str->getChar() & 0xff); - bufLen += 8; - ++nBytesRead; - p = &twoDimTab1[(buf >> (bufLen - 7)) & 0x7f]; - } - } - if (p->bits < 0) { - error(errSyntaxError, str->getPos(), "Bad two dim code in JBIG2 MMR stream"); - return EOF; - } - bufLen -= p->bits; - return p->n; -} - -int JBIG2MMRDecoder::getWhiteCode() { - const CCITTCode *p; - Guint code; - - if (bufLen == 0) { - buf = str->getChar() & 0xff; - bufLen = 8; - ++nBytesRead; - } - while (1) { - if (bufLen >= 11 && ((buf >> (bufLen - 7)) & 0x7f) == 0) { - if (bufLen <= 12) { - code = buf << (12 - bufLen); - } else { - code = buf >> (bufLen - 12); - } - p = &whiteTab1[code & 0x1f]; - } else { - if (bufLen <= 9) { - code = buf << (9 - bufLen); - } else { - code = buf >> (bufLen - 9); - } - p = &whiteTab2[code & 0x1ff]; - } - if (p->bits > 0 && p->bits <= (int)bufLen) { - bufLen -= p->bits; - return p->n; - } - if (bufLen >= 12) { - break; - } - buf = (buf << 8) | (str->getChar() & 0xff); - bufLen += 8; - ++nBytesRead; - } - error(errSyntaxError, str->getPos(), "Bad white code in JBIG2 MMR stream"); - // eat a bit and return a positive number so that the caller doesn't - // go into an infinite loop - --bufLen; - return 1; -} - -int JBIG2MMRDecoder::getBlackCode() { - const CCITTCode *p; - Guint code; - - if (bufLen == 0) { - buf = str->getChar() & 0xff; - bufLen = 8; - ++nBytesRead; - } - while (1) { - if (bufLen >= 10 && ((buf >> (bufLen - 6)) & 0x3f) == 0) { - if (bufLen <= 13) { - code = buf << (13 - bufLen); - } else { - code = buf >> (bufLen - 13); - } - p = &blackTab1[code & 0x7f]; - } else if (bufLen >= 7 && ((buf >> (bufLen - 4)) & 0x0f) == 0 && - ((buf >> (bufLen - 6)) & 0x03) != 0) { - if (bufLen <= 12) { - code = buf << (12 - bufLen); - } else { - code = buf >> (bufLen - 12); - } - if (unlikely((code & 0xff) < 64)) { - break; - } - p = &blackTab2[(code & 0xff) - 64]; - } else { - if (bufLen <= 6) { - code = buf << (6 - bufLen); - } else { - code = buf >> (bufLen - 6); - } - p = &blackTab3[code & 0x3f]; - } - if (p->bits > 0 && p->bits <= (int)bufLen) { - bufLen -= p->bits; - return p->n; - } - if (bufLen >= 13) { - break; - } - buf = (buf << 8) | (str->getChar() & 0xff); - bufLen += 8; - ++nBytesRead; - } - error(errSyntaxError, str->getPos(), "Bad black code in JBIG2 MMR stream"); - // eat a bit and return a positive number so that the caller doesn't - // go into an infinite loop - --bufLen; - return 1; -} - -Guint JBIG2MMRDecoder::get24Bits() { - while (bufLen < 24) { - buf = (buf << 8) | (str->getChar() & 0xff); - bufLen += 8; - ++nBytesRead; - } - return (buf >> (bufLen - 24)) & 0xffffff; -} - -void JBIG2MMRDecoder::skipTo(Guint length) { - while (nBytesRead < length) { - str->getChar(); - ++nBytesRead; - } -} - -//------------------------------------------------------------------------ -// JBIG2Segment -//------------------------------------------------------------------------ - -enum JBIG2SegmentType { - jbig2SegBitmap, - jbig2SegSymbolDict, - jbig2SegPatternDict, - jbig2SegCodeTable -}; - -class JBIG2Segment { -public: - - JBIG2Segment(Guint segNumA) { segNum = segNumA; } - virtual ~JBIG2Segment() {} - JBIG2Segment(const JBIG2Segment &) = delete; - JBIG2Segment& operator=(const JBIG2Segment &) = delete; - void setSegNum(Guint segNumA) { segNum = segNumA; } - Guint getSegNum() { return segNum; } - virtual JBIG2SegmentType getType() = 0; - -private: - - Guint segNum; -}; - -//------------------------------------------------------------------------ -// JBIG2Bitmap -//------------------------------------------------------------------------ - -struct JBIG2BitmapPtr { - Guchar *p; - int shift; - int x; -}; - -class JBIG2Bitmap: public JBIG2Segment { -public: - - JBIG2Bitmap(Guint segNumA, int wA, int hA); - ~JBIG2Bitmap(); - JBIG2SegmentType getType() override { return jbig2SegBitmap; } - JBIG2Bitmap *copy() { return new JBIG2Bitmap(0, this); } - JBIG2Bitmap *getSlice(Guint x, Guint y, Guint wA, Guint hA); - void expand(int newH, Guint pixel); - void clearToZero(); - void clearToOne(); - int getWidth() { return w; } - int getHeight() { return h; } - int getLineSize() { return line; } - int getPixel(int x, int y) - { return (x < 0 || x >= w || y < 0 || y >= h) ? 0 : - (data[y * line + (x >> 3)] >> (7 - (x & 7))) & 1; } - void setPixel(int x, int y) - { data[y * line + (x >> 3)] |= 1 << (7 - (x & 7)); } - void clearPixel(int x, int y) - { data[y * line + (x >> 3)] &= 0x7f7f >> (x & 7); } - void getPixelPtr(int x, int y, JBIG2BitmapPtr *ptr); - int nextPixel(JBIG2BitmapPtr *ptr); - void duplicateRow(int yDest, int ySrc); - void combine(JBIG2Bitmap *bitmap, int x, int y, Guint combOp); - Guchar *getDataPtr() { return data; } - int getDataSize() { return h * line; } - GBool isOk() { return data != nullptr; } - -private: - - JBIG2Bitmap(Guint segNumA, JBIG2Bitmap *bitmap); - - int w, h, line; - Guchar *data; -}; - -JBIG2Bitmap::JBIG2Bitmap(Guint segNumA, int wA, int hA): - JBIG2Segment(segNumA) -{ - w = wA; - h = hA; - line = (wA + 7) >> 3; - - if (w <= 0 || h <= 0 || line <= 0 || h >= (INT_MAX - 1) / line) { - error(errSyntaxError, -1, "invalid width/height"); - data = nullptr; - return; - } - // need to allocate one extra guard byte for use in combine() - data = (Guchar *)gmalloc_checkoverflow(h * line + 1); - if (data != nullptr) { - data[h * line] = 0; - } -} - -JBIG2Bitmap::JBIG2Bitmap(Guint segNumA, JBIG2Bitmap *bitmap): - JBIG2Segment(segNumA) -{ - if (unlikely(bitmap == nullptr)) { - error(errSyntaxError, -1, "NULL bitmap in JBIG2Bitmap"); - w = h = line = 0; - data = nullptr; - return; - } - - w = bitmap->w; - h = bitmap->h; - line = bitmap->line; - - if (w <= 0 || h <= 0 || line <= 0 || h >= (INT_MAX - 1) / line) { - error(errSyntaxError, -1, "invalid width/height"); - data = nullptr; - return; - } - // need to allocate one extra guard byte for use in combine() - data = (Guchar *)gmalloc(h * line + 1); - memcpy(data, bitmap->data, h * line); - data[h * line] = 0; -} - -JBIG2Bitmap::~JBIG2Bitmap() { - gfree(data); -} - -//~ optimize this -JBIG2Bitmap *JBIG2Bitmap::getSlice(Guint x, Guint y, Guint wA, Guint hA) { - JBIG2Bitmap *slice; - Guint xx, yy; - - if (!data) { - return nullptr; - } - - slice = new JBIG2Bitmap(0, wA, hA); - if (slice->isOk()) { - slice->clearToZero(); - for (yy = 0; yy < hA; ++yy) { - for (xx = 0; xx < wA; ++xx) { - if (getPixel(x + xx, y + yy)) { - slice->setPixel(xx, yy); - } - } - } - } else { - delete slice; - slice = nullptr; - } - return slice; -} - -void JBIG2Bitmap::expand(int newH, Guint pixel) { - if (newH <= h || line <= 0 || newH >= (INT_MAX - 1) / line) { - error(errSyntaxError, -1, "invalid width/height"); - gfree(data); - data = nullptr; - return; - } - // need to allocate one extra guard byte for use in combine() - data = (Guchar *)grealloc(data, newH * line + 1); - if (pixel) { - memset(data + h * line, 0xff, (newH - h) * line); - } else { - memset(data + h * line, 0x00, (newH - h) * line); - } - h = newH; - data[h * line] = 0; -} - -void JBIG2Bitmap::clearToZero() { - memset(data, 0, h * line); -} - -void JBIG2Bitmap::clearToOne() { - memset(data, 0xff, h * line); -} - -inline void JBIG2Bitmap::getPixelPtr(int x, int y, JBIG2BitmapPtr *ptr) { - if (y < 0 || y >= h || x >= w) { - ptr->p = nullptr; - ptr->shift = 0; // make gcc happy - ptr->x = 0; // make gcc happy - } else if (x < 0) { - ptr->p = &data[y * line]; - ptr->shift = 7; - ptr->x = x; - } else { - ptr->p = &data[y * line + (x >> 3)]; - ptr->shift = 7 - (x & 7); - ptr->x = x; - } -} - -inline int JBIG2Bitmap::nextPixel(JBIG2BitmapPtr *ptr) { - int pix; - - if (!ptr->p) { - pix = 0; - } else if (ptr->x < 0) { - ++ptr->x; - pix = 0; - } else { - pix = (*ptr->p >> ptr->shift) & 1; - if (++ptr->x == w) { - ptr->p = nullptr; - } else if (ptr->shift == 0) { - ++ptr->p; - ptr->shift = 7; - } else { - --ptr->shift; - } - } - return pix; -} - -void JBIG2Bitmap::duplicateRow(int yDest, int ySrc) { - memcpy(data + yDest * line, data + ySrc * line, line); -} - -void JBIG2Bitmap::combine(JBIG2Bitmap *bitmap, int x, int y, - Guint combOp) { - int x0, x1, y0, y1, xx, yy; - Guchar *srcPtr, *destPtr; - Guint src0, src1, src, dest, s1, s2, m1, m2, m3; - GBool oneByte; - - // check for the pathological case where y = -2^31 - if (y < -0x7fffffff) { - return; - } - if (y < 0) { - y0 = -y; - } else { - y0 = 0; - } - if (y + bitmap->h > h) { - y1 = h - y; - } else { - y1 = bitmap->h; - } - if (y0 >= y1) { - return; - } - - if (x >= 0) { - x0 = x & ~7; - } else { - x0 = 0; - } - x1 = x + bitmap->w; - if (x1 > w) { - x1 = w; - } - if (x0 >= x1) { - return; - } - - s1 = x & 7; - s2 = 8 - s1; - m1 = 0xff >> (x1 & 7); - m2 = 0xff << (((x1 & 7) == 0) ? 0 : 8 - (x1 & 7)); - m3 = (0xff >> s1) & m2; - - oneByte = x0 == ((x1 - 1) & ~7); - - for (yy = y0; yy < y1; ++yy) { - if (unlikely((y + yy >= h) || (y + yy < 0))) - continue; - - // one byte per line -- need to mask both left and right side - if (oneByte) { - if (x >= 0) { - destPtr = data + (y + yy) * line + (x >> 3); - srcPtr = bitmap->data + yy * bitmap->line; - dest = *destPtr; - src1 = *srcPtr; - switch (combOp) { - case 0: // or - dest |= (src1 >> s1) & m2; - break; - case 1: // and - dest &= ((0xff00 | src1) >> s1) | m1; - break; - case 2: // xor - dest ^= (src1 >> s1) & m2; - break; - case 3: // xnor - dest ^= ((src1 ^ 0xff) >> s1) & m2; - break; - case 4: // replace - dest = (dest & ~m3) | ((src1 >> s1) & m3); - break; - } - *destPtr = dest; - } else { - destPtr = data + (y + yy) * line; - srcPtr = bitmap->data + yy * bitmap->line + (-x >> 3); - dest = *destPtr; - src1 = *srcPtr; - switch (combOp) { - case 0: // or - dest |= src1 & m2; - break; - case 1: // and - dest &= src1 | m1; - break; - case 2: // xor - dest ^= src1 & m2; - break; - case 3: // xnor - dest ^= (src1 ^ 0xff) & m2; - break; - case 4: // replace - dest = (src1 & m2) | (dest & m1); - break; - } - *destPtr = dest; - } - - // multiple bytes per line -- need to mask left side of left-most - // byte and right side of right-most byte - } else { - - // left-most byte - if (x >= 0) { - destPtr = data + (y + yy) * line + (x >> 3); - srcPtr = bitmap->data + yy * bitmap->line; - src1 = *srcPtr++; - dest = *destPtr; - switch (combOp) { - case 0: // or - dest |= src1 >> s1; - break; - case 1: // and - dest &= (0xff00 | src1) >> s1; - break; - case 2: // xor - dest ^= src1 >> s1; - break; - case 3: // xnor - dest ^= (src1 ^ 0xff) >> s1; - break; - case 4: // replace - dest = (dest & (0xff << s2)) | (src1 >> s1); - break; - } - *destPtr++ = dest; - xx = x0 + 8; - } else { - destPtr = data + (y + yy) * line; - srcPtr = bitmap->data + yy * bitmap->line + (-x >> 3); - src1 = *srcPtr++; - xx = x0; - } - - // middle bytes - for (; xx < x1 - 8; xx += 8) { - dest = *destPtr; - src0 = src1; - src1 = *srcPtr++; - src = (((src0 << 8) | src1) >> s1) & 0xff; - switch (combOp) { - case 0: // or - dest |= src; - break; - case 1: // and - dest &= src; - break; - case 2: // xor - dest ^= src; - break; - case 3: // xnor - dest ^= src ^ 0xff; - break; - case 4: // replace - dest = src; - break; - } - *destPtr++ = dest; - } - - // right-most byte - // note: this last byte (src1) may not actually be used, depending - // on the values of s1, m1, and m2 - and in fact, it may be off - // the edge of the source bitmap, which means we need to allocate - // one extra guard byte at the end of each bitmap - dest = *destPtr; - src0 = src1; - src1 = *srcPtr++; - src = (((src0 << 8) | src1) >> s1) & 0xff; - switch (combOp) { - case 0: // or - dest |= src & m2; - break; - case 1: // and - dest &= src | m1; - break; - case 2: // xor - dest ^= src & m2; - break; - case 3: // xnor - dest ^= (src ^ 0xff) & m2; - break; - case 4: // replace - dest = (src & m2) | (dest & m1); - break; - } - *destPtr = dest; - } - } -} - -//------------------------------------------------------------------------ -// JBIG2SymbolDict -//------------------------------------------------------------------------ - -class JBIG2SymbolDict: public JBIG2Segment { -public: - - JBIG2SymbolDict(Guint segNumA, Guint sizeA); - ~JBIG2SymbolDict(); - JBIG2SegmentType getType() override { return jbig2SegSymbolDict; } - Guint getSize() { return size; } - void setBitmap(Guint idx, JBIG2Bitmap *bitmap) { bitmaps[idx] = bitmap; } - JBIG2Bitmap *getBitmap(Guint idx) { return bitmaps[idx]; } - GBool isOk() { return bitmaps != nullptr; } - void setGenericRegionStats(JArithmeticDecoderStats *stats) - { genericRegionStats = stats; } - void setRefinementRegionStats(JArithmeticDecoderStats *stats) - { refinementRegionStats = stats; } - JArithmeticDecoderStats *getGenericRegionStats() - { return genericRegionStats; } - JArithmeticDecoderStats *getRefinementRegionStats() - { return refinementRegionStats; } - -private: - - Guint size; - JBIG2Bitmap **bitmaps; - JArithmeticDecoderStats *genericRegionStats; - JArithmeticDecoderStats *refinementRegionStats; -}; - -JBIG2SymbolDict::JBIG2SymbolDict(Guint segNumA, Guint sizeA): - JBIG2Segment(segNumA) -{ - Guint i; - - size = sizeA; - bitmaps = (JBIG2Bitmap **)gmallocn_checkoverflow(size, sizeof(JBIG2Bitmap *)); - if (!bitmaps) size = 0; - for (i = 0; i < size; ++i) { - bitmaps[i] = nullptr; - } - genericRegionStats = nullptr; - refinementRegionStats = nullptr; -} - -JBIG2SymbolDict::~JBIG2SymbolDict() { - Guint i; - - for (i = 0; i < size; ++i) { - delete bitmaps[i]; - } - gfree(bitmaps); - if (genericRegionStats) { - delete genericRegionStats; - } - if (refinementRegionStats) { - delete refinementRegionStats; - } -} - -//------------------------------------------------------------------------ -// JBIG2PatternDict -//------------------------------------------------------------------------ - -class JBIG2PatternDict: public JBIG2Segment { -public: - - JBIG2PatternDict(Guint segNumA, Guint sizeA); - ~JBIG2PatternDict(); - JBIG2SegmentType getType() override { return jbig2SegPatternDict; } - Guint getSize() { return size; } - void setBitmap(Guint idx, JBIG2Bitmap *bitmap) { if (likely(idx < size)) bitmaps[idx] = bitmap; } - JBIG2Bitmap *getBitmap(Guint idx) { return (idx < size) ? bitmaps[idx] : nullptr; } - -private: - - Guint size; - JBIG2Bitmap **bitmaps; -}; - -JBIG2PatternDict::JBIG2PatternDict(Guint segNumA, Guint sizeA): - JBIG2Segment(segNumA) -{ - bitmaps = (JBIG2Bitmap **)gmallocn_checkoverflow(sizeA, sizeof(JBIG2Bitmap *)); - if (bitmaps) { - size = sizeA; - } else { - size = 0; - error(errSyntaxError, -1, "JBIG2PatternDict: can't allocate bitmaps"); - } -} - -JBIG2PatternDict::~JBIG2PatternDict() { - Guint i; - - for (i = 0; i < size; ++i) { - delete bitmaps[i]; - } - gfree(bitmaps); -} - -//------------------------------------------------------------------------ -// JBIG2CodeTable -//------------------------------------------------------------------------ - -class JBIG2CodeTable: public JBIG2Segment { -public: - - JBIG2CodeTable(Guint segNumA, JBIG2HuffmanTable *tableA); - ~JBIG2CodeTable(); - JBIG2SegmentType getType() override { return jbig2SegCodeTable; } - JBIG2HuffmanTable *getHuffTable() { return table; } - -private: - - JBIG2HuffmanTable *table; -}; - -JBIG2CodeTable::JBIG2CodeTable(Guint segNumA, JBIG2HuffmanTable *tableA): - JBIG2Segment(segNumA) -{ - table = tableA; -} - -JBIG2CodeTable::~JBIG2CodeTable() { - gfree(table); -} - -//------------------------------------------------------------------------ -// JBIG2Stream -//------------------------------------------------------------------------ - -JBIG2Stream::JBIG2Stream(Stream *strA, Object *globalsStreamA, Object *globalsStreamRefA): - FilterStream(strA) -{ - pageBitmap = nullptr; - - arithDecoder = new JArithmeticDecoder(); - genericRegionStats = new JArithmeticDecoderStats(1 << 1); - refinementRegionStats = new JArithmeticDecoderStats(1 << 1); - iadhStats = new JArithmeticDecoderStats(1 << 9); - iadwStats = new JArithmeticDecoderStats(1 << 9); - iaexStats = new JArithmeticDecoderStats(1 << 9); - iaaiStats = new JArithmeticDecoderStats(1 << 9); - iadtStats = new JArithmeticDecoderStats(1 << 9); - iaitStats = new JArithmeticDecoderStats(1 << 9); - iafsStats = new JArithmeticDecoderStats(1 << 9); - iadsStats = new JArithmeticDecoderStats(1 << 9); - iardxStats = new JArithmeticDecoderStats(1 << 9); - iardyStats = new JArithmeticDecoderStats(1 << 9); - iardwStats = new JArithmeticDecoderStats(1 << 9); - iardhStats = new JArithmeticDecoderStats(1 << 9); - iariStats = new JArithmeticDecoderStats(1 << 9); - iaidStats = new JArithmeticDecoderStats(1 << 1); - huffDecoder = new JBIG2HuffmanDecoder(); - mmrDecoder = new JBIG2MMRDecoder(); - - if (globalsStreamA->isStream()) { - globalsStream = globalsStreamA->copy(); - if (globalsStreamRefA->isRef()) - globalsStreamRef = globalsStreamRefA->getRef(); - } - - segments = globalSegments = nullptr; - curStr = nullptr; - dataPtr = dataEnd = nullptr; -} - -JBIG2Stream::~JBIG2Stream() { - close(); - delete arithDecoder; - delete genericRegionStats; - delete refinementRegionStats; - delete iadhStats; - delete iadwStats; - delete iaexStats; - delete iaaiStats; - delete iadtStats; - delete iaitStats; - delete iafsStats; - delete iadsStats; - delete iardxStats; - delete iardyStats; - delete iardwStats; - delete iardhStats; - delete iariStats; - delete iaidStats; - delete huffDecoder; - delete mmrDecoder; - delete str; -} - -void JBIG2Stream::reset() { - // read the globals stream - globalSegments = new GooList(); - if (globalsStream.isStream()) { - segments = globalSegments; - curStr = globalsStream.getStream(); - curStr->reset(); - arithDecoder->setStream(curStr); - huffDecoder->setStream(curStr); - mmrDecoder->setStream(curStr); - readSegments(); - curStr->close(); - } - - // read the main stream - segments = new GooList(); - curStr = str; - curStr->reset(); - arithDecoder->setStream(curStr); - huffDecoder->setStream(curStr); - mmrDecoder->setStream(curStr); - readSegments(); - - if (pageBitmap) { - dataPtr = pageBitmap->getDataPtr(); - dataEnd = dataPtr + pageBitmap->getDataSize(); - } else { - dataPtr = dataEnd = nullptr; - } -} - -void JBIG2Stream::close() { - if (pageBitmap) { - delete pageBitmap; - pageBitmap = nullptr; - } - if (segments) { - deleteGooList(segments, JBIG2Segment); - segments = nullptr; - } - if (globalSegments) { - deleteGooList(globalSegments, JBIG2Segment); - globalSegments = nullptr; - } - dataPtr = dataEnd = nullptr; - FilterStream::close(); -} - -int JBIG2Stream::getChar() { - if (dataPtr && dataPtr < dataEnd) { - return (*dataPtr++ ^ 0xff) & 0xff; - } - return EOF; -} - -int JBIG2Stream::lookChar() { - if (dataPtr && dataPtr < dataEnd) { - return (*dataPtr ^ 0xff) & 0xff; - } - return EOF; -} - -Goffset JBIG2Stream::getPos() { - if (pageBitmap == nullptr) { - return 0; - } - return dataPtr - pageBitmap->getDataPtr(); -} - -int JBIG2Stream::getChars(int nChars, Guchar *buffer) { - int n, i; - - if (nChars <= 0 || !dataPtr) { - return 0; - } - if (dataEnd - dataPtr < nChars) { - n = (int)(dataEnd - dataPtr); - } else { - n = nChars; - } - for (i = 0; i < n; ++i) { - buffer[i] = *dataPtr++ ^ 0xff; - } - return n; -} - -GooString *JBIG2Stream::getPSFilter(int psLevel, const char *indent) { - return nullptr; -} - -GBool JBIG2Stream::isBinary(GBool last) { - return str->isBinary(gTrue); -} - -void JBIG2Stream::readSegments() { - Guint segNum, segFlags, segType, page, segLength; - Guint refFlags, nRefSegs; - Guint *refSegs; - Goffset segDataPos; - int c1, c2, c3; - - while (readULong(&segNum)) { - - // segment header flags - if (!readUByte(&segFlags)) { - goto eofError1; - } - segType = segFlags & 0x3f; - - // referred-to segment count and retention flags - if (!readUByte(&refFlags)) { - goto eofError1; - } - nRefSegs = refFlags >> 5; - if (nRefSegs == 7) { - if ((c1 = curStr->getChar()) == EOF || - (c2 = curStr->getChar()) == EOF || - (c3 = curStr->getChar()) == EOF) { - goto eofError1; - } - refFlags = (refFlags << 24) | (c1 << 16) | (c2 << 8) | c3; - nRefSegs = refFlags & 0x1fffffff; - for (Guint i = 0; i < (nRefSegs + 9) >> 3; ++i) { - if ((c1 = curStr->getChar()) == EOF) { - goto eofError1; - } - } - } - - // referred-to segment numbers - refSegs = (Guint *)gmallocn(nRefSegs, sizeof(Guint)); - if (segNum <= 256) { - for (Guint i = 0; i < nRefSegs; ++i) { - if (!readUByte(&refSegs[i])) { - goto eofError2; - } - } - } else if (segNum <= 65536) { - for (Guint i = 0; i < nRefSegs; ++i) { - if (!readUWord(&refSegs[i])) { - goto eofError2; - } - } - } else { - for (Guint i = 0; i < nRefSegs; ++i) { - if (!readULong(&refSegs[i])) { - goto eofError2; - } - } - } - - // segment page association - if (segFlags & 0x40) { - if (!readULong(&page)) { - goto eofError2; - } - } else { - if (!readUByte(&page)) { - goto eofError2; - } - } - - // segment data length - if (!readULong(&segLength)) { - goto eofError2; - } - - // keep track of the start of the segment data - segDataPos = curStr->getPos(); - - // check for missing page information segment - if (!pageBitmap && ((segType >= 4 && segType <= 7) || - (segType >= 20 && segType <= 43))) { - error(errSyntaxError, curStr->getPos(), "First JBIG2 segment associated with a page must be a page information segment"); - goto syntaxError; - } - - // read the segment data - switch (segType) { - case 0: - if (!readSymbolDictSeg(segNum, segLength, refSegs, nRefSegs)) { - goto syntaxError; - } - break; - case 4: - readTextRegionSeg(segNum, gFalse, gFalse, segLength, refSegs, nRefSegs); - break; - case 6: - readTextRegionSeg(segNum, gTrue, gFalse, segLength, refSegs, nRefSegs); - break; - case 7: - readTextRegionSeg(segNum, gTrue, gTrue, segLength, refSegs, nRefSegs); - break; - case 16: - readPatternDictSeg(segNum, segLength); - break; - case 20: - readHalftoneRegionSeg(segNum, gFalse, gFalse, segLength, - refSegs, nRefSegs); - break; - case 22: - readHalftoneRegionSeg(segNum, gTrue, gFalse, segLength, - refSegs, nRefSegs); - break; - case 23: - readHalftoneRegionSeg(segNum, gTrue, gTrue, segLength, - refSegs, nRefSegs); - break; - case 36: - readGenericRegionSeg(segNum, gFalse, gFalse, segLength); - break; - case 38: - readGenericRegionSeg(segNum, gTrue, gFalse, segLength); - break; - case 39: - readGenericRegionSeg(segNum, gTrue, gTrue, segLength); - break; - case 40: - readGenericRefinementRegionSeg(segNum, gFalse, gFalse, segLength, - refSegs, nRefSegs); - break; - case 42: - readGenericRefinementRegionSeg(segNum, gTrue, gFalse, segLength, - refSegs, nRefSegs); - break; - case 43: - readGenericRefinementRegionSeg(segNum, gTrue, gTrue, segLength, - refSegs, nRefSegs); - break; - case 48: - readPageInfoSeg(segLength); - break; - case 50: - readEndOfStripeSeg(segLength); - break; - case 52: - readProfilesSeg(segLength); - break; - case 53: - readCodeTableSeg(segNum, segLength); - break; - case 62: - readExtensionSeg(segLength); - break; - default: - error(errSyntaxError, curStr->getPos(), "Unknown segment type in JBIG2 stream"); - for (Guint i = 0; i < segLength; ++i) { - if ((c1 = curStr->getChar()) == EOF) { - goto eofError2; - } - } - break; - } - - // Make sure the segment handler read all of the bytes in the - // segment data, unless this segment is marked as having an - // unknown length (section 7.2.7 of the JBIG2 Final Committee Draft) - - if (segLength != 0xffffffff) { - - Goffset segExtraBytes = segDataPos + segLength - curStr->getPos(); - if (segExtraBytes > 0) { - - // If we didn't read all of the bytes in the segment data, - // indicate an error, and throw away the rest of the data. - - // v.3.1.01.13 of the LuraTech PDF Compressor Server will - // sometimes generate an extraneous NULL byte at the end of - // arithmetic-coded symbol dictionary segments when numNewSyms - // == 0. Segments like this often occur for blank pages. - - error(errSyntaxError, curStr->getPos(), "{0:lld} extraneous byte{1:s} after segment", - segExtraBytes, (segExtraBytes > 1) ? "s" : ""); - - // Burn through the remaining bytes -- inefficient, but - // hopefully we're not doing this much - - int trash; - for (Goffset i = segExtraBytes; i > 0; i--) { - readByte(&trash); - } - - } else if (segExtraBytes < 0) { - - // If we read more bytes than we should have, according to the - // segment length field, note an error. - - error(errSyntaxError, curStr->getPos(), "Previous segment handler read too many bytes"); - - } - - } - - gfree(refSegs); - } - - return; - - syntaxError: - gfree(refSegs); - return; - - eofError2: - gfree(refSegs); - eofError1: - error(errSyntaxError, curStr->getPos(), "Unexpected EOF in JBIG2 stream"); -} - -GBool JBIG2Stream::readSymbolDictSeg(Guint segNum, Guint length, - Guint *refSegs, Guint nRefSegs) { - JBIG2SymbolDict *symbolDict; - JBIG2HuffmanTable *huffDHTable, *huffDWTable; - JBIG2HuffmanTable *huffBMSizeTable, *huffAggInstTable; - JBIG2Segment *seg; - GooList *codeTables; - JBIG2SymbolDict *inputSymbolDict; - Guint flags, sdTemplate, sdrTemplate, huff, refAgg; - Guint huffDH, huffDW, huffBMSize, huffAggInst; - Guint contextUsed, contextRetained; - int sdATX[4], sdATY[4], sdrATX[2], sdrATY[2]; - Guint numExSyms, numNewSyms, numInputSyms, symCodeLen; - JBIG2Bitmap **bitmaps; - JBIG2Bitmap *collBitmap, *refBitmap; - Guint *symWidths; - Guint symHeight, symWidth, totalWidth, x, symID; - int dh = 0, dw, refAggNum, refDX = 0, refDY = 0, bmSize; - GBool ex; - int run, cnt, c; - Guint i, j, k; - Guchar *p; - - symWidths = nullptr; - - // symbol dictionary flags - if (!readUWord(&flags)) { - goto eofError; - } - sdTemplate = (flags >> 10) & 3; - sdrTemplate = (flags >> 12) & 1; - huff = flags & 1; - refAgg = (flags >> 1) & 1; - huffDH = (flags >> 2) & 3; - huffDW = (flags >> 4) & 3; - huffBMSize = (flags >> 6) & 1; - huffAggInst = (flags >> 7) & 1; - contextUsed = (flags >> 8) & 1; - contextRetained = (flags >> 9) & 1; - - // symbol dictionary AT flags - if (!huff) { - if (sdTemplate == 0) { - if (!readByte(&sdATX[0]) || - !readByte(&sdATY[0]) || - !readByte(&sdATX[1]) || - !readByte(&sdATY[1]) || - !readByte(&sdATX[2]) || - !readByte(&sdATY[2]) || - !readByte(&sdATX[3]) || - !readByte(&sdATY[3])) { - goto eofError; - } - } else { - if (!readByte(&sdATX[0]) || - !readByte(&sdATY[0])) { - goto eofError; - } - } - } - - // symbol dictionary refinement AT flags - if (refAgg && !sdrTemplate) { - if (!readByte(&sdrATX[0]) || - !readByte(&sdrATY[0]) || - !readByte(&sdrATX[1]) || - !readByte(&sdrATY[1])) { - goto eofError; - } - } - - // SDNUMEXSYMS and SDNUMNEWSYMS - if (!readULong(&numExSyms) || !readULong(&numNewSyms)) { - goto eofError; - } - - // get referenced segments: input symbol dictionaries and code tables - codeTables = new GooList(); - numInputSyms = 0; - for (i = 0; i < nRefSegs; ++i) { - // This is need by bug 12014, returning gFalse makes it not crash - // but we end up with a empty page while acroread is able to render - // part of it - if ((seg = findSegment(refSegs[i]))) { - if (seg->getType() == jbig2SegSymbolDict) { - j = ((JBIG2SymbolDict *)seg)->getSize(); - if (numInputSyms > UINT_MAX - j) { - error(errSyntaxError, curStr->getPos(), "Too many input symbols in JBIG2 symbol dictionary"); - delete codeTables; - goto eofError; - } - numInputSyms += j; - } else if (seg->getType() == jbig2SegCodeTable) { - codeTables->append(seg); - } - } else { - delete codeTables; - return gFalse; - } - } - if (numInputSyms > UINT_MAX - numNewSyms) { - error(errSyntaxError, curStr->getPos(), "Too many input symbols in JBIG2 symbol dictionary"); - delete codeTables; - goto eofError; - } - - // compute symbol code length, per 6.5.8.2.3 - // symCodeLen = ceil( log2( numInputSyms + numNewSyms ) ) - i = numInputSyms + numNewSyms; - if (i <= 1) { - symCodeLen = huff ? 1 : 0; - } else { - --i; - symCodeLen = 0; - // i = floor((numSyms-1) / 2^symCodeLen) - while (i > 0) { - ++symCodeLen; - i >>= 1; - } - } - - // get the input symbol bitmaps - bitmaps = (JBIG2Bitmap **)gmallocn_checkoverflow(numInputSyms + numNewSyms, - sizeof(JBIG2Bitmap *)); - if (!bitmaps && (numInputSyms + numNewSyms > 0)) { - error(errSyntaxError, curStr->getPos(), "Too many input symbols in JBIG2 symbol dictionary"); - delete codeTables; - goto eofError; - } - for (i = 0; i < numInputSyms + numNewSyms; ++i) { - bitmaps[i] = nullptr; - } - k = 0; - inputSymbolDict = nullptr; - for (i = 0; i < nRefSegs; ++i) { - seg = findSegment(refSegs[i]); - if (seg != nullptr && seg->getType() == jbig2SegSymbolDict) { - inputSymbolDict = (JBIG2SymbolDict *)seg; - for (j = 0; j < inputSymbolDict->getSize(); ++j) { - bitmaps[k++] = inputSymbolDict->getBitmap(j); - } - } - } - - // get the Huffman tables - huffDHTable = huffDWTable = nullptr; // make gcc happy - huffBMSizeTable = huffAggInstTable = nullptr; // make gcc happy - i = 0; - if (huff) { - if (huffDH == 0) { - huffDHTable = huffTableD; - } else if (huffDH == 1) { - huffDHTable = huffTableE; - } else { - if (i >= (Guint)codeTables->getLength()) { - goto codeTableError; - } - huffDHTable = ((JBIG2CodeTable *)codeTables->get(i++))->getHuffTable(); - } - if (huffDW == 0) { - huffDWTable = huffTableB; - } else if (huffDW == 1) { - huffDWTable = huffTableC; - } else { - if (i >= (Guint)codeTables->getLength()) { - goto codeTableError; - } - huffDWTable = ((JBIG2CodeTable *)codeTables->get(i++))->getHuffTable(); - } - if (huffBMSize == 0) { - huffBMSizeTable = huffTableA; - } else { - if (i >= (Guint)codeTables->getLength()) { - goto codeTableError; - } - huffBMSizeTable = - ((JBIG2CodeTable *)codeTables->get(i++))->getHuffTable(); - } - if (huffAggInst == 0) { - huffAggInstTable = huffTableA; - } else { - if (i >= (Guint)codeTables->getLength()) { - goto codeTableError; - } - huffAggInstTable = - ((JBIG2CodeTable *)codeTables->get(i++))->getHuffTable(); - } - } - delete codeTables; - - // set up the Huffman decoder - if (huff) { - huffDecoder->reset(); - - // set up the arithmetic decoder - } else { - if (contextUsed && inputSymbolDict) { - resetGenericStats(sdTemplate, inputSymbolDict->getGenericRegionStats()); - } else { - resetGenericStats(sdTemplate, nullptr); - } - resetIntStats(symCodeLen); - arithDecoder->start(); - } - - // set up the arithmetic decoder for refinement/aggregation - if (refAgg) { - if (contextUsed && inputSymbolDict) { - resetRefinementStats(sdrTemplate, - inputSymbolDict->getRefinementRegionStats()); - } else { - resetRefinementStats(sdrTemplate, nullptr); - } - } - - // allocate symbol widths storage - if (huff && !refAgg) { - symWidths = (Guint *)gmallocn(numNewSyms, sizeof(Guint)); - } - - symHeight = 0; - i = 0; - while (i < numNewSyms) { - - // read the height class delta height - if (huff) { - huffDecoder->decodeInt(&dh, huffDHTable); - } else { - arithDecoder->decodeInt(&dh, iadhStats); - } - if (dh < 0 && (Guint)-dh >= symHeight) { - error(errSyntaxError, curStr->getPos(), "Bad delta-height value in JBIG2 symbol dictionary"); - goto syntaxError; - } - symHeight += dh; - if (unlikely(symHeight > 0x40000000)) { - error(errSyntaxError, curStr->getPos(), "Bad height value in JBIG2 symbol dictionary"); - goto syntaxError; - } - symWidth = 0; - totalWidth = 0; - j = i; - - // read the symbols in this height class - while (1) { - - // read the delta width - if (huff) { - if (!huffDecoder->decodeInt(&dw, huffDWTable)) { - break; - } - } else { - if (!arithDecoder->decodeInt(&dw, iadwStats)) { - break; - } - } - if (dw < 0 && (Guint)-dw >= symWidth) { - error(errSyntaxError, curStr->getPos(), "Bad delta-height value in JBIG2 symbol dictionary"); - goto syntaxError; - } - symWidth += dw; - if (i >= numNewSyms) { - error(errSyntaxError, curStr->getPos(), "Too many symbols in JBIG2 symbol dictionary"); - goto syntaxError; - } - - // using a collective bitmap, so don't read a bitmap here - if (huff && !refAgg) { - symWidths[i] = symWidth; - totalWidth += symWidth; - - // refinement/aggregate coding - } else if (refAgg) { - if (huff) { - if (!huffDecoder->decodeInt(&refAggNum, huffAggInstTable)) { - break; - } - } else { - if (!arithDecoder->decodeInt(&refAggNum, iaaiStats)) { - break; - } - } -#if 0 //~ This special case was added about a year before the final draft - //~ of the JBIG2 spec was released. I have encountered some old - //~ JBIG2 images that predate it. - if (0) { -#else - if (refAggNum == 1) { -#endif - if (huff) { - symID = huffDecoder->readBits(symCodeLen); - huffDecoder->decodeInt(&refDX, huffTableO); - huffDecoder->decodeInt(&refDY, huffTableO); - huffDecoder->decodeInt(&bmSize, huffTableA); - huffDecoder->reset(); - arithDecoder->start(); - } else { - symID = arithDecoder->decodeIAID(symCodeLen, iaidStats); - arithDecoder->decodeInt(&refDX, iardxStats); - arithDecoder->decodeInt(&refDY, iardyStats); - } - if (symID >= numInputSyms + i) { - error(errSyntaxError, curStr->getPos(), "Invalid symbol ID in JBIG2 symbol dictionary"); - goto syntaxError; - } - refBitmap = bitmaps[symID]; - if (unlikely(refBitmap == nullptr)) { - error(errSyntaxError, curStr->getPos(), "Invalid ref bitmap for symbol ID {0:ud} in JBIG2 symbol dictionary", symID); - goto syntaxError; - } - bitmaps[numInputSyms + i] = - readGenericRefinementRegion(symWidth, symHeight, - sdrTemplate, gFalse, - refBitmap, refDX, refDY, - sdrATX, sdrATY); - //~ do we need to use the bmSize value here (in Huffman mode)? - } else { - bitmaps[numInputSyms + i] = - readTextRegion(huff, gTrue, symWidth, symHeight, - refAggNum, 0, numInputSyms + i, nullptr, - symCodeLen, bitmaps, 0, 0, 0, 1, 0, - huffTableF, huffTableH, huffTableK, huffTableO, - huffTableO, huffTableO, huffTableO, huffTableA, - sdrTemplate, sdrATX, sdrATY); - } - - // non-ref/agg coding - } else { - bitmaps[numInputSyms + i] = - readGenericBitmap(gFalse, symWidth, symHeight, - sdTemplate, gFalse, gFalse, nullptr, - sdATX, sdATY, 0); - } - - ++i; - } - - // read the collective bitmap - if (huff && !refAgg) { - huffDecoder->decodeInt(&bmSize, huffBMSizeTable); - huffDecoder->reset(); - if (bmSize == 0) { - collBitmap = new JBIG2Bitmap(0, totalWidth, symHeight); - bmSize = symHeight * ((totalWidth + 7) >> 3); - p = collBitmap->getDataPtr(); - if (unlikely(p == nullptr)) { - delete collBitmap; - goto syntaxError; - } - for (k = 0; k < (Guint)bmSize; ++k) { - if ((c = curStr->getChar()) == EOF) { - memset(p, 0, bmSize - k); - break; - } - *p++ = (Guchar)c; - } - } else { - collBitmap = readGenericBitmap(gTrue, totalWidth, symHeight, - 0, gFalse, gFalse, nullptr, nullptr, nullptr, - bmSize); - } - if (likely(collBitmap != nullptr)) { - x = 0; - for (; j < i; ++j) { - bitmaps[numInputSyms + j] = - collBitmap->getSlice(x, 0, symWidths[j], symHeight); - x += symWidths[j]; - } - delete collBitmap; - } else { - error(errSyntaxError, curStr->getPos(), "collBitmap was null"); - goto syntaxError; - } - } - } - - // create the symbol dict object - symbolDict = new JBIG2SymbolDict(segNum, numExSyms); - if (!symbolDict->isOk()) { - delete symbolDict; - goto syntaxError; - } - - // exported symbol list - i = j = 0; - ex = gFalse; - run = 0; // initialize it once in case the first decodeInt fails - // we do not want to use uninitialized memory - while (i < numInputSyms + numNewSyms) { - if (huff) { - huffDecoder->decodeInt(&run, huffTableA); - } else { - arithDecoder->decodeInt(&run, iaexStats); - } - if (i + run > numInputSyms + numNewSyms || - (ex && j + run > numExSyms)) { - error(errSyntaxError, curStr->getPos(), "Too many exported symbols in JBIG2 symbol dictionary"); - for ( ; j < numExSyms; ++j) symbolDict->setBitmap(j, nullptr); - delete symbolDict; - goto syntaxError; - } - if (ex) { - for (cnt = 0; cnt < run; ++cnt) { - symbolDict->setBitmap(j++, bitmaps[i++]->copy()); - } - } else { - i += run; - } - ex = !ex; - } - if (j != numExSyms) { - error(errSyntaxError, curStr->getPos(), "Too few symbols in JBIG2 symbol dictionary"); - for ( ; j < numExSyms; ++j) symbolDict->setBitmap(j, nullptr); - delete symbolDict; - goto syntaxError; - } - - for (i = 0; i < numNewSyms; ++i) { - delete bitmaps[numInputSyms + i]; - } - gfree(bitmaps); - if (symWidths) { - gfree(symWidths); - } - - // save the arithmetic decoder stats - if (!huff && contextRetained) { - symbolDict->setGenericRegionStats(genericRegionStats->copy()); - if (refAgg) { - symbolDict->setRefinementRegionStats(refinementRegionStats->copy()); - } - } - - // store the new symbol dict - segments->append(symbolDict); - - return gTrue; - - codeTableError: - error(errSyntaxError, curStr->getPos(), "Missing code table in JBIG2 symbol dictionary"); - delete codeTables; - - syntaxError: - for (i = 0; i < numNewSyms; ++i) { - if (bitmaps[numInputSyms + i]) { - delete bitmaps[numInputSyms + i]; - } - } - gfree(bitmaps); - if (symWidths) { - gfree(symWidths); - } - return gFalse; - - eofError: - error(errSyntaxError, curStr->getPos(), "Unexpected EOF in JBIG2 stream"); - return gFalse; -} - -void JBIG2Stream::readTextRegionSeg(Guint segNum, GBool imm, - GBool lossless, Guint length, - Guint *refSegs, Guint nRefSegs) { - JBIG2Bitmap *bitmap; - JBIG2HuffmanTable runLengthTab[36]; - JBIG2HuffmanTable *symCodeTab; - JBIG2HuffmanTable *huffFSTable, *huffDSTable, *huffDTTable; - JBIG2HuffmanTable *huffRDWTable, *huffRDHTable; - JBIG2HuffmanTable *huffRDXTable, *huffRDYTable, *huffRSizeTable; - JBIG2Segment *seg; - GooList *codeTables; - JBIG2SymbolDict *symbolDict; - JBIG2Bitmap **syms; - Guint w, h, x, y, segInfoFlags, extCombOp; - Guint flags, huff, refine, logStrips, refCorner, transposed; - Guint combOp, defPixel, templ; - int sOffset; - Guint huffFlags, huffFS, huffDS, huffDT; - Guint huffRDW, huffRDH, huffRDX, huffRDY, huffRSize; - Guint numInstances, numSyms, symCodeLen; - int atx[2], aty[2]; - Guint i, k, kk; - int j; - - // region segment info field - if (!readULong(&w) || !readULong(&h) || - !readULong(&x) || !readULong(&y) || - !readUByte(&segInfoFlags)) { - goto eofError; - } - extCombOp = segInfoFlags & 7; - - // rest of the text region header - if (!readUWord(&flags)) { - goto eofError; - } - huff = flags & 1; - refine = (flags >> 1) & 1; - logStrips = (flags >> 2) & 3; - refCorner = (flags >> 4) & 3; - transposed = (flags >> 6) & 1; - combOp = (flags >> 7) & 3; - defPixel = (flags >> 9) & 1; - sOffset = (flags >> 10) & 0x1f; - if (sOffset & 0x10) { - sOffset |= -1 - 0x0f; - } - templ = (flags >> 15) & 1; - huffFS = huffDS = huffDT = 0; // make gcc happy - huffRDW = huffRDH = huffRDX = huffRDY = huffRSize = 0; // make gcc happy - if (huff) { - if (!readUWord(&huffFlags)) { - goto eofError; - } - huffFS = huffFlags & 3; - huffDS = (huffFlags >> 2) & 3; - huffDT = (huffFlags >> 4) & 3; - huffRDW = (huffFlags >> 6) & 3; - huffRDH = (huffFlags >> 8) & 3; - huffRDX = (huffFlags >> 10) & 3; - huffRDY = (huffFlags >> 12) & 3; - huffRSize = (huffFlags >> 14) & 1; - } - if (refine && templ == 0) { - if (!readByte(&atx[0]) || !readByte(&aty[0]) || - !readByte(&atx[1]) || !readByte(&aty[1])) { - goto eofError; - } - } - if (!readULong(&numInstances)) { - goto eofError; - } - - // get symbol dictionaries and tables - codeTables = new GooList(); - numSyms = 0; - for (i = 0; i < nRefSegs; ++i) { - if ((seg = findSegment(refSegs[i]))) { - if (seg->getType() == jbig2SegSymbolDict) { - numSyms += ((JBIG2SymbolDict *)seg)->getSize(); - } else if (seg->getType() == jbig2SegCodeTable) { - codeTables->append(seg); - } - } else { - error(errSyntaxError, curStr->getPos(), "Invalid segment reference in JBIG2 text region"); - delete codeTables; - return; - } - } - i = numSyms; - if (i <= 1) { - symCodeLen = huff ? 1 : 0; - } else { - --i; - symCodeLen = 0; - // i = floor((numSyms-1) / 2^symCodeLen) - while (i > 0) { - ++symCodeLen; - i >>= 1; - } - } - - // get the symbol bitmaps - syms = (JBIG2Bitmap **)gmallocn(numSyms, sizeof(JBIG2Bitmap *)); - kk = 0; - for (i = 0; i < nRefSegs; ++i) { - if ((seg = findSegment(refSegs[i]))) { - if (seg->getType() == jbig2SegSymbolDict) { - symbolDict = (JBIG2SymbolDict *)seg; - for (k = 0; k < symbolDict->getSize(); ++k) { - syms[kk++] = symbolDict->getBitmap(k); - } - } - } - } - - // get the Huffman tables - huffFSTable = huffDSTable = huffDTTable = nullptr; // make gcc happy - huffRDWTable = huffRDHTable = nullptr; // make gcc happy - huffRDXTable = huffRDYTable = huffRSizeTable = nullptr; // make gcc happy - i = 0; - if (huff) { - if (huffFS == 0) { - huffFSTable = huffTableF; - } else if (huffFS == 1) { - huffFSTable = huffTableG; - } else { - if (i >= (Guint)codeTables->getLength()) { - goto codeTableError; - } - huffFSTable = ((JBIG2CodeTable *)codeTables->get(i++))->getHuffTable(); - } - if (huffDS == 0) { - huffDSTable = huffTableH; - } else if (huffDS == 1) { - huffDSTable = huffTableI; - } else if (huffDS == 2) { - huffDSTable = huffTableJ; - } else { - if (i >= (Guint)codeTables->getLength()) { - goto codeTableError; - } - huffDSTable = ((JBIG2CodeTable *)codeTables->get(i++))->getHuffTable(); - } - if (huffDT == 0) { - huffDTTable = huffTableK; - } else if (huffDT == 1) { - huffDTTable = huffTableL; - } else if (huffDT == 2) { - huffDTTable = huffTableM; - } else { - if (i >= (Guint)codeTables->getLength()) { - goto codeTableError; - } - huffDTTable = ((JBIG2CodeTable *)codeTables->get(i++))->getHuffTable(); - } - if (huffRDW == 0) { - huffRDWTable = huffTableN; - } else if (huffRDW == 1) { - huffRDWTable = huffTableO; - } else { - if (i >= (Guint)codeTables->getLength()) { - goto codeTableError; - } - huffRDWTable = ((JBIG2CodeTable *)codeTables->get(i++))->getHuffTable(); - } - if (huffRDH == 0) { - huffRDHTable = huffTableN; - } else if (huffRDH == 1) { - huffRDHTable = huffTableO; - } else { - if (i >= (Guint)codeTables->getLength()) { - goto codeTableError; - } - huffRDHTable = ((JBIG2CodeTable *)codeTables->get(i++))->getHuffTable(); - } - if (huffRDX == 0) { - huffRDXTable = huffTableN; - } else if (huffRDX == 1) { - huffRDXTable = huffTableO; - } else { - if (i >= (Guint)codeTables->getLength()) { - goto codeTableError; - } - huffRDXTable = ((JBIG2CodeTable *)codeTables->get(i++))->getHuffTable(); - } - if (huffRDY == 0) { - huffRDYTable = huffTableN; - } else if (huffRDY == 1) { - huffRDYTable = huffTableO; - } else { - if (i >= (Guint)codeTables->getLength()) { - goto codeTableError; - } - huffRDYTable = ((JBIG2CodeTable *)codeTables->get(i++))->getHuffTable(); - } - if (huffRSize == 0) { - huffRSizeTable = huffTableA; - } else { - if (i >= (Guint)codeTables->getLength()) { - goto codeTableError; - } - huffRSizeTable = - ((JBIG2CodeTable *)codeTables->get(i++))->getHuffTable(); - } - } - delete codeTables; - - // symbol ID Huffman decoding table - if (huff) { - huffDecoder->reset(); - for (i = 0; i < 32; ++i) { - runLengthTab[i].val = i; - runLengthTab[i].prefixLen = huffDecoder->readBits(4); - runLengthTab[i].rangeLen = 0; - } - runLengthTab[32].val = 0x103; - runLengthTab[32].prefixLen = huffDecoder->readBits(4); - runLengthTab[32].rangeLen = 2; - runLengthTab[33].val = 0x203; - runLengthTab[33].prefixLen = huffDecoder->readBits(4); - runLengthTab[33].rangeLen = 3; - runLengthTab[34].val = 0x20b; - runLengthTab[34].prefixLen = huffDecoder->readBits(4); - runLengthTab[34].rangeLen = 7; - runLengthTab[35].prefixLen = 0; - runLengthTab[35].rangeLen = jbig2HuffmanEOT; - huffDecoder->buildTable(runLengthTab, 35); - symCodeTab = (JBIG2HuffmanTable *)gmallocn(numSyms + 1, - sizeof(JBIG2HuffmanTable)); - for (i = 0; i < numSyms; ++i) { - symCodeTab[i].val = i; - symCodeTab[i].rangeLen = 0; - } - i = 0; - while (i < numSyms) { - huffDecoder->decodeInt(&j, runLengthTab); - if (j > 0x200) { - for (j -= 0x200; j && i < numSyms; --j) { - symCodeTab[i++].prefixLen = 0; - } - } else if (j > 0x100) { - if (unlikely(i == 0)) ++i; - for (j -= 0x100; j && i < numSyms; --j) { - symCodeTab[i].prefixLen = symCodeTab[i-1].prefixLen; - ++i; - } - } else { - symCodeTab[i++].prefixLen = j; - } - } - symCodeTab[numSyms].prefixLen = 0; - symCodeTab[numSyms].rangeLen = jbig2HuffmanEOT; - huffDecoder->buildTable(symCodeTab, numSyms); - huffDecoder->reset(); - - // set up the arithmetic decoder - } else { - symCodeTab = nullptr; - resetIntStats(symCodeLen); - arithDecoder->start(); - } - if (refine) { - resetRefinementStats(templ, nullptr); - } - - bitmap = readTextRegion(huff, refine, w, h, numInstances, - logStrips, numSyms, symCodeTab, symCodeLen, syms, - defPixel, combOp, transposed, refCorner, sOffset, - huffFSTable, huffDSTable, huffDTTable, - huffRDWTable, huffRDHTable, - huffRDXTable, huffRDYTable, huffRSizeTable, - templ, atx, aty); - - gfree(syms); - - if (bitmap) { - // combine the region bitmap into the page bitmap - if (imm) { - if (pageH == 0xffffffff && y + h > curPageH) { - pageBitmap->expand(y + h, pageDefPixel); - } - pageBitmap->combine(bitmap, x, y, extCombOp); - delete bitmap; - - // store the region bitmap - } else { - bitmap->setSegNum(segNum); - segments->append(bitmap); - } - } - - // clean up the Huffman decoder - if (huff) { - gfree(symCodeTab); - } - - return; - - codeTableError: - error(errSyntaxError, curStr->getPos(), "Missing code table in JBIG2 text region"); - delete codeTables; - gfree(syms); - return; - - eofError: - error(errSyntaxError, curStr->getPos(), "Unexpected EOF in JBIG2 stream"); - return; -} - -JBIG2Bitmap *JBIG2Stream::readTextRegion(GBool huff, GBool refine, - int w, int h, - Guint numInstances, - Guint logStrips, - int numSyms, - JBIG2HuffmanTable *symCodeTab, - Guint symCodeLen, - JBIG2Bitmap **syms, - Guint defPixel, Guint combOp, - Guint transposed, Guint refCorner, - int sOffset, - JBIG2HuffmanTable *huffFSTable, - JBIG2HuffmanTable *huffDSTable, - JBIG2HuffmanTable *huffDTTable, - JBIG2HuffmanTable *huffRDWTable, - JBIG2HuffmanTable *huffRDHTable, - JBIG2HuffmanTable *huffRDXTable, - JBIG2HuffmanTable *huffRDYTable, - JBIG2HuffmanTable *huffRSizeTable, - Guint templ, - int *atx, int *aty) { - JBIG2Bitmap *bitmap; - JBIG2Bitmap *symbolBitmap; - Guint strips; - int t = 0, dt = 0, tt, s, ds = 0, sFirst, j = 0; - int rdw, rdh, rdx, rdy, ri = 0, refDX, refDY, bmSize; - Guint symID, inst, bw, bh; - - strips = 1 << logStrips; - - // allocate the bitmap - bitmap = new JBIG2Bitmap(0, w, h); - if (!bitmap->isOk()) { - delete bitmap; - return nullptr; - } - if (defPixel) { - bitmap->clearToOne(); - } else { - bitmap->clearToZero(); - } - - // decode initial T value - if (huff) { - huffDecoder->decodeInt(&t, huffDTTable); - } else { - arithDecoder->decodeInt(&t, iadtStats); - } - t *= -(int)strips; - - inst = 0; - sFirst = 0; - while (inst < numInstances) { - - // decode delta-T - if (huff) { - huffDecoder->decodeInt(&dt, huffDTTable); - } else { - arithDecoder->decodeInt(&dt, iadtStats); - } - t += dt * strips; - - // first S value - if (huff) { - huffDecoder->decodeInt(&ds, huffFSTable); - } else { - arithDecoder->decodeInt(&ds, iafsStats); - } - sFirst += ds; - s = sFirst; - - // read the instances - // (this loop test is here to avoid an infinite loop with damaged - // JBIG2 streams where the normal loop exit doesn't get triggered) - while (inst < numInstances) { - - // T value - if (strips == 1) { - dt = 0; - } else if (huff) { - dt = huffDecoder->readBits(logStrips); - } else { - arithDecoder->decodeInt(&dt, iaitStats); - } - tt = t + dt; - - // symbol ID - if (huff) { - if (symCodeTab) { - huffDecoder->decodeInt(&j, symCodeTab); - symID = (Guint)j; - } else { - symID = huffDecoder->readBits(symCodeLen); - } - } else { - symID = arithDecoder->decodeIAID(symCodeLen, iaidStats); - } - - if (symID >= (Guint)numSyms) { - error(errSyntaxError, curStr->getPos(), "Invalid symbol number in JBIG2 text region"); - if (unlikely(numInstances - inst > 0x800)) { - // don't loop too often with damaged JBIg2 streams - delete bitmap; - return nullptr; - } - } else { - - // get the symbol bitmap - symbolBitmap = nullptr; - if (refine) { - if (huff) { - ri = (int)huffDecoder->readBit(); - } else { - arithDecoder->decodeInt(&ri, iariStats); - } - } else { - ri = 0; - } - if (ri) { - GBool decodeSuccess; - if (huff) { - decodeSuccess = huffDecoder->decodeInt(&rdw, huffRDWTable); - decodeSuccess = decodeSuccess && huffDecoder->decodeInt(&rdh, huffRDHTable); - decodeSuccess = decodeSuccess && huffDecoder->decodeInt(&rdx, huffRDXTable); - decodeSuccess = decodeSuccess && huffDecoder->decodeInt(&rdy, huffRDYTable); - decodeSuccess = decodeSuccess && huffDecoder->decodeInt(&bmSize, huffRSizeTable); - huffDecoder->reset(); - arithDecoder->start(); - } else { - decodeSuccess = arithDecoder->decodeInt(&rdw, iardwStats); - decodeSuccess = decodeSuccess && arithDecoder->decodeInt(&rdh, iardhStats); - decodeSuccess = decodeSuccess && arithDecoder->decodeInt(&rdx, iardxStats); - decodeSuccess = decodeSuccess && arithDecoder->decodeInt(&rdy, iardyStats); - } - - if (decodeSuccess && syms[symID]) - { - refDX = ((rdw >= 0) ? rdw : rdw - 1) / 2 + rdx; - refDY = ((rdh >= 0) ? rdh : rdh - 1) / 2 + rdy; - - symbolBitmap = - readGenericRefinementRegion(rdw + syms[symID]->getWidth(), - rdh + syms[symID]->getHeight(), - templ, gFalse, syms[symID], - refDX, refDY, atx, aty); - } - //~ do we need to use the bmSize value here (in Huffman mode)? - } else { - symbolBitmap = syms[symID]; - } - - if (symbolBitmap) { - // combine the symbol bitmap into the region bitmap - //~ something is wrong here - refCorner shouldn't degenerate into - //~ two cases - bw = symbolBitmap->getWidth() - 1; - if (unlikely(symbolBitmap->getHeight() == 0)) { - error(errSyntaxError, curStr->getPos(), "Invalid symbol bitmap height"); - if (ri) { - delete symbolBitmap; - } - delete bitmap; - return nullptr; - } - bh = symbolBitmap->getHeight() - 1; - if (transposed) { - if (unlikely(s > 2 * bitmap->getHeight())) { - error(errSyntaxError, curStr->getPos(), "Invalid JBIG2 combine"); - if (ri) { - delete symbolBitmap; - } - delete bitmap; - return nullptr; - } - switch (refCorner) { - case 0: // bottom left - bitmap->combine(symbolBitmap, tt, s, combOp); - break; - case 1: // top left - bitmap->combine(symbolBitmap, tt, s, combOp); - break; - case 2: // bottom right - bitmap->combine(symbolBitmap, tt - bw, s, combOp); - break; - case 3: // top right - bitmap->combine(symbolBitmap, tt - bw, s, combOp); - break; - } - s += bh; - } else { - switch (refCorner) { - case 0: // bottom left - if (unlikely(tt - (int) bh > 2 * bitmap->getHeight())) { - error(errSyntaxError, curStr->getPos(), "Invalid JBIG2 combine"); - if (ri) { - delete symbolBitmap; - } - delete bitmap; - return nullptr; - } - bitmap->combine(symbolBitmap, s, tt - bh, combOp); - break; - case 1: // top left - if (unlikely(tt > 2 * bitmap->getHeight())) { - error(errSyntaxError, curStr->getPos(), "Invalid JBIG2 combine"); - if (ri) { - delete symbolBitmap; - } - delete bitmap; - return nullptr; - } - bitmap->combine(symbolBitmap, s, tt, combOp); - break; - case 2: // bottom right - if (unlikely(tt - (int) bh > 2 * bitmap->getHeight())) { - error(errSyntaxError, curStr->getPos(), "Invalid JBIG2 combine"); - if (ri) { - delete symbolBitmap; - } - delete bitmap; - return nullptr; - } - bitmap->combine(symbolBitmap, s, tt - bh, combOp); - break; - case 3: // top right - if (unlikely(tt > 2 * bitmap->getHeight())) { - error(errSyntaxError, curStr->getPos(), "Invalid JBIG2 combine"); - if (ri) { - delete symbolBitmap; - } - delete bitmap; - return nullptr; - } - bitmap->combine(symbolBitmap, s, tt, combOp); - break; - } - s += bw; - } - if (ri) { - delete symbolBitmap; - } - } else { - // NULL symbolBitmap only happens on error - delete bitmap; - return nullptr; - } - } - - // next instance - ++inst; - - // next S value - if (huff) { - if (!huffDecoder->decodeInt(&ds, huffDSTable)) { - break; - } - } else { - if (!arithDecoder->decodeInt(&ds, iadsStats)) { - break; - } - } - s += sOffset + ds; - } - } - - return bitmap; -} - -void JBIG2Stream::readPatternDictSeg(Guint segNum, Guint length) { - JBIG2PatternDict *patternDict; - JBIG2Bitmap *bitmap; - Guint flags, patternW, patternH, grayMax, templ, mmr; - int atx[4], aty[4]; - Guint i, x; - - // halftone dictionary flags, pattern width and height, max gray value - if (!readUByte(&flags) || - !readUByte(&patternW) || - !readUByte(&patternH) || - !readULong(&grayMax)) { - goto eofError; - } - templ = (flags >> 1) & 3; - mmr = flags & 1; - - // set up the arithmetic decoder - if (!mmr) { - resetGenericStats(templ, nullptr); - arithDecoder->start(); - } - - // read the bitmap - atx[0] = -(int)patternW; aty[0] = 0; - atx[1] = -3; aty[1] = -1; - atx[2] = 2; aty[2] = -2; - atx[3] = -2; aty[3] = -2; - bitmap = readGenericBitmap(mmr, (grayMax + 1) * patternW, patternH, - templ, gFalse, gFalse, nullptr, - atx, aty, length - 7); - - if (!bitmap) - return; - - // create the pattern dict object - patternDict = new JBIG2PatternDict(segNum, grayMax + 1); - - // split up the bitmap - x = 0; - for (i = 0; i <= grayMax && i < patternDict->getSize(); ++i) { - patternDict->setBitmap(i, bitmap->getSlice(x, 0, patternW, patternH)); - x += patternW; - } - - // free memory - delete bitmap; - - // store the new pattern dict - segments->append(patternDict); - - return; - - eofError: - error(errSyntaxError, curStr->getPos(), "Unexpected EOF in JBIG2 stream"); -} - -void JBIG2Stream::readHalftoneRegionSeg(Guint segNum, GBool imm, - GBool lossless, Guint length, - Guint *refSegs, Guint nRefSegs) { - JBIG2Bitmap *bitmap; - JBIG2Segment *seg; - JBIG2PatternDict *patternDict; - JBIG2Bitmap *skipBitmap; - Guint *grayImg; - JBIG2Bitmap *grayBitmap; - JBIG2Bitmap *patternBitmap; - Guint w, h, x, y, segInfoFlags, extCombOp; - Guint flags, mmr, templ, enableSkip, combOp; - Guint gridW, gridH, stepX, stepY, patW, patH; - int atx[4], aty[4]; - int gridX, gridY, xx, yy, bit, j; - Guint bpp, m, n, i; - - // region segment info field - if (!readULong(&w) || !readULong(&h) || - !readULong(&x) || !readULong(&y) || - !readUByte(&segInfoFlags)) { - goto eofError; - } - extCombOp = segInfoFlags & 7; - - // rest of the halftone region header - if (!readUByte(&flags)) { - goto eofError; - } - mmr = flags & 1; - templ = (flags >> 1) & 3; - enableSkip = (flags >> 3) & 1; - combOp = (flags >> 4) & 7; - if (!readULong(&gridW) || !readULong(&gridH) || - !readLong(&gridX) || !readLong(&gridY) || - !readUWord(&stepX) || !readUWord(&stepY)) { - goto eofError; - } - if (w == 0 || h == 0 || w >= INT_MAX / h) { - error(errSyntaxError, curStr->getPos(), "Bad bitmap size in JBIG2 halftone segment"); - return; - } - if (gridH == 0 || gridW >= INT_MAX / gridH) { - error(errSyntaxError, curStr->getPos(), "Bad grid size in JBIG2 halftone segment"); - return; - } - - // get pattern dictionary - if (nRefSegs != 1) { - error(errSyntaxError, curStr->getPos(), "Bad symbol dictionary reference in JBIG2 halftone segment"); - return; - } - seg = findSegment(refSegs[0]); - if (seg == nullptr || seg->getType() != jbig2SegPatternDict) { - error(errSyntaxError, curStr->getPos(), "Bad symbol dictionary reference in JBIG2 halftone segment"); - return; - } - - patternDict = (JBIG2PatternDict *)seg; - i = patternDict->getSize(); - if (i <= 1) { - bpp = 0; - } else { - --i; - bpp = 0; - // i = floor((size-1) / 2^bpp) - while (i > 0) { - ++bpp; - i >>= 1; - } - } - patternBitmap = patternDict->getBitmap(0); - if (unlikely(patternBitmap == nullptr)) { - error(errSyntaxError, curStr->getPos(), "Bad pattern bitmap"); - return; - } - patW = patternBitmap->getWidth(); - patH = patternBitmap->getHeight(); - - // set up the arithmetic decoder - if (!mmr) { - resetGenericStats(templ, nullptr); - arithDecoder->start(); - } - - // allocate the bitmap - bitmap = new JBIG2Bitmap(segNum, w, h); - if (flags & 0x80) { // HDEFPIXEL - bitmap->clearToOne(); - } else { - bitmap->clearToZero(); - } - - // compute the skip bitmap - skipBitmap = nullptr; - if (enableSkip) { - skipBitmap = new JBIG2Bitmap(0, gridW, gridH); - skipBitmap->clearToZero(); - for (m = 0; m < gridH; ++m) { - for (n = 0; n < gridW; ++n) { - xx = gridX + m * stepY + n * stepX; - yy = gridY + m * stepX - n * stepY; - if (((xx + (int)patW) >> 8) <= 0 || (xx >> 8) >= (int)w || - ((yy + (int)patH) >> 8) <= 0 || (yy >> 8) >= (int)h) { - skipBitmap->setPixel(n, m); - } - } - } - } - - // read the gray-scale image - grayImg = (Guint *)gmallocn(gridW * gridH, sizeof(Guint)); - memset(grayImg, 0, gridW * gridH * sizeof(Guint)); - atx[0] = templ <= 1 ? 3 : 2; aty[0] = -1; - atx[1] = -3; aty[1] = -1; - atx[2] = 2; aty[2] = -2; - atx[3] = -2; aty[3] = -2; - for (j = bpp - 1; j >= 0; --j) { - grayBitmap = readGenericBitmap(mmr, gridW, gridH, templ, gFalse, - enableSkip, skipBitmap, atx, aty, -1); - i = 0; - for (m = 0; m < gridH; ++m) { - for (n = 0; n < gridW; ++n) { - bit = grayBitmap->getPixel(n, m) ^ (grayImg[i] & 1); - grayImg[i] = (grayImg[i] << 1) | bit; - ++i; - } - } - delete grayBitmap; - } - - // decode the image - i = 0; - for (m = 0; m < gridH; ++m) { - xx = gridX + m * stepY; - yy = gridY + m * stepX; - for (n = 0; n < gridW; ++n) { - if (!(enableSkip && skipBitmap->getPixel(n, m))) { - patternBitmap = patternDict->getBitmap(grayImg[i]); - if (unlikely(patternBitmap == nullptr)) { - delete skipBitmap; - delete bitmap; - gfree(grayImg); - error(errSyntaxError, curStr->getPos(), "Bad pattern bitmap"); - return; - } - bitmap->combine(patternBitmap, xx >> 8, yy >> 8, combOp); - } - xx += stepX; - yy -= stepY; - ++i; - } - } - - gfree(grayImg); - if (skipBitmap) { - delete skipBitmap; - } - - // combine the region bitmap into the page bitmap - if (imm) { - if (pageH == 0xffffffff && y + h > curPageH) { - pageBitmap->expand(y + h, pageDefPixel); - } - pageBitmap->combine(bitmap, x, y, extCombOp); - delete bitmap; - - // store the region bitmap - } else { - segments->append(bitmap); - } - - return; - - eofError: - error(errSyntaxError, curStr->getPos(), "Unexpected EOF in JBIG2 stream"); -} - -void JBIG2Stream::readGenericRegionSeg(Guint segNum, GBool imm, - GBool lossless, Guint length) { - JBIG2Bitmap *bitmap; - Guint w, h, x, y, segInfoFlags, extCombOp, rowCount; - Guint flags, mmr, templ, tpgdOn; - int atx[4], aty[4]; - - // region segment info field - if (!readULong(&w) || !readULong(&h) || - !readULong(&x) || !readULong(&y) || - !readUByte(&segInfoFlags)) { - goto eofError; - } - extCombOp = segInfoFlags & 7; - - // rest of the generic region segment header - if (!readUByte(&flags)) { - goto eofError; - } - mmr = flags & 1; - templ = (flags >> 1) & 3; - tpgdOn = (flags >> 3) & 1; - - // AT flags - if (!mmr) { - if (templ == 0) { - if (!readByte(&atx[0]) || - !readByte(&aty[0]) || - !readByte(&atx[1]) || - !readByte(&aty[1]) || - !readByte(&atx[2]) || - !readByte(&aty[2]) || - !readByte(&atx[3]) || - !readByte(&aty[3])) { - goto eofError; - } - } else { - if (!readByte(&atx[0]) || - !readByte(&aty[0])) { - goto eofError; - } - } - } - - // set up the arithmetic decoder - if (!mmr) { - resetGenericStats(templ, nullptr); - arithDecoder->start(); - } - - // read the bitmap - bitmap = readGenericBitmap(mmr, w, h, templ, tpgdOn, gFalse, - nullptr, atx, aty, mmr ? length - 18 : 0); - if (!bitmap) - return; - - // combine the region bitmap into the page bitmap - if (imm) { - if (pageH == 0xffffffff && y + h > curPageH) { - pageBitmap->expand(y + h, pageDefPixel); - } - pageBitmap->combine(bitmap, x, y, extCombOp); - delete bitmap; - - // store the region bitmap - } else { - bitmap->setSegNum(segNum); - segments->append(bitmap); - } - - // immediate generic segments can have an unspecified length, in - // which case, a row count is stored at the end of the segment - if (imm && length == 0xffffffff) { - readULong(&rowCount); - } - - return; - - eofError: - error(errSyntaxError, curStr->getPos(), "Unexpected EOF in JBIG2 stream"); -} - -inline void JBIG2Stream::mmrAddPixels(int a1, int blackPixels, - int *codingLine, int *a0i, int w) { - if (a1 > codingLine[*a0i]) { - if (a1 > w) { - error(errSyntaxError, curStr->getPos(), "JBIG2 MMR row is wrong length ({0:d})", a1); - a1 = w; - } - if ((*a0i & 1) ^ blackPixels) { - ++*a0i; - } - codingLine[*a0i] = a1; - } -} - -inline void JBIG2Stream::mmrAddPixelsNeg(int a1, int blackPixels, - int *codingLine, int *a0i, int w) { - if (a1 > codingLine[*a0i]) { - if (a1 > w) { - error(errSyntaxError, curStr->getPos(), "JBIG2 MMR row is wrong length ({0:d})", a1); - a1 = w; - } - if ((*a0i & 1) ^ blackPixels) { - ++*a0i; - } - codingLine[*a0i] = a1; - } else if (a1 < codingLine[*a0i]) { - if (a1 < 0) { - error(errSyntaxError, curStr->getPos(), "Invalid JBIG2 MMR code"); - a1 = 0; - } - while (*a0i > 0 && a1 <= codingLine[*a0i - 1]) { - --*a0i; - } - codingLine[*a0i] = a1; - } -} - -JBIG2Bitmap *JBIG2Stream::readGenericBitmap(GBool mmr, int w, int h, - int templ, GBool tpgdOn, - GBool useSkip, JBIG2Bitmap *skip, - int *atx, int *aty, - int mmrDataLength) { - JBIG2Bitmap *bitmap; - GBool ltp; - Guint ltpCX, cx, cx0, cx1, cx2; - int *refLine, *codingLine; - int code1, code2, code3; - Guchar *p0, *p1, *p2, *pp; - Guchar *atP0, *atP1, *atP2, *atP3; - Guint buf0, buf1, buf2; - Guint atBuf0, atBuf1, atBuf2, atBuf3; - int atShift0, atShift1, atShift2, atShift3; - Guchar mask; - int x, y, x0, x1, a0i, b1i, blackPixels, pix, i; - - bitmap = new JBIG2Bitmap(0, w, h); - if (!bitmap->isOk()) { - delete bitmap; - return nullptr; - } - bitmap->clearToZero(); - - //----- MMR decode - - if (mmr) { - - mmrDecoder->reset(); - if (w > INT_MAX - 2) { - error(errSyntaxError, curStr->getPos(), "Bad width in JBIG2 generic bitmap"); - delete bitmap; - return nullptr; - } - // 0 <= codingLine[0] < codingLine[1] < ... < codingLine[n] = w - // ---> max codingLine size = w + 1 - // refLine has one extra guard entry at the end - // ---> max refLine size = w + 2 - codingLine = (int *)gmallocn(w + 1, sizeof(int)); - refLine = (int *)gmallocn(w + 2, sizeof(int)); - memset(refLine, 0, (w + 2) * sizeof(int)); - for (i = 0; i < w + 1; ++i) codingLine[i] = w; - - for (y = 0; y < h; ++y) { - - // copy coding line to ref line - for (i = 0; codingLine[i] < w; ++i) { - refLine[i] = codingLine[i]; - } - refLine[i++] = w; - refLine[i] = w; - - // decode a line - codingLine[0] = 0; - a0i = 0; - b1i = 0; - blackPixels = 0; - // invariant: - // refLine[b1i-1] <= codingLine[a0i] < refLine[b1i] < refLine[b1i+1] <= w - // exception at left edge: - // codingLine[a0i = 0] = refLine[b1i = 0] = 0 is possible - // exception at right edge: - // refLine[b1i] = refLine[b1i+1] = w is possible - while (codingLine[a0i] < w) { - code1 = mmrDecoder->get2DCode(); - switch (code1) { - case twoDimPass: - if (unlikely(b1i + 1 >= w + 2)) { - break; - } - mmrAddPixels(refLine[b1i + 1], blackPixels, codingLine, &a0i, w); - if (refLine[b1i + 1] < w) { - b1i += 2; - } - break; - case twoDimHoriz: - code1 = code2 = 0; - if (blackPixels) { - do { - code1 += code3 = mmrDecoder->getBlackCode(); - } while (code3 >= 64); - do { - code2 += code3 = mmrDecoder->getWhiteCode(); - } while (code3 >= 64); - } else { - do { - code1 += code3 = mmrDecoder->getWhiteCode(); - } while (code3 >= 64); - do { - code2 += code3 = mmrDecoder->getBlackCode(); - } while (code3 >= 64); - } - mmrAddPixels(codingLine[a0i] + code1, blackPixels, - codingLine, &a0i, w); - if (codingLine[a0i] < w) { - mmrAddPixels(codingLine[a0i] + code2, blackPixels ^ 1, - codingLine, &a0i, w); - } - while (likely(b1i < w + 2) && refLine[b1i] <= codingLine[a0i] && refLine[b1i] < w) { - b1i += 2; - } - break; - case twoDimVertR3: - if (unlikely(b1i >= w + 2)) { - break; - } - mmrAddPixels(refLine[b1i] + 3, blackPixels, codingLine, &a0i, w); - blackPixels ^= 1; - if (codingLine[a0i] < w) { - ++b1i; - while (likely(b1i < w + 2) && refLine[b1i] <= codingLine[a0i] && refLine[b1i] < w) { - b1i += 2; - } - } - break; - case twoDimVertR2: - if (unlikely(b1i >= w + 2)) { - break; - } - mmrAddPixels(refLine[b1i] + 2, blackPixels, codingLine, &a0i, w); - blackPixels ^= 1; - if (codingLine[a0i] < w) { - ++b1i; - while (likely(b1i < w + 2) && refLine[b1i] <= codingLine[a0i] && refLine[b1i] < w) { - b1i += 2; - } - } - break; - case twoDimVertR1: - if (unlikely(b1i >= w + 2)) { - break; - } - mmrAddPixels(refLine[b1i] + 1, blackPixels, codingLine, &a0i, w); - blackPixels ^= 1; - if (codingLine[a0i] < w) { - ++b1i; - while (likely(b1i < w + 2) && refLine[b1i] <= codingLine[a0i] && refLine[b1i] < w) { - b1i += 2; - } - } - break; - case twoDimVert0: - if (unlikely(b1i >= w + 2)) { - break; - } - mmrAddPixels(refLine[b1i], blackPixels, codingLine, &a0i, w); - blackPixels ^= 1; - if (codingLine[a0i] < w) { - ++b1i; - while (likely(b1i < w + 2) && refLine[b1i] <= codingLine[a0i] && refLine[b1i] < w) { - b1i += 2; - } - } - break; - case twoDimVertL3: - if (unlikely(b1i >= w + 2)) { - break; - } - mmrAddPixelsNeg(refLine[b1i] - 3, blackPixels, codingLine, &a0i, w); - blackPixels ^= 1; - if (codingLine[a0i] < w) { - if (b1i > 0) { - --b1i; - } else { - ++b1i; - } - while (likely(b1i < w + 2) && refLine[b1i] <= codingLine[a0i] && refLine[b1i] < w) { - b1i += 2; - } - } - break; - case twoDimVertL2: - if (unlikely(b1i >= w + 2)) { - break; - } - mmrAddPixelsNeg(refLine[b1i] - 2, blackPixels, codingLine, &a0i, w); - blackPixels ^= 1; - if (codingLine[a0i] < w) { - if (b1i > 0) { - --b1i; - } else { - ++b1i; - } - while (likely(b1i < w + 2) && refLine[b1i] <= codingLine[a0i] && refLine[b1i] < w) { - b1i += 2; - } - } - break; - case twoDimVertL1: - if (unlikely(b1i >= w + 2)) { - break; - } - mmrAddPixelsNeg(refLine[b1i] - 1, blackPixels, codingLine, &a0i, w); - blackPixels ^= 1; - if (codingLine[a0i] < w) { - if (b1i > 0) { - --b1i; - } else { - ++b1i; - } - while (likely(b1i < w + 2) && refLine[b1i] <= codingLine[a0i] && refLine[b1i] < w) { - b1i += 2; - } - } - break; - case EOF: - mmrAddPixels(w, 0, codingLine, &a0i, w); - break; - default: - error(errSyntaxError, curStr->getPos(), "Illegal code in JBIG2 MMR bitmap data"); - mmrAddPixels(w, 0, codingLine, &a0i, w); - break; - } - } - - // convert the run lengths to a bitmap line - i = 0; - while (1) { - for (x = codingLine[i]; x < codingLine[i+1]; ++x) { - bitmap->setPixel(x, y); - } - if (codingLine[i+1] >= w || codingLine[i+2] >= w) { - break; - } - i += 2; - } - } - - if (mmrDataLength >= 0) { - mmrDecoder->skipTo(mmrDataLength); - } else { - if (mmrDecoder->get24Bits() != 0x001001) { - error(errSyntaxError, curStr->getPos(), "Missing EOFB in JBIG2 MMR bitmap data"); - } - } - - gfree(refLine); - gfree(codingLine); - - //----- arithmetic decode - - } else { - // set up the typical row context - ltpCX = 0; // make gcc happy - if (tpgdOn) { - switch (templ) { - case 0: - ltpCX = 0x3953; // 001 11001 0101 0011 - break; - case 1: - ltpCX = 0x079a; // 0011 11001 101 0 - break; - case 2: - ltpCX = 0x0e3; // 001 1100 01 1 - break; - case 3: - ltpCX = 0x18a; // 01100 0101 1 - break; - } - } - - ltp = 0; - cx = cx0 = cx1 = cx2 = 0; // make gcc happy - for (y = 0; y < h; ++y) { - - // check for a "typical" (duplicate) row - if (tpgdOn) { - if (arithDecoder->decodeBit(ltpCX, genericRegionStats)) { - ltp = !ltp; - } - if (ltp) { - if (y > 0) { - bitmap->duplicateRow(y, y-1); - } - continue; - } - } - - switch (templ) { - case 0: - - // set up the context - p2 = pp = bitmap->getDataPtr() + y * bitmap->getLineSize(); - buf2 = *p2++ << 8; - if (y >= 1) { - p1 = bitmap->getDataPtr() + (y - 1) * bitmap->getLineSize(); - buf1 = *p1++ << 8; - if (y >= 2) { - p0 = bitmap->getDataPtr() + (y - 2) * bitmap->getLineSize(); - buf0 = *p0++ << 8; - } else { - p0 = nullptr; - buf0 = 0; - } - } else { - p1 = p0 = nullptr; - buf1 = buf0 = 0; - } - - if (atx[0] >= -8 && atx[0] <= 8 && - atx[1] >= -8 && atx[1] <= 8 && - atx[2] >= -8 && atx[2] <= 8 && - atx[3] >= -8 && atx[3] <= 8) { - // set up the adaptive context - if (y + aty[0] >= 0 && y + aty[0] < bitmap->getHeight()) { - atP0 = bitmap->getDataPtr() + (y + aty[0]) * bitmap->getLineSize(); - atBuf0 = *atP0++ << 8; - } else { - atP0 = nullptr; - atBuf0 = 0; - } - atShift0 = 15 - atx[0]; - if (y + aty[1] >= 0 && y + aty[1] < bitmap->getHeight()) { - atP1 = bitmap->getDataPtr() + (y + aty[1]) * bitmap->getLineSize(); - atBuf1 = *atP1++ << 8; - } else { - atP1 = nullptr; - atBuf1 = 0; - } - atShift1 = 15 - atx[1]; - if (y + aty[2] >= 0 && y + aty[2] < bitmap->getHeight()) { - atP2 = bitmap->getDataPtr() + (y + aty[2]) * bitmap->getLineSize(); - atBuf2 = *atP2++ << 8; - } else { - atP2 = nullptr; - atBuf2 = 0; - } - atShift2 = 15 - atx[2]; - if (y + aty[3] >= 0 && y + aty[3] < bitmap->getHeight()) { - atP3 = bitmap->getDataPtr() + (y + aty[3]) * bitmap->getLineSize(); - atBuf3 = *atP3++ << 8; - } else { - atP3 = nullptr; - atBuf3 = 0; - } - atShift3 = 15 - atx[3]; - - // decode the row - for (x0 = 0, x = 0; x0 < w; x0 += 8, ++pp) { - if (x0 + 8 < w) { - if (p0) { - buf0 |= *p0++; - } - if (p1) { - buf1 |= *p1++; - } - buf2 |= *p2++; - if (atP0) { - atBuf0 |= *atP0++; - } - if (atP1) { - atBuf1 |= *atP1++; - } - if (atP2) { - atBuf2 |= *atP2++; - } - if (atP3) { - atBuf3 |= *atP3++; - } - } - for (x1 = 0, mask = 0x80; x1 < 8 && x < w; ++x1, ++x, mask >>= 1) { - - // build the context - cx0 = (buf0 >> 14) & 0x07; - cx1 = (buf1 >> 13) & 0x1f; - cx2 = (buf2 >> 16) & 0x0f; - cx = (cx0 << 13) | (cx1 << 8) | (cx2 << 4) | - (((atBuf0 >> atShift0) & 1) << 3) | - (((atBuf1 >> atShift1) & 1) << 2) | - (((atBuf2 >> atShift2) & 1) << 1) | - ((atBuf3 >> atShift3) & 1); - - // check for a skipped pixel - if (!(useSkip && skip->getPixel(x, y))) { - - // decode the pixel - if ((pix = arithDecoder->decodeBit(cx, genericRegionStats))) { - *pp |= mask; - buf2 |= 0x8000; - if (aty[0] == 0) { - atBuf0 |= 0x8000; - } - if (aty[1] == 0) { - atBuf1 |= 0x8000; - } - if (aty[2] == 0) { - atBuf2 |= 0x8000; - } - if (aty[3] == 0) { - atBuf3 |= 0x8000; - } - } - } - - // update the context - buf0 <<= 1; - buf1 <<= 1; - buf2 <<= 1; - atBuf0 <<= 1; - atBuf1 <<= 1; - atBuf2 <<= 1; - atBuf3 <<= 1; - } - } - - } else { - // decode the row - for (x0 = 0, x = 0; x0 < w; x0 += 8, ++pp) { - if (x0 + 8 < w) { - if (p0) { - buf0 |= *p0++; - } - if (p1) { - buf1 |= *p1++; - } - buf2 |= *p2++; - } - for (x1 = 0, mask = 0x80; x1 < 8 && x < w; ++x1, ++x, mask >>= 1) { - - // build the context - cx0 = (buf0 >> 14) & 0x07; - cx1 = (buf1 >> 13) & 0x1f; - cx2 = (buf2 >> 16) & 0x0f; - cx = (cx0 << 13) | (cx1 << 8) | (cx2 << 4) | - (bitmap->getPixel(x + atx[0], y + aty[0]) << 3) | - (bitmap->getPixel(x + atx[1], y + aty[1]) << 2) | - (bitmap->getPixel(x + atx[2], y + aty[2]) << 1) | - bitmap->getPixel(x + atx[3], y + aty[3]); - - // check for a skipped pixel - if (!(useSkip && skip->getPixel(x, y))) { - - // decode the pixel - if ((pix = arithDecoder->decodeBit(cx, genericRegionStats))) { - *pp |= mask; - buf2 |= 0x8000; - } - } - - // update the context - buf0 <<= 1; - buf1 <<= 1; - buf2 <<= 1; - } - } - } - break; - - case 1: - - // set up the context - p2 = pp = bitmap->getDataPtr() + y * bitmap->getLineSize(); - buf2 = *p2++ << 8; - if (y >= 1) { - p1 = bitmap->getDataPtr() + (y - 1) * bitmap->getLineSize(); - buf1 = *p1++ << 8; - if (y >= 2) { - p0 = bitmap->getDataPtr() + (y - 2) * bitmap->getLineSize(); - buf0 = *p0++ << 8; - } else { - p0 = nullptr; - buf0 = 0; - } - } else { - p1 = p0 = nullptr; - buf1 = buf0 = 0; - } - - if (atx[0] >= -8 && atx[0] <= 8) { - // set up the adaptive context - const int atY = y + aty[0]; - if ((atY >= 0) && (atY < bitmap->getHeight())) { - atP0 = bitmap->getDataPtr() + atY * bitmap->getLineSize(); - atBuf0 = *atP0++ << 8; - } else { - atP0 = nullptr; - atBuf0 = 0; - } - atShift0 = 15 - atx[0]; - - // decode the row - for (x0 = 0, x = 0; x0 < w; x0 += 8, ++pp) { - if (x0 + 8 < w) { - if (p0) { - buf0 |= *p0++; - } - if (p1) { - buf1 |= *p1++; - } - buf2 |= *p2++; - if (atP0) { - atBuf0 |= *atP0++; - } - } - for (x1 = 0, mask = 0x80; x1 < 8 && x < w; ++x1, ++x, mask >>= 1) { - - // build the context - cx0 = (buf0 >> 13) & 0x0f; - cx1 = (buf1 >> 13) & 0x1f; - cx2 = (buf2 >> 16) & 0x07; - cx = (cx0 << 9) | (cx1 << 4) | (cx2 << 1) | - ((atBuf0 >> atShift0) & 1); - - // check for a skipped pixel - if (!(useSkip && skip->getPixel(x, y))) { - - // decode the pixel - if ((pix = arithDecoder->decodeBit(cx, genericRegionStats))) { - *pp |= mask; - buf2 |= 0x8000; - if (aty[0] == 0) { - atBuf0 |= 0x8000; - } - } - } - - // update the context - buf0 <<= 1; - buf1 <<= 1; - buf2 <<= 1; - atBuf0 <<= 1; - } - } - - } else { - // decode the row - for (x0 = 0, x = 0; x0 < w; x0 += 8, ++pp) { - if (x0 + 8 < w) { - if (p0) { - buf0 |= *p0++; - } - if (p1) { - buf1 |= *p1++; - } - buf2 |= *p2++; - } - for (x1 = 0, mask = 0x80; x1 < 8 && x < w; ++x1, ++x, mask >>= 1) { - - // build the context - cx0 = (buf0 >> 13) & 0x0f; - cx1 = (buf1 >> 13) & 0x1f; - cx2 = (buf2 >> 16) & 0x07; - cx = (cx0 << 9) | (cx1 << 4) | (cx2 << 1) | - bitmap->getPixel(x + atx[0], y + aty[0]); - - // check for a skipped pixel - if (!(useSkip && skip->getPixel(x, y))) { - - // decode the pixel - if ((pix = arithDecoder->decodeBit(cx, genericRegionStats))) { - *pp |= mask; - buf2 |= 0x8000; - } - } - - // update the context - buf0 <<= 1; - buf1 <<= 1; - buf2 <<= 1; - } - } - } - break; - - case 2: - - // set up the context - p2 = pp = bitmap->getDataPtr() + y * bitmap->getLineSize(); - buf2 = *p2++ << 8; - if (y >= 1) { - p1 = bitmap->getDataPtr() + (y - 1) * bitmap->getLineSize(); - buf1 = *p1++ << 8; - if (y >= 2) { - p0 = bitmap->getDataPtr() + (y - 2) * bitmap->getLineSize(); - buf0 = *p0++ << 8; - } else { - p0 = nullptr; - buf0 = 0; - } - } else { - p1 = p0 = nullptr; - buf1 = buf0 = 0; - } - - if (atx[0] >= -8 && atx[0] <= 8) { - // set up the adaptive context - const int atY = y + aty[0]; - if ((atY >= 0) && (atY < bitmap->getHeight())) { - atP0 = bitmap->getDataPtr() + atY * bitmap->getLineSize(); - atBuf0 = *atP0++ << 8; - } else { - atP0 = nullptr; - atBuf0 = 0; - } - atShift0 = 15 - atx[0]; - - // decode the row - for (x0 = 0, x = 0; x0 < w; x0 += 8, ++pp) { - if (x0 + 8 < w) { - if (p0) { - buf0 |= *p0++; - } - if (p1) { - buf1 |= *p1++; - } - buf2 |= *p2++; - if (atP0) { - atBuf0 |= *atP0++; - } - } - for (x1 = 0, mask = 0x80; x1 < 8 && x < w; ++x1, ++x, mask >>= 1) { - - // build the context - cx0 = (buf0 >> 14) & 0x07; - cx1 = (buf1 >> 14) & 0x0f; - cx2 = (buf2 >> 16) & 0x03; - cx = (cx0 << 7) | (cx1 << 3) | (cx2 << 1) | - ((atBuf0 >> atShift0) & 1); - - // check for a skipped pixel - if (!(useSkip && skip->getPixel(x, y))) { - - // decode the pixel - if ((pix = arithDecoder->decodeBit(cx, genericRegionStats))) { - *pp |= mask; - buf2 |= 0x8000; - if (aty[0] == 0) { - atBuf0 |= 0x8000; - } - } - } - - // update the context - buf0 <<= 1; - buf1 <<= 1; - buf2 <<= 1; - atBuf0 <<= 1; - } - } - - } else { - // decode the row - for (x0 = 0, x = 0; x0 < w; x0 += 8, ++pp) { - if (x0 + 8 < w) { - if (p0) { - buf0 |= *p0++; - } - if (p1) { - buf1 |= *p1++; - } - buf2 |= *p2++; - } - for (x1 = 0, mask = 0x80; x1 < 8 && x < w; ++x1, ++x, mask >>= 1) { - - // build the context - cx0 = (buf0 >> 14) & 0x07; - cx1 = (buf1 >> 14) & 0x0f; - cx2 = (buf2 >> 16) & 0x03; - cx = (cx0 << 7) | (cx1 << 3) | (cx2 << 1) | - bitmap->getPixel(x + atx[0], y + aty[0]); - - // check for a skipped pixel - if (!(useSkip && skip->getPixel(x, y))) { - - // decode the pixel - if ((pix = arithDecoder->decodeBit(cx, genericRegionStats))) { - *pp |= mask; - buf2 |= 0x8000; - } - } - - // update the context - buf0 <<= 1; - buf1 <<= 1; - buf2 <<= 1; - } - } - } - break; - - case 3: - - // set up the context - p2 = pp = bitmap->getDataPtr() + y * bitmap->getLineSize(); - buf2 = *p2++ << 8; - if (y >= 1) { - p1 = bitmap->getDataPtr() + (y - 1) * bitmap->getLineSize(); - buf1 = *p1++ << 8; - } else { - p1 = nullptr; - buf1 = 0; - } - - if (atx[0] >= -8 && atx[0] <= 8) { - // set up the adaptive context - const int atY = y + aty[0]; - if ((atY >= 0) && (atY < bitmap->getHeight())) { - atP0 = bitmap->getDataPtr() + atY * bitmap->getLineSize(); - atBuf0 = *atP0++ << 8; - } else { - atP0 = nullptr; - atBuf0 = 0; - } - atShift0 = 15 - atx[0]; - - // decode the row - for (x0 = 0, x = 0; x0 < w; x0 += 8, ++pp) { - if (x0 + 8 < w) { - if (p1) { - buf1 |= *p1++; - } - buf2 |= *p2++; - if (atP0) { - atBuf0 |= *atP0++; - } - } - for (x1 = 0, mask = 0x80; x1 < 8 && x < w; ++x1, ++x, mask >>= 1) { - - // build the context - cx1 = (buf1 >> 14) & 0x1f; - cx2 = (buf2 >> 16) & 0x0f; - cx = (cx1 << 5) | (cx2 << 1) | - ((atBuf0 >> atShift0) & 1); - - // check for a skipped pixel - if (!(useSkip && skip->getPixel(x, y))) { - - // decode the pixel - if ((pix = arithDecoder->decodeBit(cx, genericRegionStats))) { - *pp |= mask; - buf2 |= 0x8000; - if (aty[0] == 0) { - atBuf0 |= 0x8000; - } - } - } - - // update the context - buf1 <<= 1; - buf2 <<= 1; - atBuf0 <<= 1; - } - } - - } else { - // decode the row - for (x0 = 0, x = 0; x0 < w; x0 += 8, ++pp) { - if (x0 + 8 < w) { - if (p1) { - buf1 |= *p1++; - } - buf2 |= *p2++; - } - for (x1 = 0, mask = 0x80; x1 < 8 && x < w; ++x1, ++x, mask >>= 1) { - - // build the context - cx1 = (buf1 >> 14) & 0x1f; - cx2 = (buf2 >> 16) & 0x0f; - cx = (cx1 << 5) | (cx2 << 1) | - bitmap->getPixel(x + atx[0], y + aty[0]); - - // check for a skipped pixel - if (!(useSkip && skip->getPixel(x, y))) { - - // decode the pixel - if ((pix = arithDecoder->decodeBit(cx, genericRegionStats))) { - *pp |= mask; - buf2 |= 0x8000; - } - } - - // update the context - buf1 <<= 1; - buf2 <<= 1; - } - } - } - break; - } - } - } - - return bitmap; -} - -void JBIG2Stream::readGenericRefinementRegionSeg(Guint segNum, GBool imm, - GBool lossless, Guint length, - Guint *refSegs, - Guint nRefSegs) { - JBIG2Bitmap *bitmap, *refBitmap; - Guint w, h, x, y, segInfoFlags, extCombOp; - Guint flags, templ, tpgrOn; - int atx[2], aty[2]; - JBIG2Segment *seg; - - // region segment info field - if (!readULong(&w) || !readULong(&h) || - !readULong(&x) || !readULong(&y) || - !readUByte(&segInfoFlags)) { - goto eofError; - } - extCombOp = segInfoFlags & 7; - - // rest of the generic refinement region segment header - if (!readUByte(&flags)) { - goto eofError; - } - templ = flags & 1; - tpgrOn = (flags >> 1) & 1; - - // AT flags - if (!templ) { - if (!readByte(&atx[0]) || !readByte(&aty[0]) || - !readByte(&atx[1]) || !readByte(&aty[1])) { - goto eofError; - } - } - - // resize the page bitmap if needed - if (nRefSegs == 0 || imm) { - if (pageH == 0xffffffff && y + h > curPageH) { - pageBitmap->expand(y + h, pageDefPixel); - } - } - - // get referenced bitmap - if (nRefSegs > 1) { - error(errSyntaxError, curStr->getPos(), "Bad reference in JBIG2 generic refinement segment"); - return; - } - if (nRefSegs == 1) { - seg = findSegment(refSegs[0]); - if (seg == nullptr || seg->getType() != jbig2SegBitmap) { - error(errSyntaxError, curStr->getPos(), "Bad bitmap reference in JBIG2 generic refinement segment"); - return; - } - refBitmap = (JBIG2Bitmap *)seg; - } else { - refBitmap = pageBitmap->getSlice(x, y, w, h); - } - - // set up the arithmetic decoder - resetRefinementStats(templ, nullptr); - arithDecoder->start(); - - // read - bitmap = readGenericRefinementRegion(w, h, templ, tpgrOn, - refBitmap, 0, 0, atx, aty); - - // combine the region bitmap into the page bitmap - if (imm && bitmap) { - pageBitmap->combine(bitmap, x, y, extCombOp); - delete bitmap; - - // store the region bitmap - } else { - if (bitmap) { - bitmap->setSegNum(segNum); - segments->append(bitmap); - } else { - error(errSyntaxError, curStr->getPos(), "readGenericRefinementRegionSeg with null bitmap"); - } - } - - // delete the referenced bitmap - if (nRefSegs == 1) { - discardSegment(refSegs[0]); - } else { - delete refBitmap; - } - - return; - - eofError: - error(errSyntaxError, curStr->getPos(), "Unexpected EOF in JBIG2 stream"); -} - -JBIG2Bitmap *JBIG2Stream::readGenericRefinementRegion(int w, int h, - int templ, GBool tpgrOn, - JBIG2Bitmap *refBitmap, - int refDX, int refDY, - int *atx, int *aty) { - JBIG2Bitmap *bitmap; - GBool ltp; - Guint ltpCX, cx, cx0, cx2, cx3, cx4, tpgrCX0, tpgrCX1, tpgrCX2; - JBIG2BitmapPtr cxPtr0 = {nullptr, 0, 0}; - JBIG2BitmapPtr cxPtr1 = {nullptr, 0, 0}; - JBIG2BitmapPtr cxPtr2 = {nullptr, 0, 0}; - JBIG2BitmapPtr cxPtr3 = {nullptr, 0, 0}; - JBIG2BitmapPtr cxPtr4 = {nullptr, 0, 0}; - JBIG2BitmapPtr cxPtr5 = {nullptr, 0, 0}; - JBIG2BitmapPtr cxPtr6 = {nullptr, 0, 0}; - JBIG2BitmapPtr tpgrCXPtr0 = {nullptr, 0, 0}; - JBIG2BitmapPtr tpgrCXPtr1 = {nullptr, 0, 0}; - JBIG2BitmapPtr tpgrCXPtr2 = {nullptr, 0, 0}; - int x, y, pix; - - if (!refBitmap) { - return nullptr; - } - - bitmap = new JBIG2Bitmap(0, w, h); - if (!bitmap->isOk()) - { - delete bitmap; - return nullptr; - } - bitmap->clearToZero(); - - // set up the typical row context - if (templ) { - ltpCX = 0x008; - } else { - ltpCX = 0x0010; - } - - ltp = 0; - for (y = 0; y < h; ++y) { - - if (templ) { - - // set up the context - bitmap->getPixelPtr(0, y-1, &cxPtr0); - cx0 = bitmap->nextPixel(&cxPtr0); - bitmap->getPixelPtr(-1, y, &cxPtr1); - refBitmap->getPixelPtr(-refDX, y-1-refDY, &cxPtr2); - refBitmap->getPixelPtr(-1-refDX, y-refDY, &cxPtr3); - cx3 = refBitmap->nextPixel(&cxPtr3); - cx3 = (cx3 << 1) | refBitmap->nextPixel(&cxPtr3); - refBitmap->getPixelPtr(-refDX, y+1-refDY, &cxPtr4); - cx4 = refBitmap->nextPixel(&cxPtr4); - - // set up the typical prediction context - tpgrCX0 = tpgrCX1 = tpgrCX2 = 0; // make gcc happy - if (tpgrOn) { - refBitmap->getPixelPtr(-1-refDX, y-1-refDY, &tpgrCXPtr0); - tpgrCX0 = refBitmap->nextPixel(&tpgrCXPtr0); - tpgrCX0 = (tpgrCX0 << 1) | refBitmap->nextPixel(&tpgrCXPtr0); - tpgrCX0 = (tpgrCX0 << 1) | refBitmap->nextPixel(&tpgrCXPtr0); - refBitmap->getPixelPtr(-1-refDX, y-refDY, &tpgrCXPtr1); - tpgrCX1 = refBitmap->nextPixel(&tpgrCXPtr1); - tpgrCX1 = (tpgrCX1 << 1) | refBitmap->nextPixel(&tpgrCXPtr1); - tpgrCX1 = (tpgrCX1 << 1) | refBitmap->nextPixel(&tpgrCXPtr1); - refBitmap->getPixelPtr(-1-refDX, y+1-refDY, &tpgrCXPtr2); - tpgrCX2 = refBitmap->nextPixel(&tpgrCXPtr2); - tpgrCX2 = (tpgrCX2 << 1) | refBitmap->nextPixel(&tpgrCXPtr2); - tpgrCX2 = (tpgrCX2 << 1) | refBitmap->nextPixel(&tpgrCXPtr2); - } else { - tpgrCXPtr0.p = tpgrCXPtr1.p = tpgrCXPtr2.p = nullptr; // make gcc happy - tpgrCXPtr0.shift = tpgrCXPtr1.shift = tpgrCXPtr2.shift = 0; - tpgrCXPtr0.x = tpgrCXPtr1.x = tpgrCXPtr2.x = 0; - } - - for (x = 0; x < w; ++x) { - - // update the context - cx0 = ((cx0 << 1) | bitmap->nextPixel(&cxPtr0)) & 7; - cx3 = ((cx3 << 1) | refBitmap->nextPixel(&cxPtr3)) & 7; - cx4 = ((cx4 << 1) | refBitmap->nextPixel(&cxPtr4)) & 3; - - if (tpgrOn) { - // update the typical predictor context - tpgrCX0 = ((tpgrCX0 << 1) | refBitmap->nextPixel(&tpgrCXPtr0)) & 7; - tpgrCX1 = ((tpgrCX1 << 1) | refBitmap->nextPixel(&tpgrCXPtr1)) & 7; - tpgrCX2 = ((tpgrCX2 << 1) | refBitmap->nextPixel(&tpgrCXPtr2)) & 7; - - // check for a "typical" pixel - if (arithDecoder->decodeBit(ltpCX, refinementRegionStats)) { - ltp = !ltp; - } - if (tpgrCX0 == 0 && tpgrCX1 == 0 && tpgrCX2 == 0) { - bitmap->clearPixel(x, y); - continue; - } else if (tpgrCX0 == 7 && tpgrCX1 == 7 && tpgrCX2 == 7) { - bitmap->setPixel(x, y); - continue; - } - } - - // build the context - cx = (cx0 << 7) | (bitmap->nextPixel(&cxPtr1) << 6) | - (refBitmap->nextPixel(&cxPtr2) << 5) | - (cx3 << 2) | cx4; - - // decode the pixel - if ((pix = arithDecoder->decodeBit(cx, refinementRegionStats))) { - bitmap->setPixel(x, y); - } - } - - } else { - - // set up the context - bitmap->getPixelPtr(0, y-1, &cxPtr0); - cx0 = bitmap->nextPixel(&cxPtr0); - bitmap->getPixelPtr(-1, y, &cxPtr1); - refBitmap->getPixelPtr(-refDX, y-1-refDY, &cxPtr2); - cx2 = refBitmap->nextPixel(&cxPtr2); - refBitmap->getPixelPtr(-1-refDX, y-refDY, &cxPtr3); - cx3 = refBitmap->nextPixel(&cxPtr3); - cx3 = (cx3 << 1) | refBitmap->nextPixel(&cxPtr3); - refBitmap->getPixelPtr(-1-refDX, y+1-refDY, &cxPtr4); - cx4 = refBitmap->nextPixel(&cxPtr4); - cx4 = (cx4 << 1) | refBitmap->nextPixel(&cxPtr4); - bitmap->getPixelPtr(atx[0], y+aty[0], &cxPtr5); - refBitmap->getPixelPtr(atx[1]-refDX, y+aty[1]-refDY, &cxPtr6); - - // set up the typical prediction context - tpgrCX0 = tpgrCX1 = tpgrCX2 = 0; // make gcc happy - if (tpgrOn) { - refBitmap->getPixelPtr(-1-refDX, y-1-refDY, &tpgrCXPtr0); - tpgrCX0 = refBitmap->nextPixel(&tpgrCXPtr0); - tpgrCX0 = (tpgrCX0 << 1) | refBitmap->nextPixel(&tpgrCXPtr0); - tpgrCX0 = (tpgrCX0 << 1) | refBitmap->nextPixel(&tpgrCXPtr0); - refBitmap->getPixelPtr(-1-refDX, y-refDY, &tpgrCXPtr1); - tpgrCX1 = refBitmap->nextPixel(&tpgrCXPtr1); - tpgrCX1 = (tpgrCX1 << 1) | refBitmap->nextPixel(&tpgrCXPtr1); - tpgrCX1 = (tpgrCX1 << 1) | refBitmap->nextPixel(&tpgrCXPtr1); - refBitmap->getPixelPtr(-1-refDX, y+1-refDY, &tpgrCXPtr2); - tpgrCX2 = refBitmap->nextPixel(&tpgrCXPtr2); - tpgrCX2 = (tpgrCX2 << 1) | refBitmap->nextPixel(&tpgrCXPtr2); - tpgrCX2 = (tpgrCX2 << 1) | refBitmap->nextPixel(&tpgrCXPtr2); - } else { - tpgrCXPtr0.p = tpgrCXPtr1.p = tpgrCXPtr2.p = nullptr; // make gcc happy - tpgrCXPtr0.shift = tpgrCXPtr1.shift = tpgrCXPtr2.shift = 0; - tpgrCXPtr0.x = tpgrCXPtr1.x = tpgrCXPtr2.x = 0; - } - - for (x = 0; x < w; ++x) { - - // update the context - cx0 = ((cx0 << 1) | bitmap->nextPixel(&cxPtr0)) & 3; - cx2 = ((cx2 << 1) | refBitmap->nextPixel(&cxPtr2)) & 3; - cx3 = ((cx3 << 1) | refBitmap->nextPixel(&cxPtr3)) & 7; - cx4 = ((cx4 << 1) | refBitmap->nextPixel(&cxPtr4)) & 7; - - if (tpgrOn) { - // update the typical predictor context - tpgrCX0 = ((tpgrCX0 << 1) | refBitmap->nextPixel(&tpgrCXPtr0)) & 7; - tpgrCX1 = ((tpgrCX1 << 1) | refBitmap->nextPixel(&tpgrCXPtr1)) & 7; - tpgrCX2 = ((tpgrCX2 << 1) | refBitmap->nextPixel(&tpgrCXPtr2)) & 7; - - // check for a "typical" pixel - if (arithDecoder->decodeBit(ltpCX, refinementRegionStats)) { - ltp = !ltp; - } - if (tpgrCX0 == 0 && tpgrCX1 == 0 && tpgrCX2 == 0) { - bitmap->clearPixel(x, y); - continue; - } else if (tpgrCX0 == 7 && tpgrCX1 == 7 && tpgrCX2 == 7) { - bitmap->setPixel(x, y); - continue; - } - } - - // build the context - cx = (cx0 << 11) | (bitmap->nextPixel(&cxPtr1) << 10) | - (cx2 << 8) | (cx3 << 5) | (cx4 << 2) | - (bitmap->nextPixel(&cxPtr5) << 1) | - refBitmap->nextPixel(&cxPtr6); - - // decode the pixel - if ((pix = arithDecoder->decodeBit(cx, refinementRegionStats))) { - bitmap->setPixel(x, y); - } - } - } - } - - return bitmap; -} - -void JBIG2Stream::readPageInfoSeg(Guint length) { - Guint xRes, yRes, flags, striping; - - if (!readULong(&pageW) || !readULong(&pageH) || - !readULong(&xRes) || !readULong(&yRes) || - !readUByte(&flags) || !readUWord(&striping)) { - goto eofError; - } - pageDefPixel = (flags >> 2) & 1; - defCombOp = (flags >> 3) & 3; - - // allocate the page bitmap - if (pageH == 0xffffffff) { - curPageH = striping & 0x7fff; - } else { - curPageH = pageH; - } - delete pageBitmap; - pageBitmap = new JBIG2Bitmap(0, pageW, curPageH); - - if (!pageBitmap->isOk()) { - delete pageBitmap; - pageBitmap = nullptr; - return; - } - - // default pixel value - if (pageDefPixel) { - pageBitmap->clearToOne(); - } else { - pageBitmap->clearToZero(); - } - - return; - - eofError: - error(errSyntaxError, curStr->getPos(), "Unexpected EOF in JBIG2 stream"); -} - -void JBIG2Stream::readEndOfStripeSeg(Guint length) { - Guint i; - - // skip the segment - for (i = 0; i < length; ++i) { - if (curStr->getChar() == EOF) { - break; - } - } -} - -void JBIG2Stream::readProfilesSeg(Guint length) { - Guint i; - - // skip the segment - for (i = 0; i < length; ++i) { - if (curStr->getChar() == EOF) { - break; - } - } -} - -void JBIG2Stream::readCodeTableSeg(Guint segNum, Guint length) { - JBIG2HuffmanTable *huffTab; - Guint flags, oob, prefixBits, rangeBits; - int lowVal, highVal, val; - Guint huffTabSize, i; - - if (!readUByte(&flags) || !readLong(&lowVal) || !readLong(&highVal)) { - goto eofError; - } - oob = flags & 1; - prefixBits = ((flags >> 1) & 7) + 1; - rangeBits = ((flags >> 4) & 7) + 1; - - huffDecoder->reset(); - huffTabSize = 8; - huffTab = (JBIG2HuffmanTable *) - gmallocn(huffTabSize, sizeof(JBIG2HuffmanTable)); - i = 0; - val = lowVal; - while (val < highVal) { - if (i == huffTabSize) { - huffTabSize *= 2; - huffTab = (JBIG2HuffmanTable *) - greallocn(huffTab, huffTabSize, sizeof(JBIG2HuffmanTable)); - } - huffTab[i].val = val; - huffTab[i].prefixLen = huffDecoder->readBits(prefixBits); - huffTab[i].rangeLen = huffDecoder->readBits(rangeBits); - val += 1 << huffTab[i].rangeLen; - ++i; - } - if (i + oob + 3 > huffTabSize) { - huffTabSize = i + oob + 3; - huffTab = (JBIG2HuffmanTable *) - greallocn(huffTab, huffTabSize, sizeof(JBIG2HuffmanTable)); - } - huffTab[i].val = lowVal - 1; - huffTab[i].prefixLen = huffDecoder->readBits(prefixBits); - huffTab[i].rangeLen = jbig2HuffmanLOW; - ++i; - huffTab[i].val = highVal; - huffTab[i].prefixLen = huffDecoder->readBits(prefixBits); - huffTab[i].rangeLen = 32; - ++i; - if (oob) { - huffTab[i].val = 0; - huffTab[i].prefixLen = huffDecoder->readBits(prefixBits); - huffTab[i].rangeLen = jbig2HuffmanOOB; - ++i; - } - huffTab[i].val = 0; - huffTab[i].prefixLen = 0; - huffTab[i].rangeLen = jbig2HuffmanEOT; - huffDecoder->buildTable(huffTab, i); - - // create and store the new table segment - segments->append(new JBIG2CodeTable(segNum, huffTab)); - - return; - - eofError: - error(errSyntaxError, curStr->getPos(), "Unexpected EOF in JBIG2 stream"); -} - -void JBIG2Stream::readExtensionSeg(Guint length) { - Guint i; - - // skip the segment - for (i = 0; i < length; ++i) { - if (curStr->getChar() == EOF) { - break; - } - } -} - -JBIG2Segment *JBIG2Stream::findSegment(Guint segNum) { - JBIG2Segment *seg; - int i; - - for (i = 0; i < globalSegments->getLength(); ++i) { - seg = (JBIG2Segment *)globalSegments->get(i); - if (seg->getSegNum() == segNum) { - return seg; - } - } - for (i = 0; i < segments->getLength(); ++i) { - seg = (JBIG2Segment *)segments->get(i); - if (seg->getSegNum() == segNum) { - return seg; - } - } - return nullptr; -} - -void JBIG2Stream::discardSegment(Guint segNum) { - JBIG2Segment *seg; - int i; - - for (i = 0; i < globalSegments->getLength(); ++i) { - seg = (JBIG2Segment *)globalSegments->get(i); - if (seg->getSegNum() == segNum) { - globalSegments->del(i); - return; - } - } - for (i = 0; i < segments->getLength(); ++i) { - seg = (JBIG2Segment *)segments->get(i); - if (seg->getSegNum() == segNum) { - segments->del(i); - return; - } - } -} - -void JBIG2Stream::resetGenericStats(Guint templ, - JArithmeticDecoderStats *prevStats) { - int size; - - size = contextSize[templ]; - if (prevStats && prevStats->getContextSize() == size) { - if (genericRegionStats->getContextSize() == size) { - genericRegionStats->copyFrom(prevStats); - } else { - delete genericRegionStats; - genericRegionStats = prevStats->copy(); - } - } else { - if (genericRegionStats->getContextSize() == size) { - genericRegionStats->reset(); - } else { - delete genericRegionStats; - genericRegionStats = new JArithmeticDecoderStats(1 << size); - } - } -} - -void JBIG2Stream::resetRefinementStats(Guint templ, - JArithmeticDecoderStats *prevStats) { - int size; - - size = refContextSize[templ]; - if (prevStats && prevStats->getContextSize() == size) { - if (refinementRegionStats->getContextSize() == size) { - refinementRegionStats->copyFrom(prevStats); - } else { - delete refinementRegionStats; - refinementRegionStats = prevStats->copy(); - } - } else { - if (refinementRegionStats->getContextSize() == size) { - refinementRegionStats->reset(); - } else { - delete refinementRegionStats; - refinementRegionStats = new JArithmeticDecoderStats(1 << size); - } - } -} - -void JBIG2Stream::resetIntStats(int symCodeLen) { - iadhStats->reset(); - iadwStats->reset(); - iaexStats->reset(); - iaaiStats->reset(); - iadtStats->reset(); - iaitStats->reset(); - iafsStats->reset(); - iadsStats->reset(); - iardxStats->reset(); - iardyStats->reset(); - iardwStats->reset(); - iardhStats->reset(); - iariStats->reset(); - if (iaidStats->getContextSize() == 1 << (symCodeLen + 1)) { - iaidStats->reset(); - } else { - delete iaidStats; - iaidStats = new JArithmeticDecoderStats(1 << (symCodeLen + 1)); - } -} - -GBool JBIG2Stream::readUByte(Guint *x) { - int c0; - - if ((c0 = curStr->getChar()) == EOF) { - return gFalse; - } - *x = (Guint)c0; - return gTrue; -} - -GBool JBIG2Stream::readByte(int *x) { - int c0; - - if ((c0 = curStr->getChar()) == EOF) { - return gFalse; - } - *x = c0; - if (c0 & 0x80) { - *x |= -1 - 0xff; - } - return gTrue; -} - -GBool JBIG2Stream::readUWord(Guint *x) { - int c0, c1; - - if ((c0 = curStr->getChar()) == EOF || - (c1 = curStr->getChar()) == EOF) { - return gFalse; - } - *x = (Guint)((c0 << 8) | c1); - return gTrue; -} - -GBool JBIG2Stream::readULong(Guint *x) { - int c0, c1, c2, c3; - - if ((c0 = curStr->getChar()) == EOF || - (c1 = curStr->getChar()) == EOF || - (c2 = curStr->getChar()) == EOF || - (c3 = curStr->getChar()) == EOF) { - return gFalse; - } - *x = (Guint)((c0 << 24) | (c1 << 16) | (c2 << 8) | c3); - return gTrue; -} - -GBool JBIG2Stream::readLong(int *x) { - int c0, c1, c2, c3; - - if ((c0 = curStr->getChar()) == EOF || - (c1 = curStr->getChar()) == EOF || - (c2 = curStr->getChar()) == EOF || - (c3 = curStr->getChar()) == EOF) { - return gFalse; - } - *x = ((c0 << 24) | (c1 << 16) | (c2 << 8) | c3); - if (c0 & 0x80) { - *x |= -1 - (int)0xffffffff; - } - return gTrue; -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/JBIG2Stream.h b/Build/source/libs/poppler/poppler-src/poppler/JBIG2Stream.h deleted file mode 100644 index f28a7d2de06..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/JBIG2Stream.h +++ /dev/null @@ -1,169 +0,0 @@ -//======================================================================== -// -// JBIG2Stream.h -// -// Copyright 2002-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2009 David Benjamin <davidben@mit.edu> -// Copyright (C) 2013 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2015 Suzuki Toshiya <mpsuzuki@hiroshima-u.ac.jp> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef JBIG2STREAM_H -#define JBIG2STREAM_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "goo/gtypes.h" -#include "Object.h" -#include "Stream.h" - -class GooList; -class JBIG2Segment; -class JBIG2Bitmap; -class JArithmeticDecoder; -class JArithmeticDecoderStats; -class JBIG2HuffmanDecoder; -struct JBIG2HuffmanTable; -class JBIG2MMRDecoder; - -//------------------------------------------------------------------------ - -class JBIG2Stream: public FilterStream { -public: - - JBIG2Stream(Stream *strA, Object *globalsStreamA, Object *globalsStreamRefA); - ~JBIG2Stream(); - StreamKind getKind() override { return strJBIG2; } - void reset() override; - void close() override; - Goffset getPos() override; - int getChar() override; - int lookChar() override; - GooString *getPSFilter(int psLevel, const char *indent) override; - GBool isBinary(GBool last = gTrue) override; - virtual Object *getGlobalsStream() { return &globalsStream; } - virtual Ref getGlobalsStreamRef() { return globalsStreamRef; } - -private: - GBool hasGetChars() override { return true; } - int getChars(int nChars, Guchar *buffer) override; - - void readSegments(); - GBool readSymbolDictSeg(Guint segNum, Guint length, - Guint *refSegs, Guint nRefSegs); - void readTextRegionSeg(Guint segNum, GBool imm, - GBool lossless, Guint length, - Guint *refSegs, Guint nRefSegs); - JBIG2Bitmap *readTextRegion(GBool huff, GBool refine, - int w, int h, - Guint numInstances, - Guint logStrips, - int numSyms, - JBIG2HuffmanTable *symCodeTab, - Guint symCodeLen, - JBIG2Bitmap **syms, - Guint defPixel, Guint combOp, - Guint transposed, Guint refCorner, - int sOffset, - JBIG2HuffmanTable *huffFSTable, - JBIG2HuffmanTable *huffDSTable, - JBIG2HuffmanTable *huffDTTable, - JBIG2HuffmanTable *huffRDWTable, - JBIG2HuffmanTable *huffRDHTable, - JBIG2HuffmanTable *huffRDXTable, - JBIG2HuffmanTable *huffRDYTable, - JBIG2HuffmanTable *huffRSizeTable, - Guint templ, - int *atx, int *aty); - void readPatternDictSeg(Guint segNum, Guint length); - void readHalftoneRegionSeg(Guint segNum, GBool imm, - GBool lossless, Guint length, - Guint *refSegs, Guint nRefSegs); - void readGenericRegionSeg(Guint segNum, GBool imm, - GBool lossless, Guint length); - void mmrAddPixels(int a1, int blackPixels, - int *codingLine, int *a0i, int w); - void mmrAddPixelsNeg(int a1, int blackPixels, - int *codingLine, int *a0i, int w); - JBIG2Bitmap *readGenericBitmap(GBool mmr, int w, int h, - int templ, GBool tpgdOn, - GBool useSkip, JBIG2Bitmap *skip, - int *atx, int *aty, - int mmrDataLength); - void readGenericRefinementRegionSeg(Guint segNum, GBool imm, - GBool lossless, Guint length, - Guint *refSegs, - Guint nRefSegs); - JBIG2Bitmap *readGenericRefinementRegion(int w, int h, - int templ, GBool tpgrOn, - JBIG2Bitmap *refBitmap, - int refDX, int refDY, - int *atx, int *aty); - void readPageInfoSeg(Guint length); - void readEndOfStripeSeg(Guint length); - void readProfilesSeg(Guint length); - void readCodeTableSeg(Guint segNum, Guint length); - void readExtensionSeg(Guint length); - JBIG2Segment *findSegment(Guint segNum); - void discardSegment(Guint segNum); - void resetGenericStats(Guint templ, - JArithmeticDecoderStats *prevStats); - void resetRefinementStats(Guint templ, - JArithmeticDecoderStats *prevStats); - void resetIntStats(int symCodeLen); - GBool readUByte(Guint *x); - GBool readByte(int *x); - GBool readUWord(Guint *x); - GBool readULong(Guint *x); - GBool readLong(int *x); - - Object globalsStream; - Ref globalsStreamRef; - Guint pageW, pageH, curPageH; - Guint pageDefPixel; - JBIG2Bitmap *pageBitmap; - Guint defCombOp; - GooList *segments; // [JBIG2Segment] - GooList *globalSegments; // [JBIG2Segment] - Stream *curStr; - Guchar *dataPtr; - Guchar *dataEnd; - - JArithmeticDecoder *arithDecoder; - JArithmeticDecoderStats *genericRegionStats; - JArithmeticDecoderStats *refinementRegionStats; - JArithmeticDecoderStats *iadhStats; - JArithmeticDecoderStats *iadwStats; - JArithmeticDecoderStats *iaexStats; - JArithmeticDecoderStats *iaaiStats; - JArithmeticDecoderStats *iadtStats; - JArithmeticDecoderStats *iaitStats; - JArithmeticDecoderStats *iafsStats; - JArithmeticDecoderStats *iadsStats; - JArithmeticDecoderStats *iardxStats; - JArithmeticDecoderStats *iardyStats; - JArithmeticDecoderStats *iardwStats; - JArithmeticDecoderStats *iardhStats; - JArithmeticDecoderStats *iariStats; - JArithmeticDecoderStats *iaidStats; - JBIG2HuffmanDecoder *huffDecoder; - JBIG2MMRDecoder *mmrDecoder; -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/JPEG2000Stream.cc b/Build/source/libs/poppler/poppler-src/poppler/JPEG2000Stream.cc deleted file mode 100644 index cb88b26d601..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/JPEG2000Stream.cc +++ /dev/null @@ -1,365 +0,0 @@ -//======================================================================== -// -// JPEG2000Stream.cc -// -// A JPX stream decoder using OpenJPEG -// -// Copyright 2008-2010, 2012, 2017, 2018 Albert Astals Cid <aacid@kde.org> -// Copyright 2011 Daniel Glöckner <daniel-gl@gmx.net> -// Copyright 2014, 2016 Thomas Freitag <Thomas.Freitag@alfa.de> -// Copyright 2013, 2014 Adrian Johnson <ajohnson@redneon.com> -// Copyright 2015 Adam Reichold <adam.reichold@t-online.de> -// Copyright 2015 Jakub Wilk <jwilk@jwilk.net> -// -// Licensed under GPLv2 or later -// -//======================================================================== - -#include "config.h" -#include "JPEG2000Stream.h" -#include <openjpeg.h> - -#define OPENJPEG_VERSION_ENCODE(major, minor, micro) ( \ - ((major) * 10000) \ - + ((minor) * 100) \ - + ((micro) * 1)) - -#ifdef OPJ_VERSION_MAJOR -#define OPENJPEG_VERSION OPENJPEG_VERSION_ENCODE(OPJ_VERSION_MAJOR, OPJ_VERSION_MINOR, OPJ_VERSION_BUILD) -#else -// OpenJPEG started providing version macros in version 2.1. -// If the version macro is not found, set the version to 2.0.0 and -// assume there will be no API changes in 2.0.x. -#define OPENJPEG_VERSION OPENJPEG_VERSION_ENCODE(2, 0, 0) -#endif - -struct JPXStreamPrivate { - opj_image_t *image; - int counter; - int ccounter; - int npixels; - int ncomps; - GBool inited; - int smaskInData; - void init2(OPJ_CODEC_FORMAT format, unsigned char *data, int length, GBool indexed); -}; - -static inline Guchar adjustComp(int r, int adjust, int depth, int sgndcorr, GBool indexed) { - if (!indexed) { - r += sgndcorr; - if (adjust) { - r = (r >> adjust)+((r >> (adjust-1))%2); - } else if (depth < 8) { - r = r << (8 - depth); - } - } - if (unlikely(r > 255)) - r = 255; - return r; -} - -static inline int doLookChar(JPXStreamPrivate* priv) { - if (unlikely(priv->counter >= priv->npixels)) - return EOF; - - return ((unsigned char *)priv->image->comps[priv->ccounter].data)[priv->counter]; -} - -static inline int doGetChar(JPXStreamPrivate* priv) { - const int result = doLookChar(priv); - if (++priv->ccounter == priv->ncomps) { - priv->ccounter = 0; - ++priv->counter; - } - return result; -} - -JPXStream::JPXStream(Stream *strA) : FilterStream(strA) { - priv = new JPXStreamPrivate; - priv->inited = gFalse; - priv->image = nullptr; - priv->npixels = 0; - priv->ncomps = 0; -} - -JPXStream::~JPXStream() { - delete str; - close(); - delete priv; -} - -void JPXStream::reset() { - priv->counter = 0; - priv->ccounter = 0; -} - -void JPXStream::close() { - if (priv->image != nullptr) { - opj_image_destroy(priv->image); - priv->image = nullptr; - priv->npixels = 0; - } -} - -Goffset JPXStream::getPos() { - return priv->counter * priv->ncomps + priv->ccounter; -} - -int JPXStream::getChars(int nChars, Guchar *buffer) { - if (unlikely(priv->inited == gFalse)) { init(); } - - for (int i = 0; i < nChars; ++i) { - const int c = doGetChar(priv); - if (likely(c != EOF)) buffer[i] = c; - else return i; - } - return nChars; -} - -int JPXStream::getChar() { - if (unlikely(priv->inited == gFalse)) { init(); } - - return doGetChar(priv); -} - -int JPXStream::lookChar() { - if (unlikely(priv->inited == gFalse)) { init(); } - - return doLookChar(priv); -} - -GooString *JPXStream::getPSFilter(int psLevel, const char *indent) { - return nullptr; -} - -GBool JPXStream::isBinary(GBool last) { - return str->isBinary(gTrue); -} - -void JPXStream::getImageParams(int *bitsPerComponent, StreamColorSpaceMode *csMode) { - if (unlikely(priv->inited == gFalse)) { init(); } - - *bitsPerComponent = 8; - int numComps = (priv->image) ? priv->image->numcomps : 1; - if (priv->image) { - if (priv->image->color_space == OPJ_CLRSPC_SRGB && numComps == 4) { numComps = 3; } - else if (priv->image->color_space == OPJ_CLRSPC_SYCC && numComps == 4) { numComps = 3; } - else if (numComps == 2) { numComps = 1; } - else if (numComps > 4) { numComps = 4; } - } - if (numComps == 3) - *csMode = streamCSDeviceRGB; - else if (numComps == 4) - *csMode = streamCSDeviceCMYK; - else - *csMode = streamCSDeviceGray; -} - - -static void libopenjpeg_error_callback(const char *msg, void * /*client_data*/) { - error(errSyntaxError, -1, "{0:s}", msg); -} - -static void libopenjpeg_warning_callback(const char *msg, void * /*client_data*/) { - error(errSyntaxWarning, -1, "{0:s}", msg); -} - -typedef struct JPXData_s -{ - unsigned char *data; - int size; - int pos; -} JPXData; - -#define BUFFER_INITIAL_SIZE 4096 - -static OPJ_SIZE_T jpxRead_callback(void * p_buffer, OPJ_SIZE_T p_nb_bytes, void * p_user_data) -{ - JPXData *jpxData = (JPXData *)p_user_data; - int len; - - len = jpxData->size - jpxData->pos; - if (len < 0) - len = 0; - if (len == 0) - return (OPJ_SIZE_T)-1; /* End of file! */ - if ((OPJ_SIZE_T)len > p_nb_bytes) - len = p_nb_bytes; - memcpy(p_buffer, jpxData->data + jpxData->pos, len); - jpxData->pos += len; - return len; -} - -static OPJ_OFF_T jpxSkip_callback(OPJ_OFF_T skip, void * p_user_data) -{ - JPXData *jpxData = (JPXData *)p_user_data; - - jpxData->pos += (skip > jpxData->size - jpxData->pos) ? jpxData->size - jpxData->pos : skip; - /* Always return input value to avoid "Problem with skipping JPEG2000 box, stream error" */ - return skip; -} - -static OPJ_BOOL jpxSeek_callback(OPJ_OFF_T seek_pos, void * p_user_data) -{ - JPXData *jpxData = (JPXData *)p_user_data; - - if (seek_pos > jpxData->size) - return OPJ_FALSE; - jpxData->pos = seek_pos; - return OPJ_TRUE; -} - -void JPXStream::init() -{ - Object oLen, cspace, smaskInData; - if (getDict()) { - oLen = getDict()->lookup("Length"); - cspace = getDict()->lookup("ColorSpace"); - smaskInData = getDict()->lookup("SMaskInData"); - } - - int bufSize = BUFFER_INITIAL_SIZE; - if (oLen.isInt()) bufSize = oLen.getInt(); - - GBool indexed = gFalse; - if (cspace.isArray() && cspace.arrayGetLength() > 0) { - const Object cstype = cspace.arrayGet(0); - if (cstype.isName("Indexed")) indexed = gTrue; - } - - priv->smaskInData = 0; - if (smaskInData.isInt()) priv->smaskInData = smaskInData.getInt(); - - int length = 0; - unsigned char *buf = str->toUnsignedChars(&length, bufSize); - priv->init2(OPJ_CODEC_JP2, buf, length, indexed); - gfree(buf); - - if (priv->image) { - int numComps = (priv->image) ? priv->image->numcomps : 1; - int alpha = 0; - if (priv->image) { - if (priv->image->color_space == OPJ_CLRSPC_SRGB && numComps == 4) { numComps = 3; alpha = 1; } - else if (priv->image->color_space == OPJ_CLRSPC_SYCC && numComps == 4) { numComps = 3; alpha = 1; } - else if (numComps == 2) { numComps = 1; alpha = 1; } - else if (numComps > 4) { numComps = 4; alpha = 1; } - else { alpha = 0; } - } - priv->npixels = priv->image->comps[0].w * priv->image->comps[0].h; - priv->ncomps = priv->image->numcomps; - if (alpha == 1 && priv->smaskInData == 0) priv->ncomps--; - for (int component = 0; component < priv->ncomps; component++) { - if (priv->image->comps[component].data == nullptr) { - close(); - break; - } - unsigned char *cdata = (unsigned char *)priv->image->comps[component].data; - int adjust = 0; - int depth = priv->image->comps[component].prec; - if (priv->image->comps[component].prec > 8) - adjust = priv->image->comps[component].prec - 8; - int sgndcorr = 0; - if (priv->image->comps[component].sgnd) - sgndcorr = 1 << (priv->image->comps[0].prec - 1); - for (int i = 0; i < priv->npixels; i++) { - int r = priv->image->comps[component].data[i]; - *(cdata++) = adjustComp(r, adjust, depth, sgndcorr, indexed); - } - } - } else { - priv->npixels = 0; - } - - priv->counter = 0; - priv->ccounter = 0; - priv->inited = gTrue; -} - -void JPXStreamPrivate::init2(OPJ_CODEC_FORMAT format, unsigned char *buf, int length, GBool indexed) -{ - JPXData jpxData; - - jpxData.data = buf; - jpxData.pos = 0; - jpxData.size = length; - - opj_stream_t *stream; - - stream = opj_stream_default_create(OPJ_TRUE); - -#if OPENJPEG_VERSION >= OPENJPEG_VERSION_ENCODE(2, 1, 0) - opj_stream_set_user_data (stream, &jpxData, nullptr); -#else - opj_stream_set_user_data (stream, &jpxData); -#endif - - opj_stream_set_read_function(stream, jpxRead_callback); - opj_stream_set_skip_function(stream, jpxSkip_callback); - opj_stream_set_seek_function(stream, jpxSeek_callback); - /* Set the length to avoid an assert */ - opj_stream_set_user_data_length(stream, length); - - opj_codec_t *decoder; - - /* Use default decompression parameters */ - opj_dparameters_t parameters; - opj_set_default_decoder_parameters(¶meters); - if (indexed) - parameters.flags |= OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG; - - /* Get the decoder handle of the format */ - decoder = opj_create_decompress(format); - if (decoder == nullptr) { - error(errSyntaxWarning, -1, "Unable to create decoder"); - goto error; - } - - /* Catch events using our callbacks */ - opj_set_warning_handler(decoder, libopenjpeg_warning_callback, nullptr); - opj_set_error_handler(decoder, libopenjpeg_error_callback, nullptr); - - /* Setup the decoder decoding parameters */ - if (!opj_setup_decoder(decoder, ¶meters)) { - error(errSyntaxWarning, -1, "Unable to set decoder parameters"); - goto error; - } - - /* Decode the stream and fill the image structure */ - image = nullptr; - if (!opj_read_header(stream, decoder, &image)) { - error(errSyntaxWarning, -1, "Unable to read header"); - goto error; - } - - /* Optional if you want decode the entire image */ - if (!opj_set_decode_area(decoder, image, parameters.DA_x0, - parameters.DA_y0, parameters.DA_x1, parameters.DA_y1)){ - error(errSyntaxWarning, -1, "X2"); - goto error; - } - - /* Get the decoded image */ - if (!(opj_decode(decoder, stream, image) && opj_end_decompress(decoder, stream))) { - error(errSyntaxWarning, -1, "Unable to decode image"); - goto error; - } - - opj_destroy_codec(decoder); - opj_stream_destroy(stream); - - if (image != nullptr) - return; - -error: - opj_stream_destroy(stream); - opj_destroy_codec(decoder); - if (format == OPJ_CODEC_JP2) { - error(errSyntaxWarning, -1, "Did no succeed opening JPX Stream as JP2, trying as J2K."); - init2(OPJ_CODEC_J2K, buf, length, indexed); - } else if (format == OPJ_CODEC_J2K) { - error(errSyntaxWarning, -1, "Did no succeed opening JPX Stream as J2K, trying as JPT."); - init2(OPJ_CODEC_JPT, buf, length, indexed); - } else { - error(errSyntaxError, -1, "Did no succeed opening JPX Stream."); - } -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/JPEG2000Stream.h b/Build/source/libs/poppler/poppler-src/poppler/JPEG2000Stream.h deleted file mode 100644 index 1fb63f1df78..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/JPEG2000Stream.h +++ /dev/null @@ -1,55 +0,0 @@ -//======================================================================== -// -// JPEG2000Stream.h -// -// A JPX stream decoder using OpenJPEG -// -// Copyright 2008, 2010 Albert Astals Cid <aacid@kde.org> -// Copyright 2011 Daniel Glöckner <daniel-gl@gmx.net> -// Copyright 2013, 2014 Adrian Johnson <ajohnson@redneon.com> -// Copyright 2015 Adam Reichold <adam.reichold@t-online.de> -// -// Licensed under GPLv2 or later -// -//======================================================================== - - -#ifndef JPEG2000STREAM_H -#define JPEG2000STREAM_H - -#include "config.h" -#include "goo/gtypes.h" -#include "Object.h" -#include "Stream.h" - -struct JPXStreamPrivate; - -class JPXStream: public FilterStream { -public: - - JPXStream(Stream *strA); - ~JPXStream(); - StreamKind getKind() override { return strJPX; } - void reset() override; - void close() override; - Goffset getPos() override; - int getChar() override; - int lookChar() override; - GooString *getPSFilter(int psLevel, const char *indent) override; - GBool isBinary(GBool last = gTrue) override; - void getImageParams(int *bitsPerComponent, StreamColorSpaceMode *csMode) override; - - int readStream(int nChars, Guchar *buffer) { - return str->doGetChars(nChars, buffer); - } -private: - JPXStream(const JPXStream &other); - JPXStream& operator=(const JPXStream &other); - JPXStreamPrivate *priv; - - void init(); - GBool hasGetChars() override { return true; } - int getChars(int nChars, Guchar *buffer) override; -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/JPXStream.cc b/Build/source/libs/poppler/poppler-src/poppler/JPXStream.cc deleted file mode 100644 index 1476e6a0cfe..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/JPXStream.cc +++ /dev/null @@ -1,3478 +0,0 @@ -//======================================================================== -// -// JPXStream.cc -// -// Copyright 2002-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2008, 2012 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2012 Thomas Freitag <Thomas.Freitag@alfa.de> -// Copyright (C) 2012 Even Rouault <even.rouault@mines-paris.org> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include <config.h> - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include <limits.h> -#include "gmem.h" -#include "Error.h" -#include "JArithmeticDecoder.h" -#include "JPXStream.h" - -//~ to do: -// - precincts -// - ROI -// - progression order changes -// - packed packet headers -// - support for palettes, channel maps, etc. -// - make sure all needed JP2/JPX subboxes are parsed (readBoxes) -// - can we assume that QCC segments must come after the QCD segment? -// - handle tilePartToEOC in readTilePartData -// - progression orders 2, 3, and 4 -// - in coefficient decoding (readCodeBlockData): -// - selective arithmetic coding bypass -// (this also affects reading the cb->dataLen array) -// - coeffs longer than 31 bits (should just ignore the extra bits?) -// - handle boxes larger than 2^32 bytes -// - the fixed-point arithmetic won't handle 16-bit pixels - -//------------------------------------------------------------------------ - -// number of contexts for the arithmetic decoder -#define jpxNContexts 19 - -#define jpxContextSigProp 0 // 0 - 8: significance prop and cleanup -#define jpxContextSign 9 // 9 - 13: sign -#define jpxContextMagRef 14 // 14 -16: magnitude refinement -#define jpxContextRunLength 17 // cleanup: run length -#define jpxContextUniform 18 // cleanup: first signif coeff - -//------------------------------------------------------------------------ - -#define jpxPassSigProp 0 -#define jpxPassMagRef 1 -#define jpxPassCleanup 2 - -//------------------------------------------------------------------------ - -// arithmetic decoder context for the significance propagation and -// cleanup passes: -// [horiz][vert][diag][subband] -// where subband = 0 for HL -// = 1 for LH and LL -// = 2 for HH -static const Guint sigPropContext[3][3][5][3] = { - {{{ 0, 0, 0 }, // horiz=0, vert=0, diag=0 - { 1, 1, 3 }, // horiz=0, vert=0, diag=1 - { 2, 2, 6 }, // horiz=0, vert=0, diag=2 - { 2, 2, 8 }, // horiz=0, vert=0, diag=3 - { 2, 2, 8 }}, // horiz=0, vert=0, diag=4 - {{ 5, 3, 1 }, // horiz=0, vert=1, diag=0 - { 6, 3, 4 }, // horiz=0, vert=1, diag=1 - { 6, 3, 7 }, // horiz=0, vert=1, diag=2 - { 6, 3, 8 }, // horiz=0, vert=1, diag=3 - { 6, 3, 8 }}, // horiz=0, vert=1, diag=4 - {{ 8, 4, 2 }, // horiz=0, vert=2, diag=0 - { 8, 4, 5 }, // horiz=0, vert=2, diag=1 - { 8, 4, 7 }, // horiz=0, vert=2, diag=2 - { 8, 4, 8 }, // horiz=0, vert=2, diag=3 - { 8, 4, 8 }}}, // horiz=0, vert=2, diag=4 - {{{ 3, 5, 1 }, // horiz=1, vert=0, diag=0 - { 3, 6, 4 }, // horiz=1, vert=0, diag=1 - { 3, 6, 7 }, // horiz=1, vert=0, diag=2 - { 3, 6, 8 }, // horiz=1, vert=0, diag=3 - { 3, 6, 8 }}, // horiz=1, vert=0, diag=4 - {{ 7, 7, 2 }, // horiz=1, vert=1, diag=0 - { 7, 7, 5 }, // horiz=1, vert=1, diag=1 - { 7, 7, 7 }, // horiz=1, vert=1, diag=2 - { 7, 7, 8 }, // horiz=1, vert=1, diag=3 - { 7, 7, 8 }}, // horiz=1, vert=1, diag=4 - {{ 8, 7, 2 }, // horiz=1, vert=2, diag=0 - { 8, 7, 5 }, // horiz=1, vert=2, diag=1 - { 8, 7, 7 }, // horiz=1, vert=2, diag=2 - { 8, 7, 8 }, // horiz=1, vert=2, diag=3 - { 8, 7, 8 }}}, // horiz=1, vert=2, diag=4 - {{{ 4, 8, 2 }, // horiz=2, vert=0, diag=0 - { 4, 8, 5 }, // horiz=2, vert=0, diag=1 - { 4, 8, 7 }, // horiz=2, vert=0, diag=2 - { 4, 8, 8 }, // horiz=2, vert=0, diag=3 - { 4, 8, 8 }}, // horiz=2, vert=0, diag=4 - {{ 7, 8, 2 }, // horiz=2, vert=1, diag=0 - { 7, 8, 5 }, // horiz=2, vert=1, diag=1 - { 7, 8, 7 }, // horiz=2, vert=1, diag=2 - { 7, 8, 8 }, // horiz=2, vert=1, diag=3 - { 7, 8, 8 }}, // horiz=2, vert=1, diag=4 - {{ 8, 8, 2 }, // horiz=2, vert=2, diag=0 - { 8, 8, 5 }, // horiz=2, vert=2, diag=1 - { 8, 8, 7 }, // horiz=2, vert=2, diag=2 - { 8, 8, 8 }, // horiz=2, vert=2, diag=3 - { 8, 8, 8 }}} // horiz=2, vert=2, diag=4 -}; - -// arithmetic decoder context and xor bit for the sign bit in the -// significance propagation pass: -// [horiz][vert][k] -// where horiz/vert are offset by 2 (i.e., range is -2 .. 2) -// and k = 0 for the context -// = 1 for the xor bit -static const Guint signContext[5][5][2] = { - {{ 13, 1 }, // horiz=-2, vert=-2 - { 13, 1 }, // horiz=-2, vert=-1 - { 12, 1 }, // horiz=-2, vert= 0 - { 11, 1 }, // horiz=-2, vert=+1 - { 11, 1 }}, // horiz=-2, vert=+2 - {{ 13, 1 }, // horiz=-1, vert=-2 - { 13, 1 }, // horiz=-1, vert=-1 - { 12, 1 }, // horiz=-1, vert= 0 - { 11, 1 }, // horiz=-1, vert=+1 - { 11, 1 }}, // horiz=-1, vert=+2 - {{ 10, 1 }, // horiz= 0, vert=-2 - { 10, 1 }, // horiz= 0, vert=-1 - { 9, 0 }, // horiz= 0, vert= 0 - { 10, 0 }, // horiz= 0, vert=+1 - { 10, 0 }}, // horiz= 0, vert=+2 - {{ 11, 0 }, // horiz=+1, vert=-2 - { 11, 0 }, // horiz=+1, vert=-1 - { 12, 0 }, // horiz=+1, vert= 0 - { 13, 0 }, // horiz=+1, vert=+1 - { 13, 0 }}, // horiz=+1, vert=+2 - {{ 11, 0 }, // horiz=+2, vert=-2 - { 11, 0 }, // horiz=+2, vert=-1 - { 12, 0 }, // horiz=+2, vert= 0 - { 13, 0 }, // horiz=+2, vert=+1 - { 13, 0 }}, // horiz=+2, vert=+2 -}; - -//------------------------------------------------------------------------ - -// constants used in the IDWT -#define idwtAlpha -1.586134342059924 -#define idwtBeta -0.052980118572961 -#define idwtGamma 0.882911075530934 -#define idwtDelta 0.443506852043971 -#define idwtKappa 1.230174104914001 -#define idwtIKappa (1.0 / idwtKappa) - -// number of bits to the right of the decimal point for the fixed -// point arithmetic used in the IDWT -#define fracBits 16 - -//------------------------------------------------------------------------ - -// floor(x / y) -#define jpxFloorDiv(x, y) ((x) / (y)) - -// floor(x / 2^y) -#define jpxFloorDivPow2(x, y) ((x) >> (y)) - -// ceil(x / y) -#define jpxCeilDiv(x, y) (((x) + (y) - 1) / (y)) - -// ceil(x / 2^y) -#define jpxCeilDivPow2(x, y) (((x) + (1 << (y)) - 1) >> (y)) - -//------------------------------------------------------------------------ - -#if 1 //----- disable coverage tracking - -#define cover(idx) - -#else //----- enable coverage tracking - -class JPXCover { -public: - - JPXCover(int sizeA); - ~JPXCover(); - void incr(int idx); - -private: - - int size, used; - int *data; -}; - -JPXCover::JPXCover(int sizeA) { - size = sizeA; - used = -1; - data = (int *)gmallocn(size, sizeof(int)); - memset(data, 0, size * sizeof(int)); -} - -JPXCover::~JPXCover() { - int i; - - printf("JPX coverage:\n"); - for (i = 0; i <= used; ++i) { - printf(" %4d: %8d\n", i, data[i]); - } - gfree(data); -} - -void JPXCover::incr(int idx) { - if (idx < size) { - ++data[idx]; - if (idx > used) { - used = idx; - } - } -} - -JPXCover jpxCover(150); - -#define cover(idx) jpxCover.incr(idx) - -#endif //----- coverage tracking - -//------------------------------------------------------------------------ - -JPXStream::JPXStream(Stream *strA): - FilterStream(strA) -{ - bufStr = new BufStream(str, 2); - - nComps = 0; - bpc = NULL; - width = height = 0; - haveCS = gFalse; - havePalette = gFalse; - haveCompMap = gFalse; - haveChannelDefn = gFalse; - - img.tiles = NULL; - bitBuf = 0; - bitBufLen = 0; - bitBufSkip = gFalse; - byteCount = 0; - - curX = curY = 0; - curComp = 0; - readBufLen = 0; -} - -JPXStream::~JPXStream() { - close(); - delete bufStr; -} - -void JPXStream::reset() { - bufStr->reset(); - if (readBoxes()) { - curY = img.yOffset; - } else { - // readBoxes reported an error, so we go immediately to EOF - curY = img.ySize; - } - curX = img.xOffset; - curComp = 0; - readBufLen = 0; -} - -void JPXStream::close() { - JPXTile *tile; - JPXTileComp *tileComp; - JPXResLevel *resLevel; - JPXPrecinct *precinct; - JPXSubband *subband; - JPXCodeBlock *cb; - Guint comp, i, k, r, pre, sb; - - gfree(bpc); - bpc = NULL; - if (havePalette) { - gfree(palette.bpc); - gfree(palette.c); - havePalette = gFalse; - } - if (haveCompMap) { - gfree(compMap.comp); - gfree(compMap.type); - gfree(compMap.pComp); - haveCompMap = gFalse; - } - if (haveChannelDefn) { - gfree(channelDefn.idx); - gfree(channelDefn.type); - gfree(channelDefn.assoc); - haveChannelDefn = gFalse; - } - - if (img.tiles) { - for (i = 0; i < img.nXTiles * img.nYTiles; ++i) { - tile = &img.tiles[i]; - if (tile->tileComps) { - for (comp = 0; comp < img.nComps; ++comp) { - tileComp = &tile->tileComps[comp]; - gfree(tileComp->quantSteps); - gfree(tileComp->data); - gfree(tileComp->buf); - if (tileComp->resLevels) { - for (r = 0; r <= tileComp->nDecompLevels; ++r) { - resLevel = &tileComp->resLevels[r]; - if (resLevel->precincts) { - for (pre = 0; pre < 1; ++pre) { - precinct = &resLevel->precincts[pre]; - if (precinct->subbands) { - for (sb = 0; sb < (Guint)(r == 0 ? 1 : 3); ++sb) { - subband = &precinct->subbands[sb]; - gfree(subband->inclusion); - gfree(subband->zeroBitPlane); - if (subband->cbs) { - for (k = 0; k < subband->nXCBs * subband->nYCBs; ++k) { - cb = &subband->cbs[k]; - gfree(cb->dataLen); - gfree(cb->touched); - if (cb->arithDecoder) { - delete cb->arithDecoder; - } - if (cb->stats) { - delete cb->stats; - } - } - gfree(subband->cbs); - } - } - gfree(precinct->subbands); - } - } - gfree(img.tiles[i].tileComps[comp].resLevels[r].precincts); - } - } - gfree(img.tiles[i].tileComps[comp].resLevels); - } - } - gfree(img.tiles[i].tileComps); - } - } - gfree(img.tiles); - img.tiles = NULL; - } - bufStr->close(); -} - -int JPXStream::getChar() { - int c; - - if (readBufLen < 8) { - fillReadBuf(); - } - if (readBufLen == 8) { - c = readBuf & 0xff; - readBufLen = 0; - } else if (readBufLen > 8) { - c = (readBuf >> (readBufLen - 8)) & 0xff; - readBufLen -= 8; - } else if (readBufLen == 0) { - c = EOF; - } else { - c = (readBuf << (8 - readBufLen)) & 0xff; - readBufLen = 0; - } - return c; -} - -int JPXStream::lookChar() { - int c; - - if (readBufLen < 8) { - fillReadBuf(); - } - if (readBufLen == 8) { - c = readBuf & 0xff; - } else if (readBufLen > 8) { - c = (readBuf >> (readBufLen - 8)) & 0xff; - } else if (readBufLen == 0) { - c = EOF; - } else { - c = (readBuf << (8 - readBufLen)) & 0xff; - } - return c; -} - -void JPXStream::fillReadBuf() { - JPXTileComp *tileComp; - Guint tileIdx, tx, ty; - int pix, pixBits; - - do { - if (curY >= img.ySize) { - return; - } - tileIdx = ((curY - img.yTileOffset) / img.yTileSize) * img.nXTiles - + (curX - img.xTileOffset) / img.xTileSize; -#if 1 //~ ignore the palette, assume the PDF ColorSpace object is valid - if (img.tiles == NULL || tileIdx >= img.nXTiles * img.nYTiles || img.tiles[tileIdx].tileComps == NULL) { - error(errSyntaxError, getPos(), "Unexpected tileIdx in fillReadBuf in JPX stream"); - return; - } - tileComp = &img.tiles[tileIdx].tileComps[curComp]; -#else - tileComp = &img.tiles[tileIdx].tileComps[havePalette ? 0 : curComp]; -#endif - tx = jpxCeilDiv((curX - img.xTileOffset) % img.xTileSize, tileComp->hSep); - ty = jpxCeilDiv((curY - img.yTileOffset) % img.yTileSize, tileComp->vSep); - if (unlikely(ty >= (tileComp->y1 - tileComp->y0))) { - error(errSyntaxError, getPos(), "Unexpected ty in fillReadBuf in JPX stream"); - return; - } - if (unlikely(tx >= (tileComp->x1 - tileComp->x0))) { - error(errSyntaxError, getPos(), "Unexpected tx in fillReadBuf in JPX stream"); - return; - } - pix = (int)tileComp->data[ty * (tileComp->x1 - tileComp->x0) + tx]; - pixBits = tileComp->prec; -#if 1 //~ ignore the palette, assume the PDF ColorSpace object is valid - if (++curComp == img.nComps) { -#else - if (havePalette) { - if (pix >= 0 && pix < palette.nEntries) { - pix = palette.c[pix * palette.nComps + curComp]; - } else { - pix = 0; - } - pixBits = palette.bpc[curComp]; - } - if (++curComp == (Guint)(havePalette ? palette.nComps : img.nComps)) { -#endif - curComp = 0; - if (++curX == img.xSize) { - curX = img.xOffset; - ++curY; - if (pixBits < 8) { - pix <<= 8 - pixBits; - pixBits = 8; - } - } - } - if (pixBits == 8) { - readBuf = (readBuf << 8) | (pix & 0xff); - } else { - readBuf = (readBuf << pixBits) | (pix & ((1 << pixBits) - 1)); - } - readBufLen += pixBits; - } while (readBufLen < 8); -} - -GooString *JPXStream::getPSFilter(int psLevel, const char *indent) { - return NULL; -} - -GBool JPXStream::isBinary(GBool last) { - return str->isBinary(gTrue); -} - -void JPXStream::getImageParams(int *bitsPerComponent, - StreamColorSpaceMode *csMode) { - Guint boxType, boxLen, dataLen, csEnum; - Guint bpc1, dummy, i; - int csMeth, csPrec, csPrec1, dummy2; - StreamColorSpaceMode csMode1; - GBool haveBPC, haveCSMode; - - csPrec = 0; // make gcc happy - haveBPC = haveCSMode = gFalse; - bufStr->reset(); - if (bufStr->lookChar() == 0xff) { - getImageParams2(bitsPerComponent, csMode); - } else { - while (readBoxHdr(&boxType, &boxLen, &dataLen)) { - if (boxType == 0x6a703268) { // JP2 header - cover(0); - // skip the superbox - } else if (boxType == 0x69686472) { // image header - cover(1); - if (readULong(&dummy) && - readULong(&dummy) && - readUWord(&dummy) && - readUByte(&bpc1) && - readUByte(&dummy) && - readUByte(&dummy) && - readUByte(&dummy)) { - *bitsPerComponent = bpc1 + 1; - haveBPC = gTrue; - } - } else if (boxType == 0x636F6C72) { // color specification - cover(2); - if (readByte(&csMeth) && - readByte(&csPrec1) && - readByte(&dummy2)) { - if (csMeth == 1) { - if (readULong(&csEnum)) { - csMode1 = streamCSNone; - if (csEnum == jpxCSBiLevel || - csEnum == jpxCSGrayscale) { - csMode1 = streamCSDeviceGray; - } else if (csEnum == jpxCSCMYK) { - csMode1 = streamCSDeviceCMYK; - } else if (csEnum == jpxCSsRGB || - csEnum == jpxCSCISesRGB || - csEnum == jpxCSROMMRGB) { - csMode1 = streamCSDeviceRGB; - } - if (csMode1 != streamCSNone && - (!haveCSMode || csPrec1 > csPrec)) { - *csMode = csMode1; - csPrec = csPrec1; - haveCSMode = gTrue; - } - if( dataLen >= 7 ) { - for (i = 0; i < dataLen - 7; ++i) { - if (bufStr->getChar() == EOF) - break; - } - } - } - } else { - if( dataLen >= 3 ) { - for (i = 0; i < dataLen - 3; ++i) { - if (bufStr->getChar() == EOF) - break; - } - } - } - } - } else if (boxType == 0x6A703263) { // codestream - cover(3); - if (!(haveBPC && haveCSMode)) { - getImageParams2(bitsPerComponent, csMode); - } - break; - } else { - cover(4); - for (i = 0; i < dataLen; ++i) { - if (unlikely(bufStr->getChar() == EOF)) { - error(errSyntaxError, getPos(), "Unexpected EOF in getImageParams in JPX stream"); - break; - } - } - } - } - } - bufStr->close(); -} - -// Get image parameters from the codestream. -void JPXStream::getImageParams2(int *bitsPerComponent, - StreamColorSpaceMode *csMode) { - int segType; - Guint segLen, nComps1, bpc1, dummy, i; - - while (readMarkerHdr(&segType, &segLen)) { - if (segType == 0x51) { // SIZ - image and tile size - cover(5); - if (readUWord(&dummy) && - readULong(&dummy) && - readULong(&dummy) && - readULong(&dummy) && - readULong(&dummy) && - readULong(&dummy) && - readULong(&dummy) && - readULong(&dummy) && - readULong(&dummy) && - readUWord(&nComps1) && - readUByte(&bpc1)) { - *bitsPerComponent = (bpc1 & 0x7f) + 1; - // if there's no color space info, take a guess - if (nComps1 == 1) { - *csMode = streamCSDeviceGray; - } else if (nComps1 == 3) { - *csMode = streamCSDeviceRGB; - } else if (nComps1 == 4) { - *csMode = streamCSDeviceCMYK; - } - } - break; - } else { - cover(6); - if (segLen > 2) { - for (i = 0; i < segLen - 2; ++i) { - bufStr->getChar(); - } - } - } - } -} - -GBool JPXStream::readBoxes() { - Guint boxType, boxLen, dataLen; - Guint bpc1, compression, unknownColorspace, ipr; - Guint i, j; - - haveImgHdr = gFalse; - - // initialize in case there is a parse error - img.xSize = img.ySize = 0; - img.xOffset = img.yOffset = 0; - img.xTileSize = img.yTileSize = 0; - img.xTileOffset = img.yTileOffset = 0; - img.nComps = 0; - - // check for a naked JPEG 2000 codestream (without the JP2/JPX - // wrapper) -- this appears to be a violation of the PDF spec, but - // Acrobat allows it - if (bufStr->lookChar() == 0xff) { - cover(7); - error(errSyntaxWarning, getPos(), - "Naked JPEG 2000 codestream, missing JP2/JPX wrapper"); - if (!readCodestream(0)) { - return gFalse; - } - nComps = img.nComps; - bpc = (Guint *)gmallocn(nComps, sizeof(Guint)); - for (i = 0; i < nComps; ++i) { - bpc[i] = img.tiles[0].tileComps[i].prec; - } - width = img.xSize - img.xOffset; - height = img.ySize - img.yOffset; - return gTrue; - } - - while (readBoxHdr(&boxType, &boxLen, &dataLen)) { - switch (boxType) { - case 0x6a703268: // JP2 header - // this is a grouping box ('superbox') which has no real - // contents and doesn't appear to be used consistently, i.e., - // some things which should be subboxes of the JP2 header box - // show up outside of it - so we simply ignore the JP2 header - // box - cover(8); - break; - case 0x69686472: // image header - cover(9); - if (!readULong(&height) || - !readULong(&width) || - !readUWord(&nComps) || - !readUByte(&bpc1) || - !readUByte(&compression) || - !readUByte(&unknownColorspace) || - !readUByte(&ipr)) { - error(errSyntaxError, getPos(), "Unexpected EOF in JPX stream"); - return gFalse; - } - if (compression != 7) { - error(errSyntaxError, getPos(), - "Unknown compression type in JPX stream"); - return gFalse; - } - bpc = (Guint *)gmallocn(nComps, sizeof(Guint)); - for (i = 0; i < nComps; ++i) { - bpc[i] = bpc1; - } - haveImgHdr = gTrue; - break; - case 0x62706363: // bits per component - cover(10); - if (!haveImgHdr) { - error(errSyntaxError, getPos(), - "Found bits per component box before image header box in JPX stream"); - return gFalse; - } - if (dataLen != nComps) { - error(errSyntaxError, getPos(), - "Invalid bits per component box in JPX stream"); - return gFalse; - } - for (i = 0; i < nComps; ++i) { - if (!readUByte(&bpc[i])) { - error(errSyntaxError, getPos(), "Unexpected EOF in JPX stream"); - return gFalse; - } - } - break; - case 0x636F6C72: // color specification - cover(11); - if (!readColorSpecBox(dataLen)) { - return gFalse; - } - break; - case 0x70636c72: // palette - cover(12); - if (!readUWord(&palette.nEntries) || - !readUByte(&palette.nComps)) { - error(errSyntaxError, getPos(), "Unexpected EOF in JPX stream"); - return gFalse; - } - palette.bpc = (Guint *)gmallocn(palette.nComps, sizeof(Guint)); - palette.c = - (int *)gmallocn(palette.nEntries * palette.nComps, sizeof(int)); - for (i = 0; i < palette.nComps; ++i) { - if (!readUByte(&palette.bpc[i])) { - error(errSyntaxError, getPos(), "Unexpected EOF in JPX stream"); - return gFalse; - } - ++palette.bpc[i]; - } - for (i = 0; i < palette.nEntries; ++i) { - for (j = 0; j < palette.nComps; ++j) { - if (!readNBytes(((palette.bpc[j] & 0x7f) + 7) >> 3, - (palette.bpc[j] & 0x80) ? gTrue : gFalse, - &palette.c[i * palette.nComps + j])) { - error(errSyntaxError, getPos(), "Unexpected EOF in JPX stream"); - return gFalse; - } - } - } - havePalette = gTrue; - break; - case 0x636d6170: // component mapping - cover(13); - compMap.nChannels = dataLen / 4; - compMap.comp = (Guint *)gmallocn(compMap.nChannels, sizeof(Guint)); - compMap.type = (Guint *)gmallocn(compMap.nChannels, sizeof(Guint)); - compMap.pComp = (Guint *)gmallocn(compMap.nChannels, sizeof(Guint)); - for (i = 0; i < compMap.nChannels; ++i) { - if (!readUWord(&compMap.comp[i]) || - !readUByte(&compMap.type[i]) || - !readUByte(&compMap.pComp[i])) { - error(errSyntaxError, getPos(), "Unexpected EOF in JPX stream"); - return gFalse; - } - } - haveCompMap = gTrue; - break; - case 0x63646566: // channel definition - cover(14); - if (!readUWord(&channelDefn.nChannels)) { - error(errSyntaxError, getPos(), "Unexpected EOF in JPX stream"); - return gFalse; - } - channelDefn.idx = - (Guint *)gmallocn(channelDefn.nChannels, sizeof(Guint)); - channelDefn.type = - (Guint *)gmallocn(channelDefn.nChannels, sizeof(Guint)); - channelDefn.assoc = - (Guint *)gmallocn(channelDefn.nChannels, sizeof(Guint)); - for (i = 0; i < channelDefn.nChannels; ++i) { - if (!readUWord(&channelDefn.idx[i]) || - !readUWord(&channelDefn.type[i]) || - !readUWord(&channelDefn.assoc[i])) { - error(errSyntaxError, getPos(), "Unexpected EOF in JPX stream"); - return gFalse; - } - } - haveChannelDefn = gTrue; - break; - case 0x6A703263: // contiguous codestream - cover(15); - if (!bpc) { - error(errSyntaxError, getPos(), - "JPX stream is missing the image header box"); - } - if (!haveCS) { - error(errSyntaxError, getPos(), - "JPX stream has no supported color spec"); - } - if (!readCodestream(dataLen)) { - return gFalse; - } - break; - default: - cover(16); - for (i = 0; i < dataLen; ++i) { - if (bufStr->getChar() == EOF) { - error(errSyntaxError, getPos(), "Unexpected EOF in JPX stream"); - return gFalse; - } - } - break; - } - } - return gTrue; -} - -GBool JPXStream::readColorSpecBox(Guint dataLen) { - JPXColorSpec newCS; - Guint csApprox, csEnum; - Guint i; - GBool ok; - - ok = gFalse; - if (!readUByte(&newCS.meth) || - !readByte(&newCS.prec) || - !readUByte(&csApprox)) { - goto err; - } - switch (newCS.meth) { - case 1: // enumerated colorspace - cover(17); - if (!readULong(&csEnum)) { - goto err; - } - newCS.enumerated.type = (JPXColorSpaceType)csEnum; - switch (newCS.enumerated.type) { - case jpxCSBiLevel: - ok = gTrue; - break; - case jpxCSYCbCr1: - ok = gTrue; - break; - case jpxCSYCbCr2: - ok = gTrue; - break; - case jpxCSYCBCr3: - ok = gTrue; - break; - case jpxCSPhotoYCC: - ok = gTrue; - break; - case jpxCSCMY: - ok = gTrue; - break; - case jpxCSCMYK: - ok = gTrue; - break; - case jpxCSYCCK: - ok = gTrue; - break; - case jpxCSCIELab: - if (dataLen == 7 + 7*4) { - if (!readULong(&newCS.enumerated.cieLab.rl) || - !readULong(&newCS.enumerated.cieLab.ol) || - !readULong(&newCS.enumerated.cieLab.ra) || - !readULong(&newCS.enumerated.cieLab.oa) || - !readULong(&newCS.enumerated.cieLab.rb) || - !readULong(&newCS.enumerated.cieLab.ob) || - !readULong(&newCS.enumerated.cieLab.il)) { - goto err; - } - } else if (dataLen == 7) { - //~ this assumes the 8-bit case - cover(92); - newCS.enumerated.cieLab.rl = 100; - newCS.enumerated.cieLab.ol = 0; - newCS.enumerated.cieLab.ra = 255; - newCS.enumerated.cieLab.oa = 128; - newCS.enumerated.cieLab.rb = 255; - newCS.enumerated.cieLab.ob = 96; - newCS.enumerated.cieLab.il = 0x00443530; - } else { - goto err; - } - ok = gTrue; - break; - case jpxCSsRGB: - ok = gTrue; - break; - case jpxCSGrayscale: - ok = gTrue; - break; - case jpxCSBiLevel2: - ok = gTrue; - break; - case jpxCSCIEJab: - // not allowed in PDF - goto err; - case jpxCSCISesRGB: - ok = gTrue; - break; - case jpxCSROMMRGB: - ok = gTrue; - break; - case jpxCSsRGBYCbCr: - ok = gTrue; - break; - case jpxCSYPbPr1125: - ok = gTrue; - break; - case jpxCSYPbPr1250: - ok = gTrue; - break; - default: - goto err; - } - break; - case 2: // restricted ICC profile - case 3: // any ICC profile (JPX) - case 4: // vendor color (JPX) - cover(18); - for (i = 0; i < dataLen - 3; ++i) { - if (bufStr->getChar() == EOF) { - goto err; - } - } - break; - } - - if (ok && (!haveCS || newCS.prec > cs.prec)) { - cs = newCS; - haveCS = gTrue; - } - - return gTrue; - - err: - error(errSyntaxError, getPos(), "Error in JPX color spec"); - return gFalse; -} - -GBool JPXStream::readCodestream(Guint len) { - JPXTile *tile; - JPXTileComp *tileComp; - int segType; - GBool haveSIZ, haveCOD, haveQCD, haveSOT; - Guint precinctSize, style, nDecompLevels; - Guint segLen, capabilities, comp, i, j, r; - - //----- main header - haveSIZ = haveCOD = haveQCD = haveSOT = gFalse; - do { - if (!readMarkerHdr(&segType, &segLen)) { - error(errSyntaxError, getPos(), "Error in JPX codestream"); - return gFalse; - } - switch (segType) { - case 0x4f: // SOC - start of codestream - // marker only - cover(19); - break; - case 0x51: // SIZ - image and tile size - cover(20); - if (haveSIZ) { - error(errSyntaxError, getPos(), - "Duplicate SIZ marker segment in JPX stream"); - return gFalse; - } - if (!readUWord(&capabilities) || - !readULong(&img.xSize) || - !readULong(&img.ySize) || - !readULong(&img.xOffset) || - !readULong(&img.yOffset) || - !readULong(&img.xTileSize) || - !readULong(&img.yTileSize) || - !readULong(&img.xTileOffset) || - !readULong(&img.yTileOffset) || - !readUWord(&img.nComps)) { - error(errSyntaxError, getPos(), "Error in JPX SIZ marker segment"); - return gFalse; - } - if (haveImgHdr && img.nComps != nComps) { - error(errSyntaxError, getPos(), - "Different number of components in JPX SIZ marker segment"); - return gFalse; - } - if (img.xSize == 0 || img.ySize == 0 || - img.xOffset >= img.xSize || img.yOffset >= img.ySize || - img.xTileSize == 0 || img.yTileSize == 0 || - img.xTileOffset > img.xOffset || - img.yTileOffset > img.yOffset || - img.xTileSize + img.xTileOffset <= img.xOffset || - img.yTileSize + img.yTileOffset <= img.yOffset) { - error(errSyntaxError, getPos(), "Error in JPX SIZ marker segment"); - return gFalse; - } - img.nXTiles = (img.xSize - img.xTileOffset + img.xTileSize - 1) - / img.xTileSize; - img.nYTiles = (img.ySize - img.yTileOffset + img.yTileSize - 1) - / img.yTileSize; - // check for overflow before allocating memory - if (img.nXTiles <= 0 || img.nYTiles <= 0 || - img.nXTiles >= 65535 / img.nYTiles) { - error(errSyntaxError, getPos(), - "Bad tile count in JPX SIZ marker segment"); - return gFalse; - } - img.tiles = (JPXTile *)gmallocn(img.nXTiles * img.nYTiles, - sizeof(JPXTile)); - for (i = 0; i < img.nXTiles * img.nYTiles; ++i) { - img.tiles[i].init = gFalse; - img.tiles[i].tileComps = (JPXTileComp *)gmallocn(img.nComps, - sizeof(JPXTileComp)); - for (comp = 0; comp < img.nComps; ++comp) { - img.tiles[i].tileComps[comp].quantSteps = NULL; - img.tiles[i].tileComps[comp].data = NULL; - img.tiles[i].tileComps[comp].buf = NULL; - img.tiles[i].tileComps[comp].resLevels = NULL; - } - } - for (comp = 0; comp < img.nComps; ++comp) { - if (!readUByte(&img.tiles[0].tileComps[comp].prec) || - !readUByte(&img.tiles[0].tileComps[comp].hSep) || - !readUByte(&img.tiles[0].tileComps[comp].vSep)) { - error(errSyntaxError, getPos(), "Error in JPX SIZ marker segment"); - return gFalse; - } - if (img.tiles[0].tileComps[comp].hSep == 0 || - img.tiles[0].tileComps[comp].vSep == 0) { - error(errSyntaxError, getPos(), "Error in JPX SIZ marker segment"); - return gFalse; - } - img.tiles[0].tileComps[comp].sgned = - (img.tiles[0].tileComps[comp].prec & 0x80) ? gTrue : gFalse; - img.tiles[0].tileComps[comp].prec = - (img.tiles[0].tileComps[comp].prec & 0x7f) + 1; - for (i = 1; i < img.nXTiles * img.nYTiles; ++i) { - img.tiles[i].tileComps[comp] = img.tiles[0].tileComps[comp]; - } - } - haveSIZ = gTrue; - break; - case 0x52: // COD - coding style default - cover(21); - if (!haveSIZ) { - error(errSyntaxError, getPos(), - "JPX COD marker segment before SIZ segment"); - return gFalse; - } - if (img.tiles == NULL || img.nXTiles * img.nYTiles == 0 || img.tiles[0].tileComps == NULL) { - error(errSyntaxError, getPos(), "Error in JPX COD marker segment"); - return gFalse; - } - if (!readUByte(&img.tiles[0].tileComps[0].style) || - !readUByte(&img.tiles[0].progOrder) || - !readUWord(&img.tiles[0].nLayers) || - !readUByte(&img.tiles[0].multiComp) || - !readUByte(&nDecompLevels) || - !readUByte(&img.tiles[0].tileComps[0].codeBlockW) || - !readUByte(&img.tiles[0].tileComps[0].codeBlockH) || - !readUByte(&img.tiles[0].tileComps[0].codeBlockStyle) || - !readUByte(&img.tiles[0].tileComps[0].transform)) { - error(errSyntaxError, getPos(), "Error in JPX COD marker segment"); - return gFalse; - } - if (nDecompLevels > 32 || - img.tiles[0].tileComps[0].codeBlockW > 8 || - img.tiles[0].tileComps[0].codeBlockH > 8) { - error(errSyntaxError, getPos(), "Error in JPX COD marker segment"); - return gFalse; - } - img.tiles[0].tileComps[0].nDecompLevels = nDecompLevels; - img.tiles[0].tileComps[0].codeBlockW += 2; - img.tiles[0].tileComps[0].codeBlockH += 2; - for (i = 0; i < img.nXTiles * img.nYTiles; ++i) { - if (i != 0) { - img.tiles[i].progOrder = img.tiles[0].progOrder; - img.tiles[i].nLayers = img.tiles[0].nLayers; - img.tiles[i].multiComp = img.tiles[0].multiComp; - } - for (comp = 0; comp < img.nComps; ++comp) { - if (!(i == 0 && comp == 0)) { - img.tiles[i].tileComps[comp].style = - img.tiles[0].tileComps[0].style; - img.tiles[i].tileComps[comp].nDecompLevels = - img.tiles[0].tileComps[0].nDecompLevels; - img.tiles[i].tileComps[comp].codeBlockW = - img.tiles[0].tileComps[0].codeBlockW; - img.tiles[i].tileComps[comp].codeBlockH = - img.tiles[0].tileComps[0].codeBlockH; - img.tiles[i].tileComps[comp].codeBlockStyle = - img.tiles[0].tileComps[0].codeBlockStyle; - img.tiles[i].tileComps[comp].transform = - img.tiles[0].tileComps[0].transform; - } - img.tiles[i].tileComps[comp].resLevels = - (JPXResLevel *)gmallocn_checkoverflow( - (img.tiles[i].tileComps[comp].nDecompLevels + 1), - sizeof(JPXResLevel)); - if (img.tiles[i].tileComps[comp].resLevels == NULL) { - error(errSyntaxError, getPos(), "Error in JPX COD marker segment"); - return gFalse; - } - for (r = 0; r <= img.tiles[i].tileComps[comp].nDecompLevels; ++r) { - img.tiles[i].tileComps[comp].resLevels[r].precincts = NULL; - } - } - } - for (r = 0; r <= img.tiles[0].tileComps[0].nDecompLevels; ++r) { - if (img.tiles[0].tileComps[0].style & 0x01) { - cover(91); - if (!readUByte(&precinctSize)) { - error(errSyntaxError, getPos(), "Error in JPX COD marker segment"); - return gFalse; - } - img.tiles[0].tileComps[0].resLevels[r].precinctWidth = - precinctSize & 0x0f; - img.tiles[0].tileComps[0].resLevels[r].precinctHeight = - (precinctSize >> 4) & 0x0f; - } else { - img.tiles[0].tileComps[0].resLevels[r].precinctWidth = 15; - img.tiles[0].tileComps[0].resLevels[r].precinctHeight = 15; - } - } - for (i = 0; i < img.nXTiles * img.nYTiles; ++i) { - for (comp = 0; comp < img.nComps; ++comp) { - if (!(i == 0 && comp == 0)) { - for (r = 0; r <= img.tiles[i].tileComps[comp].nDecompLevels; ++r) { - img.tiles[i].tileComps[comp].resLevels[r].precinctWidth = - img.tiles[0].tileComps[0].resLevels[r].precinctWidth; - img.tiles[i].tileComps[comp].resLevels[r].precinctHeight = - img.tiles[0].tileComps[0].resLevels[r].precinctHeight; - } - } - } - } - haveCOD = gTrue; - break; - case 0x53: // COC - coding style component - cover(22); - if (!haveCOD) { - error(errSyntaxError, getPos(), - "JPX COC marker segment before COD segment"); - return gFalse; - } - if ((img.nComps > 256 && !readUWord(&comp)) || - (img.nComps <= 256 && !readUByte(&comp)) || - comp >= img.nComps || - !readUByte(&style) || - !readUByte(&nDecompLevels) || - !readUByte(&img.tiles[0].tileComps[comp].codeBlockW) || - !readUByte(&img.tiles[0].tileComps[comp].codeBlockH) || - !readUByte(&img.tiles[0].tileComps[comp].codeBlockStyle) || - !readUByte(&img.tiles[0].tileComps[comp].transform)) { - error(errSyntaxError, getPos(), "Error in JPX COC marker segment"); - return gFalse; - } - if (nDecompLevels > 32 || - img.tiles[0].tileComps[comp].codeBlockW > 8 || - img.tiles[0].tileComps[comp].codeBlockH > 8) { - error(errSyntaxError, getPos(), "Error in JPX COC marker segment"); - return gFalse; - } - img.tiles[0].tileComps[comp].nDecompLevels = nDecompLevels; - img.tiles[0].tileComps[comp].style = - (img.tiles[0].tileComps[comp].style & ~1) | (style & 1); - img.tiles[0].tileComps[comp].codeBlockW += 2; - img.tiles[0].tileComps[comp].codeBlockH += 2; - for (i = 0; i < img.nXTiles * img.nYTiles; ++i) { - if (i != 0) { - img.tiles[i].tileComps[comp].style = - img.tiles[0].tileComps[comp].style; - img.tiles[i].tileComps[comp].nDecompLevels = - img.tiles[0].tileComps[comp].nDecompLevels; - img.tiles[i].tileComps[comp].codeBlockW = - img.tiles[0].tileComps[comp].codeBlockW; - img.tiles[i].tileComps[comp].codeBlockH = - img.tiles[0].tileComps[comp].codeBlockH; - img.tiles[i].tileComps[comp].codeBlockStyle = - img.tiles[0].tileComps[comp].codeBlockStyle; - img.tiles[i].tileComps[comp].transform = - img.tiles[0].tileComps[comp].transform; - } - img.tiles[i].tileComps[comp].resLevels = - (JPXResLevel *)greallocn( - img.tiles[i].tileComps[comp].resLevels, - (img.tiles[i].tileComps[comp].nDecompLevels + 1), - sizeof(JPXResLevel)); - for (r = 0; r <= img.tiles[i].tileComps[comp].nDecompLevels; ++r) { - img.tiles[i].tileComps[comp].resLevels[r].precincts = NULL; - } - } - for (r = 0; r <= img.tiles[0].tileComps[comp].nDecompLevels; ++r) { - if (img.tiles[0].tileComps[comp].style & 0x01) { - if (!readUByte(&precinctSize)) { - error(errSyntaxError, getPos(), "Error in JPX COD marker segment"); - return gFalse; - } - img.tiles[0].tileComps[comp].resLevels[r].precinctWidth = - precinctSize & 0x0f; - img.tiles[0].tileComps[comp].resLevels[r].precinctHeight = - (precinctSize >> 4) & 0x0f; - } else { - img.tiles[0].tileComps[comp].resLevels[r].precinctWidth = 15; - img.tiles[0].tileComps[comp].resLevels[r].precinctHeight = 15; - } - } - for (i = 1; i < img.nXTiles * img.nYTiles; ++i) { - for (r = 0; r <= img.tiles[i].tileComps[comp].nDecompLevels; ++r) { - img.tiles[i].tileComps[comp].resLevels[r].precinctWidth = - img.tiles[0].tileComps[comp].resLevels[r].precinctWidth; - img.tiles[i].tileComps[comp].resLevels[r].precinctHeight = - img.tiles[0].tileComps[comp].resLevels[r].precinctHeight; - } - } - break; - case 0x5c: // QCD - quantization default - cover(23); - if (!haveSIZ) { - error(errSyntaxError, getPos(), - "JPX QCD marker segment before SIZ segment"); - return gFalse; - } - if (!readUByte(&img.tiles[0].tileComps[0].quantStyle)) { - error(errSyntaxError, getPos(), "Error in JPX QCD marker segment"); - return gFalse; - } - if ((img.tiles[0].tileComps[0].quantStyle & 0x1f) == 0x00) { - if (segLen <= 3) { - error(errSyntaxError, getPos(), "Error in JPX QCD marker segment"); - return gFalse; - } - img.tiles[0].tileComps[0].nQuantSteps = segLen - 3; - img.tiles[0].tileComps[0].quantSteps = - (Guint *)greallocn(img.tiles[0].tileComps[0].quantSteps, - img.tiles[0].tileComps[0].nQuantSteps, - sizeof(Guint)); - for (i = 0; i < img.tiles[0].tileComps[0].nQuantSteps; ++i) { - if (!readUByte(&img.tiles[0].tileComps[0].quantSteps[i])) { - error(errSyntaxError, getPos(), "Error in JPX QCD marker segment"); - return gFalse; - } - } - } else if ((img.tiles[0].tileComps[0].quantStyle & 0x1f) == 0x01) { - img.tiles[0].tileComps[0].nQuantSteps = 1; - img.tiles[0].tileComps[0].quantSteps = - (Guint *)greallocn(img.tiles[0].tileComps[0].quantSteps, - img.tiles[0].tileComps[0].nQuantSteps, - sizeof(Guint)); - if (!readUWord(&img.tiles[0].tileComps[0].quantSteps[0])) { - error(errSyntaxError, getPos(), "Error in JPX QCD marker segment"); - return gFalse; - } - } else if ((img.tiles[0].tileComps[0].quantStyle & 0x1f) == 0x02) { - if (segLen < 5) { - error(errSyntaxError, getPos(), "Error in JPX QCD marker segment"); - return gFalse; - } - img.tiles[0].tileComps[0].nQuantSteps = (segLen - 3) / 2; - img.tiles[0].tileComps[0].quantSteps = - (Guint *)greallocn(img.tiles[0].tileComps[0].quantSteps, - img.tiles[0].tileComps[0].nQuantSteps, - sizeof(Guint)); - for (i = 0; i < img.tiles[0].tileComps[0].nQuantSteps; ++i) { - if (!readUWord(&img.tiles[0].tileComps[0].quantSteps[i])) { - error(errSyntaxError, getPos(), "Error in JPX QCD marker segment"); - return gFalse; - } - } - } else { - error(errSyntaxError, getPos(), "Error in JPX QCD marker segment"); - return gFalse; - } - for (i = 0; i < img.nXTiles * img.nYTiles; ++i) { - for (comp = 0; comp < img.nComps; ++comp) { - if (!(i == 0 && comp == 0)) { - img.tiles[i].tileComps[comp].quantStyle = - img.tiles[0].tileComps[0].quantStyle; - img.tiles[i].tileComps[comp].nQuantSteps = - img.tiles[0].tileComps[0].nQuantSteps; - img.tiles[i].tileComps[comp].quantSteps = - (Guint *)greallocn(img.tiles[i].tileComps[comp].quantSteps, - img.tiles[0].tileComps[0].nQuantSteps, - sizeof(Guint)); - for (j = 0; j < img.tiles[0].tileComps[0].nQuantSteps; ++j) { - img.tiles[i].tileComps[comp].quantSteps[j] = - img.tiles[0].tileComps[0].quantSteps[j]; - } - } - } - } - haveQCD = gTrue; - break; - case 0x5d: // QCC - quantization component - cover(24); - if (!haveQCD) { - error(errSyntaxError, getPos(), - "JPX QCC marker segment before QCD segment"); - return gFalse; - } - if ((img.nComps > 256 && !readUWord(&comp)) || - (img.nComps <= 256 && !readUByte(&comp)) || - comp >= img.nComps || - !readUByte(&img.tiles[0].tileComps[comp].quantStyle)) { - error(errSyntaxError, getPos(), "Error in JPX QCC marker segment"); - return gFalse; - } - if ((img.tiles[0].tileComps[comp].quantStyle & 0x1f) == 0x00) { - if (segLen <= (img.nComps > 256 ? 5U : 4U)) { - error(errSyntaxError, getPos(), "Error in JPX QCC marker segment"); - return gFalse; - } - img.tiles[0].tileComps[comp].nQuantSteps = - segLen - (img.nComps > 256 ? 5 : 4); - img.tiles[0].tileComps[comp].quantSteps = - (Guint *)greallocn(img.tiles[0].tileComps[comp].quantSteps, - img.tiles[0].tileComps[comp].nQuantSteps, - sizeof(Guint)); - for (i = 0; i < img.tiles[0].tileComps[comp].nQuantSteps; ++i) { - if (!readUByte(&img.tiles[0].tileComps[comp].quantSteps[i])) { - error(errSyntaxError, getPos(), "Error in JPX QCC marker segment"); - return gFalse; - } - } - } else if ((img.tiles[0].tileComps[comp].quantStyle & 0x1f) == 0x01) { - img.tiles[0].tileComps[comp].nQuantSteps = 1; - img.tiles[0].tileComps[comp].quantSteps = - (Guint *)greallocn(img.tiles[0].tileComps[comp].quantSteps, - img.tiles[0].tileComps[comp].nQuantSteps, - sizeof(Guint)); - if (!readUWord(&img.tiles[0].tileComps[comp].quantSteps[0])) { - error(errSyntaxError, getPos(), "Error in JPX QCC marker segment"); - return gFalse; - } - } else if ((img.tiles[0].tileComps[comp].quantStyle & 0x1f) == 0x02) { - if (segLen < (img.nComps > 256 ? 5U : 4U) + 2) { - error(errSyntaxError, getPos(), "Error in JPX QCC marker segment"); - return gFalse; - } - img.tiles[0].tileComps[comp].nQuantSteps = - (segLen - (img.nComps > 256 ? 5 : 4)) / 2; - img.tiles[0].tileComps[comp].quantSteps = - (Guint *)greallocn(img.tiles[0].tileComps[comp].quantSteps, - img.tiles[0].tileComps[comp].nQuantSteps, - sizeof(Guint)); - for (i = 0; i < img.tiles[0].tileComps[comp].nQuantSteps; ++i) { - if (!readUWord(&img.tiles[0].tileComps[comp].quantSteps[i])) { - error(errSyntaxError, getPos(), "Error in JPX QCD marker segment"); - return gFalse; - } - } - } else { - error(errSyntaxError, getPos(), "Error in JPX QCC marker segment"); - return gFalse; - } - for (i = 1; i < img.nXTiles * img.nYTiles; ++i) { - img.tiles[i].tileComps[comp].quantStyle = - img.tiles[0].tileComps[comp].quantStyle; - img.tiles[i].tileComps[comp].nQuantSteps = - img.tiles[0].tileComps[comp].nQuantSteps; - img.tiles[i].tileComps[comp].quantSteps = - (Guint *)greallocn(img.tiles[i].tileComps[comp].quantSteps, - img.tiles[0].tileComps[comp].nQuantSteps, - sizeof(Guint)); - for (j = 0; j < img.tiles[0].tileComps[comp].nQuantSteps; ++j) { - img.tiles[i].tileComps[comp].quantSteps[j] = - img.tiles[0].tileComps[comp].quantSteps[j]; - } - } - break; - case 0x5e: // RGN - region of interest - cover(25); -#if 1 //~ ROI is unimplemented - error(errUnimplemented, -1, "got a JPX RGN segment"); - for (i = 0; i < segLen - 2; ++i) { - if (bufStr->getChar() == EOF) { - error(errSyntaxError, getPos(), "Error in JPX RGN marker segment"); - return gFalse; - } - } -#else - if ((img.nComps > 256 && !readUWord(&comp)) || - (img.nComps <= 256 && !readUByte(&comp)) || - comp >= img.nComps || - !readUByte(&compInfo[comp].defROI.style) || - !readUByte(&compInfo[comp].defROI.shift)) { - error(errSyntaxError, getPos(), "Error in JPX RGN marker segment"); - return gFalse; - } -#endif - break; - case 0x5f: // POC - progression order change - cover(26); -#if 1 //~ progression order changes are unimplemented - error(errUnimplemented, -1, "got a JPX POC segment"); - for (i = 0; i < segLen - 2; ++i) { - if (bufStr->getChar() == EOF) { - error(errSyntaxError, getPos(), "Error in JPX POC marker segment"); - return gFalse; - } - } -#else - nProgs = (segLen - 2) / (img.nComps > 256 ? 9 : 7); - progs = (JPXProgOrder *)gmallocn(nProgs, sizeof(JPXProgOrder)); - for (i = 0; i < nProgs; ++i) { - if (!readUByte(&progs[i].startRes) || - !(img.nComps > 256 && readUWord(&progs[i].startComp)) || - !(img.nComps <= 256 && readUByte(&progs[i].startComp)) || - !readUWord(&progs[i].endLayer) || - !readUByte(&progs[i].endRes) || - !(img.nComps > 256 && readUWord(&progs[i].endComp)) || - !(img.nComps <= 256 && readUByte(&progs[i].endComp)) || - !readUByte(&progs[i].progOrder)) { - error(errSyntaxError, getPos(), "Error in JPX POC marker segment"); - return gFalse; - } - } -#endif - break; - case 0x60: // PPM - packed packet headers, main header - cover(27); -#if 1 //~ packed packet headers are unimplemented - error(errUnimplemented, -1, "Got a JPX PPM segment"); - for (i = 0; i < segLen - 2; ++i) { - if (bufStr->getChar() == EOF) { - error(errSyntaxError, getPos(), "Error in JPX PPM marker segment"); - return gFalse; - } - } -#endif - break; - case 0x55: // TLM - tile-part lengths - // skipped - cover(28); - for (i = 0; i < segLen - 2; ++i) { - if (bufStr->getChar() == EOF) { - error(errSyntaxError, getPos(), "Error in JPX TLM marker segment"); - return gFalse; - } - } - break; - case 0x57: // PLM - packet length, main header - // skipped - cover(29); - for (i = 0; i < segLen - 2; ++i) { - if (bufStr->getChar() == EOF) { - error(errSyntaxError, getPos(), "Error in JPX PLM marker segment"); - return gFalse; - } - } - break; - case 0x63: // CRG - component registration - // skipped - cover(30); - for (i = 0; i < segLen - 2; ++i) { - if (bufStr->getChar() == EOF) { - error(errSyntaxError, getPos(), "Error in JPX CRG marker segment"); - return gFalse; - } - } - break; - case 0x64: // COM - comment - // skipped - cover(31); - for (i = 0; i < segLen - 2; ++i) { - if (bufStr->getChar() == EOF) { - error(errSyntaxError, getPos(), "Error in JPX COM marker segment"); - return gFalse; - } - } - break; - case 0x90: // SOT - start of tile - cover(32); - haveSOT = gTrue; - break; - default: - cover(33); - error(errSyntaxError, getPos(), - "Unknown marker segment {0:02x} in JPX stream", segType); - for (i = 0; i < segLen - 2; ++i) { - if (bufStr->getChar() == EOF) { - break; - } - } - break; - } - } while (!haveSOT); - - if (!haveSIZ) { - error(errSyntaxError, getPos(), - "Missing SIZ marker segment in JPX stream"); - return gFalse; - } - if (!haveCOD) { - error(errSyntaxError, getPos(), - "Missing COD marker segment in JPX stream"); - return gFalse; - } - if (!haveQCD) { - error(errSyntaxError, getPos(), - "Missing QCD marker segment in JPX stream"); - return gFalse; - } - - //----- read the tile-parts - while (1) { - if (!readTilePart()) { - return gFalse; - } - if (!readMarkerHdr(&segType, &segLen)) { - error(errSyntaxError, getPos(), "Error in JPX codestream"); - return gFalse; - } - if (segType != 0x90) { // SOT - start of tile - break; - } - } - - if (segType != 0xd9) { // EOC - end of codestream - error(errSyntaxError, getPos(), "Missing EOC marker in JPX codestream"); - return gFalse; - } - - //----- finish decoding the image - for (i = 0; i < img.nXTiles * img.nYTiles; ++i) { - tile = &img.tiles[i]; - if (!tile->init) { - error(errSyntaxError, getPos(), "Uninitialized tile in JPX codestream"); - return gFalse; - } - for (comp = 0; comp < img.nComps; ++comp) { - tileComp = &tile->tileComps[comp]; - inverseTransform(tileComp); - } - if (!inverseMultiCompAndDC(tile)) { - return gFalse; - } - } - - //~ can free memory below tileComps here, and also tileComp.buf - - return gTrue; -} - -GBool JPXStream::readTilePart() { - JPXTile *tile; - JPXTileComp *tileComp; - JPXResLevel *resLevel; - JPXPrecinct *precinct; - JPXSubband *subband; - JPXCodeBlock *cb; - int *sbCoeffs; - GBool haveSOD; - Guint tileIdx, tilePartLen, tilePartIdx, nTileParts; - GBool tilePartToEOC; - Guint precinctSize, style, nDecompLevels; - Guint n, nSBs, nx, ny, sbx0, sby0, comp, segLen; - Guint i, j, k, cbX, cbY, r, pre, sb, cbi, cbj; - int segType, level; - - // process the SOT marker segment - if (!readUWord(&tileIdx) || - !readULong(&tilePartLen) || - !readUByte(&tilePartIdx) || - !readUByte(&nTileParts)) { - error(errSyntaxError, getPos(), "Error in JPX SOT marker segment"); - return gFalse; - } - - if (tileIdx >= img.nXTiles * img.nYTiles || - (tilePartIdx > 0 && !img.tiles[tileIdx].init)) { - error(errSyntaxError, getPos(), "Weird tile index in JPX stream"); - return gFalse; - } - - tilePartToEOC = tilePartLen == 0; - tilePartLen -= 12; // subtract size of SOT segment - - haveSOD = gFalse; - do { - if (!readMarkerHdr(&segType, &segLen)) { - error(errSyntaxError, getPos(), "Error in JPX tile-part codestream"); - return gFalse; - } - tilePartLen -= 2 + segLen; - switch (segType) { - case 0x52: // COD - coding style default - cover(34); - if (!readUByte(&img.tiles[tileIdx].tileComps[0].style) || - !readUByte(&img.tiles[tileIdx].progOrder) || - !readUWord(&img.tiles[tileIdx].nLayers) || - !readUByte(&img.tiles[tileIdx].multiComp) || - !readUByte(&nDecompLevels) || - !readUByte(&img.tiles[tileIdx].tileComps[0].codeBlockW) || - !readUByte(&img.tiles[tileIdx].tileComps[0].codeBlockH) || - !readUByte(&img.tiles[tileIdx].tileComps[0].codeBlockStyle) || - !readUByte(&img.tiles[tileIdx].tileComps[0].transform)) { - error(errSyntaxError, getPos(), "Error in JPX COD marker segment"); - return gFalse; - } - if (nDecompLevels > 32 || - img.tiles[tileIdx].tileComps[0].codeBlockW > 8 || - img.tiles[tileIdx].tileComps[0].codeBlockH > 8) { - error(errSyntaxError, getPos(), "Error in JPX COD marker segment"); - return gFalse; - } - img.tiles[tileIdx].tileComps[0].nDecompLevels = nDecompLevels; - img.tiles[tileIdx].tileComps[0].codeBlockW += 2; - img.tiles[tileIdx].tileComps[0].codeBlockH += 2; - for (comp = 0; comp < img.nComps; ++comp) { - if (comp != 0) { - img.tiles[tileIdx].tileComps[comp].style = - img.tiles[tileIdx].tileComps[0].style; - img.tiles[tileIdx].tileComps[comp].nDecompLevels = - img.tiles[tileIdx].tileComps[0].nDecompLevels; - img.tiles[tileIdx].tileComps[comp].codeBlockW = - img.tiles[tileIdx].tileComps[0].codeBlockW; - img.tiles[tileIdx].tileComps[comp].codeBlockH = - img.tiles[tileIdx].tileComps[0].codeBlockH; - img.tiles[tileIdx].tileComps[comp].codeBlockStyle = - img.tiles[tileIdx].tileComps[0].codeBlockStyle; - img.tiles[tileIdx].tileComps[comp].transform = - img.tiles[tileIdx].tileComps[0].transform; - } - img.tiles[tileIdx].tileComps[comp].resLevels = - (JPXResLevel *)greallocn( - img.tiles[tileIdx].tileComps[comp].resLevels, - (img.tiles[tileIdx].tileComps[comp].nDecompLevels + 1), - sizeof(JPXResLevel)); - for (r = 0; - r <= img.tiles[tileIdx].tileComps[comp].nDecompLevels; - ++r) { - img.tiles[tileIdx].tileComps[comp].resLevels[r].precincts = NULL; - } - } - for (r = 0; r <= img.tiles[tileIdx].tileComps[0].nDecompLevels; ++r) { - if (img.tiles[tileIdx].tileComps[0].style & 0x01) { - if (!readUByte(&precinctSize)) { - error(errSyntaxError, getPos(), "Error in JPX COD marker segment"); - return gFalse; - } - img.tiles[tileIdx].tileComps[0].resLevels[r].precinctWidth = - precinctSize & 0x0f; - img.tiles[tileIdx].tileComps[0].resLevels[r].precinctHeight = - (precinctSize >> 4) & 0x0f; - } else { - img.tiles[tileIdx].tileComps[0].resLevels[r].precinctWidth = 15; - img.tiles[tileIdx].tileComps[0].resLevels[r].precinctHeight = 15; - } - } - for (comp = 1; comp < img.nComps; ++comp) { - for (r = 0; - r <= img.tiles[tileIdx].tileComps[comp].nDecompLevels; - ++r) { - img.tiles[tileIdx].tileComps[comp].resLevels[r].precinctWidth = - img.tiles[tileIdx].tileComps[0].resLevels[r].precinctWidth; - img.tiles[tileIdx].tileComps[comp].resLevels[r].precinctHeight = - img.tiles[tileIdx].tileComps[0].resLevels[r].precinctHeight; - } - } - break; - case 0x53: // COC - coding style component - cover(35); - if ((img.nComps > 256 && !readUWord(&comp)) || - (img.nComps <= 256 && !readUByte(&comp)) || - comp >= img.nComps || - !readUByte(&style) || - !readUByte(&nDecompLevels) || - !readUByte(&img.tiles[tileIdx].tileComps[comp].codeBlockW) || - !readUByte(&img.tiles[tileIdx].tileComps[comp].codeBlockH) || - !readUByte(&img.tiles[tileIdx].tileComps[comp].codeBlockStyle) || - !readUByte(&img.tiles[tileIdx].tileComps[comp].transform)) { - error(errSyntaxError, getPos(), "Error in JPX COC marker segment"); - return gFalse; - } - if (nDecompLevels > 32 || - img.tiles[tileIdx].tileComps[comp].codeBlockW > 8 || - img.tiles[tileIdx].tileComps[comp].codeBlockH > 8) { - error(errSyntaxError, getPos(), "Error in JPX COD marker segment"); - return gFalse; - } - img.tiles[tileIdx].tileComps[comp].nDecompLevels = nDecompLevels; - img.tiles[tileIdx].tileComps[comp].style = - (img.tiles[tileIdx].tileComps[comp].style & ~1) | (style & 1); - img.tiles[tileIdx].tileComps[comp].codeBlockW += 2; - img.tiles[tileIdx].tileComps[comp].codeBlockH += 2; - img.tiles[tileIdx].tileComps[comp].resLevels = - (JPXResLevel *)greallocn( - img.tiles[tileIdx].tileComps[comp].resLevels, - (img.tiles[tileIdx].tileComps[comp].nDecompLevels + 1), - sizeof(JPXResLevel)); - for (r = 0; r <= img.tiles[tileIdx].tileComps[comp].nDecompLevels; ++r) { - img.tiles[tileIdx].tileComps[comp].resLevels[r].precincts = NULL; - } - for (r = 0; r <= img.tiles[tileIdx].tileComps[comp].nDecompLevels; ++r) { - if (img.tiles[tileIdx].tileComps[comp].style & 0x01) { - if (!readUByte(&precinctSize)) { - error(errSyntaxError, getPos(), "Error in JPX COD marker segment"); - return gFalse; - } - img.tiles[tileIdx].tileComps[comp].resLevels[r].precinctWidth = - precinctSize & 0x0f; - img.tiles[tileIdx].tileComps[comp].resLevels[r].precinctHeight = - (precinctSize >> 4) & 0x0f; - } else { - img.tiles[tileIdx].tileComps[comp].resLevels[r].precinctWidth = 15; - img.tiles[tileIdx].tileComps[comp].resLevels[r].precinctHeight = 15; - } - } - break; - case 0x5c: // QCD - quantization default - cover(36); - if (!readUByte(&img.tiles[tileIdx].tileComps[0].quantStyle)) { - error(errSyntaxError, getPos(), "Error in JPX QCD marker segment"); - return gFalse; - } - if ((img.tiles[tileIdx].tileComps[0].quantStyle & 0x1f) == 0x00) { - if (segLen <= 3) { - error(errSyntaxError, getPos(), "Error in JPX QCD marker segment"); - return gFalse; - } - img.tiles[tileIdx].tileComps[0].nQuantSteps = segLen - 3; - img.tiles[tileIdx].tileComps[0].quantSteps = - (Guint *)greallocn(img.tiles[tileIdx].tileComps[0].quantSteps, - img.tiles[tileIdx].tileComps[0].nQuantSteps, - sizeof(Guint)); - for (i = 0; i < img.tiles[tileIdx].tileComps[0].nQuantSteps; ++i) { - if (!readUByte(&img.tiles[tileIdx].tileComps[0].quantSteps[i])) { - error(errSyntaxError, getPos(), "Error in JPX QCD marker segment"); - return gFalse; - } - } - } else if ((img.tiles[tileIdx].tileComps[0].quantStyle & 0x1f) == 0x01) { - img.tiles[tileIdx].tileComps[0].nQuantSteps = 1; - img.tiles[tileIdx].tileComps[0].quantSteps = - (Guint *)greallocn(img.tiles[tileIdx].tileComps[0].quantSteps, - img.tiles[tileIdx].tileComps[0].nQuantSteps, - sizeof(Guint)); - if (!readUWord(&img.tiles[tileIdx].tileComps[0].quantSteps[0])) { - error(errSyntaxError, getPos(), "Error in JPX QCD marker segment"); - return gFalse; - } - } else if ((img.tiles[tileIdx].tileComps[0].quantStyle & 0x1f) == 0x02) { - if (segLen < 5) { - error(errSyntaxError, getPos(), "Error in JPX QCD marker segment"); - return gFalse; - } - img.tiles[tileIdx].tileComps[0].nQuantSteps = (segLen - 3) / 2; - img.tiles[tileIdx].tileComps[0].quantSteps = - (Guint *)greallocn(img.tiles[tileIdx].tileComps[0].quantSteps, - img.tiles[tileIdx].tileComps[0].nQuantSteps, - sizeof(Guint)); - for (i = 0; i < img.tiles[tileIdx].tileComps[0].nQuantSteps; ++i) { - if (!readUWord(&img.tiles[tileIdx].tileComps[0].quantSteps[i])) { - error(errSyntaxError, getPos(), "Error in JPX QCD marker segment"); - return gFalse; - } - } - } else { - error(errSyntaxError, getPos(), "Error in JPX QCD marker segment"); - return gFalse; - } - for (comp = 1; comp < img.nComps; ++comp) { - img.tiles[tileIdx].tileComps[comp].quantStyle = - img.tiles[tileIdx].tileComps[0].quantStyle; - img.tiles[tileIdx].tileComps[comp].nQuantSteps = - img.tiles[tileIdx].tileComps[0].nQuantSteps; - img.tiles[tileIdx].tileComps[comp].quantSteps = - (Guint *)greallocn(img.tiles[tileIdx].tileComps[comp].quantSteps, - img.tiles[tileIdx].tileComps[0].nQuantSteps, - sizeof(Guint)); - for (j = 0; j < img.tiles[tileIdx].tileComps[0].nQuantSteps; ++j) { - img.tiles[tileIdx].tileComps[comp].quantSteps[j] = - img.tiles[tileIdx].tileComps[0].quantSteps[j]; - } - } - break; - case 0x5d: // QCC - quantization component - cover(37); - if ((img.nComps > 256 && !readUWord(&comp)) || - (img.nComps <= 256 && !readUByte(&comp)) || - comp >= img.nComps || - !readUByte(&img.tiles[tileIdx].tileComps[comp].quantStyle)) { - error(errSyntaxError, getPos(), "Error in JPX QCC marker segment"); - return gFalse; - } - if ((img.tiles[tileIdx].tileComps[comp].quantStyle & 0x1f) == 0x00) { - if (segLen <= (img.nComps > 256 ? 5U : 4U)) { - error(errSyntaxError, getPos(), "Error in JPX QCC marker segment"); - return gFalse; - } - img.tiles[tileIdx].tileComps[comp].nQuantSteps = - segLen - (img.nComps > 256 ? 5 : 4); - img.tiles[tileIdx].tileComps[comp].quantSteps = - (Guint *)greallocn(img.tiles[tileIdx].tileComps[comp].quantSteps, - img.tiles[tileIdx].tileComps[comp].nQuantSteps, - sizeof(Guint)); - for (i = 0; i < img.tiles[tileIdx].tileComps[comp].nQuantSteps; ++i) { - if (!readUByte(&img.tiles[tileIdx].tileComps[comp].quantSteps[i])) { - error(errSyntaxError, getPos(), "Error in JPX QCC marker segment"); - return gFalse; - } - } - } else if ((img.tiles[tileIdx].tileComps[comp].quantStyle & 0x1f) - == 0x01) { - img.tiles[tileIdx].tileComps[comp].nQuantSteps = 1; - img.tiles[tileIdx].tileComps[comp].quantSteps = - (Guint *)greallocn(img.tiles[tileIdx].tileComps[comp].quantSteps, - img.tiles[tileIdx].tileComps[comp].nQuantSteps, - sizeof(Guint)); - if (!readUWord(&img.tiles[tileIdx].tileComps[comp].quantSteps[0])) { - error(errSyntaxError, getPos(), "Error in JPX QCC marker segment"); - return gFalse; - } - } else if ((img.tiles[tileIdx].tileComps[comp].quantStyle & 0x1f) - == 0x02) { - if (segLen < (img.nComps > 256 ? 5U : 4U) + 2) { - error(errSyntaxError, getPos(), "Error in JPX QCC marker segment"); - return gFalse; - } - img.tiles[tileIdx].tileComps[comp].nQuantSteps = - (segLen - (img.nComps > 256 ? 5 : 4)) / 2; - img.tiles[tileIdx].tileComps[comp].quantSteps = - (Guint *)greallocn(img.tiles[tileIdx].tileComps[comp].quantSteps, - img.tiles[tileIdx].tileComps[comp].nQuantSteps, - sizeof(Guint)); - for (i = 0; i < img.tiles[tileIdx].tileComps[comp].nQuantSteps; ++i) { - if (!readUWord(&img.tiles[tileIdx].tileComps[comp].quantSteps[i])) { - error(errSyntaxError, getPos(), "Error in JPX QCD marker segment"); - return gFalse; - } - } - } else { - error(errSyntaxError, getPos(), "Error in JPX QCC marker segment"); - return gFalse; - } - break; - case 0x5e: // RGN - region of interest - cover(38); -#if 1 //~ ROI is unimplemented - error(errUnimplemented, -1, "Got a JPX RGN segment"); - for (i = 0; i < segLen - 2; ++i) { - if (bufStr->getChar() == EOF) { - error(errSyntaxError, getPos(), "Error in JPX RGN marker segment"); - return gFalse; - } - } -#else - if ((img.nComps > 256 && !readUWord(&comp)) || - (img.nComps <= 256 && !readUByte(&comp)) || - comp >= img.nComps || - !readUByte(&compInfo[comp].roi.style) || - !readUByte(&compInfo[comp].roi.shift)) { - error(errSyntaxError, getPos(), "Error in JPX RGN marker segment"); - return gFalse; - } -#endif - break; - case 0x5f: // POC - progression order change - cover(39); -#if 1 //~ progression order changes are unimplemented - error(errUnimplemented, -1, "Got a JPX POC segment"); - for (i = 0; i < segLen - 2; ++i) { - if (bufStr->getChar() == EOF) { - error(errSyntaxError, getPos(), "Error in JPX POC marker segment"); - return gFalse; - } - } -#else - nTileProgs = (segLen - 2) / (img.nComps > 256 ? 9 : 7); - tileProgs = (JPXProgOrder *)gmallocn(nTileProgs, sizeof(JPXProgOrder)); - for (i = 0; i < nTileProgs; ++i) { - if (!readUByte(&tileProgs[i].startRes) || - !(img.nComps > 256 && readUWord(&tileProgs[i].startComp)) || - !(img.nComps <= 256 && readUByte(&tileProgs[i].startComp)) || - !readUWord(&tileProgs[i].endLayer) || - !readUByte(&tileProgs[i].endRes) || - !(img.nComps > 256 && readUWord(&tileProgs[i].endComp)) || - !(img.nComps <= 256 && readUByte(&tileProgs[i].endComp)) || - !readUByte(&tileProgs[i].progOrder)) { - error(errSyntaxError, getPos(), "Error in JPX POC marker segment"); - return gFalse; - } - } -#endif - break; - case 0x61: // PPT - packed packet headers, tile-part hdr - cover(40); -#if 1 //~ packed packet headers are unimplemented - error(errUnimplemented, -1, "Got a JPX PPT segment"); - for (i = 0; i < segLen - 2; ++i) { - if (bufStr->getChar() == EOF) { - error(errSyntaxError, getPos(), "Error in JPX PPT marker segment"); - return gFalse; - } - } -#endif - case 0x58: // PLT - packet length, tile-part header - // skipped - cover(41); - for (i = 0; i < segLen - 2; ++i) { - if (bufStr->getChar() == EOF) { - error(errSyntaxError, getPos(), "Error in JPX PLT marker segment"); - return gFalse; - } - } - break; - case 0x64: // COM - comment - // skipped - cover(42); - for (i = 0; i < segLen - 2; ++i) { - if (bufStr->getChar() == EOF) { - error(errSyntaxError, getPos(), "Error in JPX COM marker segment"); - return gFalse; - } - } - break; - case 0x93: // SOD - start of data - cover(43); - haveSOD = gTrue; - break; - default: - cover(44); - error(errSyntaxError, getPos(), - "Unknown marker segment {0:02x} in JPX tile-part stream", - segType); - for (i = 0; i < segLen - 2; ++i) { - if (bufStr->getChar() == EOF) { - break; - } - } - break; - } - } while (!haveSOD); - - //----- initialize the tile, precincts, and code-blocks - if (tilePartIdx == 0) { - tile = &img.tiles[tileIdx]; - tile->init = gTrue; - i = tileIdx / img.nXTiles; - j = tileIdx % img.nXTiles; - if ((tile->x0 = img.xTileOffset + j * img.xTileSize) < img.xOffset) { - tile->x0 = img.xOffset; - } - if ((tile->y0 = img.yTileOffset + i * img.yTileSize) < img.yOffset) { - tile->y0 = img.yOffset; - } - if ((tile->x1 = img.xTileOffset + (j + 1) * img.xTileSize) > img.xSize) { - tile->x1 = img.xSize; - } - if ((tile->y1 = img.yTileOffset + (i + 1) * img.yTileSize) > img.ySize) { - tile->y1 = img.ySize; - } - tile->comp = 0; - tile->res = 0; - tile->precinct = 0; - tile->layer = 0; - tile->maxNDecompLevels = 0; - for (comp = 0; comp < img.nComps; ++comp) { - tileComp = &tile->tileComps[comp]; - if (tileComp->nDecompLevels > tile->maxNDecompLevels) { - tile->maxNDecompLevels = tileComp->nDecompLevels; - } - tileComp->x0 = jpxCeilDiv(tile->x0, tileComp->hSep); - tileComp->y0 = jpxCeilDiv(tile->y0, tileComp->vSep); - tileComp->x1 = jpxCeilDiv(tile->x1, tileComp->hSep); - tileComp->y1 = jpxCeilDiv(tile->y1, tileComp->vSep); - tileComp->w = tileComp->x1 - tileComp->x0; - tileComp->cbW = 1 << tileComp->codeBlockW; - tileComp->cbH = 1 << tileComp->codeBlockH; - tileComp->data = (int *)gmallocn((tileComp->x1 - tileComp->x0) * - (tileComp->y1 - tileComp->y0), - sizeof(int)); - if (tileComp->x1 - tileComp->x0 > tileComp->y1 - tileComp->y0) { - n = tileComp->x1 - tileComp->x0; - } else { - n = tileComp->y1 - tileComp->y0; - } - tileComp->buf = (int *)gmallocn(n + 8, sizeof(int)); - for (r = 0; r <= tileComp->nDecompLevels; ++r) { - resLevel = &tileComp->resLevels[r]; - k = r == 0 ? tileComp->nDecompLevels - : tileComp->nDecompLevels - r + 1; - resLevel->x0 = jpxCeilDivPow2(tileComp->x0, k); - resLevel->y0 = jpxCeilDivPow2(tileComp->y0, k); - resLevel->x1 = jpxCeilDivPow2(tileComp->x1, k); - resLevel->y1 = jpxCeilDivPow2(tileComp->y1, k); - if (r == 0) { - resLevel->bx0[0] = resLevel->x0; - resLevel->by0[0] = resLevel->y0; - resLevel->bx1[0] = resLevel->x1; - resLevel->by1[0] = resLevel->y1; - } else { - resLevel->bx0[0] = jpxCeilDivPow2(tileComp->x0 - (1 << (k-1)), k); - resLevel->by0[0] = resLevel->y0; - resLevel->bx1[0] = jpxCeilDivPow2(tileComp->x1 - (1 << (k-1)), k); - resLevel->by1[0] = resLevel->y1; - resLevel->bx0[1] = resLevel->x0; - resLevel->by0[1] = jpxCeilDivPow2(tileComp->y0 - (1 << (k-1)), k); - resLevel->bx1[1] = resLevel->x1; - resLevel->by1[1] = jpxCeilDivPow2(tileComp->y1 - (1 << (k-1)), k); - resLevel->bx0[2] = jpxCeilDivPow2(tileComp->x0 - (1 << (k-1)), k); - resLevel->by0[2] = jpxCeilDivPow2(tileComp->y0 - (1 << (k-1)), k); - resLevel->bx1[2] = jpxCeilDivPow2(tileComp->x1 - (1 << (k-1)), k); - resLevel->by1[2] = jpxCeilDivPow2(tileComp->y1 - (1 << (k-1)), k); - } - resLevel->precincts = (JPXPrecinct *)gmallocn(1, sizeof(JPXPrecinct)); - for (pre = 0; pre < 1; ++pre) { - precinct = &resLevel->precincts[pre]; - precinct->x0 = resLevel->x0; - precinct->y0 = resLevel->y0; - precinct->x1 = resLevel->x1; - precinct->y1 = resLevel->y1; - nSBs = r == 0 ? 1 : 3; - precinct->subbands = - (JPXSubband *)gmallocn(nSBs, sizeof(JPXSubband)); - for (sb = 0; sb < nSBs; ++sb) { - subband = &precinct->subbands[sb]; - subband->x0 = resLevel->bx0[sb]; - subband->y0 = resLevel->by0[sb]; - subband->x1 = resLevel->bx1[sb]; - subband->y1 = resLevel->by1[sb]; - subband->nXCBs = jpxCeilDivPow2(subband->x1, - tileComp->codeBlockW) - - jpxFloorDivPow2(subband->x0, - tileComp->codeBlockW); - subband->nYCBs = jpxCeilDivPow2(subband->y1, - tileComp->codeBlockH) - - jpxFloorDivPow2(subband->y0, - tileComp->codeBlockH); - n = subband->nXCBs > subband->nYCBs ? subband->nXCBs - : subband->nYCBs; - for (subband->maxTTLevel = 0, --n; - n; - ++subband->maxTTLevel, n >>= 1) ; - n = 0; - for (level = subband->maxTTLevel; level >= 0; --level) { - nx = jpxCeilDivPow2(subband->nXCBs, level); - ny = jpxCeilDivPow2(subband->nYCBs, level); - n += nx * ny; - } - subband->inclusion = - (JPXTagTreeNode *)gmallocn(n, sizeof(JPXTagTreeNode)); - subband->zeroBitPlane = - (JPXTagTreeNode *)gmallocn(n, sizeof(JPXTagTreeNode)); - for (k = 0; k < n; ++k) { - subband->inclusion[k].finished = gFalse; - subband->inclusion[k].val = 0; - subband->zeroBitPlane[k].finished = gFalse; - subband->zeroBitPlane[k].val = 0; - } - subband->cbs = (JPXCodeBlock *)gmallocn(subband->nXCBs * - subband->nYCBs, - sizeof(JPXCodeBlock)); - sbx0 = jpxFloorDivPow2(subband->x0, tileComp->codeBlockW); - sby0 = jpxFloorDivPow2(subband->y0, tileComp->codeBlockH); - if (r == 0) { // (NL)LL - sbCoeffs = tileComp->data; - } else if (sb == 0) { // (NL-r+1)HL - sbCoeffs = tileComp->data - + resLevel->bx1[1] - resLevel->bx0[1]; - } else if (sb == 1) { // (NL-r+1)LH - sbCoeffs = tileComp->data - + (resLevel->by1[0] - resLevel->by0[0]) * tileComp->w; - } else { // (NL-r+1)HH - sbCoeffs = tileComp->data - + (resLevel->by1[0] - resLevel->by0[0]) * tileComp->w - + resLevel->bx1[1] - resLevel->bx0[1]; - } - cb = subband->cbs; - for (cbY = 0; cbY < subband->nYCBs; ++cbY) { - for (cbX = 0; cbX < subband->nXCBs; ++cbX) { - cb->x0 = (sbx0 + cbX) << tileComp->codeBlockW; - cb->x1 = cb->x0 + tileComp->cbW; - if (subband->x0 > cb->x0) { - cb->x0 = subband->x0; - } - if (subband->x1 < cb->x1) { - cb->x1 = subband->x1; - } - cb->y0 = (sby0 + cbY) << tileComp->codeBlockH; - cb->y1 = cb->y0 + tileComp->cbH; - if (subband->y0 > cb->y0) { - cb->y0 = subband->y0; - } - if (subband->y1 < cb->y1) { - cb->y1 = subband->y1; - } - cb->seen = gFalse; - cb->lBlock = 3; - cb->nextPass = jpxPassCleanup; - cb->nZeroBitPlanes = 0; - cb->dataLenSize = 1; - cb->dataLen = (Guint *)gmalloc(sizeof(Guint)); - cb->coeffs = sbCoeffs - + (cb->y0 - subband->y0) * tileComp->w - + (cb->x0 - subband->x0); - cb->touched = (char *)gmalloc(1 << (tileComp->codeBlockW - + tileComp->codeBlockH)); - cb->len = 0; - for (cbj = 0; cbj < cb->y1 - cb->y0; ++cbj) { - for (cbi = 0; cbi < cb->x1 - cb->x0; ++cbi) { - cb->coeffs[cbj * tileComp->w + cbi] = 0; - } - } - memset(cb->touched, 0, - (1 << (tileComp->codeBlockW + tileComp->codeBlockH))); - cb->arithDecoder = NULL; - cb->stats = NULL; - ++cb; - } - } - } - } - } - } - } - - return readTilePartData(tileIdx, tilePartLen, tilePartToEOC); -} - -GBool JPXStream::readTilePartData(Guint tileIdx, - Guint tilePartLen, GBool tilePartToEOC) { - JPXTile *tile; - JPXTileComp *tileComp; - JPXResLevel *resLevel; - JPXPrecinct *precinct; - JPXSubband *subband; - JPXCodeBlock *cb; - Guint ttVal; - Guint bits, cbX, cbY, nx, ny, i, j, n, sb; - int level; - - tile = &img.tiles[tileIdx]; - - // read all packets from this tile-part - while (1) { - if (tilePartToEOC) { - //~ peek for an EOC marker - cover(93); - } else if (tilePartLen == 0) { - break; - } - - tileComp = &tile->tileComps[tile->comp]; - resLevel = &tileComp->resLevels[tile->res]; - precinct = &resLevel->precincts[tile->precinct]; - - //----- packet header - - // setup - startBitBuf(tilePartLen); - if (tileComp->style & 0x02) { - skipSOP(); - } - - // zero-length flag - if (!readBits(1, &bits)) { - goto err; - } - if (!bits) { - // packet is empty -- clear all code-block inclusion flags - cover(45); - for (sb = 0; sb < (Guint)(tile->res == 0 ? 1 : 3); ++sb) { - subband = &precinct->subbands[sb]; - for (cbY = 0; cbY < subband->nYCBs; ++cbY) { - for (cbX = 0; cbX < subband->nXCBs; ++cbX) { - cb = &subband->cbs[cbY * subband->nXCBs + cbX]; - cb->included = gFalse; - } - } - } - } else { - - for (sb = 0; sb < (Guint)(tile->res == 0 ? 1 : 3); ++sb) { - subband = &precinct->subbands[sb]; - for (cbY = 0; cbY < subband->nYCBs; ++cbY) { - for (cbX = 0; cbX < subband->nXCBs; ++cbX) { - cb = &subband->cbs[cbY * subband->nXCBs + cbX]; - - // skip code-blocks with no coefficients - if (cb->x0 >= cb->x1 || cb->y0 >= cb->y1) { - cover(46); - cb->included = gFalse; - continue; - } - - // code-block inclusion - if (cb->seen) { - cover(47); - if (!readBits(1, &cb->included)) { - goto err; - } - } else { - cover(48); - ttVal = 0; - i = 0; - for (level = subband->maxTTLevel; level >= 0; --level) { - nx = jpxCeilDivPow2(subband->nXCBs, level); - ny = jpxCeilDivPow2(subband->nYCBs, level); - j = i + (cbY >> level) * nx + (cbX >> level); - if (!subband->inclusion[j].finished && - !subband->inclusion[j].val) { - subband->inclusion[j].val = ttVal; - } else { - ttVal = subband->inclusion[j].val; - } - while (!subband->inclusion[j].finished && - ttVal <= tile->layer) { - if (!readBits(1, &bits)) { - goto err; - } - if (bits == 1) { - subband->inclusion[j].finished = gTrue; - } else { - ++ttVal; - } - } - subband->inclusion[j].val = ttVal; - if (ttVal > tile->layer) { - break; - } - i += nx * ny; - } - cb->included = level < 0; - } - - if (cb->included) { - cover(49); - - // zero bit-plane count - if (!cb->seen) { - cover(50); - ttVal = 0; - i = 0; - for (level = subband->maxTTLevel; level >= 0; --level) { - nx = jpxCeilDivPow2(subband->nXCBs, level); - ny = jpxCeilDivPow2(subband->nYCBs, level); - j = i + (cbY >> level) * nx + (cbX >> level); - if (!subband->zeroBitPlane[j].finished && - !subband->zeroBitPlane[j].val) { - subband->zeroBitPlane[j].val = ttVal; - } else { - ttVal = subband->zeroBitPlane[j].val; - } - while (!subband->zeroBitPlane[j].finished) { - if (!readBits(1, &bits)) { - goto err; - } - if (bits == 1) { - subband->zeroBitPlane[j].finished = gTrue; - } else { - ++ttVal; - } - } - subband->zeroBitPlane[j].val = ttVal; - i += nx * ny; - } - cb->nZeroBitPlanes = ttVal; - } - - // number of coding passes - if (!readBits(1, &bits)) { - goto err; - } - if (bits == 0) { - cover(51); - cb->nCodingPasses = 1; - } else { - if (!readBits(1, &bits)) { - goto err; - } - if (bits == 0) { - cover(52); - cb->nCodingPasses = 2; - } else { - cover(53); - if (!readBits(2, &bits)) { - goto err; - } - if (bits < 3) { - cover(54); - cb->nCodingPasses = 3 + bits; - } else { - cover(55); - if (!readBits(5, &bits)) { - goto err; - } - if (bits < 31) { - cover(56); - cb->nCodingPasses = 6 + bits; - } else { - cover(57); - if (!readBits(7, &bits)) { - goto err; - } - cb->nCodingPasses = 37 + bits; - } - } - } - } - - // update Lblock - while (1) { - if (!readBits(1, &bits)) { - goto err; - } - if (!bits) { - break; - } - ++cb->lBlock; - } - - // one codeword segment for each of the coding passes - if (tileComp->codeBlockStyle & 0x04) { - if (cb->nCodingPasses > cb->dataLenSize) { - cb->dataLenSize = cb->nCodingPasses; - cb->dataLen = (Guint *)greallocn(cb->dataLen, - cb->dataLenSize, - sizeof(Guint)); - } - - // read the lengths - for (i = 0; i < cb->nCodingPasses; ++i) { - if (!readBits(cb->lBlock, &cb->dataLen[i])) { - goto err; - } - } - - // one codeword segment for all of the coding passes - } else { - - // read the length - for (n = cb->lBlock, i = cb->nCodingPasses >> 1; - i; - ++n, i >>= 1) ; - if (!readBits(n, &cb->dataLen[0])) { - goto err; - } - } - } - } - } - } - } - if (tileComp->style & 0x04) { - skipEPH(); - } - tilePartLen = finishBitBuf(); - - //----- packet data - - for (sb = 0; sb < (Guint)(tile->res == 0 ? 1 : 3); ++sb) { - subband = &precinct->subbands[sb]; - for (cbY = 0; cbY < subband->nYCBs; ++cbY) { - for (cbX = 0; cbX < subband->nXCBs; ++cbX) { - cb = &subband->cbs[cbY * subband->nXCBs + cbX]; - if (cb->included) { - if (!readCodeBlockData(tileComp, resLevel, precinct, subband, - tile->res, sb, cb)) { - return gFalse; - } - if (tileComp->codeBlockStyle & 0x04) { - for (i = 0; i < cb->nCodingPasses; ++i) { - tilePartLen -= cb->dataLen[i]; - } - } else { - tilePartLen -= cb->dataLen[0]; - } - cb->seen = gTrue; - } - } - } - } - - //----- next packet - - switch (tile->progOrder) { - case 0: // layer, resolution level, component, precinct - cover(58); - if (++tile->comp == img.nComps) { - tile->comp = 0; - if (++tile->res == tile->maxNDecompLevels + 1) { - tile->res = 0; - if (++tile->layer == tile->nLayers) { - tile->layer = 0; - } - } - } - break; - case 1: // resolution level, layer, component, precinct - cover(59); - if (++tile->comp == img.nComps) { - tile->comp = 0; - if (++tile->layer == tile->nLayers) { - tile->layer = 0; - if (++tile->res == tile->maxNDecompLevels + 1) { - tile->res = 0; - } - } - } - break; - case 2: // resolution level, precinct, component, layer - //~ this isn't correct -- see B.12.1.3 - cover(60); - if (++tile->layer == tile->nLayers) { - tile->layer = 0; - if (++tile->comp == img.nComps) { - tile->comp = 0; - if (++tile->res == tile->maxNDecompLevels + 1) { - tile->res = 0; - } - } - tileComp = &tile->tileComps[tile->comp]; - if (tile->res >= tileComp->nDecompLevels + 1) { - if (++tile->comp == img.nComps) { - return gTrue; - } - } - } - break; - case 3: // precinct, component, resolution level, layer - //~ this isn't correct -- see B.12.1.4 - cover(61); - if (++tile->layer == tile->nLayers) { - tile->layer = 0; - if (++tile->res == tile->maxNDecompLevels + 1) { - tile->res = 0; - if (++tile->comp == img.nComps) { - tile->comp = 0; - } - } - } - break; - case 4: // component, precinct, resolution level, layer - //~ this isn't correct -- see B.12.1.5 - cover(62); - if (++tile->layer == tile->nLayers) { - tile->layer = 0; - if (++tile->res == tile->maxNDecompLevels + 1) { - tile->res = 0; - if (++tile->comp == img.nComps) { - tile->comp = 0; - } - } - } - break; - } - } - - return gTrue; - - err: - error(errSyntaxError, getPos(), "Error in JPX stream"); - return gFalse; -} - -GBool JPXStream::readCodeBlockData(JPXTileComp *tileComp, - JPXResLevel *resLevel, - JPXPrecinct *precinct, - JPXSubband *subband, - Guint res, Guint sb, - JPXCodeBlock *cb) { - int *coeff0, *coeff1, *coeff; - char *touched0, *touched1, *touched; - Guint horiz, vert, diag, all, cx, xorBit; - int horizSign, vertSign, bit; - int segSym; - Guint i, x, y0, y1; - - if (cb->arithDecoder) { - cover(63); - cb->arithDecoder->restart(cb->dataLen[0]); - } else { - cover(64); - cb->arithDecoder = new JArithmeticDecoder(); - cb->arithDecoder->setStream(bufStr, cb->dataLen[0]); - cb->arithDecoder->start(); - cb->stats = new JArithmeticDecoderStats(jpxNContexts); - cb->stats->setEntry(jpxContextSigProp, 4, 0); - cb->stats->setEntry(jpxContextRunLength, 3, 0); - cb->stats->setEntry(jpxContextUniform, 46, 0); - } - - for (i = 0; i < cb->nCodingPasses; ++i) { - if ((tileComp->codeBlockStyle & 0x04) && i > 0) { - cb->arithDecoder->setStream(bufStr, cb->dataLen[i]); - cb->arithDecoder->start(); - } - - switch (cb->nextPass) { - - //----- significance propagation pass - case jpxPassSigProp: - cover(65); - for (y0 = cb->y0, coeff0 = cb->coeffs, touched0 = cb->touched; - y0 < cb->y1; - y0 += 4, coeff0 += 4 * tileComp->w, - touched0 += 4 << tileComp->codeBlockW) { - for (x = cb->x0, coeff1 = coeff0, touched1 = touched0; - x < cb->x1; - ++x, ++coeff1, ++touched1) { - for (y1 = 0, coeff = coeff1, touched = touched1; - y1 < 4 && y0+y1 < cb->y1; - ++y1, coeff += tileComp->w, touched += tileComp->cbW) { - if (!*coeff) { - horiz = vert = diag = 0; - horizSign = vertSign = 2; - if (x > cb->x0) { - if (coeff[-1]) { - ++horiz; - horizSign += coeff[-1] < 0 ? -1 : 1; - } - if (y0+y1 > cb->y0) { - diag += coeff[-(int)tileComp->w - 1] ? 1 : 0; - } - if (y0+y1 < cb->y1 - 1 && - (!(tileComp->codeBlockStyle & 0x08) || y1 < 3)) { - diag += coeff[tileComp->w - 1] ? 1 : 0; - } - } - if (x < cb->x1 - 1) { - if (coeff[1]) { - ++horiz; - horizSign += coeff[1] < 0 ? -1 : 1; - } - if (y0+y1 > cb->y0) { - diag += coeff[-(int)tileComp->w + 1] ? 1 : 0; - } - if (y0+y1 < cb->y1 - 1 && - (!(tileComp->codeBlockStyle & 0x08) || y1 < 3)) { - diag += coeff[tileComp->w + 1] ? 1 : 0; - } - } - if (y0+y1 > cb->y0) { - if (coeff[-(int)tileComp->w]) { - ++vert; - vertSign += coeff[-(int)tileComp->w] < 0 ? -1 : 1; - } - } - if (y0+y1 < cb->y1 - 1 && - (!(tileComp->codeBlockStyle & 0x08) || y1 < 3)) { - if (coeff[tileComp->w]) { - ++vert; - vertSign += coeff[tileComp->w] < 0 ? -1 : 1; - } - } - cx = sigPropContext[horiz][vert][diag][res == 0 ? 1 : sb]; - if (cx != 0) { - if (cb->arithDecoder->decodeBit(cx, cb->stats)) { - cx = signContext[horizSign][vertSign][0]; - xorBit = signContext[horizSign][vertSign][1]; - if (cb->arithDecoder->decodeBit(cx, cb->stats) ^ xorBit) { - *coeff = -1; - } else { - *coeff = 1; - } - } - *touched = 1; - } - } - } - } - } - ++cb->nextPass; - break; - - //----- magnitude refinement pass - case jpxPassMagRef: - cover(66); - for (y0 = cb->y0, coeff0 = cb->coeffs, touched0 = cb->touched; - y0 < cb->y1; - y0 += 4, coeff0 += 4 * tileComp->w, - touched0 += 4 << tileComp->codeBlockW) { - for (x = cb->x0, coeff1 = coeff0, touched1 = touched0; - x < cb->x1; - ++x, ++coeff1, ++touched1) { - for (y1 = 0, coeff = coeff1, touched = touched1; - y1 < 4 && y0+y1 < cb->y1; - ++y1, coeff += tileComp->w, touched += tileComp->cbW) { - if (*coeff && !*touched) { - if (*coeff == 1 || *coeff == -1) { - all = 0; - if (x > cb->x0) { - all += coeff[-1] ? 1 : 0; - if (y0+y1 > cb->y0) { - all += coeff[-(int)tileComp->w - 1] ? 1 : 0; - } - if (y0+y1 < cb->y1 - 1 && - (!(tileComp->codeBlockStyle & 0x08) || y1 < 3)) { - all += coeff[tileComp->w - 1] ? 1 : 0; - } - } - if (x < cb->x1 - 1) { - all += coeff[1] ? 1 : 0; - if (y0+y1 > cb->y0) { - all += coeff[-(int)tileComp->w + 1] ? 1 : 0; - } - if (y0+y1 < cb->y1 - 1 && - (!(tileComp->codeBlockStyle & 0x08) || y1 < 3)) { - all += coeff[tileComp->w + 1] ? 1 : 0; - } - } - if (y0+y1 > cb->y0) { - all += coeff[-(int)tileComp->w] ? 1 : 0; - } - if (y0+y1 < cb->y1 - 1 && - (!(tileComp->codeBlockStyle & 0x08) || y1 < 3)) { - all += coeff[tileComp->w] ? 1 : 0; - } - cx = all ? 15 : 14; - } else { - cx = 16; - } - bit = cb->arithDecoder->decodeBit(cx, cb->stats); - if (*coeff < 0) { - *coeff = (*coeff << 1) - bit; - } else { - *coeff = (*coeff << 1) + bit; - } - *touched = 1; - } - } - } - } - ++cb->nextPass; - break; - - //----- cleanup pass - case jpxPassCleanup: - cover(67); - for (y0 = cb->y0, coeff0 = cb->coeffs, touched0 = cb->touched; - y0 < cb->y1; - y0 += 4, coeff0 += 4 * tileComp->w, - touched0 += 4 << tileComp->codeBlockW) { - for (x = cb->x0, coeff1 = coeff0, touched1 = touched0; - x < cb->x1; - ++x, ++coeff1, ++touched1) { - y1 = 0; - if (y0 + 3 < cb->y1 && - !(*touched1) && - !(touched1[tileComp->cbW]) && - !(touched1[2 * tileComp->cbW]) && - !(touched1[3 * tileComp->cbW]) && - (x == cb->x0 || y0 == cb->y0 || - !coeff1[-(int)tileComp->w - 1]) && - (y0 == cb->y0 || - !coeff1[-(int)tileComp->w]) && - (x == cb->x1 - 1 || y0 == cb->y0 || - !coeff1[-(int)tileComp->w + 1]) && - (x == cb->x0 || - (!coeff1[-1] && - !coeff1[tileComp->w - 1] && - !coeff1[2 * tileComp->w - 1] && - !coeff1[3 * tileComp->w - 1])) && - (x == cb->x1 - 1 || - (!coeff1[1] && - !coeff1[tileComp->w + 1] && - !coeff1[2 * tileComp->w + 1] && - !coeff1[3 * tileComp->w + 1])) && - ((tileComp->codeBlockStyle & 0x08) || - ((x == cb->x0 || y0+4 == cb->y1 || - !coeff1[4 * tileComp->w - 1]) && - (y0+4 == cb->y1 || - !coeff1[4 * tileComp->w]) && - (x == cb->x1 - 1 || y0+4 == cb->y1 || - !coeff1[4 * tileComp->w + 1])))) { - if (cb->arithDecoder->decodeBit(jpxContextRunLength, cb->stats)) { - y1 = cb->arithDecoder->decodeBit(jpxContextUniform, cb->stats); - y1 = (y1 << 1) | - cb->arithDecoder->decodeBit(jpxContextUniform, cb->stats); - coeff = &coeff1[y1 * tileComp->w]; - cx = signContext[2][2][0]; - xorBit = signContext[2][2][1]; - if (cb->arithDecoder->decodeBit(cx, cb->stats) ^ xorBit) { - *coeff = -1; - } else { - *coeff = 1; - } - ++y1; - } else { - y1 = 4; - } - } - for (coeff = &coeff1[y1 * tileComp->w], - touched = &touched1[y1 << tileComp->codeBlockW]; - y1 < 4 && y0 + y1 < cb->y1; - ++y1, coeff += tileComp->w, touched += tileComp->cbW) { - if (!*touched) { - horiz = vert = diag = 0; - horizSign = vertSign = 2; - if (x > cb->x0) { - if (coeff[-1]) { - ++horiz; - horizSign += coeff[-1] < 0 ? -1 : 1; - } - if (y0+y1 > cb->y0) { - diag += coeff[-(int)tileComp->w - 1] ? 1 : 0; - } - if (y0+y1 < cb->y1 - 1 && - (!(tileComp->codeBlockStyle & 0x08) || y1 < 3)) { - diag += coeff[tileComp->w - 1] ? 1 : 0; - } - } - if (x < cb->x1 - 1) { - if (coeff[1]) { - ++horiz; - horizSign += coeff[1] < 0 ? -1 : 1; - } - if (y0+y1 > cb->y0) { - diag += coeff[-(int)tileComp->w + 1] ? 1 : 0; - } - if (y0+y1 < cb->y1 - 1 && - (!(tileComp->codeBlockStyle & 0x08) || y1 < 3)) { - diag += coeff[tileComp->w + 1] ? 1 : 0; - } - } - if (y0+y1 > cb->y0) { - if (coeff[-(int)tileComp->w]) { - ++vert; - vertSign += coeff[-(int)tileComp->w] < 0 ? -1 : 1; - } - } - if (y0+y1 < cb->y1 - 1 && - (!(tileComp->codeBlockStyle & 0x08) || y1 < 3)) { - if (coeff[tileComp->w]) { - ++vert; - vertSign += coeff[tileComp->w] < 0 ? -1 : 1; - } - } - cx = sigPropContext[horiz][vert][diag][res == 0 ? 1 : sb]; - if (cb->arithDecoder->decodeBit(cx, cb->stats)) { - cx = signContext[horizSign][vertSign][0]; - xorBit = signContext[horizSign][vertSign][1]; - if (cb->arithDecoder->decodeBit(cx, cb->stats) ^ xorBit) { - *coeff = -1; - } else { - *coeff = 1; - } - } - } else { - *touched = 0; - } - } - } - } - ++cb->len; - // look for a segmentation symbol - if (tileComp->codeBlockStyle & 0x20) { - segSym = cb->arithDecoder->decodeBit(jpxContextUniform, - cb->stats) << 3; - segSym |= cb->arithDecoder->decodeBit(jpxContextUniform, - cb->stats) << 2; - segSym |= cb->arithDecoder->decodeBit(jpxContextUniform, - cb->stats) << 1; - segSym |= cb->arithDecoder->decodeBit(jpxContextUniform, - cb->stats); - if (segSym != 0x0a) { - // in theory this should be a fatal error, but it seems to - // be problematic - error(errSyntaxWarning, getPos(), - "Missing or invalid segmentation symbol in JPX stream"); - } - } - cb->nextPass = jpxPassSigProp; - break; - } - - if (tileComp->codeBlockStyle & 0x02) { - cb->stats->reset(); - cb->stats->setEntry(jpxContextSigProp, 4, 0); - cb->stats->setEntry(jpxContextRunLength, 3, 0); - cb->stats->setEntry(jpxContextUniform, 46, 0); - } - - if (tileComp->codeBlockStyle & 0x04) { - cb->arithDecoder->cleanup(); - } - } - - cb->arithDecoder->cleanup(); - return gTrue; -} - -// Inverse quantization, and wavelet transform (IDWT). This also does -// the initial shift to convert to fixed point format. -void JPXStream::inverseTransform(JPXTileComp *tileComp) { - JPXResLevel *resLevel; - JPXPrecinct *precinct; - JPXSubband *subband; - JPXCodeBlock *cb; - int *coeff0, *coeff; - char *touched0, *touched; - Guint qStyle, guard, eps, shift; - int shift2; - double mu; - int val; - Guint r, cbX, cbY, x, y; - - cover(68); - - //----- (NL)LL subband (resolution level 0) - - resLevel = &tileComp->resLevels[0]; - precinct = &resLevel->precincts[0]; - subband = &precinct->subbands[0]; - - // i-quant parameters - qStyle = tileComp->quantStyle & 0x1f; - guard = (tileComp->quantStyle >> 5) & 7; - if (qStyle == 0) { - cover(69); - eps = (tileComp->quantSteps[0] >> 3) & 0x1f; - shift = guard + eps - 1; - mu = 0; // make gcc happy - } else { - cover(70); - shift = guard - 1 + tileComp->prec; - mu = (double)(0x800 + (tileComp->quantSteps[0] & 0x7ff)) / 2048.0; - } - if (tileComp->transform == 0) { - cover(71); - shift += fracBits; - } - - // do fixed point adjustment and dequantization on (NL)LL - cb = subband->cbs; - for (cbY = 0; cbY < subband->nYCBs; ++cbY) { - for (cbX = 0; cbX < subband->nXCBs; ++cbX) { - for (y = cb->y0, coeff0 = cb->coeffs, touched0 = cb->touched; - y < cb->y1; - ++y, coeff0 += tileComp->w, touched0 += tileComp->cbW) { - for (x = cb->x0, coeff = coeff0, touched = touched0; - x < cb->x1; - ++x, ++coeff, ++touched) { - val = *coeff; - if (val != 0) { - shift2 = shift - (cb->nZeroBitPlanes + cb->len + *touched); - if (shift2 > 0) { - cover(94); - if (val < 0) { - val = (val << shift2) - (1 << (shift2 - 1)); - } else { - val = (val << shift2) + (1 << (shift2 - 1)); - } - } else { - cover(95); - val >>= -shift2; - } - if (qStyle == 0) { - cover(96); - if (tileComp->transform == 0) { - cover(97); - val &= -1 << fracBits; - } - } else { - cover(98); - val = (int)((double)val * mu); - } - } - *coeff = val; - } - } - ++cb; - } - } - - //----- IDWT for each level - - for (r = 1; r <= tileComp->nDecompLevels; ++r) { - resLevel = &tileComp->resLevels[r]; - - // (n)LL is already in the upper-left corner of the - // tile-component data array -- interleave with (n)HL/LH/HH - // and inverse transform to get (n-1)LL, which will be stored - // in the upper-left corner of the tile-component data array - inverseTransformLevel(tileComp, r, resLevel); - } -} - -// Do one level of the inverse transform: -// - take (n)LL, (n)HL, (n)LH, and (n)HH from the upper-left corner -// of the tile-component data array -// - leave the resulting (n-1)LL in the same place -void JPXStream::inverseTransformLevel(JPXTileComp *tileComp, - Guint r, JPXResLevel *resLevel) { - JPXPrecinct *precinct; - JPXSubband *subband; - JPXCodeBlock *cb; - int *coeff0, *coeff; - char *touched0, *touched; - Guint qStyle, guard, eps, shift, t; - int shift2; - double mu; - int val; - int *dataPtr, *bufPtr; - Guint nx1, nx2, ny1, ny2, offset; - Guint x, y, sb, cbX, cbY; - - //----- fixed-point adjustment and dequantization - - qStyle = tileComp->quantStyle & 0x1f; - guard = (tileComp->quantStyle >> 5) & 7; - precinct = &resLevel->precincts[0]; - for (sb = 0; sb < 3; ++sb) { - - // i-quant parameters - if (qStyle == 0) { - cover(100); - const Guint stepIndex = 3*r - 2 + sb; - if (unlikely(stepIndex >= tileComp->nQuantSteps)) { - error(errSyntaxError, getPos(), - "Wrong index for quantSteps in inverseTransformLevel in JPX stream"); - break; - } - eps = (tileComp->quantSteps[stepIndex] >> 3) & 0x1f; - shift = guard + eps - 1; - mu = 0; // make gcc happy - } else { - cover(101); - shift = guard + tileComp->prec; - if (sb == 2) { - cover(102); - ++shift; - } - const Guint stepIndex = qStyle == 1 ? 0 : (3*r - 2 + sb); - if (unlikely(stepIndex >= tileComp->nQuantSteps)) { - error(errSyntaxError, getPos(), - "Wrong index for quantSteps in inverseTransformLevel in JPX stream"); - break; - } - t = tileComp->quantSteps[stepIndex]; - mu = (double)(0x800 + (t & 0x7ff)) / 2048.0; - } - if (tileComp->transform == 0) { - cover(103); - shift += fracBits; - } - - // fixed point adjustment and dequantization - subband = &precinct->subbands[sb]; - cb = subband->cbs; - for (cbY = 0; cbY < subband->nYCBs; ++cbY) { - for (cbX = 0; cbX < subband->nXCBs; ++cbX) { - for (y = cb->y0, coeff0 = cb->coeffs, touched0 = cb->touched; - y < cb->y1; - ++y, coeff0 += tileComp->w, touched0 += tileComp->cbW) { - for (x = cb->x0, coeff = coeff0, touched = touched0; - x < cb->x1; - ++x, ++coeff, ++touched) { - val = *coeff; - if (val != 0) { - shift2 = shift - (cb->nZeroBitPlanes + cb->len + *touched); - if (shift2 > 0) { - cover(74); - if (val < 0) { - val = (val << shift2) - (1 << (shift2 - 1)); - } else { - val = (val << shift2) + (1 << (shift2 - 1)); - } - } else { - cover(75); - val >>= -shift2; - } - if (qStyle == 0) { - cover(76); - if (tileComp->transform == 0) { - val &= -1 << fracBits; - } - } else { - cover(77); - val = (int)((double)val * mu); - } - } - *coeff = val; - } - } - ++cb; - } - } - } - - //----- inverse transform - - // compute the subband bounds: - // 0 nx1 nx2 - // | | | - // v v v - // +----+----+ - // | LL | HL | <- 0 - // +----+----+ - // | LH | HH | <- ny1 - // +----+----+ - // <- ny2 - nx1 = precinct->subbands[1].x1 - precinct->subbands[1].x0; - nx2 = nx1 + precinct->subbands[0].x1 - precinct->subbands[0].x0; - ny1 = precinct->subbands[0].y1 - precinct->subbands[0].y0; - ny2 = ny1 + precinct->subbands[1].y1 - precinct->subbands[1].y0; - - // horizontal (row) transforms - if (r == tileComp->nDecompLevels) { - offset = 3 + (tileComp->x0 & 1); - } else { - offset = 3 + (tileComp->resLevels[r+1].x0 & 1); - } - for (y = 0, dataPtr = tileComp->data; y < ny2; ++y, dataPtr += tileComp->w) { - if (precinct->subbands[0].x0 == precinct->subbands[1].x0) { - // fetch LL/LH - for (x = 0, bufPtr = tileComp->buf + offset; - x < nx1; - ++x, bufPtr += 2) { - *bufPtr = dataPtr[x]; - } - // fetch HL/HH - for (x = nx1, bufPtr = tileComp->buf + offset + 1; - x < nx2; - ++x, bufPtr += 2) { - *bufPtr = dataPtr[x]; - } - } else { - // fetch LL/LH - for (x = 0, bufPtr = tileComp->buf + offset + 1; - x < nx1; - ++x, bufPtr += 2) { - *bufPtr = dataPtr[x]; - } - // fetch HL/HH - for (x = nx1, bufPtr = tileComp->buf + offset; - x < nx2; - ++x, bufPtr += 2) { - *bufPtr = dataPtr[x]; - } - } - if (tileComp->x1 - tileComp->x0 > tileComp->y1 - tileComp->y0) { - x = tileComp->x1 - tileComp->x0 + 5; - } else { - x = tileComp->y1 - tileComp->y0 + 5; - } - if (offset + nx2 > x || nx2 == 0) { - error(errSyntaxError, getPos(), - "Invalid call of inverseTransform1D in inverseTransformLevel in JPX stream"); - return; - } - inverseTransform1D(tileComp, tileComp->buf, offset, nx2); - for (x = 0, bufPtr = tileComp->buf + offset; x < nx2; ++x, ++bufPtr) { - dataPtr[x] = *bufPtr; - } - } - - // vertical (column) transforms - if (r == tileComp->nDecompLevels) { - offset = 3 + (tileComp->y0 & 1); - } else { - offset = 3 + (tileComp->resLevels[r+1].y0 & 1); - } - for (x = 0, dataPtr = tileComp->data; x < nx2; ++x, ++dataPtr) { - if (precinct->subbands[1].y0 == precinct->subbands[0].y0) { - // fetch LL/HL - for (y = 0, bufPtr = tileComp->buf + offset; - y < ny1; - ++y, bufPtr += 2) { - *bufPtr = dataPtr[y * tileComp->w]; - } - // fetch LH/HH - for (y = ny1, bufPtr = tileComp->buf + offset + 1; - y < ny2; - ++y, bufPtr += 2) { - *bufPtr = dataPtr[y * tileComp->w]; - } - } else { - // fetch LL/HL - for (y = 0, bufPtr = tileComp->buf + offset + 1; - y < ny1; - ++y, bufPtr += 2) { - *bufPtr = dataPtr[y * tileComp->w]; - } - // fetch LH/HH - for (y = ny1, bufPtr = tileComp->buf + offset; - y < ny2; - ++y, bufPtr += 2) { - *bufPtr = dataPtr[y * tileComp->w]; - } - } - if (tileComp->x1 - tileComp->x0 > tileComp->y1 - tileComp->y0) { - y = tileComp->x1 - tileComp->x0 + 5; - } else { - y = tileComp->y1 - tileComp->y0 + 5; - } - if (offset + ny2 > y || ny2 == 0) { - error(errSyntaxError, getPos(), - "Invalid call of inverseTransform1D in inverseTransformLevel in JPX stream"); - return; - } - inverseTransform1D(tileComp, tileComp->buf, offset, ny2); - for (y = 0, bufPtr = tileComp->buf + offset; y < ny2; ++y, ++bufPtr) { - dataPtr[y * tileComp->w] = *bufPtr; - } - } -} - -void JPXStream::inverseTransform1D(JPXTileComp *tileComp, int *data, - Guint offset, Guint n) { - Guint end, i; - - //----- special case for length = 1 - if (n == 1) { - cover(79); - if (offset == 4) { - cover(104); - *data >>= 1; - } - - } else { - cover(80); - - end = offset + n; - - //----- extend right - data[end] = data[end - 2]; - if (n == 2) { - cover(81); - data[end+1] = data[offset + 1]; - data[end+2] = data[offset]; - data[end+3] = data[offset + 1]; - } else { - cover(82); - data[end+1] = data[end - 3]; - if (n == 3) { - cover(105); - data[end+2] = data[offset + 1]; - data[end+3] = data[offset + 2]; - } else { - cover(106); - data[end+2] = data[end - 4]; - if (n == 4) { - cover(107); - data[end+3] = data[offset + 1]; - } else { - cover(108); - data[end+3] = data[end - 5]; - } - } - } - - //----- extend left - data[offset - 1] = data[offset + 1]; - data[offset - 2] = data[offset + 2]; - data[offset - 3] = data[offset + 3]; - if (offset == 4) { - cover(83); - data[0] = data[offset + 4]; - } - - //----- 9-7 irreversible filter - - if (tileComp->transform == 0) { - cover(84); - // step 1 (even) - for (i = 1; i <= end + 2; i += 2) { - data[i] = (int)(idwtKappa * data[i]); - } - // step 2 (odd) - for (i = 0; i <= end + 3; i += 2) { - data[i] = (int)(idwtIKappa * data[i]); - } - // step 3 (even) - for (i = 1; i <= end + 2; i += 2) { - data[i] = (int)(data[i] - idwtDelta * (data[i-1] + data[i+1])); - } - // step 4 (odd) - for (i = 2; i <= end + 1; i += 2) { - data[i] = (int)(data[i] - idwtGamma * (data[i-1] + data[i+1])); - } - // step 5 (even) - for (i = 3; i <= end; i += 2) { - data[i] = (int)(data[i] - idwtBeta * (data[i-1] + data[i+1])); - } - // step 6 (odd) - for (i = 4; i <= end - 1; i += 2) { - data[i] = (int)(data[i] - idwtAlpha * (data[i-1] + data[i+1])); - } - - //----- 5-3 reversible filter - - } else { - cover(85); - // step 1 (even) - for (i = 3; i <= end; i += 2) { - data[i] -= (data[i-1] + data[i+1] + 2) >> 2; - } - // step 2 (odd) - for (i = 4; i < end; i += 2) { - data[i] += (data[i-1] + data[i+1]) >> 1; - } - } - } -} - -// Inverse multi-component transform and DC level shift. This also -// converts fixed point samples back to integers. -GBool JPXStream::inverseMultiCompAndDC(JPXTile *tile) { - JPXTileComp *tileComp; - int coeff, d0, d1, d2, t, minVal, maxVal, zeroVal; - int *dataPtr; - Guint j, comp, x, y; - - //----- inverse multi-component transform - - if (tile->multiComp == 1) { - cover(86); - if (img.nComps < 3 || - tile->tileComps[0].hSep != tile->tileComps[1].hSep || - tile->tileComps[0].vSep != tile->tileComps[1].vSep || - tile->tileComps[1].hSep != tile->tileComps[2].hSep || - tile->tileComps[1].vSep != tile->tileComps[2].vSep) { - return gFalse; - } - - // inverse irreversible multiple component transform - if (tile->tileComps[0].transform == 0) { - cover(87); - j = 0; - for (y = 0; y < tile->tileComps[0].y1 - tile->tileComps[0].y0; ++y) { - for (x = 0; x < tile->tileComps[0].x1 - tile->tileComps[0].x0; ++x) { - d0 = tile->tileComps[0].data[j]; - d1 = tile->tileComps[1].data[j]; - d2 = tile->tileComps[2].data[j]; - tile->tileComps[0].data[j] = (int)(d0 + 1.402 * d2 + 0.5); - tile->tileComps[1].data[j] = - (int)(d0 - 0.34413 * d1 - 0.71414 * d2 + 0.5); - tile->tileComps[2].data[j] = (int)(d0 + 1.772 * d1 + 0.5); - ++j; - } - } - - // inverse reversible multiple component transform - } else { - cover(88); - j = 0; - for (y = 0; y < tile->tileComps[0].y1 - tile->tileComps[0].y0; ++y) { - for (x = 0; x < tile->tileComps[0].x1 - tile->tileComps[0].x0; ++x) { - d0 = tile->tileComps[0].data[j]; - d1 = tile->tileComps[1].data[j]; - d2 = tile->tileComps[2].data[j]; - tile->tileComps[1].data[j] = t = d0 - ((d2 + d1) >> 2); - tile->tileComps[0].data[j] = d2 + t; - tile->tileComps[2].data[j] = d1 + t; - ++j; - } - } - } - } - - //----- DC level shift - for (comp = 0; comp < img.nComps; ++comp) { - tileComp = &tile->tileComps[comp]; - - // signed: clip - if (tileComp->sgned) { - cover(89); - minVal = -(1 << (tileComp->prec - 1)); - maxVal = (1 << (tileComp->prec - 1)) - 1; - dataPtr = tileComp->data; - for (y = 0; y < tileComp->y1 - tileComp->y0; ++y) { - for (x = 0; x < tileComp->x1 - tileComp->x0; ++x) { - coeff = *dataPtr; - if (tileComp->transform == 0) { - cover(109); - coeff >>= fracBits; - } - if (coeff < minVal) { - cover(110); - coeff = minVal; - } else if (coeff > maxVal) { - cover(111); - coeff = maxVal; - } - *dataPtr++ = coeff; - } - } - - // unsigned: inverse DC level shift and clip - } else { - cover(90); - maxVal = (1 << tileComp->prec) - 1; - zeroVal = 1 << (tileComp->prec - 1); - dataPtr = tileComp->data; - for (y = 0; y < tileComp->y1 - tileComp->y0; ++y) { - for (x = 0; x < tileComp->x1 - tileComp->x0; ++x) { - coeff = *dataPtr; - if (tileComp->transform == 0) { - cover(112); - coeff >>= fracBits; - } - coeff += zeroVal; - if (coeff < 0) { - cover(113); - coeff = 0; - } else if (coeff > maxVal) { - cover(114); - coeff = maxVal; - } - *dataPtr++ = coeff; - } - } - } - } - - return gTrue; -} - -GBool JPXStream::readBoxHdr(Guint *boxType, Guint *boxLen, Guint *dataLen) { - Guint len, lenH; - - if (!readULong(&len) || - !readULong(boxType)) { - return gFalse; - } - if (len == 1) { - if (!readULong(&lenH) || !readULong(&len)) { - return gFalse; - } - if (lenH) { - error(errSyntaxError, getPos(), - "JPX stream contains a box larger than 2^32 bytes"); - return gFalse; - } - *boxLen = len; - *dataLen = len - 16; - } else if (len == 0) { - *boxLen = 0; - *dataLen = 0; - } else { - *boxLen = len; - *dataLen = len - 8; - } - return gTrue; -} - -int JPXStream::readMarkerHdr(int *segType, Guint *segLen) { - int c; - - do { - do { - if ((c = bufStr->getChar()) == EOF) { - return gFalse; - } - } while (c != 0xff); - do { - if ((c = bufStr->getChar()) == EOF) { - return gFalse; - } - } while (c == 0xff); - } while (c == 0x00); - *segType = c; - if ((c >= 0x30 && c <= 0x3f) || - c == 0x4f || c == 0x92 || c == 0x93 || c == 0xd9) { - *segLen = 0; - return gTrue; - } - return readUWord(segLen); -} - -GBool JPXStream::readUByte(Guint *x) { - int c0; - - if ((c0 = bufStr->getChar()) == EOF) { - return gFalse; - } - *x = (Guint)c0; - return gTrue; -} - -GBool JPXStream::readByte(int *x) { - int c0; - - if ((c0 = bufStr->getChar()) == EOF) { - return gFalse; - } - *x = c0; - if (c0 & 0x80) { - *x |= -1 - 0xff; - } - return gTrue; -} - -GBool JPXStream::readUWord(Guint *x) { - int c0, c1; - - if ((c0 = bufStr->getChar()) == EOF || - (c1 = bufStr->getChar()) == EOF) { - return gFalse; - } - *x = (Guint)((c0 << 8) | c1); - return gTrue; -} - -GBool JPXStream::readULong(Guint *x) { - int c0, c1, c2, c3; - - if ((c0 = bufStr->getChar()) == EOF || - (c1 = bufStr->getChar()) == EOF || - (c2 = bufStr->getChar()) == EOF || - (c3 = bufStr->getChar()) == EOF) { - return gFalse; - } - *x = (Guint)((c0 << 24) | (c1 << 16) | (c2 << 8) | c3); - return gTrue; -} - -GBool JPXStream::readNBytes(int nBytes, GBool signd, int *x) { - int y, c, i; - - y = 0; - for (i = 0; i < nBytes; ++i) { - if ((c = bufStr->getChar()) == EOF) { - return gFalse; - } - y = (y << 8) + c; - } - if (signd) { - if (y & (1 << (8 * nBytes - 1))) { - y |= -1 << (8 * nBytes); - } - } - *x = y; - return gTrue; -} - -void JPXStream::startBitBuf(Guint byteCountA) { - bitBufLen = 0; - bitBufSkip = gFalse; - byteCount = byteCountA; -} - -GBool JPXStream::readBits(int nBits, Guint *x) { - int c; - - while (bitBufLen < nBits) { - if (byteCount == 0 || (c = bufStr->getChar()) == EOF) { - return gFalse; - } - --byteCount; - if (bitBufSkip) { - bitBuf = (bitBuf << 7) | (c & 0x7f); - bitBufLen += 7; - } else { - bitBuf = (bitBuf << 8) | (c & 0xff); - bitBufLen += 8; - } - bitBufSkip = c == 0xff; - } - *x = (bitBuf >> (bitBufLen - nBits)) & ((1 << nBits) - 1); - bitBufLen -= nBits; - return gTrue; -} - -void JPXStream::skipSOP() { - int i; - - // SOP occurs at the start of the packet header, so we don't need to - // worry about bit-stuff prior to it - if (byteCount >= 6 && - bufStr->lookChar(0) == 0xff && - bufStr->lookChar(1) == 0x91) { - for (i = 0; i < 6; ++i) { - bufStr->getChar(); - } - byteCount -= 6; - bitBufLen = 0; - bitBufSkip = gFalse; - } -} - -void JPXStream::skipEPH() { - int i, k; - - k = bitBufSkip ? 1 : 0; - if (byteCount >= (Guint)(k + 2) && - bufStr->lookChar(k) == 0xff && - bufStr->lookChar(k + 1) == 0x92) { - for (i = 0; i < k + 2; ++i) { - bufStr->getChar(); - } - byteCount -= k + 2; - bitBufLen = 0; - bitBufSkip = gFalse; - } -} - -Guint JPXStream::finishBitBuf() { - if (bitBufSkip) { - bufStr->getChar(); - --byteCount; - } - return byteCount; -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/JPXStream.h b/Build/source/libs/poppler/poppler-src/poppler/JPXStream.h deleted file mode 100644 index 8926ffe546a..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/JPXStream.h +++ /dev/null @@ -1,338 +0,0 @@ -//======================================================================== -// -// JPXStream.h -// -// Copyright 2002-2003 Glyph & Cog, LLC -// -//======================================================================== - -#ifndef JPXSTREAM_H -#define JPXSTREAM_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "goo/gtypes.h" -#include "Object.h" -#include "Stream.h" - -class JArithmeticDecoder; -class JArithmeticDecoderStats; - -//------------------------------------------------------------------------ - -enum JPXColorSpaceType { - jpxCSBiLevel = 0, - jpxCSYCbCr1 = 1, - jpxCSYCbCr2 = 3, - jpxCSYCBCr3 = 4, - jpxCSPhotoYCC = 9, - jpxCSCMY = 11, - jpxCSCMYK = 12, - jpxCSYCCK = 13, - jpxCSCIELab = 14, - jpxCSsRGB = 16, - jpxCSGrayscale = 17, - jpxCSBiLevel2 = 18, - jpxCSCIEJab = 19, - jpxCSCISesRGB = 20, - jpxCSROMMRGB = 21, - jpxCSsRGBYCbCr = 22, - jpxCSYPbPr1125 = 23, - jpxCSYPbPr1250 = 24 -}; - -struct JPXColorSpecCIELab { - Guint rl, ol, ra, oa, rb, ob, il; -}; - -struct JPXColorSpecEnumerated { - JPXColorSpaceType type; // color space type - union { - JPXColorSpecCIELab cieLab; - }; -}; - -struct JPXColorSpec { - Guint meth; // method - int prec; // precedence - union { - JPXColorSpecEnumerated enumerated; - }; -}; - -//------------------------------------------------------------------------ - -struct JPXPalette { - Guint nEntries; // number of entries in the palette - Guint nComps; // number of components in each entry - Guint *bpc; // bits per component, for each component - int *c; // color data: - // c[i*nComps+j] = entry i, component j -}; - -//------------------------------------------------------------------------ - -struct JPXCompMap { - Guint nChannels; // number of channels - Guint *comp; // codestream components mapped to each channel - Guint *type; // 0 for direct use, 1 for palette mapping - Guint *pComp; // palette components to use -}; - -//------------------------------------------------------------------------ - -struct JPXChannelDefn { - Guint nChannels; // number of channels - Guint *idx; // channel indexes - Guint *type; // channel types - Guint *assoc; // channel associations -}; - -//------------------------------------------------------------------------ - -struct JPXTagTreeNode { - GBool finished; // true if this node is finished - Guint val; // current value -}; - -//------------------------------------------------------------------------ - -struct JPXCodeBlock { - //----- size - Guint x0, y0, x1, y1; // bounds - - //----- persistent state - GBool seen; // true if this code-block has already - // been seen - Guint lBlock; // base number of bits used for pkt data length - Guint nextPass; // next coding pass - - //---- info from first packet - Guint nZeroBitPlanes; // number of zero bit planes - - //----- info for the current packet - Guint included; // code-block inclusion in this packet: - // 0=not included, 1=included - Guint nCodingPasses; // number of coding passes in this pkt - Guint *dataLen; // data lengths (one per codeword segment) - Guint dataLenSize; // size of the dataLen array - - //----- coefficient data - int *coeffs; - char *touched; // coefficient 'touched' flags - Gushort len; // coefficient length - JArithmeticDecoder // arithmetic decoder - *arithDecoder; - JArithmeticDecoderStats // arithmetic decoder stats - *stats; -}; - -//------------------------------------------------------------------------ - -struct JPXSubband { - //----- computed - Guint x0, y0, x1, y1; // bounds - Guint nXCBs, nYCBs; // number of code-blocks in the x and y - // directions - - //----- tag trees - Guint maxTTLevel; // max tag tree level - JPXTagTreeNode *inclusion; // inclusion tag tree for each subband - JPXTagTreeNode *zeroBitPlane; // zero-bit plane tag tree for each - // subband - - //----- children - JPXCodeBlock *cbs; // the code-blocks (len = nXCBs * nYCBs) -}; - -//------------------------------------------------------------------------ - -struct JPXPrecinct { - //----- computed - Guint x0, y0, x1, y1; // bounds of the precinct - - //----- children - JPXSubband *subbands; // the subbands -}; - -//------------------------------------------------------------------------ - -struct JPXResLevel { - //----- from the COD and COC segments (main and tile) - Guint precinctWidth; // log2(precinct width) - Guint precinctHeight; // log2(precinct height) - - //----- computed - Guint x0, y0, x1, y1; // bounds of the tile-comp (for this res level) - Guint bx0[3], by0[3], // subband bounds - bx1[3], by1[3]; - - //---- children - JPXPrecinct *precincts; // the precincts -}; - -//------------------------------------------------------------------------ - -struct JPXTileComp { - //----- from the SIZ segment - GBool sgned; // 1 for signed, 0 for unsigned - Guint prec; // precision, in bits - Guint hSep; // horizontal separation of samples - Guint vSep; // vertical separation of samples - - //----- from the COD and COC segments (main and tile) - Guint style; // coding style parameter (Scod / Scoc) - Guint nDecompLevels; // number of decomposition levels - Guint codeBlockW; // log2(code-block width) - Guint codeBlockH; // log2(code-block height) - Guint codeBlockStyle; // code-block style - Guint transform; // wavelet transformation - - //----- from the QCD and QCC segments (main and tile) - Guint quantStyle; // quantization style - Guint *quantSteps; // quantization step size for each subband - Guint nQuantSteps; // number of entries in quantSteps - - //----- computed - Guint x0, y0, x1, y1; // bounds of the tile-comp, in ref coords - Guint w; // x1 - x0 - Guint cbW; // code-block width - Guint cbH; // code-block height - - //----- image data - int *data; // the decoded image data - int *buf; // intermediate buffer for the inverse - // transform - - //----- children - JPXResLevel *resLevels; // the resolution levels - // (len = nDecompLevels + 1) -}; - -//------------------------------------------------------------------------ - -struct JPXTile { - GBool init; - - //----- from the COD segments (main and tile) - Guint progOrder; // progression order - Guint nLayers; // number of layers - Guint multiComp; // multiple component transformation - - //----- computed - Guint x0, y0, x1, y1; // bounds of the tile, in ref coords - Guint maxNDecompLevels; // max number of decomposition levels used - // in any component in this tile - - //----- progression order loop counters - Guint comp; // component - Guint res; // resolution level - Guint precinct; // precinct - Guint layer; // layer - - //----- children - JPXTileComp *tileComps; // the tile-components (len = JPXImage.nComps) -}; - -//------------------------------------------------------------------------ - -struct JPXImage { - //----- from the SIZ segment - Guint xSize, ySize; // size of reference grid - Guint xOffset, yOffset; // image offset - Guint xTileSize, yTileSize; // size of tiles - Guint xTileOffset, // offset of first tile - yTileOffset; - Guint nComps; // number of components - - //----- computed - Guint nXTiles; // number of tiles in x direction - Guint nYTiles; // number of tiles in y direction - - //----- children - JPXTile *tiles; // the tiles (len = nXTiles * nYTiles) -}; - -//------------------------------------------------------------------------ - -class JPXStream: public FilterStream { -public: - - JPXStream(Stream *strA); - virtual ~JPXStream(); - virtual StreamKind getKind() override { return strJPX; } - virtual void reset() override; - virtual void close() override; - virtual int getChar() override; - virtual int lookChar() override; - virtual GooString *getPSFilter(int psLevel, const char *indent) override; - virtual GBool isBinary(GBool last = gTrue) override; - virtual void getImageParams(int *bitsPerComponent, - StreamColorSpaceMode *csMode) override; - -private: - - void fillReadBuf(); - void getImageParams2(int *bitsPerComponent, StreamColorSpaceMode *csMode); - GBool readBoxes(); - GBool readColorSpecBox(Guint dataLen); - GBool readCodestream(Guint len); - GBool readTilePart(); - GBool readTilePartData(Guint tileIdx, - Guint tilePartLen, GBool tilePartToEOC); - GBool readCodeBlockData(JPXTileComp *tileComp, - JPXResLevel *resLevel, - JPXPrecinct *precinct, - JPXSubband *subband, - Guint res, Guint sb, - JPXCodeBlock *cb); - void inverseTransform(JPXTileComp *tileComp); - void inverseTransformLevel(JPXTileComp *tileComp, - Guint r, JPXResLevel *resLevel); - void inverseTransform1D(JPXTileComp *tileComp, int *data, - Guint offset, Guint n); - GBool inverseMultiCompAndDC(JPXTile *tile); - GBool readBoxHdr(Guint *boxType, Guint *boxLen, Guint *dataLen); - int readMarkerHdr(int *segType, Guint *segLen); - GBool readUByte(Guint *x); - GBool readByte(int *x); - GBool readUWord(Guint *x); - GBool readULong(Guint *x); - GBool readNBytes(int nBytes, GBool signd, int *x); - void startBitBuf(Guint byteCountA); - GBool readBits(int nBits, Guint *x); - void skipSOP(); - void skipEPH(); - Guint finishBitBuf(); - - BufStream *bufStr; // buffered stream (for lookahead) - - Guint nComps; // number of components - Guint *bpc; // bits per component, for each component - Guint width, height; // image size - GBool haveImgHdr; // set if a JP2/JPX image header has been - // found - JPXColorSpec cs; // color specification - GBool haveCS; // set if a color spec has been found - JPXPalette palette; // the palette - GBool havePalette; // set if a palette has been found - JPXCompMap compMap; // the component mapping - GBool haveCompMap; // set if a component mapping has been found - JPXChannelDefn channelDefn; // channel definition - GBool haveChannelDefn; // set if a channel defn has been found - - JPXImage img; // JPEG2000 decoder data - Guint bitBuf; // buffer for bit reads - int bitBufLen; // number of bits in bitBuf - GBool bitBufSkip; // true if next bit should be skipped - // (for bit stuffing) - Guint byteCount; // number of available bytes left - - Guint curX, curY, curComp; // current position for lookChar/getChar - Guint readBuf; // read buffer - Guint readBufLen; // number of valid bits in readBuf -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/Lexer.cc b/Build/source/libs/poppler/poppler-src/poppler/Lexer.cc deleted file mode 100644 index 9ae19c34ae7..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/Lexer.cc +++ /dev/null @@ -1,644 +0,0 @@ -//======================================================================== -// -// Lexer.cc -// -// Copyright 1996-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2006-2010, 2012-2014, 2017, 2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2006 Krzysztof Kowalczyk <kkowalczyk@gmail.com> -// Copyright (C) 2010 Carlos Garcia Campos <carlosgc@gnome.org> -// Copyright (C) 2012, 2013 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2013 Thomas Freitag <Thomas.Freitag@alfa.de> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include <config.h> - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include <stdlib.h> -#include <stddef.h> -#include <string.h> -#include <limits.h> -#include <ctype.h> -#include "Lexer.h" -#include "Error.h" -#include "XRef.h" - -//------------------------------------------------------------------------ - -// A '1' in this array means the character is white space. A '1' or -// '2' means the character ends a name or command. -static const char specialChars[256] = { - 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, // 0x - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x - 1, 0, 0, 0, 0, 2, 0, 0, 2, 2, 0, 0, 0, 0, 0, 2, // 2x - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, // 3x - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 4x - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, // 5x - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 6x - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, // 7x - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8x - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9x - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // ax - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // bx - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // cx - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // dx - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // ex - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 // fx -}; - -static const int IntegerSafeLimit = (INT_MAX - 9) / 10; -static const long long LongLongSafeLimit = (LLONG_MAX - 9) / 10; - -//------------------------------------------------------------------------ -// Lexer -//------------------------------------------------------------------------ - -Lexer::Lexer(XRef *xrefA, Stream *str) { - lookCharLastValueCached = LOOK_VALUE_NOT_CACHED; - xref = xrefA; - - curStr = Object(str); - streams = new Array(xref); - streams->add(curStr.copy()); - strPtr = 0; - freeArray = gTrue; - curStr.streamReset(); -} - -Lexer::Lexer(XRef *xrefA, Object *obj) { - lookCharLastValueCached = LOOK_VALUE_NOT_CACHED; - xref = xrefA; - - if (obj->isStream()) { - streams = new Array(xref); - freeArray = gTrue; - streams->add(obj->copy()); - } else { - streams = obj->getArray(); - freeArray = gFalse; - } - strPtr = 0; - if (streams->getLength() > 0) { - curStr = streams->get(strPtr); - if (curStr.isStream()) { - curStr.streamReset(); - } - } -} - -Lexer::~Lexer() { - if (curStr.isStream()) { - curStr.streamClose(); - } - if (freeArray) { - delete streams; - } -} - -int Lexer::getChar(GBool comesFromLook) { - int c; - - if (LOOK_VALUE_NOT_CACHED != lookCharLastValueCached) { - c = lookCharLastValueCached; - lookCharLastValueCached = LOOK_VALUE_NOT_CACHED; - return c; - } - - c = EOF; - while (curStr.isStream() && (c = curStr.streamGetChar()) == EOF) { - if (comesFromLook == gTrue) { - return EOF; - } else { - curStr.streamClose(); - curStr = Object(); - ++strPtr; - if (strPtr < streams->getLength()) { - curStr = streams->get(strPtr); - if (curStr.isStream()) { - curStr.streamReset(); - } - } - } - } - return c; -} - -int Lexer::lookChar() { - - if (LOOK_VALUE_NOT_CACHED != lookCharLastValueCached) { - return lookCharLastValueCached; - } - lookCharLastValueCached = getChar(gTrue); - if (lookCharLastValueCached == EOF) { - lookCharLastValueCached = LOOK_VALUE_NOT_CACHED; - return EOF; - } else { - return lookCharLastValueCached; - } -} - -Object Lexer::getObj(int objNum) { - char *p; - int c, c2; - GBool comment, neg, done, overflownInteger, overflownLongLong; - int numParen; - int xi; - long long xll = 0; - double xf = 0, scale; - GooString *s; - int n, m; - - // skip whitespace and comments - comment = gFalse; - while (1) { - if ((c = getChar()) == EOF) { - return Object(objEOF); - } - if (comment) { - if (c == '\r' || c == '\n') - comment = gFalse; - } else if (c == '%') { - comment = gTrue; - } else if (specialChars[c] != 1) { - break; - } - } - - // start reading token - switch (c) { - - // number - case '0': case '1': case '2': case '3': case '4': - case '5': case '6': case '7': case '8': case '9': - case '+': case '-': case '.': - overflownInteger = gFalse; - overflownLongLong = gFalse; - neg = gFalse; - xi = 0; - if (c == '-') { - neg = gTrue; - } else if (c == '.') { - goto doReal; - } else if (c != '+') { - xi = c - '0'; - } - while (1) { - c = lookChar(); - if (isdigit(c)) { - getChar(); - if (unlikely(overflownLongLong)) { - xf = xf * 10.0 + (c - '0'); - } else if (unlikely (overflownInteger)) { - if (unlikely(xll > LongLongSafeLimit) && - (xll > (LLONG_MAX - (c - '0')) / 10)) { - overflownLongLong = gTrue; - xf = xll * 10.0 + (c - '0'); - } else { - xll = xll * 10 + (c - '0'); - } - } else { - if (unlikely(xi > IntegerSafeLimit) && - (xi > (INT_MAX - (c - '0')) / 10.0)) { - overflownInteger = gTrue; - xll = xi * 10LL + (c - '0'); - } else { - xi = xi * 10 + (c - '0'); - } - } - } else if (c == '.') { - getChar(); - goto doReal; - } else { - break; - } - } - if (neg) { - xi = -xi; - xll = -xll; - xf = -xf; - } - if (unlikely(overflownInteger)) { - if (overflownLongLong) { - return Object(xf); - } else { - if (unlikely(xll == INT_MIN)) { - return Object(static_cast<int>(INT_MIN)); - } else { - return Object(xll); - } - } - } else { - return Object(xi); - } - break; - doReal: - if (likely(!overflownInteger)) { - xf = xi; - } else if (!overflownLongLong) { - xf = xll; - } - scale = 0.1; - while (1) { - c = lookChar(); - if (c == '-') { - // ignore minus signs in the middle of numbers to match - // Adobe's behavior - error(errSyntaxWarning, getPos(), "Badly formatted number"); - getChar(); - continue; - } - if (!isdigit(c)) { - break; - } - getChar(); - xf = xf + scale * (c - '0'); - scale *= 0.1; - } - if (neg) { - xf = -xf; - } - return Object(xf); - break; - - // string - case '(': - p = tokBuf; - n = 0; - numParen = 1; - done = gFalse; - s = nullptr; - do { - c2 = EOF; - switch (c = getChar()) { - - case EOF: -#if 0 - // This breaks some PDF files, e.g., ones from Photoshop. - case '\r': - case '\n': -#endif - error(errSyntaxError, getPos(), "Unterminated string"); - done = gTrue; - break; - - case '(': - ++numParen; - c2 = c; - break; - - case ')': - if (--numParen == 0) { - done = gTrue; - } else { - c2 = c; - } - break; - - case '\\': - switch (c = getChar()) { - case 'n': - c2 = '\n'; - break; - case 'r': - c2 = '\r'; - break; - case 't': - c2 = '\t'; - break; - case 'b': - c2 = '\b'; - break; - case 'f': - c2 = '\f'; - break; - case '\\': - case '(': - case ')': - c2 = c; - break; - case '0': case '1': case '2': case '3': - case '4': case '5': case '6': case '7': - c2 = c - '0'; - c = lookChar(); - if (c >= '0' && c <= '7') { - getChar(); - c2 = (c2 << 3) + (c - '0'); - c = lookChar(); - if (c >= '0' && c <= '7') { - getChar(); - c2 = (c2 << 3) + (c - '0'); - } - } - break; - case '\r': - c = lookChar(); - if (c == '\n') { - getChar(); - } - break; - case '\n': - break; - case EOF: - error(errSyntaxError, getPos(), "Unterminated string"); - done = gTrue; - break; - default: - c2 = c; - break; - } - break; - - default: - c2 = c; - break; - } - - if (c2 != EOF) { - if (n == tokBufSize) { - if (!s) - s = new GooString(tokBuf, tokBufSize); - else - s->append(tokBuf, tokBufSize); - p = tokBuf; - n = 0; - - // we are growing see if the document is not malformed and we are growing too much - if (objNum > 0 && xref != nullptr) - { - int newObjNum = xref->getNumEntry(curStr.streamGetPos()); - if (newObjNum != objNum) - { - error(errSyntaxError, getPos(), "Unterminated string"); - done = gTrue; - delete s; - n = -2; - } - } - } - *p++ = (char)c2; - ++n; - } - } while (!done); - if (n >= 0) { - if (!s) - s = new GooString(tokBuf, n); - else - s->append(tokBuf, n); - return Object(s); - } else { - return Object(objEOF); - } - break; - - // name - case '/': - p = tokBuf; - n = 0; - s = nullptr; - while ((c = lookChar()) != EOF && !specialChars[c]) { - getChar(); - if (c == '#') { - c2 = lookChar(); - if (c2 >= '0' && c2 <= '9') { - c = c2 - '0'; - } else if (c2 >= 'A' && c2 <= 'F') { - c = c2 - 'A' + 10; - } else if (c2 >= 'a' && c2 <= 'f') { - c = c2 - 'a' + 10; - } else { - goto notEscChar; - } - getChar(); - c <<= 4; - c2 = getChar(); - if (c2 >= '0' && c2 <= '9') { - c += c2 - '0'; - } else if (c2 >= 'A' && c2 <= 'F') { - c += c2 - 'A' + 10; - } else if (c2 >= 'a' && c2 <= 'f') { - c += c2 - 'a' + 10; - } else { - error(errSyntaxError, getPos(), "Illegal digit in hex char in name"); - } - } - notEscChar: - // the PDF spec claims that names are limited to 127 chars, but - // Distiller 8 will produce longer names, and Acrobat 8 will - // accept longer names - ++n; - if (n < tokBufSize) { - *p++ = c; - } else if (n == tokBufSize) { - error(errSyntaxError, getPos(), "Warning: name token is longer than what the specification says it can be"); - *p = c; - s = new GooString(tokBuf, n); - } else { - s->append((char)c); - } - } - if (n < tokBufSize) { - *p = '\0'; - return Object(objName, tokBuf); - } else { - Object obj(objName, s->getCString()); - delete s; - return obj; - } - break; - - // array punctuation - case '[': - case ']': - tokBuf[0] = c; - tokBuf[1] = '\0'; - return Object(objCmd, tokBuf); - break; - - // hex string or dict punctuation - case '<': - c = lookChar(); - - // dict punctuation - if (c == '<') { - getChar(); - tokBuf[0] = tokBuf[1] = '<'; - tokBuf[2] = '\0'; - return Object(objCmd, tokBuf); - - // hex string - } else { - p = tokBuf; - m = n = 0; - c2 = 0; - s = nullptr; - while (1) { - c = getChar(); - if (c == '>') { - break; - } else if (c == EOF) { - error(errSyntaxError, getPos(), "Unterminated hex string"); - break; - } else if (specialChars[c] != 1) { - c2 = c2 << 4; - if (c >= '0' && c <= '9') - c2 += c - '0'; - else if (c >= 'A' && c <= 'F') - c2 += c - 'A' + 10; - else if (c >= 'a' && c <= 'f') - c2 += c - 'a' + 10; - else - error(errSyntaxError, getPos(), "Illegal character <{0:02x}> in hex string", c); - if (++m == 2) { - if (n == tokBufSize) { - if (!s) - s = new GooString(tokBuf, tokBufSize); - else - s->append(tokBuf, tokBufSize); - p = tokBuf; - n = 0; - } - *p++ = (char)c2; - ++n; - c2 = 0; - m = 0; - } - } - } - if (!s) - s = new GooString(tokBuf, n); - else - s->append(tokBuf, n); - if (m == 1) - s->append((char)(c2 << 4)); - return Object(s); - } - break; - - // dict punctuation - case '>': - c = lookChar(); - if (c == '>') { - getChar(); - tokBuf[0] = tokBuf[1] = '>'; - tokBuf[2] = '\0'; - return Object(objCmd, tokBuf); - } else { - error(errSyntaxError, getPos(), "Illegal character '>'"); - return Object(objError); - } - break; - - // error - case ')': - case '{': - case '}': - error(errSyntaxError, getPos(), "Illegal character '{0:c}'", c); - return Object(objError); - break; - - // command - default: - p = tokBuf; - *p++ = c; - n = 1; - while ((c = lookChar()) != EOF && !specialChars[c]) { - getChar(); - if (++n == tokBufSize) { - error(errSyntaxError, getPos(), "Command token too long"); - break; - } - *p++ = c; - } - *p = '\0'; - if (tokBuf[0] == 't' && !strcmp(tokBuf, "true")) { - return Object(gTrue); - } else if (tokBuf[0] == 'f' && !strcmp(tokBuf, "false")) { - return Object(gFalse); - } else if (tokBuf[0] == 'n' && !strcmp(tokBuf, "null")) { - return Object(objNull); - } else { - return Object(objCmd, tokBuf); - } - break; - } - - return Object(); -} - -Object Lexer::getObj(const char *cmdA, int objNum) { - char *p; - int c; - GBool comment; - int n; - - // skip whitespace and comments - comment = gFalse; - const char *cmd1 = tokBuf; - *tokBuf = 0; - while (strcmp(cmdA, cmd1) && (objNum < 0 || (xref && xref->getNumEntry(getPos()) == objNum))) { - while (1) { - if ((c = getChar()) == EOF) { - return Object(objEOF); - } - if (comment) { - if (c == '\r' || c == '\n') { - comment = gFalse; - } - } else if (c == '%') { - comment = gTrue; - } else if (specialChars[c] != 1) { - break; - } - } - p = tokBuf; - *p++ = c; - n = 1; - while ((c = lookChar()) != EOF && specialChars[c] == 0) { - getChar(); - if (++n == tokBufSize) { - break; - } - *p++ = c; - } - *p = '\0'; - } - - return Object(objCmd, tokBuf); -} - -void Lexer::skipToNextLine() { - int c; - - while (1) { - c = getChar(); - if (c == EOF || c == '\n') { - return; - } - if (c == '\r') { - if ((c = lookChar()) == '\n') { - getChar(); - } - return; - } - } -} - -GBool Lexer::isSpace(int c) { - return c >= 0 && c <= 0xff && specialChars[c] == 1; -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/Lexer.h b/Build/source/libs/poppler/poppler-src/poppler/Lexer.h deleted file mode 100644 index eb692a5c248..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/Lexer.h +++ /dev/null @@ -1,112 +0,0 @@ -//======================================================================== -// -// Lexer.h -// -// Copyright 1996-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2006, 2007, 2010, 2013, 2017, 2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2006 Krzysztof Kowalczyk <kkowalczyk@gmail.com> -// Copyright (C) 2013 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2013 Thomas Freitag <Thomas.Freitag@alfa.de> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef LEXER_H -#define LEXER_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "Object.h" -#include "Stream.h" - -class XRef; - -#define tokBufSize 128 // size of token buffer - -//------------------------------------------------------------------------ -// Lexer -//------------------------------------------------------------------------ - -class Lexer { -public: - - // Construct a lexer for a single stream. Deletes the stream when - // lexer is deleted. - Lexer(XRef *xrefA, Stream *str); - - // Construct a lexer for a stream or array of streams (assumes obj - // is either a stream or array of streams). - Lexer(XRef *xrefA, Object *obj); - - // Destructor. - ~Lexer(); - - Lexer(const Lexer &) = delete; - Lexer& operator=(const Lexer &) = delete; - - // Get the next object from the input stream. - Object getObj(int objNum = -1); - Object getObj(const char *cmdA, int objNum); - template<typename T> Object getObj(T) = delete; - - // Skip to the beginning of the next line in the input stream. - void skipToNextLine(); - - // Skip over one character. - void skipChar() { getChar(); } - - // Get stream. - Stream *getStream() - { return curStr.isStream() ? curStr.getStream() : (Stream *)NULL; } - - // Get current position in file. This is only used for error - // messages. - Goffset getPos() - { return curStr.isStream() ? curStr.streamGetPos() : -1; } - - // Set position in file. - void setPos(Goffset pos, int dir = 0) - { if (curStr.isStream()) curStr.streamSetPos(pos, dir); } - - // Returns true if <c> is a whitespace character. - static GBool isSpace(int c); - - - // often (e.g. ~30% on PDF Refernce 1.6 pdf file from Adobe site) getChar - // is called right after lookChar. In order to avoid expensive re-doing - // getChar() of underlying stream, we cache the last value found by - // lookChar() in lookCharLastValueCached. A special value - // LOOK_VALUE_NOT_CACHED that should never be part of stream indicates - // that no value was cached - static const int LOOK_VALUE_NOT_CACHED = -3; - int lookCharLastValueCached; - -private: - - int getChar(GBool comesFromLook = gFalse); - int lookChar(); - - Array *streams; // array of input streams - int strPtr; // index of current stream - Object curStr; // current stream - GBool freeArray; // should lexer free the streams array? - char tokBuf[tokBufSize]; // temporary token buffer - - XRef *xref; -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/Linearization.cc b/Build/source/libs/poppler/poppler-src/poppler/Linearization.cc deleted file mode 100644 index 8886894f1ad..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/Linearization.cc +++ /dev/null @@ -1,206 +0,0 @@ -//======================================================================== -// -// Linearization.cc -// -// This file is licensed under the GPLv2 or later -// -// Copyright 2010, 2012 Hib Eris <hib@hiberis.nl> -// Copyright 2015 Jason Crain <jason@aquaticape.us> -// Copyright 2017 Albert Astals Cid <aacid@kde.org> -// -//======================================================================== - -#include "Linearization.h" -#include "Parser.h" -#include "Lexer.h" - -//------------------------------------------------------------------------ -// Linearization -//------------------------------------------------------------------------ - -Linearization::Linearization (BaseStream *str) -{ - Parser *parser; - - str->reset(); - parser = new Parser(nullptr, - new Lexer(nullptr, str->makeSubStream(str->getStart(), gFalse, 0, Object(objNull))), - gFalse); - Object obj1 = parser->getObj(); - Object obj2 = parser->getObj(); - Object obj3 = parser->getObj(); - linDict = parser->getObj(); - if (obj1.isInt() && obj2.isInt() && obj3.isCmd("obj") && linDict.isDict()) { - Object obj5 = linDict.dictLookup("Linearized"); - if (!(obj5.isNum() && obj5.getNum() > 0)) { - linDict.setToNull(); - } - } - delete parser; -} - -Linearization:: ~Linearization() -{ -} - -Guint Linearization::getLength() -{ - if (!linDict.isDict()) return 0; - - int length; - if (linDict.getDict()->lookupInt("L", nullptr, &length) && - length > 0) { - return length; - } else { - error(errSyntaxWarning, -1, "Length in linearization table is invalid"); - return 0; - } -} - -Guint Linearization::getHintsOffset() -{ - int hintsOffset; - - Object obj1, obj2; - if (linDict.isDict() && - (obj1 = linDict.dictLookup("H"), obj1.isArray()) && - obj1.arrayGetLength()>=2 && - (obj2 = obj1.arrayGet(0), obj2.isInt()) && - obj2.getInt() > 0) { - hintsOffset = obj2.getInt(); - } else { - error(errSyntaxWarning, -1, "Hints table offset in linearization table is invalid"); - hintsOffset = 0; - } - - return hintsOffset; -} - -Guint Linearization::getHintsLength() -{ - int hintsLength; - - Object obj1, obj2; - if (linDict.isDict() && - (obj1 = linDict.dictLookup("H"), obj1.isArray()) && - obj1.arrayGetLength()>=2 && - (obj2 = obj1.arrayGet(1), obj2.isInt()) && - obj2.getInt() > 0) { - hintsLength = obj2.getInt(); - } else { - error(errSyntaxWarning, -1, "Hints table length in linearization table is invalid"); - hintsLength = 0; - } - - return hintsLength; -} - -Guint Linearization::getHintsOffset2() -{ - int hintsOffset2 = 0; // default to 0 - - Object obj1; - if (linDict.isDict() && - (obj1 = linDict.dictLookup("H"), obj1.isArray()) && - obj1.arrayGetLength()>=4) { - Object obj2 = obj1.arrayGet(2); - if (obj2.isInt() && obj2.getInt() > 0) { - hintsOffset2 = obj2.getInt(); - } else { - error(errSyntaxWarning, -1, "Second hints table offset in linearization table is invalid"); - hintsOffset2 = 0; - } - } - - return hintsOffset2; -} - -Guint Linearization::getHintsLength2() -{ - int hintsLength2 = 0; // default to 0 - - Object obj1; - if (linDict.isDict() && - (obj1 = linDict.dictLookup("H"), obj1.isArray()) && - obj1.arrayGetLength()>=4) { - Object obj2 = obj1.arrayGet(3); - if (obj2.isInt() && obj2.getInt() > 0) { - hintsLength2 = obj2.getInt(); - } else { - error(errSyntaxWarning, -1, "Second hints table length in linearization table is invalid"); - hintsLength2 = 0; - } - } - - return hintsLength2; -} - -int Linearization::getObjectNumberFirst() -{ - int objectNumberFirst = 0; - if (linDict.isDict() && - linDict.getDict()->lookupInt("O", nullptr, &objectNumberFirst) && - objectNumberFirst > 0) { - return objectNumberFirst; - } else { - error(errSyntaxWarning, -1, "Object number of first page in linearization table is invalid"); - return 0; - } -} - -Guint Linearization::getEndFirst() -{ - int pageEndFirst = 0; - if (linDict.isDict() && - linDict.getDict()->lookupInt("E", nullptr, &pageEndFirst) && - pageEndFirst > 0) { - return pageEndFirst; - } else { - error(errSyntaxWarning, -1, "First page end offset in linearization table is invalid"); - return 0; - } -} - -int Linearization::getNumPages() -{ - int numPages = 0; - if (linDict.isDict() && - linDict.getDict()->lookupInt("N", nullptr, &numPages) && - numPages > 0) { - return numPages; - } else { - error(errSyntaxWarning, -1, "Page count in linearization table is invalid"); - return 0; - } -} - -Guint Linearization::getMainXRefEntriesOffset() -{ - int mainXRefEntriesOffset = 0; - if (linDict.isDict() && - linDict.getDict()->lookupInt("T", nullptr, &mainXRefEntriesOffset) && - mainXRefEntriesOffset > 0) { - return mainXRefEntriesOffset; - } else { - error(errSyntaxWarning, -1, "Main Xref offset in linearization table is invalid"); - return 0; - } -} - -int Linearization::getPageFirst() -{ - int pageFirst = 0; // Optional, defaults to 0. - - if (linDict.isDict()) { - linDict.getDict()->lookupInt("P", nullptr, &pageFirst); - } - - if ((pageFirst < 0) || (pageFirst >= getNumPages())) { - error(errSyntaxWarning, -1, "First page in linearization table is invalid"); - return 0; - } - - return pageFirst; -} - - diff --git a/Build/source/libs/poppler/poppler-src/poppler/Linearization.h b/Build/source/libs/poppler/poppler-src/poppler/Linearization.h deleted file mode 100644 index 6728a750aba..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/Linearization.h +++ /dev/null @@ -1,45 +0,0 @@ -//======================================================================== -// -// Linearization.h -// -// This file is licensed under the GPLv2 or later -// -// Copyright 2010 Hib Eris <hib@hiberis.nl> -// -//======================================================================== - -#ifndef LINEARIZATION_H -#define LINEARIZATION_H - -#include "goo/gtypes.h" -#include "Object.h" -class BaseStream; - -//------------------------------------------------------------------------ -// Linearization -//------------------------------------------------------------------------ - -class Linearization { -public: - - Linearization(BaseStream *str); - ~Linearization(); - - Guint getLength(); - Guint getHintsOffset(); - Guint getHintsLength(); - Guint getHintsOffset2(); - Guint getHintsLength2(); - int getObjectNumberFirst(); - Guint getEndFirst(); - int getNumPages(); - Guint getMainXRefEntriesOffset(); - int getPageFirst(); - -private: - - Object linDict; - -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/Link.cc b/Build/source/libs/poppler/poppler-src/poppler/Link.cc deleted file mode 100644 index 4a20752c1d4..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/Link.cc +++ /dev/null @@ -1,984 +0,0 @@ -//======================================================================== -// -// Link.cc -// -// Copyright 1996-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2006, 2008 Pino Toscano <pino@kde.org> -// Copyright (C) 2007, 2010, 2011 Carlos Garcia Campos <carlosgc@gnome.org> -// Copyright (C) 2008 Hugo Mercier <hmercier31@gmail.com> -// Copyright (C) 2008-2010, 2012-2014, 2016-2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2009 Kovid Goyal <kovid@kovidgoyal.net> -// Copyright (C) 2009 Ilya Gorenbein <igorenbein@finjan.com> -// Copyright (C) 2012 Tobias Koening <tobias.koenig@kdab.com> -// 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 -// Copyright (C) 2018 Intevation GmbH <intevation@intevation.de> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include <config.h> - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include <stddef.h> -#include <string.h> -#include "goo/gmem.h" -#include "goo/GooString.h" -#include "goo/GooList.h" -#include "Error.h" -#include "Object.h" -#include "Array.h" -#include "Dict.h" -#include "Link.h" -#include "Sound.h" -#include "FileSpec.h" -#include "Rendition.h" -#include "Annot.h" - -//------------------------------------------------------------------------ -// LinkAction -//------------------------------------------------------------------------ -LinkAction::LinkAction() : nextActionList(nullptr) { -} - -LinkAction::~LinkAction() { - delete nextActionList; -} - -LinkAction *LinkAction::parseDest(const Object *obj) { - LinkAction *action; - - action = new LinkGoTo(obj); - if (!action->isOk()) { - delete action; - return nullptr; - } - return action; -} - -LinkAction *LinkAction::parseAction(const Object *obj, const GooString *baseURI) -{ - std::set<int> seenNextActions; - return parseAction(obj, baseURI, &seenNextActions); -} - -LinkAction *LinkAction::parseAction(const Object *obj, const GooString *baseURI, - std::set<int> *seenNextActions) { - LinkAction *action; - - if (!obj->isDict()) { - error(errSyntaxWarning, -1, "parseAction: Bad annotation action for URI '{0:s}'", - baseURI ? baseURI->getCString() : "NULL"); - return nullptr; - } - - Object obj2 = obj->dictLookup("S"); - - // GoTo action - if (obj2.isName("GoTo")) { - Object obj3 = obj->dictLookup("D"); - action = new LinkGoTo(&obj3); - - // GoToR action - } else if (obj2.isName("GoToR")) { - Object obj3 = obj->dictLookup("F"); - Object obj4 = obj->dictLookup("D"); - action = new LinkGoToR(&obj3, &obj4); - - // Launch action - } else if (obj2.isName("Launch")) { - action = new LinkLaunch(obj); - - // URI action - } else if (obj2.isName("URI")) { - Object obj3 = obj->dictLookup("URI"); - action = new LinkURI(&obj3, baseURI); - - // Named action - } else if (obj2.isName("Named")) { - Object obj3 = obj->dictLookup("N"); - action = new LinkNamed(&obj3); - - // Movie action - } else if (obj2.isName("Movie")) { - action = new LinkMovie(obj); - - // Rendition action - } else if (obj2.isName("Rendition")) { - action = new LinkRendition(obj); - - // Sound action - } else if (obj2.isName("Sound")) { - action = new LinkSound(obj); - - // JavaScript action - } else if (obj2.isName("JavaScript")) { - Object obj3 = obj->dictLookup("JS"); - action = new LinkJavaScript(&obj3); - - // Set-OCG-State action - } else if (obj2.isName("SetOCGState")) { - action = new LinkOCGState(obj); - - // Hide action - } else if (obj2.isName("Hide")) { - action = new LinkHide(obj); - - // unknown action - } else if (obj2.isName()) { - action = new LinkUnknown(obj2.getName()); - - // action is missing or wrong type - } else { - error(errSyntaxWarning, -1, "parseAction: Unknown annotation action object: URI = '{0:s}'", - baseURI ? baseURI->getCString() : "NULL"); - action = nullptr; - } - - if (action && !action->isOk()) { - delete action; - return nullptr; - } - - if (!action) { - return nullptr; - } - - // parse the next actions - const Object nextObj = obj->dictLookup("Next"); - GooList *actionList = nullptr; - if (nextObj.isDict()) { - - // Prevent circles in the tree by checking the ref against used refs in - // our current tree branch. - const Object nextRefObj = obj->dictLookupNF("Next"); - if (nextRefObj.isRef()) { - const Ref ref = nextRefObj.getRef(); - if (!seenNextActions->insert(ref.num).second) { - error(errSyntaxWarning, -1, "parseAction: Circular next actions detected."); - return action; - } - } - - actionList = new GooList(1); - actionList->append(parseAction(&nextObj, nullptr, seenNextActions)); - } else if (nextObj.isArray()) { - const Array *a = nextObj.getArray(); - const int n = a->getLength(); - actionList = new GooList(n); - for (int i = 0; i < n; ++i) { - const Object obj3 = a->get(i); - if (!obj3.isDict()) { - error(errSyntaxWarning, -1, "parseAction: Next array does not contain only dicts"); - continue; - } - - // Similar circle check as above. - const Object obj3Ref = a->getNF(i); - if (obj3Ref.isRef()) { - const Ref ref = obj3Ref.getRef(); - if (!seenNextActions->insert(ref.num).second) { - error(errSyntaxWarning, -1, "parseAction: Circular next actions detected in array."); - return action; - } - } - - actionList->append(parseAction(&obj3, nullptr, seenNextActions)); - } - } - - action->setNextActions(actionList); - - return action; -} - -const GooList *LinkAction::nextActions() const { - return nextActionList; -} - -void LinkAction::setNextActions(GooList *actions) { - delete nextActionList; - nextActionList = actions; -} - -//------------------------------------------------------------------------ -// LinkDest -//------------------------------------------------------------------------ - -LinkDest::LinkDest(const Array *a) { - // initialize fields - left = bottom = right = top = zoom = 0; - changeLeft = changeTop = changeZoom = gFalse; - ok = gFalse; - - // get page - if (a->getLength() < 2) { - error(errSyntaxWarning, -1, "Annotation destination array is too short"); - return; - } - Object obj1 = a->getNF(0); - if (obj1.isInt()) { - pageNum = obj1.getInt() + 1; - pageIsRef = gFalse; - } else if (obj1.isRef()) { - pageRef.num = obj1.getRefNum(); - pageRef.gen = obj1.getRefGen(); - pageIsRef = gTrue; - } else { - error(errSyntaxWarning, -1, "Bad annotation destination"); - return; - } - - // get destination type - obj1 = a->get(1); - - // XYZ link - if (obj1.isName("XYZ")) { - kind = destXYZ; - if (a->getLength() < 3) { - changeLeft = gFalse; - } else { - Object obj2 = a->get(2); - if (obj2.isNull()) { - changeLeft = gFalse; - } else if (obj2.isNum()) { - changeLeft = gTrue; - left = obj2.getNum(); - } else { - error(errSyntaxWarning, -1, "Bad annotation destination position"); - return; - } - } - if (a->getLength() < 4) { - changeTop = gFalse; - } else { - Object obj2 = a->get(3); - if (obj2.isNull()) { - changeTop = gFalse; - } else if (obj2.isNum()) { - changeTop = gTrue; - top = obj2.getNum(); - } else { - error(errSyntaxWarning, -1, "Bad annotation destination position"); - return; - } - } - if (a->getLength() < 5) { - changeZoom = gFalse; - } else { - Object obj2 = a->get(4); - if (obj2.isNull()) { - changeZoom = gFalse; - } else if (obj2.isNum()) { - zoom = obj2.getNum(); - changeZoom = (zoom == 0) ? gFalse : gTrue; - } else { - error(errSyntaxWarning, -1, "Bad annotation destination position"); - return; - } - } - - // Fit link - } else if (obj1.isName("Fit")) { - kind = destFit; - - // FitH link - } else if (obj1.isName("FitH")) { - kind = destFitH; - if (a->getLength() < 3) { - changeTop = gFalse; - } else { - Object obj2 = a->get(2); - if (obj2.isNull()) { - changeTop = gFalse; - } else if (obj2.isNum()) { - changeTop = gTrue; - top = obj2.getNum(); - } else { - error(errSyntaxWarning, -1, "Bad annotation destination position"); - kind = destFit; - } - } - - // FitV link - } else if (obj1.isName("FitV")) { - if (a->getLength() < 3) { - error(errSyntaxWarning, -1, "Annotation destination array is too short"); - return; - } - kind = destFitV; - Object obj2 = a->get(2); - if (obj2.isNull()) { - changeLeft = gFalse; - } else if (obj2.isNum()) { - changeLeft = gTrue; - left = obj2.getNum(); - } else { - error(errSyntaxWarning, -1, "Bad annotation destination position"); - kind = destFit; - } - - // FitR link - } else if (obj1.isName("FitR")) { - if (a->getLength() < 6) { - error(errSyntaxWarning, -1, "Annotation destination array is too short"); - return; - } - kind = destFitR; - Object obj2 = a->get(2); - if (obj2.isNum()) { - left = obj2.getNum(); - } else { - error(errSyntaxWarning, -1, "Bad annotation destination position"); - kind = destFit; - } - obj2 = a->get(3); - if (obj2.isNum()) { - bottom = obj2.getNum(); - } else { - error(errSyntaxWarning, -1, "Bad annotation destination position"); - kind = destFit; - } - obj2 = a->get(4); - if (obj2.isNum()) { - right = obj2.getNum(); - } else { - error(errSyntaxWarning, -1, "Bad annotation destination position"); - kind = destFit; - } - obj2 = a->get(5); - if (obj2.isNum()) { - top = obj2.getNum(); - } else { - error(errSyntaxWarning, -1, "Bad annotation destination position"); - kind = destFit; - } - - // FitB link - } else if (obj1.isName("FitB")) { - kind = destFitB; - - // FitBH link - } else if (obj1.isName("FitBH")) { - if (a->getLength() < 3) { - error(errSyntaxWarning, -1, "Annotation destination array is too short"); - return; - } - kind = destFitBH; - Object obj2 = a->get(2); - if (obj2.isNull()) { - changeTop = gFalse; - } else if (obj2.isNum()) { - changeTop = gTrue; - top = obj2.getNum(); - } else { - error(errSyntaxWarning, -1, "Bad annotation destination position"); - kind = destFit; - } - - // FitBV link - } else if (obj1.isName("FitBV")) { - if (a->getLength() < 3) { - error(errSyntaxWarning, -1, "Annotation destination array is too short"); - return; - } - kind = destFitBV; - Object obj2 = a->get(2); - if (obj2.isNull()) { - changeLeft = gFalse; - } else if (obj2.isNum()) { - changeLeft = gTrue; - left = obj2.getNum(); - } else { - error(errSyntaxWarning, -1, "Bad annotation destination position"); - kind = destFit; - } - - // unknown link kind - } else { - error(errSyntaxWarning, -1, "Unknown annotation destination type"); - } - - ok = gTrue; - return; -} - -LinkDest::LinkDest(const LinkDest *dest) { - kind = dest->kind; - pageIsRef = dest->pageIsRef; - if (pageIsRef) - pageRef = dest->pageRef; - else - pageNum = dest->pageNum; - left = dest->left; - bottom = dest->bottom; - right = dest->right; - top = dest->top; - zoom = dest->zoom; - changeLeft = dest->changeLeft; - changeTop = dest->changeTop; - changeZoom = dest->changeZoom; - ok = gTrue; -} - -//------------------------------------------------------------------------ -// LinkGoTo -//------------------------------------------------------------------------ - -LinkGoTo::LinkGoTo(const Object *destObj) { - dest = nullptr; - namedDest = nullptr; - - // named destination - if (destObj->isName()) { - namedDest = new GooString(destObj->getName()); - } else if (destObj->isString()) { - namedDest = destObj->getString()->copy(); - - // destination dictionary - } else if (destObj->isArray()) { - dest = new LinkDest(destObj->getArray()); - if (!dest->isOk()) { - delete dest; - dest = nullptr; - } - - // error - } else { - error(errSyntaxWarning, -1, "Illegal annotation destination"); - } -} - -LinkGoTo::~LinkGoTo() { - if (dest) - delete dest; - if (namedDest) - delete namedDest; -} - -//------------------------------------------------------------------------ -// LinkGoToR -//------------------------------------------------------------------------ - -LinkGoToR::LinkGoToR(Object *fileSpecObj, Object *destObj) { - fileName = nullptr; - dest = nullptr; - namedDest = nullptr; - - // get file name - Object obj1 = getFileSpecNameForPlatform (fileSpecObj); - if (obj1.isString()) { - fileName = obj1.getString()->copy(); - } - - // named destination - if (destObj->isName()) { - namedDest = new GooString(destObj->getName()); - } else if (destObj->isString()) { - namedDest = destObj->getString()->copy(); - - // destination dictionary - } else if (destObj->isArray()) { - dest = new LinkDest(destObj->getArray()); - if (!dest->isOk()) { - delete dest; - dest = nullptr; - } - - // error - } else { - error(errSyntaxWarning, -1, "Illegal annotation destination"); - } -} - -LinkGoToR::~LinkGoToR() { - if (fileName) - delete fileName; - if (dest) - delete dest; - if (namedDest) - delete namedDest; -} - - -//------------------------------------------------------------------------ -// LinkLaunch -//------------------------------------------------------------------------ - -LinkLaunch::LinkLaunch(const Object *actionObj) { - - fileName = nullptr; - params = nullptr; - - if (actionObj->isDict()) { - Object obj1 = actionObj->dictLookup("F"); - if (!obj1.isNull()) { - Object obj3 = getFileSpecNameForPlatform (&obj1); - if (obj3.isString()) { - fileName = obj3.getString()->copy(); - } - } else { -#ifdef _WIN32 - obj1 = actionObj->dictLookup("Win"); -#else - //~ This hasn't been defined by Adobe yet, so assume it looks - //~ just like the Win dictionary until they say otherwise. - obj1 = actionObj->dictLookup("Unix"); -#endif - if (obj1.isDict()) { - Object obj2 = obj1.dictLookup("F"); - Object obj3 = getFileSpecNameForPlatform (&obj2); - if (obj3.isString()) { - fileName = obj3.getString()->copy(); - } - obj2 = obj1.dictLookup("P"); - if (obj2.isString()) { - params = obj2.getString()->copy(); - } - } else { - error(errSyntaxWarning, -1, "Bad launch-type link action"); - } - } - } -} - -LinkLaunch::~LinkLaunch() { - if (fileName) - delete fileName; - if (params) - delete params; -} - -//------------------------------------------------------------------------ -// LinkURI -//------------------------------------------------------------------------ - -LinkURI::LinkURI(const Object *uriObj, const GooString *baseURI) { - const GooString *uri2; - int n; - char c; - - uri = nullptr; - if (uriObj->isString()) { - uri2 = uriObj->getString(); - n = (int)strcspn(uri2->getCString(), "/:"); - if (n < uri2->getLength() && uri2->getChar(n) == ':') { - // "http:..." etc. - uri = uri2->copy(); - } else if (!uri2->cmpN("www.", 4)) { - // "www.[...]" without the leading "http://" - uri = new GooString("http://"); - uri->append(uri2); - } else { - // relative URI - if (baseURI) { - uri = baseURI->copy(); - if (uri->getLength() > 0) { - c = uri->getChar(uri->getLength() - 1); - if (c != '/' && c != '?') { - uri->append('/'); - } - } - if (uri2->getChar(0) == '/') { - uri->append(uri2->getCString() + 1, uri2->getLength() - 1); - } else { - uri->append(uri2); - } - } else { - uri = uri2->copy(); - } - } - } else { - error(errSyntaxWarning, -1, "Illegal URI-type link"); - } -} - -LinkURI::~LinkURI() { - if (uri) - delete uri; -} - -//------------------------------------------------------------------------ -// LinkNamed -//------------------------------------------------------------------------ - -LinkNamed::LinkNamed(const Object *nameObj) { - name = nullptr; - if (nameObj->isName()) { - name = new GooString(nameObj->getName()); - } -} - -LinkNamed::~LinkNamed() { - if (name) { - delete name; - } -} - -//------------------------------------------------------------------------ -// LinkMovie -//------------------------------------------------------------------------ - -LinkMovie::LinkMovie(const Object *obj) { - annotRef.num = -1; - annotTitle = nullptr; - - Object tmp = obj->dictLookupNF("Annotation"); - if (tmp.isRef()) { - annotRef = tmp.getRef(); - } - - tmp = obj->dictLookup("T"); - if (tmp.isString()) { - annotTitle = tmp.getString()->copy(); - } - - if ((annotTitle == nullptr) && (annotRef.num == -1)) { - error(errSyntaxError, -1, - "Movie action is missing both the Annot and T keys"); - } - - tmp = obj->dictLookup("Operation"); - if (tmp.isName()) { - const char *name = tmp.getName(); - - if (!strcmp(name, "Play")) { - operation = operationTypePlay; - } - else if (!strcmp(name, "Stop")) { - operation = operationTypeStop; - } - else if (!strcmp(name, "Pause")) { - operation = operationTypePause; - } - else if (!strcmp(name, "Resume")) { - operation = operationTypeResume; - } - } -} - -LinkMovie::~LinkMovie() { - if (annotTitle) { - delete annotTitle; - } -} - -//------------------------------------------------------------------------ -// LinkSound -//------------------------------------------------------------------------ - -LinkSound::LinkSound(const Object *soundObj) { - volume = 1.0; - sync = gFalse; - repeat = gFalse; - mix = gFalse; - sound = nullptr; - if (soundObj->isDict()) - { - // volume - Object tmp = soundObj->dictLookup("Volume"); - if (tmp.isNum()) { - volume = tmp.getNum(); - } - // sync - tmp = soundObj->dictLookup("Synchronous"); - if (tmp.isBool()) { - sync = tmp.getBool(); - } - // repeat - tmp = soundObj->dictLookup("Repeat"); - if (tmp.isBool()) { - repeat = tmp.getBool(); - } - // mix - tmp = soundObj->dictLookup("Mix"); - if (tmp.isBool()) { - mix = tmp.getBool(); - } - // 'Sound' object - tmp = soundObj->dictLookup("Sound"); - sound = Sound::parseSound(&tmp); - } -} - -LinkSound::~LinkSound() { - delete sound; -} - -//------------------------------------------------------------------------ -// LinkRendition -//------------------------------------------------------------------------ - -LinkRendition::LinkRendition(const Object *obj) { - operation = NoRendition; - media = nullptr; - js = nullptr; - int operationCode = -1; - - if (obj->isDict()) { - Object tmp = obj->dictLookup("JS"); - if (!tmp.isNull()) { - if (tmp.isString()) { - js = new GooString(tmp.getString()); - } else if (tmp.isStream()) { - Stream *stream = tmp.getStream(); - js = new GooString(); - stream->fillGooString(js); - } else { - error(errSyntaxWarning, -1, "Invalid Rendition Action: JS not string or stream"); - } - } - - tmp = obj->dictLookup("OP"); - if (tmp.isInt()) { - operationCode = tmp.getInt(); - if (!js && (operationCode < 0 || operationCode > 4)) { - error(errSyntaxWarning, -1, "Invalid Rendition Action: unrecognized operation valued: {0:d}", operationCode); - } else { - // retrieve rendition object - renditionObj = obj->dictLookup("R"); - if (renditionObj.isDict()) { - media = new MediaRendition(&renditionObj); - } else if (operationCode == 0 || operationCode == 4) { - error(errSyntaxWarning, -1, "Invalid Rendition Action: no R field with op = {0:d}", operationCode); - renditionObj.setToNull(); - } - - screenRef = obj->dictLookupNF("AN"); - if (!screenRef.isRef() && operation >= 0 && operation <= 4) { - error(errSyntaxWarning, -1, "Invalid Rendition Action: no AN field with op = {0:d}", operationCode); - screenRef.setToNull(); - } - } - - switch (operationCode) { - case 0: - operation = PlayRendition; - break; - case 1: - operation = StopRendition; - break; - case 2: - operation = PauseRendition; - break; - case 3: - operation = ResumeRendition; - break; - case 4: - operation = PlayRendition; - break; - } - } else if (!js) { - error(errSyntaxWarning, -1, "Invalid Rendition action: no OP or JS field defined"); - } - } -} - -LinkRendition::~LinkRendition() { - delete js; - delete media; -} - - -//------------------------------------------------------------------------ -// LinkJavaScript -//------------------------------------------------------------------------ - -LinkJavaScript::LinkJavaScript(Object *jsObj) { - js = nullptr; - - if (jsObj->isString()) { - js = new GooString(jsObj->getString()); - } - else if (jsObj->isStream()) { - Stream *stream = jsObj->getStream(); - js = new GooString(); - stream->fillGooString(js); - } -} - -LinkJavaScript::~LinkJavaScript() { - if (js) { - delete js; - } -} - -//------------------------------------------------------------------------ -// LinkOCGState -//------------------------------------------------------------------------ -LinkOCGState::LinkOCGState(const Object *obj) { - stateList = new GooList(); - preserveRB = gTrue; - - Object obj1 = obj->dictLookup("State"); - if (obj1.isArray()) { - StateList *stList = nullptr; - - for (int i = 0; i < obj1.arrayGetLength(); ++i) { - Object obj2 = obj1.arrayGetNF(i); - if (obj2.isName()) { - if (stList) - stateList->append(stList); - - const char *name = obj2.getName(); - stList = new StateList(); - stList->list = new GooList(); - if (!strcmp (name, "ON")) { - stList->st = On; - } else if (!strcmp (name, "OFF")) { - stList->st = Off; - } else if (!strcmp (name, "Toggle")) { - stList->st = Toggle; - } else { - error(errSyntaxWarning, -1, "Invalid name '{0:s}' in OCG Action state array", name); - delete stList; - stList = nullptr; - } - } else if (obj2.isRef()) { - if (stList) { - Ref ocgRef = obj2.getRef(); - Ref *item = new Ref(); - item->num = ocgRef.num; - item->gen = ocgRef.gen; - stList->list->append(item); - } else { - error(errSyntaxWarning, -1, "Invalid OCG Action State array, expected name instead of ref"); - } - } else { - error(errSyntaxWarning, -1, "Invalid item in OCG Action State array"); - } - } - // Add the last group - if (stList) - stateList->append(stList); - } else { - error(errSyntaxWarning, -1, "Invalid OCGState action"); - delete stateList; - stateList = nullptr; - } - - obj1 = obj->dictLookup("PreserveRB"); - if (obj1.isBool()) { - preserveRB = obj1.getBool(); - } -} - -LinkOCGState::~LinkOCGState() { - if (stateList) - deleteGooList(stateList, StateList); -} - -LinkOCGState::StateList::~StateList() { - if (list) - deleteGooList(list, Ref); -} - -//------------------------------------------------------------------------ -// LinkHide -//------------------------------------------------------------------------ - -LinkHide::LinkHide(const Object *hideObj) { - targetName = nullptr; - show = false; // Default - - if (hideObj->isDict()) { - const Object targetObj = hideObj->dictLookup("T"); - if (targetObj.isString()) { - targetName = targetObj.getString()->copy(); - } - const Object shouldHide = hideObj->dictLookup("H"); - if (shouldHide.isBool()) { - show = !shouldHide.getBool(); - } - } -} - -LinkHide::~LinkHide() { - delete targetName; -} - -//------------------------------------------------------------------------ -// LinkUnknown -//------------------------------------------------------------------------ - -LinkUnknown::LinkUnknown(const char *actionA) { - action = new GooString(actionA); -} - -LinkUnknown::~LinkUnknown() { - delete action; -} - -//------------------------------------------------------------------------ -// Links -//------------------------------------------------------------------------ - -Links::Links(Annots *annots) { - int size; - int i; - - links = nullptr; - size = 0; - numLinks = 0; - - if (!annots) - return; - - for (i = 0; i < annots->getNumAnnots(); ++i) { - Annot *annot = annots->getAnnot(i); - - if (annot->getType() != Annot::typeLink) - continue; - - if (numLinks >= size) { - size += 16; - links = (AnnotLink **)greallocn(links, size, sizeof(AnnotLink *)); - } - annot->incRefCnt(); - links[numLinks++] = static_cast<AnnotLink *>(annot); - } -} - -Links::~Links() { - int i; - - for (i = 0; i < numLinks; ++i) - links[i]->decRefCnt(); - - gfree(links); -} - -LinkAction *Links::find(double x, double y) const { - int i; - - for (i = numLinks - 1; i >= 0; --i) { - if (links[i]->inRect(x, y)) { - return links[i]->getAction(); - } - } - return nullptr; -} - -GBool Links::onLink(double x, double y) const { - int i; - - for (i = 0; i < numLinks; ++i) { - if (links[i]->inRect(x, y)) - return gTrue; - } - return gFalse; -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/Link.h b/Build/source/libs/poppler/poppler-src/poppler/Link.h deleted file mode 100644 index 3dbe57fd2e0..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/Link.h +++ /dev/null @@ -1,561 +0,0 @@ -//======================================================================== -// -// Link.h -// -// Copyright 1996-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2006, 2008 Pino Toscano <pino@kde.org> -// Copyright (C) 2008 Hugo Mercier <hmercier31@gmail.com> -// Copyright (C) 2010, 2011 Carlos Garcia Campos <carlosgc@gnome.org> -// Copyright (C) 2012 Tobias Koening <tobias.koenig@kdab.com> -// Copyright (C) 2018 Albert Astals Cid <aacid@kde.org> -// 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 -// Copyright (C) 2018 Intevation GmbH <intevation@intevation.de> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef LINK_H -#define LINK_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "Object.h" -#include <memory> -#include <set> - -class GooString; -class GooList; -class Array; -class Dict; -class Sound; -class MediaRendition; -class AnnotLink; -class Annots; - -//------------------------------------------------------------------------ -// LinkAction -//------------------------------------------------------------------------ - -enum LinkActionKind { - actionGoTo, // go to destination - actionGoToR, // go to destination in new file - actionLaunch, // launch app (or open document) - actionURI, // URI - actionNamed, // named action - actionMovie, // movie action - actionRendition, // rendition action - actionSound, // sound action - actionJavaScript, // JavaScript action - actionOCGState, // Set-OCG-State action - actionHide, // Hide action - actionUnknown // anything else -}; - -class LinkAction { -public: - - LinkAction(); - LinkAction(const LinkAction &) = delete; - LinkAction& operator=(const LinkAction &other) = delete; - - // Destructor. - virtual ~LinkAction(); - - // Was the LinkAction created successfully? - virtual GBool isOk() const = 0; - - // Check link action type. - virtual LinkActionKind getKind() const = 0; - - // Parse a destination (old-style action) name, string, or array. - static LinkAction *parseDest(const Object *obj); - - // Parse an action dictionary. - static LinkAction *parseAction(const Object *obj, const GooString *baseURI = nullptr); - - // A List of the next actions to execute in order. - // The list contains pointer to LinkAction objects. - const GooList *nextActions() const; - - // Sets the next action list. Takes ownership of the actions. - void setNextActions(GooList *actions); - -private: - static LinkAction *parseAction(const Object *obj, const GooString *baseURI, std::set<int> *seenNextActions); - - GooList *nextActionList; -}; - -//------------------------------------------------------------------------ -// LinkDest -//------------------------------------------------------------------------ - -enum LinkDestKind { - destXYZ, - destFit, - destFitH, - destFitV, - destFitR, - destFitB, - destFitBH, - destFitBV -}; - -class LinkDest { -public: - - // Build a LinkDest from the array. - LinkDest(const Array *a); - - // Copy a LinkDest. - LinkDest *copy() const { return new LinkDest(this); } - - // Was the LinkDest created successfully? - GBool isOk() const { return ok; } - - // Accessors. - LinkDestKind getKind() const { return kind; } - GBool isPageRef() const { return pageIsRef; } - int getPageNum() const { return pageNum; } - Ref getPageRef() const { return pageRef; } - double getLeft() const { return left; } - double getBottom() const { return bottom; } - double getRight() const { return right; } - double getTop() const { return top; } - double getZoom() const { return zoom; } - GBool getChangeLeft() const { return changeLeft; } - GBool getChangeTop() const { return changeTop; } - GBool getChangeZoom() const { return changeZoom; } - -private: - - LinkDestKind kind; // destination type - GBool pageIsRef; // is the page a reference or number? - union { - Ref pageRef; // reference to page - int pageNum; // one-relative page number - }; - double left, bottom; // position - double right, top; - double zoom; // zoom factor - GBool changeLeft, changeTop; // which position components to change: - GBool changeZoom; // destXYZ uses all three; - // destFitH/BH use changeTop; - // destFitV/BV use changeLeft - GBool ok; // set if created successfully - - LinkDest(const LinkDest *dest); -}; - -//------------------------------------------------------------------------ -// LinkGoTo -//------------------------------------------------------------------------ - -class LinkGoTo: public LinkAction { -public: - - // Build a LinkGoTo from a destination (dictionary, name, or string). - LinkGoTo(const Object *destObj); - - // Destructor. - ~LinkGoTo(); - - // Was the LinkGoTo created successfully? - GBool isOk() const override { return dest || namedDest; } - - // Accessors. - LinkActionKind getKind() const override { return actionGoTo; } - const LinkDest *getDest() const { return dest; } - const GooString *getNamedDest() const { return namedDest; } - -private: - - LinkDest *dest; // regular destination (NULL for remote - // link with bad destination) - GooString *namedDest; // named destination (only one of dest and - // and namedDest may be non-NULL) -}; - -//------------------------------------------------------------------------ -// LinkGoToR -//------------------------------------------------------------------------ - -class LinkGoToR: public LinkAction { -public: - - // Build a LinkGoToR from a file spec (dictionary) and destination - // (dictionary, name, or string). - LinkGoToR(Object *fileSpecObj, Object *destObj); - - // Destructor. - ~LinkGoToR(); - - // Was the LinkGoToR created successfully? - GBool isOk() const override { return fileName && (dest || namedDest); } - - // Accessors. - LinkActionKind getKind() const override { return actionGoToR; } - const GooString *getFileName() const { return fileName; } - const LinkDest *getDest() const { return dest; } - const GooString *getNamedDest() const { return namedDest; } - -private: - - GooString *fileName; // file name - LinkDest *dest; // regular destination (NULL for remote - // link with bad destination) - GooString *namedDest; // named destination (only one of dest and - // and namedDest may be non-NULL) -}; - -//------------------------------------------------------------------------ -// LinkLaunch -//------------------------------------------------------------------------ - -class LinkLaunch: public LinkAction { -public: - - // Build a LinkLaunch from an action dictionary. - LinkLaunch(const Object *actionObj); - - // Destructor. - ~LinkLaunch(); - - // Was the LinkLaunch created successfully? - GBool isOk() const override { return fileName != NULL; } - - // Accessors. - LinkActionKind getKind() const override { return actionLaunch; } - const GooString *getFileName() const { return fileName; } - const GooString *getParams() const { return params; } - -private: - - GooString *fileName; // file name - GooString *params; // parameters -}; - -//------------------------------------------------------------------------ -// LinkURI -//------------------------------------------------------------------------ - -class LinkURI: public LinkAction { -public: - - // Build a LinkURI given the URI (string) and base URI. - LinkURI(const Object *uriObj, const GooString *baseURI); - - // Destructor. - ~LinkURI(); - - // Was the LinkURI created successfully? - GBool isOk() const override { return uri != NULL; } - - // Accessors. - LinkActionKind getKind() const override { return actionURI; } - const GooString *getURI() const { return uri; } - -private: - - GooString *uri; // the URI -}; - -//------------------------------------------------------------------------ -// LinkNamed -//------------------------------------------------------------------------ - -class LinkNamed: public LinkAction { -public: - - // Build a LinkNamed given the action name. - LinkNamed(const Object *nameObj); - - ~LinkNamed(); - - GBool isOk() const override { return name != NULL; } - - LinkActionKind getKind() const override { return actionNamed; } - const GooString *getName() const { return name; } - -private: - - GooString *name; -}; - - -//------------------------------------------------------------------------ -// LinkMovie -//------------------------------------------------------------------------ - -class LinkMovie: public LinkAction { -public: - - enum OperationType { - operationTypePlay, - operationTypePause, - operationTypeResume, - operationTypeStop - }; - - LinkMovie(const Object *obj); - ~LinkMovie(); - - GBool isOk() const override { return annotRef.num >= 0 || annotTitle != NULL; } - LinkActionKind getKind() const override { return actionMovie; } - - // a movie action stores either an indirect reference to a movie annotation - // or the movie annotation title - - GBool hasAnnotRef() const { return annotRef.num >= 0; } - GBool hasAnnotTitle() const { return annotTitle != NULL; } - const Ref *getAnnotRef() const { return &annotRef; } - const GooString *getAnnotTitle() const { return annotTitle; } - - OperationType getOperation() const { return operation; } - -private: - - Ref annotRef; // Annotation - GooString *annotTitle; // T - - OperationType operation; // Operation -}; - - -//------------------------------------------------------------------------ -// LinkRendition -//------------------------------------------------------------------------ - -class LinkRendition: public LinkAction { -public: - /** - * Describes the possible rendition operations. - */ - enum RenditionOperation { - NoRendition, - PlayRendition, - StopRendition, - PauseRendition, - ResumeRendition - }; - - LinkRendition(const Object *Obj); - - ~LinkRendition(); - - GBool isOk() const override { return true; } - - LinkActionKind getKind() const override { return actionRendition; } - - GBool hasRenditionObject() const { return renditionObj.isDict(); } - const Object* getRenditionObject() const { return &renditionObj; } - - GBool hasScreenAnnot() const { return screenRef.isRef(); } - Ref getScreenAnnot() const { return screenRef.getRef(); } - - RenditionOperation getOperation() const { return operation; } - - const MediaRendition* getMedia() const { return media; } - - const GooString *getScript() const { return js; } - -private: - - Object screenRef; - Object renditionObj; - RenditionOperation operation; - - MediaRendition* media; - - GooString *js; -}; - -//------------------------------------------------------------------------ -// LinkSound -//------------------------------------------------------------------------ - -class LinkSound: public LinkAction { -public: - - LinkSound(const Object *soundObj); - - ~LinkSound(); - - GBool isOk() const override { return sound != NULL; } - - LinkActionKind getKind() const override { return actionSound; } - - double getVolume() const { return volume; } - GBool getSynchronous() const { return sync; } - GBool getRepeat() const { return repeat; } - GBool getMix() const { return mix; } - Sound *getSound() const { return sound; } - -private: - - double volume; - GBool sync; - GBool repeat; - GBool mix; - Sound *sound; -}; - -//------------------------------------------------------------------------ -// LinkJavaScript -//------------------------------------------------------------------------ - -class LinkJavaScript: public LinkAction { -public: - - // Build a LinkJavaScript given the action name. - LinkJavaScript(Object *jsObj); - - ~LinkJavaScript(); - - GBool isOk() const override { return js != NULL; } - - LinkActionKind getKind() const override { return actionJavaScript; } - const GooString *getScript() const { return js; } - -private: - - GooString *js; -}; - -//------------------------------------------------------------------------ -// LinkOCGState -//------------------------------------------------------------------------ -class LinkOCGState: public LinkAction { -public: - LinkOCGState(const Object *obj); - - ~LinkOCGState(); - - GBool isOk() const override { return stateList != NULL; } - - LinkActionKind getKind() const override { return actionOCGState; } - - enum State { On, Off, Toggle}; - struct StateList { - StateList() { list = nullptr; } - ~StateList(); - StateList(const StateList &) = delete; - StateList& operator=(const StateList &) = delete; - State st; - GooList *list; - }; - - const GooList *getStateList() const { return stateList; } - GBool getPreserveRB() const { return preserveRB; } - -private: - GooList *stateList; - GBool preserveRB; -}; - -//------------------------------------------------------------------------ -// LinkHide -//------------------------------------------------------------------------ - -class LinkHide: public LinkAction { -public: - LinkHide(const Object *hideObj); - - ~LinkHide(); - - GBool isOk() const override { return targetName != nullptr; } - LinkActionKind getKind() const override { return actionHide; } - - // According to spec the target can be either: - // a) A text string containing the fully qualified name of the target - // field. - // b) An indirect reference to an annotation dictionary. - // c) An array of "such dictionaries or text strings". - // - // While b / c appear to be very uncommon and can't easily be - // created with Adobe Acrobat DC. So only support hide - // actions with named targets (yet). - GBool hasTargetName() const { return targetName != nullptr; } - const GooString *getTargetName() const { return targetName; } - - // Should this action show or hide. - GBool isShowAction() const { return show; } - -private: - GooString *targetName; - GBool show; -}; - -//------------------------------------------------------------------------ -// LinkUnknown -//------------------------------------------------------------------------ - -class LinkUnknown: public LinkAction { -public: - - // Build a LinkUnknown with the specified action type. - LinkUnknown(const char *actionA); - - // Destructor. - ~LinkUnknown(); - - // Was the LinkUnknown create successfully? - GBool isOk() const override { return action != NULL; } - - // Accessors. - LinkActionKind getKind() const override { return actionUnknown; } - const GooString *getAction() const { return action; } - -private: - - GooString *action; // action subtype -}; - -//------------------------------------------------------------------------ -// Links -//------------------------------------------------------------------------ - -class Links { -public: - - // Extract links from array of annotations. - Links(Annots *annots); - - // Destructor. - ~Links(); - - Links(const Links &) = delete; - Links& operator=(const Links &) = delete; - - // Iterate through list of links. - int getNumLinks() const { return numLinks; } - AnnotLink *getLink(int i) const { return links[i]; } - - // If point <x>,<y> is in a link, return the associated action; - // else return NULL. - LinkAction *find(double x, double y) const; - - // Return true if <x>,<y> is in a link. - GBool onLink(double x, double y) const; - -private: - - AnnotLink **links; - int numLinks; -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/LocalPDFDocBuilder.cc b/Build/source/libs/poppler/poppler-src/poppler/LocalPDFDocBuilder.cc deleted file mode 100644 index 6f6f1fca9f7..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/LocalPDFDocBuilder.cc +++ /dev/null @@ -1,46 +0,0 @@ -//======================================================================== -// -// LocalPDFDocBuilder.cc -// -// This file is licensed under the GPLv2 or later -// -// Copyright 2010 Hib Eris <hib@hiberis.nl> -// Copyright 2010 Albert Astals Cid <aacid@kde.org> -// -//======================================================================== - -#include <config.h> - -#include "LocalPDFDocBuilder.h" - -//------------------------------------------------------------------------ -// LocalPDFDocBuilder -//------------------------------------------------------------------------ - -PDFDoc * -LocalPDFDocBuilder::buildPDFDoc( - const GooString &uri, GooString *ownerPassword, GooString - *userPassword, void *guiDataA) -{ - if (uri.cmpN("file://", 7) == 0) { - GooString *fileName = uri.copy(); - fileName->del(0, 7); - return new PDFDoc(fileName, ownerPassword, userPassword, guiDataA); - } else { - GooString *fileName = uri.copy(); - return new PDFDoc(fileName, ownerPassword, userPassword, guiDataA); - } -} - -GBool LocalPDFDocBuilder::supports(const GooString &uri) -{ - if (uri.cmpN("file://", 7) == 0) { - return gTrue; - } else if (!strstr(uri.getCString(), "://")) { - return gTrue; - } else { - return gFalse; - } -} - - diff --git a/Build/source/libs/poppler/poppler-src/poppler/LocalPDFDocBuilder.h b/Build/source/libs/poppler/poppler-src/poppler/LocalPDFDocBuilder.h deleted file mode 100644 index 0ebfdc68c85..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/LocalPDFDocBuilder.h +++ /dev/null @@ -1,32 +0,0 @@ -//======================================================================== -// -// LocalPDFDocBuilder.h -// -// This file is licensed under the GPLv2 or later -// -// Copyright 2010 Hib Eris <hib@hiberis.nl> -// Copyright 2010 Albert Astals Cid <aacid@kde.org> -// -//======================================================================== - -#ifndef LOCALPDFDOCBUILDER_H -#define LOCALPDFDOCBUILDER_H - -#include "PDFDocBuilder.h" - -//------------------------------------------------------------------------ -// LocalPDFDocBuilder -// -// The LocalPDFDocBuilder implements a PDFDocBuilder for local files. -//------------------------------------------------------------------------ - -class LocalPDFDocBuilder : public PDFDocBuilder { - -public: - PDFDoc *buildPDFDoc(const GooString &uri, GooString *ownerPassword = NULL, - GooString *userPassword = NULL, void *guiDataA = NULL) override; - GBool supports(const GooString &uri) override; - -}; - -#endif /* LOCALPDFDOCBUILDER_H */ diff --git a/Build/source/libs/poppler/poppler-src/poppler/MarkedContentOutputDev.cc b/Build/source/libs/poppler/poppler-src/poppler/MarkedContentOutputDev.cc deleted file mode 100644 index ddaa2d80a2e..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/MarkedContentOutputDev.cc +++ /dev/null @@ -1,212 +0,0 @@ -//======================================================================== -// -// MarkedContentOutputDev.cc -// -// This file is licensed under the GPLv2 or later -// -// Copyright 2013 Igalia S.L. -// -//======================================================================== - -#include "MarkedContentOutputDev.h" -#include "GlobalParams.h" -#include "UnicodeMap.h" -#include "GfxState.h" -#include "GfxFont.h" -#include "Annot.h" -#include <vector> - - -MarkedContentOutputDev::MarkedContentOutputDev(int mcidA): - currentFont(nullptr), - currentText(nullptr), - mcid(mcidA), - pageWidth(0.0), - pageHeight(0.0), - unicodeMap(nullptr) -{ - currentColor.r = currentColor.g = currentColor.b = 0; -} - - -MarkedContentOutputDev::~MarkedContentOutputDev() -{ - if (unicodeMap) - unicodeMap->decRefCnt(); - if (currentFont) - currentFont->decRefCnt(); - delete currentText; -} - - -void MarkedContentOutputDev::endSpan() -{ - if (currentText && currentText->getLength()) { - // The TextSpan takes ownership of currentText and - // increases the reference count for currentFont. - textSpans.push_back(TextSpan(currentText, - currentFont, - currentColor)); - } - currentText = nullptr; -} - - -void MarkedContentOutputDev::startPage(int pageNum, GfxState *state, XRef *xref) -{ - if (state) { - pageWidth = state->getPageWidth(); - pageHeight = state->getPageHeight(); - } else { - pageWidth = pageHeight = 0.0; - } -} - - -void MarkedContentOutputDev::endPage() -{ - pageWidth = pageHeight = 0.0; -} - - -void MarkedContentOutputDev::beginMarkedContent(const char *name, Dict *properties) -{ - int id = -1; - if (properties) - properties->lookupInt("MCID", nullptr, &id); - - if (id == -1) - return; - - // The stack keep track of MCIDs of nested marked content. - if (inMarkedContent() || id == mcid) - mcidStack.push_back(id); -} - - -void MarkedContentOutputDev::endMarkedContent(GfxState *state) -{ - if (inMarkedContent()) { - mcidStack.pop_back(); - // The outer marked content sequence MCID was popped, ensure - // that the last piece of text collected ends up in a TextSpan. - if (!inMarkedContent()) - endSpan(); - } -} - - -bool MarkedContentOutputDev::needFontChange(GfxFont* font) const -{ - if (currentFont == font) - return gFalse; - - if (!currentFont) - return font != nullptr && font->isOk(); - - if (font == nullptr) - return gTrue; - - // Two non-null valid fonts are the same if they point to the same Ref - if (currentFont->getID()->num == font->getID()->num && - currentFont->getID()->gen == font->getID()->gen) - return gFalse; - - return gTrue; -} - - -void MarkedContentOutputDev::drawChar(GfxState *state, - double xx, double yy, - double dx, double dy, - double ox, double oy, - CharCode c, int nBytes, - Unicode *u, int uLen) -{ - if (!inMarkedContent() || !uLen) - return; - - - // Color changes are tracked here so the color can be chosen depending on - // the render mode (for mode 1 stroke color is used), so there is no need - // to implement both updateFillColor() and updateStrokeColor(). - GBool colorChange = gFalse; - GfxRGB color; - if ((state->getRender() & 3) == 1) - state->getStrokeRGB(&color); - else - state->getFillRGB(&color); - - colorChange = (color.r != currentColor.r || - color.g != currentColor.g || - color.b != currentColor.b); - - // Check also for font changes. - GBool fontChange = needFontChange(state->getFont()); - - // Save a span with the current changes. - if (colorChange || fontChange) { - endSpan(); - } - - // Perform the color/font changes. - if (colorChange) - currentColor = color; - - if (fontChange) { - if (currentFont != nullptr) { - currentFont->decRefCnt(); - currentFont = nullptr; - } - if (state->getFont() != nullptr) { - currentFont = state->getFont(); - currentFont->incRefCnt(); - } - } - - - double sp, dx2, dy2, w1, h1, x1, y1; - - // Subtract char and word spacing from the (dx,dy) values - sp = state->getCharSpace(); - if (c == (CharCode) 0x20) - sp += state->getWordSpace(); - state->textTransformDelta(sp * state->getHorizScaling(), 0, &dx2, &dy2); - dx -= dx2; - dy -= dy2; - state->transformDelta(dx, dy, &w1, &h1); - state->transform(xx, yy, &x1, &y1); - - // Throw away characters that are not inside the page boundaries. - if (x1 + w1 < 0 || x1 > pageWidth || y1 + h1 < 0 || y1 > pageHeight) - return; - - // Make a sanity check on character size. Note: (x != x) <-> isnan(x) - if (x1 != x1 || y1 != y1 || w1 != w1 || h1 != h1) - return; - - for (int i = 0; i < uLen; i++) { - // Soft hyphen markers are skipped, as they are invisible unless - // rendering is done to an actual device and the hyphenation hint - // used. MarkedContentOutputDev extracts the *visible* text content. - if (u[i] != 0x00AD) { - // Add the UTF-8 sequence to the current text span. - if (!unicodeMap) - unicodeMap = globalParams->getTextEncoding(); - - char buf[8]; - int n = unicodeMap->mapUnicode(u[i], buf, sizeof(buf)); - if (n > 0) { - if (currentText == nullptr) - currentText = new GooString(); - currentText->append(buf, n); - } - } - } -} - - -const TextSpanArray& MarkedContentOutputDev::getTextSpans() const -{ - return textSpans; -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/MarkedContentOutputDev.h b/Build/source/libs/poppler/poppler-src/poppler/MarkedContentOutputDev.h deleted file mode 100644 index a1b1178cd95..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/MarkedContentOutputDev.h +++ /dev/null @@ -1,134 +0,0 @@ -//======================================================================== -// -// MarkedContentOutputDev.h -// -// This file is licensed under the GPLv2 or later -// -// Copyright 2013 Igalia S.L. -// Copyright 2018 Albert Astals Cid <aacid@kde.org> -// -//======================================================================== - -#ifndef MARKEDCONTENTOUTPUTDEV_H -#define MARKEDCONTENTOUTPUTDEV_H - -#include "goo/gtypes.h" -#include "goo/gmem.h" -#include "OutputDev.h" -#include "GfxState.h" -#include "GfxFont.h" -#include <vector> - -class Dict; -class UnicodeMap; - - -class TextSpan { -public: - TextSpan(const TextSpan& other): data(other.data) { - data->refcount++; - } - - TextSpan& operator=(const TextSpan& other) { - if (this != &other) { - data = other.data; - data->refcount++; - } - return *this; - } - - ~TextSpan() { - if (data && --data->refcount == 0) - delete data; - } - - GfxFont* getFont() const { return data->font; } - GooString* getText() const { return data->text; } - GfxRGB& getColor() const { return data->color; } - -private: - // Note: Takes ownership of strings, increases refcount for font. - TextSpan(GooString *text, - GfxFont *font, - const GfxRGB& color) - : data(new Data) { - data->text = text; - data->font = font; - data->color = color; - if (data->font) - data->font->incRefCnt(); - } - - struct Data { - GfxFont *font; - GooString *text; - GfxRGB color; - unsigned refcount; - - Data(): refcount(1) {} - - ~Data() { - assert(refcount == 0); - if (font) - font->decRefCnt(); - delete text; - } - - Data(const Data &) = delete; - Data& operator=(const Data &) = delete; - }; - - Data *data; - - friend class MarkedContentOutputDev; -}; - - -typedef std::vector<TextSpan> TextSpanArray; - - -class MarkedContentOutputDev: public OutputDev { -public: - MarkedContentOutputDev(int mcidA); - virtual ~MarkedContentOutputDev(); - - virtual GBool isOk() { return gTrue; } - GBool upsideDown() override { return gTrue; } - GBool useDrawChar() override { return gTrue; } - GBool interpretType3Chars() override { return gFalse; } - GBool needNonText() override { return gFalse; } - GBool needCharCount() override { return gFalse; } - - void startPage(int pageNum, GfxState *state, XRef *xref) override; - void endPage() override; - - void drawChar(GfxState *state, - double xx, double yy, - double dx, double dy, - double ox, double oy, - CharCode c, int nBytes, - Unicode *u, int uLen) override; - - void beginMarkedContent(const char *name, Dict *properties) override; - void endMarkedContent(GfxState *state) override; - - const TextSpanArray& getTextSpans() const; - -private: - - void endSpan(); - bool inMarkedContent() const { return mcidStack.size() > 0; } - bool needFontChange(GfxFont* font) const; - - GfxFont *currentFont; - GooString *currentText; - GfxRGB currentColor; - TextSpanArray textSpans; - int mcid; - std::vector<int> mcidStack; - double pageWidth; - double pageHeight; - UnicodeMap *unicodeMap; -}; - -#endif /* !MARKEDCONTENTOUTPUTDEV_H */ diff --git a/Build/source/libs/poppler/poppler-src/poppler/Movie.cc b/Build/source/libs/poppler/poppler-src/poppler/Movie.cc deleted file mode 100644 index 82d7f3f5452..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/Movie.cc +++ /dev/null @@ -1,279 +0,0 @@ -//********************************************************************************* -// Movie.cc -//--------------------------------------------------------------------------------- -// -//--------------------------------------------------------------------------------- -// Hugo Mercier <hmercier31[at]gmail.com> (c) 2008 -// Pino Toscano <pino@kde.org> (c) 2008 -// Carlos Garcia Campos <carlosgc@gnome.org> (c) 2010 -// Albert Astals Cid <aacid@kde.org> (c) 2010, 2017, 2018 -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -//********************************************************************************* - -#include <math.h> -#include "Movie.h" -#include "FileSpec.h" - -MovieActivationParameters::MovieActivationParameters() { - // default values - floatingWindow = gFalse; - xPosition = 0.5; - yPosition = 0.5; - rate = 1.0; - volume = 100; - showControls = gFalse; - synchronousPlay = gFalse; - repeatMode = repeatModeOnce; - start.units = 0; - duration.units = 0; - znum = 1; - zdenum = 1; -} - -MovieActivationParameters::~MovieActivationParameters() { -} - -void MovieActivationParameters::parseMovieActivation(const Object* aDict) { - Object obj1 = aDict->dictLookup("Start"); - if (obj1.isNull()) { - if (obj1.isInt()) { - // If it is representable as an integer (subject to the implementation limit for - // integers, as described in Appendix C), it should be specified as such. - - start.units = obj1.getInt(); - } else if (obj1.isString()) { - // If it is not representable as an integer, it should be specified as an 8-byte - // string representing a 64-bit twos-complement integer, most significant - // byte first. - - // UNSUPPORTED - } else if (obj1.isArray()) { - Array* a = obj1.getArray(); - - Object tmp = a->get(0); - if (tmp.isInt()) { - start.units = tmp.getInt(); - } - if (tmp.isString()) { - // UNSUPPORTED - } - - tmp = a->get(1); - if (tmp.isInt()) { - start.units_per_second = tmp.getInt(); - } - } - } - - obj1 = aDict->dictLookup("Duration"); - if (obj1.isNull()) { - if (obj1.isInt()) { - duration.units = obj1.getInt(); - } else if (obj1.isString()) { - // UNSUPPORTED - } else if (obj1.isArray()) { - Array* a = obj1.getArray(); - - Object tmp = a->get(0); - if (tmp.isInt()) { - duration.units = tmp.getInt(); - } - if (tmp.isString()) { - // UNSUPPORTED - } - - tmp = a->get(1); - if (tmp.isInt()) { - duration.units_per_second = tmp.getInt(); - } - } - } - - obj1 = aDict->dictLookup("Rate"); - if (obj1.isNum()) { - rate = obj1.getNum(); - } - - obj1 = aDict->dictLookup("Volume"); - if (obj1.isNum()) { - // convert volume to [0 100] - volume = int((obj1.getNum() + 1.0) * 50); - } - - obj1 = aDict->dictLookup("ShowControls"); - if (obj1.isBool()) { - showControls = obj1.getBool(); - } - - obj1 = aDict->dictLookup("Synchronous"); - if (obj1.isBool()) { - synchronousPlay = obj1.getBool(); - } - - obj1 = aDict->dictLookup("Mode"); - if (obj1.isName()) { - const char* name = obj1.getName(); - if (!strcmp(name, "Once")) { - repeatMode = repeatModeOnce; - } else if (!strcmp(name, "Open")) { - repeatMode = repeatModeOpen; - } else if (!strcmp(name, "Repeat")) { - repeatMode = repeatModeRepeat; - } else if (!strcmp(name,"Palindrome")) { - repeatMode = repeatModePalindrome; - } - } - - obj1 = aDict->dictLookup("FWScale"); - if (obj1.isArray()) { - // the presence of that entry implies that the movie is to be played - // in a floating window - floatingWindow = gTrue; - - Array* scale = obj1.getArray(); - if (scale->getLength() >= 2) { - Object tmp = scale->get(1); - if (tmp.isInt()) { - znum = tmp.getInt(); - } - tmp = scale->get(1); - if (tmp.isInt()) { - zdenum = tmp.getInt(); - } - } - } - - obj1 = aDict->dictLookup("FWPosition"); - if (obj1.isArray()) { - Array* pos = obj1.getArray(); - if (pos->getLength() >= 2) { - Object tmp = pos->get(0); - if (tmp.isNum()) { - xPosition = tmp.getNum(); - } - tmp = pos->get(1); - if (tmp.isNum()) { - yPosition = tmp.getNum(); - } - } - } -} - -void Movie::parseMovie (const Object *movieDict) { - fileName = nullptr; - rotationAngle = 0; - width = -1; - height = -1; - showPoster = gFalse; - - Object obj1 = movieDict->dictLookup("F"); - Object obj2 = getFileSpecNameForPlatform(&obj1); - if (obj2.isString()) { - fileName = obj2.getString()->copy(); - } else { - error (errSyntaxError, -1, "Invalid Movie"); - ok = gFalse; - return; - } - - obj1 = movieDict->dictLookup("Aspect"); - if (obj1.isArray()) { - Array* aspect = obj1.getArray(); - if (aspect->getLength() >= 2) { - Object tmp = aspect->get(0); - if( tmp.isNum() ) { - width = (int)floor( tmp.getNum() + 0.5 ); - } - tmp = aspect->get(1); - if( tmp.isNum() ) { - height = (int)floor( tmp.getNum() + 0.5 ); - } - } - } - - obj1 = movieDict->dictLookup("Rotate"); - if (obj1.isInt()) { - // round up to 90° - rotationAngle = (((obj1.getInt() + 360) % 360) % 90) * 90; - } - - // - // movie poster - // - poster = movieDict->dictLookupNF("Poster"); - if (!poster.isNull()) { - if (poster.isRef() || poster.isStream()) { - showPoster = gTrue; - } else if (poster.isBool()) { - showPoster = poster.getBool(); - poster.setToNull(); - } else { - poster.setToNull(); - } - } -} - -Movie::~Movie() { - delete fileName; -} - -Movie::Movie(const Object *movieDict) { - ok = gTrue; - - if (movieDict->isDict()) - parseMovie(movieDict); - else - ok = gFalse; -} - -Movie::Movie(const Object *movieDict, const Object *aDict) { - ok = gTrue; - - if (movieDict->isDict()) { - parseMovie(movieDict); - if (aDict->isDict()) - MA.parseMovieActivation(aDict); - } else { - ok = gFalse; - } -} - -Movie::Movie(const Movie &other) -{ - ok = other.ok; - rotationAngle = other.rotationAngle; - width = other.width; - height = other.height; - showPoster = other.showPoster; - MA = other.MA; - - poster = other.poster.copy(); - - if (other.fileName) - fileName = other.fileName->copy(); - else - fileName = nullptr; -} - -void Movie::getFloatingWindowSize(int *widthA, int *heightA) -{ - *widthA = int(width * double(MA.znum) / MA.zdenum); - *heightA = int(height * double(MA.znum) / MA.zdenum); -} - -Movie* Movie::copy() const { - return new Movie(*this); -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/Movie.h b/Build/source/libs/poppler/poppler-src/poppler/Movie.h deleted file mode 100644 index 5c7f79136c5..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/Movie.h +++ /dev/null @@ -1,113 +0,0 @@ -//********************************************************************************* -// Movie.h -//--------------------------------------------------------------------------------- -// -//--------------------------------------------------------------------------------- -// Hugo Mercier <hmercier31[at]gmail.com> (c) 2008 -// Carlos Garcia Campos <carlosgc@gnome.org> (c) 2010 -// Albert Astals Cid <aacid@kde.org> (c) 2017, 2018 -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -//********************************************************************************* - -#ifndef _MOVIE_H_ -#define _MOVIE_H_ - -#include "Object.h" - -struct MovieActivationParameters { - - MovieActivationParameters(); - ~MovieActivationParameters(); - - // parse from a "Movie Activation" dictionary - void parseMovieActivation(const Object* actObj); - - enum MovieRepeatMode { - repeatModeOnce, - repeatModeOpen, - repeatModeRepeat, - repeatModePalindrome - }; - - struct MovieTime { - MovieTime() { units_per_second = 0; } - Gulong units; - int units_per_second; // 0 : defined by movie - }; - - MovieTime start; // 0 - MovieTime duration; // 0 - - double rate; // 1.0 - - int volume; // 100 - - GBool showControls; // false - - GBool synchronousPlay; // false - MovieRepeatMode repeatMode; // repeatModeOnce - - // floating window position - GBool floatingWindow; - double xPosition; // 0.5 - double yPosition; // 0.5 - int znum; // 1 - int zdenum; // 1 -}; - -class Movie { - public: - Movie(const Object *objMovie, const Object *objAct); - Movie(const Object *objMovie); - Movie(const Movie &movie); - ~Movie(); - Movie& operator=(const Movie &) = delete; - - GBool isOk() const { return ok; } - const MovieActivationParameters* getActivationParameters() const { return &MA; } - - const GooString* getFileName() const { return fileName; } - - Gushort getRotationAngle() const { return rotationAngle; } - void getAspect (int *widthA, int *heightA) const { *widthA = width; *heightA = height; } - - Object getPoster() const { return poster.copy(); } - GBool getShowPoster() const { return showPoster; } - - GBool getUseFloatingWindow() const { return MA.floatingWindow; } - void getFloatingWindowSize(int *width, int *height); - - Movie* copy() const ; - - private: - void parseMovie (const Object *movieDict); - - GBool ok; - - Gushort rotationAngle; // 0 - int width; // Aspect - int height; // Aspect - - Object poster; - GBool showPoster; - - GooString* fileName; - - MovieActivationParameters MA; -}; - -#endif - diff --git a/Build/source/libs/poppler/poppler-src/poppler/NameToCharCode.cc b/Build/source/libs/poppler/poppler-src/poppler/NameToCharCode.cc deleted file mode 100644 index 0ac7c7b6278..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/NameToCharCode.cc +++ /dev/null @@ -1,116 +0,0 @@ -//======================================================================== -// -// NameToCharCode.cc -// -// Copyright 2001-2003 Glyph & Cog, LLC -// -//======================================================================== - -#include <config.h> - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include <string.h> -#include "goo/gmem.h" -#include "NameToCharCode.h" - -//------------------------------------------------------------------------ - -struct NameToCharCodeEntry { - char *name; - CharCode c; -}; - -//------------------------------------------------------------------------ - -NameToCharCode::NameToCharCode() { - int i; - - size = 31; - len = 0; - tab = (NameToCharCodeEntry *)gmallocn(size, sizeof(NameToCharCodeEntry)); - for (i = 0; i < size; ++i) { - tab[i].name = nullptr; - } -} - -NameToCharCode::~NameToCharCode() { - int i; - - for (i = 0; i < size; ++i) { - if (tab[i].name) { - gfree(tab[i].name); - } - } - gfree(tab); -} - -void NameToCharCode::add(const char *name, CharCode c) { - NameToCharCodeEntry *oldTab; - int h, i, oldSize; - - // expand the table if necessary - if (len >= size / 2) { - oldSize = size; - oldTab = tab; - size = 2*size + 1; - tab = (NameToCharCodeEntry *)gmallocn(size, sizeof(NameToCharCodeEntry)); - for (h = 0; h < size; ++h) { - tab[h].name = nullptr; - } - for (i = 0; i < oldSize; ++i) { - if (oldTab[i].name) { - h = hash(oldTab[i].name); - while (tab[h].name) { - if (++h == size) { - h = 0; - } - } - tab[h] = oldTab[i]; - } - } - gfree(oldTab); - } - - // add the new name - h = hash(name); - while (tab[h].name && strcmp(tab[h].name, name)) { - if (++h == size) { - h = 0; - } - } - if (!tab[h].name) { - tab[h].name = copyString(name); - } - tab[h].c = c; - - ++len; -} - -CharCode NameToCharCode::lookup(const char *name) { - int h; - - h = hash(name); - while (tab[h].name) { - if (!strcmp(tab[h].name, name)) { - return tab[h].c; - } - if (++h == size) { - h = 0; - } - } - return 0; -} - -int NameToCharCode::hash(const char *name) { - const char *p; - unsigned int h; - - h = 0; - for (p = name; *p; ++p) { - h = 17 * h + (int)(*p & 0xff); - } - return (int)(h % size); -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/NameToCharCode.h b/Build/source/libs/poppler/poppler-src/poppler/NameToCharCode.h deleted file mode 100644 index da4c9c6ae7d..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/NameToCharCode.h +++ /dev/null @@ -1,57 +0,0 @@ -//======================================================================== -// -// NameToCharCode.h -// -// Copyright 2001-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2018 Albert Astals Cid <aacid@kde.org> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef NAMETOCHARCODE_H -#define NAMETOCHARCODE_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "CharTypes.h" - -struct NameToCharCodeEntry; - -//------------------------------------------------------------------------ - -class NameToCharCode { -public: - - NameToCharCode(); - ~NameToCharCode(); - - NameToCharCode(const NameToCharCode &) = delete; - NameToCharCode& operator=(const NameToCharCode &) = delete; - - void add(const char *name, CharCode c); - CharCode lookup(const char *name); - -private: - - int hash(const char *name); - - NameToCharCodeEntry *tab; - int size; - int len; -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/NameToUnicodeTable.h b/Build/source/libs/poppler/poppler-src/poppler/NameToUnicodeTable.h deleted file mode 100644 index 7345eabc6ba..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/NameToUnicodeTable.h +++ /dev/null @@ -1,4484 +0,0 @@ -//======================================================================== -// -// NameToUnicodeTable.h -// -// Copyright 2001-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2011, 2012 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2013 Jason Crain <jason@aquaticape.us> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include "CharTypes.h" - -#include <stddef.h> - -struct NameToUnicodeTab { - Unicode u; - const char *name; -}; - -// map character names to Unicode -static struct NameToUnicodeTab nameToUnicodeTextTab[] = { - {0x0021, "!"}, - {0x0023, "#"}, - {0x0024, "$"}, - {0x0025, "%"}, - {0x0026, "&"}, - {0x0027, "'"}, - {0x0028, "("}, - {0x0029, ")"}, - {0x002a, "*"}, - {0x002b, "+"}, - {0x002c, ","}, - {0x002d, "-"}, - {0x002e, "."}, - {0x002f, "/"}, - {0x0030, "0"}, - {0x0031, "1"}, - {0x0032, "2"}, - {0x0033, "3"}, - {0x0034, "4"}, - {0x0035, "5"}, - {0x0036, "6"}, - {0x0037, "7"}, - {0x0038, "8"}, - {0x0039, "9"}, - {0x003a, ":"}, - {0x003b, ";"}, - {0x003c, "<"}, - {0x003d, "="}, - {0x003e, ">"}, - {0x003f, "?"}, - {0x0040, "@"}, - {0x0041, "A"}, - {0x00c6, "AE"}, - {0x01fc, "AEacute"}, - {0x01e2, "AEmacron"}, - {0xf7e6, "AEsmall"}, - {0x00c1, "Aacute"}, - {0xf7e1, "Aacutesmall"}, - {0x0102, "Abreve"}, - {0x1eae, "Abreveacute"}, - {0x04d0, "Abrevecyrillic"}, - {0x1eb6, "Abrevedotbelow"}, - {0x1eb0, "Abrevegrave"}, - {0x1eb2, "Abrevehookabove"}, - {0x1eb4, "Abrevetilde"}, - {0x01cd, "Acaron"}, - {0x24b6, "Acircle"}, - {0x00c2, "Acircumflex"}, - {0x1ea4, "Acircumflexacute"}, - {0x1eac, "Acircumflexdotbelow"}, - {0x1ea6, "Acircumflexgrave"}, - {0x1ea8, "Acircumflexhookabove"}, - {0xf7e2, "Acircumflexsmall"}, - {0x1eaa, "Acircumflextilde"}, - {0xf6c9, "Acute"}, - {0xf7b4, "Acutesmall"}, - {0x0410, "Acyrillic"}, - {0x0200, "Adblgrave"}, - {0x00c4, "Adieresis"}, - {0x04d2, "Adieresiscyrillic"}, - {0x01de, "Adieresismacron"}, - {0xf7e4, "Adieresissmall"}, - {0x1ea0, "Adotbelow"}, - {0x01e0, "Adotmacron"}, - {0x00c0, "Agrave"}, - {0xf7e0, "Agravesmall"}, - {0x1ea2, "Ahookabove"}, - {0x04d4, "Aiecyrillic"}, - {0x0202, "Ainvertedbreve"}, - {0x0391, "Alpha"}, - {0x0386, "Alphatonos"}, - {0x0100, "Amacron"}, - {0xff21, "Amonospace"}, - {0x0104, "Aogonek"}, - {0x00c5, "Aring"}, - {0x01fa, "Aringacute"}, - {0x1e00, "Aringbelow"}, - {0xf7e5, "Aringsmall"}, - {0xf761, "Asmall"}, - {0x00c3, "Atilde"}, - {0xf7e3, "Atildesmall"}, - {0x0531, "Aybarmenian"}, - {0x0042, "B"}, - {0x24b7, "Bcircle"}, - {0x1e02, "Bdotaccent"}, - {0x1e04, "Bdotbelow"}, - {0x0411, "Becyrillic"}, - {0x0532, "Benarmenian"}, - {0x0392, "Beta"}, - {0x0181, "Bhook"}, - {0x1e06, "Blinebelow"}, - {0xff22, "Bmonospace"}, - {0xf6f4, "Brevesmall"}, - {0xf762, "Bsmall"}, - {0x0182, "Btopbar"}, - {0x0043, "C"}, - {0x053e, "Caarmenian"}, - {0x0106, "Cacute"}, - {0xf6ca, "Caron"}, - {0xf6f5, "Caronsmall"}, - {0x010c, "Ccaron"}, - {0x00c7, "Ccedilla"}, - {0x1e08, "Ccedillaacute"}, - {0xf7e7, "Ccedillasmall"}, - {0x24b8, "Ccircle"}, - {0x0108, "Ccircumflex"}, - {0x010a, "Cdot"}, - {0x010a, "Cdotaccent"}, - {0xf7b8, "Cedillasmall"}, - {0x0549, "Chaarmenian"}, - {0x04bc, "Cheabkhasiancyrillic"}, - {0x0427, "Checyrillic"}, - {0x04be, "Chedescenderabkhasiancyrillic"}, - {0x04b6, "Chedescendercyrillic"}, - {0x04f4, "Chedieresiscyrillic"}, - {0x0543, "Cheharmenian"}, - {0x04cb, "Chekhakassiancyrillic"}, - {0x04b8, "Cheverticalstrokecyrillic"}, - {0x03a7, "Chi"}, - {0x0187, "Chook"}, - {0xf6f6, "Circumflexsmall"}, - {0xff23, "Cmonospace"}, - {0x0551, "Coarmenian"}, - {0xf763, "Csmall"}, - {0x0044, "D"}, - {0x01f1, "DZ"}, - {0x01c4, "DZcaron"}, - {0x0534, "Daarmenian"}, - {0x0189, "Dafrican"}, - {0x010e, "Dcaron"}, - {0x1e10, "Dcedilla"}, - {0x24b9, "Dcircle"}, - {0x1e12, "Dcircumflexbelow"}, - {0x0110, "Dcroat"}, - {0x1e0a, "Ddotaccent"}, - {0x1e0c, "Ddotbelow"}, - {0x0414, "Decyrillic"}, - {0x03ee, "Deicoptic"}, - {0x2206, "Delta"}, - {0x0394, "Deltagreek"}, - {0x018a, "Dhook"}, - {0xf6cb, "Dieresis"}, - {0xf6cc, "DieresisAcute"}, - {0xf6cd, "DieresisGrave"}, - {0xf7a8, "Dieresissmall"}, - {0x03dc, "Digammagreek"}, - {0x0402, "Djecyrillic"}, - {0x1e0e, "Dlinebelow"}, - {0xff24, "Dmonospace"}, - {0xf6f7, "Dotaccentsmall"}, - {0x0110, "Dslash"}, - {0xf764, "Dsmall"}, - {0x018b, "Dtopbar"}, - {0x01f2, "Dz"}, - {0x01c5, "Dzcaron"}, - {0x04e0, "Dzeabkhasiancyrillic"}, - {0x0405, "Dzecyrillic"}, - {0x040f, "Dzhecyrillic"}, - {0x0045, "E"}, - {0x00c9, "Eacute"}, - {0xf7e9, "Eacutesmall"}, - {0x0114, "Ebreve"}, - {0x011a, "Ecaron"}, - {0x1e1c, "Ecedillabreve"}, - {0x0535, "Echarmenian"}, - {0x24ba, "Ecircle"}, - {0x00ca, "Ecircumflex"}, - {0x1ebe, "Ecircumflexacute"}, - {0x1e18, "Ecircumflexbelow"}, - {0x1ec6, "Ecircumflexdotbelow"}, - {0x1ec0, "Ecircumflexgrave"}, - {0x1ec2, "Ecircumflexhookabove"}, - {0xf7ea, "Ecircumflexsmall"}, - {0x1ec4, "Ecircumflextilde"}, - {0x0404, "Ecyrillic"}, - {0x0204, "Edblgrave"}, - {0x00cb, "Edieresis"}, - {0xf7eb, "Edieresissmall"}, - {0x0116, "Edot"}, - {0x0116, "Edotaccent"}, - {0x1eb8, "Edotbelow"}, - {0x0424, "Efcyrillic"}, - {0x00c8, "Egrave"}, - {0xf7e8, "Egravesmall"}, - {0x0537, "Eharmenian"}, - {0x1eba, "Ehookabove"}, - {0x2167, "Eightroman"}, - {0x0206, "Einvertedbreve"}, - {0x0464, "Eiotifiedcyrillic"}, - {0x041b, "Elcyrillic"}, - {0x216a, "Elevenroman"}, - {0x0112, "Emacron"}, - {0x1e16, "Emacronacute"}, - {0x1e14, "Emacrongrave"}, - {0x041c, "Emcyrillic"}, - {0xff25, "Emonospace"}, - {0x041d, "Encyrillic"}, - {0x04a2, "Endescendercyrillic"}, - {0x014a, "Eng"}, - {0x04a4, "Enghecyrillic"}, - {0x04c7, "Enhookcyrillic"}, - {0x0118, "Eogonek"}, - {0x0190, "Eopen"}, - {0x0395, "Epsilon"}, - {0x0388, "Epsilontonos"}, - {0x0420, "Ercyrillic"}, - {0x018e, "Ereversed"}, - {0x042d, "Ereversedcyrillic"}, - {0x0421, "Escyrillic"}, - {0x04aa, "Esdescendercyrillic"}, - {0x01a9, "Esh"}, - {0xf765, "Esmall"}, - {0x0397, "Eta"}, - {0x0538, "Etarmenian"}, - {0x0389, "Etatonos"}, - {0x00d0, "Eth"}, - {0xf7f0, "Ethsmall"}, - {0x1ebc, "Etilde"}, - {0x1e1a, "Etildebelow"}, - {0x20ac, "Euro"}, - {0x01b7, "Ezh"}, - {0x01ee, "Ezhcaron"}, - {0x01b8, "Ezhreversed"}, - {0x0046, "F"}, - {0x24bb, "Fcircle"}, - {0x1e1e, "Fdotaccent"}, - {0x0556, "Feharmenian"}, - {0x03e4, "Feicoptic"}, - {0x0191, "Fhook"}, - {0x0472, "Fitacyrillic"}, - {0x2164, "Fiveroman"}, - {0xff26, "Fmonospace"}, - {0x2163, "Fourroman"}, - {0xf766, "Fsmall"}, - {0x0047, "G"}, - {0x3387, "GBsquare"}, - {0x01f4, "Gacute"}, - {0x0393, "Gamma"}, - {0x0194, "Gammaafrican"}, - {0x03ea, "Gangiacoptic"}, - {0x011e, "Gbreve"}, - {0x01e6, "Gcaron"}, - {0x0122, "Gcedilla"}, - {0x24bc, "Gcircle"}, - {0x011c, "Gcircumflex"}, - {0x0122, "Gcommaaccent"}, - {0x0120, "Gdot"}, - {0x0120, "Gdotaccent"}, - {0x0413, "Gecyrillic"}, - {0x0542, "Ghadarmenian"}, - {0x0494, "Ghemiddlehookcyrillic"}, - {0x0492, "Ghestrokecyrillic"}, - {0x0490, "Gheupturncyrillic"}, - {0x0193, "Ghook"}, - {0x0533, "Gimarmenian"}, - {0x0403, "Gjecyrillic"}, - {0x1e20, "Gmacron"}, - {0xff27, "Gmonospace"}, - {0xf6ce, "Grave"}, - {0xf760, "Gravesmall"}, - {0xf767, "Gsmall"}, - {0x029b, "Gsmallhook"}, - {0x01e4, "Gstroke"}, - {0x0048, "H"}, - {0x25cf, "H18533"}, - {0x25aa, "H18543"}, - {0x25ab, "H18551"}, - {0x25a1, "H22073"}, - {0x33cb, "HPsquare"}, - {0x04a8, "Haabkhasiancyrillic"}, - {0x04b2, "Hadescendercyrillic"}, - {0x042a, "Hardsigncyrillic"}, - {0x0126, "Hbar"}, - {0x1e2a, "Hbrevebelow"}, - {0x1e28, "Hcedilla"}, - {0x24bd, "Hcircle"}, - {0x0124, "Hcircumflex"}, - {0x1e26, "Hdieresis"}, - {0x1e22, "Hdotaccent"}, - {0x1e24, "Hdotbelow"}, - {0xff28, "Hmonospace"}, - {0x0540, "Hoarmenian"}, - {0x03e8, "Horicoptic"}, - {0xf768, "Hsmall"}, - {0xf6cf, "Hungarumlaut"}, - {0xf6f8, "Hungarumlautsmall"}, - {0x3390, "Hzsquare"}, - {0x0049, "I"}, - {0x042f, "IAcyrillic"}, - {0x0132, "IJ"}, - {0x042e, "IUcyrillic"}, - {0x00cd, "Iacute"}, - {0xf7ed, "Iacutesmall"}, - {0x012c, "Ibreve"}, - {0x01cf, "Icaron"}, - {0x24be, "Icircle"}, - {0x00ce, "Icircumflex"}, - {0xf7ee, "Icircumflexsmall"}, - {0x0406, "Icyrillic"}, - {0x0208, "Idblgrave"}, - {0x00cf, "Idieresis"}, - {0x1e2e, "Idieresisacute"}, - {0x04e4, "Idieresiscyrillic"}, - {0xf7ef, "Idieresissmall"}, - {0x0130, "Idot"}, - {0x0130, "Idotaccent"}, - {0x1eca, "Idotbelow"}, - {0x04d6, "Iebrevecyrillic"}, - {0x0415, "Iecyrillic"}, - {0x2111, "Ifraktur"}, - {0x00cc, "Igrave"}, - {0xf7ec, "Igravesmall"}, - {0x1ec8, "Ihookabove"}, - {0x0418, "Iicyrillic"}, - {0x020a, "Iinvertedbreve"}, - {0x0419, "Iishortcyrillic"}, - {0x012a, "Imacron"}, - {0x04e2, "Imacroncyrillic"}, - {0xff29, "Imonospace"}, - {0x053b, "Iniarmenian"}, - {0x0401, "Iocyrillic"}, - {0x012e, "Iogonek"}, - {0x0399, "Iota"}, - {0x0196, "Iotaafrican"}, - {0x03aa, "Iotadieresis"}, - {0x038a, "Iotatonos"}, - {0xf769, "Ismall"}, - {0x0197, "Istroke"}, - {0x0128, "Itilde"}, - {0x1e2c, "Itildebelow"}, - {0x0474, "Izhitsacyrillic"}, - {0x0476, "Izhitsadblgravecyrillic"}, - {0x004a, "J"}, - {0x0541, "Jaarmenian"}, - {0x24bf, "Jcircle"}, - {0x0134, "Jcircumflex"}, - {0x0408, "Jecyrillic"}, - {0x054b, "Jheharmenian"}, - {0xff2a, "Jmonospace"}, - {0xf76a, "Jsmall"}, - {0x004b, "K"}, - {0x3385, "KBsquare"}, - {0x33cd, "KKsquare"}, - {0x04a0, "Kabashkircyrillic"}, - {0x1e30, "Kacute"}, - {0x041a, "Kacyrillic"}, - {0x049a, "Kadescendercyrillic"}, - {0x04c3, "Kahookcyrillic"}, - {0x039a, "Kappa"}, - {0x049e, "Kastrokecyrillic"}, - {0x049c, "Kaverticalstrokecyrillic"}, - {0x01e8, "Kcaron"}, - {0x0136, "Kcedilla"}, - {0x24c0, "Kcircle"}, - {0x0136, "Kcommaaccent"}, - {0x1e32, "Kdotbelow"}, - {0x0554, "Keharmenian"}, - {0x053f, "Kenarmenian"}, - {0x0425, "Khacyrillic"}, - {0x03e6, "Kheicoptic"}, - {0x0198, "Khook"}, - {0x040c, "Kjecyrillic"}, - {0x1e34, "Klinebelow"}, - {0xff2b, "Kmonospace"}, - {0x0480, "Koppacyrillic"}, - {0x03de, "Koppagreek"}, - {0x046e, "Ksicyrillic"}, - {0xf76b, "Ksmall"}, - {0x004c, "L"}, - {0x01c7, "LJ"}, - {0xf6bf, "LL"}, - {0x0139, "Lacute"}, - {0x039b, "Lambda"}, - {0x013d, "Lcaron"}, - {0x013b, "Lcedilla"}, - {0x24c1, "Lcircle"}, - {0x1e3c, "Lcircumflexbelow"}, - {0x013b, "Lcommaaccent"}, - {0x013f, "Ldot"}, - {0x013f, "Ldotaccent"}, - {0x1e36, "Ldotbelow"}, - {0x1e38, "Ldotbelowmacron"}, - {0x053c, "Liwnarmenian"}, - {0x01c8, "Lj"}, - {0x0409, "Ljecyrillic"}, - {0x1e3a, "Llinebelow"}, - {0xff2c, "Lmonospace"}, - {0x0141, "Lslash"}, - {0xf6f9, "Lslashsmall"}, - {0xf76c, "Lsmall"}, - {0x004d, "M"}, - {0x3386, "MBsquare"}, - {0xf6d0, "Macron"}, - {0xf7af, "Macronsmall"}, - {0x1e3e, "Macute"}, - {0x24c2, "Mcircle"}, - {0x1e40, "Mdotaccent"}, - {0x1e42, "Mdotbelow"}, - {0x0544, "Menarmenian"}, - {0xff2d, "Mmonospace"}, - {0xf76d, "Msmall"}, - {0x019c, "Mturned"}, - {0x039c, "Mu"}, - {0x004e, "N"}, - {0x01ca, "NJ"}, - {0x0143, "Nacute"}, - {0x0147, "Ncaron"}, - {0x0145, "Ncedilla"}, - {0x24c3, "Ncircle"}, - {0x1e4a, "Ncircumflexbelow"}, - {0x0145, "Ncommaaccent"}, - {0x1e44, "Ndotaccent"}, - {0x1e46, "Ndotbelow"}, - {0x019d, "Nhookleft"}, - {0x2168, "Nineroman"}, - {0x01cb, "Nj"}, - {0x040a, "Njecyrillic"}, - {0x1e48, "Nlinebelow"}, - {0xff2e, "Nmonospace"}, - {0x0546, "Nowarmenian"}, - {0xf76e, "Nsmall"}, - {0x00d1, "Ntilde"}, - {0xf7f1, "Ntildesmall"}, - {0x039d, "Nu"}, - {0x004f, "O"}, - {0x0152, "OE"}, - {0xf6fa, "OEsmall"}, - {0x00d3, "Oacute"}, - {0xf7f3, "Oacutesmall"}, - {0x04e8, "Obarredcyrillic"}, - {0x04ea, "Obarreddieresiscyrillic"}, - {0x014e, "Obreve"}, - {0x01d1, "Ocaron"}, - {0x019f, "Ocenteredtilde"}, - {0x24c4, "Ocircle"}, - {0x00d4, "Ocircumflex"}, - {0x1ed0, "Ocircumflexacute"}, - {0x1ed8, "Ocircumflexdotbelow"}, - {0x1ed2, "Ocircumflexgrave"}, - {0x1ed4, "Ocircumflexhookabove"}, - {0xf7f4, "Ocircumflexsmall"}, - {0x1ed6, "Ocircumflextilde"}, - {0x041e, "Ocyrillic"}, - {0x0150, "Odblacute"}, - {0x020c, "Odblgrave"}, - {0x00d6, "Odieresis"}, - {0x04e6, "Odieresiscyrillic"}, - {0xf7f6, "Odieresissmall"}, - {0x1ecc, "Odotbelow"}, - {0xf6fb, "Ogoneksmall"}, - {0x00d2, "Ograve"}, - {0xf7f2, "Ogravesmall"}, - {0x0555, "Oharmenian"}, - {0x2126, "Ohm"}, - {0x1ece, "Ohookabove"}, - {0x01a0, "Ohorn"}, - {0x1eda, "Ohornacute"}, - {0x1ee2, "Ohorndotbelow"}, - {0x1edc, "Ohorngrave"}, - {0x1ede, "Ohornhookabove"}, - {0x1ee0, "Ohorntilde"}, - {0x0150, "Ohungarumlaut"}, - {0x01a2, "Oi"}, - {0x020e, "Oinvertedbreve"}, - {0x014c, "Omacron"}, - {0x1e52, "Omacronacute"}, - {0x1e50, "Omacrongrave"}, - {0x2126, "Omega"}, - {0x0460, "Omegacyrillic"}, - {0x03a9, "Omegagreek"}, - {0x047a, "Omegaroundcyrillic"}, - {0x047c, "Omegatitlocyrillic"}, - {0x038f, "Omegatonos"}, - {0x039f, "Omicron"}, - {0x038c, "Omicrontonos"}, - {0xff2f, "Omonospace"}, - {0x2160, "Oneroman"}, - {0x01ea, "Oogonek"}, - {0x01ec, "Oogonekmacron"}, - {0x0186, "Oopen"}, - {0x00d8, "Oslash"}, - {0x01fe, "Oslashacute"}, - {0xf7f8, "Oslashsmall"}, - {0xf76f, "Osmall"}, - {0x01fe, "Ostrokeacute"}, - {0x047e, "Otcyrillic"}, - {0x00d5, "Otilde"}, - {0x1e4c, "Otildeacute"}, - {0x1e4e, "Otildedieresis"}, - {0xf7f5, "Otildesmall"}, - {0x0050, "P"}, - {0x1e54, "Pacute"}, - {0x24c5, "Pcircle"}, - {0x1e56, "Pdotaccent"}, - {0x041f, "Pecyrillic"}, - {0x054a, "Peharmenian"}, - {0x04a6, "Pemiddlehookcyrillic"}, - {0x03a6, "Phi"}, - {0x01a4, "Phook"}, - {0x03a0, "Pi"}, - {0x0553, "Piwrarmenian"}, - {0xff30, "Pmonospace"}, - {0x03a8, "Psi"}, - {0x0470, "Psicyrillic"}, - {0xf770, "Psmall"}, - {0x0051, "Q"}, - {0x24c6, "Qcircle"}, - {0xff31, "Qmonospace"}, - {0xf771, "Qsmall"}, - {0x0052, "R"}, - {0x054c, "Raarmenian"}, - {0x0154, "Racute"}, - {0x0158, "Rcaron"}, - {0x0156, "Rcedilla"}, - {0x24c7, "Rcircle"}, - {0x0156, "Rcommaaccent"}, - {0x0210, "Rdblgrave"}, - {0x1e58, "Rdotaccent"}, - {0x1e5a, "Rdotbelow"}, - {0x1e5c, "Rdotbelowmacron"}, - {0x0550, "Reharmenian"}, - {0x211c, "Rfraktur"}, - {0x03a1, "Rho"}, - {0xf6fc, "Ringsmall"}, - {0x0212, "Rinvertedbreve"}, - {0x1e5e, "Rlinebelow"}, - {0xff32, "Rmonospace"}, - {0xf772, "Rsmall"}, - {0x0281, "Rsmallinverted"}, - {0x02b6, "Rsmallinvertedsuperior"}, - {0x0053, "S"}, - {0x250c, "SF010000"}, - {0x2514, "SF020000"}, - {0x2510, "SF030000"}, - {0x2518, "SF040000"}, - {0x253c, "SF050000"}, - {0x252c, "SF060000"}, - {0x2534, "SF070000"}, - {0x251c, "SF080000"}, - {0x2524, "SF090000"}, - {0x2500, "SF100000"}, - {0x2502, "SF110000"}, - {0x2561, "SF190000"}, - {0x2562, "SF200000"}, - {0x2556, "SF210000"}, - {0x2555, "SF220000"}, - {0x2563, "SF230000"}, - {0x2551, "SF240000"}, - {0x2557, "SF250000"}, - {0x255d, "SF260000"}, - {0x255c, "SF270000"}, - {0x255b, "SF280000"}, - {0x255e, "SF360000"}, - {0x255f, "SF370000"}, - {0x255a, "SF380000"}, - {0x2554, "SF390000"}, - {0x2569, "SF400000"}, - {0x2566, "SF410000"}, - {0x2560, "SF420000"}, - {0x2550, "SF430000"}, - {0x256c, "SF440000"}, - {0x2567, "SF450000"}, - {0x2568, "SF460000"}, - {0x2564, "SF470000"}, - {0x2565, "SF480000"}, - {0x2559, "SF490000"}, - {0x2558, "SF500000"}, - {0x2552, "SF510000"}, - {0x2553, "SF520000"}, - {0x256b, "SF530000"}, - {0x256a, "SF540000"}, - {0x015a, "Sacute"}, - {0x1e64, "Sacutedotaccent"}, - {0x03e0, "Sampigreek"}, - {0x0160, "Scaron"}, - {0x1e66, "Scarondotaccent"}, - {0xf6fd, "Scaronsmall"}, - {0x015e, "Scedilla"}, - {0x018f, "Schwa"}, - {0x04d8, "Schwacyrillic"}, - {0x04da, "Schwadieresiscyrillic"}, - {0x24c8, "Scircle"}, - {0x015c, "Scircumflex"}, - {0x0218, "Scommaaccent"}, - {0x1e60, "Sdotaccent"}, - {0x1e62, "Sdotbelow"}, - {0x1e68, "Sdotbelowdotaccent"}, - {0x054d, "Seharmenian"}, - {0x2166, "Sevenroman"}, - {0x0547, "Shaarmenian"}, - {0x0428, "Shacyrillic"}, - {0x0429, "Shchacyrillic"}, - {0x03e2, "Sheicoptic"}, - {0x04ba, "Shhacyrillic"}, - {0x03ec, "Shimacoptic"}, - {0x03a3, "Sigma"}, - {0x2165, "Sixroman"}, - {0xff33, "Smonospace"}, - {0x042c, "Softsigncyrillic"}, - {0xf773, "Ssmall"}, - {0x03da, "Stigmagreek"}, - {0x0054, "T"}, - {0x03a4, "Tau"}, - {0x0166, "Tbar"}, - {0x0164, "Tcaron"}, - {0x0162, "Tcedilla"}, - {0x24c9, "Tcircle"}, - {0x1e70, "Tcircumflexbelow"}, - {0x0162, "Tcommaaccent"}, - {0x1e6a, "Tdotaccent"}, - {0x1e6c, "Tdotbelow"}, - {0x0422, "Tecyrillic"}, - {0x04ac, "Tedescendercyrillic"}, - {0x2169, "Tenroman"}, - {0x04b4, "Tetsecyrillic"}, - {0x0398, "Theta"}, - {0x01ac, "Thook"}, - {0x00de, "Thorn"}, - {0xf7fe, "Thornsmall"}, - {0x2162, "Threeroman"}, - {0xf6fe, "Tildesmall"}, - {0x054f, "Tiwnarmenian"}, - {0x1e6e, "Tlinebelow"}, - {0xff34, "Tmonospace"}, - {0x0539, "Toarmenian"}, - {0x01bc, "Tonefive"}, - {0x0184, "Tonesix"}, - {0x01a7, "Tonetwo"}, - {0x01ae, "Tretroflexhook"}, - {0x0426, "Tsecyrillic"}, - {0x040b, "Tshecyrillic"}, - {0xf774, "Tsmall"}, - {0x216b, "Twelveroman"}, - {0x2161, "Tworoman"}, - {0x0055, "U"}, - {0x00da, "Uacute"}, - {0xf7fa, "Uacutesmall"}, - {0x016c, "Ubreve"}, - {0x01d3, "Ucaron"}, - {0x24ca, "Ucircle"}, - {0x00db, "Ucircumflex"}, - {0x1e76, "Ucircumflexbelow"}, - {0xf7fb, "Ucircumflexsmall"}, - {0x0423, "Ucyrillic"}, - {0x0170, "Udblacute"}, - {0x0214, "Udblgrave"}, - {0x00dc, "Udieresis"}, - {0x01d7, "Udieresisacute"}, - {0x1e72, "Udieresisbelow"}, - {0x01d9, "Udieresiscaron"}, - {0x04f0, "Udieresiscyrillic"}, - {0x01db, "Udieresisgrave"}, - {0x01d5, "Udieresismacron"}, - {0xf7fc, "Udieresissmall"}, - {0x1ee4, "Udotbelow"}, - {0x00d9, "Ugrave"}, - {0xf7f9, "Ugravesmall"}, - {0x1ee6, "Uhookabove"}, - {0x01af, "Uhorn"}, - {0x1ee8, "Uhornacute"}, - {0x1ef0, "Uhorndotbelow"}, - {0x1eea, "Uhorngrave"}, - {0x1eec, "Uhornhookabove"}, - {0x1eee, "Uhorntilde"}, - {0x0170, "Uhungarumlaut"}, - {0x04f2, "Uhungarumlautcyrillic"}, - {0x0216, "Uinvertedbreve"}, - {0x0478, "Ukcyrillic"}, - {0x016a, "Umacron"}, - {0x04ee, "Umacroncyrillic"}, - {0x1e7a, "Umacrondieresis"}, - {0xff35, "Umonospace"}, - {0x0172, "Uogonek"}, - {0x03a5, "Upsilon"}, - {0x03d2, "Upsilon1"}, - {0x03d3, "Upsilonacutehooksymbolgreek"}, - {0x01b1, "Upsilonafrican"}, - {0x03ab, "Upsilondieresis"}, - {0x03d4, "Upsilondieresishooksymbolgreek"}, - {0x03d2, "Upsilonhooksymbol"}, - {0x038e, "Upsilontonos"}, - {0x016e, "Uring"}, - {0x040e, "Ushortcyrillic"}, - {0xf775, "Usmall"}, - {0x04ae, "Ustraightcyrillic"}, - {0x04b0, "Ustraightstrokecyrillic"}, - {0x0168, "Utilde"}, - {0x1e78, "Utildeacute"}, - {0x1e74, "Utildebelow"}, - {0x0056, "V"}, - {0x24cb, "Vcircle"}, - {0x1e7e, "Vdotbelow"}, - {0x0412, "Vecyrillic"}, - {0x054e, "Vewarmenian"}, - {0x01b2, "Vhook"}, - {0xff36, "Vmonospace"}, - {0x0548, "Voarmenian"}, - {0xf776, "Vsmall"}, - {0x1e7c, "Vtilde"}, - {0x0057, "W"}, - {0x1e82, "Wacute"}, - {0x24cc, "Wcircle"}, - {0x0174, "Wcircumflex"}, - {0x1e84, "Wdieresis"}, - {0x1e86, "Wdotaccent"}, - {0x1e88, "Wdotbelow"}, - {0x1e80, "Wgrave"}, - {0xff37, "Wmonospace"}, - {0xf777, "Wsmall"}, - {0x0058, "X"}, - {0x24cd, "Xcircle"}, - {0x1e8c, "Xdieresis"}, - {0x1e8a, "Xdotaccent"}, - {0x053d, "Xeharmenian"}, - {0x039e, "Xi"}, - {0xff38, "Xmonospace"}, - {0xf778, "Xsmall"}, - {0x0059, "Y"}, - {0x00dd, "Yacute"}, - {0xf7fd, "Yacutesmall"}, - {0x0462, "Yatcyrillic"}, - {0x24ce, "Ycircle"}, - {0x0176, "Ycircumflex"}, - {0x0178, "Ydieresis"}, - {0xf7ff, "Ydieresissmall"}, - {0x1e8e, "Ydotaccent"}, - {0x1ef4, "Ydotbelow"}, - {0x042b, "Yericyrillic"}, - {0x04f8, "Yerudieresiscyrillic"}, - {0x1ef2, "Ygrave"}, - {0x01b3, "Yhook"}, - {0x1ef6, "Yhookabove"}, - {0x0545, "Yiarmenian"}, - {0x0407, "Yicyrillic"}, - {0x0552, "Yiwnarmenian"}, - {0xff39, "Ymonospace"}, - {0xf779, "Ysmall"}, - {0x1ef8, "Ytilde"}, - {0x046a, "Yusbigcyrillic"}, - {0x046c, "Yusbigiotifiedcyrillic"}, - {0x0466, "Yuslittlecyrillic"}, - {0x0468, "Yuslittleiotifiedcyrillic"}, - {0x005a, "Z"}, - {0x0536, "Zaarmenian"}, - {0x0179, "Zacute"}, - {0x017d, "Zcaron"}, - {0xf6ff, "Zcaronsmall"}, - {0x24cf, "Zcircle"}, - {0x1e90, "Zcircumflex"}, - {0x017b, "Zdot"}, - {0x017b, "Zdotaccent"}, - {0x1e92, "Zdotbelow"}, - {0x0417, "Zecyrillic"}, - {0x0498, "Zedescendercyrillic"}, - {0x04de, "Zedieresiscyrillic"}, - {0x0396, "Zeta"}, - {0x053a, "Zhearmenian"}, - {0x04c1, "Zhebrevecyrillic"}, - {0x0416, "Zhecyrillic"}, - {0x0496, "Zhedescendercyrillic"}, - {0x04dc, "Zhedieresiscyrillic"}, - {0x1e94, "Zlinebelow"}, - {0xff3a, "Zmonospace"}, - {0xf77a, "Zsmall"}, - {0x01b5, "Zstroke"}, - {0x0022, "\""}, - {0x005c, "\\"}, - {0x005d, "]"}, - {0x005e, "^"}, - {0x005f, "_"}, - {0x0060, "`"}, - {0x0061, "a"}, - {0x0986, "aabengali"}, - {0x00e1, "aacute"}, - {0x0906, "aadeva"}, - {0x0a86, "aagujarati"}, - {0x0a06, "aagurmukhi"}, - {0x0a3e, "aamatragurmukhi"}, - {0x3303, "aarusquare"}, - {0x09be, "aavowelsignbengali"}, - {0x093e, "aavowelsigndeva"}, - {0x0abe, "aavowelsigngujarati"}, - {0x055f, "abbreviationmarkarmenian"}, - {0x0970, "abbreviationsigndeva"}, - {0x0985, "abengali"}, - {0x311a, "abopomofo"}, - {0x0103, "abreve"}, - {0x1eaf, "abreveacute"}, - {0x04d1, "abrevecyrillic"}, - {0x1eb7, "abrevedotbelow"}, - {0x1eb1, "abrevegrave"}, - {0x1eb3, "abrevehookabove"}, - {0x1eb5, "abrevetilde"}, - {0x01ce, "acaron"}, - {0x24d0, "acircle"}, - {0x00e2, "acircumflex"}, - {0x1ea5, "acircumflexacute"}, - {0x1ead, "acircumflexdotbelow"}, - {0x1ea7, "acircumflexgrave"}, - {0x1ea9, "acircumflexhookabove"}, - {0x1eab, "acircumflextilde"}, - {0x00b4, "acute"}, - {0x0317, "acutebelowcmb"}, - {0x0301, "acutecmb"}, - {0x0301, "acutecomb"}, - {0x0954, "acutedeva"}, - {0x02cf, "acutelowmod"}, - {0x0341, "acutetonecmb"}, - {0x0430, "acyrillic"}, - {0x0201, "adblgrave"}, - {0x0a71, "addakgurmukhi"}, - {0x0905, "adeva"}, - {0x00e4, "adieresis"}, - {0x04d3, "adieresiscyrillic"}, - {0x01df, "adieresismacron"}, - {0x1ea1, "adotbelow"}, - {0x01e1, "adotmacron"}, - {0x00e6, "ae"}, - {0x01fd, "aeacute"}, - {0x3150, "aekorean"}, - {0x01e3, "aemacron"}, - {0x2015, "afii00208"}, - {0x20a4, "afii08941"}, - {0x0410, "afii10017"}, - {0x0411, "afii10018"}, - {0x0412, "afii10019"}, - {0x0413, "afii10020"}, - {0x0414, "afii10021"}, - {0x0415, "afii10022"}, - {0x0401, "afii10023"}, - {0x0416, "afii10024"}, - {0x0417, "afii10025"}, - {0x0418, "afii10026"}, - {0x0419, "afii10027"}, - {0x041a, "afii10028"}, - {0x041b, "afii10029"}, - {0x041c, "afii10030"}, - {0x041d, "afii10031"}, - {0x041e, "afii10032"}, - {0x041f, "afii10033"}, - {0x0420, "afii10034"}, - {0x0421, "afii10035"}, - {0x0422, "afii10036"}, - {0x0423, "afii10037"}, - {0x0424, "afii10038"}, - {0x0425, "afii10039"}, - {0x0426, "afii10040"}, - {0x0427, "afii10041"}, - {0x0428, "afii10042"}, - {0x0429, "afii10043"}, - {0x042a, "afii10044"}, - {0x042b, "afii10045"}, - {0x042c, "afii10046"}, - {0x042d, "afii10047"}, - {0x042e, "afii10048"}, - {0x042f, "afii10049"}, - {0x0490, "afii10050"}, - {0x0402, "afii10051"}, - {0x0403, "afii10052"}, - {0x0404, "afii10053"}, - {0x0405, "afii10054"}, - {0x0406, "afii10055"}, - {0x0407, "afii10056"}, - {0x0408, "afii10057"}, - {0x0409, "afii10058"}, - {0x040a, "afii10059"}, - {0x040b, "afii10060"}, - {0x040c, "afii10061"}, - {0x040e, "afii10062"}, - {0xf6c4, "afii10063"}, - {0xf6c5, "afii10064"}, - {0x0430, "afii10065"}, - {0x0431, "afii10066"}, - {0x0432, "afii10067"}, - {0x0433, "afii10068"}, - {0x0434, "afii10069"}, - {0x0435, "afii10070"}, - {0x0451, "afii10071"}, - {0x0436, "afii10072"}, - {0x0437, "afii10073"}, - {0x0438, "afii10074"}, - {0x0439, "afii10075"}, - {0x043a, "afii10076"}, - {0x043b, "afii10077"}, - {0x043c, "afii10078"}, - {0x043d, "afii10079"}, - {0x043e, "afii10080"}, - {0x043f, "afii10081"}, - {0x0440, "afii10082"}, - {0x0441, "afii10083"}, - {0x0442, "afii10084"}, - {0x0443, "afii10085"}, - {0x0444, "afii10086"}, - {0x0445, "afii10087"}, - {0x0446, "afii10088"}, - {0x0447, "afii10089"}, - {0x0448, "afii10090"}, - {0x0449, "afii10091"}, - {0x044a, "afii10092"}, - {0x044b, "afii10093"}, - {0x044c, "afii10094"}, - {0x044d, "afii10095"}, - {0x044e, "afii10096"}, - {0x044f, "afii10097"}, - {0x0491, "afii10098"}, - {0x0452, "afii10099"}, - {0x0453, "afii10100"}, - {0x0454, "afii10101"}, - {0x0455, "afii10102"}, - {0x0456, "afii10103"}, - {0x0457, "afii10104"}, - {0x0458, "afii10105"}, - {0x0459, "afii10106"}, - {0x045a, "afii10107"}, - {0x045b, "afii10108"}, - {0x045c, "afii10109"}, - {0x045e, "afii10110"}, - {0x040f, "afii10145"}, - {0x0462, "afii10146"}, - {0x0472, "afii10147"}, - {0x0474, "afii10148"}, - {0xf6c6, "afii10192"}, - {0x045f, "afii10193"}, - {0x0463, "afii10194"}, - {0x0473, "afii10195"}, - {0x0475, "afii10196"}, - {0xf6c7, "afii10831"}, - {0xf6c8, "afii10832"}, - {0x04d9, "afii10846"}, - {0x200e, "afii299"}, - {0x200f, "afii300"}, - {0x200d, "afii301"}, - {0x066a, "afii57381"}, - {0x060c, "afii57388"}, - {0x0660, "afii57392"}, - {0x0661, "afii57393"}, - {0x0662, "afii57394"}, - {0x0663, "afii57395"}, - {0x0664, "afii57396"}, - {0x0665, "afii57397"}, - {0x0666, "afii57398"}, - {0x0667, "afii57399"}, - {0x0668, "afii57400"}, - {0x0669, "afii57401"}, - {0x061b, "afii57403"}, - {0x061f, "afii57407"}, - {0x0621, "afii57409"}, - {0x0622, "afii57410"}, - {0x0623, "afii57411"}, - {0x0624, "afii57412"}, - {0x0625, "afii57413"}, - {0x0626, "afii57414"}, - {0x0627, "afii57415"}, - {0x0628, "afii57416"}, - {0x0629, "afii57417"}, - {0x062a, "afii57418"}, - {0x062b, "afii57419"}, - {0x062c, "afii57420"}, - {0x062d, "afii57421"}, - {0x062e, "afii57422"}, - {0x062f, "afii57423"}, - {0x0630, "afii57424"}, - {0x0631, "afii57425"}, - {0x0632, "afii57426"}, - {0x0633, "afii57427"}, - {0x0634, "afii57428"}, - {0x0635, "afii57429"}, - {0x0636, "afii57430"}, - {0x0637, "afii57431"}, - {0x0638, "afii57432"}, - {0x0639, "afii57433"}, - {0x063a, "afii57434"}, - {0x0640, "afii57440"}, - {0x0641, "afii57441"}, - {0x0642, "afii57442"}, - {0x0643, "afii57443"}, - {0x0644, "afii57444"}, - {0x0645, "afii57445"}, - {0x0646, "afii57446"}, - {0x0648, "afii57448"}, - {0x0649, "afii57449"}, - {0x064a, "afii57450"}, - {0x064b, "afii57451"}, - {0x064c, "afii57452"}, - {0x064d, "afii57453"}, - {0x064e, "afii57454"}, - {0x064f, "afii57455"}, - {0x0650, "afii57456"}, - {0x0651, "afii57457"}, - {0x0652, "afii57458"}, - {0x0647, "afii57470"}, - {0x06a4, "afii57505"}, - {0x067e, "afii57506"}, - {0x0686, "afii57507"}, - {0x0698, "afii57508"}, - {0x06af, "afii57509"}, - {0x0679, "afii57511"}, - {0x0688, "afii57512"}, - {0x0691, "afii57513"}, - {0x06ba, "afii57514"}, - {0x06d2, "afii57519"}, - {0x06d5, "afii57534"}, - {0x20aa, "afii57636"}, - {0x05be, "afii57645"}, - {0x05c3, "afii57658"}, - {0x05d0, "afii57664"}, - {0x05d1, "afii57665"}, - {0x05d2, "afii57666"}, - {0x05d3, "afii57667"}, - {0x05d4, "afii57668"}, - {0x05d5, "afii57669"}, - {0x05d6, "afii57670"}, - {0x05d7, "afii57671"}, - {0x05d8, "afii57672"}, - {0x05d9, "afii57673"}, - {0x05da, "afii57674"}, - {0x05db, "afii57675"}, - {0x05dc, "afii57676"}, - {0x05dd, "afii57677"}, - {0x05de, "afii57678"}, - {0x05df, "afii57679"}, - {0x05e0, "afii57680"}, - {0x05e1, "afii57681"}, - {0x05e2, "afii57682"}, - {0x05e3, "afii57683"}, - {0x05e4, "afii57684"}, - {0x05e5, "afii57685"}, - {0x05e6, "afii57686"}, - {0x05e7, "afii57687"}, - {0x05e8, "afii57688"}, - {0x05e9, "afii57689"}, - {0x05ea, "afii57690"}, - {0xfb2a, "afii57694"}, - {0xfb2b, "afii57695"}, - {0xfb4b, "afii57700"}, - {0xfb1f, "afii57705"}, - {0x05f0, "afii57716"}, - {0x05f1, "afii57717"}, - {0x05f2, "afii57718"}, - {0xfb35, "afii57723"}, - {0x05b4, "afii57793"}, - {0x05b5, "afii57794"}, - {0x05b6, "afii57795"}, - {0x05bb, "afii57796"}, - {0x05b8, "afii57797"}, - {0x05b7, "afii57798"}, - {0x05b0, "afii57799"}, - {0x05b2, "afii57800"}, - {0x05b1, "afii57801"}, - {0x05b3, "afii57802"}, - {0x05c2, "afii57803"}, - {0x05c1, "afii57804"}, - {0x05b9, "afii57806"}, - {0x05bc, "afii57807"}, - {0x05bd, "afii57839"}, - {0x05bf, "afii57841"}, - {0x05c0, "afii57842"}, - {0x02bc, "afii57929"}, - {0x2105, "afii61248"}, - {0x2113, "afii61289"}, - {0x2116, "afii61352"}, - {0x202c, "afii61573"}, - {0x202d, "afii61574"}, - {0x202e, "afii61575"}, - {0x200c, "afii61664"}, - {0x066d, "afii63167"}, - {0x02bd, "afii64937"}, - {0x00e0, "agrave"}, - {0x0a85, "agujarati"}, - {0x0a05, "agurmukhi"}, - {0x3042, "ahiragana"}, - {0x1ea3, "ahookabove"}, - {0x0990, "aibengali"}, - {0x311e, "aibopomofo"}, - {0x0910, "aideva"}, - {0x04d5, "aiecyrillic"}, - {0x0a90, "aigujarati"}, - {0x0a10, "aigurmukhi"}, - {0x0a48, "aimatragurmukhi"}, - {0x0639, "ainarabic"}, - {0xfeca, "ainfinalarabic"}, - {0xfecb, "aininitialarabic"}, - {0xfecc, "ainmedialarabic"}, - {0x0203, "ainvertedbreve"}, - {0x09c8, "aivowelsignbengali"}, - {0x0948, "aivowelsigndeva"}, - {0x0ac8, "aivowelsigngujarati"}, - {0x30a2, "akatakana"}, - {0xff71, "akatakanahalfwidth"}, - {0x314f, "akorean"}, - {0x05d0, "alef"}, - {0x0627, "alefarabic"}, - {0xfb30, "alefdageshhebrew"}, - {0xfe8e, "aleffinalarabic"}, - {0x0623, "alefhamzaabovearabic"}, - {0xfe84, "alefhamzaabovefinalarabic"}, - {0x0625, "alefhamzabelowarabic"}, - {0xfe88, "alefhamzabelowfinalarabic"}, - {0x05d0, "alefhebrew"}, - {0xfb4f, "aleflamedhebrew"}, - {0x0622, "alefmaddaabovearabic"}, - {0xfe82, "alefmaddaabovefinalarabic"}, - {0x0649, "alefmaksuraarabic"}, - {0xfef0, "alefmaksurafinalarabic"}, - {0xfef3, "alefmaksurainitialarabic"}, - {0xfef4, "alefmaksuramedialarabic"}, - {0xfb2e, "alefpatahhebrew"}, - {0xfb2f, "alefqamatshebrew"}, - {0x2135, "aleph"}, - {0x224c, "allequal"}, - {0x03b1, "alpha"}, - {0x03ac, "alphatonos"}, - {0x0101, "amacron"}, - {0xff41, "amonospace"}, - {0x0026, "ampersand"}, - {0xff06, "ampersandmonospace"}, - {0xf726, "ampersandsmall"}, - {0x33c2, "amsquare"}, - {0x3122, "anbopomofo"}, - {0x3124, "angbopomofo"}, - {0x0e5a, "angkhankhuthai"}, - {0x2220, "angle"}, - {0x3008, "anglebracketleft"}, - {0xfe3f, "anglebracketleftvertical"}, - {0x3009, "anglebracketright"}, - {0xfe40, "anglebracketrightvertical"}, - {0x2329, "angleleft"}, - {0x232a, "angleright"}, - {0x212b, "angstrom"}, - {0x0387, "anoteleia"}, - {0x0952, "anudattadeva"}, - {0x0982, "anusvarabengali"}, - {0x0902, "anusvaradeva"}, - {0x0a82, "anusvaragujarati"}, - {0x0105, "aogonek"}, - {0x3300, "apaatosquare"}, - {0x249c, "aparen"}, - {0x055a, "apostrophearmenian"}, - {0x02bc, "apostrophemod"}, - {0xf8ff, "apple"}, - {0x2250, "approaches"}, - {0x2248, "approxequal"}, - {0x2252, "approxequalorimage"}, - {0x2245, "approximatelyequal"}, - {0x318e, "araeaekorean"}, - {0x318d, "araeakorean"}, - {0x2312, "arc"}, - {0x1e9a, "arighthalfring"}, - {0x00e5, "aring"}, - {0x01fb, "aringacute"}, - {0x1e01, "aringbelow"}, - {0x2194, "arrowboth"}, - {0x21e3, "arrowdashdown"}, - {0x21e0, "arrowdashleft"}, - {0x21e2, "arrowdashright"}, - {0x21e1, "arrowdashup"}, - {0x21d4, "arrowdblboth"}, - {0x21d3, "arrowdbldown"}, - {0x21d0, "arrowdblleft"}, - {0x21d2, "arrowdblright"}, - {0x21d1, "arrowdblup"}, - {0x2193, "arrowdown"}, - {0x2199, "arrowdownleft"}, - {0x2198, "arrowdownright"}, - {0x21e9, "arrowdownwhite"}, - {0x02c5, "arrowheaddownmod"}, - {0x02c2, "arrowheadleftmod"}, - {0x02c3, "arrowheadrightmod"}, - {0x02c4, "arrowheadupmod"}, - {0xf8e7, "arrowhorizex"}, - {0x2190, "arrowleft"}, - {0x21d0, "arrowleftdbl"}, - {0x21cd, "arrowleftdblstroke"}, - {0x21c6, "arrowleftoverright"}, - {0x21e6, "arrowleftwhite"}, - {0x2192, "arrowright"}, - {0x21cf, "arrowrightdblstroke"}, - {0x279e, "arrowrightheavy"}, - {0x21c4, "arrowrightoverleft"}, - {0x21e8, "arrowrightwhite"}, - {0x21e4, "arrowtableft"}, - {0x21e5, "arrowtabright"}, - {0x2191, "arrowup"}, - {0x2195, "arrowupdn"}, - {0x21a8, "arrowupdnbse"}, - {0x21a8, "arrowupdownbase"}, - {0x2196, "arrowupleft"}, - {0x21c5, "arrowupleftofdown"}, - {0x2197, "arrowupright"}, - {0x21e7, "arrowupwhite"}, - {0xf8e6, "arrowvertex"}, - {0x005e, "asciicircum"}, - {0xff3e, "asciicircummonospace"}, - {0x007e, "asciitilde"}, - {0xff5e, "asciitildemonospace"}, - {0x0251, "ascript"}, - {0x0252, "ascriptturned"}, - {0x3041, "asmallhiragana"}, - {0x30a1, "asmallkatakana"}, - {0xff67, "asmallkatakanahalfwidth"}, - {0x002a, "asterisk"}, - {0x066d, "asteriskaltonearabic"}, - {0x066d, "asteriskarabic"}, - {0x2217, "asteriskmath"}, - {0xff0a, "asteriskmonospace"}, - {0xfe61, "asterisksmall"}, - {0x2042, "asterism"}, - {0xf6e9, "asuperior"}, - {0x2243, "asymptoticallyequal"}, - {0x0040, "at"}, - {0x00e3, "atilde"}, - {0xff20, "atmonospace"}, - {0xfe6b, "atsmall"}, - {0x0250, "aturned"}, - {0x0994, "aubengali"}, - {0x3120, "aubopomofo"}, - {0x0914, "audeva"}, - {0x0a94, "augujarati"}, - {0x0a14, "augurmukhi"}, - {0x09d7, "aulengthmarkbengali"}, - {0x0a4c, "aumatragurmukhi"}, - {0x09cc, "auvowelsignbengali"}, - {0x094c, "auvowelsigndeva"}, - {0x0acc, "auvowelsigngujarati"}, - {0x093d, "avagrahadeva"}, - {0x0561, "aybarmenian"}, - {0x05e2, "ayin"}, - {0xfb20, "ayinaltonehebrew"}, - {0x05e2, "ayinhebrew"}, - {0x0062, "b"}, - {0x09ac, "babengali"}, - {0x005c, "backslash"}, - {0xff3c, "backslashmonospace"}, - {0x092c, "badeva"}, - {0x0aac, "bagujarati"}, - {0x0a2c, "bagurmukhi"}, - {0x3070, "bahiragana"}, - {0x0e3f, "bahtthai"}, - {0x30d0, "bakatakana"}, - {0x007c, "bar"}, - {0xff5c, "barmonospace"}, - {0x3105, "bbopomofo"}, - {0x24d1, "bcircle"}, - {0x1e03, "bdotaccent"}, - {0x1e05, "bdotbelow"}, - {0x266c, "beamedsixteenthnotes"}, - {0x2235, "because"}, - {0x0431, "becyrillic"}, - {0x0628, "beharabic"}, - {0xfe90, "behfinalarabic"}, - {0xfe91, "behinitialarabic"}, - {0x3079, "behiragana"}, - {0xfe92, "behmedialarabic"}, - {0xfc9f, "behmeeminitialarabic"}, - {0xfc08, "behmeemisolatedarabic"}, - {0xfc6d, "behnoonfinalarabic"}, - {0x30d9, "bekatakana"}, - {0x0562, "benarmenian"}, - {0x05d1, "bet"}, - {0x03b2, "beta"}, - {0x03d0, "betasymbolgreek"}, - {0xfb31, "betdagesh"}, - {0xfb31, "betdageshhebrew"}, - {0x05d1, "bethebrew"}, - {0xfb4c, "betrafehebrew"}, - {0x09ad, "bhabengali"}, - {0x092d, "bhadeva"}, - {0x0aad, "bhagujarati"}, - {0x0a2d, "bhagurmukhi"}, - {0x0253, "bhook"}, - {0x3073, "bihiragana"}, - {0x30d3, "bikatakana"}, - {0x0298, "bilabialclick"}, - {0x0a02, "bindigurmukhi"}, - {0x3331, "birusquare"}, - {0x25cf, "blackcircle"}, - {0x25c6, "blackdiamond"}, - {0x25bc, "blackdownpointingtriangle"}, - {0x25c4, "blackleftpointingpointer"}, - {0x25c0, "blackleftpointingtriangle"}, - {0x3010, "blacklenticularbracketleft"}, - {0xfe3b, "blacklenticularbracketleftvertical"}, - {0x3011, "blacklenticularbracketright"}, - {0xfe3c, "blacklenticularbracketrightvertical"}, - {0x25e3, "blacklowerlefttriangle"}, - {0x25e2, "blacklowerrighttriangle"}, - {0x25ac, "blackrectangle"}, - {0x25ba, "blackrightpointingpointer"}, - {0x25b6, "blackrightpointingtriangle"}, - {0x25aa, "blacksmallsquare"}, - {0x263b, "blacksmilingface"}, - {0x25a0, "blacksquare"}, - {0x2605, "blackstar"}, - {0x25e4, "blackupperlefttriangle"}, - {0x25e5, "blackupperrighttriangle"}, - {0x25b4, "blackuppointingsmalltriangle"}, - {0x25b2, "blackuppointingtriangle"}, - {0x2423, "blank"}, - {0x1e07, "blinebelow"}, - {0x2588, "block"}, - {0xff42, "bmonospace"}, - {0x0e1a, "bobaimaithai"}, - {0x307c, "bohiragana"}, - {0x30dc, "bokatakana"}, - {0x249d, "bparen"}, - {0x33c3, "bqsquare"}, - {0xf8f4, "braceex"}, - {0x007b, "braceleft"}, - {0xf8f3, "braceleftbt"}, - {0xf8f2, "braceleftmid"}, - {0xff5b, "braceleftmonospace"}, - {0xfe5b, "braceleftsmall"}, - {0xf8f1, "bracelefttp"}, - {0xfe37, "braceleftvertical"}, - {0x007d, "braceright"}, - {0xf8fe, "bracerightbt"}, - {0xf8fd, "bracerightmid"}, - {0xff5d, "bracerightmonospace"}, - {0xfe5c, "bracerightsmall"}, - {0xf8fc, "bracerighttp"}, - {0xfe38, "bracerightvertical"}, - {0x005b, "bracketleft"}, - {0xf8f0, "bracketleftbt"}, - {0xf8ef, "bracketleftex"}, - {0xff3b, "bracketleftmonospace"}, - {0xf8ee, "bracketlefttp"}, - {0x005d, "bracketright"}, - {0xf8fb, "bracketrightbt"}, - {0xf8fa, "bracketrightex"}, - {0xff3d, "bracketrightmonospace"}, - {0xf8f9, "bracketrighttp"}, - {0x02d8, "breve"}, - {0x032e, "brevebelowcmb"}, - {0x0306, "brevecmb"}, - {0x032f, "breveinvertedbelowcmb"}, - {0x0311, "breveinvertedcmb"}, - {0x0361, "breveinverteddoublecmb"}, - {0x032a, "bridgebelowcmb"}, - {0x033a, "bridgeinvertedbelowcmb"}, - {0x00a6, "brokenbar"}, - {0x0180, "bstroke"}, - {0xf6ea, "bsuperior"}, - {0x0183, "btopbar"}, - {0x3076, "buhiragana"}, - {0x30d6, "bukatakana"}, - {0x2022, "bullet"}, - {0x25d8, "bulletinverse"}, - {0x2219, "bulletoperator"}, - {0x25ce, "bullseye"}, - {0x0063, "c"}, - {0x056e, "caarmenian"}, - {0x099a, "cabengali"}, - {0x0107, "cacute"}, - {0x091a, "cadeva"}, - {0x0a9a, "cagujarati"}, - {0x0a1a, "cagurmukhi"}, - {0x3388, "calsquare"}, - {0x0981, "candrabindubengali"}, - {0x0310, "candrabinducmb"}, - {0x0901, "candrabindudeva"}, - {0x0a81, "candrabindugujarati"}, - {0x21ea, "capslock"}, - {0x2105, "careof"}, - {0x02c7, "caron"}, - {0x032c, "caronbelowcmb"}, - {0x030c, "caroncmb"}, - {0x21b5, "carriagereturn"}, - {0x3118, "cbopomofo"}, - {0x010d, "ccaron"}, - {0x00e7, "ccedilla"}, - {0x1e09, "ccedillaacute"}, - {0x24d2, "ccircle"}, - {0x0109, "ccircumflex"}, - {0x0255, "ccurl"}, - {0x010b, "cdot"}, - {0x010b, "cdotaccent"}, - {0x33c5, "cdsquare"}, - {0x00b8, "cedilla"}, - {0x0327, "cedillacmb"}, - {0x00a2, "cent"}, - {0x2103, "centigrade"}, - {0xf6df, "centinferior"}, - {0xffe0, "centmonospace"}, - {0xf7a2, "centoldstyle"}, - {0xf6e0, "centsuperior"}, - {0x0579, "chaarmenian"}, - {0x099b, "chabengali"}, - {0x091b, "chadeva"}, - {0x0a9b, "chagujarati"}, - {0x0a1b, "chagurmukhi"}, - {0x3114, "chbopomofo"}, - {0x04bd, "cheabkhasiancyrillic"}, - {0x2713, "checkmark"}, - {0x0447, "checyrillic"}, - {0x04bf, "chedescenderabkhasiancyrillic"}, - {0x04b7, "chedescendercyrillic"}, - {0x04f5, "chedieresiscyrillic"}, - {0x0573, "cheharmenian"}, - {0x04cc, "chekhakassiancyrillic"}, - {0x04b9, "cheverticalstrokecyrillic"}, - {0x03c7, "chi"}, - {0x3277, "chieuchacirclekorean"}, - {0x3217, "chieuchaparenkorean"}, - {0x3269, "chieuchcirclekorean"}, - {0x314a, "chieuchkorean"}, - {0x3209, "chieuchparenkorean"}, - {0x0e0a, "chochangthai"}, - {0x0e08, "chochanthai"}, - {0x0e09, "chochingthai"}, - {0x0e0c, "chochoethai"}, - {0x0188, "chook"}, - {0x3276, "cieucacirclekorean"}, - {0x3216, "cieucaparenkorean"}, - {0x3268, "cieuccirclekorean"}, - {0x3148, "cieuckorean"}, - {0x3208, "cieucparenkorean"}, - {0x321c, "cieucuparenkorean"}, - {0x25cb, "circle"}, - {0x2297, "circlemultiply"}, - {0x2299, "circleot"}, - {0x2295, "circleplus"}, - {0x3036, "circlepostalmark"}, - {0x25d0, "circlewithlefthalfblack"}, - {0x25d1, "circlewithrighthalfblack"}, - {0x02c6, "circumflex"}, - {0x032d, "circumflexbelowcmb"}, - {0x0302, "circumflexcmb"}, - {0x2327, "clear"}, - {0x01c2, "clickalveolar"}, - {0x01c0, "clickdental"}, - {0x01c1, "clicklateral"}, - {0x01c3, "clickretroflex"}, - {0x2663, "club"}, - {0x2663, "clubsuitblack"}, - {0x2667, "clubsuitwhite"}, - {0x33a4, "cmcubedsquare"}, - {0xff43, "cmonospace"}, - {0x33a0, "cmsquaredsquare"}, - {0x0581, "coarmenian"}, - {0x003a, "colon"}, - {0x20a1, "colonmonetary"}, - {0xff1a, "colonmonospace"}, - {0x20a1, "colonsign"}, - {0xfe55, "colonsmall"}, - {0x02d1, "colontriangularhalfmod"}, - {0x02d0, "colontriangularmod"}, - {0x002c, "comma"}, - {0x0313, "commaabovecmb"}, - {0x0315, "commaaboverightcmb"}, - {0xf6c3, "commaaccent"}, - {0x060c, "commaarabic"}, - {0x055d, "commaarmenian"}, - {0xf6e1, "commainferior"}, - {0xff0c, "commamonospace"}, - {0x0314, "commareversedabovecmb"}, - {0x02bd, "commareversedmod"}, - {0xfe50, "commasmall"}, - {0xf6e2, "commasuperior"}, - {0x0312, "commaturnedabovecmb"}, - {0x02bb, "commaturnedmod"}, - {0x263c, "compass"}, - {0x2245, "congruent"}, - {0x222e, "contourintegral"}, - {0x2303, "control"}, - {0x0006, "controlACK"}, - {0x0007, "controlBEL"}, - {0x0008, "controlBS"}, - {0x0018, "controlCAN"}, - {0x000d, "controlCR"}, - {0x0011, "controlDC1"}, - {0x0012, "controlDC2"}, - {0x0013, "controlDC3"}, - {0x0014, "controlDC4"}, - {0x007f, "controlDEL"}, - {0x0010, "controlDLE"}, - {0x0019, "controlEM"}, - {0x0005, "controlENQ"}, - {0x0004, "controlEOT"}, - {0x001b, "controlESC"}, - {0x0017, "controlETB"}, - {0x0003, "controlETX"}, - {0x000c, "controlFF"}, - {0x001c, "controlFS"}, - {0x001d, "controlGS"}, - {0x0009, "controlHT"}, - {0x000a, "controlLF"}, - {0x0015, "controlNAK"}, - {0x001e, "controlRS"}, - {0x000f, "controlSI"}, - {0x000e, "controlSO"}, - {0x0002, "controlSOT"}, - {0x0001, "controlSTX"}, - {0x001a, "controlSUB"}, - {0x0016, "controlSYN"}, - {0x001f, "controlUS"}, - {0x000b, "controlVT"}, - {0x00a9, "copyright"}, - {0xf8e9, "copyrightsans"}, - {0xf6d9, "copyrightserif"}, - {0x300c, "cornerbracketleft"}, - {0xff62, "cornerbracketlefthalfwidth"}, - {0xfe41, "cornerbracketleftvertical"}, - {0x300d, "cornerbracketright"}, - {0xff63, "cornerbracketrighthalfwidth"}, - {0xfe42, "cornerbracketrightvertical"}, - {0x337f, "corporationsquare"}, - {0x33c7, "cosquare"}, - {0x33c6, "coverkgsquare"}, - {0x249e, "cparen"}, - {0x20a2, "cruzeiro"}, - {0x0297, "cstretched"}, - {0x22cf, "curlyand"}, - {0x22ce, "curlyor"}, - {0x00a4, "currency"}, - {0xf6d1, "cyrBreve"}, - {0xf6d2, "cyrFlex"}, - {0xf6d4, "cyrbreve"}, - {0xf6d5, "cyrflex"}, - {0x0064, "d"}, - {0x0564, "daarmenian"}, - {0x09a6, "dabengali"}, - {0x0636, "dadarabic"}, - {0x0926, "dadeva"}, - {0xfebe, "dadfinalarabic"}, - {0xfebf, "dadinitialarabic"}, - {0xfec0, "dadmedialarabic"}, - {0x05bc, "dagesh"}, - {0x05bc, "dageshhebrew"}, - {0x2020, "dagger"}, - {0x2021, "daggerdbl"}, - {0x0aa6, "dagujarati"}, - {0x0a26, "dagurmukhi"}, - {0x3060, "dahiragana"}, - {0x30c0, "dakatakana"}, - {0x062f, "dalarabic"}, - {0x05d3, "dalet"}, - {0xfb33, "daletdagesh"}, - {0xfb33, "daletdageshhebrew"}, - {0x05d3, "dalethebrew"}, - {0xfeaa, "dalfinalarabic"}, - {0x064f, "dammaarabic"}, - {0x064f, "dammalowarabic"}, - {0x064c, "dammatanaltonearabic"}, - {0x064c, "dammatanarabic"}, - {0x0964, "danda"}, - {0x05a7, "dargahebrew"}, - {0x05a7, "dargalefthebrew"}, - {0x0485, "dasiapneumatacyrilliccmb"}, - {0xf6d3, "dblGrave"}, - {0x300a, "dblanglebracketleft"}, - {0xfe3d, "dblanglebracketleftvertical"}, - {0x300b, "dblanglebracketright"}, - {0xfe3e, "dblanglebracketrightvertical"}, - {0x032b, "dblarchinvertedbelowcmb"}, - {0x21d4, "dblarrowleft"}, - {0x21d2, "dblarrowright"}, - {0x0965, "dbldanda"}, - {0xf6d6, "dblgrave"}, - {0x030f, "dblgravecmb"}, - {0x222c, "dblintegral"}, - {0x2017, "dbllowline"}, - {0x0333, "dbllowlinecmb"}, - {0x033f, "dbloverlinecmb"}, - {0x02ba, "dblprimemod"}, - {0x2016, "dblverticalbar"}, - {0x030e, "dblverticallineabovecmb"}, - {0x3109, "dbopomofo"}, - {0x33c8, "dbsquare"}, - {0x010f, "dcaron"}, - {0x1e11, "dcedilla"}, - {0x24d3, "dcircle"}, - {0x1e13, "dcircumflexbelow"}, - {0x0111, "dcroat"}, - {0x09a1, "ddabengali"}, - {0x0921, "ddadeva"}, - {0x0aa1, "ddagujarati"}, - {0x0a21, "ddagurmukhi"}, - {0x0688, "ddalarabic"}, - {0xfb89, "ddalfinalarabic"}, - {0x095c, "dddhadeva"}, - {0x09a2, "ddhabengali"}, - {0x0922, "ddhadeva"}, - {0x0aa2, "ddhagujarati"}, - {0x0a22, "ddhagurmukhi"}, - {0x1e0b, "ddotaccent"}, - {0x1e0d, "ddotbelow"}, - {0x066b, "decimalseparatorarabic"}, - {0x066b, "decimalseparatorpersian"}, - {0x0434, "decyrillic"}, - {0x00b0, "degree"}, - {0x05ad, "dehihebrew"}, - {0x3067, "dehiragana"}, - {0x03ef, "deicoptic"}, - {0x30c7, "dekatakana"}, - {0x232b, "deleteleft"}, - {0x2326, "deleteright"}, - {0x03b4, "delta"}, - {0x018d, "deltaturned"}, - {0x09f8, "denominatorminusonenumeratorbengali"}, - {0x02a4, "dezh"}, - {0x09a7, "dhabengali"}, - {0x0927, "dhadeva"}, - {0x0aa7, "dhagujarati"}, - {0x0a27, "dhagurmukhi"}, - {0x0257, "dhook"}, - {0x0385, "dialytikatonos"}, - {0x0344, "dialytikatonoscmb"}, - {0x2666, "diamond"}, - {0x2662, "diamondsuitwhite"}, - {0x00a8, "dieresis"}, - {0xf6d7, "dieresisacute"}, - {0x0324, "dieresisbelowcmb"}, - {0x0308, "dieresiscmb"}, - {0xf6d8, "dieresisgrave"}, - {0x0385, "dieresistonos"}, - {0x3062, "dihiragana"}, - {0x30c2, "dikatakana"}, - {0x3003, "dittomark"}, - {0x00f7, "divide"}, - {0x2223, "divides"}, - {0x2215, "divisionslash"}, - {0x0452, "djecyrillic"}, - {0x2593, "dkshade"}, - {0x1e0f, "dlinebelow"}, - {0x3397, "dlsquare"}, - {0x0111, "dmacron"}, - {0xff44, "dmonospace"}, - {0x2584, "dnblock"}, - {0x0e0e, "dochadathai"}, - {0x0e14, "dodekthai"}, - {0x3069, "dohiragana"}, - {0x30c9, "dokatakana"}, - {0x0024, "dollar"}, - {0xf6e3, "dollarinferior"}, - {0xff04, "dollarmonospace"}, - {0xf724, "dollaroldstyle"}, - {0xfe69, "dollarsmall"}, - {0xf6e4, "dollarsuperior"}, - {0x20ab, "dong"}, - {0x3326, "dorusquare"}, - {0x02d9, "dotaccent"}, - {0x0307, "dotaccentcmb"}, - {0x0323, "dotbelowcmb"}, - {0x0323, "dotbelowcomb"}, - {0x30fb, "dotkatakana"}, - {0x0131, "dotlessi"}, - {0xf6be, "dotlessj"}, - {0x0284, "dotlessjstrokehook"}, - {0x22c5, "dotmath"}, - {0x25cc, "dottedcircle"}, - {0xfb1f, "doubleyodpatah"}, - {0xfb1f, "doubleyodpatahhebrew"}, - {0x031e, "downtackbelowcmb"}, - {0x02d5, "downtackmod"}, - {0x249f, "dparen"}, - {0xf6eb, "dsuperior"}, - {0x0256, "dtail"}, - {0x018c, "dtopbar"}, - {0x3065, "duhiragana"}, - {0x30c5, "dukatakana"}, - {0x01f3, "dz"}, - {0x02a3, "dzaltone"}, - {0x01c6, "dzcaron"}, - {0x02a5, "dzcurl"}, - {0x04e1, "dzeabkhasiancyrillic"}, - {0x0455, "dzecyrillic"}, - {0x045f, "dzhecyrillic"}, - {0x0065, "e"}, - {0x00e9, "eacute"}, - {0x2641, "earth"}, - {0x098f, "ebengali"}, - {0x311c, "ebopomofo"}, - {0x0115, "ebreve"}, - {0x090d, "ecandradeva"}, - {0x0a8d, "ecandragujarati"}, - {0x0945, "ecandravowelsigndeva"}, - {0x0ac5, "ecandravowelsigngujarati"}, - {0x011b, "ecaron"}, - {0x1e1d, "ecedillabreve"}, - {0x0565, "echarmenian"}, - {0x0587, "echyiwnarmenian"}, - {0x24d4, "ecircle"}, - {0x00ea, "ecircumflex"}, - {0x1ebf, "ecircumflexacute"}, - {0x1e19, "ecircumflexbelow"}, - {0x1ec7, "ecircumflexdotbelow"}, - {0x1ec1, "ecircumflexgrave"}, - {0x1ec3, "ecircumflexhookabove"}, - {0x1ec5, "ecircumflextilde"}, - {0x0454, "ecyrillic"}, - {0x0205, "edblgrave"}, - {0x090f, "edeva"}, - {0x00eb, "edieresis"}, - {0x0117, "edot"}, - {0x0117, "edotaccent"}, - {0x1eb9, "edotbelow"}, - {0x0a0f, "eegurmukhi"}, - {0x0a47, "eematragurmukhi"}, - {0x0444, "efcyrillic"}, - {0x00e8, "egrave"}, - {0x0a8f, "egujarati"}, - {0x0567, "eharmenian"}, - {0x311d, "ehbopomofo"}, - {0x3048, "ehiragana"}, - {0x1ebb, "ehookabove"}, - {0x311f, "eibopomofo"}, - {0x0038, "eight"}, - {0x0668, "eightarabic"}, - {0x09ee, "eightbengali"}, - {0x2467, "eightcircle"}, - {0x2791, "eightcircleinversesansserif"}, - {0x096e, "eightdeva"}, - {0x2471, "eighteencircle"}, - {0x2485, "eighteenparen"}, - {0x2499, "eighteenperiod"}, - {0x0aee, "eightgujarati"}, - {0x0a6e, "eightgurmukhi"}, - {0x0668, "eighthackarabic"}, - {0x3028, "eighthangzhou"}, - {0x266b, "eighthnotebeamed"}, - {0x3227, "eightideographicparen"}, - {0x2088, "eightinferior"}, - {0xff18, "eightmonospace"}, - {0xf738, "eightoldstyle"}, - {0x247b, "eightparen"}, - {0x248f, "eightperiod"}, - {0x06f8, "eightpersian"}, - {0x2177, "eightroman"}, - {0x2078, "eightsuperior"}, - {0x0e58, "eightthai"}, - {0x0207, "einvertedbreve"}, - {0x0465, "eiotifiedcyrillic"}, - {0x30a8, "ekatakana"}, - {0xff74, "ekatakanahalfwidth"}, - {0x0a74, "ekonkargurmukhi"}, - {0x3154, "ekorean"}, - {0x043b, "elcyrillic"}, - {0x2208, "element"}, - {0x246a, "elevencircle"}, - {0x247e, "elevenparen"}, - {0x2492, "elevenperiod"}, - {0x217a, "elevenroman"}, - {0x2026, "ellipsis"}, - {0x22ee, "ellipsisvertical"}, - {0x0113, "emacron"}, - {0x1e17, "emacronacute"}, - {0x1e15, "emacrongrave"}, - {0x043c, "emcyrillic"}, - {0x2014, "emdash"}, - {0xfe31, "emdashvertical"}, - {0xff45, "emonospace"}, - {0x055b, "emphasismarkarmenian"}, - {0x2205, "emptyset"}, - {0x3123, "enbopomofo"}, - {0x043d, "encyrillic"}, - {0x2013, "endash"}, - {0xfe32, "endashvertical"}, - {0x04a3, "endescendercyrillic"}, - {0x014b, "eng"}, - {0x3125, "engbopomofo"}, - {0x04a5, "enghecyrillic"}, - {0x04c8, "enhookcyrillic"}, - {0x2002, "enspace"}, - {0x0119, "eogonek"}, - {0x3153, "eokorean"}, - {0x025b, "eopen"}, - {0x029a, "eopenclosed"}, - {0x025c, "eopenreversed"}, - {0x025e, "eopenreversedclosed"}, - {0x025d, "eopenreversedhook"}, - {0x24a0, "eparen"}, - {0x03b5, "epsilon"}, - {0x03ad, "epsilontonos"}, - {0x003d, "equal"}, - {0xff1d, "equalmonospace"}, - {0xfe66, "equalsmall"}, - {0x207c, "equalsuperior"}, - {0x2261, "equivalence"}, - {0x3126, "erbopomofo"}, - {0x0440, "ercyrillic"}, - {0x0258, "ereversed"}, - {0x044d, "ereversedcyrillic"}, - {0x0441, "escyrillic"}, - {0x04ab, "esdescendercyrillic"}, - {0x0283, "esh"}, - {0x0286, "eshcurl"}, - {0x090e, "eshortdeva"}, - {0x0946, "eshortvowelsigndeva"}, - {0x01aa, "eshreversedloop"}, - {0x0285, "eshsquatreversed"}, - {0x3047, "esmallhiragana"}, - {0x30a7, "esmallkatakana"}, - {0xff6a, "esmallkatakanahalfwidth"}, - {0x212e, "estimated"}, - {0xf6ec, "esuperior"}, - {0x03b7, "eta"}, - {0x0568, "etarmenian"}, - {0x03ae, "etatonos"}, - {0x00f0, "eth"}, - {0x1ebd, "etilde"}, - {0x1e1b, "etildebelow"}, - {0x0591, "etnahtafoukhhebrew"}, - {0x0591, "etnahtafoukhlefthebrew"}, - {0x0591, "etnahtahebrew"}, - {0x0591, "etnahtalefthebrew"}, - {0x01dd, "eturned"}, - {0x3161, "eukorean"}, - {0x20ac, "euro"}, - {0x09c7, "evowelsignbengali"}, - {0x0947, "evowelsigndeva"}, - {0x0ac7, "evowelsigngujarati"}, - {0x0021, "exclam"}, - {0x055c, "exclamarmenian"}, - {0x203c, "exclamdbl"}, - {0x00a1, "exclamdown"}, - {0xf7a1, "exclamdownsmall"}, - {0x0021, "exclamleft"}, - {0xff01, "exclammonospace"}, - {0xf721, "exclamsmall"}, - {0x2203, "existential"}, - {0x0292, "ezh"}, - {0x01ef, "ezhcaron"}, - {0x0293, "ezhcurl"}, - {0x01b9, "ezhreversed"}, - {0x01ba, "ezhtail"}, - {0x0066, "f"}, - {0x095e, "fadeva"}, - {0x0a5e, "fagurmukhi"}, - {0x2109, "fahrenheit"}, - {0x064e, "fathaarabic"}, - {0x064e, "fathalowarabic"}, - {0x064b, "fathatanarabic"}, - {0x3108, "fbopomofo"}, - {0x24d5, "fcircle"}, - {0x1e1f, "fdotaccent"}, - {0x0641, "feharabic"}, - {0x0586, "feharmenian"}, - {0xfed2, "fehfinalarabic"}, - {0xfed3, "fehinitialarabic"}, - {0xfed4, "fehmedialarabic"}, - {0x03e5, "feicoptic"}, - {0x2640, "female"}, - {0xfb00, "ff"}, - {0xfb03, "ffi"}, - {0xfb04, "ffl"}, - {0xfb01, "fi"}, - {0x246e, "fifteencircle"}, - {0x2482, "fifteenparen"}, - {0x2496, "fifteenperiod"}, - {0x2012, "figuredash"}, - {0x25a0, "filledbox"}, - {0x25ac, "filledrect"}, - {0x05da, "finalkaf"}, - {0xfb3a, "finalkafdagesh"}, - {0xfb3a, "finalkafdageshhebrew"}, - {0x05da, "finalkafhebrew"}, - {0x05dd, "finalmem"}, - {0x05dd, "finalmemhebrew"}, - {0x05df, "finalnun"}, - {0x05df, "finalnunhebrew"}, - {0x05e3, "finalpe"}, - {0x05e3, "finalpehebrew"}, - {0x05e5, "finaltsadi"}, - {0x05e5, "finaltsadihebrew"}, - {0x02c9, "firsttonechinese"}, - {0x25c9, "fisheye"}, - {0x0473, "fitacyrillic"}, - {0x0035, "five"}, - {0x0665, "fivearabic"}, - {0x09eb, "fivebengali"}, - {0x2464, "fivecircle"}, - {0x278e, "fivecircleinversesansserif"}, - {0x096b, "fivedeva"}, - {0x215d, "fiveeighths"}, - {0x0aeb, "fivegujarati"}, - {0x0a6b, "fivegurmukhi"}, - {0x0665, "fivehackarabic"}, - {0x3025, "fivehangzhou"}, - {0x3224, "fiveideographicparen"}, - {0x2085, "fiveinferior"}, - {0xff15, "fivemonospace"}, - {0xf735, "fiveoldstyle"}, - {0x2478, "fiveparen"}, - {0x248c, "fiveperiod"}, - {0x06f5, "fivepersian"}, - {0x2174, "fiveroman"}, - {0x2075, "fivesuperior"}, - {0x0e55, "fivethai"}, - {0xfb02, "fl"}, - {0x0192, "florin"}, - {0xff46, "fmonospace"}, - {0x3399, "fmsquare"}, - {0x0e1f, "fofanthai"}, - {0x0e1d, "fofathai"}, - {0x0e4f, "fongmanthai"}, - {0x2200, "forall"}, - {0x0034, "four"}, - {0x0664, "fourarabic"}, - {0x09ea, "fourbengali"}, - {0x2463, "fourcircle"}, - {0x278d, "fourcircleinversesansserif"}, - {0x096a, "fourdeva"}, - {0x0aea, "fourgujarati"}, - {0x0a6a, "fourgurmukhi"}, - {0x0664, "fourhackarabic"}, - {0x3024, "fourhangzhou"}, - {0x3223, "fourideographicparen"}, - {0x2084, "fourinferior"}, - {0xff14, "fourmonospace"}, - {0x09f7, "fournumeratorbengali"}, - {0xf734, "fouroldstyle"}, - {0x2477, "fourparen"}, - {0x248b, "fourperiod"}, - {0x06f4, "fourpersian"}, - {0x2173, "fourroman"}, - {0x2074, "foursuperior"}, - {0x246d, "fourteencircle"}, - {0x2481, "fourteenparen"}, - {0x2495, "fourteenperiod"}, - {0x0e54, "fourthai"}, - {0x02cb, "fourthtonechinese"}, - {0x24a1, "fparen"}, - {0x2044, "fraction"}, - {0x20a3, "franc"}, - {0x0067, "g"}, - {0x0997, "gabengali"}, - {0x01f5, "gacute"}, - {0x0917, "gadeva"}, - {0x06af, "gafarabic"}, - {0xfb93, "gaffinalarabic"}, - {0xfb94, "gafinitialarabic"}, - {0xfb95, "gafmedialarabic"}, - {0x0a97, "gagujarati"}, - {0x0a17, "gagurmukhi"}, - {0x304c, "gahiragana"}, - {0x30ac, "gakatakana"}, - {0x03b3, "gamma"}, - {0x0263, "gammalatinsmall"}, - {0x02e0, "gammasuperior"}, - {0x03eb, "gangiacoptic"}, - {0x310d, "gbopomofo"}, - {0x011f, "gbreve"}, - {0x01e7, "gcaron"}, - {0x0123, "gcedilla"}, - {0x24d6, "gcircle"}, - {0x011d, "gcircumflex"}, - {0x0123, "gcommaaccent"}, - {0x0121, "gdot"}, - {0x0121, "gdotaccent"}, - {0x0433, "gecyrillic"}, - {0x3052, "gehiragana"}, - {0x30b2, "gekatakana"}, - {0x2251, "geometricallyequal"}, - {0x059c, "gereshaccenthebrew"}, - {0x05f3, "gereshhebrew"}, - {0x059d, "gereshmuqdamhebrew"}, - {0x00df, "germandbls"}, - {0x059e, "gershayimaccenthebrew"}, - {0x05f4, "gershayimhebrew"}, - {0x3013, "getamark"}, - {0x0998, "ghabengali"}, - {0x0572, "ghadarmenian"}, - {0x0918, "ghadeva"}, - {0x0a98, "ghagujarati"}, - {0x0a18, "ghagurmukhi"}, - {0x063a, "ghainarabic"}, - {0xfece, "ghainfinalarabic"}, - {0xfecf, "ghaininitialarabic"}, - {0xfed0, "ghainmedialarabic"}, - {0x0495, "ghemiddlehookcyrillic"}, - {0x0493, "ghestrokecyrillic"}, - {0x0491, "gheupturncyrillic"}, - {0x095a, "ghhadeva"}, - {0x0a5a, "ghhagurmukhi"}, - {0x0260, "ghook"}, - {0x3393, "ghzsquare"}, - {0x304e, "gihiragana"}, - {0x30ae, "gikatakana"}, - {0x0563, "gimarmenian"}, - {0x05d2, "gimel"}, - {0xfb32, "gimeldagesh"}, - {0xfb32, "gimeldageshhebrew"}, - {0x05d2, "gimelhebrew"}, - {0x0453, "gjecyrillic"}, - {0x01be, "glottalinvertedstroke"}, - {0x0294, "glottalstop"}, - {0x0296, "glottalstopinverted"}, - {0x02c0, "glottalstopmod"}, - {0x0295, "glottalstopreversed"}, - {0x02c1, "glottalstopreversedmod"}, - {0x02e4, "glottalstopreversedsuperior"}, - {0x02a1, "glottalstopstroke"}, - {0x02a2, "glottalstopstrokereversed"}, - {0x1e21, "gmacron"}, - {0xff47, "gmonospace"}, - {0x3054, "gohiragana"}, - {0x30b4, "gokatakana"}, - {0x24a2, "gparen"}, - {0x33ac, "gpasquare"}, - {0x2207, "gradient"}, - {0x0060, "grave"}, - {0x0316, "gravebelowcmb"}, - {0x0300, "gravecmb"}, - {0x0300, "gravecomb"}, - {0x0953, "gravedeva"}, - {0x02ce, "gravelowmod"}, - {0xff40, "gravemonospace"}, - {0x0340, "gravetonecmb"}, - {0x003e, "greater"}, - {0x2265, "greaterequal"}, - {0x22db, "greaterequalorless"}, - {0xff1e, "greatermonospace"}, - {0x2273, "greaterorequivalent"}, - {0x2277, "greaterorless"}, - {0x2267, "greateroverequal"}, - {0xfe65, "greatersmall"}, - {0x0261, "gscript"}, - {0x01e5, "gstroke"}, - {0x3050, "guhiragana"}, - {0x00ab, "guillemotleft"}, - {0x00bb, "guillemotright"}, - {0x2039, "guilsinglleft"}, - {0x203a, "guilsinglright"}, - {0x30b0, "gukatakana"}, - {0x3318, "guramusquare"}, - {0x33c9, "gysquare"}, - {0x0068, "h"}, - {0x04a9, "haabkhasiancyrillic"}, - {0x06c1, "haaltonearabic"}, - {0x09b9, "habengali"}, - {0x04b3, "hadescendercyrillic"}, - {0x0939, "hadeva"}, - {0x0ab9, "hagujarati"}, - {0x0a39, "hagurmukhi"}, - {0x062d, "haharabic"}, - {0xfea2, "hahfinalarabic"}, - {0xfea3, "hahinitialarabic"}, - {0x306f, "hahiragana"}, - {0xfea4, "hahmedialarabic"}, - {0x332a, "haitusquare"}, - {0x30cf, "hakatakana"}, - {0xff8a, "hakatakanahalfwidth"}, - {0x0a4d, "halantgurmukhi"}, - {0x0621, "hamzaarabic"}, - {0x0621, "hamzalowarabic"}, - {0x3164, "hangulfiller"}, - {0x044a, "hardsigncyrillic"}, - {0x21bc, "harpoonleftbarbup"}, - {0x21c0, "harpoonrightbarbup"}, - {0x33ca, "hasquare"}, - {0x05b2, "hatafpatah"}, - {0x05b2, "hatafpatah16"}, - {0x05b2, "hatafpatah23"}, - {0x05b2, "hatafpatah2f"}, - {0x05b2, "hatafpatahhebrew"}, - {0x05b2, "hatafpatahnarrowhebrew"}, - {0x05b2, "hatafpatahquarterhebrew"}, - {0x05b2, "hatafpatahwidehebrew"}, - {0x05b3, "hatafqamats"}, - {0x05b3, "hatafqamats1b"}, - {0x05b3, "hatafqamats28"}, - {0x05b3, "hatafqamats34"}, - {0x05b3, "hatafqamatshebrew"}, - {0x05b3, "hatafqamatsnarrowhebrew"}, - {0x05b3, "hatafqamatsquarterhebrew"}, - {0x05b3, "hatafqamatswidehebrew"}, - {0x05b1, "hatafsegol"}, - {0x05b1, "hatafsegol17"}, - {0x05b1, "hatafsegol24"}, - {0x05b1, "hatafsegol30"}, - {0x05b1, "hatafsegolhebrew"}, - {0x05b1, "hatafsegolnarrowhebrew"}, - {0x05b1, "hatafsegolquarterhebrew"}, - {0x05b1, "hatafsegolwidehebrew"}, - {0x0127, "hbar"}, - {0x310f, "hbopomofo"}, - {0x1e2b, "hbrevebelow"}, - {0x1e29, "hcedilla"}, - {0x24d7, "hcircle"}, - {0x0125, "hcircumflex"}, - {0x1e27, "hdieresis"}, - {0x1e23, "hdotaccent"}, - {0x1e25, "hdotbelow"}, - {0x05d4, "he"}, - {0x2665, "heart"}, - {0x2665, "heartsuitblack"}, - {0x2661, "heartsuitwhite"}, - {0xfb34, "hedagesh"}, - {0xfb34, "hedageshhebrew"}, - {0x06c1, "hehaltonearabic"}, - {0x0647, "heharabic"}, - {0x05d4, "hehebrew"}, - {0xfba7, "hehfinalaltonearabic"}, - {0xfeea, "hehfinalalttwoarabic"}, - {0xfeea, "hehfinalarabic"}, - {0xfba5, "hehhamzaabovefinalarabic"}, - {0xfba4, "hehhamzaaboveisolatedarabic"}, - {0xfba8, "hehinitialaltonearabic"}, - {0xfeeb, "hehinitialarabic"}, - {0x3078, "hehiragana"}, - {0xfba9, "hehmedialaltonearabic"}, - {0xfeec, "hehmedialarabic"}, - {0x337b, "heiseierasquare"}, - {0x30d8, "hekatakana"}, - {0xff8d, "hekatakanahalfwidth"}, - {0x3336, "hekutaarusquare"}, - {0x0267, "henghook"}, - {0x3339, "herutusquare"}, - {0x05d7, "het"}, - {0x05d7, "hethebrew"}, - {0x0266, "hhook"}, - {0x02b1, "hhooksuperior"}, - {0x327b, "hieuhacirclekorean"}, - {0x321b, "hieuhaparenkorean"}, - {0x326d, "hieuhcirclekorean"}, - {0x314e, "hieuhkorean"}, - {0x320d, "hieuhparenkorean"}, - {0x3072, "hihiragana"}, - {0x30d2, "hikatakana"}, - {0xff8b, "hikatakanahalfwidth"}, - {0x05b4, "hiriq"}, - {0x05b4, "hiriq14"}, - {0x05b4, "hiriq21"}, - {0x05b4, "hiriq2d"}, - {0x05b4, "hiriqhebrew"}, - {0x05b4, "hiriqnarrowhebrew"}, - {0x05b4, "hiriqquarterhebrew"}, - {0x05b4, "hiriqwidehebrew"}, - {0x1e96, "hlinebelow"}, - {0xff48, "hmonospace"}, - {0x0570, "hoarmenian"}, - {0x0e2b, "hohipthai"}, - {0x307b, "hohiragana"}, - {0x30db, "hokatakana"}, - {0xff8e, "hokatakanahalfwidth"}, - {0x05b9, "holam"}, - {0x05b9, "holam19"}, - {0x05b9, "holam26"}, - {0x05b9, "holam32"}, - {0x05b9, "holamhebrew"}, - {0x05b9, "holamnarrowhebrew"}, - {0x05b9, "holamquarterhebrew"}, - {0x05b9, "holamwidehebrew"}, - {0x0e2e, "honokhukthai"}, - {0x0309, "hookabovecomb"}, - {0x0309, "hookcmb"}, - {0x0321, "hookpalatalizedbelowcmb"}, - {0x0322, "hookretroflexbelowcmb"}, - {0x3342, "hoonsquare"}, - {0x03e9, "horicoptic"}, - {0x2015, "horizontalbar"}, - {0x031b, "horncmb"}, - {0x2668, "hotsprings"}, - {0x2302, "house"}, - {0x24a3, "hparen"}, - {0x02b0, "hsuperior"}, - {0x0265, "hturned"}, - {0x3075, "huhiragana"}, - {0x3333, "huiitosquare"}, - {0x30d5, "hukatakana"}, - {0xff8c, "hukatakanahalfwidth"}, - {0x02dd, "hungarumlaut"}, - {0x030b, "hungarumlautcmb"}, - {0x0195, "hv"}, - {0x002d, "hyphen"}, - {0xf6e5, "hypheninferior"}, - {0xff0d, "hyphenmonospace"}, - {0xfe63, "hyphensmall"}, - {0xf6e6, "hyphensuperior"}, - {0x2010, "hyphentwo"}, - {0x0069, "i"}, - {0x00ed, "iacute"}, - {0x044f, "iacyrillic"}, - {0x0987, "ibengali"}, - {0x3127, "ibopomofo"}, - {0x012d, "ibreve"}, - {0x01d0, "icaron"}, - {0x24d8, "icircle"}, - {0x00ee, "icircumflex"}, - {0x0456, "icyrillic"}, - {0x0209, "idblgrave"}, - {0x328f, "ideographearthcircle"}, - {0x328b, "ideographfirecircle"}, - {0x323f, "ideographicallianceparen"}, - {0x323a, "ideographiccallparen"}, - {0x32a5, "ideographiccentrecircle"}, - {0x3006, "ideographicclose"}, - {0x3001, "ideographiccomma"}, - {0xff64, "ideographiccommaleft"}, - {0x3237, "ideographiccongratulationparen"}, - {0x32a3, "ideographiccorrectcircle"}, - {0x322f, "ideographicearthparen"}, - {0x323d, "ideographicenterpriseparen"}, - {0x329d, "ideographicexcellentcircle"}, - {0x3240, "ideographicfestivalparen"}, - {0x3296, "ideographicfinancialcircle"}, - {0x3236, "ideographicfinancialparen"}, - {0x322b, "ideographicfireparen"}, - {0x3232, "ideographichaveparen"}, - {0x32a4, "ideographichighcircle"}, - {0x3005, "ideographiciterationmark"}, - {0x3298, "ideographiclaborcircle"}, - {0x3238, "ideographiclaborparen"}, - {0x32a7, "ideographicleftcircle"}, - {0x32a6, "ideographiclowcircle"}, - {0x32a9, "ideographicmedicinecircle"}, - {0x322e, "ideographicmetalparen"}, - {0x322a, "ideographicmoonparen"}, - {0x3234, "ideographicnameparen"}, - {0x3002, "ideographicperiod"}, - {0x329e, "ideographicprintcircle"}, - {0x3243, "ideographicreachparen"}, - {0x3239, "ideographicrepresentparen"}, - {0x323e, "ideographicresourceparen"}, - {0x32a8, "ideographicrightcircle"}, - {0x3299, "ideographicsecretcircle"}, - {0x3242, "ideographicselfparen"}, - {0x3233, "ideographicsocietyparen"}, - {0x3000, "ideographicspace"}, - {0x3235, "ideographicspecialparen"}, - {0x3231, "ideographicstockparen"}, - {0x323b, "ideographicstudyparen"}, - {0x3230, "ideographicsunparen"}, - {0x323c, "ideographicsuperviseparen"}, - {0x322c, "ideographicwaterparen"}, - {0x322d, "ideographicwoodparen"}, - {0x3007, "ideographiczero"}, - {0x328e, "ideographmetalcircle"}, - {0x328a, "ideographmooncircle"}, - {0x3294, "ideographnamecircle"}, - {0x3290, "ideographsuncircle"}, - {0x328c, "ideographwatercircle"}, - {0x328d, "ideographwoodcircle"}, - {0x0907, "ideva"}, - {0x00ef, "idieresis"}, - {0x1e2f, "idieresisacute"}, - {0x04e5, "idieresiscyrillic"}, - {0x1ecb, "idotbelow"}, - {0x04d7, "iebrevecyrillic"}, - {0x0435, "iecyrillic"}, - {0x3275, "ieungacirclekorean"}, - {0x3215, "ieungaparenkorean"}, - {0x3267, "ieungcirclekorean"}, - {0x3147, "ieungkorean"}, - {0x3207, "ieungparenkorean"}, - {0x00ec, "igrave"}, - {0x0a87, "igujarati"}, - {0x0a07, "igurmukhi"}, - {0x3044, "ihiragana"}, - {0x1ec9, "ihookabove"}, - {0x0988, "iibengali"}, - {0x0438, "iicyrillic"}, - {0x0908, "iideva"}, - {0x0a88, "iigujarati"}, - {0x0a08, "iigurmukhi"}, - {0x0a40, "iimatragurmukhi"}, - {0x020b, "iinvertedbreve"}, - {0x0439, "iishortcyrillic"}, - {0x09c0, "iivowelsignbengali"}, - {0x0940, "iivowelsigndeva"}, - {0x0ac0, "iivowelsigngujarati"}, - {0x0133, "ij"}, - {0x30a4, "ikatakana"}, - {0xff72, "ikatakanahalfwidth"}, - {0x3163, "ikorean"}, - {0x02dc, "ilde"}, - {0x05ac, "iluyhebrew"}, - {0x012b, "imacron"}, - {0x04e3, "imacroncyrillic"}, - {0x2253, "imageorapproximatelyequal"}, - {0x0a3f, "imatragurmukhi"}, - {0xff49, "imonospace"}, - {0x2206, "increment"}, - {0x221e, "infinity"}, - {0x056b, "iniarmenian"}, - {0x222b, "integral"}, - {0x2321, "integralbottom"}, - {0x2321, "integralbt"}, - {0xf8f5, "integralex"}, - {0x2320, "integraltop"}, - {0x2320, "integraltp"}, - {0x2229, "intersection"}, - {0x3305, "intisquare"}, - {0x25d8, "invbullet"}, - {0x25d9, "invcircle"}, - {0x263b, "invsmileface"}, - {0x0451, "iocyrillic"}, - {0x012f, "iogonek"}, - {0x03b9, "iota"}, - {0x03ca, "iotadieresis"}, - {0x0390, "iotadieresistonos"}, - {0x0269, "iotalatin"}, - {0x03af, "iotatonos"}, - {0x24a4, "iparen"}, - {0x0a72, "irigurmukhi"}, - {0x3043, "ismallhiragana"}, - {0x30a3, "ismallkatakana"}, - {0xff68, "ismallkatakanahalfwidth"}, - {0x09fa, "issharbengali"}, - {0x0268, "istroke"}, - {0xf6ed, "isuperior"}, - {0x309d, "iterationhiragana"}, - {0x30fd, "iterationkatakana"}, - {0x0129, "itilde"}, - {0x1e2d, "itildebelow"}, - {0x3129, "iubopomofo"}, - {0x044e, "iucyrillic"}, - {0x09bf, "ivowelsignbengali"}, - {0x093f, "ivowelsigndeva"}, - {0x0abf, "ivowelsigngujarati"}, - {0x0475, "izhitsacyrillic"}, - {0x0477, "izhitsadblgravecyrillic"}, - {0x006a, "j"}, - {0x0571, "jaarmenian"}, - {0x099c, "jabengali"}, - {0x091c, "jadeva"}, - {0x0a9c, "jagujarati"}, - {0x0a1c, "jagurmukhi"}, - {0x3110, "jbopomofo"}, - {0x01f0, "jcaron"}, - {0x24d9, "jcircle"}, - {0x0135, "jcircumflex"}, - {0x029d, "jcrossedtail"}, - {0x025f, "jdotlessstroke"}, - {0x0458, "jecyrillic"}, - {0x062c, "jeemarabic"}, - {0xfe9e, "jeemfinalarabic"}, - {0xfe9f, "jeeminitialarabic"}, - {0xfea0, "jeemmedialarabic"}, - {0x0698, "jeharabic"}, - {0xfb8b, "jehfinalarabic"}, - {0x099d, "jhabengali"}, - {0x091d, "jhadeva"}, - {0x0a9d, "jhagujarati"}, - {0x0a1d, "jhagurmukhi"}, - {0x057b, "jheharmenian"}, - {0x3004, "jis"}, - {0xff4a, "jmonospace"}, - {0x24a5, "jparen"}, - {0x02b2, "jsuperior"}, - {0x006b, "k"}, - {0x04a1, "kabashkircyrillic"}, - {0x0995, "kabengali"}, - {0x1e31, "kacute"}, - {0x043a, "kacyrillic"}, - {0x049b, "kadescendercyrillic"}, - {0x0915, "kadeva"}, - {0x05db, "kaf"}, - {0x0643, "kafarabic"}, - {0xfb3b, "kafdagesh"}, - {0xfb3b, "kafdageshhebrew"}, - {0xfeda, "kaffinalarabic"}, - {0x05db, "kafhebrew"}, - {0xfedb, "kafinitialarabic"}, - {0xfedc, "kafmedialarabic"}, - {0xfb4d, "kafrafehebrew"}, - {0x0a95, "kagujarati"}, - {0x0a15, "kagurmukhi"}, - {0x304b, "kahiragana"}, - {0x04c4, "kahookcyrillic"}, - {0x30ab, "kakatakana"}, - {0xff76, "kakatakanahalfwidth"}, - {0x03ba, "kappa"}, - {0x03f0, "kappasymbolgreek"}, - {0x3171, "kapyeounmieumkorean"}, - {0x3184, "kapyeounphieuphkorean"}, - {0x3178, "kapyeounpieupkorean"}, - {0x3179, "kapyeounssangpieupkorean"}, - {0x330d, "karoriisquare"}, - {0x0640, "kashidaautoarabic"}, - {0x0640, "kashidaautonosidebearingarabic"}, - {0x30f5, "kasmallkatakana"}, - {0x3384, "kasquare"}, - {0x0650, "kasraarabic"}, - {0x064d, "kasratanarabic"}, - {0x049f, "kastrokecyrillic"}, - {0xff70, "katahiraprolongmarkhalfwidth"}, - {0x049d, "kaverticalstrokecyrillic"}, - {0x310e, "kbopomofo"}, - {0x3389, "kcalsquare"}, - {0x01e9, "kcaron"}, - {0x0137, "kcedilla"}, - {0x24da, "kcircle"}, - {0x0137, "kcommaaccent"}, - {0x1e33, "kdotbelow"}, - {0x0584, "keharmenian"}, - {0x3051, "kehiragana"}, - {0x30b1, "kekatakana"}, - {0xff79, "kekatakanahalfwidth"}, - {0x056f, "kenarmenian"}, - {0x30f6, "kesmallkatakana"}, - {0x0138, "kgreenlandic"}, - {0x0996, "khabengali"}, - {0x0445, "khacyrillic"}, - {0x0916, "khadeva"}, - {0x0a96, "khagujarati"}, - {0x0a16, "khagurmukhi"}, - {0x062e, "khaharabic"}, - {0xfea6, "khahfinalarabic"}, - {0xfea7, "khahinitialarabic"}, - {0xfea8, "khahmedialarabic"}, - {0x03e7, "kheicoptic"}, - {0x0959, "khhadeva"}, - {0x0a59, "khhagurmukhi"}, - {0x3278, "khieukhacirclekorean"}, - {0x3218, "khieukhaparenkorean"}, - {0x326a, "khieukhcirclekorean"}, - {0x314b, "khieukhkorean"}, - {0x320a, "khieukhparenkorean"}, - {0x0e02, "khokhaithai"}, - {0x0e05, "khokhonthai"}, - {0x0e03, "khokhuatthai"}, - {0x0e04, "khokhwaithai"}, - {0x0e5b, "khomutthai"}, - {0x0199, "khook"}, - {0x0e06, "khorakhangthai"}, - {0x3391, "khzsquare"}, - {0x304d, "kihiragana"}, - {0x30ad, "kikatakana"}, - {0xff77, "kikatakanahalfwidth"}, - {0x3315, "kiroguramusquare"}, - {0x3316, "kiromeetorusquare"}, - {0x3314, "kirosquare"}, - {0x326e, "kiyeokacirclekorean"}, - {0x320e, "kiyeokaparenkorean"}, - {0x3260, "kiyeokcirclekorean"}, - {0x3131, "kiyeokkorean"}, - {0x3200, "kiyeokparenkorean"}, - {0x3133, "kiyeoksioskorean"}, - {0x045c, "kjecyrillic"}, - {0x1e35, "klinebelow"}, - {0x3398, "klsquare"}, - {0x33a6, "kmcubedsquare"}, - {0xff4b, "kmonospace"}, - {0x33a2, "kmsquaredsquare"}, - {0x3053, "kohiragana"}, - {0x33c0, "kohmsquare"}, - {0x0e01, "kokaithai"}, - {0x30b3, "kokatakana"}, - {0xff7a, "kokatakanahalfwidth"}, - {0x331e, "kooposquare"}, - {0x0481, "koppacyrillic"}, - {0x327f, "koreanstandardsymbol"}, - {0x0343, "koroniscmb"}, - {0x24a6, "kparen"}, - {0x33aa, "kpasquare"}, - {0x046f, "ksicyrillic"}, - {0x33cf, "ktsquare"}, - {0x029e, "kturned"}, - {0x304f, "kuhiragana"}, - {0x30af, "kukatakana"}, - {0xff78, "kukatakanahalfwidth"}, - {0x33b8, "kvsquare"}, - {0x33be, "kwsquare"}, - {0x006c, "l"}, - {0x09b2, "labengali"}, - {0x013a, "lacute"}, - {0x0932, "ladeva"}, - {0x0ab2, "lagujarati"}, - {0x0a32, "lagurmukhi"}, - {0x0e45, "lakkhangyaothai"}, - {0xfefc, "lamaleffinalarabic"}, - {0xfef8, "lamalefhamzaabovefinalarabic"}, - {0xfef7, "lamalefhamzaaboveisolatedarabic"}, - {0xfefa, "lamalefhamzabelowfinalarabic"}, - {0xfef9, "lamalefhamzabelowisolatedarabic"}, - {0xfefb, "lamalefisolatedarabic"}, - {0xfef6, "lamalefmaddaabovefinalarabic"}, - {0xfef5, "lamalefmaddaaboveisolatedarabic"}, - {0x0644, "lamarabic"}, - {0x03bb, "lambda"}, - {0x019b, "lambdastroke"}, - {0x05dc, "lamed"}, - {0xfb3c, "lameddagesh"}, - {0xfb3c, "lameddageshhebrew"}, - {0x05dc, "lamedhebrew"}, - {0xfede, "lamfinalarabic"}, - {0xfcca, "lamhahinitialarabic"}, - {0xfedf, "laminitialarabic"}, - {0xfcc9, "lamjeeminitialarabic"}, - {0xfccb, "lamkhahinitialarabic"}, - {0xfdf2, "lamlamhehisolatedarabic"}, - {0xfee0, "lammedialarabic"}, - {0xfd88, "lammeemhahinitialarabic"}, - {0xfccc, "lammeeminitialarabic"}, - {0x25ef, "largecircle"}, - {0x019a, "lbar"}, - {0x026c, "lbelt"}, - {0x310c, "lbopomofo"}, - {0x013e, "lcaron"}, - {0x013c, "lcedilla"}, - {0x24db, "lcircle"}, - {0x1e3d, "lcircumflexbelow"}, - {0x013c, "lcommaaccent"}, - {0x0140, "ldot"}, - {0x0140, "ldotaccent"}, - {0x1e37, "ldotbelow"}, - {0x1e39, "ldotbelowmacron"}, - {0x031a, "leftangleabovecmb"}, - {0x0318, "lefttackbelowcmb"}, - {0x003c, "less"}, - {0x2264, "lessequal"}, - {0x22da, "lessequalorgreater"}, - {0xff1c, "lessmonospace"}, - {0x2272, "lessorequivalent"}, - {0x2276, "lessorgreater"}, - {0x2266, "lessoverequal"}, - {0xfe64, "lesssmall"}, - {0x026e, "lezh"}, - {0x258c, "lfblock"}, - {0x026d, "lhookretroflex"}, - {0x20a4, "lira"}, - {0x056c, "liwnarmenian"}, - {0x01c9, "lj"}, - {0x0459, "ljecyrillic"}, - {0xf6c0, "ll"}, - {0x0933, "lladeva"}, - {0x0ab3, "llagujarati"}, - {0x1e3b, "llinebelow"}, - {0x0934, "llladeva"}, - {0x09e1, "llvocalicbengali"}, - {0x0961, "llvocalicdeva"}, - {0x09e3, "llvocalicvowelsignbengali"}, - {0x0963, "llvocalicvowelsigndeva"}, - {0x026b, "lmiddletilde"}, - {0xff4c, "lmonospace"}, - {0x33d0, "lmsquare"}, - {0x0e2c, "lochulathai"}, - {0x2227, "logicaland"}, - {0x00ac, "logicalnot"}, - {0x2310, "logicalnotreversed"}, - {0x2228, "logicalor"}, - {0x0e25, "lolingthai"}, - {0x017f, "longs"}, - {0xfe4e, "lowlinecenterline"}, - {0x0332, "lowlinecmb"}, - {0xfe4d, "lowlinedashed"}, - {0x25ca, "lozenge"}, - {0x24a7, "lparen"}, - {0x0142, "lslash"}, - {0x2113, "lsquare"}, - {0xf6ee, "lsuperior"}, - {0x2591, "ltshade"}, - {0x0e26, "luthai"}, - {0x098c, "lvocalicbengali"}, - {0x090c, "lvocalicdeva"}, - {0x09e2, "lvocalicvowelsignbengali"}, - {0x0962, "lvocalicvowelsigndeva"}, - {0x33d3, "lxsquare"}, - {0x006d, "m"}, - {0x09ae, "mabengali"}, - {0x00af, "macron"}, - {0x0331, "macronbelowcmb"}, - {0x0304, "macroncmb"}, - {0x02cd, "macronlowmod"}, - {0xffe3, "macronmonospace"}, - {0x1e3f, "macute"}, - {0x092e, "madeva"}, - {0x0aae, "magujarati"}, - {0x0a2e, "magurmukhi"}, - {0x05a4, "mahapakhhebrew"}, - {0x05a4, "mahapakhlefthebrew"}, - {0x307e, "mahiragana"}, - {0xf895, "maichattawalowleftthai"}, - {0xf894, "maichattawalowrightthai"}, - {0x0e4b, "maichattawathai"}, - {0xf893, "maichattawaupperleftthai"}, - {0xf88c, "maieklowleftthai"}, - {0xf88b, "maieklowrightthai"}, - {0x0e48, "maiekthai"}, - {0xf88a, "maiekupperleftthai"}, - {0xf884, "maihanakatleftthai"}, - {0x0e31, "maihanakatthai"}, - {0xf889, "maitaikhuleftthai"}, - {0x0e47, "maitaikhuthai"}, - {0xf88f, "maitholowleftthai"}, - {0xf88e, "maitholowrightthai"}, - {0x0e49, "maithothai"}, - {0xf88d, "maithoupperleftthai"}, - {0xf892, "maitrilowleftthai"}, - {0xf891, "maitrilowrightthai"}, - {0x0e4a, "maitrithai"}, - {0xf890, "maitriupperleftthai"}, - {0x0e46, "maiyamokthai"}, - {0x30de, "makatakana"}, - {0xff8f, "makatakanahalfwidth"}, - {0x2642, "male"}, - {0x3347, "mansyonsquare"}, - {0x05be, "maqafhebrew"}, - {0x2642, "mars"}, - {0x05af, "masoracirclehebrew"}, - {0x3383, "masquare"}, - {0x3107, "mbopomofo"}, - {0x33d4, "mbsquare"}, - {0x24dc, "mcircle"}, - {0x33a5, "mcubedsquare"}, - {0x1e41, "mdotaccent"}, - {0x1e43, "mdotbelow"}, - {0x0645, "meemarabic"}, - {0xfee2, "meemfinalarabic"}, - {0xfee3, "meeminitialarabic"}, - {0xfee4, "meemmedialarabic"}, - {0xfcd1, "meemmeeminitialarabic"}, - {0xfc48, "meemmeemisolatedarabic"}, - {0x334d, "meetorusquare"}, - {0x3081, "mehiragana"}, - {0x337e, "meizierasquare"}, - {0x30e1, "mekatakana"}, - {0xff92, "mekatakanahalfwidth"}, - {0x05de, "mem"}, - {0xfb3e, "memdagesh"}, - {0xfb3e, "memdageshhebrew"}, - {0x05de, "memhebrew"}, - {0x0574, "menarmenian"}, - {0x05a5, "merkhahebrew"}, - {0x05a6, "merkhakefulahebrew"}, - {0x05a6, "merkhakefulalefthebrew"}, - {0x05a5, "merkhalefthebrew"}, - {0x0271, "mhook"}, - {0x3392, "mhzsquare"}, - {0xff65, "middledotkatakanahalfwidth"}, - {0x00b7, "middot"}, - {0x3272, "mieumacirclekorean"}, - {0x3212, "mieumaparenkorean"}, - {0x3264, "mieumcirclekorean"}, - {0x3141, "mieumkorean"}, - {0x3170, "mieumpansioskorean"}, - {0x3204, "mieumparenkorean"}, - {0x316e, "mieumpieupkorean"}, - {0x316f, "mieumsioskorean"}, - {0x307f, "mihiragana"}, - {0x30df, "mikatakana"}, - {0xff90, "mikatakanahalfwidth"}, - {0x2212, "minus"}, - {0x0320, "minusbelowcmb"}, - {0x2296, "minuscircle"}, - {0x02d7, "minusmod"}, - {0x2213, "minusplus"}, - {0x2032, "minute"}, - {0x334a, "miribaarusquare"}, - {0x3349, "mirisquare"}, - {0x0270, "mlonglegturned"}, - {0x3396, "mlsquare"}, - {0x33a3, "mmcubedsquare"}, - {0xff4d, "mmonospace"}, - {0x339f, "mmsquaredsquare"}, - {0x3082, "mohiragana"}, - {0x33c1, "mohmsquare"}, - {0x30e2, "mokatakana"}, - {0xff93, "mokatakanahalfwidth"}, - {0x33d6, "molsquare"}, - {0x0e21, "momathai"}, - {0x33a7, "moverssquare"}, - {0x33a8, "moverssquaredsquare"}, - {0x24a8, "mparen"}, - {0x33ab, "mpasquare"}, - {0x33b3, "mssquare"}, - {0xf6ef, "msuperior"}, - {0x026f, "mturned"}, - {0x00b5, "mu"}, - {0x00b5, "mu1"}, - {0x3382, "muasquare"}, - {0x226b, "muchgreater"}, - {0x226a, "muchless"}, - {0x338c, "mufsquare"}, - {0x03bc, "mugreek"}, - {0x338d, "mugsquare"}, - {0x3080, "muhiragana"}, - {0x30e0, "mukatakana"}, - {0xff91, "mukatakanahalfwidth"}, - {0x3395, "mulsquare"}, - {0x00d7, "multiply"}, - {0x339b, "mumsquare"}, - {0x05a3, "munahhebrew"}, - {0x05a3, "munahlefthebrew"}, - {0x266a, "musicalnote"}, - {0x266b, "musicalnotedbl"}, - {0x266d, "musicflatsign"}, - {0x266f, "musicsharpsign"}, - {0x33b2, "mussquare"}, - {0x33b6, "muvsquare"}, - {0x33bc, "muwsquare"}, - {0x33b9, "mvmegasquare"}, - {0x33b7, "mvsquare"}, - {0x33bf, "mwmegasquare"}, - {0x33bd, "mwsquare"}, - {0x006e, "n"}, - {0x09a8, "nabengali"}, - {0x2207, "nabla"}, - {0x0144, "nacute"}, - {0x0928, "nadeva"}, - {0x0aa8, "nagujarati"}, - {0x0a28, "nagurmukhi"}, - {0x306a, "nahiragana"}, - {0x30ca, "nakatakana"}, - {0xff85, "nakatakanahalfwidth"}, - {0x0149, "napostrophe"}, - {0x3381, "nasquare"}, - {0x310b, "nbopomofo"}, - {0x00a0, "nbspace"}, - {0x0148, "ncaron"}, - {0x0146, "ncedilla"}, - {0x24dd, "ncircle"}, - {0x1e4b, "ncircumflexbelow"}, - {0x0146, "ncommaaccent"}, - {0x1e45, "ndotaccent"}, - {0x1e47, "ndotbelow"}, - {0x306d, "nehiragana"}, - {0x30cd, "nekatakana"}, - {0xff88, "nekatakanahalfwidth"}, - {0x20aa, "newsheqelsign"}, - {0x338b, "nfsquare"}, - {0x0999, "ngabengali"}, - {0x0919, "ngadeva"}, - {0x0a99, "ngagujarati"}, - {0x0a19, "ngagurmukhi"}, - {0x0e07, "ngonguthai"}, - {0x3093, "nhiragana"}, - {0x0272, "nhookleft"}, - {0x0273, "nhookretroflex"}, - {0x326f, "nieunacirclekorean"}, - {0x320f, "nieunaparenkorean"}, - {0x3135, "nieuncieuckorean"}, - {0x3261, "nieuncirclekorean"}, - {0x3136, "nieunhieuhkorean"}, - {0x3134, "nieunkorean"}, - {0x3168, "nieunpansioskorean"}, - {0x3201, "nieunparenkorean"}, - {0x3167, "nieunsioskorean"}, - {0x3166, "nieuntikeutkorean"}, - {0x306b, "nihiragana"}, - {0x30cb, "nikatakana"}, - {0xff86, "nikatakanahalfwidth"}, - {0xf899, "nikhahitleftthai"}, - {0x0e4d, "nikhahitthai"}, - {0x0039, "nine"}, - {0x0669, "ninearabic"}, - {0x09ef, "ninebengali"}, - {0x2468, "ninecircle"}, - {0x2792, "ninecircleinversesansserif"}, - {0x096f, "ninedeva"}, - {0x0aef, "ninegujarati"}, - {0x0a6f, "ninegurmukhi"}, - {0x0669, "ninehackarabic"}, - {0x3029, "ninehangzhou"}, - {0x3228, "nineideographicparen"}, - {0x2089, "nineinferior"}, - {0xff19, "ninemonospace"}, - {0xf739, "nineoldstyle"}, - {0x247c, "nineparen"}, - {0x2490, "nineperiod"}, - {0x06f9, "ninepersian"}, - {0x2178, "nineroman"}, - {0x2079, "ninesuperior"}, - {0x2472, "nineteencircle"}, - {0x2486, "nineteenparen"}, - {0x249a, "nineteenperiod"}, - {0x0e59, "ninethai"}, - {0x01cc, "nj"}, - {0x045a, "njecyrillic"}, - {0x30f3, "nkatakana"}, - {0xff9d, "nkatakanahalfwidth"}, - {0x019e, "nlegrightlong"}, - {0x1e49, "nlinebelow"}, - {0xff4e, "nmonospace"}, - {0x339a, "nmsquare"}, - {0x09a3, "nnabengali"}, - {0x0923, "nnadeva"}, - {0x0aa3, "nnagujarati"}, - {0x0a23, "nnagurmukhi"}, - {0x0929, "nnnadeva"}, - {0x306e, "nohiragana"}, - {0x30ce, "nokatakana"}, - {0xff89, "nokatakanahalfwidth"}, - {0x00a0, "nonbreakingspace"}, - {0x0e13, "nonenthai"}, - {0x0e19, "nonuthai"}, - {0x0646, "noonarabic"}, - {0xfee6, "noonfinalarabic"}, - {0x06ba, "noonghunnaarabic"}, - {0xfb9f, "noonghunnafinalarabic"}, - {0xfee7, "nooninitialarabic"}, - {0xfcd2, "noonjeeminitialarabic"}, - {0xfc4b, "noonjeemisolatedarabic"}, - {0xfee8, "noonmedialarabic"}, - {0xfcd5, "noonmeeminitialarabic"}, - {0xfc4e, "noonmeemisolatedarabic"}, - {0xfc8d, "noonnoonfinalarabic"}, - {0x220c, "notcontains"}, - {0x2209, "notelement"}, - {0x2209, "notelementof"}, - {0x2260, "notequal"}, - {0x226f, "notgreater"}, - {0x2271, "notgreaternorequal"}, - {0x2279, "notgreaternorless"}, - {0x2262, "notidentical"}, - {0x226e, "notless"}, - {0x2270, "notlessnorequal"}, - {0x2226, "notparallel"}, - {0x2280, "notprecedes"}, - {0x2284, "notsubset"}, - {0x2281, "notsucceeds"}, - {0x2285, "notsuperset"}, - {0x0576, "nowarmenian"}, - {0x24a9, "nparen"}, - {0x33b1, "nssquare"}, - {0x207f, "nsuperior"}, - {0x00f1, "ntilde"}, - {0x03bd, "nu"}, - {0x306c, "nuhiragana"}, - {0x30cc, "nukatakana"}, - {0xff87, "nukatakanahalfwidth"}, - {0x09bc, "nuktabengali"}, - {0x093c, "nuktadeva"}, - {0x0abc, "nuktagujarati"}, - {0x0a3c, "nuktagurmukhi"}, - {0x0023, "numbersign"}, - {0xff03, "numbersignmonospace"}, - {0xfe5f, "numbersignsmall"}, - {0x0374, "numeralsigngreek"}, - {0x0375, "numeralsignlowergreek"}, - {0x2116, "numero"}, - {0x05e0, "nun"}, - {0xfb40, "nundagesh"}, - {0xfb40, "nundageshhebrew"}, - {0x05e0, "nunhebrew"}, - {0x33b5, "nvsquare"}, - {0x33bb, "nwsquare"}, - {0x099e, "nyabengali"}, - {0x091e, "nyadeva"}, - {0x0a9e, "nyagujarati"}, - {0x0a1e, "nyagurmukhi"}, - {0x006f, "o"}, - {0x00f3, "oacute"}, - {0x0e2d, "oangthai"}, - {0x0275, "obarred"}, - {0x04e9, "obarredcyrillic"}, - {0x04eb, "obarreddieresiscyrillic"}, - {0x0993, "obengali"}, - {0x311b, "obopomofo"}, - {0x014f, "obreve"}, - {0x0911, "ocandradeva"}, - {0x0a91, "ocandragujarati"}, - {0x0949, "ocandravowelsigndeva"}, - {0x0ac9, "ocandravowelsigngujarati"}, - {0x01d2, "ocaron"}, - {0x24de, "ocircle"}, - {0x00f4, "ocircumflex"}, - {0x1ed1, "ocircumflexacute"}, - {0x1ed9, "ocircumflexdotbelow"}, - {0x1ed3, "ocircumflexgrave"}, - {0x1ed5, "ocircumflexhookabove"}, - {0x1ed7, "ocircumflextilde"}, - {0x043e, "ocyrillic"}, - {0x0151, "odblacute"}, - {0x020d, "odblgrave"}, - {0x0913, "odeva"}, - {0x00f6, "odieresis"}, - {0x04e7, "odieresiscyrillic"}, - {0x1ecd, "odotbelow"}, - {0x0153, "oe"}, - {0x315a, "oekorean"}, - {0x02db, "ogonek"}, - {0x0328, "ogonekcmb"}, - {0x00f2, "ograve"}, - {0x0a93, "ogujarati"}, - {0x0585, "oharmenian"}, - {0x304a, "ohiragana"}, - {0x1ecf, "ohookabove"}, - {0x01a1, "ohorn"}, - {0x1edb, "ohornacute"}, - {0x1ee3, "ohorndotbelow"}, - {0x1edd, "ohorngrave"}, - {0x1edf, "ohornhookabove"}, - {0x1ee1, "ohorntilde"}, - {0x0151, "ohungarumlaut"}, - {0x01a3, "oi"}, - {0x020f, "oinvertedbreve"}, - {0x30aa, "okatakana"}, - {0xff75, "okatakanahalfwidth"}, - {0x3157, "okorean"}, - {0x05ab, "olehebrew"}, - {0x014d, "omacron"}, - {0x1e53, "omacronacute"}, - {0x1e51, "omacrongrave"}, - {0x0950, "omdeva"}, - {0x03c9, "omega"}, - {0x03d6, "omega1"}, - {0x0461, "omegacyrillic"}, - {0x0277, "omegalatinclosed"}, - {0x047b, "omegaroundcyrillic"}, - {0x047d, "omegatitlocyrillic"}, - {0x03ce, "omegatonos"}, - {0x0ad0, "omgujarati"}, - {0x03bf, "omicron"}, - {0x03cc, "omicrontonos"}, - {0xff4f, "omonospace"}, - {0x0031, "one"}, - {0x0661, "onearabic"}, - {0x09e7, "onebengali"}, - {0x2460, "onecircle"}, - {0x278a, "onecircleinversesansserif"}, - {0x0967, "onedeva"}, - {0x2024, "onedotenleader"}, - {0x215b, "oneeighth"}, - {0xf6dc, "onefitted"}, - {0x0ae7, "onegujarati"}, - {0x0a67, "onegurmukhi"}, - {0x0661, "onehackarabic"}, - {0x00bd, "onehalf"}, - {0x3021, "onehangzhou"}, - {0x3220, "oneideographicparen"}, - {0x2081, "oneinferior"}, - {0xff11, "onemonospace"}, - {0x09f4, "onenumeratorbengali"}, - {0xf731, "oneoldstyle"}, - {0x2474, "oneparen"}, - {0x2488, "oneperiod"}, - {0x06f1, "onepersian"}, - {0x00bc, "onequarter"}, - {0x2170, "oneroman"}, - {0x00b9, "onesuperior"}, - {0x0e51, "onethai"}, - {0x2153, "onethird"}, - {0x01eb, "oogonek"}, - {0x01ed, "oogonekmacron"}, - {0x0a13, "oogurmukhi"}, - {0x0a4b, "oomatragurmukhi"}, - {0x0254, "oopen"}, - {0x24aa, "oparen"}, - {0x25e6, "openbullet"}, - {0x2325, "option"}, - {0x00aa, "ordfeminine"}, - {0x00ba, "ordmasculine"}, - {0x221f, "orthogonal"}, - {0x0912, "oshortdeva"}, - {0x094a, "oshortvowelsigndeva"}, - {0x00f8, "oslash"}, - {0x01ff, "oslashacute"}, - {0x3049, "osmallhiragana"}, - {0x30a9, "osmallkatakana"}, - {0xff6b, "osmallkatakanahalfwidth"}, - {0x01ff, "ostrokeacute"}, - {0xf6f0, "osuperior"}, - {0x047f, "otcyrillic"}, - {0x00f5, "otilde"}, - {0x1e4d, "otildeacute"}, - {0x1e4f, "otildedieresis"}, - {0x3121, "oubopomofo"}, - {0x203e, "overline"}, - {0xfe4a, "overlinecenterline"}, - {0x0305, "overlinecmb"}, - {0xfe49, "overlinedashed"}, - {0xfe4c, "overlinedblwavy"}, - {0xfe4b, "overlinewavy"}, - {0x00af, "overscore"}, - {0x09cb, "ovowelsignbengali"}, - {0x094b, "ovowelsigndeva"}, - {0x0acb, "ovowelsigngujarati"}, - {0x0070, "p"}, - {0x3380, "paampssquare"}, - {0x332b, "paasentosquare"}, - {0x09aa, "pabengali"}, - {0x1e55, "pacute"}, - {0x092a, "padeva"}, - {0x21df, "pagedown"}, - {0x21de, "pageup"}, - {0x0aaa, "pagujarati"}, - {0x0a2a, "pagurmukhi"}, - {0x3071, "pahiragana"}, - {0x0e2f, "paiyannoithai"}, - {0x30d1, "pakatakana"}, - {0x0484, "palatalizationcyrilliccmb"}, - {0x04c0, "palochkacyrillic"}, - {0x317f, "pansioskorean"}, - {0x00b6, "paragraph"}, - {0x2225, "parallel"}, - {0x0028, "parenleft"}, - {0xfd3e, "parenleftaltonearabic"}, - {0xf8ed, "parenleftbt"}, - {0xf8ec, "parenleftex"}, - {0x208d, "parenleftinferior"}, - {0xff08, "parenleftmonospace"}, - {0xfe59, "parenleftsmall"}, - {0x207d, "parenleftsuperior"}, - {0xf8eb, "parenlefttp"}, - {0xfe35, "parenleftvertical"}, - {0x0029, "parenright"}, - {0xfd3f, "parenrightaltonearabic"}, - {0xf8f8, "parenrightbt"}, - {0xf8f7, "parenrightex"}, - {0x208e, "parenrightinferior"}, - {0xff09, "parenrightmonospace"}, - {0xfe5a, "parenrightsmall"}, - {0x207e, "parenrightsuperior"}, - {0xf8f6, "parenrighttp"}, - {0xfe36, "parenrightvertical"}, - {0x2202, "partialdiff"}, - {0x05c0, "paseqhebrew"}, - {0x0599, "pashtahebrew"}, - {0x33a9, "pasquare"}, - {0x05b7, "patah"}, - {0x05b7, "patah11"}, - {0x05b7, "patah1d"}, - {0x05b7, "patah2a"}, - {0x05b7, "patahhebrew"}, - {0x05b7, "patahnarrowhebrew"}, - {0x05b7, "patahquarterhebrew"}, - {0x05b7, "patahwidehebrew"}, - {0x05a1, "pazerhebrew"}, - {0x3106, "pbopomofo"}, - {0x24df, "pcircle"}, - {0x1e57, "pdotaccent"}, - {0x05e4, "pe"}, - {0x043f, "pecyrillic"}, - {0xfb44, "pedagesh"}, - {0xfb44, "pedageshhebrew"}, - {0x333b, "peezisquare"}, - {0xfb43, "pefinaldageshhebrew"}, - {0x067e, "peharabic"}, - {0x057a, "peharmenian"}, - {0x05e4, "pehebrew"}, - {0xfb57, "pehfinalarabic"}, - {0xfb58, "pehinitialarabic"}, - {0x307a, "pehiragana"}, - {0xfb59, "pehmedialarabic"}, - {0x30da, "pekatakana"}, - {0x04a7, "pemiddlehookcyrillic"}, - {0xfb4e, "perafehebrew"}, - {0x0025, "percent"}, - {0x066a, "percentarabic"}, - {0xff05, "percentmonospace"}, - {0xfe6a, "percentsmall"}, - {0x002e, "period"}, - {0x0589, "periodarmenian"}, - {0x00b7, "periodcentered"}, - {0xff61, "periodhalfwidth"}, - {0xf6e7, "periodinferior"}, - {0xff0e, "periodmonospace"}, - {0xfe52, "periodsmall"}, - {0xf6e8, "periodsuperior"}, - {0x0342, "perispomenigreekcmb"}, - {0x22a5, "perpendicular"}, - {0x2030, "perthousand"}, - {0x20a7, "peseta"}, - {0x338a, "pfsquare"}, - {0x09ab, "phabengali"}, - {0x092b, "phadeva"}, - {0x0aab, "phagujarati"}, - {0x0a2b, "phagurmukhi"}, - {0x03c6, "phi"}, - {0x03d5, "phi1"}, - {0x327a, "phieuphacirclekorean"}, - {0x321a, "phieuphaparenkorean"}, - {0x326c, "phieuphcirclekorean"}, - {0x314d, "phieuphkorean"}, - {0x320c, "phieuphparenkorean"}, - {0x0278, "philatin"}, - {0x0e3a, "phinthuthai"}, - {0x03d5, "phisymbolgreek"}, - {0x01a5, "phook"}, - {0x0e1e, "phophanthai"}, - {0x0e1c, "phophungthai"}, - {0x0e20, "phosamphaothai"}, - {0x03c0, "pi"}, - {0x3273, "pieupacirclekorean"}, - {0x3213, "pieupaparenkorean"}, - {0x3176, "pieupcieuckorean"}, - {0x3265, "pieupcirclekorean"}, - {0x3172, "pieupkiyeokkorean"}, - {0x3142, "pieupkorean"}, - {0x3205, "pieupparenkorean"}, - {0x3174, "pieupsioskiyeokkorean"}, - {0x3144, "pieupsioskorean"}, - {0x3175, "pieupsiostikeutkorean"}, - {0x3177, "pieupthieuthkorean"}, - {0x3173, "pieuptikeutkorean"}, - {0x3074, "pihiragana"}, - {0x30d4, "pikatakana"}, - {0x03d6, "pisymbolgreek"}, - {0x0583, "piwrarmenian"}, - {0x002b, "plus"}, - {0x031f, "plusbelowcmb"}, - {0x2295, "pluscircle"}, - {0x00b1, "plusminus"}, - {0x02d6, "plusmod"}, - {0xff0b, "plusmonospace"}, - {0xfe62, "plussmall"}, - {0x207a, "plussuperior"}, - {0xff50, "pmonospace"}, - {0x33d8, "pmsquare"}, - {0x307d, "pohiragana"}, - {0x261f, "pointingindexdownwhite"}, - {0x261c, "pointingindexleftwhite"}, - {0x261e, "pointingindexrightwhite"}, - {0x261d, "pointingindexupwhite"}, - {0x30dd, "pokatakana"}, - {0x0e1b, "poplathai"}, - {0x3012, "postalmark"}, - {0x3020, "postalmarkface"}, - {0x24ab, "pparen"}, - {0x227a, "precedes"}, - {0x211e, "prescription"}, - {0x02b9, "primemod"}, - {0x2035, "primereversed"}, - {0x220f, "product"}, - {0x2305, "projective"}, - {0x30fc, "prolongedkana"}, - {0x2318, "propellor"}, - {0x2282, "propersubset"}, - {0x2283, "propersuperset"}, - {0x2237, "proportion"}, - {0x221d, "proportional"}, - {0x03c8, "psi"}, - {0x0471, "psicyrillic"}, - {0x0486, "psilipneumatacyrilliccmb"}, - {0x33b0, "pssquare"}, - {0x3077, "puhiragana"}, - {0x30d7, "pukatakana"}, - {0x33b4, "pvsquare"}, - {0x33ba, "pwsquare"}, - {0x0071, "q"}, - {0x0958, "qadeva"}, - {0x05a8, "qadmahebrew"}, - {0x0642, "qafarabic"}, - {0xfed6, "qaffinalarabic"}, - {0xfed7, "qafinitialarabic"}, - {0xfed8, "qafmedialarabic"}, - {0x05b8, "qamats"}, - {0x05b8, "qamats10"}, - {0x05b8, "qamats1a"}, - {0x05b8, "qamats1c"}, - {0x05b8, "qamats27"}, - {0x05b8, "qamats29"}, - {0x05b8, "qamats33"}, - {0x05b8, "qamatsde"}, - {0x05b8, "qamatshebrew"}, - {0x05b8, "qamatsnarrowhebrew"}, - {0x05b8, "qamatsqatanhebrew"}, - {0x05b8, "qamatsqatannarrowhebrew"}, - {0x05b8, "qamatsqatanquarterhebrew"}, - {0x05b8, "qamatsqatanwidehebrew"}, - {0x05b8, "qamatsquarterhebrew"}, - {0x05b8, "qamatswidehebrew"}, - {0x059f, "qarneyparahebrew"}, - {0x3111, "qbopomofo"}, - {0x24e0, "qcircle"}, - {0x02a0, "qhook"}, - {0xff51, "qmonospace"}, - {0x05e7, "qof"}, - {0xfb47, "qofdagesh"}, - {0xfb47, "qofdageshhebrew"}, - {0x05e7, "qofhebrew"}, - {0x24ac, "qparen"}, - {0x2669, "quarternote"}, - {0x05bb, "qubuts"}, - {0x05bb, "qubuts18"}, - {0x05bb, "qubuts25"}, - {0x05bb, "qubuts31"}, - {0x05bb, "qubutshebrew"}, - {0x05bb, "qubutsnarrowhebrew"}, - {0x05bb, "qubutsquarterhebrew"}, - {0x05bb, "qubutswidehebrew"}, - {0x003f, "question"}, - {0x061f, "questionarabic"}, - {0x055e, "questionarmenian"}, - {0x00bf, "questiondown"}, - {0xf7bf, "questiondownsmall"}, - {0x037e, "questiongreek"}, - {0xff1f, "questionmonospace"}, - {0xf73f, "questionsmall"}, - {0x0022, "quotedbl"}, - {0x201e, "quotedblbase"}, - {0x201c, "quotedblleft"}, - {0xff02, "quotedblmonospace"}, - {0x301e, "quotedblprime"}, - {0x301d, "quotedblprimereversed"}, - {0x201d, "quotedblright"}, - {0x2018, "quoteleft"}, - {0x201b, "quoteleftreversed"}, - {0x201b, "quotereversed"}, - {0x2019, "quoteright"}, - {0x0149, "quoterightn"}, - {0x201a, "quotesinglbase"}, - {0x0027, "quotesingle"}, - {0xff07, "quotesinglemonospace"}, - {0x0072, "r"}, - {0x057c, "raarmenian"}, - {0x09b0, "rabengali"}, - {0x0155, "racute"}, - {0x0930, "radeva"}, - {0x221a, "radical"}, - {0xf8e5, "radicalex"}, - {0x33ae, "radoverssquare"}, - {0x33af, "radoverssquaredsquare"}, - {0x33ad, "radsquare"}, - {0x05bf, "rafe"}, - {0x05bf, "rafehebrew"}, - {0x0ab0, "ragujarati"}, - {0x0a30, "ragurmukhi"}, - {0x3089, "rahiragana"}, - {0x30e9, "rakatakana"}, - {0xff97, "rakatakanahalfwidth"}, - {0x09f1, "ralowerdiagonalbengali"}, - {0x09f0, "ramiddlediagonalbengali"}, - {0x0264, "ramshorn"}, - {0x2236, "ratio"}, - {0x3116, "rbopomofo"}, - {0x0159, "rcaron"}, - {0x0157, "rcedilla"}, - {0x24e1, "rcircle"}, - {0x0157, "rcommaaccent"}, - {0x0211, "rdblgrave"}, - {0x1e59, "rdotaccent"}, - {0x1e5b, "rdotbelow"}, - {0x1e5d, "rdotbelowmacron"}, - {0x203b, "referencemark"}, - {0x2286, "reflexsubset"}, - {0x2287, "reflexsuperset"}, - {0x00ae, "registered"}, - {0xf8e8, "registersans"}, - {0xf6da, "registerserif"}, - {0x0631, "reharabic"}, - {0x0580, "reharmenian"}, - {0xfeae, "rehfinalarabic"}, - {0x308c, "rehiragana"}, - {0x30ec, "rekatakana"}, - {0xff9a, "rekatakanahalfwidth"}, - {0x05e8, "resh"}, - {0xfb48, "reshdageshhebrew"}, - {0x05e8, "reshhebrew"}, - {0x223d, "reversedtilde"}, - {0x0597, "reviahebrew"}, - {0x0597, "reviamugrashhebrew"}, - {0x2310, "revlogicalnot"}, - {0x027e, "rfishhook"}, - {0x027f, "rfishhookreversed"}, - {0x09dd, "rhabengali"}, - {0x095d, "rhadeva"}, - {0x03c1, "rho"}, - {0x027d, "rhook"}, - {0x027b, "rhookturned"}, - {0x02b5, "rhookturnedsuperior"}, - {0x03f1, "rhosymbolgreek"}, - {0x02de, "rhotichookmod"}, - {0x3271, "rieulacirclekorean"}, - {0x3211, "rieulaparenkorean"}, - {0x3263, "rieulcirclekorean"}, - {0x3140, "rieulhieuhkorean"}, - {0x313a, "rieulkiyeokkorean"}, - {0x3169, "rieulkiyeoksioskorean"}, - {0x3139, "rieulkorean"}, - {0x313b, "rieulmieumkorean"}, - {0x316c, "rieulpansioskorean"}, - {0x3203, "rieulparenkorean"}, - {0x313f, "rieulphieuphkorean"}, - {0x313c, "rieulpieupkorean"}, - {0x316b, "rieulpieupsioskorean"}, - {0x313d, "rieulsioskorean"}, - {0x313e, "rieulthieuthkorean"}, - {0x316a, "rieultikeutkorean"}, - {0x316d, "rieulyeorinhieuhkorean"}, - {0x221f, "rightangle"}, - {0x0319, "righttackbelowcmb"}, - {0x22bf, "righttriangle"}, - {0x308a, "rihiragana"}, - {0x30ea, "rikatakana"}, - {0xff98, "rikatakanahalfwidth"}, - {0x02da, "ring"}, - {0x0325, "ringbelowcmb"}, - {0x030a, "ringcmb"}, - {0x02bf, "ringhalfleft"}, - {0x0559, "ringhalfleftarmenian"}, - {0x031c, "ringhalfleftbelowcmb"}, - {0x02d3, "ringhalfleftcentered"}, - {0x02be, "ringhalfright"}, - {0x0339, "ringhalfrightbelowcmb"}, - {0x02d2, "ringhalfrightcentered"}, - {0x0213, "rinvertedbreve"}, - {0x3351, "rittorusquare"}, - {0x1e5f, "rlinebelow"}, - {0x027c, "rlongleg"}, - {0x027a, "rlonglegturned"}, - {0xff52, "rmonospace"}, - {0x308d, "rohiragana"}, - {0x30ed, "rokatakana"}, - {0xff9b, "rokatakanahalfwidth"}, - {0x0e23, "roruathai"}, - {0x24ad, "rparen"}, - {0x09dc, "rrabengali"}, - {0x0931, "rradeva"}, - {0x0a5c, "rragurmukhi"}, - {0x0691, "rreharabic"}, - {0xfb8d, "rrehfinalarabic"}, - {0x09e0, "rrvocalicbengali"}, - {0x0960, "rrvocalicdeva"}, - {0x0ae0, "rrvocalicgujarati"}, - {0x09c4, "rrvocalicvowelsignbengali"}, - {0x0944, "rrvocalicvowelsigndeva"}, - {0x0ac4, "rrvocalicvowelsigngujarati"}, - {0xf6f1, "rsuperior"}, - {0x2590, "rtblock"}, - {0x0279, "rturned"}, - {0x02b4, "rturnedsuperior"}, - {0x308b, "ruhiragana"}, - {0x30eb, "rukatakana"}, - {0xff99, "rukatakanahalfwidth"}, - {0x09f2, "rupeemarkbengali"}, - {0x09f3, "rupeesignbengali"}, - {0xf6dd, "rupiah"}, - {0x0e24, "ruthai"}, - {0x098b, "rvocalicbengali"}, - {0x090b, "rvocalicdeva"}, - {0x0a8b, "rvocalicgujarati"}, - {0x09c3, "rvocalicvowelsignbengali"}, - {0x0943, "rvocalicvowelsigndeva"}, - {0x0ac3, "rvocalicvowelsigngujarati"}, - {0x0073, "s"}, - {0x09b8, "sabengali"}, - {0x015b, "sacute"}, - {0x1e65, "sacutedotaccent"}, - {0x0635, "sadarabic"}, - {0x0938, "sadeva"}, - {0xfeba, "sadfinalarabic"}, - {0xfebb, "sadinitialarabic"}, - {0xfebc, "sadmedialarabic"}, - {0x0ab8, "sagujarati"}, - {0x0a38, "sagurmukhi"}, - {0x3055, "sahiragana"}, - {0x30b5, "sakatakana"}, - {0xff7b, "sakatakanahalfwidth"}, - {0xfdfa, "sallallahoualayhewasallamarabic"}, - {0x05e1, "samekh"}, - {0xfb41, "samekhdagesh"}, - {0xfb41, "samekhdageshhebrew"}, - {0x05e1, "samekhhebrew"}, - {0x0e32, "saraaathai"}, - {0x0e41, "saraaethai"}, - {0x0e44, "saraaimaimalaithai"}, - {0x0e43, "saraaimaimuanthai"}, - {0x0e33, "saraamthai"}, - {0x0e30, "saraathai"}, - {0x0e40, "saraethai"}, - {0xf886, "saraiileftthai"}, - {0x0e35, "saraiithai"}, - {0xf885, "saraileftthai"}, - {0x0e34, "saraithai"}, - {0x0e42, "saraothai"}, - {0xf888, "saraueeleftthai"}, - {0x0e37, "saraueethai"}, - {0xf887, "saraueleftthai"}, - {0x0e36, "sarauethai"}, - {0x0e38, "sarauthai"}, - {0x0e39, "sarauuthai"}, - {0x3119, "sbopomofo"}, - {0x0161, "scaron"}, - {0x1e67, "scarondotaccent"}, - {0x015f, "scedilla"}, - {0x0259, "schwa"}, - {0x04d9, "schwacyrillic"}, - {0x04db, "schwadieresiscyrillic"}, - {0x025a, "schwahook"}, - {0x24e2, "scircle"}, - {0x015d, "scircumflex"}, - {0x0219, "scommaaccent"}, - {0x1e61, "sdotaccent"}, - {0x1e63, "sdotbelow"}, - {0x1e69, "sdotbelowdotaccent"}, - {0x033c, "seagullbelowcmb"}, - {0x2033, "second"}, - {0x02ca, "secondtonechinese"}, - {0x00a7, "section"}, - {0x0633, "seenarabic"}, - {0xfeb2, "seenfinalarabic"}, - {0xfeb3, "seeninitialarabic"}, - {0xfeb4, "seenmedialarabic"}, - {0x05b6, "segol"}, - {0x05b6, "segol13"}, - {0x05b6, "segol1f"}, - {0x05b6, "segol2c"}, - {0x05b6, "segolhebrew"}, - {0x05b6, "segolnarrowhebrew"}, - {0x05b6, "segolquarterhebrew"}, - {0x0592, "segoltahebrew"}, - {0x05b6, "segolwidehebrew"}, - {0x057d, "seharmenian"}, - {0x305b, "sehiragana"}, - {0x30bb, "sekatakana"}, - {0xff7e, "sekatakanahalfwidth"}, - {0x003b, "semicolon"}, - {0x061b, "semicolonarabic"}, - {0xff1b, "semicolonmonospace"}, - {0xfe54, "semicolonsmall"}, - {0x309c, "semivoicedmarkkana"}, - {0xff9f, "semivoicedmarkkanahalfwidth"}, - {0x3322, "sentisquare"}, - {0x3323, "sentosquare"}, - {0x0037, "seven"}, - {0x0667, "sevenarabic"}, - {0x09ed, "sevenbengali"}, - {0x2466, "sevencircle"}, - {0x2790, "sevencircleinversesansserif"}, - {0x096d, "sevendeva"}, - {0x215e, "seveneighths"}, - {0x0aed, "sevengujarati"}, - {0x0a6d, "sevengurmukhi"}, - {0x0667, "sevenhackarabic"}, - {0x3027, "sevenhangzhou"}, - {0x3226, "sevenideographicparen"}, - {0x2087, "seveninferior"}, - {0xff17, "sevenmonospace"}, - {0xf737, "sevenoldstyle"}, - {0x247a, "sevenparen"}, - {0x248e, "sevenperiod"}, - {0x06f7, "sevenpersian"}, - {0x2176, "sevenroman"}, - {0x2077, "sevensuperior"}, - {0x2470, "seventeencircle"}, - {0x2484, "seventeenparen"}, - {0x2498, "seventeenperiod"}, - {0x0e57, "seventhai"}, - {0x00ad, "sfthyphen"}, - {0x0577, "shaarmenian"}, - {0x09b6, "shabengali"}, - {0x0448, "shacyrillic"}, - {0x0651, "shaddaarabic"}, - {0xfc61, "shaddadammaarabic"}, - {0xfc5e, "shaddadammatanarabic"}, - {0xfc60, "shaddafathaarabic"}, - {0xfc62, "shaddakasraarabic"}, - {0xfc5f, "shaddakasratanarabic"}, - {0x2592, "shade"}, - {0x2593, "shadedark"}, - {0x2591, "shadelight"}, - {0x2592, "shademedium"}, - {0x0936, "shadeva"}, - {0x0ab6, "shagujarati"}, - {0x0a36, "shagurmukhi"}, - {0x0593, "shalshelethebrew"}, - {0x3115, "shbopomofo"}, - {0x0449, "shchacyrillic"}, - {0x0634, "sheenarabic"}, - {0xfeb6, "sheenfinalarabic"}, - {0xfeb7, "sheeninitialarabic"}, - {0xfeb8, "sheenmedialarabic"}, - {0x03e3, "sheicoptic"}, - {0x20aa, "sheqel"}, - {0x20aa, "sheqelhebrew"}, - {0x05b0, "sheva"}, - {0x05b0, "sheva115"}, - {0x05b0, "sheva15"}, - {0x05b0, "sheva22"}, - {0x05b0, "sheva2e"}, - {0x05b0, "shevahebrew"}, - {0x05b0, "shevanarrowhebrew"}, - {0x05b0, "shevaquarterhebrew"}, - {0x05b0, "shevawidehebrew"}, - {0x04bb, "shhacyrillic"}, - {0x03ed, "shimacoptic"}, - {0x05e9, "shin"}, - {0xfb49, "shindagesh"}, - {0xfb49, "shindageshhebrew"}, - {0xfb2c, "shindageshshindot"}, - {0xfb2c, "shindageshshindothebrew"}, - {0xfb2d, "shindageshsindot"}, - {0xfb2d, "shindageshsindothebrew"}, - {0x05c1, "shindothebrew"}, - {0x05e9, "shinhebrew"}, - {0xfb2a, "shinshindot"}, - {0xfb2a, "shinshindothebrew"}, - {0xfb2b, "shinsindot"}, - {0xfb2b, "shinsindothebrew"}, - {0x0282, "shook"}, - {0x03c3, "sigma"}, - {0x03c2, "sigma1"}, - {0x03c2, "sigmafinal"}, - {0x03f2, "sigmalunatesymbolgreek"}, - {0x3057, "sihiragana"}, - {0x30b7, "sikatakana"}, - {0xff7c, "sikatakanahalfwidth"}, - {0x05bd, "siluqhebrew"}, - {0x05bd, "siluqlefthebrew"}, - {0x223c, "similar"}, - {0x05c2, "sindothebrew"}, - {0x3274, "siosacirclekorean"}, - {0x3214, "siosaparenkorean"}, - {0x317e, "sioscieuckorean"}, - {0x3266, "sioscirclekorean"}, - {0x317a, "sioskiyeokkorean"}, - {0x3145, "sioskorean"}, - {0x317b, "siosnieunkorean"}, - {0x3206, "siosparenkorean"}, - {0x317d, "siospieupkorean"}, - {0x317c, "siostikeutkorean"}, - {0x0036, "six"}, - {0x0666, "sixarabic"}, - {0x09ec, "sixbengali"}, - {0x2465, "sixcircle"}, - {0x278f, "sixcircleinversesansserif"}, - {0x096c, "sixdeva"}, - {0x0aec, "sixgujarati"}, - {0x0a6c, "sixgurmukhi"}, - {0x0666, "sixhackarabic"}, - {0x3026, "sixhangzhou"}, - {0x3225, "sixideographicparen"}, - {0x2086, "sixinferior"}, - {0xff16, "sixmonospace"}, - {0xf736, "sixoldstyle"}, - {0x2479, "sixparen"}, - {0x248d, "sixperiod"}, - {0x06f6, "sixpersian"}, - {0x2175, "sixroman"}, - {0x2076, "sixsuperior"}, - {0x246f, "sixteencircle"}, - {0x09f9, "sixteencurrencydenominatorbengali"}, - {0x2483, "sixteenparen"}, - {0x2497, "sixteenperiod"}, - {0x0e56, "sixthai"}, - {0x002f, "slash"}, - {0xff0f, "slashmonospace"}, - {0x017f, "slong"}, - {0x1e9b, "slongdotaccent"}, - {0x263a, "smileface"}, - {0xff53, "smonospace"}, - {0x05c3, "sofpasuqhebrew"}, - {0x00ad, "softhyphen"}, - {0x044c, "softsigncyrillic"}, - {0x305d, "sohiragana"}, - {0x30bd, "sokatakana"}, - {0xff7f, "sokatakanahalfwidth"}, - {0x0338, "soliduslongoverlaycmb"}, - {0x0337, "solidusshortoverlaycmb"}, - {0x0e29, "sorusithai"}, - {0x0e28, "sosalathai"}, - {0x0e0b, "sosothai"}, - {0x0e2a, "sosuathai"}, - {0x0020, "space"}, - {0x0020, "spacehackarabic"}, - {0x2660, "spade"}, - {0x2660, "spadesuitblack"}, - {0x2664, "spadesuitwhite"}, - {0x24ae, "sparen"}, - {0x033b, "squarebelowcmb"}, - {0x33c4, "squarecc"}, - {0x339d, "squarecm"}, - {0x25a9, "squarediagonalcrosshatchfill"}, - {0x25a4, "squarehorizontalfill"}, - {0x338f, "squarekg"}, - {0x339e, "squarekm"}, - {0x33ce, "squarekmcapital"}, - {0x33d1, "squareln"}, - {0x33d2, "squarelog"}, - {0x338e, "squaremg"}, - {0x33d5, "squaremil"}, - {0x339c, "squaremm"}, - {0x33a1, "squaremsquared"}, - {0x25a6, "squareorthogonalcrosshatchfill"}, - {0x25a7, "squareupperlefttolowerrightfill"}, - {0x25a8, "squareupperrighttolowerleftfill"}, - {0x25a5, "squareverticalfill"}, - {0x25a3, "squarewhitewithsmallblack"}, - {0x33db, "srsquare"}, - {0x09b7, "ssabengali"}, - {0x0937, "ssadeva"}, - {0x0ab7, "ssagujarati"}, - {0x3149, "ssangcieuckorean"}, - {0x3185, "ssanghieuhkorean"}, - {0x3180, "ssangieungkorean"}, - {0x3132, "ssangkiyeokkorean"}, - {0x3165, "ssangnieunkorean"}, - {0x3143, "ssangpieupkorean"}, - {0x3146, "ssangsioskorean"}, - {0x3138, "ssangtikeutkorean"}, - {0xf6f2, "ssuperior"}, - {0x00a3, "sterling"}, - {0xffe1, "sterlingmonospace"}, - {0x0336, "strokelongoverlaycmb"}, - {0x0335, "strokeshortoverlaycmb"}, - {0x2282, "subset"}, - {0x228a, "subsetnotequal"}, - {0x2286, "subsetorequal"}, - {0x227b, "succeeds"}, - {0x220b, "suchthat"}, - {0x3059, "suhiragana"}, - {0x30b9, "sukatakana"}, - {0xff7d, "sukatakanahalfwidth"}, - {0x0652, "sukunarabic"}, - {0x2211, "summation"}, - {0x263c, "sun"}, - {0x2283, "superset"}, - {0x228b, "supersetnotequal"}, - {0x2287, "supersetorequal"}, - {0x33dc, "svsquare"}, - {0x337c, "syouwaerasquare"}, - {0x0074, "t"}, - {0x09a4, "tabengali"}, - {0x22a4, "tackdown"}, - {0x22a3, "tackleft"}, - {0x0924, "tadeva"}, - {0x0aa4, "tagujarati"}, - {0x0a24, "tagurmukhi"}, - {0x0637, "taharabic"}, - {0xfec2, "tahfinalarabic"}, - {0xfec3, "tahinitialarabic"}, - {0x305f, "tahiragana"}, - {0xfec4, "tahmedialarabic"}, - {0x337d, "taisyouerasquare"}, - {0x30bf, "takatakana"}, - {0xff80, "takatakanahalfwidth"}, - {0x0640, "tatweelarabic"}, - {0x03c4, "tau"}, - {0x05ea, "tav"}, - {0xfb4a, "tavdages"}, - {0xfb4a, "tavdagesh"}, - {0xfb4a, "tavdageshhebrew"}, - {0x05ea, "tavhebrew"}, - {0x0167, "tbar"}, - {0x310a, "tbopomofo"}, - {0x0165, "tcaron"}, - {0x02a8, "tccurl"}, - {0x0163, "tcedilla"}, - {0x0686, "tcheharabic"}, - {0xfb7b, "tchehfinalarabic"}, - {0xfb7c, "tchehinitialarabic"}, - {0xfb7d, "tchehmedialarabic"}, - {0x24e3, "tcircle"}, - {0x1e71, "tcircumflexbelow"}, - {0x0163, "tcommaaccent"}, - {0x1e97, "tdieresis"}, - {0x1e6b, "tdotaccent"}, - {0x1e6d, "tdotbelow"}, - {0x0442, "tecyrillic"}, - {0x04ad, "tedescendercyrillic"}, - {0x062a, "teharabic"}, - {0xfe96, "tehfinalarabic"}, - {0xfca2, "tehhahinitialarabic"}, - {0xfc0c, "tehhahisolatedarabic"}, - {0xfe97, "tehinitialarabic"}, - {0x3066, "tehiragana"}, - {0xfca1, "tehjeeminitialarabic"}, - {0xfc0b, "tehjeemisolatedarabic"}, - {0x0629, "tehmarbutaarabic"}, - {0xfe94, "tehmarbutafinalarabic"}, - {0xfe98, "tehmedialarabic"}, - {0xfca4, "tehmeeminitialarabic"}, - {0xfc0e, "tehmeemisolatedarabic"}, - {0xfc73, "tehnoonfinalarabic"}, - {0x30c6, "tekatakana"}, - {0xff83, "tekatakanahalfwidth"}, - {0x2121, "telephone"}, - {0x260e, "telephoneblack"}, - {0x05a0, "telishagedolahebrew"}, - {0x05a9, "telishaqetanahebrew"}, - {0x2469, "tencircle"}, - {0x3229, "tenideographicparen"}, - {0x247d, "tenparen"}, - {0x2491, "tenperiod"}, - {0x2179, "tenroman"}, - {0x02a7, "tesh"}, - {0x05d8, "tet"}, - {0xfb38, "tetdagesh"}, - {0xfb38, "tetdageshhebrew"}, - {0x05d8, "tethebrew"}, - {0x04b5, "tetsecyrillic"}, - {0x059b, "tevirhebrew"}, - {0x059b, "tevirlefthebrew"}, - {0x09a5, "thabengali"}, - {0x0925, "thadeva"}, - {0x0aa5, "thagujarati"}, - {0x0a25, "thagurmukhi"}, - {0x0630, "thalarabic"}, - {0xfeac, "thalfinalarabic"}, - {0xf898, "thanthakhatlowleftthai"}, - {0xf897, "thanthakhatlowrightthai"}, - {0x0e4c, "thanthakhatthai"}, - {0xf896, "thanthakhatupperleftthai"}, - {0x062b, "theharabic"}, - {0xfe9a, "thehfinalarabic"}, - {0xfe9b, "thehinitialarabic"}, - {0xfe9c, "thehmedialarabic"}, - {0x2203, "thereexists"}, - {0x2234, "therefore"}, - {0x03b8, "theta"}, - {0x03d1, "theta1"}, - {0x03d1, "thetasymbolgreek"}, - {0x3279, "thieuthacirclekorean"}, - {0x3219, "thieuthaparenkorean"}, - {0x326b, "thieuthcirclekorean"}, - {0x314c, "thieuthkorean"}, - {0x320b, "thieuthparenkorean"}, - {0x246c, "thirteencircle"}, - {0x2480, "thirteenparen"}, - {0x2494, "thirteenperiod"}, - {0x0e11, "thonangmonthothai"}, - {0x01ad, "thook"}, - {0x0e12, "thophuthaothai"}, - {0x00fe, "thorn"}, - {0x0e17, "thothahanthai"}, - {0x0e10, "thothanthai"}, - {0x0e18, "thothongthai"}, - {0x0e16, "thothungthai"}, - {0x0482, "thousandcyrillic"}, - {0x066c, "thousandsseparatorarabic"}, - {0x066c, "thousandsseparatorpersian"}, - {0x0033, "three"}, - {0x0663, "threearabic"}, - {0x09e9, "threebengali"}, - {0x2462, "threecircle"}, - {0x278c, "threecircleinversesansserif"}, - {0x0969, "threedeva"}, - {0x215c, "threeeighths"}, - {0x0ae9, "threegujarati"}, - {0x0a69, "threegurmukhi"}, - {0x0663, "threehackarabic"}, - {0x3023, "threehangzhou"}, - {0x3222, "threeideographicparen"}, - {0x2083, "threeinferior"}, - {0xff13, "threemonospace"}, - {0x09f6, "threenumeratorbengali"}, - {0xf733, "threeoldstyle"}, - {0x2476, "threeparen"}, - {0x248a, "threeperiod"}, - {0x06f3, "threepersian"}, - {0x00be, "threequarters"}, - {0xf6de, "threequartersemdash"}, - {0x2172, "threeroman"}, - {0x00b3, "threesuperior"}, - {0x0e53, "threethai"}, - {0x3394, "thzsquare"}, - {0x3061, "tihiragana"}, - {0x30c1, "tikatakana"}, - {0xff81, "tikatakanahalfwidth"}, - {0x3270, "tikeutacirclekorean"}, - {0x3210, "tikeutaparenkorean"}, - {0x3262, "tikeutcirclekorean"}, - {0x3137, "tikeutkorean"}, - {0x3202, "tikeutparenkorean"}, - {0x02dc, "tilde"}, - {0x0330, "tildebelowcmb"}, - {0x0303, "tildecmb"}, - {0x0303, "tildecomb"}, - {0x0360, "tildedoublecmb"}, - {0x223c, "tildeoperator"}, - {0x0334, "tildeoverlaycmb"}, - {0x033e, "tildeverticalcmb"}, - {0x2297, "timescircle"}, - {0x0596, "tipehahebrew"}, - {0x0596, "tipehalefthebrew"}, - {0x0a70, "tippigurmukhi"}, - {0x0483, "titlocyrilliccmb"}, - {0x057f, "tiwnarmenian"}, - {0x1e6f, "tlinebelow"}, - {0xff54, "tmonospace"}, - {0x0569, "toarmenian"}, - {0x3068, "tohiragana"}, - {0x30c8, "tokatakana"}, - {0xff84, "tokatakanahalfwidth"}, - {0x02e5, "tonebarextrahighmod"}, - {0x02e9, "tonebarextralowmod"}, - {0x02e6, "tonebarhighmod"}, - {0x02e8, "tonebarlowmod"}, - {0x02e7, "tonebarmidmod"}, - {0x01bd, "tonefive"}, - {0x0185, "tonesix"}, - {0x01a8, "tonetwo"}, - {0x0384, "tonos"}, - {0x3327, "tonsquare"}, - {0x0e0f, "topatakthai"}, - {0x3014, "tortoiseshellbracketleft"}, - {0xfe5d, "tortoiseshellbracketleftsmall"}, - {0xfe39, "tortoiseshellbracketleftvertical"}, - {0x3015, "tortoiseshellbracketright"}, - {0xfe5e, "tortoiseshellbracketrightsmall"}, - {0xfe3a, "tortoiseshellbracketrightvertical"}, - {0x0e15, "totaothai"}, - {0x01ab, "tpalatalhook"}, - {0x24af, "tparen"}, - {0x2122, "trademark"}, - {0xf8ea, "trademarksans"}, - {0xf6db, "trademarkserif"}, - {0x0288, "tretroflexhook"}, - {0x25bc, "triagdn"}, - {0x25c4, "triaglf"}, - {0x25ba, "triagrt"}, - {0x25b2, "triagup"}, - {0x02a6, "ts"}, - {0x05e6, "tsadi"}, - {0xfb46, "tsadidagesh"}, - {0xfb46, "tsadidageshhebrew"}, - {0x05e6, "tsadihebrew"}, - {0x0446, "tsecyrillic"}, - {0x05b5, "tsere"}, - {0x05b5, "tsere12"}, - {0x05b5, "tsere1e"}, - {0x05b5, "tsere2b"}, - {0x05b5, "tserehebrew"}, - {0x05b5, "tserenarrowhebrew"}, - {0x05b5, "tserequarterhebrew"}, - {0x05b5, "tserewidehebrew"}, - {0x045b, "tshecyrillic"}, - {0xf6f3, "tsuperior"}, - {0x099f, "ttabengali"}, - {0x091f, "ttadeva"}, - {0x0a9f, "ttagujarati"}, - {0x0a1f, "ttagurmukhi"}, - {0x0679, "tteharabic"}, - {0xfb67, "ttehfinalarabic"}, - {0xfb68, "ttehinitialarabic"}, - {0xfb69, "ttehmedialarabic"}, - {0x09a0, "tthabengali"}, - {0x0920, "tthadeva"}, - {0x0aa0, "tthagujarati"}, - {0x0a20, "tthagurmukhi"}, - {0x0287, "tturned"}, - {0x3064, "tuhiragana"}, - {0x30c4, "tukatakana"}, - {0xff82, "tukatakanahalfwidth"}, - {0x3063, "tusmallhiragana"}, - {0x30c3, "tusmallkatakana"}, - {0xff6f, "tusmallkatakanahalfwidth"}, - {0x246b, "twelvecircle"}, - {0x247f, "twelveparen"}, - {0x2493, "twelveperiod"}, - {0x217b, "twelveroman"}, - {0x2473, "twentycircle"}, - {0x5344, "twentyhangzhou"}, - {0x2487, "twentyparen"}, - {0x249b, "twentyperiod"}, - {0x0032, "two"}, - {0x0662, "twoarabic"}, - {0x09e8, "twobengali"}, - {0x2461, "twocircle"}, - {0x278b, "twocircleinversesansserif"}, - {0x0968, "twodeva"}, - {0x2025, "twodotenleader"}, - {0x2025, "twodotleader"}, - {0xfe30, "twodotleadervertical"}, - {0x0ae8, "twogujarati"}, - {0x0a68, "twogurmukhi"}, - {0x0662, "twohackarabic"}, - {0x3022, "twohangzhou"}, - {0x3221, "twoideographicparen"}, - {0x2082, "twoinferior"}, - {0xff12, "twomonospace"}, - {0x09f5, "twonumeratorbengali"}, - {0xf732, "twooldstyle"}, - {0x2475, "twoparen"}, - {0x2489, "twoperiod"}, - {0x06f2, "twopersian"}, - {0x2171, "tworoman"}, - {0x01bb, "twostroke"}, - {0x00b2, "twosuperior"}, - {0x0e52, "twothai"}, - {0x2154, "twothirds"}, - {0x0075, "u"}, - {0x00fa, "uacute"}, - {0x0289, "ubar"}, - {0x0989, "ubengali"}, - {0x3128, "ubopomofo"}, - {0x016d, "ubreve"}, - {0x01d4, "ucaron"}, - {0x24e4, "ucircle"}, - {0x00fb, "ucircumflex"}, - {0x1e77, "ucircumflexbelow"}, - {0x0443, "ucyrillic"}, - {0x0951, "udattadeva"}, - {0x0171, "udblacute"}, - {0x0215, "udblgrave"}, - {0x0909, "udeva"}, - {0x00fc, "udieresis"}, - {0x01d8, "udieresisacute"}, - {0x1e73, "udieresisbelow"}, - {0x01da, "udieresiscaron"}, - {0x04f1, "udieresiscyrillic"}, - {0x01dc, "udieresisgrave"}, - {0x01d6, "udieresismacron"}, - {0x1ee5, "udotbelow"}, - {0x00f9, "ugrave"}, - {0x0a89, "ugujarati"}, - {0x0a09, "ugurmukhi"}, - {0x3046, "uhiragana"}, - {0x1ee7, "uhookabove"}, - {0x01b0, "uhorn"}, - {0x1ee9, "uhornacute"}, - {0x1ef1, "uhorndotbelow"}, - {0x1eeb, "uhorngrave"}, - {0x1eed, "uhornhookabove"}, - {0x1eef, "uhorntilde"}, - {0x0171, "uhungarumlaut"}, - {0x04f3, "uhungarumlautcyrillic"}, - {0x0217, "uinvertedbreve"}, - {0x30a6, "ukatakana"}, - {0xff73, "ukatakanahalfwidth"}, - {0x0479, "ukcyrillic"}, - {0x315c, "ukorean"}, - {0x016b, "umacron"}, - {0x04ef, "umacroncyrillic"}, - {0x1e7b, "umacrondieresis"}, - {0x0a41, "umatragurmukhi"}, - {0xff55, "umonospace"}, - {0x005f, "underscore"}, - {0x2017, "underscoredbl"}, - {0xff3f, "underscoremonospace"}, - {0xfe33, "underscorevertical"}, - {0xfe4f, "underscorewavy"}, - {0x222a, "union"}, - {0x2200, "universal"}, - {0x0173, "uogonek"}, - {0x24b0, "uparen"}, - {0x2580, "upblock"}, - {0x05c4, "upperdothebrew"}, - {0x03c5, "upsilon"}, - {0x03cb, "upsilondieresis"}, - {0x03b0, "upsilondieresistonos"}, - {0x028a, "upsilonlatin"}, - {0x03cd, "upsilontonos"}, - {0x031d, "uptackbelowcmb"}, - {0x02d4, "uptackmod"}, - {0x0a73, "uragurmukhi"}, - {0x016f, "uring"}, - {0x045e, "ushortcyrillic"}, - {0x3045, "usmallhiragana"}, - {0x30a5, "usmallkatakana"}, - {0xff69, "usmallkatakanahalfwidth"}, - {0x04af, "ustraightcyrillic"}, - {0x04b1, "ustraightstrokecyrillic"}, - {0x0169, "utilde"}, - {0x1e79, "utildeacute"}, - {0x1e75, "utildebelow"}, - {0x098a, "uubengali"}, - {0x090a, "uudeva"}, - {0x0a8a, "uugujarati"}, - {0x0a0a, "uugurmukhi"}, - {0x0a42, "uumatragurmukhi"}, - {0x09c2, "uuvowelsignbengali"}, - {0x0942, "uuvowelsigndeva"}, - {0x0ac2, "uuvowelsigngujarati"}, - {0x09c1, "uvowelsignbengali"}, - {0x0941, "uvowelsigndeva"}, - {0x0ac1, "uvowelsigngujarati"}, - {0x0076, "v"}, - {0x0935, "vadeva"}, - {0x0ab5, "vagujarati"}, - {0x0a35, "vagurmukhi"}, - {0x30f7, "vakatakana"}, - {0x05d5, "vav"}, - {0xfb35, "vavdagesh"}, - {0xfb35, "vavdagesh65"}, - {0xfb35, "vavdageshhebrew"}, - {0x05d5, "vavhebrew"}, - {0xfb4b, "vavholam"}, - {0xfb4b, "vavholamhebrew"}, - {0x05f0, "vavvavhebrew"}, - {0x05f1, "vavyodhebrew"}, - {0x24e5, "vcircle"}, - {0x1e7f, "vdotbelow"}, - {0x0432, "vecyrillic"}, - {0x06a4, "veharabic"}, - {0xfb6b, "vehfinalarabic"}, - {0xfb6c, "vehinitialarabic"}, - {0xfb6d, "vehmedialarabic"}, - {0x30f9, "vekatakana"}, - {0x2640, "venus"}, - {0x007c, "verticalbar"}, - {0x030d, "verticallineabovecmb"}, - {0x0329, "verticallinebelowcmb"}, - {0x02cc, "verticallinelowmod"}, - {0x02c8, "verticallinemod"}, - {0x057e, "vewarmenian"}, - {0x028b, "vhook"}, - {0x30f8, "vikatakana"}, - {0x09cd, "viramabengali"}, - {0x094d, "viramadeva"}, - {0x0acd, "viramagujarati"}, - {0x0983, "visargabengali"}, - {0x0903, "visargadeva"}, - {0x0a83, "visargagujarati"}, - {0xff56, "vmonospace"}, - {0x0578, "voarmenian"}, - {0x309e, "voicediterationhiragana"}, - {0x30fe, "voicediterationkatakana"}, - {0x309b, "voicedmarkkana"}, - {0xff9e, "voicedmarkkanahalfwidth"}, - {0x30fa, "vokatakana"}, - {0x24b1, "vparen"}, - {0x1e7d, "vtilde"}, - {0x028c, "vturned"}, - {0x3094, "vuhiragana"}, - {0x30f4, "vukatakana"}, - {0x0077, "w"}, - {0x1e83, "wacute"}, - {0x3159, "waekorean"}, - {0x308f, "wahiragana"}, - {0x30ef, "wakatakana"}, - {0xff9c, "wakatakanahalfwidth"}, - {0x3158, "wakorean"}, - {0x308e, "wasmallhiragana"}, - {0x30ee, "wasmallkatakana"}, - {0x3357, "wattosquare"}, - {0x301c, "wavedash"}, - {0xfe34, "wavyunderscorevertical"}, - {0x0648, "wawarabic"}, - {0xfeee, "wawfinalarabic"}, - {0x0624, "wawhamzaabovearabic"}, - {0xfe86, "wawhamzaabovefinalarabic"}, - {0x33dd, "wbsquare"}, - {0x24e6, "wcircle"}, - {0x0175, "wcircumflex"}, - {0x1e85, "wdieresis"}, - {0x1e87, "wdotaccent"}, - {0x1e89, "wdotbelow"}, - {0x3091, "wehiragana"}, - {0x2118, "weierstrass"}, - {0x30f1, "wekatakana"}, - {0x315e, "wekorean"}, - {0x315d, "weokorean"}, - {0x1e81, "wgrave"}, - {0x25e6, "whitebullet"}, - {0x25cb, "whitecircle"}, - {0x25d9, "whitecircleinverse"}, - {0x300e, "whitecornerbracketleft"}, - {0xfe43, "whitecornerbracketleftvertical"}, - {0x300f, "whitecornerbracketright"}, - {0xfe44, "whitecornerbracketrightvertical"}, - {0x25c7, "whitediamond"}, - {0x25c8, "whitediamondcontainingblacksmalldiamond"}, - {0x25bf, "whitedownpointingsmalltriangle"}, - {0x25bd, "whitedownpointingtriangle"}, - {0x25c3, "whiteleftpointingsmalltriangle"}, - {0x25c1, "whiteleftpointingtriangle"}, - {0x3016, "whitelenticularbracketleft"}, - {0x3017, "whitelenticularbracketright"}, - {0x25b9, "whiterightpointingsmalltriangle"}, - {0x25b7, "whiterightpointingtriangle"}, - {0x25ab, "whitesmallsquare"}, - {0x263a, "whitesmilingface"}, - {0x25a1, "whitesquare"}, - {0x2606, "whitestar"}, - {0x260f, "whitetelephone"}, - {0x3018, "whitetortoiseshellbracketleft"}, - {0x3019, "whitetortoiseshellbracketright"}, - {0x25b5, "whiteuppointingsmalltriangle"}, - {0x25b3, "whiteuppointingtriangle"}, - {0x3090, "wihiragana"}, - {0x30f0, "wikatakana"}, - {0x315f, "wikorean"}, - {0xff57, "wmonospace"}, - {0x3092, "wohiragana"}, - {0x30f2, "wokatakana"}, - {0xff66, "wokatakanahalfwidth"}, - {0x20a9, "won"}, - {0xffe6, "wonmonospace"}, - {0x0e27, "wowaenthai"}, - {0x24b2, "wparen"}, - {0x1e98, "wring"}, - {0x02b7, "wsuperior"}, - {0x028d, "wturned"}, - {0x01bf, "wynn"}, - {0x0078, "x"}, - {0x033d, "xabovecmb"}, - {0x3112, "xbopomofo"}, - {0x24e7, "xcircle"}, - {0x1e8d, "xdieresis"}, - {0x1e8b, "xdotaccent"}, - {0x056d, "xeharmenian"}, - {0x03be, "xi"}, - {0xff58, "xmonospace"}, - {0x24b3, "xparen"}, - {0x02e3, "xsuperior"}, - {0x0079, "y"}, - {0x334e, "yaadosquare"}, - {0x09af, "yabengali"}, - {0x00fd, "yacute"}, - {0x092f, "yadeva"}, - {0x3152, "yaekorean"}, - {0x0aaf, "yagujarati"}, - {0x0a2f, "yagurmukhi"}, - {0x3084, "yahiragana"}, - {0x30e4, "yakatakana"}, - {0xff94, "yakatakanahalfwidth"}, - {0x3151, "yakorean"}, - {0x0e4e, "yamakkanthai"}, - {0x3083, "yasmallhiragana"}, - {0x30e3, "yasmallkatakana"}, - {0xff6c, "yasmallkatakanahalfwidth"}, - {0x0463, "yatcyrillic"}, - {0x24e8, "ycircle"}, - {0x0177, "ycircumflex"}, - {0x00ff, "ydieresis"}, - {0x1e8f, "ydotaccent"}, - {0x1ef5, "ydotbelow"}, - {0x064a, "yeharabic"}, - {0x06d2, "yehbarreearabic"}, - {0xfbaf, "yehbarreefinalarabic"}, - {0xfef2, "yehfinalarabic"}, - {0x0626, "yehhamzaabovearabic"}, - {0xfe8a, "yehhamzaabovefinalarabic"}, - {0xfe8b, "yehhamzaaboveinitialarabic"}, - {0xfe8c, "yehhamzaabovemedialarabic"}, - {0xfef3, "yehinitialarabic"}, - {0xfef4, "yehmedialarabic"}, - {0xfcdd, "yehmeeminitialarabic"}, - {0xfc58, "yehmeemisolatedarabic"}, - {0xfc94, "yehnoonfinalarabic"}, - {0x06d1, "yehthreedotsbelowarabic"}, - {0x3156, "yekorean"}, - {0x00a5, "yen"}, - {0xffe5, "yenmonospace"}, - {0x3155, "yeokorean"}, - {0x3186, "yeorinhieuhkorean"}, - {0x05aa, "yerahbenyomohebrew"}, - {0x05aa, "yerahbenyomolefthebrew"}, - {0x044b, "yericyrillic"}, - {0x04f9, "yerudieresiscyrillic"}, - {0x3181, "yesieungkorean"}, - {0x3183, "yesieungpansioskorean"}, - {0x3182, "yesieungsioskorean"}, - {0x059a, "yetivhebrew"}, - {0x1ef3, "ygrave"}, - {0x01b4, "yhook"}, - {0x1ef7, "yhookabove"}, - {0x0575, "yiarmenian"}, - {0x0457, "yicyrillic"}, - {0x3162, "yikorean"}, - {0x262f, "yinyang"}, - {0x0582, "yiwnarmenian"}, - {0xff59, "ymonospace"}, - {0x05d9, "yod"}, - {0xfb39, "yoddagesh"}, - {0xfb39, "yoddageshhebrew"}, - {0x05d9, "yodhebrew"}, - {0x05f2, "yodyodhebrew"}, - {0xfb1f, "yodyodpatahhebrew"}, - {0x3088, "yohiragana"}, - {0x3189, "yoikorean"}, - {0x30e8, "yokatakana"}, - {0xff96, "yokatakanahalfwidth"}, - {0x315b, "yokorean"}, - {0x3087, "yosmallhiragana"}, - {0x30e7, "yosmallkatakana"}, - {0xff6e, "yosmallkatakanahalfwidth"}, - {0x03f3, "yotgreek"}, - {0x3188, "yoyaekorean"}, - {0x3187, "yoyakorean"}, - {0x0e22, "yoyakthai"}, - {0x0e0d, "yoyingthai"}, - {0x24b4, "yparen"}, - {0x037a, "ypogegrammeni"}, - {0x0345, "ypogegrammenigreekcmb"}, - {0x01a6, "yr"}, - {0x1e99, "yring"}, - {0x02b8, "ysuperior"}, - {0x1ef9, "ytilde"}, - {0x028e, "yturned"}, - {0x3086, "yuhiragana"}, - {0x318c, "yuikorean"}, - {0x30e6, "yukatakana"}, - {0xff95, "yukatakanahalfwidth"}, - {0x3160, "yukorean"}, - {0x046b, "yusbigcyrillic"}, - {0x046d, "yusbigiotifiedcyrillic"}, - {0x0467, "yuslittlecyrillic"}, - {0x0469, "yuslittleiotifiedcyrillic"}, - {0x3085, "yusmallhiragana"}, - {0x30e5, "yusmallkatakana"}, - {0xff6d, "yusmallkatakanahalfwidth"}, - {0x318b, "yuyekorean"}, - {0x318a, "yuyeokorean"}, - {0x09df, "yyabengali"}, - {0x095f, "yyadeva"}, - {0x007a, "z"}, - {0x0566, "zaarmenian"}, - {0x017a, "zacute"}, - {0x095b, "zadeva"}, - {0x0a5b, "zagurmukhi"}, - {0x0638, "zaharabic"}, - {0xfec6, "zahfinalarabic"}, - {0xfec7, "zahinitialarabic"}, - {0x3056, "zahiragana"}, - {0xfec8, "zahmedialarabic"}, - {0x0632, "zainarabic"}, - {0xfeb0, "zainfinalarabic"}, - {0x30b6, "zakatakana"}, - {0x0595, "zaqefgadolhebrew"}, - {0x0594, "zaqefqatanhebrew"}, - {0x0598, "zarqahebrew"}, - {0x05d6, "zayin"}, - {0xfb36, "zayindagesh"}, - {0xfb36, "zayindageshhebrew"}, - {0x05d6, "zayinhebrew"}, - {0x3117, "zbopomofo"}, - {0x017e, "zcaron"}, - {0x24e9, "zcircle"}, - {0x1e91, "zcircumflex"}, - {0x0291, "zcurl"}, - {0x017c, "zdot"}, - {0x017c, "zdotaccent"}, - {0x1e93, "zdotbelow"}, - {0x0437, "zecyrillic"}, - {0x0499, "zedescendercyrillic"}, - {0x04df, "zedieresiscyrillic"}, - {0x305c, "zehiragana"}, - {0x30bc, "zekatakana"}, - {0x0030, "zero"}, - {0x0660, "zeroarabic"}, - {0x09e6, "zerobengali"}, - {0x0966, "zerodeva"}, - {0x0ae6, "zerogujarati"}, - {0x0a66, "zerogurmukhi"}, - {0x0660, "zerohackarabic"}, - {0x2080, "zeroinferior"}, - {0xff10, "zeromonospace"}, - {0xf730, "zerooldstyle"}, - {0x06f0, "zeropersian"}, - {0x2070, "zerosuperior"}, - {0x0e50, "zerothai"}, - {0xfeff, "zerowidthjoiner"}, - {0x200c, "zerowidthnonjoiner"}, - {0x200b, "zerowidthspace"}, - {0x03b6, "zeta"}, - {0x3113, "zhbopomofo"}, - {0x056a, "zhearmenian"}, - {0x04c2, "zhebrevecyrillic"}, - {0x0436, "zhecyrillic"}, - {0x0497, "zhedescendercyrillic"}, - {0x04dd, "zhedieresiscyrillic"}, - {0x3058, "zihiragana"}, - {0x30b8, "zikatakana"}, - {0x05ae, "zinorhebrew"}, - {0x1e95, "zlinebelow"}, - {0xff5a, "zmonospace"}, - {0x305e, "zohiragana"}, - {0x30be, "zokatakana"}, - {0x24b5, "zparen"}, - {0x0290, "zretroflexhook"}, - {0x01b6, "zstroke"}, - {0x305a, "zuhiragana"}, - {0x30ba, "zukatakana"}, - {0x007b, "{"}, - {0x007c, "|"}, - {0x007d, "}"}, - {0x007e, "~"}, - { 0, nullptr } -}; - -// map ZapfDingbats names to Unicode -static struct NameToUnicodeTab nameToUnicodeZapfDingbatsTab[] = { - {0x275e, "a100"}, - {0x2761, "a101"}, - {0x2762, "a102"}, - {0x2763, "a103"}, - {0x2764, "a104"}, - {0x2710, "a105"}, - {0x2765, "a106"}, - {0x2766, "a107"}, - {0x2767, "a108"}, - {0x2660, "a109"}, - {0x2721, "a10"}, - {0x2665, "a110"}, - {0x2666, "a111"}, - {0x2663, "a112"}, - {0x2709, "a117"}, - {0x2708, "a118"}, - {0x2707, "a119"}, - {0x261b, "a11"}, - {0x2460, "a120"}, - {0x2461, "a121"}, - {0x2462, "a122"}, - {0x2463, "a123"}, - {0x2464, "a124"}, - {0x2465, "a125"}, - {0x2466, "a126"}, - {0x2467, "a127"}, - {0x2468, "a128"}, - {0x2469, "a129"}, - {0x261e, "a12"}, - {0x2776, "a130"}, - {0x2777, "a131"}, - {0x2778, "a132"}, - {0x2779, "a133"}, - {0x277a, "a134"}, - {0x277b, "a135"}, - {0x277c, "a136"}, - {0x277d, "a137"}, - {0x277e, "a138"}, - {0x277f, "a139"}, - {0x270c, "a13"}, - {0x2780, "a140"}, - {0x2781, "a141"}, - {0x2782, "a142"}, - {0x2783, "a143"}, - {0x2784, "a144"}, - {0x2785, "a145"}, - {0x2786, "a146"}, - {0x2787, "a147"}, - {0x2788, "a148"}, - {0x2789, "a149"}, - {0x270d, "a14"}, - {0x278a, "a150"}, - {0x278b, "a151"}, - {0x278c, "a152"}, - {0x278d, "a153"}, - {0x278e, "a154"}, - {0x278f, "a155"}, - {0x2790, "a156"}, - {0x2791, "a157"}, - {0x2792, "a158"}, - {0x2793, "a159"}, - {0x270e, "a15"}, - {0x2794, "a160"}, - {0x2192, "a161"}, - {0x27a3, "a162"}, - {0x2194, "a163"}, - {0x2195, "a164"}, - {0x2799, "a165"}, - {0x279b, "a166"}, - {0x279c, "a167"}, - {0x279d, "a168"}, - {0x279e, "a169"}, - {0x270f, "a16"}, - {0x279f, "a170"}, - {0x27a0, "a171"}, - {0x27a1, "a172"}, - {0x27a2, "a173"}, - {0x27a4, "a174"}, - {0x27a5, "a175"}, - {0x27a6, "a176"}, - {0x27a7, "a177"}, - {0x27a8, "a178"}, - {0x27a9, "a179"}, - {0x2711, "a17"}, - {0x27ab, "a180"}, - {0x27ad, "a181"}, - {0x27af, "a182"}, - {0x27b2, "a183"}, - {0x27b3, "a184"}, - {0x27b5, "a185"}, - {0x27b8, "a186"}, - {0x27ba, "a187"}, - {0x27bb, "a188"}, - {0x27bc, "a189"}, - {0x2712, "a18"}, - {0x27bd, "a190"}, - {0x27be, "a191"}, - {0x279a, "a192"}, - {0x27aa, "a193"}, - {0x27b6, "a194"}, - {0x27b9, "a195"}, - {0x2798, "a196"}, - {0x27b4, "a197"}, - {0x27b7, "a198"}, - {0x27ac, "a199"}, - {0x2713, "a19"}, - {0x2701, "a1"}, - {0x27ae, "a200"}, - {0x27b1, "a201"}, - {0x2703, "a202"}, - {0x2750, "a203"}, - {0x2752, "a204"}, - {0x276e, "a205"}, - {0x2770, "a206"}, - {0x2714, "a20"}, - {0x2715, "a21"}, - {0x2716, "a22"}, - {0x2717, "a23"}, - {0x2718, "a24"}, - {0x2719, "a25"}, - {0x271a, "a26"}, - {0x271b, "a27"}, - {0x271c, "a28"}, - {0x2722, "a29"}, - {0x2702, "a2"}, - {0x2723, "a30"}, - {0x2724, "a31"}, - {0x2725, "a32"}, - {0x2726, "a33"}, - {0x2727, "a34"}, - {0x2605, "a35"}, - {0x2729, "a36"}, - {0x272a, "a37"}, - {0x272b, "a38"}, - {0x272c, "a39"}, - {0x2704, "a3"}, - {0x272d, "a40"}, - {0x272e, "a41"}, - {0x272f, "a42"}, - {0x2730, "a43"}, - {0x2731, "a44"}, - {0x2732, "a45"}, - {0x2733, "a46"}, - {0x2734, "a47"}, - {0x2735, "a48"}, - {0x2736, "a49"}, - {0x260e, "a4"}, - {0x2737, "a50"}, - {0x2738, "a51"}, - {0x2739, "a52"}, - {0x273a, "a53"}, - {0x273b, "a54"}, - {0x273c, "a55"}, - {0x273d, "a56"}, - {0x273e, "a57"}, - {0x273f, "a58"}, - {0x2740, "a59"}, - {0x2706, "a5"}, - {0x2741, "a60"}, - {0x2742, "a61"}, - {0x2743, "a62"}, - {0x2744, "a63"}, - {0x2745, "a64"}, - {0x2746, "a65"}, - {0x2747, "a66"}, - {0x2748, "a67"}, - {0x2749, "a68"}, - {0x274a, "a69"}, - {0x271d, "a6"}, - {0x274b, "a70"}, - {0x25cf, "a71"}, - {0x274d, "a72"}, - {0x25a0, "a73"}, - {0x274f, "a74"}, - {0x2751, "a75"}, - {0x25b2, "a76"}, - {0x25bc, "a77"}, - {0x25c6, "a78"}, - {0x2756, "a79"}, - {0x271e, "a7"}, - {0x25d7, "a81"}, - {0x2758, "a82"}, - {0x2759, "a83"}, - {0x275a, "a84"}, - {0x276f, "a85"}, - {0x2771, "a86"}, - {0x2772, "a87"}, - {0x2773, "a88"}, - {0x2768, "a89"}, - {0x271f, "a8"}, - {0x2769, "a90"}, - {0x276c, "a91"}, - {0x276d, "a92"}, - {0x276a, "a93"}, - {0x276b, "a94"}, - {0x2774, "a95"}, - {0x2775, "a96"}, - {0x275b, "a97"}, - {0x275c, "a98"}, - {0x275d, "a99"}, - {0x2720, "a9"}, - { 0, nullptr } -}; diff --git a/Build/source/libs/poppler/poppler-src/poppler/Object.cc b/Build/source/libs/poppler/poppler-src/poppler/Object.cc deleted file mode 100644 index d3adc4473ab..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/Object.cc +++ /dev/null @@ -1,256 +0,0 @@ -//======================================================================== -// -// Object.cc -// -// Copyright 1996-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2008, 2010, 2012, 2017 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2013 Adrian Johnson <ajohnson@redneon.com> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include <config.h> - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include <stddef.h> -#include "Object.h" -#include "Array.h" -#include "Dict.h" -#include "Error.h" -#include "Stream.h" -#include "XRef.h" - -//------------------------------------------------------------------------ -// Object -//------------------------------------------------------------------------ - -static const char *objTypeNames[numObjTypes] = { - "boolean", - "integer", - "real", - "string", - "name", - "null", - "array", - "dictionary", - "stream", - "ref", - "cmd", - "error", - "eof", - "none", - "integer64", - "dead" -}; - -#ifdef DEBUG_MEM -int Object::numAlloc[numObjTypes] = - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; -#endif - -Object::Object(Object&& other) -{ - type = other.type; - real = other.real; // this is the biggest of the union so it's enough - other.type = objDead; -} - -Object& Object::operator=(Object&& other) -{ - free(); - type = other.type; - real = other.real; // this is the biggest of the union so it's enough - other.type = objDead; - return *this; -} - -Object::~Object() -{ - free(); -} - -Object Object::copy() const { - CHECK_NOT_DEAD; - - Object obj; - obj.type = type; - obj.real = real; // this is the biggest of the union so it's enough - switch (type) { - case objString: - obj.string = string->copy(); - break; - case objName: - obj.cString = copyString(cString); - break; - case objArray: - array->incRef(); - break; - case objDict: - dict->incRef(); - break; - case objStream: - stream->incRef(); - break; - case objCmd: - obj.cString = copyString(cString); - break; - default: - break; - } -#ifdef DEBUG_MEM - ++numAlloc[type]; -#endif - return obj; -} - -Object Object::fetch(XRef *xref, int recursion) const { - CHECK_NOT_DEAD; - - return (type == objRef && xref) ? - xref->fetch(ref.num, ref.gen, recursion) : copy(); -} - -void Object::free() { - switch (type) { - case objString: - delete string; - break; - case objName: - gfree(cString); - break; - case objArray: - if (!array->decRef()) { - delete array; - } - break; - case objDict: - if (!dict->decRef()) { - delete dict; - } - break; - case objStream: - if (!stream->decRef()) { - delete stream; - } - break; - case objCmd: - gfree(cString); - break; - default: - break; - } -#ifdef DEBUG_MEM - --numAlloc[type]; -#endif - type = objNone; -} - -const char *Object::getTypeName() const { - return objTypeNames[type]; -} - -void Object::print(FILE *f) const { - Object obj; - int i; - - switch (type) { - case objBool: - fprintf(f, "%s", booln ? "true" : "false"); - break; - case objInt: - fprintf(f, "%d", intg); - break; - case objReal: - fprintf(f, "%g", real); - break; - case objString: - fprintf(f, "("); - fwrite(string->getCString(), 1, string->getLength(), f); - fprintf(f, ")"); - break; - case objName: - fprintf(f, "/%s", cString); - break; - case objNull: - fprintf(f, "null"); - break; - case objArray: - fprintf(f, "["); - for (i = 0; i < arrayGetLength(); ++i) { - if (i > 0) - fprintf(f, " "); - obj = arrayGetNF(i); - obj.print(f); - } - fprintf(f, "]"); - break; - case objDict: - fprintf(f, "<<"); - for (i = 0; i < dictGetLength(); ++i) { - fprintf(f, " /%s ", dictGetKey(i)); - obj = dictGetValNF(i); - obj.print(f); - } - fprintf(f, " >>"); - break; - case objStream: - fprintf(f, "<stream>"); - break; - case objRef: - fprintf(f, "%d %d R", ref.num, ref.gen); - break; - case objCmd: - fprintf(f, "%s", cString); - break; - case objError: - fprintf(f, "<error>"); - break; - case objEOF: - fprintf(f, "<EOF>"); - break; - case objNone: - fprintf(f, "<none>"); - break; - case objDead: - fprintf(f, "<dead>"); - break; - case objInt64: - fprintf(f, "%lld", int64g); - break; - } -} - -void Object::memCheck(FILE *f) { -#ifdef DEBUG_MEM - int i; - int t; - - t = 0; - for (i = 0; i < numObjTypes; ++i) - t += numAlloc[i]; - if (t > 0) { - fprintf(f, "Allocated objects:\n"); - for (i = 0; i < numObjTypes; ++i) { - if (numAlloc[i] > 0) - fprintf(f, " %-20s: %6d\n", objTypeNames[i], numAlloc[i]); - } - } -#else - (void)f; -#endif -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/Object.h b/Build/source/libs/poppler/poppler-src/poppler/Object.h deleted file mode 100644 index 97978f46528..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/Object.h +++ /dev/null @@ -1,425 +0,0 @@ -//======================================================================== -// -// Object.h -// -// Copyright 1996-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2007 Julien Rebetez <julienr@svn.gnome.org> -// Copyright (C) 2008 Kees Cook <kees@outflux.net> -// Copyright (C) 2008, 2010, 2017 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2009 Jakub Wilk <jwilk@jwilk.net> -// Copyright (C) 2012 Fabio D'Urso <fabiodurso@hotmail.it> -// Copyright (C) 2013 Thomas Freitag <Thomas.Freitag@alfa.de> -// Copyright (C) 2013, 2017, 2018 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2013 Adrian Perez de Castro <aperez@igalia.com> -// Copyright (C) 2016 Jakub Alba <jakubalba@gmail.com> -// 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 -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef OBJECT_H -#define OBJECT_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include <set> -#include <stdio.h> -#include <string.h> -#include <limits.h> -#include "goo/gtypes.h" -#include "goo/gmem.h" -#include "goo/GooString.h" -#include "goo/GooLikely.h" -#include "Error.h" - -#define OBJECT_TYPE_CHECK(wanted_type) \ - if (unlikely(type != wanted_type)) { \ - error(errInternal, 0, "Call to Object where the object was type {0:d}, " \ - "not the expected type {1:d}", type, wanted_type); \ - abort(); \ - } - -#define OBJECT_2TYPES_CHECK(wanted_type1, wanted_type2) \ - if (unlikely(type != wanted_type1) && unlikely(type != wanted_type2)) { \ - error(errInternal, 0, "Call to Object where the object was type {0:d}, " \ - "not the expected type {1:d} or {2:d}", type, wanted_type1, wanted_type2); \ - abort(); \ - } - -#define OBJECT_3TYPES_CHECK(wanted_type1, wanted_type2, wanted_type3) \ - if (unlikely(type != wanted_type1) && unlikely(type != wanted_type2) && unlikely(type != wanted_type3)) { \ - error(errInternal, 0, "Call to Object where the object was type {0:d}, " \ - "not the expected type {1:d}, {2:d} or {3:d}", type, wanted_type1, wanted_type2, wanted_type3); \ - abort(); \ - } - -#define CHECK_NOT_DEAD \ - if (unlikely(type == objDead)) { \ - error(errInternal, 0, "Call to dead object"); \ - abort(); \ - } - -class XRef; -class Array; -class Dict; -class Stream; - -//------------------------------------------------------------------------ -// Ref -//------------------------------------------------------------------------ - -struct Ref { - int num; // object number - int gen; // generation number -}; - -struct RefCompare { - bool operator() (const Ref& lhs, const Ref& rhs) const { - if (lhs.num != rhs.num) - return lhs.num < rhs.num; - return lhs.gen < rhs.gen; - } -}; - -//------------------------------------------------------------------------ -// object types -//------------------------------------------------------------------------ - -enum ObjType { - // simple objects - objBool, // boolean - objInt, // integer - objReal, // real - objString, // string - objName, // name - objNull, // null - - // complex objects - objArray, // array - objDict, // dictionary - objStream, // stream - objRef, // indirect reference - - // special objects - objCmd, // command name - objError, // error return from Lexer - objEOF, // end of file return from Lexer - objNone, // uninitialized object - - // poppler-only objects - objInt64, // integer with at least 64-bits - objDead // and object after shallowCopy -}; - -#define numObjTypes 16 // total number of object types - -//------------------------------------------------------------------------ -// Object -//------------------------------------------------------------------------ - -#ifdef DEBUG_MEM -#define initObj(t) free(); zeroUnion(); ++numAlloc[type = t] -#else -#define initObj(t) free(); zeroUnion(); type = t -#endif - -#ifdef DEBUG_MEM -#define constructObj(t) ++numAlloc[type = t] -#else -#define constructObj(t) type = t -#endif - -class Object { -public: - // clear the anonymous union as best we can -- clear at least a pointer - void zeroUnion() { this->cString = nullptr; } - - // Default constructor. - Object(): - type(objNone) { zeroUnion(); } - ~Object(); - - explicit Object(GBool boolnA) - { constructObj(objBool); booln = boolnA; } - explicit Object(int intgA) - { constructObj(objInt); intg = intgA; } - explicit Object(ObjType typeA) - { constructObj(typeA); } - explicit Object(double realA) - { constructObj(objReal); real = realA; } - explicit Object(GooString *stringA) - { constructObj(objString); string = stringA; } - Object(ObjType typeA, const char *stringA) - { constructObj(typeA); cString = copyString(stringA); } - explicit Object(long long int64gA) - { constructObj(objInt64); int64g = int64gA; } - explicit Object(Array *arrayA) - { constructObj(objArray); array = arrayA; } - explicit Object(Dict *dictA) - { constructObj(objDict); dict = dictA; } - explicit Object(Stream *streamA) - { constructObj(objStream); stream = streamA; } - Object(int numA, int genA) - { constructObj(objRef); ref.num = numA; ref.gen = genA; } - template<typename T> Object(T) = delete; - - Object(Object&& other); - Object& operator=(Object&& other); - - Object &operator=(const Object &other) = delete; - Object(const Object &other) = delete; - - // Set object to null. - void setToNull() { initObj(objNull); } - - // Copy this to obj - Object copy() const; - - // If object is a Ref, fetch and return the referenced object. - // Otherwise, return a copy of the object. - Object fetch(XRef *xref, int recursion = 0) const; - - // Type checking. - ObjType getType() const { CHECK_NOT_DEAD; return type; } - GBool isBool() const { CHECK_NOT_DEAD; return type == objBool; } - GBool isInt() const { CHECK_NOT_DEAD; return type == objInt; } - GBool isReal() const { CHECK_NOT_DEAD; return type == objReal; } - GBool isNum() const { CHECK_NOT_DEAD; return type == objInt || type == objReal || type == objInt64; } - GBool isString() const { CHECK_NOT_DEAD; return type == objString; } - GBool isName() const { CHECK_NOT_DEAD; return type == objName; } - GBool isNull() const { CHECK_NOT_DEAD; return type == objNull; } - GBool isArray() const { CHECK_NOT_DEAD; return type == objArray; } - GBool isDict() const { CHECK_NOT_DEAD; return type == objDict; } - GBool isStream() const { CHECK_NOT_DEAD; return type == objStream; } - GBool isRef() const { CHECK_NOT_DEAD; return type == objRef; } - GBool isCmd() const { CHECK_NOT_DEAD; return type == objCmd; } - GBool isError() const { CHECK_NOT_DEAD; return type == objError; } - GBool isEOF() const { CHECK_NOT_DEAD; return type == objEOF; } - GBool isNone() const { CHECK_NOT_DEAD; return type == objNone; } - GBool isInt64() const { CHECK_NOT_DEAD; return type == objInt64; } - GBool isIntOrInt64() const { CHECK_NOT_DEAD; return type == objInt || type == objInt64; } - - // Special type checking. - GBool isName(const char *nameA) const - { return type == objName && !strcmp(cString, nameA); } - GBool isDict(const char *dictType) const; - GBool isStream(char *dictType) const; - GBool isCmd(const char *cmdA) const - { return type == objCmd && !strcmp(cString, cmdA); } - - // Accessors. - GBool getBool() const { OBJECT_TYPE_CHECK(objBool); return booln; } - int getInt() const { OBJECT_TYPE_CHECK(objInt); return intg; } - double getReal() const { OBJECT_TYPE_CHECK(objReal); return real; } - - // Note: integers larger than 2^53 can not be exactly represented by a double. - // Where the exact value of integers up to 2^63 is required, use isInt64()/getInt64(). - double getNum() const { OBJECT_3TYPES_CHECK(objInt, objInt64, objReal); - return type == objInt ? (double)intg : type == objInt64 ? (double)int64g : real; } - double getNum(bool *ok) const { - if (unlikely(type != objInt && type != objInt64 && type != objReal)) { - *ok = false; - return 0.; - } - return type == objInt ? (double)intg : type == objInt64 ? (double)int64g : real; - } - const GooString *getString() const { OBJECT_TYPE_CHECK(objString); return string; } - // After takeString() the only method that should be called for the object is free() - // because the object it's not expected to have a NULL string. - GooString *takeString() { - OBJECT_TYPE_CHECK(objString); GooString *s = string; string = nullptr; return s; } - const char *getName() const { OBJECT_TYPE_CHECK(objName); return cString; } - Array *getArray() const { OBJECT_TYPE_CHECK(objArray); return array; } - Dict *getDict() const { OBJECT_TYPE_CHECK(objDict); return dict; } - Stream *getStream() const { OBJECT_TYPE_CHECK(objStream); return stream; } - Ref getRef() const { OBJECT_TYPE_CHECK(objRef); return ref; } - int getRefNum() const { OBJECT_TYPE_CHECK(objRef); return ref.num; } - int getRefGen() const { OBJECT_TYPE_CHECK(objRef); return ref.gen; } - char *getCmd() const { OBJECT_TYPE_CHECK(objCmd); return cString; } - long long getInt64() const { OBJECT_TYPE_CHECK(objInt64); return int64g; } - long long getIntOrInt64() const { OBJECT_2TYPES_CHECK(objInt, objInt64); - return type == objInt ? intg : int64g; } - - // Array accessors. - int arrayGetLength() const; - void arrayAdd(Object &&elem); - void arrayRemove(int i); - Object arrayGet(int i, int recursion) const; - Object arrayGetNF(int i) const; - - // Dict accessors. - int dictGetLength() const; - void dictAdd(char *key, Object &&val); - void dictSet(const char *key, Object &&val); - void dictRemove(const char *key); - GBool dictIs(const char *dictType) const; - Object dictLookup(const char *key, int recursion = 0) const; - Object dictLookupNF(const char *key) const; - char *dictGetKey(int i) const; - Object dictGetVal(int i) const; - Object dictGetValNF(int i) const; - - // Stream accessors. - GBool streamIs(char *dictType) const; - void streamReset(); - void streamClose(); - int streamGetChar() const; - int streamGetChars(int nChars, Guchar *buffer) const; - int streamLookChar() const; - char *streamGetLine(char *buf, int size) const; - Goffset streamGetPos() const; - void streamSetPos(Goffset pos, int dir = 0); - Dict *streamGetDict() const; - - // Output. - const char *getTypeName() const; - void print(FILE *f = stdout) const; - - // Memory testing. - static void memCheck(FILE *f); - -private: - friend class Array; // Needs free and initNullAfterMalloc - friend class Dict; // Needs free and initNullAfterMalloc - friend class XRef; // Needs free and initNullAfterMalloc - - // Free object contents. - void free(); - - // Only use if are mallocing Objects - void initNullAfterMalloc() { constructObj(objNull); } - - ObjType type; // object type - union { // value for each type: - GBool booln; // boolean - int intg; // integer - long long int64g; // 64-bit integer - double real; // real - GooString *string; // string - char *cString; // name or command, depending on objType - Array *array; // array - Dict *dict; // dictionary - Stream *stream; // stream - Ref ref; // indirect reference - }; - -#ifdef DEBUG_MEM - static int // number of each type of object - numAlloc[numObjTypes]; // currently allocated -#endif -}; - -//------------------------------------------------------------------------ -// Array accessors. -//------------------------------------------------------------------------ - -#include "Array.h" - -inline int Object::arrayGetLength() const - { OBJECT_TYPE_CHECK(objArray); return array->getLength(); } - -inline void Object::arrayAdd(Object &&elem) - { OBJECT_TYPE_CHECK(objArray); array->add(std::move(elem)); } - -inline void Object::arrayRemove(int i) - { OBJECT_TYPE_CHECK(objArray); array->remove(i); } - -inline Object Object::arrayGet(int i, int recursion = 0) const - { OBJECT_TYPE_CHECK(objArray); return array->get(i, recursion); } - -inline Object Object::arrayGetNF(int i) const - { OBJECT_TYPE_CHECK(objArray); return array->getNF(i); } - -//------------------------------------------------------------------------ -// Dict accessors. -//------------------------------------------------------------------------ - -#include "Dict.h" - -inline int Object::dictGetLength() const - { OBJECT_TYPE_CHECK(objDict); return dict->getLength(); } - -inline void Object::dictAdd(char *key, Object &&val) - { OBJECT_TYPE_CHECK(objDict); dict->add(key, std::move(val)); } - -inline void Object::dictSet(const char *key, Object &&val) - { OBJECT_TYPE_CHECK(objDict); dict->set(key, std::move(val)); } - -inline void Object::dictRemove(const char *key) - { OBJECT_TYPE_CHECK(objDict); dict->remove(key); } - -inline GBool Object::dictIs(const char *dictType) const - { OBJECT_TYPE_CHECK(objDict); return dict->is(dictType); } - -inline GBool Object::isDict(const char *dictType) const - { return type == objDict && dictIs(dictType); } - -inline Object Object::dictLookup(const char *key, int recursion) const - { OBJECT_TYPE_CHECK(objDict); return dict->lookup(key, recursion); } - -inline Object Object::dictLookupNF(const char *key) const - { OBJECT_TYPE_CHECK(objDict); return dict->lookupNF(key); } - -inline char *Object::dictGetKey(int i) const - { OBJECT_TYPE_CHECK(objDict); return dict->getKey(i); } - -inline Object Object::dictGetVal(int i) const - { OBJECT_TYPE_CHECK(objDict); return dict->getVal(i); } - -inline Object Object::dictGetValNF(int i) const - { OBJECT_TYPE_CHECK(objDict); return dict->getValNF(i); } - -//------------------------------------------------------------------------ -// Stream accessors. -//------------------------------------------------------------------------ - -#include "Stream.h" - -inline GBool Object::streamIs(char *dictType) const - { OBJECT_TYPE_CHECK(objStream); return stream->getDict()->is(dictType); } - -inline GBool Object::isStream(char *dictType) const - { return type == objStream && streamIs(dictType); } - -inline void Object::streamReset() - { OBJECT_TYPE_CHECK(objStream); stream->reset(); } - -inline void Object::streamClose() - { OBJECT_TYPE_CHECK(objStream); stream->close(); } - -inline int Object::streamGetChar() const - { OBJECT_TYPE_CHECK(objStream); return stream->getChar(); } - -inline int Object::streamGetChars(int nChars, Guchar *buffer) const - { OBJECT_TYPE_CHECK(objStream); return stream->doGetChars(nChars, buffer); } - -inline int Object::streamLookChar() const - { OBJECT_TYPE_CHECK(objStream); return stream->lookChar(); } - -inline char *Object::streamGetLine(char *buf, int size) const - { OBJECT_TYPE_CHECK(objStream); return stream->getLine(buf, size); } - -inline Goffset Object::streamGetPos() const - { OBJECT_TYPE_CHECK(objStream); return stream->getPos(); } - -inline void Object::streamSetPos(Goffset pos, int dir) - { OBJECT_TYPE_CHECK(objStream); stream->setPos(pos, dir); } - -inline Dict *Object::streamGetDict() const - { OBJECT_TYPE_CHECK(objStream); return stream->getDict(); } - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/OptionalContent.cc b/Build/source/libs/poppler/poppler-src/poppler/OptionalContent.cc deleted file mode 100644 index 8376a0e4e4f..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/OptionalContent.cc +++ /dev/null @@ -1,501 +0,0 @@ -//======================================================================== -// -// OptionalContent.cc -// -// Copyright 2007 Brad Hards <bradh@kde.org> -// Copyright 2008 Pino Toscano <pino@kde.org> -// Copyright 2008, 2010 Carlos Garcia Campos <carlosgc@gnome.org> -// Copyright 2008, 2010, 2011, 2017, 2018 Albert Astals Cid <aacid@kde.org> -// Copyright 2008 Mark Kaplan <mkaplan@finjan.com> -// -// Released under the GPL (version 2, or later, at your option) -// -//======================================================================== - -#include <config.h> - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include "goo/gmem.h" -#include "goo/GooString.h" -#include "goo/GooList.h" -#include "Error.h" -// #include "PDFDocEncoding.h" -#include "OptionalContent.h" - -// Max depth of nested visibility expressions. This is used to catch -// infinite loops in the visibility expression object structure. -#define visibilityExprRecursionLimit 50 - -// Max depth of nested display nodes. This is used to catch infinite -// loops in the "Order" object structure. -#define displayNodeRecursionLimit 50 - -//------------------------------------------------------------------------ - -OCGs::OCGs(Object *ocgObject, XRef *xref) : - m_xref(xref) -{ - // we need to parse the dictionary here, and build optionalContentGroups - ok = gTrue; - optionalContentGroups = new GooList(); - display = nullptr; - - Object ocgList = ocgObject->dictLookup("OCGs"); - if (!ocgList.isArray()) { - error(errSyntaxError, -1, "Expected the optional content group list, but wasn't able to find it, or it isn't an Array"); - ok = gFalse; - return; - } - - // we now enumerate over the ocgList, and build up the optionalContentGroups list. - for(int i = 0; i < ocgList.arrayGetLength(); ++i) { - Object ocg = ocgList.arrayGet(i); - if (!ocg.isDict()) { - break; - } - OptionalContentGroup *thisOptionalContentGroup = new OptionalContentGroup(ocg.getDict()); - ocg = ocgList.arrayGetNF(i); - if (!ocg.isRef()) { - delete thisOptionalContentGroup; - break; - } - // TODO: we should create a lookup map from Ref to the OptionalContentGroup - thisOptionalContentGroup->setRef( ocg.getRef() ); - // the default is ON - we change state later, depending on BaseState, ON and OFF - thisOptionalContentGroup->setState(OptionalContentGroup::On); - optionalContentGroups->append(thisOptionalContentGroup); - } - - Object defaultOcgConfig = ocgObject->dictLookup("D"); - if (!defaultOcgConfig.isDict()) { - error(errSyntaxError, -1, "Expected the default config, but wasn't able to find it, or it isn't a Dictionary"); - ok = gFalse; - return; - } - - Object baseState = defaultOcgConfig.dictLookup("BaseState"); - if (baseState.isName("OFF")) { - for (int i = 0; i < optionalContentGroups->getLength(); ++i) { - OptionalContentGroup *group; - - group = (OptionalContentGroup *)optionalContentGroups->get(i); - group->setState(OptionalContentGroup::Off); - } - } - - Object on = defaultOcgConfig.dictLookup("ON"); - if (on.isArray()) { - // ON is an optional element - for (int i = 0; i < on.arrayGetLength(); ++i) { - Object reference = on.arrayGetNF(i); - if (!reference.isRef()) { - // there can be null entries - break; - } - OptionalContentGroup *group = findOcgByRef( reference.getRef() ); - if (!group) { - error(errSyntaxWarning, -1, "Couldn't find group for reference"); - break; - } - group->setState(OptionalContentGroup::On); - } - } - - Object off = defaultOcgConfig.dictLookup("OFF"); - if (off.isArray()) { - // OFF is an optional element - for (int i = 0; i < off.arrayGetLength(); ++i) { - Object reference = off.arrayGetNF(i); - if (!reference.isRef()) { - // there can be null entries - break; - } - OptionalContentGroup *group = findOcgByRef( reference.getRef() ); - if (!group) { - error(errSyntaxWarning, -1, "Couldn't find group for reference to set OFF"); - break; - } - group->setState(OptionalContentGroup::Off); - } - } - - order = defaultOcgConfig.dictLookup("Order"); - rbgroups = defaultOcgConfig.dictLookup("RBGroups"); -} - -OCGs::~OCGs() -{ - deleteGooList(optionalContentGroups, OptionalContentGroup); - delete display; -} - - -bool OCGs::hasOCGs() const -{ - return ( optionalContentGroups->getLength() > 0 ); -} - -OptionalContentGroup* OCGs::findOcgByRef( const Ref &ref) -{ - //TODO: make this more efficient - OptionalContentGroup *ocg = nullptr; - for (int i=0; i < optionalContentGroups->getLength(); ++i) { - ocg = (OptionalContentGroup*)optionalContentGroups->get(i); - if ( (ocg->getRef().num == ref.num) && (ocg->getRef().gen == ref.gen) ) { - return ocg; - } - } - - // not found - return nullptr; -} - -OCDisplayNode *OCGs::getDisplayRoot() -{ - if (display) - return display; - - if (order.isArray()) - display = OCDisplayNode::parse(&order, this, m_xref); - - return display; -} - -bool OCGs::optContentIsVisible( Object *dictRef ) -{ - Dict *dict; - bool result = true; - - if (dictRef->isNull()) - return result; - - if (dictRef->isRef()) { - OptionalContentGroup *oc = findOcgByRef(dictRef->getRef()); - if (oc) - return oc->getState() == OptionalContentGroup::On; - } - - Object dictObj = dictRef->fetch( m_xref); - if ( ! dictObj.isDict() ) { - error(errSyntaxWarning, -1, "Unexpected oc reference target: {0:d}", dictObj.getType() ); - return result; - } - dict = dictObj.getDict(); - // printf("checking if optContent is visible\n"); - Object dictType = dict->lookup("Type"); - if (dictType.isName("OCMD")) { - Object ve = dict->lookup("VE"); - if (ve.isArray()) { - result = evalOCVisibilityExpr(&ve, 0); - } else { - Object ocg = dict->lookupNF("OCGs"); - if (ocg.isArray()) { - Object policy = dict->lookup("P"); - if (policy.isName("AllOn")) { - result = allOn( ocg.getArray() ); - } else if (policy.isName("AllOff")) { - result = allOff( ocg.getArray() ); - } else if (policy.isName("AnyOff")) { - result = anyOff( ocg.getArray() ); - } else if ( (!policy.isName()) || (policy.isName("AnyOn") ) ) { - // this is the default - result = anyOn( ocg.getArray() ); - } - } else if (ocg.isRef()) { - OptionalContentGroup *oc = findOcgByRef( ocg.getRef() ); - if ( oc && oc->getState() == OptionalContentGroup::Off ) { - result = false; - } else { - result = true ; - } - } - } - } else if ( dictType.isName("OCG") ) { - OptionalContentGroup* oc = findOcgByRef( dictRef->getRef() ); - if ( oc && oc->getState() == OptionalContentGroup::Off ) { - result=false; - } - } - // printf("visibility: %s\n", result? "on" : "off"); - return result; -} - -GBool OCGs::evalOCVisibilityExpr(Object *expr, int recursion) { - OptionalContentGroup *ocg; - GBool ret; - - if (recursion > visibilityExprRecursionLimit) { - error(errSyntaxError, -1, - "Loop detected in optional content visibility expression"); - return gTrue; - } - if (expr->isRef()) { - if ((ocg = findOcgByRef(expr->getRef()))) { - return ocg->getState() == OptionalContentGroup::On; - } - } - Object expr2 = expr->fetch(m_xref); - if (!expr2.isArray() || expr2.arrayGetLength() < 1) { - error(errSyntaxError, -1, - "Invalid optional content visibility expression"); - return gTrue; - } - Object op = expr2.arrayGet(0); - if (op.isName("Not")) { - if (expr2.arrayGetLength() == 2) { - Object obj = expr2.arrayGetNF(1); - ret = !evalOCVisibilityExpr(&obj, recursion + 1); - } else { - error(errSyntaxError, -1, - "Invalid optional content visibility expression"); - ret = gTrue; - } - } else if (op.isName("And")) { - ret = gTrue; - for (int i = 1; i < expr2.arrayGetLength() && ret; ++i) { - Object obj = expr2.arrayGetNF(i); - ret = evalOCVisibilityExpr(&obj, recursion + 1); - } - } else if (op.isName("Or")) { - ret = gFalse; - for (int i = 1; i < expr2.arrayGetLength() && !ret; ++i) { - Object obj = expr2.arrayGetNF(i); - ret = evalOCVisibilityExpr(&obj, recursion + 1); - } - } else { - error(errSyntaxError, -1, - "Invalid optional content visibility expression"); - ret = gTrue; - } - return ret; -} - -bool OCGs::allOn( Array *ocgArray ) -{ - for (int i = 0; i < ocgArray->getLength(); ++i) { - Object ocgItem = ocgArray->getNF(i); - if (ocgItem.isRef()) { - OptionalContentGroup* oc = findOcgByRef( ocgItem.getRef() ); - if ( oc && oc->getState() == OptionalContentGroup::Off ) { - return false; - } - } - } - return true; -} - -bool OCGs::allOff( Array *ocgArray ) -{ - for (int i = 0; i < ocgArray->getLength(); ++i) { - Object ocgItem = ocgArray->getNF(i); - if (ocgItem.isRef()) { - OptionalContentGroup* oc = findOcgByRef( ocgItem.getRef() ); - if ( oc && oc->getState() == OptionalContentGroup::On ) { - return false; - } - } - } - return true; -} - -bool OCGs::anyOn( Array *ocgArray ) -{ - for (int i = 0; i < ocgArray->getLength(); ++i) { - Object ocgItem = ocgArray->getNF(i); - if (ocgItem.isRef()) { - OptionalContentGroup* oc = findOcgByRef( ocgItem.getRef() ); - if ( oc && oc->getState() == OptionalContentGroup::On ) { - return true; - } - } - } - return false; -} - -bool OCGs::anyOff( Array *ocgArray ) -{ - for (int i = 0; i < ocgArray->getLength(); ++i) { - Object ocgItem = ocgArray->getNF(i); - if (ocgItem.isRef()) { - OptionalContentGroup* oc = findOcgByRef( ocgItem.getRef() ); - if ( oc && oc->getState() == OptionalContentGroup::Off ) { - return true; - } - } - } - return false; -} - -//------------------------------------------------------------------------ - -OptionalContentGroup::OptionalContentGroup(Dict *ocgDict) : m_name(nullptr) -{ - Object ocgName = ocgDict->lookup("Name"); - if (!ocgName.isString()) { - error(errSyntaxWarning, -1, "Expected the name of the OCG, but wasn't able to find it, or it isn't a String"); - } else { - m_name = new GooString( ocgName.getString() ); - } - - viewState = printState = ocUsageUnset; - Object obj1 = ocgDict->lookup("Usage"); - if (obj1.isDict()) { - Object obj2 = obj1.dictLookup("View"); - if (obj2.isDict()) { - Object obj3 = obj2.dictLookup("ViewState"); - if (obj3.isName()) { - if (obj3.isName("ON")) { - viewState = ocUsageOn; - } else { - viewState = ocUsageOff; - } - } - } - obj2 = obj1.dictLookup("Print"); - if (obj2.isDict()) { - Object obj3 = obj2.dictLookup("PrintState"); - if (obj3.isName()) { - if (obj3.isName("ON")) { - printState = ocUsageOn; - } else { - printState = ocUsageOff; - } - } - } - } -} - -OptionalContentGroup::OptionalContentGroup(GooString *label) -{ - m_name = label; - m_state = On; -} - -const GooString* OptionalContentGroup::getName() const -{ - return m_name; -} - -void OptionalContentGroup::setRef(const Ref ref) -{ - m_ref = ref; -} - -Ref OptionalContentGroup::getRef() const -{ - return m_ref; -} - -OptionalContentGroup::~OptionalContentGroup() -{ - delete m_name; -} - -//------------------------------------------------------------------------ - -OCDisplayNode *OCDisplayNode::parse(Object *obj, OCGs *oc, - XRef *xref, int recursion) { - OptionalContentGroup *ocgA; - OCDisplayNode *node, *child; - int i; - - if (recursion > displayNodeRecursionLimit) { - error(errSyntaxError, -1, "Loop detected in optional content order"); - return nullptr; - } - if (obj->isRef()) { - if ((ocgA = oc->findOcgByRef(obj->getRef()))) { - return new OCDisplayNode(ocgA); - } - } - Object obj2 = obj->fetch(xref); - if (!obj2.isArray()) { - return nullptr; - } - i = 0; - if (obj2.arrayGetLength() >= 1) { - Object obj3 = obj2.arrayGet(0); - if (obj3.isString()) { - node = new OCDisplayNode(obj3.getString()); - i = 1; - } else { - node = new OCDisplayNode(); - } - } else { - node = new OCDisplayNode(); - } - for (; i < obj2.arrayGetLength(); ++i) { - Object obj3 = obj2.arrayGetNF(i); - if ((child = OCDisplayNode::parse(&obj3, oc, xref, recursion + 1))) { - if (!child->ocg && !child->name && node->getNumChildren() > 0) { - node->getChild(node->getNumChildren() - 1)->addChildren(child->takeChildren()); - delete child; - } else { - node->addChild(child); - } - } - } - return node; -} - -OCDisplayNode::OCDisplayNode() { - name = nullptr; - ocg = nullptr; - children = nullptr; -} - -OCDisplayNode::OCDisplayNode(const GooString *nameA) { - name = new GooString(nameA); - ocg = nullptr; - children = nullptr; -} - -OCDisplayNode::OCDisplayNode(OptionalContentGroup *ocgA) { - name = (ocgA->getName()) ? ocgA->getName()->copy() : nullptr; - ocg = ocgA; - children = nullptr; -} - -void OCDisplayNode::addChild(OCDisplayNode *child) { - if (!children) { - children = new GooList(); - } - children->append(child); -} - -void OCDisplayNode::addChildren(GooList *childrenA) { - if (!children) { - children = new GooList(); - } - children->append(childrenA); - delete childrenA; -} - -GooList *OCDisplayNode::takeChildren() { - GooList *childrenA; - - childrenA = children; - children = nullptr; - return childrenA; -} - -OCDisplayNode::~OCDisplayNode() { - gfree(name); - if (children) { - deleteGooList(children, OCDisplayNode); - } -} - -int OCDisplayNode::getNumChildren() const { - if (!children) { - return 0; - } - return children->getLength(); -} - -OCDisplayNode *OCDisplayNode::getChild(int idx) const { - return (OCDisplayNode *)children->get(idx); -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/OptionalContent.h b/Build/source/libs/poppler/poppler-src/poppler/OptionalContent.h deleted file mode 100644 index ea5618e4374..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/OptionalContent.h +++ /dev/null @@ -1,149 +0,0 @@ -//======================================================================== -// -// OptionalContent.h -// -// Copyright 2007 Brad Hards <bradh@kde.org> -// Copyright 2008 Carlos Garcia Campos <carlosgc@gnome.org> -// Copyright 2013, 2018 Albert Astals Cid <aacid@kde.org> -// -// Released under the GPL (version 2, or later, at your option) -// -//======================================================================== - -#ifndef OPTIONALCONTENT_H -#define OPTIONALCONTENT_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "Object.h" -#include "CharTypes.h" - -class GooString; -class GooList; -class XRef; - -class OptionalContentGroup; -class OCDisplayNode; - -//------------------------------------------------------------------------ - -class OCGs { -public: - - OCGs(Object *ocgObject, XRef *xref); - ~OCGs(); - - OCGs(const OCGs &) = delete; - OCGs& operator=(const OCGs &) = delete; - - // Is OCGS valid? - GBool isOk() const { return ok; } - - bool hasOCGs() const; - GooList *getOCGs() const { return optionalContentGroups; } - - OptionalContentGroup* findOcgByRef( const Ref &ref); - - // Get the root node of the optional content group display tree - // (which does not necessarily include all of the OCGs). - OCDisplayNode *getDisplayRoot(); - - Array* getOrderArray() - { return (order.isArray() && order.arrayGetLength() > 0) ? order.getArray() : NULL; } - Array* getRBGroupsArray() - { return (rbgroups.isArray() && rbgroups.arrayGetLength()) ? rbgroups.getArray() : NULL; } - - bool optContentIsVisible( Object *dictRef ); - -private: - GBool ok; - - GBool evalOCVisibilityExpr(Object *expr, int recursion); - bool allOn( Array *ocgArray ); - bool allOff( Array *ocgArray ); - bool anyOn( Array *ocgArray ); - bool anyOff( Array *ocgArray ); - - GooList *optionalContentGroups; - - Object order; - Object rbgroups; - XRef *m_xref; - OCDisplayNode *display; // root node of display tree -}; - -//------------------------------------------------------------------------ - -class OptionalContentGroup { -public: - enum State { On, Off }; - - // Values from the optional content usage dictionary. - enum UsageState { - ocUsageOn, - ocUsageOff, - ocUsageUnset - }; - - OptionalContentGroup(Dict *dict); - - OptionalContentGroup(GooString *label); - - ~OptionalContentGroup(); - - OptionalContentGroup(const OptionalContentGroup &) = delete; - OptionalContentGroup& operator=(const OptionalContentGroup &) = delete; - - const GooString* getName() const; - - Ref getRef() const; - void setRef(const Ref ref); - - State getState() { return m_state; }; - void setState(State state) { m_state = state; }; - - UsageState getViewState() { return viewState; } - UsageState getPrintState() { return printState; } - -private: - GooString *m_name; - Ref m_ref; - State m_state; - UsageState viewState; // suggested state when viewing - UsageState printState; // suggested state when printing -}; - -//------------------------------------------------------------------------ - -class OCDisplayNode { -public: - - static OCDisplayNode *parse(Object *obj, OCGs *oc, XRef *xref, int recursion = 0); - OCDisplayNode(); - ~OCDisplayNode(); - - OCDisplayNode(const OCDisplayNode &) = delete; - OCDisplayNode& operator=(const OCDisplayNode &) = delete; - - const GooString *getName() const { return name; } - const OptionalContentGroup *getOCG() const { return ocg; } - int getNumChildren() const; - OCDisplayNode *getChild(int idx) const; - -private: - - OCDisplayNode(const GooString *nameA); - OCDisplayNode(OptionalContentGroup *ocgA); - void addChild(OCDisplayNode *child); - void addChildren(GooList *childrenA); - GooList *takeChildren(); - - GooString *name; // display name (may be NULL) - OptionalContentGroup *ocg; // NULL for display labels - GooList *children; // NULL if there are no children - // [OCDisplayNode] -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/Outline.cc b/Build/source/libs/poppler/poppler-src/poppler/Outline.cc deleted file mode 100644 index c6b12dc0366..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/Outline.cc +++ /dev/null @@ -1,162 +0,0 @@ -//======================================================================== -// -// Outline.cc -// -// Copyright 2002-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2005 Marco Pesenti Gritti <mpg@redhat.com> -// Copyright (C) 2008, 2016-2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2009 Nick Jones <nick.jones@network-box.com> -// Copyright (C) 2016 Jason Crain <jason@aquaticape.us> -// Copyright (C) 2017 Adrian Johnson <ajohnson@redneon.com> -// 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 -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include <config.h> - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include "goo/gmem.h" -#include "goo/GooString.h" -#include "goo/GooList.h" -#include "XRef.h" -#include "Link.h" -#include "PDFDocEncoding.h" -#include "Outline.h" -#include "UTF.h" - -//------------------------------------------------------------------------ - -Outline::Outline(const Object *outlineObj, XRef *xref) { - items = nullptr; - if (!outlineObj->isDict()) { - return; - } - Object first = outlineObj->dictLookupNF("First"); - items = OutlineItem::readItemList(nullptr, &first, xref); -} - -Outline::~Outline() { - if (items) { - deleteGooList(items, OutlineItem); - } -} - -//------------------------------------------------------------------------ - -OutlineItem::OutlineItem(const Dict *dict, int refNumA, OutlineItem *parentA, XRef *xrefA) { - Object obj1; - - refNum = refNumA; - parent = parentA; - xref = xrefA; - title = nullptr; - action = nullptr; - kids = nullptr; - - - obj1 = dict->lookup("Title"); - if (obj1.isString()) { - const GooString *s = obj1.getString(); - titleLen = TextStringToUCS4(s, &title); - } else { - titleLen = 0; - } - - obj1 = dict->lookup("Dest"); - if (!obj1.isNull()) { - action = LinkAction::parseDest(&obj1); - } else { - obj1 = dict->lookup("A"); - if (!obj1.isNull()) { - action = LinkAction::parseAction(&obj1); - } - } - - firstRef = dict->lookupNF("First"); - lastRef = dict->lookupNF("Last"); - nextRef = dict->lookupNF("Next"); - - startsOpen = gFalse; - obj1 = dict->lookup("Count"); - if (obj1.isInt()) { - if (obj1.getInt() > 0) { - startsOpen = gTrue; - } - } -} - -OutlineItem::~OutlineItem() { - close(); - if (title) { - gfree(title); - } - if (action) { - delete action; - } -} - -GooList *OutlineItem::readItemList(OutlineItem *parent, const Object *firstItemRef, XRef *xrefA) { - GooList *items = new GooList(); - - char* alreadyRead = (char *)gmalloc(xrefA->getNumObjects()); - memset(alreadyRead, 0, xrefA->getNumObjects()); - - OutlineItem *parentO = parent; - while (parentO) { - alreadyRead[parentO->refNum] = 1; - parentO = parentO->parent; - } - - const Object *p = firstItemRef; - while (p->isRef() && - (p->getRefNum() >= 0) && - (p->getRefNum() < xrefA->getNumObjects()) && - !alreadyRead[p->getRefNum()]) { - Object obj = p->fetch(xrefA); - if (!obj.isDict()) { - break; - } - alreadyRead[p->getRefNum()] = 1; - OutlineItem *item = new OutlineItem(obj.getDict(), p->getRefNum(), parent, xrefA); - items->append(item); - p = &item->nextRef; - } - - gfree(alreadyRead); - - if (!items->getLength()) { - delete items; - items = nullptr; - } - - return items; -} - -void OutlineItem::open() { - if (!kids) { - kids = readItemList(this, &firstRef, xref); - } -} - -void OutlineItem::close() { - if (kids) { - deleteGooList(kids, OutlineItem); - kids = nullptr; - } -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/Outline.h b/Build/source/libs/poppler/poppler-src/poppler/Outline.h deleted file mode 100644 index a6e9e79ab62..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/Outline.h +++ /dev/null @@ -1,97 +0,0 @@ -//======================================================================== -// -// Outline.h -// -// Copyright 2002-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2005 Marco Pesenti Gritti <mpg@redhat.com> -// Copyright (C) 2016, 2018 Albert Astals Cid <aacid@kde.org> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef OUTLINE_H -#define OUTLINE_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "Object.h" -#include "CharTypes.h" - -class GooString; -class GooList; -class XRef; -class LinkAction; - -//------------------------------------------------------------------------ - -class Outline { -public: - - Outline(const Object *outlineObj, XRef *xref); - ~Outline(); - - Outline(const Outline &) = delete; - Outline& operator=(const Outline &) = delete; - - const GooList *getItems() const { return items; } - -private: - - GooList *items; // NULL if document has no outline, - // otherwise, a list of OutlineItem -}; - -//------------------------------------------------------------------------ - -class OutlineItem { -public: - - OutlineItem(const Dict *dict, int refNumA, OutlineItem *parentA, XRef *xrefA); - ~OutlineItem(); - - OutlineItem(const OutlineItem &) = delete; - OutlineItem& operator=(const OutlineItem &) = delete; - - static GooList *readItemList(OutlineItem *parent, const Object *firstItemRef, XRef *xrefA); - - void open(); - void close(); - - const Unicode *getTitle() const { return title; } - int getTitleLength() const { return titleLen; } - const LinkAction *getAction() const { return action; } - GBool isOpen() const { return startsOpen; } - GBool hasKids() const { return firstRef.isRef(); } - const GooList *getKids() const { return kids; } - -private: - - int refNum; - OutlineItem *parent; - XRef *xref; - Unicode *title; - int titleLen; - LinkAction *action; - Object firstRef; - Object lastRef; - Object nextRef; - GBool startsOpen; - GooList *kids; // NULL if this item is closed or has no kids, - // otherwise a list of OutlineItem -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/OutputDev.cc b/Build/source/libs/poppler/poppler-src/poppler/OutputDev.cc deleted file mode 100644 index 1a59d9e8511..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/OutputDev.cc +++ /dev/null @@ -1,194 +0,0 @@ -//======================================================================== -// -// OutputDev.cc -// -// Copyright 1996-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2005 Jonathan Blandford <jrb@redhat.com> -// Copyright (C) 2006 Thorkild Stray <thorkild@ifi.uio.no> -// Copyright (C) 2007, 2017 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2009 Carlos Garcia Campos <carlosgc@gnome.org> -// Copyright (C) 2009, 2012, 2013 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2012 Thomas Freitag <Thomas.Freitag@alfa.de> -// Copyright (C) 2018 Adam Reichold <adam.reichold@t-online.de> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include <config.h> - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include <stddef.h> -#include "Object.h" -#include "Stream.h" -#include "GfxState.h" -#include "OutputDev.h" - -//------------------------------------------------------------------------ -// OutputDev -//------------------------------------------------------------------------ - -void OutputDev::setDefaultCTM(double *ctm) { - int i; - double det; - - for (i = 0; i < 6; ++i) { - defCTM[i] = ctm[i]; - } - det = 1 / (defCTM[0] * defCTM[3] - defCTM[1] * defCTM[2]); - defICTM[0] = defCTM[3] * det; - defICTM[1] = -defCTM[1] * det; - defICTM[2] = -defCTM[2] * det; - defICTM[3] = defCTM[0] * det; - defICTM[4] = (defCTM[2] * defCTM[5] - defCTM[3] * defCTM[4]) * det; - defICTM[5] = (defCTM[1] * defCTM[4] - defCTM[0] * defCTM[5]) * det; -} - -void OutputDev::cvtDevToUser(double dx, double dy, double *ux, double *uy) { - *ux = defICTM[0] * dx + defICTM[2] * dy + defICTM[4]; - *uy = defICTM[1] * dx + defICTM[3] * dy + defICTM[5]; -} - -void OutputDev::cvtUserToDev(double ux, double uy, int *dx, int *dy) { - *dx = (int)(defCTM[0] * ux + defCTM[2] * uy + defCTM[4] + 0.5); - *dy = (int)(defCTM[1] * ux + defCTM[3] * uy + defCTM[5] + 0.5); -} - -void OutputDev::updateAll(GfxState *state) { - updateLineDash(state); - updateFlatness(state); - updateLineJoin(state); - updateLineCap(state); - updateMiterLimit(state); - updateLineWidth(state); - updateStrokeAdjust(state); - updateFillColorSpace(state); - updateFillColor(state); - updateStrokeColorSpace(state); - updateStrokeColor(state); - updateBlendMode(state); - updateFillOpacity(state); - updateStrokeOpacity(state); - updateFillOverprint(state); - updateStrokeOverprint(state); - updateTransfer(state); - updateFont(state); -} - -GBool OutputDev::beginType3Char(GfxState *state, double x, double y, - double dx, double dy, - CharCode code, Unicode *u, int uLen) { - return gFalse; -} - -void OutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str, - int width, int height, GBool invert, - GBool interpolate, GBool inlineImg) { - int i, j; - - if (inlineImg) { - str->reset(); - j = height * ((width + 7) / 8); - for (i = 0; i < j; ++i) - str->getChar(); - str->close(); - } -} - -void OutputDev::setSoftMaskFromImageMask(GfxState *state, - Object *ref, Stream *str, - int width, int height, GBool invert, - GBool inlineImg, double *baseMatrix) { - drawImageMask(state, ref, str, width, height, invert, gFalse, inlineImg); -} - -void OutputDev::unsetSoftMaskFromImageMask(GfxState *state, double *baseMatrix) { - return; -} - -void OutputDev::drawImage(GfxState *state, Object *ref, Stream *str, - int width, int height, GfxImageColorMap *colorMap, - GBool interpolate, int *maskColors, GBool inlineImg) { - int i, j; - - if (inlineImg) { - str->reset(); - j = height * ((width * colorMap->getNumPixelComps() * - colorMap->getBits() + 7) / 8); - for (i = 0; i < j; ++i) - str->getChar(); - str->close(); - } -} - -void OutputDev::drawMaskedImage(GfxState *state, Object *ref, Stream *str, - int width, int height, - GfxImageColorMap *colorMap, - GBool interpolate, - Stream *maskStr, - int maskWidth, int maskHeight, - GBool maskInvert, - GBool maskInterpolate) { - drawImage(state, ref, str, width, height, colorMap, interpolate, nullptr, gFalse); -} - -void OutputDev::drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str, - int width, int height, - GfxImageColorMap *colorMap, - GBool interpolate, - Stream *maskStr, - int maskWidth, int maskHeight, - GfxImageColorMap *maskColorMap, - GBool maskInterpolate) { - drawImage(state, ref, str, width, height, colorMap, interpolate, nullptr, gFalse); -} - -void OutputDev::endMarkedContent(GfxState *state) { -} - -void OutputDev::beginMarkedContent(const char *name, Dict *properties) { -} - -void OutputDev::markPoint(const char *name) { -} - -void OutputDev::markPoint(const char *name, Dict *properties) { -} - - -#ifdef OPI_SUPPORT -void OutputDev::opiBegin(GfxState *state, Dict *opiDict) { -} - -void OutputDev::opiEnd(GfxState *state, Dict *opiDict) { -} -#endif - -void OutputDev::startProfile() { - profileHash.reset(new std::unordered_map<std::string, ProfileData>); -} - -std::unique_ptr<std::unordered_map<std::string, ProfileData>> OutputDev::endProfile() { - return std::move(profileHash); -} - -#ifdef USE_CMS -PopplerCache *OutputDev::getIccColorSpaceCache() -{ - return &iccColorSpaceCache; -} -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/OutputDev.h b/Build/source/libs/poppler/poppler-src/poppler/OutputDev.h deleted file mode 100644 index 52635743838..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/OutputDev.h +++ /dev/null @@ -1,378 +0,0 @@ -//======================================================================== -// -// OutputDev.h -// -// Copyright 1996-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2005 Jonathan Blandford <jrb@redhat.com> -// Copyright (C) 2006 Thorkild Stray <thorkild@ifi.uio.no> -// Copyright (C) 2007 Jeff Muizelaar <jeff@infidigm.net> -// Copyright (C) 2007, 2011, 2017 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2009-2013, 2015 Thomas Freitag <Thomas.Freitag@alfa.de> -// Copyright (C) 2009, 2011 Carlos Garcia Campos <carlosgc@gnome.org> -// Copyright (C) 2009, 2012, 2013 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2010 Christian Feuersänger <cfeuersaenger@googlemail.com> -// Copyright (C) 2012 Fabio D'Urso <fabiodurso@hotmail.it> -// Copyright (C) 2012 William Bader <williambader@hotmail.com> -// Copyright (C) 2017, 2018 Oliver Sander <oliver.sander@tu-dresden.de> -// 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 -// Copyright (C) 2018 Adam Reichold <adam.reichold@t-online.de> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef OUTPUTDEV_H -#define OUTPUTDEV_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "poppler-config.h" -#include "goo/gtypes.h" -#include "CharTypes.h" -#include "Object.h" -#include "PopplerCache.h" -#include "ProfileData.h" -#include <memory> -#include <unordered_map> -#include <string> - -class Annot; -class Dict; -class GooString; -class GfxState; -class Gfx; -struct GfxColor; -class GfxColorSpace; -class GfxImageColorMap; -class GfxFunctionShading; -class GfxAxialShading; -class GfxGouraudTriangleShading; -class GfxPatchMeshShading; -class GfxRadialShading; -class GfxGouraudTriangleShading; -class GfxPatchMeshShading; -class Stream; -class Links; -class AnnotLink; -class Catalog; -class Page; -class Function; - -//------------------------------------------------------------------------ -// OutputDev -//------------------------------------------------------------------------ - -class OutputDev { -public: - - // Constructor. - OutputDev() -#ifdef USE_CMS - : iccColorSpaceCache(5) -#endif - { - } - - // Destructor. - virtual ~OutputDev() {} - - //----- get info about output device - - // Does this device use upside-down coordinates? - // (Upside-down means (0,0) is the top left corner of the page.) - virtual GBool upsideDown() = 0; - - // Does this device use drawChar() or drawString()? - virtual GBool useDrawChar() = 0; - - // Does this device use tilingPatternFill()? If this returns false, - // tiling pattern fills will be reduced to a series of other drawing - // operations. - virtual GBool useTilingPatternFill() { return gFalse; } - - // Does this device support specific shading types? - // see gouraudTriangleShadedFill() and patchMeshShadedFill() - virtual GBool useShadedFills(int type) { return gFalse; } - - // Does this device use FillColorStop()? - virtual GBool useFillColorStop() { return gFalse; } - - // Does this device use drawForm()? If this returns false, - // form-type XObjects will be interpreted (i.e., unrolled). - virtual GBool useDrawForm() { return gFalse; } - - // Does this device use beginType3Char/endType3Char? Otherwise, - // text in Type 3 fonts will be drawn with drawChar/drawString. - virtual GBool interpretType3Chars() = 0; - - // Does this device need non-text content? - virtual GBool needNonText() { return gTrue; } - - // Does this device require incCharCount to be called for text on - // non-shown layers? - virtual GBool needCharCount() { return gFalse; } - - // Does this device need to clip pages to the crop box even when the - // box is the crop box? - virtual GBool needClipToCropBox() { return gFalse; } - - //----- initialization and control - - // Set default transform matrix. - virtual void setDefaultCTM(double *ctm); - - // Check to see if a page slice should be displayed. If this - // returns false, the page display is aborted. Typically, an - // OutputDev will use some alternate means to display the page - // before returning false. - virtual GBool checkPageSlice(Page *page, double hDPI, double vDPI, - int rotate, GBool useMediaBox, GBool crop, - int sliceX, int sliceY, int sliceW, int sliceH, - GBool printing, - GBool (* abortCheckCbk)(void *data) = NULL, - void * abortCheckCbkData = NULL, - GBool (*annotDisplayDecideCbk)(Annot *annot, void *user_data) = NULL, - void *annotDisplayDecideCbkData = NULL) - { return gTrue; } - - // Start a page. - virtual void startPage(int pageNum, GfxState *state, XRef *xref) {} - - // End a page. - virtual void endPage() {} - - // Dump page contents to display. - virtual void dump() {} - - //----- coordinate conversion - - // Convert between device and user coordinates. - virtual void cvtDevToUser(double dx, double dy, double *ux, double *uy); - virtual void cvtUserToDev(double ux, double uy, int *dx, int *dy); - - double *getDefCTM() { return defCTM; } - double *getDefICTM() { return defICTM; } - - //----- save/restore graphics state - virtual void saveState(GfxState * /*state*/) {} - virtual void restoreState(GfxState * /*state*/) {} - - //----- update graphics state - virtual void updateAll(GfxState *state); - - // Update the Current Transformation Matrix (CTM), i.e., the new matrix - // given in m11, ..., m32 is combined with the current value of the CTM. - // At the same time, when this method is called, state->getCTM() already - // contains the correct new CTM, so one may as well replace the - // CTM of the renderer with that. - virtual void updateCTM(GfxState * /*state*/, double /*m11*/, double /*m12*/, - double /*m21*/, double /*m22*/, double /*m31*/, double /*m32*/) {} - virtual void updateLineDash(GfxState * /*state*/) {} - virtual void updateFlatness(GfxState * /*state*/) {} - virtual void updateLineJoin(GfxState * /*state*/) {} - virtual void updateLineCap(GfxState * /*state*/) {} - virtual void updateMiterLimit(GfxState * /*state*/) {} - virtual void updateLineWidth(GfxState * /*state*/) {} - virtual void updateStrokeAdjust(GfxState * /*state*/) {} - virtual void updateAlphaIsShape(GfxState * /*state*/) {} - virtual void updateTextKnockout(GfxState * /*state*/) {} - virtual void updateFillColorSpace(GfxState * /*state*/) {} - virtual void updateStrokeColorSpace(GfxState * /*state*/) {} - virtual void updateFillColor(GfxState * /*state*/) {} - virtual void updateStrokeColor(GfxState * /*state*/) {} - virtual void updateBlendMode(GfxState * /*state*/) {} - virtual void updateFillOpacity(GfxState * /*state*/) {} - virtual void updateStrokeOpacity(GfxState * /*state*/) {} - virtual void updatePatternOpacity(GfxState * /*state*/) {} - virtual void clearPatternOpacity(GfxState * /*state*/) {} - virtual void updateFillOverprint(GfxState * /*state*/) {} - virtual void updateStrokeOverprint(GfxState * /*state*/) {} - virtual void updateOverprintMode(GfxState * /*state*/) {} - virtual void updateTransfer(GfxState * /*state*/) {} - virtual void updateFillColorStop(GfxState * /*state*/, double /*offset*/) {} - - //----- update text state - virtual void updateFont(GfxState * /*state*/) {} - virtual void updateTextMat(GfxState * /*state*/) {} - virtual void updateCharSpace(GfxState * /*state*/) {} - virtual void updateRender(GfxState * /*state*/) {} - virtual void updateRise(GfxState * /*state*/) {} - virtual void updateWordSpace(GfxState * /*state*/) {} - virtual void updateHorizScaling(GfxState * /*state*/) {} - virtual void updateTextPos(GfxState * /*state*/) {} - virtual void updateTextShift(GfxState * /*state*/, double /*shift*/) {} - virtual void saveTextPos(GfxState * /*state*/) {} - virtual void restoreTextPos(GfxState * /*state*/) {} - - //----- path painting - virtual void stroke(GfxState * /*state*/) {} - virtual void fill(GfxState * /*state*/) {} - virtual void eoFill(GfxState * /*state*/) {} - virtual GBool tilingPatternFill(GfxState * /*state*/, Gfx * /*gfx*/, Catalog * /*cat*/, Object * /*str*/, - double * /*pmat*/, int /*paintType*/, int /*tilingType*/, Dict * /*resDict*/, - double * /*mat*/, double * /*bbox*/, - int /*x0*/, int /*y0*/, int /*x1*/, int /*y1*/, - double /*xStep*/, double /*yStep*/) - { return gFalse; } - virtual GBool functionShadedFill(GfxState * /*state*/, - GfxFunctionShading * /*shading*/) - { return gFalse; } - virtual GBool axialShadedFill(GfxState * /*state*/, GfxAxialShading * /*shading*/, double /*tMin*/, double /*tMax*/) - { return gFalse; } - virtual GBool axialShadedSupportExtend(GfxState * /*state*/, GfxAxialShading * /*shading*/) - { return gFalse; } - virtual GBool radialShadedFill(GfxState * /*state*/, GfxRadialShading * /*shading*/, double /*sMin*/, double /*sMax*/) - { return gFalse; } - virtual GBool radialShadedSupportExtend(GfxState * /*state*/, GfxRadialShading * /*shading*/) - { return gFalse; } - virtual GBool gouraudTriangleShadedFill(GfxState *state, GfxGouraudTriangleShading *shading) - { return gFalse; } - virtual GBool patchMeshShadedFill(GfxState *state, GfxPatchMeshShading *shading) - { return gFalse; } - - //----- path clipping - virtual void clip(GfxState * /*state*/) {} - virtual void eoClip(GfxState * /*state*/) {} - virtual void clipToStrokePath(GfxState * /*state*/) {} - - //----- text drawing - virtual void beginStringOp(GfxState * /*state*/) {} - virtual void endStringOp(GfxState * /*state*/) {} - virtual void beginString(GfxState * /*state*/, const GooString * /*s*/) {} - virtual void endString(GfxState * /*state*/) {} - - // Draw one glyph at a specified position - // - // Arguments are: - // CharCode code: This is the character code in the content stream. It needs to be mapped back to a glyph index. - // int nBytes: The text strings in the content stream can consists of either 8-bit or 16-bit - // character codes depending on the font. nBytes is the number of bytes in the character code. - // Unicode *u: The UCS-4 mapping used for text extraction (TextOutputDev). - // int uLen: The number of unicode entries in u. Usually '1', for a single character, - // but it may also have larger values, for example for ligatures. - virtual void drawChar(GfxState * /*state*/, double /*x*/, double /*y*/, - double /*dx*/, double /*dy*/, - double /*originX*/, double /*originY*/, - CharCode /*code*/, int /*nBytes*/, Unicode * /*u*/, int /*uLen*/) {} - virtual void drawString(GfxState * /*state*/, const GooString * /*s*/) {} - virtual GBool beginType3Char(GfxState * /*state*/, double /*x*/, double /*y*/, - double /*dx*/, double /*dy*/, - CharCode /*code*/, Unicode * /*u*/, int /*uLen*/); - virtual void endType3Char(GfxState * /*state*/) {} - virtual void beginTextObject(GfxState * /*state*/) {} - virtual void endTextObject(GfxState * /*state*/) {} - virtual void incCharCount(int /*nChars*/) {} - virtual void beginActualText(GfxState * /*state*/, const GooString * /*text*/ ) {} - virtual void endActualText(GfxState * /*state*/) {} - - //----- image drawing - // Draw an image mask. An image mask is a one-bit-per-pixel image, where each pixel - // can only be 'fill color' or 'transparent'. - // - // If 'invert' is false, a sample value of 0 marks the page with the current color, - // and a 1 leaves the previous contents unchanged. If 'invert' is true, these meanings are reversed. - virtual void drawImageMask(GfxState *state, Object *ref, Stream *str, - int width, int height, GBool invert, GBool interpolate, - GBool inlineImg); - virtual void setSoftMaskFromImageMask(GfxState *state, - Object *ref, Stream *str, - int width, int height, GBool invert, - GBool inlineImg, double *baseMatrix); - virtual void unsetSoftMaskFromImageMask(GfxState *state, double *baseMatrix); - virtual void drawImage(GfxState *state, Object *ref, Stream *str, - int width, int height, GfxImageColorMap *colorMap, - GBool interpolate, int *maskColors, GBool inlineImg); - virtual void drawMaskedImage(GfxState *state, Object *ref, Stream *str, - int width, int height, - GfxImageColorMap *colorMap, GBool interpolate, - Stream *maskStr, int maskWidth, int maskHeight, - GBool maskInvert, GBool maskInterpolate); - virtual void drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str, - int width, int height, - GfxImageColorMap *colorMap, - GBool interpolate, - Stream *maskStr, - int maskWidth, int maskHeight, - GfxImageColorMap *maskColorMap, - GBool maskInterpolate); - - //----- grouping operators - - virtual void endMarkedContent(GfxState *state); - virtual void beginMarkedContent(const char *name, Dict *properties); - virtual void markPoint(const char *name); - virtual void markPoint(const char *name, Dict *properties); - - - -#ifdef OPI_SUPPORT - //----- OPI functions - virtual void opiBegin(GfxState *state, Dict *opiDict); - virtual void opiEnd(GfxState *state, Dict *opiDict); -#endif - - //----- Type 3 font operators - virtual void type3D0(GfxState * /*state*/, double /*wx*/, double /*wy*/) {} - virtual void type3D1(GfxState * /*state*/, double /*wx*/, double /*wy*/, - double /*llx*/, double /*lly*/, double /*urx*/, double /*ury*/) {} - - //----- form XObjects - virtual void drawForm(Ref /*id*/) {} - - //----- PostScript XObjects - virtual void psXObject(Stream * /*psStream*/, Stream * /*level1Stream*/) {} - - //----- Profiling - void startProfile(); - std::unordered_map<std::string, ProfileData>* getProfileHash() const { return profileHash.get(); } - std::unique_ptr<std::unordered_map<std::string, ProfileData>> endProfile(); - - //----- transparency groups and soft masks - virtual GBool checkTransparencyGroup(GfxState * /*state*/, GBool /*knockout*/) { return gTrue; } - virtual void beginTransparencyGroup(GfxState * /*state*/, double * /*bbox*/, - GfxColorSpace * /*blendingColorSpace*/, - GBool /*isolated*/, GBool /*knockout*/, - GBool /*forSoftMask*/) {} - virtual void endTransparencyGroup(GfxState * /*state*/) {} - virtual void paintTransparencyGroup(GfxState * /*state*/, double * /*bbox*/) {} - virtual void setSoftMask(GfxState * /*state*/, double * /*bbox*/, GBool /*alpha*/, - Function * /*transferFunc*/, GfxColor * /*backdropColor*/) {} - virtual void clearSoftMask(GfxState * /*state*/) {} - - //----- links - virtual void processLink(AnnotLink * /*link*/) {} - -#if 1 //~tmp: turn off anti-aliasing temporarily - virtual GBool getVectorAntialias() { return gFalse; } - virtual void setVectorAntialias(GBool /*vaa*/) {} -#endif - -#ifdef USE_CMS - PopplerCache *getIccColorSpaceCache(); -#endif - -private: - - double defCTM[6]; // default coordinate transform matrix - double defICTM[6]; // inverse of default CTM - std::unique_ptr<std::unordered_map<std::string, ProfileData>> profileHash; - -#ifdef USE_CMS - PopplerCache iccColorSpaceCache; -#endif -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/PDFDoc.cc b/Build/source/libs/poppler/poppler-src/poppler/PDFDoc.cc deleted file mode 100644 index 631f9a70782..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/PDFDoc.cc +++ /dev/null @@ -1,2017 +0,0 @@ -//======================================================================== -// -// PDFDoc.cc -// -// Copyright 1996-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2005, 2006, 2008 Brad Hards <bradh@frogmouth.net> -// Copyright (C) 2005, 2007-2009, 2011-2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2008 Julien Rebetez <julienr@svn.gnome.org> -// Copyright (C) 2008, 2010 Pino Toscano <pino@kde.org> -// Copyright (C) 2008, 2010, 2011 Carlos Garcia Campos <carlosgc@gnome.org> -// Copyright (C) 2009 Eric Toombs <ewtoombs@uwaterloo.ca> -// Copyright (C) 2009 Kovid Goyal <kovid@kovidgoyal.net> -// Copyright (C) 2009, 2011 Axel Struebing <axel.struebing@freenet.de> -// Copyright (C) 2010-2012, 2014 Hib Eris <hib@hiberis.nl> -// Copyright (C) 2010 Jakub Wilk <jwilk@jwilk.net> -// Copyright (C) 2010 Ilya Gorenbein <igorenbein@finjan.com> -// Copyright (C) 2010 Srinivas Adicherla <srinivas.adicherla@geodesic.com> -// Copyright (C) 2010 Philip Lorenz <lorenzph+freedesktop@gmail.com> -// Copyright (C) 2011-2016 Thomas Freitag <Thomas.Freitag@alfa.de> -// Copyright (C) 2012, 2013 Fabio D'Urso <fabiodurso@hotmail.it> -// Copyright (C) 2013, 2014, 2017 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2013 Adam Reichold <adamreichold@myopera.com> -// Copyright (C) 2014 Bogdan Cristea <cristeab@gmail.com> -// Copyright (C) 2015 Li Junling <lijunling@sina.com> -// Copyright (C) 2015 André Guerreiro <aguerreiro1985@gmail.com> -// Copyright (C) 2015 André Esser <bepandre@hotmail.com> -// Copyright (C) 2016 Jakub Alba <jakubalba@gmail.com> -// Copyright (C) 2017 Jean Ghali <jghali@libertysurf.fr> -// Copyright (C) 2017 Fredrik Fornwall <fredrik@fornwall.net> -// Copyright (C) 2018 Ben Timby <btimby@gmail.com> -// Copyright (C) 2018 Evangelos Foutras <evangelos@foutrelis.com> -// 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 -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include <config.h> -#include <poppler-config.h> - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include <ctype.h> -#include <locale.h> -#include <stdio.h> -#include <errno.h> -#include <limits.h> -#include <stdlib.h> -#include <stddef.h> -#include <string.h> -#include <time.h> -#include <sys/stat.h> -#include "goo/glibc.h" -#include "goo/gstrtod.h" -#include "goo/GooString.h" -#include "goo/gfile.h" -#include "poppler-config.h" -#include "GlobalParams.h" -#include "Page.h" -#include "Catalog.h" -#include "Stream.h" -#include "XRef.h" -#include "Linearization.h" -#include "Link.h" -#include "OutputDev.h" -#include "Error.h" -#include "ErrorCodes.h" -#include "Lexer.h" -#include "Parser.h" -#include "SecurityHandler.h" -#include "Decrypt.h" -#ifndef DISABLE_OUTLINE -#include "Outline.h" -#endif -#include "PDFDoc.h" -#include "Hints.h" -#include "UTF.h" - -#ifdef MULTITHREADED -# define pdfdocLocker() MutexLocker locker(&mutex) -#else -# define pdfdocLocker() -#endif - -//------------------------------------------------------------------------ - -#define headerSearchSize 1024 // read this many bytes at beginning of - // file to look for '%PDF' -#define pdfIdLength 32 // PDF Document IDs (PermanentId, UpdateId) length - -#define linearizationSearchSize 1024 // read this many bytes at beginning of - // file to look for linearization - // dictionary - -#define xrefSearchSize 1024 // read this many bytes at end of file - // to look for 'startxref' - -//------------------------------------------------------------------------ -// PDFDoc -//------------------------------------------------------------------------ - -void PDFDoc::init() -{ -#ifdef MULTITHREADED - gInitMutex(&mutex); -#endif - ok = gFalse; - errCode = errNone; - fileName = nullptr; - file = nullptr; - str = nullptr; - xref = nullptr; - linearization = nullptr; - catalog = nullptr; - hints = nullptr; -#ifndef DISABLE_OUTLINE - outline = nullptr; -#endif - startXRefPos = -1; - secHdlr = nullptr; - pageCache = nullptr; -} - -PDFDoc::PDFDoc() -{ - init(); -} - -PDFDoc::PDFDoc(GooString *fileNameA, GooString *ownerPassword, - GooString *userPassword, void *guiDataA) { -#ifdef _WIN32 - int n, i; -#endif - - init(); - - fileName = fileNameA; - guiData = guiDataA; -#ifdef _WIN32 - n = fileName->getLength(); - fileNameU = (wchar_t *)gmallocn(n + 1, sizeof(wchar_t)); - for (i = 0; i < n; ++i) { - fileNameU[i] = (wchar_t)(fileName->getChar(i) & 0xff); - } - fileNameU[n] = L'\0'; -#endif - - // try to open file -#ifdef _WIN32 - wchar_t *wFileName = (wchar_t*)utf8ToUtf16(fileName->getCString()); - file = GooFile::open(wFileName); - gfree(wFileName); -#else - file = GooFile::open(fileName); -#endif - if (file == nullptr) { - // fopen() has failed. - // Keep a copy of the errno returned by fopen so that it can be - // referred to later. - fopenErrno = errno; - error(errIO, -1, "Couldn't open file '{0:t}': {1:s}.", fileName, strerror(errno)); - errCode = errOpenFile; - return; - } - - // create stream - str = new FileStream(file, 0, gFalse, file->size(), Object(objNull)); - - ok = setup(ownerPassword, userPassword); -} - -#ifdef _WIN32 -PDFDoc::PDFDoc(wchar_t *fileNameA, int fileNameLen, GooString *ownerPassword, - GooString *userPassword, void *guiDataA) { - OSVERSIONINFO version; - int i; - - init(); - - guiData = guiDataA; - - // save both Unicode and 8-bit copies of the file name - fileName = new GooString(); - fileNameU = (wchar_t *)gmallocn(fileNameLen + 1, sizeof(wchar_t)); - for (i = 0; i < fileNameLen; ++i) { - fileName->append((char)fileNameA[i]); - fileNameU[i] = fileNameA[i]; - } - fileNameU[fileNameLen] = L'\0'; - - // try to open file - // NB: _wfopen is only available in NT - version.dwOSVersionInfoSize = sizeof(version); - GetVersionEx(&version); - if (version.dwPlatformId == VER_PLATFORM_WIN32_NT) { - file = GooFile::open(fileNameU); - } else { - file = GooFile::open(fileName); - } - if (!file) { - error(errIO, -1, "Couldn't open file '{0:t}'", fileName); - errCode = errOpenFile; - return; - } - - // create stream - str = new FileStream(file, 0, gFalse, file->size(), Object(objNull)); - - ok = setup(ownerPassword, userPassword); -} -#endif - -PDFDoc::PDFDoc(BaseStream *strA, GooString *ownerPassword, - GooString *userPassword, void *guiDataA) { -#ifdef _WIN32 - int n, i; -#endif - - init(); - guiData = guiDataA; - if (strA->getFileName()) { - fileName = strA->getFileName()->copy(); -#ifdef _WIN32 - n = fileName->getLength(); - fileNameU = (wchar_t *)gmallocn(n + 1, sizeof(wchar_t)); - for (i = 0; i < n; ++i) { - fileNameU[i] = (wchar_t)(fileName->getChar(i) & 0xff); - } - fileNameU[n] = L'\0'; -#endif - } else { - fileName = nullptr; -#ifdef _WIN32 - fileNameU = NULL; -#endif - } - str = strA; - ok = setup(ownerPassword, userPassword); -} - -GBool PDFDoc::setup(GooString *ownerPassword, GooString *userPassword) { - pdfdocLocker(); - - if (str->getLength() <= 0) - { - error(errSyntaxError, -1, "Document stream is empty"); - return gFalse; - } - - str->setPos(0, -1); - if (str->getPos() < 0) - { - error(errSyntaxError, -1, "Document base stream is not seekable"); - return gFalse; - } - - str->reset(); - - // check footer - // Adobe does not seem to enforce %%EOF, so we do the same -// if (!checkFooter()) return gFalse; - - // check header - checkHeader(); - - GBool wasReconstructed = false; - - // read xref table - xref = new XRef(str, getStartXRef(), getMainXRefEntriesOffset(), &wasReconstructed); - if (!xref->isOk()) { - if (wasReconstructed) { - delete xref; - startXRefPos = -1; - xref = new XRef(str, getStartXRef(gTrue), getMainXRefEntriesOffset(gTrue), &wasReconstructed); - } - if (!xref->isOk()) { - error(errSyntaxError, -1, "Couldn't read xref table"); - errCode = xref->getErrorCode(); - return gFalse; - } - } - - // check for encryption - if (!checkEncryption(ownerPassword, userPassword)) { - errCode = errEncrypted; - return gFalse; - } - - // read catalog - catalog = new Catalog(this); - if (catalog && !catalog->isOk()) { - if (!wasReconstructed) - { - // try one more time to contruct the Catalog, maybe the problem is damaged XRef - delete catalog; - delete xref; - xref = new XRef(str, 0, 0, nullptr, true); - catalog = new Catalog(this); - } - - if (catalog && !catalog->isOk()) { - error(errSyntaxError, -1, "Couldn't read page catalog"); - errCode = errBadCatalog; - return gFalse; - } - } - - // done - return gTrue; -} - -PDFDoc::~PDFDoc() { - if (pageCache) { - for (int i = 0; i < getNumPages(); i++) { - if (pageCache[i]) { - delete pageCache[i]; - } - } - gfree(pageCache); - } - delete secHdlr; -#ifndef DISABLE_OUTLINE - if (outline) { - delete outline; - } -#endif - if (catalog) { - delete catalog; - } - if (xref) { - delete xref; - } - if (hints) { - delete hints; - } - if (linearization) { - delete linearization; - } - if (str) { - delete str; - } - if (file) { - delete file; - } - if (fileName) { - delete fileName; - } -#ifdef _WIN32 - if (fileNameU) { - gfree(fileNameU); - } -#endif -#ifdef MULTITHREADED - gDestroyMutex(&mutex); -#endif -} - - -// Check for a %%EOF at the end of this stream -GBool PDFDoc::checkFooter() { - // we look in the last 1024 chars because Adobe does the same - char *eof = new char[1025]; - Goffset pos = str->getPos(); - str->setPos(1024, -1); - int i, ch; - for (i = 0; i < 1024; i++) - { - ch = str->getChar(); - if (ch == EOF) - break; - eof[i] = ch; - } - eof[i] = '\0'; - - bool found = false; - for (i = i - 5; i >= 0; i--) { - if (strncmp (&eof[i], "%%EOF", 5) == 0) { - found = true; - break; - } - } - if (!found) - { - error(errSyntaxError, -1, "Document has not the mandatory ending %%EOF"); - errCode = errDamaged; - delete[] eof; - return gFalse; - } - delete[] eof; - str->setPos(pos); - return gTrue; -} - -// Check for a PDF header on this stream. Skip past some garbage -// if necessary. -void PDFDoc::checkHeader() { - char hdrBuf[headerSearchSize+1]; - char *p; - char *tokptr; - int i; - int bytesRead; - - pdfMajorVersion = 0; - pdfMinorVersion = 0; - - // read up to headerSearchSize bytes from the beginning of the document - for (i = 0; i < headerSearchSize; ++i) { - const int c = str->getChar(); - if (c == EOF) - break; - hdrBuf[i] = c; - } - bytesRead = i; - hdrBuf[bytesRead] = '\0'; - - // find the start of the PDF header if it exists and parse the version - bool headerFound = false; - for (i = 0; i < bytesRead - 5; ++i) { - if (!strncmp(&hdrBuf[i], "%PDF-", 5)) { - headerFound = true; - break; - } - } - if (!headerFound) { - error(errSyntaxWarning, -1, "May not be a PDF file (continuing anyway)"); - return; - } - str->moveStart(i); - if (!(p = strtok_r(&hdrBuf[i+5], " \t\n\r", &tokptr))) { - error(errSyntaxWarning, -1, "May not be a PDF file (continuing anyway)"); - return; - } - sscanf(p, "%d.%d", &pdfMajorVersion, &pdfMinorVersion); - // We don't do the version check. Don't add it back in. -} - -GBool PDFDoc::checkEncryption(GooString *ownerPassword, GooString *userPassword) { - GBool encrypted; - GBool ret; - - Object encrypt = xref->getTrailerDict()->dictLookup("Encrypt"); - if ((encrypted = encrypt.isDict())) { - if ((secHdlr = SecurityHandler::make(this, &encrypt))) { - if (secHdlr->isUnencrypted()) { - // no encryption - ret = gTrue; - } else if (secHdlr->checkEncryption(ownerPassword, userPassword)) { - // authorization succeeded - xref->setEncryption(secHdlr->getPermissionFlags(), - secHdlr->getOwnerPasswordOk(), - secHdlr->getFileKey(), - secHdlr->getFileKeyLength(), - secHdlr->getEncVersion(), - secHdlr->getEncRevision(), - secHdlr->getEncAlgorithm()); - ret = gTrue; - } else { - // authorization failed - ret = gFalse; - } - } else { - // couldn't find the matching security handler - ret = gFalse; - } - } else { - // document is not encrypted - ret = gTrue; - } - return ret; -} - -std::vector<FormWidgetSignature*> PDFDoc::getSignatureWidgets() -{ - int num_pages = getNumPages(); - FormPageWidgets *page_widgets = nullptr; - std::vector<FormWidgetSignature*> widget_vector; - - for (int i = 1; i <= num_pages; i++) { - Page *p = getCatalog()->getPage(i); - if (p) { - page_widgets = p->getFormWidgets(); - for (int j = 0; page_widgets != nullptr && j < page_widgets->getNumWidgets(); j++) { - if (page_widgets->getWidget(j)->getType() == formSignature) { - widget_vector.push_back(static_cast<FormWidgetSignature*>(page_widgets->getWidget(j))); - } - } - delete page_widgets; - } - } - return widget_vector; -} - -void PDFDoc::displayPage(OutputDev *out, int page, - double hDPI, double vDPI, int rotate, - GBool useMediaBox, GBool crop, GBool printing, - GBool (*abortCheckCbk)(void *data), - void *abortCheckCbkData, - GBool (*annotDisplayDecideCbk)(Annot *annot, void *user_data), - void *annotDisplayDecideCbkData, GBool copyXRef) { - if (globalParams->getPrintCommands()) { - printf("***** page %d *****\n", page); - } - - if (getPage(page)) - getPage(page)->display(out, hDPI, vDPI, - rotate, useMediaBox, crop, printing, - abortCheckCbk, abortCheckCbkData, - annotDisplayDecideCbk, annotDisplayDecideCbkData, copyXRef); - -} - -void PDFDoc::displayPages(OutputDev *out, int firstPage, int lastPage, - double hDPI, double vDPI, int rotate, - GBool useMediaBox, GBool crop, GBool printing, - GBool (*abortCheckCbk)(void *data), - void *abortCheckCbkData, - GBool (*annotDisplayDecideCbk)(Annot *annot, void *user_data), - void *annotDisplayDecideCbkData) { - int page; - - for (page = firstPage; page <= lastPage; ++page) { - displayPage(out, page, hDPI, vDPI, rotate, useMediaBox, crop, printing, - abortCheckCbk, abortCheckCbkData, - annotDisplayDecideCbk, annotDisplayDecideCbkData); - } -} - -void PDFDoc::displayPageSlice(OutputDev *out, int page, - double hDPI, double vDPI, int rotate, - GBool useMediaBox, GBool crop, GBool printing, - int sliceX, int sliceY, int sliceW, int sliceH, - GBool (*abortCheckCbk)(void *data), - void *abortCheckCbkData, - GBool (*annotDisplayDecideCbk)(Annot *annot, void *user_data), - void *annotDisplayDecideCbkData, GBool copyXRef) { - if (getPage(page)) - getPage(page)->displaySlice(out, hDPI, vDPI, - rotate, useMediaBox, crop, - sliceX, sliceY, sliceW, sliceH, - printing, - abortCheckCbk, abortCheckCbkData, - annotDisplayDecideCbk, annotDisplayDecideCbkData, copyXRef); -} - -Links *PDFDoc::getLinks(int page) { - Page *p = getPage(page); - if (!p) { - return new Links (nullptr); - } - return p->getLinks(); -} - -void PDFDoc::processLinks(OutputDev *out, int page) { - if (getPage(page)) - getPage(page)->processLinks(out); -} - -Linearization *PDFDoc::getLinearization() -{ - if (!linearization) { - linearization = new Linearization(str); - linearizationState = 0; - } - return linearization; -} - -GBool PDFDoc::checkLinearization() { - if (linearization == nullptr) - return gFalse; - if (linearizationState == 1) - return gTrue; - if (linearizationState == 2) - return gFalse; - if (!hints) { - hints = new Hints(str, linearization, getXRef(), secHdlr); - } - if (!hints->isOk()) { - linearizationState = 2; - return gFalse; - } - for (int page = 1; page <= linearization->getNumPages(); page++) { - Ref pageRef; - - pageRef.num = hints->getPageObjectNum(page); - if (!pageRef.num) { - linearizationState = 2; - return gFalse; - } - - // check for bogus ref - this can happen in corrupted PDF files - if (pageRef.num < 0 || pageRef.num >= xref->getNumObjects()) { - linearizationState = 2; - return gFalse; - } - - pageRef.gen = xref->getEntry(pageRef.num)->gen; - Object obj = xref->fetch(pageRef.num, pageRef.gen); - if (!obj.isDict("Page")) { - linearizationState = 2; - return gFalse; - } - } - linearizationState = 1; - return gTrue; -} - -GBool PDFDoc::isLinearized(GBool tryingToReconstruct) { - if ((str->getLength()) && - (getLinearization()->getLength() == str->getLength())) - return gTrue; - else { - if (tryingToReconstruct) - return getLinearization()->getLength() > 0; - else - return gFalse; - } -} - -void PDFDoc::setDocInfoModified(Object *infoObj) -{ - Object infoObjRef = getDocInfoNF(); - xref->setModifiedObject(infoObj, infoObjRef.getRef()); -} - -void PDFDoc::setDocInfoStringEntry(const char *key, GooString *value) -{ - GBool removeEntry = !value || value->getLength() == 0 || value->hasJustUnicodeMarker(); - if (removeEntry) { - delete value; - } - - Object infoObj = getDocInfo(); - if (infoObj.isNull() && removeEntry) { - // No info dictionary, so no entry to remove. - return; - } - - infoObj = createDocInfoIfNoneExists(); - if (removeEntry) { - infoObj.dictSet(key, Object(objNull)); - } else { - infoObj.dictSet(key, Object(value)); - } - - - if (infoObj.dictGetLength() == 0) { - // Info dictionary is empty. Remove it altogether. - removeDocInfo(); - } else { - setDocInfoModified(&infoObj); - } -} - -GooString *PDFDoc::getDocInfoStringEntry(const char *key) { - Object infoObj = getDocInfo(); - if (!infoObj.isDict()) { - return nullptr; - } - - Object entryObj = infoObj.dictLookup(key); - - GooString *result; - - if (entryObj.isString()) { - result = entryObj.takeString(); - } else { - result = nullptr; - } - - return result; -} - -static GBool -get_id (const GooString *encodedidstring, GooString *id) { - const char *encodedid = encodedidstring->getCString(); - char pdfid[pdfIdLength + 1]; - int n; - - if (encodedidstring->getLength() != pdfIdLength / 2) - return gFalse; - - n = sprintf(pdfid, "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", - encodedid[0] & 0xff, encodedid[1] & 0xff, encodedid[2] & 0xff, encodedid[3] & 0xff, - encodedid[4] & 0xff, encodedid[5] & 0xff, encodedid[6] & 0xff, encodedid[7] & 0xff, - encodedid[8] & 0xff, encodedid[9] & 0xff, encodedid[10] & 0xff, encodedid[11] & 0xff, - encodedid[12] & 0xff, encodedid[13] & 0xff, encodedid[14] & 0xff, encodedid[15] & 0xff); - if (n != pdfIdLength) - return gFalse; - - id->Set(pdfid, pdfIdLength); - return gTrue; -} - -GBool PDFDoc::getID(GooString *permanent_id, GooString *update_id) { - Object obj = xref->getTrailerDict()->dictLookup ("ID"); - - if (obj.isArray() && obj.arrayGetLength() == 2) { - if (permanent_id) { - Object obj2 = obj.arrayGet(0); - if (obj2.isString()) { - if (!get_id (obj2.getString(), permanent_id)) { - return gFalse; - } - } else { - error(errSyntaxError, -1, "Invalid permanent ID"); - return gFalse; - } - } - - if (update_id) { - Object obj2 = obj.arrayGet(1); - if (obj2.isString()) { - if (!get_id (obj2.getString(), update_id)) { - return gFalse; - } - } else { - error(errSyntaxError, -1, "Invalid update ID"); - return gFalse; - } - } - - return gTrue; - } - - return gFalse; -} - -Hints *PDFDoc::getHints() -{ - if (!hints && isLinearized()) { - hints = new Hints(str, getLinearization(), getXRef(), secHdlr); - } - - return hints; -} - -int PDFDoc::savePageAs(GooString *name, int pageNo) -{ - FILE *f; - OutStream *outStr; - XRef *yRef, *countRef; - - if (file && file->modificationTimeChangedSinceOpen()) - return errFileChangedSinceOpen; - - - int rootNum = getXRef()->getNumObjects() + 1; - - // Make sure that special flags are set, because we are going to read - // all objects, including Unencrypted ones. - xref->scanSpecialFlags(); - - Guchar *fileKey; - CryptAlgorithm encAlgorithm; - int keyLength; - xref->getEncryptionParameters(&fileKey, &encAlgorithm, &keyLength); - - if (pageNo < 1 || pageNo > getNumPages() || !getCatalog()->getPage(pageNo)) { - error(errInternal, -1, "Illegal pageNo: {0:d}({1:d})", pageNo, getNumPages() ); - return errOpenFile; - } - PDFRectangle *cropBox = nullptr; - if (getCatalog()->getPage(pageNo)->isCropped()) { - cropBox = getCatalog()->getPage(pageNo)->getCropBox(); - } - replacePageDict(pageNo, - getCatalog()->getPage(pageNo)->getRotate(), - getCatalog()->getPage(pageNo)->getMediaBox(), - cropBox); - Ref *refPage = getCatalog()->getPageRef(pageNo); - Object page = getXRef()->fetch(refPage->num, refPage->gen); - - if (!(f = fopen(name->getCString(), "wb"))) { - error(errIO, -1, "Couldn't open file '{0:t}'", name); - return errOpenFile; - } - outStr = new FileOutStream(f,0); - - yRef = new XRef(getXRef()->getTrailerDict()); - - if (secHdlr != nullptr && !secHdlr->isUnencrypted()) { - yRef->setEncryption(secHdlr->getPermissionFlags(), - secHdlr->getOwnerPasswordOk(), fileKey, keyLength, secHdlr->getEncVersion(), secHdlr->getEncRevision(), encAlgorithm); - } - countRef = new XRef(); - Object *trailerObj = getXRef()->getTrailerDict(); - if (trailerObj->isDict()) { - markPageObjects(trailerObj->getDict(), yRef, countRef, 0, refPage->num, rootNum + 2); - } - yRef->add(0, 65535, 0, gFalse); - writeHeader(outStr, getPDFMajorVersion(), getPDFMinorVersion()); - - // get and mark info dict - Object infoObj = getXRef()->getDocInfo(); - if (infoObj.isDict()) { - Dict *infoDict = infoObj.getDict(); - markPageObjects(infoDict, yRef, countRef, 0, refPage->num, rootNum + 2); - if (trailerObj->isDict()) { - Dict *trailerDict = trailerObj->getDict(); - Object ref = trailerDict->lookupNF("Info"); - if (ref.isRef()) { - yRef->add(ref.getRef().num, ref.getRef().gen, 0, gTrue); - if (getXRef()->getEntry(ref.getRef().num)->type == xrefEntryCompressed) { - yRef->getEntry(ref.getRef().num)->type = xrefEntryCompressed; - } - } - } - } - - // get and mark output intents etc. - Object catObj = getXRef()->getCatalog(); - Dict *catDict = catObj.getDict(); - Object pagesObj = catDict->lookup("Pages"); - Object afObj = catDict->lookupNF("AcroForm"); - if (!afObj.isNull()) { - markAcroForm(&afObj, yRef, countRef, 0, refPage->num, rootNum + 2); - } - Dict *pagesDict = pagesObj.getDict(); - Object resourcesObj = pagesDict->lookup("Resources"); - if (resourcesObj.isDict()) - markPageObjects(resourcesObj.getDict(), yRef, countRef, 0, refPage->num, rootNum + 2); - markPageObjects(catDict, yRef, countRef, 0, refPage->num, rootNum + 2); - - Dict *pageDict = page.getDict(); - if (resourcesObj.isNull() && !pageDict->hasKey("Resources")) { - Object *resourceDictObject = getCatalog()->getPage(pageNo)->getResourceDictObject(); - if (resourceDictObject->isDict()) { - resourcesObj = resourceDictObject->copy(); - markPageObjects(resourcesObj.getDict(), yRef, countRef, 0, refPage->num, rootNum + 2); - } - } - markPageObjects(pageDict, yRef, countRef, 0, refPage->num, rootNum + 2); - Object annotsObj = pageDict->lookupNF("Annots"); - if (!annotsObj.isNull()) { - markAnnotations(&annotsObj, yRef, countRef, 0, refPage->num, rootNum + 2); - } - yRef->markUnencrypted(); - writePageObjects(outStr, yRef, 0); - - yRef->add(rootNum,0,outStr->getPos(),gTrue); - outStr->printf("%d 0 obj\n", rootNum); - outStr->printf("<< /Type /Catalog /Pages %d 0 R", rootNum + 1); - for (int j = 0; j < catDict->getLength(); j++) { - const char *key = catDict->getKey(j); - if (strcmp(key, "Type") != 0 && - strcmp(key, "Catalog") != 0 && - strcmp(key, "Pages") != 0) - { - if (j > 0) outStr->printf(" "); - Object value = catDict->getValNF(j); - outStr->printf("/%s ", key); - writeObject(&value, outStr, getXRef(), 0, nullptr, cryptRC4, 0, 0, 0); - } - } - outStr->printf(">>\nendobj\n"); - - yRef->add(rootNum + 1,0,outStr->getPos(),gTrue); - outStr->printf("%d 0 obj\n", rootNum + 1); - outStr->printf("<< /Type /Pages /Kids [ %d 0 R ] /Count 1 ", rootNum + 2); - if (resourcesObj.isDict()) { - outStr->printf("/Resources "); - writeObject(&resourcesObj, outStr, getXRef(), 0, nullptr, cryptRC4, 0, 0, 0); - } - outStr->printf(">>\n"); - outStr->printf("endobj\n"); - - yRef->add(rootNum + 2,0,outStr->getPos(),gTrue); - outStr->printf("%d 0 obj\n", rootNum + 2); - outStr->printf("<< "); - for (int n = 0; n < pageDict->getLength(); n++) { - if (n > 0) outStr->printf(" "); - const char *key = pageDict->getKey(n); - Object value = pageDict->getValNF(n); - if (strcmp(key, "Parent") == 0) { - outStr->printf("/Parent %d 0 R", rootNum + 1); - } else { - outStr->printf("/%s ", key); - writeObject(&value, outStr, getXRef(), 0, nullptr, cryptRC4, 0, 0, 0); - } - } - outStr->printf(" >>\nendobj\n"); - - Goffset uxrefOffset = outStr->getPos(); - Ref ref; - ref.num = rootNum; - ref.gen = 0; - Object trailerDict = createTrailerDict(rootNum + 3, gFalse, 0, &ref, getXRef(), - name->getCString(), uxrefOffset); - writeXRefTableTrailer(std::move(trailerDict), yRef, gFalse /* do not write unnecessary entries */, - uxrefOffset, outStr, getXRef()); - - outStr->close(); - fclose(f); - delete yRef; - delete countRef; - delete outStr; - - return errNone; -} - -int PDFDoc::saveAs(GooString *name, PDFWriteMode mode) { - FILE *f; - OutStream *outStr; - int res; - - if (!(f = fopen(name->getCString(), "wb"))) { - error(errIO, -1, "Couldn't open file '{0:t}'", name); - return errOpenFile; - } - outStr = new FileOutStream(f,0); - res = saveAs(outStr, mode); - delete outStr; - fclose(f); - return res; -} - -int PDFDoc::saveAs(OutStream *outStr, PDFWriteMode mode) { - if (file && file->modificationTimeChangedSinceOpen()) - return errFileChangedSinceOpen; - - if (!xref->isModified() && mode == writeStandard) { - // simply copy the original file - saveWithoutChangesAs (outStr); - } else if (mode == writeForceRewrite) { - saveCompleteRewrite(outStr); - } else { - saveIncrementalUpdate(outStr); - } - - return errNone; -} - -int PDFDoc::saveWithoutChangesAs(GooString *name) { - FILE *f; - OutStream *outStr; - int res; - - if (!(f = fopen(name->getCString(), "wb"))) { - error(errIO, -1, "Couldn't open file '{0:t}'", name); - return errOpenFile; - } - - outStr = new FileOutStream(f,0); - res = saveWithoutChangesAs(outStr); - delete outStr; - - fclose(f); - - return res; -} - -int PDFDoc::saveWithoutChangesAs(OutStream *outStr) { - int c; - - if (file && file->modificationTimeChangedSinceOpen()) - return errFileChangedSinceOpen; - - BaseStream *copyStr = str->copy(); - copyStr->reset(); - while ((c = copyStr->getChar()) != EOF) { - outStr->put(c); - } - copyStr->close(); - delete copyStr; - - return errNone; -} - -void PDFDoc::saveIncrementalUpdate (OutStream* outStr) -{ - XRef *uxref; - int c; - //copy the original file - BaseStream *copyStr = str->copy(); - copyStr->reset(); - while ((c = copyStr->getChar()) != EOF) { - outStr->put(c); - } - copyStr->close(); - delete copyStr; - - Guchar *fileKey; - CryptAlgorithm encAlgorithm; - int keyLength; - xref->getEncryptionParameters(&fileKey, &encAlgorithm, &keyLength); - - uxref = new XRef(); - uxref->add(0, 65535, 0, gFalse); - xref->lock(); - for(int i=0; i<xref->getNumObjects(); i++) { - if ((xref->getEntry(i)->type == xrefEntryFree) && - (xref->getEntry(i)->gen == 0)) //we skip the irrelevant free objects - continue; - - if (xref->getEntry(i)->getFlag(XRefEntry::Updated)) { //we have an updated object - Ref ref; - ref.num = i; - ref.gen = xref->getEntry(i)->type == xrefEntryCompressed ? 0 : xref->getEntry(i)->gen; - if (xref->getEntry(i)->type != xrefEntryFree) { - Object obj1 = xref->fetch(ref.num, ref.gen, 1); - Goffset offset = writeObjectHeader(&ref, outStr); - writeObject(&obj1, outStr, fileKey, encAlgorithm, keyLength, ref.num, ref.gen); - writeObjectFooter(outStr); - uxref->add(ref.num, ref.gen, offset, gTrue); - } else { - uxref->add(ref.num, ref.gen, 0, gFalse); - } - } - } - xref->unlock(); - // because of "uxref->add(0, 65535, 0, gFalse);" uxref->getNumObjects() will - // always be >= 1; if it is 1, it means there is nothing to update - if (uxref->getNumObjects() == 1) { - delete uxref; - return; - } - - Goffset uxrefOffset = outStr->getPos(); - int numobjects = xref->getNumObjects(); - const char *fileNameA = fileName ? fileName->getCString() : nullptr; - Ref rootRef, uxrefStreamRef; - rootRef.num = getXRef()->getRootNum(); - rootRef.gen = getXRef()->getRootGen(); - - // Output a xref stream if there is a xref stream already - GBool xRefStream = xref->isXRefStream(); - - if (xRefStream) { - // Append an entry for the xref stream itself - uxrefStreamRef.num = numobjects++; - uxrefStreamRef.gen = 0; - uxref->add(uxrefStreamRef.num, uxrefStreamRef.gen, uxrefOffset, gTrue); - } - - Object trailerDict = createTrailerDict(numobjects, gTrue, getStartXRef(), &rootRef, getXRef(), fileNameA, uxrefOffset); - if (xRefStream) { - writeXRefStreamTrailer(std::move(trailerDict), uxref, &uxrefStreamRef, uxrefOffset, outStr, getXRef()); - } else { - writeXRefTableTrailer(std::move(trailerDict), uxref, gFalse, uxrefOffset, outStr, getXRef()); - } - - delete uxref; -} - -void PDFDoc::saveCompleteRewrite (OutStream* outStr) -{ - // Make sure that special flags are set, because we are going to read - // all objects, including Unencrypted ones. - xref->scanSpecialFlags(); - - Guchar *fileKey; - CryptAlgorithm encAlgorithm; - int keyLength; - xref->getEncryptionParameters(&fileKey, &encAlgorithm, &keyLength); - - outStr->printf("%%PDF-%d.%d\r\n",pdfMajorVersion,pdfMinorVersion); - XRef *uxref = new XRef(); - uxref->add(0, 65535, 0, gFalse); - xref->lock(); - for(int i=0; i<xref->getNumObjects(); i++) { - Ref ref; - XRefEntryType type = xref->getEntry(i)->type; - if (type == xrefEntryFree) { - ref.num = i; - ref.gen = xref->getEntry(i)->gen; - /* the XRef class adds a lot of irrelevant free entries, we only want the significant one - and we don't want the one with num=0 because it has already been added (gen = 65535)*/ - if (ref.gen > 0 && ref.num > 0) - uxref->add(ref.num, ref.gen, 0, gFalse); - } else if (xref->getEntry(i)->getFlag(XRefEntry::DontRewrite)) { - // This entry must not be written, put a free entry instead (with incremented gen) - ref.num = i; - ref.gen = xref->getEntry(i)->gen + 1; - uxref->add(ref.num, ref.gen, 0, gFalse); - } else if (type == xrefEntryUncompressed){ - ref.num = i; - ref.gen = xref->getEntry(i)->gen; - Object obj1 = xref->fetch(ref.num, ref.gen, 1); - Goffset offset = writeObjectHeader(&ref, outStr); - // Write unencrypted objects in unencrypted form - if (xref->getEntry(i)->getFlag(XRefEntry::Unencrypted)) { - writeObject(&obj1, outStr, nullptr, cryptRC4, 0, 0, 0); - } else { - writeObject(&obj1, outStr, fileKey, encAlgorithm, keyLength, ref.num, ref.gen); - } - writeObjectFooter(outStr); - uxref->add(ref.num, ref.gen, offset, gTrue); - } else if (type == xrefEntryCompressed) { - ref.num = i; - ref.gen = 0; //compressed entries have gen == 0 - Object obj1 = xref->fetch(ref.num, ref.gen, 1); - Goffset offset = writeObjectHeader(&ref, outStr); - writeObject(&obj1, outStr, fileKey, encAlgorithm, keyLength, ref.num, ref.gen); - writeObjectFooter(outStr); - uxref->add(ref.num, ref.gen, offset, gTrue); - } - } - xref->unlock(); - Goffset uxrefOffset = outStr->getPos(); - writeXRefTableTrailer(uxrefOffset, uxref, gTrue /* write all entries */, - uxref->getNumObjects(), outStr, gFalse /* complete rewrite */); - delete uxref; -} - -void PDFDoc::writeDictionnary (Dict* dict, OutStream* outStr, XRef *xRef, Guint numOffset, Guchar *fileKey, - CryptAlgorithm encAlgorithm, int keyLength, int objNum, int objGen, std::set<Dict*> *alreadyWrittenDicts) -{ - bool deleteSet = false; - if (!alreadyWrittenDicts) { - alreadyWrittenDicts = new std::set<Dict*>; - deleteSet = true; - } - - if (alreadyWrittenDicts->find(dict) != alreadyWrittenDicts->end()) { - error(errSyntaxWarning, -1, "PDFDoc::writeDictionnary: Found recursive dicts"); - if (deleteSet) delete alreadyWrittenDicts; - return; - } else { - alreadyWrittenDicts->insert(dict); - } - - outStr->printf("<<"); - for (int i=0; i<dict->getLength(); i++) { - GooString keyName(dict->getKey(i)); - GooString *keyNameToPrint = keyName.sanitizedName(gFalse /* non ps mode */); - outStr->printf("/%s ", keyNameToPrint->getCString()); - delete keyNameToPrint; - Object obj1 = dict->getValNF(i); - writeObject(&obj1, outStr, xRef, numOffset, fileKey, encAlgorithm, keyLength, objNum, objGen, alreadyWrittenDicts); - } - outStr->printf(">> "); - - if (deleteSet) { - delete alreadyWrittenDicts; - } -} - -void PDFDoc::writeStream (Stream* str, OutStream* outStr) -{ - outStr->printf("stream\r\n"); - str->reset(); - for (int c=str->getChar(); c!= EOF; c=str->getChar()) { - outStr->printf("%c", c); - } - outStr->printf("\r\nendstream\r\n"); -} - -void PDFDoc::writeRawStream (Stream* str, OutStream* outStr) -{ - Object obj1 = str->getDict()->lookup("Length"); - if (!obj1.isInt() && !obj1.isInt64()) { - error (errSyntaxError, -1, "PDFDoc::writeRawStream, no Length in stream dict"); - return; - } - - Goffset length; - if (obj1.isInt()) - length = obj1.getInt(); - else - length = obj1.getInt64(); - - outStr->printf("stream\r\n"); - str->unfilteredReset(); - for (Goffset i = 0; i < length; i++) { - int c = str->getUnfilteredChar(); - if (unlikely(c == EOF)) { - error (errSyntaxError, -1, "PDFDoc::writeRawStream: EOF reading stream"); - break; - } - outStr->printf("%c", c); - } - str->reset(); - outStr->printf("\r\nendstream\r\n"); -} - -void PDFDoc::writeString (const GooString* s, OutStream* outStr, Guchar *fileKey, - CryptAlgorithm encAlgorithm, int keyLength, int objNum, int objGen) -{ - // Encrypt string if encryption is enabled - GooString *sEnc = nullptr; - if (fileKey) { - EncryptStream *enc = new EncryptStream(new MemStream(s->getCString(), 0, s->getLength(), Object(objNull)), - fileKey, encAlgorithm, keyLength, objNum, objGen); - sEnc = new GooString(); - int c; - enc->reset(); - while ((c = enc->getChar()) != EOF) { - sEnc->append((char)c); - } - - delete enc; - s = sEnc; - } - - // Write data - if (s->hasUnicodeMarker()) { - //unicode string don't necessary end with \0 - const char* c = s->getCString(); - outStr->printf("("); - for(int i=0; i<s->getLength(); i++) { - char unescaped = *(c+i)&0x000000ff; - //escape if needed - if (unescaped == '(' || unescaped == ')' || unescaped == '\\') - outStr->printf("%c", '\\'); - outStr->printf("%c", unescaped); - } - outStr->printf(") "); - } else { - const char* c = s->getCString(); - outStr->printf("("); - for(int i=0; i<s->getLength(); i++) { - char unescaped = *(c+i)&0x000000ff; - //escape if needed - if (unescaped == '\r') - outStr->printf("\\r"); - else if (unescaped == '\n') - outStr->printf("\\n"); - else { - if (unescaped == '(' || unescaped == ')' || unescaped == '\\') { - outStr->printf("%c", '\\'); - } - outStr->printf("%c", unescaped); - } - } - outStr->printf(") "); - } - - delete sEnc; -} - -Goffset PDFDoc::writeObjectHeader (Ref *ref, OutStream* outStr) -{ - Goffset offset = outStr->getPos(); - outStr->printf("%i %i obj ", ref->num, ref->gen); - return offset; -} - -void PDFDoc::writeObject (Object* obj, OutStream* outStr, XRef *xRef, Guint numOffset, Guchar *fileKey, - CryptAlgorithm encAlgorithm, int keyLength, int objNum, int objGen, std::set<Dict*> *alreadyWrittenDicts) -{ - Array *array; - - switch (obj->getType()) { - case objBool: - outStr->printf("%s ", obj->getBool()?"true":"false"); - break; - case objInt: - outStr->printf("%i ", obj->getInt()); - break; - case objInt64: - outStr->printf("%lli ", obj->getInt64()); - break; - case objReal: - { - GooString s; - s.appendf("{0:.10g}", obj->getReal()); - outStr->printf("%s ", s.getCString()); - break; - } - case objString: - writeString(obj->getString(), outStr, fileKey, encAlgorithm, keyLength, objNum, objGen); - break; - case objName: - { - GooString name(obj->getName()); - GooString *nameToPrint = name.sanitizedName(gFalse /* non ps mode */); - outStr->printf("/%s ", nameToPrint->getCString()); - delete nameToPrint; - break; - } - case objNull: - outStr->printf( "null "); - break; - case objArray: - array = obj->getArray(); - outStr->printf("["); - for (int i=0; i<array->getLength(); i++) { - Object obj1 = array->getNF(i); - writeObject(&obj1, outStr, xRef, numOffset, fileKey, encAlgorithm, keyLength, objNum, objGen); - } - outStr->printf("] "); - break; - case objDict: - writeDictionnary (obj->getDict(), outStr, xRef, numOffset, fileKey, encAlgorithm, keyLength, objNum, objGen, alreadyWrittenDicts); - break; - case objStream: - { - //We can't modify stream with the current implementation (no write functions in Stream API) - // => the only type of streams which that have been modified are internal streams (=strWeird) - Stream *stream = obj->getStream(); - if (stream->getKind() == strWeird || stream->getKind() == strCrypt) { - //we write the stream unencoded => TODO: write stream encoder - - // Encrypt stream - EncryptStream *encStream = nullptr; - GBool removeFilter = gTrue; - if (stream->getKind() == strWeird && fileKey) { - Object filter = stream->getDict()->lookup("Filter"); - if (!filter.isName("Crypt")) { - if (filter.isArray()) { - for (int i = 0; i < filter.arrayGetLength(); i++) { - Object filterEle = filter.arrayGet(i); - if (filterEle.isName("Crypt")) { - removeFilter = gFalse; - break; - } - } - if (removeFilter) { - encStream = new EncryptStream(stream, fileKey, encAlgorithm, keyLength, objNum, objGen); - encStream->setAutoDelete(gFalse); - stream = encStream; - } - } else { - encStream = new EncryptStream(stream, fileKey, encAlgorithm, keyLength, objNum, objGen); - encStream->setAutoDelete(gFalse); - stream = encStream; - } - } else { - removeFilter = gFalse; - } - } else if (fileKey != nullptr) { // Encrypt stream - encStream = new EncryptStream(stream, fileKey, encAlgorithm, keyLength, objNum, objGen); - encStream->setAutoDelete(gFalse); - stream = encStream; - } - - stream->reset(); - //recalculate stream length - Goffset tmp = 0; - for (int c=stream->getChar(); c!=EOF; c=stream->getChar()) { - tmp++; - } - stream->getDict()->set("Length", Object(tmp)); - - //Remove Stream encoding - if (removeFilter) { - stream->getDict()->remove("Filter"); - } - stream->getDict()->remove("DecodeParms"); - - writeDictionnary (stream->getDict(),outStr, xRef, numOffset, fileKey, encAlgorithm, keyLength, objNum, objGen, alreadyWrittenDicts); - writeStream (stream,outStr); - delete encStream; - } else { - //raw stream copy - FilterStream *fs = dynamic_cast<FilterStream*>(stream); - if (fs) { - BaseStream *bs = fs->getBaseStream(); - if (bs) { - Goffset streamEnd; - if (xRef->getStreamEnd(bs->getStart(), &streamEnd)) { - Goffset val = streamEnd - bs->getStart(); - stream->getDict()->set("Length", Object(val)); - } - } - } - writeDictionnary (stream->getDict(), outStr, xRef, numOffset, fileKey, encAlgorithm, keyLength, objNum, objGen, alreadyWrittenDicts); - writeRawStream (stream, outStr); - } - break; - } - case objRef: - outStr->printf("%i %i R ", obj->getRef().num + numOffset, obj->getRef().gen); - break; - case objCmd: - outStr->printf("%s\n", obj->getCmd()); - break; - case objError: - outStr->printf("error\r\n"); - break; - case objEOF: - outStr->printf("eof\r\n"); - break; - case objNone: - outStr->printf("none\r\n"); - break; - default: - error(errUnimplemented, -1,"Unhandled objType : {0:d}, please report a bug with a testcase\r\n", obj->getType()); - break; - } -} - -void PDFDoc::writeObjectFooter (OutStream* outStr) -{ - outStr->printf("endobj\r\n"); -} - -Object PDFDoc::createTrailerDict(int uxrefSize, GBool incrUpdate, Goffset startxRef, - Ref *root, XRef *xRef, const char *fileName, Goffset fileSize) -{ - Dict *trailerDict = new Dict(xRef); - trailerDict->set("Size", Object(uxrefSize)); - - //build a new ID, as recommended in the reference, uses: - // - current time - // - file name - // - file size - // - values of entry in information dictionnary - GooString message; - char buffer[256]; - sprintf(buffer, "%i", (int)time(nullptr)); - message.append(buffer); - - if (fileName) - message.append(fileName); - - sprintf(buffer, "%lli", (long long)fileSize); - message.append(buffer); - - //info dict -- only use text string - if (!xRef->getTrailerDict()->isNone()) { - Object docInfo = xRef->getDocInfo(); - if (docInfo.isDict()) { - for(int i=0; i<docInfo.getDict()->getLength(); i++) { - Object obj2 = docInfo.getDict()->getVal(i); - if (obj2.isString()) { - message.append(obj2.getString()); - } - } - } - } - - GBool hasEncrypt = gFalse; - if (!xRef->getTrailerDict()->isNone()) { - Object obj2 = xRef->getTrailerDict()->dictLookupNF("Encrypt"); - if (!obj2.isNull()) { - trailerDict->set("Encrypt", std::move(obj2)); - hasEncrypt = gTrue; - } - } - - //calculate md5 digest - Guchar digest[16]; - md5((Guchar*)message.getCString(), message.getLength(), digest); - - //create ID array - // In case of encrypted files, the ID must not be changed because it's used to calculate the key - if (incrUpdate || hasEncrypt) { - //only update the second part of the array - Object obj4 = xRef->getTrailerDict()->getDict()->lookup("ID"); - if (!obj4.isArray()) { - error(errSyntaxWarning, -1, "PDFDoc::createTrailerDict original file's ID entry isn't an array. Trying to continue"); - } else { - Array *array = new Array(xRef); - //Get the first part of the ID - array->add(obj4.arrayGet(0)); - array->add(Object(new GooString((const char*)digest, 16))); - trailerDict->set("ID", Object(array)); - } - } else { - //new file => same values for the two identifiers - Array *array = new Array(xRef); - array->add(Object(new GooString((const char*)digest, 16))); - array->add(Object(new GooString((const char*)digest, 16))); - trailerDict->set("ID", Object(array)); - } - - trailerDict->set("Root", Object(root->num, root->gen)); - - if (incrUpdate) { - trailerDict->set("Prev", Object(startxRef)); - } - - if (!xRef->getTrailerDict()->isNone()) { - Object obj5 = xRef->getDocInfoNF(); - if (!obj5.isNull()) { - trailerDict->set("Info", std::move(obj5)); - } - } - - return Object(trailerDict); -} - -void PDFDoc::writeXRefTableTrailer(Object &&trailerDict, XRef *uxref, GBool writeAllEntries, Goffset uxrefOffset, OutStream* outStr, XRef *xRef) -{ - uxref->writeTableToFile( outStr, writeAllEntries ); - outStr->printf( "trailer\r\n"); - writeDictionnary(trailerDict.getDict(), outStr, xRef, 0, nullptr, cryptRC4, 0, 0, 0, nullptr); - outStr->printf( "\r\nstartxref\r\n"); - outStr->printf( "%lli\r\n", uxrefOffset); - outStr->printf( "%%%%EOF\r\n"); -} - -void PDFDoc::writeXRefStreamTrailer (Object &&trailerDict, XRef *uxref, Ref *uxrefStreamRef, Goffset uxrefOffset, OutStream* outStr, XRef *xRef) -{ - GooString stmData; - - // Fill stmData and some trailerDict fields - uxref->writeStreamToBuffer(&stmData, trailerDict.getDict(), xRef); - - // Create XRef stream object and write it - MemStream *mStream = new MemStream( stmData.getCString(), 0, stmData.getLength(), std::move(trailerDict) ); - writeObjectHeader(uxrefStreamRef, outStr); - Object obj1(static_cast<Stream*>(mStream)); - writeObject(&obj1, outStr, xRef, 0, nullptr, cryptRC4, 0, 0, 0); - writeObjectFooter(outStr); - - outStr->printf( "startxref\r\n"); - outStr->printf( "%lli\r\n", uxrefOffset); - outStr->printf( "%%%%EOF\r\n"); -} - -void PDFDoc::writeXRefTableTrailer(Goffset uxrefOffset, XRef *uxref, GBool writeAllEntries, - int uxrefSize, OutStream* outStr, GBool incrUpdate) -{ - const char *fileNameA = fileName ? fileName->getCString() : nullptr; - // file size (doesn't include the trailer) - unsigned int fileSize = 0; - int c; - str->reset(); - while ((c = str->getChar()) != EOF) { - fileSize++; - } - str->close(); - Ref ref; - ref.num = getXRef()->getRootNum(); - ref.gen = getXRef()->getRootGen(); - Object trailerDict = createTrailerDict(uxrefSize, incrUpdate, getStartXRef(), &ref, - getXRef(), fileNameA, fileSize); - writeXRefTableTrailer(std::move(trailerDict), uxref, writeAllEntries, uxrefOffset, outStr, getXRef()); -} - -void PDFDoc::writeHeader(OutStream *outStr, int major, int minor) -{ - outStr->printf("%%PDF-%d.%d\n", major, minor); - outStr->printf("%%%c%c%c%c\n", 0xE2, 0xE3, 0xCF, 0xD3); -} - -void PDFDoc::markDictionnary (Dict* dict, XRef * xRef, XRef *countRef, Guint numOffset, int oldRefNum, int newRefNum, std::set<Dict*> *alreadyMarkedDicts) -{ - bool deleteSet = false; - if (!alreadyMarkedDicts) { - alreadyMarkedDicts = new std::set<Dict*>; - deleteSet = true; - } - - if (alreadyMarkedDicts->find(dict) != alreadyMarkedDicts->end()) { - error(errSyntaxWarning, -1, "PDFDoc::markDictionnary: Found recursive dicts"); - if (deleteSet) delete alreadyMarkedDicts; - return; - } else { - alreadyMarkedDicts->insert(dict); - } - - for (int i=0; i<dict->getLength(); i++) { - const char *key = dict->getKey(i); - if (strcmp(key, "Annots") != 0) { - Object obj1 = dict->getValNF(i); - markObject(&obj1, xRef, countRef, numOffset, oldRefNum, newRefNum, alreadyMarkedDicts); - } else { - Object annotsObj = dict->getValNF(i); - if (!annotsObj.isNull()) { - markAnnotations(&annotsObj, xRef, countRef, 0, oldRefNum, newRefNum, alreadyMarkedDicts); - } - } - } - - if (deleteSet) { - delete alreadyMarkedDicts; - } -} - -void PDFDoc::markObject (Object* obj, XRef *xRef, XRef *countRef, Guint numOffset, int oldRefNum, int newRefNum, std::set<Dict*> *alreadyMarkedDicts) -{ - Array *array; - - switch (obj->getType()) { - case objArray: - array = obj->getArray(); - for (int i=0; i<array->getLength(); i++) { - Object obj1 = array->getNF(i); - markObject(&obj1, xRef, countRef, numOffset, oldRefNum, newRefNum); - } - break; - case objDict: - markDictionnary (obj->getDict(), xRef, countRef, numOffset, oldRefNum, newRefNum, alreadyMarkedDicts); - break; - case objStream: - { - Stream *stream = obj->getStream(); - markDictionnary (stream->getDict(), xRef, countRef, numOffset, oldRefNum, newRefNum, alreadyMarkedDicts); - } - break; - case objRef: - { - if (obj->getRef().num + (int) numOffset >= xRef->getNumObjects() || xRef->getEntry(obj->getRef().num + numOffset)->type == xrefEntryFree) { - if (getXRef()->getEntry(obj->getRef().num)->type == xrefEntryFree) { - return; // already marked as free => should be replaced - } - xRef->add(obj->getRef().num + numOffset, obj->getRef().gen, 0, gTrue); - if (getXRef()->getEntry(obj->getRef().num)->type == xrefEntryCompressed) { - xRef->getEntry(obj->getRef().num + numOffset)->type = xrefEntryCompressed; - } - } - if (obj->getRef().num + (int) numOffset >= countRef->getNumObjects() || - countRef->getEntry(obj->getRef().num + numOffset)->type == xrefEntryFree) - { - countRef->add(obj->getRef().num + numOffset, 1, 0, gTrue); - } else { - XRefEntry *entry = countRef->getEntry(obj->getRef().num + numOffset); - entry->gen++; - if (entry->gen > 9) - break; - } - Object obj1 = getXRef()->fetch(obj->getRef().num, obj->getRef().gen); - markObject(&obj1, xRef, countRef, numOffset, oldRefNum, newRefNum); - } - break; - default: - break; - } -} - -void PDFDoc::replacePageDict(int pageNo, int rotate, - PDFRectangle *mediaBox, - PDFRectangle *cropBox) -{ - Ref *refPage = getCatalog()->getPageRef(pageNo); - Object page = getXRef()->fetch(refPage->num, refPage->gen); - Dict *pageDict = page.getDict(); - pageDict->remove("MediaBoxssdf"); - pageDict->remove("MediaBox"); - pageDict->remove("CropBox"); - pageDict->remove("ArtBox"); - pageDict->remove("BleedBox"); - pageDict->remove("TrimBox"); - pageDict->remove("Rotate"); - Array *mediaBoxArray = new Array(getXRef()); - mediaBoxArray->add(Object(mediaBox->x1)); - mediaBoxArray->add(Object(mediaBox->y1)); - mediaBoxArray->add(Object(mediaBox->x2)); - mediaBoxArray->add(Object(mediaBox->y2)); - Object mediaBoxObject(mediaBoxArray); - Object trimBoxObject = mediaBoxObject.copy(); - pageDict->add(copyString("MediaBox"), std::move(mediaBoxObject)); - if (cropBox != nullptr) { - Array *cropBoxArray = new Array(getXRef()); - cropBoxArray->add(Object(cropBox->x1)); - cropBoxArray->add(Object(cropBox->y1)); - cropBoxArray->add(Object(cropBox->x2)); - cropBoxArray->add(Object(cropBox->y2)); - Object cropBoxObject(cropBoxArray); - trimBoxObject = cropBoxObject.copy(); - pageDict->add(copyString("CropBox"), std::move(cropBoxObject)); - } - pageDict->add(copyString("TrimBox"), std::move(trimBoxObject)); - pageDict->add(copyString("Rotate"), Object(rotate)); - getXRef()->setModifiedObject(&page, *refPage); -} - -void PDFDoc::markPageObjects(Dict *pageDict, XRef *xRef, XRef *countRef, Guint numOffset, int oldRefNum, int newRefNum, std::set<Dict*> *alreadyMarkedDicts) -{ - pageDict->remove("OpenAction"); - pageDict->remove("Outlines"); - pageDict->remove("StructTreeRoot"); - - for (int n = 0; n < pageDict->getLength(); n++) { - const char *key = pageDict->getKey(n); - Object value = pageDict->getValNF(n); - if (strcmp(key, "Parent") != 0 && - strcmp(key, "Pages") != 0 && - strcmp(key, "AcroForm") != 0 && - strcmp(key, "Annots") != 0 && - strcmp(key, "P") != 0 && - strcmp(key, "Root") != 0) { - markObject(&value, xRef, countRef, numOffset, oldRefNum, newRefNum, alreadyMarkedDicts); - } - } -} - -GBool PDFDoc::markAnnotations(Object *annotsObj, XRef *xRef, XRef *countRef, Guint numOffset, int oldPageNum, int newPageNum, std::set<Dict*> *alreadyMarkedDicts) { - GBool modified = gFalse; - Object annots = annotsObj->fetch(getXRef()); - if (annots.isArray()) { - Array *array = annots.getArray(); - for (int i=array->getLength() - 1; i >= 0; i--) { - Object obj1 = array->get(i); - if (obj1.isDict()) { - Dict *dict = obj1.getDict(); - Object type = dict->lookup("Type"); - if (type.isName() && strcmp(type.getName(), "Annot") == 0) { - Object obj2 = dict->lookupNF("P"); - if (obj2.isRef()) { - if (obj2.getRef().num == oldPageNum) { - Object obj3 = array->getNF(i); - if (obj3.isRef()) { - dict->set("P", Object(newPageNum, 0)); - getXRef()->setModifiedObject(&obj1, obj3.getRef()); - } - } else if (obj2.getRef().num == newPageNum) { - continue; - } else { - Object page = getXRef()->fetch(obj2.getRef().num, obj2.getRef().gen); - if (page.isDict()) { - Dict *pageDict = page.getDict(); - Object pagetype = pageDict->lookup("Type"); - if (!pagetype.isName() || strcmp(pagetype.getName(), "Page") != 0) { - continue; - } - } - array->remove(i); - modified = gTrue; - continue; - } - } - } - markPageObjects(dict, xRef, countRef, numOffset, oldPageNum, newPageNum, alreadyMarkedDicts); - } - obj1 = array->getNF(i); - if (obj1.isRef()) { - if (obj1.getRef().num + (int) numOffset >= xRef->getNumObjects() || xRef->getEntry(obj1.getRef().num + numOffset)->type == xrefEntryFree) { - if (getXRef()->getEntry(obj1.getRef().num)->type == xrefEntryFree) { - continue; // already marked as free => should be replaced - } - xRef->add(obj1.getRef().num + numOffset, obj1.getRef().gen, 0, gTrue); - if (getXRef()->getEntry(obj1.getRef().num)->type == xrefEntryCompressed) { - xRef->getEntry(obj1.getRef().num + numOffset)->type = xrefEntryCompressed; - } - } - if (obj1.getRef().num + (int) numOffset >= countRef->getNumObjects() || - countRef->getEntry(obj1.getRef().num + numOffset)->type == xrefEntryFree) - { - countRef->add(obj1.getRef().num + numOffset, 1, 0, gTrue); - } else { - XRefEntry *entry = countRef->getEntry(obj1.getRef().num + numOffset); - entry->gen++; - } - } - } - } - if (annotsObj->isRef()) { - if (annotsObj->getRef().num + (int) numOffset >= xRef->getNumObjects() || xRef->getEntry(annotsObj->getRef().num + numOffset)->type == xrefEntryFree) { - if (getXRef()->getEntry(annotsObj->getRef().num)->type == xrefEntryFree) { - return modified; // already marked as free => should be replaced - } - xRef->add(annotsObj->getRef().num + numOffset, annotsObj->getRef().gen, 0, gTrue); - if (getXRef()->getEntry(annotsObj->getRef().num)->type == xrefEntryCompressed) { - xRef->getEntry(annotsObj->getRef().num + numOffset)->type = xrefEntryCompressed; - } - } - if (annotsObj->getRef().num + (int) numOffset >= countRef->getNumObjects() || - countRef->getEntry(annotsObj->getRef().num + numOffset)->type == xrefEntryFree) - { - countRef->add(annotsObj->getRef().num + numOffset, 1, 0, gTrue); - } else { - XRefEntry *entry = countRef->getEntry(annotsObj->getRef().num + numOffset); - entry->gen++; - } - getXRef()->setModifiedObject(&annots, annotsObj->getRef()); - } - return modified; -} - -void PDFDoc::markAcroForm(Object *afObj, XRef *xRef, XRef *countRef, Guint numOffset, int oldRefNum, int newRefNum) { - GBool modified = gFalse; - Object acroform = afObj->fetch(getXRef()); - if (acroform.isDict()) { - Dict *dict = acroform.getDict(); - for (int i=0; i < dict->getLength(); i++) { - if (strcmp(dict->getKey(i), "Fields") == 0) { - Object fields = dict->getValNF(i); - modified = markAnnotations(&fields, xRef, countRef, numOffset, oldRefNum, newRefNum); - } else { - Object obj = dict->getValNF(i); - markObject(&obj, xRef, countRef, numOffset, oldRefNum, newRefNum); - } - } - } - if (afObj->isRef()) { - if (afObj->getRef().num + (int) numOffset >= xRef->getNumObjects() || xRef->getEntry(afObj->getRef().num + numOffset)->type == xrefEntryFree) { - if (getXRef()->getEntry(afObj->getRef().num)->type == xrefEntryFree) { - return; // already marked as free => should be replaced - } - xRef->add(afObj->getRef().num + numOffset, afObj->getRef().gen, 0, gTrue); - if (getXRef()->getEntry(afObj->getRef().num)->type == xrefEntryCompressed) { - xRef->getEntry(afObj->getRef().num + numOffset)->type = xrefEntryCompressed; - } - } - if (afObj->getRef().num + (int) numOffset >= countRef->getNumObjects() || - countRef->getEntry(afObj->getRef().num + numOffset)->type == xrefEntryFree) - { - countRef->add(afObj->getRef().num + numOffset, 1, 0, gTrue); - } else { - XRefEntry *entry = countRef->getEntry(afObj->getRef().num + numOffset); - entry->gen++; - } - if (modified){ - getXRef()->setModifiedObject(&acroform, afObj->getRef()); - } - } - return; -} - -Guint PDFDoc::writePageObjects(OutStream *outStr, XRef *xRef, Guint numOffset, GBool combine) -{ - Guint objectsCount = 0; //count the number of objects in the XRef(s) - Guchar *fileKey; - CryptAlgorithm encAlgorithm; - int keyLength; - xRef->getEncryptionParameters(&fileKey, &encAlgorithm, &keyLength); - - for (int n = numOffset; n < xRef->getNumObjects(); n++) { - if (xRef->getEntry(n)->type != xrefEntryFree) { - Ref ref; - ref.num = n; - ref.gen = xRef->getEntry(n)->gen; - objectsCount++; - Object obj = getXRef()->fetch(ref.num - numOffset, ref.gen); - Goffset offset = writeObjectHeader(&ref, outStr); - if (combine) { - writeObject(&obj, outStr, getXRef(), numOffset, nullptr, cryptRC4, 0, 0, 0); - } else if (xRef->getEntry(n)->getFlag(XRefEntry::Unencrypted)) { - writeObject(&obj, outStr, nullptr, cryptRC4, 0, 0, 0); - } else { - writeObject(&obj, outStr, fileKey, encAlgorithm, keyLength, ref.num, ref.gen); - } - writeObjectFooter(outStr); - xRef->add(ref.num, ref.gen, offset, gTrue); - } - } - return objectsCount; -} - -#ifndef DISABLE_OUTLINE -Outline *PDFDoc::getOutline() -{ - if (!outline) { - pdfdocLocker(); - // read outline - outline = new Outline(catalog->getOutline(), xref); - } - - return outline; -} -#endif - -PDFDoc *PDFDoc::ErrorPDFDoc(int errorCode, GooString *fileNameA) -{ - PDFDoc *doc = new PDFDoc(); - doc->errCode = errorCode; - doc->fileName = fileNameA; - - return doc; -} - -long long PDFDoc::strToLongLong(char *s) { - long long x, d; - char *p; - - x = 0; - for (p = s; *p && isdigit(*p & 0xff); ++p) { - d = *p - '0'; - if (x > (LLONG_MAX - d) / 10) { - break; - } - x = 10 * x + d; - } - return x; -} - -// Read the 'startxref' position. -Goffset PDFDoc::getStartXRef(GBool tryingToReconstruct) -{ - if (startXRefPos == -1) { - - if (isLinearized(tryingToReconstruct)) { - char buf[linearizationSearchSize+1]; - int c, n, i; - - str->setPos(0); - for (n = 0; n < linearizationSearchSize; ++n) { - if ((c = str->getChar()) == EOF) { - break; - } - buf[n] = c; - } - buf[n] = '\0'; - - // find end of first obj (linearization dictionary) - startXRefPos = 0; - for (i = 0; i < n; i++) { - if (!strncmp("endobj", &buf[i], 6)) { - i += 6; - //skip whitespace - while (buf[i] && Lexer::isSpace(buf[i])) ++i; - startXRefPos = i; - break; - } - } - } else { - char buf[xrefSearchSize+1]; - char *p; - int c, n, i; - - // read last xrefSearchSize bytes - int segnum = 0; - int maxXRefSearch = 24576; - if (str->getLength() < maxXRefSearch) maxXRefSearch = str->getLength(); - for (; (xrefSearchSize - 16) * segnum < maxXRefSearch; segnum++) { - str->setPos((xrefSearchSize - 16) * segnum + xrefSearchSize, -1); - for (n = 0; n < xrefSearchSize; ++n) { - if ((c = str->getChar()) == EOF) { - break; - } - buf[n] = c; - } - buf[n] = '\0'; - - // find startxref - for (i = n - 9; i >= 0; --i) { - if (!strncmp(&buf[i], "startxref", 9)) { - break; - } - } - if (i < 0) { - startXRefPos = 0; - } else { - for (p = &buf[i + 9]; isspace(*p); ++p); - startXRefPos = strToLongLong(p); - break; - } - } - } - - } - - return startXRefPos; -} - -Goffset PDFDoc::getMainXRefEntriesOffset(GBool tryingToReconstruct) -{ - Guint mainXRefEntriesOffset = 0; - - if (isLinearized(tryingToReconstruct)) { - mainXRefEntriesOffset = getLinearization()->getMainXRefEntriesOffset(); - } - - return mainXRefEntriesOffset; -} - -int PDFDoc::getNumPages() -{ - if (isLinearized()) { - int n; - if ((n = getLinearization()->getNumPages())) { - return n; - } - } - - return catalog->getNumPages(); -} - -Page *PDFDoc::parsePage(int page) -{ - Ref pageRef; - - pageRef.num = getHints()->getPageObjectNum(page); - if (!pageRef.num) { - error(errSyntaxWarning, -1, "Failed to get object num from hint tables for page {0:d}", page); - return nullptr; - } - - // check for bogus ref - this can happen in corrupted PDF files - if (pageRef.num < 0 || pageRef.num >= xref->getNumObjects()) { - error(errSyntaxWarning, -1, "Invalid object num ({0:d}) for page {1:d}", pageRef.num, page); - return nullptr; - } - - pageRef.gen = xref->getEntry(pageRef.num)->gen; - Object obj = xref->fetch(pageRef.num, pageRef.gen); - if (!obj.isDict("Page")) { - error(errSyntaxWarning, -1, "Object ({0:d} {1:d}) is not a pageDict", pageRef.num, pageRef.gen); - return nullptr; - } - Dict *pageDict = obj.getDict(); - - return new Page(this, page, &obj, pageRef, - new PageAttrs(nullptr, pageDict), catalog->getForm()); -} - -Page *PDFDoc::getPage(int page) -{ - if ((page < 1) || page > getNumPages()) return nullptr; - - if (isLinearized() && checkLinearization()) { - pdfdocLocker(); - if (!pageCache) { - pageCache = (Page **) gmallocn(getNumPages(), sizeof(Page *)); - for (int i = 0; i < getNumPages(); i++) { - pageCache[i] = nullptr; - } - } - if (!pageCache[page-1]) { - pageCache[page-1] = parsePage(page); - } - if (pageCache[page-1]) { - return pageCache[page-1]; - } else { - error(errSyntaxWarning, -1, "Failed parsing page {0:d} using hint tables", page); - } - } - - return catalog->getPage(page); -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/PDFDoc.h b/Build/source/libs/poppler/poppler-src/poppler/PDFDoc.h deleted file mode 100644 index 1678d1678e9..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/PDFDoc.h +++ /dev/null @@ -1,394 +0,0 @@ -//======================================================================== -// -// PDFDoc.h -// -// Copyright 1996-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2005, 2006, 2008 Brad Hards <bradh@frogmouth.net> -// Copyright (C) 2005, 2009, 2014, 2015, 2017, 2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2008 Julien Rebetez <julienr@svn.gnome.org> -// Copyright (C) 2008 Pino Toscano <pino@kde.org> -// Copyright (C) 2008 Carlos Garcia Campos <carlosgc@gnome.org> -// Copyright (C) 2009 Eric Toombs <ewtoombs@uwaterloo.ca> -// Copyright (C) 2009 Kovid Goyal <kovid@kovidgoyal.net> -// Copyright (C) 2010, 2014 Hib Eris <hib@hiberis.nl> -// Copyright (C) 2010 Srinivas Adicherla <srinivas.adicherla@geodesic.com> -// Copyright (C) 2011, 2013, 2014, 2016 Thomas Freitag <Thomas.Freitag@alfa.de> -// Copyright (C) 2012 Fabio D'Urso <fabiodurso@hotmail.it> -// Copyright (C) 2013, 2017 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2013 Adam Reichold <adamreichold@myopera.com> -// Copyright (C) 2013 Adrian Perez de Castro <aperez@igalia.com> -// Copyright (C) 2015 André Guerreiro <aguerreiro1985@gmail.com> -// Copyright (C) 2015 André Esser <bepandre@hotmail.com> -// Copyright (C) 2016 Jakub Alba <jakubalba@gmail.com> -// 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 -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef PDFDOC_H -#define PDFDOC_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "poppler-config.h" -#include <stdio.h> -#include "goo/GooMutex.h" -#include "XRef.h" -#include "Catalog.h" -#include "Page.h" -#include "Annot.h" -#include "Form.h" -#include "OptionalContent.h" -#include "Stream.h" - -class GooString; -class GooFile; -class BaseStream; -class OutputDev; -class Links; -class LinkAction; -class LinkDest; -class Outline; -class Linearization; -class SecurityHandler; -class Hints; -class StructTreeRoot; - -enum PDFWriteMode { - writeStandard, - writeForceRewrite, - writeForceIncremental -}; - -//------------------------------------------------------------------------ -// PDFDoc -//------------------------------------------------------------------------ - -class PDFDoc { -public: - - PDFDoc(GooString *fileNameA, GooString *ownerPassword = NULL, - GooString *userPassword = NULL, void *guiDataA = NULL); - -#ifdef _WIN32 - PDFDoc(wchar_t *fileNameA, int fileNameLen, GooString *ownerPassword = NULL, - GooString *userPassword = NULL, void *guiDataA = NULL); -#endif - - PDFDoc(BaseStream *strA, GooString *ownerPassword = NULL, - GooString *userPassword = NULL, void *guiDataA = NULL); - ~PDFDoc(); - - PDFDoc(const PDFDoc &) = delete; - PDFDoc& operator=(const PDFDoc &) = delete; - - static PDFDoc *ErrorPDFDoc(int errorCode, GooString *fileNameA = NULL); - - // Was PDF document successfully opened? - GBool isOk() { return ok; } - - // Get the error code (if isOk() returns false). - int getErrorCode() { return errCode; } - - // Get the error code returned by fopen() (if getErrorCode() == - // errOpenFile). - int getFopenErrno() { return fopenErrno; } - - // Get file name. - GooString *getFileName() { return fileName; } -#ifdef _WIN32 - wchar_t *getFileNameU() { return fileNameU; } -#endif - - // Get the linearization table. - Linearization *getLinearization(); - GBool checkLinearization(); - - // Get the xref table. - XRef *getXRef() { return xref; } - - // Get catalog. - Catalog *getCatalog() { return catalog; } - - // Get optional content configuration - OCGs *getOptContentConfig() { return catalog->getOptContentConfig(); } - - // Get base stream. - BaseStream *getBaseStream() { return str; } - - // Get page parameters. - double getPageMediaWidth(int page) - { return getPage(page) ? getPage(page)->getMediaWidth() : 0.0 ; } - double getPageMediaHeight(int page) - { return getPage(page) ? getPage(page)->getMediaHeight() : 0.0 ; } - double getPageCropWidth(int page) - { return getPage(page) ? getPage(page)->getCropWidth() : 0.0 ; } - double getPageCropHeight(int page) - { return getPage(page) ? getPage(page)->getCropHeight() : 0.0 ; } - int getPageRotate(int page) - { return getPage(page) ? getPage(page)->getRotate() : 0 ; } - - // Get number of pages. - int getNumPages(); - - // Return the contents of the metadata stream, or NULL if there is - // no metadata. - GooString *readMetadata() { return catalog->readMetadata(); } - - // Return the structure tree root object. - StructTreeRoot *getStructTreeRoot() { return catalog->getStructTreeRoot(); } - - // Get page. - Page *getPage(int page); - - // Display a page. - void displayPage(OutputDev *out, int page, - double hDPI, double vDPI, int rotate, - GBool useMediaBox, GBool crop, GBool printing, - GBool (*abortCheckCbk)(void *data) = NULL, - void *abortCheckCbkData = NULL, - GBool (*annotDisplayDecideCbk)(Annot *annot, void *user_data) = NULL, - void *annotDisplayDecideCbkData = NULL, GBool copyXRef = gFalse); - - // Display a range of pages. - void displayPages(OutputDev *out, int firstPage, int lastPage, - double hDPI, double vDPI, int rotate, - GBool useMediaBox, GBool crop, GBool printing, - GBool (*abortCheckCbk)(void *data) = NULL, - void *abortCheckCbkData = NULL, - GBool (*annotDisplayDecideCbk)(Annot *annot, void *user_data) = NULL, - void *annotDisplayDecideCbkData = NULL); - - // Display part of a page. - void displayPageSlice(OutputDev *out, int page, - double hDPI, double vDPI, int rotate, - GBool useMediaBox, GBool crop, GBool printing, - int sliceX, int sliceY, int sliceW, int sliceH, - GBool (*abortCheckCbk)(void *data) = NULL, - void *abortCheckCbkData = NULL, - GBool (*annotDisplayDecideCbk)(Annot *annot, void *user_data) = NULL, - void *annotDisplayDecideCbkData = NULL, GBool copyXRef = gFalse); - - // Find a page, given its object ID. Returns page number, or 0 if - // not found. - int findPage(int num, int gen) { return catalog->findPage(num, gen); } - - // Returns the links for the current page, transferring ownership to - // the caller. - Links *getLinks(int page); - - // Find a named destination. Returns the link destination, or - // NULL if <name> is not a destination. - LinkDest *findDest(const GooString *name) - { return catalog->findDest(name); } - - // Process the links for a page. - void processLinks(OutputDev *out, int page); - - -#ifndef DISABLE_OUTLINE - // Return the outline object. - Outline *getOutline(); -#endif - - // Is the file encrypted? - GBool isEncrypted() { return xref->isEncrypted(); } - - std::vector<FormWidgetSignature*> getSignatureWidgets(); - - // Check various permissions. - GBool okToPrint(GBool ignoreOwnerPW = gFalse) - { return xref->okToPrint(ignoreOwnerPW); } - GBool okToPrintHighRes(GBool ignoreOwnerPW = gFalse) - { return xref->okToPrintHighRes(ignoreOwnerPW); } - GBool okToChange(GBool ignoreOwnerPW = gFalse) - { return xref->okToChange(ignoreOwnerPW); } - GBool okToCopy(GBool ignoreOwnerPW = gFalse) - { return xref->okToCopy(ignoreOwnerPW); } - GBool okToAddNotes(GBool ignoreOwnerPW = gFalse) - { return xref->okToAddNotes(ignoreOwnerPW); } - GBool okToFillForm(GBool ignoreOwnerPW = gFalse) - { return xref->okToFillForm(ignoreOwnerPW); } - GBool okToAccessibility(GBool ignoreOwnerPW = gFalse) - { return xref->okToAccessibility(ignoreOwnerPW); } - GBool okToAssemble(GBool ignoreOwnerPW = gFalse) - { return xref->okToAssemble(ignoreOwnerPW); } - - - // Is this document linearized? - GBool isLinearized(GBool tryingToReconstruct = gFalse); - - // Return the document's Info dictionary (if any). - Object getDocInfo() { return xref->getDocInfo(); } - Object getDocInfoNF() { return xref->getDocInfoNF(); } - - // Create and return the document's Info dictionary if none exists. - // Otherwise return the existing one. - Object createDocInfoIfNoneExists() { return xref->createDocInfoIfNoneExists(); } - - // Remove the document's Info dictionary and update the trailer dictionary. - void removeDocInfo() { xref->removeDocInfo(); } - - // Set doc info string entry. NULL or empty value will cause a removal. - // Takes ownership of value. - void setDocInfoStringEntry(const char *key, GooString *value); - - // Set document's properties in document's Info dictionary. - // NULL or empty value will cause a removal. - // Takes ownership of value. - void setDocInfoTitle(GooString *title) { setDocInfoStringEntry("Title", title); } - void setDocInfoAuthor(GooString *author) { setDocInfoStringEntry("Author", author); } - void setDocInfoSubject(GooString *subject) { setDocInfoStringEntry("Subject", subject); } - void setDocInfoKeywords(GooString *keywords) { setDocInfoStringEntry("Keywords", keywords); } - void setDocInfoCreator(GooString *creator) { setDocInfoStringEntry("Creator", creator); } - void setDocInfoProducer(GooString *producer) { setDocInfoStringEntry("Producer", producer); } - void setDocInfoCreatDate(GooString *creatDate) { setDocInfoStringEntry("CreationDate", creatDate); } - void setDocInfoModDate(GooString *modDate) { setDocInfoStringEntry("ModDate", modDate); } - - // Get document's properties from document's Info dictionary. - // Returns NULL on fail. - // Returned GooStrings should be freed by the caller. - GooString *getDocInfoStringEntry(const char *key); - - GooString *getDocInfoTitle() { return getDocInfoStringEntry("Title"); } - GooString *getDocInfoAuthor() { return getDocInfoStringEntry("Author"); } - GooString *getDocInfoSubject() { return getDocInfoStringEntry("Subject"); } - GooString *getDocInfoKeywords() { return getDocInfoStringEntry("Keywords"); } - GooString *getDocInfoCreator() { return getDocInfoStringEntry("Creator"); } - GooString *getDocInfoProducer() { return getDocInfoStringEntry("Producer"); } - GooString *getDocInfoCreatDate() { return getDocInfoStringEntry("CreationDate"); } - GooString *getDocInfoModDate() { return getDocInfoStringEntry("ModDate"); } - - // Return the PDF version specified by the file. - int getPDFMajorVersion() { return pdfMajorVersion; } - int getPDFMinorVersion() { return pdfMinorVersion; } - - //Return the PDF ID in the trailer dictionary (if any). - GBool getID(GooString *permanent_id, GooString *update_id); - - // Save one page with another name. - int savePageAs(GooString *name, int pageNo); - // Save this file with another name. - int saveAs(GooString *name, PDFWriteMode mode=writeStandard); - // Save this file in the given output stream. - int saveAs(OutStream *outStr, PDFWriteMode mode=writeStandard); - // Save this file with another name without saving changes - int saveWithoutChangesAs(GooString *name); - // Save this file in the given output stream without saving changes - int saveWithoutChangesAs(OutStream *outStr); - - // Return a pointer to the GUI (XPDFCore or WinPDFCore object). - void *getGUIData() { return guiData; } - - // rewrite pageDict with MediaBox, CropBox and new page CTM - void replacePageDict(int pageNo, int rotate, PDFRectangle *mediaBox, PDFRectangle *cropBox); - void markPageObjects(Dict *pageDict, XRef *xRef, XRef *countRef, Guint numOffset, int oldRefNum, int newRefNum, std::set<Dict*> *alreadyMarkedDicts = nullptr); - GBool markAnnotations(Object *annots, XRef *xRef, XRef *countRef, Guint numOffset, int oldPageNum, int newPageNum, std::set<Dict*> *alreadyMarkedDicts = nullptr); - void markAcroForm(Object *acrpForm, XRef *xRef, XRef *countRef, Guint numOffset, int oldPageNum, int newPageNum); - // write all objects used by pageDict to outStr - Guint writePageObjects(OutStream *outStr, XRef *xRef, Guint numOffset, GBool combine = gFalse); - static void writeObject (Object *obj, OutStream* outStr, XRef *xref, Guint numOffset, Guchar *fileKey, - CryptAlgorithm encAlgorithm, int keyLength, int objNum, int objGen, std::set<Dict*> *alreadyWrittenDicts = nullptr); - static void writeHeader(OutStream *outStr, int major, int minor); - - static Object createTrailerDict (int uxrefSize, GBool incrUpdate, Goffset startxRef, - Ref *root, XRef *xRef, const char *fileName, Goffset fileSize); - static void writeXRefTableTrailer (Object &&trailerDict, XRef *uxref, GBool writeAllEntries, - Goffset uxrefOffset, OutStream* outStr, XRef *xRef); - static void writeXRefStreamTrailer (Object &&trailerDict, XRef *uxref, Ref *uxrefStreamRef, - Goffset uxrefOffset, OutStream* outStr, XRef *xRef); - -private: - // insert referenced objects in XRef - void markDictionnary (Dict* dict, XRef *xRef, XRef *countRef, Guint numOffset, int oldRefNum, int newRefNum, std::set<Dict*> *alreadyMarkedDicts); - void markObject (Object *obj, XRef *xRef, XRef *countRef, Guint numOffset, int oldRefNum, int newRefNum, std::set<Dict*> *alreadyMarkedDicts = nullptr); - static void writeDictionnary (Dict* dict, OutStream* outStr, XRef *xRef, Guint numOffset, Guchar *fileKey, - CryptAlgorithm encAlgorithm, int keyLength, int objNum, int objGen, std::set<Dict*> *alreadyWrittenDicts); - - // Write object header to current file stream and return its offset - static Goffset writeObjectHeader (Ref *ref, OutStream* outStr); - static void writeObjectFooter (OutStream* outStr); - - void writeObject (Object *obj, OutStream* outStr, Guchar *fileKey, CryptAlgorithm encAlgorithm, - int keyLength, int objNum, int objGen, std::set<Dict*> *alreadyWrittenDicts = nullptr) - { writeObject(obj, outStr, getXRef(), 0, fileKey, encAlgorithm, keyLength, objNum, objGen, alreadyWrittenDicts); } - static void writeStream (Stream* str, OutStream* outStr); - static void writeRawStream (Stream* str, OutStream* outStr); - void writeXRefTableTrailer (Goffset uxrefOffset, XRef *uxref, GBool writeAllEntries, - int uxrefSize, OutStream* outStr, GBool incrUpdate); - static void writeString (const GooString* s, OutStream* outStr, Guchar *fileKey, - CryptAlgorithm encAlgorithm, int keyLength, int objNum, int objGen); - void saveIncrementalUpdate (OutStream* outStr); - void saveCompleteRewrite (OutStream* outStr); - - Page *parsePage(int page); - - // Get hints. - Hints *getHints(); - - PDFDoc(); - void init(); - GBool setup(GooString *ownerPassword, GooString *userPassword); - GBool checkFooter(); - void checkHeader(); - GBool checkEncryption(GooString *ownerPassword, GooString *userPassword); - // Get the offset of the start xref table. - Goffset getStartXRef(GBool tryingToReconstruct = gFalse); - // Get the offset of the entries in the main XRef table of a - // linearized document (0 for non linearized documents). - Goffset getMainXRefEntriesOffset(GBool tryingToReconstruct = gFalse); - long long strToLongLong(char *s); - - // Mark the document's Info dictionary as modified. - void setDocInfoModified(Object *infoObj); - - GooString *fileName; -#ifdef _WIN32 - wchar_t *fileNameU; -#endif - GooFile *file; - BaseStream *str; - void *guiData; - int pdfMajorVersion; - int pdfMinorVersion; - Linearization *linearization; - // linearizationState = 0: unchecked - // linearizationState = 1: checked and valid - // linearizationState = 2: checked and invalid - int linearizationState; - XRef *xref; - SecurityHandler *secHdlr; - Catalog *catalog; - Hints *hints; -#ifndef DISABLE_OUTLINE - Outline *outline; -#endif - Page **pageCache; - - GBool ok; - int errCode; - //If there is an error opening the PDF file with fopen() in the constructor, - //then the POSIX errno will be here. - int fopenErrno; - - Goffset startXRefPos; // offset of last xref table -#ifdef MULTITHREADED - GooMutex mutex; -#endif -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/PDFDocBuilder.h b/Build/source/libs/poppler/poppler-src/poppler/PDFDocBuilder.h deleted file mode 100644 index 8239f6829b2..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/PDFDocBuilder.h +++ /dev/null @@ -1,46 +0,0 @@ -//======================================================================== -// -// PDFDocBuilder.h -// -// This file is licensed under the GPLv2 or later -// -// Copyright 2010 Hib Eris <hib@hiberis.nl> -// Copyright 2010, 2018 Albert Astals Cid <aacid@kde.org> -// -//======================================================================== - -#ifndef PDFDOCBUILDER_H -#define PDFDOCBUILDER_H - -#include "PDFDoc.h" -class GooString; - -//------------------------------------------------------------------------ -// PDFDocBuilder -// -// PDFDocBuilder is an abstract class that specifies the interface for -// constructing PDFDocs. -//------------------------------------------------------------------------ - -class PDFDocBuilder { - -public: - - PDFDocBuilder() = default; - virtual ~PDFDocBuilder() = default; - - PDFDocBuilder(const PDFDocBuilder &) = delete; - PDFDocBuilder& operator=(const PDFDocBuilder &) = delete; - - // Builds a new PDFDoc. Returns a PDFDoc. You should check this PDFDoc - // with PDFDoc::isOk() for failures. - // The caller is responsible for deleting ownerPassword, userPassWord and guiData. - virtual PDFDoc *buildPDFDoc(const GooString &uri, GooString *ownerPassword = NULL, - GooString *userPassword = NULL, void *guiDataA = NULL) = 0; - - // Returns gTrue if the builder supports building a PDFDoc from the URI. - virtual GBool supports(const GooString &uri) = 0; - -}; - -#endif /* PDFDOCBUILDER_H */ diff --git a/Build/source/libs/poppler/poppler-src/poppler/PDFDocEncoding.cc b/Build/source/libs/poppler/poppler-src/poppler/PDFDocEncoding.cc deleted file mode 100644 index 79408346419..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/PDFDocEncoding.cc +++ /dev/null @@ -1,69 +0,0 @@ -//======================================================================== -// -// PDFDocEncoding.cc -// -// Copyright 2002-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2008 Michael Vrable <mvrable@cs.ucsd.edu> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include "PDFDocEncoding.h" - -// Mapping of PDFDocEncoding (used to represent text values such as document -// metadata or annotation text) to Unicode codepoints. Not all 8-bit values in -// PDFDocEncoding are defined; undefined bytes are mapped to U+FFFD (Unicode -// replacement character). -// -// PDFDocEncoding is only directly defined for printable characters, but some -// control characters such as carriage return will still be used. We define -// mappings of the standard whitespace control characters (tabs, newlines) to -// the corresponding Unicode values. Other control characters are left -// undefined. - -Unicode pdfDocEncoding[256] = { - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, // 00 - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, // 10 - 0x02d8, 0x02c7, 0x02c6, 0x02d9, 0x02dd, 0x02db, 0x02da, 0x02dc, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, // 20 - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, // 30 - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, // 40 - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, // 50 - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, // 60 - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, // 70 - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0xfffd, - 0x2022, 0x2020, 0x2021, 0x2026, 0x2014, 0x2013, 0x0192, 0x2044, // 80 - 0x2039, 0x203a, 0x2212, 0x2030, 0x201e, 0x201c, 0x201d, 0x2018, - 0x2019, 0x201a, 0x2122, 0xfb01, 0xfb02, 0x0141, 0x0152, 0x0160, // 90 - 0x0178, 0x017d, 0x0131, 0x0142, 0x0153, 0x0161, 0x017e, 0xfffd, - 0x20ac, 0x00a1, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, // a0 - 0x00a8, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0xfffd, 0x00ae, 0x00af, - 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7, // b0 - 0x00b8, 0x00b9, 0x00ba, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00bf, - 0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7, // c0 - 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf, - 0x00d0, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7, // d0 - 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x00de, 0x00df, - 0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7, // e0 - 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef, - 0x00f0, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7, // f0 - 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x00ff -}; diff --git a/Build/source/libs/poppler/poppler-src/poppler/PDFDocEncoding.h b/Build/source/libs/poppler/poppler-src/poppler/PDFDocEncoding.h deleted file mode 100644 index eed599fa366..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/PDFDocEncoding.h +++ /dev/null @@ -1,34 +0,0 @@ -//======================================================================== -// -// PDFDocEncoding.h -// -// Copyright 2002-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2007 Adrian Johnson <ajohnson@redneon.com> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef PDFDOCENCODING_H -#define PDFDOCENCODING_H - -#include "CharTypes.h" - -class GooString; - -extern Unicode pdfDocEncoding[256]; - -char* pdfDocEncodingToUTF16 (const GooString* orig, int* length); - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/PDFDocFactory.cc b/Build/source/libs/poppler/poppler-src/poppler/PDFDocFactory.cc deleted file mode 100644 index cbd1395f5bb..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/PDFDocFactory.cc +++ /dev/null @@ -1,73 +0,0 @@ -//======================================================================== -// -// PDFDocFactory.cc -// -// This file is licensed under the GPLv2 or later -// -// Copyright 2010 Hib Eris <hib@hiberis.nl> -// Copyright 2010 Albert Astals Cid <aacid@kde.org> -// Copyright 2017 Adrian Johnson <ajohnson@redneon.com> -// -//======================================================================== - -#include <config.h> - -#include "PDFDocFactory.h" - -#include "goo/GooList.h" -#include "goo/GooString.h" -#include "PDFDoc.h" -#include "LocalPDFDocBuilder.h" -#include "StdinPDFDocBuilder.h" -#ifdef ENABLE_LIBCURL -#include "CurlPDFDocBuilder.h" -#endif -#include "ErrorCodes.h" - -//------------------------------------------------------------------------ -// PDFDocFactory -//------------------------------------------------------------------------ - -PDFDocFactory::PDFDocFactory(GooList *pdfDocBuilders) -{ - if (pdfDocBuilders) { - builders = pdfDocBuilders; - } else { - builders = new GooList(); - } -#ifdef ENABLE_LIBCURL - builders->insert(0, new CurlPDFDocBuilder()); -#endif - builders->insert(0, new StdinPDFDocBuilder()); - builders->insert(0, new LocalPDFDocBuilder()); -} - -PDFDocFactory::~PDFDocFactory() -{ - if (builders) { - deleteGooList(builders, PDFDocBuilder); - } -} - -PDFDoc * -PDFDocFactory::createPDFDoc(const GooString &uri, GooString *ownerPassword, - GooString *userPassword, void *guiDataA) -{ - for (int i = builders->getLength() - 1; i >= 0 ; i--) { - PDFDocBuilder *builder = (PDFDocBuilder *) builders->get(i); - if (builder->supports(uri)) { - return builder->buildPDFDoc(uri, ownerPassword, userPassword, guiDataA); - } - } - - error(errInternal, -1, "Cannot handle URI '{0:t}'.", &uri); - GooString *fileName = uri.copy(); - return PDFDoc::ErrorPDFDoc(errOpenFile, fileName); -} - -void PDFDocFactory::registerPDFDocBuilder(PDFDocBuilder *pdfDocBuilder) -{ - builders->append(pdfDocBuilder); -} - - diff --git a/Build/source/libs/poppler/poppler-src/poppler/PDFDocFactory.h b/Build/source/libs/poppler/poppler-src/poppler/PDFDocFactory.h deleted file mode 100644 index 8e14fd6b74f..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/PDFDocFactory.h +++ /dev/null @@ -1,58 +0,0 @@ -//======================================================================== -// -// PDFDocFactory.h -// -// This file is licensed under the GPLv2 or later -// -// Copyright 2010 Hib Eris <hib@hiberis.nl> -// Copyright 2010, 2018 Albert Astals Cid <aacid@kde.org> -// -//======================================================================== - -#ifndef PDFDOCFACTORY_H -#define PDFDOCFACTORY_H - -#include "PDFDoc.h" - -class GooList; -class GooString; -class PDFDocBuilder; - -//------------------------------------------------------------------------ -// PDFDocFactory -// -// PDFDocFactory allows the construction of PDFDocs from different URIs. -// -// By default, it supports local files, 'file://' and 'fd:0' (stdin). When -// compiled with libcurl, it also supports 'http://' and 'https://'. -// -// You can extend the supported URIs by giving a list of PDFDocBuilders to -// the constructor, or by registering a new PDFDocBuilder afterwards. -//------------------------------------------------------------------------ - -class PDFDocFactory { - -public: - - PDFDocFactory(GooList *pdfDocBuilders = NULL); - ~PDFDocFactory(); - - PDFDocFactory(const PDFDocFactory &) = delete; - PDFDocFactory& operator=(const PDFDocFactory &) = delete; - - // Create a PDFDoc. Returns a PDFDoc. You should check this PDFDoc - // with PDFDoc::isOk() for failures. - // The caller is responsible for deleting ownerPassword, userPassWord and guiData. - PDFDoc *createPDFDoc(const GooString &uri, GooString *ownerPassword = NULL, - GooString *userPassword = NULL, void *guiDataA = NULL); - - // Extend supported URIs with the ones from the PDFDocBuilder. - void registerPDFDocBuilder(PDFDocBuilder *pdfDocBuilder); - -private: - - GooList *builders; - -}; - -#endif /* PDFDOCFACTORY_H */ diff --git a/Build/source/libs/poppler/poppler-src/poppler/PSOutputDev.cc b/Build/source/libs/poppler/poppler-src/poppler/PSOutputDev.cc deleted file mode 100644 index d1ead5862a8..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/PSOutputDev.cc +++ /dev/null @@ -1,7607 +0,0 @@ -//======================================================================== -// -// PSOutputDev.cc -// -// Copyright 1996-2013 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2005 Martin Kretzschmar <martink@gnome.org> -// Copyright (C) 2005, 2006 Kristian Høgsberg <krh@redhat.com> -// Copyright (C) 2006-2009, 2011-2013, 2015-2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2006 Jeff Muizelaar <jeff@infidigm.net> -// Copyright (C) 2007, 2008 Brad Hards <bradh@kde.org> -// Copyright (C) 2008, 2009 Koji Otani <sho@bbr.jp> -// Copyright (C) 2008, 2010 Hib Eris <hib@hiberis.nl> -// Copyright (C) 2009-2013 Thomas Freitag <Thomas.Freitag@alfa.de> -// Copyright (C) 2009 Till Kamppeter <till.kamppeter@gmail.com> -// Copyright (C) 2009 Carlos Garcia Campos <carlosgc@gnome.org> -// Copyright (C) 2009, 2011, 2012, 2014-2017 William Bader <williambader@hotmail.com> -// Copyright (C) 2009 Kovid Goyal <kovid@kovidgoyal.net> -// Copyright (C) 2009-2011, 2013-2015, 2017 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2012, 2014 Fabio D'Urso <fabiodurso@hotmail.it> -// Copyright (C) 2012 Lu Wang <coolwanglu@gmail.com> -// Copyright (C) 2014 Till Kamppeter <till.kamppeter@gmail.com> -// Copyright (C) 2015 Marek Kasik <mkasik@redhat.com> -// Copyright (C) 2016 Caolán McNamara <caolanm@redhat.com> -// 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 -// Copyright (C) 2018 Adam Reichold <adam.reichold@t-online.de> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include <config.h> - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include <stdio.h> -#include <stddef.h> -#include <stdarg.h> -#include <signal.h> -#include <math.h> -#include <limits.h> -#include <algorithm> -#include "goo/GooString.h" -#include "goo/GooList.h" -#include "poppler-config.h" -#include "GlobalParams.h" -#include "Object.h" -#include "Error.h" -#include "Function.h" -#include "Gfx.h" -#include "GfxState.h" -#include "GfxFont.h" -#include "UnicodeMap.h" -#include <fofi/FoFiType1C.h> -#include <fofi/FoFiTrueType.h> -#include "Catalog.h" -#include "Page.h" -#include "Stream.h" -#ifdef ENABLE_ZLIB -# include "FlateEncoder.h" -#endif -#ifdef ENABLE_ZLIB_UNCOMPRESS -# include "FlateStream.h" -#endif -#include "Annot.h" -#include "XRef.h" -#include "PreScanOutputDev.h" -#include "FileSpec.h" -#include "CharCodeToUnicode.h" -#ifdef HAVE_SPLASH -# include "splash/Splash.h" -# include "splash/SplashBitmap.h" -# include "SplashOutputDev.h" -#endif -#include "PSOutputDev.h" -#include "PDFDoc.h" - -#ifdef MACOS -// needed for setting type/creator of MacOS files -#include "ICSupport.h" -#endif - -// the MSVC math.h doesn't define this -#ifndef M_PI -#define M_PI 3.14159265358979323846 -#endif - -//------------------------------------------------------------------------ - -// Max size of a slice when rasterizing pages, in pixels. -#define rasterizationSliceSize 20000000 - -//------------------------------------------------------------------------ -// PostScript prolog and setup -//------------------------------------------------------------------------ - -// The '~' escapes mark prolog code that is emitted only in certain -// levels: -// -// ~[123][sn] -// ^ ^----- s=psLevel*Sep, n=psLevel* -// +----- 1=psLevel1*, 2=psLevel2*, 3=psLevel3* - -static const char *prolog[] = { - "/xpdf 75 dict def xpdf begin", - "% PDF special state", - "/pdfDictSize 15 def", - "~1sn", - "/pdfStates 64 array def", - " 0 1 63 {", - " pdfStates exch pdfDictSize dict", - " dup /pdfStateIdx 3 index put", - " put", - " } for", - "~123sn", - "/pdfSetup {", - " /setpagedevice where {", - " pop 2 dict begin", - " /Policies 1 dict dup begin /PageSize 6 def end def", - " { /Duplex true def } if", - " currentdict end setpagedevice", - " } {", - " pop", - " } ifelse", - "} def", - "/pdfSetupPaper {", - " % Change paper size, but only if different from previous paper size otherwise", - " % duplex fails. PLRM specifies a tolerance of 5 pts when matching paper size", - " % so we use the same when checking if the size changes.", - " /setpagedevice where {", - " pop currentpagedevice", - " /PageSize known {", - " 2 copy", - " currentpagedevice /PageSize get aload pop", - " exch 4 1 roll", - " sub abs 5 gt", - " 3 1 roll", - " sub abs 5 gt", - " or", - " } {", - " true", - " } ifelse", - " {", - " 2 array astore", - " 2 dict begin", - " /PageSize exch def", - " /ImagingBBox null def", - " currentdict end", - " setpagedevice", - " } {", - " pop pop", - " } ifelse", - " } {", - " pop", - " } ifelse", - "} def", - "~1sn", - "/pdfOpNames [", - " /pdfFill /pdfStroke /pdfLastFill /pdfLastStroke", - " /pdfTextMat /pdfFontSize /pdfCharSpacing /pdfTextRender /pdfPatternCS", - " /pdfTextRise /pdfWordSpacing /pdfHorizScaling /pdfTextClipPath", - "] def", - "~123sn", - "/pdfStartPage {", - "~1sn", - " pdfStates 0 get begin", - "~23sn", - " pdfDictSize dict begin", - "~23n", - " /pdfFillCS [] def", - " /pdfFillXform {} def", - " /pdfStrokeCS [] def", - " /pdfStrokeXform {} def", - "~1n", - " /pdfFill 0 def", - " /pdfStroke 0 def", - "~1s", - " /pdfFill [0 0 0 1] def", - " /pdfStroke [0 0 0 1] def", - "~23sn", - " /pdfFill [0] def", - " /pdfStroke [0] def", - " /pdfFillOP false def", - " /pdfStrokeOP false def", - "~3sn", - " /pdfOPM false def", - "~123sn", - " /pdfLastFill false def", - " /pdfLastStroke false def", - " /pdfTextMat [1 0 0 1 0 0] def", - " /pdfFontSize 0 def", - " /pdfCharSpacing 0 def", - " /pdfTextRender 0 def", - " /pdfPatternCS false def", - " /pdfTextRise 0 def", - " /pdfWordSpacing 0 def", - " /pdfHorizScaling 1 def", - " /pdfTextClipPath [] def", - "} def", - "/pdfEndPage { end } def", - "~23s", - "% separation convention operators", - "/findcmykcustomcolor where {", - " pop", - "}{", - " /findcmykcustomcolor { 5 array astore } def", - "} ifelse", - "/setcustomcolor where {", - " pop", - "}{", - " /setcustomcolor {", - " exch", - " [ exch /Separation exch dup 4 get exch /DeviceCMYK exch", - " 0 4 getinterval cvx", - " [ exch /dup load exch { mul exch dup } /forall load", - " /pop load dup ] cvx", - " ] setcolorspace setcolor", - " } def", - "} ifelse", - "/customcolorimage where {", - " pop", - "}{", - " /customcolorimage {", - " gsave", - " [ exch /Separation exch dup 4 get exch /DeviceCMYK exch", - " 0 4 getinterval", - " [ exch /dup load exch { mul exch dup } /forall load", - " /pop load dup ] cvx", - " ] setcolorspace", - " 10 dict begin", - " /ImageType 1 def", - " /DataSource exch def", - " /ImageMatrix exch def", - " /BitsPerComponent exch def", - " /Height exch def", - " /Width exch def", - " /Decode [1 0] def", - " currentdict end", - " image", - " grestore", - " } def", - "} ifelse", - "~123sn", - "% PDF color state", - "~1n", - "/g { dup /pdfFill exch def setgray", - " /pdfLastFill true def /pdfLastStroke false def } def", - "/G { dup /pdfStroke exch def setgray", - " /pdfLastStroke true def /pdfLastFill false def } def", - "/fCol {", - " pdfLastFill not {", - " pdfFill setgray", - " /pdfLastFill true def /pdfLastStroke false def", - " } if", - "} def", - "/sCol {", - " pdfLastStroke not {", - " pdfStroke setgray", - " /pdfLastStroke true def /pdfLastFill false def", - " } if", - "} def", - "~1s", - "/k { 4 copy 4 array astore /pdfFill exch def setcmykcolor", - " /pdfLastFill true def /pdfLastStroke false def } def", - "/K { 4 copy 4 array astore /pdfStroke exch def setcmykcolor", - " /pdfLastStroke true def /pdfLastFill false def } def", - "/fCol {", - " pdfLastFill not {", - " pdfFill aload pop setcmykcolor", - " /pdfLastFill true def /pdfLastStroke false def", - " } if", - "} def", - "/sCol {", - " pdfLastStroke not {", - " pdfStroke aload pop setcmykcolor", - " /pdfLastStroke true def /pdfLastFill false def", - " } if", - "} def", - "~3n", - "/opm { dup /pdfOPM exch def", - " /setoverprintmode where{pop setoverprintmode}{pop}ifelse } def", - "~23n", - "/cs { /pdfFillXform exch def dup /pdfFillCS exch def", - " setcolorspace } def", - "/CS { /pdfStrokeXform exch def dup /pdfStrokeCS exch def", - " setcolorspace } def", - "/sc { pdfLastFill not { pdfFillCS setcolorspace } if", - " dup /pdfFill exch def aload pop pdfFillXform setcolor", - " /pdfLastFill true def /pdfLastStroke false def } def", - "/SC { pdfLastStroke not { pdfStrokeCS setcolorspace } if", - " dup /pdfStroke exch def aload pop pdfStrokeXform setcolor", - " /pdfLastStroke true def /pdfLastFill false def } def", - "/op { /pdfFillOP exch def", - " pdfLastFill { pdfFillOP setoverprint } if } def", - "/OP { /pdfStrokeOP exch def", - " pdfLastStroke { pdfStrokeOP setoverprint } if } def", - "/fCol {", - " pdfLastFill not {", - " pdfFillCS setcolorspace", - " pdfFill aload pop pdfFillXform setcolor", - " pdfFillOP setoverprint", - " /pdfLastFill true def /pdfLastStroke false def", - " } if", - "} def", - "/sCol {", - " pdfLastStroke not {", - " pdfStrokeCS setcolorspace", - " pdfStroke aload pop pdfStrokeXform setcolor", - " pdfStrokeOP setoverprint", - " /pdfLastStroke true def /pdfLastFill false def", - " } if", - "} def", - "~3s", - "/opm { dup /pdfOPM exch def", - " /setoverprintmode where{pop setoverprintmode}{pop}ifelse } def", - "~23s", - "/k { 4 copy 4 array astore /pdfFill exch def setcmykcolor", - " /pdfLastFill true def /pdfLastStroke false def } def", - "/K { 4 copy 4 array astore /pdfStroke exch def setcmykcolor", - " /pdfLastStroke true def /pdfLastFill false def } def", - "/ck { 6 copy 6 array astore /pdfFill exch def", - " findcmykcustomcolor exch setcustomcolor", - " /pdfLastFill true def /pdfLastStroke false def } def", - "/CK { 6 copy 6 array astore /pdfStroke exch def", - " findcmykcustomcolor exch setcustomcolor", - " /pdfLastStroke true def /pdfLastFill false def } def", - "/op { /pdfFillOP exch def", - " pdfLastFill { pdfFillOP setoverprint } if } def", - "/OP { /pdfStrokeOP exch def", - " pdfLastStroke { pdfStrokeOP setoverprint } if } def", - "/fCol {", - " pdfLastFill not {", - " pdfFill aload length 4 eq {", - " setcmykcolor", - " }{", - " findcmykcustomcolor exch setcustomcolor", - " } ifelse", - " pdfFillOP setoverprint", - " /pdfLastFill true def /pdfLastStroke false def", - " } if", - "} def", - "/sCol {", - " pdfLastStroke not {", - " pdfStroke aload length 4 eq {", - " setcmykcolor", - " }{", - " findcmykcustomcolor exch setcustomcolor", - " } ifelse", - " pdfStrokeOP setoverprint", - " /pdfLastStroke true def /pdfLastFill false def", - " } if", - "} def", - "~123sn", - "% build a font", - "/pdfMakeFont {", - " 4 3 roll findfont", - " 4 2 roll matrix scale makefont", - " dup length dict begin", - " { 1 index /FID ne { def } { pop pop } ifelse } forall", - " /Encoding exch def", - " currentdict", - " end", - " definefont pop", - "} def", - "/pdfMakeFont16 {", - " exch findfont", - " dup length dict begin", - " { 1 index /FID ne { def } { pop pop } ifelse } forall", - " /WMode exch def", - " currentdict", - " end", - " definefont pop", - "} def", - "~3sn", - "/pdfMakeFont16L3 {", - " 1 index /CIDFont resourcestatus {", - " pop pop 1 index /CIDFont findresource /CIDFontType known", - " } {", - " false", - " } ifelse", - " {", - " 0 eq { /Identity-H } { /Identity-V } ifelse", - " exch 1 array astore composefont pop", - " } {", - " pdfMakeFont16", - " } ifelse", - "} def", - "~123sn", - "% graphics state operators", - "~1sn", - "/q {", - " gsave", - " pdfOpNames length 1 sub -1 0 { pdfOpNames exch get load } for", - " pdfStates pdfStateIdx 1 add get begin", - " pdfOpNames { exch def } forall", - "} def", - "/Q { end grestore } def", - "~23sn", - "/q { gsave pdfDictSize dict begin } def", - "/Q {", - " end grestore", - " /pdfLastFill where {", - " pop", - " pdfLastFill {", - " pdfFillOP setoverprint", - " } {", - " pdfStrokeOP setoverprint", - " } ifelse", - " } if", - "~3sn", - " /pdfOPM where {", - " pop", - " pdfOPM /setoverprintmode where{pop setoverprintmode}{pop}ifelse ", - " } if", - "~23sn", - "} def", - "~123sn", - "/cm { concat } def", - "/d { setdash } def", - "/i { setflat } def", - "/j { setlinejoin } def", - "/J { setlinecap } def", - "/M { setmiterlimit } def", - "/w { setlinewidth } def", - "% path segment operators", - "/m { moveto } def", - "/l { lineto } def", - "/c { curveto } def", - "/re { 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto", - " neg 0 rlineto closepath } def", - "/h { closepath } def", - "% path painting operators", - "/S { sCol stroke } def", - "/Sf { fCol stroke } def", - "/f { fCol fill } def", - "/f* { fCol eofill } def", - "% clipping operators", - "/W { clip newpath } def", - "/W* { eoclip newpath } def", - "/Ws { strokepath clip newpath } def", - "% text state operators", - "/Tc { /pdfCharSpacing exch def } def", - "/Tf { dup /pdfFontSize exch def", - " dup pdfHorizScaling mul exch matrix scale", - " pdfTextMat matrix concatmatrix dup 4 0 put dup 5 0 put", - " exch findfont exch makefont setfont } def", - "/Tr { /pdfTextRender exch def } def", - "/Tp { /pdfPatternCS exch def } def", - "/Ts { /pdfTextRise exch def } def", - "/Tw { /pdfWordSpacing exch def } def", - "/Tz { /pdfHorizScaling exch def } def", - "% text positioning operators", - "/Td { pdfTextMat transform moveto } def", - "/Tm { /pdfTextMat exch def } def", - "% text string operators", - "/xyshow where {", - " pop", - " /xyshow2 {", - " dup length array", - " 0 2 2 index length 1 sub {", - " 2 index 1 index 2 copy get 3 1 roll 1 add get", - " pdfTextMat dtransform", - " 4 2 roll 2 copy 6 5 roll put 1 add 3 1 roll dup 4 2 roll put", - " } for", - " exch pop", - " xyshow", - " } def", - "}{", - " /xyshow2 {", - " currentfont /FontType get 0 eq {", - " 0 2 3 index length 1 sub {", - " currentpoint 4 index 3 index 2 getinterval show moveto", - " 2 copy get 2 index 3 2 roll 1 add get", - " pdfTextMat dtransform rmoveto", - " } for", - " } {", - " 0 1 3 index length 1 sub {", - " currentpoint 4 index 3 index 1 getinterval show moveto", - " 2 copy 2 mul get 2 index 3 2 roll 2 mul 1 add get", - " pdfTextMat dtransform rmoveto", - " } for", - " } ifelse", - " pop pop", - " } def", - "} ifelse", - "/cshow where {", - " pop", - " /xycp {", // xycharpath - " 0 3 2 roll", - " {", - " pop pop currentpoint 3 2 roll", - " 1 string dup 0 4 3 roll put false charpath moveto", - " 2 copy get 2 index 2 index 1 add get", - " pdfTextMat dtransform rmoveto", - " 2 add", - " } exch cshow", - " pop pop", - " } def", - "}{", - " /xycp {", // xycharpath - " currentfont /FontType get 0 eq {", - " 0 2 3 index length 1 sub {", - " currentpoint 4 index 3 index 2 getinterval false charpath moveto", - " 2 copy get 2 index 3 2 roll 1 add get", - " pdfTextMat dtransform rmoveto", - " } for", - " } {", - " 0 1 3 index length 1 sub {", - " currentpoint 4 index 3 index 1 getinterval false charpath moveto", - " 2 copy 2 mul get 2 index 3 2 roll 2 mul 1 add get", - " pdfTextMat dtransform rmoveto", - " } for", - " } ifelse", - " pop pop", - " } def", - "} ifelse", - "/Tj {", - " fCol", // because stringwidth has to draw Type 3 chars - " 0 pdfTextRise pdfTextMat dtransform rmoveto", - " currentpoint 4 2 roll", - " pdfTextRender 1 and 0 eq {", - " 2 copy xyshow2", - " } if", - " pdfTextRender 3 and dup 1 eq exch 2 eq or {", - " 3 index 3 index moveto", - " 2 copy", - " currentfont /FontType get 3 eq { fCol } { sCol } ifelse", - " xycp currentpoint stroke moveto", - " } if", - " pdfTextRender 4 and 0 ne {", - " 4 2 roll moveto xycp", - " /pdfTextClipPath [ pdfTextClipPath aload pop", - " {/moveto cvx}", - " {/lineto cvx}", - " {/curveto cvx}", - " {/closepath cvx}", - " pathforall ] def", - " currentpoint newpath moveto", - " } {", - " pop pop pop pop", - " } ifelse", - " 0 pdfTextRise neg pdfTextMat dtransform rmoveto", - "} def", - "/TJm { 0.001 mul pdfFontSize mul pdfHorizScaling mul neg 0", - " pdfTextMat dtransform rmoveto } def", - "/TJmV { 0.001 mul pdfFontSize mul neg 0 exch", - " pdfTextMat dtransform rmoveto } def", - "/Tclip { pdfTextClipPath cvx exec clip newpath", - " /pdfTextClipPath [] def } def", - "/Tclip* { pdfTextClipPath cvx exec eoclip newpath", - " /pdfTextClipPath [] def } def", - "~1ns", - "% Level 1 image operators", - "/pdfIm1 {", - " /pdfImBuf1 4 index string def", - " { currentfile pdfImBuf1 readhexstring pop } image", - "} def", - "/pdfIm1Bin {", - " /pdfImBuf1 4 index string def", - " { currentfile pdfImBuf1 readstring pop } image", - "} def", - "~1s", - "/pdfIm1Sep {", - " /pdfImBuf1 4 index string def", - " /pdfImBuf2 4 index string def", - " /pdfImBuf3 4 index string def", - " /pdfImBuf4 4 index string def", - " { currentfile pdfImBuf1 readhexstring pop }", - " { currentfile pdfImBuf2 readhexstring pop }", - " { currentfile pdfImBuf3 readhexstring pop }", - " { currentfile pdfImBuf4 readhexstring pop }", - " true 4 colorimage", - "} def", - "/pdfIm1SepBin {", - " /pdfImBuf1 4 index string def", - " /pdfImBuf2 4 index string def", - " /pdfImBuf3 4 index string def", - " /pdfImBuf4 4 index string def", - " { currentfile pdfImBuf1 readstring pop }", - " { currentfile pdfImBuf2 readstring pop }", - " { currentfile pdfImBuf3 readstring pop }", - " { currentfile pdfImBuf4 readstring pop }", - " true 4 colorimage", - "} def", - "~1ns", - "/pdfImM1 {", - " fCol /pdfImBuf1 4 index 7 add 8 idiv string def", - " { currentfile pdfImBuf1 readhexstring pop } imagemask", - "} def", - "/pdfImM1Bin {", - " fCol /pdfImBuf1 4 index 7 add 8 idiv string def", - " { currentfile pdfImBuf1 readstring pop } imagemask", - "} def", - "/pdfImStr {", - " 2 copy exch length lt {", - " 2 copy get exch 1 add exch", - " } {", - " ()", - " } ifelse", - "} def", - "/pdfImM1a {", - " { pdfImStr } imagemask", - " pop pop", - "} def", - "~23sn", - "% Level 2/3 image operators", - "/pdfImBuf 100 string def", - "/pdfImStr {", - " 2 copy exch length lt {", - " 2 copy get exch 1 add exch", - " } {", - " ()", - " } ifelse", - "} def", - "/skipEOD {", - " { currentfile pdfImBuf readline", - " not { pop exit } if", - " (%-EOD-) eq { exit } if } loop", - "} def", - "/pdfIm { image skipEOD } def", - "~3sn", - "/pdfMask {", - " /ReusableStreamDecode filter", - " skipEOD", - " /maskStream exch def", - "} def", - "/pdfMaskEnd { maskStream closefile } def", - "/pdfMaskInit {", - " /maskArray exch def", - " /maskIdx 0 def", - "} def", - "/pdfMaskSrc {", - " maskIdx maskArray length lt {", - " maskArray maskIdx get", - " /maskIdx maskIdx 1 add def", - " } {", - " ()", - " } ifelse", - "} def", - "~23s", - "/pdfImSep {", - " findcmykcustomcolor exch", - " dup /Width get /pdfImBuf1 exch string def", - " dup /Decode get aload pop 1 index sub /pdfImDecodeRange exch def", - " /pdfImDecodeLow exch def", - " begin Width Height BitsPerComponent ImageMatrix DataSource end", - " /pdfImData exch def", - " { pdfImData pdfImBuf1 readstring pop", - " 0 1 2 index length 1 sub {", - " 1 index exch 2 copy get", - " pdfImDecodeRange mul 255 div pdfImDecodeLow add round cvi", - " 255 exch sub put", - " } for }", - " 6 5 roll customcolorimage", - " skipEOD", - "} def", - "~23sn", - "/pdfImM { fCol imagemask skipEOD } def", - "~123sn", - "/pr { 2 index 2 index 3 2 roll putinterval 4 add } def", - "/pdfImClip {", - " gsave", - " 0 2 4 index length 1 sub {", - " dup 4 index exch 2 copy", - " get 5 index div put", - " 1 add 3 index exch 2 copy", - " get 3 index div put", - " } for", - " pop pop rectclip", - "} def", - "/pdfImClipEnd { grestore } def", - "~23sn", - "% shading operators", - "/colordelta {", - " false 0 1 3 index length 1 sub {", - " dup 4 index exch get 3 index 3 2 roll get sub abs 0.004 gt {", - " pop true", - " } if", - " } for", - " exch pop exch pop", - "} def", - "/funcCol { func n array astore } def", - "/funcSH {", - " dup 0 eq {", - " true", - " } {", - " dup 6 eq {", - " false", - " } {", - " 4 index 4 index funcCol dup", - " 6 index 4 index funcCol dup", - " 3 1 roll colordelta 3 1 roll", - " 5 index 5 index funcCol dup", - " 3 1 roll colordelta 3 1 roll", - " 6 index 8 index funcCol dup", - " 3 1 roll colordelta 3 1 roll", - " colordelta or or or", - " } ifelse", - " } ifelse", - " {", - " 1 add", - " 4 index 3 index add 0.5 mul exch 4 index 3 index add 0.5 mul exch", - " 6 index 6 index 4 index 4 index 4 index funcSH", - " 2 index 6 index 6 index 4 index 4 index funcSH", - " 6 index 2 index 4 index 6 index 4 index funcSH", - " 5 3 roll 3 2 roll funcSH pop pop", - " } {", - " pop 3 index 2 index add 0.5 mul 3 index 2 index add 0.5 mul", - "~23n", - " funcCol sc", - "~23s", - " funcCol aload pop k", - "~23sn", - " dup 4 index exch mat transform m", - " 3 index 3 index mat transform l", - " 1 index 3 index mat transform l", - " mat transform l pop pop h f*", - " } ifelse", - "} def", - "/axialCol {", - " dup 0 lt {", - " pop t0", - " } {", - " dup 1 gt {", - " pop t1", - " } {", - " dt mul t0 add", - " } ifelse", - " } ifelse", - " func n array astore", - "} def", - "/axialSH {", - " dup 0 eq {", - " true", - " } {", - " dup 8 eq {", - " false", - " } {", - " 2 index axialCol 2 index axialCol colordelta", - " } ifelse", - " } ifelse", - " {", - " 1 add 3 1 roll 2 copy add 0.5 mul", - " dup 4 3 roll exch 4 index axialSH", - " exch 3 2 roll axialSH", - " } {", - " pop 2 copy add 0.5 mul", - "~23n", - " axialCol sc", - "~23s", - " axialCol aload pop k", - "~23sn", - " exch dup dx mul x0 add exch dy mul y0 add", - " 3 2 roll dup dx mul x0 add exch dy mul y0 add", - " dx abs dy abs ge {", - " 2 copy yMin sub dy mul dx div add yMin m", - " yMax sub dy mul dx div add yMax l", - " 2 copy yMax sub dy mul dx div add yMax l", - " yMin sub dy mul dx div add yMin l", - " h f*", - " } {", - " exch 2 copy xMin sub dx mul dy div add xMin exch m", - " xMax sub dx mul dy div add xMax exch l", - " exch 2 copy xMax sub dx mul dy div add xMax exch l", - " xMin sub dx mul dy div add xMin exch l", - " h f*", - " } ifelse", - " } ifelse", - "} def", - "/radialCol {", - " dup t0 lt {", - " pop t0", - " } {", - " dup t1 gt {", - " pop t1", - " } if", - " } ifelse", - " func n array astore", - "} def", - "/radialSH {", - " dup 0 eq {", - " true", - " } {", - " dup 8 eq {", - " false", - " } {", - " 2 index dt mul t0 add radialCol", - " 2 index dt mul t0 add radialCol colordelta", - " } ifelse", - " } ifelse", - " {", - " 1 add 3 1 roll 2 copy add 0.5 mul", - " dup 4 3 roll exch 4 index radialSH", - " exch 3 2 roll radialSH", - " } {", - " pop 2 copy add 0.5 mul dt mul t0 add", - "~23n", - " radialCol sc", - "~23s", - " radialCol aload pop k", - "~23sn", - " encl {", - " exch dup dx mul x0 add exch dup dy mul y0 add exch dr mul r0 add", - " 0 360 arc h", - " dup dx mul x0 add exch dup dy mul y0 add exch dr mul r0 add", - " 360 0 arcn h f", - " } {", - " 2 copy", - " dup dx mul x0 add exch dup dy mul y0 add exch dr mul r0 add", - " a1 a2 arcn", - " dup dx mul x0 add exch dup dy mul y0 add exch dr mul r0 add", - " a2 a1 arcn h", - " dup dx mul x0 add exch dup dy mul y0 add exch dr mul r0 add", - " a1 a2 arc", - " dup dx mul x0 add exch dup dy mul y0 add exch dr mul r0 add", - " a2 a1 arc h f", - " } ifelse", - " } ifelse", - "} def", - "~123sn", - "end", - nullptr -}; - -static const char *cmapProlog[] = { - "/CIDInit /ProcSet findresource begin", - "10 dict begin", - " begincmap", - " /CMapType 1 def", - " /CMapName /Identity-H def", - " /CIDSystemInfo 3 dict dup begin", - " /Registry (Adobe) def", - " /Ordering (Identity) def", - " /Supplement 0 def", - " end def", - " 1 begincodespacerange", - " <0000> <ffff>", - " endcodespacerange", - " 0 usefont", - " 1 begincidrange", - " <0000> <ffff> 0", - " endcidrange", - " endcmap", - " currentdict CMapName exch /CMap defineresource pop", - "end", - "10 dict begin", - " begincmap", - " /CMapType 1 def", - " /CMapName /Identity-V def", - " /CIDSystemInfo 3 dict dup begin", - " /Registry (Adobe) def", - " /Ordering (Identity) def", - " /Supplement 0 def", - " end def", - " /WMode 1 def", - " 1 begincodespacerange", - " <0000> <ffff>", - " endcodespacerange", - " 0 usefont", - " 1 begincidrange", - " <0000> <ffff> 0", - " endcidrange", - " endcmap", - " currentdict CMapName exch /CMap defineresource pop", - "end", - "end", - nullptr -}; - -//------------------------------------------------------------------------ -// Fonts -//------------------------------------------------------------------------ - -struct PSSubstFont { - const char *psName; // PostScript name - double mWidth; // width of 'm' character -}; - -// NB: must be in same order as base14SubstFonts in GfxFont.cc -static PSSubstFont psBase14SubstFonts[14] = { - {"Courier", 0.600}, - {"Courier-Oblique", 0.600}, - {"Courier-Bold", 0.600}, - {"Courier-BoldOblique", 0.600}, - {"Helvetica", 0.833}, - {"Helvetica-Oblique", 0.833}, - {"Helvetica-Bold", 0.889}, - {"Helvetica-BoldOblique", 0.889}, - {"Times-Roman", 0.788}, - {"Times-Italic", 0.722}, - {"Times-Bold", 0.833}, - {"Times-BoldItalic", 0.778}, - // the last two are never used for substitution - {"Symbol", 0}, - {"ZapfDingbats", 0} -}; - -// Mapping from Type 1/1C font file to PS font name. -struct PST1FontName { - Ref fontFileID; - GooString *psName; // PostScript font name used for this - // embedded font file -}; - -// Info for 8-bit fonts -struct PSFont8Info { - Ref fontID; - int *codeToGID; // code-to-GID mapping for TrueType fonts -}; - -// Encoding info for substitute 16-bit font -struct PSFont16Enc { - Ref fontID; - GooString *enc; -}; - -//------------------------------------------------------------------------ -// process colors -//------------------------------------------------------------------------ - -#define psProcessCyan 1 -#define psProcessMagenta 2 -#define psProcessYellow 4 -#define psProcessBlack 8 -#define psProcessCMYK 15 - -//------------------------------------------------------------------------ -// PSOutCustomColor -//------------------------------------------------------------------------ - -class PSOutCustomColor { -public: - - PSOutCustomColor(double cA, double mA, - double yA, double kA, GooString *nameA); - ~PSOutCustomColor(); - - PSOutCustomColor(const PSOutCustomColor &) = delete; - PSOutCustomColor& operator=(const PSOutCustomColor &) = delete; - - double c, m, y, k; - GooString *name; - PSOutCustomColor *next; -}; - -PSOutCustomColor::PSOutCustomColor(double cA, double mA, - double yA, double kA, GooString *nameA) { - c = cA; - m = mA; - y = yA; - k = kA; - name = nameA; - next = nullptr; -} - -PSOutCustomColor::~PSOutCustomColor() { - delete name; -} - -//------------------------------------------------------------------------ - -struct PSOutImgClipRect { - int x0, x1, y0, y1; -}; - -//------------------------------------------------------------------------ - -struct PSOutPaperSize { - PSOutPaperSize(GooString *nameA, int wA, int hA) { name = nameA; w = wA; h = hA; } - ~PSOutPaperSize() { delete name; } - PSOutPaperSize(const PSOutPaperSize &) = delete; - PSOutPaperSize& operator=(const PSOutPaperSize &) = delete; - GooString *name; - int w, h; -}; - -//------------------------------------------------------------------------ -// DeviceNRecoder -//------------------------------------------------------------------------ - -class DeviceNRecoder: public FilterStream { -public: - - DeviceNRecoder(Stream *strA, int widthA, int heightA, - GfxImageColorMap *colorMapA); - ~DeviceNRecoder(); - StreamKind getKind() override { return strWeird; } - void reset() override; - int getChar() override - { return (bufIdx >= bufSize && !fillBuf()) ? EOF : buf[bufIdx++]; } - int lookChar() override - { return (bufIdx >= bufSize && !fillBuf()) ? EOF : buf[bufIdx]; } - GooString *getPSFilter(int psLevel, const char *indent) override { return nullptr; } - GBool isBinary(GBool last = gTrue) override { return gTrue; } - GBool isEncoder() override { return gTrue; } - -private: - - GBool fillBuf(); - - int width, height; - GfxImageColorMap *colorMap; - Function *func; - ImageStream *imgStr; - int buf[gfxColorMaxComps]; - int pixelIdx; - int bufIdx; - int bufSize; -}; - -DeviceNRecoder::DeviceNRecoder(Stream *strA, int widthA, int heightA, - GfxImageColorMap *colorMapA): - FilterStream(strA) { - width = widthA; - height = heightA; - colorMap = colorMapA; - imgStr = nullptr; - pixelIdx = 0; - bufIdx = gfxColorMaxComps; - bufSize = ((GfxDeviceNColorSpace *)colorMap->getColorSpace())-> - getAlt()->getNComps(); - func = ((GfxDeviceNColorSpace *)colorMap->getColorSpace())-> - getTintTransformFunc(); -} - -DeviceNRecoder::~DeviceNRecoder() { - if (imgStr) { - delete imgStr; - } - if (str->isEncoder()) { - delete str; - } -} - -void DeviceNRecoder::reset() { - imgStr = new ImageStream(str, width, colorMap->getNumPixelComps(), - colorMap->getBits()); - imgStr->reset(); -} - -GBool DeviceNRecoder::fillBuf() { - Guchar pixBuf[gfxColorMaxComps]; - GfxColor color; - double x[gfxColorMaxComps], y[gfxColorMaxComps]; - int i; - - if (pixelIdx >= width * height) { - return gFalse; - } - imgStr->getPixel(pixBuf); - colorMap->getColor(pixBuf, &color); - for (i = 0; - i < ((GfxDeviceNColorSpace *)colorMap->getColorSpace())->getNComps(); - ++i) { - x[i] = colToDbl(color.c[i]); - } - func->transform(x, y); - for (i = 0; i < bufSize; ++i) { - buf[i] = (int)(y[i] * 255 + 0.5); - } - bufIdx = 0; - ++pixelIdx; - return gTrue; -} - -//------------------------------------------------------------------------ -// PSOutputDev -//------------------------------------------------------------------------ - -extern "C" { -typedef void (*SignalFunc)(int); -} - -static void outputToFile(void *stream, const char *data, int len) { - fwrite(data, 1, len, (FILE *)stream); -} - -PSOutputDev::PSOutputDev(const char *fileName, PDFDoc *doc, - char *psTitleA, - const std::vector<int> &pages, PSOutMode modeA, - int paperWidthA, int paperHeightA, - GBool noCropA, GBool duplexA, - int imgLLXA, int imgLLYA, int imgURXA, int imgURYA, - GBool forceRasterizeA, - GBool manualCtrlA, - PSOutCustomCodeCbk customCodeCbkA, - void *customCodeCbkDataA) { - FILE *f; - PSFileType fileTypeA; - - underlayCbk = nullptr; - underlayCbkData = nullptr; - overlayCbk = nullptr; - overlayCbkData = nullptr; - customCodeCbk = customCodeCbkA; - customCodeCbkData = customCodeCbkDataA; - - fontIDs = nullptr; - t1FontNames = nullptr; - font8Info = nullptr; - font16Enc = nullptr; - imgIDs = nullptr; - formIDs = nullptr; - paperSizes = nullptr; - embFontList = nullptr; - customColors = nullptr; - haveTextClip = gFalse; - t3String = nullptr; - forceRasterize = forceRasterizeA; - psTitle = nullptr; - - // open file or pipe - if (!strcmp(fileName, "-")) { - fileTypeA = psStdout; - f = stdout; - } else if (fileName[0] == '|') { - fileTypeA = psPipe; -#ifdef HAVE_POPEN -#ifndef _WIN32 - signal(SIGPIPE, (SignalFunc)SIG_IGN); -#endif - if (!(f = popen(fileName + 1, "w"))) { - error(errIO, -1, "Couldn't run print command '{0:s}'", fileName); - ok = gFalse; - return; - } -#else - error(errIO, -1, "Print commands are not supported ('{0:s}')", fileName); - ok = gFalse; - return; -#endif - } else { - fileTypeA = psFile; - if (!(f = fopen(fileName, "w"))) { - error(errIO, -1, "Couldn't open PostScript file '{0:s}'", fileName); - ok = gFalse; - return; - } - } - - init(outputToFile, f, fileTypeA, psTitleA, - doc, pages, modeA, - imgLLXA, imgLLYA, imgURXA, imgURYA, manualCtrlA, - paperWidthA, paperHeightA, noCropA, duplexA); -} - -PSOutputDev::PSOutputDev(PSOutputFunc outputFuncA, void *outputStreamA, - char *psTitleA, - PDFDoc *doc, - const std::vector<int> &pages, PSOutMode modeA, - int paperWidthA, int paperHeightA, - GBool noCropA, GBool duplexA, - int imgLLXA, int imgLLYA, int imgURXA, int imgURYA, - GBool forceRasterizeA, - GBool manualCtrlA, - PSOutCustomCodeCbk customCodeCbkA, - void *customCodeCbkDataA) { - underlayCbk = nullptr; - underlayCbkData = nullptr; - overlayCbk = nullptr; - overlayCbkData = nullptr; - customCodeCbk = customCodeCbkA; - customCodeCbkData = customCodeCbkDataA; - - fontIDs = nullptr; - t1FontNames = nullptr; - font8Info = nullptr; - font16Enc = nullptr; - imgIDs = nullptr; - formIDs = nullptr; - paperSizes = nullptr; - embFontList = nullptr; - customColors = nullptr; - haveTextClip = gFalse; - t3String = nullptr; - forceRasterize = forceRasterizeA; - psTitle = nullptr; - - init(outputFuncA, outputStreamA, psGeneric, psTitleA, - doc, pages, modeA, - imgLLXA, imgLLYA, imgURXA, imgURYA, manualCtrlA, - paperWidthA, paperHeightA, noCropA, duplexA); -} - -struct StandardMedia { - const char *name; - int width; - int height; -}; - -static const StandardMedia standardMedia[] = -{ - { "A0", 2384, 3371 }, - { "A1", 1685, 2384 }, - { "A2", 1190, 1684 }, - { "A3", 842, 1190 }, - { "A4", 595, 842 }, - { "A5", 420, 595 }, - { "B4", 729, 1032 }, - { "B5", 516, 729 }, - { "Letter", 612, 792 }, - { "Tabloid", 792, 1224 }, - { "Ledger", 1224, 792 }, - { "Legal", 612, 1008 }, - { "Statement", 396, 612 }, - { "Executive", 540, 720 }, - { "Folio", 612, 936 }, - { "Quarto", 610, 780 }, - { "10x14", 720, 1008 }, - { nullptr, 0, 0 } -}; - -/* PLRM specifies a tolerance of 5 points when matching page sizes */ -static bool pageDimensionEqual(int a, int b) { - return (abs (a - b) < 5); -} - -// Shared initialization of PSOutputDev members. -// Store the values but do not process them so the function that -// created the PSOutputDev can use the various setters to change defaults. - -void PSOutputDev::init(PSOutputFunc outputFuncA, void *outputStreamA, - PSFileType fileTypeA, char *psTitleA, PDFDoc *docA, - const std::vector<int> &pagesA, PSOutMode modeA, - int imgLLXA, int imgLLYA, int imgURXA, int imgURYA, - GBool manualCtrlA, int paperWidthA, int paperHeightA, - GBool noCropA, GBool duplexA) { - - if (pagesA.empty()) { - ok = gFalse; - return; - } - - // initialize - postInitDone = gFalse; - embedType1 = gTrue; - embedTrueType = gTrue; - embedCIDPostScript = gTrue; - embedCIDTrueType = gTrue; - fontPassthrough = gFalse; - optimizeColorSpace = gFalse; - passLevel1CustomColor = gFalse; - preloadImagesForms = gFalse; - generateOPI = gFalse; - useASCIIHex = gFalse; - useBinary = gFalse; - enableLZW = gTrue; - enableFlate = gTrue; - rasterMono = gFalse; - rasterResolution = 300; - uncompressPreloadedImages = gFalse; - psCenter = gTrue; - rasterAntialias = gFalse; - displayText = gTrue; - ok = gTrue; - outputFunc = outputFuncA; - outputStream = outputStreamA; - fileType = fileTypeA; - psTitle = (psTitleA? strdup(psTitleA): nullptr); - doc = docA; - level = globalParams->getPSLevel(); - pages = pagesA; - mode = modeA; - paperWidth = paperWidthA; - paperHeight = paperHeightA; - noCrop = noCropA; - duplex = duplexA; - imgLLX = imgLLXA; - imgLLY = imgLLYA; - imgURX = imgURXA; - imgURY = imgURYA; - manualCtrl = manualCtrlA; - - xref = nullptr; - - processColors = 0; - inType3Char = gFalse; - inUncoloredPattern = gFalse; - t3FillColorOnly = gFalse; - -#ifdef OPI_SUPPORT - // initialize OPI nesting levels - opi13Nest = 0; - opi20Nest = 0; -#endif - - tx0 = ty0 = -1; - xScale0 = yScale0 = 0; - rotate0 = -1; - clipLLX0 = clipLLY0 = 0; - clipURX0 = clipURY0 = -1; - - // initialize sequential page number - seqPage = 1; -} - -// Complete the initialization after the function that created the PSOutputDev -// has had a chance to modify default values with the various setters. - -void PSOutputDev::postInit() -{ - Catalog *catalog; - PDFRectangle *box; - PSOutPaperSize *size; - int w, h, i; - - if (postInitDone || !ok) { - return; - } - - postInitDone = gTrue; - - xref = doc->getXRef(); - catalog = doc->getCatalog(); - - if (paperWidth < 0 || paperHeight < 0) { - paperMatch = gTrue; - } else { - paperMatch = gFalse; - } - Page *page; - paperSizes = new GooList(); - for (size_t pgi = 0; pgi < pages.size(); ++pgi) { - const int pg = pages[pgi]; - page = catalog->getPage(pg); - if (page == nullptr) - paperMatch = gFalse; - if (!paperMatch) { - w = paperWidth; - h = paperHeight; - if (w < 0 || h < 0) { - // Unable to obtain a paper size from the document and no page size - // specified. In this case use A4 as the page size to ensure the PS output is - // valid. This will only occur if the PDF is very broken. - w = 595; - h = 842; - } - } else if (noCrop) { - w = (int)ceil(page->getMediaWidth()); - h = (int)ceil(page->getMediaHeight()); - } else { - w = (int)ceil(page->getCropWidth()); - h = (int)ceil(page->getCropHeight()); - } - if (paperMatch) { - int rotate = page->getRotate(); - if (rotate == 90 || rotate == 270) - std::swap(w, h); - } - if (w > paperWidth) - paperWidth = w; - if (h > paperHeight) - paperHeight = h; - for (i = 0; i < paperSizes->getLength(); ++i) { - size = (PSOutPaperSize *)paperSizes->get(i); - if (pageDimensionEqual(w, size->w) && pageDimensionEqual(h, size->h)) - break; - } - if (i == paperSizes->getLength()) { - const StandardMedia *media = standardMedia; - GooString *name = nullptr; - while (media->name) { - if (pageDimensionEqual(w, media->width) && pageDimensionEqual(h, media->height)) { - name = new GooString(media->name); - w = media->width; - h = media->height; - break; - } - media++; - } - if (!name) - name = GooString::format("{0:d}x{1:d}mm", int(w*25.4/72), int(h*25.4/72)); - paperSizes->append(new PSOutPaperSize(name, w, h)); - } - pagePaperSize.insert(std::pair<int,int>(pg, i)); - if (!paperMatch) - break; // we only need one entry when all pages are the same size - } - if (imgLLX == 0 && imgURX == 0 && imgLLY == 0 && imgURY == 0) { - imgLLX = imgLLY = 0; - imgURX = paperWidth; - imgURY = paperHeight; - } - std::vector<int> pageList; - if (mode == psModeForm) { - pageList.push_back(pages[0]); - } else { - pageList = pages; - } - - // initialize fontIDs, fontFileIDs, and fontFileNames lists - fontIDSize = 64; - fontIDLen = 0; - fontIDs = (Ref *)gmallocn(fontIDSize, sizeof(Ref)); - for (i = 0; i < 14; ++i) { - fontNames.emplace(psBase14SubstFonts[i].psName); - } - t1FontNameSize = 64; - t1FontNameLen = 0; - t1FontNames = (PST1FontName *)gmallocn(t1FontNameSize, sizeof(PST1FontName)); - font8InfoLen = 0; - font8InfoSize = 0; - font16EncLen = 0; - font16EncSize = 0; - imgIDLen = 0; - imgIDSize = 0; - formIDLen = 0; - formIDSize = 0; - - numSaves = 0; - numTilingPatterns = 0; - nextFunc = 0; - - // initialize embedded font resource comment list - embFontList = new GooString(); - - if (!manualCtrl) { - Page *page; - // this check is needed in case the document has zero pages - if ((page = doc->getPage(pageList[0]))) { - writeHeader(pageList, - page->getMediaBox(), - page->getCropBox(), - page->getRotate(), - psTitle); - } else { - error(errSyntaxError, -1, "Invalid page {0:d}", pageList[0]); - box = new PDFRectangle(0, 0, 1, 1); - writeHeader(pageList, box, box, 0, psTitle); - delete box; - } - if (mode != psModeForm) { - writePS("%%BeginProlog\n"); - } - writeXpdfProcset(); - if (mode != psModeForm) { - writePS("%%EndProlog\n"); - writePS("%%BeginSetup\n"); - } - writeDocSetup(doc, catalog, pageList, duplex); - if (mode != psModeForm) { - writePS("%%EndSetup\n"); - } - } -} - -PSOutputDev::~PSOutputDev() { - PSOutCustomColor *cc; - int i; - - if (ok) { - if (!postInitDone) { - postInit(); - } - if (!manualCtrl) { - writePS("%%Trailer\n"); - writeTrailer(); - if (mode != psModeForm) { - writePS("%%EOF\n"); - } - } - if (fileType == psFile) { -#ifdef MACOS - ICS_MapRefNumAndAssign((short)((FILE *)outputStream)->handle); -#endif - fclose((FILE *)outputStream); - } -#ifdef HAVE_POPEN - else if (fileType == psPipe) { - pclose((FILE *)outputStream); -#ifndef _WIN32 - signal(SIGPIPE, (SignalFunc)SIG_DFL); -#endif - } -#endif - } - if (paperSizes) { - deleteGooList(paperSizes, PSOutPaperSize); - } - if (embFontList) { - delete embFontList; - } - if (fontIDs) { - gfree(fontIDs); - } - if (t1FontNames) { - for (i = 0; i < t1FontNameLen; ++i) { - delete t1FontNames[i].psName; - } - gfree(t1FontNames); - } - if (font8Info) { - for (i = 0; i < font8InfoLen; ++i) { - gfree(font8Info[i].codeToGID); - } - gfree(font8Info); - } - if (font16Enc) { - for (i = 0; i < font16EncLen; ++i) { - if (font16Enc[i].enc) { - delete font16Enc[i].enc; - } - } - gfree(font16Enc); - } - gfree(imgIDs); - gfree(formIDs); - while (customColors) { - cc = customColors; - customColors = cc->next; - delete cc; - } - gfree(psTitle); -} - -void PSOutputDev::writeHeader(const std::vector<int> &pages, - PDFRectangle *mediaBox, PDFRectangle *cropBox, - int pageRotate, char *psTitle) { - PSOutPaperSize *size; - double x1, y1, x2, y2; - - switch (mode) { - case psModePS: - writePS("%!PS-Adobe-3.0\n"); - break; - case psModeEPS: - writePS("%!PS-Adobe-3.0 EPSF-3.0\n"); - break; - case psModeForm: - writePS("%!PS-Adobe-3.0 Resource-Form\n"); - break; - } - writePSFmt("%Produced by poppler pdftops version: {0:s} (http://poppler.freedesktop.org)\n", PACKAGE_VERSION); - Object info = xref->getDocInfo(); - if (info.isDict()) { - Object obj1 = info.dictLookup("Creator"); - if (obj1.isString()) { - writePS("%%Creator: "); - writePSTextLine(obj1.getString()); - } - } - if(psTitle) { - char *sanitizedTitle = strdup(psTitle); - for (Guint i = 0; i < strlen(sanitizedTitle); ++i) { - if (sanitizedTitle[i] == '\n' || sanitizedTitle[i] == '\r') { - sanitizedTitle[i] = ' '; - } - } - writePSFmt("%%Title: {0:s}\n", sanitizedTitle); - free(sanitizedTitle); - } - writePSFmt("%%LanguageLevel: {0:d}\n", - (level == psLevel1 || level == psLevel1Sep) ? 1 : - (level == psLevel2 || level == psLevel2Sep) ? 2 : 3); - if (level == psLevel1Sep || level == psLevel2Sep || level == psLevel3Sep) { - writePS("%%DocumentProcessColors: (atend)\n"); - writePS("%%DocumentCustomColors: (atend)\n"); - } - writePS("%%DocumentSuppliedResources: (atend)\n"); - if ((level == psLevel1 || level == psLevel1Sep) && useBinary) { - writePS("%%DocumentData: Binary\n"); - } - - switch (mode) { - case psModePS: - for (int i = 0; i < paperSizes->getLength(); ++i) { - size = (PSOutPaperSize *)paperSizes->get(i); - writePSFmt("%%{0:s} {1:t} {2:d} {3:d} 0 () ()\n", - i==0 ? "DocumentMedia:" : "+", size->name, size->w, size->h); - } - writePSFmt("%%BoundingBox: 0 0 {0:d} {1:d}\n", paperWidth, paperHeight); - writePSFmt("%%Pages: {0:d}\n", static_cast<int>(pages.size())); - writePS("%%EndComments\n"); - if (!paperMatch) { - size = (PSOutPaperSize *)paperSizes->get(0); - writePS("%%BeginDefaults\n"); - writePSFmt("%%PageMedia: {0:t}\n", size->name); - writePS("%%EndDefaults\n"); - } - break; - case psModeEPS: - epsX1 = cropBox->x1; - epsY1 = cropBox->y1; - epsX2 = cropBox->x2; - epsY2 = cropBox->y2; - if (pageRotate == 0 || pageRotate == 180) { - x1 = epsX1; - y1 = epsY1; - x2 = epsX2; - y2 = epsY2; - } else { // pageRotate == 90 || pageRotate == 270 - x1 = 0; - y1 = 0; - x2 = epsY2 - epsY1; - y2 = epsX2 - epsX1; - } - writePSFmt("%%BoundingBox: {0:d} {1:d} {2:d} {3:d}\n", - (int)floor(x1), (int)floor(y1), (int)ceil(x2), (int)ceil(y2)); - writePSFmt("%%HiResBoundingBox: {0:.6g} {1:.6g} {2:.6g} {3:.6g}\n", - x1, y1, x2, y2); - writePS("%%DocumentSuppliedResources: (atend)\n"); - writePS("%%EndComments\n"); - break; - case psModeForm: - writePS("%%EndComments\n"); - writePS("32 dict dup begin\n"); - writePSFmt("/BBox [{0:d} {1:d} {2:d} {3:d}] def\n", - (int)floor(mediaBox->x1), (int)floor(mediaBox->y1), - (int)ceil(mediaBox->x2), (int)ceil(mediaBox->y2)); - writePS("/FormType 1 def\n"); - writePS("/Matrix [1 0 0 1 0 0] def\n"); - break; - } -} - -void PSOutputDev::writeXpdfProcset() { - GBool lev1, lev2, lev3, sep, nonSep; - const char **p; - const char *q; - - writePSFmt("%%BeginResource: procset xpdf {0:s} 0\n", "3.00"); - writePSFmt("%%Copyright: {0:s}\n", xpdfCopyright); - lev1 = lev2 = lev3 = sep = nonSep = gTrue; - for (p = prolog; *p; ++p) { - if ((*p)[0] == '~') { - lev1 = lev2 = lev3 = sep = nonSep = gFalse; - for (q = *p + 1; *q; ++q) { - switch (*q) { - case '1': lev1 = gTrue; break; - case '2': lev2 = gTrue; break; - case '3': lev3 = gTrue; break; - case 's': sep = gTrue; break; - case 'n': nonSep = gTrue; break; - } - } - } else if ((level == psLevel1 && lev1 && nonSep) || - (level == psLevel1Sep && lev1 && sep) || - (level == psLevel1Sep && lev2 && sep && getPassLevel1CustomColor()) || - (level == psLevel2 && lev2 && nonSep) || - (level == psLevel2Sep && lev2 && sep) || - (level == psLevel3 && lev3 && nonSep) || - (level == psLevel3Sep && lev3 && sep)) { - writePSFmt("{0:s}\n", *p); - } - } - writePS("%%EndResource\n"); - - if (level >= psLevel3) { - for (p = cmapProlog; *p; ++p) { - writePSFmt("{0:s}\n", *p); - } - } -} - -void PSOutputDev::writeDocSetup(PDFDoc *doc, Catalog *catalog, - const std::vector<int> &pages, - GBool duplexA) { - Page *page; - Dict *resDict; - Annots *annots; - Object *acroForm; - GooString *s; - - if (mode == psModeForm) { - // swap the form and xpdf dicts - writePS("xpdf end begin dup begin\n"); - } else { - writePS("xpdf begin\n"); - } - for (size_t pgi = 0; pgi < pages.size(); ++pgi) { - const int pg = pages[pgi]; - page = doc->getPage(pg); - if (!page) { - error(errSyntaxError, -1, "Failed writing resources for page {0:d}", pg); - continue; - } - if ((resDict = page->getResourceDict())) { - setupResources(resDict); - } - annots = page->getAnnots(); - for (int i = 0; i < annots->getNumAnnots(); ++i) { - Object obj1 = annots->getAnnot(i)->getAppearanceResDict(); - if (obj1.isDict()) { - setupResources(obj1.getDict()); - } - } - } - if ((acroForm = catalog->getAcroForm()) && acroForm->isDict()) { - Object obj1 = acroForm->dictLookup("DR"); - if (obj1.isDict()) { - setupResources(obj1.getDict()); - } - obj1 = acroForm->dictLookup("Fields"); - if (obj1.isArray()) { - for (int i = 0; i < obj1.arrayGetLength(); ++i) { - Object obj2 = obj1.arrayGet(i); - if (obj2.isDict()) { - Object obj3 = obj2.dictLookup("DR"); - if (obj3.isDict()) { - setupResources(obj3.getDict()); - } - } - } - } - } - if (mode != psModeForm) { - if (mode != psModeEPS && !manualCtrl) { - writePSFmt("{0:s} pdfSetup\n", - duplexA ? "true" : "false"); - if (!paperMatch) { - writePSFmt("{0:d} {1:d} pdfSetupPaper\n", paperWidth, paperHeight); - } - } -#ifdef OPI_SUPPORT - if (generateOPI) { - writePS("/opiMatrix matrix currentmatrix def\n"); - } -#endif - } - if (customCodeCbk) { - if ((s = (*customCodeCbk)(this, psOutCustomDocSetup, 0, - customCodeCbkData))) { - writePS(s->getCString()); - delete s; - } - } -} - -void PSOutputDev::writePageTrailer() { - if (mode != psModeForm) { - writePS("pdfEndPage\n"); - } -} - -void PSOutputDev::writeTrailer() { - PSOutCustomColor *cc; - - if (mode == psModeForm) { - writePS("/Foo exch /Form defineresource pop\n"); - } else { - writePS("end\n"); - writePS("%%DocumentSuppliedResources:\n"); - writePS(embFontList->getCString()); - if (level == psLevel1Sep || level == psLevel2Sep || - level == psLevel3Sep) { - writePS("%%DocumentProcessColors:"); - if (processColors & psProcessCyan) { - writePS(" Cyan"); - } - if (processColors & psProcessMagenta) { - writePS(" Magenta"); - } - if (processColors & psProcessYellow) { - writePS(" Yellow"); - } - if (processColors & psProcessBlack) { - writePS(" Black"); - } - writePS("\n"); - writePS("%%DocumentCustomColors:"); - for (cc = customColors; cc; cc = cc->next) { - writePS(" "); - writePSString(cc->name); - } - writePS("\n"); - writePS("%%CMYKCustomColor:\n"); - for (cc = customColors; cc; cc = cc->next) { - writePSFmt("%%+ {0:.4g} {1:.4g} {2:.4g} {3:.4g} ", - cc->c, cc->m, cc->y, cc->k); - writePSString(cc->name); - writePS("\n"); - } - } - } -} - -void PSOutputDev::setupResources(Dict *resDict) { - GBool skip; - - setupFonts(resDict); - setupImages(resDict); - setupForms(resDict); - - //----- recursively scan XObjects - Object xObjDict = resDict->lookup("XObject"); - if (xObjDict.isDict()) { - for (int i = 0; i < xObjDict.dictGetLength(); ++i) { - - // avoid infinite recursion on XObjects - skip = gFalse; - Object xObjRef = xObjDict.dictGetValNF(i); - if (xObjRef.isRef()) { - Ref ref0 = xObjRef.getRef(); - if (resourceIDs.find(ref0.num) != resourceIDs.end()) { - skip = gTrue; - } else { - resourceIDs.insert(ref0.num); - } - } - if (!skip) { - - // process the XObject's resource dictionary - Object xObj = xObjDict.dictGetVal(i); - if (xObj.isStream()) { - Object resObj = xObj.streamGetDict()->lookup("Resources"); - if (resObj.isDict()) { - setupResources(resObj.getDict()); - } - } - } - } - } - - //----- recursively scan Patterns - Object patDict = resDict->lookup("Pattern"); - if (patDict.isDict()) { - inType3Char = gTrue; - for (int i = 0; i < patDict.dictGetLength(); ++i) { - - // avoid infinite recursion on Patterns - skip = gFalse; - Object patRef = patDict.dictGetValNF(i); - if (patRef.isRef()) { - Ref ref0 = patRef.getRef(); - if (resourceIDs.find(ref0.num) != resourceIDs.end()) { - skip = gTrue; - } else { - resourceIDs.insert(ref0.num); - } - } - if (!skip) { - - // process the Pattern's resource dictionary - Object pat = patDict.dictGetVal(i); - if (pat.isStream()) { - Object resObj = pat.streamGetDict()->lookup("Resources"); - if (resObj.isDict()) { - setupResources(resObj.getDict()); - } - } - } - } - inType3Char = gFalse; - } -} - -void PSOutputDev::setupFonts(Dict *resDict) { - Ref r; - GfxFontDict *gfxFontDict; - GfxFont *font; - int i; - - gfxFontDict = nullptr; - Object obj1 = resDict->lookupNF("Font"); - if (obj1.isRef()) { - Object obj2 = obj1.fetch(xref); - if (obj2.isDict()) { - r = obj1.getRef(); - gfxFontDict = new GfxFontDict(xref, &r, obj2.getDict()); - } - } else if (obj1.isDict()) { - gfxFontDict = new GfxFontDict(xref, nullptr, obj1.getDict()); - } - if (gfxFontDict) { - for (i = 0; i < gfxFontDict->getNumFonts(); ++i) { - if ((font = gfxFontDict->getFont(i))) { - setupFont(font, resDict); - } - } - delete gfxFontDict; - } -} - -void PSOutputDev::setupFont(GfxFont *font, Dict *parentResDict) { - GfxFontLoc *fontLoc; - GooString *psName; - char buf[16]; - GBool subst; - UnicodeMap *uMap; - const char *charName; - double xs, ys; - int code; - double w1, w2; - int i, j; - - // check if font is already set up - for (i = 0; i < fontIDLen; ++i) { - if (fontIDs[i].num == font->getID()->num && - fontIDs[i].gen == font->getID()->gen) { - return; - } - } - - // add entry to fontIDs list - if (fontIDLen >= fontIDSize) { - fontIDSize += 64; - fontIDs = (Ref *)greallocn(fontIDs, fontIDSize, sizeof(Ref)); - } - fontIDs[fontIDLen++] = *font->getID(); - - psName = nullptr; - xs = ys = 1; - subst = gFalse; - - if (font->getType() == fontType3) { - psName = GooString::format("T3_{0:d}_{1:d}", - font->getID()->num, font->getID()->gen); - setupType3Font(font, psName, parentResDict); - } else { - fontLoc = font->locateFont(xref, this); - if (fontLoc != nullptr) { - switch (fontLoc->locType) { - case gfxFontLocEmbedded: - switch (fontLoc->fontType) { - case fontType1: - // this assumes that the PS font name matches the PDF font name - psName = font->getEmbeddedFontName() ? font->getEmbeddedFontName()->copy() : new GooString(); - setupEmbeddedType1Font(&fontLoc->embFontID, psName); - break; - case fontType1C: - psName = makePSFontName(font, &fontLoc->embFontID); - setupEmbeddedType1CFont(font, &fontLoc->embFontID, psName); - break; - case fontType1COT: - psName = makePSFontName(font, &fontLoc->embFontID); - setupEmbeddedOpenTypeT1CFont(font, &fontLoc->embFontID, psName); - break; - case fontTrueType: - case fontTrueTypeOT: - psName = makePSFontName(font, font->getID()); - setupEmbeddedTrueTypeFont(font, &fontLoc->embFontID, psName); - break; - case fontCIDType0C: - psName = makePSFontName(font, &fontLoc->embFontID); - setupEmbeddedCIDType0Font(font, &fontLoc->embFontID, psName); - break; - case fontCIDType2: - case fontCIDType2OT: - psName = makePSFontName(font, font->getID()); - //~ should check to see if font actually uses vertical mode - setupEmbeddedCIDTrueTypeFont(font, &fontLoc->embFontID, psName, gTrue); - break; - case fontCIDType0COT: - psName = makePSFontName(font, &fontLoc->embFontID); - setupEmbeddedOpenTypeCFFFont(font, &fontLoc->embFontID, psName); - break; - default: - break; - } - break; - case gfxFontLocExternal: - //~ add cases for external 16-bit fonts - switch (fontLoc->fontType) { - case fontType1: - if (font->getEmbeddedFontName()) { - // this assumes that the PS font name matches the PDF font name - psName = font->getEmbeddedFontName()->copy(); - } else { - //~ this won't work -- the PS font name won't match - psName = makePSFontName(font, font->getID()); - } - setupExternalType1Font(fontLoc->path, psName); - break; - case fontTrueType: - case fontTrueTypeOT: - psName = makePSFontName(font, font->getID()); - setupExternalTrueTypeFont(font, fontLoc->path, psName); - break; - case fontCIDType2: - case fontCIDType2OT: - psName = makePSFontName(font, font->getID()); - //~ should check to see if font actually uses vertical mode - setupExternalCIDTrueTypeFont(font, fontLoc->path, psName, gTrue); - break; - default: - break; - } - break; - case gfxFontLocResident: - psName = fontLoc->path->copy(); - break; - } - } - - if (!psName) { - if (font->isCIDFont()) { - error(errSyntaxError, -1, - "Couldn't find a font to substitute for '{0:s}' ('{1:s}' character collection)", - font->getName() ? font->getName()->getCString() - : "(unnamed)", - ((GfxCIDFont *)font)->getCollection() - ? ((GfxCIDFont *)font)->getCollection()->getCString() - : "(unknown)"); - if (font16EncLen >= font16EncSize) { - font16EncSize += 16; - font16Enc = (PSFont16Enc *)greallocn(font16Enc, - font16EncSize, - sizeof(PSFont16Enc)); - } - font16Enc[font16EncLen].fontID = *font->getID(); - font16Enc[font16EncLen].enc = nullptr; - ++font16EncLen; - } else { - error(errSyntaxError, -1, - "Couldn't find a font to substitute for '{0:s}'", - font->getName() ? font->getName()->getCString() - : "(unnamed)"); - } - delete fontLoc; - return; - } - - // scale substituted 8-bit fonts - if (fontLoc->locType == gfxFontLocResident && - fontLoc->substIdx >= 0) { - subst = gTrue; - for (code = 0; code < 256; ++code) { - if ((charName = ((Gfx8BitFont *)font)->getCharName(code)) && - charName[0] == 'm' && charName[1] == '\0') { - break; - } - } - if (code < 256) { - w1 = ((Gfx8BitFont *)font)->getWidth(code); - } else { - w1 = 0; - } - w2 = psBase14SubstFonts[fontLoc->substIdx].mWidth; - xs = w1 / w2; - if (xs < 0.1) { - xs = 1; - } - } - - // handle encodings for substituted CID fonts - if (fontLoc->locType == gfxFontLocResident && - fontLoc->fontType >= fontCIDType0) { - subst = gTrue; - if (font16EncLen >= font16EncSize) { - font16EncSize += 16; - font16Enc = (PSFont16Enc *)greallocn(font16Enc, - font16EncSize, - sizeof(PSFont16Enc)); - } - font16Enc[font16EncLen].fontID = *font->getID(); - if ((uMap = globalParams->getUnicodeMap(fontLoc->encoding))) { - font16Enc[font16EncLen].enc = fontLoc->encoding->copy(); - uMap->decRefCnt(); - } else { - error(errSyntaxError, -1, - "Couldn't find Unicode map for 16-bit font encoding '{0:t}'", - fontLoc->encoding); - font16Enc[font16EncLen].enc = nullptr; - } - ++font16EncLen; - } - - delete fontLoc; - } - - // generate PostScript code to set up the font - if (font->isCIDFont()) { - if (level == psLevel3 || level == psLevel3Sep) { - writePSFmt("/F{0:d}_{1:d} /{2:t} {3:d} pdfMakeFont16L3\n", - font->getID()->num, font->getID()->gen, psName, - font->getWMode()); - } else { - writePSFmt("/F{0:d}_{1:d} /{2:t} {3:d} pdfMakeFont16\n", - font->getID()->num, font->getID()->gen, psName, - font->getWMode()); - } - } else { - writePSFmt("/F{0:d}_{1:d} /{2:t} {3:.6g} {4:.6g}\n", - font->getID()->num, font->getID()->gen, psName, xs, ys); - for (i = 0; i < 256; i += 8) { - writePS((char *)((i == 0) ? "[ " : " ")); - for (j = 0; j < 8; ++j) { - if (font->getType() == fontTrueType && - !subst && - !((Gfx8BitFont *)font)->getHasEncoding()) { - sprintf(buf, "c%02x", i+j); - charName = buf; - } else { - charName = ((Gfx8BitFont *)font)->getCharName(i+j); - } - writePS("/"); - writePSName(charName ? charName : (char *)".notdef"); - // the empty name is legal in PDF and PostScript, but PostScript - // uses a double-slash (//...) for "immediately evaluated names", - // so we need to add a space character here - if (charName && !charName[0]) { - writePS(" "); - } - } - writePS((i == 256-8) ? (char *)"]\n" : (char *)"\n"); - } - writePS("pdfMakeFont\n"); - } - - delete psName; -} - -void PSOutputDev::setupEmbeddedType1Font(Ref *id, GooString *psName) { - static const char hexChar[17] = "0123456789abcdef"; - Dict *dict; - long length1, length2, length3; - int c, i; - int start[4]; - GBool binMode; - GBool writePadding = gTrue; - - // check if font is already embedded - if (!fontNames.emplace(psName->toStr()).second) { - return; - } - - // get the font stream and info - Object obj1, obj2, obj3; - Object refObj(id->num, id->gen); - Object strObj = refObj.fetch(xref); - if (!strObj.isStream()) { - error(errSyntaxError, -1, "Embedded font file object is not a stream"); - goto err1; - } - if (!(dict = strObj.streamGetDict())) { - error(errSyntaxError, -1, - "Embedded font stream is missing its dictionary"); - goto err1; - } - obj1 = dict->lookup("Length1"); - obj2 = dict->lookup("Length2"); - obj3 = dict->lookup("Length3"); - if (!obj1.isInt() || !obj2.isInt() || !obj3.isInt()) { - error(errSyntaxError, -1, - "Missing length fields in embedded font stream dictionary"); - goto err1; - } - length1 = obj1.getInt(); - length2 = obj2.getInt(); - length3 = obj3.getInt(); - - // beginning comment - writePSFmt("%%BeginResource: font {0:t}\n", psName); - embFontList->append("%%+ font "); - embFontList->append(psName->getCString()); - embFontList->append("\n"); - - strObj.streamReset(); - if (strObj.streamGetChar() == 0x80 && - strObj.streamGetChar() == 1) { - // PFB format - length1 = strObj.streamGetChar() | - (strObj.streamGetChar() << 8) | - (strObj.streamGetChar() << 16) | - (strObj.streamGetChar() << 24); - } else { - strObj.streamReset(); - } - // copy ASCII portion of font - for (i = 0; i < length1 && (c = strObj.streamGetChar()) != EOF; ++i) { - writePSChar(c); - } - - // figure out if encrypted portion is binary or ASCII - binMode = gFalse; - for (i = 0; i < 4; ++i) { - start[i] = strObj.streamGetChar(); - if (start[i] == EOF) { - error(errSyntaxError, -1, - "Unexpected end of file in embedded font stream"); - goto err1; - } - if (!((start[i] >= '0' && start[i] <= '9') || - (start[i] >= 'A' && start[i] <= 'F') || - (start[i] >= 'a' && start[i] <= 'f'))) - binMode = gTrue; - } - - if (length2 == 0) - { - // length2 == 0 is an error - // trying to solve it by just piping all - // the stream data - error(errSyntaxWarning, -1, "Font has length2 as 0, trying to overcome the problem reading the stream until the end"); - length2 = INT_MAX; - writePadding = gFalse; - } - - - // convert binary data to ASCII - if (binMode) { - if (start[0] == 0x80 && - start[1] == 2) { - length2 = start[2] | - (start[3] << 8) | - (strObj.streamGetChar() << 16) | - (strObj.streamGetChar() << 24); - i = 0; - } else { - for (i = 0; i < 4; ++i) { - writePSChar(hexChar[(start[i] >> 4) & 0x0f]); - writePSChar(hexChar[start[i] & 0x0f]); - } - } -#if 0 // this causes trouble for various PostScript printers - // if Length2 is incorrect (too small), font data gets chopped, so - // we take a few extra characters from the trailer just in case - length2 += length3 >= 8 ? 8 : length3; -#endif - while (i < length2) { - if ((c = strObj.streamGetChar()) == EOF) { - break; - } - writePSChar(hexChar[(c >> 4) & 0x0f]); - writePSChar(hexChar[c & 0x0f]); - if (++i % 32 == 0) { - writePSChar('\n'); - } - } - if (i % 32 > 0) { - writePSChar('\n'); - } - - // already in ASCII format -- just copy it - } else { - for (i = 0; i < 4; ++i) { - writePSChar(start[i]); - } - for (i = 4; i < length2; ++i) { - if ((c = strObj.streamGetChar()) == EOF) { - break; - } - writePSChar(c); - } - } - - if (writePadding) - { - if (length3 > 0) { - // write fixed-content portion - c = strObj.streamGetChar(); - if (c == 0x80) { - c = strObj.streamGetChar(); - if (c == 1) { - length3 = strObj.streamGetChar() | - (strObj.streamGetChar() << 8) | - (strObj.streamGetChar() << 16) | - (strObj.streamGetChar() << 24); - - i = 0; - while (i < length3) { - if ((c = strObj.streamGetChar()) == EOF) { - break; - } - writePSChar(c); - ++i; - } - } - } else { - if (c != EOF) { - writePSChar(c); - - while ((c = strObj.streamGetChar()) != EOF) { - writePSChar(c); - } - } - } - } else { - // write padding and "cleartomark" - for (i = 0; i < 8; ++i) { - writePS("00000000000000000000000000000000" - "00000000000000000000000000000000\n"); - } - writePS("cleartomark\n"); - } - } - - // ending comment - writePS("%%EndResource\n"); - - err1: - if (strObj.isStream()) - strObj.streamClose(); -} - -void PSOutputDev::setupExternalType1Font(GooString *fileName, GooString *psName) { - static const char hexChar[17] = "0123456789abcdef"; - FILE *fontFile; - int c; - - if (!fontNames.emplace(psName->toStr()).second) { - return; - } - - // beginning comment - writePSFmt("%%BeginResource: font {0:t}\n", psName); - embFontList->append("%%+ font "); - embFontList->append(psName->getCString()); - embFontList->append("\n"); - - // copy the font file - if (!(fontFile = fopen(fileName->getCString(), "rb"))) { - error(errIO, -1, "Couldn't open external font file"); - return; - } - - c = fgetc(fontFile); - if (c == 0x80) { - // PFB file - ungetc(c, fontFile); - while (!feof(fontFile)) { - fgetc(fontFile); // skip start of segment byte (0x80) - int segType = fgetc(fontFile); - long segLen = fgetc(fontFile) | - (fgetc(fontFile) << 8) | - (fgetc(fontFile) << 16) | - (fgetc(fontFile) << 24); - if (feof(fontFile)) - break; - - if (segType == 1) { - // ASCII segment - for (long i = 0; i < segLen; i++) { - c = fgetc(fontFile); - if (c == EOF) - break; - writePSChar(c); - } - } else if (segType == 2) { - // binary segment - for (long i = 0; i < segLen; i++) { - c = fgetc(fontFile); - if (c == EOF) - break; - writePSChar(hexChar[(c >> 4) & 0x0f]); - writePSChar(hexChar[c & 0x0f]); - if (i % 36 == 35) - writePSChar('\n'); - } - } else { - // end of file - break; - } - } - } else if (c != EOF) { - writePSChar(c); - while ((c = fgetc(fontFile)) != EOF) - writePSChar(c); - } - fclose(fontFile); - - // ending comment - writePS("%%EndResource\n"); -} - -void PSOutputDev::setupEmbeddedType1CFont(GfxFont *font, Ref *id, - GooString *psName) { - char *fontBuf; - int fontLen; - FoFiType1C *ffT1C; - int i; - - // check if font is already embedded - for (i = 0; i < t1FontNameLen; ++i) { - if (t1FontNames[i].fontFileID.num == id->num && - t1FontNames[i].fontFileID.gen == id->gen) { - psName->clear(); - psName->insert(0, t1FontNames[i].psName); - return; - } - } - if (t1FontNameLen == t1FontNameSize) { - t1FontNameSize *= 2; - t1FontNames = (PST1FontName *)greallocn(t1FontNames, t1FontNameSize, - sizeof(PST1FontName)); - } - t1FontNames[t1FontNameLen].fontFileID = *id; - t1FontNames[t1FontNameLen].psName = psName->copy(); - ++t1FontNameLen; - - // beginning comment - writePSFmt("%%BeginResource: font {0:t}\n", psName); - embFontList->append("%%+ font "); - embFontList->append(psName->getCString()); - embFontList->append("\n"); - - // convert it to a Type 1 font - if ((fontBuf = font->readEmbFontFile(xref, &fontLen))) { - if ((ffT1C = FoFiType1C::make(fontBuf, fontLen))) { - ffT1C->convertToType1(psName->getCString(), nullptr, gTrue, - outputFunc, outputStream); - delete ffT1C; - } - gfree(fontBuf); - } - - // ending comment - writePS("%%EndResource\n"); -} - -void PSOutputDev::setupEmbeddedOpenTypeT1CFont(GfxFont *font, Ref *id, - GooString *psName) { - char *fontBuf; - int fontLen; - FoFiTrueType *ffTT; - int i; - - // check if font is already embedded - for (i = 0; i < t1FontNameLen; ++i) { - if (t1FontNames[i].fontFileID.num == id->num && - t1FontNames[i].fontFileID.gen == id->gen) { - psName->clear(); - psName->insert(0, t1FontNames[i].psName); - return; - } - } - if (t1FontNameLen == t1FontNameSize) { - t1FontNameSize *= 2; - t1FontNames = (PST1FontName *)greallocn(t1FontNames, t1FontNameSize, - sizeof(PST1FontName)); - } - t1FontNames[t1FontNameLen].fontFileID = *id; - t1FontNames[t1FontNameLen].psName = psName->copy(); - ++t1FontNameLen; - - // beginning comment - writePSFmt("%%BeginResource: font {0:t}\n", psName); - embFontList->append("%%+ font "); - embFontList->append(psName->getCString()); - embFontList->append("\n"); - - // convert it to a Type 1 font - if ((fontBuf = font->readEmbFontFile(xref, &fontLen))) { - if ((ffTT = FoFiTrueType::make(fontBuf, fontLen))) { - if (ffTT->isOpenTypeCFF()) { - ffTT->convertToType1(psName->getCString(), nullptr, gTrue, - outputFunc, outputStream); - } - delete ffTT; - } - gfree(fontBuf); - } - - // ending comment - writePS("%%EndResource\n"); -} - -void PSOutputDev::setupEmbeddedTrueTypeFont(GfxFont *font, Ref *id, - GooString *psName) { - char *fontBuf; - int fontLen; - FoFiTrueType *ffTT; - int *codeToGID; - - // beginning comment - writePSFmt("%%BeginResource: font {0:t}\n", psName); - embFontList->append("%%+ font "); - embFontList->append(psName->getCString()); - embFontList->append("\n"); - - // convert it to a Type 42 font - if ((fontBuf = font->readEmbFontFile(xref, &fontLen))) { - if ((ffTT = FoFiTrueType::make(fontBuf, fontLen))) { - codeToGID = ((Gfx8BitFont *)font)->getCodeToGIDMap(ffTT); - ffTT->convertToType42(psName->getCString(), - ((Gfx8BitFont *)font)->getHasEncoding() - ? ((Gfx8BitFont *)font)->getEncoding() - : (char **)nullptr, - codeToGID, outputFunc, outputStream); - if (codeToGID) { - if (font8InfoLen >= font8InfoSize) { - font8InfoSize += 16; - font8Info = (PSFont8Info *)greallocn(font8Info, - font8InfoSize, - sizeof(PSFont8Info)); - } - font8Info[font8InfoLen].fontID = *font->getID(); - font8Info[font8InfoLen].codeToGID = codeToGID; - ++font8InfoLen; - } - delete ffTT; - } - gfree(fontBuf); - } - - // ending comment - writePS("%%EndResource\n"); -} - -void PSOutputDev::setupExternalTrueTypeFont(GfxFont *font, GooString *fileName, - GooString *psName) { - FoFiTrueType *ffTT; - int *codeToGID; - - // beginning comment - writePSFmt("%%BeginResource: font {0:t}\n", psName); - embFontList->append("%%+ font "); - embFontList->append(psName->getCString()); - embFontList->append("\n"); - - // convert it to a Type 42 font - if ((ffTT = FoFiTrueType::load(fileName->getCString()))) { - codeToGID = ((Gfx8BitFont *)font)->getCodeToGIDMap(ffTT); - ffTT->convertToType42(psName->getCString(), - ((Gfx8BitFont *)font)->getHasEncoding() - ? ((Gfx8BitFont *)font)->getEncoding() - : (char **)nullptr, - codeToGID, outputFunc, outputStream); - if (codeToGID) { - if (font8InfoLen >= font8InfoSize) { - font8InfoSize += 16; - font8Info = (PSFont8Info *)greallocn(font8Info, - font8InfoSize, - sizeof(PSFont8Info)); - } - font8Info[font8InfoLen].fontID = *font->getID(); - font8Info[font8InfoLen].codeToGID = codeToGID; - ++font8InfoLen; - } - delete ffTT; - } - - // ending comment - writePS("%%EndResource\n"); -} - -void PSOutputDev::updateFontMaxValidGlyph(GfxFont *font, int maxValidGlyph) { - if (maxValidGlyph >= 0 && font->getName()) { - auto& fontMaxValidGlyph = this->fontMaxValidGlyph[font->getName()->toStr()]; - if (fontMaxValidGlyph < maxValidGlyph) { - fontMaxValidGlyph = maxValidGlyph; - } - } -} - -void PSOutputDev::setupExternalCIDTrueTypeFont(GfxFont *font, - GooString *fileName, - GooString *psName, - GBool needVerticalMetrics) { - FoFiTrueType *ffTT; - int *codeToGID; - int codeToGIDLen; - - // beginning comment - writePSFmt("%%BeginResource: font {0:t}\n", psName); - embFontList->append("%%+ font "); - embFontList->append(psName->getCString()); - embFontList->append("\n"); - - // convert it to a Type 0 font - //~ this should use fontNum to load the correct font - if ((ffTT = FoFiTrueType::load(fileName->getCString()))) { - - // check for embedding permission - if (ffTT->getEmbeddingRights() >= 1) { - codeToGID = nullptr; - codeToGIDLen = 0; - if (((GfxCIDFont *)font)->getCIDToGID()) { - codeToGIDLen = ((GfxCIDFont *)font)->getCIDToGIDLen(); - if (codeToGIDLen) { - codeToGID = (int *)gmallocn(codeToGIDLen, sizeof(int)); - memcpy(codeToGID, ((GfxCIDFont *)font)->getCIDToGID(), - codeToGIDLen * sizeof(int)); - } - } else { - codeToGID = ((GfxCIDFont *)font)->getCodeToGIDMap(ffTT, &codeToGIDLen); - } - if (ffTT->isOpenTypeCFF()) { - ffTT->convertToCIDType0(psName->getCString(), - codeToGID, codeToGIDLen, - outputFunc, outputStream); - } else if (globalParams->getPSLevel() >= psLevel3) { - // Level 3: use a CID font - ffTT->convertToCIDType2(psName->getCString(), - codeToGID, codeToGIDLen, - needVerticalMetrics, - outputFunc, outputStream); - } else { - // otherwise: use a non-CID composite font - int maxValidGlyph = -1; - ffTT->convertToType0(psName->getCString(), - codeToGID, codeToGIDLen, - needVerticalMetrics, - &maxValidGlyph, - outputFunc, outputStream); - updateFontMaxValidGlyph(font, maxValidGlyph); - } - gfree(codeToGID); - } else { - error(errSyntaxError, -1, - "TrueType font '{0:s}' does not allow embedding", - font->getName() ? font->getName()->getCString() : "(unnamed)"); - - } - delete ffTT; - } - - // ending comment - writePS("%%EndResource\n"); -} - -void PSOutputDev::setupEmbeddedCIDType0Font(GfxFont *font, Ref *id, - GooString *psName) { - char *fontBuf; - int fontLen; - FoFiType1C *ffT1C; - int i; - - // check if font is already embedded - for (i = 0; i < t1FontNameLen; ++i) { - if (t1FontNames[i].fontFileID.num == id->num && - t1FontNames[i].fontFileID.gen == id->gen) { - psName->clear(); - psName->insert(0, t1FontNames[i].psName); - return; - } - } - if (t1FontNameLen == t1FontNameSize) { - t1FontNameSize *= 2; - t1FontNames = (PST1FontName *)greallocn(t1FontNames, t1FontNameSize, - sizeof(PST1FontName)); - } - t1FontNames[t1FontNameLen].fontFileID = *id; - t1FontNames[t1FontNameLen].psName = psName->copy(); - ++t1FontNameLen; - - // beginning comment - writePSFmt("%%BeginResource: font {0:t}\n", psName); - embFontList->append("%%+ font "); - embFontList->append(psName->getCString()); - embFontList->append("\n"); - - // convert it to a Type 0 font - if ((fontBuf = font->readEmbFontFile(xref, &fontLen))) { - if ((ffT1C = FoFiType1C::make(fontBuf, fontLen))) { - if (globalParams->getPSLevel() >= psLevel3) { - // Level 3: use a CID font - ffT1C->convertToCIDType0(psName->getCString(), nullptr, 0, - outputFunc, outputStream); - } else { - // otherwise: use a non-CID composite font - ffT1C->convertToType0(psName->getCString(), nullptr, 0, - outputFunc, outputStream); - } - delete ffT1C; - } - gfree(fontBuf); - } - - // ending comment - writePS("%%EndResource\n"); -} - -void PSOutputDev::setupEmbeddedCIDTrueTypeFont(GfxFont *font, Ref *id, - GooString *psName, - GBool needVerticalMetrics) { - char *fontBuf; - int fontLen; - FoFiTrueType *ffTT; - - // beginning comment - writePSFmt("%%BeginResource: font {0:t}\n", psName); - embFontList->append("%%+ font "); - embFontList->append(psName->getCString()); - embFontList->append("\n"); - - // convert it to a Type 0 font - if ((fontBuf = font->readEmbFontFile(xref, &fontLen))) { - if ((ffTT = FoFiTrueType::make(fontBuf, fontLen))) { - if (globalParams->getPSLevel() >= psLevel3) { - // Level 3: use a CID font - ffTT->convertToCIDType2(psName->getCString(), - ((GfxCIDFont *)font)->getCIDToGID(), - ((GfxCIDFont *)font)->getCIDToGIDLen(), - needVerticalMetrics, - outputFunc, outputStream); - } else { - // otherwise: use a non-CID composite font - int maxValidGlyph = -1; - ffTT->convertToType0(psName->getCString(), - ((GfxCIDFont *)font)->getCIDToGID(), - ((GfxCIDFont *)font)->getCIDToGIDLen(), - needVerticalMetrics, - &maxValidGlyph, - outputFunc, outputStream); - updateFontMaxValidGlyph(font, maxValidGlyph); - } - delete ffTT; - } - gfree(fontBuf); - } - - // ending comment - writePS("%%EndResource\n"); -} - -void PSOutputDev::setupEmbeddedOpenTypeCFFFont(GfxFont *font, Ref *id, - GooString *psName) { - char *fontBuf; - int fontLen; - FoFiTrueType *ffTT; - int i; - - // check if font is already embedded - for (i = 0; i < t1FontNameLen; ++i) { - if (t1FontNames[i].fontFileID.num == id->num && - t1FontNames[i].fontFileID.gen == id->gen) { - psName->clear(); - psName->insert(0, t1FontNames[i].psName); - return; - } - } - if (t1FontNameLen == t1FontNameSize) { - t1FontNameSize *= 2; - t1FontNames = (PST1FontName *)greallocn(t1FontNames, t1FontNameSize, - sizeof(PST1FontName)); - } - t1FontNames[t1FontNameLen].fontFileID = *id; - t1FontNames[t1FontNameLen].psName = psName->copy(); - ++t1FontNameLen; - - // beginning comment - writePSFmt("%%BeginResource: font {0:t}\n", psName); - embFontList->append("%%+ font "); - embFontList->append(psName->getCString()); - embFontList->append("\n"); - - // convert it to a Type 0 font - if ((fontBuf = font->readEmbFontFile(xref, &fontLen))) { - if ((ffTT = FoFiTrueType::make(fontBuf, fontLen))) { - if (ffTT->isOpenTypeCFF()) { - if (globalParams->getPSLevel() >= psLevel3) { - // Level 3: use a CID font - ffTT->convertToCIDType0(psName->getCString(), - ((GfxCIDFont *)font)->getCIDToGID(), - ((GfxCIDFont *)font)->getCIDToGIDLen(), - outputFunc, outputStream); - } else { - // otherwise: use a non-CID composite font - ffTT->convertToType0(psName->getCString(), - ((GfxCIDFont *)font)->getCIDToGID(), - ((GfxCIDFont *)font)->getCIDToGIDLen(), - outputFunc, outputStream); - } - } - delete ffTT; - } - gfree(fontBuf); - } - - // ending comment - writePS("%%EndResource\n"); -} - -void PSOutputDev::setupType3Font(GfxFont *font, GooString *psName, - Dict *parentResDict) { - Dict *resDict; - Dict *charProcs; - Gfx *gfx; - PDFRectangle box; - double *m; - GooString *buf; - int i; - - // set up resources used by font - if ((resDict = ((Gfx8BitFont *)font)->getResources())) { - inType3Char = gTrue; - setupResources(resDict); - inType3Char = gFalse; - } else { - resDict = parentResDict; - } - - // beginning comment - writePSFmt("%%BeginResource: font {0:t}\n", psName); - embFontList->append("%%+ font "); - embFontList->append(psName->getCString()); - embFontList->append("\n"); - - // font dictionary - writePS("8 dict begin\n"); - writePS("/FontType 3 def\n"); - m = font->getFontMatrix(); - writePSFmt("/FontMatrix [{0:.6g} {1:.6g} {2:.6g} {3:.6g} {4:.6g} {5:.6g}] def\n", - m[0], m[1], m[2], m[3], m[4], m[5]); - m = font->getFontBBox(); - writePSFmt("/FontBBox [{0:.6g} {1:.6g} {2:.6g} {3:.6g}] def\n", - m[0], m[1], m[2], m[3]); - writePS("/Encoding 256 array def\n"); - writePS(" 0 1 255 { Encoding exch /.notdef put } for\n"); - writePS("/BuildGlyph {\n"); - writePS(" exch /CharProcs get exch\n"); - writePS(" 2 copy known not { pop /.notdef } if\n"); - writePS(" get exec\n"); - writePS("} bind def\n"); - writePS("/BuildChar {\n"); - writePS(" 1 index /Encoding get exch get\n"); - writePS(" 1 index /BuildGlyph get exec\n"); - writePS("} bind def\n"); - if ((charProcs = ((Gfx8BitFont *)font)->getCharProcs())) { - writePSFmt("/CharProcs {0:d} dict def\n", charProcs->getLength()); - writePS("CharProcs begin\n"); - box.x1 = m[0]; - box.y1 = m[1]; - box.x2 = m[2]; - box.y2 = m[3]; - gfx = new Gfx(doc, this, resDict, &box, nullptr); - inType3Char = gTrue; - for (i = 0; i < charProcs->getLength(); ++i) { - t3FillColorOnly = gFalse; - t3Cacheable = gFalse; - t3NeedsRestore = gFalse; - writePS("/"); - writePSName(charProcs->getKey(i)); - writePS(" {\n"); - Object charProc = charProcs->getVal(i); - gfx->display(&charProc); - if (t3String) { - if (t3Cacheable) { - buf = GooString::format("{0:.6g} {1:.6g} {2:.6g} {3:.6g} {4:.6g} {5:.6g} setcachedevice\n", - t3WX, t3WY, t3LLX, t3LLY, t3URX, t3URY); - } else { - buf = GooString::format("{0:.6g} {1:.6g} setcharwidth\n", t3WX, t3WY); - } - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - (*outputFunc)(outputStream, t3String->getCString(), - t3String->getLength()); - delete t3String; - t3String = nullptr; - } - if (t3NeedsRestore) { - (*outputFunc)(outputStream, "Q\n", 2); - } - writePS("} def\n"); - } - inType3Char = gFalse; - delete gfx; - writePS("end\n"); - } - writePS("currentdict end\n"); - writePSFmt("/{0:t} exch definefont pop\n", psName); - - // ending comment - writePS("%%EndResource\n"); -} - -// Make a unique PS font name, based on the names given in the PDF -// font object, and an object ID (font file object for -GooString *PSOutputDev::makePSFontName(GfxFont *font, const Ref *id) { - GooString *psName; - const GooString *s; - - if ((s = font->getEmbeddedFontName())) { - psName = filterPSName(s); - if (fontNames.emplace(psName->toStr()).second) { - return psName; - } - delete psName; - } - if ((s = font->getName())) { - psName = filterPSName(s); - if (fontNames.emplace(psName->toStr()).second) { - return psName; - } - delete psName; - } - psName = GooString::format("FF{0:d}_{1:d}", id->num, id->gen); - if ((s = font->getEmbeddedFontName())) { - s = filterPSName(s); - psName->append('_')->append(s); - delete s; - } else if ((s = font->getName())) { - s = filterPSName(s); - psName->append('_')->append(s); - delete s; - } - fontNames.emplace(psName->toStr()); - return psName; -} - -void PSOutputDev::setupImages(Dict *resDict) { - Ref imgID; - - if (!(mode == psModeForm || inType3Char || preloadImagesForms)) { - return; - } - - //----- recursively scan XObjects - Object xObjDict = resDict->lookup("XObject"); - if (xObjDict.isDict()) { - for (int i = 0; i < xObjDict.dictGetLength(); ++i) { - Object xObjRef = xObjDict.dictGetValNF(i); - Object xObj = xObjDict.dictGetVal(i); - if (xObj.isStream()) { - Object subtypeObj = xObj.streamGetDict()->lookup("Subtype"); - if (subtypeObj.isName("Image")) { - if (xObjRef.isRef()) { - imgID = xObjRef.getRef(); - int j; - for (j = 0; j < imgIDLen; ++j) { - if (imgIDs[j].num == imgID.num && imgIDs[j].gen == imgID.gen) { - break; - } - } - if (j == imgIDLen) { - if (imgIDLen >= imgIDSize) { - if (imgIDSize == 0) { - imgIDSize = 64; - } else { - imgIDSize *= 2; - } - imgIDs = (Ref *)greallocn(imgIDs, imgIDSize, sizeof(Ref)); - } - imgIDs[imgIDLen++] = imgID; - setupImage(imgID, xObj.getStream(), gFalse); - if (level >= psLevel3) { - Object maskObj = xObj.streamGetDict()->lookup("Mask"); - if (maskObj.isStream()) { - setupImage(imgID, maskObj.getStream(), gTrue); - } - } - } - } else { - error(errSyntaxError, -1, - "Image in resource dict is not an indirect reference"); - } - } - } - } - } -} - -void PSOutputDev::setupImage(Ref id, Stream *str, GBool mask) { - GBool useFlate, useLZW, useRLE, useCompressed, doUseASCIIHex; - GooString *s; - int c; - int size, line, col, i; - int outerSize, outer; - - // filters - //~ this does not correctly handle the DeviceN color space - //~ -- need to use DeviceNRecoder - - useFlate = useLZW = useRLE = gFalse; - useCompressed = gFalse; - doUseASCIIHex = gFalse; - - if (level < psLevel2) { - doUseASCIIHex = gTrue; - } else { - if (uncompressPreloadedImages) { - /* nothing to do */; - } else { - s = str->getPSFilter(level < psLevel3 ? 2 : 3, ""); - if (s) { - useCompressed = gTrue; - delete s; - } else { - if (level >= psLevel3 && getEnableFlate()) { - useFlate = gTrue; - } else if (getEnableLZW()) { - useLZW = gTrue; - } else { - useRLE = gTrue; - } - } - } - doUseASCIIHex = useASCIIHex; - } - if (useCompressed) { - str = str->getUndecodedStream(); - } -#ifdef ENABLE_ZLIB - if (useFlate) { - str = new FlateEncoder(str); - } else -#endif - if (useLZW) { - str = new LZWEncoder(str); - } else if (useRLE) { - str = new RunLengthEncoder(str); - } - if (doUseASCIIHex) { - str = new ASCIIHexEncoder(str); - } else { - str = new ASCII85Encoder(str); - } - - // compute image data size - str->reset(); - col = size = 0; - do { - do { - c = str->getChar(); - } while (c == '\n' || c == '\r'); - if (c == (doUseASCIIHex ? '>' : '~') || c == EOF) { - break; - } - if (c == 'z') { - ++col; - } else { - ++col; - for (i = 1; i <= (doUseASCIIHex ? 1 : 4); ++i) { - do { - c = str->getChar(); - } while (c == '\n' || c == '\r'); - if (c == (doUseASCIIHex ? '>' : '~') || c == EOF) { - break; - } - ++col; - } - if (c == (doUseASCIIHex ? '>' : '~') || c == EOF) { - break; - } - } - if (col > 225) { - ++size; - col = 0; - } - } while (c != (doUseASCIIHex ? '>' : '~') && c != EOF); - // add one entry for the final line of data; add another entry - // because the LZWDecode/RunLengthDecode filter may read past the end - ++size; - if (useLZW || useRLE) { - ++size; - } - outerSize = size/65535 + 1; - - writePSFmt("{0:d} array dup /{1:s}Data_{2:d}_{3:d} exch def\n", - outerSize, mask ? "Mask" : "Im", id.num, id.gen); - str->close(); - - // write the data into the array - str->reset(); - for (outer = 0;outer < outerSize;outer++) { - int innerSize = size > 65535 ? 65535 : size; - - // put the inner array into the outer array - writePSFmt("{0:d} array 1 index {1:d} 2 index put\n", - innerSize, outer); - line = col = 0; - writePS((char *)(doUseASCIIHex ? "dup 0 <" : "dup 0 <~")); - for (;;) { - do { - c = str->getChar(); - } while (c == '\n' || c == '\r'); - if (c == (doUseASCIIHex ? '>' : '~') || c == EOF) { - break; - } - if (c == 'z') { - writePSChar(c); - ++col; - } else { - writePSChar(c); - ++col; - for (i = 1; i <= (doUseASCIIHex ? 1 : 4); ++i) { - do { - c = str->getChar(); - } while (c == '\n' || c == '\r'); - if (c == (doUseASCIIHex ? '>' : '~') || c == EOF) { - break; - } - writePSChar(c); - ++col; - } - } - if (c == (doUseASCIIHex ? '>' : '~') || c == EOF) { - break; - } - // each line is: "dup nnnnn <~...data...~> put<eol>" - // so max data length = 255 - 20 = 235 - // chunks are 1 or 4 bytes each, so we have to stop at 232 - // but make it 225 just to be safe - if (col > 225) { - writePS((char *)(doUseASCIIHex ? "> put\n" : "~> put\n")); - ++line; - if (line >= innerSize) break; - writePSFmt((char *)(doUseASCIIHex ? "dup {0:d} <" : "dup {0:d} <~"), line); - col = 0; - } - } - if (c == (doUseASCIIHex ? '>' : '~') || c == EOF) { - writePS((char *)(doUseASCIIHex ? "> put\n" : "~> put\n")); - if (useLZW || useRLE) { - ++line; - writePSFmt("{0:d} <> put\n", line); - } else { - writePS("pop\n"); - } - break; - } - writePS("pop\n"); - size -= innerSize; - } - writePS("pop\n"); - str->close(); - - delete str; -} - -void PSOutputDev::setupForms(Dict *resDict) { - if (!preloadImagesForms) { - return; - } - - Object xObjDict = resDict->lookup("XObject"); - if (xObjDict.isDict()) { - for (int i = 0; i < xObjDict.dictGetLength(); ++i) { - Object xObjRef = xObjDict.dictGetValNF(i); - Object xObj = xObjDict.dictGetVal(i); - if (xObj.isStream()) { - Object subtypeObj = xObj.streamGetDict()->lookup("Subtype"); - if (subtypeObj.isName("Form")) { - if (xObjRef.isRef()) { - setupForm(xObjRef.getRef(), &xObj); - } else { - error(errSyntaxError, -1, - "Form in resource dict is not an indirect reference"); - } - } - } - } - } -} - -void PSOutputDev::setupForm(Ref id, Object *strObj) { - Dict *dict, *resDict; - double m[6], bbox[4]; - PDFRectangle box; - Gfx *gfx; - - // check if form is already defined - for (int i = 0; i < formIDLen; ++i) { - if (formIDs[i].num == id.num && formIDs[i].gen == id.gen) { - return; - } - } - - // add entry to formIDs list - if (formIDLen >= formIDSize) { - if (formIDSize == 0) { - formIDSize = 64; - } else { - formIDSize *= 2; - } - formIDs = (Ref *)greallocn(formIDs, formIDSize, sizeof(Ref)); - } - formIDs[formIDLen++] = id; - - dict = strObj->streamGetDict(); - - // get bounding box - Object bboxObj = dict->lookup("BBox"); - if (!bboxObj.isArray()) { - error(errSyntaxError, -1, "Bad form bounding box"); - return; - } - for (int i = 0; i < 4; ++i) { - Object obj1 = bboxObj.arrayGet(i); - bbox[i] = obj1.getNum(); - } - - // get matrix - Object matrixObj = dict->lookup("Matrix"); - if (matrixObj.isArray()) { - for (int i = 0; i < 6; ++i) { - Object obj1 = matrixObj.arrayGet(i); - m[i] = obj1.getNum(); - } - } else { - m[0] = 1; m[1] = 0; - m[2] = 0; m[3] = 1; - m[4] = 0; m[5] = 0; - } - - // get resources - Object resObj = dict->lookup("Resources"); - resDict = resObj.isDict() ? resObj.getDict() : (Dict *)nullptr; - - writePSFmt("/f_{0:d}_{1:d} {{\n", id.num, id.gen); - writePS("q\n"); - writePSFmt("[{0:.6gs} {1:.6gs} {2:.6gs} {3:.6gs} {4:.6gs} {5:.6gs}] cm\n", - m[0], m[1], m[2], m[3], m[4], m[5]); - - box.x1 = bbox[0]; - box.y1 = bbox[1]; - box.x2 = bbox[2]; - box.y2 = bbox[3]; - gfx = new Gfx(doc, this, resDict, &box, &box); - gfx->display(strObj); - delete gfx; - - writePS("Q\n"); - writePS("} def\n"); -} - -GBool PSOutputDev::checkPageSlice(Page *page, double /*hDPI*/, double /*vDPI*/, - int rotateA, GBool useMediaBox, GBool crop, - int sliceX, int sliceY, - int sliceW, int sliceH, - GBool printing, - GBool (*abortCheckCbk)(void *data), - void *abortCheckCbkData, - GBool (*annotDisplayDecideCbk)(Annot *annot, void *user_data), - void *annotDisplayDecideCbkData) { - PreScanOutputDev *scan; - GBool rasterize; -#ifdef HAVE_SPLASH - GBool useFlate, useLZW; - SplashOutputDev *splashOut; - SplashColor paperColor; - PDFRectangle box; - GfxState *state; - SplashBitmap *bitmap; - Stream *str0, *str; - Guchar *p; - Guchar col[4]; - double hDPI2, vDPI2; - double m0, m1, m2, m3, m4, m5; - int nStripes, stripeH, stripeY; - int c, w, h, x, y, comp, i; - int numComps, initialNumComps; - char hexBuf[32*2 + 2]; // 32 values X 2 chars/value + line ending + null - Guchar digit; - GBool isGray; -#endif - - if (!postInitDone) { - postInit(); - } - if (forceRasterize) { - rasterize = gTrue; - } else { - scan = new PreScanOutputDev(doc); - page->displaySlice(scan, 72, 72, rotateA, useMediaBox, crop, - sliceX, sliceY, sliceW, sliceH, - printing, abortCheckCbk, abortCheckCbkData, - annotDisplayDecideCbk, annotDisplayDecideCbkData); - rasterize = scan->usesTransparency() || scan->usesPatternImageMask(); - delete scan; - } - if (!rasterize) { - return gTrue; - } - -#ifdef HAVE_SPLASH - // get the rasterization parameters - useFlate = getEnableFlate() && level >= psLevel3; - useLZW = getEnableLZW(); - // start the PS page - page->makeBox(rasterResolution, rasterResolution, rotateA, useMediaBox, gFalse, - sliceX, sliceY, sliceW, sliceH, &box, &crop); - rotateA += page->getRotate(); - if (rotateA >= 360) { - rotateA -= 360; - } else if (rotateA < 0) { - rotateA += 360; - } - state = new GfxState(rasterResolution, rasterResolution, &box, rotateA, gFalse); - startPage(page->getNum(), state, xref); - delete state; - - // set up the SplashOutputDev - if (rasterMono || level == psLevel1) { - numComps = 1; - paperColor[0] = 0xff; - splashOut = new SplashOutputDev(splashModeMono8, 1, gFalse, - paperColor, gFalse); -#ifdef SPLASH_CMYK - } else if (level == psLevel1Sep || level == psLevel2Sep || - level == psLevel3Sep || globalParams->getOverprintPreview()) { - numComps = 4; - paperColor[0] = paperColor[1] = paperColor[2] = paperColor[3] = 0; - splashOut = new SplashOutputDev(splashModeCMYK8, 1, gFalse, - paperColor, gFalse); -#endif - } else { - numComps = 3; - paperColor[0] = paperColor[1] = paperColor[2] = 0xff; - splashOut = new SplashOutputDev(splashModeRGB8, 1, gFalse, - paperColor, gFalse); - } - splashOut->setFontAntialias(rasterAntialias); - splashOut->setVectorAntialias(rasterAntialias); - splashOut->startDoc(doc); - - // break the page into stripes - hDPI2 = xScale * rasterResolution; - vDPI2 = yScale * rasterResolution; - if (sliceW < 0 || sliceH < 0) { - if (useMediaBox) { - box = *page->getMediaBox(); - } else { - box = *page->getCropBox(); - } - sliceX = sliceY = 0; - sliceW = (int)((box.x2 - box.x1) * hDPI2 / 72.0); - sliceH = (int)((box.y2 - box.y1) * vDPI2 / 72.0); - } - nStripes = (int)ceil((double)(sliceW * sliceH) / - (double)rasterizationSliceSize); - if (unlikely(nStripes == 0)) { - delete splashOut; - return gFalse; - } - stripeH = (sliceH + nStripes - 1) / nStripes; - - // render the stripes - initialNumComps = numComps; - for (stripeY = sliceY; stripeY < sliceH; stripeY += stripeH) { - - // rasterize a stripe - page->makeBox(hDPI2, vDPI2, 0, useMediaBox, gFalse, - sliceX, stripeY, sliceW, stripeH, &box, &crop); - m0 = box.x2 - box.x1; - m1 = 0; - m2 = 0; - m3 = box.y2 - box.y1; - m4 = box.x1; - m5 = box.y1; - page->displaySlice(splashOut, hDPI2, vDPI2, - (360 - page->getRotate()) % 360, useMediaBox, crop, - sliceX, stripeY, sliceW, stripeH, - printing, abortCheckCbk, abortCheckCbkData, - annotDisplayDecideCbk, annotDisplayDecideCbkData); - - // draw the rasterized image - bitmap = splashOut->getBitmap(); - numComps = initialNumComps; - w = bitmap->getWidth(); - h = bitmap->getHeight(); - writePS("gsave\n"); - writePSFmt("[{0:.6g} {1:.6g} {2:.6g} {3:.6g} {4:.6g} {5:.6g}] concat\n", - m0, m1, m2, m3, m4, m5); - switch (level) { - case psLevel1: - writePSFmt("{0:d} {1:d} 8 [{2:d} 0 0 {3:d} 0 {4:d}] pdfIm1{5:s}\n", - w, h, w, -h, h, - useBinary ? "Bin" : ""); - p = bitmap->getDataPtr() + (h - 1) * bitmap->getRowSize(); - i = 0; - if (useBinary) { - for (y = 0; y < h; ++y) { - for (x = 0; x < w; ++x) { - hexBuf[i++] = *p++; - if (i >= 64) { - writePSBuf(hexBuf, i); - i = 0; - } - } - } - } else { - for (y = 0; y < h; ++y) { - for (x = 0; x < w; ++x) { - digit = *p / 16; - hexBuf[i++] = digit + ((digit >= 10)? 'a' - 10: '0'); - digit = *p++ % 16; - hexBuf[i++] = digit + ((digit >= 10)? 'a' - 10: '0'); - if (i >= 64) { - hexBuf[i++] = '\n'; - writePSBuf(hexBuf, i); - i = 0; - } - } - } - } - if (i != 0) { - if (!useBinary) { - hexBuf[i++] = '\n'; - } - writePSBuf(hexBuf, i); - } - break; - case psLevel1Sep: - p = bitmap->getDataPtr(); - // Check for an all gray image - if (getOptimizeColorSpace()) { - isGray = gTrue; - for (y = 0; y < h; ++y) { - for (x = 0; x < w; ++x) { - if (p[4*x] != p[4*x + 1] || p[4*x] != p[4*x + 2]) { - isGray = gFalse; - y = h; - break; - } - } - p += bitmap->getRowSize(); - } - } else { - isGray = gFalse; - } - writePSFmt("{0:d} {1:d} 8 [{2:d} 0 0 {3:d} 0 {4:d}] pdfIm1{5:s}{6:s}\n", - w, h, w, -h, h, - isGray ? "" : "Sep", - useBinary ? "Bin" : ""); - p = bitmap->getDataPtr() + (h - 1) * bitmap->getRowSize(); - i = 0; - col[0] = col[1] = col[2] = col[3] = 0; - if (isGray) { - int g; - if ((psProcessBlack & processColors) == 0) { - // Check if the image uses black - for (y = 0; y < h; ++y) { - for (x = 0; x < w; ++x) { - if (p[4*x] > 0 || p[4*x + 3] > 0) { - col[3] = 1; - y = h; - break; - } - } - p -= bitmap->getRowSize(); - } - p = bitmap->getDataPtr() + (h - 1) * bitmap->getRowSize(); - } - for (y = 0; y < h; ++y) { - if (useBinary) { - // Binary gray image - for (x = 0; x < w; ++x) { - g = p[4*x] + p[4*x + 3]; - g = 255 - g; - if (g < 0) g = 0; - hexBuf[i++] = (Guchar) g; - if (i >= 64) { - writePSBuf(hexBuf, i); - i = 0; - } - } - } else { - // Hex gray image - for (x = 0; x < w; ++x) { - g = p[4*x] + p[4*x + 3]; - g = 255 - g; - if (g < 0) g = 0; - digit = g / 16; - hexBuf[i++] = digit + ((digit >= 10)? 'a' - 10: '0'); - digit = g % 16; - hexBuf[i++] = digit + ((digit >= 10)? 'a' - 10: '0'); - if (i >= 64) { - hexBuf[i++] = '\n'; - writePSBuf(hexBuf, i); - i = 0; - } - } - } - p -= bitmap->getRowSize(); - } - } else if (((psProcessCyan | psProcessMagenta | psProcessYellow | psProcessBlack) & ~processColors) != 0) { - // Color image, need to check color flags for each dot - for (y = 0; y < h; ++y) { - for (comp = 0; comp < 4; ++comp) { - if (useBinary) { - // Binary color image - for (x = 0; x < w; ++x) { - col[comp] |= p[4*x + comp]; - hexBuf[i++] = p[4*x + comp]; - if (i >= 64) { - writePSBuf(hexBuf, i); - i = 0; - } - } - } else { - // Gray color image - for (x = 0; x < w; ++x) { - col[comp] |= p[4*x + comp]; - digit = p[4*x + comp] / 16; - hexBuf[i++] = digit + ((digit >= 10)? 'a' - 10: '0'); - digit = p[4*x + comp] % 16; - hexBuf[i++] = digit + ((digit >= 10)? 'a' - 10: '0'); - if (i >= 64) { - hexBuf[i++] = '\n'; - writePSBuf(hexBuf, i); - i = 0; - } - } - } - } - p -= bitmap->getRowSize(); - } - } else { - // Color image, do not need to check color flags - for (y = 0; y < h; ++y) { - for (comp = 0; comp < 4; ++comp) { - if (useBinary) { - // Binary color image - for (x = 0; x < w; ++x) { - hexBuf[i++] = p[4*x + comp]; - if (i >= 64) { - writePSBuf(hexBuf, i); - i = 0; - } - } - } else { - // Hex color image - for (x = 0; x < w; ++x) { - digit = p[4*x + comp] / 16; - hexBuf[i++] = digit + ((digit >= 10)? 'a' - 10: '0'); - digit = p[4*x + comp] % 16; - hexBuf[i++] = digit + ((digit >= 10)? 'a' - 10: '0'); - if (i >= 64) { - hexBuf[i++] = '\n'; - writePSBuf(hexBuf, i); - i = 0; - } - } - } - } - p -= bitmap->getRowSize(); - } - } - if (i != 0) { - if (!useBinary) { - hexBuf[i++] = '\n'; - } - writePSBuf(hexBuf, i); - } - if (col[0]) { - processColors |= psProcessCyan; - } - if (col[1]) { - processColors |= psProcessMagenta; - } - if (col[2]) { - processColors |= psProcessYellow; - } - if (col[3]) { - processColors |= psProcessBlack; - } - break; - case psLevel2: - case psLevel2Sep: - case psLevel3: - case psLevel3Sep: - p = bitmap->getDataPtr() + (h - 1) * bitmap->getRowSize(); - str0 = new MemStream((char *)p, 0, w * h * numComps, Object(objNull)); - // Check for a color image that uses only gray - if (!getOptimizeColorSpace()) { - isGray = gFalse; - } else if (numComps == 4) { - int compCyan; - isGray = gTrue; - while ((compCyan = str0->getChar()) != EOF) { - if (str0->getChar() != compCyan || - str0->getChar() != compCyan) { - isGray = gFalse; - break; - } - str0->getChar(); - } - } else if (numComps == 3) { - int compRed; - isGray = gTrue; - while ((compRed = str0->getChar()) != EOF) { - if (str0->getChar() != compRed || - str0->getChar() != compRed) { - isGray = gFalse; - break; - } - } - } else { - isGray = gFalse; - } - str0->reset(); -#ifdef ENABLE_ZLIB - if (useFlate) { - if (isGray && numComps == 4) { - str = new FlateEncoder(new CMYKGrayEncoder(str0)); - numComps = 1; - } else if (isGray && numComps == 3) { - str = new FlateEncoder(new RGBGrayEncoder(str0)); - numComps = 1; - } else { - str = new FlateEncoder(str0); - } - } else -#endif - if (useLZW) { - if (isGray && numComps == 4) { - str = new LZWEncoder(new CMYKGrayEncoder(str0)); - numComps = 1; - } else if (isGray && numComps == 3) { - str = new LZWEncoder(new RGBGrayEncoder(str0)); - numComps = 1; - } else { - str = new LZWEncoder(str0); - } - } else { - if (isGray && numComps == 4) { - str = new RunLengthEncoder(new CMYKGrayEncoder(str0)); - numComps = 1; - } else if (isGray && numComps == 3) { - str = new RunLengthEncoder(new RGBGrayEncoder(str0)); - numComps = 1; - } else { - str = new RunLengthEncoder(str0); - } - } - if (numComps == 1) { - writePS("/DeviceGray setcolorspace\n"); - } else if (numComps == 3) { - writePS("/DeviceRGB setcolorspace\n"); - } else { - writePS("/DeviceCMYK setcolorspace\n"); - } - writePS("<<\n /ImageType 1\n"); - writePSFmt(" /Width {0:d}\n", bitmap->getWidth()); - writePSFmt(" /Height {0:d}\n", bitmap->getHeight()); - writePSFmt(" /ImageMatrix [{0:d} 0 0 {1:d} 0 {2:d}]\n", w, -h, h); - writePS(" /BitsPerComponent 8\n"); - if (numComps == 1) { - writePS(" /Decode [1 0]\n"); - } else if (numComps == 3) { - writePS(" /Decode [0 1 0 1 0 1]\n"); - } else { - writePS(" /Decode [0 1 0 1 0 1 0 1]\n"); - } - writePS(" /DataSource currentfile\n"); - if (useBinary) { - /* nothing to do */; - } else if (useASCIIHex) { - writePS(" /ASCIIHexDecode filter\n"); - } else { - writePS(" /ASCII85Decode filter\n"); - } - if (useFlate) { - writePS(" /FlateDecode filter\n"); - } else if (useLZW) { - writePS(" /LZWDecode filter\n"); - } else { - writePS(" /RunLengthDecode filter\n"); - } - writePS(">>\n"); - if (useBinary) { - /* nothing to do */; - } else if (useASCIIHex) { - str = new ASCIIHexEncoder(str); - } else { - str = new ASCII85Encoder(str); - } - str->reset(); - if (useBinary) { - // Count the bytes to write a document comment - int len = 0; - while (str->getChar() != EOF) { - len++; - } - str->reset(); - writePSFmt("%%BeginData: {0:d} Binary Bytes\n", len+6+1); - } - writePS("image\n"); - while ((c = str->getChar()) != EOF) { - writePSChar(c); - } - str->close(); - delete str; - delete str0; - writePSChar('\n'); - if (useBinary) { - writePS("%%EndData\n"); - } - processColors |= (numComps == 1) ? psProcessBlack : psProcessCMYK; - break; - } - writePS("grestore\n"); - } - - delete splashOut; - - // finish the PS page - endPage(); - - return gFalse; - -#else // HAVE_SPLASH - - error(errSyntaxWarning, -1, - "PDF page uses transparency and PSOutputDev was built without" - " the Splash rasterizer - output may not be correct"); - return gTrue; -#endif // HAVE_SPLASH -} - -void PSOutputDev::startPage(int pageNum, GfxState *state, XRef *xrefA) { - Page *page; - int x1, y1, x2, y2, width, height, t; - int imgWidth, imgHeight, imgWidth2, imgHeight2; - GBool landscape; - GooString *s; - PSOutPaperSize *paperSize; - - if (!postInitDone) { - postInit(); - } - xref = xrefA; - if (mode == psModePS) { - GooString pageLabel; - const GBool gotLabel = doc->getCatalog()->indexToLabel(pageNum -1, &pageLabel); - if (gotLabel) { - // See bug13338 for why we try to avoid parentheses... - GBool needParens; - GooString *filteredString = filterPSLabel(&pageLabel, &needParens); - if (needParens) { - writePSFmt("%%Page: ({0:t}) {1:d}\n", filteredString, seqPage); - } else { - writePSFmt("%%Page: {0:t} {1:d}\n", filteredString, seqPage); - } - delete filteredString; - } else { - writePSFmt("%%Page: {0:d} {1:d}\n", pageNum, seqPage); - } - if (paperMatch) { - page = doc->getCatalog()->getPage(pageNum); - imgLLX = imgLLY = 0; - if (noCrop) { - imgURX = (int)ceil(page->getMediaWidth()); - imgURY = (int)ceil(page->getMediaHeight()); - } else { - imgURX = (int)ceil(page->getCropWidth()); - imgURY = (int)ceil(page->getCropHeight()); - } - if (state->getRotate() == 90 || state->getRotate() == 270) { - t = imgURX; - imgURX = imgURY; - imgURY = t; - } - } - } - - // underlays - if (underlayCbk) { - (*underlayCbk)(this, underlayCbkData); - } - if (overlayCbk) { - saveState(nullptr); - } - - xScale = yScale = 1; - switch (mode) { - - case psModePS: - // rotate, translate, and scale page - imgWidth = imgURX - imgLLX; - imgHeight = imgURY - imgLLY; - x1 = (int)floor(state->getX1()); - y1 = (int)floor(state->getY1()); - x2 = (int)ceil(state->getX2()); - y2 = (int)ceil(state->getY2()); - width = x2 - x1; - height = y2 - y1; - tx = ty = 0; - // rotation and portrait/landscape mode - if (paperMatch) { - rotate = (360 - state->getRotate()) % 360; - landscape = gFalse; - } else if (rotate0 >= 0) { - rotate = (360 - rotate0) % 360; - landscape = gFalse; - } else { - rotate = (360 - state->getRotate()) % 360; - if (rotate == 0 || rotate == 180) { - if ((width < height && imgWidth > imgHeight && height > imgHeight) || - (width > height && imgWidth < imgHeight && width > imgWidth)) { - rotate += 90; - landscape = gTrue; - } else { - landscape = gFalse; - } - } else { // rotate == 90 || rotate == 270 - if ((height < width && imgWidth > imgHeight && width > imgHeight) || - (height > width && imgWidth < imgHeight && height > imgWidth)) { - rotate = 270 - rotate; - landscape = gTrue; - } else { - landscape = gFalse; - } - } - } - if (rotate == 0) { - imgWidth2 = imgWidth; - imgHeight2 = imgHeight; - } else if (rotate == 90) { - ty = -imgWidth; - imgWidth2 = imgHeight; - imgHeight2 = imgWidth; - } else if (rotate == 180) { - imgWidth2 = imgWidth; - imgHeight2 = imgHeight; - tx = -imgWidth; - ty = -imgHeight; - } else { // rotate == 270 - tx = -imgHeight; - imgWidth2 = imgHeight; - imgHeight2 = imgWidth; - } - // shrink or expand - if (xScale0 > 0 && yScale0 > 0) { - xScale = xScale0; - yScale = yScale0; - } else if ((globalParams->getPSShrinkLarger() && - (width > imgWidth2 || height > imgHeight2)) || - (globalParams->getPSExpandSmaller() && - (width < imgWidth2 && height < imgHeight2))) { - xScale = (double)imgWidth2 / (double)width; - yScale = (double)imgHeight2 / (double)height; - if (yScale < xScale) { - xScale = yScale; - } else { - yScale = xScale; - } - } - // deal with odd bounding boxes or clipping - if (clipLLX0 < clipURX0 && clipLLY0 < clipURY0) { - tx -= xScale * clipLLX0; - ty -= yScale * clipLLY0; - } else { - tx -= xScale * x1; - ty -= yScale * y1; - } - // center - if (tx0 >= 0 && ty0 >= 0) { - tx += (rotate == 0 || rotate == 180) ? tx0 : ty0; - ty += (rotate == 0 || rotate == 180) ? ty0 : -tx0; - } else if (psCenter) { - if (clipLLX0 < clipURX0 && clipLLY0 < clipURY0) { - tx += (imgWidth2 - xScale * (clipURX0 - clipLLX0)) / 2; - ty += (imgHeight2 - yScale * (clipURY0 - clipLLY0)) / 2; - } else { - tx += (imgWidth2 - xScale * width) / 2; - ty += (imgHeight2 - yScale * height) / 2; - } - } - tx += (rotate == 0 || rotate == 180) ? imgLLX : imgLLY; - ty += (rotate == 0 || rotate == 180) ? imgLLY : -imgLLX; - - if (paperMatch) { - paperSize = (PSOutPaperSize *)paperSizes->get(pagePaperSize[pageNum]); - writePSFmt("%%PageMedia: {0:t}\n", paperSize->name); - } - - // Create a matrix with the same transform that will be output to PS - Matrix m; - switch (rotate) { - default: - case 0: - m.init(1, 0, - 0, 1, - 0, 0); - break; - case 90: - m.init(0, 1, - -1, 0, - 0, 0); - break; - case 180: - m.init(-1, 0, - 0, -1, - 0, 0); - break; - case 270: - m.init(0, -1, - 1, 0, - 0, 0); - break; - } - m.translate(tx, ty); - m.scale(xScale, yScale); - - double bboxX1, bboxY1, bboxX2, bboxY2; - m.transform(0, 0, &bboxX1, &bboxY1); - m.transform(width, height, &bboxX2, &bboxY2); - - writePSFmt("%%PageBoundingBox: {0:g} {1:g} {2:g} {3:g}\n", - floor(std::min(bboxX1, bboxX2)), - floor(std::min(bboxY1, bboxY2)), - ceil (std::max(bboxX1, bboxX2)), - ceil (std::max(bboxY1, bboxY2))); - - writePSFmt("%%PageOrientation: {0:s}\n", - landscape ? "Landscape" : "Portrait"); - writePS("%%BeginPageSetup\n"); - if (paperMatch) { - writePSFmt("{0:d} {1:d} pdfSetupPaper\n", imgURX, imgURY); - } - writePS("pdfStartPage\n"); - if (rotate) - writePSFmt("{0:d} rotate\n", rotate); - if (tx != 0 || ty != 0) { - writePSFmt("{0:.6g} {1:.6g} translate\n", tx, ty); - } - if (xScale != 1 || yScale != 1) { - writePSFmt("{0:.6f} {1:.6f} scale\n", xScale, yScale); - } - if (clipLLX0 < clipURX0 && clipLLY0 < clipURY0) { - writePSFmt("{0:.6g} {1:.6g} {2:.6g} {3:.6g} re W\n", - clipLLX0, clipLLY0, clipURX0 - clipLLX0, clipURY0 - clipLLY0); - } else { - writePSFmt("{0:d} {1:d} {2:d} {3:d} re W\n", x1, y1, x2 - x1, y2 - y1); - } - - ++seqPage; - break; - - case psModeEPS: - writePS("pdfStartPage\n"); - tx = ty = 0; - rotate = (360 - state->getRotate()) % 360; - if (rotate == 0) { - } else if (rotate == 90) { - writePS("90 rotate\n"); - tx = -epsX1; - ty = -epsY2; - } else if (rotate == 180) { - writePS("180 rotate\n"); - tx = -(epsX1 + epsX2); - ty = -(epsY1 + epsY2); - } else { // rotate == 270 - writePS("270 rotate\n"); - tx = -epsX2; - ty = -epsY1; - } - if (tx != 0 || ty != 0) { - writePSFmt("{0:.6g} {1:.6g} translate\n", tx, ty); - } - break; - - case psModeForm: - writePS("/PaintProc {\n"); - writePS("begin xpdf begin\n"); - writePS("pdfStartPage\n"); - tx = ty = 0; - rotate = 0; - break; - } - - if (customCodeCbk) { - if ((s = (*customCodeCbk)(this, psOutCustomPageSetup, pageNum, - customCodeCbkData))) { - writePS(s->getCString()); - delete s; - } - } - - writePS("%%EndPageSetup\n"); -} - -void PSOutputDev::endPage() { - if (overlayCbk) { - restoreState(nullptr); - (*overlayCbk)(this, overlayCbkData); - } - - - if (mode == psModeForm) { - writePS("pdfEndPage\n"); - writePS("end end\n"); - writePS("} def\n"); - writePS("end end\n"); - } else { - if (!manualCtrl) { - writePS("showpage\n"); - } - writePS("%%PageTrailer\n"); - writePageTrailer(); - } -} - -void PSOutputDev::saveState(GfxState *state) { - writePS("q\n"); - ++numSaves; -} - -void PSOutputDev::restoreState(GfxState *state) { - writePS("Q\n"); - --numSaves; -} - -void PSOutputDev::updateCTM(GfxState *state, double m11, double m12, - double m21, double m22, double m31, double m32) { - writePSFmt("[{0:.6gs} {1:.6gs} {2:.6gs} {3:.6gs} {4:.6gs} {5:.6gs}] cm\n", - m11, m12, m21, m22, m31, m32); -} - -void PSOutputDev::updateLineDash(GfxState *state) { - double *dash; - double start; - int length, i; - - state->getLineDash(&dash, &length, &start); - writePS("["); - for (i = 0; i < length; ++i) { - writePSFmt("{0:.6g}{1:w}", - dash[i] < 0 ? 0 : dash[i], - (i == length-1) ? 0 : 1); - } - writePSFmt("] {0:.6g} d\n", start); -} - -void PSOutputDev::updateFlatness(GfxState *state) { - writePSFmt("{0:d} i\n", state->getFlatness()); -} - -void PSOutputDev::updateLineJoin(GfxState *state) { - writePSFmt("{0:d} j\n", state->getLineJoin()); -} - -void PSOutputDev::updateLineCap(GfxState *state) { - writePSFmt("{0:d} J\n", state->getLineCap()); -} - -void PSOutputDev::updateMiterLimit(GfxState *state) { - writePSFmt("{0:.6g} M\n", state->getMiterLimit()); -} - -void PSOutputDev::updateLineWidth(GfxState *state) { - writePSFmt("{0:.6g} w\n", state->getLineWidth()); -} - -void PSOutputDev::updateFillColorSpace(GfxState *state) { - if (inUncoloredPattern) { - return; - } - switch (level) { - case psLevel1: - case psLevel1Sep: - break; - case psLevel2: - case psLevel3: - if (state->getFillColorSpace()->getMode() != csPattern) { - dumpColorSpaceL2(state->getFillColorSpace(), gTrue, gFalse, gFalse); - writePS(" cs\n"); - } - break; - case psLevel2Sep: - case psLevel3Sep: - break; - } -} - -void PSOutputDev::updateStrokeColorSpace(GfxState *state) { - if (inUncoloredPattern) { - return; - } - switch (level) { - case psLevel1: - case psLevel1Sep: - break; - case psLevel2: - case psLevel3: - if (state->getStrokeColorSpace()->getMode() != csPattern) { - dumpColorSpaceL2(state->getStrokeColorSpace(), gTrue, gFalse, gFalse); - writePS(" CS\n"); - } - break; - case psLevel2Sep: - case psLevel3Sep: - break; - } -} - -void PSOutputDev::updateFillColor(GfxState *state) { - GfxColor color; - GfxColor *colorPtr; - GfxGray gray; - GfxCMYK cmyk; - GfxSeparationColorSpace *sepCS; - double c, m, y, k; - int i; - - if (inUncoloredPattern) { - return; - } - switch (level) { - case psLevel1: - state->getFillGray(&gray); - writePSFmt("{0:.4g} g\n", colToDbl(gray)); - break; - case psLevel2: - case psLevel3: - if (state->getFillColorSpace()->getMode() != csPattern) { - colorPtr = state->getFillColor(); - writePS("["); - for (i = 0; i < state->getFillColorSpace()->getNComps(); ++i) { - if (i > 0) { - writePS(" "); - } - writePSFmt("{0:.4g}", colToDbl(colorPtr->c[i])); - } - writePS("] sc\n"); - } - break; - case psLevel1Sep: - case psLevel2Sep: - case psLevel3Sep: - if (state->getFillColorSpace()->getMode() == csSeparation && (level > psLevel1Sep || getPassLevel1CustomColor())) { - sepCS = (GfxSeparationColorSpace *)state->getFillColorSpace(); - color.c[0] = gfxColorComp1; - sepCS->getCMYK(&color, &cmyk); - writePSFmt("{0:.4g} {1:.4g} {2:.4g} {3:.4g} {4:.4g} ({5:t}) ck\n", - colToDbl(state->getFillColor()->c[0]), - colToDbl(cmyk.c), colToDbl(cmyk.m), - colToDbl(cmyk.y), colToDbl(cmyk.k), - sepCS->getName()); - addCustomColor(sepCS); - } else { - state->getFillCMYK(&cmyk); - c = colToDbl(cmyk.c); - m = colToDbl(cmyk.m); - y = colToDbl(cmyk.y); - k = colToDbl(cmyk.k); - writePSFmt("{0:.4g} {1:.4g} {2:.4g} {3:.4g} k\n", c, m, y, k); - addProcessColor(c, m, y, k); - } - break; - } - t3Cacheable = gFalse; -} - -void PSOutputDev::updateStrokeColor(GfxState *state) { - GfxColor color; - GfxColor *colorPtr; - GfxGray gray; - GfxCMYK cmyk; - GfxSeparationColorSpace *sepCS; - double c, m, y, k; - int i; - - if (inUncoloredPattern) { - return; - } - switch (level) { - case psLevel1: - state->getStrokeGray(&gray); - writePSFmt("{0:.4g} G\n", colToDbl(gray)); - break; - case psLevel2: - case psLevel3: - if (state->getStrokeColorSpace()->getMode() != csPattern) { - colorPtr = state->getStrokeColor(); - writePS("["); - for (i = 0; i < state->getStrokeColorSpace()->getNComps(); ++i) { - if (i > 0) { - writePS(" "); - } - writePSFmt("{0:.4g}", colToDbl(colorPtr->c[i])); - } - writePS("] SC\n"); - } - break; - case psLevel1Sep: - case psLevel2Sep: - case psLevel3Sep: - if (state->getStrokeColorSpace()->getMode() == csSeparation && (level > psLevel1Sep || getPassLevel1CustomColor())) { - sepCS = (GfxSeparationColorSpace *)state->getStrokeColorSpace(); - color.c[0] = gfxColorComp1; - sepCS->getCMYK(&color, &cmyk); - writePSFmt("{0:.4g} {1:.4g} {2:.4g} {3:.4g} {4:.4g} ({5:t}) CK\n", - colToDbl(state->getStrokeColor()->c[0]), - colToDbl(cmyk.c), colToDbl(cmyk.m), - colToDbl(cmyk.y), colToDbl(cmyk.k), - sepCS->getName()); - addCustomColor(sepCS); - } else { - state->getStrokeCMYK(&cmyk); - c = colToDbl(cmyk.c); - m = colToDbl(cmyk.m); - y = colToDbl(cmyk.y); - k = colToDbl(cmyk.k); - writePSFmt("{0:.4g} {1:.4g} {2:.4g} {3:.4g} K\n", c, m, y, k); - addProcessColor(c, m, y, k); - } - break; - } - t3Cacheable = gFalse; -} - -void PSOutputDev::addProcessColor(double c, double m, double y, double k) { - if (c > 0) { - processColors |= psProcessCyan; - } - if (m > 0) { - processColors |= psProcessMagenta; - } - if (y > 0) { - processColors |= psProcessYellow; - } - if (k > 0) { - processColors |= psProcessBlack; - } -} - -void PSOutputDev::addCustomColor(GfxSeparationColorSpace *sepCS) { - PSOutCustomColor *cc; - GfxColor color; - GfxCMYK cmyk; - - if (!sepCS->getName()->cmp("Black")) { - processColors |= psProcessBlack; - return; - } - if (!sepCS->getName()->cmp("Cyan")) { - processColors |= psProcessCyan; - return; - } - if (!sepCS->getName()->cmp("Yellow")) { - processColors |= psProcessYellow; - return; - } - if (!sepCS->getName()->cmp("Magenta")) { - processColors |= psProcessMagenta; - return; - } - if (!sepCS->getName()->cmp("All")) - return; - if (!sepCS->getName()->cmp("None")) - return; - for (cc = customColors; cc; cc = cc->next) { - if (!cc->name->cmp(sepCS->getName())) { - return; - } - } - color.c[0] = gfxColorComp1; - sepCS->getCMYK(&color, &cmyk); - cc = new PSOutCustomColor(colToDbl(cmyk.c), colToDbl(cmyk.m), - colToDbl(cmyk.y), colToDbl(cmyk.k), - sepCS->getName()->copy()); - cc->next = customColors; - customColors = cc; -} - -void PSOutputDev::updateFillOverprint(GfxState *state) { - if (level >= psLevel2) { - writePSFmt("{0:s} op\n", state->getFillOverprint() ? "true" : "false"); - } -} - -void PSOutputDev::updateStrokeOverprint(GfxState *state) { - if (level >= psLevel2) { - writePSFmt("{0:s} OP\n", state->getStrokeOverprint() ? "true" : "false"); - } -} - -void PSOutputDev::updateOverprintMode(GfxState *state) { - if (level >= psLevel3) { - writePSFmt("{0:s} opm\n", state->getOverprintMode() ? "true" : "false"); - } -} - -void PSOutputDev::updateTransfer(GfxState *state) { - Function **funcs; - int i; - - funcs = state->getTransfer(); - if (funcs[0] && funcs[1] && funcs[2] && funcs[3]) { - if (level >= psLevel2) { - for (i = 0; i < 4; ++i) { - cvtFunction(funcs[i]); - } - writePS("setcolortransfer\n"); - } else { - cvtFunction(funcs[3]); - writePS("settransfer\n"); - } - } else if (funcs[0]) { - cvtFunction(funcs[0]); - writePS("settransfer\n"); - } else { - writePS("{} settransfer\n"); - } -} - -void PSOutputDev::updateFont(GfxState *state) { - if (state->getFont()) { - writePSFmt("/F{0:d}_{1:d} {2:.6g} Tf\n", - state->getFont()->getID()->num, state->getFont()->getID()->gen, - fabs(state->getFontSize()) < 0.0001 ? 0.0001 - : state->getFontSize()); - } -} - -void PSOutputDev::updateTextMat(GfxState *state) { - double *mat; - - mat = state->getTextMat(); - if (fabs(mat[0] * mat[3] - mat[1] * mat[2]) < 0.00001) { - // avoid a singular (or close-to-singular) matrix - writePSFmt("[0.00001 0 0 0.00001 {0:.6g} {1:.6g}] Tm\n", mat[4], mat[5]); - } else { - writePSFmt("[{0:.6g} {1:.6g} {2:.6g} {3:.6g} {4:.6g} {5:.6g}] Tm\n", - mat[0], mat[1], mat[2], mat[3], mat[4], mat[5]); - } -} - -void PSOutputDev::updateCharSpace(GfxState *state) { - writePSFmt("{0:.6g} Tc\n", state->getCharSpace()); -} - -void PSOutputDev::updateRender(GfxState *state) { - int rm; - - rm = state->getRender(); - writePSFmt("{0:d} Tr\n", rm); - rm &= 3; - if (rm != 0 && rm != 3) { - t3Cacheable = gFalse; - } -} - -void PSOutputDev::updateRise(GfxState *state) { - writePSFmt("{0:.6g} Ts\n", state->getRise()); -} - -void PSOutputDev::updateWordSpace(GfxState *state) { - writePSFmt("{0:.6g} Tw\n", state->getWordSpace()); -} - -void PSOutputDev::updateHorizScaling(GfxState *state) { - double h; - - h = state->getHorizScaling(); - if (fabs(h) < 0.01) { - h = 0.01; - } - writePSFmt("{0:.6g} Tz\n", h); -} - -void PSOutputDev::updateTextPos(GfxState *state) { - writePSFmt("{0:.6g} {1:.6g} Td\n", state->getLineX(), state->getLineY()); -} - -void PSOutputDev::updateTextShift(GfxState *state, double shift) { - if (state->getFont()->getWMode()) { - writePSFmt("{0:.6g} TJmV\n", shift); - } else { - writePSFmt("{0:.6g} TJm\n", shift); - } -} - -void PSOutputDev::saveTextPos(GfxState *state) { - writePS("currentpoint\n"); -} - -void PSOutputDev::restoreTextPos(GfxState *state) { - writePS("m\n"); -} - -void PSOutputDev::stroke(GfxState *state) { - doPath(state->getPath()); - if (inType3Char && t3FillColorOnly) { - // if we're constructing a cacheable Type 3 glyph, we need to do - // everything in the fill color - writePS("Sf\n"); - } else { - writePS("S\n"); - } -} - -void PSOutputDev::fill(GfxState *state) { - doPath(state->getPath()); - writePS("f\n"); -} - -void PSOutputDev::eoFill(GfxState *state) { - doPath(state->getPath()); - writePS("f*\n"); -} - -GBool PSOutputDev::tilingPatternFillL1(GfxState *state, Catalog *cat, Object *str, - double *pmat, int paintType, int tilingType, Dict *resDict, - double *mat, double *bbox, - int x0, int y0, int x1, int y1, - double xStep, double yStep) { - PDFRectangle box; - Gfx *gfx; - - // define a Type 3 font - writePS("8 dict begin\n"); - writePS("/FontType 3 def\n"); - writePS("/FontMatrix [1 0 0 1 0 0] def\n"); - writePSFmt("/FontBBox [{0:.6g} {1:.6g} {2:.6g} {3:.6g}] def\n", - bbox[0], bbox[1], bbox[2], bbox[3]); - writePS("/Encoding 256 array def\n"); - writePS(" 0 1 255 { Encoding exch /.notdef put } for\n"); - writePS(" Encoding 120 /x put\n"); - writePS("/BuildGlyph {\n"); - writePS(" exch /CharProcs get exch\n"); - writePS(" 2 copy known not { pop /.notdef } if\n"); - writePS(" get exec\n"); - writePS("} bind def\n"); - writePS("/BuildChar {\n"); - writePS(" 1 index /Encoding get exch get\n"); - writePS(" 1 index /BuildGlyph get exec\n"); - writePS("} bind def\n"); - writePS("/CharProcs 1 dict def\n"); - writePS("CharProcs begin\n"); - box.x1 = bbox[0]; - box.y1 = bbox[1]; - box.x2 = bbox[2]; - box.y2 = bbox[3]; - gfx = new Gfx(doc, this, resDict, &box, nullptr); - writePS("/x {\n"); - if (paintType == 2) { - writePSFmt("{0:.6g} 0 {1:.6g} {2:.6g} {3:.6g} {4:.6g} setcachedevice\n", - xStep, bbox[0], bbox[1], bbox[2], bbox[3]); - t3FillColorOnly = gTrue; - } else - { - if (x1 - 1 <= x0) { - writePS("1 0 setcharwidth\n"); - } else { - writePSFmt("{0:.6g} 0 setcharwidth\n", xStep); - } - t3FillColorOnly = gFalse; - } - inType3Char = gTrue; - if (paintType == 2) { - inUncoloredPattern = gTrue; - // ensure any PS procedures that contain sCol or fCol do not change the color - writePS("/pdfLastFill true def\n"); - writePS("/pdfLastStroke true def\n"); - } - ++numTilingPatterns; - gfx->display(str); - --numTilingPatterns; - if (paintType == 2) { - inUncoloredPattern = gFalse; - // ensure the next PS procedures that uses sCol or fCol will update the color - writePS("/pdfLastFill false def\n"); - writePS("/pdfLastStroke false def\n"); - } - inType3Char = gFalse; - writePS("} def\n"); - delete gfx; - writePS("end\n"); - writePS("currentdict end\n"); - writePSFmt("/xpdfTile{0:d} exch definefont pop\n", numTilingPatterns); - - // draw the tiles - writePSFmt("/xpdfTile{0:d} findfont setfont\n", numTilingPatterns); - writePS("fCol\n"); - writePSFmt("gsave [{0:.6g} {1:.6g} {2:.6g} {3:.6g} {4:.6g} {5:.6g}] concat\n", - mat[0], mat[1], mat[2], mat[3], mat[4], mat[5]); - writePSFmt("{0:d} 1 {1:d} {{ {2:.6g} exch {3:.6g} mul m {4:d} 1 {5:d} {{ pop (x) show }} for }} for\n", - y0, y1 - 1, x0 * xStep, yStep, x0, x1 - 1); - writePS("grestore\n"); - - return gTrue; -} - -GBool PSOutputDev::tilingPatternFillL2(GfxState *state, Catalog *cat, Object *str, - double *pmat, int paintType, int tilingType, Dict *resDict, - double *mat, double *bbox, - int x0, int y0, int x1, int y1, - double xStep, double yStep) { - PDFRectangle box; - Gfx *gfx; - - if (paintType == 2) { - // setpattern with PaintType 2 needs the paint color - writePS("currentcolor\n"); - } - writePS("<<\n /PatternType 1\n"); - writePSFmt(" /PaintType {0:d}\n", paintType); - writePSFmt(" /TilingType {0:d}\n", tilingType); - writePSFmt(" /BBox [{0:.6g} {1:.6g} {2:.6g} {3:.6g}]\n", bbox[0], bbox[1], bbox[2], bbox[3]); - writePSFmt(" /XStep {0:.6g}\n", xStep); - writePSFmt(" /YStep {0:.6g}\n", yStep); - writePS(" /PaintProc { \n"); - box.x1 = bbox[0]; - box.y1 = bbox[1]; - box.x2 = bbox[2]; - box.y2 = bbox[3]; - gfx = new Gfx(doc, this, resDict, &box, nullptr); - inType3Char = gTrue; - if (paintType == 2) { - inUncoloredPattern = gTrue; - // ensure any PS procedures that contain sCol or fCol do not change the color - writePS("/pdfLastFill true def\n"); - writePS("/pdfLastStroke true def\n"); - } - gfx->display(str); - if (paintType == 2) { - inUncoloredPattern = gFalse; - // ensure the next PS procedures that uses sCol or fCol will update the color - writePS("/pdfLastFill false def\n"); - writePS("/pdfLastStroke false def\n"); - } - inType3Char = gFalse; - delete gfx; - writePS(" }\n"); - writePS(">>\n"); - writePSFmt("[{0:.6g} {1:.6g} {2:.6g} {3:.6g} {4:.6g} {5:.6g}]\n", mat[0], mat[1], mat[2], mat[3], mat[4], mat[5]); - writePS("makepattern setpattern\n"); - writePS("clippath fill\n"); // Gfx sets up a clip before calling out->tilingPatternFill() - - return gTrue; -} - -GBool PSOutputDev::tilingPatternFill(GfxState *state, Gfx *gfxA, Catalog *cat, Object *str, - double *pmat, int paintType, int tilingType, Dict *resDict, - double *mat, double *bbox, - int x0, int y0, int x1, int y1, - double xStep, double yStep) { - if (x1 - x0 == 1 && y1 - y0 == 1) { - // Don't need to use patterns if only one instance of the pattern is used - PDFRectangle box; - Gfx *gfx; - double x, y, tx, ty; - - x = x0 * xStep; - y = y0 * yStep; - tx = x * mat[0] + y * mat[2] + mat[4]; - ty = x * mat[1] + y * mat[3] + mat[5]; - box.x1 = bbox[0]; - box.y1 = bbox[1]; - box.x2 = bbox[2]; - box.y2 = bbox[3]; - gfx = new Gfx(doc, this, resDict, &box, nullptr, nullptr, nullptr, gfxA); - writePSFmt("[{0:.6g} {1:.6g} {2:.6g} {3:.6g} {4:.6g} {5:.6g}] cm\n", mat[0], mat[1], mat[2], mat[3], tx, ty); - inType3Char = gTrue; - gfx->display(str); - inType3Char = gFalse; - delete gfx; - return gTrue; - } - - if (level == psLevel1 || level == psLevel1Sep) { - return tilingPatternFillL1(state, cat, str, pmat, paintType, tilingType, resDict, - mat, bbox, x0, y0, x1, y1, xStep, yStep); - } else { - return tilingPatternFillL2(state, cat, str, pmat, paintType, tilingType, resDict, - mat, bbox, x0, y0, x1, y1, xStep, yStep); - } -} - -GBool PSOutputDev::functionShadedFill(GfxState *state, - GfxFunctionShading *shading) { - double x0, y0, x1, y1; - double *mat; - int i; - - if (level == psLevel2Sep || level == psLevel3Sep) { - if (shading->getColorSpace()->getMode() != csDeviceCMYK) { - return gFalse; - } - processColors |= psProcessCMYK; - } - - shading->getDomain(&x0, &y0, &x1, &y1); - mat = shading->getMatrix(); - writePSFmt("/mat [{0:.6g} {1:.6g} {2:.6g} {3:.6g} {4:.6g} {5:.6g}] def\n", - mat[0], mat[1], mat[2], mat[3], mat[4], mat[5]); - writePSFmt("/n {0:d} def\n", shading->getColorSpace()->getNComps()); - if (shading->getNFuncs() == 1) { - writePS("/func "); - cvtFunction(shading->getFunc(0)); - writePS("def\n"); - } else { - writePS("/func {\n"); - for (i = 0; i < shading->getNFuncs(); ++i) { - if (i < shading->getNFuncs() - 1) { - writePS("2 copy\n"); - } - cvtFunction(shading->getFunc(i)); - writePS("exec\n"); - if (i < shading->getNFuncs() - 1) { - writePS("3 1 roll\n"); - } - } - writePS("} def\n"); - } - writePSFmt("{0:.6g} {1:.6g} {2:.6g} {3:.6g} 0 funcSH\n", x0, y0, x1, y1); - - return gTrue; -} - -GBool PSOutputDev::axialShadedFill(GfxState *state, GfxAxialShading *shading, double /*tMin*/, double /*tMax*/) { - double xMin, yMin, xMax, yMax; - double x0, y0, x1, y1, dx, dy, mul; - double tMin, tMax, t, t0, t1; - int i; - - if (level == psLevel2Sep || level == psLevel3Sep) { - if (shading->getColorSpace()->getMode() != csDeviceCMYK) { - return gFalse; - } - processColors |= psProcessCMYK; - } - - // get the clip region bbox - state->getUserClipBBox(&xMin, &yMin, &xMax, &yMax); - - // compute min and max t values, based on the four corners of the - // clip region bbox - shading->getCoords(&x0, &y0, &x1, &y1); - dx = x1 - x0; - dy = y1 - y0; - if (fabs(dx) < 0.01 && fabs(dy) < 0.01) { - return gTrue; - } else { - mul = 1 / (dx * dx + dy * dy); - tMin = tMax = ((xMin - x0) * dx + (yMin - y0) * dy) * mul; - t = ((xMin - x0) * dx + (yMax - y0) * dy) * mul; - if (t < tMin) { - tMin = t; - } else if (t > tMax) { - tMax = t; - } - t = ((xMax - x0) * dx + (yMin - y0) * dy) * mul; - if (t < tMin) { - tMin = t; - } else if (t > tMax) { - tMax = t; - } - t = ((xMax - x0) * dx + (yMax - y0) * dy) * mul; - if (t < tMin) { - tMin = t; - } else if (t > tMax) { - tMax = t; - } - if (tMin < 0 && !shading->getExtend0()) { - tMin = 0; - } - if (tMax > 1 && !shading->getExtend1()) { - tMax = 1; - } - } - - // get the function domain - t0 = shading->getDomain0(); - t1 = shading->getDomain1(); - - // generate the PS code - writePSFmt("/t0 {0:.6g} def\n", t0); - writePSFmt("/t1 {0:.6g} def\n", t1); - writePSFmt("/dt {0:.6g} def\n", t1 - t0); - writePSFmt("/x0 {0:.6g} def\n", x0); - writePSFmt("/y0 {0:.6g} def\n", y0); - writePSFmt("/dx {0:.6g} def\n", x1 - x0); - writePSFmt("/x1 {0:.6g} def\n", x1); - writePSFmt("/y1 {0:.6g} def\n", y1); - writePSFmt("/dy {0:.6g} def\n", y1 - y0); - writePSFmt("/xMin {0:.6g} def\n", xMin); - writePSFmt("/yMin {0:.6g} def\n", yMin); - writePSFmt("/xMax {0:.6g} def\n", xMax); - writePSFmt("/yMax {0:.6g} def\n", yMax); - writePSFmt("/n {0:d} def\n", shading->getColorSpace()->getNComps()); - if (shading->getNFuncs() == 1) { - writePS("/func "); - cvtFunction(shading->getFunc(0)); - writePS("def\n"); - } else { - writePS("/func {\n"); - for (i = 0; i < shading->getNFuncs(); ++i) { - if (i < shading->getNFuncs() - 1) { - writePS("dup\n"); - } - cvtFunction(shading->getFunc(i)); - writePS("exec\n"); - if (i < shading->getNFuncs() - 1) { - writePS("exch\n"); - } - } - writePS("} def\n"); - } - writePSFmt("{0:.6g} {1:.6g} 0 axialSH\n", tMin, tMax); - - return gTrue; -} - -GBool PSOutputDev::radialShadedFill(GfxState *state, GfxRadialShading *shading, double /*sMin*/, double /*sMax*/) { - double xMin, yMin, xMax, yMax; - double x0, y0, r0, x1, y1, r1, t0, t1; - double xa, ya, ra; - double sMin, sMax, h, ta; - double sLeft, sRight, sTop, sBottom, sZero, sDiag; - GBool haveSLeft, haveSRight, haveSTop, haveSBottom, haveSZero; - GBool haveSMin, haveSMax; - double theta, alpha, a1, a2; - GBool enclosed; - int i; - - if (level == psLevel2Sep || level == psLevel3Sep) { - if (shading->getColorSpace()->getMode() != csDeviceCMYK) { - return gFalse; - } - processColors |= psProcessCMYK; - } - - // get the shading info - shading->getCoords(&x0, &y0, &r0, &x1, &y1, &r1); - t0 = shading->getDomain0(); - t1 = shading->getDomain1(); - - // Compute the point at which r(s) = 0; check for the enclosed - // circles case; and compute the angles for the tangent lines. - // Compute the point at which r(s) = 0; check for the enclosed - // circles case; and compute the angles for the tangent lines. - h = sqrt((x1 - x0) * (x1 - x0) + (y1 - y0) * (y1 - y0)); - if (h == 0) { - enclosed = gTrue; - theta = 0; // make gcc happy - } else if (r1 - r0 == 0) { - enclosed = gFalse; - theta = 0; - } else if (fabs(r1 - r0) >= h) { - enclosed = gTrue; - theta = 0; // make gcc happy - } else { - enclosed = gFalse; - theta = asin((r1 - r0) / h); - } - if (enclosed) { - a1 = 0; - a2 = 360; - } else { - alpha = atan2(y1 - y0, x1 - x0); - a1 = (180 / M_PI) * (alpha + theta) + 90; - a2 = (180 / M_PI) * (alpha - theta) - 90; - while (a2 < a1) { - a2 += 360; - } - } - - // compute the (possibly extended) s range - state->getUserClipBBox(&xMin, &yMin, &xMax, &yMax); - if (enclosed) { - sMin = 0; - sMax = 1; - } else { - // solve x(sLeft) + r(sLeft) = xMin - if ((haveSLeft = fabs((x1 + r1) - (x0 + r0)) > 0.000001)) { - sLeft = (xMin - (x0 + r0)) / ((x1 + r1) - (x0 + r0)); - } else { - sLeft = 0; // make gcc happy - } - // solve x(sRight) - r(sRight) = xMax - if ((haveSRight = fabs((x1 - r1) - (x0 - r0)) > 0.000001)) { - sRight = (xMax - (x0 - r0)) / ((x1 - r1) - (x0 - r0)); - } else { - sRight = 0; // make gcc happy - } - // solve y(sBottom) + r(sBottom) = yMin - if ((haveSBottom = fabs((y1 + r1) - (y0 + r0)) > 0.000001)) { - sBottom = (yMin - (y0 + r0)) / ((y1 + r1) - (y0 + r0)); - } else { - sBottom = 0; // make gcc happy - } - // solve y(sTop) - r(sTop) = yMax - if ((haveSTop = fabs((y1 - r1) - (y0 - r0)) > 0.000001)) { - sTop = (yMax - (y0 - r0)) / ((y1 - r1) - (y0 - r0)); - } else { - sTop = 0; // make gcc happy - } - // solve r(sZero) = 0 - if ((haveSZero = fabs(r1 - r0) > 0.000001)) { - sZero = -r0 / (r1 - r0); - } else { - sZero = 0; // make gcc happy - } - // solve r(sDiag) = sqrt((xMax-xMin)^2 + (yMax-yMin)^2) - if (haveSZero) { - sDiag = (sqrt((xMax - xMin) * (xMax - xMin) + - (yMax - yMin) * (yMax - yMin)) - r0) / (r1 - r0); - } else { - sDiag = 0; // make gcc happy - } - // compute sMin - if (shading->getExtend0()) { - sMin = 0; - haveSMin = gFalse; - if (x0 < x1 && haveSLeft && sLeft < 0) { - sMin = sLeft; - haveSMin = gTrue; - } else if (x0 > x1 && haveSRight && sRight < 0) { - sMin = sRight; - haveSMin = gTrue; - } - if (y0 < y1 && haveSBottom && sBottom < 0) { - if (!haveSMin || sBottom > sMin) { - sMin = sBottom; - haveSMin = gTrue; - } - } else if (y0 > y1 && haveSTop && sTop < 0) { - if (!haveSMin || sTop > sMin) { - sMin = sTop; - haveSMin = gTrue; - } - } - if (haveSZero && sZero < 0) { - if (!haveSMin || sZero > sMin) { - sMin = sZero; - } - } - } else { - sMin = 0; - } - // compute sMax - if (shading->getExtend1()) { - sMax = 1; - haveSMax = gFalse; - if (x1 < x0 && haveSLeft && sLeft > 1) { - sMax = sLeft; - haveSMax = gTrue; - } else if (x1 > x0 && haveSRight && sRight > 1) { - sMax = sRight; - haveSMax = gTrue; - } - if (y1 < y0 && haveSBottom && sBottom > 1) { - if (!haveSMax || sBottom < sMax) { - sMax = sBottom; - haveSMax = gTrue; - } - } else if (y1 > y0 && haveSTop && sTop > 1) { - if (!haveSMax || sTop < sMax) { - sMax = sTop; - haveSMax = gTrue; - } - } - if (haveSZero && sDiag > 1) { - if (!haveSMax || sDiag < sMax) { - sMax = sDiag; - } - } - } else { - sMax = 1; - } - } - - // generate the PS code - writePSFmt("/x0 {0:.6g} def\n", x0); - writePSFmt("/x1 {0:.6g} def\n", x1); - writePSFmt("/dx {0:.6g} def\n", x1 - x0); - writePSFmt("/y0 {0:.6g} def\n", y0); - writePSFmt("/y1 {0:.6g} def\n", y1); - writePSFmt("/dy {0:.6g} def\n", y1 - y0); - writePSFmt("/r0 {0:.6g} def\n", r0); - writePSFmt("/r1 {0:.6g} def\n", r1); - writePSFmt("/dr {0:.6g} def\n", r1 - r0); - writePSFmt("/t0 {0:.6g} def\n", t0); - writePSFmt("/t1 {0:.6g} def\n", t1); - writePSFmt("/dt {0:.6g} def\n", t1 - t0); - writePSFmt("/n {0:d} def\n", shading->getColorSpace()->getNComps()); - writePSFmt("/encl {0:s} def\n", enclosed ? "true" : "false"); - writePSFmt("/a1 {0:.6g} def\n", a1); - writePSFmt("/a2 {0:.6g} def\n", a2); - if (shading->getNFuncs() == 1) { - writePS("/func "); - cvtFunction(shading->getFunc(0)); - writePS("def\n"); - } else { - writePS("/func {\n"); - for (i = 0; i < shading->getNFuncs(); ++i) { - if (i < shading->getNFuncs() - 1) { - writePS("dup\n"); - } - cvtFunction(shading->getFunc(i)); - writePS("exec\n"); - if (i < shading->getNFuncs() - 1) { - writePS("exch\n"); - } - } - writePS("} def\n"); - } - writePSFmt("{0:.6g} {1:.6g} 0 radialSH\n", sMin, sMax); - - // extend the 'enclosed' case - if (enclosed) { - // extend the smaller circle - if ((shading->getExtend0() && r0 <= r1) || - (shading->getExtend1() && r1 < r0)) { - if (r0 <= r1) { - ta = t0; - ra = r0; - xa = x0; - ya = y0; - } else { - ta = t1; - ra = r1; - xa = x1; - ya = y1; - } - if (level == psLevel2Sep || level == psLevel3Sep) { - writePSFmt("{0:.6g} radialCol aload pop k\n", ta); - } else { - writePSFmt("{0:.6g} radialCol sc\n", ta); - } - writePSFmt("{0:.6g} {1:.6g} {2:.6g} 0 360 arc h f*\n", xa, ya, ra); - } - - // extend the larger circle - if ((shading->getExtend0() && r0 > r1) || - (shading->getExtend1() && r1 >= r0)) { - if (r0 > r1) { - ta = t0; - ra = r0; - xa = x0; - ya = y0; - } else { - ta = t1; - ra = r1; - xa = x1; - ya = y1; - } - if (level == psLevel2Sep || level == psLevel3Sep) { - writePSFmt("{0:.6g} radialCol aload pop k\n", ta); - } else { - writePSFmt("{0:.6g} radialCol sc\n", ta); - } - writePSFmt("{0:.6g} {1:.6g} {2:.6g} 0 360 arc h\n", xa, ya, ra); - writePSFmt("{0:.6g} {1:.6g} m {2:.6g} {3:.6g} l {4:.6g} {5:.6g} l {6:.6g} {7:.6g} l h f*\n", - xMin, yMin, xMin, yMax, xMax, yMax, xMax, yMin); - } - } - - return gTrue; -} - -void PSOutputDev::clip(GfxState *state) { - doPath(state->getPath()); - writePS("W\n"); -} - -void PSOutputDev::eoClip(GfxState *state) { - doPath(state->getPath()); - writePS("W*\n"); -} - -void PSOutputDev::clipToStrokePath(GfxState *state) { - doPath(state->getPath()); - writePS("Ws\n"); -} - -void PSOutputDev::doPath(GfxPath *path) { - GfxSubpath *subpath; - double x0, y0, x1, y1, x2, y2, x3, y3, x4, y4; - int n, m, i, j; - - n = path->getNumSubpaths(); - - if (n == 1 && path->getSubpath(0)->getNumPoints() == 5) { - subpath = path->getSubpath(0); - x0 = subpath->getX(0); - y0 = subpath->getY(0); - x4 = subpath->getX(4); - y4 = subpath->getY(4); - if (x4 == x0 && y4 == y0) { - x1 = subpath->getX(1); - y1 = subpath->getY(1); - x2 = subpath->getX(2); - y2 = subpath->getY(2); - x3 = subpath->getX(3); - y3 = subpath->getY(3); - if (x0 == x1 && x2 == x3 && y0 == y3 && y1 == y2) { - writePSFmt("{0:.6g} {1:.6g} {2:.6g} {3:.6g} re\n", - x0 < x2 ? x0 : x2, y0 < y1 ? y0 : y1, - fabs(x2 - x0), fabs(y1 - y0)); - return; - } else if (x0 == x3 && x1 == x2 && y0 == y1 && y2 == y3) { - writePSFmt("{0:.6g} {1:.6g} {2:.6g} {3:.6g} re\n", - x0 < x1 ? x0 : x1, y0 < y2 ? y0 : y2, - fabs(x1 - x0), fabs(y2 - y0)); - return; - } - } - } - - for (i = 0; i < n; ++i) { - subpath = path->getSubpath(i); - m = subpath->getNumPoints(); - writePSFmt("{0:.6g} {1:.6g} m\n", subpath->getX(0), subpath->getY(0)); - j = 1; - while (j < m) { - if (subpath->getCurve(j)) { - writePSFmt("{0:.6g} {1:.6g} {2:.6g} {3:.6g} {4:.6g} {5:.6g} c\n", - subpath->getX(j), subpath->getY(j), - subpath->getX(j+1), subpath->getY(j+1), - subpath->getX(j+2), subpath->getY(j+2)); - j += 3; - } else { - writePSFmt("{0:.6g} {1:.6g} l\n", subpath->getX(j), subpath->getY(j)); - ++j; - } - } - if (subpath->isClosed()) { - writePS("h\n"); - } - } -} - -void PSOutputDev::drawString(GfxState *state, const GooString *s) { - GfxFont *font; - int wMode; - int *codeToGID; - GooString *s2; - double dx, dy, originX, originY; - const char *p; - UnicodeMap *uMap; - CharCode code; - Unicode *u; - char buf[8]; - double *dxdy; - int dxdySize, len, nChars, uLen, n, m, i, j; - int maxGlyphInt; - CharCode maxGlyph; - - // for pdftohtml, output PS without text - if( displayText == gFalse ) - return; - - // check for invisible text -- this is used by Acrobat Capture - if (state->getRender() == 3) { - return; - } - - // ignore empty strings - if (s->getLength() == 0) { - return; - } - - // get the font - if (!(font = state->getFont())) { - return; - } - maxGlyphInt = (font->getName() ? fontMaxValidGlyph[font->getName()->toStr()] : 0); - if (maxGlyphInt < 0) maxGlyphInt = 0; - maxGlyph = (CharCode) maxGlyphInt; - wMode = font->getWMode(); - - // check for a subtitute 16-bit font - uMap = nullptr; - codeToGID = nullptr; - if (font->isCIDFont()) { - for (i = 0; i < font16EncLen; ++i) { - if (font->getID()->num == font16Enc[i].fontID.num && - font->getID()->gen == font16Enc[i].fontID.gen) { - if (!font16Enc[i].enc) { - // font substitution failed, so don't output any text - return; - } - uMap = globalParams->getUnicodeMap(font16Enc[i].enc); - break; - } - } - - // check for a code-to-GID map - } else { - for (i = 0; i < font8InfoLen; ++i) { - if (font->getID()->num == font8Info[i].fontID.num && - font->getID()->gen == font8Info[i].fontID.gen) { - codeToGID = font8Info[i].codeToGID; - break; - } - } - } - - // compute the positioning (dx, dy) for each char in the string - nChars = 0; - p = s->getCString(); - len = s->getLength(); - s2 = new GooString(); - dxdySize = font->isCIDFont() ? 8 : s->getLength(); - dxdy = (double *)gmallocn(2 * dxdySize, sizeof(double)); - while (len > 0) { - n = font->getNextChar(p, len, &code, - &u, &uLen, - &dx, &dy, &originX, &originY); - dx *= state->getFontSize(); - dy *= state->getFontSize(); - if (wMode) { - dy += state->getCharSpace(); - if (n == 1 && *p == ' ') { - dy += state->getWordSpace(); - } - } else { - dx += state->getCharSpace(); - if (n == 1 && *p == ' ') { - dx += state->getWordSpace(); - } - } - dx *= state->getHorizScaling(); - if (font->isCIDFont()) { - if (uMap) { - if (nChars + uLen > dxdySize) { - do { - dxdySize *= 2; - } while (nChars + uLen > dxdySize); - dxdy = (double *)greallocn(dxdy, 2 * dxdySize, sizeof(double)); - } - for (i = 0; i < uLen; ++i) { - m = uMap->mapUnicode(u[i], buf, (int)sizeof(buf)); - for (j = 0; j < m; ++j) { - s2->append(buf[j]); - } - //~ this really needs to get the number of chars in the target - //~ encoding - which may be more than the number of Unicode - //~ chars - dxdy[2 * nChars] = dx; - dxdy[2 * nChars + 1] = dy; - ++nChars; - } - } else if (maxGlyph > 0 && code > maxGlyph) { - // Ignore this code. - // Using it will exceed the number of glyphs in the font and generate - // /rangecheck in --xyshow-- - if (nChars > 0) { - dxdy[2 * (nChars-1) ] += dx; - dxdy[2 * (nChars-1) + 1 ] += dy; - } - } else { - if (nChars + 1 > dxdySize) { - dxdySize *= 2; - dxdy = (double *)greallocn(dxdy, 2 * dxdySize, sizeof(double)); - } - s2->append((char)((code >> 8) & 0xff)); - s2->append((char)(code & 0xff)); - dxdy[2 * nChars] = dx; - dxdy[2 * nChars + 1] = dy; - ++nChars; - } - } else { - if (!codeToGID || codeToGID[code] >= 0) { - s2->append((char)code); - dxdy[2 * nChars] = dx; - dxdy[2 * nChars + 1] = dy; - ++nChars; - } - } - p += n; - len -= n; - } - if (uMap) { - uMap->decRefCnt(); - } - - if (nChars > 0) { - writePSString(s2); - writePS("\n["); - for (i = 0; i < 2 * nChars; ++i) { - if (i > 0) { - writePS("\n"); - } - writePSFmt("{0:.6g}", dxdy[i]); - } - writePS("] Tj\n"); - } - gfree(dxdy); - delete s2; - - if (state->getRender() & 4) { - haveTextClip = gTrue; - } -} - -void PSOutputDev::beginTextObject(GfxState *state) { -} - -void PSOutputDev::endTextObject(GfxState *state) { - if (haveTextClip) { - writePS("Tclip\n"); - haveTextClip = gFalse; - } -} - -void PSOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str, - int width, int height, GBool invert, - GBool interpolate, GBool inlineImg) { - int len; - - len = height * ((width + 7) / 8); - switch (level) { - case psLevel1: - case psLevel1Sep: - doImageL1(ref, nullptr, invert, inlineImg, str, width, height, len, - nullptr, nullptr, 0, 0, gFalse); - break; - case psLevel2: - case psLevel2Sep: - doImageL2(ref, nullptr, invert, inlineImg, str, width, height, len, - nullptr, nullptr, 0, 0, gFalse); - break; - case psLevel3: - case psLevel3Sep: - doImageL3(ref, nullptr, invert, inlineImg, str, width, height, len, - nullptr, nullptr, 0, 0, gFalse); - break; - } -} - -void PSOutputDev::setSoftMaskFromImageMask(GfxState *state, Object *ref, Stream *str, - int width, int height, GBool invert, - GBool inlineImg, double *baseMatrix) { - if (level != psLevel1 && level != psLevel1Sep) { - maskToClippingPath(str, width, height, invert); - } -} - -void PSOutputDev::unsetSoftMaskFromImageMask(GfxState * state, double *baseMatrix) { - if (level != psLevel1 && level != psLevel1Sep) { - writePS("pdfImClipEnd\n"); - } -} - -void PSOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, - int width, int height, GfxImageColorMap *colorMap, - GBool interpolate, int *maskColors, GBool inlineImg) { - int len; - - len = height * ((width * colorMap->getNumPixelComps() * - colorMap->getBits() + 7) / 8); - switch (level) { - case psLevel1: - doImageL1(ref, colorMap, gFalse, inlineImg, str, - width, height, len, maskColors, nullptr, 0, 0, gFalse); - break; - case psLevel1Sep: - //~ handle indexed, separation, ... color spaces - doImageL1Sep(ref, colorMap, gFalse, inlineImg, str, - width, height, len, maskColors, nullptr, 0, 0, gFalse); - break; - case psLevel2: - case psLevel2Sep: - doImageL2(ref, colorMap, gFalse, inlineImg, str, - width, height, len, maskColors, nullptr, 0, 0, gFalse); - break; - case psLevel3: - case psLevel3Sep: - doImageL3(ref, colorMap, gFalse, inlineImg, str, - width, height, len, maskColors, nullptr, 0, 0, gFalse); - break; - } - t3Cacheable = gFalse; -} - -void PSOutputDev::drawMaskedImage(GfxState *state, Object *ref, Stream *str, - int width, int height, - GfxImageColorMap *colorMap, - GBool interpolate, - Stream *maskStr, - int maskWidth, int maskHeight, - GBool maskInvert, GBool maskInterpolate) { - int len; - - len = height * ((width * colorMap->getNumPixelComps() * - colorMap->getBits() + 7) / 8); - switch (level) { - case psLevel1: - doImageL1(ref, colorMap, gFalse, gFalse, str, width, height, len, - nullptr, maskStr, maskWidth, maskHeight, maskInvert); - break; - case psLevel1Sep: - //~ handle indexed, separation, ... color spaces - doImageL1Sep(ref, colorMap, gFalse, gFalse, str, width, height, len, - nullptr, maskStr, maskWidth, maskHeight, maskInvert); - break; - case psLevel2: - case psLevel2Sep: - doImageL2(ref, colorMap, gFalse, gFalse, str, width, height, len, - nullptr, maskStr, maskWidth, maskHeight, maskInvert); - break; - case psLevel3: - case psLevel3Sep: - doImageL3(ref, colorMap, gFalse, gFalse, str, width, height, len, - nullptr, maskStr, maskWidth, maskHeight, maskInvert); - break; - } - t3Cacheable = gFalse; -} - -void PSOutputDev::doImageL1(Object *ref, GfxImageColorMap *colorMap, - GBool invert, GBool inlineImg, - Stream *str, int width, int height, int len, - int *maskColors, Stream *maskStr, - int maskWidth, int maskHeight, GBool maskInvert) { - ImageStream *imgStr; - Guchar pixBuf[gfxColorMaxComps]; - GfxGray gray; - int col, x, y, c, i; - char hexBuf[32*2 + 2]; // 32 values X 2 chars/value + line ending + null - Guchar digit, grayValue; - - // explicit masking - if (maskStr && !(maskColors && colorMap)) { - maskToClippingPath(maskStr, maskWidth, maskHeight, maskInvert); - } - - if ((inType3Char || preloadImagesForms) && !colorMap) { - if (inlineImg) { - // create an array - str = new FixedLengthEncoder(str, len); - str = new ASCIIHexEncoder(str); - str->reset(); - col = 0; - writePS("[<"); - do { - do { - c = str->getChar(); - } while (c == '\n' || c == '\r'); - if (c == '>' || c == EOF) { - break; - } - writePSChar(c); - ++col; - // each line is: "<...data...><eol>" - // so max data length = 255 - 4 = 251 - // but make it 240 just to be safe - // chunks are 2 bytes each, so we need to stop on an even col number - if (col == 240) { - writePS(">\n<"); - col = 0; - } - } while (c != '>' && c != EOF); - writePS(">]\n"); - writePS("0\n"); - str->close(); - delete str; - } else { - // make sure the image is setup, it sometimes is not like on bug #17645 - setupImage(ref->getRef(), str, gFalse); - // set up to use the array already created by setupImages() - writePSFmt("ImData_{0:d}_{1:d} 0 0\n", ref->getRefNum(), ref->getRefGen()); - } - } - - // image/imagemask command - if ((inType3Char || preloadImagesForms) && !colorMap) { - writePSFmt("{0:d} {1:d} {2:s} [{3:d} 0 0 {4:d} 0 {5:d}] pdfImM1a\n", - width, height, invert ? "true" : "false", - width, -height, height); - } else if (colorMap) { - writePSFmt("{0:d} {1:d} 8 [{2:d} 0 0 {3:d} 0 {4:d}] pdfIm1{5:s}\n", - width, height, - width, -height, height, - useBinary ? "Bin" : ""); - } else { - writePSFmt("{0:d} {1:d} {2:s} [{3:d} 0 0 {4:d} 0 {5:d}] pdfImM1{6:s}\n", - width, height, invert ? "true" : "false", - width, -height, height, - useBinary ? "Bin" : ""); - } - - // image data - if (!((inType3Char || preloadImagesForms) && !colorMap)) { - - if (colorMap) { - - // set up to process the data stream - imgStr = new ImageStream(str, width, colorMap->getNumPixelComps(), - colorMap->getBits()); - imgStr->reset(); - - // process the data stream - i = 0; - for (y = 0; y < height; ++y) { - - // write the line - for (x = 0; x < width; ++x) { - imgStr->getPixel(pixBuf); - colorMap->getGray(pixBuf, &gray); - grayValue = colToByte(gray); - if (useBinary) { - hexBuf[i++] = grayValue; - } else { - digit = grayValue / 16; - hexBuf[i++] = digit + ((digit >= 10)? 'a' - 10: '0'); - digit = grayValue % 16; - hexBuf[i++] = digit + ((digit >= 10)? 'a' - 10: '0'); - } - if (i >= 64) { - if (!useBinary) { - hexBuf[i++] = '\n'; - } - writePSBuf(hexBuf, i); - i = 0; - } - } - } - if (i != 0) { - if (!useBinary) { - hexBuf[i++] = '\n'; - } - writePSBuf(hexBuf, i); - } - str->close(); - delete imgStr; - - // imagemask - } else { - str->reset(); - i = 0; - for (y = 0; y < height; ++y) { - for (x = 0; x < width; x += 8) { - grayValue = str->getChar(); - if (useBinary) { - hexBuf[i++] = grayValue; - } else { - digit = grayValue / 16; - hexBuf[i++] = digit + ((digit >= 10)? 'a' - 10: '0'); - digit = grayValue % 16; - hexBuf[i++] = digit + ((digit >= 10)? 'a' - 10: '0'); - } - if (i >= 64) { - if (!useBinary) { - hexBuf[i++] = '\n'; - } - writePSBuf(hexBuf, i); - i = 0; - } - } - } - if (i != 0) { - if (!useBinary) { - hexBuf[i++] = '\n'; - } - writePSBuf(hexBuf, i); - } - str->close(); - } - } - - if (maskStr && !(maskColors && colorMap)) { - writePS("pdfImClipEnd\n"); - } -} - -void PSOutputDev::doImageL1Sep(Object *ref, GfxImageColorMap *colorMap, - GBool invert, GBool inlineImg, - Stream *str, int width, int height, int len, - int *maskColors, Stream *maskStr, - int maskWidth, int maskHeight, GBool maskInvert) { - ImageStream *imgStr; - Guchar *lineBuf; - Guchar pixBuf[gfxColorMaxComps]; - GfxCMYK cmyk; - int x, y, i, comp; - GBool checkProcessColor; - char hexBuf[32*2 + 2]; // 32 values X 2 chars/value + line ending + null - Guchar digit; - - // explicit masking - if (maskStr && !(maskColors && colorMap)) { - maskToClippingPath(maskStr, maskWidth, maskHeight, maskInvert); - } - - // width, height, matrix, bits per component - writePSFmt("{0:d} {1:d} 8 [{2:d} 0 0 {3:d} 0 {4:d}] pdfIm1Sep{5:s}\n", - width, height, - width, -height, height, - useBinary ? "Bin" : ""); - - // allocate a line buffer - lineBuf = (Guchar *)gmallocn(width, 4); - - // set up to process the data stream - imgStr = new ImageStream(str, width, colorMap->getNumPixelComps(), - colorMap->getBits()); - imgStr->reset(); - - // process the data stream - checkProcessColor = gTrue; - i = 0; - for (y = 0; y < height; ++y) { - - // read the line - if (checkProcessColor) { - checkProcessColor = (((psProcessCyan | psProcessMagenta | psProcessYellow | psProcessBlack) & ~processColors) != 0); - } - if (checkProcessColor) { - for (x = 0; x < width; ++x) { - imgStr->getPixel(pixBuf); - colorMap->getCMYK(pixBuf, &cmyk); - lineBuf[4*x+0] = colToByte(cmyk.c); - lineBuf[4*x+1] = colToByte(cmyk.m); - lineBuf[4*x+2] = colToByte(cmyk.y); - lineBuf[4*x+3] = colToByte(cmyk.k); - addProcessColor(colToDbl(cmyk.c), colToDbl(cmyk.m), - colToDbl(cmyk.y), colToDbl(cmyk.k)); - } - } else { - for (x = 0; x < width; ++x) { - imgStr->getPixel(pixBuf); - colorMap->getCMYK(pixBuf, &cmyk); - lineBuf[4*x+0] = colToByte(cmyk.c); - lineBuf[4*x+1] = colToByte(cmyk.m); - lineBuf[4*x+2] = colToByte(cmyk.y); - lineBuf[4*x+3] = colToByte(cmyk.k); - } - } - - // write one line of each color component - if (useBinary) { - for (comp = 0; comp < 4; ++comp) { - for (x = 0; x < width; ++x) { - hexBuf[i++] = lineBuf[4*x + comp]; - if (i >= 64) { - writePSBuf(hexBuf, i); - i = 0; - } - } - } - } else { - for (comp = 0; comp < 4; ++comp) { - for (x = 0; x < width; ++x) { - digit = lineBuf[4*x + comp] / 16; - hexBuf[i++] = digit + ((digit >= 10)? 'a'-10: '0'); - digit = lineBuf[4*x + comp] % 16; - hexBuf[i++] = digit + ((digit >= 10)? 'a'-10: '0'); - if (i >= 64) { - hexBuf[i++] = '\n'; - writePSBuf(hexBuf, i); - i = 0; - } - } - } - } - } - - if (i != 0) { - if (!useBinary) { - hexBuf[i++] = '\n'; - } - writePSBuf(hexBuf, i); - } - - str->close(); - delete imgStr; - gfree(lineBuf); - - if (maskStr && !(maskColors && colorMap)) { - writePS("pdfImClipEnd\n"); - } -} - -void PSOutputDev::maskToClippingPath(Stream *maskStr, int maskWidth, int maskHeight, GBool maskInvert) { - ImageStream *imgStr; - Guchar *line; - PSOutImgClipRect *rects0, *rects1, *rectsTmp, *rectsOut; - int rects0Len, rects1Len, rectsSize, rectsOutLen, rectsOutSize; - GBool emitRect, addRect, extendRect; - int i, x0, x1, y, maskXor; - - imgStr = new ImageStream(maskStr, maskWidth, 1, 1); - imgStr->reset(); - rects0Len = rects1Len = rectsOutLen = 0; - rectsSize = rectsOutSize = 64; - rects0 = (PSOutImgClipRect *)gmallocn(rectsSize, sizeof(PSOutImgClipRect)); - rects1 = (PSOutImgClipRect *)gmallocn(rectsSize, sizeof(PSOutImgClipRect)); - rectsOut = (PSOutImgClipRect *)gmallocn(rectsOutSize, sizeof(PSOutImgClipRect)); - maskXor = maskInvert ? 1 : 0; - for (y = 0; y < maskHeight; ++y) { - if (!(line = imgStr->getLine())) { - break; - } - i = 0; - rects1Len = 0; - for (x0 = 0; x0 < maskWidth && (line[x0] ^ maskXor); ++x0) ; - for (x1 = x0; x1 < maskWidth && !(line[x1] ^ maskXor); ++x1) ; - while (x0 < maskWidth || i < rects0Len) { - emitRect = addRect = extendRect = gFalse; - if (x0 >= maskWidth) { - emitRect = gTrue; - } else if (i >= rects0Len) { - addRect = gTrue; - } else if (rects0[i].x0 < x0) { - emitRect = gTrue; - } else if (x0 < rects0[i].x0) { - addRect = gTrue; - } else if (rects0[i].x1 == x1) { - extendRect = gTrue; - } else { - emitRect = addRect = gTrue; - } - if (emitRect) { - if (rectsOutLen == rectsOutSize) { - rectsOutSize *= 2; - rectsOut = (PSOutImgClipRect *)greallocn(rectsOut, rectsOutSize, sizeof(PSOutImgClipRect)); - } - rectsOut[rectsOutLen].x0 = rects0[i].x0; - rectsOut[rectsOutLen].x1 = rects0[i].x1; - rectsOut[rectsOutLen].y0 = maskHeight - y - 1; - rectsOut[rectsOutLen].y1 = maskHeight - rects0[i].y0 - 1; - ++rectsOutLen; - ++i; - } - if (addRect || extendRect) { - if (rects1Len == rectsSize) { - rectsSize *= 2; - rects0 = (PSOutImgClipRect *)greallocn(rects0, rectsSize, sizeof(PSOutImgClipRect)); - rects1 = (PSOutImgClipRect *)greallocn(rects1, rectsSize, sizeof(PSOutImgClipRect)); - } - rects1[rects1Len].x0 = x0; - rects1[rects1Len].x1 = x1; - if (addRect) { - rects1[rects1Len].y0 = y; - } - if (extendRect) { - rects1[rects1Len].y0 = rects0[i].y0; - ++i; - } - ++rects1Len; - for (x0 = x1; x0 < maskWidth && (line[x0] ^ maskXor); ++x0) ; - for (x1 = x0; x1 < maskWidth && !(line[x1] ^ maskXor); ++x1) ; - } - } - rectsTmp = rects0; - rects0 = rects1; - rects1 = rectsTmp; - i = rects0Len; - rects0Len = rects1Len; - rects1Len = i; - } - for (i = 0; i < rects0Len; ++i) { - if (rectsOutLen == rectsOutSize) { - rectsOutSize *= 2; - rectsOut = (PSOutImgClipRect *)greallocn(rectsOut, rectsOutSize, sizeof(PSOutImgClipRect)); - } - rectsOut[rectsOutLen].x0 = rects0[i].x0; - rectsOut[rectsOutLen].x1 = rects0[i].x1; - rectsOut[rectsOutLen].y0 = maskHeight - y - 1; - rectsOut[rectsOutLen].y1 = maskHeight - rects0[i].y0 - 1; - ++rectsOutLen; - } - if (rectsOutLen < 65536/4) { - writePSFmt("{0:d} array 0\n", rectsOutLen * 4); - for (i = 0; i < rectsOutLen; ++i) { - writePSFmt("[{0:d} {1:d} {2:d} {3:d}] pr\n", - rectsOut[i].x0, rectsOut[i].y0, - rectsOut[i].x1 - rectsOut[i].x0, - rectsOut[i].y1 - rectsOut[i].y0); - } - writePSFmt("pop {0:d} {1:d} pdfImClip\n", maskWidth, maskHeight); - } else { - // would be over the limit of array size. - // make each rectangle path and clip. - writePS("gsave newpath\n"); - for (i = 0; i < rectsOutLen; ++i) { - writePSFmt("{0:.6g} {1:.6g} {2:.6g} {3:.6g} re\n", - ((double)rectsOut[i].x0)/maskWidth, - ((double)rectsOut[i].y0)/maskHeight, - ((double)(rectsOut[i].x1 - rectsOut[i].x0))/maskWidth, - ((double)(rectsOut[i].y1 - rectsOut[i].y0))/maskHeight); - } - writePS("clip\n"); - } - gfree(rectsOut); - gfree(rects0); - gfree(rects1); - delete imgStr; - maskStr->close(); -} - -void PSOutputDev::doImageL2(Object *ref, GfxImageColorMap *colorMap, - GBool invert, GBool inlineImg, - Stream *str, int width, int height, int len, - int *maskColors, Stream *maskStr, - int maskWidth, int maskHeight, GBool maskInvert) { - Stream *str2; - ImageStream *imgStr; - Guchar *line; - PSOutImgClipRect *rects0, *rects1, *rectsTmp, *rectsOut; - int rects0Len, rects1Len, rectsSize, rectsOutLen, rectsOutSize; - GBool emitRect, addRect, extendRect; - GooString *s; - int n, numComps; - GBool useLZW, useRLE, useASCII, useCompressed; - GfxSeparationColorSpace *sepCS; - GfxColor color; - GfxCMYK cmyk; - int c; - int col, i, j, x0, x1, y; - char dataBuf[4096]; - - rectsOutLen = 0; - - // color key masking - if (maskColors && colorMap && !inlineImg) { - // can't read the stream twice for inline images -- but masking - // isn't allowed with inline images anyway - numComps = colorMap->getNumPixelComps(); - imgStr = new ImageStream(str, width, numComps, colorMap->getBits()); - imgStr->reset(); - rects0Len = rects1Len = 0; - rectsSize = rectsOutSize = 64; - rects0 = (PSOutImgClipRect *)gmallocn(rectsSize, sizeof(PSOutImgClipRect)); - rects1 = (PSOutImgClipRect *)gmallocn(rectsSize, sizeof(PSOutImgClipRect)); - rectsOut = (PSOutImgClipRect *)gmallocn(rectsOutSize, - sizeof(PSOutImgClipRect)); - for (y = 0; y < height; ++y) { - if (!(line = imgStr->getLine())) { - break; - } - i = 0; - rects1Len = 0; - for (x0 = 0; x0 < width; ++x0) { - for (j = 0; j < numComps; ++j) { - if (line[x0*numComps+j] < maskColors[2*j] || - line[x0*numComps+j] > maskColors[2*j+1]) { - break; - } - } - if (j < numComps) { - break; - } - } - for (x1 = x0; x1 < width; ++x1) { - for (j = 0; j < numComps; ++j) { - if (line[x1*numComps+j] < maskColors[2*j] || - line[x1*numComps+j] > maskColors[2*j+1]) { - break; - } - } - if (j == numComps) { - break; - } - } - while (x0 < width || i < rects0Len) { - emitRect = addRect = extendRect = gFalse; - if (x0 >= width) { - emitRect = gTrue; - } else if (i >= rects0Len) { - addRect = gTrue; - } else if (rects0[i].x0 < x0) { - emitRect = gTrue; - } else if (x0 < rects0[i].x0) { - addRect = gTrue; - } else if (rects0[i].x1 == x1) { - extendRect = gTrue; - } else { - emitRect = addRect = gTrue; - } - if (emitRect) { - if (rectsOutLen == rectsOutSize) { - rectsOutSize *= 2; - rectsOut = (PSOutImgClipRect *)greallocn(rectsOut, rectsOutSize, - sizeof(PSOutImgClipRect)); - } - rectsOut[rectsOutLen].x0 = rects0[i].x0; - rectsOut[rectsOutLen].x1 = rects0[i].x1; - rectsOut[rectsOutLen].y0 = height - y - 1; - rectsOut[rectsOutLen].y1 = height - rects0[i].y0 - 1; - ++rectsOutLen; - ++i; - } - if (addRect || extendRect) { - if (rects1Len == rectsSize) { - rectsSize *= 2; - rects0 = (PSOutImgClipRect *)greallocn(rects0, rectsSize, - sizeof(PSOutImgClipRect)); - rects1 = (PSOutImgClipRect *)greallocn(rects1, rectsSize, - sizeof(PSOutImgClipRect)); - } - rects1[rects1Len].x0 = x0; - rects1[rects1Len].x1 = x1; - if (addRect) { - rects1[rects1Len].y0 = y; - } - if (extendRect) { - rects1[rects1Len].y0 = rects0[i].y0; - ++i; - } - ++rects1Len; - for (x0 = x1; x0 < width; ++x0) { - for (j = 0; j < numComps; ++j) { - if (line[x0*numComps+j] < maskColors[2*j] || - line[x0*numComps+j] > maskColors[2*j+1]) { - break; - } - } - if (j < numComps) { - break; - } - } - for (x1 = x0; x1 < width; ++x1) { - for (j = 0; j < numComps; ++j) { - if (line[x1*numComps+j] < maskColors[2*j] || - line[x1*numComps+j] > maskColors[2*j+1]) { - break; - } - } - if (j == numComps) { - break; - } - } - } - } - rectsTmp = rects0; - rects0 = rects1; - rects1 = rectsTmp; - i = rects0Len; - rects0Len = rects1Len; - rects1Len = i; - } - for (i = 0; i < rects0Len; ++i) { - if (rectsOutLen == rectsOutSize) { - rectsOutSize *= 2; - rectsOut = (PSOutImgClipRect *)greallocn(rectsOut, rectsOutSize, - sizeof(PSOutImgClipRect)); - } - rectsOut[rectsOutLen].x0 = rects0[i].x0; - rectsOut[rectsOutLen].x1 = rects0[i].x1; - rectsOut[rectsOutLen].y0 = height - y - 1; - rectsOut[rectsOutLen].y1 = height - rects0[i].y0 - 1; - ++rectsOutLen; - } - if (rectsOutLen < 65536/4) { - writePSFmt("{0:d} array 0\n", rectsOutLen * 4); - for (i = 0; i < rectsOutLen; ++i) { - writePSFmt("[{0:d} {1:d} {2:d} {3:d}] pr\n", - rectsOut[i].x0, rectsOut[i].y0, - rectsOut[i].x1 - rectsOut[i].x0, - rectsOut[i].y1 - rectsOut[i].y0); - } - writePSFmt("pop {0:d} {1:d} pdfImClip\n", width, height); - } else { - // would be over the limit of array size. - // make each rectangle path and clip. - writePS("gsave newpath\n"); - for (i = 0; i < rectsOutLen; ++i) { - writePSFmt("{0:.6g} {1:.6g} {2:.6g} {3:.6g} re\n", - ((double)rectsOut[i].x0)/width, - ((double)rectsOut[i].y0)/height, - ((double)(rectsOut[i].x1 - rectsOut[i].x0))/width, - ((double)(rectsOut[i].y1 - rectsOut[i].y0))/height); - } - writePS("clip\n"); - } - gfree(rectsOut); - gfree(rects0); - gfree(rects1); - delete imgStr; - str->close(); - - // explicit masking - } else if (maskStr) { - maskToClippingPath(maskStr, maskWidth, maskHeight, maskInvert); - } - - // color space - if (colorMap) { - // Do not update the process color list for custom colors - GBool isCustomColor = - (level == psLevel1Sep || level == psLevel2Sep || level == psLevel3Sep) && - colorMap->getColorSpace()->getMode() == csDeviceN; - dumpColorSpaceL2(colorMap->getColorSpace(), gFalse, !isCustomColor, gFalse); - writePS(" setcolorspace\n"); - } - - // set up the image data - if (mode == psModeForm || inType3Char || preloadImagesForms) { - if (inlineImg) { - // create an array - str2 = new FixedLengthEncoder(str, len); - if (getEnableLZW()) { - str2 = new LZWEncoder(str2); - } else { - str2 = new RunLengthEncoder(str2); - } - if (useASCIIHex) { - str2 = new ASCIIHexEncoder(str2); - } else { - str2 = new ASCII85Encoder(str2); - } - str2->reset(); - col = 0; - writePS((char *)(useASCIIHex ? "[<" : "[<~")); - do { - do { - c = str2->getChar(); - } while (c == '\n' || c == '\r'); - if (c == (useASCIIHex ? '>' : '~') || c == EOF) { - break; - } - if (c == 'z') { - writePSChar(c); - ++col; - } else { - writePSChar(c); - ++col; - for (i = 1; i <= (useASCIIHex ? 1 : 4); ++i) { - do { - c = str2->getChar(); - } while (c == '\n' || c == '\r'); - if (c == (useASCIIHex ? '>' : '~') || c == EOF) { - break; - } - writePSChar(c); - ++col; - } - } - // each line is: "<~...data...~><eol>" - // so max data length = 255 - 6 = 249 - // chunks are 1 or 5 bytes each, so we have to stop at 245 - // but make it 240 just to be safe - if (col > 240) { - writePS((char *)(useASCIIHex ? ">\n<" : "~>\n<~")); - col = 0; - } - } while (c != (useASCIIHex ? '>' : '~') && c != EOF); - writePS((char *)(useASCIIHex ? ">\n" : "~>\n")); - // add an extra entry because the LZWDecode/RunLengthDecode filter may - // read past the end - writePS("<>]\n"); - writePS("0\n"); - str2->close(); - delete str2; - } else { - // make sure the image is setup, it sometimes is not like on bug #17645 - setupImage(ref->getRef(), str, gFalse); - // set up to use the array already created by setupImages() - writePSFmt("ImData_{0:d}_{1:d} 0 0\n",ref->getRefNum(), ref->getRefGen()); - } - } - - // image dictionary - writePS("<<\n /ImageType 1\n"); - - // width, height, matrix, bits per component - writePSFmt(" /Width {0:d}\n", width); - writePSFmt(" /Height {0:d}\n", height); - writePSFmt(" /ImageMatrix [{0:d} 0 0 {1:d} 0 {2:d}]\n", - width, -height, height); - if (colorMap && colorMap->getColorSpace()->getMode() == csDeviceN) { - writePS(" /BitsPerComponent 8\n"); - } else { - writePSFmt(" /BitsPerComponent {0:d}\n", - colorMap ? colorMap->getBits() : 1); - } - - // decode - if (colorMap) { - writePS(" /Decode ["); - if ((level == psLevel2Sep || level == psLevel3Sep) && - colorMap->getColorSpace()->getMode() == csSeparation) { - // this matches up with the code in the pdfImSep operator - n = (1 << colorMap->getBits()) - 1; - writePSFmt("{0:.4g} {1:.4g}", colorMap->getDecodeLow(0) * n, - colorMap->getDecodeHigh(0) * n); - } else if (colorMap->getColorSpace()->getMode() == csDeviceN) { - numComps = ((GfxDeviceNColorSpace *)colorMap->getColorSpace())-> - getAlt()->getNComps(); - for (i = 0; i < numComps; ++i) { - if (i > 0) { - writePS(" "); - } - writePS("0 1"); - } - } else { - numComps = colorMap->getNumPixelComps(); - for (i = 0; i < numComps; ++i) { - if (i > 0) { - writePS(" "); - } - writePSFmt("{0:.4g} {1:.4g}", - colorMap->getDecodeLow(i), colorMap->getDecodeHigh(i)); - } - } - writePS("]\n"); - } else { - writePSFmt(" /Decode [{0:d} {1:d}]\n", invert ? 1 : 0, invert ? 0 : 1); - } - - // data source - if (mode == psModeForm || inType3Char || preloadImagesForms) { - if (inlineImg) { - writePS(" /DataSource { pdfImStr }\n"); - } else { - writePS(" /DataSource { dup 65535 ge { pop 1 add 0 } if 2 index 2" - " index get 1 index get exch 1 add exch }\n"); - } - } else { - writePS(" /DataSource currentfile\n"); - } - - // filters - if ((mode == psModeForm || inType3Char || preloadImagesForms) && - uncompressPreloadedImages) { - s = nullptr; - useLZW = useRLE = gFalse; - useCompressed = gFalse; - useASCII = gFalse; - } else { - s = str->getPSFilter(level < psLevel2 ? 1 : level < psLevel3 ? 2 : 3, - " "); - if ((colorMap && colorMap->getColorSpace()->getMode() == csDeviceN) || - inlineImg || !s) { - if (getEnableLZW()) { - useLZW = gTrue; - useRLE = gFalse; - } else { - useRLE = gTrue; - useLZW = gFalse; - } - useASCII = !(mode == psModeForm || inType3Char || preloadImagesForms); - useCompressed = gFalse; - } else { - useLZW = useRLE = gFalse; - useASCII = str->isBinary() && - !(mode == psModeForm || inType3Char || preloadImagesForms); - useCompressed = gTrue; - } - } - if (useASCII) { - writePSFmt(" /ASCII{0:s}Decode filter\n", - useASCIIHex ? "Hex" : "85"); - } - if (useLZW) { - writePS(" /LZWDecode filter\n"); - } else if (useRLE) { - writePS(" /RunLengthDecode filter\n"); - } - if (useCompressed) { - writePS(s->getCString()); - } - if (s) { - delete s; - } - - if (mode == psModeForm || inType3Char || preloadImagesForms) { - - // end of image dictionary - writePSFmt(">>\n{0:s}\n", colorMap ? "image" : "imagemask"); - - // get rid of the array and index - if (!inlineImg) writePS("pop "); - writePS("pop pop\n"); - - } else { - - // cut off inline image streams at appropriate length - if (inlineImg) { - str = new FixedLengthEncoder(str, len); - } else if (useCompressed) { - str = str->getUndecodedStream(); - } - - // recode DeviceN data - if (colorMap && colorMap->getColorSpace()->getMode() == csDeviceN) { - str = new DeviceNRecoder(str, width, height, colorMap); - } - - // add LZWEncode/RunLengthEncode and ASCIIHex/85 encode filters - if (useLZW) { - str = new LZWEncoder(str); - } else if (useRLE) { - str = new RunLengthEncoder(str); - } - if (useASCII) { - if (useASCIIHex) { - str = new ASCIIHexEncoder(str); - } else { - str = new ASCII85Encoder(str); - } - } - - // end of image dictionary - writePS(">>\n"); -#ifdef OPI_SUPPORT - if (opi13Nest) { - if (inlineImg) { - // this can't happen -- OPI dictionaries are in XObjects - error(errSyntaxError, -1, "OPI in inline image"); - n = 0; - } else { - // need to read the stream to count characters -- the length - // is data-dependent (because of ASCII and LZW/RLE filters) - str->reset(); - n = 0; - while ((c = str->getChar()) != EOF) { - ++n; - } - str->close(); - } - // +6/7 for "pdfIm\n" / "pdfImM\n" - // +8 for newline + trailer - n += colorMap ? 14 : 15; - writePSFmt("%%BeginData: {0:d} Hex Bytes\n", n); - } -#endif - if ((level == psLevel2Sep || level == psLevel3Sep) && colorMap && - colorMap->getColorSpace()->getMode() == csSeparation && colorMap->getBits() == 8) { - color.c[0] = gfxColorComp1; - sepCS = (GfxSeparationColorSpace *)colorMap->getColorSpace(); - sepCS->getCMYK(&color, &cmyk); - writePSFmt("{0:.4g} {1:.4g} {2:.4g} {3:.4g} ({4:t}) pdfImSep\n", - colToDbl(cmyk.c), colToDbl(cmyk.m), - colToDbl(cmyk.y), colToDbl(cmyk.k), - sepCS->getName()); - } else { - writePSFmt("{0:s}\n", colorMap ? "pdfIm" : "pdfImM"); - } - - // copy the stream data - str->reset(); - i = 0; - while ((c = str->getChar()) != EOF) { - dataBuf[i++] = c; - if (i >= (int)sizeof(dataBuf)) { - writePSBuf(dataBuf, i); - i = 0; - } - } - if (i > 0) { - writePSBuf(dataBuf, i); - } - str->close(); - - // add newline and trailer to the end - writePSChar('\n'); - writePS("%-EOD-\n"); -#ifdef OPI_SUPPORT - if (opi13Nest) { - writePS("%%EndData\n"); - } -#endif - - // delete encoders - if (useLZW || useRLE || useASCII || inlineImg) { - delete str; - } - } - - if ((maskColors && colorMap && !inlineImg) || maskStr) { - if (rectsOutLen < 65536/4) { - writePS("pdfImClipEnd\n"); - } else { - writePS("grestore\n"); - } - } -} - -//~ this doesn't currently support OPI -void PSOutputDev::doImageL3(Object *ref, GfxImageColorMap *colorMap, - GBool invert, GBool inlineImg, - Stream *str, int width, int height, int len, - int *maskColors, Stream *maskStr, - int maskWidth, int maskHeight, GBool maskInvert) { - Stream *str2; - GooString *s; - int n, numComps; - GBool useFlate, useLZW, useRLE, useASCII, useCompressed; - GBool maskUseFlate, maskUseLZW, maskUseRLE, maskUseASCII, maskUseCompressed; - GooString *maskFilters; - GfxSeparationColorSpace *sepCS; - GfxColor color; - GfxCMYK cmyk; - int c; - int col, i; - - useFlate = useLZW = useRLE = useASCII = useCompressed = gFalse; - maskUseFlate = maskUseLZW = maskUseRLE = maskUseASCII = maskUseCompressed = gFalse; - maskFilters = nullptr; // make gcc happy - - // explicit masking - if (maskStr) { - - // mask data source - if ((mode == psModeForm || inType3Char || preloadImagesForms) && - uncompressPreloadedImages) { - s = nullptr; - } else { - s = maskStr->getPSFilter(3, " "); - if (!s) { - if (getEnableFlate()) { - maskUseFlate = gTrue; - } else if (getEnableLZW()) { - maskUseLZW = gTrue; - } else { - maskUseRLE = gTrue; - } - maskUseASCII = !(mode == psModeForm || inType3Char || preloadImagesForms); - } else { - maskUseASCII = maskStr->isBinary() && - !(mode == psModeForm || inType3Char || preloadImagesForms); - maskUseCompressed = gTrue; - } - } - maskFilters = new GooString(); - if (maskUseASCII) { - maskFilters->appendf(" /ASCII{0:s}Decode filter\n", - useASCIIHex ? "Hex" : "85"); - } - if (maskUseFlate) { - maskFilters->append(" /FlateDecode filter\n"); - } else if (maskUseLZW) { - maskFilters->append(" /LZWDecode filter\n"); - } else if (maskUseRLE) { - maskFilters->append(" /RunLengthDecode filter\n"); - } - if (maskUseCompressed) { - maskFilters->append(s); - } - if (s) { - delete s; - } - if (mode == psModeForm || inType3Char || preloadImagesForms) { - writePSFmt("MaskData_{0:d}_{1:d} pdfMaskInit\n", - ref->getRefNum(), ref->getRefGen()); - } else { - writePS("currentfile\n"); - writePS(maskFilters->getCString()); - writePS("pdfMask\n"); - - // add FlateEncode/LZWEncode/RunLengthEncode and ASCIIHex/85 encode filters - if (maskUseCompressed) { - maskStr = maskStr->getUndecodedStream(); - } -#ifdef ENABLE_ZLIB - if (maskUseFlate) { - maskStr = new FlateEncoder(maskStr); - } else -#endif - if (maskUseLZW) { - maskStr = new LZWEncoder(maskStr); - } else if (maskUseRLE) { - maskStr = new RunLengthEncoder(maskStr); - } - if (maskUseASCII) { - if (useASCIIHex) { - maskStr = new ASCIIHexEncoder(maskStr); - } else { - maskStr = new ASCII85Encoder(maskStr); - } - } - - // copy the stream data - maskStr->reset(); - while ((c = maskStr->getChar()) != EOF) { - writePSChar(c); - } - maskStr->close(); - writePSChar('\n'); - writePS("%-EOD-\n"); - - // delete encoders - if (maskUseFlate || maskUseLZW || maskUseRLE || maskUseASCII) { - delete maskStr; - } - } - } - - // color space - if (colorMap) { - // Do not update the process color list for custom colors - GBool isCustomColor = - (level == psLevel1Sep || level == psLevel2Sep || level == psLevel3Sep) && - colorMap->getColorSpace()->getMode() == csDeviceN; - dumpColorSpaceL2(colorMap->getColorSpace(), gFalse, !isCustomColor, gFalse); - writePS(" setcolorspace\n"); - } - - // set up the image data - if (mode == psModeForm || inType3Char || preloadImagesForms) { - if (inlineImg) { - // create an array - str2 = new FixedLengthEncoder(str, len); -#ifdef ENABLE_ZLIB - if (getEnableFlate()) { - str2 = new FlateEncoder(str2); - } else -#endif - if (getEnableLZW()) { - str2 = new LZWEncoder(str2); - } else { - str2 = new RunLengthEncoder(str2); - } - if (useASCIIHex) { - str2 = new ASCIIHexEncoder(str2); - } else { - str2 = new ASCII85Encoder(str2); - } - str2->reset(); - col = 0; - writePS((char *)(useASCIIHex ? "[<" : "[<~")); - do { - do { - c = str2->getChar(); - } while (c == '\n' || c == '\r'); - if (c == (useASCIIHex ? '>' : '~') || c == EOF) { - break; - } - if (c == 'z') { - writePSChar(c); - ++col; - } else { - writePSChar(c); - ++col; - for (i = 1; i <= (useASCIIHex ? 1 : 4); ++i) { - do { - c = str2->getChar(); - } while (c == '\n' || c == '\r'); - if (c == (useASCIIHex ? '>' : '~') || c == EOF) { - break; - } - writePSChar(c); - ++col; - } - } - // each line is: "<~...data...~><eol>" - // so max data length = 255 - 6 = 249 - // chunks are 1 or 5 bytes each, so we have to stop at 245 - // but make it 240 just to be safe - if (col > 240) { - writePS((char *)(useASCIIHex ? ">\n<" : "~>\n<~")); - col = 0; - } - } while (c != (useASCIIHex ? '>' : '~') && c != EOF); - writePS((char *)(useASCIIHex ? ">\n" : "~>\n")); - // add an extra entry because the FlateEncode/LZWDecode/RunLengthDecode filter may - // read past the end - writePS("<>]\n"); - writePS("0\n"); - str2->close(); - delete str2; - } else { - // make sure the image is setup, it sometimes is not like on bug #17645 - setupImage(ref->getRef(), str, gFalse); - // set up to use the array already created by setupImages() - writePSFmt("ImData_{0:d}_{1:d} 0 0\n", ref->getRefNum(), ref->getRefGen()); - } - } - - // explicit masking - if (maskStr) { - writePS("<<\n /ImageType 3\n"); - writePS(" /InterleaveType 3\n"); - writePS(" /DataDict\n"); - } - - // image (data) dictionary - writePSFmt("<<\n /ImageType {0:d}\n", (maskColors && colorMap) ? 4 : 1); - - // color key masking - if (maskColors && colorMap) { - writePS(" /MaskColor [\n"); - numComps = colorMap->getNumPixelComps(); - for (i = 0; i < 2 * numComps; i += 2) { - writePSFmt(" {0:d} {1:d}\n", maskColors[i], maskColors[i+1]); - } - writePS(" ]\n"); - } - - // width, height, matrix, bits per component - writePSFmt(" /Width {0:d}\n", width); - writePSFmt(" /Height {0:d}\n", height); - writePSFmt(" /ImageMatrix [{0:d} 0 0 {1:d} 0 {2:d}]\n", - width, -height, height); - if (colorMap && colorMap->getColorSpace()->getMode() == csDeviceN) { - writePS(" /BitsPerComponent 8\n"); - } else { - writePSFmt(" /BitsPerComponent {0:d}\n", - colorMap ? colorMap->getBits() : 1); - } - - // decode - if (colorMap) { - writePS(" /Decode ["); - if ((level == psLevel2Sep || level == psLevel3Sep) && - colorMap->getColorSpace()->getMode() == csSeparation) { - // this matches up with the code in the pdfImSep operator - n = (1 << colorMap->getBits()) - 1; - writePSFmt("{0:.4g} {1:.4g}", colorMap->getDecodeLow(0) * n, - colorMap->getDecodeHigh(0) * n); - } else { - numComps = colorMap->getNumPixelComps(); - for (i = 0; i < numComps; ++i) { - if (i > 0) { - writePS(" "); - } - writePSFmt("{0:.4g} {1:.4g}", colorMap->getDecodeLow(i), - colorMap->getDecodeHigh(i)); - } - } - writePS("]\n"); - } else { - writePSFmt(" /Decode [{0:d} {1:d}]\n", invert ? 1 : 0, invert ? 0 : 1); - } - - // data source - if (mode == psModeForm || inType3Char || preloadImagesForms) { - if (inlineImg) { - writePS(" /DataSource { pdfImStr }\n"); - } else { - writePS(" /DataSource { dup 65535 ge { pop 1 add 0 } if 2 index 2" - " index get 1 index get exch 1 add exch }\n"); - } - } else { - writePS(" /DataSource currentfile\n"); - } - - // filters - - useFlate = useLZW = useRLE = gFalse; - useCompressed = gFalse; - useASCII = gFalse; - - if ((mode == psModeForm || inType3Char || preloadImagesForms) && - uncompressPreloadedImages) { - s = nullptr; - } else { - s = str->getPSFilter(level < psLevel2 ? 1 : level < psLevel3 ? 2 : 3, - " "); - if ((colorMap && colorMap->getColorSpace()->getMode() == csDeviceN) || - inlineImg || !s) { - if (getEnableFlate()) { - useFlate = gTrue; - } else if (getEnableLZW()) { - useLZW = gTrue; - } else { - useRLE = gTrue; - } - useASCII = !(mode == psModeForm || inType3Char || preloadImagesForms); - } else { - useASCII = str->isBinary() && - !(mode == psModeForm || inType3Char || preloadImagesForms); - useCompressed = gTrue; - } - } - if (useASCII) { - writePSFmt(" /ASCII{0:s}Decode filter\n", - useASCIIHex ? "Hex" : "85"); - } - if (useFlate) { - writePS(" /FlateDecode filter\n"); - } else if (useLZW) { - writePS(" /LZWDecode filter\n"); - } else if (useRLE) { - writePS(" /RunLengthDecode filter\n"); - } - if (useCompressed) { - writePS(s->getCString()); - } - if (s) { - delete s; - } - - // end of image (data) dictionary - writePS(">>\n"); - - // explicit masking - if (maskStr) { - writePS(" /MaskDict\n"); - writePS("<<\n"); - writePS(" /ImageType 1\n"); - writePSFmt(" /Width {0:d}\n", maskWidth); - writePSFmt(" /Height {0:d}\n", maskHeight); - writePSFmt(" /ImageMatrix [{0:d} 0 0 {1:d} 0 {2:d}]\n", - maskWidth, -maskHeight, maskHeight); - writePS(" /BitsPerComponent 1\n"); - writePSFmt(" /Decode [{0:d} {1:d}]\n", - maskInvert ? 1 : 0, maskInvert ? 0 : 1); - - // mask data source - if (mode == psModeForm || inType3Char || preloadImagesForms) { - writePS(" /DataSource {pdfMaskSrc}\n"); - writePS(maskFilters->getCString()); - } else { - writePS(" /DataSource maskStream\n"); - } - delete maskFilters; - - writePS(">>\n"); - writePS(">>\n"); - } - - if (mode == psModeForm || inType3Char || preloadImagesForms) { - - // image command - writePSFmt("{0:s}\n", colorMap ? "image" : "imagemask"); - - } else { - - if ((level == psLevel2Sep || level == psLevel3Sep) && colorMap && - colorMap->getColorSpace()->getMode() == csSeparation && colorMap->getBits() == 8) { - color.c[0] = gfxColorComp1; - sepCS = (GfxSeparationColorSpace *)colorMap->getColorSpace(); - sepCS->getCMYK(&color, &cmyk); - writePSFmt("{0:.4g} {1:.4g} {2:.4g} {3:.4g} ({4:t}) pdfImSep\n", - colToDbl(cmyk.c), colToDbl(cmyk.m), - colToDbl(cmyk.y), colToDbl(cmyk.k), - sepCS->getName()); - } else { - writePSFmt("{0:s}\n", colorMap ? "pdfIm" : "pdfImM"); - } - - } - - // get rid of the array and index - if (mode == psModeForm || inType3Char || preloadImagesForms) { - if (!inlineImg) writePS("pop "); - writePS("pop pop\n"); - - // image data - } else { - - // cut off inline image streams at appropriate length - if (inlineImg) { - str = new FixedLengthEncoder(str, len); - } else if (useCompressed) { - str = str->getUndecodedStream(); - } - - // add FlateEncode/LZWEncode/RunLengthEncode and ASCIIHex/85 encode filters -#ifdef ENABLE_ZLIB - if (useFlate) { - str = new FlateEncoder(str); - } else -#endif - if (useLZW) { - str = new LZWEncoder(str); - } else if (useRLE) { - str = new RunLengthEncoder(str); - } - if (useASCII) { - if (useASCIIHex) { - str = new ASCIIHexEncoder(str); - } else { - str = new ASCII85Encoder(str); - } - } - - // copy the stream data - str->reset(); - while ((c = str->getChar()) != EOF) { - writePSChar(c); - } - str->close(); - - // add newline and trailer to the end - writePSChar('\n'); - writePS("%-EOD-\n"); - - // delete encoders - if (useFlate || useLZW || useRLE || useASCII || inlineImg) { - delete str; - } - } - - // close the mask stream - if (maskStr) { - if (!(mode == psModeForm || inType3Char || preloadImagesForms)) { - writePS("pdfMaskEnd\n"); - } - } -} - -void PSOutputDev::dumpColorSpaceL2(GfxColorSpace *colorSpace, - GBool genXform, GBool updateColors, - GBool map01) { - GfxCalGrayColorSpace *calGrayCS; - GfxCalRGBColorSpace *calRGBCS; - GfxLabColorSpace *labCS; - GfxIndexedColorSpace *indexedCS; - GfxSeparationColorSpace *separationCS; - GfxDeviceNColorSpace *deviceNCS; - GfxColorSpace *baseCS; - Guchar *lookup, *p; - double x[gfxColorMaxComps], y[gfxColorMaxComps]; - double low[gfxColorMaxComps], range[gfxColorMaxComps]; - GfxColor color; - GfxCMYK cmyk; - Function *func; - int n, numComps, numAltComps; - int byte; - int i, j, k; - - switch (colorSpace->getMode()) { - - case csDeviceGray: - writePS("/DeviceGray"); - if (genXform) { - writePS(" {}"); - } - if (updateColors) { - processColors |= psProcessBlack; - } - break; - - case csCalGray: - calGrayCS = (GfxCalGrayColorSpace *)colorSpace; - writePS("[/CIEBasedA <<\n"); - writePSFmt(" /DecodeA {{{0:.4g} exp}} bind\n", calGrayCS->getGamma()); - writePSFmt(" /MatrixA [{0:.4g} {1:.4g} {2:.4g}]\n", - calGrayCS->getWhiteX(), calGrayCS->getWhiteY(), - calGrayCS->getWhiteZ()); - writePSFmt(" /WhitePoint [{0:.4g} {1:.4g} {2:.4g}]\n", - calGrayCS->getWhiteX(), calGrayCS->getWhiteY(), - calGrayCS->getWhiteZ()); - writePSFmt(" /BlackPoint [{0:.4g} {1:.4g} {2:.4g}]\n", - calGrayCS->getBlackX(), calGrayCS->getBlackY(), - calGrayCS->getBlackZ()); - writePS(">>]"); - if (genXform) { - writePS(" {}"); - } - if (updateColors) { - processColors |= psProcessBlack; - } - break; - - case csDeviceRGB: - writePS("/DeviceRGB"); - if (genXform) { - writePS(" {}"); - } - if (updateColors) { - processColors |= psProcessCMYK; - } - break; - - case csCalRGB: - calRGBCS = (GfxCalRGBColorSpace *)colorSpace; - writePS("[/CIEBasedABC <<\n"); - writePSFmt(" /DecodeABC [{{{0:.4g} exp}} bind {{{1:.4g} exp}} bind {{{2:.4g} exp}} bind]\n", - calRGBCS->getGammaR(), calRGBCS->getGammaG(), - calRGBCS->getGammaB()); - writePSFmt(" /MatrixABC [{0:.4g} {1:.4g} {2:.4g} {3:.4g} {4:.4g} {5:.4g} {6:.4g} {7:.4g} {8:.4g}]\n", - calRGBCS->getMatrix()[0], calRGBCS->getMatrix()[1], - calRGBCS->getMatrix()[2], calRGBCS->getMatrix()[3], - calRGBCS->getMatrix()[4], calRGBCS->getMatrix()[5], - calRGBCS->getMatrix()[6], calRGBCS->getMatrix()[7], - calRGBCS->getMatrix()[8]); - writePSFmt(" /WhitePoint [{0:.4g} {1:.4g} {2:.4g}]\n", - calRGBCS->getWhiteX(), calRGBCS->getWhiteY(), - calRGBCS->getWhiteZ()); - writePSFmt(" /BlackPoint [{0:.4g} {1:.4g} {2:.4g}]\n", - calRGBCS->getBlackX(), calRGBCS->getBlackY(), - calRGBCS->getBlackZ()); - writePS(">>]"); - if (genXform) { - writePS(" {}"); - } - if (updateColors) { - processColors |= psProcessCMYK; - } - break; - - case csDeviceCMYK: - writePS("/DeviceCMYK"); - if (genXform) { - writePS(" {}"); - } - if (updateColors) { - processColors |= psProcessCMYK; - } - break; - - case csLab: - labCS = (GfxLabColorSpace *)colorSpace; - writePS("[/CIEBasedABC <<\n"); - if (map01) { - writePS(" /RangeABC [0 1 0 1 0 1]\n"); - writePSFmt(" /DecodeABC [{{100 mul 16 add 116 div}} bind {{{0:.4g} mul {1:.4g} add}} bind {{{2:.4g} mul {3:.4g} add}} bind]\n", - (labCS->getAMax() - labCS->getAMin()) / 500.0, - labCS->getAMin() / 500.0, - (labCS->getBMax() - labCS->getBMin()) / 200.0, - labCS->getBMin() / 200.0); - } else { - writePSFmt(" /RangeABC [0 100 {0:.4g} {1:.4g} {2:.4g} {3:.4g}]\n", - labCS->getAMin(), labCS->getAMax(), - labCS->getBMin(), labCS->getBMax()); - writePS(" /DecodeABC [{16 add 116 div} bind {500 div} bind {200 div} bind]\n"); - } - writePS(" /MatrixABC [1 1 1 1 0 0 0 0 -1]\n"); - writePS(" /DecodeLMN\n"); - writePS(" [{dup 6 29 div ge {dup dup mul mul}\n"); - writePSFmt(" {{4 29 div sub 108 841 div mul }} ifelse {0:.4g} mul}} bind\n", - labCS->getWhiteX()); - writePS(" {dup 6 29 div ge {dup dup mul mul}\n"); - writePSFmt(" {{4 29 div sub 108 841 div mul }} ifelse {0:.4g} mul}} bind\n", - labCS->getWhiteY()); - writePS(" {dup 6 29 div ge {dup dup mul mul}\n"); - writePSFmt(" {{4 29 div sub 108 841 div mul }} ifelse {0:.4g} mul}} bind]\n", - labCS->getWhiteZ()); - writePSFmt(" /WhitePoint [{0:.4g} {1:.4g} {2:.4g}]\n", - labCS->getWhiteX(), labCS->getWhiteY(), labCS->getWhiteZ()); - writePSFmt(" /BlackPoint [{0:.4g} {1:.4g} {2:.4g}]\n", - labCS->getBlackX(), labCS->getBlackY(), labCS->getBlackZ()); - writePS(">>]"); - if (genXform) { - writePS(" {}"); - } - if (updateColors) { - processColors |= psProcessCMYK; - } - break; - - case csICCBased: - // there is no transform function to the alternate color space, so - // we can use it directly - dumpColorSpaceL2(((GfxICCBasedColorSpace *)colorSpace)->getAlt(), - genXform, updateColors, gFalse); - break; - - case csIndexed: - indexedCS = (GfxIndexedColorSpace *)colorSpace; - baseCS = indexedCS->getBase(); - writePS("[/Indexed "); - dumpColorSpaceL2(baseCS, gFalse, gFalse, gTrue); - n = indexedCS->getIndexHigh(); - numComps = baseCS->getNComps(); - lookup = indexedCS->getLookup(); - writePSFmt(" {0:d} <\n", n); - if (baseCS->getMode() == csDeviceN && level != psLevel3 && level != psLevel3Sep) { - func = ((GfxDeviceNColorSpace *)baseCS)->getTintTransformFunc(); - baseCS->getDefaultRanges(low, range, indexedCS->getIndexHigh()); - if (((GfxDeviceNColorSpace *)baseCS)->getAlt()->getMode() == csLab) { - labCS = (GfxLabColorSpace *)((GfxDeviceNColorSpace *)baseCS)->getAlt(); - } else { - labCS = nullptr; - } - numAltComps = ((GfxDeviceNColorSpace *)baseCS)->getAlt()->getNComps(); - p = lookup; - for (i = 0; i <= n; i += 8) { - writePS(" "); - for (j = i; j < i+8 && j <= n; ++j) { - for (k = 0; k < numComps; ++k) { - x[k] = low[k] + (*p++ / 255.0) * range[k]; - } - func->transform(x, y); - if (labCS) { - y[0] /= 100.0; - y[1] = (y[1] - labCS->getAMin()) / - (labCS->getAMax() - labCS->getAMin()); - y[2] = (y[2] - labCS->getBMin()) / - (labCS->getBMax() - labCS->getBMin()); - } - for (k = 0; k < numAltComps; ++k) { - byte = (int)(y[k] * 255 + 0.5); - if (byte < 0) { - byte = 0; - } else if (byte > 255) { - byte = 255; - } - writePSFmt("{0:02x}", byte); - } - if (updateColors) { - color.c[0] = dblToCol(j); - indexedCS->getCMYK(&color, &cmyk); - addProcessColor(colToDbl(cmyk.c), colToDbl(cmyk.m), - colToDbl(cmyk.y), colToDbl(cmyk.k)); - } - } - writePS("\n"); - } - } else { - for (i = 0; i <= n; i += 8) { - writePS(" "); - for (j = i; j < i+8 && j <= n; ++j) { - for (k = 0; k < numComps; ++k) { - writePSFmt("{0:02x}", lookup[j * numComps + k]); - } - if (updateColors) { - color.c[0] = dblToCol(j); - indexedCS->getCMYK(&color, &cmyk); - addProcessColor(colToDbl(cmyk.c), colToDbl(cmyk.m), - colToDbl(cmyk.y), colToDbl(cmyk.k)); - } - } - writePS("\n"); - } - } - writePS(">]"); - if (genXform) { - writePS(" {}"); - } - break; - - case csSeparation: - separationCS = (GfxSeparationColorSpace *)colorSpace; - writePS("[/Separation "); - writePSString(separationCS->getName()); - writePS(" "); - dumpColorSpaceL2(separationCS->getAlt(), gFalse, gFalse, gFalse); - writePS("\n"); - cvtFunction(separationCS->getFunc()); - writePS("]"); - if (genXform) { - writePS(" {}"); - } - if (updateColors) { - addCustomColor(separationCS); - } - break; - - case csDeviceN: - deviceNCS = (GfxDeviceNColorSpace *)colorSpace; - if (level == psLevel3 || level == psLevel3Sep) { - writePS("[/DeviceN\n"); - writePS(" [ "); - for (i = 0; i < deviceNCS->getNComps(); i++) { - writePSString(deviceNCS->getColorantName(i)); - writePS(" "); - } - writePS("]\n"); - dumpColorSpaceL2(deviceNCS->getAlt(), gFalse, updateColors, gFalse); - writePS("\n"); - cvtFunction(deviceNCS->getTintTransformFunc(), map01 && deviceNCS->getAlt()->getMode() == csLab); - writePS("]\n"); - if (genXform) { - writePS(" {}"); - } - } else { - // DeviceN color spaces are a Level 3 PostScript feature. - dumpColorSpaceL2(deviceNCS->getAlt(), gFalse, updateColors, map01); - if (genXform) { - writePS(" "); - cvtFunction(deviceNCS->getTintTransformFunc()); - } - } - break; - - case csPattern: - //~ unimplemented - break; - } -} - -#ifdef OPI_SUPPORT -void PSOutputDev::opiBegin(GfxState *state, Dict *opiDict) { - if (generateOPI) { - Object dict = opiDict->lookup("2.0"); - if (dict.isDict()) { - opiBegin20(state, dict.getDict()); - } else { - dict = opiDict->lookup("1.3"); - if (dict.isDict()) { - opiBegin13(state, dict.getDict()); - } - } - } -} - -void PSOutputDev::opiBegin20(GfxState *state, Dict *dict) { - double width, height, left, right, top, bottom; - int w, h; - - writePS("%%BeginOPI: 2.0\n"); - writePS("%%Distilled\n"); - - Object obj1 = dict->lookup("F"); - Object obj2 = getFileSpecName(&obj1); - if (obj2.isString()) { - writePSFmt("%%ImageFileName: {0:t}\n", obj2.getString()); - } - - obj1 = dict->lookup("MainImage"); - if (obj1.isString()) { - writePSFmt("%%MainImage: {0:t}\n", obj1.getString()); - } - - //~ ignoring 'Tags' entry - //~ need to use writePSString() and deal with >255-char lines - - obj1 = dict->lookup("Size"); - if (obj1.isArray() && obj1.arrayGetLength() == 2) { - obj2 = obj1.arrayGet(0); - width = obj2.getNum(); - obj2 = obj1.arrayGet(1); - height = obj2.getNum(); - writePSFmt("%%ImageDimensions: {0:.6g} {1:.6g}\n", width, height); - } - - obj1 = dict->lookup("CropRect"); - if (obj1.isArray() && obj1.arrayGetLength() == 4) { - obj2 = obj1.arrayGet(0); - left = obj2.getNum(); - obj2 = obj1.arrayGet(1); - top = obj2.getNum(); - obj2 = obj1.arrayGet(2); - right = obj2.getNum(); - obj2 = obj1.arrayGet(3); - bottom = obj2.getNum(); - writePSFmt("%%ImageCropRect: {0:.6g} {1:.6g} {2:.6g} {3:.6g}\n", - left, top, right, bottom); - } - - obj1 = dict->lookup("Overprint"); - if (obj1.isBool()) { - writePSFmt("%%ImageOverprint: {0:s}\n", obj1.getBool() ? "true" : "false"); - } - - obj1 = dict->lookup("Inks"); - if (obj1.isName()) { - writePSFmt("%%ImageInks: {0:s}\n", obj1.getName()); - } else if (obj1.isArray() && obj1.arrayGetLength() >= 1) { - obj2 = obj1.arrayGet(0); - if (obj2.isName()) { - writePSFmt("%%ImageInks: {0:s} {1:d}", - obj2.getName(), (obj1.arrayGetLength() - 1) / 2); - for (int i = 1; i+1 < obj1.arrayGetLength(); i += 2) { - Object obj3 = obj1.arrayGet(i); - Object obj4 = obj1.arrayGet(i+1); - if (obj3.isString() && obj4.isNum()) { - writePS(" "); - writePSString(obj3.getString()); - writePSFmt(" {0:.6g}", obj4.getNum()); - } - } - writePS("\n"); - } - } - - writePS("gsave\n"); - - writePS("%%BeginIncludedImage\n"); - - obj1 = dict->lookup("IncludedImageDimensions"); - if (obj1.isArray() && obj1.arrayGetLength() == 2) { - obj2 = obj1.arrayGet(0); - w = obj2.getInt(); - obj2 = obj1.arrayGet(1); - h = obj2.getInt(); - writePSFmt("%%IncludedImageDimensions: {0:d} {1:d}\n", w, h); - } - - obj1 = dict->lookup("IncludedImageQuality"); - if (obj1.isNum()) { - writePSFmt("%%IncludedImageQuality: {0:.6g}\n", obj1.getNum()); - } - - ++opi20Nest; -} - -void PSOutputDev::opiBegin13(GfxState *state, Dict *dict) { - int left, right, top, bottom, samples, bits, width, height; - double c, m, y, k; - double llx, lly, ulx, uly, urx, ury, lrx, lry; - double tllx, tlly, tulx, tuly, turx, tury, tlrx, tlry; - double horiz, vert; - int i, j; - - writePS("save\n"); - writePS("/opiMatrix2 matrix currentmatrix def\n"); - writePS("opiMatrix setmatrix\n"); - - Object obj1 = dict->lookup("F"); - Object obj2 = getFileSpecName(&obj1); - if (obj2.isString()) { - writePSFmt("%ALDImageFileName: {0:t}\n", obj2.getString()); - } - - obj1 = dict->lookup("CropRect"); - if (obj1.isArray() && obj1.arrayGetLength() == 4) { - obj2 = obj1.arrayGet(0); - left = obj2.getInt(); - obj2 = obj1.arrayGet(1); - top = obj2.getInt(); - obj2 = obj1.arrayGet(2); - right = obj2.getInt(); - obj2 = obj1.arrayGet(3); - bottom = obj2.getInt(); - writePSFmt("%ALDImageCropRect: {0:d} {1:d} {2:d} {3:d}\n", - left, top, right, bottom); - } - - obj1 = dict->lookup("Color"); - if (obj1.isArray() && obj1.arrayGetLength() == 5) { - obj2 = obj1.arrayGet(0); - c = obj2.getNum(); - obj2 = obj1.arrayGet(1); - m = obj2.getNum(); - obj2 = obj1.arrayGet(2); - y = obj2.getNum(); - obj2 = obj1.arrayGet(3); - k = obj2.getNum(); - obj2 = obj1.arrayGet(4); - if (obj2.isString()) { - writePSFmt("%ALDImageColor: {0:.4g} {1:.4g} {2:.4g} {3:.4g} ", - c, m, y, k); - writePSString(obj2.getString()); - writePS("\n"); - } - } - - obj1 = dict->lookup("ColorType"); - if (obj1.isName()) { - writePSFmt("%ALDImageColorType: {0:s}\n", obj1.getName()); - } - - //~ ignores 'Comments' entry - //~ need to handle multiple lines - - obj1 = dict->lookup("CropFixed"); - if (obj1.isArray()) { - obj2 = obj1.arrayGet(0); - ulx = obj2.getNum(); - obj2 = obj1.arrayGet(1); - uly = obj2.getNum(); - obj2 = obj1.arrayGet(2); - lrx = obj2.getNum(); - obj2 = obj1.arrayGet(3); - lry = obj2.getNum(); - writePSFmt("%ALDImageCropFixed: {0:.6g} {1:.6g} {2:.6g} {3:.6g}\n", - ulx, uly, lrx, lry); - } - - obj1 = dict->lookup("GrayMap"); - if (obj1.isArray()) { - writePS("%ALDImageGrayMap:"); - for (i = 0; i < obj1.arrayGetLength(); i += 16) { - if (i > 0) { - writePS("\n%%+"); - } - for (j = 0; j < 16 && i+j < obj1.arrayGetLength(); ++j) { - obj2 = obj1.arrayGet(i+j); - writePSFmt(" {0:d}", obj2.getInt()); - } - } - writePS("\n"); - } - - obj1 = dict->lookup("ID"); - if (obj1.isString()) { - writePSFmt("%ALDImageID: {0:t}\n", obj1.getString()); - } - - obj1 = dict->lookup("ImageType"); - if (obj1.isArray() && obj1.arrayGetLength() == 2) { - obj2 = obj1.arrayGet(0); - samples = obj2.getInt(); - obj2 = obj1.arrayGet(1); - bits = obj2.getInt(); - writePSFmt("%ALDImageType: {0:d} {1:d}\n", samples, bits); - } - - dict->lookup("Overprint"); - if (obj1.isBool()) { - writePSFmt("%ALDImageOverprint: {0:s}\n", - obj1.getBool() ? "true" : "false"); - } - - obj1 = dict->lookup("Position"); - if (obj1.isArray() && obj1.arrayGetLength() == 8) { - obj2 = obj1.arrayGet(0); - llx = obj2.getNum(); - obj2 = obj1.arrayGet(1); - lly = obj2.getNum(); - obj2 = obj1.arrayGet(2); - ulx = obj2.getNum(); - obj2 = obj1.arrayGet(3); - uly = obj2.getNum(); - obj2 = obj1.arrayGet(4); - urx = obj2.getNum(); - obj2 = obj1.arrayGet(5); - ury = obj2.getNum(); - obj2 = obj1.arrayGet(6); - lrx = obj2.getNum(); - obj2 = obj1.arrayGet(7); - lry = obj2.getNum(); - opiTransform(state, llx, lly, &tllx, &tlly); - opiTransform(state, ulx, uly, &tulx, &tuly); - opiTransform(state, urx, ury, &turx, &tury); - opiTransform(state, lrx, lry, &tlrx, &tlry); - writePSFmt("%ALDImagePosition: {0:.6g} {1:.6g} {2:.6g} {3:.6g} {4:.6g} {5:.6g} {6:.6g} {7:.6g}\n", - tllx, tlly, tulx, tuly, turx, tury, tlrx, tlry); - } - - obj1 = dict->lookup("Resolution"); - if (obj1.isArray() && obj1.arrayGetLength() == 2) { - obj2 = obj1.arrayGet(0); - horiz = obj2.getNum(); - obj2 = obj1.arrayGet(1); - vert = obj2.getNum(); - writePSFmt("%ALDImageResoution: {0:.6g} {1:.6g}\n", horiz, vert); - } - - obj1 = dict->lookup("Size"); - if (obj1.isArray() && obj1.arrayGetLength() == 2) { - obj2 = obj1.arrayGet(0); - width = obj2.getInt(); - obj2 = obj1.arrayGet(1); - height = obj2.getInt(); - writePSFmt("%ALDImageDimensions: {0:d} {1:d}\n", width, height); - } - - //~ ignoring 'Tags' entry - //~ need to use writePSString() and deal with >255-char lines - - obj1 = dict->lookup("Tint"); - if (obj1.isNum()) { - writePSFmt("%ALDImageTint: {0:.6g}\n", obj1.getNum()); - } - - obj1 = dict->lookup("Transparency"); - if (obj1.isBool()) { - writePSFmt("%ALDImageTransparency: {0:s}\n", - obj1.getBool() ? "true" : "false"); - } - - writePS("%%BeginObject: image\n"); - writePS("opiMatrix2 setmatrix\n"); - ++opi13Nest; -} - -// Convert PDF user space coordinates to PostScript default user space -// coordinates. This has to account for both the PDF CTM and the -// PSOutputDev page-fitting transform. -void PSOutputDev::opiTransform(GfxState *state, double x0, double y0, - double *x1, double *y1) { - double t; - - state->transform(x0, y0, x1, y1); - *x1 += tx; - *y1 += ty; - if (rotate == 90) { - t = *x1; - *x1 = -*y1; - *y1 = t; - } else if (rotate == 180) { - *x1 = -*x1; - *y1 = -*y1; - } else if (rotate == 270) { - t = *x1; - *x1 = *y1; - *y1 = -t; - } - *x1 *= xScale; - *y1 *= yScale; -} - -void PSOutputDev::opiEnd(GfxState *state, Dict *opiDict) { - if (generateOPI) { - Object dict = opiDict->lookup("2.0"); - if (dict.isDict()) { - writePS("%%EndIncludedImage\n"); - writePS("%%EndOPI\n"); - writePS("grestore\n"); - --opi20Nest; - } else { - dict = opiDict->lookup("1.3"); - if (dict.isDict()) { - writePS("%%EndObject\n"); - writePS("restore\n"); - --opi13Nest; - } - } - } -} -#endif // OPI_SUPPORT - -void PSOutputDev::type3D0(GfxState *state, double wx, double wy) { - writePSFmt("{0:.6g} {1:.6g} setcharwidth\n", wx, wy); - writePS("q\n"); - t3NeedsRestore = gTrue; -} - -void PSOutputDev::type3D1(GfxState *state, double wx, double wy, - double llx, double lly, double urx, double ury) { - t3WX = wx; - t3WY = wy; - t3LLX = llx; - t3LLY = lly; - t3URX = urx; - t3URY = ury; - t3String = new GooString(); - writePS("q\n"); - t3FillColorOnly = gTrue; - t3Cacheable = gTrue; - t3NeedsRestore = gTrue; -} - -void PSOutputDev::drawForm(Ref id) { - writePSFmt("f_{0:d}_{1:d}\n", id.num, id.gen); -} - -void PSOutputDev::psXObject(Stream *psStream, Stream *level1Stream) { - Stream *str; - int c; - - if ((level == psLevel1 || level == psLevel1Sep) && level1Stream) { - str = level1Stream; - } else { - str = psStream; - } - str->reset(); - while ((c = str->getChar()) != EOF) { - writePSChar(c); - } - str->close(); -} - -//~ can nextFunc be reset to 0 -- maybe at the start of each page? -//~ or maybe at the start of each color space / pattern? -void PSOutputDev::cvtFunction(Function *func, GBool invertPSFunction) { - SampledFunction *func0; - ExponentialFunction *func2; - StitchingFunction *func3; - PostScriptFunction *func4; - int thisFunc, m, n, nSamples, i, j, k; - - switch (func->getType()) { - - case -1: // identity - writePS("{}\n"); - break; - - case 0: // sampled - func0 = (SampledFunction *)func; - thisFunc = nextFunc++; - m = func0->getInputSize(); - n = func0->getOutputSize(); - nSamples = n; - for (i = 0; i < m; ++i) { - nSamples *= func0->getSampleSize(i); - } - writePSFmt("/xpdfSamples{0:d} [\n", thisFunc); - for (i = 0; i < nSamples; ++i) { - writePSFmt("{0:.6g}\n", func0->getSamples()[i]); - } - writePS("] def\n"); - writePSFmt("{{ {0:d} array {1:d} array {2:d} 2 roll\n", 2*m, m, m+2); - // [e01] [efrac] x0 x1 ... xm-1 - for (i = m-1; i >= 0; --i) { - // [e01] [efrac] x0 x1 ... xi - writePSFmt("{0:.6g} sub {1:.6g} mul {2:.6g} add\n", - func0->getDomainMin(i), - (func0->getEncodeMax(i) - func0->getEncodeMin(i)) / - (func0->getDomainMax(i) - func0->getDomainMin(i)), - func0->getEncodeMin(i)); - // [e01] [efrac] x0 x1 ... xi-1 xi' - writePSFmt("dup 0 lt {{ pop 0 }} {{ dup {0:d} gt {{ pop {1:d} }} if }} ifelse\n", - func0->getSampleSize(i) - 1, func0->getSampleSize(i) - 1); - // [e01] [efrac] x0 x1 ... xi-1 xi' - writePS("dup floor cvi exch dup ceiling cvi exch 2 index sub\n"); - // [e01] [efrac] x0 x1 ... xi-1 floor(xi') ceiling(xi') xi'-floor(xi') - writePSFmt("{0:d} index {1:d} 3 2 roll put\n", i+3, i); - // [e01] [efrac] x0 x1 ... xi-1 floor(xi') ceiling(xi') - writePSFmt("{0:d} index {1:d} 3 2 roll put\n", i+3, 2*i+1); - // [e01] [efrac] x0 x1 ... xi-1 floor(xi') - writePSFmt("{0:d} index {1:d} 3 2 roll put\n", i+2, 2*i); - // [e01] [efrac] x0 x1 ... xi-1 - } - // [e01] [efrac] - for (i = 0; i < n; ++i) { - // [e01] [efrac] y(0) ... y(i-1) - for (j = 0; j < (1<<m); ++j) { - // [e01] [efrac] y(0) ... y(i-1) s(0) s(1) ... s(j-1) - writePSFmt("xpdfSamples{0:d}\n", thisFunc); - k = m - 1; - writePSFmt("{0:d} index {1:d} get\n", i+j+2, 2 * k + ((j >> k) & 1)); - for (k = m - 2; k >= 0; --k) { - writePSFmt("{0:d} mul {1:d} index {2:d} get add\n", - func0->getSampleSize(k), - i + j + 3, - 2 * k + ((j >> k) & 1)); - } - if (n > 1) { - writePSFmt("{0:d} mul {1:d} add ", n, i); - } - writePS("get\n"); - } - // [e01] [efrac] y(0) ... y(i-1) s(0) s(1) ... s(2^m-1) - for (j = 0; j < m; ++j) { - // [e01] [efrac] y(0) ... y(i-1) s(0) s(1) ... s(2^(m-j)-1) - for (k = 0; k < (1 << (m - j)); k += 2) { - // [e01] [efrac] y(0) ... y(i-1) <k/2 s' values> <2^(m-j)-k s values> - writePSFmt("{0:d} index {1:d} get dup\n", - i + k/2 + (1 << (m-j)) - k, j); - writePS("3 2 roll mul exch 1 exch sub 3 2 roll mul add\n"); - writePSFmt("{0:d} 1 roll\n", k/2 + (1 << (m-j)) - k - 1); - } - // [e01] [efrac] s'(0) s'(1) ... s(2^(m-j-1)-1) - } - // [e01] [efrac] y(0) ... y(i-1) s - writePSFmt("{0:.6g} mul {1:.6g} add\n", - func0->getDecodeMax(i) - func0->getDecodeMin(i), - func0->getDecodeMin(i)); - writePSFmt("dup {0:.6g} lt {{ pop {1:.6g} }} {{ dup {2:.6g} gt {{ pop {3:.6g} }} if }} ifelse\n", - func0->getRangeMin(i), func0->getRangeMin(i), - func0->getRangeMax(i), func0->getRangeMax(i)); - // [e01] [efrac] y(0) ... y(i-1) y(i) - } - // [e01] [efrac] y(0) ... y(n-1) - writePSFmt("{0:d} {1:d} roll pop pop \n", n+2, n); - if (invertPSFunction) { - for (i = 0; i < n; ++i) { - writePSFmt("{0:d} -1 roll ", n); - writePSFmt("{0:.6g} sub {1:.6g} div ", func0->getRangeMin(i), func0->getRangeMax(i) - func0->getRangeMin(i)); - } - } - writePS("}\n"); - break; - - case 2: // exponential - func2 = (ExponentialFunction *)func; - n = func2->getOutputSize(); - writePSFmt("{{ dup {0:.6g} lt {{ pop {1:.6g} }} {{ dup {2:.6g} gt {{ pop {3:.6g} }} if }} ifelse\n", - func2->getDomainMin(0), func2->getDomainMin(0), - func2->getDomainMax(0), func2->getDomainMax(0)); - // x - for (i = 0; i < n; ++i) { - // x y(0) .. y(i-1) - writePSFmt("{0:d} index {1:.6g} exp {2:.6g} mul {3:.6g} add\n", - i, func2->getE(), func2->getC1()[i] - func2->getC0()[i], - func2->getC0()[i]); - if (func2->getHasRange()) { - writePSFmt("dup {0:.6g} lt {{ pop {1:.6g} }} {{ dup {2:.6g} gt {{ pop {3:.6g} }} if }} ifelse\n", - func2->getRangeMin(i), func2->getRangeMin(i), - func2->getRangeMax(i), func2->getRangeMax(i)); - } - } - // x y(0) .. y(n-1) - writePSFmt("{0:d} {1:d} roll pop \n", n+1, n); - if (invertPSFunction && func2->getHasRange()) { - for (i = 0; i < n; ++i) { - writePSFmt("{0:d} -1 roll ", n); - writePSFmt("{0:.6g} sub {1:.6g} div ", func2->getRangeMin(i), func2->getRangeMax(i) - func2->getRangeMin(i)); - } - } - writePS("}\n"); - break; - - case 3: // stitching - func3 = (StitchingFunction *)func; - thisFunc = nextFunc++; - for (i = 0; i < func3->getNumFuncs(); ++i) { - cvtFunction(func3->getFunc(i)); - writePSFmt("/xpdfFunc{0:d}_{1:d} exch def\n", thisFunc, i); - } - writePSFmt("{{ dup {0:.6g} lt {{ pop {1:.6g} }} {{ dup {2:.6g} gt {{ pop {3:.6g} }} if }} ifelse\n", - func3->getDomainMin(0), func3->getDomainMin(0), - func3->getDomainMax(0), func3->getDomainMax(0)); - for (i = 0; i < func3->getNumFuncs() - 1; ++i) { - writePSFmt("dup {0:.6g} lt {{ {1:.6g} sub {2:.6g} mul {3:.6g} add xpdfFunc{4:d}_{5:d} }} {{\n", - func3->getBounds()[i+1], - func3->getBounds()[i], - func3->getScale()[i], - func3->getEncode()[2*i], - thisFunc, i); - } - writePSFmt("{0:.6g} sub {1:.6g} mul {2:.6g} add xpdfFunc{3:d}_{4:d}\n", - func3->getBounds()[i], - func3->getScale()[i], - func3->getEncode()[2*i], - thisFunc, i); - for (i = 0; i < func3->getNumFuncs() - 1; ++i) { - writePS("} ifelse\n"); - } - if (invertPSFunction && func3->getHasRange()) { - n = func3->getOutputSize(); - for (i = 0; i < n; ++i) { - writePSFmt("{0:d} -1 roll ", n); - writePSFmt("{0:.6g} sub {1:.6g} div ", func3->getRangeMin(i), func3->getRangeMax(i) - func3->getRangeMin(i)); - } - } - writePS("}\n"); - break; - - case 4: // PostScript - func4 = (PostScriptFunction *)func; - if (invertPSFunction) { - GooString *codeString = new GooString(func4->getCodeString()); - for (i = codeString->getLength() -1; i > 0; i--) { - if (codeString->getChar(i) == '}') { - codeString->del(i); - break; - } - } - writePS(codeString->getCString()); - writePS("\n"); - delete codeString; - n = func4->getOutputSize(); - for (i = 0; i < n; ++i) { - writePSFmt("{0:d} -1 roll ", n); - writePSFmt("{0:.6g} sub {1:.6g} div ", func4->getRangeMin(i), func4->getRangeMax(i) - func4->getRangeMin(i)); - } - writePS("}\n"); - } else { - writePS(func4->getCodeString()->getCString()); - writePS("\n"); - } - break; - } -} - -void PSOutputDev::writePSChar(char c) { - if (t3String) { - t3String->append(c); - } else { - (*outputFunc)(outputStream, &c, 1); - } -} - -void PSOutputDev::writePS(const char *s) { - if (t3String) { - t3String->append(s); - } else { - (*outputFunc)(outputStream, s, strlen(s)); - } -} - -void PSOutputDev::writePSBuf(const char *s, int len) { - if (t3String) { - for (int i = 0; i < len; i++) { - t3String->append(s[i]); - } - } else { - (*outputFunc)(outputStream, s, len); - } -} - -void PSOutputDev::writePSFmt(const char *fmt, ...) { - va_list args; - GooString *buf; - - va_start(args, fmt); - if (t3String) { - t3String->appendfv((char *)fmt, args); - } else { - buf = GooString::formatv((char *)fmt, args); - (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); - delete buf; - } - va_end(args); -} - -void PSOutputDev::writePSString(const GooString *s) { - Guchar *p; - int n, line; - char buf[8]; - - writePSChar('('); - line = 1; - for (p = (Guchar *)s->getCString(), n = s->getLength(); n; ++p, --n) { - if (line >= 64) { - writePSChar('\\'); - writePSChar('\n'); - line = 0; - } - if (*p == '(' || *p == ')' || *p == '\\') { - writePSChar('\\'); - writePSChar((char)*p); - line += 2; - } else if (*p < 0x20 || *p >= 0x80) { - sprintf(buf, "\\%03o", *p); - writePS(buf); - line += 4; - } else { - writePSChar((char)*p); - ++line; - } - } - writePSChar(')'); -} - -void PSOutputDev::writePSName(const char *s) { - const char *p; - char c; - - p = s; - while ((c = *p++)) { - if (c <= (char)0x20 || c >= (char)0x7f || - c == '(' || c == ')' || c == '<' || c == '>' || - c == '[' || c == ']' || c == '{' || c == '}' || - c == '/' || c == '%' || c == '\\') { - writePSFmt("#{0:02x}", c & 0xff); - } else { - writePSChar(c); - } - } -} - -GooString *PSOutputDev::filterPSName(const GooString *name) { - GooString *name2; - char buf[8]; - int i; - char c; - - name2 = new GooString(); - - // ghostscript chokes on names that begin with out-of-limits - // numbers, e.g., 1e4foo is handled correctly (as a name), but - // 1e999foo generates a limitcheck error - c = name->getChar(0); - if (c >= '0' && c <= '9') { - name2->append('f'); - } - - for (i = 0; i < name->getLength(); ++i) { - c = name->getChar(i); - if (c <= (char)0x20 || c >= (char)0x7f || - c == '(' || c == ')' || c == '<' || c == '>' || - c == '[' || c == ']' || c == '{' || c == '}' || - c == '/' || c == '%') { - sprintf(buf, "#%02x", c & 0xff); - name2->append(buf); - } else { - name2->append(c); - } - } - return name2; -} - -// Convert GooString to GooString, with appropriate escaping -// of things that can't appear in a label -// This is heavily based on the writePSTextLine() method -GooString* PSOutputDev::filterPSLabel(GooString *label, GBool *needParens) { - int i, step; - GBool isNumeric; - - // - DSC comments must be printable ASCII; control chars and - // backslashes have to be escaped (we do cheap UCS2-to-ASCII - // conversion by simply ignoring the high byte) - // - parentheses are escaped. this isn't strictly necessary for matched - // parentheses, but shouldn't be a problem - // - lines are limited to 255 chars (we limit to 200 here to allow - // for the keyword, which was emitted by the caller) - - GooString *label2 = new GooString(); - int labelLength = label->getLength(); - - if (labelLength == 0) { - isNumeric = false; - } else { - // this gets changed later if we find a non-numeric character - isNumeric = true; - } - - if ( (labelLength >= 2) && - ( (label->getChar(0) & 0xff) == 0xfe) && - ( (label->getChar(1) & 0xff) == 0xff) ) { - // UCS2 mode - i = 3; - step = 2; - if ( (label->getChar(labelLength-1) == 0) ) { - // prune the trailing null (0x000 for UCS2) - labelLength -= 2; - } - } else { - i = 0; - step = 1; - } - for (int j = 0; i < labelLength && j < 200; i += step) { - char c = label->getChar(i); - if ( (c < '0') || (c > '9') ) { - isNumeric = false; - } - if (c == '\\') { - label2->append("\\\\"); - j += 2; - } else if (c == ')') { - label2->append("\\)"); - } else if (c == '(') { - label2->append("\\("); - } else if (c < 0x20 || c > 0x7e) { - GooString *aux = GooString::format("\\{0:03o}", c); - label2->append(aux); - j += 4; - delete aux; - } else { - label2->append(c); - ++j; - } - } - if (needParens) { - *needParens = !(isNumeric); - } - return label2; -} - -// Write a DSC-compliant <textline>. -void PSOutputDev::writePSTextLine(const GooString *s) { - int i, j, step; - int c; - - // - DSC comments must be printable ASCII; control chars and - // backslashes have to be escaped (we do cheap Unicode-to-ASCII - // conversion by simply ignoring the high byte) - // - lines are limited to 255 chars (we limit to 200 here to allow - // for the keyword, which was emitted by the caller) - // - lines that start with a left paren are treated as <text> - // instead of <textline>, so we escape a leading paren - if (s->getLength() >= 2 && - (s->getChar(0) & 0xff) == 0xfe && - (s->getChar(1) & 0xff) == 0xff) { - i = 3; - step = 2; - } else { - i = 0; - step = 1; - } - for (j = 0; i < s->getLength() && j < 200; i += step) { - c = s->getChar(i) & 0xff; - if (c == '\\') { - writePS("\\\\"); - j += 2; - } else if (c < 0x20 || c > 0x7e || (j == 0 && c == '(')) { - writePSFmt("\\{0:03o}", c); - j += 4; - } else { - writePSChar(c); - ++j; - } - } - writePS("\n"); -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/PSOutputDev.h b/Build/source/libs/poppler/poppler-src/poppler/PSOutputDev.h deleted file mode 100644 index b51cf472977..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/PSOutputDev.h +++ /dev/null @@ -1,570 +0,0 @@ -//======================================================================== -// -// PSOutputDev.h -// -// Copyright 1996-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2005 Martin Kretzschmar <martink@gnome.org> -// Copyright (C) 2005 Kristian Høgsberg <krh@redhat.com> -// Copyright (C) 2006-2008, 2012, 2013, 2015, 2017 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2007 Brad Hards <bradh@kde.org> -// Copyright (C) 2009-2013 Thomas Freitag <Thomas.Freitag@alfa.de> -// Copyright (C) 2009 Till Kamppeter <till.kamppeter@gmail.com> -// Copyright (C) 2009 Carlos Garcia Campos <carlosgc@gnome.org> -// Copyright (C) 2009, 2011, 2015-2017 William Bader <williambader@hotmail.com> -// Copyright (C) 2010 Hib Eris <hib@hiberis.nl> -// Copyright (C) 2011, 2014, 2017 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2012 Fabio D'Urso <fabiodurso@hotmail.it> -// 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 -// Copyright (C) 2018 Adam Reichold <adam.reichold@t-online.de> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef PSOUTPUTDEV_H -#define PSOUTPUTDEV_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "poppler-config.h" -#include <stddef.h> -#include "Object.h" -#include "GfxState.h" -#include "GlobalParams.h" -#include "OutputDev.h" -#include <set> -#include <map> -#include <vector> -#include <unordered_set> -#include <unordered_map> -#include <string> - -class PDFDoc; -class XRef; -class Function; -class GfxPath; -class GfxFont; -class GfxColorSpace; -class GfxSeparationColorSpace; -class PDFRectangle; -struct PST1FontName; -struct PSFont8Info; -struct PSFont16Enc; -class PSOutCustomColor; -class PSOutputDev; - -//------------------------------------------------------------------------ -// PSOutputDev -//------------------------------------------------------------------------ - -enum PSOutMode { - psModePS, - psModeEPS, - psModeForm -}; - -enum PSFileType { - psFile, // write to file - psPipe, // write to pipe - psStdout, // write to stdout - psGeneric // write to a generic stream -}; - -enum PSOutCustomCodeLocation { - psOutCustomDocSetup, - psOutCustomPageSetup -}; - -typedef void (*PSOutputFunc)(void *stream, const char *data, int len); - -typedef GooString *(*PSOutCustomCodeCbk)(PSOutputDev *psOut, - PSOutCustomCodeLocation loc, int n, - void *data); - -class PSOutputDev: public OutputDev { -public: - - // Open a PostScript output file, and write the prolog. - // pages has to be sorted in increasing order - PSOutputDev(const char *fileName, PDFDoc *docA, - char *psTitleA, - const std::vector<int> &pages, PSOutMode modeA, - int paperWidthA = -1, int paperHeightA = -1, - GBool noCrop = gFalse, - GBool duplexA = gTrue, - int imgLLXA = 0, int imgLLYA = 0, - int imgURXA = 0, int imgURYA = 0, - GBool forceRasterizeA = gFalse, - GBool manualCtrlA = gFalse, - PSOutCustomCodeCbk customCodeCbkA = NULL, - void *customCodeCbkDataA = NULL); - - // Open a PSOutputDev that will write to a generic stream. - // pages has to be sorted in increasing order - PSOutputDev(PSOutputFunc outputFuncA, void *outputStreamA, - char *psTitleA, - PDFDoc *docA, - const std::vector<int> &pages, PSOutMode modeA, - int paperWidthA = -1, int paperHeightA = -1, - GBool noCrop = gFalse, - GBool duplexA = gTrue, - int imgLLXA = 0, int imgLLYA = 0, - int imgURXA = 0, int imgURYA = 0, - GBool forceRasterizeA = gFalse, - GBool manualCtrlA = gFalse, - PSOutCustomCodeCbk customCodeCbkA = NULL, - void *customCodeCbkDataA = NULL); - - // Destructor -- writes the trailer and closes the file. - virtual ~PSOutputDev(); - - // Check if file was successfully created. - virtual GBool isOk() { return ok; } - - //---- get info about output device - - // Does this device use upside-down coordinates? - // (Upside-down means (0,0) is the top left corner of the page.) - GBool upsideDown() override { return gFalse; } - - // Does this device use drawChar() or drawString()? - GBool useDrawChar() override { return gFalse; } - - // Does this device use tilingPatternFill()? If this returns false, - // tiling pattern fills will be reduced to a series of other drawing - // operations. - GBool useTilingPatternFill() override { return gTrue; } - - // Does this device use functionShadedFill(), axialShadedFill(), and - // radialShadedFill()? If this returns false, these shaded fills - // will be reduced to a series of other drawing operations. - GBool useShadedFills(int type) override - { return type < 4 && level >= psLevel2; } - - // Does this device use drawForm()? If this returns false, - // form-type XObjects will be interpreted (i.e., unrolled). - GBool useDrawForm() override { return preloadImagesForms; } - - // Does this device use beginType3Char/endType3Char? Otherwise, - // text in Type 3 fonts will be drawn with drawChar/drawString. - GBool interpretType3Chars() override { return gFalse; } - - GBool needClipToCropBox() override { return mode == psModeEPS; } - - //----- header/trailer (used only if manualCtrl is true) - - // Write the document-level header. - void writeHeader(const std::vector<int> &pages, - PDFRectangle *mediaBox, PDFRectangle *cropBox, - int pageRotate, char *pstitle); - - // Write the Xpdf procset. - void writeXpdfProcset(); - - // Write the trailer for the current page. - void writePageTrailer(); - - // Write the document trailer. - void writeTrailer(); - - //----- initialization and control - - // Check to see if a page slice should be displayed. If this - // returns false, the page display is aborted. Typically, an - // OutputDev will use some alternate means to display the page - // before returning false. - GBool checkPageSlice(Page *page, double hDPI, double vDPI, - int rotate, GBool useMediaBox, GBool crop, - int sliceX, int sliceY, int sliceW, int sliceH, - GBool printing, - GBool (*abortCheckCbk)(void *data) = NULL, - void *abortCheckCbkData = NULL, - GBool (*annotDisplayDecideCbk)(Annot *annot, void *user_data) = NULL, - void *annotDisplayDecideCbkData = NULL) override; - - // Start a page. - void startPage(int pageNum, GfxState *state, XRef *xref) override; - - // End a page. - void endPage() override; - - //----- save/restore graphics state - void saveState(GfxState *state) override; - void restoreState(GfxState *state) override; - - //----- update graphics state - void updateCTM(GfxState *state, double m11, double m12, - double m21, double m22, double m31, double m32) override; - void updateLineDash(GfxState *state) override; - void updateFlatness(GfxState *state) override; - void updateLineJoin(GfxState *state) override; - void updateLineCap(GfxState *state) override; - void updateMiterLimit(GfxState *state) override; - void updateLineWidth(GfxState *state) override; - void updateFillColorSpace(GfxState *state) override; - void updateStrokeColorSpace(GfxState *state) override; - void updateFillColor(GfxState *state) override; - void updateStrokeColor(GfxState *state) override; - void updateFillOverprint(GfxState *state) override; - void updateStrokeOverprint(GfxState *state) override; - void updateOverprintMode(GfxState *state) override; - void updateTransfer(GfxState *state) override; - - //----- update text state - void updateFont(GfxState *state) override; - void updateTextMat(GfxState *state) override; - void updateCharSpace(GfxState *state) override; - void updateRender(GfxState *state) override; - void updateRise(GfxState *state) override; - void updateWordSpace(GfxState *state) override; - void updateHorizScaling(GfxState *state) override; - void updateTextPos(GfxState *state) override; - void updateTextShift(GfxState *state, double shift) override; - void saveTextPos(GfxState *state) override; - void restoreTextPos(GfxState *state) override; - - //----- path painting - void stroke(GfxState *state) override; - void fill(GfxState *state) override; - void eoFill(GfxState *state) override; - GBool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, Object *str, - double *pmat, int paintType, int tilingType, Dict *resDict, - double *mat, double *bbox, - int x0, int y0, int x1, int y1, - double xStep, double yStep) override; - GBool functionShadedFill(GfxState *state, - GfxFunctionShading *shading) override; - GBool axialShadedFill(GfxState *state, GfxAxialShading *shading, double /*tMin*/, double /*tMax*/) override; - GBool radialShadedFill(GfxState *state, GfxRadialShading *shading, double /*sMin*/, double /*sMax*/) override; - - //----- path clipping - void clip(GfxState *state) override; - void eoClip(GfxState *state) override; - void clipToStrokePath(GfxState *state) override; - - //----- text drawing - void drawString(GfxState *state, const GooString *s) override; - void beginTextObject(GfxState *state) override; - void endTextObject(GfxState *state) override; - - //----- image drawing - void drawImageMask(GfxState *state, Object *ref, Stream *str, - int width, int height, GBool invert, - GBool interpolate, GBool inlineImg) override; - void setSoftMaskFromImageMask(GfxState *state, - Object *ref, Stream *str, - int width, int height, GBool invert, - GBool inlineImg, double *baseMatrix) override; - void unsetSoftMaskFromImageMask(GfxState *state, double *baseMatrix) override; - void drawImage(GfxState *state, Object *ref, Stream *str, - int width, int height, GfxImageColorMap *colorMap, - GBool interpolate, int *maskColors, GBool inlineImg) override; - void drawMaskedImage(GfxState *state, Object *ref, Stream *str, - int width, int height, - GfxImageColorMap *colorMap, - GBool interpolate, - Stream *maskStr, int maskWidth, int maskHeight, - GBool maskInvert, GBool maskInterpolate) override; - -#ifdef OPI_SUPPORT - //----- OPI functions - void opiBegin(GfxState *state, Dict *opiDict) override; - void opiEnd(GfxState *state, Dict *opiDict) override; -#endif - - //----- Type 3 font operators - void type3D0(GfxState *state, double wx, double wy) override; - void type3D1(GfxState *state, double wx, double wy, - double llx, double lly, double urx, double ury) override; - - //----- form XObjects - void drawForm(Ref ref) override; - - //----- PostScript XObjects - void psXObject(Stream *psStream, Stream *level1Stream) override; - - //----- miscellaneous - void setOffset(double x, double y) - { tx0 = x; ty0 = y; } - void setScale(double x, double y) - { xScale0 = x; yScale0 = y; } - void setRotate(int rotateA) - { rotate0 = rotateA; } - void setClip(double llx, double lly, double urx, double ury) - { clipLLX0 = llx; clipLLY0 = lly; clipURX0 = urx; clipURY0 = ury; } - void setUnderlayCbk(void (*cbk)(PSOutputDev *psOut, void *data), - void *data) - { underlayCbk = cbk; underlayCbkData = data; } - void setOverlayCbk(void (*cbk)(PSOutputDev *psOut, void *data), - void *data) - { overlayCbk = cbk; overlayCbkData = data; } - void setDisplayText(GBool display) { displayText = display; } - - void setPSCenter(GBool center) { psCenter = center; } - void setRasterAntialias(GBool a) { rasterAntialias = a; } - void setRasterResolution(double r) { rasterResolution = r; } - void setRasterMono(GBool b) { rasterMono = b; } - void setUncompressPreloadedImages(GBool b) { uncompressPreloadedImages = b; } - - GBool getEmbedType1() const { return embedType1; } - GBool getEmbedTrueType() const { return embedTrueType; } - GBool getEmbedCIDPostScript() const { return embedCIDPostScript; } - GBool getEmbedCIDTrueType() const { return embedCIDTrueType; } - GBool getFontPassthrough() const { return fontPassthrough; } - GBool getOptimizeColorSpace() const { return optimizeColorSpace; } - GBool getPassLevel1CustomColor() const { return passLevel1CustomColor; } - GBool getEnableLZW() const { return enableLZW; }; - GBool getEnableFlate() const -#ifdef ENABLE_ZLIB - { return enableFlate; } -#else - { return gFalse; } -#endif - void setEmbedType1(GBool b) { embedType1 = b; } - void setEmbedTrueType(GBool b) { embedTrueType = b; } - void setEmbedCIDPostScript(GBool b) { embedCIDPostScript = b; } - void setEmbedCIDTrueType(GBool b) { embedCIDTrueType = b; } - void setFontPassthrough(GBool b) { fontPassthrough = b; } - void setOptimizeColorSpace(GBool b) { optimizeColorSpace = b; } - void setPassLevel1CustomColor(GBool b) { passLevel1CustomColor = b; } - void setPreloadImagesForms(GBool b) { preloadImagesForms = b; } - void setGenerateOPI(GBool b) { generateOPI = b; } - void setUseASCIIHex(GBool b) { useASCIIHex = b; } - void setUseBinary(GBool b) { useBinary = b; } - void setEnableLZW(GBool b) { enableLZW = b; } - void setEnableFlate(GBool b) { enableFlate = b; } - -private: - - void init(PSOutputFunc outputFuncA, void *outputStreamA, - PSFileType fileTypeA, char *psTitleA, PDFDoc *doc, - const std::vector<int> &pages, PSOutMode modeA, - int imgLLXA, int imgLLYA, int imgURXA, int imgURYA, - GBool manualCtrlA, int paperWidthA, int paperHeightA, - GBool noCropA, GBool duplexA); - void postInit(); - void setupResources(Dict *resDict); - void setupFonts(Dict *resDict); - void setupFont(GfxFont *font, Dict *parentResDict); - void setupEmbeddedType1Font(Ref *id, GooString *psName); - void updateFontMaxValidGlyph(GfxFont *font, int maxValidGlyph); - void setupExternalType1Font(GooString *fileName, GooString *psName); - void setupEmbeddedType1CFont(GfxFont *font, Ref *id, GooString *psName); - void setupEmbeddedOpenTypeT1CFont(GfxFont *font, Ref *id, GooString *psName); - void setupEmbeddedTrueTypeFont(GfxFont *font, Ref *id, GooString *psName); - void setupExternalTrueTypeFont(GfxFont *font, GooString *fileName, - GooString *psName); - void setupEmbeddedCIDType0Font(GfxFont *font, Ref *id, GooString *psName); - void setupEmbeddedCIDTrueTypeFont(GfxFont *font, Ref *id, GooString *psName, - GBool needVerticalMetrics); - void setupExternalCIDTrueTypeFont(GfxFont *font, - GooString *fileName, - GooString *psName, - GBool needVerticalMetrics); - void setupEmbeddedOpenTypeCFFFont(GfxFont *font, Ref *id, GooString *psName); - void setupType3Font(GfxFont *font, GooString *psName, Dict *parentResDict); - GooString *makePSFontName(GfxFont *font, const Ref *id); - void setupImages(Dict *resDict); - void setupImage(Ref id, Stream *str, GBool mask); - void setupForms(Dict *resDict); - void setupForm(Ref id, Object *strObj); - void addProcessColor(double c, double m, double y, double k); - void addCustomColor(GfxSeparationColorSpace *sepCS); - void doPath(GfxPath *path); - void maskToClippingPath(Stream *maskStr, int maskWidth, int maskHeight, GBool maskInvert); - void doImageL1(Object *ref, GfxImageColorMap *colorMap, - GBool invert, GBool inlineImg, - Stream *str, int width, int height, int len, - int *maskColors, Stream *maskStr, - int maskWidth, int maskHeight, GBool maskInvert); - void doImageL1Sep(Object *ref, GfxImageColorMap *colorMap, - GBool invert, GBool inlineImg, - Stream *str, int width, int height, int len, - int *maskColors, Stream *maskStr, - int maskWidth, int maskHeight, GBool maskInvert); - void doImageL2(Object *ref, GfxImageColorMap *colorMap, - GBool invert, GBool inlineImg, - Stream *str, int width, int height, int len, - int *maskColors, Stream *maskStr, - int maskWidth, int maskHeight, GBool maskInvert); - void doImageL3(Object *ref, GfxImageColorMap *colorMap, - GBool invert, GBool inlineImg, - Stream *str, int width, int height, int len, - int *maskColors, Stream *maskStr, - int maskWidth, int maskHeight, GBool maskInvert); - void dumpColorSpaceL2(GfxColorSpace *colorSpace, - GBool genXform, GBool updateColors, - GBool map01); - GBool tilingPatternFillL1(GfxState *state, Catalog *cat, Object *str, - double *pmat, int paintType, int tilingType, Dict *resDict, - double *mat, double *bbox, - int x0, int y0, int x1, int y1, - double xStep, double yStep); - GBool tilingPatternFillL2(GfxState *state, Catalog *cat, Object *str, - double *pmat, int paintType, int tilingType, Dict *resDict, - double *mat, double *bbox, - int x0, int y0, int x1, int y1, - double xStep, double yStep); - -#ifdef OPI_SUPPORT - void opiBegin20(GfxState *state, Dict *dict); - void opiBegin13(GfxState *state, Dict *dict); - void opiTransform(GfxState *state, double x0, double y0, - double *x1, double *y1); -#endif - void cvtFunction(Function *func, GBool invertPSFunction = gFalse); - GooString *filterPSName(const GooString *name); - - // Write the document-level setup. - void writeDocSetup(PDFDoc *doc, Catalog *catalog, const std::vector<int> &pages, GBool duplexA); - - void writePSChar(char c); - void writePS(const char *s); - void writePSBuf(const char *s, int len); - void writePSFmt(const char *fmt, ...); - void writePSString(const GooString *s); - void writePSName(const char *s); - GooString *filterPSLabel(GooString *label, GBool *needParens=nullptr); - void writePSTextLine(const GooString *s); - - PSLevel level; // PostScript level (1, 2, separation) - PSOutMode mode; // PostScript mode (PS, EPS, form) - int paperWidth; // width of paper, in pts - int paperHeight; // height of paper, in pts - GBool paperMatch; // true if paper size is set to match each page - int prevWidth; // width of previous page - // (only psModePSOrigPageSizes output mode) - int prevHeight; // height of previous page - // (only psModePSOrigPageSizes output mode) - int imgLLX, imgLLY, // imageable area, in pts - imgURX, imgURY; - GBool noCrop; - GBool duplex; - std::vector<int> pages; - char *psTitle; - GBool postInitDone; // true if postInit() was called - - PSOutputFunc outputFunc; - void *outputStream; - PSFileType fileType; // file / pipe / stdout - GBool manualCtrl; - int seqPage; // current sequential page number - void (*underlayCbk)(PSOutputDev *psOut, void *data); - void *underlayCbkData; - void (*overlayCbk)(PSOutputDev *psOut, void *data); - void *overlayCbkData; - GooString *(*customCodeCbk)(PSOutputDev *psOut, - PSOutCustomCodeLocation loc, int n, - void *data); - void *customCodeCbkData; - - PDFDoc *doc; - XRef *xref; // the xref table for this PDF file - - Ref *fontIDs; // list of object IDs of all used fonts - int fontIDLen; // number of entries in fontIDs array - int fontIDSize; // size of fontIDs array - std::set<int> resourceIDs; // list of object IDs of objects containing Resources we've already set up - std::unordered_set<std::string> fontNames; // all used font names - std::unordered_map<std::string, int> fontMaxValidGlyph; // max valid glyph of each font - PST1FontName *t1FontNames; // font names for Type 1/1C fonts - int t1FontNameLen; // number of entries in t1FontNames array - int t1FontNameSize; // size of t1FontNames array - PSFont8Info *font8Info; // info for 8-bit fonts - int font8InfoLen; // number of entries in font8Info array - int font8InfoSize; // size of font8Info array - PSFont16Enc *font16Enc; // encodings for substitute 16-bit fonts - int font16EncLen; // number of entries in font16Enc array - int font16EncSize; // size of font16Enc array - Ref *imgIDs; // list of image IDs for in-memory images - int imgIDLen; // number of entries in imgIDs array - int imgIDSize; // size of imgIDs array - Ref *formIDs; // list of IDs for predefined forms - int formIDLen; // number of entries in formIDs array - int formIDSize; // size of formIDs array - int numSaves; // current number of gsaves - int numTilingPatterns; // current number of nested tiling patterns - int nextFunc; // next unique number to use for a function - - GooList *paperSizes; // list of used paper sizes, if paperMatch - // is true [PSOutPaperSize] - std::map<int,int> pagePaperSize; // page num to paperSize entry mapping - double tx0, ty0; // global translation - double xScale0, yScale0; // global scaling - int rotate0; // rotation angle (0, 90, 180, 270) - double clipLLX0, clipLLY0, - clipURX0, clipURY0; - double tx, ty; // global translation for current page - double xScale, yScale; // global scaling for current page - int rotate; // rotation angle for current page - double epsX1, epsY1, // EPS bounding box (unrotated) - epsX2, epsY2; - - GooString *embFontList; // resource comments for embedded fonts - - int processColors; // used process colors - PSOutCustomColor // used custom colors - *customColors; - - GBool haveTextClip; // set if text has been drawn with a - // clipping render mode - - GBool inType3Char; // inside a Type 3 CharProc - GBool inUncoloredPattern; // inside a uncolored pattern (PaintType = 2) - GooString *t3String; // Type 3 content string - double t3WX, t3WY, // Type 3 character parameters - t3LLX, t3LLY, t3URX, t3URY; - GBool t3FillColorOnly; // operators should only use the fill color - GBool t3Cacheable; // cleared if char is not cacheable - GBool t3NeedsRestore; // set if a 'q' operator was issued - GBool forceRasterize; // forces the page to be rasterized into a image before printing - GBool displayText; // displayText - GBool psCenter; // center pages on the paper - GBool rasterAntialias; // antialias on rasterize - GBool uncompressPreloadedImages; - double rasterResolution; // PostScript rasterization resolution (dpi) - GBool rasterMono; // true to do PostScript rasterization - // in monochrome (gray); false to do it - // in color (RGB/CMYK) - GBool embedType1; // embed Type 1 fonts? - GBool embedTrueType; // embed TrueType fonts? - GBool embedCIDPostScript; // embed CID PostScript fonts? - GBool embedCIDTrueType; // embed CID TrueType fonts? - GBool fontPassthrough; // pass all fonts through as-is? - GBool optimizeColorSpace; // false to keep gray RGB images in their original color space - // true to optimize gray images to DeviceGray color space - GBool passLevel1CustomColor; // false to convert all custom colors to CMYK - // true to pass custom colors - // has effect only when doing a level1sep - GBool preloadImagesForms; // preload PostScript images and forms into - // memory - GBool generateOPI; // generate PostScript OPI comments? - GBool useASCIIHex; // use ASCIIHex instead of ASCII85? - GBool useBinary; // use binary instead of hex - GBool enableLZW; // enable LZW compression - GBool enableFlate; // enable Flate compression - -#ifdef OPI_SUPPORT - int opi13Nest; // nesting level of OPI 1.3 objects - int opi20Nest; // nesting level of OPI 2.0 objects -#endif - - GBool ok; // set up ok? - - friend class WinPDFPrinter; -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/PSTokenizer.cc b/Build/source/libs/poppler/poppler-src/poppler/PSTokenizer.cc deleted file mode 100644 index ddde6bc1c1d..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/PSTokenizer.cc +++ /dev/null @@ -1,160 +0,0 @@ -//======================================================================== -// -// PSTokenizer.cc -// -// Copyright 2002-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2006 Scott Turner <scotty1024@mac.com> -// Copyright (C) 2008 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2017 Vincent Le Garrec <legarrec.vincent@gmail.com> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include <config.h> - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include <stdio.h> -#include <stdlib.h> -#include "PSTokenizer.h" - -//------------------------------------------------------------------------ - -// A '1' in this array means the character is white space. A '1' or -// '2' means the character ends a name or command. -static const char specialChars[256] = { - 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, // 0x - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x - 1, 0, 0, 0, 0, 2, 0, 0, 2, 2, 0, 0, 0, 0, 0, 2, // 2x - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, // 3x - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 4x - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, // 5x - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 6x - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, // 7x - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8x - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9x - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // ax - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // bx - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // cx - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // dx - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // ex - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 // fx -}; - -//------------------------------------------------------------------------ - -PSTokenizer::PSTokenizer(int (*getCharFuncA)(void *), void *dataA) { - getCharFunc = getCharFuncA; - data = dataA; - charBuf = -1; -} - -PSTokenizer::~PSTokenizer() { -} - -GBool PSTokenizer::getToken(char *buf, int size, int *length) { - GBool comment, backslash; - int c; - int i; - - // skip leading whitespace and comments - comment = gFalse; - while (1) { - if ((c = getChar()) == EOF) { - buf[0] = '\0'; - *length = 0; - return gFalse; - } - if (comment) { - if (c == '\x0a' || c == '\x0d') { - comment = gFalse; - } - } else if (c == '%') { - comment = gTrue; - } else if (specialChars[static_cast<unsigned char>(c)] != 1) { - break; - } - } - - // Reserve room for terminating '\0' - size--; - - // read a token - i = 0; - buf[i++] = c; - if (c == '(') { - backslash = gFalse; - while ((c = lookChar()) != EOF) { - consumeChar(); - if (i < size) { - buf[i++] = c; - } - if (c == '\\') { - backslash = gTrue; - } else if (!backslash && c == ')') { - break; - } else { - backslash = gFalse; - } - } - } else if (c == '<') { - while ((c = lookChar()) != EOF) { - consumeChar(); - if (i < size && specialChars[static_cast<unsigned char>(c)] != 1) { - buf[i++] = c; - } - if (c == '>') { - break; - } - } - } else if (c != '[' && c != ']') { - while ((c = lookChar()) != EOF && !specialChars[static_cast<unsigned char>(c)]) { - consumeChar(); - if (i < size) { - buf[i++] = c; - } - } - } - // Zero terminate token string - buf[i] = '\0'; - // Return length of token - *length = i; - - return gTrue; -} - -int PSTokenizer::lookChar() { - if (charBuf < 0) { - charBuf = (*getCharFunc)(data); - } - return charBuf; -} - -void PSTokenizer::consumeChar() { - charBuf = -1; -} - -int PSTokenizer::getChar() { - int c = charBuf; - - if (c < 0) { - c = (*getCharFunc)(data); - } else { - charBuf = -1; - } - return c; -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/PSTokenizer.h b/Build/source/libs/poppler/poppler-src/poppler/PSTokenizer.h deleted file mode 100644 index fc2f053d3f2..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/PSTokenizer.h +++ /dev/null @@ -1,54 +0,0 @@ -//======================================================================== -// -// PSTokenizer.h -// -// Copyright 2002-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2006 Scott Turner <scotty1024@mac.com> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef PSTOKENIZER_H -#define PSTOKENIZER_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "goo/gtypes.h" - -//------------------------------------------------------------------------ - -class PSTokenizer { -public: - - PSTokenizer(int (*getCharFuncA)(void *), void *dataA); - ~PSTokenizer(); - - // Get the next PostScript token. Returns false at end-of-stream. - GBool getToken(char *buf, int size, int *length); - -private: - - int lookChar(); - void consumeChar(); - int getChar(); - - int (*getCharFunc)(void *); - void *data; - int charBuf; -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/Page.cc b/Build/source/libs/poppler/poppler-src/poppler/Page.cc deleted file mode 100644 index d4799dd14bd..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/Page.cc +++ /dev/null @@ -1,805 +0,0 @@ -//======================================================================== -// -// Page.cc -// -// Copyright 1996-2007 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2005 Kristian Høgsberg <krh@redhat.com> -// Copyright (C) 2005 Jeff Muizelaar <jeff@infidigm.net> -// Copyright (C) 2005-2013, 2016, 2017 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2006-2008 Pino Toscano <pino@kde.org> -// Copyright (C) 2006 Nickolay V. Shmyrev <nshmyrev@yandex.ru> -// Copyright (C) 2006 Scott Turner <scotty1024@mac.com> -// Copyright (C) 2006-2011, 2015 Carlos Garcia Campos <carlosgc@gnome.org> -// Copyright (C) 2007 Julien Rebetez <julienr@svn.gnome.org> -// Copyright (C) 2008 Iñigo Martínez <inigomartinez@gmail.com> -// Copyright (C) 2008 Brad Hards <bradh@kde.org> -// Copyright (C) 2008 Ilya Gorenbein <igorenbein@finjan.com> -// Copyright (C) 2012, 2013 Fabio D'Urso <fabiodurso@hotmail.it> -// Copyright (C) 2013, 2014 Thomas Freitag <Thomas.Freitag@alfa.de> -// Copyright (C) 2013 Jason Crain <jason@aquaticape.us> -// Copyright (C) 2013, 2017 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2015 Philipp Reinkemeier <philipp.reinkemeier@offis.de> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include <config.h> - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include <stddef.h> -#include <limits.h> -#include "GlobalParams.h" -#include "Object.h" -#include "Array.h" -#include "Dict.h" -#include "PDFDoc.h" -#include "XRef.h" -#include "Link.h" -#include "OutputDev.h" -#include "Gfx.h" -#include "GfxState.h" -#include "Annot.h" -#include "TextOutputDev.h" -#include "Form.h" -#include "Error.h" -#include "Page.h" -#include "Catalog.h" -#include "Form.h" - -#ifdef MULTITHREADED -# define pageLocker() MutexLocker locker(&mutex) -#else -# define pageLocker() -#endif -//------------------------------------------------------------------------ -// PDFRectangle -//------------------------------------------------------------------------ - -void PDFRectangle::clipTo(PDFRectangle *rect) { - if (x1 < rect->x1) { - x1 = rect->x1; - } else if (x1 > rect->x2) { - x1 = rect->x2; - } - if (x2 < rect->x1) { - x2 = rect->x1; - } else if (x2 > rect->x2) { - x2 = rect->x2; - } - if (y1 < rect->y1) { - y1 = rect->y1; - } else if (y1 > rect->y2) { - y1 = rect->y2; - } - if (y2 < rect->y1) { - y2 = rect->y1; - } else if (y2 > rect->y2) { - y2 = rect->y2; - } -} - -//------------------------------------------------------------------------ -// PageAttrs -//------------------------------------------------------------------------ - -PageAttrs::PageAttrs(PageAttrs *attrs, Dict *dict) { - Object obj1; - PDFRectangle mBox; - const GBool isPage = dict->is("Page"); - - // get old/default values - if (attrs) { - mediaBox = attrs->mediaBox; - cropBox = attrs->cropBox; - haveCropBox = attrs->haveCropBox; - rotate = attrs->rotate; - resources = attrs->resources.copy(); - } else { - // set default MediaBox to 8.5" x 11" -- this shouldn't be necessary - // but some (non-compliant) PDF files don't specify a MediaBox - mediaBox.x1 = 0; - mediaBox.y1 = 0; - mediaBox.x2 = 612; - mediaBox.y2 = 792; - cropBox.x1 = cropBox.y1 = cropBox.x2 = cropBox.y2 = 0; - haveCropBox = gFalse; - rotate = 0; - resources.setToNull(); - } - - // media box - if (readBox(dict, "MediaBox", &mBox)) { - mediaBox = mBox; - } - - // crop box - if (readBox(dict, "CropBox", &cropBox)) { - haveCropBox = gTrue; - } - if (!haveCropBox) { - cropBox = mediaBox; - } - - if (isPage) { - // cropBox can not be bigger than mediaBox - if (cropBox.x2 - cropBox.x1 > mediaBox.x2 - mediaBox.x1) - { - cropBox.x1 = mediaBox.x1; - cropBox.x2 = mediaBox.x2; - } - if (cropBox.y2 - cropBox.y1 > mediaBox.y2 - mediaBox.y1) - { - cropBox.y1 = mediaBox.y1; - cropBox.y2 = mediaBox.y2; - } - } - - // other boxes - bleedBox = cropBox; - readBox(dict, "BleedBox", &bleedBox); - trimBox = cropBox; - readBox(dict, "TrimBox", &trimBox); - artBox = cropBox; - readBox(dict, "ArtBox", &artBox); - - // rotate - obj1 = dict->lookup("Rotate"); - if (obj1.isInt()) { - rotate = obj1.getInt(); - } - while (rotate < 0) { - rotate += 360; - } - while (rotate >= 360) { - rotate -= 360; - } - - // misc attributes - lastModified = dict->lookup("LastModified"); - boxColorInfo = dict->lookup("BoxColorInfo"); - group = dict->lookup("Group"); - metadata = dict->lookup("Metadata"); - pieceInfo = dict->lookup("PieceInfo"); - separationInfo = dict->lookup("SeparationInfo"); - - // resource dictionary - obj1 = dict->lookup("Resources"); - if (obj1.isDict()) { - resources = obj1.copy(); - } -} - -PageAttrs::~PageAttrs() { -} - -void PageAttrs::clipBoxes() { - cropBox.clipTo(&mediaBox); - bleedBox.clipTo(&mediaBox); - trimBox.clipTo(&mediaBox); - artBox.clipTo(&mediaBox); -} - -GBool PageAttrs::readBox(Dict *dict, const char *key, PDFRectangle *box) { - PDFRectangle tmp; - double t; - Object obj1, obj2; - GBool ok; - - obj1 = dict->lookup(key); - if (obj1.isArray() && obj1.arrayGetLength() == 4) { - ok = gTrue; - obj2 = obj1.arrayGet(0); - if (obj2.isNum()) { - tmp.x1 = obj2.getNum(); - } else { - ok = gFalse; - } - obj2 = obj1.arrayGet(1); - if (obj2.isNum()) { - tmp.y1 = obj2.getNum(); - } else { - ok = gFalse; - } - obj2 = obj1.arrayGet(2); - if (obj2.isNum()) { - tmp.x2 = obj2.getNum(); - } else { - ok = gFalse; - } - obj2 = obj1.arrayGet(3); - if (obj2.isNum()) { - tmp.y2 = obj2.getNum(); - } else { - ok = gFalse; - } - if (tmp.x1 == 0 && tmp.x2 == 0 && tmp.y1 == 0 && tmp.y2 == 0) - ok = gFalse; - if (ok) { - if (tmp.x1 > tmp.x2) { - t = tmp.x1; tmp.x1 = tmp.x2; tmp.x2 = t; - } - if (tmp.y1 > tmp.y2) { - t = tmp.y1; tmp.y1 = tmp.y2; tmp.y2 = t; - } - *box = tmp; - } - } else { - ok = gFalse; - } - return ok; -} - -//------------------------------------------------------------------------ -// Page -//------------------------------------------------------------------------ - -Page::Page(PDFDoc *docA, int numA, Object *pageDict, Ref pageRefA, PageAttrs *attrsA, Form *form) { -#ifdef MULTITHREADED - gInitMutex(&mutex); -#endif - ok = gTrue; - doc = docA; - xref = doc->getXRef(); - num = numA; - duration = -1; - annots = nullptr; - - pageObj = pageDict->copy(); - pageRef = pageRefA; - - // get attributes - attrs = attrsA; - attrs->clipBoxes(); - - // transtion - trans = pageDict->dictLookupNF("Trans"); - if (!(trans.isRef() || trans.isDict() || trans.isNull())) { - error(errSyntaxError, -1, "Page transition object (page {0:d}) is wrong type ({1:s})", - num, trans.getTypeName()); - trans = Object(); - } - - // duration - Object tmp = pageDict->dictLookupNF("Dur"); - if (!(tmp.isNum() || tmp.isNull())) { - error(errSyntaxError, -1, "Page duration object (page {0:d}) is wrong type ({1:s})", - num, tmp.getTypeName()); - } else if (tmp.isNum()) { - duration = tmp.getNum(); - } - - // annotations - annotsObj = pageDict->dictLookupNF("Annots"); - if (!(annotsObj.isRef() || annotsObj.isArray() || annotsObj.isNull())) { - error(errSyntaxError, -1, "Page annotations object (page {0:d}) is wrong type ({1:s})", - num, annotsObj.getTypeName()); - goto err2; - } - - // contents - contents = pageDict->dictLookupNF("Contents"); - if (!(contents.isRef() || contents.isArray() || - contents.isNull())) { - error(errSyntaxError, -1, "Page contents object (page {0:d}) is wrong type ({1:s})", - num, contents.getTypeName()); - goto err1; - } - - // thumb - thumb = pageDict->dictLookupNF("Thumb"); - if (!(thumb.isStream() || thumb.isNull() || thumb.isRef())) { - error(errSyntaxError, -1, "Page thumb object (page {0:d}) is wrong type ({1:s})", - num, thumb.getTypeName()); - thumb.setToNull(); - } - - // actions - actions = pageDict->dictLookupNF("AA"); - if (!(actions.isDict() || actions.isNull())) { - error(errSyntaxError, -1, "Page additional action object (page {0:d}) is wrong type ({1:s})", - num, actions.getTypeName()); - actions.setToNull(); - } - - return; - - err2: - annotsObj.setToNull(); - err1: - contents.setToNull(); - ok = gFalse; -} - -Page::~Page() { - delete attrs; - delete annots; -#ifdef MULTITHREADED - gDestroyMutex(&mutex); -#endif -} - -Dict *Page::getResourceDict() { - return attrs->getResourceDict(); -} - -Object *Page::getResourceDictObject() -{ - return attrs->getResourceDictObject(); -} - -Dict *Page::getResourceDictCopy(XRef *xrefA) { - pageLocker(); - Dict *dict = attrs->getResourceDict(); - return dict ? dict->copy(xrefA) : nullptr; -} - -void Page::replaceXRef(XRef *xrefA) { - Object obj1; - Dict *pageDict = pageObj.getDict()->copy(xrefA); - xref = xrefA; - trans = pageDict->lookupNF("Trans"); - annotsObj = pageDict->lookupNF("Annots"); - contents = pageDict->lookupNF("Contents"); - if (contents.isArray()) { - obj1 = pageDict->lookupNF("Contents"); - contents = obj1.getArray()->copy(xrefA); - } - thumb = pageDict->lookupNF("Thumb"); - actions = pageDict->lookupNF("AA"); - obj1 = pageDict->lookup("Resources"); - if (obj1.isDict()) { - attrs->replaceResource(std::move(obj1)); - } - delete pageDict; -} - -Annots *Page::getAnnots(XRef *xrefA) { - if (!annots) { - Object obj = getAnnotsObject(xrefA); - annots = new Annots(doc, num, &obj); - } - - return annots; -} - -void Page::addAnnot(Annot *annot) { - Ref annotRef = annot->getRef (); - - // Make sure we have annots before adding the new one - // even if it's an empty list so that we can safely - // call annots->appendAnnot(annot) - pageLocker(); - getAnnots(); - - if (annotsObj.isNull()) { - Ref annotsRef; - // page doesn't have annots array, - // we have to create it - - Object obj1 = Object(new Array(xref)); - obj1.arrayAdd(Object(annotRef.num, annotRef.gen)); - - annotsRef = xref->addIndirectObject (&obj1); - annotsObj = Object(annotsRef.num, annotsRef.gen); - pageObj.dictSet ("Annots", Object(annotsRef.num, annotsRef.gen)); - xref->setModifiedObject (&pageObj, pageRef); - } else { - Object obj1 = getAnnotsObject(); - if (obj1.isArray()) { - obj1.arrayAdd (Object(annotRef.num, annotRef.gen)); - if (annotsObj.isRef()) - xref->setModifiedObject (&obj1, annotsObj.getRef()); - else - xref->setModifiedObject (&pageObj, pageRef); - } - } - - // Popup annots are already handled by markup annots, - // so add to the list only Popup annots without a - // markup annotation associated. - if (annot->getType() != Annot::typePopup || - static_cast<AnnotPopup*>(annot)->getParentNF()->isNull()) { - annots->appendAnnot(annot); - } - annot->setPage(num, gTrue); - - AnnotMarkup *annotMarkup = dynamic_cast<AnnotMarkup*>(annot); - if (annotMarkup) { - AnnotPopup *annotPopup = annotMarkup->getPopup(); - if (annotPopup) - addAnnot(annotPopup); - } -} - -void Page::removeAnnot(Annot *annot) { - Ref annotRef = annot->getRef(); - - pageLocker(); - Object annArray = getAnnotsObject(); - if (annArray.isArray()) { - int idx = -1; - // Get annotation position - for (int i = 0; idx == -1 && i < annArray.arrayGetLength(); ++i) { - Object tmp = annArray.arrayGetNF(i); - if (tmp.isRef()) { - Ref currAnnot = tmp.getRef(); - if (currAnnot.num == annotRef.num && currAnnot.gen == annotRef.gen) { - idx = i; - } - } - } - - if (idx == -1) { - error(errInternal, -1, "Annotation doesn't belong to this page"); - return; - } - annots->removeAnnot(annot); // Gracefully fails on popup windows - annArray.arrayRemove(idx); - xref->removeIndirectObject(annotRef); - - if (annotsObj.isRef()) { - xref->setModifiedObject (&annArray, annotsObj.getRef()); - } else { - xref->setModifiedObject (&pageObj, pageRef); - } - } - annot->removeReferencedObjects(); // Note: Might recurse in removeAnnot again - annot->setPage(0, gFalse); -} - -Links *Page::getLinks() { - return new Links(getAnnots()); -} - -FormPageWidgets *Page::getFormWidgets() { - return new FormPageWidgets(getAnnots(), num, doc->getCatalog()->getForm()); -} - -void Page::display(OutputDev *out, double hDPI, double vDPI, - int rotate, GBool useMediaBox, GBool crop, - GBool printing, - GBool (*abortCheckCbk)(void *data), - void *abortCheckCbkData, - GBool (*annotDisplayDecideCbk)(Annot *annot, void *user_data), - void *annotDisplayDecideCbkData, - GBool copyXRef) { - displaySlice(out, hDPI, vDPI, rotate, useMediaBox, crop, -1, -1, -1, -1, printing, - abortCheckCbk, abortCheckCbkData, - annotDisplayDecideCbk, annotDisplayDecideCbkData, copyXRef); -} - -Gfx *Page::createGfx(OutputDev *out, double hDPI, double vDPI, - int rotate, GBool useMediaBox, GBool crop, - int sliceX, int sliceY, int sliceW, int sliceH, - GBool printing, - GBool (*abortCheckCbk)(void *data), - void *abortCheckCbkData, XRef *xrefA) { - PDFRectangle *mediaBox, *cropBox; - PDFRectangle box; - Gfx *gfx; - - rotate += getRotate(); - if (rotate >= 360) { - rotate -= 360; - } else if (rotate < 0) { - rotate += 360; - } - - makeBox(hDPI, vDPI, rotate, useMediaBox, out->upsideDown(), - sliceX, sliceY, sliceW, sliceH, &box, &crop); - cropBox = getCropBox(); - mediaBox = getMediaBox(); - - if (globalParams->getPrintCommands()) { - printf("***** MediaBox = ll:%g,%g ur:%g,%g\n", - mediaBox->x1, mediaBox->y1, mediaBox->x2, mediaBox->y2); - printf("***** CropBox = ll:%g,%g ur:%g,%g\n", - cropBox->x1, cropBox->y1, cropBox->x2, cropBox->y2); - printf("***** Rotate = %d\n", attrs->getRotate()); - } - - if (!crop) { - crop = (box == *cropBox) && out->needClipToCropBox(); - } - gfx = new Gfx(doc, out, num, attrs->getResourceDict(), - hDPI, vDPI, &box, crop ? cropBox : (PDFRectangle *)nullptr, - rotate, abortCheckCbk, abortCheckCbkData, xrefA); - - return gfx; -} - -void Page::displaySlice(OutputDev *out, double hDPI, double vDPI, - int rotate, GBool useMediaBox, GBool crop, - int sliceX, int sliceY, int sliceW, int sliceH, - GBool printing, - GBool (*abortCheckCbk)(void *data), - void *abortCheckCbkData, - GBool (*annotDisplayDecideCbk)(Annot *annot, void *user_data), - void *annotDisplayDecideCbkData, - GBool copyXRef) { - Gfx *gfx; - Annots *annotList; - int i; - - if (!out->checkPageSlice(this, hDPI, vDPI, rotate, useMediaBox, crop, - sliceX, sliceY, sliceW, sliceH, - printing, - abortCheckCbk, abortCheckCbkData, - annotDisplayDecideCbk, annotDisplayDecideCbkData)) { - return; - } - pageLocker(); - XRef *localXRef = (copyXRef) ? xref->copy() : xref; - if (copyXRef) { - replaceXRef(localXRef); - } - - gfx = createGfx(out, hDPI, vDPI, rotate, useMediaBox, crop, - sliceX, sliceY, sliceW, sliceH, - printing, - abortCheckCbk, abortCheckCbkData, localXRef); - - Object obj = contents.fetch(localXRef); - if (!obj.isNull()) { - gfx->saveState(); - gfx->display(&obj); - gfx->restoreState(); - } else { - // empty pages need to call dump to do any setup required by the - // OutputDev - out->dump(); - } - - // draw annotations - annotList = getAnnots(); - - if (annotList->getNumAnnots() > 0) { - if (globalParams->getPrintCommands()) { - printf("***** Annotations\n"); - } - for (i = 0; i < annotList->getNumAnnots(); ++i) { - Annot *annot = annotList->getAnnot(i); - if ((annotDisplayDecideCbk && - (*annotDisplayDecideCbk)(annot, annotDisplayDecideCbkData)) || - !annotDisplayDecideCbk) { - annotList->getAnnot(i)->draw(gfx, printing); - } - } - out->dump(); - } - - delete gfx; - if (copyXRef) { - replaceXRef(doc->getXRef()); - delete localXRef; - } -} - -void Page::display(Gfx *gfx) { - Object obj = contents.fetch(xref); - if (!obj.isNull()) { - gfx->saveState(); - gfx->display(&obj); - gfx->restoreState(); - } -} - -GBool Page::loadThumb(unsigned char **data_out, - int *width_out, int *height_out, - int *rowstride_out) -{ - unsigned int pixbufdatasize; - int width, height, bits; - Object obj1; - Dict *dict; - GfxColorSpace *colorSpace; - GBool success = gFalse; - Stream *str; - GfxImageColorMap *colorMap; - - /* Get stream dict */ - pageLocker(); - Object fetched_thumb = thumb.fetch(xref); - if (!fetched_thumb.isStream()) { - return gFalse; - } - - dict = fetched_thumb.streamGetDict(); - str = fetched_thumb.getStream(); - - if (!dict->lookupInt("Width", "W", &width)) - goto fail1; - if (!dict->lookupInt("Height", "H", &height)) - goto fail1; - if (!dict->lookupInt("BitsPerComponent", "BPC", &bits)) - goto fail1; - - /* Check for invalid dimensions and integer overflow. */ - if (width <= 0 || height <= 0) - goto fail1; - if (width > INT_MAX / 3 / height) - goto fail1; - pixbufdatasize = width * height * 3; - - /* Get color space */ - obj1 = dict->lookup ("ColorSpace"); - if (obj1.isNull ()) { - obj1 = dict->lookup ("CS"); - } - colorSpace = GfxColorSpace::parse(nullptr, &obj1, nullptr, nullptr); - if (!colorSpace) { - fprintf (stderr, "Error: Cannot parse color space\n"); - goto fail1; - } - - obj1 = dict->lookup("Decode"); - if (obj1.isNull()) { - obj1 = dict->lookup("D"); - } - colorMap = new GfxImageColorMap(bits, &obj1, colorSpace); - if (!colorMap->isOk()) { - fprintf (stderr, "Error: invalid colormap\n"); - delete colorMap; - goto fail1; - } - - if (data_out) { - unsigned char *pixbufdata = (unsigned char *) gmalloc(pixbufdatasize); - unsigned char *p = pixbufdata; - ImageStream *imgstr = new ImageStream(str, width, - colorMap->getNumPixelComps(), - colorMap->getBits()); - imgstr->reset(); - for (int row = 0; row < height; ++row) { - for (int col = 0; col < width; ++col) { - Guchar pix[gfxColorMaxComps]; - GfxRGB rgb; - - imgstr->getPixel(pix); - colorMap->getRGB(pix, &rgb); - - *p++ = colToByte(rgb.r); - *p++ = colToByte(rgb.g); - *p++ = colToByte(rgb.b); - } - } - *data_out = pixbufdata; - imgstr->close(); - delete imgstr; - } - - success = gTrue; - - if (width_out) - *width_out = width; - if (height_out) - *height_out = height; - if (rowstride_out) - *rowstride_out = width * 3; - - delete colorMap; - fail1: - return success; -} - -void Page::makeBox(double hDPI, double vDPI, int rotate, - GBool useMediaBox, GBool upsideDown, - double sliceX, double sliceY, double sliceW, double sliceH, - PDFRectangle *box, GBool *crop) { - PDFRectangle *mediaBox, *cropBox, *baseBox; - double kx, ky; - - mediaBox = getMediaBox(); - cropBox = getCropBox(); - if (sliceW >= 0 && sliceH >= 0) { - baseBox = useMediaBox ? mediaBox : cropBox; - kx = 72.0 / hDPI; - ky = 72.0 / vDPI; - if (rotate == 90) { - if (upsideDown) { - box->x1 = baseBox->x1 + ky * sliceY; - box->x2 = baseBox->x1 + ky * (sliceY + sliceH); - } else { - box->x1 = baseBox->x2 - ky * (sliceY + sliceH); - box->x2 = baseBox->x2 - ky * sliceY; - } - box->y1 = baseBox->y1 + kx * sliceX; - box->y2 = baseBox->y1 + kx * (sliceX + sliceW); - } else if (rotate == 180) { - box->x1 = baseBox->x2 - kx * (sliceX + sliceW); - box->x2 = baseBox->x2 - kx * sliceX; - if (upsideDown) { - box->y1 = baseBox->y1 + ky * sliceY; - box->y2 = baseBox->y1 + ky * (sliceY + sliceH); - } else { - box->y1 = baseBox->y2 - ky * (sliceY + sliceH); - box->y2 = baseBox->y2 - ky * sliceY; - } - } else if (rotate == 270) { - if (upsideDown) { - box->x1 = baseBox->x2 - ky * (sliceY + sliceH); - box->x2 = baseBox->x2 - ky * sliceY; - } else { - box->x1 = baseBox->x1 + ky * sliceY; - box->x2 = baseBox->x1 + ky * (sliceY + sliceH); - } - box->y1 = baseBox->y2 - kx * (sliceX + sliceW); - box->y2 = baseBox->y2 - kx * sliceX; - } else { - box->x1 = baseBox->x1 + kx * sliceX; - box->x2 = baseBox->x1 + kx * (sliceX + sliceW); - if (upsideDown) { - box->y1 = baseBox->y2 - ky * (sliceY + sliceH); - box->y2 = baseBox->y2 - ky * sliceY; - } else { - box->y1 = baseBox->y1 + ky * sliceY; - box->y2 = baseBox->y1 + ky * (sliceY + sliceH); - } - } - } else if (useMediaBox) { - *box = *mediaBox; - } else { - *box = *cropBox; - *crop = gFalse; - } -} - -void Page::processLinks(OutputDev *out) { - Links *links; - int i; - - links = getLinks(); - for (i = 0; i < links->getNumLinks(); ++i) { - out->processLink(links->getLink(i)); - } - delete links; -} - -void Page::getDefaultCTM(double *ctm, double hDPI, double vDPI, - int rotate, GBool useMediaBox, GBool upsideDown) { - GfxState *state; - int i; - rotate += getRotate(); - if (rotate >= 360) { - rotate -= 360; - } else if (rotate < 0) { - rotate += 360; - } - state = new GfxState(hDPI, vDPI, - useMediaBox ? getMediaBox() : getCropBox(), - rotate, upsideDown); - for (i = 0; i < 6; ++i) { - ctm[i] = state->getCTM()[i]; - } - delete state; -} - -LinkAction* Page::getAdditionalAction(PageAdditionalActionsType type) { - LinkAction *linkAction = nullptr; - Object additionalActionsObject = actions.fetch(doc->getXRef()); - if (additionalActionsObject.isDict()) { - const char *key = (type == actionOpenPage ? "O" : - type == actionClosePage ? "C" : nullptr); - - Object actionObject = additionalActionsObject.dictLookup(key); - if (actionObject.isDict()) - linkAction = LinkAction::parseAction(&actionObject, doc->getCatalog()->getBaseURI()); - } - - return linkAction; -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/Page.h b/Build/source/libs/poppler/poppler-src/poppler/Page.h deleted file mode 100644 index 7151ee5b25c..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/Page.h +++ /dev/null @@ -1,293 +0,0 @@ -//======================================================================== -// -// Page.h -// -// Copyright 1996-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2005 Kristian Høgsberg <krh@redhat.com> -// Copyright (C) 2005 Jeff Muizelaar <jeff@infidigm.net> -// Copyright (C) 2006 Pino Toscano <pino@kde.org> -// Copyright (C) 2006, 2011 Carlos Garcia Campos <carlosgc@gnome.org> -// Copyright (C) 2007 Julien Rebetez <julienr@svn.gnome.org> -// Copyright (C) 2008 Iñigo Martínez <inigomartinez@gmail.com> -// Copyright (C) 2012 Fabio D'Urso <fabiodurso@hotmail.it> -// Copyright (C) 2012, 2017, 2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2013 Thomas Freitag <Thomas.Freitag@alfa.de> -// Copyright (C) 2013, 2017 Adrian Johnson <ajohnson@redneon.com> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef PAGE_H -#define PAGE_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "poppler-config.h" -#include "Object.h" -#include "goo/GooMutex.h" - -class Dict; -class PDFDoc; -class XRef; -class OutputDev; -class Links; -class LinkAction; -class Annots; -class Annot; -class Gfx; -class FormPageWidgets; -class Form; - -//------------------------------------------------------------------------ - -class PDFRectangle { -public: - double x1, y1, x2, y2; - - PDFRectangle() { x1 = y1 = x2 = y2 = 0; } - PDFRectangle(double x1A, double y1A, double x2A, double y2A) - { x1 = x1A; y1 = y1A; x2 = x2A; y2 = y2A; } - GBool isValid() { return x1 != 0 || y1 != 0 || x2 != 0 || y2 != 0; } - GBool contains(double x, double y) { return x1 <= x && x <= x2 && y1 <= y && y <= y2; } - void clipTo(PDFRectangle *rect); - - bool operator==(const PDFRectangle &rect) const { return x1 == rect.x1 && y1 == rect.y1 && x2 == rect.x2 && y2 == rect.y2; } -}; - -//------------------------------------------------------------------------ -// PageAttrs -//------------------------------------------------------------------------ - -class PageAttrs { -public: - - // Construct a new PageAttrs object by merging a dictionary - // (of type Pages or Page) into another PageAttrs object. If - // <attrs> is NULL, uses defaults. - PageAttrs(PageAttrs *attrs, Dict *dict); - - // Destructor. - ~PageAttrs(); - - // Accessors. - PDFRectangle *getMediaBox() { return &mediaBox; } - PDFRectangle *getCropBox() { return &cropBox; } - GBool isCropped() { return haveCropBox; } - PDFRectangle *getBleedBox() { return &bleedBox; } - PDFRectangle *getTrimBox() { return &trimBox; } - PDFRectangle *getArtBox() { return &artBox; } - int getRotate() { return rotate; } - const GooString *getLastModified() const - { return lastModified.isString() - ? lastModified.getString() : nullptr; } - Dict *getBoxColorInfo() - { return boxColorInfo.isDict() ? boxColorInfo.getDict() : (Dict *)NULL; } - Dict *getGroup() - { return group.isDict() ? group.getDict() : (Dict *)NULL; } - Stream *getMetadata() - { return metadata.isStream() ? metadata.getStream() : (Stream *)NULL; } - Dict *getPieceInfo() - { return pieceInfo.isDict() ? pieceInfo.getDict() : (Dict *)NULL; } - Dict *getSeparationInfo() - { return separationInfo.isDict() - ? separationInfo.getDict() : (Dict *)NULL; } - Dict *getResourceDict() - { return resources.isDict() ? resources.getDict() : (Dict *)NULL; } - Object *getResourceDictObject() - { return &resources; } - void replaceResource(Object &&obj1) - { resources = std::move(obj1); } - - // Clip all other boxes to the MediaBox. - void clipBoxes(); - -private: - - GBool readBox(Dict *dict, const char *key, PDFRectangle *box); - - PDFRectangle mediaBox; - PDFRectangle cropBox; - GBool haveCropBox; - PDFRectangle bleedBox; - PDFRectangle trimBox; - PDFRectangle artBox; - int rotate; - Object lastModified; - Object boxColorInfo; - Object group; - Object metadata; - Object pieceInfo; - Object separationInfo; - Object resources; -}; - -//------------------------------------------------------------------------ -// Page -//------------------------------------------------------------------------ - -class Page { -public: - - // Constructor. - Page(PDFDoc *docA, int numA, Object *pageDict, Ref pageRefA, PageAttrs *attrsA, Form *form); - - // Destructor. - ~Page(); - - Page(const Page &) = delete; - Page& operator=(const Page &) = delete; - - // Is page valid? - GBool isOk() { return ok; } - - // Get page parameters. - int getNum() { return num; } - PDFRectangle *getMediaBox() { return attrs->getMediaBox(); } - PDFRectangle *getCropBox() { return attrs->getCropBox(); } - GBool isCropped() { return attrs->isCropped(); } - double getMediaWidth() - { return attrs->getMediaBox()->x2 - attrs->getMediaBox()->x1; } - double getMediaHeight() - { return attrs->getMediaBox()->y2 - attrs->getMediaBox()->y1; } - double getCropWidth() - { return attrs->getCropBox()->x2 - attrs->getCropBox()->x1; } - double getCropHeight() - { return attrs->getCropBox()->y2 - attrs->getCropBox()->y1; } - PDFRectangle *getBleedBox() { return attrs->getBleedBox(); } - PDFRectangle *getTrimBox() { return attrs->getTrimBox(); } - PDFRectangle *getArtBox() { return attrs->getArtBox(); } - int getRotate() { return attrs->getRotate(); } - const GooString *getLastModified() const { return attrs->getLastModified(); } - Dict *getBoxColorInfo() { return attrs->getBoxColorInfo(); } - Dict *getGroup() { return attrs->getGroup(); } - Stream *getMetadata() { return attrs->getMetadata(); } - Dict *getPieceInfo() { return attrs->getPieceInfo(); } - Dict *getSeparationInfo() { return attrs->getSeparationInfo(); } - PDFDoc *getDoc() { return doc; } - Ref getRef() { return pageRef; } - - // Get resource dictionary. - Dict *getResourceDict(); - Object *getResourceDictObject(); - Dict *getResourceDictCopy(XRef *xrefA); - - // Get annotations array. - Object getAnnotsObject(XRef *xrefA = nullptr) { return annotsObj.fetch(xrefA ? xrefA : xref); } - // Add a new annotation to the page - void addAnnot(Annot *annot); - // Remove an existing annotation from the page - void removeAnnot(Annot *annot); - - // Return a list of links. - Links *getLinks(); - - // Return a list of annots. It will be valid until the page is destroyed - Annots *getAnnots(XRef *xrefA = NULL); - - // Get contents. - Object getContents() { return contents.fetch(xref); } - - // Get thumb. - Object getThumb() { return thumb.fetch(xref); } - GBool loadThumb(unsigned char **data, int *width, int *height, int *rowstride); - - // Get transition. - Object getTrans() { return trans.fetch(xref); } - - // Get form. - FormPageWidgets *getFormWidgets(); - - // Get duration, the maximum length of time, in seconds, - // that the page is displayed before the presentation automatically - // advances to the next page - double getDuration() { return duration; } - - // Get actions - Object getActions() { return actions.fetch(xref); } - - enum PageAdditionalActionsType { - actionOpenPage, ///< Performed when opening the page - actionClosePage, ///< Performed when closing the page - }; - - LinkAction *getAdditionalAction(PageAdditionalActionsType type); - - Gfx *createGfx(OutputDev *out, double hDPI, double vDPI, - int rotate, GBool useMediaBox, GBool crop, - int sliceX, int sliceY, int sliceW, int sliceH, - GBool printing, - GBool (*abortCheckCbk)(void *data), - void *abortCheckCbkData, XRef *xrefA = NULL); - - // Display a page. - void display(OutputDev *out, double hDPI, double vDPI, - int rotate, GBool useMediaBox, GBool crop, - GBool printing, - GBool (*abortCheckCbk)(void *data) = NULL, - void *abortCheckCbkData = NULL, - GBool (*annotDisplayDecideCbk)(Annot *annot, void *user_data) = NULL, - void *annotDisplayDecideCbkData = NULL, - GBool copyXRef = gFalse); - - // Display part of a page. - void displaySlice(OutputDev *out, double hDPI, double vDPI, - int rotate, GBool useMediaBox, GBool crop, - int sliceX, int sliceY, int sliceW, int sliceH, - GBool printing, - GBool (*abortCheckCbk)(void *data) = NULL, - void *abortCheckCbkData = NULL, - GBool (*annotDisplayDecideCbk)(Annot *annot, void *user_data) = NULL, - void *annotDisplayDecideCbkData = NULL, - GBool copyXRef = gFalse); - - void display(Gfx *gfx); - - void makeBox(double hDPI, double vDPI, int rotate, - GBool useMediaBox, GBool upsideDown, - double sliceX, double sliceY, double sliceW, double sliceH, - PDFRectangle *box, GBool *crop); - - void processLinks(OutputDev *out); - - // Get the page's default CTM. - void getDefaultCTM(double *ctm, double hDPI, double vDPI, - int rotate, GBool useMediaBox, GBool upsideDown); - -private: - // replace xref - void replaceXRef(XRef *xrefA); - - PDFDoc *doc; - XRef *xref; // the xref table for this PDF file - Object pageObj; // page dictionary - Ref pageRef; // page reference - int num; // page number - PageAttrs *attrs; // page attributes - Annots *annots; // annotations - Object annotsObj; // annotations array - Object contents; // page contents - Object thumb; // page thumbnail - Object trans; // page transition - Object actions; // page additional actions - double duration; // page duration - GBool ok; // true if page is valid -#ifdef MULTITHREADED - GooMutex mutex; -#endif -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/PageLabelInfo.cc b/Build/source/libs/poppler/poppler-src/poppler/PageLabelInfo.cc deleted file mode 100644 index 57232f72f6c..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/PageLabelInfo.cc +++ /dev/null @@ -1,220 +0,0 @@ -//======================================================================== -// -// This file is under the GPLv2 or later license -// -// Copyright (C) 2005-2006 Kristian Høgsberg <krh@redhat.com> -// Copyright (C) 2005, 2009, 2013, 2017 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2011 Simon Kellner <kellner@kit.edu> -// Copyright (C) 2012 Fabio D'Urso <fabiodurso@hotmail.it> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include <config.h> -#include <limits.h> -#include <stdlib.h> -#include <stdio.h> -#include <assert.h> - -#include "PageLabelInfo.h" -#include "PageLabelInfo_p.h" - -PageLabelInfo::Interval::Interval(Object *dict, int baseA) { - style = None; - Object obj = dict->dictLookup("S"); - if (obj.isName()) { - if (obj.isName("D")) { - style = Arabic; - } else if (obj.isName("R")) { - style = UppercaseRoman; - } else if (obj.isName("r")) { - style = LowercaseRoman; - } else if (obj.isName("A")) { - style = UppercaseLatin; - } else if (obj.isName("a")) { - style = LowercaseLatin; - } - } - - obj = dict->dictLookup("P"); - if (obj.isString()) - prefix = obj.getString()->copy(); - else - prefix = new GooString(""); - - obj = dict->dictLookup("St"); - if (obj.isInt()) - first = obj.getInt(); - else - first = 1; - - base = baseA; -} - -PageLabelInfo::Interval::~Interval() { - delete prefix; -} - -PageLabelInfo::PageLabelInfo(Object *tree, int numPages) { - int i; - Interval *interval, *next; - - parse(tree); - - for (i = 0; i < intervals.getLength(); i++) { - interval = (Interval *) intervals.get(i); - - if (i + 1 < intervals.getLength()) { - next = (Interval *) intervals.get(i + 1); - interval->length = next->base - interval->base; - } else { - interval->length = numPages - interval->base; - } - if (interval->length < 0) interval->length = 0; - } -} - -PageLabelInfo::~PageLabelInfo() { - int i; - for (i = 0; i < intervals.getLength(); ++i) { - delete (Interval*)intervals.get(i); - } -} - -void PageLabelInfo::parse(Object *tree) { - // leaf node - Object nums = tree->dictLookup("Nums"); - if (nums.isArray()) { - for (int i = 0; i < nums.arrayGetLength(); i += 2) { - Object obj = nums.arrayGet(i); - if (!obj.isInt()) { - continue; - } - int base = obj.getInt(); - obj = nums.arrayGet(i + 1); - if (!obj.isDict()) { - continue; - } - - intervals.append(new Interval(&obj, base)); - } - } - - Object kids = tree->dictLookup("Kids"); - if (kids.isArray()) { - for (int i = 0; i < kids.arrayGetLength(); ++i) { - Object kid = kids.arrayGet(i); - if (kid.isDict()) - parse(&kid); - } - } -} - -GBool PageLabelInfo::labelToIndex(GooString *label, int *index) -{ - Interval *interval; - char *str = label->getCString(), *end; - int prefixLength; - int i, number; - - for (i = 0; i < intervals.getLength(); i++) { - interval = (Interval *) intervals.get(i); - const int base = interval->base; - prefixLength = interval->prefix->getLength(); - if (label->cmpN(interval->prefix, prefixLength) != 0) - continue; - - switch (interval->style) { - case Interval::Arabic: - number = strtol(str + prefixLength, &end, 10); - if (*end == '\0' && number - interval->first < interval->length) { - *index = base + number - interval->first; - return gTrue; - } - break; - case Interval::LowercaseRoman: - case Interval::UppercaseRoman: - number = fromRoman(str + prefixLength); - if (number >= 0 && number - interval->first < interval->length) { - *index = base + number - interval->first; - return gTrue; - } - break; - case Interval::UppercaseLatin: - case Interval::LowercaseLatin: - number = fromLatin(str + prefixLength); - if (number >= 0 && number - interval->first < interval->length) { - *index = base + number - interval->first; - return gTrue; - } - break; - case Interval::None: - break; - } - } - - return gFalse; -} - -GBool PageLabelInfo::indexToLabel(int index, GooString *label) -{ - char buffer[32]; - int i, base, number; - Interval *interval; - GooString number_string; - - base = 0; - interval = nullptr; - for (i = 0; i < intervals.getLength(); i++) { - interval = (Interval *) intervals.get(i); - if (base <= index && index < base + interval->length) - break; - base += interval->length; - } - - if (i == intervals.getLength()) - return gFalse; - - number = index - base + interval->first; - switch (interval->style) { - case Interval::Arabic: - snprintf (buffer, sizeof(buffer), "%d", number); - number_string.append(buffer); - break; - case Interval::LowercaseRoman: - toRoman(number, &number_string, gFalse); - break; - case Interval::UppercaseRoman: - toRoman(number, &number_string, gTrue); - break; - case Interval::LowercaseLatin: - toLatin(number, &number_string, gFalse); - break; - case Interval::UppercaseLatin: - toLatin(number, &number_string, gTrue); - break; - case Interval::None: - break; - } - - label->clear(); - label->append(interval->prefix); - if (label->hasUnicodeMarker()) { - int i, len; - char ucs2_char[2]; - - /* Convert the ascii number string to ucs2 and append. */ - len = number_string.getLength (); - ucs2_char[0] = 0; - for (i = 0; i < len; ++i) { - ucs2_char[1] = number_string.getChar(i); - label->append(ucs2_char, 2); - } - } else { - label->append(&number_string); - } - - return gTrue; -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/PageLabelInfo.h b/Build/source/libs/poppler/poppler-src/poppler/PageLabelInfo.h deleted file mode 100644 index 60b2ea9457d..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/PageLabelInfo.h +++ /dev/null @@ -1,55 +0,0 @@ -//======================================================================== -// -// This file is under the GPLv2 or later license -// -// Copyright (C) 2005-2006 Kristian Høgsberg <krh@redhat.com> -// Copyright (C) 2005, 2018 Albert Astals Cid <aacid@kde.org> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include <limits.h> -#include <stdlib.h> -#include <stdio.h> -#include <ctype.h> -#include <assert.h> - -#include "goo/gtypes.h" -#include "goo/GooList.h" -#include "goo/GooString.h" -#include "Object.h" - -class PageLabelInfo { -public: - PageLabelInfo(Object *tree, int numPages); - ~PageLabelInfo(); - PageLabelInfo(const PageLabelInfo &) = delete; - PageLabelInfo& operator=(const PageLabelInfo &) = delete; - GBool labelToIndex(GooString *label, int *index); - GBool indexToLabel(int index, GooString *label); - -private: - void parse(Object *tree); - -private: - struct Interval { - Interval(Object *dict, int baseA); - ~Interval(); - Interval(const Interval &) = delete; - Interval& operator=(const Interval &) = delete; - GooString *prefix; - enum NumberStyle { - None, - Arabic, - LowercaseRoman, - UppercaseRoman, - UppercaseLatin, - LowercaseLatin - } style; - int first, base, length; - }; - - GooList intervals; -}; diff --git a/Build/source/libs/poppler/poppler-src/poppler/PageLabelInfo_p.h b/Build/source/libs/poppler/poppler-src/poppler/PageLabelInfo_p.h deleted file mode 100644 index 34823cc6ba4..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/PageLabelInfo_p.h +++ /dev/null @@ -1,153 +0,0 @@ -//======================================================================== -// -// This file is under the GPLv2 or later license -// -// Copyright (C) 2005-2006 Kristian Høgsberg <krh@redhat.com> -// Copyright (C) 2005, 2009, 2014 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2011 Simon Kellner <kellner@kit.edu> -// Copyright (C) 2012 Fabio D'Urso <fabiodurso@hotmail.it> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -/* http://mathworld.wolfram.com/RomanNumerals.html */ - -#include "goo/GooString.h" -#include "Error.h" - -static int fromRoman(const char *buffer) { - int digit_value, prev_digit_value, value; - int i; - - prev_digit_value = INT_MAX; - value = 0; - for (i = 0; buffer[i] != '\0'; i++) { - switch (buffer[i]) { - case 'm': - case 'M': - digit_value = 1000; - break; - case 'd': - case 'D': - digit_value = 500; - break; - case 'c': - case 'C': - digit_value = 100; - break; - case 'l': - case 'L': - digit_value = 50; - break; - case 'x': - case 'X': - digit_value = 10; - break; - case 'v': - case 'V': - digit_value = 5; - break; - case 'i': - case 'I': - digit_value = 1; - break; - default: - return -1; - } - - if (digit_value <= prev_digit_value) - value += digit_value; - else - value += digit_value - prev_digit_value * 2; - prev_digit_value = digit_value; - } - - return value; -} - -static void toRoman(int number, GooString *str, GBool uppercase) { - static const char uppercaseNumerals[] = "IVXLCDM"; - static const char lowercaseNumerals[] = "ivxlcdm"; - int divisor; - int i, j, k; - const char *wh; - - if (number >= 4000) { - error(errUnimplemented, -1, "Conversion to roman numerals of numbers >= 4000 not implemented"); - return; - } - - if (uppercase) - wh = uppercaseNumerals; - else - wh = lowercaseNumerals; - - divisor = 1000; - for (k = 3; k >= 0; k--) { - i = number / divisor; - number = number % divisor; - - switch (i) { - case 0: - break; - case 5: - str->append(wh[2 * k + 1]); - break; - case 9: - str->append(wh[2 * k + 0]); - str->append(wh[ 2 * k + 2]); - break; - case 4: - str->append(wh[2 * k + 0]); - str->append(wh[2 * k + 1]); - break; - default: - if (i > 5) { - str->append(wh[2 * k + 1]); - i -= 5; - } - for (j = 0; j < i; j++) { - str->append(wh[2 * k + 0]); - } - } - - divisor = divisor / 10; - } -} - -static int fromLatin(const char *buffer) -{ - int count; - const char *p; - - for (p = buffer; *p; p++) { - if (*p != buffer[0]) - return -1; - } - - count = p - buffer; - if (buffer[0] >= 'a' && buffer[0] <= 'z') - return 26 * (count - 1) + buffer[0] - 'a' + 1; - if (buffer[0] >= 'A' && buffer[0] <= 'Z') - return 26 * (count - 1) + buffer[0] - 'A' + 1; - - return -1; -} - -static void toLatin(int number, GooString *str, GBool uppercase) { - char base, letter; - int i, count; - - if (uppercase) - base = 'A'; - else - base = 'a'; - - count = (number - 1) / 26 + 1; - letter = base + (number - 1) % 26; - - for (i = 0; i < count; i++) - str->append(letter); -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/PageTransition.cc b/Build/source/libs/poppler/poppler-src/poppler/PageTransition.cc deleted file mode 100644 index 07a2c65a5f0..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/PageTransition.cc +++ /dev/null @@ -1,139 +0,0 @@ -/* PageTransition.cc - * Copyright (C) 2005, Net Integration Technologies, Inc. - * Copyright (C) 2010, 2017, Albert Astals Cid <aacid@kde.org> - * Copyright (C) 2013 Adrian Johnson <ajohnson@redneon.com> - * Copyright (C) 2015, Arseniy Lartsev <arseniy@alumni.chalmers.se> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include "PageTransition.h" - -//------------------------------------------------------------------------ -// PageTransition -//------------------------------------------------------------------------ - -PageTransition::PageTransition (Object *trans) { - Object obj; - Dict *dict; - - type = transitionReplace; - duration = 1; - alignment = transitionHorizontal; - direction = transitionInward; - angle = 0; - scale = 1.0; - rectangular = gFalse; - ok = gTrue; - - if (!trans || !trans->isDict ()) { - ok = gFalse; - return; - } - - dict = trans->getDict(); - - // get type - obj = dict->lookup("S"); - if (obj.isName()) { - const char *s = obj.getName(); - - if (strcmp("R", s) == 0) - type = transitionReplace; - else if (strcmp("Split", s) == 0) - type = transitionSplit; - else if (strcmp("Blinds", s) == 0) - type = transitionBlinds; - else if (strcmp("Box", s) == 0) - type = transitionBox; - else if (strcmp("Wipe", s) == 0) - type = transitionWipe; - else if (strcmp("Dissolve", s) == 0) - type = transitionDissolve; - else if (strcmp("Glitter", s) == 0) - type = transitionGlitter; - else if (strcmp("Fly", s) == 0) - type = transitionFly; - else if (strcmp("Push", s) == 0) - type = transitionPush; - else if (strcmp("Cover", s) == 0) - type = transitionCover; - else if (strcmp("Uncover", s) == 0) - type = transitionUncover; - else if (strcmp("Fade", s) == 0) - type = transitionFade; - } - - // get duration - obj = dict->lookup("D"); - if (obj.isNum()) { - duration = obj.getNum(); - } - - // get alignment - obj = dict->lookup("Dm"); - if (obj.isName()) { - const char *dm = obj.getName(); - - if (strcmp("H", dm) == 0) - alignment = transitionHorizontal; - else if (strcmp("V", dm) == 0) - alignment = transitionVertical; - } - - // get direction - obj = dict->lookup("M"); - if (obj.isName()) { - const char *m = obj.getName(); - - if (strcmp("I", m) == 0) - direction = transitionInward; - else if (strcmp("O", m) == 0) - direction = transitionOutward; - } - - // get angle - obj = dict->lookup("Di"); - if (obj.isInt()) { - angle = obj.getInt(); - } - - obj = dict->lookup("Di"); - if (obj.isName()) { - if (strcmp("None", obj.getName()) == 0) - angle = 0; - } - - // get scale - obj = dict->lookup("SS"); - if (obj.isNum()) { - scale = obj.getNum(); - } - - // get rectangular - obj = dict->lookup("B"); - if (obj.isBool()) { - rectangular = obj.getBool(); - } -} - -PageTransition::~PageTransition() -{ -} - diff --git a/Build/source/libs/poppler/poppler-src/poppler/PageTransition.h b/Build/source/libs/poppler/poppler-src/poppler/PageTransition.h deleted file mode 100644 index 82f080f418c..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/PageTransition.h +++ /dev/null @@ -1,105 +0,0 @@ -/* PageTransition.cc - * Copyright (C) 2005, Net Integration Technologies, Inc. - * Copyright (C) 2015, Arseniy Lartsev <arseniy@alumni.chalmers.se> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#ifndef PAGE_TRANSITION_H -#define PAGE_TRANSITION_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "Object.h" - -//------------------------------------------------------------------------ -// PageTransition -//------------------------------------------------------------------------ - -// if changed remember to keep in sync with frontend enums -enum PageTransitionType { - transitionReplace = 0, - transitionSplit, - transitionBlinds, - transitionBox, - transitionWipe, - transitionDissolve, - transitionGlitter, - transitionFly, - transitionPush, - transitionCover, - transitionUncover, - transitionFade -}; - -// if changed remember to keep in sync with frontend enums -enum PageTransitionAlignment { - transitionHorizontal = 0, - transitionVertical -}; - -// if changed remember to keep in sync with frontend enums -enum PageTransitionDirection { - transitionInward = 0, - transitionOutward -}; - -class PageTransition { -public: - // Construct a Page Transition. - PageTransition (Object *trans); - - // Destructor. - ~PageTransition (); - - // Was the Page Transition created successfully? - GBool isOk() { return ok; } - - // Get type - PageTransitionType getType() { return type; } - - // Get duration - double getDuration() { return duration; } - - // Get alignment - PageTransitionAlignment getAlignment() { return alignment; } - - // Get direction - PageTransitionDirection getDirection() { return direction; } - - // Get angle - int getAngle() { return angle; } - - // Get scale - double getScale() { return scale; } - - // Is rectangular? - GBool isRectangular() { return rectangular; } - -private: - - PageTransitionType type; // transition style - double duration; // duration of the effect in seconds - PageTransitionAlignment alignment; // dimension of the effect - PageTransitionDirection direction; // direction of motion - int angle; // direction in degrees - double scale; // scale - GBool rectangular; // is the area to be flown in rectangular? - GBool ok; // set if created successfully -}; - -#endif /* PAGE_TRANSITION_H */ diff --git a/Build/source/libs/poppler/poppler-src/poppler/Parser.cc b/Build/source/libs/poppler/poppler-src/poppler/Parser.cc deleted file mode 100644 index 8b0093e3fcf..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/Parser.cc +++ /dev/null @@ -1,331 +0,0 @@ -//======================================================================== -// -// Parser.cc -// -// Copyright 1996-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2006, 2009, 201, 2010, 2013, 2014, 2017, 2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2006 Krzysztof Kowalczyk <kkowalczyk@gmail.com> -// Copyright (C) 2009 Ilya Gorenbein <igorenbein@finjan.com> -// Copyright (C) 2012 Hib Eris <hib@hiberis.nl> -// Copyright (C) 2013 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2013 Thomas Freitag <Thomas.Freitag@alfa.de> -// 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 -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include <config.h> - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include <stddef.h> -#include "Object.h" -#include "Array.h" -#include "Dict.h" -#include "Decrypt.h" -#include "Parser.h" -#include "XRef.h" -#include "Error.h" - -// Max number of nested objects. This is used to catch infinite loops -// in the object structure. And also technically valid files with -// lots of nested arrays that made us consume all the stack -#define recursionLimit 500 - -Parser::Parser(XRef *xrefA, Lexer *lexerA, GBool allowStreamsA) { - xref = xrefA; - lexer = lexerA; - inlineImg = 0; - allowStreams = allowStreamsA; - buf1 = lexer->getObj(); - buf2 = lexer->getObj(); -} - -Parser::~Parser() { - delete lexer; -} - -Object Parser::getObj(int recursion) -{ - return getObj(gFalse, nullptr, cryptRC4, 0, 0, 0, recursion); -} - -Object Parser::getObj(GBool simpleOnly, - Guchar *fileKey, - CryptAlgorithm encAlgorithm, int keyLength, - int objNum, int objGen, int recursion, - GBool strict) { - Object obj; - Stream *str; - DecryptStream *decrypt; - const GooString *s; - GooString *s2; - int c; - - // refill buffer after inline image data - if (inlineImg == 2) { - buf1 = lexer->getObj(); - buf2 = lexer->getObj(); - inlineImg = 0; - } - - if (unlikely(recursion >= recursionLimit)) { - return Object(objError); - } - - // array - if (!simpleOnly && buf1.isCmd("[")) { - shift(); - obj = Object(new Array(xref)); - while (!buf1.isCmd("]") && !buf1.isEOF() && recursion + 1 < recursionLimit) { - Object obj2 = getObj(gFalse, fileKey, encAlgorithm, keyLength, objNum, objGen, recursion + 1); - obj.arrayAdd(std::move(obj2)); - } - if (recursion + 1 >= recursionLimit && strict) goto err; - if (buf1.isEOF()) { - error(errSyntaxError, getPos(), "End of file inside array"); - if (strict) goto err; - } - shift(); - - // dictionary or stream - } else if (!simpleOnly && buf1.isCmd("<<")) { - shift(objNum); - obj = Object(new Dict(xref)); - while (!buf1.isCmd(">>") && !buf1.isEOF()) { - if (!buf1.isName()) { - error(errSyntaxError, getPos(), "Dictionary key must be a name object"); - if (strict) goto err; - shift(); - } else { - // buf1 might go away in shift(), so construct the key - char *key = copyString(buf1.getName()); - shift(); - if (buf1.isEOF() || buf1.isError()) { - gfree(key); - if (strict && buf1.isError()) goto err; - break; - } - Object obj2 = getObj(gFalse, fileKey, encAlgorithm, keyLength, objNum, objGen, recursion + 1); - if (unlikely(obj2.isError() && recursion + 1 >= recursionLimit)) { - gfree(key); - break; - } - obj.dictAdd(key, std::move(obj2)); - } - } - if (buf1.isEOF()) { - error(errSyntaxError, getPos(), "End of file inside dictionary"); - if (strict) goto err; - } - // stream objects are not allowed inside content streams or - // object streams - if (buf2.isCmd("stream")) { - if (allowStreams && (str = makeStream(std::move(obj), fileKey, encAlgorithm, keyLength, - objNum, objGen, recursion + 1, - strict))) { - return Object(str); - } else { - return Object(objError); - } - } else { - shift(); - } - - // indirect reference or integer - } else if (buf1.isInt()) { - const int num = buf1.getInt(); - shift(); - if (buf1.isInt() && buf2.isCmd("R")) { - const int gen = buf1.getInt(); - shift(); - shift(); - - if (unlikely(num <= 0 || gen < 0)) { - return Object(); - } - - return Object(num, gen); - } else { - return Object(num); - } - - // string - } else if (buf1.isString() && fileKey) { - s = buf1.getString(); - s2 = new GooString(); - decrypt = new DecryptStream(new MemStream(s->getCString(), 0, s->getLength(), Object(objNull)), - fileKey, encAlgorithm, keyLength, - objNum, objGen); - decrypt->reset(); - while ((c = decrypt->getChar()) != EOF) { - s2->append((char)c); - } - delete decrypt; - obj = Object(s2); - shift(); - - // simple object - } else { - // avoid re-allocating memory for complex objects like strings by - // shallow copy of <buf1> to <obj> and nulling <buf1> so that - // subsequent buf1.free() won't free this memory - obj = std::move(buf1); - shift(); - } - - return obj; - -err: - return Object(objError); -} - -Stream *Parser::makeStream(Object &&dict, Guchar *fileKey, - CryptAlgorithm encAlgorithm, int keyLength, - int objNum, int objGen, int recursion, - GBool strict) { - BaseStream *baseStr; - Stream *str; - Goffset length; - Goffset pos, endPos; - - // get stream start position - lexer->skipToNextLine(); - if (!(str = lexer->getStream())) { - return nullptr; - } - pos = str->getPos(); - - // get length - Object obj = dict.dictLookup("Length", recursion); - if (obj.isInt()) { - length = obj.getInt(); - } else if (obj.isInt64()) { - length = obj.getInt64(); - } else { - error(errSyntaxError, getPos(), "Bad 'Length' attribute in stream"); - if (strict) return nullptr; - length = 0; - } - - // check for length in damaged file - if (xref && xref->getStreamEnd(pos, &endPos)) { - length = endPos - pos; - } - - // in badly damaged PDF files, we can run off the end of the input - // stream immediately after the "stream" token - if (!lexer->getStream()) { - return nullptr; - } - baseStr = lexer->getStream()->getBaseStream(); - - // skip over stream data - if (Lexer::LOOK_VALUE_NOT_CACHED != lexer->lookCharLastValueCached) { - // take into account the fact that we've cached one value - pos = pos - 1; - lexer->lookCharLastValueCached = Lexer::LOOK_VALUE_NOT_CACHED; - } - if (unlikely(length < 0)) { - return nullptr; - } - if (unlikely(pos > LLONG_MAX - length)) { - return nullptr; - } - lexer->setPos(pos + length); - - // refill token buffers and check for 'endstream' - shift(); // kill '>>' - shift("endstream", objNum); // kill 'stream' - if (buf1.isCmd("endstream")) { - shift(); - } else { - error(errSyntaxError, getPos(), "Missing 'endstream' or incorrect stream length"); - if (strict) return nullptr; - if (xref && lexer->getStream()) { - // shift until we find the proper endstream or we change to another object or reach eof - length = lexer->getPos() - pos; - if (buf1.isCmd("endstream")) { - dict.dictSet("Length", Object(length)); - } - } else { - // When building the xref we can't use it so use this - // kludge for broken PDF files: just add 5k to the length, and - // hope its enough - if (length < LLONG_MAX - 5000) - length += 5000; - } - } - - // make base stream - str = baseStr->makeSubStream(pos, gTrue, length, std::move(dict)); - - // handle decryption - if (fileKey) { - str = new DecryptStream(str, fileKey, encAlgorithm, keyLength, - objNum, objGen); - } - - // get filters - str = str->addFilters(str->getDict(), recursion); - - return str; -} - -void Parser::shift(int objNum) { - if (inlineImg > 0) { - if (inlineImg < 2) { - ++inlineImg; - } else { - // in a damaged content stream, if 'ID' shows up in the middle - // of a dictionary, we need to reset - inlineImg = 0; - } - } else if (buf2.isCmd("ID")) { - lexer->skipChar(); // skip char after 'ID' command - inlineImg = 1; - } - buf1 = std::move(buf2); - if (inlineImg > 0) // don't buffer inline image data - buf2.setToNull(); - else { - buf2 = lexer->getObj(objNum); - } -} - -void Parser::shift(const char *cmdA, int objNum) { - if (inlineImg > 0) { - if (inlineImg < 2) { - ++inlineImg; - } else { - // in a damaged content stream, if 'ID' shows up in the middle - // of a dictionary, we need to reset - inlineImg = 0; - } - } else if (buf2.isCmd("ID")) { - lexer->skipChar(); // skip char after 'ID' command - inlineImg = 1; - } - buf1 = std::move(buf2); - if (inlineImg > 0) { - buf2.setToNull(); - } else if (buf1.isCmd(cmdA)) { - buf2 = lexer->getObj(objNum); - } else { - buf2 = lexer->getObj(cmdA, objNum); - } -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/Parser.h b/Build/source/libs/poppler/poppler-src/poppler/Parser.h deleted file mode 100644 index c85effc41d4..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/Parser.h +++ /dev/null @@ -1,86 +0,0 @@ -//======================================================================== -// -// Parser.h -// -// Copyright 1996-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2006, 2010, 2013, 2017, 2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2012 Hib Eris <hib@hiberis.nl> -// Copyright (C) 2013 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2013 Thomas Freitag <Thomas.Freitag@alfa.de> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef PARSER_H -#define PARSER_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "Lexer.h" - -//------------------------------------------------------------------------ -// Parser -//------------------------------------------------------------------------ - -class Parser { -public: - - // Constructor. - Parser(XRef *xrefA, Lexer *lexerA, GBool allowStreamsA); - - // Destructor. - ~Parser(); - - Parser(const Parser &) = delete; - Parser& operator=(const Parser &) = delete; - - // Get the next object from the input stream. If <simpleOnly> is - // true, do not parse compound objects (arrays, dictionaries, or - // streams). - Object getObj(GBool simpleOnly = gFalse, - Guchar *fileKey = NULL, - CryptAlgorithm encAlgorithm = cryptRC4, int keyLength = 0, - int objNum = 0, int objGen = 0, int recursion = 0, - GBool strict = gFalse); - - Object getObj(int recursion); - template<typename T> Object getObj(T) = delete; - - // Get stream. - Stream *getStream() { return lexer->getStream(); } - - // Get current position in file. - Goffset getPos() { return lexer->getPos(); } - -private: - - XRef *xref; // the xref table for this PDF file - Lexer *lexer; // input stream - GBool allowStreams; // parse stream objects? - Object buf1, buf2; // next two tokens - int inlineImg; // set when inline image data is encountered - - Stream *makeStream(Object &&dict, Guchar *fileKey, - CryptAlgorithm encAlgorithm, int keyLength, - int objNum, int objGen, int recursion, - GBool strict); - void shift(int objNum = -1); - void shift(const char *cmdA, int objNum); -}; - -#endif - diff --git a/Build/source/libs/poppler/poppler-src/poppler/PopplerCache.cc b/Build/source/libs/poppler/poppler-src/poppler/PopplerCache.cc deleted file mode 100644 index 5832d437951..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/PopplerCache.cc +++ /dev/null @@ -1,156 +0,0 @@ -//======================================================================== -// -// PopplerCache.h -// -// This file is licensed under the GPLv2 or later -// -// Copyright (C) 2009 Koji Otani <sho@bbr.jp> -// Copyright (C) 2009, 2010, 2017 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2010 Carlos Garcia Campos <carlosgc@gnome.org> -// -//======================================================================== - -#include "PopplerCache.h" - -#include "XRef.h" - -PopplerCacheKey::~PopplerCacheKey() -{ -} - -PopplerCacheItem::~PopplerCacheItem() -{ -} - -PopplerCache::PopplerCache(int cacheSizeA) -{ - cacheSize = cacheSizeA; - keys = new PopplerCacheKey*[cacheSize]; - items = new PopplerCacheItem*[cacheSize]; - lastValidCacheIndex = -1; -} - -PopplerCache::~PopplerCache() -{ - for (int i = 0; i <= lastValidCacheIndex; ++i) { - delete keys[i]; - delete items[i]; - } - delete[] keys; - delete[] items; -} - -PopplerCacheItem *PopplerCache::lookup(const PopplerCacheKey &key) -{ - if (lastValidCacheIndex < 0) - return nullptr; - - if (*keys[0] == key) { - return items[0]; - } - for (int i = 1; i <= lastValidCacheIndex; i++) { - if (*keys[i] == key) { - PopplerCacheKey *keyHit = keys[i]; - PopplerCacheItem *itemHit = items[i]; - - for (int j = i; j > 0; j--) { - keys[j] = keys[j - 1]; - items[j] = items[j - 1]; - } - - keys[0] = keyHit; - items[0] = itemHit; - return itemHit; - } - } - return nullptr; -} - -void PopplerCache::put(PopplerCacheKey *key, PopplerCacheItem *item) -{ - int movingStartIndex = lastValidCacheIndex + 1; - if (lastValidCacheIndex == cacheSize - 1) { - delete keys[lastValidCacheIndex]; - delete items[lastValidCacheIndex]; - movingStartIndex = cacheSize - 1; - } else { - lastValidCacheIndex++; - } - for (int i = movingStartIndex; i > 0; i--) { - keys[i] = keys[i - 1]; - items[i] = items[i - 1]; - } - keys[0] = key; - items[0] = item; -} - -int PopplerCache::size() -{ - return cacheSize; -} - -int PopplerCache::numberOfItems() -{ - return lastValidCacheIndex + 1; -} - -PopplerCacheItem *PopplerCache::item(int index) -{ - return items[index]; -} - -PopplerCacheKey *PopplerCache::key(int index) -{ - return keys[index]; -} - -class ObjectKey : public PopplerCacheKey { - public: - ObjectKey(int numA, int genA) : num(numA), gen(genA) - { - } - - bool operator==(const PopplerCacheKey &key) const override - { - const ObjectKey *k = static_cast<const ObjectKey*>(&key); - return k->num == num && k->gen == gen; - } - - int num, gen; -}; - -class ObjectItem : public PopplerCacheItem { - public: - ObjectItem(Object &&obj) - { - item = std::move(obj); - } - - Object item; -}; - -PopplerObjectCache::PopplerObjectCache(int cacheSize, XRef *xrefA) { - cache = new PopplerCache (cacheSize); - xref = xrefA; -} - -PopplerObjectCache::~PopplerObjectCache() { - delete cache; -} - -Object *PopplerObjectCache::put(const Ref &ref) { - Object obj = xref->fetch(ref.num, ref.gen); - - ObjectKey *key = new ObjectKey(ref.num, ref.gen); - ObjectItem *item = new ObjectItem(std::move(obj)); - cache->put(key, item); - - return &item->item; -} - -Object PopplerObjectCache::lookup(const Ref &ref) { - ObjectKey key(ref.num, ref.gen); - ObjectItem *item = static_cast<ObjectItem *>(cache->lookup(key)); - - return item ? item->item.copy() : Object(objNull); -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/PopplerCache.h b/Build/source/libs/poppler/poppler-src/poppler/PopplerCache.h deleted file mode 100644 index ecc983ac6ca..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/PopplerCache.h +++ /dev/null @@ -1,90 +0,0 @@ -//======================================================================== -// -// PopplerCache.h -// -// This file is licensed under the GPLv2 or later -// -// Copyright (C) 2009 Koji Otani <sho@bbr.jp> -// Copyright (C) 2009, 2010, 2017, 2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2010 Carlos Garcia Campos <carlosgc@gnome.org> -// -//======================================================================== - -#ifndef POPPLER_CACHE_H -#define POPPLER_CACHE_H - -#include "Object.h" - -class PopplerCacheItem -{ - public: - PopplerCacheItem() = default; - virtual ~PopplerCacheItem(); - - PopplerCacheItem(const PopplerCacheItem &) = delete; - PopplerCacheItem& operator=(const PopplerCacheItem &other) = delete; -}; - -class PopplerCacheKey -{ - public: - PopplerCacheKey() = default; - virtual ~PopplerCacheKey(); - virtual bool operator==(const PopplerCacheKey &key) const = 0; - - PopplerCacheKey(const PopplerCacheKey &) = delete; - PopplerCacheKey& operator=(const PopplerCacheKey &other) = delete; -}; - -class PopplerCache -{ - public: - PopplerCache(int cacheSizeA); - ~PopplerCache(); - - PopplerCache(const PopplerCache &) = delete; - PopplerCache& operator=(const PopplerCache &other) = delete; - - /* The item returned is owned by the cache */ - PopplerCacheItem *lookup(const PopplerCacheKey &key); - - /* The key and item pointers ownership is taken by the cache */ - void put(PopplerCacheKey *key, PopplerCacheItem *item); - - /* The max size of the cache */ - int size(); - - /* The number of items in the cache */ - int numberOfItems(); - - /* The n-th item in the cache */ - PopplerCacheItem *item(int index); - - /* The n-th key in the cache */ - PopplerCacheKey *key(int index); - - private: - PopplerCacheKey **keys; - PopplerCacheItem **items; - int lastValidCacheIndex; - int cacheSize; -}; - -class PopplerObjectCache -{ - public: - PopplerObjectCache (int cacheSizeA, XRef *xrefA); - ~PopplerObjectCache(); - - PopplerObjectCache(const PopplerObjectCache &) = delete; - PopplerObjectCache& operator=(const PopplerObjectCache &other) = delete; - - Object *put(const Ref &ref); - Object lookup(const Ref &ref); - - private: - XRef *xref; - PopplerCache *cache; -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/PreScanOutputDev.cc b/Build/source/libs/poppler/poppler-src/poppler/PreScanOutputDev.cc deleted file mode 100644 index b2af18d86b8..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/PreScanOutputDev.cc +++ /dev/null @@ -1,369 +0,0 @@ -//======================================================================== -// -// PreScanOutputDev.cc -// -// Copyright 2005 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2009 Carlos Garcia Campos <carlosgc@gnome.org> -// Copyright (C) 2010, 2011 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2011, 2014 William Bader <williambader@hotmail.com> -// Copyright (C) 2011, 2013 Thomas Freitag <Thomas.Freitag@alfa.de> -// Copyright (C) 2011 Adrian Johnson <ajohnson@redneon.com> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include <config.h> - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include <math.h> -#include "GlobalParams.h" -#include "Gfx.h" -#include "GfxFont.h" -#include "Link.h" -#include "Catalog.h" -#include "Page.h" -#include "PreScanOutputDev.h" - -//------------------------------------------------------------------------ -// PreScanOutputDev -//------------------------------------------------------------------------ - -PreScanOutputDev::PreScanOutputDev(PDFDoc *docA) { - level = globalParams->getPSLevel(); - doc = docA; - clearStats(); -} - -PreScanOutputDev::~PreScanOutputDev() { -} - -void PreScanOutputDev::startPage(int /*pageNum*/, GfxState * /*state*/, XRef * /*xref*/) { -} - -void PreScanOutputDev::endPage() { -} - -void PreScanOutputDev::stroke(GfxState *state) { - double *dash; - int dashLen; - double dashStart; - - check(state->getStrokeColorSpace(), state->getStrokeColor(), - state->getStrokeOpacity(), state->getBlendMode()); - state->getLineDash(&dash, &dashLen, &dashStart); - if (dashLen != 0) { - gdi = gFalse; - } -} - -void PreScanOutputDev::fill(GfxState *state) { - check(state->getFillColorSpace(), state->getFillColor(), - state->getFillOpacity(), state->getBlendMode()); -} - -void PreScanOutputDev::eoFill(GfxState *state) { - check(state->getFillColorSpace(), state->getFillColor(), - state->getFillOpacity(), state->getBlendMode()); -} - -GBool PreScanOutputDev::tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *catalog, Object *str, - double *pmat, int paintType, int /*tilingType*/, Dict *resDict, - double *mat, double *bbox, - int x0, int y0, int x1, int y1, - double xStep, double yStep) { - if (paintType == 1) { - GBool tilingNeeded = (x1 - x0 != 1 || y1 - y0 != 1); - if (tilingNeeded) { - inTilingPatternFill++; - } - gfx->drawForm(str, resDict, mat, bbox); - if (tilingNeeded) { - inTilingPatternFill--; - } - } else { - check(state->getFillColorSpace(), state->getFillColor(), - state->getFillOpacity(), state->getBlendMode()); - } - return gTrue; -} - -GBool PreScanOutputDev::functionShadedFill(GfxState *state, - GfxFunctionShading *shading) { - if (shading->getColorSpace()->getMode() != csDeviceGray && - shading->getColorSpace()->getMode() != csCalGray) { - gray = gFalse; - } - mono = gFalse; - if (state->getFillOpacity() != 1 || - state->getBlendMode() != gfxBlendNormal) { - transparency = gTrue; - } - return gTrue; -} - -GBool PreScanOutputDev::axialShadedFill(GfxState *state, GfxAxialShading *shading, double /*tMin*/, double /*tMax*/) { - if (shading->getColorSpace()->getMode() != csDeviceGray && - shading->getColorSpace()->getMode() != csCalGray) { - gray = gFalse; - } - mono = gFalse; - if (state->getFillOpacity() != 1 || - state->getBlendMode() != gfxBlendNormal) { - transparency = gTrue; - } - return gTrue; -} - -GBool PreScanOutputDev::radialShadedFill(GfxState *state, GfxRadialShading *shading, double /*sMin*/, double /*sMax*/) { - if (shading->getColorSpace()->getMode() != csDeviceGray && - shading->getColorSpace()->getMode() != csCalGray) { - gray = gFalse; - } - mono = gFalse; - if (state->getFillOpacity() != 1 || - state->getBlendMode() != gfxBlendNormal) { - transparency = gTrue; - } - return gTrue; -} - -void PreScanOutputDev::clip(GfxState * /*state*/) { - //~ check for a rectangle "near" the edge of the page; - //~ else set gdi to false -} - -void PreScanOutputDev::eoClip(GfxState * /*state*/) { - //~ see clip() -} - -void PreScanOutputDev::beginStringOp(GfxState *state) { - int render; - GfxFont *font; - double m11, m12, m21, m22; - GBool simpleTTF; - - render = state->getRender(); - if (!(render & 1)) { - check(state->getFillColorSpace(), state->getFillColor(), - state->getFillOpacity(), state->getBlendMode()); - } - if ((render & 3) == 1 || (render & 3) == 2) { - check(state->getStrokeColorSpace(), state->getStrokeColor(), - state->getStrokeOpacity(), state->getBlendMode()); - } - - font = state->getFont(); - state->getFontTransMat(&m11, &m12, &m21, &m22); - //~ this should check for external fonts that are non-TrueType - simpleTTF = fabs(m11 + m22) < 0.01 && - m11 > 0 && - fabs(m12) < 0.01 && - fabs(m21) < 0.01 && - fabs(state->getHorizScaling() - 1) < 0.001 && - (font->getType() == fontTrueType || - font->getType() == fontTrueTypeOT); - if (simpleTTF) { - //~ need to create a FoFiTrueType object, and check for a Unicode cmap - } - if (state->getRender() != 0 || !simpleTTF) { - gdi = gFalse; - } -} - -void PreScanOutputDev::endStringOp(GfxState * /*state*/) { -} - -GBool PreScanOutputDev::beginType3Char(GfxState * /*state*/, double /*x*/, double /*y*/, - double /*dx*/, double /*dy*/, - CharCode /*code*/, Unicode * /*u*/, int /*uLen*/) { - // return false so all Type 3 chars get rendered (no caching) - return gFalse; -} - -void PreScanOutputDev::endType3Char(GfxState * /*state*/) { -} - -void PreScanOutputDev::drawImageMask(GfxState *state, Object * /*ref*/, Stream *str, - int width, int height, GBool /*invert*/, - GBool /*interpolate*/, GBool inlineImg) { - int i, j; - - check(state->getFillColorSpace(), state->getFillColor(), - state->getFillOpacity(), state->getBlendMode()); - gdi = gFalse; - if ((level == psLevel1 || level == psLevel1Sep) && - (state->getFillColorSpace()->getMode() == csPattern || inTilingPatternFill > 0)) { - patternImgMask = gTrue; - } - - if (inlineImg) { - str->reset(); - j = height * ((width + 7) / 8); - for (i = 0; i < j; ++i) - str->getChar(); - str->close(); - } -} - -void PreScanOutputDev::drawImage(GfxState *state, Object * /*ref*/, Stream *str, - int width, int height, - GfxImageColorMap *colorMap, - GBool /*interpolate*/, int * /*maskColors*/, GBool inlineImg) { - GfxColorSpace *colorSpace; - int i, j; - - colorSpace = colorMap->getColorSpace(); - if (colorSpace->getMode() == csIndexed) { - colorSpace = ((GfxIndexedColorSpace *)colorSpace)->getBase(); - } - if (colorSpace->getMode() == csDeviceGray || - colorSpace->getMode() == csCalGray) { - if (colorMap->getBits() > 1) { - mono = gFalse; - } - } else { - gray = gFalse; - mono = gFalse; - } - if (state->getFillOpacity() != 1 || - state->getBlendMode() != gfxBlendNormal) { - transparency = gTrue; - } - gdi = gFalse; - if ((level == psLevel1 || level == psLevel1Sep) && - inTilingPatternFill > 0) { - patternImgMask = gTrue; - } - - if (inlineImg) { - str->reset(); - j = height * ((width * colorMap->getNumPixelComps() * - colorMap->getBits() + 7) / 8); - for (i = 0; i < j; ++i) - str->getChar(); - str->close(); - } -} - -void PreScanOutputDev::drawMaskedImage(GfxState *state, Object * /*ref*/, - Stream * /*str*/, - int /*width*/, int /*height*/, - GfxImageColorMap *colorMap, - GBool /*interpolate*/, - Stream * /*maskStr*/, - int /*maskWidth*/, int /*maskHeight*/, - GBool /*maskInvert*/, GBool /*maskInterpolate*/) { - GfxColorSpace *colorSpace; - - colorSpace = colorMap->getColorSpace(); - if (colorSpace->getMode() == csIndexed) { - colorSpace = ((GfxIndexedColorSpace *)colorSpace)->getBase(); - } - if (colorSpace->getMode() == csDeviceGray || - colorSpace->getMode() == csCalGray) { - if (colorMap->getBits() > 1) { - mono = gFalse; - } - } else { - gray = gFalse; - mono = gFalse; - } - if (state->getFillOpacity() != 1 || - state->getBlendMode() != gfxBlendNormal) { - transparency = gTrue; - } - gdi = gFalse; -} - -void PreScanOutputDev::drawSoftMaskedImage(GfxState * /*state*/, Object * /*ref*/, - Stream * /*str*/, - int /*width*/, int /*height*/, - GfxImageColorMap *colorMap, - GBool /*interpolate*/, - Stream * /*maskStr*/, - int /*maskWidth*/, int /*maskHeight*/, - GfxImageColorMap * /*maskColorMap*/, - GBool /*maskInterpolate*/) { - GfxColorSpace *colorSpace; - - colorSpace = colorMap->getColorSpace(); - if (colorSpace->getMode() == csIndexed) { - colorSpace = ((GfxIndexedColorSpace *)colorSpace)->getBase(); - } - if (colorSpace->getMode() != csDeviceGray && - colorSpace->getMode() != csCalGray) { - gray = gFalse; - } - mono = gFalse; - transparency = gTrue; - gdi = gFalse; -} - -void PreScanOutputDev::beginTransparencyGroup( - GfxState * /*state*/, double * /*bbox*/, - GfxColorSpace * /*blendingColorSpace*/, - GBool /*isolated*/, GBool /*knockout*/, - GBool /*forSoftMask*/) { - gdi = gFalse; -} - -void PreScanOutputDev::paintTransparencyGroup(GfxState *state, double * /*bbox*/) -{ - check(state->getFillColorSpace(), state->getFillColor(), - state->getFillOpacity(), state->getBlendMode()); -} - -void PreScanOutputDev::setSoftMask(GfxState * /*state*/, double * /*bbox*/, GBool /*alpha*/, - Function * /*transferFunc*/, GfxColor * /*backdropColor*/) -{ - transparency = gTrue; -} - -void PreScanOutputDev::check(GfxColorSpace *colorSpace, GfxColor *color, - double opacity, GfxBlendMode blendMode) { - GfxRGB rgb; - - if (colorSpace->getMode() == csPattern) { - mono = gFalse; - gray = gFalse; - gdi = gFalse; - } else { - colorSpace->getRGB(color, &rgb); - if (rgb.r != rgb.g || rgb.g != rgb.b || rgb.b != rgb.r) { - mono = gFalse; - gray = gFalse; - } else if (!((rgb.r == 0 && rgb.g == 0 && rgb.b == 0) || - (rgb.r == gfxColorComp1 && - rgb.g == gfxColorComp1 && - rgb.b == gfxColorComp1))) { - mono = gFalse; - } - } - if (opacity != 1 || blendMode != gfxBlendNormal) { - transparency = gTrue; - } -} - -void PreScanOutputDev::clearStats() { - mono = gTrue; - gray = gTrue; - transparency = gFalse; - gdi = gTrue; - patternImgMask = gFalse; - inTilingPatternFill = 0; -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/PreScanOutputDev.h b/Build/source/libs/poppler/poppler-src/poppler/PreScanOutputDev.h deleted file mode 100644 index a1fd6b5026c..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/PreScanOutputDev.h +++ /dev/null @@ -1,182 +0,0 @@ -//======================================================================== -// -// PreScanOutputDev.h -// -// Copyright 2005 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2009 Carlos Garcia Campos <carlosgc@gnome.org> -// Copyright (C) 2010 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2011, 2014 William Bader <williambader@hotmail.com> -// Copyright (C) 2011, 2013 Thomas Freitag <Thomas.Freitag@alfa.de> -// Copyright (C) 2011 Adrian Johnson <ajohnson@redneon.com> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef PRESCANOUTPUTDEV_H -#define PRESCANOUTPUTDEV_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "goo/gtypes.h" -#include "Object.h" -#include "GfxState.h" -#include "GlobalParams.h" -#include "OutputDev.h" - -//------------------------------------------------------------------------ -// PreScanOutputDev -//------------------------------------------------------------------------ - -class PreScanOutputDev: public OutputDev { -public: - - // Constructor. - PreScanOutputDev(PDFDoc *docA); - - // Destructor. - ~PreScanOutputDev(); - - //----- get info about output device - - // Does this device use upside-down coordinates? - // (Upside-down means (0,0) is the top left corner of the page.) - GBool upsideDown() override { return gTrue; } - - // Does this device use drawChar() or drawString()? - GBool useDrawChar() override { return gTrue; } - - // Does this device use tilingPatternFill()? If this returns false, - // tiling pattern fills will be reduced to a series of other drawing - // operations. - GBool useTilingPatternFill() override { return gTrue; } - - // Does this device use functionShadedFill(), axialShadedFill(), and - // radialShadedFill()? If this returns false, these shaded fills - // will be reduced to a series of other drawing operations. - GBool useShadedFills(int type) override { return gTrue; } - - // Does this device use beginType3Char/endType3Char? Otherwise, - // text in Type 3 fonts will be drawn with drawChar/drawString. - GBool interpretType3Chars() override { return gTrue; } - - //----- initialization and control - - // Start a page. - void startPage(int pageNum, GfxState *state, XRef *xref) override; - - // End a page. - void endPage() override; - - //----- path painting - void stroke(GfxState *state) override; - void fill(GfxState *state) override; - void eoFill(GfxState *state) override; - GBool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, Object *str, - double *pmat, int paintType, int tilingType, Dict *resDict, - double *mat, double *bbox, - int x0, int y0, int x1, int y1, - double xStep, double yStep) override; - GBool functionShadedFill(GfxState *state, - GfxFunctionShading *shading) override; - GBool axialShadedFill(GfxState *state, GfxAxialShading *shading, double tMin, double tMax) override; - GBool radialShadedFill(GfxState *state, GfxRadialShading *shading, double tMin, double tMax) override; - - //----- path clipping - void clip(GfxState *state) override; - void eoClip(GfxState *state) override; - - //----- text drawing - void beginStringOp(GfxState *state) override; - void endStringOp(GfxState *state) override; - GBool beginType3Char(GfxState *state, double x, double y, - double dx, double dy, - CharCode code, Unicode *u, int uLen) override; - void endType3Char(GfxState *state) override; - - //----- image drawing - void drawImageMask(GfxState *state, Object *ref, Stream *str, - int width, int height, GBool invert, - GBool interpolate, GBool inlineImg) override; - void drawImage(GfxState *state, Object *ref, Stream *str, - int width, int height, GfxImageColorMap *colorMap, - GBool interpolate, int *maskColors, GBool inlineImg) override; - void drawMaskedImage(GfxState *state, Object *ref, Stream *str, - int width, int height, - GfxImageColorMap *colorMap, - GBool interpolate, - Stream *maskStr, int maskWidth, int maskHeight, - GBool maskInvert, GBool maskInterpolate) override; - void drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str, - int width, int height, - GfxImageColorMap *colorMap, - GBool interpolate, - Stream *maskStr, - int maskWidth, int maskHeight, - GfxImageColorMap *maskColorMap, - GBool maskInterpolate) override; - - //----- transparency groups and soft masks - void beginTransparencyGroup(GfxState *state, double *bbox, - GfxColorSpace *blendingColorSpace, - GBool isolated, GBool knockout, - GBool forSoftMask) override; - void paintTransparencyGroup(GfxState *state, double *bbox) override; - void setSoftMask(GfxState *state, double *bbox, GBool alpha, - Function *transferFunc, GfxColor *backdropColor) override; - - //----- special access - - // Returns true if the operations performed since the last call to - // clearStats() are all monochrome (black or white). - GBool isMonochrome() { return mono; } - - // Returns true if the operations performed since the last call to - // clearStats() are all gray. - GBool isGray() { return gray; } - - // Returns true if the operations performed since the last call to - // clearStats() included any transparency. - GBool usesTransparency() { return transparency; } - - // Returns true if the operations performed since the last call to - // clearStats() are all rasterizable by GDI calls in GDIOutputDev. - GBool isAllGDI() { return gdi; } - - // Returns true if the operations performed since the last call to - // clearStats() included any image mask fills with a pattern color - // space. (only level1!) - GBool usesPatternImageMask() { return patternImgMask; } - - // Clear the stats used by the above functions. - void clearStats(); - -private: - - void check(GfxColorSpace *colorSpace, GfxColor *color, - double opacity, GfxBlendMode blendMode); - - PDFDoc *doc; - GBool mono; - GBool gray; - GBool transparency; - GBool gdi; - PSLevel level; // PostScript level (1, 2, separation) - GBool patternImgMask; - int inTilingPatternFill; -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/ProfileData.cc b/Build/source/libs/poppler/poppler-src/poppler/ProfileData.cc deleted file mode 100644 index 9e5f2d3e3cc..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/ProfileData.cc +++ /dev/null @@ -1,36 +0,0 @@ -//======================================================================== -// -// ProfileData.cc -// -// Copyright 2005 Jonathan Blandford <jrb@gnome.org> -// Copyright 2018 Adam Reichold <adam.reichold@t-online.de> -// -//======================================================================== - -#include <config.h> - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include "ProfileData.h" - -//------------------------------------------------------------------------ -// ProfileData -//------------------------------------------------------------------------ - -void -ProfileData::addElement (double elapsed) { - if (count == 0) { - min = elapsed; - max = elapsed; - } else { - if (elapsed < min) - min = elapsed; - if (elapsed > max) - max = elapsed; - } - total += elapsed; - count ++; -} - diff --git a/Build/source/libs/poppler/poppler-src/poppler/ProfileData.h b/Build/source/libs/poppler/poppler-src/poppler/ProfileData.h deleted file mode 100644 index 664a60b0180..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/ProfileData.h +++ /dev/null @@ -1,36 +0,0 @@ -//======================================================================== -// -// ProfileData.h -// -// Copyright 2005 Jonathan Blandford <jrb@gnome.org> -// Copyright 2018 Adam Reichold <adam.reichold@t-online.de> -// -//======================================================================== - -#ifndef PROFILE_DATA_H -#define PROFILE_DATA_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -//------------------------------------------------------------------------ -// ProfileData -//------------------------------------------------------------------------ - -class ProfileData { -public: - void addElement (double elapsed); - - int getCount () const { return count; } - double getTotal () const { return total; } - double getMin () const { return max; } - double getMax () const { return max; } -private: - int count = 0; // size of <elems> array - double total = 0.0; // number of elements in array - double min = 0.0; // reference count - double max = 0.0; // reference count -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/Rendition.cc b/Build/source/libs/poppler/poppler-src/poppler/Rendition.cc deleted file mode 100644 index b74aca49316..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/Rendition.cc +++ /dev/null @@ -1,379 +0,0 @@ -//********************************************************************************* -// Rendition.cc -//--------------------------------------------------------------------------------- -// -//--------------------------------------------------------------------------------- -// Hugo Mercier <hmercier31[at]gmail.com> (c) 2008 -// Pino Toscano <pino@kde.org> (c) 2008 -// Carlos Garcia Campos <carlosgc@gnome.org> (c) 2010 -// Tobias Koenig <tobias.koenig@kdab.com> (c) 2012 -// Albert Astals Cid <aacid@kde.org> (C) 2017, 2018 -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -//********************************************************************************* - -#include <math.h> -#include "Rendition.h" -#include "FileSpec.h" - -MediaWindowParameters::MediaWindowParameters() { - // default values - type = windowEmbedded; - width = -1; - height = -1; - relativeTo = windowRelativeToDocument; - XPosition = 0.5; - YPosition = 0.5; - hasTitleBar = gTrue; - hasCloseButton = gTrue; - isResizeable = gTrue; -} - -MediaWindowParameters::~MediaWindowParameters() { -} - -void MediaWindowParameters::parseFWParams(Object* obj) { - Object tmp = obj->dictLookup("D"); - if (tmp.isArray()) { - Array * dim = tmp.getArray(); - - if (dim->getLength() >= 2) { - Object dd = dim->get(0); - if (dd.isInt()) { - width = dd.getInt(); - } - - dd = dim->get(1); - if (dd.isInt()) { - height = dd.getInt(); - } - - } - } - - tmp = obj->dictLookup("RT"); - if (tmp.isInt()) { - int t = tmp.getInt(); - switch(t) { - case 0: relativeTo = windowRelativeToDocument; break; - case 1: relativeTo = windowRelativeToApplication; break; - case 2: relativeTo = windowRelativeToDesktop; break; - } - } - - tmp = obj->dictLookup("P"); - if (tmp.isInt()) { - int t = tmp.getInt(); - - switch(t) { - case 0: // Upper left - XPosition = 0.0; - YPosition = 0.0; - break; - case 1: // Upper Center - XPosition = 0.5; - YPosition = 0.0; - break; - case 2: // Upper Right - XPosition = 1.0; - YPosition = 0.0; - break; - case 3: // Center Left - XPosition = 0.0; - YPosition = 0.5; - break; - case 4: // Center - XPosition = 0.5; - YPosition = 0.5; - break; - case 5: // Center Right - XPosition = 1.0; - YPosition = 0.5; - break; - case 6: // Lower Left - XPosition = 0.0; - YPosition = 1.0; - break; - case 7: // Lower Center - XPosition = 0.5; - YPosition = 1.0; - break; - case 8: // Lower Right - XPosition = 1.0; - YPosition = 1.0; - break; - } - } - - tmp = obj->dictLookup("T"); - if (tmp.isBool()) { - hasTitleBar = tmp.getBool(); - } - tmp = obj->dictLookup("UC"); - if (tmp.isBool()) { - hasCloseButton = tmp.getBool(); - } - tmp = obj->dictLookup("R"); - if (tmp.isInt()) { - isResizeable = (tmp.getInt() != 0); - } -} - -MediaParameters::MediaParameters() { - // instanciate to default values - - volume = 100; - fittingPolicy = fittingUndefined; - autoPlay = gTrue; - repeatCount = 1.0; - opacity = 1.0; - showControls = gFalse; - duration = 0; -} - -MediaParameters::~MediaParameters() { -} - -void MediaParameters::parseMediaPlayParameters(Object* obj) { - Object tmp = obj->dictLookup("V"); - if (tmp.isInt()) { - volume = tmp.getInt(); - } - - tmp = obj->dictLookup("C"); - if (tmp.isBool()) { - showControls = tmp.getBool(); - } - - tmp = obj->dictLookup("F"); - if (tmp.isInt()) { - int t = tmp.getInt(); - - switch(t) { - case 0: fittingPolicy = fittingMeet; break; - case 1: fittingPolicy = fittingSlice; break; - case 2: fittingPolicy = fittingFill; break; - case 3: fittingPolicy = fittingScroll; break; - case 4: fittingPolicy = fittingHidden; break; - case 5: fittingPolicy = fittingUndefined; break; - } - } - - // duration parsing - // duration's default value is set to 0, which means : intrinsinc media duration - tmp = obj->dictLookup("D"); - if (tmp.isDict()) { - Object oname = tmp.dictLookup("S"); - if (oname.isName()) { - const char* name = oname.getName(); - if (!strcmp(name, "F")) - duration = -1; // infinity - else if (!strcmp(name, "T")) { - Object ddict = tmp.dictLookup("T"); - if (ddict.isDict()) { - Object tmp2 = ddict.dictLookup("V"); - if (tmp2.isNum()) { - duration = Gulong(tmp2.getNum()); - } - } - } - } - } - - tmp = obj->dictLookup("A"); - if (tmp.isBool()) { - autoPlay = tmp.getBool(); - } - - tmp = obj->dictLookup("RC"); - if (tmp.isNum()) { - repeatCount = tmp.getNum(); - } -} - -void MediaParameters::parseMediaScreenParameters(Object* obj) { - Object tmp = obj->dictLookup("W"); - if (tmp.isInt()) { - int t = tmp.getInt(); - - switch(t) { - case 0: windowParams.type = MediaWindowParameters::windowFloating; break; - case 1: windowParams.type = MediaWindowParameters::windowFullscreen; break; - case 2: windowParams.type = MediaWindowParameters::windowHidden; break; - case 3: windowParams.type = MediaWindowParameters::windowEmbedded; break; - } - } - - // background color - tmp = obj->dictLookup("B"); - if (tmp.isArray()) { - Array* color = tmp.getArray(); - - Object component = color->get(0); - bgColor.r = component.getNum(); - - component = color->get(1); - bgColor.g = component.getNum(); - - component = color->get(2); - bgColor.b = component.getNum(); - } - - // opacity - tmp = obj->dictLookup("O"); - if (tmp.isNum()) { - opacity = tmp.getNum(); - } - - if (windowParams.type == MediaWindowParameters::windowFloating) { - Object winDict = obj->dictLookup("F"); - if (winDict.isDict()) { - windowParams.parseFWParams(&winDict); - } - } -} - -MediaRendition::~MediaRendition() { - delete fileName; - delete contentType; -} - -MediaRendition::MediaRendition(Object* obj) { - GBool hasClip = gFalse; - - ok = gTrue; - fileName = nullptr; - contentType = nullptr; - isEmbedded = gFalse; - - // - // Parse media clip data - // - Object tmp2 = obj->dictLookup("C"); - if (tmp2.isDict()) { // media clip - hasClip = gTrue; - Object tmp = tmp2.dictLookup("S"); - if (tmp.isName()) { - if (!strcmp(tmp.getName(), "MCD")) { // media clip data - Object obj1 = tmp2.dictLookup("D"); - if (obj1.isDict()) { - Object obj2 = obj1.dictLookup("F"); - if (obj2.isString()) { - fileName = obj2.getString()->copy(); - } - obj2 = obj1.dictLookup("EF"); - if (obj2.isDict()) { - Object embedded = obj2.dictLookup("F"); - if (embedded.isStream()) { - isEmbedded = gTrue; - embeddedStreamObject = embedded.copy(); - } - } - - // TODO: D might be a form XObject too - } else { - error (errSyntaxError, -1, "Invalid Media Clip Data"); - ok = gFalse; - } - - // FIXME: ignore CT if D is a form XObject - obj1 = tmp2.dictLookup("CT"); - if (obj1.isString()) { - contentType = obj1.getString()->copy(); - } - } else if (!strcmp(tmp.getName(), "MCS")) { // media clip data - // TODO - } - } else { - error (errSyntaxError, -1, "Invalid Media Clip"); - ok = gFalse; - } - } - - if (!ok) - return; - - // - // parse Media Play Parameters - tmp2 = obj->dictLookup("P"); - if (tmp2.isDict()) { // media play parameters - Object params = tmp2.dictLookup("MH"); - if (params.isDict()) { - MH.parseMediaPlayParameters(¶ms); - } - params = tmp2.dictLookup("BE"); - if (params.isDict()) { - BE.parseMediaPlayParameters(¶ms); - } - } else if (!hasClip) { - error (errSyntaxError, -1, "Invalid Media Rendition"); - ok = gFalse; - } - - // - // parse Media Screen Parameters - tmp2 = obj->dictLookup("SP"); - if (tmp2.isDict()) { // media screen parameters - Object params = tmp2.dictLookup("MH"); - if (params.isDict()) { - MH.parseMediaScreenParameters(¶ms); - } - params = tmp2.dictLookup("BE"); - if (params.isDict()) { - BE.parseMediaScreenParameters(¶ms); - } - } -} - -MediaRendition::MediaRendition(const MediaRendition &other) { - ok = other.ok; - MH = other.MH; - BE = other.BE; - isEmbedded = other.isEmbedded; - embeddedStreamObject = other.embeddedStreamObject.copy(); - - if (other.contentType) - contentType = other.contentType->copy(); - else - contentType = nullptr; - - if (other.fileName) - fileName = other.fileName->copy(); - else - fileName = nullptr; -} - -void MediaRendition::outputToFile(FILE* fp) { - if (!isEmbedded) - return; - - embeddedStreamObject.streamReset(); - - while (1) { - int c = embeddedStreamObject.streamGetChar(); - if (c == EOF) - break; - - fwrite(&c, 1, 1, fp); - } - -} - -MediaRendition* MediaRendition::copy() const -{ - return new MediaRendition(*this); -} - -// TODO: SelectorRendition diff --git a/Build/source/libs/poppler/poppler-src/poppler/Rendition.h b/Build/source/libs/poppler/poppler-src/poppler/Rendition.h deleted file mode 100644 index cfe571704ae..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/Rendition.h +++ /dev/null @@ -1,161 +0,0 @@ -//********************************************************************************* -// Rendition.h -//--------------------------------------------------------------------------------- -// -//--------------------------------------------------------------------------------- -// Hugo Mercier <hmercier31[at]gmail.com> (c) 2008 -// Carlos Garcia Campos <carlosgc@gnome.org> (c) 2010 -// Albert Astals Cid <aacid@kde.org> (C) 2017, 2018 -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -//********************************************************************************* - -#ifndef _RENDITION_H_ -#define _RENDITION_H_ - -#include "Object.h" - -struct MediaWindowParameters { - - MediaWindowParameters(); - ~MediaWindowParameters(); - - // parse from a floating window parameters dictionary - void parseFWParams(Object* obj); - - enum MediaWindowType { - windowFloating = 0, - windowFullscreen, - windowHidden, - windowEmbedded - }; - - enum MediaWindowRelativeTo { - windowRelativeToDocument = 0, - windowRelativeToApplication, - windowRelativeToDesktop - }; - - - // DEFAULT VALUE - - MediaWindowType type; // movieWindowEmbedded - - - int width; // -1 - int height; // -1 - - // floating window position - MediaWindowRelativeTo relativeTo; // windowRelativeToDocument (or to desktop) - double XPosition; // 0.5 - double YPosition; // 0.5 - - GBool hasTitleBar; // true - GBool hasCloseButton; // true - GBool isResizeable; // true -}; - - -struct MediaParameters { - - MediaParameters(); - ~MediaParameters(); - - // parse from a "Media Play Parameters" dictionary - void parseMediaPlayParameters(Object* playObj); - // parse from a "Media Screen Parameters" dictionary - void parseMediaScreenParameters(Object* screenObj); - - enum MediaFittingPolicy { - fittingMeet = 0, - fittingSlice, - fittingFill, - fittingScroll, - fittingHidden, - fittingUndefined - }; - - struct Color { - double r, g, b; - }; - - int duration; // 0 - - int volume; // 100 - - // defined in media play parameters, p 770 - // correspond to 'fit' SMIL's attribute - MediaFittingPolicy fittingPolicy; // fittingUndefined - - GBool autoPlay; // true - - // repeat count, can be real values, 0 means forever - double repeatCount; // 1.0 - - // background color // black = (0.0 0.0 0.0) - Color bgColor; - - // opacity in [0.0 1.0] - double opacity; // 1.0 - - - GBool showControls; // false - - MediaWindowParameters windowParams; -}; - -class MediaRendition { - public: - MediaRendition(Object *obj); - MediaRendition(const MediaRendition &other); - ~MediaRendition(); - MediaRendition& operator=(const MediaRendition &) = delete; - - GBool isOk () const { return ok; } - - const MediaParameters* getMHParameters() const { return &MH; } - const MediaParameters* getBEParameters() const { return &BE; } - - const GooString* getContentType() const { return contentType; } - const GooString* getFileName() const { return fileName; } - - GBool getIsEmbedded() const { return isEmbedded; } - Stream* getEmbbededStream() const { return isEmbedded ? embeddedStreamObject.getStream() : nullptr; } - const Object* getEmbbededStreamObject() const { return isEmbedded ? &embeddedStreamObject : nullptr; } - // write embedded stream to file - void outputToFile(FILE*); - - MediaRendition* copy() const; - - private: - GBool ok; - - // "Must Honor" parameters - MediaParameters MH; - // "Best Effort" parameters - MediaParameters BE; - - GBool isEmbedded; - - GooString* contentType; - - // if it's embedded - Object embeddedStreamObject; - - // if it's not embedded - GooString* fileName; -}; - -#endif /* _RENDITION_H_ */ diff --git a/Build/source/libs/poppler/poppler-src/poppler/SecurityHandler.cc b/Build/source/libs/poppler/poppler-src/poppler/SecurityHandler.cc deleted file mode 100644 index bdfd89f8650..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/SecurityHandler.cc +++ /dev/null @@ -1,439 +0,0 @@ -//======================================================================== -// -// SecurityHandler.cc -// -// Copyright 2004 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2010, 2012, 2015, 2017, 2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2013 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2014 Fabio D'Urso <fabiodurso@hotmail.it> -// Copyright (C) 2016 Alok Anand <alok4nand@gmail.com> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include <config.h> - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include "GooString.h" -#include "PDFDoc.h" -#include "Decrypt.h" -#include "Error.h" -#include "GlobalParams.h" -#ifdef ENABLE_PLUGINS -# include "XpdfPluginAPI.h" -#endif -#include "SecurityHandler.h" - -#include <limits.h> - -//------------------------------------------------------------------------ -// SecurityHandler -//------------------------------------------------------------------------ - -SecurityHandler *SecurityHandler::make(PDFDoc *docA, Object *encryptDictA) { - SecurityHandler *secHdlr; -#ifdef ENABLE_PLUGINS - XpdfSecurityHandler *xsh; -#endif - - Object filterObj = encryptDictA->dictLookup("Filter"); - if (filterObj.isName("Standard")) { - secHdlr = new StandardSecurityHandler(docA, encryptDictA); - } else if (filterObj.isName()) { -#ifdef ENABLE_PLUGINS - if ((xsh = globalParams->getSecurityHandler(filterObj.getName()))) { - secHdlr = new ExternalSecurityHandler(docA, encryptDictA, xsh); - } else { -#endif - error(errSyntaxError, -1, "Couldn't find the '{0:s}' security handler", - filterObj.getName()); - secHdlr = nullptr; -#ifdef ENABLE_PLUGINS - } -#endif - } else { - error(errSyntaxError, -1, - "Missing or invalid 'Filter' entry in encryption dictionary"); - secHdlr = nullptr; - } - return secHdlr; -} - -SecurityHandler::SecurityHandler(PDFDoc *docA) { - doc = docA; -} - -SecurityHandler::~SecurityHandler() { -} - -GBool SecurityHandler::checkEncryption(GooString *ownerPassword, - GooString *userPassword) { - void *authData; - GBool ok; - int i; - - if (ownerPassword || userPassword) { - authData = makeAuthData(ownerPassword, userPassword); - } else { - authData = nullptr; - } - ok = authorize(authData); - if (authData) { - freeAuthData(authData); - } - for (i = 0; !ok && i < 3; ++i) { - if (!(authData = getAuthData())) { - break; - } - ok = authorize(authData); - if (authData) { - freeAuthData(authData); - } - } - if (!ok) { - if (!ownerPassword && !userPassword) { - GooString dummy; - return checkEncryption(&dummy, &dummy); - } else { - error(errCommandLine, -1, "Incorrect password"); - } - } - return ok; -} - -//------------------------------------------------------------------------ -// StandardSecurityHandler -//------------------------------------------------------------------------ - -class StandardAuthData { -public: - - StandardAuthData(GooString *ownerPasswordA, GooString *userPasswordA) { - ownerPassword = ownerPasswordA; - userPassword = userPasswordA; - } - - ~StandardAuthData() { - if (ownerPassword) { - delete ownerPassword; - } - if (userPassword) { - delete userPassword; - } - } - - StandardAuthData(const StandardAuthData &) = delete; - StandardAuthData& operator=(const StandardAuthData &) = delete; - - GooString *ownerPassword; - GooString *userPassword; -}; - -StandardSecurityHandler::StandardSecurityHandler(PDFDoc *docA, - Object *encryptDictA): - SecurityHandler(docA) -{ - ok = gFalse; - fileID = nullptr; - ownerKey = nullptr; - userKey = nullptr; - ownerEnc = nullptr; - userEnc = nullptr; - fileKeyLength = 0; - - Object versionObj = encryptDictA->dictLookup("V"); - Object revisionObj = encryptDictA->dictLookup("R"); - Object lengthObj = encryptDictA->dictLookup("Length"); - Object ownerKeyObj = encryptDictA->dictLookup("O"); - Object userKeyObj = encryptDictA->dictLookup("U"); - Object ownerEncObj = encryptDictA->dictLookup("OE"); - Object userEncObj = encryptDictA->dictLookup("UE"); - Object permObj = encryptDictA->dictLookup("P"); - if (permObj.isInt64()) { - unsigned int permUint = permObj.getInt64(); - int perms = permUint - UINT_MAX - 1; - permObj = Object(perms); - } - Object fileIDObj = doc->getXRef()->getTrailerDict()->dictLookup("ID"); - if (versionObj.isInt() && - revisionObj.isInt() && - permObj.isInt() && - ownerKeyObj.isString() && - userKeyObj.isString()) { - encVersion = versionObj.getInt(); - encRevision = revisionObj.getInt(); - if ((encRevision <= 4 && - ownerKeyObj.getString()->getLength() == 32 && - userKeyObj.getString()->getLength() == 32) || - ((encRevision == 5 || encRevision == 6) && - // the spec says 48 bytes, but Acrobat pads them out longer - ownerKeyObj.getString()->getLength() >= 48 && - userKeyObj.getString()->getLength() >= 48 && - ownerEncObj.isString() && - ownerEncObj.getString()->getLength() == 32 && - userEncObj.isString() && - userEncObj.getString()->getLength() == 32)) { - encAlgorithm = cryptRC4; - // revision 2 forces a 40-bit key - some buggy PDF generators - // set the Length value incorrectly - if (encRevision == 2 || !lengthObj.isInt()) { - fileKeyLength = 5; - } else { - fileKeyLength = lengthObj.getInt() / 8; - } - encryptMetadata = gTrue; - //~ this currently only handles a subset of crypt filter functionality - //~ (in particular, it ignores the EFF entry in encryptDictA, and - //~ doesn't handle the case where StmF, StrF, and EFF are not all the - //~ same) - if ((encVersion == 4 || encVersion == 5) && - (encRevision == 4 || encRevision == 5 || encRevision == 6)) { - Object cryptFiltersObj = encryptDictA->dictLookup("CF"); - Object streamFilterObj = encryptDictA->dictLookup("StmF"); - Object stringFilterObj = encryptDictA->dictLookup("StrF"); - if (cryptFiltersObj.isDict() && - streamFilterObj.isName() && - stringFilterObj.isName() && - !strcmp(streamFilterObj.getName(), stringFilterObj.getName())) { - if (!strcmp(streamFilterObj.getName(), "Identity")) { - // no encryption on streams or strings - encVersion = encRevision = -1; - } else { - Object cryptFilterObj = cryptFiltersObj.dictLookup(streamFilterObj.getName()); - if (cryptFilterObj.isDict()) { - Object cfmObj = cryptFilterObj.dictLookup("CFM"); - if (cfmObj.isName("V2")) { - encVersion = 2; - encRevision = 3; - Object cfLengthObj = cryptFilterObj.dictLookup("Length"); - if (cfLengthObj.isInt()) { - //~ according to the spec, this should be cfLengthObj / 8 - fileKeyLength = cfLengthObj.getInt(); - } - } else if (cfmObj.isName("AESV2")) { - encVersion = 2; - encRevision = 3; - encAlgorithm = cryptAES; - Object cfLengthObj = cryptFilterObj.dictLookup("Length"); - if (cfLengthObj.isInt()) { - //~ according to the spec, this should be cfLengthObj / 8 - fileKeyLength = cfLengthObj.getInt(); - } - } else if (cfmObj.isName("AESV3")) { - encVersion = 5; - // let encRevision be 5 or 6 - encAlgorithm = cryptAES256; - Object cfLengthObj = cryptFilterObj.dictLookup("Length"); - if (cfLengthObj.isInt()) { - //~ according to the spec, this should be cfLengthObj / 8 - fileKeyLength = cfLengthObj.getInt(); - } - } - } - } - } - Object encryptMetadataObj = encryptDictA->dictLookup("EncryptMetadata"); - if (encryptMetadataObj.isBool()) { - encryptMetadata = encryptMetadataObj.getBool(); - } - } - permFlags = permObj.getInt(); - ownerKey = ownerKeyObj.getString()->copy(); - userKey = userKeyObj.getString()->copy(); - if (encVersion >= 1 && encVersion <= 2 && - encRevision >= 2 && encRevision <= 3) { - if (fileIDObj.isArray()) { - Object fileIDObj1 = fileIDObj.arrayGet(0); - if (fileIDObj1.isString()) { - fileID = fileIDObj1.getString()->copy(); - } else { - fileID = new GooString(); - } - } else { - fileID = new GooString(); - } - if (fileKeyLength > 16 || fileKeyLength < 0) { - fileKeyLength = 16; - } - ok = gTrue; - } else if (encVersion == 5 && (encRevision == 5 || encRevision == 6)) { - fileID = new GooString(); // unused for V=R=5 - if (ownerEncObj.isString() && userEncObj.isString()) { - ownerEnc = ownerEncObj.getString()->copy(); - userEnc = userEncObj.getString()->copy(); - if (fileKeyLength > 32 || fileKeyLength < 0) { - fileKeyLength = 32; - } - ok = gTrue; - } else { - error(errSyntaxError, -1, "Weird encryption owner/user info"); - } - } else if (!(encVersion == -1 && encRevision == -1)) { - error(errUnimplemented, -1, - "Unsupported version/revision ({0:d}/{1:d}) of Standard security handler", - encVersion, encRevision); - } - } else { - error(errSyntaxError, -1, "Invalid encryption key length"); - } - } else { - error(errSyntaxError, -1, "Weird encryption info"); - } -} - -StandardSecurityHandler::~StandardSecurityHandler() { - if (fileID) { - delete fileID; - } - if (ownerKey) { - delete ownerKey; - } - if (userKey) { - delete userKey; - } - if (ownerEnc) { - delete ownerEnc; - } - if (userEnc) { - delete userEnc; - } -} - -GBool StandardSecurityHandler::isUnencrypted() { - if (!ok) { - return gTrue; - } - return encVersion == -1 && encRevision == -1; -} - -void *StandardSecurityHandler::makeAuthData(GooString *ownerPassword, - GooString *userPassword) { - return new StandardAuthData(ownerPassword ? ownerPassword->copy() - : (GooString *)nullptr, - userPassword ? userPassword->copy() - : (GooString *)nullptr); -} - -void *StandardSecurityHandler::getAuthData() { - return nullptr; -} - -void StandardSecurityHandler::freeAuthData(void *authData) { - delete (StandardAuthData *)authData; -} - -GBool StandardSecurityHandler::authorize(void *authData) { - GooString *ownerPassword, *userPassword; - - if (!ok) { - return gFalse; - } - if (authData) { - ownerPassword = ((StandardAuthData *)authData)->ownerPassword; - userPassword = ((StandardAuthData *)authData)->userPassword; - } else { - ownerPassword = nullptr; - userPassword = nullptr; - } - if (!Decrypt::makeFileKey(encVersion, encRevision, fileKeyLength, - ownerKey, userKey, ownerEnc, userEnc, - permFlags, fileID, - ownerPassword, userPassword, fileKey, - encryptMetadata, &ownerPasswordOk)) { - return gFalse; - } - return gTrue; -} - -#ifdef ENABLE_PLUGINS - -//------------------------------------------------------------------------ -// ExternalSecurityHandler -//------------------------------------------------------------------------ - -ExternalSecurityHandler::ExternalSecurityHandler(PDFDoc *docA, - Object *encryptDictA, - XpdfSecurityHandler *xshA): - SecurityHandler(docA) -{ - encryptDictA->copy(&encryptDict); - xsh = xshA; - encAlgorithm = cryptRC4; //~ this should be obtained via getKey - ok = gFalse; - - if (!(*xsh->newDoc)(xsh->handlerData, (XpdfDoc)docA, - (XpdfObject)encryptDictA, &docData)) { - return; - } - - ok = gTrue; -} - -ExternalSecurityHandler::~ExternalSecurityHandler() { - (*xsh->freeDoc)(xsh->handlerData, docData); -} - -void *ExternalSecurityHandler::makeAuthData(GooString *ownerPassword, - GooString *userPassword) { - char *opw, *upw; - void *authData; - - opw = ownerPassword ? ownerPassword->getCString() : (char *)NULL; - upw = userPassword ? userPassword->getCString() : (char *)NULL; - if (!(*xsh->makeAuthData)(xsh->handlerData, docData, opw, upw, &authData)) { - return NULL; - } - return authData; -} - -void *ExternalSecurityHandler::getAuthData() { - void *authData; - - if (!(*xsh->getAuthData)(xsh->handlerData, docData, &authData)) { - return NULL; - } - return authData; -} - -void ExternalSecurityHandler::freeAuthData(void *authData) { - (*xsh->freeAuthData)(xsh->handlerData, docData, authData); -} - -GBool ExternalSecurityHandler::authorize(void *authData) { - char *key; - int length; - - if (!ok) { - return gFalse; - } - permFlags = (*xsh->authorize)(xsh->handlerData, docData, authData); - if (!(permFlags & xpdfPermissionOpen)) { - return gFalse; - } - if (!(*xsh->getKey)(xsh->handlerData, docData, &key, &length, &encVersion, &encRevision)) { - return gFalse; - } - if ((fileKeyLength = length) > 16) { - fileKeyLength = 16; - } - memcpy(fileKey, key, fileKeyLength); - (*xsh->freeKey)(xsh->handlerData, docData, key, length); - return gTrue; -} - -#endif // ENABLE_PLUGINS diff --git a/Build/source/libs/poppler/poppler-src/poppler/SecurityHandler.h b/Build/source/libs/poppler/poppler-src/poppler/SecurityHandler.h deleted file mode 100644 index cc21b2ca09e..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/SecurityHandler.h +++ /dev/null @@ -1,186 +0,0 @@ -//======================================================================== -// -// SecurityHandler.h -// -// Copyright 2004 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2012, 2018 Albert Astals Cid <aacid@kde.org> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef SECURITYHANDLER_H -#define SECURITYHANDLER_H - -#include "poppler-config.h" - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "goo/gtypes.h" -#include "Object.h" - -class GooString; -class PDFDoc; -struct XpdfSecurityHandler; - -//------------------------------------------------------------------------ -// SecurityHandler -//------------------------------------------------------------------------ - -class SecurityHandler { -public: - - static SecurityHandler *make(PDFDoc *docA, Object *encryptDictA); - - SecurityHandler(PDFDoc *docA); - virtual ~SecurityHandler(); - - SecurityHandler(const SecurityHandler &) = delete; - SecurityHandler& operator=(const SecurityHandler &) = delete; - - // Returns true if the file is actually unencrypted. - virtual GBool isUnencrypted() { return gFalse; } - - // Check the document's encryption. If the document is encrypted, - // this will first try <ownerPassword> and <userPassword> (in - // "batch" mode), and if those fail, it will attempt to request a - // password from the user. This is the high-level function that - // calls the lower level functions for the specific security handler - // (requesting a password three times, etc.). Returns true if the - // document can be opened (if it's unencrypted, or if a correct - // password is obtained); false otherwise (encrypted and no correct - // password). - GBool checkEncryption(GooString *ownerPassword, - GooString *userPassword); - - // Create authorization data for the specified owner and user - // passwords. If the security handler doesn't support "batch" mode, - // this function should return NULL. - virtual void *makeAuthData(GooString *ownerPassword, - GooString *userPassword) = 0; - - // Construct authorization data, typically by prompting the user for - // a password. Returns an authorization data object, or NULL to - // cancel. - virtual void *getAuthData() = 0; - - // Free the authorization data returned by makeAuthData or - // getAuthData. - virtual void freeAuthData(void *authData) = 0; - - // Attempt to authorize the document, using the supplied - // authorization data (which may be NULL). Returns true if - // successful (i.e., if at least the right to open the document was - // granted). - virtual GBool authorize(void *authData) = 0; - - // Return the various authorization parameters. These are only - // valid after authorize has returned true. - virtual int getPermissionFlags() = 0; - virtual GBool getOwnerPasswordOk() = 0; - virtual Guchar *getFileKey() = 0; - virtual int getFileKeyLength() = 0; - virtual int getEncVersion() = 0; - virtual int getEncRevision() = 0; - virtual CryptAlgorithm getEncAlgorithm() = 0; - -protected: - - PDFDoc *doc; -}; - -//------------------------------------------------------------------------ -// StandardSecurityHandler -//------------------------------------------------------------------------ - -class StandardSecurityHandler: public SecurityHandler { -public: - - StandardSecurityHandler(PDFDoc *docA, Object *encryptDictA); - ~StandardSecurityHandler(); - - GBool isUnencrypted() override; - void *makeAuthData(GooString *ownerPassword, - GooString *userPassword) override; - void *getAuthData() override; - void freeAuthData(void *authData) override; - GBool authorize(void *authData) override; - int getPermissionFlags() override { return permFlags; } - GBool getOwnerPasswordOk() override { return ownerPasswordOk; } - Guchar *getFileKey() override { return fileKey; } - int getFileKeyLength() override { return fileKeyLength; } - int getEncVersion() override { return encVersion; } - int getEncRevision() override { return encRevision; } - CryptAlgorithm getEncAlgorithm() override { return encAlgorithm; } - -private: - - int permFlags; - GBool ownerPasswordOk; - Guchar fileKey[32]; - int fileKeyLength; - int encVersion; - int encRevision; - GBool encryptMetadata; - CryptAlgorithm encAlgorithm; - - GooString *ownerKey, *userKey; - GooString *ownerEnc, *userEnc; - GooString *fileID; - GBool ok; -}; - -#ifdef ENABLE_PLUGINS -//------------------------------------------------------------------------ -// ExternalSecurityHandler -//------------------------------------------------------------------------ - -class ExternalSecurityHandler: public SecurityHandler { -public: - - ExternalSecurityHandler(PDFDoc *docA, Object *encryptDictA, - XpdfSecurityHandler *xshA); - virtual ~ExternalSecurityHandler(); - - virtual void *makeAuthData(GooString *ownerPassword, - GooString *userPassword); - virtual void *getAuthData(); - virtual void freeAuthData(void *authData); - virtual GBool authorize(void *authData); - virtual int getPermissionFlags() { return permFlags; } - virtual GBool getOwnerPasswordOk() { return gFalse; } - virtual Guchar *getFileKey() { return fileKey; } - virtual int getFileKeyLength() { return fileKeyLength; } - virtual int getEncVersion() { return encVersion; } - virtual int getEncRevision() { return encRevision; } - virtual CryptAlgorithm getEncAlgorithm() { return encAlgorithm; } - -private: - - Object encryptDict; - XpdfSecurityHandler *xsh; - void *docData; - int permFlags; - Guchar fileKey[16]; - int fileKeyLength; - int encVersion; - int encRevision; - CryptAlgorithm encAlgorithm; - GBool ok; -}; -#endif // ENABLE_PLUGINS - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/SignatureHandler.cc b/Build/source/libs/poppler/poppler-src/poppler/SignatureHandler.cc deleted file mode 100644 index a98e3f79b90..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/SignatureHandler.cc +++ /dev/null @@ -1,365 +0,0 @@ -//======================================================================== -// -// SignatureHandler.cc -// -// This file is licensed under the GPLv2 or later -// -// Copyright 2015, 2016 André Guerreiro <aguerreiro1985@gmail.com> -// Copyright 2015 André Esser <bepandre@hotmail.com> -// Copyright 2015, 2016, 2018 Albert Astals Cid <aacid@kde.org> -// Copyright 2015 Markus KilÃ¥s <digital@markuspage.com> -// Copyright 2017 Sebastian Rasmussen <sebras@gmail.com> -// Copyright 2017 Hans-Ulrich Jüttner <huj@froreich-bioscientia.de> -// -//======================================================================== - -#include <config.h> - -#include "SignatureHandler.h" -#include "goo/gmem.h" -#include <secmod.h> - -#include <dirent.h> -#include <Error.h> - -unsigned int SignatureHandler::digestLength(SECOidTag digestAlgId) -{ - switch(digestAlgId){ - case SEC_OID_SHA1: - return 20; - case SEC_OID_SHA256: - return 32; - case SEC_OID_SHA384: - return 48; - case SEC_OID_SHA512: - return 64; - default: - printf("ERROR: Unrecognized Hash ID\n"); - return 0; - } -} - -char *SignatureHandler::getSignerName() -{ - if (!CMSSignerInfo) - return nullptr; - - CERTCertificate *cert = NSS_CMSSignerInfo_GetSigningCertificate(CMSSignerInfo, CERT_GetDefaultCertDB()); - return CERT_GetCommonName(&cert->subject); -} - -const char * SignatureHandler::getSignerSubjectDN() -{ - if (!CMSSignerInfo) - return nullptr; - - CERTCertificate *cert = NSS_CMSSignerInfo_GetSigningCertificate(CMSSignerInfo, CERT_GetDefaultCertDB()); - if (!cert) - return nullptr; - return cert->subjectName; -} - -HASH_HashType SignatureHandler::getHashAlgorithm() -{ - if (hash_context && hash_context->hashobj) - { - return hash_context->hashobj->type; - } - return HASH_AlgNULL; -} - -time_t SignatureHandler::getSigningTime() -{ - PRTime sTime; // time in microseconds since the epoch - - if (NSS_CMSSignerInfo_GetSigningTime (CMSSignerInfo, &sTime) != SECSuccess) - return 0; - - return static_cast<time_t>(sTime/1000000); -} - - -GooString *SignatureHandler::getDefaultFirefoxCertDB_Linux() -{ - GooString * finalPath = nullptr; - DIR *toSearchIn; - struct dirent *subFolder; - - GooString * homePath = new GooString(getenv("HOME")); - homePath = homePath->append("/.mozilla/firefox/"); - - if ((toSearchIn = opendir(homePath->getCString())) == nullptr) { - error(errInternal, 0, "couldn't find default Firefox Folder"); - delete homePath; - return nullptr; - } - do { - if ((subFolder = readdir(toSearchIn)) != nullptr) { - if (strstr(subFolder->d_name, "default") != nullptr) { - finalPath = homePath->append(subFolder->d_name); - closedir(toSearchIn); - return finalPath; - } - } - } while (subFolder != nullptr); - - closedir(toSearchIn); - delete homePath; - return nullptr; -} - -/** - * Initialise NSS - */ -void SignatureHandler::init_nss() -{ - GooString *certDBPath = getDefaultFirefoxCertDB_Linux(); - if (certDBPath == nullptr) { - NSS_Init("sql:/etc/pki/nssdb"); - } else { - NSS_Init(certDBPath->getCString()); - } - //Make sure NSS root certificates module is loaded - SECMOD_AddNewModule("Root Certs", "libnssckbi.so", 0, 0); - - delete certDBPath; -} - - -SignatureHandler::SignatureHandler(unsigned char *p7, int p7_length) - : hash_context(nullptr), - CMSMessage(nullptr), - CMSSignedData(nullptr), - CMSSignerInfo(nullptr), - temp_certs(nullptr) -{ - init_nss(); - CMSitem.data = p7; - CMSitem.len = p7_length; - CMSMessage = CMS_MessageCreate(&CMSitem); - CMSSignedData = CMS_SignedDataCreate(CMSMessage); - if (CMSSignedData) { - CMSSignerInfo = CMS_SignerInfoCreate(CMSSignedData); - hash_context = initHashContext(); - } -} - -HASHContext * SignatureHandler::initHashContext() -{ - - SECItem usedAlgorithm = NSS_CMSSignedData_GetDigestAlgs(CMSSignedData)[0]->algorithm; - hash_length = digestLength(SECOID_FindOIDTag(&usedAlgorithm)); - HASH_HashType hashType; - hashType = HASH_GetHashTypeByOidTag(SECOID_FindOIDTag(&usedAlgorithm)); - return HASH_Create(hashType); -} - -void SignatureHandler::updateHash(unsigned char * data_block, int data_len) -{ - if (hash_context) { - HASH_Update(hash_context, data_block, data_len); - } -} - -SignatureHandler::~SignatureHandler() -{ - SECITEM_FreeItem(&CMSitem, PR_FALSE); - if (CMSMessage) - NSS_CMSMessage_Destroy(CMSMessage); - - if (hash_context) - HASH_Destroy(hash_context); - - free(temp_certs); - - if (NSS_Shutdown()!=SECSuccess) - fprintf(stderr, "Detail: %s\n", PR_ErrorToString(PORT_GetError(), PR_LANGUAGE_I_DEFAULT)); -} - -NSSCMSMessage *SignatureHandler::CMS_MessageCreate(SECItem * cms_item) -{ - if (cms_item->data){ - return NSS_CMSMessage_CreateFromDER(cms_item, nullptr, nullptr /* Content callback */ - , nullptr, nullptr /*Password callback*/ - , nullptr, nullptr /*Decrypt callback*/); - } else { - return nullptr; - } -} - -NSSCMSSignedData *SignatureHandler::CMS_SignedDataCreate(NSSCMSMessage * cms_msg) -{ - if (!NSS_CMSMessage_IsSigned(cms_msg)) { - error(errInternal, 0, "Input couldn't be parsed as a CMS signature"); - return nullptr; - } - - NSSCMSContentInfo *cinfo = NSS_CMSMessage_ContentLevel(cms_msg, 0); - if (!cinfo) { - error(errInternal, 0, "Error in NSS_CMSMessage_ContentLevel"); - return nullptr; - } - - NSSCMSSignedData *signedData = (NSSCMSSignedData*) NSS_CMSContentInfo_GetContent(cinfo); - if (!signedData) { - error(errInternal, 0, "CError in NSS_CMSContentInfo_GetContent()"); - return nullptr; - } - - if (signedData->rawCerts) - { - size_t i; - for (i = 0; signedData->rawCerts[i]; ++i) {} // just count the length of the certificate chain - - // tempCerts field needs to be filled for complete memory release by NSSCMSSignedData_Destroy - signedData->tempCerts = (CERTCertificate **) gmallocn( i+1, sizeof(CERTCertificate *)); - memset(signedData->tempCerts, 0, (i+1) * sizeof(CERTCertificate *)); - // store the adresses of these temporary certificates for future release - for (i = 0; signedData->rawCerts[i]; ++i) - signedData->tempCerts[i] = CERT_NewTempCertificate(CERT_GetDefaultCertDB(), signedData->rawCerts[i], nullptr, 0, 0); - - temp_certs = signedData->tempCerts; - return signedData; - } else { - return nullptr; - } -} - -NSSCMSSignerInfo *SignatureHandler::CMS_SignerInfoCreate(NSSCMSSignedData * cms_sig_data) -{ - NSSCMSSignerInfo *signerInfo = NSS_CMSSignedData_GetSignerInfo(cms_sig_data, 0); - if (!signerInfo) { - printf("Error in NSS_CMSSignedData_GetSignerInfo()\n"); - return nullptr; - } else { - return signerInfo; - } -} - -NSSCMSVerificationStatus SignatureHandler::validateSignature() -{ - unsigned char *digest_buffer = nullptr; - - if (!CMSSignedData) - return NSSCMSVS_MalformedSignature; - - digest_buffer = (unsigned char *)PORT_Alloc(hash_length); - unsigned int result_len = 0; - - HASH_End(hash_context, digest_buffer, &result_len, hash_length); - - SECItem digest; - digest.data = digest_buffer; - digest.len = hash_length; - - if ((NSS_CMSSignerInfo_GetSigningCertificate(CMSSignerInfo, CERT_GetDefaultCertDB())) == nullptr) - CMSSignerInfo->verificationStatus = NSSCMSVS_SigningCertNotFound; - - SECItem * content_info_data = CMSSignedData->contentInfo.content.data; - if (content_info_data != nullptr && content_info_data->data != nullptr) - { - /* - This means it's not a detached type signature - so the digest is contained in SignedData->contentInfo - */ - if (memcmp(digest.data, content_info_data->data, hash_length) == 0 - && digest.len == content_info_data->len) - { - PORT_Free(digest_buffer); - return NSSCMSVS_GoodSignature; - } - else - { - PORT_Free(digest_buffer); - return NSSCMSVS_DigestMismatch; - } - - } - else if (NSS_CMSSignerInfo_Verify(CMSSignerInfo, &digest, nullptr) != SECSuccess) - { - - PORT_Free(digest_buffer); - return CMSSignerInfo->verificationStatus; - } - else - { - PORT_Free(digest_buffer); - return NSSCMSVS_GoodSignature; - } -} - -SECErrorCodes SignatureHandler::validateCertificate(time_t validation_time) -{ - SECErrorCodes retVal; - CERTCertificate *cert; - - if (!CMSSignerInfo) - return (SECErrorCodes) -1; //error code to avoid matching error codes defined in SECErrorCodes - - if ((cert = NSS_CMSSignerInfo_GetSigningCertificate(CMSSignerInfo, CERT_GetDefaultCertDB())) == nullptr) - CMSSignerInfo->verificationStatus = NSSCMSVS_SigningCertNotFound; - - PRTime vTime = 0; // time in microseconds since the epoch, special value 0 means now - if (validation_time > 0) - vTime = 1000000*(PRTime)validation_time; - CERTValInParam inParams[3]; - inParams[0].type = cert_pi_revocationFlags; - inParams[0].value.pointer.revocation = CERT_GetClassicOCSPEnabledSoftFailurePolicy(); - inParams[1].type = cert_pi_date; - inParams[1].value.scalar.time = vTime; - inParams[2].type = cert_pi_end; - - CERT_PKIXVerifyCert(cert, certificateUsageEmailSigner, inParams, nullptr, - CMSSignerInfo->cmsg->pwfn_arg); - - retVal = (SECErrorCodes) PORT_GetError(); - - return retVal; -} - - -SignatureValidationStatus SignatureHandler::NSS_SigTranslate(NSSCMSVerificationStatus nss_code) -{ - switch(nss_code) - { - case NSSCMSVS_GoodSignature: - return SIGNATURE_VALID; - - case NSSCMSVS_BadSignature: - return SIGNATURE_INVALID; - - case NSSCMSVS_DigestMismatch: - return SIGNATURE_DIGEST_MISMATCH; - - case NSSCMSVS_ProcessingError: - return SIGNATURE_DECODING_ERROR; - - default: - return SIGNATURE_GENERIC_ERROR; - } -} - -CertificateValidationStatus SignatureHandler::NSS_CertTranslate(SECErrorCodes nss_code) -{ - // 0 not defined in SECErrorCodes, it means success for this purpose. - if (nss_code == (SECErrorCodes) 0) - return CERTIFICATE_TRUSTED; - - switch(nss_code) - { - case SEC_ERROR_UNKNOWN_ISSUER: - return CERTIFICATE_UNKNOWN_ISSUER; - - case SEC_ERROR_UNTRUSTED_ISSUER: - return CERTIFICATE_UNTRUSTED_ISSUER; - - case SEC_ERROR_REVOKED_CERTIFICATE: - return CERTIFICATE_REVOKED; - - case SEC_ERROR_EXPIRED_CERTIFICATE: - return CERTIFICATE_EXPIRED; - - default: - return CERTIFICATE_GENERIC_ERROR; - } -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/SignatureHandler.h b/Build/source/libs/poppler/poppler-src/poppler/SignatureHandler.h deleted file mode 100644 index 3b2f62b9709..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/SignatureHandler.h +++ /dev/null @@ -1,74 +0,0 @@ -//======================================================================== -// -// SignatureHandler.h -// -// This file is licensed under the GPLv2 or later -// -// Copyright 2015 André Guerreiro <aguerreiro1985@gmail.com> -// Copyright 2015 André Esser <bepandre@hotmail.com> -// Copyright 2015, 2017 Albert Astals Cid <aacid@kde.org> -// Copyright 2017 Hans-Ulrich Jüttner <huj@froreich-bioscientia.de> -// -//======================================================================== - -#ifndef SIGNATURE_HANDLER_H -#define SIGNATURE_HANDLER_H - -#include "goo/GooString.h" -#include "SignatureInfo.h" - -/* NSPR Headers */ -#include <nspr.h> - -/* NSS headers */ -#include <cms.h> -#include <nss.h> -#include <cert.h> -#include <cryptohi.h> -#include <secerr.h> -#include <secoid.h> -#include <secmodt.h> -#include <sechash.h> - -class SignatureHandler -{ -public: - SignatureHandler(unsigned char *p7, int p7_length); - ~SignatureHandler(); - time_t getSigningTime(); - char * getSignerName(); - const char * getSignerSubjectDN(); - HASH_HashType getHashAlgorithm(); - void setSignature(unsigned char *, int); - void updateHash(unsigned char * data_block, int data_len); - NSSCMSVerificationStatus validateSignature(); - // Use -1 as validation_time for now - SECErrorCodes validateCertificate(time_t validation_time); - - //Translate NSS error codes - static SignatureValidationStatus NSS_SigTranslate(NSSCMSVerificationStatus nss_code); - static CertificateValidationStatus NSS_CertTranslate(SECErrorCodes nss_code); - -private: - SignatureHandler(const SignatureHandler &); - SignatureHandler& operator=(const SignatureHandler &); - - void init_nss(); - - GooString * getDefaultFirefoxCertDB_Linux(); - unsigned int digestLength(SECOidTag digestAlgId); - NSSCMSMessage *CMS_MessageCreate(SECItem * cms_item); - NSSCMSSignedData *CMS_SignedDataCreate(NSSCMSMessage * cms_msg); - NSSCMSSignerInfo *CMS_SignerInfoCreate(NSSCMSSignedData * cms_sig_data); - HASHContext * initHashContext(); - - unsigned int hash_length; - SECItem CMSitem; - HASHContext *hash_context; - NSSCMSMessage *CMSMessage; - NSSCMSSignedData *CMSSignedData; - NSSCMSSignerInfo *CMSSignerInfo; - CERTCertificate **temp_certs; -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/SignatureInfo.cc b/Build/source/libs/poppler/poppler-src/poppler/SignatureInfo.cc deleted file mode 100644 index 76a54c0c083..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/SignatureInfo.cc +++ /dev/null @@ -1,150 +0,0 @@ -//======================================================================== -// -// SignatureInfo.cc -// -// This file is licensed under the GPLv2 or later -// -// Copyright 2015 André Guerreiro <aguerreiro1985@gmail.com> -// Copyright 2015 André Esser <bepandre@hotmail.com> -// Copyright 2017 Hans-Ulrich Jüttner <huj@froreich-bioscientia.de> -// Copyright 2017, 2018 Albert Astals Cid <aacid@kde.org> -// Copyright 2018 Chinmoy Ranjan Pradhan <chinmoyrp65@protonmail.com> -// -//======================================================================== - -#include <config.h> - -#include "SignatureInfo.h" -#include "goo/gmem.h" -#include <stdlib.h> -#include <string.h> - -#ifdef ENABLE_NSS3 - #include <hasht.h> -#else - static const int HASH_AlgNULL = -1; -#endif - -/* Constructor & Destructor */ - -SignatureInfo::SignatureInfo() -{ - sig_status = SIGNATURE_NOT_VERIFIED; - cert_status = CERTIFICATE_NOT_VERIFIED; - signer_name = nullptr; - subject_dn = nullptr; - location = nullptr; - reason = nullptr; - hash_type = HASH_AlgNULL; - signing_time = 0; - sig_subfilter_supported = false; -} - -SignatureInfo::SignatureInfo(SignatureValidationStatus sig_val_status, CertificateValidationStatus cert_val_status) -{ - sig_status = sig_val_status; - cert_status = cert_val_status; - signer_name = nullptr; - subject_dn = nullptr; - location = nullptr; - reason = nullptr; - hash_type = HASH_AlgNULL; - signing_time = 0; - sig_subfilter_supported = false; -} - -SignatureInfo::~SignatureInfo() -{ - free(location); - free(reason); - free(signer_name); - free(subject_dn); -} - -/* GETTERS */ - -SignatureValidationStatus SignatureInfo::getSignatureValStatus() -{ - return sig_status; -} - -CertificateValidationStatus SignatureInfo::getCertificateValStatus() -{ - return cert_status; -} - -const char *SignatureInfo::getSignerName() -{ - return signer_name; -} - -const char *SignatureInfo::getSubjectDN() -{ - return subject_dn; -} - -const char *SignatureInfo::getLocation() const -{ - return location; -} - -const char *SignatureInfo::getReason() const -{ - return reason; -} - -int SignatureInfo::getHashAlgorithm() -{ - return hash_type; -} - -time_t SignatureInfo::getSigningTime() -{ - return signing_time; -} - -/* SETTERS */ - -void SignatureInfo::setSignatureValStatus(enum SignatureValidationStatus sig_val_status) -{ - sig_status = sig_val_status; -} - -void SignatureInfo::setCertificateValStatus(enum CertificateValidationStatus cert_val_status) -{ - cert_status = cert_val_status; -} - -void SignatureInfo::setSignerName(char *signerName) -{ - free(signer_name); - signer_name = signerName; -} - -void SignatureInfo::setSubjectDN(const char *subjectDN) -{ - free(subject_dn); - subject_dn = strdup(subjectDN); -} - -void SignatureInfo::setLocation(char *loc) -{ - free(location); - location = loc; -} - -void SignatureInfo::setReason(char *signingReason) -{ - free(reason); - reason = signingReason; -} - -void SignatureInfo::setHashAlgorithm(int type) -{ - hash_type = type; -} - -void SignatureInfo::setSigningTime(time_t signingTime) -{ - signing_time = signingTime; -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/SignatureInfo.h b/Build/source/libs/poppler/poppler-src/poppler/SignatureInfo.h deleted file mode 100644 index 1e9f5f9d63e..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/SignatureInfo.h +++ /dev/null @@ -1,85 +0,0 @@ -//======================================================================== -// -// SignatureInfo.h -// -// This file is licensed under the GPLv2 or later -// -// Copyright 2015 André Guerreiro <aguerreiro1985@gmail.com> -// Copyright 2015 André Esser <bepandre@hotmail.com> -// Copyright 2015, 2017, 2018 Albert Astals Cid <aacid@kde.org> -// Copyright 2017 Hans-Ulrich Jüttner <huj@froreich-bioscientia.de> -// Copyright 2018 Chinmoy Ranjan Pradhan <chinmoyrp65@protonmail.com> -// -//======================================================================== - -#ifndef SIGNATUREINFO_H -#define SIGNATUREINFO_H - -#include <time.h> - -enum SignatureValidationStatus -{ - SIGNATURE_VALID, - SIGNATURE_INVALID, - SIGNATURE_DIGEST_MISMATCH, - SIGNATURE_DECODING_ERROR, - SIGNATURE_GENERIC_ERROR, - SIGNATURE_NOT_FOUND, - SIGNATURE_NOT_VERIFIED -}; - -enum CertificateValidationStatus -{ - CERTIFICATE_TRUSTED, - CERTIFICATE_UNTRUSTED_ISSUER, - CERTIFICATE_UNKNOWN_ISSUER, - CERTIFICATE_REVOKED, - CERTIFICATE_EXPIRED, - CERTIFICATE_GENERIC_ERROR, - CERTIFICATE_NOT_VERIFIED -}; - -class SignatureInfo { -public: - SignatureInfo(); - SignatureInfo(SignatureValidationStatus, CertificateValidationStatus); - ~SignatureInfo(); - - /* GETTERS */ - SignatureValidationStatus getSignatureValStatus(); - CertificateValidationStatus getCertificateValStatus(); - const char *getSignerName(); - const char *getSubjectDN(); - const char *getLocation() const; - const char *getReason() const; - int getHashAlgorithm(); // Returns a NSS3 HASH_HashType or -1 if compiled without NSS3 - time_t getSigningTime(); - bool isSubfilterSupported() { return sig_subfilter_supported; } - - /* SETTERS */ - void setSignatureValStatus(enum SignatureValidationStatus ); - void setCertificateValStatus(enum CertificateValidationStatus ); - void setSignerName(char *); - void setSubjectDN(const char *); - void setLocation(char *); - void setReason(char *); - void setHashAlgorithm(int); - void setSigningTime(time_t); - void setSubFilterSupport(bool isSupported) { sig_subfilter_supported = isSupported; } - -private: - SignatureInfo(const SignatureInfo &); - SignatureInfo& operator=(const SignatureInfo &); - - SignatureValidationStatus sig_status; - CertificateValidationStatus cert_status; - char *signer_name; - char *subject_dn; - char *location; - char *reason; - int hash_type; - time_t signing_time; - bool sig_subfilter_supported; -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/Sound.cc b/Build/source/libs/poppler/poppler-src/poppler/Sound.cc deleted file mode 100644 index aa2ac8f21ad..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/Sound.cc +++ /dev/null @@ -1,133 +0,0 @@ -/* Sound.cc - an object that holds the sound structure - * Copyright (C) 2006-2007, Pino Toscano <pino@kde.org> - * Copyright (C) 2009, 2017, 2018, Albert Astals Cid <aacid@kde.org> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#include "GooString.h" -#include "Object.h" -#include "Sound.h" -#include "Stream.h" -#include "FileSpec.h" - -Sound *Sound::parseSound(Object *obj) -{ - // let's try to see if this Object is a Sound, according to the PDF specs - // (section 9.2) - Stream *str = nullptr; - // the Object must be a Stream - if (obj->isStream()) { - str = obj->getStream(); - } else { - return nullptr; - } - // the Stream must have a Dict - Dict *dict = str->getDict(); - if (dict == nullptr) - return nullptr; - // the Dict must have the 'R' key of type num - Object tmp = dict->lookup("R"); - if (tmp.isNum()) { - return new Sound(obj); - } else { - return nullptr; - } -} - -Sound::Sound(const Object *obj, bool readAttrs) -{ - streamObj = obj->copy(); - - fileName = nullptr; - samplingRate = 0.0; - channels = 1; - bitsPerSample = 8; - encoding = soundRaw; - - if (readAttrs) - { - Dict *dict = streamObj.getStream()->getDict(); - Object tmp = dict->lookup("F"); - if (!tmp.isNull()) { - // valid 'F' key -> external file - kind = soundExternal; - Object obj1 = getFileSpecNameForPlatform (&tmp); - if (obj1.isString()) { - fileName = obj1.getString()->copy(); - } - } else { - // no file specification, then the sound data have to be - // extracted from the stream - kind = soundEmbedded; - } - // sampling rate - tmp = dict->lookup("R"); - if (tmp.isNum()) { - samplingRate = tmp.getNum(); - } - // sound channels - tmp = dict->lookup("C"); - if (tmp.isInt()) { - channels = tmp.getInt(); - } - // bits per sample - tmp = dict->lookup("B"); - if (tmp.isInt()) { - bitsPerSample = tmp.getInt(); - } - // encoding format - tmp = dict->lookup("E"); - if (tmp.isName()) - { - const char *enc = tmp.getName(); - if (strcmp("Raw", enc) == 0) { - encoding = soundRaw; - } else if (strcmp("Signed", enc) == 0) { - encoding = soundSigned; - } else if (strcmp("muLaw", enc) == 0) { - encoding = soundMuLaw; - } else if (strcmp("ALaw", enc) == 0) { - encoding = soundALaw; - } - } - } -} - -Sound::~Sound() -{ - delete fileName; -} - -Stream *Sound::getStream() -{ - return streamObj.getStream(); -} - -Sound *Sound::copy() const -{ - Sound *newsound = new Sound(&streamObj, false); - - newsound->kind = kind; - if (fileName) { - newsound->fileName = fileName->copy(); - } - newsound->samplingRate = samplingRate; - newsound->channels = channels; - newsound->bitsPerSample = bitsPerSample; - newsound->encoding = encoding; - - return newsound; -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/Sound.h b/Build/source/libs/poppler/poppler-src/poppler/Sound.h deleted file mode 100644 index ae8d0ceed85..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/Sound.h +++ /dev/null @@ -1,78 +0,0 @@ -/* Sound.h - an object that holds the sound structure - * Copyright (C) 2006-2007, Pino Toscano <pino@kde.org> - * Copyright (C) 2017, 2018, Albert Astals Cid <aacid@kde.org> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#ifndef Sound_H -#define Sound_H - -class GooString; -class Object; -class Stream; - -//------------------------------------------------------------------------ - -enum SoundKind { - soundEmbedded, // embedded sound - soundExternal // external sound -}; - -enum SoundEncoding { - soundRaw, // raw encoding - soundSigned, // twos-complement values - soundMuLaw, // mu-law-encoded samples - soundALaw // A-law-encoded samples -}; - -class Sound -{ -public: - // Try to parse the Object s - static Sound *parseSound(Object *s); - - // Destructor - ~Sound(); - - Sound(const Sound &) = delete; - Sound& operator=(const Sound &) = delete; - - const Object *getObject() const { return &streamObj; } - Stream *getStream(); - - SoundKind getSoundKind() const { return kind; } - const GooString *getFileName() const { return fileName; } - double getSamplingRate() const { return samplingRate; } - int getChannels() const { return channels; } - int getBitsPerSample() const { return bitsPerSample; } - SoundEncoding getEncoding() const { return encoding; } - - Sound *copy() const; - -private: - // Create a sound. The Object obj is ensured to be a Stream with a Dict - Sound(const Object *obj, bool readAttrs = true); - - Object streamObj; - SoundKind kind; - GooString *fileName; - double samplingRate; - int channels; - int bitsPerSample; - SoundEncoding encoding; -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/SplashOutputDev.cc b/Build/source/libs/poppler/poppler-src/poppler/SplashOutputDev.cc deleted file mode 100644 index 3e883970e3e..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/SplashOutputDev.cc +++ /dev/null @@ -1,4932 +0,0 @@ -//======================================================================== -// -// SplashOutputDev.cc -// -// Copyright 2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2005 Takashi Iwai <tiwai@suse.de> -// Copyright (C) 2006 Stefan Schweizer <genstef@gentoo.org> -// Copyright (C) 2006-2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2006 Krzysztof Kowalczyk <kkowalczyk@gmail.com> -// Copyright (C) 2006 Scott Turner <scotty1024@mac.com> -// Copyright (C) 2007 Koji Otani <sho@bbr.jp> -// Copyright (C) 2009 Petr Gajdos <pgajdos@novell.com> -// Copyright (C) 2009-2016 Thomas Freitag <Thomas.Freitag@alfa.de> -// Copyright (C) 2009 Carlos Garcia Campos <carlosgc@gnome.org> -// Copyright (C) 2009, 2014-2016 William Bader <williambader@hotmail.com> -// Copyright (C) 2010 Patrick Spendrin <ps_ml@gmx.de> -// Copyright (C) 2010 Brian Cameron <brian.cameron@oracle.com> -// Copyright (C) 2010 PaweÅ‚ Wiejacha <pawel.wiejacha@gmail.com> -// Copyright (C) 2010 Christian Feuersänger <cfeuersaenger@googlemail.com> -// Copyright (C) 2011 Andreas Hartmetz <ahartmetz@gmail.com> -// Copyright (C) 2011 Andrea Canciani <ranma42@gmail.com> -// Copyright (C) 2011, 2012, 2017 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2013 Lu Wang <coolwanglu@gmail.com> -// Copyright (C) 2013 Li Junling <lijunling@sina.com> -// Copyright (C) 2014 Ed Porras <ed@moto-research.com> -// Copyright (C) 2014 Richard PALO <richard@netbsd.org> -// Copyright (C) 2015 Tamas Szekeres <szekerest@gmail.com> -// Copyright (C) 2015 Kenji Uno <ku@digitaldolphins.jp> -// Copyright (C) 2016 Takahiro Hashimoto <kenya888.en@gmail.com> -// Copyright (C) 2017 Even Rouault <even.rouault@spatialys.com> -// 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 -// Copyright (C) 2018 Stefan Brüns <stefan.bruens@rwth-aachen.de> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include <config.h> - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include <string.h> -#include <cmath> -#include "goo/gfile.h" -#include "GlobalParams.h" -#include "Error.h" -#include "Object.h" -#include "Gfx.h" -#include "GfxFont.h" -#include "Page.h" -#include "PDFDoc.h" -#include "Link.h" -#include "FontEncodingTables.h" -#include "fofi/FoFiTrueType.h" -#include "splash/SplashBitmap.h" -#include "splash/SplashGlyphBitmap.h" -#include "splash/SplashPattern.h" -#include "splash/SplashScreen.h" -#include "splash/SplashPath.h" -#include "splash/SplashState.h" -#include "splash/SplashErrorCodes.h" -#include "splash/SplashFontEngine.h" -#include "splash/SplashFont.h" -#include "splash/SplashFontFile.h" -#include "splash/SplashFontFileID.h" -#include "splash/Splash.h" -#include "SplashOutputDev.h" -#include <algorithm> - -#ifdef VMS -#if (__VMS_VER < 70000000) -extern "C" int unlink(char *filename); -#endif -#endif - -static const double s_minLineWidth = 0.0; - -static inline void convertGfxColor(SplashColorPtr dest, - SplashColorMode colorMode, - GfxColorSpace *colorSpace, - GfxColor *src) { - SplashColor color; - GfxGray gray; - GfxRGB rgb; -#ifdef SPLASH_CMYK - GfxCMYK cmyk; - GfxColor deviceN; -#endif - - // make gcc happy - color[0] = color[1] = color[2] = 0; -#ifdef SPLASH_CMYK - color[3] = 0; -#endif - switch (colorMode) { - case splashModeMono1: - case splashModeMono8: - colorSpace->getGray(src, &gray); - color[0] = colToByte(gray); - break; - case splashModeXBGR8: - color[3] = 255; - // fallthrough - case splashModeBGR8: - case splashModeRGB8: - colorSpace->getRGB(src, &rgb); - color[0] = colToByte(rgb.r); - color[1] = colToByte(rgb.g); - color[2] = colToByte(rgb.b); - break; -#ifdef SPLASH_CMYK - case splashModeCMYK8: - colorSpace->getCMYK(src, &cmyk); - color[0] = colToByte(cmyk.c); - color[1] = colToByte(cmyk.m); - color[2] = colToByte(cmyk.y); - color[3] = colToByte(cmyk.k); - break; - case splashModeDeviceN8: - colorSpace->getDeviceN(src, &deviceN); - for (int i = 0; i < SPOT_NCOMPS + 4; i++) - color[i] = colToByte(deviceN.c[i]); - break; -#endif - } - splashColorCopy(dest, color); -} - -// Copy a color according to the color mode. -// Use convertGfxShortColor() below when the destination is a bitmap -// to avoid overwriting cells. -// Calling this in SplashGouraudPattern::getParameterizedColor() fixes bug 90570. -// Use convertGfxColor() above when the destination is an array of SPOT_NCOMPS+4 bytes, -// to ensure that everything is initialized. - -static inline void convertGfxShortColor(SplashColorPtr dest, - SplashColorMode colorMode, - GfxColorSpace *colorSpace, - GfxColor *src) { - switch (colorMode) { - case splashModeMono1: - case splashModeMono8: - { - GfxGray gray; - colorSpace->getGray(src, &gray); - dest[0] = colToByte(gray); - } - break; - case splashModeXBGR8: - dest[3] = 255; - // fallthrough - case splashModeBGR8: - case splashModeRGB8: - { - GfxRGB rgb; - colorSpace->getRGB(src, &rgb); - dest[0] = colToByte(rgb.r); - dest[1] = colToByte(rgb.g); - dest[2] = colToByte(rgb.b); - } - break; -#ifdef SPLASH_CMYK - case splashModeCMYK8: - { - GfxCMYK cmyk; - colorSpace->getCMYK(src, &cmyk); - dest[0] = colToByte(cmyk.c); - dest[1] = colToByte(cmyk.m); - dest[2] = colToByte(cmyk.y); - dest[3] = colToByte(cmyk.k); - } - break; - case splashModeDeviceN8: - { - GfxColor deviceN; - colorSpace->getDeviceN(src, &deviceN); - for (int i = 0; i < SPOT_NCOMPS + 4; i++) - dest[i] = colToByte(deviceN.c[i]); - } - break; -#endif - } -} - -//------------------------------------------------------------------------ -// SplashGouraudPattern -//------------------------------------------------------------------------ -SplashGouraudPattern::SplashGouraudPattern(GBool bDirectColorTranslationA, - GfxState *stateA, GfxGouraudTriangleShading *shadingA) { - state = stateA; - shading = shadingA; - bDirectColorTranslation = bDirectColorTranslationA; - gfxMode = shadingA->getColorSpace()->getMode(); -} - -SplashGouraudPattern::~SplashGouraudPattern() { -} - -void SplashGouraudPattern::getParameterizedColor(double colorinterp, SplashColorMode mode, SplashColorPtr dest) { - GfxColor src; - GfxColorSpace* srcColorSpace = shading->getColorSpace(); - int colorComps = 3; -#ifdef SPLASH_CMYK - if (mode == splashModeCMYK8) - colorComps=4; - else if (mode == splashModeDeviceN8) - colorComps=4 + SPOT_NCOMPS; -#endif - - shading->getParameterizedColor(colorinterp, &src); - - if (bDirectColorTranslation) { - for (int m = 0; m < colorComps; ++m) - dest[m] = colToByte(src.c[m]); - } else { - convertGfxShortColor(dest, mode, srcColorSpace, &src); - } -} - -//------------------------------------------------------------------------ -// SplashFunctionPattern -//------------------------------------------------------------------------ - -SplashFunctionPattern::SplashFunctionPattern(SplashColorMode colorModeA, GfxState *stateA, GfxFunctionShading *shadingA) -{ - Matrix ctm; - SplashColor defaultColor; - GfxColor srcColor; - double *matrix = shadingA->getMatrix(); - - shading = shadingA; - state = stateA; - colorMode = colorModeA; - - state->getCTM(&ctm); - - double a1 = ctm.m[0]; - double b1 = ctm.m[1]; - double c1 = ctm.m[2]; - double d1 = ctm.m[3]; - - ctm.m[0] = matrix[0] * a1 + matrix[1] * c1; - ctm.m[1] = matrix[0] * b1 + matrix[1] * d1; - ctm.m[2] = matrix[2] * a1 + matrix[3] * c1; - ctm.m[3] = matrix[2] * b1 + matrix[3] * d1; - ctm.m[4] = matrix[4] * a1 + matrix[5] * c1 + ctm.m[4]; - ctm.m[5] = matrix[4] * b1 + matrix[5] * d1 + ctm.m[5]; - ctm.invertTo(&ictm); - - gfxMode = shadingA->getColorSpace()->getMode(); - shadingA->getColorSpace()->getDefaultColor(&srcColor); - shadingA->getDomain(&xMin, &yMin, &xMax, &yMax); - convertGfxColor(defaultColor, colorModeA, shadingA->getColorSpace(), &srcColor); -} - -SplashFunctionPattern::~SplashFunctionPattern() { -} - -GBool SplashFunctionPattern::getColor(int x, int y, SplashColorPtr c) { - GfxColor gfxColor; - double xc, yc; - - ictm.transform(x, y, &xc, &yc); - if (xc < xMin || xc > xMax || yc < yMin || yc > yMax) return gFalse; - shading->getColor(xc, yc, &gfxColor); - convertGfxColor(c, colorMode, shading->getColorSpace(), &gfxColor); - return gTrue; -} - -//------------------------------------------------------------------------ -// SplashUnivariatePattern -//------------------------------------------------------------------------ - -SplashUnivariatePattern::SplashUnivariatePattern(SplashColorMode colorModeA, GfxState *stateA, GfxUnivariateShading *shadingA) { - Matrix ctm; - double xMin, yMin, xMax, yMax; - - shading = shadingA; - state = stateA; - colorMode = colorModeA; - - state->getCTM(&ctm); - ctm.invertTo(&ictm); - - // get the function domain - t0 = shading->getDomain0(); - t1 = shading->getDomain1(); - dt = t1 - t0; - - stateA->getUserClipBBox(&xMin, &yMin, &xMax, &yMax); - shadingA->setupCache(&ctm, xMin, yMin, xMax, yMax); - gfxMode = shadingA->getColorSpace()->getMode(); -} - -SplashUnivariatePattern::~SplashUnivariatePattern() { -} - -GBool SplashUnivariatePattern::getColor(int x, int y, SplashColorPtr c) { - GfxColor gfxColor; - double xc, yc, t; - - ictm.transform(x, y, &xc, &yc); - if (! getParameter (xc, yc, &t)) - return gFalse; - - const int filled = shading->getColor(t, &gfxColor); - if (unlikely(filled < shading->getColorSpace()->getNComps())) { - for (int i = filled; i < shading->getColorSpace()->getNComps(); ++i) - gfxColor.c[i] = 0; - } - convertGfxColor(c, colorMode, shading->getColorSpace(), &gfxColor); - return gTrue; -} - -GBool SplashUnivariatePattern::testPosition(int x, int y) { - double xc, yc, t; - - ictm.transform(x, y, &xc, &yc); - if (! getParameter (xc, yc, &t)) - return gFalse; - return (t0 < t1) ? (t > t0 && t < t1) : (t > t1 && t < t0); -} - - -//------------------------------------------------------------------------ -// SplashRadialPattern -//------------------------------------------------------------------------ -#define RADIAL_EPSILON (1. / 1024 / 1024) - -SplashRadialPattern::SplashRadialPattern(SplashColorMode colorModeA, GfxState *stateA, GfxRadialShading *shadingA): - SplashUnivariatePattern(colorModeA, stateA, shadingA) -{ - SplashColor defaultColor; - GfxColor srcColor; - - shadingA->getCoords(&x0, &y0, &r0, &dx, &dy, &dr); - dx -= x0; - dy -= y0; - dr -= r0; - a = dx*dx + dy*dy - dr*dr; - if (fabs(a) > RADIAL_EPSILON) - inva = 1.0 / a; - shadingA->getColorSpace()->getDefaultColor(&srcColor); - convertGfxColor(defaultColor, colorModeA, shadingA->getColorSpace(), &srcColor); -} - -SplashRadialPattern::~SplashRadialPattern() { -} - -GBool SplashRadialPattern::getParameter(double xs, double ys, double *t) { - double b, c, s0, s1; - - // We want to solve this system of equations: - // - // 1. (x - xc(s))^2 + (y -yc(s))^2 = rc(s)^2 - // 2. xc(s) = x0 + s * (x1 - xo) - // 3. yc(s) = y0 + s * (y1 - yo) - // 4. rc(s) = r0 + s * (r1 - ro) - // - // To simplify the system a little, we translate - // our coordinates to have the origin in (x0,y0) - - xs -= x0; - ys -= y0; - - // Then we have to solve the equation: - // A*s^2 - 2*B*s + C = 0 - // where - // A = dx^2 + dy^2 - dr^2 - // B = xs*dx + ys*dy + r0*dr - // C = xs^2 + ys^2 - r0^2 - - b = xs*dx + ys*dy + r0*dr; - c = xs*xs + ys*ys - r0*r0; - - if (fabs(a) <= RADIAL_EPSILON) { - // A is 0, thus the equation simplifies to: - // -2*B*s + C = 0 - // If B is 0, we can either have no solution or an indeterminate - // equation, thus we behave as if we had an invalid solution - if (fabs(b) <= RADIAL_EPSILON) - return gFalse; - - s0 = s1 = 0.5 * c / b; - } else { - double d; - - d = b*b - a*c; - if (d < 0) - return gFalse; - - d = sqrt (d); - s0 = b + d; - s1 = b - d; - - // If A < 0, one of the two solutions will have negative radius, - // thus it will be ignored. Otherwise we know that s1 <= s0 - // (because d >=0 implies b - d <= b + d), so if both are valid it - // will be the true solution. - s0 *= inva; - s1 *= inva; - } - - if (r0 + s0 * dr >= 0) { - if (0 <= s0 && s0 <= 1) { - *t = t0 + dt * s0; - return gTrue; - } else if (s0 < 0 && shading->getExtend0()) { - *t = t0; - return gTrue; - } else if (s0 > 1 && shading->getExtend1()) { - *t = t1; - return gTrue; - } - } - - if (r0 + s1 * dr >= 0) { - if (0 <= s1 && s1 <= 1) { - *t = t0 + dt * s1; - return gTrue; - } else if (s1 < 0 && shading->getExtend0()) { - *t = t0; - return gTrue; - } else if (s1 > 1 && shading->getExtend1()) { - *t = t1; - return gTrue; - } - } - - return gFalse; -} - -#undef RADIAL_EPSILON - -//------------------------------------------------------------------------ -// SplashAxialPattern -//------------------------------------------------------------------------ - -SplashAxialPattern::SplashAxialPattern(SplashColorMode colorModeA, GfxState *stateA, GfxAxialShading *shadingA): - SplashUnivariatePattern(colorModeA, stateA, shadingA) -{ - SplashColor defaultColor; - GfxColor srcColor; - - shadingA->getCoords(&x0, &y0, &x1, &y1); - dx = x1 - x0; - dy = y1 - y0; - const double mul_denominator = (dx * dx + dy * dy); - if (unlikely(mul_denominator == 0)) { - mul = 0; - } else { - mul = 1 / mul_denominator; - } - shadingA->getColorSpace()->getDefaultColor(&srcColor); - convertGfxColor(defaultColor, colorModeA, shadingA->getColorSpace(), &srcColor); -} - -SplashAxialPattern::~SplashAxialPattern() { -} - -GBool SplashAxialPattern::getParameter(double xc, double yc, double *t) { - double s; - - xc -= x0; - yc -= y0; - - s = (xc * dx + yc * dy) * mul; - if (0 <= s && s <= 1) { - *t = t0 + dt * s; - } else if (s < 0 && shading->getExtend0()) { - *t = t0; - } else if (s > 1 && shading->getExtend1()) { - *t = t1; - } else { - return gFalse; - } - - return gTrue; -} - -//------------------------------------------------------------------------ -// Type 3 font cache size parameters -#define type3FontCacheAssoc 8 -#define type3FontCacheMaxSets 8 -#define type3FontCacheSize (128*1024) - -//------------------------------------------------------------------------ -// Divide a 16-bit value (in [0, 255*255]) by 255, returning an 8-bit result. -static inline Guchar div255(int x) { - return (Guchar)((x + (x >> 8) + 0x80) >> 8); -} - -#ifdef SPLASH_CMYK - -#include "GfxState_helpers.h" - -//------------------------------------------------------------------------- -// helper for Blend functions (convert CMYK to RGB, do blend, convert back) -//------------------------------------------------------------------------- - -// based in GfxState.cc - -static void cmykToRGB(SplashColorPtr cmyk, SplashColor rgb) { - double c, m, y, k, c1, m1, y1, k1, r, g, b; - - c = colToDbl(byteToCol(cmyk[0])); - m = colToDbl(byteToCol(cmyk[1])); - y = colToDbl(byteToCol(cmyk[2])); - k = colToDbl(byteToCol(cmyk[3])); - c1 = 1 - c; - m1 = 1 - m; - y1 = 1 - y; - k1 = 1 - k; - cmykToRGBMatrixMultiplication(c, m, y, k, c1, m1, y1, k1, r, g, b); - rgb[0] = colToByte(clip01(dblToCol(r))); - rgb[1] = colToByte(clip01(dblToCol(g))); - rgb[2] = colToByte(clip01(dblToCol(b))); -} - -static void rgbToCMYK(SplashColor rgb, SplashColorPtr cmyk) { - GfxColorComp c, m, y, k; - - c = clip01(gfxColorComp1 - byteToCol(rgb[0])); - m = clip01(gfxColorComp1 - byteToCol(rgb[1])); - y = clip01(gfxColorComp1 - byteToCol(rgb[2])); - k = c; - if (m < k) { - k = m; - } - if (y < k) { - k = y; - } - cmyk[0] = colToByte(c - k); - cmyk[1] = colToByte(m - k); - cmyk[2] = colToByte(y - k); - cmyk[3] = colToByte(k); -} - -#endif - -//------------------------------------------------------------------------ -// Blend functions -//------------------------------------------------------------------------ - -static void splashOutBlendMultiply(SplashColorPtr src, SplashColorPtr dest, - SplashColorPtr blend, SplashColorMode cm) { - int i; - -#ifdef SPLASH_CMYK - if (cm == splashModeCMYK8 || cm == splashModeDeviceN8) { - for (i = 0; i < splashColorModeNComps[cm]; ++i) { - dest[i] = 255 - dest[i]; - src[i] = 255 - src[i]; - } - } -#endif - { - for (i = 0; i < splashColorModeNComps[cm]; ++i) { - blend[i] = (dest[i] * src[i]) / 255; - } - } -#ifdef SPLASH_CMYK - if (cm == splashModeCMYK8 || cm == splashModeDeviceN8) { - for (i = 0; i < splashColorModeNComps[cm]; ++i) { - dest[i] = 255 - dest[i]; - src[i] = 255 - src[i]; - blend[i] = 255 - blend[i]; - } - } -#endif -} - -static void splashOutBlendScreen(SplashColorPtr src, SplashColorPtr dest, - SplashColorPtr blend, SplashColorMode cm) { - int i; - -#ifdef SPLASH_CMYK - if (cm == splashModeCMYK8 || cm == splashModeDeviceN8) { - for (i = 0; i < splashColorModeNComps[cm]; ++i) { - dest[i] = 255 - dest[i]; - src[i] = 255 - src[i]; - } - } -#endif - { - for (i = 0; i < splashColorModeNComps[cm]; ++i) { - blend[i] = dest[i] + src[i] - (dest[i] * src[i]) / 255; - } - } -#ifdef SPLASH_CMYK - if (cm == splashModeCMYK8 || cm == splashModeDeviceN8) { - for (i = 0; i < splashColorModeNComps[cm]; ++i) { - dest[i] = 255 - dest[i]; - src[i] = 255 - src[i]; - blend[i] = 255 - blend[i]; - } - } -#endif -} - -static void splashOutBlendOverlay(SplashColorPtr src, SplashColorPtr dest, - SplashColorPtr blend, SplashColorMode cm) { - int i; - -#ifdef SPLASH_CMYK - if (cm == splashModeCMYK8 || cm == splashModeDeviceN8) { - for (i = 0; i < splashColorModeNComps[cm]; ++i) { - dest[i] = 255 - dest[i]; - src[i] = 255 - src[i]; - } - } -#endif - { - for (i = 0; i < splashColorModeNComps[cm]; ++i) { - blend[i] = dest[i] < 0x80 - ? (src[i] * 2 * dest[i]) / 255 - : 255 - 2 * ((255 - src[i]) * (255 - dest[i])) / 255; - } - } -#ifdef SPLASH_CMYK - if (cm == splashModeCMYK8 || cm == splashModeDeviceN8) { - for (i = 0; i < splashColorModeNComps[cm]; ++i) { - dest[i] = 255 - dest[i]; - src[i] = 255 - src[i]; - blend[i] = 255 - blend[i]; - } - } -#endif -} - -static void splashOutBlendDarken(SplashColorPtr src, SplashColorPtr dest, - SplashColorPtr blend, SplashColorMode cm) { - int i; - -#ifdef SPLASH_CMYK - if (cm == splashModeCMYK8 || cm == splashModeDeviceN8) { - for (i = 0; i < splashColorModeNComps[cm]; ++i) { - dest[i] = 255 - dest[i]; - src[i] = 255 - src[i]; - } - } -#endif - { - for (i = 0; i < splashColorModeNComps[cm]; ++i) { - blend[i] = dest[i] < src[i] ? dest[i] : src[i]; - } - } -#ifdef SPLASH_CMYK - if (cm == splashModeCMYK8 || cm == splashModeDeviceN8) { - for (i = 0; i < splashColorModeNComps[cm]; ++i) { - dest[i] = 255 - dest[i]; - src[i] = 255 - src[i]; - blend[i] = 255 - blend[i]; - } - } -#endif -} - -static void splashOutBlendLighten(SplashColorPtr src, SplashColorPtr dest, - SplashColorPtr blend, SplashColorMode cm) { - int i; - -#ifdef SPLASH_CMYK - if (cm == splashModeCMYK8 || cm == splashModeDeviceN8) { - for (i = 0; i < splashColorModeNComps[cm]; ++i) { - dest[i] = 255 - dest[i]; - src[i] = 255 - src[i]; - } - } -#endif - { - for (i = 0; i < splashColorModeNComps[cm]; ++i) { - blend[i] = dest[i] > src[i] ? dest[i] : src[i]; - } - } -#ifdef SPLASH_CMYK - if (cm == splashModeCMYK8 || cm == splashModeDeviceN8) { - for (i = 0; i < splashColorModeNComps[cm]; ++i) { - dest[i] = 255 - dest[i]; - src[i] = 255 - src[i]; - blend[i] = 255 - blend[i]; - } - } -#endif -} - -static void splashOutBlendColorDodge(SplashColorPtr src, SplashColorPtr dest, - SplashColorPtr blend, - SplashColorMode cm) { - int i, x; - -#ifdef SPLASH_CMYK - if (cm == splashModeCMYK8 || cm == splashModeDeviceN8) { - for (i = 0; i < splashColorModeNComps[cm]; ++i) { - dest[i] = 255 - dest[i]; - src[i] = 255 - src[i]; - } - } -#endif - { - for (i = 0; i < splashColorModeNComps[cm]; ++i) { - if (src[i] == 255) { - blend[i] = 255; - } else { - x = (dest[i] * 255) / (255 - src[i]); - blend[i] = x <= 255 ? x : 255; - } - } - } -#ifdef SPLASH_CMYK - if (cm == splashModeCMYK8 || cm == splashModeDeviceN8) { - for (i = 0; i < splashColorModeNComps[cm]; ++i) { - dest[i] = 255 - dest[i]; - src[i] = 255 - src[i]; - blend[i] = 255 - blend[i]; - } - } -#endif -} - -static void splashOutBlendColorBurn(SplashColorPtr src, SplashColorPtr dest, - SplashColorPtr blend, SplashColorMode cm) { - int i, x; - -#ifdef SPLASH_CMYK - if (cm == splashModeCMYK8 || cm == splashModeDeviceN8) { - for (i = 0; i < splashColorModeNComps[cm]; ++i) { - dest[i] = 255 - dest[i]; - src[i] = 255 - src[i]; - } - } -#endif - { - for (i = 0; i < splashColorModeNComps[cm]; ++i) { - if (src[i] == 0) { - blend[i] = 0; - } else { - x = ((255 - dest[i]) * 255) / src[i]; - blend[i] = x <= 255 ? 255 - x : 0; - } - } - } -#ifdef SPLASH_CMYK - if (cm == splashModeCMYK8 || cm == splashModeDeviceN8) { - for (i = 0; i < splashColorModeNComps[cm]; ++i) { - dest[i] = 255 - dest[i]; - src[i] = 255 - src[i]; - blend[i] = 255 - blend[i]; - } - } -#endif -} - -static void splashOutBlendHardLight(SplashColorPtr src, SplashColorPtr dest, - SplashColorPtr blend, SplashColorMode cm) { - int i; - -#ifdef SPLASH_CMYK - if (cm == splashModeCMYK8 || cm == splashModeDeviceN8) { - for (i = 0; i < splashColorModeNComps[cm]; ++i) { - dest[i] = 255 - dest[i]; - src[i] = 255 - src[i]; - } - } -#endif - { - for (i = 0; i < splashColorModeNComps[cm]; ++i) { - blend[i] = src[i] < 0x80 - ? (dest[i] * 2 * src[i]) / 255 - : 255 - 2 * ((255 - dest[i]) * (255 - src[i])) / 255; - } - } -#ifdef SPLASH_CMYK - if (cm == splashModeCMYK8 || cm == splashModeDeviceN8) { - for (i = 0; i < splashColorModeNComps[cm]; ++i) { - dest[i] = 255 - dest[i]; - src[i] = 255 - src[i]; - blend[i] = 255 - blend[i]; - } - } -#endif -} - -static void splashOutBlendSoftLight(SplashColorPtr src, SplashColorPtr dest, - SplashColorPtr blend, SplashColorMode cm) { - int i, x; - -#ifdef SPLASH_CMYK - if (cm == splashModeCMYK8 || cm == splashModeDeviceN8) { - for (i = 0; i < splashColorModeNComps[cm]; ++i) { - dest[i] = 255 - dest[i]; - src[i] = 255 - src[i]; - } - } -#endif - { - for (i = 0; i < splashColorModeNComps[cm]; ++i) { - if (src[i] < 0x80) { - blend[i] = dest[i] - (255 - 2 * src[i]) * dest[i] * (255 - dest[i]) / (255 * 255); - } else { - if (dest[i] < 0x40) { - x = (((((16 * dest[i] - 12 * 255) * dest[i]) / 255) + 4 * 255) * dest[i]) / 255; - } else { - x = (int)sqrt(255.0 * dest[i]); - } - blend[i] = dest[i] + (2 * src[i] - 255) * (x - dest[i]) / 255; - } - } - } -#ifdef SPLASH_CMYK - if (cm == splashModeCMYK8 || cm == splashModeDeviceN8) { - for (i = 0; i < splashColorModeNComps[cm]; ++i) { - dest[i] = 255 - dest[i]; - src[i] = 255 - src[i]; - blend[i] = 255 - blend[i]; - } - } -#endif -} - -static void splashOutBlendDifference(SplashColorPtr src, SplashColorPtr dest, - SplashColorPtr blend, - SplashColorMode cm) { - int i; - -#ifdef SPLASH_CMYK - if (cm == splashModeCMYK8 || cm == splashModeDeviceN8) { - for (i = 0; i < splashColorModeNComps[cm]; ++i) { - dest[i] = 255 - dest[i]; - src[i] = 255 - src[i]; - } - } -#endif - { - for (i = 0; i < splashColorModeNComps[cm]; ++i) { - blend[i] = dest[i] < src[i] ? src[i] - dest[i] : dest[i] - src[i]; - } - } -#ifdef SPLASH_CMYK - if (cm == splashModeCMYK8 || cm == splashModeDeviceN8) { - for (i = 0; i < splashColorModeNComps[cm]; ++i) { - dest[i] = 255 - dest[i]; - src[i] = 255 - src[i]; - blend[i] = 255 - blend[i]; - } - } - if (cm == splashModeDeviceN8) { - for (i = 4; i < splashColorModeNComps[cm]; ++i) { - if (dest[i] == 0 && src[i] == 0) - blend[i] = 0; - } - } -#endif -} - -static void splashOutBlendExclusion(SplashColorPtr src, SplashColorPtr dest, - SplashColorPtr blend, SplashColorMode cm) { - int i; - -#ifdef SPLASH_CMYK - if (cm == splashModeCMYK8 || cm == splashModeDeviceN8) { - for (i = 0; i < splashColorModeNComps[cm]; ++i) { - dest[i] = 255 - dest[i]; - src[i] = 255 - src[i]; - } - } -#endif - { - for (i = 0; i < splashColorModeNComps[cm]; ++i) { - blend[i] = dest[i] + src[i] - (2 * dest[i] * src[i]) / 255; - } - } -#ifdef SPLASH_CMYK - if (cm == splashModeCMYK8 || cm == splashModeDeviceN8) { - for (i = 0; i < splashColorModeNComps[cm]; ++i) { - dest[i] = 255 - dest[i]; - src[i] = 255 - src[i]; - blend[i] = 255 - blend[i]; - } - } - if (cm == splashModeDeviceN8) { - for (i = 4; i < splashColorModeNComps[cm]; ++i) { - if (dest[i] == 0 && src[i] == 0) - blend[i] = 0; - } - } -#endif -} - -static int getLum(int r, int g, int b) { - return (int)(0.3 * r + 0.59 * g + 0.11 * b); -} - -static int getSat(int r, int g, int b) { - int rgbMin, rgbMax; - - rgbMin = rgbMax = r; - if (g < rgbMin) { - rgbMin = g; - } else if (g > rgbMax) { - rgbMax = g; - } - if (b < rgbMin) { - rgbMin = b; - } else if (b > rgbMax) { - rgbMax = b; - } - return rgbMax - rgbMin; -} - -static void clipColor(int rIn, int gIn, int bIn, - Guchar *rOut, Guchar *gOut, Guchar *bOut) { - int lum, rgbMin, rgbMax; - - lum = getLum(rIn, gIn, bIn); - rgbMin = rgbMax = rIn; - if (gIn < rgbMin) { - rgbMin = gIn; - } else if (gIn > rgbMax) { - rgbMax = gIn; - } - if (bIn < rgbMin) { - rgbMin = bIn; - } else if (bIn > rgbMax) { - rgbMax = bIn; - } - if (rgbMin < 0) { - *rOut = (Guchar)(lum + ((rIn - lum) * lum) / (lum - rgbMin)); - *gOut = (Guchar)(lum + ((gIn - lum) * lum) / (lum - rgbMin)); - *bOut = (Guchar)(lum + ((bIn - lum) * lum) / (lum - rgbMin)); - } else if (rgbMax > 255) { - *rOut = (Guchar)(lum + ((rIn - lum) * (255 - lum)) / (rgbMax - lum)); - *gOut = (Guchar)(lum + ((gIn - lum) * (255 - lum)) / (rgbMax - lum)); - *bOut = (Guchar)(lum + ((bIn - lum) * (255 - lum)) / (rgbMax - lum)); - } else { - *rOut = rIn; - *gOut = gIn; - *bOut = bIn; - } -} - -static void setLum(Guchar rIn, Guchar gIn, Guchar bIn, int lum, - Guchar *rOut, Guchar *gOut, Guchar *bOut) { - int d; - - d = lum - getLum(rIn, gIn, bIn); - clipColor(rIn + d, gIn + d, bIn + d, rOut, gOut, bOut); -} - -static void setSat(Guchar rIn, Guchar gIn, Guchar bIn, int sat, - Guchar *rOut, Guchar *gOut, Guchar *bOut) { - int rgbMin, rgbMid, rgbMax; - Guchar *minOut, *midOut, *maxOut; - - if (rIn < gIn) { - rgbMin = rIn; minOut = rOut; - rgbMid = gIn; midOut = gOut; - } else { - rgbMin = gIn; minOut = gOut; - rgbMid = rIn; midOut = rOut; - } - if (bIn > rgbMid) { - rgbMax = bIn; maxOut = bOut; - } else if (bIn > rgbMin) { - rgbMax = rgbMid; maxOut = midOut; - rgbMid = bIn; midOut = bOut; - } else { - rgbMax = rgbMid; maxOut = midOut; - rgbMid = rgbMin; midOut = minOut; - rgbMin = bIn; minOut = bOut; - } - if (rgbMax > rgbMin) { - *midOut = (Guchar)((rgbMid - rgbMin) * sat) / (rgbMax - rgbMin); - *maxOut = (Guchar)sat; - } else { - *midOut = *maxOut = 0; - } - *minOut = 0; -} - -static void splashOutBlendHue(SplashColorPtr src, SplashColorPtr dest, - SplashColorPtr blend, SplashColorMode cm) { - Guchar r0, g0, b0; -#ifdef SPLASH_CMYK - Guchar r1, g1, b1; - int i; - SplashColor src2, dest2; -#endif - - switch (cm) { - case splashModeMono1: - case splashModeMono8: - blend[0] = dest[0]; - break; - case splashModeXBGR8: - src[3] = 255; - // fallthrough - case splashModeRGB8: - case splashModeBGR8: - setSat(src[0], src[1], src[2], getSat(dest[0], dest[1], dest[2]), - &r0, &g0, &b0); - setLum(r0, g0, b0, getLum(dest[0], dest[1], dest[2]), - &blend[0], &blend[1], &blend[2]); - break; -#ifdef SPLASH_CMYK - case splashModeCMYK8: - case splashModeDeviceN8: - for (i = 0; i < 4; i++) { - // convert to additive - src2[i] = 0xff - src[i]; - dest2[i] = 0xff - dest[i]; - } - // NB: inputs have already been converted to additive mode - setSat(src2[0], src2[1], src2[2], getSat(dest2[0], dest2[1], dest2[2]), - &r0, &g0, &b0); - setLum(r0, g0, b0, getLum(dest2[0], dest2[1], dest2[2]), - &r1, &g1, &b1); - blend[0] = r1; - blend[1] = g1; - blend[2] = b1; - blend[3] = dest2[3]; - for (i = 0; i < 4; i++) { - // convert back to subtractive - blend[i] = 0xff - blend[i]; - } - break; -#endif - } -} - -static void splashOutBlendSaturation(SplashColorPtr src, SplashColorPtr dest, - SplashColorPtr blend, - SplashColorMode cm) { - Guchar r0, g0, b0; -#ifdef SPLASH_CMYK - Guchar r1, g1, b1; - int i; - SplashColor src2, dest2; -#endif - - switch (cm) { - case splashModeMono1: - case splashModeMono8: - blend[0] = dest[0]; - break; - case splashModeXBGR8: - src[3] = 255; - // fallthrough - case splashModeRGB8: - case splashModeBGR8: - setSat(dest[0], dest[1], dest[2], getSat(src[0], src[1], src[2]), - &r0, &g0, &b0); - setLum(r0, g0, b0, getLum(dest[0], dest[1], dest[2]), - &blend[0], &blend[1], &blend[2]); - break; -#ifdef SPLASH_CMYK - case splashModeCMYK8: - case splashModeDeviceN8: - for (i = 0; i < 4; i++) { - // convert to additive - src2[i] = 0xff - src[i]; - dest2[i] = 0xff - dest[i]; - } - setSat(dest2[0], dest2[1], dest2[2], getSat(src2[0], src2[1], src2[2]), - &r0, &g0, &b0); - setLum(r0, g0, b0, getLum(dest2[0], dest2[1], dest2[2]), - &r1, &g1, &b1); - blend[0] = r1; - blend[1] = g1; - blend[2] = b1; - blend[3] = dest2[3]; - for (i = 0; i < 4; i++) { - // convert back to subtractive - blend[i] = 0xff - blend[i]; - } - break; -#endif - } -} - -static void splashOutBlendColor(SplashColorPtr src, SplashColorPtr dest, - SplashColorPtr blend, SplashColorMode cm) { -#ifdef SPLASH_CMYK - Guchar r, g, b; - int i; - SplashColor src2, dest2; -#endif - - switch (cm) { - case splashModeMono1: - case splashModeMono8: - blend[0] = dest[0]; - break; - case splashModeXBGR8: - src[3] = 255; - // fallthrough - case splashModeRGB8: - case splashModeBGR8: - setLum(src[0], src[1], src[2], getLum(dest[0], dest[1], dest[2]), - &blend[0], &blend[1], &blend[2]); - break; -#ifdef SPLASH_CMYK - case splashModeCMYK8: - case splashModeDeviceN8: - for (i = 0; i < 4; i++) { - // convert to additive - src2[i] = 0xff - src[i]; - dest2[i] = 0xff - dest[i]; - } - setLum(src2[0], src2[1], src2[2], getLum(dest2[0], dest2[1], dest2[2]), - &r, &g, &b); - blend[0] = r; - blend[1] = g; - blend[2] = b; - blend[3] = dest2[3]; - for (i = 0; i < 4; i++) { - // convert back to subtractive - blend[i] = 0xff - blend[i]; - } - break; -#endif - } -} - -static void splashOutBlendLuminosity(SplashColorPtr src, SplashColorPtr dest, - SplashColorPtr blend, - SplashColorMode cm) { -#ifdef SPLASH_CMYK - Guchar r, g, b; - int i; - SplashColor src2, dest2; -#endif - - switch (cm) { - case splashModeMono1: - case splashModeMono8: - blend[0] = dest[0]; - break; - case splashModeXBGR8: - src[3] = 255; - // fallthrough - case splashModeRGB8: - case splashModeBGR8: - setLum(dest[0], dest[1], dest[2], getLum(src[0], src[1], src[2]), - &blend[0], &blend[1], &blend[2]); - break; -#ifdef SPLASH_CMYK - case splashModeCMYK8: - case splashModeDeviceN8: - for (i = 0; i < 4; i++) { - // convert to additive - src2[i] = 0xff - src[i]; - dest2[i] = 0xff - dest[i]; - } - setLum(dest2[0], dest2[1], dest2[2], getLum(src2[0], src2[1], src2[2]), - &r, &g, &b); - blend[0] = r; - blend[1] = g; - blend[2] = b; - blend[3] = src2[3]; - for (i = 0; i < 4; i++) { - // convert back to subtractive - blend[i] = 0xff - blend[i]; - } - break; -#endif - } -} - -// NB: This must match the GfxBlendMode enum defined in GfxState.h. -static const SplashBlendFunc splashOutBlendFuncs[] = { - nullptr, - &splashOutBlendMultiply, - &splashOutBlendScreen, - &splashOutBlendOverlay, - &splashOutBlendDarken, - &splashOutBlendLighten, - &splashOutBlendColorDodge, - &splashOutBlendColorBurn, - &splashOutBlendHardLight, - &splashOutBlendSoftLight, - &splashOutBlendDifference, - &splashOutBlendExclusion, - &splashOutBlendHue, - &splashOutBlendSaturation, - &splashOutBlendColor, - &splashOutBlendLuminosity -}; - -//------------------------------------------------------------------------ -// SplashOutFontFileID -//------------------------------------------------------------------------ - -class SplashOutFontFileID: public SplashFontFileID { -public: - - SplashOutFontFileID(const Ref *rA) { r = *rA; } - - ~SplashOutFontFileID() {} - - GBool matches(SplashFontFileID *id) override { - return ((SplashOutFontFileID *)id)->r.num == r.num && - ((SplashOutFontFileID *)id)->r.gen == r.gen; - } - -private: - - Ref r; -}; - -//------------------------------------------------------------------------ -// T3FontCache -//------------------------------------------------------------------------ - -struct T3FontCacheTag { - Gushort code; - Gushort mru; // valid bit (0x8000) and MRU index -}; - -class T3FontCache { -public: - - T3FontCache(const Ref *fontID, double m11A, double m12A, - double m21A, double m22A, - int glyphXA, int glyphYA, int glyphWA, int glyphHA, - GBool aa, GBool validBBoxA); - ~T3FontCache(); - T3FontCache(const T3FontCache &) = delete; - T3FontCache& operator=(const T3FontCache &) = delete; - GBool matches(const Ref *idA, double m11A, double m12A, - double m21A, double m22A) - { return fontID.num == idA->num && fontID.gen == idA->gen && - m11 == m11A && m12 == m12A && m21 == m21A && m22 == m22A; } - - Ref fontID; // PDF font ID - double m11, m12, m21, m22; // transform matrix - int glyphX, glyphY; // pixel offset of glyph bitmaps - int glyphW, glyphH; // size of glyph bitmaps, in pixels - GBool validBBox; // false if the bbox was [0 0 0 0] - int glyphSize; // size of glyph bitmaps, in bytes - int cacheSets; // number of sets in cache - int cacheAssoc; // cache associativity (glyphs per set) - Guchar *cacheData; // glyph pixmap cache - T3FontCacheTag *cacheTags; // cache tags, i.e., char codes -}; - -T3FontCache::T3FontCache(const Ref *fontIDA, double m11A, double m12A, - double m21A, double m22A, - int glyphXA, int glyphYA, int glyphWA, int glyphHA, - GBool validBBoxA, GBool aa) { - - fontID = *fontIDA; - m11 = m11A; - m12 = m12A; - m21 = m21A; - m22 = m22A; - glyphX = glyphXA; - glyphY = glyphYA; - glyphW = glyphWA; - glyphH = glyphHA; - validBBox = validBBoxA; - // sanity check for excessively large glyphs (which most likely - // indicate an incorrect BBox) - if (glyphW > INT_MAX / glyphH || glyphW <= 0 || glyphH <= 0 || glyphW * glyphH > 100000) { - glyphW = glyphH = 100; - validBBox = gFalse; - } - if (aa) { - glyphSize = glyphW * glyphH; - } else { - glyphSize = ((glyphW + 7) >> 3) * glyphH; - } - cacheAssoc = type3FontCacheAssoc; - for (cacheSets = type3FontCacheMaxSets; - cacheSets > 1 && - cacheSets * cacheAssoc * glyphSize > type3FontCacheSize; - cacheSets >>= 1) ; - if (glyphSize < 10485760 / cacheAssoc / cacheSets) { - cacheData = (Guchar *)gmallocn_checkoverflow(cacheSets * cacheAssoc, glyphSize); - } else { - error(errSyntaxWarning, -1, "Not creating cacheData for T3FontCache, it asked for too much memory.\n" - " This could teoretically result in wrong rendering,\n" - " but most probably the document is bogus.\n" - " Please report a bug if you think the rendering may be wrong because of this."); - cacheData = nullptr; - } - if (cacheData != nullptr) - { - cacheTags = (T3FontCacheTag *)gmallocn(cacheSets * cacheAssoc, - sizeof(T3FontCacheTag)); - for (int i = 0; i < cacheSets * cacheAssoc; ++i) { - cacheTags[i].mru = i & (cacheAssoc - 1); - } - } - else - { - cacheTags = nullptr; - } -} - -T3FontCache::~T3FontCache() { - gfree(cacheData); - gfree(cacheTags); -} - -struct T3GlyphStack { - Gushort code; // character code - - GBool haveDx; // set after seeing a d0/d1 operator - GBool doNotCache; // set if we see a gsave/grestore before - // the d0/d1 - - //----- cache info - T3FontCache *cache; // font cache for the current font - T3FontCacheTag *cacheTag; // pointer to cache tag for the glyph - Guchar *cacheData; // pointer to cache data for the glyph - - //----- saved state - SplashBitmap *origBitmap; - Splash *origSplash; - double origCTM4, origCTM5; - - T3GlyphStack *next; // next object on stack -}; - -//------------------------------------------------------------------------ -// SplashTransparencyGroup -//------------------------------------------------------------------------ - -struct SplashTransparencyGroup { - int tx, ty; // translation coordinates - SplashBitmap *tBitmap; // bitmap for transparency group - SplashBitmap *softmask; // bitmap for softmasks - GfxColorSpace *blendingColorSpace; - GBool isolated; - - //----- for knockout - SplashBitmap *shape; - GBool knockout; - SplashCoord knockoutOpacity; - GBool fontAA; - - //----- saved state - SplashBitmap *origBitmap; - Splash *origSplash; - - SplashTransparencyGroup *next; -}; - -//------------------------------------------------------------------------ -// SplashOutputDev -//------------------------------------------------------------------------ - -SplashOutputDev::SplashOutputDev(SplashColorMode colorModeA, - int bitmapRowPadA, - GBool reverseVideoA, - SplashColorPtr paperColorA, - GBool bitmapTopDownA, - SplashThinLineMode thinLineMode, - GBool overprintPreviewA) { - colorMode = colorModeA; - bitmapRowPad = bitmapRowPadA; - bitmapTopDown = bitmapTopDownA; - bitmapUpsideDown = gFalse; - fontAntialias = gTrue; - vectorAntialias = gTrue; - overprintPreview = overprintPreviewA; - enableFreeTypeHinting = gFalse; - enableSlightHinting = gFalse; - setupScreenParams(72.0, 72.0); - reverseVideo = reverseVideoA; - if (paperColorA != nullptr) { - splashColorCopy(paperColor, paperColorA); - } else { - splashClearColor(paperColor); - } - skipHorizText = gFalse; - skipRotatedText = gFalse; - keepAlphaChannel = paperColorA == nullptr; - - doc = nullptr; - - bitmap = new SplashBitmap(1, 1, bitmapRowPad, colorMode, - colorMode != splashModeMono1, bitmapTopDown); - splash = new Splash(bitmap, vectorAntialias, &screenParams); - splash->setMinLineWidth(s_minLineWidth); - splash->setThinLineMode(thinLineMode); - splash->clear(paperColor, 0); - - fontEngine = nullptr; - - nT3Fonts = 0; - t3GlyphStack = nullptr; - - font = nullptr; - needFontUpdate = gFalse; - textClipPath = nullptr; - transpGroupStack = nullptr; - nestCount = 0; - xref = nullptr; -} - -void SplashOutputDev::setupScreenParams(double hDPI, double vDPI) { - screenParams.size = -1; - screenParams.dotRadius = -1; - screenParams.gamma = (SplashCoord)1.0; - screenParams.blackThreshold = (SplashCoord)0.0; - screenParams.whiteThreshold = (SplashCoord)1.0; - - // use clustered dithering for resolution >= 300 dpi - // (compare to 299.9 to avoid floating point issues) - if (hDPI > 299.9 && vDPI > 299.9) { - screenParams.type = splashScreenStochasticClustered; - if (screenParams.size < 0) { - screenParams.size = 64; - } - if (screenParams.dotRadius < 0) { - screenParams.dotRadius = 2; - } - } else { - screenParams.type = splashScreenDispersed; - if (screenParams.size < 0) { - screenParams.size = 4; - } - } -} - -SplashOutputDev::~SplashOutputDev() { - int i; - - for (i = 0; i < nT3Fonts; ++i) { - delete t3FontCache[i]; - } - if (fontEngine) { - delete fontEngine; - } - if (splash) { - delete splash; - } - if (bitmap) { - delete bitmap; - } - delete textClipPath; -} - -void SplashOutputDev::startDoc(PDFDoc *docA) { - int i; - - doc = docA; - if (fontEngine) { - delete fontEngine; - } - fontEngine = new SplashFontEngine( - globalParams->getEnableFreeType(), - enableFreeTypeHinting, - enableSlightHinting, - getFontAntialias() && - colorMode != splashModeMono1); - for (i = 0; i < nT3Fonts; ++i) { - delete t3FontCache[i]; - } - nT3Fonts = 0; -} - -void SplashOutputDev::startPage(int pageNum, GfxState *state, XRef *xrefA) { - int w, h; - double *ctm; - SplashCoord mat[6]; - SplashColor color; - - xref = xrefA; - if (state) { - setupScreenParams(state->getHDPI(), state->getVDPI()); - w = (int)(state->getPageWidth() + 0.5); - if (w <= 0) { - w = 1; - } - h = (int)(state->getPageHeight() + 0.5); - if (h <= 0) { - h = 1; - } - } else { - w = h = 1; - } - SplashThinLineMode thinLineMode = splashThinLineDefault; - if (splash) { - thinLineMode = splash->getThinLineMode(); - delete splash; - splash = nullptr; - } - if (!bitmap || w != bitmap->getWidth() || h != bitmap->getHeight()) { - if (bitmap) { - delete bitmap; - bitmap = nullptr; - } - bitmap = new SplashBitmap(w, h, bitmapRowPad, colorMode, - colorMode != splashModeMono1, bitmapTopDown); - if (!bitmap->getDataPtr()) { - delete bitmap; - w = h = 1; - bitmap = new SplashBitmap(w, h, bitmapRowPad, colorMode, - colorMode != splashModeMono1, bitmapTopDown); - } - } - splash = new Splash(bitmap, vectorAntialias, &screenParams); - splash->setThinLineMode(thinLineMode); - splash->setMinLineWidth(s_minLineWidth); - if (state) { - ctm = state->getCTM(); - mat[0] = (SplashCoord)ctm[0]; - mat[1] = (SplashCoord)ctm[1]; - mat[2] = (SplashCoord)ctm[2]; - mat[3] = (SplashCoord)ctm[3]; - mat[4] = (SplashCoord)ctm[4]; - mat[5] = (SplashCoord)ctm[5]; - splash->setMatrix(mat); - } - switch (colorMode) { - case splashModeMono1: - case splashModeMono8: - color[0] = 0; - break; - case splashModeXBGR8: - color[3] = 255; - // fallthrough - case splashModeRGB8: - case splashModeBGR8: - color[0] = color[1] = color[2] = 0; - break; -#ifdef SPLASH_CMYK - case splashModeCMYK8: - color[0] = color[1] = color[2] = color[3] = 0; - break; - case splashModeDeviceN8: - for (int i = 0; i < 4 + SPOT_NCOMPS; i++) - color[i] = 0; - break; -#endif - } - splash->setStrokePattern(new SplashSolidColor(color)); - splash->setFillPattern(new SplashSolidColor(color)); - splash->setLineCap(splashLineCapButt); - splash->setLineJoin(splashLineJoinMiter); - splash->setLineDash(nullptr, 0, 0); - splash->setMiterLimit(10); - splash->setFlatness(1); - // the SA parameter supposedly defaults to false, but Acrobat - // apparently hardwires it to true - splash->setStrokeAdjust(gTrue); - splash->clear(paperColor, 0); -} - -void SplashOutputDev::endPage() { - if (colorMode != splashModeMono1 && !keepAlphaChannel) { - splash->compositeBackground(paperColor); - } -} - -void SplashOutputDev::saveState(GfxState *state) { - splash->saveState(); - if (t3GlyphStack && !t3GlyphStack->haveDx) { - t3GlyphStack->doNotCache = gTrue; - error(errSyntaxWarning, -1, - "Save (q) operator before d0/d1 in Type 3 glyph"); - } -} - -void SplashOutputDev::restoreState(GfxState *state) { - splash->restoreState(); - needFontUpdate = gTrue; - if (t3GlyphStack && !t3GlyphStack->haveDx) { - t3GlyphStack->doNotCache = gTrue; - error(errSyntaxWarning, -1, - "Restore (Q) operator before d0/d1 in Type 3 glyph"); - } -} - -void SplashOutputDev::updateAll(GfxState *state) { - updateLineDash(state); - updateLineJoin(state); - updateLineCap(state); - updateLineWidth(state); - updateFlatness(state); - updateMiterLimit(state); - updateStrokeAdjust(state); - updateFillColorSpace(state); - updateFillColor(state); - updateStrokeColorSpace(state); - updateStrokeColor(state); - needFontUpdate = gTrue; -} - -void SplashOutputDev::updateCTM(GfxState *state, double m11, double m12, - double m21, double m22, - double m31, double m32) { - double *ctm; - SplashCoord mat[6]; - - ctm = state->getCTM(); - mat[0] = (SplashCoord)ctm[0]; - mat[1] = (SplashCoord)ctm[1]; - mat[2] = (SplashCoord)ctm[2]; - mat[3] = (SplashCoord)ctm[3]; - mat[4] = (SplashCoord)ctm[4]; - mat[5] = (SplashCoord)ctm[5]; - splash->setMatrix(mat); -} - -void SplashOutputDev::updateLineDash(GfxState *state) { - double *dashPattern; - int dashLength; - double dashStart; - SplashCoord dash[20]; - int i; - - state->getLineDash(&dashPattern, &dashLength, &dashStart); - if (dashLength > 20) { - dashLength = 20; - } - for (i = 0; i < dashLength; ++i) { - dash[i] = (SplashCoord)dashPattern[i]; - if (dash[i] < 0) { - dash[i] = 0; - } - } - splash->setLineDash(dash, dashLength, (SplashCoord)dashStart); -} - -void SplashOutputDev::updateFlatness(GfxState *state) { -#if 0 // Acrobat ignores the flatness setting, and always renders curves - // with a fairly small flatness value - splash->setFlatness(state->getFlatness()); -#endif -} - -void SplashOutputDev::updateLineJoin(GfxState *state) { - splash->setLineJoin(state->getLineJoin()); -} - -void SplashOutputDev::updateLineCap(GfxState *state) { - splash->setLineCap(state->getLineCap()); -} - -void SplashOutputDev::updateMiterLimit(GfxState *state) { - splash->setMiterLimit(state->getMiterLimit()); -} - -void SplashOutputDev::updateLineWidth(GfxState *state) { - splash->setLineWidth(state->getLineWidth()); -} - -void SplashOutputDev::updateStrokeAdjust(GfxState * /*state*/) { -#if 0 // the SA parameter supposedly defaults to false, but Acrobat - // apparently hardwires it to true - splash->setStrokeAdjust(state->getStrokeAdjust()); -#endif -} - -void SplashOutputDev::updateFillColorSpace(GfxState *state) { -#ifdef SPLASH_CMYK - if (colorMode == splashModeDeviceN8) - state->getFillColorSpace()->createMapping(bitmap->getSeparationList(), SPOT_NCOMPS); -#endif -} - -void SplashOutputDev::updateStrokeColorSpace(GfxState *state) { -#ifdef SPLASH_CMYK - if (colorMode == splashModeDeviceN8) - state->getStrokeColorSpace()->createMapping(bitmap->getSeparationList(), SPOT_NCOMPS); -#endif -} - -void SplashOutputDev::updateFillColor(GfxState *state) { - GfxGray gray; - GfxRGB rgb; -#ifdef SPLASH_CMYK - GfxCMYK cmyk; - GfxColor deviceN; -#endif - - switch (colorMode) { - case splashModeMono1: - case splashModeMono8: - state->getFillGray(&gray); - splash->setFillPattern(getColor(gray)); - break; - case splashModeXBGR8: - case splashModeRGB8: - case splashModeBGR8: - state->getFillRGB(&rgb); - splash->setFillPattern(getColor(&rgb)); - break; -#ifdef SPLASH_CMYK - case splashModeCMYK8: - state->getFillCMYK(&cmyk); - splash->setFillPattern(getColor(&cmyk)); - break; - case splashModeDeviceN8: - state->getFillDeviceN(&deviceN); - splash->setFillPattern(getColor(&deviceN)); - break; -#endif - } -} - -void SplashOutputDev::updateStrokeColor(GfxState *state) { - GfxGray gray; - GfxRGB rgb; -#ifdef SPLASH_CMYK - GfxCMYK cmyk; - GfxColor deviceN; -#endif - - switch (colorMode) { - case splashModeMono1: - case splashModeMono8: - state->getStrokeGray(&gray); - splash->setStrokePattern(getColor(gray)); - break; - case splashModeXBGR8: - case splashModeRGB8: - case splashModeBGR8: - state->getStrokeRGB(&rgb); - splash->setStrokePattern(getColor(&rgb)); - break; -#ifdef SPLASH_CMYK - case splashModeCMYK8: - state->getStrokeCMYK(&cmyk); - splash->setStrokePattern(getColor(&cmyk)); - break; - case splashModeDeviceN8: - state->getStrokeDeviceN(&deviceN); - splash->setStrokePattern(getColor(&deviceN)); - break; -#endif - } -} - -SplashPattern *SplashOutputDev::getColor(GfxGray gray) { - SplashColor color; - - if (reverseVideo) { - gray = gfxColorComp1 - gray; - } - color[0] = colToByte(gray); - return new SplashSolidColor(color); -} - -SplashPattern *SplashOutputDev::getColor(GfxRGB *rgb) { - GfxColorComp r, g, b; - SplashColor color; - - if (reverseVideo) { - r = gfxColorComp1 - rgb->r; - g = gfxColorComp1 - rgb->g; - b = gfxColorComp1 - rgb->b; - } else { - r = rgb->r; - g = rgb->g; - b = rgb->b; - } - color[0] = colToByte(r); - color[1] = colToByte(g); - color[2] = colToByte(b); - if (colorMode == splashModeXBGR8) color[3] = 255; - return new SplashSolidColor(color); -} - -#ifdef SPLASH_CMYK -SplashPattern *SplashOutputDev::getColor(GfxCMYK *cmyk) { - SplashColor color; - - color[0] = colToByte(cmyk->c); - color[1] = colToByte(cmyk->m); - color[2] = colToByte(cmyk->y); - color[3] = colToByte(cmyk->k); - return new SplashSolidColor(color); -} - -SplashPattern *SplashOutputDev::getColor(GfxColor *deviceN) { - SplashColor color; - - for (int i = 0; i < 4 + SPOT_NCOMPS; i++) - color[i] = colToByte(deviceN->c[i]); - return new SplashSolidColor(color); -} -#endif - -void SplashOutputDev::getMatteColor(SplashColorMode colorMode, GfxImageColorMap *colorMap, GfxColor *matteColorIn, SplashColor matteColor) { - GfxGray gray; - GfxRGB rgb; -#ifdef SPLASH_CMYK - GfxCMYK cmyk; - GfxColor deviceN; -#endif - - switch (colorMode) { - case splashModeMono1: - case splashModeMono8: - colorMap->getColorSpace()->getGray(matteColorIn, &gray); - matteColor[0] = colToByte(gray); - break; - case splashModeRGB8: - case splashModeBGR8: - colorMap->getColorSpace()->getRGB(matteColorIn, &rgb); - matteColor[0] = colToByte(rgb.r); - matteColor[1] = colToByte(rgb.g); - matteColor[2] = colToByte(rgb.b); - break; - case splashModeXBGR8: - colorMap->getColorSpace()->getRGB(matteColorIn, &rgb); - matteColor[0] = colToByte(rgb.r); - matteColor[1] = colToByte(rgb.g); - matteColor[2] = colToByte(rgb.b); - matteColor[3] = 255; - break; -#ifdef SPLASH_CMYK - case splashModeCMYK8: - colorMap->getColorSpace()->getCMYK(matteColorIn, &cmyk); - matteColor[0] = colToByte(cmyk.c); - matteColor[1] = colToByte(cmyk.m); - matteColor[2] = colToByte(cmyk.y); - matteColor[3] = colToByte(cmyk.k); - break; - case splashModeDeviceN8: - colorMap->getColorSpace()->getDeviceN(matteColorIn, &deviceN); - for (int cp = 0; cp < SPOT_NCOMPS+4; cp++) - matteColor[cp] = colToByte(deviceN.c[cp]); - break; -#endif - } -} - -void SplashOutputDev::setOverprintMask(GfxColorSpace *colorSpace, - GBool overprintFlag, - int overprintMode, - GfxColor *singleColor, - GBool grayIndexed) { -#ifdef SPLASH_CMYK - Guint mask; - GfxCMYK cmyk; - GBool additive = gFalse; - int i; - - if (colorSpace->getMode() == csIndexed) { - setOverprintMask(((GfxIndexedColorSpace *)colorSpace)->getBase(), - overprintFlag, - overprintMode, - singleColor, - grayIndexed); - return; - } - if (overprintFlag && overprintPreview) { - mask = colorSpace->getOverprintMask(); - if (singleColor && overprintMode && - colorSpace->getMode() == csDeviceCMYK) { - colorSpace->getCMYK(singleColor, &cmyk); - if (cmyk.c == 0) { - mask &= ~1; - } - if (cmyk.m == 0) { - mask &= ~2; - } - if (cmyk.y == 0) { - mask &= ~4; - } - if (cmyk.k == 0) { - mask &= ~8; - } - } - if (grayIndexed) { - mask &= ~7; - } else if (colorSpace->getMode() == csSeparation) { - GfxSeparationColorSpace *deviceSep = (GfxSeparationColorSpace *)colorSpace; - additive = deviceSep->getName()->cmp("All") != 0 && mask == 0x0f && !deviceSep->isNonMarking(); - } else if (colorSpace->getMode() == csDeviceN) { - GfxDeviceNColorSpace *deviceNCS = (GfxDeviceNColorSpace *)colorSpace; - additive = mask == 0x0f && !deviceNCS->isNonMarking(); - for (i = 0; i < deviceNCS->getNComps() && additive; i++) { - if (deviceNCS->getColorantName(i)->cmp("Cyan") == 0) { - additive = gFalse; - } else if (deviceNCS->getColorantName(i)->cmp("Magenta") == 0) { - additive = gFalse; - } else if (deviceNCS->getColorantName(i)->cmp("Yellow") == 0) { - additive = gFalse; - } else if (deviceNCS->getColorantName(i)->cmp("Black") == 0) { - additive = gFalse; - } - } - } - } else { - mask = 0xffffffff; - } - splash->setOverprintMask(mask, additive); -#endif -} - -void SplashOutputDev::updateBlendMode(GfxState *state) { - splash->setBlendFunc(splashOutBlendFuncs[state->getBlendMode()]); -} - -void SplashOutputDev::updateFillOpacity(GfxState *state) { - splash->setFillAlpha((SplashCoord)state->getFillOpacity()); - if (transpGroupStack != nullptr && (SplashCoord)state->getFillOpacity() < transpGroupStack->knockoutOpacity) { - transpGroupStack->knockoutOpacity = (SplashCoord)state->getFillOpacity(); - } -} - -void SplashOutputDev::updateStrokeOpacity(GfxState *state) { - splash->setStrokeAlpha((SplashCoord)state->getStrokeOpacity()); - if (transpGroupStack != nullptr && (SplashCoord)state->getStrokeOpacity() < transpGroupStack->knockoutOpacity) { - transpGroupStack->knockoutOpacity = (SplashCoord)state->getStrokeOpacity(); - } -} - -void SplashOutputDev::updatePatternOpacity(GfxState *state) { - splash->setPatternAlpha((SplashCoord)state->getStrokeOpacity(), (SplashCoord)state->getFillOpacity()); -} - -void SplashOutputDev::clearPatternOpacity(GfxState *state) { - splash->clearPatternAlpha(); -} - -void SplashOutputDev::updateFillOverprint(GfxState *state) { - splash->setFillOverprint(state->getFillOverprint()); -} - -void SplashOutputDev::updateStrokeOverprint(GfxState *state) { - splash->setStrokeOverprint(state->getStrokeOverprint()); -} - -void SplashOutputDev::updateOverprintMode(GfxState *state) { - splash->setOverprintMode(state->getOverprintMode()); -} - -void SplashOutputDev::updateTransfer(GfxState *state) { - Function **transfer; - Guchar red[256], green[256], blue[256], gray[256]; - double x, y; - int i; - - transfer = state->getTransfer(); - if (transfer[0] && - transfer[0]->getInputSize() == 1 && - transfer[0]->getOutputSize() == 1) { - if (transfer[1] && - transfer[1]->getInputSize() == 1 && - transfer[1]->getOutputSize() == 1 && - transfer[2] && - transfer[2]->getInputSize() == 1 && - transfer[2]->getOutputSize() == 1 && - transfer[3] && - transfer[3]->getInputSize() == 1 && - transfer[3]->getOutputSize() == 1) { - for (i = 0; i < 256; ++i) { - x = i / 255.0; - transfer[0]->transform(&x, &y); - red[i] = (Guchar)(y * 255.0 + 0.5); - transfer[1]->transform(&x, &y); - green[i] = (Guchar)(y * 255.0 + 0.5); - transfer[2]->transform(&x, &y); - blue[i] = (Guchar)(y * 255.0 + 0.5); - transfer[3]->transform(&x, &y); - gray[i] = (Guchar)(y * 255.0 + 0.5); - } - } else { - for (i = 0; i < 256; ++i) { - x = i / 255.0; - transfer[0]->transform(&x, &y); - red[i] = green[i] = blue[i] = gray[i] = (Guchar)(y * 255.0 + 0.5); - } - } - } else { - for (i = 0; i < 256; ++i) { - red[i] = green[i] = blue[i] = gray[i] = (Guchar)i; - } - } - splash->setTransfer(red, green, blue, gray); -} - -void SplashOutputDev::updateFont(GfxState * /*state*/) { - needFontUpdate = gTrue; -} - -void SplashOutputDev::doUpdateFont(GfxState *state) { - GfxFont *gfxFont; - GfxFontLoc *fontLoc; - GfxFontType fontType; - SplashOutFontFileID *id = nullptr; - SplashFontFile *fontFile; - SplashFontSrc *fontsrc = nullptr; - FoFiTrueType *ff; - GooString *fileName; - char *tmpBuf; - int tmpBufLen; - int *codeToGID; - double *textMat; - double m11, m12, m21, m22, fontSize; - int faceIndex = 0; - SplashCoord mat[4]; - int n, i; - GBool recreateFont = gFalse; - GBool doAdjustFontMatrix = gFalse; - - needFontUpdate = gFalse; - font = nullptr; - fileName = nullptr; - tmpBuf = nullptr; - fontLoc = nullptr; - - if (!(gfxFont = state->getFont())) { - goto err1; - } - fontType = gfxFont->getType(); - if (fontType == fontType3) { - goto err1; - } - - // sanity-check the font size - skip anything larger than 10 inches - // (this avoids problems allocating memory for the font cache) - if (state->getTransformedFontSize() - > 10 * (state->getHDPI() + state->getVDPI())) { - goto err1; - } - - // check the font file cache -reload: - delete id; - delete fontLoc; - fontLoc = nullptr; - if (fontsrc && !fontsrc->isFile) { - fontsrc->unref(); - fontsrc = nullptr; - } - - id = new SplashOutFontFileID(gfxFont->getID()); - if ((fontFile = fontEngine->getFontFile(id))) { - delete id; - - } else { - - if (!(fontLoc = gfxFont->locateFont((xref) ? xref : doc->getXRef(), nullptr))) { - error(errSyntaxError, -1, "Couldn't find a font for '{0:s}'", - gfxFont->getName() ? gfxFont->getName()->getCString() - : "(unnamed)"); - goto err2; - } - - // embedded font - if (fontLoc->locType == gfxFontLocEmbedded) { - // if there is an embedded font, read it to memory - tmpBuf = gfxFont->readEmbFontFile((xref) ? xref : doc->getXRef(), &tmpBufLen); - if (! tmpBuf) - goto err2; - - // external font - } else { // gfxFontLocExternal - fileName = fontLoc->path; - fontType = fontLoc->fontType; - doAdjustFontMatrix = gTrue; - } - - fontsrc = new SplashFontSrc; - if (fileName) - fontsrc->setFile(fileName, gFalse); - else - fontsrc->setBuf(tmpBuf, tmpBufLen, gTrue); - - // load the font file - switch (fontType) { - case fontType1: - if (!(fontFile = fontEngine->loadType1Font( - id, - fontsrc, - (const char **)((Gfx8BitFont *)gfxFont)->getEncoding()))) { - error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", - gfxFont->getName() ? gfxFont->getName()->getCString() - : "(unnamed)"); - if (gfxFont->invalidateEmbeddedFont()) goto reload; - goto err2; - } - break; - case fontType1C: - if (!(fontFile = fontEngine->loadType1CFont( - id, - fontsrc, - (const char **)((Gfx8BitFont *)gfxFont)->getEncoding()))) { - error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", - gfxFont->getName() ? gfxFont->getName()->getCString() - : "(unnamed)"); - if (gfxFont->invalidateEmbeddedFont()) goto reload; - goto err2; - } - break; - case fontType1COT: - if (!(fontFile = fontEngine->loadOpenTypeT1CFont( - id, - fontsrc, - (const char **)((Gfx8BitFont *)gfxFont)->getEncoding()))) { - error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", - gfxFont->getName() ? gfxFont->getName()->getCString() - : "(unnamed)"); - if (gfxFont->invalidateEmbeddedFont()) goto reload; - goto err2; - } - break; - case fontTrueType: - case fontTrueTypeOT: - if (fileName) - ff = FoFiTrueType::load(fileName->getCString()); - else - ff = FoFiTrueType::make(tmpBuf, tmpBufLen); - if (ff) { - codeToGID = ((Gfx8BitFont *)gfxFont)->getCodeToGIDMap(ff); - n = 256; - delete ff; - // if we're substituting for a non-TrueType font, we need to mark - // all notdef codes as "do not draw" (rather than drawing TrueType - // notdef glyphs) - if (gfxFont->getType() != fontTrueType && - gfxFont->getType() != fontTrueTypeOT) { - for (i = 0; i < 256; ++i) { - if (codeToGID[i] == 0) { - codeToGID[i] = -1; - } - } - } - } else { - codeToGID = nullptr; - n = 0; - } - if (!(fontFile = fontEngine->loadTrueTypeFont( - id, - fontsrc, - codeToGID, n))) { - error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", - gfxFont->getName() ? gfxFont->getName()->getCString() - : "(unnamed)"); - if (gfxFont->invalidateEmbeddedFont()) goto reload; - goto err2; - } - break; - case fontCIDType0: - case fontCIDType0C: - if (!(fontFile = fontEngine->loadCIDFont( - id, - fontsrc))) { - error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", - gfxFont->getName() ? gfxFont->getName()->getCString() - : "(unnamed)"); - if (gfxFont->invalidateEmbeddedFont()) goto reload; - goto err2; - } - break; - case fontCIDType0COT: - if (((GfxCIDFont *)gfxFont)->getCIDToGID()) { - n = ((GfxCIDFont *)gfxFont)->getCIDToGIDLen(); - codeToGID = (int *)gmallocn(n, sizeof(int)); - memcpy(codeToGID, ((GfxCIDFont *)gfxFont)->getCIDToGID(), - n * sizeof(int)); - } else { - codeToGID = nullptr; - n = 0; - } - if (!(fontFile = fontEngine->loadOpenTypeCFFFont( - id, - fontsrc, - codeToGID, n))) { - error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", - gfxFont->getName() ? gfxFont->getName()->getCString() - : "(unnamed)"); - if (gfxFont->invalidateEmbeddedFont()) goto reload; - goto err2; - } - break; - case fontCIDType2: - case fontCIDType2OT: - codeToGID = nullptr; - n = 0; - if (((GfxCIDFont *)gfxFont)->getCIDToGID()) { - n = ((GfxCIDFont *)gfxFont)->getCIDToGIDLen(); - if (n) { - codeToGID = (int *)gmallocn(n, sizeof(int)); - memcpy(codeToGID, ((GfxCIDFont *)gfxFont)->getCIDToGID(), - n * sizeof(int)); - } - } else { - if (fileName) - ff = FoFiTrueType::load(fileName->getCString()); - else - ff = FoFiTrueType::make(tmpBuf, tmpBufLen); - if (! ff) - { - error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", - gfxFont->getName() ? gfxFont->getName()->getCString() - : "(unnamed)"); - goto err2; - } - codeToGID = ((GfxCIDFont *)gfxFont)->getCodeToGIDMap(ff, &n); - delete ff; - } - if (!(fontFile = fontEngine->loadTrueTypeFont( - id, - fontsrc, - codeToGID, n, faceIndex))) { - error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", - gfxFont->getName() ? gfxFont->getName()->getCString() - : "(unnamed)"); - if (gfxFont->invalidateEmbeddedFont()) goto reload; - goto err2; - } - break; - default: - // this shouldn't happen - goto err2; - } - fontFile->doAdjustMatrix = doAdjustFontMatrix; - } - - // get the font matrix - textMat = state->getTextMat(); - fontSize = state->getFontSize(); - m11 = textMat[0] * fontSize * state->getHorizScaling(); - m12 = textMat[1] * fontSize * state->getHorizScaling(); - m21 = textMat[2] * fontSize; - m22 = textMat[3] * fontSize; - - // create the scaled font - mat[0] = m11; mat[1] = m12; - mat[2] = m21; mat[3] = m22; - font = fontEngine->getFont(fontFile, mat, splash->getMatrix()); - - // for substituted fonts: adjust the font matrix -- compare the - // width of 'm' in the original font and the substituted font - if (fontFile->doAdjustMatrix && !gfxFont->isCIDFont()) { - double w1, w2, w3; - CharCode code; - char *name; - for (code = 0; code < 256; ++code) { - if ((name = ((Gfx8BitFont *)gfxFont)->getCharName(code)) && - name[0] == 'm' && name[1] == '\0') { - break; - } - } - if (code < 256) { - w1 = ((Gfx8BitFont *)gfxFont)->getWidth(code); - w2 = font->getGlyphAdvance(code); - w3 = ((Gfx8BitFont *)gfxFont)->getWidth(0); - if (!gfxFont->isSymbolic() && w2 > 0 && w1 > w3) { - // if real font is substantially narrower than substituted - // font, reduce the font size accordingly - if (w1 > 0.01 && w1 < 0.9 * w2) { - w1 /= w2; - m11 *= w1; - m21 *= w1; - recreateFont = gTrue; - } - } - } - } - - if (recreateFont) - { - mat[0] = m11; mat[1] = m12; - mat[2] = m21; mat[3] = m22; - font = fontEngine->getFont(fontFile, mat, splash->getMatrix()); - } - - delete fontLoc; - if (fontsrc && !fontsrc->isFile) - fontsrc->unref(); - return; - - err2: - delete id; - delete fontLoc; - err1: - if (fontsrc && !fontsrc->isFile) - fontsrc->unref(); - return; -} - -void SplashOutputDev::stroke(GfxState *state) { - SplashPath *path; - - if (state->getStrokeColorSpace()->isNonMarking()) { - return; - } - setOverprintMask(state->getStrokeColorSpace(), state->getStrokeOverprint(), - state->getOverprintMode(), state->getStrokeColor()); - path = convertPath(state, state->getPath(), gFalse); - splash->stroke(path); - delete path; -} - -void SplashOutputDev::fill(GfxState *state) { - SplashPath *path; - - if (state->getFillColorSpace()->isNonMarking()) { - return; - } - setOverprintMask(state->getFillColorSpace(), state->getFillOverprint(), - state->getOverprintMode(), state->getFillColor()); - path = convertPath(state, state->getPath(), gTrue); - splash->fill(path, gFalse); - delete path; -} - -void SplashOutputDev::eoFill(GfxState *state) { - SplashPath *path; - - if (state->getFillColorSpace()->isNonMarking()) { - return; - } - setOverprintMask(state->getFillColorSpace(), state->getFillOverprint(), - state->getOverprintMode(), state->getFillColor()); - path = convertPath(state, state->getPath(), gTrue); - splash->fill(path, gTrue); - delete path; -} - -void SplashOutputDev::clip(GfxState *state) { - SplashPath *path; - - path = convertPath(state, state->getPath(), gTrue); - splash->clipToPath(path, gFalse); - delete path; -} - -void SplashOutputDev::eoClip(GfxState *state) { - SplashPath *path; - - path = convertPath(state, state->getPath(), gTrue); - splash->clipToPath(path, gTrue); - delete path; -} - -void SplashOutputDev::clipToStrokePath(GfxState *state) { - SplashPath *path, *path2; - - path = convertPath(state, state->getPath(), gFalse); - path2 = splash->makeStrokePath(path, state->getLineWidth()); - delete path; - splash->clipToPath(path2, gFalse); - delete path2; -} - -SplashPath *SplashOutputDev::convertPath(GfxState *state, GfxPath *path, - GBool dropEmptySubpaths) { - SplashPath *sPath; - GfxSubpath *subpath; - int n, i, j; - - n = dropEmptySubpaths ? 1 : 0; - sPath = new SplashPath(); - for (i = 0; i < path->getNumSubpaths(); ++i) { - subpath = path->getSubpath(i); - if (subpath->getNumPoints() > n) { - sPath->reserve(subpath->getNumPoints() + 1); - sPath->moveTo((SplashCoord)subpath->getX(0), - (SplashCoord)subpath->getY(0)); - j = 1; - while (j < subpath->getNumPoints()) { - if (subpath->getCurve(j)) { - sPath->curveTo((SplashCoord)subpath->getX(j), - (SplashCoord)subpath->getY(j), - (SplashCoord)subpath->getX(j+1), - (SplashCoord)subpath->getY(j+1), - (SplashCoord)subpath->getX(j+2), - (SplashCoord)subpath->getY(j+2)); - j += 3; - } else { - sPath->lineTo((SplashCoord)subpath->getX(j), - (SplashCoord)subpath->getY(j)); - ++j; - } - } - if (subpath->isClosed()) { - sPath->close(); - } - } - } - return sPath; -} - -void SplashOutputDev::drawChar(GfxState *state, double x, double y, - double dx, double dy, - double originX, double originY, - CharCode code, int nBytes, - Unicode *u, int uLen) { - SplashPath *path; - int render; - GBool doFill, doStroke, doClip, strokeAdjust; - double m[4]; - GBool horiz; - - if (skipHorizText || skipRotatedText) { - state->getFontTransMat(&m[0], &m[1], &m[2], &m[3]); - horiz = m[0] > 0 && fabs(m[1]) < 0.001 && - fabs(m[2]) < 0.001 && m[3] < 0; - if ((skipHorizText && horiz) || (skipRotatedText && !horiz)) { - return; - } - } - - // check for invisible text -- this is used by Acrobat Capture - render = state->getRender(); - if (render == 3) { - return; - } - - if (needFontUpdate) { - doUpdateFont(state); - } - if (!font) { - return; - } - - x -= originX; - y -= originY; - - doFill = !(render & 1) && !state->getFillColorSpace()->isNonMarking(); - doStroke = ((render & 3) == 1 || (render & 3) == 2) && - !state->getStrokeColorSpace()->isNonMarking(); - doClip = render & 4; - - path = nullptr; - SplashCoord lineWidth = splash->getLineWidth(); - if (doStroke && lineWidth == 0.0) - splash->setLineWidth(1 / state->getVDPI()); - if (doStroke || doClip) { - if ((path = font->getGlyphPath(code))) { - path->offset((SplashCoord)x, (SplashCoord)y); - } - } - - // don't use stroke adjustment when stroking text -- the results - // tend to be ugly (because characters with horizontal upper or - // lower edges get misaligned relative to the other characters) - strokeAdjust = gFalse; // make gcc happy - if (doStroke) { - strokeAdjust = splash->getStrokeAdjust(); - splash->setStrokeAdjust(gFalse); - } - - // fill and stroke - if (doFill && doStroke) { - if (path) { - setOverprintMask(state->getFillColorSpace(), state->getFillOverprint(), - state->getOverprintMode(), state->getFillColor()); - splash->fill(path, gFalse); - setOverprintMask(state->getStrokeColorSpace(), - state->getStrokeOverprint(), - state->getOverprintMode(), - state->getStrokeColor()); - splash->stroke(path); - } - - // fill - } else if (doFill) { - setOverprintMask(state->getFillColorSpace(), state->getFillOverprint(), - state->getOverprintMode(), state->getFillColor()); - splash->fillChar((SplashCoord)x, (SplashCoord)y, code, font); - - // stroke - } else if (doStroke) { - if (path) { - setOverprintMask(state->getStrokeColorSpace(), - state->getStrokeOverprint(), - state->getOverprintMode(), - state->getStrokeColor()); - splash->stroke(path); - } - } - splash->setLineWidth(lineWidth); - - // clip - if (doClip) { - if (path) { - if (textClipPath) { - textClipPath->append(path); - } else { - textClipPath = path; - path = nullptr; - } - } - } - - if (doStroke) { - splash->setStrokeAdjust(strokeAdjust); - } - - if (path) { - delete path; - } -} - -GBool SplashOutputDev::beginType3Char(GfxState *state, double x, double y, - double dx, double dy, - CharCode code, Unicode *u, int uLen) { - GfxFont *gfxFont; - const Ref *fontID; - double *ctm, *bbox; - T3FontCache *t3Font; - T3GlyphStack *t3gs; - GBool validBBox; - double m[4]; - GBool horiz; - double x1, y1, xMin, yMin, xMax, yMax, xt, yt; - int i, j; - - // check for invisible text -- this is used by Acrobat Capture - if (state->getRender() == 3) { - // this is a bit of cheating, we say yes, font is already on cache - // so we actually skip the rendering of it - return gTrue; - } - - if (skipHorizText || skipRotatedText) { - state->getFontTransMat(&m[0], &m[1], &m[2], &m[3]); - horiz = m[0] > 0 && fabs(m[1]) < 0.001 && - fabs(m[2]) < 0.001 && m[3] < 0; - if ((skipHorizText && horiz) || (skipRotatedText && !horiz)) { - return gTrue; - } - } - - if (!(gfxFont = state->getFont())) { - return gFalse; - } - fontID = gfxFont->getID(); - ctm = state->getCTM(); - state->transform(0, 0, &xt, &yt); - - // is it the first (MRU) font in the cache? - if (!(nT3Fonts > 0 && - t3FontCache[0]->matches(fontID, ctm[0], ctm[1], ctm[2], ctm[3]))) { - - // is the font elsewhere in the cache? - for (i = 1; i < nT3Fonts; ++i) { - if (t3FontCache[i]->matches(fontID, ctm[0], ctm[1], ctm[2], ctm[3])) { - t3Font = t3FontCache[i]; - for (j = i; j > 0; --j) { - t3FontCache[j] = t3FontCache[j - 1]; - } - t3FontCache[0] = t3Font; - break; - } - } - if (i >= nT3Fonts) { - - // create new entry in the font cache - if (nT3Fonts == splashOutT3FontCacheSize) { - t3gs = t3GlyphStack; - while (t3gs != nullptr) { - if (t3gs->cache == t3FontCache[nT3Fonts - 1]) { - error(errSyntaxWarning, -1, "t3FontCache reaches limit but font still on stack in SplashOutputDev::beginType3Char"); - return gTrue; - } - t3gs = t3gs->next; - } - delete t3FontCache[nT3Fonts - 1]; - --nT3Fonts; - } - for (j = nT3Fonts; j > 0; --j) { - t3FontCache[j] = t3FontCache[j - 1]; - } - ++nT3Fonts; - bbox = gfxFont->getFontBBox(); - if (bbox[0] == 0 && bbox[1] == 0 && bbox[2] == 0 && bbox[3] == 0) { - // unspecified bounding box -- just take a guess - xMin = xt - 5; - xMax = xMin + 30; - yMax = yt + 15; - yMin = yMax - 45; - validBBox = gFalse; - } else { - state->transform(bbox[0], bbox[1], &x1, &y1); - xMin = xMax = x1; - yMin = yMax = y1; - state->transform(bbox[0], bbox[3], &x1, &y1); - if (x1 < xMin) { - xMin = x1; - } else if (x1 > xMax) { - xMax = x1; - } - if (y1 < yMin) { - yMin = y1; - } else if (y1 > yMax) { - yMax = y1; - } - state->transform(bbox[2], bbox[1], &x1, &y1); - if (x1 < xMin) { - xMin = x1; - } else if (x1 > xMax) { - xMax = x1; - } - if (y1 < yMin) { - yMin = y1; - } else if (y1 > yMax) { - yMax = y1; - } - state->transform(bbox[2], bbox[3], &x1, &y1); - if (x1 < xMin) { - xMin = x1; - } else if (x1 > xMax) { - xMax = x1; - } - if (y1 < yMin) { - yMin = y1; - } else if (y1 > yMax) { - yMax = y1; - } - validBBox = gTrue; - } - t3FontCache[0] = new T3FontCache(fontID, ctm[0], ctm[1], ctm[2], ctm[3], - (int)floor(xMin - xt) - 2, - (int)floor(yMin - yt) - 2, - (int)ceil(xMax) - (int)floor(xMin) + 4, - (int)ceil(yMax) - (int)floor(yMin) + 4, - validBBox, - colorMode != splashModeMono1); - } - } - t3Font = t3FontCache[0]; - - // is the glyph in the cache? - i = (code & (t3Font->cacheSets - 1)) * t3Font->cacheAssoc; - for (j = 0; j < t3Font->cacheAssoc; ++j) { - if (t3Font->cacheTags != nullptr) { - if ((t3Font->cacheTags[i+j].mru & 0x8000) && - t3Font->cacheTags[i+j].code == code) { - drawType3Glyph(state, t3Font, &t3Font->cacheTags[i+j], - t3Font->cacheData + (i+j) * t3Font->glyphSize); - return gTrue; - } - } - } - - // push a new Type 3 glyph record - t3gs = new T3GlyphStack(); - t3gs->next = t3GlyphStack; - t3GlyphStack = t3gs; - t3GlyphStack->code = code; - t3GlyphStack->cache = t3Font; - t3GlyphStack->cacheTag = nullptr; - t3GlyphStack->cacheData = nullptr; - t3GlyphStack->haveDx = gFalse; - t3GlyphStack->doNotCache = gFalse; - - return gFalse; -} - -void SplashOutputDev::endType3Char(GfxState *state) { - T3GlyphStack *t3gs; - double *ctm; - - if (t3GlyphStack->cacheTag) { - --nestCount; - memcpy(t3GlyphStack->cacheData, bitmap->getDataPtr(), - t3GlyphStack->cache->glyphSize); - delete bitmap; - delete splash; - bitmap = t3GlyphStack->origBitmap; - splash = t3GlyphStack->origSplash; - ctm = state->getCTM(); - state->setCTM(ctm[0], ctm[1], ctm[2], ctm[3], - t3GlyphStack->origCTM4, t3GlyphStack->origCTM5); - updateCTM(state, 0, 0, 0, 0, 0, 0); - drawType3Glyph(state, t3GlyphStack->cache, - t3GlyphStack->cacheTag, t3GlyphStack->cacheData); - } - t3gs = t3GlyphStack; - t3GlyphStack = t3gs->next; - delete t3gs; -} - -void SplashOutputDev::type3D0(GfxState *state, double wx, double wy) { - if (likely(t3GlyphStack != nullptr)) { - t3GlyphStack->haveDx = gTrue; - } else { - error(errSyntaxWarning, -1, "t3GlyphStack was null in SplashOutputDev::type3D0"); - } -} - -void SplashOutputDev::type3D1(GfxState *state, double wx, double wy, - double llx, double lly, double urx, double ury) { - double *ctm; - T3FontCache *t3Font; - SplashColor color; - double xt, yt, xMin, xMax, yMin, yMax, x1, y1; - int i, j; - - // ignore multiple d0/d1 operators - if (!t3GlyphStack || t3GlyphStack->haveDx) { - return; - } - t3GlyphStack->haveDx = gTrue; - // don't cache if we got a gsave/grestore before the d1 - if (t3GlyphStack->doNotCache) { - return; - } - - if (unlikely(t3GlyphStack == nullptr)) { - error(errSyntaxWarning, -1, "t3GlyphStack was null in SplashOutputDev::type3D1"); - return; - } - - if (unlikely(t3GlyphStack->origBitmap != nullptr)) { - error(errSyntaxWarning, -1, "t3GlyphStack origBitmap was not null in SplashOutputDev::type3D1"); - return; - } - - if (unlikely(t3GlyphStack->origSplash != nullptr)) { - error(errSyntaxWarning, -1, "t3GlyphStack origSplash was not null in SplashOutputDev::type3D1"); - return; - } - - t3Font = t3GlyphStack->cache; - - // check for a valid bbox - state->transform(0, 0, &xt, &yt); - state->transform(llx, lly, &x1, &y1); - xMin = xMax = x1; - yMin = yMax = y1; - state->transform(llx, ury, &x1, &y1); - if (x1 < xMin) { - xMin = x1; - } else if (x1 > xMax) { - xMax = x1; - } - if (y1 < yMin) { - yMin = y1; - } else if (y1 > yMax) { - yMax = y1; - } - state->transform(urx, lly, &x1, &y1); - if (x1 < xMin) { - xMin = x1; - } else if (x1 > xMax) { - xMax = x1; - } - if (y1 < yMin) { - yMin = y1; - } else if (y1 > yMax) { - yMax = y1; - } - state->transform(urx, ury, &x1, &y1); - if (x1 < xMin) { - xMin = x1; - } else if (x1 > xMax) { - xMax = x1; - } - if (y1 < yMin) { - yMin = y1; - } else if (y1 > yMax) { - yMax = y1; - } - if (xMin - xt < t3Font->glyphX || - yMin - yt < t3Font->glyphY || - xMax - xt > t3Font->glyphX + t3Font->glyphW || - yMax - yt > t3Font->glyphY + t3Font->glyphH) { - if (t3Font->validBBox) { - error(errSyntaxWarning, -1, "Bad bounding box in Type 3 glyph"); - } - return; - } - - if (t3Font->cacheTags == nullptr) - return; - - // allocate a cache entry - i = (t3GlyphStack->code & (t3Font->cacheSets - 1)) * t3Font->cacheAssoc; - for (j = 0; j < t3Font->cacheAssoc; ++j) { - if ((t3Font->cacheTags[i+j].mru & 0x7fff) == t3Font->cacheAssoc - 1) { - t3Font->cacheTags[i+j].mru = 0x8000; - t3Font->cacheTags[i+j].code = t3GlyphStack->code; - t3GlyphStack->cacheTag = &t3Font->cacheTags[i+j]; - t3GlyphStack->cacheData = t3Font->cacheData + (i+j) * t3Font->glyphSize; - } else { - ++t3Font->cacheTags[i+j].mru; - } - } - - // save state - t3GlyphStack->origBitmap = bitmap; - t3GlyphStack->origSplash = splash; - ctm = state->getCTM(); - t3GlyphStack->origCTM4 = ctm[4]; - t3GlyphStack->origCTM5 = ctm[5]; - - // create the temporary bitmap - if (colorMode == splashModeMono1) { - bitmap = new SplashBitmap(t3Font->glyphW, t3Font->glyphH, 1, - splashModeMono1, gFalse); - splash = new Splash(bitmap, gFalse, - t3GlyphStack->origSplash->getScreen()); - color[0] = 0; - splash->clear(color); - color[0] = 0xff; - } else { - bitmap = new SplashBitmap(t3Font->glyphW, t3Font->glyphH, 1, - splashModeMono8, gFalse); - splash = new Splash(bitmap, vectorAntialias, - t3GlyphStack->origSplash->getScreen()); - color[0] = 0x00; - splash->clear(color); - color[0] = 0xff; - } - splash->setMinLineWidth(s_minLineWidth); - splash->setThinLineMode(splashThinLineDefault); - splash->setFillPattern(new SplashSolidColor(color)); - splash->setStrokePattern(new SplashSolidColor(color)); - //~ this should copy other state from t3GlyphStack->origSplash? - state->setCTM(ctm[0], ctm[1], ctm[2], ctm[3], - -t3Font->glyphX, -t3Font->glyphY); - updateCTM(state, 0, 0, 0, 0, 0, 0); - ++nestCount; -} - -void SplashOutputDev::drawType3Glyph(GfxState *state, T3FontCache *t3Font, - T3FontCacheTag * /*tag*/, Guchar *data) { - SplashGlyphBitmap glyph; - - setOverprintMask(state->getFillColorSpace(), state->getFillOverprint(), - state->getOverprintMode(), state->getFillColor()); - glyph.x = -t3Font->glyphX; - glyph.y = -t3Font->glyphY; - glyph.w = t3Font->glyphW; - glyph.h = t3Font->glyphH; - glyph.aa = colorMode != splashModeMono1; - glyph.data = data; - glyph.freeData = gFalse; - splash->fillGlyph(0, 0, &glyph); -} - -void SplashOutputDev::beginTextObject(GfxState *state) { -} - -void SplashOutputDev::endTextObject(GfxState *state) { - if (textClipPath) { - splash->clipToPath(textClipPath, gFalse); - delete textClipPath; - textClipPath = nullptr; - } -} - -struct SplashOutImageMaskData { - ImageStream *imgStr; - GBool invert; - int width, height, y; -}; - -GBool SplashOutputDev::imageMaskSrc(void *data, SplashColorPtr line) { - SplashOutImageMaskData *imgMaskData = (SplashOutImageMaskData *)data; - Guchar *p; - SplashColorPtr q; - int x; - - if (imgMaskData->y == imgMaskData->height) { - return gFalse; - } - if (!(p = imgMaskData->imgStr->getLine())) { - return gFalse; - } - for (x = 0, q = line; x < imgMaskData->width; ++x) { - *q++ = *p++ ^ imgMaskData->invert; - } - ++imgMaskData->y; - return gTrue; -} - -void SplashOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str, - int width, int height, GBool invert, - GBool interpolate, GBool inlineImg) { - double *ctm; - SplashCoord mat[6]; - SplashOutImageMaskData imgMaskData; - - if (state->getFillColorSpace()->isNonMarking()) { - return; - } - setOverprintMask(state->getFillColorSpace(), state->getFillOverprint(), - state->getOverprintMode(), state->getFillColor()); - - ctm = state->getCTM(); - for (int i = 0; i < 6; ++i) { - if (!std::isfinite(ctm[i])) return; - } - mat[0] = ctm[0]; - mat[1] = ctm[1]; - mat[2] = -ctm[2]; - mat[3] = -ctm[3]; - mat[4] = ctm[2] + ctm[4]; - mat[5] = ctm[3] + ctm[5]; - - imgMaskData.imgStr = new ImageStream(str, width, 1, 1); - imgMaskData.imgStr->reset(); - imgMaskData.invert = invert ? 0 : 1; - imgMaskData.width = width; - imgMaskData.height = height; - imgMaskData.y = 0; - - splash->fillImageMask(&imageMaskSrc, &imgMaskData, width, height, mat, t3GlyphStack != nullptr); - if (inlineImg) { - while (imgMaskData.y < height) { - imgMaskData.imgStr->getLine(); - ++imgMaskData.y; - } - } - - delete imgMaskData.imgStr; - str->close(); -} - -void SplashOutputDev::setSoftMaskFromImageMask(GfxState *state, - Object *ref, Stream *str, - int width, int height, - GBool invert, - GBool inlineImg, double *baseMatrix) { - double *ctm; - SplashCoord mat[6]; - SplashOutImageMaskData imgMaskData; - Splash *maskSplash; - SplashColor maskColor; - double bbox[4] = {0, 0, 1, 1}; // default; - - if (state->getFillColorSpace()->isNonMarking()) { - return; - } - - ctm = state->getCTM(); - for (int i = 0; i < 6; ++i) { - if (!std::isfinite(ctm[i])) return; - } - - beginTransparencyGroup(state, bbox, nullptr, gFalse, gFalse, gFalse); - baseMatrix[4] -= transpGroupStack->tx; - baseMatrix[5] -= transpGroupStack->ty; - - ctm = state->getCTM(); - mat[0] = ctm[0]; - mat[1] = ctm[1]; - mat[2] = -ctm[2]; - mat[3] = -ctm[3]; - mat[4] = ctm[2] + ctm[4]; - mat[5] = ctm[3] + ctm[5]; - imgMaskData.imgStr = new ImageStream(str, width, 1, 1); - imgMaskData.imgStr->reset(); - imgMaskData.invert = invert ? 0 : 1; - imgMaskData.width = width; - imgMaskData.height = height; - imgMaskData.y = 0; - - transpGroupStack->softmask = new SplashBitmap(bitmap->getWidth(), bitmap->getHeight(), 1, splashModeMono8, gFalse); - maskSplash = new Splash(transpGroupStack->softmask, vectorAntialias); - maskColor[0] = 0; - maskSplash->clear(maskColor); - maskColor[0] = 0xff; - maskSplash->setFillPattern(new SplashSolidColor(maskColor)); - maskSplash->fillImageMask(&imageMaskSrc, &imgMaskData, width, height, mat, t3GlyphStack != nullptr); - delete maskSplash; - delete imgMaskData.imgStr; - str->close(); -} - -void SplashOutputDev::unsetSoftMaskFromImageMask(GfxState *state, double *baseMatrix) { - double bbox[4] = {0,0,1,1}; // dummy - - /* transfer mask to alpha channel! */ - // memcpy(maskBitmap->getAlphaPtr(), maskBitmap->getDataPtr(), bitmap->getRowSize() * bitmap->getHeight()); - // memset(maskBitmap->getDataPtr(), 0, bitmap->getRowSize() * bitmap->getHeight()); - if (transpGroupStack->softmask != nullptr) { - Guchar *dest = bitmap->getAlphaPtr(); - Guchar *src = transpGroupStack->softmask->getDataPtr(); - for (int c= 0; c < transpGroupStack->softmask->getRowSize() * transpGroupStack->softmask->getHeight(); c++) { - dest[c] = src[c]; - } - delete transpGroupStack->softmask; - transpGroupStack->softmask = nullptr; - } - endTransparencyGroup(state); - baseMatrix[4] += transpGroupStack->tx; - baseMatrix[5] += transpGroupStack->ty; - paintTransparencyGroup(state, bbox); -} - -struct SplashOutImageData { - ImageStream *imgStr; - GfxImageColorMap *colorMap; - SplashColorPtr lookup; - int *maskColors; - SplashColorMode colorMode; - int width, height, y; - ImageStream *maskStr; - GfxImageColorMap *maskColorMap; - SplashColor matteColor; -}; - -#ifdef USE_CMS -GBool SplashOutputDev::useIccImageSrc(void *data) { - SplashOutImageData *imgData = (SplashOutImageData *)data; - - if (!imgData->lookup && imgData->colorMap->getColorSpace()->getMode() == csICCBased) { - GfxICCBasedColorSpace *colorSpace = (GfxICCBasedColorSpace *) imgData->colorMap->getColorSpace(); - switch (imgData->colorMode) { - case splashModeMono1: - case splashModeMono8: - if (colorSpace->getAlt() != nullptr && colorSpace->getAlt()->getMode() == csDeviceGray) - return gTrue; - break; - case splashModeXBGR8: - case splashModeRGB8: - case splashModeBGR8: - if (colorSpace->getAlt() != nullptr && colorSpace->getAlt()->getMode() == csDeviceRGB) - return gTrue; - break; -#ifdef SPLASH_CMYK - case splashModeCMYK8: - if (colorSpace->getAlt() != NULL && colorSpace->getAlt()->getMode() == csDeviceCMYK) - return gTrue; - break; -#endif - } - } - - return gFalse; -} -#endif - -// Clip x to lie in [0, 255]. -static inline Guchar clip255(int x) { - return x < 0 ? 0 : x > 255 ? 255 : x; -} - -GBool SplashOutputDev::imageSrc(void *data, SplashColorPtr colorLine, - Guchar * /*alphaLine*/) { - SplashOutImageData *imgData = (SplashOutImageData *)data; - Guchar *p; - SplashColorPtr q, col; - GfxRGB rgb; - GfxGray gray; -#ifdef SPLASH_CMYK - GfxCMYK cmyk; - GfxColor deviceN; -#endif - int nComps, x; - - if (imgData->y == imgData->height) { - return gFalse; - } - if (!(p = imgData->imgStr->getLine())) { - int destComps = 1; - if (imgData->colorMode == splashModeRGB8 || imgData->colorMode == splashModeBGR8) - destComps = 3; - else if (imgData->colorMode == splashModeXBGR8) - destComps = 4; -#ifdef SPLASH_CMYK - else if (imgData->colorMode == splashModeCMYK8) - destComps = 4; - else if (imgData->colorMode == splashModeDeviceN8) - destComps = SPOT_NCOMPS + 4; -#endif - memset(colorLine, 0, imgData->width * destComps); - return gFalse; - } - - nComps = imgData->colorMap->getNumPixelComps(); - - if (imgData->lookup) { - switch (imgData->colorMode) { - case splashModeMono1: - case splashModeMono8: - for (x = 0, q = colorLine; x < imgData->width; ++x, ++p) { - *q++ = imgData->lookup[*p]; - } - break; - case splashModeRGB8: - case splashModeBGR8: - for (x = 0, q = colorLine; x < imgData->width; ++x, ++p) { - col = &imgData->lookup[3 * *p]; - *q++ = col[0]; - *q++ = col[1]; - *q++ = col[2]; - } - break; - case splashModeXBGR8: - for (x = 0, q = colorLine; x < imgData->width; ++x, ++p) { - col = &imgData->lookup[4 * *p]; - *q++ = col[0]; - *q++ = col[1]; - *q++ = col[2]; - *q++ = col[3]; - } - break; -#ifdef SPLASH_CMYK - case splashModeCMYK8: - for (x = 0, q = colorLine; x < imgData->width; ++x, ++p) { - col = &imgData->lookup[4 * *p]; - *q++ = col[0]; - *q++ = col[1]; - *q++ = col[2]; - *q++ = col[3]; - } - break; - case splashModeDeviceN8: - for (x = 0, q = colorLine; x < imgData->width; ++x, ++p) { - col = &imgData->lookup[(SPOT_NCOMPS+4) * *p]; - for (int cp = 0; cp < SPOT_NCOMPS+4; cp++) - *q++ = col[cp]; - } - break; -#endif - } - } else { - switch (imgData->colorMode) { - case splashModeMono1: - case splashModeMono8: - for (x = 0, q = colorLine; x < imgData->width; ++x, p += nComps) { - imgData->colorMap->getGray(p, &gray); - *q++ = colToByte(gray); - } - break; - case splashModeRGB8: - case splashModeBGR8: - if (imgData->colorMap->useRGBLine()) { - imgData->colorMap->getRGBLine(p, (Guchar *) colorLine, imgData->width); - } else { - for (x = 0, q = colorLine; x < imgData->width; ++x, p += nComps) { - imgData->colorMap->getRGB(p, &rgb); - *q++ = colToByte(rgb.r); - *q++ = colToByte(rgb.g); - *q++ = colToByte(rgb.b); - } - } - break; - case splashModeXBGR8: - if (imgData->colorMap->useRGBLine()) { - imgData->colorMap->getRGBXLine(p, (Guchar *) colorLine, imgData->width); - } else { - for (x = 0, q = colorLine; x < imgData->width; ++x, p += nComps) { - imgData->colorMap->getRGB(p, &rgb); - *q++ = colToByte(rgb.r); - *q++ = colToByte(rgb.g); - *q++ = colToByte(rgb.b); - *q++ = 255; - } - } - break; -#ifdef SPLASH_CMYK - case splashModeCMYK8: - if (imgData->colorMap->useCMYKLine()) { - imgData->colorMap->getCMYKLine(p, (Guchar *) colorLine, imgData->width); - } else { - for (x = 0, q = colorLine; x < imgData->width; ++x, p += nComps) { - imgData->colorMap->getCMYK(p, &cmyk); - *q++ = colToByte(cmyk.c); - *q++ = colToByte(cmyk.m); - *q++ = colToByte(cmyk.y); - *q++ = colToByte(cmyk.k); - } - } - break; - case splashModeDeviceN8: - if (imgData->colorMap->useDeviceNLine()) { - imgData->colorMap->getDeviceNLine(p, (Guchar *) colorLine, imgData->width); - } else { - for (x = 0, q = colorLine; x < imgData->width; ++x, p += nComps) { - imgData->colorMap->getDeviceN(p, &deviceN); - for (int cp = 0; cp < SPOT_NCOMPS+4; cp++) - *q++ = colToByte(deviceN.c[cp]); - } - } - break; -#endif - } - } - - if (imgData->maskStr != nullptr && (p = imgData->maskStr->getLine()) != nullptr) { - int destComps = splashColorModeNComps[imgData->colorMode]; - int convComps = (imgData->colorMode == splashModeXBGR8) ? 3 : destComps; - imgData->maskColorMap->getGrayLine(p, p, imgData->width); - for (x = 0, q = colorLine; x < imgData->width; ++x, p++, q += destComps) { - for (int cp = 0; cp < convComps; cp++) { - q[cp] = (*p) ? clip255(imgData->matteColor[cp] + (int) (q[cp] - imgData->matteColor[cp]) * 255 / *p) : imgData->matteColor[cp]; - } - } - } - ++imgData->y; - return gTrue; -} - -#ifdef USE_CMS -GBool SplashOutputDev::iccImageSrc(void *data, SplashColorPtr colorLine, - Guchar * /*alphaLine*/) { - SplashOutImageData *imgData = (SplashOutImageData *)data; - Guchar *p; - int nComps; - - if (imgData->y == imgData->height) { - return gFalse; - } - if (!(p = imgData->imgStr->getLine())) { - int destComps = 1; - if (imgData->colorMode == splashModeRGB8 || imgData->colorMode == splashModeBGR8) - destComps = 3; - else if (imgData->colorMode == splashModeXBGR8) - destComps = 4; -#ifdef SPLASH_CMYK - else if (imgData->colorMode == splashModeCMYK8) - destComps = 4; - else if (imgData->colorMode == splashModeDeviceN8) - destComps = SPOT_NCOMPS + 4; -#endif - memset(colorLine, 0, imgData->width * destComps); - return gFalse; - } - - if (imgData->colorMode == splashModeXBGR8) { - SplashColorPtr q; - int x; - for (x = 0, q = colorLine; x < imgData->width; ++x) { - *q++ = *p++; - *q++ = *p++; - *q++ = *p++; - *q++ = 255; - } - } else { - nComps = imgData->colorMap->getNumPixelComps(); - memcpy(colorLine, p, imgData->width * nComps); - } - - ++imgData->y; - return gTrue; -} - -void SplashOutputDev::iccTransform(void *data, SplashBitmap *bitmap) { - SplashOutImageData *imgData = (SplashOutImageData *)data; - int nComps = imgData->colorMap->getNumPixelComps(); - - Guchar *colorLine = (Guchar *) gmalloc(nComps * bitmap->getWidth()); - Guchar *rgbxLine = (imgData->colorMode == splashModeXBGR8) ? (Guchar *) gmalloc(3 * bitmap->getWidth()) : nullptr; - for (int i = 0; i < bitmap->getHeight(); i++) { - Guchar *p = bitmap->getDataPtr() + i * bitmap->getRowSize(); - switch (imgData->colorMode) { - case splashModeMono1: - case splashModeMono8: - imgData->colorMap->getGrayLine(p, colorLine, bitmap->getWidth()); - memcpy(p, colorLine, nComps * bitmap->getWidth()); - break; - case splashModeRGB8: - case splashModeBGR8: - imgData->colorMap->getRGBLine(p, colorLine, bitmap->getWidth()); - memcpy(p, colorLine, nComps * bitmap->getWidth()); - break; -#ifdef SPLASH_CMYK - case splashModeCMYK8: - imgData->colorMap->getCMYKLine(p, colorLine, bitmap->getWidth()); - memcpy(p, colorLine, nComps * bitmap->getWidth()); - break; -#endif - case splashModeXBGR8: - Guchar *q; - Guchar *b = p; - int x; - for (x = 0, q = rgbxLine; x < bitmap->getWidth(); ++x, b+=4) { - *q++ = b[2]; - *q++ = b[1]; - *q++ = b[0]; - } - imgData->colorMap->getRGBLine(rgbxLine, colorLine, bitmap->getWidth()); - b = p; - for (x = 0, q = colorLine; x < bitmap->getWidth(); ++x, b+=4) { - b[2] = *q++; - b[1] = *q++; - b[0] = *q++; - } - break; - } - } - gfree(colorLine); - if (rgbxLine != nullptr) - gfree(rgbxLine); -} -#endif - -GBool SplashOutputDev::alphaImageSrc(void *data, SplashColorPtr colorLine, - Guchar *alphaLine) { - SplashOutImageData *imgData = (SplashOutImageData *)data; - Guchar *p, *aq; - SplashColorPtr q, col; - GfxRGB rgb; - GfxGray gray; -#ifdef SPLASH_CMYK - GfxCMYK cmyk; - GfxColor deviceN; -#endif - Guchar alpha; - int nComps, x, i; - - if (imgData->y == imgData->height) { - return gFalse; - } - if (!(p = imgData->imgStr->getLine())) { - return gFalse; - } - - nComps = imgData->colorMap->getNumPixelComps(); - - for (x = 0, q = colorLine, aq = alphaLine; - x < imgData->width; - ++x, p += nComps) { - alpha = 0; - for (i = 0; i < nComps; ++i) { - if (p[i] < imgData->maskColors[2*i] || - p[i] > imgData->maskColors[2*i+1]) { - alpha = 0xff; - break; - } - } - if (imgData->lookup) { - switch (imgData->colorMode) { - case splashModeMono1: - case splashModeMono8: - *q++ = imgData->lookup[*p]; - break; - case splashModeRGB8: - case splashModeBGR8: - col = &imgData->lookup[3 * *p]; - *q++ = col[0]; - *q++ = col[1]; - *q++ = col[2]; - break; - case splashModeXBGR8: - col = &imgData->lookup[4 * *p]; - *q++ = col[0]; - *q++ = col[1]; - *q++ = col[2]; - *q++ = 255; - break; -#ifdef SPLASH_CMYK - case splashModeCMYK8: - col = &imgData->lookup[4 * *p]; - *q++ = col[0]; - *q++ = col[1]; - *q++ = col[2]; - *q++ = col[3]; - break; - case splashModeDeviceN8: - col = &imgData->lookup[(SPOT_NCOMPS+4) * *p]; - for (int cp = 0; cp < SPOT_NCOMPS+4; cp++) - *q++ = col[cp]; - break; -#endif - } - *aq++ = alpha; - } else { - switch (imgData->colorMode) { - case splashModeMono1: - case splashModeMono8: - imgData->colorMap->getGray(p, &gray); - *q++ = colToByte(gray); - break; - case splashModeXBGR8: - case splashModeRGB8: - case splashModeBGR8: - imgData->colorMap->getRGB(p, &rgb); - *q++ = colToByte(rgb.r); - *q++ = colToByte(rgb.g); - *q++ = colToByte(rgb.b); - if (imgData->colorMode == splashModeXBGR8) *q++ = 255; - break; -#ifdef SPLASH_CMYK - case splashModeCMYK8: - imgData->colorMap->getCMYK(p, &cmyk); - *q++ = colToByte(cmyk.c); - *q++ = colToByte(cmyk.m); - *q++ = colToByte(cmyk.y); - *q++ = colToByte(cmyk.k); - break; - case splashModeDeviceN8: - imgData->colorMap->getDeviceN(p, &deviceN); - for (int cp = 0; cp < SPOT_NCOMPS+4; cp++) - *q++ = colToByte(deviceN.c[cp]); - break; -#endif - } - *aq++ = alpha; - } - } - - ++imgData->y; - return gTrue; -} - -struct TilingSplashOutBitmap { - SplashBitmap *bitmap; - SplashPattern *pattern; - SplashColorMode colorMode; - int paintType; - int repeatX; - int repeatY; - int y; -}; - -GBool SplashOutputDev::tilingBitmapSrc(void *data, SplashColorPtr colorLine, - Guchar *alphaLine) { - TilingSplashOutBitmap *imgData = (TilingSplashOutBitmap *)data; - - if (imgData->y == imgData->bitmap->getHeight()) { - imgData->repeatY--; - if (imgData->repeatY == 0) - return gFalse; - imgData->y = 0; - } - - if (imgData->paintType == 1) { - const SplashColorMode cMode = imgData->bitmap->getMode(); - SplashColorPtr q = colorLine; - // For splashModeBGR8 and splashModeXBGR8 we need to use getPixel - // for the others we can use raw access - if (cMode == splashModeBGR8 || cMode == splashModeXBGR8) { - for (int m = 0; m < imgData->repeatX; m++) { - for (int x = 0; x < imgData->bitmap->getWidth(); x++) { - imgData->bitmap->getPixel(x, imgData->y, q); - q += splashColorModeNComps[cMode]; - } - } - } else { - const int n = imgData->bitmap->getRowSize(); - SplashColorPtr p; - for (int m = 0; m < imgData->repeatX; m++) { - p = imgData->bitmap->getDataPtr() + imgData->y * imgData->bitmap->getRowSize(); - for (int x = 0; x < n; ++x) { - *q++ = *p++; - } - } - } - if (alphaLine != nullptr) { - SplashColorPtr aq = alphaLine; - SplashColorPtr p; - const int n = imgData->bitmap->getWidth() - 1; - for (int m = 0; m < imgData->repeatX; m++) { - p = imgData->bitmap->getAlphaPtr() + imgData->y * imgData->bitmap->getWidth(); - for (int x = 0; x < n; ++x) { - *aq++ = *p++; - } - // This is a hack, because of how Splash antialias works if we overwrite the - // last alpha pixel of the tile most/all of the files look much better - *aq++ = (n == 0) ? *p : *(p - 1); - } - } - } else { - SplashColor col, pat; - SplashColorPtr dest = colorLine; - for (int m = 0; m < imgData->repeatX; m++) { - for (int x = 0; x < imgData->bitmap->getWidth(); x++) { - imgData->bitmap->getPixel(x, imgData->y, col); - imgData->pattern->getColor(x, imgData->y, pat); - for (int i = 0; i < splashColorModeNComps[imgData->colorMode]; ++i) { -#ifdef SPLASH_CMYK - if (imgData->colorMode == splashModeCMYK8 || imgData->colorMode == splashModeDeviceN8) - dest[i] = div255(pat[i] * (255 - col[0])); - else -#endif - dest[i] = 255 - div255((255 - pat[i]) * (255 - col[0])); - } - dest += splashColorModeNComps[imgData->colorMode]; - } - } - if (alphaLine != nullptr) { - const int y = (imgData->y == imgData->bitmap->getHeight() - 1 && imgData->y > 50) ? imgData->y - 1 : imgData->y; - SplashColorPtr aq = alphaLine; - SplashColorPtr p; - const int n = imgData->bitmap->getWidth(); - for (int m = 0; m < imgData->repeatX; m++) { - p = imgData->bitmap->getAlphaPtr() + y * imgData->bitmap->getWidth(); - for (int x = 0; x < n; ++x) { - *aq++ = *p++; - } - } - } - } - ++imgData->y; - return gTrue; -} - -void SplashOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, - int width, int height, - GfxImageColorMap *colorMap, - GBool interpolate, - int *maskColors, GBool inlineImg) { - double *ctm; - SplashCoord mat[6]; - SplashOutImageData imgData; - SplashColorMode srcMode; - SplashImageSource src; - SplashICCTransform tf; - GfxGray gray; - GfxRGB rgb; -#ifdef SPLASH_CMYK - GfxCMYK cmyk; - GBool grayIndexed = gFalse; - GfxColor deviceN; -#endif - Guchar pix; - int n, i; - - ctm = state->getCTM(); - for (i = 0; i < 6; ++i) { - if (!std::isfinite(ctm[i])) return; - } - mat[0] = ctm[0]; - mat[1] = ctm[1]; - mat[2] = -ctm[2]; - mat[3] = -ctm[3]; - mat[4] = ctm[2] + ctm[4]; - mat[5] = ctm[3] + ctm[5]; - - imgData.imgStr = new ImageStream(str, width, - colorMap->getNumPixelComps(), - colorMap->getBits()); - imgData.imgStr->reset(); - imgData.colorMap = colorMap; - imgData.maskColors = maskColors; - imgData.colorMode = colorMode; - imgData.width = width; - imgData.height = height; - imgData.maskStr = nullptr; - imgData.maskColorMap = nullptr; - imgData.y = 0; - - // special case for one-channel (monochrome/gray/separation) images: - // build a lookup table here - imgData.lookup = nullptr; - if (colorMap->getNumPixelComps() == 1) { - n = 1 << colorMap->getBits(); - switch (colorMode) { - case splashModeMono1: - case splashModeMono8: - imgData.lookup = (SplashColorPtr)gmalloc(n); - for (i = 0; i < n; ++i) { - pix = (Guchar)i; - colorMap->getGray(&pix, &gray); - imgData.lookup[i] = colToByte(gray); - } - break; - case splashModeRGB8: - case splashModeBGR8: - imgData.lookup = (SplashColorPtr)gmallocn(n, 3); - for (i = 0; i < n; ++i) { - pix = (Guchar)i; - colorMap->getRGB(&pix, &rgb); - imgData.lookup[3*i] = colToByte(rgb.r); - imgData.lookup[3*i+1] = colToByte(rgb.g); - imgData.lookup[3*i+2] = colToByte(rgb.b); - } - break; - case splashModeXBGR8: - imgData.lookup = (SplashColorPtr)gmallocn(n, 4); - for (i = 0; i < n; ++i) { - pix = (Guchar)i; - colorMap->getRGB(&pix, &rgb); - imgData.lookup[4*i] = colToByte(rgb.r); - imgData.lookup[4*i+1] = colToByte(rgb.g); - imgData.lookup[4*i+2] = colToByte(rgb.b); - imgData.lookup[4*i+3] = 255; - } - break; -#ifdef SPLASH_CMYK - case splashModeCMYK8: - grayIndexed = colorMap->getColorSpace()->getMode() != csDeviceGray; - imgData.lookup = (SplashColorPtr)gmallocn(n, 4); - for (i = 0; i < n; ++i) { - pix = (Guchar)i; - colorMap->getCMYK(&pix, &cmyk); - if (cmyk.c != 0 || cmyk.m != 0 || cmyk.y != 0) { - grayIndexed = gFalse; - } - imgData.lookup[4*i] = colToByte(cmyk.c); - imgData.lookup[4*i+1] = colToByte(cmyk.m); - imgData.lookup[4*i+2] = colToByte(cmyk.y); - imgData.lookup[4*i+3] = colToByte(cmyk.k); - } - break; - case splashModeDeviceN8: - colorMap->getColorSpace()->createMapping(bitmap->getSeparationList(), SPOT_NCOMPS); - grayIndexed = colorMap->getColorSpace()->getMode() != csDeviceGray; - imgData.lookup = (SplashColorPtr)gmallocn(n, SPOT_NCOMPS+4); - for (i = 0; i < n; ++i) { - pix = (Guchar)i; - colorMap->getCMYK(&pix, &cmyk); - if (cmyk.c != 0 || cmyk.m != 0 || cmyk.y != 0) { - grayIndexed = gFalse; - } - colorMap->getDeviceN(&pix, &deviceN); - for (int cp = 0; cp < SPOT_NCOMPS+4; cp++) - imgData.lookup[(SPOT_NCOMPS+4)*i +cp] = colToByte(deviceN.c[cp]); - } - break; -#endif - } - } - -#ifdef SPLASH_CMYK - setOverprintMask(colorMap->getColorSpace(), state->getFillOverprint(), - state->getOverprintMode(), NULL, grayIndexed); -#else - setOverprintMask(colorMap->getColorSpace(), state->getFillOverprint(), - state->getOverprintMode(), nullptr); -#endif - - if (colorMode == splashModeMono1) { - srcMode = splashModeMono8; - } else { - srcMode = colorMode; - } -#ifdef USE_CMS - src = maskColors ? &alphaImageSrc : useIccImageSrc(&imgData) ? &iccImageSrc : &imageSrc; - tf = maskColors == nullptr && useIccImageSrc(&imgData) ? &iccTransform : nullptr; -#else - src = maskColors ? &alphaImageSrc : &imageSrc; - tf = NULL; -#endif - splash->drawImage(src, tf, &imgData, srcMode, maskColors ? gTrue : gFalse, - width, height, mat, interpolate); - if (inlineImg) { - while (imgData.y < height) { - imgData.imgStr->getLine(); - ++imgData.y; - } - } - - gfree(imgData.lookup); - delete imgData.imgStr; - str->close(); -} - -struct SplashOutMaskedImageData { - ImageStream *imgStr; - GfxImageColorMap *colorMap; - SplashBitmap *mask; - SplashColorPtr lookup; - SplashColorMode colorMode; - int width, height, y; -}; - -GBool SplashOutputDev::maskedImageSrc(void *data, SplashColorPtr colorLine, - Guchar *alphaLine) { - SplashOutMaskedImageData *imgData = (SplashOutMaskedImageData *)data; - Guchar *p, *aq; - SplashColorPtr q, col; - GfxRGB rgb; - GfxGray gray; -#ifdef SPLASH_CMYK - GfxCMYK cmyk; - GfxColor deviceN; -#endif - Guchar alpha; - Guchar *maskPtr; - int maskBit; - int nComps, x; - - if (imgData->y == imgData->height) { - return gFalse; - } - if (!(p = imgData->imgStr->getLine())) { - return gFalse; - } - - nComps = imgData->colorMap->getNumPixelComps(); - - maskPtr = imgData->mask->getDataPtr() + - imgData->y * imgData->mask->getRowSize(); - maskBit = 0x80; - for (x = 0, q = colorLine, aq = alphaLine; - x < imgData->width; - ++x, p += nComps) { - alpha = (*maskPtr & maskBit) ? 0xff : 0x00; - if (!(maskBit >>= 1)) { - ++maskPtr; - maskBit = 0x80; - } - if (imgData->lookup) { - switch (imgData->colorMode) { - case splashModeMono1: - case splashModeMono8: - *q++ = imgData->lookup[*p]; - break; - case splashModeRGB8: - case splashModeBGR8: - col = &imgData->lookup[3 * *p]; - *q++ = col[0]; - *q++ = col[1]; - *q++ = col[2]; - break; - case splashModeXBGR8: - col = &imgData->lookup[4 * *p]; - *q++ = col[0]; - *q++ = col[1]; - *q++ = col[2]; - *q++ = 255; - break; -#ifdef SPLASH_CMYK - case splashModeCMYK8: - col = &imgData->lookup[4 * *p]; - *q++ = col[0]; - *q++ = col[1]; - *q++ = col[2]; - *q++ = col[3]; - break; - case splashModeDeviceN8: - col = &imgData->lookup[(SPOT_NCOMPS+4) * *p]; - for (int cp = 0; cp < SPOT_NCOMPS+4; cp++) - *q++ = col[cp]; - break; -#endif - } - *aq++ = alpha; - } else { - switch (imgData->colorMode) { - case splashModeMono1: - case splashModeMono8: - imgData->colorMap->getGray(p, &gray); - *q++ = colToByte(gray); - break; - case splashModeXBGR8: - case splashModeRGB8: - case splashModeBGR8: - imgData->colorMap->getRGB(p, &rgb); - *q++ = colToByte(rgb.r); - *q++ = colToByte(rgb.g); - *q++ = colToByte(rgb.b); - if (imgData->colorMode == splashModeXBGR8) *q++ = 255; - break; -#ifdef SPLASH_CMYK - case splashModeCMYK8: - imgData->colorMap->getCMYK(p, &cmyk); - *q++ = colToByte(cmyk.c); - *q++ = colToByte(cmyk.m); - *q++ = colToByte(cmyk.y); - *q++ = colToByte(cmyk.k); - break; - case splashModeDeviceN8: - imgData->colorMap->getDeviceN(p, &deviceN); - for (int cp = 0; cp < SPOT_NCOMPS+4; cp++) - *q++ = colToByte(deviceN.c[cp]); - break; -#endif - } - *aq++ = alpha; - } - } - - ++imgData->y; - return gTrue; -} - -void SplashOutputDev::drawMaskedImage(GfxState *state, Object *ref, - Stream *str, int width, int height, - GfxImageColorMap *colorMap, - GBool interpolate, - Stream *maskStr, int maskWidth, - int maskHeight, GBool maskInvert, - GBool maskInterpolate) { - GfxImageColorMap *maskColorMap; - double *ctm; - SplashCoord mat[6]; - SplashOutMaskedImageData imgData; - SplashOutImageMaskData imgMaskData; - SplashColorMode srcMode; - SplashBitmap *maskBitmap; - Splash *maskSplash; - SplashColor maskColor; - GfxGray gray; - GfxRGB rgb; -#ifdef SPLASH_CMYK - GfxCMYK cmyk; - GfxColor deviceN; -#endif - Guchar pix; - int n, i; - -#ifdef SPLASH_CMYK - colorMap->getColorSpace()->createMapping(bitmap->getSeparationList(), SPOT_NCOMPS); -#endif - setOverprintMask(colorMap->getColorSpace(), state->getFillOverprint(), - state->getOverprintMode(), nullptr); - - // If the mask is higher resolution than the image, use - // drawSoftMaskedImage() instead. - if (maskWidth > width || maskHeight > height) { - Object maskDecode(new Array((xref) ? xref : doc->getXRef())); - maskDecode.arrayAdd(Object(maskInvert ? 0 : 1)); - maskDecode.arrayAdd(Object(maskInvert ? 1 : 0)); - maskColorMap = new GfxImageColorMap(1, &maskDecode, - new GfxDeviceGrayColorSpace()); - drawSoftMaskedImage(state, ref, str, width, height, colorMap, interpolate, - maskStr, maskWidth, maskHeight, maskColorMap, maskInterpolate); - delete maskColorMap; - - } else { - //----- scale the mask image to the same size as the source image - - mat[0] = (SplashCoord)width; - mat[1] = 0; - mat[2] = 0; - mat[3] = (SplashCoord)height; - mat[4] = 0; - mat[5] = 0; - imgMaskData.imgStr = new ImageStream(maskStr, maskWidth, 1, 1); - imgMaskData.imgStr->reset(); - imgMaskData.invert = maskInvert ? 0 : 1; - imgMaskData.width = maskWidth; - imgMaskData.height = maskHeight; - imgMaskData.y = 0; - maskBitmap = new SplashBitmap(width, height, 1, splashModeMono1, gFalse); - if (!maskBitmap->getDataPtr()) { - delete maskBitmap; - width = height = 1; - maskBitmap = new SplashBitmap(width, height, 1, splashModeMono1, gFalse); - } - maskSplash = new Splash(maskBitmap, gFalse); - maskColor[0] = 0; - maskSplash->clear(maskColor); - maskColor[0] = 0xff; - maskSplash->setFillPattern(new SplashSolidColor(maskColor)); - maskSplash->fillImageMask(&imageMaskSrc, &imgMaskData, - maskWidth, maskHeight, mat, gFalse); - delete imgMaskData.imgStr; - maskStr->close(); - delete maskSplash; - - //----- draw the source image - - ctm = state->getCTM(); - for (i = 0; i < 6; ++i) { - if (!std::isfinite(ctm[i])) { - delete maskBitmap; - return; - } - } - mat[0] = ctm[0]; - mat[1] = ctm[1]; - mat[2] = -ctm[2]; - mat[3] = -ctm[3]; - mat[4] = ctm[2] + ctm[4]; - mat[5] = ctm[3] + ctm[5]; - - imgData.imgStr = new ImageStream(str, width, - colorMap->getNumPixelComps(), - colorMap->getBits()); - imgData.imgStr->reset(); - imgData.colorMap = colorMap; - imgData.mask = maskBitmap; - imgData.colorMode = colorMode; - imgData.width = width; - imgData.height = height; - imgData.y = 0; - - // special case for one-channel (monochrome/gray/separation) images: - // build a lookup table here - imgData.lookup = nullptr; - if (colorMap->getNumPixelComps() == 1) { - n = 1 << colorMap->getBits(); - switch (colorMode) { - case splashModeMono1: - case splashModeMono8: - imgData.lookup = (SplashColorPtr)gmalloc(n); - for (i = 0; i < n; ++i) { - pix = (Guchar)i; - colorMap->getGray(&pix, &gray); - imgData.lookup[i] = colToByte(gray); - } - break; - case splashModeRGB8: - case splashModeBGR8: - imgData.lookup = (SplashColorPtr)gmallocn(n, 3); - for (i = 0; i < n; ++i) { - pix = (Guchar)i; - colorMap->getRGB(&pix, &rgb); - imgData.lookup[3*i] = colToByte(rgb.r); - imgData.lookup[3*i+1] = colToByte(rgb.g); - imgData.lookup[3*i+2] = colToByte(rgb.b); - } - break; - case splashModeXBGR8: - imgData.lookup = (SplashColorPtr)gmallocn(n, 4); - for (i = 0; i < n; ++i) { - pix = (Guchar)i; - colorMap->getRGB(&pix, &rgb); - imgData.lookup[4*i] = colToByte(rgb.r); - imgData.lookup[4*i+1] = colToByte(rgb.g); - imgData.lookup[4*i+2] = colToByte(rgb.b); - imgData.lookup[4*i+3] = 255; - } - break; -#ifdef SPLASH_CMYK - case splashModeCMYK8: - imgData.lookup = (SplashColorPtr)gmallocn(n, 4); - for (i = 0; i < n; ++i) { - pix = (Guchar)i; - colorMap->getCMYK(&pix, &cmyk); - imgData.lookup[4*i] = colToByte(cmyk.c); - imgData.lookup[4*i+1] = colToByte(cmyk.m); - imgData.lookup[4*i+2] = colToByte(cmyk.y); - imgData.lookup[4*i+3] = colToByte(cmyk.k); - } - break; - case splashModeDeviceN8: - imgData.lookup = (SplashColorPtr)gmallocn(n, SPOT_NCOMPS+4); - for (i = 0; i < n; ++i) { - pix = (Guchar)i; - colorMap->getDeviceN(&pix, &deviceN); - for (int cp = 0; cp < SPOT_NCOMPS+4; cp++) - imgData.lookup[(SPOT_NCOMPS+4)*i + cp] = colToByte(deviceN.c[cp]); - } - break; -#endif - } - } - - if (colorMode == splashModeMono1) { - srcMode = splashModeMono8; - } else { - srcMode = colorMode; - } - splash->drawImage(&maskedImageSrc, nullptr, &imgData, srcMode, gTrue, - width, height, mat, interpolate); - delete maskBitmap; - gfree(imgData.lookup); - delete imgData.imgStr; - str->close(); - } -} - -void SplashOutputDev::drawSoftMaskedImage(GfxState *state, Object *ref, - Stream *str, int width, int height, - GfxImageColorMap *colorMap, - GBool interpolate, - Stream *maskStr, - int maskWidth, int maskHeight, - GfxImageColorMap *maskColorMap, - GBool maskInterpolate) { - double *ctm; - SplashCoord mat[6]; - SplashOutImageData imgData; - SplashOutImageData imgMaskData; - SplashColorMode srcMode; - SplashBitmap *maskBitmap; - Splash *maskSplash; - SplashColor maskColor; - GfxGray gray; - GfxRGB rgb; -#ifdef SPLASH_CMYK - GfxCMYK cmyk; - GfxColor deviceN; -#endif - Guchar pix; - int n, i; - -#ifdef SPLASH_CMYK - colorMap->getColorSpace()->createMapping(bitmap->getSeparationList(), SPOT_NCOMPS); -#endif - setOverprintMask(colorMap->getColorSpace(), state->getFillOverprint(), - state->getOverprintMode(), nullptr); - - ctm = state->getCTM(); - for (i = 0; i < 6; ++i) { - if (!std::isfinite(ctm[i])) return; - } - mat[0] = ctm[0]; - mat[1] = ctm[1]; - mat[2] = -ctm[2]; - mat[3] = -ctm[3]; - mat[4] = ctm[2] + ctm[4]; - mat[5] = ctm[3] + ctm[5]; - - //----- set up the soft mask - - if (maskColorMap->getMatteColor() != nullptr) { - const int maskChars = maskWidth * maskHeight; - Guchar *data = (Guchar *) gmalloc(maskChars); - maskStr->reset(); - const int readChars = maskStr->doGetChars(maskChars, data); - if (unlikely(readChars < maskChars)) { - memset(&data[readChars], 0, maskChars - readChars); - } - maskStr->close(); - maskStr = new AutoFreeMemStream((char *)data, 0, maskChars, maskStr->getDictObject()->copy()); - } - imgMaskData.imgStr = new ImageStream(maskStr, maskWidth, - maskColorMap->getNumPixelComps(), - maskColorMap->getBits()); - imgMaskData.imgStr->reset(); - imgMaskData.colorMap = maskColorMap; - imgMaskData.maskColors = nullptr; - imgMaskData.colorMode = splashModeMono8; - imgMaskData.width = maskWidth; - imgMaskData.height = maskHeight; - imgMaskData.y = 0; - imgMaskData.maskStr = nullptr; - imgMaskData.maskColorMap = nullptr; - n = 1 << maskColorMap->getBits(); - imgMaskData.lookup = (SplashColorPtr)gmalloc(n); - for (i = 0; i < n; ++i) { - pix = (Guchar)i; - maskColorMap->getGray(&pix, &gray); - imgMaskData.lookup[i] = colToByte(gray); - } - maskBitmap = new SplashBitmap(bitmap->getWidth(), bitmap->getHeight(), - 1, splashModeMono8, gFalse); - maskSplash = new Splash(maskBitmap, vectorAntialias); - maskColor[0] = 0; - maskSplash->clear(maskColor); - maskSplash->drawImage(&imageSrc, nullptr, &imgMaskData, splashModeMono8, gFalse, - maskWidth, maskHeight, mat, maskInterpolate); - delete imgMaskData.imgStr; - if (maskColorMap->getMatteColor() == nullptr) { - maskStr->close(); - } - gfree(imgMaskData.lookup); - delete maskSplash; - splash->setSoftMask(maskBitmap); - - //----- draw the source image - - imgData.imgStr = new ImageStream(str, width, - colorMap->getNumPixelComps(), - colorMap->getBits()); - imgData.imgStr->reset(); - imgData.colorMap = colorMap; - imgData.maskColors = nullptr; - imgData.colorMode = colorMode; - imgData.width = width; - imgData.height = height; - imgData.maskStr = nullptr; - imgData.maskColorMap = nullptr; - if (maskColorMap->getMatteColor() != nullptr) { - getMatteColor(colorMode, colorMap, maskColorMap->getMatteColor(), imgData.matteColor); - imgData.maskColorMap = maskColorMap; - imgData.maskStr = new ImageStream(maskStr, maskWidth, - maskColorMap->getNumPixelComps(), - maskColorMap->getBits()); - imgData.maskStr->reset(); - } - imgData.y = 0; - - // special case for one-channel (monochrome/gray/separation) images: - // build a lookup table here - imgData.lookup = nullptr; - if (colorMap->getNumPixelComps() == 1) { - n = 1 << colorMap->getBits(); - switch (colorMode) { - case splashModeMono1: - case splashModeMono8: - imgData.lookup = (SplashColorPtr)gmalloc(n); - for (i = 0; i < n; ++i) { - pix = (Guchar)i; - colorMap->getGray(&pix, &gray); - imgData.lookup[i] = colToByte(gray); - } - break; - case splashModeRGB8: - case splashModeBGR8: - imgData.lookup = (SplashColorPtr)gmallocn(n, 3); - for (i = 0; i < n; ++i) { - pix = (Guchar)i; - colorMap->getRGB(&pix, &rgb); - imgData.lookup[3*i] = colToByte(rgb.r); - imgData.lookup[3*i+1] = colToByte(rgb.g); - imgData.lookup[3*i+2] = colToByte(rgb.b); - } - break; - case splashModeXBGR8: - imgData.lookup = (SplashColorPtr)gmallocn(n, 4); - for (i = 0; i < n; ++i) { - pix = (Guchar)i; - colorMap->getRGB(&pix, &rgb); - imgData.lookup[4*i] = colToByte(rgb.r); - imgData.lookup[4*i+1] = colToByte(rgb.g); - imgData.lookup[4*i+2] = colToByte(rgb.b); - imgData.lookup[4*i+3] = 255; - } - break; -#ifdef SPLASH_CMYK - case splashModeCMYK8: - imgData.lookup = (SplashColorPtr)gmallocn(n, 4); - for (i = 0; i < n; ++i) { - pix = (Guchar)i; - colorMap->getCMYK(&pix, &cmyk); - imgData.lookup[4*i] = colToByte(cmyk.c); - imgData.lookup[4*i+1] = colToByte(cmyk.m); - imgData.lookup[4*i+2] = colToByte(cmyk.y); - imgData.lookup[4*i+3] = colToByte(cmyk.k); - } - break; - case splashModeDeviceN8: - imgData.lookup = (SplashColorPtr)gmallocn(n, SPOT_NCOMPS+4); - for (i = 0; i < n; ++i) { - pix = (Guchar)i; - colorMap->getDeviceN(&pix, &deviceN); - for (int cp = 0; cp < SPOT_NCOMPS+4; cp++) - imgData.lookup[(SPOT_NCOMPS+4)*i + cp] = colToByte(deviceN.c[cp]); - } - break; -#endif - } - } - - if (colorMode == splashModeMono1) { - srcMode = splashModeMono8; - } else { - srcMode = colorMode; - } - splash->drawImage(&imageSrc, nullptr, &imgData, srcMode, gFalse, width, height, mat, interpolate); - splash->setSoftMask(nullptr); - gfree(imgData.lookup); - delete imgData.maskStr; - delete imgData.imgStr; - if (maskColorMap->getMatteColor() != nullptr) { - maskStr->close(); - delete maskStr; - } - str->close(); -} - -GBool SplashOutputDev::checkTransparencyGroup(GfxState *state, GBool knockout) { - if (state->getFillOpacity() != 1 || - state->getStrokeOpacity() != 1 || - state->getAlphaIsShape() || - state->getBlendMode() != gfxBlendNormal || - splash->getSoftMask() != nullptr || - knockout) - return gTrue; - return transpGroupStack != nullptr && transpGroupStack->shape != nullptr; -} - -void SplashOutputDev::beginTransparencyGroup(GfxState *state, double *bbox, - GfxColorSpace *blendingColorSpace, - GBool isolated, GBool knockout, - GBool forSoftMask) { - SplashTransparencyGroup *transpGroup; - SplashColor color; - double xMin, yMin, xMax, yMax, x, y; - int tx, ty, w, h, i; - - // transform the bbox - state->transform(bbox[0], bbox[1], &x, &y); - xMin = xMax = x; - yMin = yMax = y; - state->transform(bbox[0], bbox[3], &x, &y); - if (x < xMin) { - xMin = x; - } else if (x > xMax) { - xMax = x; - } - if (y < yMin) { - yMin = y; - } else if (y > yMax) { - yMax = y; - } - state->transform(bbox[2], bbox[1], &x, &y); - if (x < xMin) { - xMin = x; - } else if (x > xMax) { - xMax = x; - } - if (y < yMin) { - yMin = y; - } else if (y > yMax) { - yMax = y; - } - state->transform(bbox[2], bbox[3], &x, &y); - if (x < xMin) { - xMin = x; - } else if (x > xMax) { - xMax = x; - } - if (y < yMin) { - yMin = y; - } else if (y > yMax) { - yMax = y; - } - tx = (int)floor(xMin); - if (tx < 0) { - tx = 0; - } else if (tx >= bitmap->getWidth()) { - tx = bitmap->getWidth() - 1; - } - ty = (int)floor(yMin); - if (ty < 0) { - ty = 0; - } else if (ty >= bitmap->getHeight()) { - ty = bitmap->getHeight() - 1; - } - w = (int)ceil(xMax) - tx + 1; - if (tx + w > bitmap->getWidth()) { - w = bitmap->getWidth() - tx; - } - if (w < 1) { - w = 1; - } - h = (int)ceil(yMax) - ty + 1; - if (ty + h > bitmap->getHeight()) { - h = bitmap->getHeight() - ty; - } - if (h < 1) { - h = 1; - } - - // push a new stack entry - transpGroup = new SplashTransparencyGroup(); - transpGroup->softmask = nullptr; - transpGroup->tx = tx; - transpGroup->ty = ty; - transpGroup->blendingColorSpace = blendingColorSpace; - transpGroup->isolated = isolated; - transpGroup->shape = (knockout && !isolated) ? SplashBitmap::copy(bitmap) : nullptr; - transpGroup->knockout = (knockout && isolated); - transpGroup->knockoutOpacity = 1.0; - transpGroup->next = transpGroupStack; - transpGroupStack = transpGroup; - - // save state - transpGroup->origBitmap = bitmap; - transpGroup->origSplash = splash; - transpGroup->fontAA = fontEngine->getAA(); - - //~ this handles the blendingColorSpace arg for soft masks, but - //~ not yet for transparency groups - - // switch to the blending color space - if (forSoftMask && isolated && blendingColorSpace) { - if (blendingColorSpace->getMode() == csDeviceGray || - blendingColorSpace->getMode() == csCalGray || - (blendingColorSpace->getMode() == csICCBased && - blendingColorSpace->getNComps() == 1)) { - colorMode = splashModeMono8; - } else if (blendingColorSpace->getMode() == csDeviceRGB || - blendingColorSpace->getMode() == csCalRGB || - (blendingColorSpace->getMode() == csICCBased && - blendingColorSpace->getNComps() == 3)) { - //~ does this need to use BGR8? - colorMode = splashModeRGB8; -#ifdef SPLASH_CMYK - } else if (blendingColorSpace->getMode() == csDeviceCMYK || - (blendingColorSpace->getMode() == csICCBased && - blendingColorSpace->getNComps() == 4)) { - colorMode = splashModeCMYK8; -#endif - } - } - - // create the temporary bitmap - bitmap = new SplashBitmap(w, h, bitmapRowPad, colorMode, gTrue, - bitmapTopDown, bitmap->getSeparationList()); - if (!bitmap->getDataPtr()) { - delete bitmap; - w = h = 1; - bitmap = new SplashBitmap(w, h, bitmapRowPad, colorMode, gTrue, bitmapTopDown); - } - splash = new Splash(bitmap, vectorAntialias, - transpGroup->origSplash->getScreen()); - if (transpGroup->next != nullptr && transpGroup->next->knockout) { - fontEngine->setAA(gFalse); - } - splash->setThinLineMode(transpGroup->origSplash->getThinLineMode()); - splash->setMinLineWidth(s_minLineWidth); - //~ Acrobat apparently copies at least the fill and stroke colors, and - //~ maybe other state(?) -- but not the clipping path (and not sure - //~ what else) - //~ [this is likely the same situation as in type3D1()] - splash->setFillPattern(transpGroup->origSplash->getFillPattern()->copy()); - splash->setStrokePattern( - transpGroup->origSplash->getStrokePattern()->copy()); - if (isolated) { - for (i = 0; i < splashMaxColorComps; ++i) { - color[i] = 0; - } - if (colorMode == splashModeXBGR8) color[3] = 255; - splash->clear(color, 0); - } else { - SplashBitmap *shape = (knockout) ? transpGroup->shape : - (transpGroup->next != nullptr && transpGroup->next->shape != nullptr) ? transpGroup->next->shape : transpGroup->origBitmap; - int shapeTx = (knockout) ? tx : - (transpGroup->next != nullptr && transpGroup->next->shape != nullptr) ? transpGroup->next->tx + tx : tx; - int shapeTy = (knockout) ? ty : - (transpGroup->next != nullptr && transpGroup->next->shape != nullptr) ? transpGroup->next->ty + ty : ty; - splash->blitTransparent(transpGroup->origBitmap, tx, ty, 0, 0, w, h); - splash->setInNonIsolatedGroup(shape, shapeTx, shapeTy); - } - transpGroup->tBitmap = bitmap; - state->shiftCTMAndClip(-tx, -ty); - updateCTM(state, 0, 0, 0, 0, 0, 0); - ++nestCount; -} - -void SplashOutputDev::endTransparencyGroup(GfxState *state) { - // restore state - --nestCount; - delete splash; - bitmap = transpGroupStack->origBitmap; - colorMode = bitmap->getMode(); - splash = transpGroupStack->origSplash; - state->shiftCTMAndClip(transpGroupStack->tx, transpGroupStack->ty); - updateCTM(state, 0, 0, 0, 0, 0, 0); -} - -void SplashOutputDev::paintTransparencyGroup(GfxState *state, double *bbox) { - SplashBitmap *tBitmap; - SplashTransparencyGroup *transpGroup; - GBool isolated; - int tx, ty; - - tx = transpGroupStack->tx; - ty = transpGroupStack->ty; - tBitmap = transpGroupStack->tBitmap; - isolated = transpGroupStack->isolated; - - // paint the transparency group onto the parent bitmap - // - the clip path was set in the parent's state) - if (tx < bitmap->getWidth() && ty < bitmap->getHeight()) { - SplashCoord knockoutOpacity = (transpGroupStack->next != nullptr) ? transpGroupStack->next->knockoutOpacity - : transpGroupStack->knockoutOpacity; - splash->setOverprintMask(0xffffffff, gFalse); - splash->composite(tBitmap, 0, 0, tx, ty, - tBitmap->getWidth(), tBitmap->getHeight(), - gFalse, !isolated, transpGroupStack->next != nullptr && transpGroupStack->next->knockout, knockoutOpacity); - fontEngine->setAA(transpGroupStack->fontAA); - if (transpGroupStack->next != nullptr && transpGroupStack->next->shape != nullptr) { - transpGroupStack->next->knockout = gTrue; - } - } - - // pop the stack - transpGroup = transpGroupStack; - transpGroupStack = transpGroup->next; - if (transpGroupStack != nullptr && transpGroup->knockoutOpacity < transpGroupStack->knockoutOpacity) { - transpGroupStack->knockoutOpacity = transpGroup->knockoutOpacity; - } - delete transpGroup->shape; - delete transpGroup; - - delete tBitmap; -} - -void SplashOutputDev::setSoftMask(GfxState *state, double *bbox, - GBool alpha, Function *transferFunc, - GfxColor *backdropColor) { - SplashBitmap *softMask, *tBitmap; - Splash *tSplash; - SplashTransparencyGroup *transpGroup; - SplashColor color; - SplashColorPtr p; - GfxGray gray; - GfxRGB rgb; -#ifdef SPLASH_CMYK - GfxCMYK cmyk; - GfxColor deviceN; -#endif - double lum, lum2; - int tx, ty, x, y; - - tx = transpGroupStack->tx; - ty = transpGroupStack->ty; - tBitmap = transpGroupStack->tBitmap; - - // composite with backdrop color - if (!alpha && tBitmap->getMode() != splashModeMono1) { - //~ need to correctly handle the case where no blending color - //~ space is given - if (transpGroupStack->blendingColorSpace) { - tSplash = new Splash(tBitmap, vectorAntialias, - transpGroupStack->origSplash->getScreen()); - switch (tBitmap->getMode()) { - case splashModeMono1: - // transparency is not supported in mono1 mode - break; - case splashModeMono8: - transpGroupStack->blendingColorSpace->getGray(backdropColor, &gray); - color[0] = colToByte(gray); - tSplash->compositeBackground(color); - break; - case splashModeXBGR8: - color[3] = 255; - // fallthrough - case splashModeRGB8: - case splashModeBGR8: - transpGroupStack->blendingColorSpace->getRGB(backdropColor, &rgb); - color[0] = colToByte(rgb.r); - color[1] = colToByte(rgb.g); - color[2] = colToByte(rgb.b); - tSplash->compositeBackground(color); - break; -#ifdef SPLASH_CMYK - case splashModeCMYK8: - transpGroupStack->blendingColorSpace->getCMYK(backdropColor, &cmyk); - color[0] = colToByte(cmyk.c); - color[1] = colToByte(cmyk.m); - color[2] = colToByte(cmyk.y); - color[3] = colToByte(cmyk.k); - tSplash->compositeBackground(color); - break; - case splashModeDeviceN8: - transpGroupStack->blendingColorSpace->getDeviceN(backdropColor, &deviceN); - for (int cp=0; cp < SPOT_NCOMPS+4; cp++) - color[cp] = colToByte(deviceN.c[cp]); - tSplash->compositeBackground(color); - break; -#endif - } - delete tSplash; - } - } - - softMask = new SplashBitmap(bitmap->getWidth(), bitmap->getHeight(), - 1, splashModeMono8, gFalse); - unsigned char fill = 0; - if (transpGroupStack->blendingColorSpace) { - transpGroupStack->blendingColorSpace->getGray(backdropColor, &gray); - fill = colToByte(gray); - } - memset(softMask->getDataPtr(), fill, - softMask->getRowSize() * softMask->getHeight()); - p = softMask->getDataPtr() + ty * softMask->getRowSize() + tx; - int xMax = tBitmap->getWidth(); - int yMax = tBitmap->getHeight(); - if (xMax > bitmap->getWidth() - tx) xMax = bitmap->getWidth() - tx; - if (yMax > bitmap->getHeight() - ty) yMax = bitmap->getHeight() - ty; - for (y = 0; y < yMax; ++y) { - for (x = 0; x < xMax; ++x) { - if (alpha) { - if (transferFunc) { - lum = tBitmap->getAlpha(x, y) / 255.0; - transferFunc->transform(&lum, &lum2); - p[x] = (int)(lum2 * 255.0 + 0.5); - } else - p[x] = tBitmap->getAlpha(x, y); - } else { - tBitmap->getPixel(x, y, color); - // convert to luminosity - switch (tBitmap->getMode()) { - case splashModeMono1: - case splashModeMono8: - lum = color[0] / 255.0; - break; - case splashModeXBGR8: - case splashModeRGB8: - case splashModeBGR8: - lum = (0.3 / 255.0) * color[0] + - (0.59 / 255.0) * color[1] + - (0.11 / 255.0) * color[2]; - break; -#ifdef SPLASH_CMYK - case splashModeCMYK8: - case splashModeDeviceN8: - lum = (1 - color[3] / 255.0) - - (0.3 / 255.0) * color[0] - - (0.59 / 255.0) * color[1] - - (0.11 / 255.0) * color[2]; - if (lum < 0) { - lum = 0; - } - break; -#endif - } - if (transferFunc) { - transferFunc->transform(&lum, &lum2); - } else { - lum2 = lum; - } - p[x] = (int)(lum2 * 255.0 + 0.5); - } - } - p += softMask->getRowSize(); - } - splash->setSoftMask(softMask); - - // pop the stack - transpGroup = transpGroupStack; - transpGroupStack = transpGroup->next; - delete transpGroup; - - delete tBitmap; -} - -void SplashOutputDev::clearSoftMask(GfxState *state) { - splash->setSoftMask(nullptr); -} - -void SplashOutputDev::setPaperColor(SplashColorPtr paperColorA) { - splashColorCopy(paperColor, paperColorA); -} - -int SplashOutputDev::getBitmapWidth() { - return bitmap->getWidth(); -} - -int SplashOutputDev::getBitmapHeight() { - return bitmap->getHeight(); -} - -SplashBitmap *SplashOutputDev::takeBitmap() { - SplashBitmap *ret; - - ret = bitmap; - bitmap = new SplashBitmap(1, 1, bitmapRowPad, colorMode, - colorMode != splashModeMono1, bitmapTopDown); - return ret; -} - -void SplashOutputDev::getModRegion(int *xMin, int *yMin, - int *xMax, int *yMax) { - splash->getModRegion(xMin, yMin, xMax, yMax); -} - -void SplashOutputDev::clearModRegion() { - splash->clearModRegion(); -} - -#if 1 //~tmp: turn off anti-aliasing temporarily -GBool SplashOutputDev::getVectorAntialias() { - return splash->getVectorAntialias(); -} - -void SplashOutputDev::setVectorAntialias(GBool vaa) { - vaa = vaa && colorMode != splashModeMono1; - vectorAntialias = vaa; - splash->setVectorAntialias(vaa); -} -#endif - -void SplashOutputDev::setFreeTypeHinting(GBool enable, GBool enableSlightHintingA) -{ - enableFreeTypeHinting = enable; - enableSlightHinting = enableSlightHintingA; -} - -GBool SplashOutputDev::tilingPatternFill(GfxState *state, Gfx *gfxA, Catalog *catalog, Object *str, - double *ptm, int paintType, int /*tilingType*/, Dict *resDict, - double *mat, double *bbox, - int x0, int y0, int x1, int y1, - double xStep, double yStep) -{ - PDFRectangle box; - Gfx *gfx; - Splash *formerSplash = splash; - SplashBitmap *formerBitmap = bitmap; - double width, height; - int surface_width, surface_height, result_width, result_height, i; - int repeatX, repeatY; - SplashCoord matc[6]; - Matrix m1; - double *ctm, savedCTM[6]; - double kx, ky, sx, sy; - GBool retValue = gFalse; - - width = bbox[2] - bbox[0]; - height = bbox[3] - bbox[1]; - - if (xStep != width || yStep != height) - return gFalse; - - // calculate offsets - ctm = state->getCTM(); - for (i = 0; i < 6; ++i) { - savedCTM[i] = ctm[i]; - } - state->concatCTM(mat[0], mat[1], mat[2], mat[3], mat[4], mat[5]); - state->concatCTM(1, 0, 0, 1, bbox[0], bbox[1]); - ctm = state->getCTM(); - for (i = 0; i < 6; ++i) { - if (!std::isfinite(ctm[i])) { - state->setCTM(savedCTM[0], savedCTM[1], savedCTM[2], savedCTM[3], savedCTM[4], savedCTM[5]); - return gFalse; - } - } - matc[4] = x0 * xStep * ctm[0] + y0 * yStep * ctm[2] + ctm[4]; - matc[5] = x0 * xStep * ctm[1] + y0 * yStep * ctm[3] + ctm[5]; - if (splashAbs(ctm[1]) > splashAbs(ctm[0])) { - kx = -ctm[1]; - ky = ctm[2] - (ctm[0] * ctm[3]) / ctm[1]; - } else { - kx = ctm[0]; - ky = ctm[3] - (ctm[1] * ctm[2]) / ctm[0]; - } - result_width = (int) ceil(fabs(kx * width * (x1 - x0))); - result_height = (int) ceil(fabs(ky * height * (y1 - y0))); - kx = state->getHDPI() / 72.0; - ky = state->getVDPI() / 72.0; - m1.m[0] = (ptm[0] == 0) ? fabs(ptm[2]) * kx : fabs(ptm[0]) * kx; - m1.m[1] = 0; - m1.m[2] = 0; - m1.m[3] = (ptm[3] == 0) ? fabs(ptm[1]) * ky : fabs(ptm[3]) * ky; - m1.m[4] = 0; - m1.m[5] = 0; - m1.transform(width, height, &kx, &ky); - surface_width = (int) ceil (fabs(kx)); - surface_height = (int) ceil (fabs(ky)); - - sx = (double) result_width / (surface_width * (x1 - x0)); - sy = (double) result_height / (surface_height * (y1 - y0)); - m1.m[0] *= sx; - m1.m[3] *= sy; - m1.transform(width, height, &kx, &ky); - - if(fabs(kx) < 1 && fabs(ky) < 1) { - kx = std::min<double>(kx, ky); - ky = 2 / kx; - m1.m[0] *= ky; - m1.m[3] *= ky; - m1.transform(width, height, &kx, &ky); - surface_width = (int) ceil (fabs(kx)); - surface_height = (int) ceil (fabs(ky)); - repeatX = x1 - x0; - repeatY = y1 - y0; - } else { - if ((unsigned long) surface_width * surface_height > 0x800000L) { - state->setCTM(savedCTM[0], savedCTM[1], savedCTM[2], savedCTM[3], savedCTM[4], savedCTM[5]); - return gFalse; - } - while(fabs(kx) > 16384 || fabs(ky) > 16384) { - // limit pattern bitmap size - m1.m[0] /= 2; - m1.m[3] /= 2; - m1.transform(width, height, &kx, &ky); - } - surface_width = (int) ceil (fabs(kx)); - surface_height = (int) ceil (fabs(ky)); - // adjust repeat values to completely fill region - repeatX = result_width / surface_width; - repeatY = result_height / surface_height; - if (surface_width * repeatX < result_width) - repeatX++; - if (surface_height * repeatY < result_height) - repeatY++; - if (x1 - x0 > repeatX) - repeatX = x1 - x0; - if (y1 - y0 > repeatY) - repeatY = y1 - y0; - } - // restore CTM and calculate rotate and scale with rounded matric - state->setCTM(savedCTM[0], savedCTM[1], savedCTM[2], savedCTM[3], savedCTM[4], savedCTM[5]); - state->concatCTM(mat[0], mat[1], mat[2], mat[3], mat[4], mat[5]); - state->concatCTM(width * repeatX, 0, 0, height * repeatY, bbox[0], bbox[1]); - ctm = state->getCTM(); - matc[0] = ctm[0]; - matc[1] = ctm[1]; - matc[2] = ctm[2]; - matc[3] = ctm[3]; - - if (surface_width == 0 || surface_height == 0 || repeatX * repeatY <= 4) { - state->setCTM(savedCTM[0], savedCTM[1], savedCTM[2], savedCTM[3], savedCTM[4], savedCTM[5]); - return gFalse; - } - m1.transform(bbox[0], bbox[1], &kx, &ky); - m1.m[4] = -kx; - m1.m[5] = -ky; - - bitmap = new SplashBitmap(surface_width, surface_height, 1, - (paintType == 1) ? colorMode : splashModeMono8, gTrue); - if (bitmap->getDataPtr() == nullptr) { - SplashBitmap *tBitmap = bitmap; - bitmap = formerBitmap; - delete tBitmap; - state->setCTM(savedCTM[0], savedCTM[1], savedCTM[2], savedCTM[3], savedCTM[4], savedCTM[5]); - return gFalse; - } - splash = new Splash(bitmap, gTrue); - if (paintType == 2) { - SplashColor clearColor; -#ifdef SPLASH_CMYK - clearColor[0] = (colorMode == splashModeCMYK8 || colorMode == splashModeDeviceN8) ? 0x00 : 0xFF; -#else - clearColor[0] = 0xFF; -#endif - splash->clear(clearColor, 0); - } else { - splash->clear(paperColor, 0); - } - splash->setThinLineMode(formerSplash->getThinLineMode()); - splash->setMinLineWidth(s_minLineWidth); - - box.x1 = bbox[0]; box.y1 = bbox[1]; - box.x2 = bbox[2]; box.y2 = bbox[3]; - gfx = new Gfx(doc, this, resDict, &box, nullptr, nullptr, nullptr, gfxA); - // set pattern transformation matrix - gfx->getState()->setCTM(m1.m[0], m1.m[1], m1.m[2], m1.m[3], m1.m[4], m1.m[5]); - updateCTM(gfx->getState(), m1.m[0], m1.m[1], m1.m[2], m1.m[3], m1.m[4], m1.m[5]); - gfx->display(str); - delete splash; - splash = formerSplash; - TilingSplashOutBitmap imgData; - imgData.bitmap = bitmap; - imgData.paintType = paintType; - imgData.pattern = splash->getFillPattern(); - imgData.colorMode = colorMode; - imgData.y = 0; - imgData.repeatX = repeatX; - imgData.repeatY = repeatY; - SplashBitmap *tBitmap = bitmap; - bitmap = formerBitmap; - result_width = tBitmap->getWidth() * imgData.repeatX; - result_height = tBitmap->getHeight() * imgData.repeatY; - - if (splashAbs(matc[1]) > splashAbs(matc[0])) { - kx = -matc[1]; - ky = matc[2] - (matc[0] * matc[3]) / matc[1]; - } else { - kx = matc[0]; - ky = matc[3] - (matc[1] * matc[2]) / matc[0]; - } - kx = result_width / (fabs(kx) + 1); - ky = result_height / (fabs(ky) + 1); - state->concatCTM(kx, 0, 0, ky, 0, 0); - ctm = state->getCTM(); - matc[0] = ctm[0]; - matc[1] = ctm[1]; - matc[2] = ctm[2]; - matc[3] = ctm[3]; - GBool minorAxisZero = matc[1] == 0 && matc[2] == 0; - if (matc[0] > 0 && minorAxisZero && matc[3] > 0) { - // draw the tiles - for (int y = 0; y < imgData.repeatY; ++y) { - for (int x = 0; x < imgData.repeatX; ++x) { - x0 = splashFloor(matc[4]) + x * tBitmap->getWidth(); - y0 = splashFloor(matc[5]) + y * tBitmap->getHeight(); - splash->blitImage(tBitmap, gTrue, x0, y0); - } - } - retValue = gTrue; - } else { - retValue = splash->drawImage(&tilingBitmapSrc, nullptr, &imgData, colorMode, gTrue, result_width, result_height, matc, gFalse, gTrue) == splashOk; - } - delete tBitmap; - delete gfx; - return retValue; -} - -GBool SplashOutputDev::gouraudTriangleShadedFill(GfxState *state, GfxGouraudTriangleShading *shading) -{ - GfxColorSpaceMode shadingMode = shading->getColorSpace()->getMode(); - GBool bDirectColorTranslation = gFalse; // triggers an optimization. - switch (colorMode) { - case splashModeRGB8: - bDirectColorTranslation = (shadingMode == csDeviceRGB); - break; -#ifdef SPLASH_CMYK - case splashModeCMYK8: - case splashModeDeviceN8: - bDirectColorTranslation = (shadingMode == csDeviceCMYK); - break; -#endif - default: - break; - } - // restore vector antialias because we support it here - if (shading->isParameterized()) { - SplashGouraudColor *splashShading = new SplashGouraudPattern(bDirectColorTranslation, state, shading); - GBool vaa = getVectorAntialias(); - GBool retVal = gFalse; - setVectorAntialias(gTrue); - retVal = splash->gouraudTriangleShadedFill(splashShading); - setVectorAntialias(vaa); - delete splashShading; - return retVal; - } - return gFalse; -} - -GBool SplashOutputDev::univariateShadedFill(GfxState *state, SplashUnivariatePattern *pattern, double tMin, double tMax) { - double xMin, yMin, xMax, yMax; - SplashPath *path; - GBool vaa = getVectorAntialias(); - // restore vector antialias because we support it here - setVectorAntialias(gTrue); - - GBool retVal = gFalse; - // get the clip region bbox - if (pattern->getShading()->getHasBBox()) { - pattern->getShading()->getBBox(&xMin, &yMin, &xMax, &yMax); - } else { - state->getClipBBox(&xMin, &yMin, &xMax, &yMax); - - xMin = floor (xMin); - yMin = floor (yMin); - xMax = ceil (xMax); - yMax = ceil (yMax); - - { - Matrix ctm, ictm; - double x[4], y[4]; - int i; - - state->getCTM(&ctm); - ctm.invertTo(&ictm); - - ictm.transform(xMin, yMin, &x[0], &y[0]); - ictm.transform(xMax, yMin, &x[1], &y[1]); - ictm.transform(xMin, yMax, &x[2], &y[2]); - ictm.transform(xMax, yMax, &x[3], &y[3]); - - xMin = xMax = x[0]; - yMin = yMax = y[0]; - for (i = 1; i < 4; i++) { - xMin = std::min<double>(xMin, x[i]); - yMin = std::min<double>(yMin, y[i]); - xMax = std::max<double>(xMax, x[i]); - yMax = std::max<double>(yMax, y[i]); - } - } - } - - // fill the region - state->moveTo(xMin, yMin); - state->lineTo(xMax, yMin); - state->lineTo(xMax, yMax); - state->lineTo(xMin, yMax); - state->closePath(); - path = convertPath(state, state->getPath(), gTrue); - -#ifdef SPLASH_CMYK - pattern->getShading()->getColorSpace()->createMapping(bitmap->getSeparationList(), SPOT_NCOMPS); -#endif - setOverprintMask(pattern->getShading()->getColorSpace(), state->getFillOverprint(), - state->getOverprintMode(), nullptr); - retVal = (splash->shadedFill(path, pattern->getShading()->getHasBBox(), pattern) == splashOk); - state->clearPath(); - setVectorAntialias(vaa); - delete path; - - return retVal; -} - -GBool SplashOutputDev::functionShadedFill(GfxState *state, GfxFunctionShading *shading) { - SplashFunctionPattern *pattern = new SplashFunctionPattern(colorMode, state, shading); - double xMin, yMin, xMax, yMax; - SplashPath *path; - GBool vaa = getVectorAntialias(); - // restore vector antialias because we support it here - setVectorAntialias(gTrue); - - GBool retVal = gFalse; - // get the clip region bbox - if (pattern->getShading()->getHasBBox()) { - pattern->getShading()->getBBox(&xMin, &yMin, &xMax, &yMax); - } else { - state->getClipBBox(&xMin, &yMin, &xMax, &yMax); - - xMin = floor (xMin); - yMin = floor (yMin); - xMax = ceil (xMax); - yMax = ceil (yMax); - - { - Matrix ctm, ictm; - double x[4], y[4]; - int i; - - state->getCTM(&ctm); - ctm.invertTo(&ictm); - - ictm.transform(xMin, yMin, &x[0], &y[0]); - ictm.transform(xMax, yMin, &x[1], &y[1]); - ictm.transform(xMin, yMax, &x[2], &y[2]); - ictm.transform(xMax, yMax, &x[3], &y[3]); - - xMin = xMax = x[0]; - yMin = yMax = y[0]; - for (i = 1; i < 4; i++) { - xMin = std::min<double>(xMin, x[i]); - yMin = std::min<double>(yMin, y[i]); - xMax = std::max<double>(xMax, x[i]); - yMax = std::max<double>(yMax, y[i]); - } - } - } - - // fill the region - state->moveTo(xMin, yMin); - state->lineTo(xMax, yMin); - state->lineTo(xMax, yMax); - state->lineTo(xMin, yMax); - state->closePath(); - path = convertPath(state, state->getPath(), gTrue); - -#ifdef SPLASH_CMYK - pattern->getShading()->getColorSpace()->createMapping(bitmap->getSeparationList(), SPOT_NCOMPS); -#endif - setOverprintMask(pattern->getShading()->getColorSpace(), state->getFillOverprint(), - state->getOverprintMode(), nullptr); - retVal = (splash->shadedFill(path, pattern->getShading()->getHasBBox(), pattern) == splashOk); - state->clearPath(); - setVectorAntialias(vaa); - delete path; - - delete pattern; - - return retVal; -} - -GBool SplashOutputDev::axialShadedFill(GfxState *state, GfxAxialShading *shading, double tMin, double tMax) { - SplashAxialPattern *pattern = new SplashAxialPattern(colorMode, state, shading); - GBool retVal = univariateShadedFill(state, pattern, tMin, tMax); - - delete pattern; - - return retVal; -} - -GBool SplashOutputDev::radialShadedFill(GfxState *state, GfxRadialShading *shading, double tMin, double tMax) { - SplashRadialPattern *pattern = new SplashRadialPattern(colorMode, state, shading); - GBool retVal = univariateShadedFill(state, pattern, tMin, tMax); - - delete pattern; - - return retVal; -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/SplashOutputDev.h b/Build/source/libs/poppler/poppler-src/poppler/SplashOutputDev.h deleted file mode 100644 index 3a1b594e409..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/SplashOutputDev.h +++ /dev/null @@ -1,471 +0,0 @@ -//======================================================================== -// -// SplashOutputDev.h -// -// Copyright 2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2005 Takashi Iwai <tiwai@suse.de> -// Copyright (C) 2009-2016 Thomas Freitag <Thomas.Freitag@alfa.de> -// Copyright (C) 2009 Carlos Garcia Campos <carlosgc@gnome.org> -// Copyright (C) 2010 Christian Feuersänger <cfeuersaenger@googlemail.com> -// Copyright (C) 2011 Andreas Hartmetz <ahartmetz@gmail.com> -// Copyright (C) 2011 Andrea Canciani <ranma42@gmail.com> -// Copyright (C) 2011, 2017 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2012, 2015, 2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2015, 2016 William Bader <williambader@hotmail.com> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef SPLASHOUTPUTDEV_H -#define SPLASHOUTPUTDEV_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "goo/gtypes.h" -#include "splash/SplashTypes.h" -#include "splash/SplashPattern.h" -#include "poppler-config.h" -#include "OutputDev.h" -#include "GfxState.h" -#include "GlobalParams.h" - -class PDFDoc; -class Gfx8BitFont; -class SplashBitmap; -class Splash; -class SplashPath; -class SplashFontEngine; -class SplashFont; -class T3FontCache; -struct T3FontCacheTag; -struct T3GlyphStack; -struct SplashTransparencyGroup; - -//------------------------------------------------------------------------ -// Splash dynamic pattern -//------------------------------------------------------------------------ - -class SplashFunctionPattern: public SplashPattern { -public: - - SplashFunctionPattern(SplashColorMode colorMode, GfxState *state, GfxFunctionShading *shading); - - SplashPattern *copy() override { return new SplashFunctionPattern(colorMode, state, (GfxFunctionShading *) shading); } - - ~SplashFunctionPattern(); - - GBool testPosition(int x, int y) override { return gTrue; } - - GBool isStatic() override { return gFalse; } - - GBool getColor(int x, int y, SplashColorPtr c) override; - - virtual GfxFunctionShading *getShading() { return shading; } - - GBool isCMYK() override { return gfxMode == csDeviceCMYK; } - -protected: - Matrix ictm; - double xMin, yMin, xMax, yMax; - GfxFunctionShading *shading; - GfxState *state; - SplashColorMode colorMode; - GfxColorSpaceMode gfxMode; -}; - -class SplashUnivariatePattern: public SplashPattern { -public: - - SplashUnivariatePattern(SplashColorMode colorMode, GfxState *state, GfxUnivariateShading *shading); - - ~SplashUnivariatePattern(); - - GBool getColor(int x, int y, SplashColorPtr c) override; - - GBool testPosition(int x, int y) override; - - GBool isStatic() override { return gFalse; } - - virtual GBool getParameter(double xs, double ys, double *t) = 0; - - virtual GfxUnivariateShading *getShading() { return shading; } - - GBool isCMYK() override { return gfxMode == csDeviceCMYK; } - -protected: - Matrix ictm; - double t0, t1, dt; - GfxUnivariateShading *shading; - GfxState *state; - SplashColorMode colorMode; - GfxColorSpaceMode gfxMode; -}; - -class SplashAxialPattern: public SplashUnivariatePattern { -public: - - SplashAxialPattern(SplashColorMode colorMode, GfxState *state, GfxAxialShading *shading); - - SplashPattern *copy() override { return new SplashAxialPattern(colorMode, state, (GfxAxialShading *) shading); } - - ~SplashAxialPattern(); - - GBool getParameter(double xs, double ys, double *t) override; - -private: - double x0, y0, x1, y1; - double dx, dy, mul; -}; - -// see GfxState.h, GfxGouraudTriangleShading -class SplashGouraudPattern: public SplashGouraudColor { -public: - - SplashGouraudPattern(GBool bDirectColorTranslation, GfxState *state, GfxGouraudTriangleShading *shading); - - SplashPattern *copy() override { return new SplashGouraudPattern(bDirectColorTranslation, state, shading); } - - ~SplashGouraudPattern(); - - GBool getColor(int x, int y, SplashColorPtr c) override { return gFalse; } - - GBool testPosition(int x, int y) override { return gFalse; } - - GBool isStatic() override { return gFalse; } - - GBool isCMYK() override { return gfxMode == csDeviceCMYK; } - - GBool isParameterized() override { return shading->isParameterized(); } - int getNTriangles() override { return shading->getNTriangles(); } - void getTriangle(int i, double *x0, double *y0, double *color0, - double *x1, double *y1, double *color1, - double *x2, double *y2, double *color2) override - { shading->getTriangle(i, x0, y0, color0, x1, y1, color1, x2, y2, color2); } - - void getParameterizedColor(double t, SplashColorMode mode, SplashColorPtr c) override; - -private: - GfxGouraudTriangleShading *shading; - GfxState *state; - GBool bDirectColorTranslation; - GfxColorSpaceMode gfxMode; -}; - -// see GfxState.h, GfxRadialShading -class SplashRadialPattern: public SplashUnivariatePattern { -public: - - SplashRadialPattern(SplashColorMode colorMode, GfxState *state, GfxRadialShading *shading); - - SplashPattern *copy() override { return new SplashRadialPattern(colorMode, state, (GfxRadialShading *) shading); } - - ~SplashRadialPattern(); - - GBool getParameter(double xs, double ys, double *t) override; - -private: - double x0, y0, r0, dx, dy, dr; - double a, inva; -}; - -//------------------------------------------------------------------------ - -// number of Type 3 fonts to cache -#define splashOutT3FontCacheSize 8 - -//------------------------------------------------------------------------ -// SplashOutputDev -//------------------------------------------------------------------------ - -class SplashOutputDev: public OutputDev { -public: - - // Constructor. - SplashOutputDev(SplashColorMode colorModeA, int bitmapRowPadA, - GBool reverseVideoA, SplashColorPtr paperColorA, - GBool bitmapTopDownA = gTrue, - SplashThinLineMode thinLineMode = splashThinLineDefault, - GBool overprintPreviewA = globalParams->getOverprintPreview()); - - // Destructor. - ~SplashOutputDev(); - - //----- get info about output device - - // Does this device use tilingPatternFill()? If this returns false, - // tiling pattern fills will be reduced to a series of other drawing - // operations. - GBool useTilingPatternFill() override { return gTrue; } - - // Does this device use functionShadedFill(), axialShadedFill(), and - // radialShadedFill()? If this returns false, these shaded fills - // will be reduced to a series of other drawing operations. - GBool useShadedFills(int type) override - { return (type >= 1 && type <= 5) ? gTrue : gFalse; } - - // Does this device use upside-down coordinates? - // (Upside-down means (0,0) is the top left corner of the page.) - GBool upsideDown() override { return bitmapTopDown ^ bitmapUpsideDown; } - - // Does this device use drawChar() or drawString()? - GBool useDrawChar() override { return gTrue; } - - // Does this device use beginType3Char/endType3Char? Otherwise, - // text in Type 3 fonts will be drawn with drawChar/drawString. - GBool interpretType3Chars() override { return gTrue; } - - //----- initialization and control - - // Start a page. - void startPage(int pageNum, GfxState *state, XRef *xref) override; - - // End a page. - void endPage() override; - - //----- save/restore graphics state - void saveState(GfxState *state) override; - void restoreState(GfxState *state) override; - - //----- update graphics state - void updateAll(GfxState *state) override; - void updateCTM(GfxState *state, double m11, double m12, - double m21, double m22, double m31, double m32) override; - void updateLineDash(GfxState *state) override; - void updateFlatness(GfxState *state) override; - void updateLineJoin(GfxState *state) override; - void updateLineCap(GfxState *state) override; - void updateMiterLimit(GfxState *state) override; - void updateLineWidth(GfxState *state) override; - void updateStrokeAdjust(GfxState *state) override; - void updateFillColorSpace(GfxState *state) override; - void updateStrokeColorSpace(GfxState *state) override; - void updateFillColor(GfxState *state) override; - void updateStrokeColor(GfxState *state) override; - void updateBlendMode(GfxState *state) override; - void updateFillOpacity(GfxState *state) override; - void updateStrokeOpacity(GfxState *state) override; - void updatePatternOpacity(GfxState *state) override; - void clearPatternOpacity(GfxState *state) override; - void updateFillOverprint(GfxState *state) override; - void updateStrokeOverprint(GfxState *state) override; - void updateOverprintMode(GfxState *state) override; - void updateTransfer(GfxState *state) override; - - //----- update text state - void updateFont(GfxState *state) override; - - //----- path painting - void stroke(GfxState *state) override; - void fill(GfxState *state) override; - void eoFill(GfxState *state) override; - GBool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *catalog, Object *str, - double *pmat, int paintType, int tilingType, Dict *resDict, - double *mat, double *bbox, - int x0, int y0, int x1, int y1, - double xStep, double yStep) override; - GBool functionShadedFill(GfxState *state, GfxFunctionShading *shading) override; - GBool axialShadedFill(GfxState *state, GfxAxialShading *shading, double tMin, double tMax) override; - GBool radialShadedFill(GfxState *state, GfxRadialShading *shading, double tMin, double tMax) override; - GBool gouraudTriangleShadedFill(GfxState *state, GfxGouraudTriangleShading *shading) override; - - //----- path clipping - void clip(GfxState *state) override; - void eoClip(GfxState *state) override; - void clipToStrokePath(GfxState *state) override; - - //----- text drawing - void drawChar(GfxState *state, double x, double y, - double dx, double dy, - double originX, double originY, - CharCode code, int nBytes, Unicode *u, int uLen) override; - GBool beginType3Char(GfxState *state, double x, double y, - double dx, double dy, - CharCode code, Unicode *u, int uLen) override; - void endType3Char(GfxState *state) override; - void beginTextObject(GfxState *state) override; - void endTextObject(GfxState *state) override; - - //----- image drawing - void drawImageMask(GfxState *state, Object *ref, Stream *str, - int width, int height, GBool invert, - GBool interpolate, GBool inlineImg) override; - void setSoftMaskFromImageMask(GfxState *state, - Object *ref, Stream *str, - int width, int height, GBool invert, - GBool inlineImg, double *baseMatrix) override; - void unsetSoftMaskFromImageMask(GfxState *state, double *baseMatrix) override; - void drawImage(GfxState *state, Object *ref, Stream *str, - int width, int height, GfxImageColorMap *colorMap, - GBool interpolate, int *maskColors, GBool inlineImg) override; - void drawMaskedImage(GfxState *state, Object *ref, Stream *str, - int width, int height, - GfxImageColorMap *colorMap, - GBool interpolate, - Stream *maskStr, int maskWidth, int maskHeight, - GBool maskInvert, GBool maskInterpolate) override; - void drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str, - int width, int height, - GfxImageColorMap *colorMap, - GBool interpolate, - Stream *maskStr, - int maskWidth, int maskHeight, - GfxImageColorMap *maskColorMap, - GBool maskInterpolate) override; - - //----- Type 3 font operators - void type3D0(GfxState *state, double wx, double wy) override; - void type3D1(GfxState *state, double wx, double wy, - double llx, double lly, double urx, double ury) override; - - //----- transparency groups and soft masks - GBool checkTransparencyGroup(GfxState *state, GBool knockout) override; - void beginTransparencyGroup(GfxState *state, double *bbox, - GfxColorSpace *blendingColorSpace, - GBool isolated, GBool knockout, - GBool forSoftMask) override; - void endTransparencyGroup(GfxState *state) override; - void paintTransparencyGroup(GfxState *state, double *bbox) override; - void setSoftMask(GfxState *state, double *bbox, GBool alpha, - Function *transferFunc, GfxColor *backdropColor) override; - void clearSoftMask(GfxState *state) override; - - //----- special access - - // Called to indicate that a new PDF document has been loaded. - void startDoc(PDFDoc *docA); - - void setPaperColor(SplashColorPtr paperColorA); - - GBool isReverseVideo() { return reverseVideo; } - void setReverseVideo(GBool reverseVideoA) { reverseVideo = reverseVideoA; } - - // Get the bitmap and its size. - SplashBitmap *getBitmap() { return bitmap; } - int getBitmapWidth(); - int getBitmapHeight(); - - // Returns the last rasterized bitmap, transferring ownership to the - // caller. - SplashBitmap *takeBitmap(); - - // Set this flag to true to generate an upside-down bitmap (useful - // for Windows BMP files). - void setBitmapUpsideDown(GBool f) { bitmapUpsideDown = f; } - - // Get the Splash object. - Splash *getSplash() { return splash; } - - // Get the modified region. - void getModRegion(int *xMin, int *yMin, int *xMax, int *yMax); - - // Clear the modified region. - void clearModRegion(); - - SplashFont *getCurrentFont() { return font; } - - // If <skipTextA> is true, don't draw horizontal text. - // If <skipRotatedTextA> is true, don't draw rotated (non-horizontal) text. - void setSkipText(GBool skipHorizTextA, GBool skipRotatedTextA) - { skipHorizText = skipHorizTextA; skipRotatedText = skipRotatedTextA; } - - int getNestCount() { return nestCount; } - -#if 1 //~tmp: turn off anti-aliasing temporarily - GBool getVectorAntialias() override; - void setVectorAntialias(GBool vaa) override; -#endif - - GBool getFontAntialias() { return fontAntialias; } - void setFontAntialias(GBool anti) { fontAntialias = anti; } - - void setFreeTypeHinting(GBool enable, GBool enableSlightHinting); - -protected: - void doUpdateFont(GfxState *state); - -private: - GBool univariateShadedFill(GfxState *state, SplashUnivariatePattern *pattern, double tMin, double tMax); - - void setupScreenParams(double hDPI, double vDPI); - SplashPattern *getColor(GfxGray gray); - SplashPattern *getColor(GfxRGB *rgb); -#ifdef SPLASH_CMYK - SplashPattern *getColor(GfxCMYK *cmyk); - SplashPattern *getColor(GfxColor *deviceN); -#endif - static void getMatteColor( SplashColorMode colorMode, GfxImageColorMap *colorMap, GfxColor * matteColor, SplashColor splashMatteColor); - void setOverprintMask(GfxColorSpace *colorSpace, GBool overprintFlag, - int overprintMode, GfxColor *singleColor, GBool grayIndexed = gFalse); - SplashPath *convertPath(GfxState *state, GfxPath *path, - GBool dropEmptySubpaths); - void drawType3Glyph(GfxState *state, T3FontCache *t3Font, - T3FontCacheTag *tag, Guchar *data); -#ifdef USE_CMS - GBool useIccImageSrc(void *data); - static void iccTransform(void *data, SplashBitmap *bitmap); - static GBool iccImageSrc(void *data, SplashColorPtr colorLine, - Guchar *alphaLine); -#endif - static GBool imageMaskSrc(void *data, SplashColorPtr line); - static GBool imageSrc(void *data, SplashColorPtr colorLine, - Guchar *alphaLine); - static GBool alphaImageSrc(void *data, SplashColorPtr line, - Guchar *alphaLine); - static GBool maskedImageSrc(void *data, SplashColorPtr line, - Guchar *alphaLine); - static GBool tilingBitmapSrc(void *data, SplashColorPtr line, - Guchar *alphaLine); - - GBool keepAlphaChannel; // don't fill with paper color, keep alpha channel - - SplashColorMode colorMode; - int bitmapRowPad; - GBool bitmapTopDown; - GBool bitmapUpsideDown; - GBool fontAntialias; - GBool vectorAntialias; - GBool overprintPreview; - GBool enableFreeTypeHinting; - GBool enableSlightHinting; - GBool reverseVideo; // reverse video mode - SplashColor paperColor; // paper color - SplashScreenParams screenParams; - GBool skipHorizText; - GBool skipRotatedText; - - PDFDoc *doc; // the current document - XRef *xref; // the xref of the current document - - SplashBitmap *bitmap; - Splash *splash; - SplashFontEngine *fontEngine; - - T3FontCache * // Type 3 font cache - t3FontCache[splashOutT3FontCacheSize]; - int nT3Fonts; // number of valid entries in t3FontCache - T3GlyphStack *t3GlyphStack; // Type 3 glyph context stack - - SplashFont *font; // current font - GBool needFontUpdate; // set when the font needs to be updated - SplashPath *textClipPath; // clipping path built with text object - - SplashTransparencyGroup * // transparency group stack - transpGroupStack; - int nestCount; -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/StdinCachedFile.cc b/Build/source/libs/poppler/poppler-src/poppler/StdinCachedFile.cc deleted file mode 100644 index 328c0a1e994..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/StdinCachedFile.cc +++ /dev/null @@ -1,47 +0,0 @@ -//======================================================================== -// -// StdinCachedFile.cc -// -// This file is licensed under the GPLv2 or later -// -// Copyright 2010 Hib Eris <hib@hiberis.nl> -// Copyright 2010 Albert Astals Cid <aacid@kde.org> -// Copyright 2010 Jonathan Liu <net147@gmail.com> -// -//======================================================================== - -#include <config.h> - -#include "StdinCachedFile.h" - -#ifdef _WIN32 -#include <fcntl.h> // for O_BINARY -#include <io.h> // for setmode -#endif -#include <stdio.h> - -size_t StdinCacheLoader::init(GooString *dummy, CachedFile *cachedFile) -{ - size_t read, size = 0; - char buf[CachedFileChunkSize]; - -#ifdef _WIN32 - setmode(fileno(stdin), O_BINARY); -#endif - - CachedFileWriter writer = CachedFileWriter (cachedFile, nullptr); - do { - read = fread(buf, 1, CachedFileChunkSize, stdin); - (writer.write) (buf, CachedFileChunkSize); - size += read; - } - while (read == CachedFileChunkSize); - - return size; -} - -int StdinCacheLoader::load(const std::vector<ByteRange> &ranges, CachedFileWriter *writer) -{ - return 0; -} - diff --git a/Build/source/libs/poppler/poppler-src/poppler/StdinCachedFile.h b/Build/source/libs/poppler/poppler-src/poppler/StdinCachedFile.h deleted file mode 100644 index 7d608a747fa..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/StdinCachedFile.h +++ /dev/null @@ -1,26 +0,0 @@ -//======================================================================== -// -// StdinCachedFile.h -// -// This file is licensed under the GPLv2 or later -// -// Copyright 2010 Hib Eris <hib@hiberis.nl> -// Copyright 2010 Albert Astals Cid <aacid@kde.org> -// -//======================================================================== - -#ifndef STDINCACHELOADER_H -#define STDINCACHELOADER_H - -#include "CachedFile.h" - -class StdinCacheLoader : public CachedFileLoader { - -public: - size_t init(GooString *dummy, CachedFile* cachedFile) override; - int load(const std::vector<ByteRange> &ranges, CachedFileWriter *writer) override; - -}; - -#endif - diff --git a/Build/source/libs/poppler/poppler-src/poppler/StdinPDFDocBuilder.cc b/Build/source/libs/poppler/poppler-src/poppler/StdinPDFDocBuilder.cc deleted file mode 100644 index c7b08b723ad..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/StdinPDFDocBuilder.cc +++ /dev/null @@ -1,40 +0,0 @@ -//======================================================================== -// -// StdinPDFDocBuilder.cc -// -// This file is licensed under the GPLv2 or later -// -// Copyright 2010 Hib Eris <hib@hiberis.nl> -// Copyright 2010, 2017 Albert Astals Cid <aacid@kde.org> -// -//======================================================================== - -#include <config.h> - -#include "StdinPDFDocBuilder.h" -#include "CachedFile.h" -#include "StdinCachedFile.h" - -//------------------------------------------------------------------------ -// StdinPDFDocBuilder -//------------------------------------------------------------------------ - -PDFDoc * -StdinPDFDocBuilder::buildPDFDoc(const GooString &uri, GooString *ownerPassword, - GooString *userPassword, void *guiDataA) -{ - CachedFile *cachedFile = new CachedFile(new StdinCacheLoader(), nullptr); - return new PDFDoc(new CachedFileStream(cachedFile, 0, gFalse, - cachedFile->getLength(), Object(objNull)), - ownerPassword, userPassword); -} - -GBool StdinPDFDocBuilder::supports(const GooString &uri) -{ - if (uri.cmpN("fd://0", 6) == 0) { - return gTrue; - } else { - return gFalse; - } -} - diff --git a/Build/source/libs/poppler/poppler-src/poppler/StdinPDFDocBuilder.h b/Build/source/libs/poppler/poppler-src/poppler/StdinPDFDocBuilder.h deleted file mode 100644 index acc43b05c9a..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/StdinPDFDocBuilder.h +++ /dev/null @@ -1,32 +0,0 @@ -//======================================================================== -// -// StdinPDFDocBuilder.h -// -// This file is licensed under the GPLv2 or later -// -// Copyright 2010 Hib Eris <hib@hiberis.nl> -// Copyright 2010 Albert Astals Cid <aacid@kde.org> -// -//======================================================================== - -#ifndef STDINPDFDOCBUILDER_H -#define STDINPDFDOCBUILDER_H - -#include "PDFDocBuilder.h" - -//------------------------------------------------------------------------ -// StdinPDFDocBuilder -// -// The StdinPDFDocBuilder implements a PDFDocBuilder that read from stdin. -//------------------------------------------------------------------------ - -class StdinPDFDocBuilder : public PDFDocBuilder { - -public: - PDFDoc *buildPDFDoc(const GooString &uri, GooString *ownerPassword = NULL, - GooString *userPassword = NULL, void *guiDataA = NULL) override; - GBool supports(const GooString &uri) override; - -}; - -#endif /* STDINPDFDOCBUILDER_H */ diff --git a/Build/source/libs/poppler/poppler-src/poppler/Stream-CCITT.h b/Build/source/libs/poppler/poppler-src/poppler/Stream-CCITT.h deleted file mode 100644 index 7207729a4d1..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/Stream-CCITT.h +++ /dev/null @@ -1,478 +0,0 @@ -//======================================================================== -// -// Stream-CCITT.h -// -// Tables for CCITT Fax decoding. -// -// Copyright 1996-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2008 Albert Astals Cid <aacid@kde.org> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef STREAM_CCITT_H -#define STREAM_CCITT_H - -struct CCITTCode { - short bits; - short n; -}; - -#define ccittEOL -2 - -//------------------------------------------------------------------------ -// 2D codes -//------------------------------------------------------------------------ - -#define twoDimPass 0 -#define twoDimHoriz 1 -#define twoDimVert0 2 -#define twoDimVertR1 3 -#define twoDimVertL1 4 -#define twoDimVertR2 5 -#define twoDimVertL2 6 -#define twoDimVertR3 7 -#define twoDimVertL3 8 - -// 1-7 bit codes -static const CCITTCode twoDimTab1[128] = { - {-1, -1}, {-1, -1}, // 000000x - {7, twoDimVertL3}, // 0000010 - {7, twoDimVertR3}, // 0000011 - {6, twoDimVertL2}, {6, twoDimVertL2}, // 000010x - {6, twoDimVertR2}, {6, twoDimVertR2}, // 000011x - {4, twoDimPass}, {4, twoDimPass}, // 0001xxx - {4, twoDimPass}, {4, twoDimPass}, - {4, twoDimPass}, {4, twoDimPass}, - {4, twoDimPass}, {4, twoDimPass}, - {3, twoDimHoriz}, {3, twoDimHoriz}, // 001xxxx - {3, twoDimHoriz}, {3, twoDimHoriz}, - {3, twoDimHoriz}, {3, twoDimHoriz}, - {3, twoDimHoriz}, {3, twoDimHoriz}, - {3, twoDimHoriz}, {3, twoDimHoriz}, - {3, twoDimHoriz}, {3, twoDimHoriz}, - {3, twoDimHoriz}, {3, twoDimHoriz}, - {3, twoDimHoriz}, {3, twoDimHoriz}, - {3, twoDimVertL1}, {3, twoDimVertL1}, // 010xxxx - {3, twoDimVertL1}, {3, twoDimVertL1}, - {3, twoDimVertL1}, {3, twoDimVertL1}, - {3, twoDimVertL1}, {3, twoDimVertL1}, - {3, twoDimVertL1}, {3, twoDimVertL1}, - {3, twoDimVertL1}, {3, twoDimVertL1}, - {3, twoDimVertL1}, {3, twoDimVertL1}, - {3, twoDimVertL1}, {3, twoDimVertL1}, - {3, twoDimVertR1}, {3, twoDimVertR1}, // 011xxxx - {3, twoDimVertR1}, {3, twoDimVertR1}, - {3, twoDimVertR1}, {3, twoDimVertR1}, - {3, twoDimVertR1}, {3, twoDimVertR1}, - {3, twoDimVertR1}, {3, twoDimVertR1}, - {3, twoDimVertR1}, {3, twoDimVertR1}, - {3, twoDimVertR1}, {3, twoDimVertR1}, - {3, twoDimVertR1}, {3, twoDimVertR1}, - {1, twoDimVert0}, {1, twoDimVert0}, // 1xxxxxx - {1, twoDimVert0}, {1, twoDimVert0}, - {1, twoDimVert0}, {1, twoDimVert0}, - {1, twoDimVert0}, {1, twoDimVert0}, - {1, twoDimVert0}, {1, twoDimVert0}, - {1, twoDimVert0}, {1, twoDimVert0}, - {1, twoDimVert0}, {1, twoDimVert0}, - {1, twoDimVert0}, {1, twoDimVert0}, - {1, twoDimVert0}, {1, twoDimVert0}, - {1, twoDimVert0}, {1, twoDimVert0}, - {1, twoDimVert0}, {1, twoDimVert0}, - {1, twoDimVert0}, {1, twoDimVert0}, - {1, twoDimVert0}, {1, twoDimVert0}, - {1, twoDimVert0}, {1, twoDimVert0}, - {1, twoDimVert0}, {1, twoDimVert0}, - {1, twoDimVert0}, {1, twoDimVert0}, - {1, twoDimVert0}, {1, twoDimVert0}, - {1, twoDimVert0}, {1, twoDimVert0}, - {1, twoDimVert0}, {1, twoDimVert0}, - {1, twoDimVert0}, {1, twoDimVert0}, - {1, twoDimVert0}, {1, twoDimVert0}, - {1, twoDimVert0}, {1, twoDimVert0}, - {1, twoDimVert0}, {1, twoDimVert0}, - {1, twoDimVert0}, {1, twoDimVert0}, - {1, twoDimVert0}, {1, twoDimVert0}, - {1, twoDimVert0}, {1, twoDimVert0}, - {1, twoDimVert0}, {1, twoDimVert0}, - {1, twoDimVert0}, {1, twoDimVert0}, - {1, twoDimVert0}, {1, twoDimVert0}, - {1, twoDimVert0}, {1, twoDimVert0}, - {1, twoDimVert0}, {1, twoDimVert0}, - {1, twoDimVert0}, {1, twoDimVert0} -}; - -//------------------------------------------------------------------------ -// white run lengths -//------------------------------------------------------------------------ - -// 11-12 bit codes (upper 7 bits are 0) -static const CCITTCode whiteTab1[32] = { - {-1, -1}, // 00000 - {12, ccittEOL}, // 00001 - {-1, -1}, {-1, -1}, // 0001x - {-1, -1}, {-1, -1}, {-1, -1}, {-1, -1}, // 001xx - {-1, -1}, {-1, -1}, {-1, -1}, {-1, -1}, // 010xx - {-1, -1}, {-1, -1}, {-1, -1}, {-1, -1}, // 011xx - {11, 1792}, {11, 1792}, // 1000x - {12, 1984}, // 10010 - {12, 2048}, // 10011 - {12, 2112}, // 10100 - {12, 2176}, // 10101 - {12, 2240}, // 10110 - {12, 2304}, // 10111 - {11, 1856}, {11, 1856}, // 1100x - {11, 1920}, {11, 1920}, // 1101x - {12, 2368}, // 11100 - {12, 2432}, // 11101 - {12, 2496}, // 11110 - {12, 2560} // 11111 -}; - -// 1-9 bit codes -static const CCITTCode whiteTab2[512] = { - {-1, -1}, {-1, -1}, {-1, -1}, {-1, -1}, // 0000000xx - {8, 29}, {8, 29}, // 00000010x - {8, 30}, {8, 30}, // 00000011x - {8, 45}, {8, 45}, // 00000100x - {8, 46}, {8, 46}, // 00000101x - {7, 22}, {7, 22}, {7, 22}, {7, 22}, // 0000011xx - {7, 23}, {7, 23}, {7, 23}, {7, 23}, // 0000100xx - {8, 47}, {8, 47}, // 00001010x - {8, 48}, {8, 48}, // 00001011x - {6, 13}, {6, 13}, {6, 13}, {6, 13}, // 000011xxx - {6, 13}, {6, 13}, {6, 13}, {6, 13}, - {7, 20}, {7, 20}, {7, 20}, {7, 20}, // 0001000xx - {8, 33}, {8, 33}, // 00010010x - {8, 34}, {8, 34}, // 00010011x - {8, 35}, {8, 35}, // 00010100x - {8, 36}, {8, 36}, // 00010101x - {8, 37}, {8, 37}, // 00010110x - {8, 38}, {8, 38}, // 00010111x - {7, 19}, {7, 19}, {7, 19}, {7, 19}, // 0001100xx - {8, 31}, {8, 31}, // 00011010x - {8, 32}, {8, 32}, // 00011011x - {6, 1}, {6, 1}, {6, 1}, {6, 1}, // 000111xxx - {6, 1}, {6, 1}, {6, 1}, {6, 1}, - {6, 12}, {6, 12}, {6, 12}, {6, 12}, // 001000xxx - {6, 12}, {6, 12}, {6, 12}, {6, 12}, - {8, 53}, {8, 53}, // 00100100x - {8, 54}, {8, 54}, // 00100101x - {7, 26}, {7, 26}, {7, 26}, {7, 26}, // 0010011xx - {8, 39}, {8, 39}, // 00101000x - {8, 40}, {8, 40}, // 00101001x - {8, 41}, {8, 41}, // 00101010x - {8, 42}, {8, 42}, // 00101011x - {8, 43}, {8, 43}, // 00101100x - {8, 44}, {8, 44}, // 00101101x - {7, 21}, {7, 21}, {7, 21}, {7, 21}, // 0010111xx - {7, 28}, {7, 28}, {7, 28}, {7, 28}, // 0011000xx - {8, 61}, {8, 61}, // 00110010x - {8, 62}, {8, 62}, // 00110011x - {8, 63}, {8, 63}, // 00110100x - {8, 0}, {8, 0}, // 00110101x - {8, 320}, {8, 320}, // 00110110x - {8, 384}, {8, 384}, // 00110111x - {5, 10}, {5, 10}, {5, 10}, {5, 10}, // 00111xxxx - {5, 10}, {5, 10}, {5, 10}, {5, 10}, - {5, 10}, {5, 10}, {5, 10}, {5, 10}, - {5, 10}, {5, 10}, {5, 10}, {5, 10}, - {5, 11}, {5, 11}, {5, 11}, {5, 11}, // 01000xxxx - {5, 11}, {5, 11}, {5, 11}, {5, 11}, - {5, 11}, {5, 11}, {5, 11}, {5, 11}, - {5, 11}, {5, 11}, {5, 11}, {5, 11}, - {7, 27}, {7, 27}, {7, 27}, {7, 27}, // 0100100xx - {8, 59}, {8, 59}, // 01001010x - {8, 60}, {8, 60}, // 01001011x - {9, 1472}, // 010011000 - {9, 1536}, // 010011001 - {9, 1600}, // 010011010 - {9, 1728}, // 010011011 - {7, 18}, {7, 18}, {7, 18}, {7, 18}, // 0100111xx - {7, 24}, {7, 24}, {7, 24}, {7, 24}, // 0101000xx - {8, 49}, {8, 49}, // 01010010x - {8, 50}, {8, 50}, // 01010011x - {8, 51}, {8, 51}, // 01010100x - {8, 52}, {8, 52}, // 01010101x - {7, 25}, {7, 25}, {7, 25}, {7, 25}, // 0101011xx - {8, 55}, {8, 55}, // 01011000x - {8, 56}, {8, 56}, // 01011001x - {8, 57}, {8, 57}, // 01011010x - {8, 58}, {8, 58}, // 01011011x - {6, 192}, {6, 192}, {6, 192}, {6, 192}, // 010111xxx - {6, 192}, {6, 192}, {6, 192}, {6, 192}, - {6, 1664}, {6, 1664}, {6, 1664}, {6, 1664}, // 011000xxx - {6, 1664}, {6, 1664}, {6, 1664}, {6, 1664}, - {8, 448}, {8, 448}, // 01100100x - {8, 512}, {8, 512}, // 01100101x - {9, 704}, // 011001100 - {9, 768}, // 011001101 - {8, 640}, {8, 640}, // 01100111x - {8, 576}, {8, 576}, // 01101000x - {9, 832}, // 011010010 - {9, 896}, // 011010011 - {9, 960}, // 011010100 - {9, 1024}, // 011010101 - {9, 1088}, // 011010110 - {9, 1152}, // 011010111 - {9, 1216}, // 011011000 - {9, 1280}, // 011011001 - {9, 1344}, // 011011010 - {9, 1408}, // 011011011 - {7, 256}, {7, 256}, {7, 256}, {7, 256}, // 0110111xx - {4, 2}, {4, 2}, {4, 2}, {4, 2}, // 0111xxxxx - {4, 2}, {4, 2}, {4, 2}, {4, 2}, - {4, 2}, {4, 2}, {4, 2}, {4, 2}, - {4, 2}, {4, 2}, {4, 2}, {4, 2}, - {4, 2}, {4, 2}, {4, 2}, {4, 2}, - {4, 2}, {4, 2}, {4, 2}, {4, 2}, - {4, 2}, {4, 2}, {4, 2}, {4, 2}, - {4, 2}, {4, 2}, {4, 2}, {4, 2}, - {4, 3}, {4, 3}, {4, 3}, {4, 3}, // 1000xxxxx - {4, 3}, {4, 3}, {4, 3}, {4, 3}, - {4, 3}, {4, 3}, {4, 3}, {4, 3}, - {4, 3}, {4, 3}, {4, 3}, {4, 3}, - {4, 3}, {4, 3}, {4, 3}, {4, 3}, - {4, 3}, {4, 3}, {4, 3}, {4, 3}, - {4, 3}, {4, 3}, {4, 3}, {4, 3}, - {4, 3}, {4, 3}, {4, 3}, {4, 3}, - {5, 128}, {5, 128}, {5, 128}, {5, 128}, // 10010xxxx - {5, 128}, {5, 128}, {5, 128}, {5, 128}, - {5, 128}, {5, 128}, {5, 128}, {5, 128}, - {5, 128}, {5, 128}, {5, 128}, {5, 128}, - {5, 8}, {5, 8}, {5, 8}, {5, 8}, // 10011xxxx - {5, 8}, {5, 8}, {5, 8}, {5, 8}, - {5, 8}, {5, 8}, {5, 8}, {5, 8}, - {5, 8}, {5, 8}, {5, 8}, {5, 8}, - {5, 9}, {5, 9}, {5, 9}, {5, 9}, // 10100xxxx - {5, 9}, {5, 9}, {5, 9}, {5, 9}, - {5, 9}, {5, 9}, {5, 9}, {5, 9}, - {5, 9}, {5, 9}, {5, 9}, {5, 9}, - {6, 16}, {6, 16}, {6, 16}, {6, 16}, // 101010xxx - {6, 16}, {6, 16}, {6, 16}, {6, 16}, - {6, 17}, {6, 17}, {6, 17}, {6, 17}, // 101011xxx - {6, 17}, {6, 17}, {6, 17}, {6, 17}, - {4, 4}, {4, 4}, {4, 4}, {4, 4}, // 1011xxxxx - {4, 4}, {4, 4}, {4, 4}, {4, 4}, - {4, 4}, {4, 4}, {4, 4}, {4, 4}, - {4, 4}, {4, 4}, {4, 4}, {4, 4}, - {4, 4}, {4, 4}, {4, 4}, {4, 4}, - {4, 4}, {4, 4}, {4, 4}, {4, 4}, - {4, 4}, {4, 4}, {4, 4}, {4, 4}, - {4, 4}, {4, 4}, {4, 4}, {4, 4}, - {4, 5}, {4, 5}, {4, 5}, {4, 5}, // 1100xxxxx - {4, 5}, {4, 5}, {4, 5}, {4, 5}, - {4, 5}, {4, 5}, {4, 5}, {4, 5}, - {4, 5}, {4, 5}, {4, 5}, {4, 5}, - {4, 5}, {4, 5}, {4, 5}, {4, 5}, - {4, 5}, {4, 5}, {4, 5}, {4, 5}, - {4, 5}, {4, 5}, {4, 5}, {4, 5}, - {4, 5}, {4, 5}, {4, 5}, {4, 5}, - {6, 14}, {6, 14}, {6, 14}, {6, 14}, // 110100xxx - {6, 14}, {6, 14}, {6, 14}, {6, 14}, - {6, 15}, {6, 15}, {6, 15}, {6, 15}, // 110101xxx - {6, 15}, {6, 15}, {6, 15}, {6, 15}, - {5, 64}, {5, 64}, {5, 64}, {5, 64}, // 11011xxxx - {5, 64}, {5, 64}, {5, 64}, {5, 64}, - {5, 64}, {5, 64}, {5, 64}, {5, 64}, - {5, 64}, {5, 64}, {5, 64}, {5, 64}, - {4, 6}, {4, 6}, {4, 6}, {4, 6}, // 1110xxxxx - {4, 6}, {4, 6}, {4, 6}, {4, 6}, - {4, 6}, {4, 6}, {4, 6}, {4, 6}, - {4, 6}, {4, 6}, {4, 6}, {4, 6}, - {4, 6}, {4, 6}, {4, 6}, {4, 6}, - {4, 6}, {4, 6}, {4, 6}, {4, 6}, - {4, 6}, {4, 6}, {4, 6}, {4, 6}, - {4, 6}, {4, 6}, {4, 6}, {4, 6}, - {4, 7}, {4, 7}, {4, 7}, {4, 7}, // 1111xxxxx - {4, 7}, {4, 7}, {4, 7}, {4, 7}, - {4, 7}, {4, 7}, {4, 7}, {4, 7}, - {4, 7}, {4, 7}, {4, 7}, {4, 7}, - {4, 7}, {4, 7}, {4, 7}, {4, 7}, - {4, 7}, {4, 7}, {4, 7}, {4, 7}, - {4, 7}, {4, 7}, {4, 7}, {4, 7}, - {4, 7}, {4, 7}, {4, 7}, {4, 7} -}; - -//------------------------------------------------------------------------ -// black run lengths -//------------------------------------------------------------------------ - -// 10-13 bit codes (upper 6 bits are 0) -static const CCITTCode blackTab1[128] = { - {-1, -1}, {-1, -1}, // 000000000000x - {12, ccittEOL}, {12, ccittEOL}, // 000000000001x - {-1, -1}, {-1, -1}, {-1, -1}, {-1, -1}, // 00000000001xx - {-1, -1}, {-1, -1}, {-1, -1}, {-1, -1}, // 00000000010xx - {-1, -1}, {-1, -1}, {-1, -1}, {-1, -1}, // 00000000011xx - {-1, -1}, {-1, -1}, {-1, -1}, {-1, -1}, // 00000000100xx - {-1, -1}, {-1, -1}, {-1, -1}, {-1, -1}, // 00000000101xx - {-1, -1}, {-1, -1}, {-1, -1}, {-1, -1}, // 00000000110xx - {-1, -1}, {-1, -1}, {-1, -1}, {-1, -1}, // 00000000111xx - {11, 1792}, {11, 1792}, {11, 1792}, {11, 1792}, // 00000001000xx - {12, 1984}, {12, 1984}, // 000000010010x - {12, 2048}, {12, 2048}, // 000000010011x - {12, 2112}, {12, 2112}, // 000000010100x - {12, 2176}, {12, 2176}, // 000000010101x - {12, 2240}, {12, 2240}, // 000000010110x - {12, 2304}, {12, 2304}, // 000000010111x - {11, 1856}, {11, 1856}, {11, 1856}, {11, 1856}, // 00000001100xx - {11, 1920}, {11, 1920}, {11, 1920}, {11, 1920}, // 00000001101xx - {12, 2368}, {12, 2368}, // 000000011100x - {12, 2432}, {12, 2432}, // 000000011101x - {12, 2496}, {12, 2496}, // 000000011110x - {12, 2560}, {12, 2560}, // 000000011111x - {10, 18}, {10, 18}, {10, 18}, {10, 18}, // 0000001000xxx - {10, 18}, {10, 18}, {10, 18}, {10, 18}, - {12, 52}, {12, 52}, // 000000100100x - {13, 640}, // 0000001001010 - {13, 704}, // 0000001001011 - {13, 768}, // 0000001001100 - {13, 832}, // 0000001001101 - {12, 55}, {12, 55}, // 000000100111x - {12, 56}, {12, 56}, // 000000101000x - {13, 1280}, // 0000001010010 - {13, 1344}, // 0000001010011 - {13, 1408}, // 0000001010100 - {13, 1472}, // 0000001010101 - {12, 59}, {12, 59}, // 000000101011x - {12, 60}, {12, 60}, // 000000101100x - {13, 1536}, // 0000001011010 - {13, 1600}, // 0000001011011 - {11, 24}, {11, 24}, {11, 24}, {11, 24}, // 00000010111xx - {11, 25}, {11, 25}, {11, 25}, {11, 25}, // 00000011000xx - {13, 1664}, // 0000001100100 - {13, 1728}, // 0000001100101 - {12, 320}, {12, 320}, // 000000110011x - {12, 384}, {12, 384}, // 000000110100x - {12, 448}, {12, 448}, // 000000110101x - {13, 512}, // 0000001101100 - {13, 576}, // 0000001101101 - {12, 53}, {12, 53}, // 000000110111x - {12, 54}, {12, 54}, // 000000111000x - {13, 896}, // 0000001110010 - {13, 960}, // 0000001110011 - {13, 1024}, // 0000001110100 - {13, 1088}, // 0000001110101 - {13, 1152}, // 0000001110110 - {13, 1216}, // 0000001110111 - {10, 64}, {10, 64}, {10, 64}, {10, 64}, // 0000001111xxx - {10, 64}, {10, 64}, {10, 64}, {10, 64} -}; - -// 7-12 bit codes (upper 4 bits are 0) -static const CCITTCode blackTab2[192] = { - {8, 13}, {8, 13}, {8, 13}, {8, 13}, // 00000100xxxx - {8, 13}, {8, 13}, {8, 13}, {8, 13}, - {8, 13}, {8, 13}, {8, 13}, {8, 13}, - {8, 13}, {8, 13}, {8, 13}, {8, 13}, - {11, 23}, {11, 23}, // 00000101000x - {12, 50}, // 000001010010 - {12, 51}, // 000001010011 - {12, 44}, // 000001010100 - {12, 45}, // 000001010101 - {12, 46}, // 000001010110 - {12, 47}, // 000001010111 - {12, 57}, // 000001011000 - {12, 58}, // 000001011001 - {12, 61}, // 000001011010 - {12, 256}, // 000001011011 - {10, 16}, {10, 16}, {10, 16}, {10, 16}, // 0000010111xx - {10, 17}, {10, 17}, {10, 17}, {10, 17}, // 0000011000xx - {12, 48}, // 000001100100 - {12, 49}, // 000001100101 - {12, 62}, // 000001100110 - {12, 63}, // 000001100111 - {12, 30}, // 000001101000 - {12, 31}, // 000001101001 - {12, 32}, // 000001101010 - {12, 33}, // 000001101011 - {12, 40}, // 000001101100 - {12, 41}, // 000001101101 - {11, 22}, {11, 22}, // 00000110111x - {8, 14}, {8, 14}, {8, 14}, {8, 14}, // 00000111xxxx - {8, 14}, {8, 14}, {8, 14}, {8, 14}, - {8, 14}, {8, 14}, {8, 14}, {8, 14}, - {8, 14}, {8, 14}, {8, 14}, {8, 14}, - {7, 10}, {7, 10}, {7, 10}, {7, 10}, // 0000100xxxxx - {7, 10}, {7, 10}, {7, 10}, {7, 10}, - {7, 10}, {7, 10}, {7, 10}, {7, 10}, - {7, 10}, {7, 10}, {7, 10}, {7, 10}, - {7, 10}, {7, 10}, {7, 10}, {7, 10}, - {7, 10}, {7, 10}, {7, 10}, {7, 10}, - {7, 10}, {7, 10}, {7, 10}, {7, 10}, - {7, 10}, {7, 10}, {7, 10}, {7, 10}, - {7, 11}, {7, 11}, {7, 11}, {7, 11}, // 0000101xxxxx - {7, 11}, {7, 11}, {7, 11}, {7, 11}, - {7, 11}, {7, 11}, {7, 11}, {7, 11}, - {7, 11}, {7, 11}, {7, 11}, {7, 11}, - {7, 11}, {7, 11}, {7, 11}, {7, 11}, - {7, 11}, {7, 11}, {7, 11}, {7, 11}, - {7, 11}, {7, 11}, {7, 11}, {7, 11}, - {7, 11}, {7, 11}, {7, 11}, {7, 11}, - {9, 15}, {9, 15}, {9, 15}, {9, 15}, // 000011000xxx - {9, 15}, {9, 15}, {9, 15}, {9, 15}, - {12, 128}, // 000011001000 - {12, 192}, // 000011001001 - {12, 26}, // 000011001010 - {12, 27}, // 000011001011 - {12, 28}, // 000011001100 - {12, 29}, // 000011001101 - {11, 19}, {11, 19}, // 00001100111x - {11, 20}, {11, 20}, // 00001101000x - {12, 34}, // 000011010010 - {12, 35}, // 000011010011 - {12, 36}, // 000011010100 - {12, 37}, // 000011010101 - {12, 38}, // 000011010110 - {12, 39}, // 000011010111 - {11, 21}, {11, 21}, // 00001101100x - {12, 42}, // 000011011010 - {12, 43}, // 000011011011 - {10, 0}, {10, 0}, {10, 0}, {10, 0}, // 0000110111xx - {7, 12}, {7, 12}, {7, 12}, {7, 12}, // 0000111xxxxx - {7, 12}, {7, 12}, {7, 12}, {7, 12}, - {7, 12}, {7, 12}, {7, 12}, {7, 12}, - {7, 12}, {7, 12}, {7, 12}, {7, 12}, - {7, 12}, {7, 12}, {7, 12}, {7, 12}, - {7, 12}, {7, 12}, {7, 12}, {7, 12}, - {7, 12}, {7, 12}, {7, 12}, {7, 12}, - {7, 12}, {7, 12}, {7, 12}, {7, 12} -}; - -// 2-6 bit codes -static const CCITTCode blackTab3[64] = { - {-1, -1}, {-1, -1}, {-1, -1}, {-1, -1}, // 0000xx - {6, 9}, // 000100 - {6, 8}, // 000101 - {5, 7}, {5, 7}, // 00011x - {4, 6}, {4, 6}, {4, 6}, {4, 6}, // 0010xx - {4, 5}, {4, 5}, {4, 5}, {4, 5}, // 0011xx - {3, 1}, {3, 1}, {3, 1}, {3, 1}, // 010xxx - {3, 1}, {3, 1}, {3, 1}, {3, 1}, - {3, 4}, {3, 4}, {3, 4}, {3, 4}, // 011xxx - {3, 4}, {3, 4}, {3, 4}, {3, 4}, - {2, 3}, {2, 3}, {2, 3}, {2, 3}, // 10xxxx - {2, 3}, {2, 3}, {2, 3}, {2, 3}, - {2, 3}, {2, 3}, {2, 3}, {2, 3}, - {2, 3}, {2, 3}, {2, 3}, {2, 3}, - {2, 2}, {2, 2}, {2, 2}, {2, 2}, // 11xxxx - {2, 2}, {2, 2}, {2, 2}, {2, 2}, - {2, 2}, {2, 2}, {2, 2}, {2, 2}, - {2, 2}, {2, 2}, {2, 2}, {2, 2} -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/Stream.cc b/Build/source/libs/poppler/poppler-src/poppler/Stream.cc deleted file mode 100644 index 2c55f295979..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/Stream.cc +++ /dev/null @@ -1,5512 +0,0 @@ -//======================================================================== -// -// Stream.cc -// -// Copyright 1996-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2005 Jeff Muizelaar <jeff@infidigm.net> -// Copyright (C) 2006-2010, 2012-2014, 2016, 2017, 2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2007 Krzysztof Kowalczyk <kkowalczyk@gmail.com> -// Copyright (C) 2008 Julien Rebetez <julien@fhtagn.net> -// Copyright (C) 2009 Carlos Garcia Campos <carlosgc@gnome.org> -// Copyright (C) 2009 Glenn Ganz <glenn.ganz@uptime.ch> -// Copyright (C) 2009 Stefan Thomas <thomas@eload24.com> -// Copyright (C) 2010 Hib Eris <hib@hiberis.nl> -// Copyright (C) 2010 Tomas Hoger <thoger@redhat.com> -// Copyright (C) 2011, 2012, 2016 William Bader <williambader@hotmail.com> -// Copyright (C) 2012, 2013 Thomas Freitag <Thomas.Freitag@alfa.de> -// Copyright (C) 2012 Oliver Sander <sander@mi.fu-berlin.de> -// Copyright (C) 2012 Fabio D'Urso <fabiodurso@hotmail.it> -// Copyright (C) 2012 Even Rouault <even.rouault@mines-paris.org> -// Copyright (C) 2013, 2017, 2018 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2013, 2018 Adam Reichold <adamreichold@myopera.com> -// Copyright (C) 2013 Pino Toscano <pino@kde.org> -// Copyright (C) 2015 Suzuki Toshiya <mpsuzuki@hiroshima-u.ac.jp> -// Copyright (C) 2015 Jason Crain <jason@aquaticape.us> -// Copyright (C) 2017 Jose Aliste <jaliste@src.gnome.org> -// Copyright (C) 2017 Kay Dohmann <k.dohmann@gmx.net> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include <config.h> - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include <stdio.h> -#include <stdlib.h> -#include <stddef.h> -#include <limits.h> -#ifdef HAVE_UNISTD_H -#include <unistd.h> -#endif -#include <string.h> -#include <ctype.h> -#include "goo/gmem.h" -#include "goo/gfile.h" -#include "poppler-config.h" -#include "Error.h" -#include "Object.h" -#include "Lexer.h" -#include "GfxState.h" -#include "Stream.h" -#include "XRef.h" -#include "JBIG2Stream.h" -#include "Stream-CCITT.h" -#include "CachedFile.h" - -#ifdef ENABLE_LIBJPEG -#include "DCTStream.h" -#endif - -#ifdef ENABLE_ZLIB_UNCOMPRESS -#include "FlateStream.h" -#endif - -#ifdef ENABLE_LIBOPENJPEG -#include "JPEG2000Stream.h" -#else -#include "JPXStream.h" -#endif - -#ifdef __DJGPP__ -static GBool setDJSYSFLAGS = gFalse; -#endif - -#ifdef VMS -#ifdef __GNUC__ -#define SEEK_SET 0 -#define SEEK_CUR 1 -#define SEEK_END 2 -#endif -#endif - -#ifdef MULTITHREADED -# define streamLocker() MutexLocker locker(&mutex) -#else -# define streamLocker() -#endif -//------------------------------------------------------------------------ -// Stream (base class) -//------------------------------------------------------------------------ - -Stream::Stream() { - ref = 1; -#ifdef MULTITHREADED - gInitMutex(&mutex); -#endif -} - -Stream::~Stream() { -#ifdef MULTITHREADED - gDestroyMutex(&mutex); -#endif -} - -int Stream::incRef() { - streamLocker(); - ++ref; - return ref; -} - -int Stream::decRef() { - streamLocker(); - --ref; - return ref; -} - -void Stream::close() { -} - -int Stream::getRawChar() { - error(errInternal, -1, "Internal: called getRawChar() on non-predictor stream"); - return EOF; -} - -int Stream::getChars(int nChars, Guchar *buffer) { - error(errInternal, -1, "Internal: called getChars() on non-predictor stream"); - return 0; -} - -void Stream::getRawChars(int nChars, int *buffer) { - error(errInternal, -1, "Internal: called getRawChars() on non-predictor stream"); -} - -char *Stream::getLine(char *buf, int size) { - int i; - int c; - - if (lookChar() == EOF || size < 0) - return nullptr; - for (i = 0; i < size - 1; ++i) { - c = getChar(); - if (c == EOF || c == '\n') - break; - if (c == '\r') { - if ((c = lookChar()) == '\n') - getChar(); - break; - } - buf[i] = c; - } - buf[i] = '\0'; - return buf; -} - -GooString *Stream::getPSFilter(int psLevel, const char *indent) { - return new GooString(); -} - -Stream *Stream::addFilters(Dict *dict, int recursion) { - Object obj, obj2; - Object params, params2; - Stream *str; - int i; - - str = this; - obj = dict->lookup("Filter", recursion); - if (obj.isNull()) { - obj = dict->lookup("F", recursion); - } - params = dict->lookup("DecodeParms", recursion); - if (params.isNull()) { - params = dict->lookup("DP", recursion); - } - if (obj.isName()) { - str = makeFilter(obj.getName(), str, ¶ms, recursion, dict); - } else if (obj.isArray()) { - for (i = 0; i < obj.arrayGetLength(); ++i) { - obj2 = obj.arrayGet(i, recursion); - if (params.isArray()) - params2 = params.arrayGet(i, recursion); - else - params2.setToNull(); - if (obj2.isName()) { - str = makeFilter(obj2.getName(), str, ¶ms2, recursion); - } else { - error(errSyntaxError, getPos(), "Bad filter name"); - str = new EOFStream(str); - } - } - } else if (!obj.isNull()) { - error(errSyntaxError, getPos(), "Bad 'Filter' attribute in stream"); - } - - return str; -} - -Stream *Stream::makeFilter(const char *name, Stream *str, Object *params, int recursion, Dict *dict) { - int pred; // parameters - int colors; - int bits; - int early; - int encoding; - GBool endOfLine, byteAlign, endOfBlock, black, damagedRowsBeforeError; - int columns, rows; - Object globals, obj; - - if (!strcmp(name, "ASCIIHexDecode") || !strcmp(name, "AHx")) { - str = new ASCIIHexStream(str); - } else if (!strcmp(name, "ASCII85Decode") || !strcmp(name, "A85")) { - str = new ASCII85Stream(str); - } else if (!strcmp(name, "LZWDecode") || !strcmp(name, "LZW")) { - pred = 1; - columns = 1; - colors = 1; - bits = 8; - early = 1; - if (params->isDict()) { - obj = params->dictLookup("Predictor", recursion); - if (obj.isInt()) - pred = obj.getInt(); - obj = params->dictLookup("Columns", recursion); - if (obj.isInt()) - columns = obj.getInt(); - obj = params->dictLookup("Colors", recursion); - if (obj.isInt()) - colors = obj.getInt(); - obj = params->dictLookup("BitsPerComponent", recursion); - if (obj.isInt()) - bits = obj.getInt(); - obj = params->dictLookup("EarlyChange", recursion); - if (obj.isInt()) - early = obj.getInt(); - } - str = new LZWStream(str, pred, columns, colors, bits, early); - } else if (!strcmp(name, "RunLengthDecode") || !strcmp(name, "RL")) { - str = new RunLengthStream(str); - } else if (!strcmp(name, "CCITTFaxDecode") || !strcmp(name, "CCF")) { - encoding = 0; - endOfLine = gFalse; - byteAlign = gFalse; - columns = 1728; - rows = 0; - endOfBlock = gTrue; - black = gFalse; - damagedRowsBeforeError = 0; - if (params->isDict()) { - obj = params->dictLookup("K", recursion); - if (obj.isInt()) { - encoding = obj.getInt(); - } - obj = params->dictLookup("EndOfLine", recursion); - if (obj.isBool()) { - endOfLine = obj.getBool(); - } - obj = params->dictLookup("EncodedByteAlign", recursion); - if (obj.isBool()) { - byteAlign = obj.getBool(); - } - obj = params->dictLookup("Columns", recursion); - if (obj.isInt()) { - columns = obj.getInt(); - } - obj = params->dictLookup("Rows", recursion); - if (obj.isInt()) { - rows = obj.getInt(); - } - obj = params->dictLookup("EndOfBlock", recursion); - if (obj.isBool()) { - endOfBlock = obj.getBool(); - } - obj = params->dictLookup("BlackIs1", recursion); - if (obj.isBool()) { - black = obj.getBool(); - } - obj = params->dictLookup("DamagedRowsBeforeError", recursion); - if (obj.isInt()) { - damagedRowsBeforeError = obj.getInt(); - } - } - str = new CCITTFaxStream(str, encoding, endOfLine, byteAlign, - columns, rows, endOfBlock, black, damagedRowsBeforeError); - } else if (!strcmp(name, "DCTDecode") || !strcmp(name, "DCT")) { -#ifdef HAVE_DCT_DECODER - int colorXform = -1; - if (params->isDict()) { - obj = params->dictLookup("ColorTransform", recursion); - if (obj.isInt()) { - colorXform = obj.getInt(); - } - } - str = new DCTStream(str, colorXform, dict, recursion); -#else - error(errSyntaxError, getPos(), "Unknown filter '{0:s}'", name); - str = new EOFStream(str); -#endif - } else if (!strcmp(name, "FlateDecode") || !strcmp(name, "Fl")) { - pred = 1; - columns = 1; - colors = 1; - bits = 8; - if (params->isDict()) { - obj = params->dictLookup("Predictor", recursion); - if (obj.isInt()) - pred = obj.getInt(); - obj = params->dictLookup("Columns", recursion); - if (obj.isInt()) - columns = obj.getInt(); - obj = params->dictLookup("Colors", recursion); - if (obj.isInt()) - colors = obj.getInt(); - obj = params->dictLookup("BitsPerComponent", recursion); - if (obj.isInt()) - bits = obj.getInt(); - } - str = new FlateStream(str, pred, columns, colors, bits); - } else if (!strcmp(name, "JBIG2Decode")) { - if (params->isDict()) { - XRef *xref = params->getDict()->getXRef(); - obj = params->dictLookupNF("JBIG2Globals"); - globals = obj.fetch(xref, recursion); - } - str = new JBIG2Stream(str, &globals, &obj); - } else if (!strcmp(name, "JPXDecode")) { -#ifdef HAVE_JPX_DECODER - str = new JPXStream(str); -#else - error(errSyntaxError, getPos(), "Unknown filter '{0:s}'", name); - str = new EOFStream(str); -#endif - } else if (!strcmp(name, "Crypt")) { - if (str->getKind() == strCrypt) { - str = str->getBaseStream(); - } else { - error(errSyntaxError, getPos(), "Can't revert non decrypt streams"); - } - } else { - error(errSyntaxError, getPos(), "Unknown filter '{0:s}'", name); - str = new EOFStream(str); - } - return str; -} - -//------------------------------------------------------------------------ -// OutStream -//------------------------------------------------------------------------ -OutStream::OutStream () -{ -} - -OutStream::~OutStream () -{ -} - -//------------------------------------------------------------------------ -// FileOutStream -//------------------------------------------------------------------------ -FileOutStream::FileOutStream (FILE* fa, Goffset startA) -{ - f = fa; - start = startA; -} - -FileOutStream::~FileOutStream () -{ - close (); -} - -void FileOutStream::close () -{ - -} - -Goffset FileOutStream::getPos () -{ - return Gftell(f); -} - -void FileOutStream::put (char c) -{ - fputc(c,f); -} - -void FileOutStream::printf(const char *format, ...) -{ - va_list argptr; - va_start (argptr, format); - vfprintf(f, format, argptr); - va_end (argptr); -} - - -//------------------------------------------------------------------------ -// BaseStream -//------------------------------------------------------------------------ - -BaseStream::BaseStream(Object &&dictA, Goffset lengthA) { - dict = std::move(dictA); - length = lengthA; -} - -BaseStream::~BaseStream() { -} - -//------------------------------------------------------------------------ -// FilterStream -//------------------------------------------------------------------------ - -FilterStream::FilterStream(Stream *strA) { - str = strA; -} - -FilterStream::~FilterStream() { -} - -void FilterStream::close() { - str->close(); -} - -void FilterStream::setPos(Goffset pos, int dir) { - error(errInternal, -1, "Internal: called setPos() on FilterStream"); -} - -//------------------------------------------------------------------------ -// ImageStream -//------------------------------------------------------------------------ - -ImageStream::ImageStream(Stream *strA, int widthA, int nCompsA, int nBitsA) { - int imgLineSize; - - str = strA; - width = widthA; - nComps = nCompsA; - nBits = nBitsA; - - nVals = width * nComps; - inputLineSize = (nVals * nBits + 7) >> 3; - if (nComps <= 0 || nBits <= 0 || nVals > INT_MAX / nBits - 7 || width > INT_MAX / nComps) { - inputLineSize = -1; - } - inputLine = (Guchar *)gmallocn_checkoverflow(inputLineSize, sizeof(char)); - if (nBits == 8) { - imgLine = (Guchar *)inputLine; - } else { - if (nBits == 1) { - imgLineSize = (nVals + 7) & ~7; - } else { - imgLineSize = nVals; - } - if (nComps <= 0 || width > INT_MAX / nComps) { - imgLineSize = -1; - } - imgLine = (Guchar *)gmallocn_checkoverflow(imgLineSize, sizeof(Guchar)); - } - imgIdx = nVals; -} - -ImageStream::~ImageStream() { - if (imgLine != (Guchar *)inputLine) { - gfree(imgLine); - } - gfree(inputLine); -} - -void ImageStream::reset() { - str->reset(); -} - -void ImageStream::close() { - str->close(); -} - -GBool ImageStream::getPixel(Guchar *pix) { - int i; - - if (imgIdx >= nVals) { - if (!getLine()) { - return gFalse; - } - imgIdx = 0; - } - for (i = 0; i < nComps; ++i) { - pix[i] = imgLine[imgIdx++]; - } - return gTrue; -} - -Guchar *ImageStream::getLine() { - if (unlikely(inputLine == nullptr)) { - return nullptr; - } - - int readChars = str->doGetChars(inputLineSize, inputLine); - for ( ; readChars < inputLineSize; readChars++) inputLine[readChars] = EOF; - if (nBits == 1) { - Guchar *p = inputLine; - for (int i = 0; i < nVals; i += 8) { - const int c = *p++; - imgLine[i+0] = (Guchar)((c >> 7) & 1); - imgLine[i+1] = (Guchar)((c >> 6) & 1); - imgLine[i+2] = (Guchar)((c >> 5) & 1); - imgLine[i+3] = (Guchar)((c >> 4) & 1); - imgLine[i+4] = (Guchar)((c >> 3) & 1); - imgLine[i+5] = (Guchar)((c >> 2) & 1); - imgLine[i+6] = (Guchar)((c >> 1) & 1); - imgLine[i+7] = (Guchar)(c & 1); - } - } else if (nBits == 8) { - // special case: imgLine == inputLine - } else if (nBits == 16) { - // this is a hack to support 16 bits images, everywhere - // we assume a component fits in 8 bits, with this hack - // we treat 16 bit images as 8 bit ones until it's fixed correctly. - // The hack has another part on GfxImageColorMap::GfxImageColorMap - Guchar *p = inputLine; - for (int i = 0; i < nVals; ++i) { - imgLine[i] = *p++; - p++; - } - } else { - const Gulong bitMask = (1 << nBits) - 1; - Gulong buf = 0; - int bits = 0; - Guchar *p = inputLine; - for (int i = 0; i < nVals; ++i) { - while (bits < nBits) { - buf = (buf << 8) | (*p++ & 0xff); - bits += 8; - } - imgLine[i] = (Guchar)((buf >> (bits - nBits)) & bitMask); - bits -= nBits; - } - } - return imgLine; -} - -void ImageStream::skipLine() { - str->doGetChars(inputLineSize, inputLine); -} - -//------------------------------------------------------------------------ -// StreamPredictor -//------------------------------------------------------------------------ - -StreamPredictor::StreamPredictor(Stream *strA, int predictorA, - int widthA, int nCompsA, int nBitsA) { - str = strA; - predictor = predictorA; - width = widthA; - nComps = nCompsA; - nBits = nBitsA; - predLine = nullptr; - ok = gFalse; - - nVals = width * nComps; - if (width <= 0 || nComps <= 0 || nBits <= 0 || - nComps > gfxColorMaxComps || - nBits > 16 || - width >= INT_MAX / nComps || // check for overflow in nVals - nVals >= (INT_MAX - 7) / nBits) { // check for overflow in rowBytes - return; - } - pixBytes = (nComps * nBits + 7) >> 3; - rowBytes = ((nVals * nBits + 7) >> 3) + pixBytes; - predLine = (Guchar *)gmalloc(rowBytes); - memset(predLine, 0, rowBytes); - predIdx = rowBytes; - - ok = gTrue; -} - -StreamPredictor::~StreamPredictor() { - gfree(predLine); -} - -int StreamPredictor::lookChar() { - if (predIdx >= rowBytes) { - if (!getNextLine()) { - return EOF; - } - } - return predLine[predIdx]; -} - -int StreamPredictor::getChar() { - if (predIdx >= rowBytes) { - if (!getNextLine()) { - return EOF; - } - } - return predLine[predIdx++]; -} - -int StreamPredictor::getChars(int nChars, Guchar *buffer) { - int n, m; - - n = 0; - while (n < nChars) { - if (predIdx >= rowBytes) { - if (!getNextLine()) { - break; - } - } - m = rowBytes - predIdx; - if (m > nChars - n) { - m = nChars - n; - } - memcpy(buffer + n, predLine + predIdx, m); - predIdx += m; - n += m; - } - return n; -} - -GBool StreamPredictor::getNextLine() { - int curPred; - Guchar upLeftBuf[gfxColorMaxComps * 2 + 1]; - int left, up, upLeft, p, pa, pb, pc; - int c; - Gulong inBuf, outBuf, bitMask; - int inBits, outBits; - int i, j, k, kk; - - // get PNG optimum predictor number - if (predictor >= 10) { - if ((curPred = str->getRawChar()) == EOF) { - return gFalse; - } - curPred += 10; - } else { - curPred = predictor; - } - - // read the raw line, apply PNG (byte) predictor - int *rawCharLine = new int[rowBytes - pixBytes]; - str->getRawChars(rowBytes - pixBytes, rawCharLine); - memset(upLeftBuf, 0, pixBytes + 1); - for (i = pixBytes; i < rowBytes; ++i) { - for (j = pixBytes; j > 0; --j) { - upLeftBuf[j] = upLeftBuf[j-1]; - } - upLeftBuf[0] = predLine[i]; - if ((c = rawCharLine[i - pixBytes]) == EOF) { - if (i > pixBytes) { - // this ought to return false, but some (broken) PDF files - // contain truncated image data, and Adobe apparently reads the - // last partial line - break; - } - delete[] rawCharLine; - return gFalse; - } - switch (curPred) { - case 11: // PNG sub - predLine[i] = predLine[i - pixBytes] + (Guchar)c; - break; - case 12: // PNG up - predLine[i] = predLine[i] + (Guchar)c; - break; - case 13: // PNG average - predLine[i] = ((predLine[i - pixBytes] + predLine[i]) >> 1) + - (Guchar)c; - break; - case 14: // PNG Paeth - left = predLine[i - pixBytes]; - up = predLine[i]; - upLeft = upLeftBuf[pixBytes]; - p = left + up - upLeft; - if ((pa = p - left) < 0) - pa = -pa; - if ((pb = p - up) < 0) - pb = -pb; - if ((pc = p - upLeft) < 0) - pc = -pc; - if (pa <= pb && pa <= pc) - predLine[i] = left + (Guchar)c; - else if (pb <= pc) - predLine[i] = up + (Guchar)c; - else - predLine[i] = upLeft + (Guchar)c; - break; - case 10: // PNG none - default: // no predictor or TIFF predictor - predLine[i] = (Guchar)c; - break; - } - } - delete[] rawCharLine; - - // apply TIFF (component) predictor - if (predictor == 2) { - if (nBits == 1) { - inBuf = predLine[pixBytes - 1]; - for (i = pixBytes; i < rowBytes; i += 8) { - // 1-bit add is just xor - inBuf = (inBuf << 8) | predLine[i]; - predLine[i] ^= inBuf >> nComps; - } - } else if (nBits == 8) { - for (i = pixBytes; i < rowBytes; ++i) { - predLine[i] += predLine[i - nComps]; - } - } else { - memset(upLeftBuf, 0, nComps + 1); - bitMask = (1 << nBits) - 1; - inBuf = outBuf = 0; - inBits = outBits = 0; - j = k = pixBytes; - for (i = 0; i < width; ++i) { - for (kk = 0; kk < nComps; ++kk) { - if (inBits < nBits) { - inBuf = (inBuf << 8) | (predLine[j++] & 0xff); - inBits += 8; - } - upLeftBuf[kk] = (Guchar)((upLeftBuf[kk] + - (inBuf >> (inBits - nBits))) & bitMask); - inBits -= nBits; - outBuf = (outBuf << nBits) | upLeftBuf[kk]; - outBits += nBits; - if (outBits >= 8) { - predLine[k++] = (Guchar)(outBuf >> (outBits - 8)); - outBits -= 8; - } - } - } - if (outBits > 0) { - predLine[k++] = (Guchar)((outBuf << (8 - outBits)) + - (inBuf & ((1 << (8 - outBits)) - 1))); - } - } - } - - // reset to start of line - predIdx = pixBytes; - - return gTrue; -} - -//------------------------------------------------------------------------ -// FileStream -//------------------------------------------------------------------------ - -FileStream::FileStream(GooFile* fileA, Goffset startA, GBool limitedA, - Goffset lengthA, Object &&dictA): - BaseStream(std::move(dictA), lengthA) { - file = fileA; - offset = start = startA; - limited = limitedA; - length = lengthA; - bufPtr = bufEnd = buf; - bufPos = start; - savePos = 0; - saved = gFalse; -} - -FileStream::~FileStream() { - close(); -} - -BaseStream *FileStream::copy() { - return new FileStream(file, start, limited, length, dict.copy()); -} - -Stream *FileStream::makeSubStream(Goffset startA, GBool limitedA, - Goffset lengthA, Object &&dictA) { - return new FileStream(file, startA, limitedA, lengthA, std::move(dictA)); -} - -void FileStream::reset() { - savePos = offset; - offset = start; - saved = gTrue; - bufPtr = bufEnd = buf; - bufPos = start; -} - -void FileStream::close() { - if (saved) { - offset = savePos; - saved = gFalse; - } -} - -GBool FileStream::fillBuf() { - int n; - - bufPos += bufEnd - buf; - bufPtr = bufEnd = buf; - if (limited && bufPos >= start + length) { - return gFalse; - } - if (limited && bufPos + fileStreamBufSize > start + length) { - n = start + length - bufPos; - } else { - n = fileStreamBufSize; - } - n = file->read(buf, n, offset); - if (n == -1) { - return gFalse; - } - offset += n; - bufEnd = buf + n; - if (bufPtr >= bufEnd) { - return gFalse; - } - return gTrue; -} - -void FileStream::setPos(Goffset pos, int dir) { - Goffset size; - - if (dir >= 0) { - offset = bufPos = pos; - } else { - size = file->size(); - if (pos > size) - pos = size; - offset = size - pos; - bufPos = offset; - } - bufPtr = bufEnd = buf; -} - -void FileStream::moveStart(Goffset delta) { - start += delta; - bufPtr = bufEnd = buf; - bufPos = start; -} - -//------------------------------------------------------------------------ -// CachedFileStream -//------------------------------------------------------------------------ - -CachedFileStream::CachedFileStream(CachedFile *ccA, Goffset startA, - GBool limitedA, Goffset lengthA, Object &&dictA) - : BaseStream(std::move(dictA), lengthA) -{ - cc = ccA; - start = startA; - limited = limitedA; - length = lengthA; - bufPtr = bufEnd = buf; - bufPos = start; - savePos = 0; - saved = gFalse; -} - -CachedFileStream::~CachedFileStream() -{ - close(); - cc->decRefCnt(); -} - -BaseStream *CachedFileStream::copy() { - cc->incRefCnt(); - return new CachedFileStream(cc, start, limited, length, dict.copy()); -} - -Stream *CachedFileStream::makeSubStream(Goffset startA, GBool limitedA, - Goffset lengthA, Object &&dictA) -{ - cc->incRefCnt(); - return new CachedFileStream(cc, startA, limitedA, lengthA, std::move(dictA)); -} - -void CachedFileStream::reset() -{ - savePos = (Guint)cc->tell(); - cc->seek(start, SEEK_SET); - - saved = gTrue; - bufPtr = bufEnd = buf; - bufPos = start; -} - -void CachedFileStream::close() -{ - if (saved) { - cc->seek(savePos, SEEK_SET); - saved = gFalse; - } -} - -GBool CachedFileStream::fillBuf() -{ - int n; - - bufPos += bufEnd - buf; - bufPtr = bufEnd = buf; - if (limited && bufPos >= start + length) { - return gFalse; - } - if (limited && bufPos + cachedStreamBufSize > start + length) { - n = start + length - bufPos; - } else { - n = cachedStreamBufSize - (bufPos % cachedStreamBufSize); - } - n = cc->read(buf, 1, n); - bufEnd = buf + n; - if (bufPtr >= bufEnd) { - return gFalse; - } - return gTrue; -} - -void CachedFileStream::setPos(Goffset pos, int dir) -{ - Guint size; - - if (dir >= 0) { - cc->seek(pos, SEEK_SET); - bufPos = pos; - } else { - cc->seek(0, SEEK_END); - size = (Guint)cc->tell(); - - if (pos > size) - pos = (Guint)size; - - cc->seek(-(int)pos, SEEK_END); - bufPos = (Guint)cc->tell(); - } - - bufPtr = bufEnd = buf; -} - -void CachedFileStream::moveStart(Goffset delta) -{ - start += delta; - bufPtr = bufEnd = buf; - bufPos = start; -} - -//------------------------------------------------------------------------ -// EmbedStream -//------------------------------------------------------------------------ - -EmbedStream::EmbedStream(Stream *strA, Object &&dictA, - GBool limitedA, Goffset lengthA, GBool reusableA): - BaseStream(std::move(dictA), lengthA) { - str = strA; - limited = limitedA; - length = lengthA; - reusable = reusableA; - record = gFalse; - replay = gFalse; - if (reusable) { - bufData = (unsigned char*)gmalloc(16384); - bufMax = 16384; - bufLen = 0; - record = gTrue; - } -} - -EmbedStream::~EmbedStream() { - if (reusable) - gfree(bufData); -} - -BaseStream *EmbedStream::copy() { - error(errInternal, -1, "Called copy() on EmbedStream"); - return nullptr; -} - -Stream *EmbedStream::makeSubStream(Goffset start, GBool limitedA, - Goffset lengthA, Object &&dictA) { - error(errInternal, -1, "Called makeSubStream() on EmbedStream"); - return nullptr; -} - -void EmbedStream::rewind() { - record = gFalse; - replay = gTrue; - bufPos = 0; -} - -void EmbedStream::restore() { - replay = gFalse; -} - -Goffset EmbedStream::getPos() { - if (replay) - return bufPos; - else - return str->getPos(); -} - -int EmbedStream::getChar() { - if (replay) { - if (bufPos < bufLen) - return bufData[bufPos++]; - else - return EOF; - } else { - if (limited && !length) { - return EOF; - } - int c = str->getChar(); - --length; - if (record) { - bufData[bufLen] = c; - bufLen++; - if (bufLen >= bufMax) { - bufMax *= 2; - bufData = (unsigned char *)grealloc(bufData, bufMax); - } - } - return c; - } -} - -int EmbedStream::lookChar() { - if (replay) { - if (bufPos < bufLen) - return bufData[bufPos]; - else - return EOF; - } else { - if (limited && !length) { - return EOF; - } - return str->lookChar(); - } -} - -int EmbedStream::getChars(int nChars, Guchar *buffer) { - int len; - - if (nChars <= 0) { - return 0; - } - if (replay) { - if (bufPos >= bufLen) - return EOF; - len = bufLen - bufPos; - if (nChars > len) - nChars = len; - memcpy(buffer, bufData, nChars); - return len; - } else { - if (limited && length < nChars) { - nChars = length; - } - len = str->doGetChars(nChars, buffer); - if (record) { - if (bufLen + len >= bufMax) { - while (bufLen + len >= bufMax) - bufMax *= 2; - bufData = (unsigned char *)grealloc(bufData, bufMax); - } - memcpy(bufData+bufLen, buffer, len); - bufLen += len; - } - } - return len; -} - - -void EmbedStream::setPos(Goffset pos, int dir) { - error(errInternal, -1, "Internal: called setPos() on EmbedStream"); -} - -Goffset EmbedStream::getStart() { - error(errInternal, -1, "Internal: called getStart() on EmbedStream"); - return 0; -} - -void EmbedStream::moveStart(Goffset delta) { - error(errInternal, -1, "Internal: called moveStart() on EmbedStream"); -} - -//------------------------------------------------------------------------ -// ASCIIHexStream -//------------------------------------------------------------------------ - -ASCIIHexStream::ASCIIHexStream(Stream *strA): - FilterStream(strA) { - buf = EOF; - eof = gFalse; -} - -ASCIIHexStream::~ASCIIHexStream() { - delete str; -} - -void ASCIIHexStream::reset() { - str->reset(); - buf = EOF; - eof = gFalse; -} - -int ASCIIHexStream::lookChar() { - int c1, c2, x; - - if (buf != EOF) - return buf; - if (eof) { - buf = EOF; - return EOF; - } - do { - c1 = str->getChar(); - } while (isspace(c1)); - if (c1 == '>') { - eof = gTrue; - buf = EOF; - return buf; - } - do { - c2 = str->getChar(); - } while (isspace(c2)); - if (c2 == '>') { - eof = gTrue; - c2 = '0'; - } - if (c1 >= '0' && c1 <= '9') { - x = (c1 - '0') << 4; - } else if (c1 >= 'A' && c1 <= 'F') { - x = (c1 - 'A' + 10) << 4; - } else if (c1 >= 'a' && c1 <= 'f') { - x = (c1 - 'a' + 10) << 4; - } else if (c1 == EOF) { - eof = gTrue; - x = 0; - } else { - error(errSyntaxError, getPos(), - "Illegal character <{0:02x}> in ASCIIHex stream", c1); - x = 0; - } - if (c2 >= '0' && c2 <= '9') { - x += c2 - '0'; - } else if (c2 >= 'A' && c2 <= 'F') { - x += c2 - 'A' + 10; - } else if (c2 >= 'a' && c2 <= 'f') { - x += c2 - 'a' + 10; - } else if (c2 == EOF) { - eof = gTrue; - x = 0; - } else { - error(errSyntaxError, getPos(), - "Illegal character <{0:02x}> in ASCIIHex stream", c2); - } - buf = x & 0xff; - return buf; -} - -GooString *ASCIIHexStream::getPSFilter(int psLevel, const char *indent) { - GooString *s; - - if (psLevel < 2) { - return nullptr; - } - if (!(s = str->getPSFilter(psLevel, indent))) { - return nullptr; - } - s->append(indent)->append("/ASCIIHexDecode filter\n"); - return s; -} - -GBool ASCIIHexStream::isBinary(GBool last) { - return str->isBinary(gFalse); -} - -//------------------------------------------------------------------------ -// ASCII85Stream -//------------------------------------------------------------------------ - -ASCII85Stream::ASCII85Stream(Stream *strA): - FilterStream(strA) { - index = n = 0; - eof = gFalse; -} - -ASCII85Stream::~ASCII85Stream() { - delete str; -} - -void ASCII85Stream::reset() { - str->reset(); - index = n = 0; - eof = gFalse; -} - -int ASCII85Stream::lookChar() { - int k; - Gulong t; - - if (index >= n) { - if (eof) - return EOF; - index = 0; - do { - c[0] = str->getChar(); - } while (Lexer::isSpace(c[0])); - if (c[0] == '~' || c[0] == EOF) { - eof = gTrue; - n = 0; - return EOF; - } else if (c[0] == 'z') { - b[0] = b[1] = b[2] = b[3] = 0; - n = 4; - } else { - for (k = 1; k < 5; ++k) { - do { - c[k] = str->getChar(); - } while (Lexer::isSpace(c[k])); - if (c[k] == '~' || c[k] == EOF) - break; - } - n = k - 1; - if (k < 5 && (c[k] == '~' || c[k] == EOF)) { - for (++k; k < 5; ++k) - c[k] = 0x21 + 84; - eof = gTrue; - } - t = 0; - for (k = 0; k < 5; ++k) - t = t * 85 + (c[k] - 0x21); - for (k = 3; k >= 0; --k) { - b[k] = (int)(t & 0xff); - t >>= 8; - } - } - } - return b[index]; -} - -GooString *ASCII85Stream::getPSFilter(int psLevel, const char *indent) { - GooString *s; - - if (psLevel < 2) { - return nullptr; - } - if (!(s = str->getPSFilter(psLevel, indent))) { - return nullptr; - } - s->append(indent)->append("/ASCII85Decode filter\n"); - return s; -} - -GBool ASCII85Stream::isBinary(GBool last) { - return str->isBinary(gFalse); -} - -//------------------------------------------------------------------------ -// LZWStream -//------------------------------------------------------------------------ - -LZWStream::LZWStream(Stream *strA, int predictor, int columns, int colors, - int bits, int earlyA): - FilterStream(strA) { - if (predictor != 1) { - pred = new StreamPredictor(this, predictor, columns, colors, bits); - if (!pred->isOk()) { - delete pred; - pred = nullptr; - } - } else { - pred = nullptr; - } - early = earlyA; - eof = gFalse; - inputBits = 0; - clearTable(); -} - -LZWStream::~LZWStream() { - if (pred) { - delete pred; - } - delete str; -} - -int LZWStream::getChar() { - if (pred) { - return pred->getChar(); - } - if (eof) { - return EOF; - } - if (seqIndex >= seqLength) { - if (!processNextCode()) { - return EOF; - } - } - return seqBuf[seqIndex++]; -} - -int LZWStream::lookChar() { - if (pred) { - return pred->lookChar(); - } - if (eof) { - return EOF; - } - if (seqIndex >= seqLength) { - if (!processNextCode()) { - return EOF; - } - } - return seqBuf[seqIndex]; -} - -void LZWStream::getRawChars(int nChars, int *buffer) { - for (int i = 0; i < nChars; ++i) - buffer[i] = doGetRawChar(); -} - -int LZWStream::getRawChar() { - return doGetRawChar(); -} - -int LZWStream::getChars(int nChars, Guchar *buffer) { - int n, m; - - if (pred) { - return pred->getChars(nChars, buffer); - } - if (eof) { - return 0; - } - n = 0; - while (n < nChars) { - if (seqIndex >= seqLength) { - if (!processNextCode()) { - break; - } - } - m = seqLength - seqIndex; - if (m > nChars - n) { - m = nChars - n; - } - memcpy(buffer + n, seqBuf + seqIndex, m); - seqIndex += m; - n += m; - } - return n; -} - -void LZWStream::reset() { - str->reset(); - eof = gFalse; - inputBits = 0; - clearTable(); -} - -GBool LZWStream::processNextCode() { - int code; - int nextLength; - int i, j; - - // check for EOF - if (eof) { - return gFalse; - } - - // check for eod and clear-table codes - start: - code = getCode(); - if (code == EOF || code == 257) { - eof = gTrue; - return gFalse; - } - if (code == 256) { - clearTable(); - goto start; - } - - // process the next code - nextLength = seqLength + 1; - if (code < 256) { - seqBuf[0] = code; - seqLength = 1; - } else if (code < nextCode) { - seqLength = table[code].length; - for (i = seqLength - 1, j = code; i > 0; --i) { - seqBuf[i] = table[j].tail; - j = table[j].head; - } - seqBuf[0] = j; - } else if (code == nextCode) { - seqBuf[seqLength] = newChar; - ++seqLength; - } else { - error(errSyntaxError, getPos(), "Bad LZW stream - unexpected code"); - eof = gTrue; - return gFalse; - } - newChar = seqBuf[0]; - if (first) { - first = gFalse; - } else { - if (nextCode < 4097) { - table[nextCode].length = nextLength; - table[nextCode].head = prevCode; - table[nextCode].tail = newChar; - ++nextCode; - } - if (nextCode + early == 512) - nextBits = 10; - else if (nextCode + early == 1024) - nextBits = 11; - else if (nextCode + early == 2048) - nextBits = 12; - } - prevCode = code; - - // reset buffer - seqIndex = 0; - - return gTrue; -} - -void LZWStream::clearTable() { - nextCode = 258; - nextBits = 9; - seqIndex = seqLength = 0; - first = gTrue; - newChar = 0; -} - -int LZWStream::getCode() { - int c; - int code; - - while (inputBits < nextBits) { - if ((c = str->getChar()) == EOF) - return EOF; - inputBuf = (inputBuf << 8) | static_cast<unsigned>(c & 0xff); - inputBits += 8; - } - code = static_cast<signed>((inputBuf >> (inputBits - nextBits)) & ((1 << nextBits) - 1)); - inputBits -= nextBits; - return code; -} - -GooString *LZWStream::getPSFilter(int psLevel, const char *indent) { - GooString *s; - - if (psLevel < 2 || pred) { - return nullptr; - } - if (!(s = str->getPSFilter(psLevel, indent))) { - return nullptr; - } - s->append(indent)->append("<< "); - if (!early) { - s->append("/EarlyChange 0 "); - } - s->append(">> /LZWDecode filter\n"); - return s; -} - -GBool LZWStream::isBinary(GBool last) { - return str->isBinary(gTrue); -} - -//------------------------------------------------------------------------ -// RunLengthStream -//------------------------------------------------------------------------ - -RunLengthStream::RunLengthStream(Stream *strA): - FilterStream(strA) { - bufPtr = bufEnd = buf; - eof = gFalse; -} - -RunLengthStream::~RunLengthStream() { - delete str; -} - -void RunLengthStream::reset() { - str->reset(); - bufPtr = bufEnd = buf; - eof = gFalse; -} - -int RunLengthStream::getChars(int nChars, Guchar *buffer) { - int n, m; - - n = 0; - while (n < nChars) { - if (bufPtr >= bufEnd) { - if (!fillBuf()) { - break; - } - } - m = (int)(bufEnd - bufPtr); - if (m > nChars - n) { - m = nChars - n; - } - memcpy(buffer + n, bufPtr, m); - bufPtr += m; - n += m; - } - return n; -} - -GooString *RunLengthStream::getPSFilter(int psLevel, const char *indent) { - GooString *s; - - if (psLevel < 2) { - return nullptr; - } - if (!(s = str->getPSFilter(psLevel, indent))) { - return nullptr; - } - s->append(indent)->append("/RunLengthDecode filter\n"); - return s; -} - -GBool RunLengthStream::isBinary(GBool last) { - return str->isBinary(gTrue); -} - -GBool RunLengthStream::fillBuf() { - int c; - int n, i; - - if (eof) - return gFalse; - c = str->getChar(); - if (c == 0x80 || c == EOF) { - eof = gTrue; - return gFalse; - } - if (c < 0x80) { - n = c + 1; - for (i = 0; i < n; ++i) - buf[i] = (char)str->getChar(); - } else { - n = 0x101 - c; - c = str->getChar(); - for (i = 0; i < n; ++i) - buf[i] = (char)c; - } - bufPtr = buf; - bufEnd = buf + n; - return gTrue; -} - -//------------------------------------------------------------------------ -// CCITTFaxStream -//------------------------------------------------------------------------ - -CCITTFaxStream::CCITTFaxStream(Stream *strA, int encodingA, GBool endOfLineA, - GBool byteAlignA, int columnsA, int rowsA, - GBool endOfBlockA, GBool blackA, int damagedRowsBeforeErrorA): - FilterStream(strA) { - encoding = encodingA; - endOfLine = endOfLineA; - byteAlign = byteAlignA; - columns = columnsA; - damagedRowsBeforeError = damagedRowsBeforeErrorA; - if (columns < 1) { - columns = 1; - } else if (columns > INT_MAX - 2) { - columns = INT_MAX - 2; - } - rows = rowsA; - endOfBlock = endOfBlockA; - black = blackA; - // 0 <= codingLine[0] < codingLine[1] < ... < codingLine[n] = columns - // ---> max codingLine size = columns + 1 - // refLine has one extra guard entry at the end - // ---> max refLine size = columns + 2 - codingLine = (int *)gmallocn_checkoverflow(columns + 1, sizeof(int)); - refLine = (int *)gmallocn_checkoverflow(columns + 2, sizeof(int)); - - if (codingLine != nullptr && refLine != nullptr) { - eof = gFalse; - codingLine[0] = columns; - } else { - eof = gTrue; - } - row = 0; - nextLine2D = encoding < 0; - inputBits = 0; - a0i = 0; - outputBits = 0; - - buf = EOF; -} - -CCITTFaxStream::~CCITTFaxStream() { - delete str; - gfree(refLine); - gfree(codingLine); -} - -void CCITTFaxStream::ccittReset(GBool unfiltered) { - if (unfiltered) - str->unfilteredReset(); - else - str->reset(); - - row = 0; - nextLine2D = encoding < 0; - inputBits = 0; - a0i = 0; - outputBits = 0; - buf = EOF; -} - -void CCITTFaxStream::unfilteredReset() { - ccittReset(gTrue); -} - -void CCITTFaxStream::reset() { - int code1; - - ccittReset(gFalse); - - if (codingLine != nullptr && refLine != nullptr) { - eof = gFalse; - codingLine[0] = columns; - } else { - eof = gTrue; - } - - // skip any initial zero bits and end-of-line marker, and get the 2D - // encoding tag - while ((code1 = lookBits(12)) == 0) { - eatBits(1); - } - if (code1 == 0x001) { - eatBits(12); - endOfLine = gTrue; - } - if (encoding > 0) { - nextLine2D = !lookBits(1); - eatBits(1); - } -} - -inline void CCITTFaxStream::addPixels(int a1, int blackPixels) { - if (a1 > codingLine[a0i]) { - if (a1 > columns) { - error(errSyntaxError, getPos(), - "CCITTFax row is wrong length ({0:d})", a1); - err = gTrue; - a1 = columns; - } - if ((a0i & 1) ^ blackPixels) { - ++a0i; - } - codingLine[a0i] = a1; - } -} - -inline void CCITTFaxStream::addPixelsNeg(int a1, int blackPixels) { - if (a1 > codingLine[a0i]) { - if (a1 > columns) { - error(errSyntaxError, getPos(), - "CCITTFax row is wrong length ({0:d})", a1); - err = gTrue; - a1 = columns; - } - if ((a0i & 1) ^ blackPixels) { - ++a0i; - } - codingLine[a0i] = a1; - } else if (a1 < codingLine[a0i]) { - if (a1 < 0) { - error(errSyntaxError, getPos(), "Invalid CCITTFax code"); - err = gTrue; - a1 = 0; - } - while (a0i > 0 && a1 <= codingLine[a0i - 1]) { - --a0i; - } - codingLine[a0i] = a1; - } -} - -int CCITTFaxStream::lookChar() { - int code1, code2, code3; - int b1i, blackPixels, i, bits; - GBool gotEOL; - - if (buf != EOF) { - return buf; - } - - // read the next row - if (outputBits == 0) { - - // if at eof just return EOF - if (eof) { - return EOF; - } - - err = gFalse; - - // 2-D encoding - if (nextLine2D) { - for (i = 0; i < columns && codingLine[i] < columns; ++i) { - refLine[i] = codingLine[i]; - } - for (; i < columns + 2; ++i) { - refLine[i] = columns; - } - codingLine[0] = 0; - a0i = 0; - b1i = 0; - blackPixels = 0; - // invariant: - // refLine[b1i-1] <= codingLine[a0i] < refLine[b1i] < refLine[b1i+1] - // <= columns - // exception at left edge: - // codingLine[a0i = 0] = refLine[b1i = 0] = 0 is possible - // exception at right edge: - // refLine[b1i] = refLine[b1i+1] = columns is possible - while (codingLine[a0i] < columns && !err) { - code1 = getTwoDimCode(); - switch (code1) { - case twoDimPass: - if (likely(b1i + 1 < columns + 2)) { - addPixels(refLine[b1i + 1], blackPixels); - if (refLine[b1i + 1] < columns) { - b1i += 2; - } - } - break; - case twoDimHoriz: - code1 = code2 = 0; - if (blackPixels) { - do { - code1 += code3 = getBlackCode(); - } while (code3 >= 64); - do { - code2 += code3 = getWhiteCode(); - } while (code3 >= 64); - } else { - do { - code1 += code3 = getWhiteCode(); - } while (code3 >= 64); - do { - code2 += code3 = getBlackCode(); - } while (code3 >= 64); - } - addPixels(codingLine[a0i] + code1, blackPixels); - if (codingLine[a0i] < columns) { - addPixels(codingLine[a0i] + code2, blackPixels ^ 1); - } - while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) { - b1i += 2; - if (unlikely(b1i > columns + 1)) { - error(errSyntaxError, getPos(), - "Bad 2D code {0:04x} in CCITTFax stream", code1); - err = gTrue; - break; - } - } - break; - case twoDimVertR3: - if (unlikely(b1i > columns + 1)) { - error(errSyntaxError, getPos(), - "Bad 2D code {0:04x} in CCITTFax stream", code1); - err = gTrue; - break; - } - addPixels(refLine[b1i] + 3, blackPixels); - blackPixels ^= 1; - if (codingLine[a0i] < columns) { - ++b1i; - while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) { - b1i += 2; - if (unlikely(b1i > columns + 1)) { - error(errSyntaxError, getPos(), - "Bad 2D code {0:04x} in CCITTFax stream", code1); - err = gTrue; - break; - } - } - } - break; - case twoDimVertR2: - if (unlikely(b1i > columns + 1)) { - error(errSyntaxError, getPos(), - "Bad 2D code {0:04x} in CCITTFax stream", code1); - err = gTrue; - break; - } - addPixels(refLine[b1i] + 2, blackPixels); - blackPixels ^= 1; - if (codingLine[a0i] < columns) { - ++b1i; - while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) { - b1i += 2; - if (unlikely(b1i > columns + 1)) { - error(errSyntaxError, getPos(), - "Bad 2D code {0:04x} in CCITTFax stream", code1); - err = gTrue; - break; - } - } - } - break; - case twoDimVertR1: - if (unlikely(b1i > columns + 1)) { - error(errSyntaxError, getPos(), - "Bad 2D code {0:04x} in CCITTFax stream", code1); - err = gTrue; - break; - } - addPixels(refLine[b1i] + 1, blackPixels); - blackPixels ^= 1; - if (codingLine[a0i] < columns) { - ++b1i; - while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) { - b1i += 2; - if (unlikely(b1i > columns + 1)) { - error(errSyntaxError, getPos(), - "Bad 2D code {0:04x} in CCITTFax stream", code1); - err = gTrue; - break; - } - } - } - break; - case twoDimVert0: - if (unlikely(b1i > columns + 1)) { - error(errSyntaxError, getPos(), - "Bad 2D code {0:04x} in CCITTFax stream", code1); - err = gTrue; - break; - } - addPixels(refLine[b1i], blackPixels); - blackPixels ^= 1; - if (codingLine[a0i] < columns) { - ++b1i; - while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) { - b1i += 2; - if (unlikely(b1i > columns + 1)) { - error(errSyntaxError, getPos(), - "Bad 2D code {0:04x} in CCITTFax stream", code1); - err = gTrue; - break; - } - } - } - break; - case twoDimVertL3: - if (unlikely(b1i > columns + 1)) { - error(errSyntaxError, getPos(), - "Bad 2D code {0:04x} in CCITTFax stream", code1); - err = gTrue; - break; - } - addPixelsNeg(refLine[b1i] - 3, blackPixels); - blackPixels ^= 1; - if (codingLine[a0i] < columns) { - if (b1i > 0) { - --b1i; - } else { - ++b1i; - } - while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) { - b1i += 2; - if (unlikely(b1i > columns + 1)) { - error(errSyntaxError, getPos(), - "Bad 2D code {0:04x} in CCITTFax stream", code1); - err = gTrue; - break; - } - } - } - break; - case twoDimVertL2: - if (unlikely(b1i > columns + 1)) { - error(errSyntaxError, getPos(), - "Bad 2D code {0:04x} in CCITTFax stream", code1); - err = gTrue; - break; - } - addPixelsNeg(refLine[b1i] - 2, blackPixels); - blackPixels ^= 1; - if (codingLine[a0i] < columns) { - if (b1i > 0) { - --b1i; - } else { - ++b1i; - } - while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) { - b1i += 2; - if (unlikely(b1i > columns + 1)) { - error(errSyntaxError, getPos(), - "Bad 2D code {0:04x} in CCITTFax stream", code1); - err = gTrue; - break; - } - } - } - break; - case twoDimVertL1: - if (unlikely(b1i > columns + 1)) { - error(errSyntaxError, getPos(), - "Bad 2D code {0:04x} in CCITTFax stream", code1); - err = gTrue; - break; - } - addPixelsNeg(refLine[b1i] - 1, blackPixels); - blackPixels ^= 1; - if (codingLine[a0i] < columns) { - if (b1i > 0) { - --b1i; - } else { - ++b1i; - } - while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) { - b1i += 2; - if (unlikely(b1i > columns + 1)) { - error(errSyntaxError, getPos(), - "Bad 2D code {0:04x} in CCITTFax stream", code1); - err = gTrue; - break; - } - } - } - break; - case EOF: - addPixels(columns, 0); - eof = gTrue; - break; - default: - error(errSyntaxError, getPos(), - "Bad 2D code {0:04x} in CCITTFax stream", code1); - addPixels(columns, 0); - err = gTrue; - break; - } - } - - // 1-D encoding - } else { - codingLine[0] = 0; - a0i = 0; - blackPixels = 0; - while (codingLine[a0i] < columns) { - code1 = 0; - if (blackPixels) { - do { - code1 += code3 = getBlackCode(); - } while (code3 >= 64); - } else { - do { - code1 += code3 = getWhiteCode(); - } while (code3 >= 64); - } - addPixels(codingLine[a0i] + code1, blackPixels); - blackPixels ^= 1; - } - } - - // check for end-of-line marker, skipping over any extra zero bits - // (if EncodedByteAlign is true and EndOfLine is false, there can - // be "false" EOL markers -- i.e., if the last n unused bits in - // row i are set to zero, and the first 11-n bits in row i+1 - // happen to be zero -- so we don't look for EOL markers in this - // case) - gotEOL = gFalse; - if (!endOfBlock && row == rows - 1) { - eof = gTrue; - } else if (endOfLine || !byteAlign) { - code1 = lookBits(12); - if (endOfLine) { - while (code1 != EOF && code1 != 0x001) { - eatBits(1); - code1 = lookBits(12); - } - } else { - while (code1 == 0) { - eatBits(1); - code1 = lookBits(12); - } - } - if (code1 == 0x001) { - eatBits(12); - gotEOL = gTrue; - } - } - - // byte-align the row - // (Adobe apparently doesn't do byte alignment after EOL markers - // -- I've seen CCITT image data streams in two different formats, - // both with the byteAlign flag set: - // 1. xx:x0:01:yy:yy - // 2. xx:00:1y:yy:yy - // where xx is the previous line, yy is the next line, and colons - // separate bytes.) - if (byteAlign && !gotEOL) { - inputBits &= ~7; - } - - // check for end of stream - if (lookBits(1) == EOF) { - eof = gTrue; - } - - // get 2D encoding tag - if (!eof && encoding > 0) { - nextLine2D = !lookBits(1); - eatBits(1); - } - - // check for end-of-block marker - if (endOfBlock && !endOfLine && byteAlign) { - // in this case, we didn't check for an EOL code above, so we - // need to check here - code1 = lookBits(24); - if (code1 == 0x001001) { - eatBits(12); - gotEOL = gTrue; - } - } - if (endOfBlock && gotEOL) { - code1 = lookBits(12); - if (code1 == 0x001) { - eatBits(12); - if (encoding > 0) { - lookBits(1); - eatBits(1); - } - if (encoding >= 0) { - for (i = 0; i < 4; ++i) { - code1 = lookBits(12); - if (code1 != 0x001) { - error(errSyntaxError, getPos(), - "Bad RTC code in CCITTFax stream"); - } - eatBits(12); - if (encoding > 0) { - lookBits(1); - eatBits(1); - } - } - } - eof = gTrue; - } - - // look for an end-of-line marker after an error -- we only do - // this if we know the stream contains end-of-line markers because - // the "just plow on" technique tends to work better otherwise - } else if (err && endOfLine) { - while (1) { - code1 = lookBits(13); - if (code1 == EOF) { - eof = gTrue; - return EOF; - } - if ((code1 >> 1) == 0x001) { - break; - } - eatBits(1); - } - eatBits(12); - if (encoding > 0) { - eatBits(1); - nextLine2D = !(code1 & 1); - } - } - - // set up for output - if (codingLine[0] > 0) { - outputBits = codingLine[a0i = 0]; - } else { - outputBits = codingLine[a0i = 1]; - } - - ++row; - } - - // get a byte - if (outputBits >= 8) { - buf = (a0i & 1) ? 0x00 : 0xff; - outputBits -= 8; - if (outputBits == 0 && codingLine[a0i] < columns) { - ++a0i; - outputBits = codingLine[a0i] - codingLine[a0i - 1]; - } - } else { - bits = 8; - buf = 0; - do { - if (outputBits > bits) { - buf <<= bits; - if (!(a0i & 1)) { - buf |= 0xff >> (8 - bits); - } - outputBits -= bits; - bits = 0; - } else { - buf <<= outputBits; - if (!(a0i & 1)) { - buf |= 0xff >> (8 - outputBits); - } - bits -= outputBits; - outputBits = 0; - if (codingLine[a0i] < columns) { - ++a0i; - if (unlikely(a0i > columns)) { - error(errSyntaxError, getPos(), - "Bad bits {0:04x} in CCITTFax stream", bits); - err = gTrue; - break; - } - outputBits = codingLine[a0i] - codingLine[a0i - 1]; - } else if (bits > 0) { - buf <<= bits; - bits = 0; - } - } - } while (bits); - } - if (black) { - buf ^= 0xff; - } - return buf; -} - -short CCITTFaxStream::getTwoDimCode() { - int code; - const CCITTCode *p; - int n; - - code = 0; // make gcc happy - if (endOfBlock) { - if ((code = lookBits(7)) != EOF) { - p = &twoDimTab1[code]; - if (p->bits > 0) { - eatBits(p->bits); - return p->n; - } - } - } else { - for (n = 1; n <= 7; ++n) { - if ((code = lookBits(n)) == EOF) { - break; - } - if (n < 7) { - code <<= 7 - n; - } - p = &twoDimTab1[code]; - if (p->bits == n) { - eatBits(n); - return p->n; - } - } - } - error(errSyntaxError, getPos(), - "Bad two dim code ({0:04x}) in CCITTFax stream", code); - return EOF; -} - -short CCITTFaxStream::getWhiteCode() { - short code; - const CCITTCode *p; - int n; - - code = 0; // make gcc happy - if (endOfBlock) { - code = lookBits(12); - if (code == EOF) { - return 1; - } - if ((code >> 5) == 0) { - p = &whiteTab1[code]; - } else { - p = &whiteTab2[code >> 3]; - } - if (p->bits > 0) { - eatBits(p->bits); - return p->n; - } - } else { - for (n = 1; n <= 9; ++n) { - code = lookBits(n); - if (code == EOF) { - return 1; - } - if (n < 9) { - code <<= 9 - n; - } - p = &whiteTab2[code]; - if (p->bits == n) { - eatBits(n); - return p->n; - } - } - for (n = 11; n <= 12; ++n) { - code = lookBits(n); - if (code == EOF) { - return 1; - } - if (n < 12) { - code <<= 12 - n; - } - p = &whiteTab1[code]; - if (p->bits == n) { - eatBits(n); - return p->n; - } - } - } - error(errSyntaxError, getPos(), - "Bad white code ({0:04x}) in CCITTFax stream", code); - // eat a bit and return a positive number so that the caller doesn't - // go into an infinite loop - eatBits(1); - return 1; -} - -short CCITTFaxStream::getBlackCode() { - short code; - const CCITTCode *p; - int n; - - code = 0; // make gcc happy - if (endOfBlock) { - code = lookBits(13); - if (code == EOF) { - return 1; - } - if ((code >> 7) == 0) { - p = &blackTab1[code]; - } else if ((code >> 9) == 0 && (code >> 7) != 0) { - p = &blackTab2[(code >> 1) - 64]; - } else { - p = &blackTab3[code >> 7]; - } - if (p->bits > 0) { - eatBits(p->bits); - return p->n; - } - } else { - for (n = 2; n <= 6; ++n) { - code = lookBits(n); - if (code == EOF) { - return 1; - } - if (n < 6) { - code <<= 6 - n; - } - p = &blackTab3[code]; - if (p->bits == n) { - eatBits(n); - return p->n; - } - } - for (n = 7; n <= 12; ++n) { - code = lookBits(n); - if (code == EOF) { - return 1; - } - if (n < 12) { - code <<= 12 - n; - } - if (code >= 64) { - p = &blackTab2[code - 64]; - if (p->bits == n) { - eatBits(n); - return p->n; - } - } - } - for (n = 10; n <= 13; ++n) { - code = lookBits(n); - if (code == EOF) { - return 1; - } - if (n < 13) { - code <<= 13 - n; - } - p = &blackTab1[code]; - if (p->bits == n) { - eatBits(n); - return p->n; - } - } - } - error(errSyntaxError, getPos(), - "Bad black code ({0:04x}) in CCITTFax stream", code); - // eat a bit and return a positive number so that the caller doesn't - // go into an infinite loop - eatBits(1); - return 1; -} - -short CCITTFaxStream::lookBits(int n) { - int c; - - while (inputBits < n) { - if ((c = str->getChar()) == EOF) { - if (inputBits == 0) { - return EOF; - } - // near the end of the stream, the caller may ask for more bits - // than are available, but there may still be a valid code in - // however many bits are available -- we need to return correct - // data in this case - return (inputBuf << (n - inputBits)) & (0xffffffff >> (32 - n)); - } - inputBuf = (inputBuf << 8) + c; - inputBits += 8; - } - return (inputBuf >> (inputBits - n)) & (0xffffffff >> (32 - n)); -} - -GooString *CCITTFaxStream::getPSFilter(int psLevel, const char *indent) { - GooString *s; - char s1[50]; - - if (psLevel < 2) { - return nullptr; - } - if (!(s = str->getPSFilter(psLevel, indent))) { - return nullptr; - } - s->append(indent)->append("<< "); - if (encoding != 0) { - sprintf(s1, "/K %d ", encoding); - s->append(s1); - } - if (endOfLine) { - s->append("/EndOfLine true "); - } - if (byteAlign) { - s->append("/EncodedByteAlign true "); - } - sprintf(s1, "/Columns %d ", columns); - s->append(s1); - if (rows != 0) { - sprintf(s1, "/Rows %d ", rows); - s->append(s1); - } - if (!endOfBlock) { - s->append("/EndOfBlock false "); - } - if (black) { - s->append("/BlackIs1 true "); - } - s->append(">> /CCITTFaxDecode filter\n"); - return s; -} - -GBool CCITTFaxStream::isBinary(GBool last) { - return str->isBinary(gTrue); -} - -#ifndef ENABLE_LIBJPEG - -//------------------------------------------------------------------------ -// DCTStream -//------------------------------------------------------------------------ - -// IDCT constants (20.12 fixed point format) -#define dctCos1 4017 // cos(pi/16) -#define dctSin1 799 // sin(pi/16) -#define dctCos3 3406 // cos(3*pi/16) -#define dctSin3 2276 // sin(3*pi/16) -#define dctCos6 1567 // cos(6*pi/16) -#define dctSin6 3784 // sin(6*pi/16) -#define dctSqrt2 5793 // sqrt(2) -#define dctSqrt1d2 2896 // sqrt(2) / 2 - -// color conversion parameters (16.16 fixed point format) -#define dctCrToR 91881 // 1.4020 -#define dctCbToG -22553 // -0.3441363 -#define dctCrToG -46802 // -0.71413636 -#define dctCbToB 116130 // 1.772 - -// clip [-256,511] --> [0,255] -#define dctClipOffset 256 -#define dctClipLength 768 -static Guchar dctClip[dctClipLength]; -static int dctClipInit = 0; - -// zig zag decode map -static const int dctZigZag[64] = { - 0, - 1, 8, - 16, 9, 2, - 3, 10, 17, 24, - 32, 25, 18, 11, 4, - 5, 12, 19, 26, 33, 40, - 48, 41, 34, 27, 20, 13, 6, - 7, 14, 21, 28, 35, 42, 49, 56, - 57, 50, 43, 36, 29, 22, 15, - 23, 30, 37, 44, 51, 58, - 59, 52, 45, 38, 31, - 39, 46, 53, 60, - 61, 54, 47, - 55, 62, - 63 -}; - -DCTStream::DCTStream(Stream *strA, int colorXformA, Dict *dict, int recursion): - FilterStream(strA) { - int i, j; - - colorXform = colorXformA; - progressive = interleaved = gFalse; - width = height = 0; - mcuWidth = mcuHeight = 0; - numComps = 0; - comp = 0; - x = y = dy = 0; - for (i = 0; i < 4; ++i) { - for (j = 0; j < 32; ++j) { - rowBuf[i][j] = NULL; - } - frameBuf[i] = NULL; - } - - if (!dctClipInit) { - for (i = -256; i < 0; ++i) - dctClip[dctClipOffset + i] = 0; - for (i = 0; i < 256; ++i) - dctClip[dctClipOffset + i] = i; - for (i = 256; i < 512; ++i) - dctClip[dctClipOffset + i] = 255; - dctClipInit = 1; - } -} - -DCTStream::~DCTStream() { - close(); - delete str; -} - -void DCTStream::dctReset(GBool unfiltered) { - if (unfiltered) - str->unfilteredReset(); - else - str->reset(); - - progressive = interleaved = gFalse; - width = height = 0; - numComps = 0; - numQuantTables = 0; - numDCHuffTables = 0; - numACHuffTables = 0; - gotJFIFMarker = gFalse; - gotAdobeMarker = gFalse; - restartInterval = 0; -} - -void DCTStream::unfilteredReset() { - dctReset(gTrue); -} - -void DCTStream::reset() { - int i, j; - - dctReset(gFalse); - - if (!readHeader()) { - y = height; - return; - } - - // compute MCU size - if (numComps == 1) { - compInfo[0].hSample = compInfo[0].vSample = 1; - } - mcuWidth = compInfo[0].hSample; - mcuHeight = compInfo[0].vSample; - for (i = 1; i < numComps; ++i) { - if (compInfo[i].hSample > mcuWidth) { - mcuWidth = compInfo[i].hSample; - } - if (compInfo[i].vSample > mcuHeight) { - mcuHeight = compInfo[i].vSample; - } - } - mcuWidth *= 8; - mcuHeight *= 8; - - // figure out color transform - if (colorXform == -1) { - if (numComps == 3) { - if (gotJFIFMarker) { - colorXform = 1; - } else if (compInfo[0].id == 82 && compInfo[1].id == 71 && - compInfo[2].id == 66) { // ASCII "RGB" - colorXform = 0; - } else { - colorXform = 1; - } - } else { - colorXform = 0; - } - } - - if (progressive || !interleaved) { - - // allocate a buffer for the whole image - bufWidth = ((width + mcuWidth - 1) / mcuWidth) * mcuWidth; - bufHeight = ((height + mcuHeight - 1) / mcuHeight) * mcuHeight; - if (bufWidth <= 0 || bufHeight <= 0 || - bufWidth > INT_MAX / bufWidth / (int)sizeof(int)) { - error(errSyntaxError, getPos(), "Invalid image size in DCT stream"); - y = height; - return; - } - for (i = 0; i < numComps; ++i) { - frameBuf[i] = (int *)gmallocn(bufWidth * bufHeight, sizeof(int)); - memset(frameBuf[i], 0, bufWidth * bufHeight * sizeof(int)); - } - - // read the image data - do { - restartMarker = 0xd0; - restart(); - readScan(); - } while (readHeader()); - - // decode - decodeImage(); - - // initialize counters - comp = 0; - x = 0; - y = 0; - - } else { - - // allocate a buffer for one row of MCUs - bufWidth = ((width + mcuWidth - 1) / mcuWidth) * mcuWidth; - for (i = 0; i < numComps; ++i) { - for (j = 0; j < mcuHeight; ++j) { - rowBuf[i][j] = (Guchar *)gmallocn(bufWidth, sizeof(Guchar)); - } - } - - // initialize counters - comp = 0; - x = 0; - y = 0; - dy = mcuHeight; - - restartMarker = 0xd0; - restart(); - } -} - -void DCTStream::close() { - int i, j; - - for (i = 0; i < 4; ++i) { - for (j = 0; j < 32; ++j) { - gfree(rowBuf[i][j]); - rowBuf[i][j] = NULL; - } - gfree(frameBuf[i]); - frameBuf[i] = NULL; - } - FilterStream::close(); -} - -int DCTStream::getChar() { - int c; - - if (y >= height) { - return EOF; - } - if (progressive || !interleaved) { - c = frameBuf[comp][y * bufWidth + x]; - if (++comp == numComps) { - comp = 0; - if (++x == width) { - x = 0; - ++y; - } - } - } else { - if (dy >= mcuHeight) { - if (!readMCURow()) { - y = height; - return EOF; - } - comp = 0; - x = 0; - dy = 0; - } - c = rowBuf[comp][dy][x]; - if (++comp == numComps) { - comp = 0; - if (++x == width) { - x = 0; - ++y; - ++dy; - if (y == height) { - readTrailer(); - } - } - } - } - return c; -} - -int DCTStream::lookChar() { - if (y >= height) { - return EOF; - } - if (progressive || !interleaved) { - return frameBuf[comp][y * bufWidth + x]; - } else { - if (dy >= mcuHeight) { - if (!readMCURow()) { - y = height; - return EOF; - } - comp = 0; - x = 0; - dy = 0; - } - return rowBuf[comp][dy][x]; - } -} - -void DCTStream::restart() { - int i; - - inputBits = 0; - restartCtr = restartInterval; - for (i = 0; i < numComps; ++i) { - compInfo[i].prevDC = 0; - } - eobRun = 0; -} - -// Read one row of MCUs from a sequential JPEG stream. -GBool DCTStream::readMCURow() { - int data1[64]; - Guchar data2[64]; - Guchar *p1, *p2; - int pY, pCb, pCr, pR, pG, pB; - int h, v, horiz, vert, hSub, vSub; - int x1, x2, y2, x3, y3, x4, y4, x5, y5, cc, i; - int c; - - for (x1 = 0; x1 < width; x1 += mcuWidth) { - - // deal with restart marker - if (restartInterval > 0 && restartCtr == 0) { - c = readMarker(); - if (c != restartMarker) { - error(errSyntaxError, getPos(), - "Bad DCT data: incorrect restart marker"); - return gFalse; - } - if (++restartMarker == 0xd8) - restartMarker = 0xd0; - restart(); - } - - // read one MCU - for (cc = 0; cc < numComps; ++cc) { - h = compInfo[cc].hSample; - v = compInfo[cc].vSample; - horiz = mcuWidth / h; - vert = mcuHeight / v; - hSub = horiz / 8; - vSub = vert / 8; - for (y2 = 0; y2 < mcuHeight; y2 += vert) { - for (x2 = 0; x2 < mcuWidth; x2 += horiz) { - if (unlikely(scanInfo.dcHuffTable[cc] >= 4) || unlikely(scanInfo.acHuffTable[cc] >= 4)) { - return gFalse; - } - if (!readDataUnit(&dcHuffTables[scanInfo.dcHuffTable[cc]], - &acHuffTables[scanInfo.acHuffTable[cc]], - &compInfo[cc].prevDC, - data1)) { - return gFalse; - } - transformDataUnit(quantTables[compInfo[cc].quantTable], - data1, data2); - if (hSub == 1 && vSub == 1) { - for (y3 = 0, i = 0; y3 < 8; ++y3, i += 8) { - p1 = &rowBuf[cc][y2+y3][x1+x2]; - p1[0] = data2[i]; - p1[1] = data2[i+1]; - p1[2] = data2[i+2]; - p1[3] = data2[i+3]; - p1[4] = data2[i+4]; - p1[5] = data2[i+5]; - p1[6] = data2[i+6]; - p1[7] = data2[i+7]; - } - } else if (hSub == 2 && vSub == 2) { - for (y3 = 0, i = 0; y3 < 16; y3 += 2, i += 8) { - p1 = &rowBuf[cc][y2+y3][x1+x2]; - p2 = &rowBuf[cc][y2+y3+1][x1+x2]; - p1[0] = p1[1] = p2[0] = p2[1] = data2[i]; - p1[2] = p1[3] = p2[2] = p2[3] = data2[i+1]; - p1[4] = p1[5] = p2[4] = p2[5] = data2[i+2]; - p1[6] = p1[7] = p2[6] = p2[7] = data2[i+3]; - p1[8] = p1[9] = p2[8] = p2[9] = data2[i+4]; - p1[10] = p1[11] = p2[10] = p2[11] = data2[i+5]; - p1[12] = p1[13] = p2[12] = p2[13] = data2[i+6]; - p1[14] = p1[15] = p2[14] = p2[15] = data2[i+7]; - } - } else { - i = 0; - for (y3 = 0, y4 = 0; y3 < 8; ++y3, y4 += vSub) { - for (x3 = 0, x4 = 0; x3 < 8; ++x3, x4 += hSub) { - for (y5 = 0; y5 < vSub; ++y5) - for (x5 = 0; x5 < hSub; ++x5) - rowBuf[cc][y2+y4+y5][x1+x2+x4+x5] = data2[i]; - ++i; - } - } - } - } - } - } - --restartCtr; - - // color space conversion - if (colorXform) { - // convert YCbCr to RGB - if (numComps == 3) { - for (y2 = 0; y2 < mcuHeight; ++y2) { - for (x2 = 0; x2 < mcuWidth; ++x2) { - pY = rowBuf[0][y2][x1+x2]; - pCb = rowBuf[1][y2][x1+x2] - 128; - pCr = rowBuf[2][y2][x1+x2] - 128; - pR = ((pY << 16) + dctCrToR * pCr + 32768) >> 16; - rowBuf[0][y2][x1+x2] = dctClip[dctClipOffset + pR]; - pG = ((pY << 16) + dctCbToG * pCb + dctCrToG * pCr + 32768) >> 16; - rowBuf[1][y2][x1+x2] = dctClip[dctClipOffset + pG]; - pB = ((pY << 16) + dctCbToB * pCb + 32768) >> 16; - rowBuf[2][y2][x1+x2] = dctClip[dctClipOffset + pB]; - } - } - // convert YCbCrK to CMYK (K is passed through unchanged) - } else if (numComps == 4) { - for (y2 = 0; y2 < mcuHeight; ++y2) { - for (x2 = 0; x2 < mcuWidth; ++x2) { - pY = rowBuf[0][y2][x1+x2]; - pCb = rowBuf[1][y2][x1+x2] - 128; - pCr = rowBuf[2][y2][x1+x2] - 128; - pR = ((pY << 16) + dctCrToR * pCr + 32768) >> 16; - rowBuf[0][y2][x1+x2] = 255 - dctClip[dctClipOffset + pR]; - pG = ((pY << 16) + dctCbToG * pCb + dctCrToG * pCr + 32768) >> 16; - rowBuf[1][y2][x1+x2] = 255 - dctClip[dctClipOffset + pG]; - pB = ((pY << 16) + dctCbToB * pCb + 32768) >> 16; - rowBuf[2][y2][x1+x2] = 255 - dctClip[dctClipOffset + pB]; - } - } - } - } - } - return gTrue; -} - -// Read one scan from a progressive or non-interleaved JPEG stream. -void DCTStream::readScan() { - int data[64]; - int x1, y1, dx1, dy1, x2, y2, y3, cc, i; - int h, v, horiz, vert, vSub; - int *p1; - int c; - - if (scanInfo.numComps == 1) { - for (cc = 0; cc < numComps; ++cc) { - if (scanInfo.comp[cc]) { - break; - } - } - dx1 = mcuWidth / compInfo[cc].hSample; - dy1 = mcuHeight / compInfo[cc].vSample; - } else { - dx1 = mcuWidth; - dy1 = mcuHeight; - } - - for (y1 = 0; y1 < height; y1 += dy1) { - for (x1 = 0; x1 < width; x1 += dx1) { - - // deal with restart marker - if (restartInterval > 0 && restartCtr == 0) { - c = readMarker(); - if (c != restartMarker) { - error(errSyntaxError, getPos(), - "Bad DCT data: incorrect restart marker"); - return; - } - if (++restartMarker == 0xd8) { - restartMarker = 0xd0; - } - restart(); - } - - // read one MCU - for (cc = 0; cc < numComps; ++cc) { - if (!scanInfo.comp[cc]) { - continue; - } - - h = compInfo[cc].hSample; - v = compInfo[cc].vSample; - horiz = mcuWidth / h; - vert = mcuHeight / v; - vSub = vert / 8; - for (y2 = 0; y2 < dy1; y2 += vert) { - for (x2 = 0; x2 < dx1; x2 += horiz) { - - // pull out the current values - p1 = &frameBuf[cc][(y1+y2) * bufWidth + (x1+x2)]; - for (y3 = 0, i = 0; y3 < 8; ++y3, i += 8) { - data[i] = p1[0]; - data[i+1] = p1[1]; - data[i+2] = p1[2]; - data[i+3] = p1[3]; - data[i+4] = p1[4]; - data[i+5] = p1[5]; - data[i+6] = p1[6]; - data[i+7] = p1[7]; - p1 += bufWidth * vSub; - } - - // read one data unit - if (progressive) { - if (!readProgressiveDataUnit( - &dcHuffTables[scanInfo.dcHuffTable[cc]], - &acHuffTables[scanInfo.acHuffTable[cc]], - &compInfo[cc].prevDC, - data)) { - return; - } - } else { - if (!readDataUnit(&dcHuffTables[scanInfo.dcHuffTable[cc]], - &acHuffTables[scanInfo.acHuffTable[cc]], - &compInfo[cc].prevDC, - data)) { - return; - } - } - - // add the data unit into frameBuf - p1 = &frameBuf[cc][(y1+y2) * bufWidth + (x1+x2)]; - for (y3 = 0, i = 0; y3 < 8; ++y3, i += 8) { - p1[0] = data[i]; - p1[1] = data[i+1]; - p1[2] = data[i+2]; - p1[3] = data[i+3]; - p1[4] = data[i+4]; - p1[5] = data[i+5]; - p1[6] = data[i+6]; - p1[7] = data[i+7]; - p1 += bufWidth * vSub; - } - } - } - } - --restartCtr; - } - } -} - -// Read one data unit from a sequential JPEG stream. -GBool DCTStream::readDataUnit(DCTHuffTable *dcHuffTable, - DCTHuffTable *acHuffTable, - int *prevDC, int data[64]) { - int run, size, amp; - int c; - int i, j; - - if ((size = readHuffSym(dcHuffTable)) == 9999) { - return gFalse; - } - if (size > 0) { - if ((amp = readAmp(size)) == 9999) { - return gFalse; - } - } else { - amp = 0; - } - data[0] = *prevDC += amp; - for (i = 1; i < 64; ++i) { - data[i] = 0; - } - i = 1; - while (i < 64) { - run = 0; - while ((c = readHuffSym(acHuffTable)) == 0xf0 && run < 0x30) { - run += 0x10; - } - if (c == 9999) { - return gFalse; - } - if (c == 0x00) { - break; - } else { - run += (c >> 4) & 0x0f; - size = c & 0x0f; - amp = readAmp(size); - if (amp == 9999) { - return gFalse; - } - i += run; - if (i < 64) { - j = dctZigZag[i++]; - data[j] = amp; - } - } - } - return gTrue; -} - -// Read one data unit from a sequential JPEG stream. -GBool DCTStream::readProgressiveDataUnit(DCTHuffTable *dcHuffTable, - DCTHuffTable *acHuffTable, - int *prevDC, int data[64]) { - int run, size, amp, bit, c; - int i, j, k; - - // get the DC coefficient - i = scanInfo.firstCoeff; - if (i == 0) { - if (scanInfo.ah == 0) { - if ((size = readHuffSym(dcHuffTable)) == 9999) { - return gFalse; - } - if (size > 0) { - if ((amp = readAmp(size)) == 9999) { - return gFalse; - } - } else { - amp = 0; - } - data[0] += (*prevDC += amp) << scanInfo.al; - } else { - if ((bit = readBit()) == 9999) { - return gFalse; - } - data[0] += bit << scanInfo.al; - } - ++i; - } - if (scanInfo.lastCoeff == 0) { - return gTrue; - } - - // check for an EOB run - if (eobRun > 0) { - while (i <= scanInfo.lastCoeff) { - j = dctZigZag[i++]; - if (data[j] != 0) { - if ((bit = readBit()) == EOF) { - return gFalse; - } - if (bit) { - data[j] += 1 << scanInfo.al; - } - } - } - --eobRun; - return gTrue; - } - - // read the AC coefficients - while (i <= scanInfo.lastCoeff) { - if ((c = readHuffSym(acHuffTable)) == 9999) { - return gFalse; - } - - // ZRL - if (c == 0xf0) { - k = 0; - while (k < 16 && i <= scanInfo.lastCoeff) { - j = dctZigZag[i++]; - if (data[j] == 0) { - ++k; - } else { - if ((bit = readBit()) == EOF) { - return gFalse; - } - if (bit) { - data[j] += 1 << scanInfo.al; - } - } - } - - // EOB run - } else if ((c & 0x0f) == 0x00) { - j = c >> 4; - eobRun = 0; - for (k = 0; k < j; ++k) { - if ((bit = readBit()) == EOF) { - return gFalse; - } - eobRun = (eobRun << 1) | bit; - } - eobRun += 1 << j; - while (i <= scanInfo.lastCoeff) { - j = dctZigZag[i++]; - if (data[j] != 0) { - if ((bit = readBit()) == EOF) { - return gFalse; - } - if (bit) { - data[j] += 1 << scanInfo.al; - } - } - } - --eobRun; - break; - - // zero run and one AC coefficient - } else { - run = (c >> 4) & 0x0f; - size = c & 0x0f; - if ((amp = readAmp(size)) == 9999) { - return gFalse; - } - j = 0; // make gcc happy - for (k = 0; k <= run && i <= scanInfo.lastCoeff; ++k) { - j = dctZigZag[i++]; - while (data[j] != 0 && i <= scanInfo.lastCoeff) { - if ((bit = readBit()) == EOF) { - return gFalse; - } - if (bit) { - data[j] += 1 << scanInfo.al; - } - j = dctZigZag[i++]; - } - } - data[j] = amp << scanInfo.al; - } - } - - return gTrue; -} - -// Decode a progressive JPEG image. -void DCTStream::decodeImage() { - int dataIn[64]; - Guchar dataOut[64]; - Gushort *quantTable; - int pY, pCb, pCr, pR, pG, pB; - int x1, y1, x2, y2, x3, y3, x4, y4, x5, y5, cc, i; - int h, v, horiz, vert, hSub, vSub; - int *p0, *p1, *p2; - - for (y1 = 0; y1 < bufHeight; y1 += mcuHeight) { - for (x1 = 0; x1 < bufWidth; x1 += mcuWidth) { - for (cc = 0; cc < numComps; ++cc) { - quantTable = quantTables[compInfo[cc].quantTable]; - h = compInfo[cc].hSample; - v = compInfo[cc].vSample; - horiz = mcuWidth / h; - vert = mcuHeight / v; - hSub = horiz / 8; - vSub = vert / 8; - for (y2 = 0; y2 < mcuHeight; y2 += vert) { - for (x2 = 0; x2 < mcuWidth; x2 += horiz) { - - // pull out the coded data unit - p1 = &frameBuf[cc][(y1+y2) * bufWidth + (x1+x2)]; - for (y3 = 0, i = 0; y3 < 8; ++y3, i += 8) { - dataIn[i] = p1[0]; - dataIn[i+1] = p1[1]; - dataIn[i+2] = p1[2]; - dataIn[i+3] = p1[3]; - dataIn[i+4] = p1[4]; - dataIn[i+5] = p1[5]; - dataIn[i+6] = p1[6]; - dataIn[i+7] = p1[7]; - p1 += bufWidth * vSub; - } - - // transform - transformDataUnit(quantTable, dataIn, dataOut); - - // store back into frameBuf, doing replication for - // subsampled components - p1 = &frameBuf[cc][(y1+y2) * bufWidth + (x1+x2)]; - if (hSub == 1 && vSub == 1) { - for (y3 = 0, i = 0; y3 < 8; ++y3, i += 8) { - p1[0] = dataOut[i] & 0xff; - p1[1] = dataOut[i+1] & 0xff; - p1[2] = dataOut[i+2] & 0xff; - p1[3] = dataOut[i+3] & 0xff; - p1[4] = dataOut[i+4] & 0xff; - p1[5] = dataOut[i+5] & 0xff; - p1[6] = dataOut[i+6] & 0xff; - p1[7] = dataOut[i+7] & 0xff; - p1 += bufWidth; - } - } else if (hSub == 2 && vSub == 2) { - p2 = p1 + bufWidth; - for (y3 = 0, i = 0; y3 < 16; y3 += 2, i += 8) { - p1[0] = p1[1] = p2[0] = p2[1] = dataOut[i] & 0xff; - p1[2] = p1[3] = p2[2] = p2[3] = dataOut[i+1] & 0xff; - p1[4] = p1[5] = p2[4] = p2[5] = dataOut[i+2] & 0xff; - p1[6] = p1[7] = p2[6] = p2[7] = dataOut[i+3] & 0xff; - p1[8] = p1[9] = p2[8] = p2[9] = dataOut[i+4] & 0xff; - p1[10] = p1[11] = p2[10] = p2[11] = dataOut[i+5] & 0xff; - p1[12] = p1[13] = p2[12] = p2[13] = dataOut[i+6] & 0xff; - p1[14] = p1[15] = p2[14] = p2[15] = dataOut[i+7] & 0xff; - p1 += bufWidth * 2; - p2 += bufWidth * 2; - } - } else { - i = 0; - for (y3 = 0, y4 = 0; y3 < 8; ++y3, y4 += vSub) { - for (x3 = 0, x4 = 0; x3 < 8; ++x3, x4 += hSub) { - p2 = p1 + x4; - for (y5 = 0; y5 < vSub; ++y5) { - for (x5 = 0; x5 < hSub; ++x5) { - p2[x5] = dataOut[i] & 0xff; - } - p2 += bufWidth; - } - ++i; - } - p1 += bufWidth * vSub; - } - } - } - } - } - - // color space conversion - if (colorXform) { - // convert YCbCr to RGB - if (numComps == 3) { - for (y2 = 0; y2 < mcuHeight; ++y2) { - p0 = &frameBuf[0][(y1+y2) * bufWidth + x1]; - p1 = &frameBuf[1][(y1+y2) * bufWidth + x1]; - p2 = &frameBuf[2][(y1+y2) * bufWidth + x1]; - for (x2 = 0; x2 < mcuWidth; ++x2) { - pY = *p0; - pCb = *p1 - 128; - pCr = *p2 - 128; - pR = ((pY << 16) + dctCrToR * pCr + 32768) >> 16; - *p0++ = dctClip[dctClipOffset + pR]; - pG = ((pY << 16) + dctCbToG * pCb + dctCrToG * pCr + - 32768) >> 16; - *p1++ = dctClip[dctClipOffset + pG]; - pB = ((pY << 16) + dctCbToB * pCb + 32768) >> 16; - *p2++ = dctClip[dctClipOffset + pB]; - } - } - // convert YCbCrK to CMYK (K is passed through unchanged) - } else if (numComps == 4) { - for (y2 = 0; y2 < mcuHeight; ++y2) { - p0 = &frameBuf[0][(y1+y2) * bufWidth + x1]; - p1 = &frameBuf[1][(y1+y2) * bufWidth + x1]; - p2 = &frameBuf[2][(y1+y2) * bufWidth + x1]; - for (x2 = 0; x2 < mcuWidth; ++x2) { - pY = *p0; - pCb = *p1 - 128; - pCr = *p2 - 128; - pR = ((pY << 16) + dctCrToR * pCr + 32768) >> 16; - *p0++ = 255 - dctClip[dctClipOffset + pR]; - pG = ((pY << 16) + dctCbToG * pCb + dctCrToG * pCr + - 32768) >> 16; - *p1++ = 255 - dctClip[dctClipOffset + pG]; - pB = ((pY << 16) + dctCbToB * pCb + 32768) >> 16; - *p2++ = 255 - dctClip[dctClipOffset + pB]; - } - } - } - } - } - } -} - -// Transform one data unit -- this performs the dequantization and -// IDCT steps. This IDCT algorithm is taken from: -// Christoph Loeffler, Adriaan Ligtenberg, George S. Moschytz, -// "Practical Fast 1-D DCT Algorithms with 11 Multiplications", -// IEEE Intl. Conf. on Acoustics, Speech & Signal Processing, 1989, -// 988-991. -// The stage numbers mentioned in the comments refer to Figure 1 in this -// paper. -void DCTStream::transformDataUnit(Gushort *quantTable, - int dataIn[64], Guchar dataOut[64]) { - int v0, v1, v2, v3, v4, v5, v6, v7, t; - int *p; - int i; - - // dequant - for (i = 0; i < 64; ++i) { - dataIn[i] *= quantTable[i]; - } - - // inverse DCT on rows - for (i = 0; i < 64; i += 8) { - p = dataIn + i; - - // check for all-zero AC coefficients - if (p[1] == 0 && p[2] == 0 && p[3] == 0 && - p[4] == 0 && p[5] == 0 && p[6] == 0 && p[7] == 0) { - t = (dctSqrt2 * p[0] + 512) >> 10; - p[0] = t; - p[1] = t; - p[2] = t; - p[3] = t; - p[4] = t; - p[5] = t; - p[6] = t; - p[7] = t; - continue; - } - - // stage 4 - v0 = (dctSqrt2 * p[0] + 128) >> 8; - v1 = (dctSqrt2 * p[4] + 128) >> 8; - v2 = p[2]; - v3 = p[6]; - v4 = (dctSqrt1d2 * (p[1] - p[7]) + 128) >> 8; - v7 = (dctSqrt1d2 * (p[1] + p[7]) + 128) >> 8; - v5 = p[3] << 4; - v6 = p[5] << 4; - - // stage 3 - t = (v0 - v1+ 1) >> 1; - v0 = (v0 + v1 + 1) >> 1; - v1 = t; - t = (v2 * dctSin6 + v3 * dctCos6 + 128) >> 8; - v2 = (v2 * dctCos6 - v3 * dctSin6 + 128) >> 8; - v3 = t; - t = (v4 - v6 + 1) >> 1; - v4 = (v4 + v6 + 1) >> 1; - v6 = t; - t = (v7 + v5 + 1) >> 1; - v5 = (v7 - v5 + 1) >> 1; - v7 = t; - - // stage 2 - t = (v0 - v3 + 1) >> 1; - v0 = (v0 + v3 + 1) >> 1; - v3 = t; - t = (v1 - v2 + 1) >> 1; - v1 = (v1 + v2 + 1) >> 1; - v2 = t; - t = (v4 * dctSin3 + v7 * dctCos3 + 2048) >> 12; - v4 = (v4 * dctCos3 - v7 * dctSin3 + 2048) >> 12; - v7 = t; - t = (v5 * dctSin1 + v6 * dctCos1 + 2048) >> 12; - v5 = (v5 * dctCos1 - v6 * dctSin1 + 2048) >> 12; - v6 = t; - - // stage 1 - p[0] = v0 + v7; - p[7] = v0 - v7; - p[1] = v1 + v6; - p[6] = v1 - v6; - p[2] = v2 + v5; - p[5] = v2 - v5; - p[3] = v3 + v4; - p[4] = v3 - v4; - } - - // inverse DCT on columns - for (i = 0; i < 8; ++i) { - p = dataIn + i; - - // check for all-zero AC coefficients - if (p[1*8] == 0 && p[2*8] == 0 && p[3*8] == 0 && - p[4*8] == 0 && p[5*8] == 0 && p[6*8] == 0 && p[7*8] == 0) { - t = (dctSqrt2 * dataIn[i+0] + 8192) >> 14; - p[0*8] = t; - p[1*8] = t; - p[2*8] = t; - p[3*8] = t; - p[4*8] = t; - p[5*8] = t; - p[6*8] = t; - p[7*8] = t; - continue; - } - - // stage 4 - v0 = (dctSqrt2 * p[0*8] + 2048) >> 12; - v1 = (dctSqrt2 * p[4*8] + 2048) >> 12; - v2 = p[2*8]; - v3 = p[6*8]; - v4 = (dctSqrt1d2 * (p[1*8] - p[7*8]) + 2048) >> 12; - v7 = (dctSqrt1d2 * (p[1*8] + p[7*8]) + 2048) >> 12; - v5 = p[3*8]; - v6 = p[5*8]; - - // stage 3 - t = (v0 - v1 + 1) >> 1; - v0 = (v0 + v1 + 1) >> 1; - v1 = t; - t = (v2 * dctSin6 + v3 * dctCos6 + 2048) >> 12; - v2 = (v2 * dctCos6 - v3 * dctSin6 + 2048) >> 12; - v3 = t; - t = (v4 - v6 + 1) >> 1; - v4 = (v4 + v6 + 1) >> 1; - v6 = t; - t = (v7 + v5 + 1) >> 1; - v5 = (v7 - v5 + 1) >> 1; - v7 = t; - - // stage 2 - t = (v0 - v3 + 1) >> 1; - v0 = (v0 + v3 + 1) >> 1; - v3 = t; - t = (v1 - v2 + 1) >> 1; - v1 = (v1 + v2 + 1) >> 1; - v2 = t; - t = (v4 * dctSin3 + v7 * dctCos3 + 2048) >> 12; - v4 = (v4 * dctCos3 - v7 * dctSin3 + 2048) >> 12; - v7 = t; - t = (v5 * dctSin1 + v6 * dctCos1 + 2048) >> 12; - v5 = (v5 * dctCos1 - v6 * dctSin1 + 2048) >> 12; - v6 = t; - - // stage 1 - p[0*8] = v0 + v7; - p[7*8] = v0 - v7; - p[1*8] = v1 + v6; - p[6*8] = v1 - v6; - p[2*8] = v2 + v5; - p[5*8] = v2 - v5; - p[3*8] = v3 + v4; - p[4*8] = v3 - v4; - } - - // convert to 8-bit integers - for (i = 0; i < 64; ++i) { - const int ix = dctClipOffset + 128 + ((dataIn[i] + 8) >> 4); - if (unlikely(ix < 0 || ix >= dctClipLength)) { - dataOut[i] = 0; - } else { - dataOut[i] = dctClip[ix]; - } - } -} - -int DCTStream::readHuffSym(DCTHuffTable *table) { - Gushort code; - int bit; - int codeBits; - - code = 0; - codeBits = 0; - do { - // add a bit to the code - if ((bit = readBit()) == EOF) { - return 9999; - } - code = (code << 1) + bit; - ++codeBits; - - // look up code - if (code < table->firstCode[codeBits]) { - break; - } - if (code - table->firstCode[codeBits] < table->numCodes[codeBits]) { - code -= table->firstCode[codeBits]; - return table->sym[table->firstSym[codeBits] + code]; - } - } while (codeBits < 16); - - error(errSyntaxError, getPos(), "Bad Huffman code in DCT stream"); - return 9999; -} - -int DCTStream::readAmp(int size) { - int amp, bit; - int bits; - - amp = 0; - for (bits = 0; bits < size; ++bits) { - if ((bit = readBit()) == EOF) - return 9999; - amp = (amp << 1) + bit; - } - if (amp < (1 << (size - 1))) - amp -= (1 << size) - 1; - return amp; -} - -int DCTStream::readBit() { - int bit; - int c, c2; - - if (inputBits == 0) { - if ((c = str->getChar()) == EOF) - return EOF; - if (c == 0xff) { - do { - c2 = str->getChar(); - } while (c2 == 0xff); - if (c2 != 0x00) { - error(errSyntaxError, getPos(), "Bad DCT data: missing 00 after ff"); - return EOF; - } - } - inputBuf = c; - inputBits = 8; - } - bit = (inputBuf >> (inputBits - 1)) & 1; - --inputBits; - return bit; -} - -GBool DCTStream::readHeader() { - GBool doScan; - int n; - int c = 0; - int i; - - // read headers - doScan = gFalse; - while (!doScan) { - c = readMarker(); - switch (c) { - case 0xc0: // SOF0 (sequential) - case 0xc1: // SOF1 (extended sequential) - if (!readBaselineSOF()) { - return gFalse; - } - break; - case 0xc2: // SOF2 (progressive) - if (!readProgressiveSOF()) { - return gFalse; - } - break; - case 0xc4: // DHT - if (!readHuffmanTables()) { - return gFalse; - } - break; - case 0xd8: // SOI - break; - case 0xd9: // EOI - return gFalse; - case 0xda: // SOS - if (!readScanInfo()) { - return gFalse; - } - doScan = gTrue; - break; - case 0xdb: // DQT - if (!readQuantTables()) { - return gFalse; - } - break; - case 0xdd: // DRI - if (!readRestartInterval()) { - return gFalse; - } - break; - case 0xe0: // APP0 - if (!readJFIFMarker()) { - return gFalse; - } - break; - case 0xee: // APP14 - if (!readAdobeMarker()) { - return gFalse; - } - break; - case EOF: - error(errSyntaxError, getPos(), "Bad DCT header"); - return gFalse; - default: - // skip APPn / COM / etc. - if (c >= 0xe0) { - n = read16() - 2; - for (i = 0; i < n; ++i) { - str->getChar(); - } - } else { - error(errSyntaxError, getPos(), "Unknown DCT marker <{0:02x}>", c); - return gFalse; - } - break; - } - } - - return gTrue; -} - -GBool DCTStream::readBaselineSOF() { - int length; - int prec; - int i; - int c; - - length = read16(); - prec = str->getChar(); - height = read16(); - width = read16(); - numComps = str->getChar(); - if (numComps <= 0 || numComps > 4) { - error(errSyntaxError, getPos(), "Bad number of components in DCT stream"); - numComps = 0; - return gFalse; - } - if (prec != 8) { - error(errSyntaxError, getPos(), "Bad DCT precision {0:d}", prec); - return gFalse; - } - for (i = 0; i < numComps; ++i) { - compInfo[i].id = str->getChar(); - c = str->getChar(); - compInfo[i].hSample = (c >> 4) & 0x0f; - compInfo[i].vSample = c & 0x0f; - compInfo[i].quantTable = str->getChar(); - if (compInfo[i].hSample < 1 || compInfo[i].hSample > 4 || - compInfo[i].vSample < 1 || compInfo[i].vSample > 4) { - error(errSyntaxError, getPos(), "Bad DCT sampling factor"); - return gFalse; - } - if (compInfo[i].quantTable < 0 || compInfo[i].quantTable > 3) { - error(errSyntaxError, getPos(), "Bad DCT quant table selector"); - return gFalse; - } - } - progressive = gFalse; - return gTrue; -} - -GBool DCTStream::readProgressiveSOF() { - int length; - int prec; - int i; - int c; - - length = read16(); - prec = str->getChar(); - height = read16(); - width = read16(); - numComps = str->getChar(); - - if (numComps <= 0 || numComps > 4) { - error(errSyntaxError, getPos(), "Bad number of components in DCT stream"); - numComps = 0; - return gFalse; - } - if (prec != 8) { - error(errSyntaxError, getPos(), "Bad DCT precision {0:d}", prec); - return gFalse; - } - for (i = 0; i < numComps; ++i) { - compInfo[i].id = str->getChar(); - c = str->getChar(); - compInfo[i].hSample = (c >> 4) & 0x0f; - compInfo[i].vSample = c & 0x0f; - compInfo[i].quantTable = str->getChar(); - if (compInfo[i].hSample < 1 || compInfo[i].hSample > 4 || - compInfo[i].vSample < 1 || compInfo[i].vSample > 4) { - error(errSyntaxError, getPos(), "Bad DCT sampling factor"); - return gFalse; - } - if (compInfo[i].quantTable < 0 || compInfo[i].quantTable > 3) { - error(errSyntaxError, getPos(), "Bad DCT quant table selector"); - return gFalse; - } - } - progressive = gTrue; - return gTrue; -} - -GBool DCTStream::readScanInfo() { - int length; - int id, c; - int i, j; - - length = read16() - 2; - scanInfo.numComps = str->getChar(); - if (scanInfo.numComps <= 0 || scanInfo.numComps > 4) { - error(errSyntaxError, getPos(), "Bad number of components in DCT stream"); - scanInfo.numComps = 0; - return gFalse; - } - --length; - if (length != 2 * scanInfo.numComps + 3) { - error(errSyntaxError, getPos(), "Bad DCT scan info block"); - return gFalse; - } - interleaved = scanInfo.numComps == numComps; - for (j = 0; j < numComps; ++j) { - scanInfo.comp[j] = gFalse; - scanInfo.dcHuffTable[j] = 0; - scanInfo.acHuffTable[j] = 0; - } - for (i = 0; i < scanInfo.numComps; ++i) { - id = str->getChar(); - // some (broken) DCT streams reuse ID numbers, but at least they - // keep the components in order, so we check compInfo[i] first to - // work around the problem - if (id == compInfo[i].id) { - j = i; - } else { - for (j = 0; j < numComps; ++j) { - if (id == compInfo[j].id) { - break; - } - } - if (j == numComps) { - error(errSyntaxError, getPos(), - "Bad DCT component ID in scan info block"); - return gFalse; - } - } - scanInfo.comp[j] = gTrue; - c = str->getChar(); - scanInfo.dcHuffTable[j] = (c >> 4) & 0x0f; - scanInfo.acHuffTable[j] = c & 0x0f; - } - scanInfo.firstCoeff = str->getChar(); - scanInfo.lastCoeff = str->getChar(); - if (scanInfo.firstCoeff < 0 || scanInfo.lastCoeff > 63 || - scanInfo.firstCoeff > scanInfo.lastCoeff) { - error(errSyntaxError, getPos(), - "Bad DCT coefficient numbers in scan info block"); - return gFalse; - } - c = str->getChar(); - scanInfo.ah = (c >> 4) & 0x0f; - scanInfo.al = c & 0x0f; - return gTrue; -} - -GBool DCTStream::readQuantTables() { - int length, prec, i, index; - - length = read16() - 2; - while (length > 0) { - index = str->getChar(); - prec = (index >> 4) & 0x0f; - index &= 0x0f; - if (prec > 1 || index >= 4) { - error(errSyntaxError, getPos(), "Bad DCT quantization table"); - return gFalse; - } - if (index == numQuantTables) { - numQuantTables = index + 1; - } - for (i = 0; i < 64; ++i) { - if (prec) { - quantTables[index][dctZigZag[i]] = read16(); - } else { - quantTables[index][dctZigZag[i]] = str->getChar(); - } - } - if (prec) { - length -= 129; - } else { - length -= 65; - } - } - return gTrue; -} - -GBool DCTStream::readHuffmanTables() { - DCTHuffTable *tbl; - int length; - int index; - Gushort code; - Guchar sym; - int i; - int c; - - length = read16() - 2; - while (length > 0) { - index = str->getChar(); - --length; - if ((index & 0x0f) >= 4) { - error(errSyntaxError, getPos(), "Bad DCT Huffman table"); - return gFalse; - } - if (index & 0x10) { - index &= 0x0f; - if (index >= numACHuffTables) - numACHuffTables = index+1; - tbl = &acHuffTables[index]; - } else { - index &= 0x0f; - if (index >= numDCHuffTables) - numDCHuffTables = index+1; - tbl = &dcHuffTables[index]; - } - sym = 0; - code = 0; - for (i = 1; i <= 16; ++i) { - c = str->getChar(); - tbl->firstSym[i] = sym; - tbl->firstCode[i] = code; - tbl->numCodes[i] = c; - sym += c; - code = (code + c) << 1; - } - length -= 16; - for (i = 0; i < sym; ++i) - tbl->sym[i] = str->getChar(); - length -= sym; - } - return gTrue; -} - -GBool DCTStream::readRestartInterval() { - int length; - - length = read16(); - if (length != 4) { - error(errSyntaxError, getPos(), "Bad DCT restart interval"); - return gFalse; - } - restartInterval = read16(); - return gTrue; -} - -GBool DCTStream::readJFIFMarker() { - int length, i; - char buf[5]; - int c; - - length = read16(); - length -= 2; - if (length >= 5) { - for (i = 0; i < 5; ++i) { - if ((c = str->getChar()) == EOF) { - error(errSyntaxError, getPos(), "Bad DCT APP0 marker"); - return gFalse; - } - buf[i] = c; - } - length -= 5; - if (!memcmp(buf, "JFIF\0", 5)) { - gotJFIFMarker = gTrue; - } - } - while (length > 0) { - if (str->getChar() == EOF) { - error(errSyntaxError, getPos(), "Bad DCT APP0 marker"); - return gFalse; - } - --length; - } - return gTrue; -} - -GBool DCTStream::readAdobeMarker() { - int length, i; - char buf[12]; - int c; - - length = read16(); - if (length < 14) { - goto err; - } - for (i = 0; i < 12; ++i) { - if ((c = str->getChar()) == EOF) { - goto err; - } - buf[i] = c; - } - if (strncmp(buf, "Adobe", 5)) { - goto err; - } - colorXform = buf[11]; - gotAdobeMarker = gTrue; - for (i = 14; i < length; ++i) { - if (str->getChar() == EOF) { - goto err; - } - } - return gTrue; - - err: - error(errSyntaxError, getPos(), "Bad DCT Adobe APP14 marker"); - return gFalse; -} - -GBool DCTStream::readTrailer() { - int c; - - c = readMarker(); - if (c != 0xd9) { // EOI - error(errSyntaxError, getPos(), "Bad DCT trailer"); - return gFalse; - } - return gTrue; -} - -int DCTStream::readMarker() { - int c; - - do { - do { - c = str->getChar(); - } while (c != 0xff && c != EOF); - while (c == 0xff) { - c = str->getChar(); - } - } while (c == 0x00); - return c; -} - -int DCTStream::read16() { - int c1, c2; - - if ((c1 = str->getChar()) == EOF) - return EOF; - if ((c2 = str->getChar()) == EOF) - return EOF; - return (c1 << 8) + c2; -} - -GooString *DCTStream::getPSFilter(int psLevel, const char *indent) { - GooString *s; - - if (psLevel < 2) { - return NULL; - } - if (!(s = str->getPSFilter(psLevel, indent))) { - return NULL; - } - s->append(indent)->append("<< >> /DCTDecode filter\n"); - return s; -} - -GBool DCTStream::isBinary(GBool last) { - return str->isBinary(gTrue); -} - -#endif - -#ifndef ENABLE_ZLIB_UNCOMPRESS -//------------------------------------------------------------------------ -// FlateStream -//------------------------------------------------------------------------ - -int FlateStream::codeLenCodeMap[flateMaxCodeLenCodes] = { - 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 -}; - -FlateDecode FlateStream::lengthDecode[flateMaxLitCodes-257] = { - {0, 3}, - {0, 4}, - {0, 5}, - {0, 6}, - {0, 7}, - {0, 8}, - {0, 9}, - {0, 10}, - {1, 11}, - {1, 13}, - {1, 15}, - {1, 17}, - {2, 19}, - {2, 23}, - {2, 27}, - {2, 31}, - {3, 35}, - {3, 43}, - {3, 51}, - {3, 59}, - {4, 67}, - {4, 83}, - {4, 99}, - {4, 115}, - {5, 131}, - {5, 163}, - {5, 195}, - {5, 227}, - {0, 258}, - {0, 258}, - {0, 258} -}; - -FlateDecode FlateStream::distDecode[flateMaxDistCodes] = { - { 0, 1}, - { 0, 2}, - { 0, 3}, - { 0, 4}, - { 1, 5}, - { 1, 7}, - { 2, 9}, - { 2, 13}, - { 3, 17}, - { 3, 25}, - { 4, 33}, - { 4, 49}, - { 5, 65}, - { 5, 97}, - { 6, 129}, - { 6, 193}, - { 7, 257}, - { 7, 385}, - { 8, 513}, - { 8, 769}, - { 9, 1025}, - { 9, 1537}, - {10, 2049}, - {10, 3073}, - {11, 4097}, - {11, 6145}, - {12, 8193}, - {12, 12289}, - {13, 16385}, - {13, 24577} -}; - -static FlateCode flateFixedLitCodeTabCodes[512] = { - {7, 0x0100}, - {8, 0x0050}, - {8, 0x0010}, - {8, 0x0118}, - {7, 0x0110}, - {8, 0x0070}, - {8, 0x0030}, - {9, 0x00c0}, - {7, 0x0108}, - {8, 0x0060}, - {8, 0x0020}, - {9, 0x00a0}, - {8, 0x0000}, - {8, 0x0080}, - {8, 0x0040}, - {9, 0x00e0}, - {7, 0x0104}, - {8, 0x0058}, - {8, 0x0018}, - {9, 0x0090}, - {7, 0x0114}, - {8, 0x0078}, - {8, 0x0038}, - {9, 0x00d0}, - {7, 0x010c}, - {8, 0x0068}, - {8, 0x0028}, - {9, 0x00b0}, - {8, 0x0008}, - {8, 0x0088}, - {8, 0x0048}, - {9, 0x00f0}, - {7, 0x0102}, - {8, 0x0054}, - {8, 0x0014}, - {8, 0x011c}, - {7, 0x0112}, - {8, 0x0074}, - {8, 0x0034}, - {9, 0x00c8}, - {7, 0x010a}, - {8, 0x0064}, - {8, 0x0024}, - {9, 0x00a8}, - {8, 0x0004}, - {8, 0x0084}, - {8, 0x0044}, - {9, 0x00e8}, - {7, 0x0106}, - {8, 0x005c}, - {8, 0x001c}, - {9, 0x0098}, - {7, 0x0116}, - {8, 0x007c}, - {8, 0x003c}, - {9, 0x00d8}, - {7, 0x010e}, - {8, 0x006c}, - {8, 0x002c}, - {9, 0x00b8}, - {8, 0x000c}, - {8, 0x008c}, - {8, 0x004c}, - {9, 0x00f8}, - {7, 0x0101}, - {8, 0x0052}, - {8, 0x0012}, - {8, 0x011a}, - {7, 0x0111}, - {8, 0x0072}, - {8, 0x0032}, - {9, 0x00c4}, - {7, 0x0109}, - {8, 0x0062}, - {8, 0x0022}, - {9, 0x00a4}, - {8, 0x0002}, - {8, 0x0082}, - {8, 0x0042}, - {9, 0x00e4}, - {7, 0x0105}, - {8, 0x005a}, - {8, 0x001a}, - {9, 0x0094}, - {7, 0x0115}, - {8, 0x007a}, - {8, 0x003a}, - {9, 0x00d4}, - {7, 0x010d}, - {8, 0x006a}, - {8, 0x002a}, - {9, 0x00b4}, - {8, 0x000a}, - {8, 0x008a}, - {8, 0x004a}, - {9, 0x00f4}, - {7, 0x0103}, - {8, 0x0056}, - {8, 0x0016}, - {8, 0x011e}, - {7, 0x0113}, - {8, 0x0076}, - {8, 0x0036}, - {9, 0x00cc}, - {7, 0x010b}, - {8, 0x0066}, - {8, 0x0026}, - {9, 0x00ac}, - {8, 0x0006}, - {8, 0x0086}, - {8, 0x0046}, - {9, 0x00ec}, - {7, 0x0107}, - {8, 0x005e}, - {8, 0x001e}, - {9, 0x009c}, - {7, 0x0117}, - {8, 0x007e}, - {8, 0x003e}, - {9, 0x00dc}, - {7, 0x010f}, - {8, 0x006e}, - {8, 0x002e}, - {9, 0x00bc}, - {8, 0x000e}, - {8, 0x008e}, - {8, 0x004e}, - {9, 0x00fc}, - {7, 0x0100}, - {8, 0x0051}, - {8, 0x0011}, - {8, 0x0119}, - {7, 0x0110}, - {8, 0x0071}, - {8, 0x0031}, - {9, 0x00c2}, - {7, 0x0108}, - {8, 0x0061}, - {8, 0x0021}, - {9, 0x00a2}, - {8, 0x0001}, - {8, 0x0081}, - {8, 0x0041}, - {9, 0x00e2}, - {7, 0x0104}, - {8, 0x0059}, - {8, 0x0019}, - {9, 0x0092}, - {7, 0x0114}, - {8, 0x0079}, - {8, 0x0039}, - {9, 0x00d2}, - {7, 0x010c}, - {8, 0x0069}, - {8, 0x0029}, - {9, 0x00b2}, - {8, 0x0009}, - {8, 0x0089}, - {8, 0x0049}, - {9, 0x00f2}, - {7, 0x0102}, - {8, 0x0055}, - {8, 0x0015}, - {8, 0x011d}, - {7, 0x0112}, - {8, 0x0075}, - {8, 0x0035}, - {9, 0x00ca}, - {7, 0x010a}, - {8, 0x0065}, - {8, 0x0025}, - {9, 0x00aa}, - {8, 0x0005}, - {8, 0x0085}, - {8, 0x0045}, - {9, 0x00ea}, - {7, 0x0106}, - {8, 0x005d}, - {8, 0x001d}, - {9, 0x009a}, - {7, 0x0116}, - {8, 0x007d}, - {8, 0x003d}, - {9, 0x00da}, - {7, 0x010e}, - {8, 0x006d}, - {8, 0x002d}, - {9, 0x00ba}, - {8, 0x000d}, - {8, 0x008d}, - {8, 0x004d}, - {9, 0x00fa}, - {7, 0x0101}, - {8, 0x0053}, - {8, 0x0013}, - {8, 0x011b}, - {7, 0x0111}, - {8, 0x0073}, - {8, 0x0033}, - {9, 0x00c6}, - {7, 0x0109}, - {8, 0x0063}, - {8, 0x0023}, - {9, 0x00a6}, - {8, 0x0003}, - {8, 0x0083}, - {8, 0x0043}, - {9, 0x00e6}, - {7, 0x0105}, - {8, 0x005b}, - {8, 0x001b}, - {9, 0x0096}, - {7, 0x0115}, - {8, 0x007b}, - {8, 0x003b}, - {9, 0x00d6}, - {7, 0x010d}, - {8, 0x006b}, - {8, 0x002b}, - {9, 0x00b6}, - {8, 0x000b}, - {8, 0x008b}, - {8, 0x004b}, - {9, 0x00f6}, - {7, 0x0103}, - {8, 0x0057}, - {8, 0x0017}, - {8, 0x011f}, - {7, 0x0113}, - {8, 0x0077}, - {8, 0x0037}, - {9, 0x00ce}, - {7, 0x010b}, - {8, 0x0067}, - {8, 0x0027}, - {9, 0x00ae}, - {8, 0x0007}, - {8, 0x0087}, - {8, 0x0047}, - {9, 0x00ee}, - {7, 0x0107}, - {8, 0x005f}, - {8, 0x001f}, - {9, 0x009e}, - {7, 0x0117}, - {8, 0x007f}, - {8, 0x003f}, - {9, 0x00de}, - {7, 0x010f}, - {8, 0x006f}, - {8, 0x002f}, - {9, 0x00be}, - {8, 0x000f}, - {8, 0x008f}, - {8, 0x004f}, - {9, 0x00fe}, - {7, 0x0100}, - {8, 0x0050}, - {8, 0x0010}, - {8, 0x0118}, - {7, 0x0110}, - {8, 0x0070}, - {8, 0x0030}, - {9, 0x00c1}, - {7, 0x0108}, - {8, 0x0060}, - {8, 0x0020}, - {9, 0x00a1}, - {8, 0x0000}, - {8, 0x0080}, - {8, 0x0040}, - {9, 0x00e1}, - {7, 0x0104}, - {8, 0x0058}, - {8, 0x0018}, - {9, 0x0091}, - {7, 0x0114}, - {8, 0x0078}, - {8, 0x0038}, - {9, 0x00d1}, - {7, 0x010c}, - {8, 0x0068}, - {8, 0x0028}, - {9, 0x00b1}, - {8, 0x0008}, - {8, 0x0088}, - {8, 0x0048}, - {9, 0x00f1}, - {7, 0x0102}, - {8, 0x0054}, - {8, 0x0014}, - {8, 0x011c}, - {7, 0x0112}, - {8, 0x0074}, - {8, 0x0034}, - {9, 0x00c9}, - {7, 0x010a}, - {8, 0x0064}, - {8, 0x0024}, - {9, 0x00a9}, - {8, 0x0004}, - {8, 0x0084}, - {8, 0x0044}, - {9, 0x00e9}, - {7, 0x0106}, - {8, 0x005c}, - {8, 0x001c}, - {9, 0x0099}, - {7, 0x0116}, - {8, 0x007c}, - {8, 0x003c}, - {9, 0x00d9}, - {7, 0x010e}, - {8, 0x006c}, - {8, 0x002c}, - {9, 0x00b9}, - {8, 0x000c}, - {8, 0x008c}, - {8, 0x004c}, - {9, 0x00f9}, - {7, 0x0101}, - {8, 0x0052}, - {8, 0x0012}, - {8, 0x011a}, - {7, 0x0111}, - {8, 0x0072}, - {8, 0x0032}, - {9, 0x00c5}, - {7, 0x0109}, - {8, 0x0062}, - {8, 0x0022}, - {9, 0x00a5}, - {8, 0x0002}, - {8, 0x0082}, - {8, 0x0042}, - {9, 0x00e5}, - {7, 0x0105}, - {8, 0x005a}, - {8, 0x001a}, - {9, 0x0095}, - {7, 0x0115}, - {8, 0x007a}, - {8, 0x003a}, - {9, 0x00d5}, - {7, 0x010d}, - {8, 0x006a}, - {8, 0x002a}, - {9, 0x00b5}, - {8, 0x000a}, - {8, 0x008a}, - {8, 0x004a}, - {9, 0x00f5}, - {7, 0x0103}, - {8, 0x0056}, - {8, 0x0016}, - {8, 0x011e}, - {7, 0x0113}, - {8, 0x0076}, - {8, 0x0036}, - {9, 0x00cd}, - {7, 0x010b}, - {8, 0x0066}, - {8, 0x0026}, - {9, 0x00ad}, - {8, 0x0006}, - {8, 0x0086}, - {8, 0x0046}, - {9, 0x00ed}, - {7, 0x0107}, - {8, 0x005e}, - {8, 0x001e}, - {9, 0x009d}, - {7, 0x0117}, - {8, 0x007e}, - {8, 0x003e}, - {9, 0x00dd}, - {7, 0x010f}, - {8, 0x006e}, - {8, 0x002e}, - {9, 0x00bd}, - {8, 0x000e}, - {8, 0x008e}, - {8, 0x004e}, - {9, 0x00fd}, - {7, 0x0100}, - {8, 0x0051}, - {8, 0x0011}, - {8, 0x0119}, - {7, 0x0110}, - {8, 0x0071}, - {8, 0x0031}, - {9, 0x00c3}, - {7, 0x0108}, - {8, 0x0061}, - {8, 0x0021}, - {9, 0x00a3}, - {8, 0x0001}, - {8, 0x0081}, - {8, 0x0041}, - {9, 0x00e3}, - {7, 0x0104}, - {8, 0x0059}, - {8, 0x0019}, - {9, 0x0093}, - {7, 0x0114}, - {8, 0x0079}, - {8, 0x0039}, - {9, 0x00d3}, - {7, 0x010c}, - {8, 0x0069}, - {8, 0x0029}, - {9, 0x00b3}, - {8, 0x0009}, - {8, 0x0089}, - {8, 0x0049}, - {9, 0x00f3}, - {7, 0x0102}, - {8, 0x0055}, - {8, 0x0015}, - {8, 0x011d}, - {7, 0x0112}, - {8, 0x0075}, - {8, 0x0035}, - {9, 0x00cb}, - {7, 0x010a}, - {8, 0x0065}, - {8, 0x0025}, - {9, 0x00ab}, - {8, 0x0005}, - {8, 0x0085}, - {8, 0x0045}, - {9, 0x00eb}, - {7, 0x0106}, - {8, 0x005d}, - {8, 0x001d}, - {9, 0x009b}, - {7, 0x0116}, - {8, 0x007d}, - {8, 0x003d}, - {9, 0x00db}, - {7, 0x010e}, - {8, 0x006d}, - {8, 0x002d}, - {9, 0x00bb}, - {8, 0x000d}, - {8, 0x008d}, - {8, 0x004d}, - {9, 0x00fb}, - {7, 0x0101}, - {8, 0x0053}, - {8, 0x0013}, - {8, 0x011b}, - {7, 0x0111}, - {8, 0x0073}, - {8, 0x0033}, - {9, 0x00c7}, - {7, 0x0109}, - {8, 0x0063}, - {8, 0x0023}, - {9, 0x00a7}, - {8, 0x0003}, - {8, 0x0083}, - {8, 0x0043}, - {9, 0x00e7}, - {7, 0x0105}, - {8, 0x005b}, - {8, 0x001b}, - {9, 0x0097}, - {7, 0x0115}, - {8, 0x007b}, - {8, 0x003b}, - {9, 0x00d7}, - {7, 0x010d}, - {8, 0x006b}, - {8, 0x002b}, - {9, 0x00b7}, - {8, 0x000b}, - {8, 0x008b}, - {8, 0x004b}, - {9, 0x00f7}, - {7, 0x0103}, - {8, 0x0057}, - {8, 0x0017}, - {8, 0x011f}, - {7, 0x0113}, - {8, 0x0077}, - {8, 0x0037}, - {9, 0x00cf}, - {7, 0x010b}, - {8, 0x0067}, - {8, 0x0027}, - {9, 0x00af}, - {8, 0x0007}, - {8, 0x0087}, - {8, 0x0047}, - {9, 0x00ef}, - {7, 0x0107}, - {8, 0x005f}, - {8, 0x001f}, - {9, 0x009f}, - {7, 0x0117}, - {8, 0x007f}, - {8, 0x003f}, - {9, 0x00df}, - {7, 0x010f}, - {8, 0x006f}, - {8, 0x002f}, - {9, 0x00bf}, - {8, 0x000f}, - {8, 0x008f}, - {8, 0x004f}, - {9, 0x00ff} -}; - -FlateHuffmanTab FlateStream::fixedLitCodeTab = { - flateFixedLitCodeTabCodes, 9 -}; - -static FlateCode flateFixedDistCodeTabCodes[32] = { - {5, 0x0000}, - {5, 0x0010}, - {5, 0x0008}, - {5, 0x0018}, - {5, 0x0004}, - {5, 0x0014}, - {5, 0x000c}, - {5, 0x001c}, - {5, 0x0002}, - {5, 0x0012}, - {5, 0x000a}, - {5, 0x001a}, - {5, 0x0006}, - {5, 0x0016}, - {5, 0x000e}, - {0, 0x0000}, - {5, 0x0001}, - {5, 0x0011}, - {5, 0x0009}, - {5, 0x0019}, - {5, 0x0005}, - {5, 0x0015}, - {5, 0x000d}, - {5, 0x001d}, - {5, 0x0003}, - {5, 0x0013}, - {5, 0x000b}, - {5, 0x001b}, - {5, 0x0007}, - {5, 0x0017}, - {5, 0x000f}, - {0, 0x0000} -}; - -FlateHuffmanTab FlateStream::fixedDistCodeTab = { - flateFixedDistCodeTabCodes, 5 -}; - -FlateStream::FlateStream(Stream *strA, int predictor, int columns, - int colors, int bits): - FilterStream(strA) { - if (predictor != 1) { - pred = new StreamPredictor(this, predictor, columns, colors, bits); - if (!pred->isOk()) { - delete pred; - pred = nullptr; - } - } else { - pred = nullptr; - } - litCodeTab.codes = nullptr; - distCodeTab.codes = nullptr; - memset(buf, 0, flateWindow); -} - -FlateStream::~FlateStream() { - if (litCodeTab.codes != fixedLitCodeTab.codes) { - gfree(litCodeTab.codes); - } - if (distCodeTab.codes != fixedDistCodeTab.codes) { - gfree(distCodeTab.codes); - } - if (pred) { - delete pred; - } - delete str; -} - -void FlateStream::flateReset(GBool unfiltered) { - if (unfiltered) - str->unfilteredReset(); - else - str->reset(); - - index = 0; - remain = 0; - codeBuf = 0; - codeSize = 0; - compressedBlock = gFalse; - endOfBlock = gTrue; - eof = gTrue; -} - -void FlateStream::unfilteredReset() { - flateReset(gTrue); -} - -void FlateStream::reset() { - int cmf, flg; - - flateReset(gFalse); - - // read header - //~ need to look at window size? - endOfBlock = eof = gTrue; - cmf = str->getChar(); - flg = str->getChar(); - if (cmf == EOF || flg == EOF) - return; - if ((cmf & 0x0f) != 0x08) { - error(errSyntaxError, getPos(), "Unknown compression method in flate stream"); - return; - } - if ((((cmf << 8) + flg) % 31) != 0) { - error(errSyntaxError, getPos(), "Bad FCHECK in flate stream"); - return; - } - if (flg & 0x20) { - error(errSyntaxError, getPos(), "FDICT bit set in flate stream"); - return; - } - - eof = gFalse; -} - -int FlateStream::getChar() { - if (pred) { - return pred->getChar(); - } - return doGetRawChar(); -} - -int FlateStream::getChars(int nChars, Guchar *buffer) { - if (pred) { - return pred->getChars(nChars, buffer); - } else { - for (int i = 0; i < nChars; ++i) { - const int c = doGetRawChar(); - if (likely(c != EOF)) buffer[i] = c; - else return i; - } - return nChars; - } -} - -int FlateStream::lookChar() { - int c; - - if (pred) { - return pred->lookChar(); - } - while (remain == 0) { - if (endOfBlock && eof) - return EOF; - readSome(); - } - c = buf[index]; - return c; -} - -void FlateStream::getRawChars(int nChars, int *buffer) { - for (int i = 0; i < nChars; ++i) - buffer[i] = doGetRawChar(); -} - -int FlateStream::getRawChar() { - return doGetRawChar(); -} - -GooString *FlateStream::getPSFilter(int psLevel, const char *indent) { - GooString *s; - - if (psLevel < 3 || pred) { - return nullptr; - } - if (!(s = str->getPSFilter(psLevel, indent))) { - return nullptr; - } - s->append(indent)->append("<< >> /FlateDecode filter\n"); - return s; -} - -GBool FlateStream::isBinary(GBool last) { - return str->isBinary(gTrue); -} - -void FlateStream::readSome() { - int code1, code2; - int len, dist; - int i, j, k; - int c; - - if (endOfBlock) { - if (!startBlock()) - return; - } - - if (compressedBlock) { - if ((code1 = getHuffmanCodeWord(&litCodeTab)) == EOF) - goto err; - if (code1 < 256) { - buf[index] = code1; - remain = 1; - } else if (code1 == 256) { - endOfBlock = gTrue; - remain = 0; - } else { - code1 -= 257; - code2 = lengthDecode[code1].bits; - if (code2 > 0 && (code2 = getCodeWord(code2)) == EOF) - goto err; - len = lengthDecode[code1].first + code2; - if ((code1 = getHuffmanCodeWord(&distCodeTab)) == EOF) - goto err; - code2 = distDecode[code1].bits; - if (code2 > 0 && (code2 = getCodeWord(code2)) == EOF) - goto err; - dist = distDecode[code1].first + code2; - i = index; - j = (index - dist) & flateMask; - for (k = 0; k < len; ++k) { - buf[i] = buf[j]; - i = (i + 1) & flateMask; - j = (j + 1) & flateMask; - } - remain = len; - } - - } else { - len = (blockLen < flateWindow) ? blockLen : flateWindow; - for (i = 0, j = index; i < len; ++i, j = (j + 1) & flateMask) { - if ((c = str->getChar()) == EOF) { - endOfBlock = eof = gTrue; - break; - } - buf[j] = c & 0xff; - } - remain = i; - blockLen -= len; - if (blockLen == 0) - endOfBlock = gTrue; - } - - return; - -err: - error(errSyntaxError, getPos(), "Unexpected end of file in flate stream"); - endOfBlock = eof = gTrue; - remain = 0; -} - -GBool FlateStream::startBlock() { - int blockHdr; - int c; - int check; - - // free the code tables from the previous block - if (litCodeTab.codes != fixedLitCodeTab.codes) { - gfree(litCodeTab.codes); - } - litCodeTab.codes = nullptr; - if (distCodeTab.codes != fixedDistCodeTab.codes) { - gfree(distCodeTab.codes); - } - distCodeTab.codes = nullptr; - - // read block header - blockHdr = getCodeWord(3); - if (blockHdr & 1) - eof = gTrue; - blockHdr >>= 1; - - // uncompressed block - if (blockHdr == 0) { - compressedBlock = gFalse; - if ((c = str->getChar()) == EOF) - goto err; - blockLen = c & 0xff; - if ((c = str->getChar()) == EOF) - goto err; - blockLen |= (c & 0xff) << 8; - if ((c = str->getChar()) == EOF) - goto err; - check = c & 0xff; - if ((c = str->getChar()) == EOF) - goto err; - check |= (c & 0xff) << 8; - if (check != (~blockLen & 0xffff)) - error(errSyntaxError, getPos(), "Bad uncompressed block length in flate stream"); - codeBuf = 0; - codeSize = 0; - - // compressed block with fixed codes - } else if (blockHdr == 1) { - compressedBlock = gTrue; - loadFixedCodes(); - - // compressed block with dynamic codes - } else if (blockHdr == 2) { - compressedBlock = gTrue; - if (!readDynamicCodes()) { - goto err; - } - - // unknown block type - } else { - goto err; - } - - endOfBlock = gFalse; - return gTrue; - -err: - error(errSyntaxError, getPos(), "Bad block header in flate stream"); - endOfBlock = eof = gTrue; - return gFalse; -} - -void FlateStream::loadFixedCodes() { - litCodeTab.codes = fixedLitCodeTab.codes; - litCodeTab.maxLen = fixedLitCodeTab.maxLen; - distCodeTab.codes = fixedDistCodeTab.codes; - distCodeTab.maxLen = fixedDistCodeTab.maxLen; -} - -GBool FlateStream::readDynamicCodes() { - int numCodeLenCodes; - int numLitCodes; - int numDistCodes; - int codeLenCodeLengths[flateMaxCodeLenCodes]; - FlateHuffmanTab codeLenCodeTab; - int len, repeat, code; - int i; - - codeLenCodeTab.codes = nullptr; - - // read lengths - if ((numLitCodes = getCodeWord(5)) == EOF) { - goto err; - } - numLitCodes += 257; - if ((numDistCodes = getCodeWord(5)) == EOF) { - goto err; - } - numDistCodes += 1; - if ((numCodeLenCodes = getCodeWord(4)) == EOF) { - goto err; - } - numCodeLenCodes += 4; - if (numLitCodes > flateMaxLitCodes || - numDistCodes > flateMaxDistCodes || - numCodeLenCodes > flateMaxCodeLenCodes) { - goto err; - } - - // build the code length code table - for (i = 0; i < flateMaxCodeLenCodes; ++i) { - codeLenCodeLengths[i] = 0; - } - for (i = 0; i < numCodeLenCodes; ++i) { - if ((codeLenCodeLengths[codeLenCodeMap[i]] = getCodeWord(3)) == -1) { - goto err; - } - } - compHuffmanCodes(codeLenCodeLengths, flateMaxCodeLenCodes, &codeLenCodeTab); - - // build the literal and distance code tables - len = 0; - repeat = 0; - i = 0; - while (i < numLitCodes + numDistCodes) { - if ((code = getHuffmanCodeWord(&codeLenCodeTab)) == EOF) { - goto err; - } - if (code == 16) { - if ((repeat = getCodeWord(2)) == EOF) { - goto err; - } - repeat += 3; - if (i + repeat > numLitCodes + numDistCodes) { - goto err; - } - for (; repeat > 0; --repeat) { - codeLengths[i++] = len; - } - } else if (code == 17) { - if ((repeat = getCodeWord(3)) == EOF) { - goto err; - } - repeat += 3; - if (i + repeat > numLitCodes + numDistCodes) { - goto err; - } - len = 0; - for (; repeat > 0; --repeat) { - codeLengths[i++] = 0; - } - } else if (code == 18) { - if ((repeat = getCodeWord(7)) == EOF) { - goto err; - } - repeat += 11; - if (i + repeat > numLitCodes + numDistCodes) { - goto err; - } - len = 0; - for (; repeat > 0; --repeat) { - codeLengths[i++] = 0; - } - } else { - codeLengths[i++] = len = code; - } - } - compHuffmanCodes(codeLengths, numLitCodes, &litCodeTab); - compHuffmanCodes(codeLengths + numLitCodes, numDistCodes, &distCodeTab); - - gfree(codeLenCodeTab.codes); - return gTrue; - -err: - error(errSyntaxError, getPos(), "Bad dynamic code table in flate stream"); - gfree(codeLenCodeTab.codes); - return gFalse; -} - -// Convert an array <lengths> of <n> lengths, in value order, into a -// Huffman code lookup table. -void FlateStream::compHuffmanCodes(int *lengths, int n, FlateHuffmanTab *tab) { - int tabSize, len, code, code2, skip, val, i, t; - - // find max code length - tab->maxLen = 0; - for (val = 0; val < n; ++val) { - if (lengths[val] > tab->maxLen) { - tab->maxLen = lengths[val]; - } - } - - // allocate the table - tabSize = 1 << tab->maxLen; - tab->codes = (FlateCode *)gmallocn(tabSize, sizeof(FlateCode)); - - // clear the table - for (i = 0; i < tabSize; ++i) { - tab->codes[i].len = 0; - tab->codes[i].val = 0; - } - - // build the table - for (len = 1, code = 0, skip = 2; - len <= tab->maxLen; - ++len, code <<= 1, skip <<= 1) { - for (val = 0; val < n; ++val) { - if (lengths[val] == len) { - - // bit-reverse the code - code2 = 0; - t = code; - for (i = 0; i < len; ++i) { - code2 = (code2 << 1) | (t & 1); - t >>= 1; - } - - // fill in the table entries - for (i = code2; i < tabSize; i += skip) { - tab->codes[i].len = (Gushort)len; - tab->codes[i].val = (Gushort)val; - } - - ++code; - } - } - } -} - -int FlateStream::getHuffmanCodeWord(FlateHuffmanTab *tab) { - FlateCode *code; - int c; - - while (codeSize < tab->maxLen) { - if ((c = str->getChar()) == EOF) { - break; - } - codeBuf |= (c & 0xff) << codeSize; - codeSize += 8; - } - code = &tab->codes[codeBuf & ((1 << tab->maxLen) - 1)]; - if (codeSize == 0 || codeSize < code->len || code->len == 0) { - return EOF; - } - codeBuf >>= code->len; - codeSize -= code->len; - return (int)code->val; -} - -int FlateStream::getCodeWord(int bits) { - int c; - - while (codeSize < bits) { - if ((c = str->getChar()) == EOF) - return EOF; - codeBuf |= (c & 0xff) << codeSize; - codeSize += 8; - } - c = codeBuf & ((1 << bits) - 1); - codeBuf >>= bits; - codeSize -= bits; - return c; -} -#endif - -//------------------------------------------------------------------------ -// EOFStream -//------------------------------------------------------------------------ - -EOFStream::EOFStream(Stream *strA): - FilterStream(strA) { -} - -EOFStream::~EOFStream() { - delete str; -} - -//------------------------------------------------------------------------ -// BufStream -//------------------------------------------------------------------------ - -BufStream::BufStream(Stream *strA, int bufSizeA): FilterStream(strA) { - bufSize = bufSizeA; - buf = (int *)gmallocn(bufSize, sizeof(int)); -} - -BufStream::~BufStream() { - gfree(buf); - delete str; -} - -void BufStream::reset() { - int i; - - str->reset(); - for (i = 0; i < bufSize; ++i) { - buf[i] = str->getChar(); - } -} - -int BufStream::getChar() { - int c, i; - - c = buf[0]; - for (i = 1; i < bufSize; ++i) { - buf[i-1] = buf[i]; - } - buf[bufSize - 1] = str->getChar(); - return c; -} - -int BufStream::lookChar() { - return buf[0]; -} - -int BufStream::lookChar(int idx) { - return buf[idx]; -} - -GBool BufStream::isBinary(GBool last) { - return str->isBinary(gTrue); -} - -//------------------------------------------------------------------------ -// FixedLengthEncoder -//------------------------------------------------------------------------ - -FixedLengthEncoder::FixedLengthEncoder(Stream *strA, int lengthA): - FilterStream(strA) { - length = lengthA; - count = 0; -} - -FixedLengthEncoder::~FixedLengthEncoder() { - if (str->isEncoder()) - delete str; -} - -void FixedLengthEncoder::reset() { - str->reset(); - count = 0; -} - -int FixedLengthEncoder::getChar() { - if (length >= 0 && count >= length) - return EOF; - ++count; - return str->getChar(); -} - -int FixedLengthEncoder::lookChar() { - if (length >= 0 && count >= length) - return EOF; - return str->getChar(); -} - -GBool FixedLengthEncoder::isBinary(GBool last) { - return str->isBinary(gTrue); -} - -//------------------------------------------------------------------------ -// ASCIIHexEncoder -//------------------------------------------------------------------------ - -ASCIIHexEncoder::ASCIIHexEncoder(Stream *strA): - FilterStream(strA) { - bufPtr = bufEnd = buf; - lineLen = 0; - eof = gFalse; -} - -ASCIIHexEncoder::~ASCIIHexEncoder() { - if (str->isEncoder()) { - delete str; - } -} - -void ASCIIHexEncoder::reset() { - str->reset(); - bufPtr = bufEnd = buf; - lineLen = 0; - eof = gFalse; -} - -GBool ASCIIHexEncoder::fillBuf() { - static const char *hex = "0123456789abcdef"; - int c; - - if (eof) { - return gFalse; - } - bufPtr = bufEnd = buf; - if ((c = str->getChar()) == EOF) { - *bufEnd++ = '>'; - eof = gTrue; - } else { - if (lineLen >= 64) { - *bufEnd++ = '\n'; - lineLen = 0; - } - *bufEnd++ = hex[(c >> 4) & 0x0f]; - *bufEnd++ = hex[c & 0x0f]; - lineLen += 2; - } - return gTrue; -} - -//------------------------------------------------------------------------ -// ASCII85Encoder -//------------------------------------------------------------------------ - -ASCII85Encoder::ASCII85Encoder(Stream *strA): - FilterStream(strA) { - bufPtr = bufEnd = buf; - lineLen = 0; - eof = gFalse; -} - -ASCII85Encoder::~ASCII85Encoder() { - if (str->isEncoder()) - delete str; -} - -void ASCII85Encoder::reset() { - str->reset(); - bufPtr = bufEnd = buf; - lineLen = 0; - eof = gFalse; -} - -GBool ASCII85Encoder::fillBuf() { - Guint t; - char buf1[5]; - int c0, c1, c2, c3; - int n, i; - - if (eof) { - return gFalse; - } - c0 = str->getChar(); - c1 = str->getChar(); - c2 = str->getChar(); - c3 = str->getChar(); - bufPtr = bufEnd = buf; - if (c3 == EOF) { - if (c0 == EOF) { - n = 0; - t = 0; - } else { - if (c1 == EOF) { - n = 1; - t = c0 << 24; - } else if (c2 == EOF) { - n = 2; - t = (c0 << 24) | (c1 << 16); - } else { - n = 3; - t = (c0 << 24) | (c1 << 16) | (c2 << 8); - } - for (i = 4; i >= 0; --i) { - buf1[i] = (char)(t % 85 + 0x21); - t /= 85; - } - for (i = 0; i <= n; ++i) { - *bufEnd++ = buf1[i]; - if (++lineLen == 65) { - *bufEnd++ = '\n'; - lineLen = 0; - } - } - } - *bufEnd++ = '~'; - *bufEnd++ = '>'; - eof = gTrue; - } else { - t = (c0 << 24) | (c1 << 16) | (c2 << 8) | c3; - if (t == 0) { - *bufEnd++ = 'z'; - if (++lineLen == 65) { - *bufEnd++ = '\n'; - lineLen = 0; - } - } else { - for (i = 4; i >= 0; --i) { - buf1[i] = (char)(t % 85 + 0x21); - t /= 85; - } - for (i = 0; i <= 4; ++i) { - *bufEnd++ = buf1[i]; - if (++lineLen == 65) { - *bufEnd++ = '\n'; - lineLen = 0; - } - } - } - } - return gTrue; -} - -//------------------------------------------------------------------------ -// RunLengthEncoder -//------------------------------------------------------------------------ - -RunLengthEncoder::RunLengthEncoder(Stream *strA): - FilterStream(strA) { - bufPtr = bufEnd = nextEnd = buf; - eof = gFalse; -} - -RunLengthEncoder::~RunLengthEncoder() { - if (str->isEncoder()) - delete str; -} - -void RunLengthEncoder::reset() { - str->reset(); - bufPtr = bufEnd = nextEnd = buf; - eof = gFalse; -} - -// -// When fillBuf finishes, buf[] looks like this: -// +-----+--------------+-----------------+-- -// + tag | ... data ... | next 0, 1, or 2 | -// +-----+--------------+-----------------+-- -// ^ ^ ^ -// bufPtr bufEnd nextEnd -// -GBool RunLengthEncoder::fillBuf() { - int c, c1, c2; - int n; - - // already hit EOF? - if (eof) - return gFalse; - - // grab two bytes - if (nextEnd < bufEnd + 1) { - if ((c1 = str->getChar()) == EOF) { - eof = gTrue; - return gFalse; - } - } else { - c1 = bufEnd[0] & 0xff; - } - if (nextEnd < bufEnd + 2) { - if ((c2 = str->getChar()) == EOF) { - eof = gTrue; - buf[0] = 0; - buf[1] = c1; - bufPtr = buf; - bufEnd = &buf[2]; - return gTrue; - } - } else { - c2 = bufEnd[1] & 0xff; - } - - // check for repeat - c = 0; // make gcc happy - if (c1 == c2) { - n = 2; - while (n < 128 && (c = str->getChar()) == c1) - ++n; - buf[0] = (char)(257 - n); - buf[1] = c1; - bufEnd = &buf[2]; - if (c == EOF) { - eof = gTrue; - } else if (n < 128) { - buf[2] = c; - nextEnd = &buf[3]; - } else { - nextEnd = bufEnd; - } - - // get up to 128 chars - } else { - buf[1] = c1; - buf[2] = c2; - n = 2; - while (n < 128) { - if ((c = str->getChar()) == EOF) { - eof = gTrue; - break; - } - ++n; - buf[n] = c; - if (buf[n] == buf[n-1]) - break; - } - if (buf[n] == buf[n-1]) { - buf[0] = (char)(n-2-1); - bufEnd = &buf[n-1]; - nextEnd = &buf[n+1]; - } else { - buf[0] = (char)(n-1); - bufEnd = nextEnd = &buf[n+1]; - } - } - bufPtr = buf; - return gTrue; -} - -//------------------------------------------------------------------------ -// LZWEncoder -//------------------------------------------------------------------------ - -LZWEncoder::LZWEncoder(Stream *strA): - FilterStream(strA) -{ - inBufLen = 0; - outBufLen = 0; -} - -LZWEncoder::~LZWEncoder() { - if (str->isEncoder()) { - delete str; - } -} - -void LZWEncoder::reset() { - int i; - - str->reset(); - - // initialize code table - for (i = 0; i < 256; ++i) { - table[i].byte = i; - table[i].next = nullptr; - table[i].children = nullptr; - } - nextSeq = 258; - codeLen = 9; - - // initialize input buffer - inBufLen = str->doGetChars(sizeof(inBuf), inBuf); - - // initialize output buffer with a clear-table code - outBuf = 256; - outBufLen = 9; - needEOD = gFalse; -} - -int LZWEncoder::getChar() { - int ret; - - if (inBufLen == 0 && !needEOD && outBufLen == 0) { - return EOF; - } - if (outBufLen < 8 && (inBufLen > 0 || needEOD)) { - fillBuf(); - } - if (outBufLen >= 8) { - ret = (outBuf >> (outBufLen - 8)) & 0xff; - outBufLen -= 8; - } else { - ret = (outBuf << (8 - outBufLen)) & 0xff; - outBufLen = 0; - } - return ret; -} - -int LZWEncoder::lookChar() { - if (inBufLen == 0 && !needEOD && outBufLen == 0) { - return EOF; - } - if (outBufLen < 8 && (inBufLen > 0 || needEOD)) { - fillBuf(); - } - if (outBufLen >= 8) { - return (outBuf >> (outBufLen - 8)) & 0xff; - } else { - return (outBuf << (8 - outBufLen)) & 0xff; - } -} - -// On input, outBufLen < 8. -// This function generates, at most, 2 12-bit codes -// --> outBufLen < 8 + 12 + 12 = 32 -void LZWEncoder::fillBuf() { - LZWEncoderNode *p0, *p1; - int seqLen, code, i; - - if (needEOD) { - outBuf = (outBuf << codeLen) | 257; - outBufLen += codeLen; - needEOD = gFalse; - return; - } - - // find longest matching sequence (if any) - p0 = table + inBuf[0]; - seqLen = 1; - while (inBufLen > seqLen) { - for (p1 = p0->children; p1; p1 = p1->next) { - if (p1->byte == inBuf[seqLen]) { - break; - } - } - if (!p1) { - break; - } - p0 = p1; - ++seqLen; - } - code = (int)(p0 - table); - - // generate an output code - outBuf = (outBuf << codeLen) | code; - outBufLen += codeLen; - - // update the table - table[nextSeq].byte = seqLen < inBufLen ? inBuf[seqLen] : 0; - table[nextSeq].children = nullptr; - if (table[code].children) { - table[nextSeq].next = table[code].children; - } else { - table[nextSeq].next = nullptr; - } - table[code].children = table + nextSeq; - ++nextSeq; - - // update the input buffer - memmove(inBuf, inBuf + seqLen, inBufLen - seqLen); - inBufLen -= seqLen; - inBufLen += str->doGetChars(sizeof(inBuf) - inBufLen, inBuf + inBufLen); - - // increment codeLen; generate clear-table code - if (nextSeq == (1 << codeLen)) { - ++codeLen; - if (codeLen == 13) { - outBuf = (outBuf << 12) | 256; - outBufLen += 12; - for (i = 0; i < 256; ++i) { - table[i].next = nullptr; - table[i].children = nullptr; - } - nextSeq = 258; - codeLen = 9; - } - } - - // generate EOD next time - if (inBufLen == 0) { - needEOD = gTrue; - } -} - -//------------------------------------------------------------------------ -// CMYKGrayEncoder -//------------------------------------------------------------------------ - -CMYKGrayEncoder::CMYKGrayEncoder(Stream *strA): - FilterStream(strA) { - bufPtr = bufEnd = buf; - eof = gFalse; -} - -CMYKGrayEncoder::~CMYKGrayEncoder() { - if (str->isEncoder()) - delete str; -} - -void CMYKGrayEncoder::reset() { - str->reset(); - bufPtr = bufEnd = buf; - eof = gFalse; -} - -GBool CMYKGrayEncoder::fillBuf() { - int c0, c1, c2, c3; - int i; - - if (eof) { - return gFalse; - } - c0 = str->getChar(); - c1 = str->getChar(); - c2 = str->getChar(); - c3 = str->getChar(); - if (c3 == EOF) { - eof = gTrue; - return gFalse; - } - i = (3 * c0 + 6 * c1 + c2) / 10 + c3; - if (i > 255) i = 255; - bufPtr = bufEnd = buf; - *bufEnd++ = (char) i; - return gTrue; -} - -//------------------------------------------------------------------------ -// RGBGrayEncoder -//------------------------------------------------------------------------ - -RGBGrayEncoder::RGBGrayEncoder(Stream *strA): - FilterStream(strA) { - bufPtr = bufEnd = buf; - eof = gFalse; -} - -RGBGrayEncoder::~RGBGrayEncoder() { - if (str->isEncoder()) - delete str; -} - -void RGBGrayEncoder::reset() { - str->reset(); - bufPtr = bufEnd = buf; - eof = gFalse; -} - -GBool RGBGrayEncoder::fillBuf() { - int c0, c1, c2; - int i; - - if (eof) { - return gFalse; - } - c0 = str->getChar(); - c1 = str->getChar(); - c2 = str->getChar(); - if (c2 == EOF) { - eof = gTrue; - return gFalse; - } - i = 255 - (3 * c0 + 6 * c1 + c2) / 10; - if (i < 0) i = 0; - bufPtr = bufEnd = buf; - *bufEnd++ = (char) i; - return gTrue; -} - diff --git a/Build/source/libs/poppler/poppler-src/poppler/Stream.h b/Build/source/libs/poppler/poppler-src/poppler/Stream.h deleted file mode 100644 index 841c87a8c33..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/Stream.h +++ /dev/null @@ -1,1401 +0,0 @@ -//======================================================================== -// -// Stream.h -// -// Copyright 1996-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2005 Jeff Muizelaar <jeff@infidigm.net> -// Copyright (C) 2008 Julien Rebetez <julien@fhtagn.net> -// Copyright (C) 2008, 2010, 2011, 2016-2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2009 Carlos Garcia Campos <carlosgc@gnome.org> -// Copyright (C) 2009 Stefan Thomas <thomas@eload24.com> -// Copyright (C) 2010 Hib Eris <hib@hiberis.nl> -// Copyright (C) 2011, 2012, 2016 William Bader <williambader@hotmail.com> -// Copyright (C) 2012, 2013 Thomas Freitag <Thomas.Freitag@alfa.de> -// Copyright (C) 2012, 2013 Fabio D'Urso <fabiodurso@hotmail.it> -// Copyright (C) 2013, 2017 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2013 Peter Breitenlohner <peb@mppmu.mpg.de> -// Copyright (C) 2013, 2018 Adam Reichold <adamreichold@myopera.com> -// Copyright (C) 2013 Pino Toscano <pino@kde.org> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef STREAM_H -#define STREAM_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "poppler-config.h" -#include <stdio.h> -#include "goo/gtypes.h" -#include "Object.h" -#include "goo/GooMutex.h" - -class GooFile; -class BaseStream; -class CachedFile; - -//------------------------------------------------------------------------ - -enum StreamKind { - strFile, - strCachedFile, - strASCIIHex, - strASCII85, - strLZW, - strRunLength, - strCCITTFax, - strDCT, - strFlate, - strJBIG2, - strJPX, - strWeird, // internal-use stream types - strCrypt // internal-use to detect decode streams -}; - -enum StreamColorSpaceMode { - streamCSNone, - streamCSDeviceGray, - streamCSDeviceRGB, - streamCSDeviceCMYK -}; - -//------------------------------------------------------------------------ - -// This is in Stream.h instead of Decrypt.h to avoid really annoying -// include file dependency loops. -enum CryptAlgorithm { - cryptRC4, - cryptAES, - cryptAES256, - cryptNone -}; - -//------------------------------------------------------------------------ - -typedef struct _ByteRange { - Guint offset; - Guint length; -} ByteRange; - -//------------------------------------------------------------------------ -// Stream (base class) -//------------------------------------------------------------------------ - -class Stream { -public: - - // Constructor. - Stream(); - - // Destructor. - virtual ~Stream(); - - Stream(const Stream &) = delete; - Stream& operator=(const Stream &other) = delete; - - // Get kind of stream. - virtual StreamKind getKind() = 0; - - // Reset stream to beginning. - virtual void reset() = 0; - - // Close down the stream. - virtual void close(); - - inline int doGetChars(int nChars, Guchar *buffer) - { - if (hasGetChars()) { - return getChars(nChars, buffer); - } else { - for (int i = 0; i < nChars; ++i) { - const int c = getChar(); - if (likely(c != EOF)) buffer[i] = c; - else return i; - } - return nChars; - } - } - - inline void fillGooString(GooString *s) - { - Guchar readBuf[4096]; - int readChars; - reset(); - while ((readChars = doGetChars(4096, readBuf)) != 0) { - s->append((const char *)readBuf, readChars); - } - } - - inline Guchar *toUnsignedChars(int *length, int initialSize = 4096, int sizeIncrement = 4096) - { - int readChars; - Guchar *buf = (Guchar *)gmalloc(initialSize); - int size = initialSize; - *length = 0; - int charsToRead = initialSize; - bool continueReading = true; - reset(); - while (continueReading && (readChars = doGetChars(charsToRead, &buf[*length])) != 0) { - *length += readChars; - if (readChars == charsToRead) { - if (lookChar() != EOF) { - size += sizeIncrement; - charsToRead = sizeIncrement; - buf = (Guchar *)grealloc(buf, size); - } else { - continueReading = false; - } - } else { - continueReading = false; - } - } - return buf; - } - - // Get next char from stream. - virtual int getChar() = 0; - - // Peek at next char in stream. - virtual int lookChar() = 0; - - // Get next char from stream without using the predictor. - // This is only used by StreamPredictor. - virtual int getRawChar(); - virtual void getRawChars(int nChars, int *buffer); - - // Get next char directly from stream source, without filtering it - virtual int getUnfilteredChar () = 0; - - // Resets the stream without reading anything (even not the headers) - // WARNING: Reading the stream with something else than getUnfilteredChar - // may lead to unexcepted behaviour until you call reset () - virtual void unfilteredReset () = 0; - - // Get next line from stream. - virtual char *getLine(char *buf, int size); - - // Get current position in file. - virtual Goffset getPos() = 0; - - // Go to a position in the stream. If <dir> is negative, the - // position is from the end of the file; otherwise the position is - // from the start of the file. - virtual void setPos(Goffset pos, int dir = 0) = 0; - - // Get PostScript command for the filter(s). - virtual GooString *getPSFilter(int psLevel, const char *indent); - - // Does this stream type potentially contain non-printable chars? - virtual GBool isBinary(GBool last = gTrue) = 0; - - // Get the BaseStream of this stream. - virtual BaseStream *getBaseStream() = 0; - - // Get the stream after the last decoder (this may be a BaseStream - // or a DecryptStream). - virtual Stream *getUndecodedStream() = 0; - - // Get the dictionary associated with this stream. - virtual Dict *getDict() = 0; - virtual Object *getDictObject() = 0; - - // Is this an encoding filter? - virtual GBool isEncoder() { return gFalse; } - - // Get image parameters which are defined by the stream contents. - virtual void getImageParams(int * /*bitsPerComponent*/, - StreamColorSpaceMode * /*csMode*/) {} - - // Return the next stream in the "stack". - virtual Stream *getNextStream() { return NULL; } - - // Add filters to this stream according to the parameters in <dict>. - // Returns the new stream. - Stream *addFilters(Dict *dict, int recursion = 0); - -private: - friend class Object; // for incRef/decRef - - // Reference counting. - int incRef(); - int decRef(); - - virtual GBool hasGetChars() { return false; } - virtual int getChars(int nChars, Guchar *buffer); - - Stream *makeFilter(const char *name, Stream *str, Object *params, int recursion = 0, Dict *dict = nullptr); - - int ref; // reference count -#ifdef MULTITHREADED - GooMutex mutex; -#endif -}; - - - //------------------------------------------------------------------------ -// OutStream -// -// This is the base class for all streams that output to a file -//------------------------------------------------------------------------ -class OutStream { -public: - // Constructor. - OutStream (); - - // Desctructor. - virtual ~OutStream (); - - OutStream(const OutStream &) = delete; - OutStream& operator=(const OutStream &other) = delete; - - // Close the stream - virtual void close() = 0; - - // Return position in stream - virtual Goffset getPos() = 0; - - // Put a char in the stream - virtual void put (char c) = 0; - - virtual void printf (const char *format, ...) GCC_PRINTF_FORMAT(2,3) = 0; -}; - -//------------------------------------------------------------------------ -// FileOutStream -//------------------------------------------------------------------------ -class FileOutStream : public OutStream { -public: - FileOutStream (FILE* fa, Goffset startA); - - ~FileOutStream (); - - void close() override; - - Goffset getPos() override; - - void put (char c) override; - - void printf (const char *format, ...) override GCC_PRINTF_FORMAT(2,3); -private: - FILE *f; - Goffset start; - -}; - - -//------------------------------------------------------------------------ -// BaseStream -// -// This is the base class for all streams that read directly from a file. -//------------------------------------------------------------------------ - -class BaseStream: public Stream { -public: - - // TODO Mirar si puedo hacer que dictA sea un puntero - BaseStream(Object &&dictA, Goffset lengthA); - ~BaseStream(); - virtual BaseStream *copy() = 0; - virtual Stream *makeSubStream(Goffset start, GBool limited, - Goffset length, Object &&dict) = 0; - void setPos(Goffset pos, int dir = 0) override = 0; - GBool isBinary(GBool last = gTrue) override { return last; } - BaseStream *getBaseStream() override { return this; } - Stream *getUndecodedStream() override { return this; } - Dict *getDict() override { return dict.getDict(); } - Object *getDictObject() override { return &dict; } - virtual GooString *getFileName() { return NULL; } - virtual Goffset getLength() { return length; } - - // Get/set position of first byte of stream within the file. - virtual Goffset getStart() = 0; - virtual void moveStart(Goffset delta) = 0; - -protected: - - Goffset length; - Object dict; -}; - -//------------------------------------------------------------------------ -// FilterStream -// -// This is the base class for all streams that filter another stream. -//------------------------------------------------------------------------ - -class FilterStream: public Stream { -public: - - FilterStream(Stream *strA); - ~FilterStream(); - void close() override; - Goffset getPos() override { return str->getPos(); } - void setPos(Goffset pos, int dir = 0) override; - BaseStream *getBaseStream() override { return str->getBaseStream(); } - Stream *getUndecodedStream() override { return str->getUndecodedStream(); } - Dict *getDict() override { return str->getDict(); } - Object *getDictObject() override { return str->getDictObject(); } - Stream *getNextStream() override { return str; } - - int getUnfilteredChar () override { return str->getUnfilteredChar(); } - void unfilteredReset () override { str->unfilteredReset(); } - -protected: - - Stream *str; -}; - -//------------------------------------------------------------------------ -// ImageStream -//------------------------------------------------------------------------ - -class ImageStream { -public: - - // Create an image stream object for an image with the specified - // parameters. Note that these are the actual image parameters, - // which may be different from the predictor parameters. - ImageStream(Stream *strA, int widthA, int nCompsA, int nBitsA); - - ~ImageStream(); - - ImageStream(const ImageStream &) = delete; - ImageStream& operator=(const ImageStream &other) = delete; - - // Reset the stream. - void reset(); - - // Close the stream previously reset - void close(); - - // Gets the next pixel from the stream. <pix> should be able to hold - // at least nComps elements. Returns false at end of file. - GBool getPixel(Guchar *pix); - - // Returns a pointer to the next line of pixels. Returns NULL at - // end of file. - Guchar *getLine(); - - // Skip an entire line from the image. - void skipLine(); - -private: - - Stream *str; // base stream - int width; // pixels per line - int nComps; // components per pixel - int nBits; // bits per component - int nVals; // components per line - int inputLineSize; // input line buffer size - Guchar *inputLine; // input line buffer - Guchar *imgLine; // line buffer - int imgIdx; // current index in imgLine -}; - -//------------------------------------------------------------------------ -// StreamPredictor -//------------------------------------------------------------------------ - -class StreamPredictor { -public: - - // Create a predictor object. Note that the parameters are for the - // predictor, and may not match the actual image parameters. - StreamPredictor(Stream *strA, int predictorA, - int widthA, int nCompsA, int nBitsA); - - ~StreamPredictor(); - - StreamPredictor(const StreamPredictor &) = delete; - StreamPredictor& operator=(const StreamPredictor &) = delete; - - GBool isOk() { return ok; } - - int lookChar(); - int getChar(); - int getChars(int nChars, Guchar *buffer); - -private: - - GBool getNextLine(); - - Stream *str; // base stream - int predictor; // predictor - int width; // pixels per line - int nComps; // components per pixel - int nBits; // bits per component - int nVals; // components per line - int pixBytes; // bytes per pixel - int rowBytes; // bytes per line - Guchar *predLine; // line buffer - int predIdx; // current index in predLine - GBool ok; -}; - -//------------------------------------------------------------------------ -// FileStream -//------------------------------------------------------------------------ - -#define fileStreamBufSize 256 - -class FileStream: public BaseStream { -public: - - FileStream(GooFile* fileA, Goffset startA, GBool limitedA, - Goffset lengthA, Object &&dictA); - ~FileStream(); - BaseStream *copy() override; - Stream *makeSubStream(Goffset startA, GBool limitedA, - Goffset lengthA, Object &&dictA) override; - StreamKind getKind() override { return strFile; } - void reset() override; - void close() override; - int getChar() override - { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); } - int lookChar() override - { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); } - Goffset getPos() override { return bufPos + (bufPtr - buf); } - void setPos(Goffset pos, int dir = 0) override; - Goffset getStart() override { return start; } - void moveStart(Goffset delta) override; - - int getUnfilteredChar () override { return getChar(); } - void unfilteredReset () override { reset(); } - -private: - - GBool fillBuf(); - - GBool hasGetChars() override { return true; } - int getChars(int nChars, Guchar *buffer) override - { - int n, m; - - n = 0; - while (n < nChars) { - if (bufPtr >= bufEnd) { - if (!fillBuf()) { - break; - } - } - m = (int)(bufEnd - bufPtr); - if (m > nChars - n) { - m = nChars - n; - } - memcpy(buffer + n, bufPtr, m); - bufPtr += m; - n += m; - } - return n; - } - -private: - GooFile* file; - Goffset offset; - Goffset start; - GBool limited; - char buf[fileStreamBufSize]; - char *bufPtr; - char *bufEnd; - Goffset bufPos; - Goffset savePos; - GBool saved; -}; - -//------------------------------------------------------------------------ -// CachedFileStream -//------------------------------------------------------------------------ - -#define cachedStreamBufSize 1024 - -class CachedFileStream: public BaseStream { -public: - - CachedFileStream(CachedFile *ccA, Goffset startA, GBool limitedA, - Goffset lengthA, Object &&dictA); - ~CachedFileStream(); - BaseStream *copy() override; - Stream *makeSubStream(Goffset startA, GBool limitedA, - Goffset lengthA, Object &&dictA) override; - StreamKind getKind() override { return strCachedFile; } - void reset() override; - void close() override; - int getChar() override - { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); } - int lookChar() override - { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); } - Goffset getPos() override { return bufPos + (bufPtr - buf); } - void setPos(Goffset pos, int dir = 0) override; - Goffset getStart() override { return start; } - void moveStart(Goffset delta) override; - - int getUnfilteredChar () override { return getChar(); } - void unfilteredReset () override { reset(); } - -private: - - GBool fillBuf(); - - CachedFile *cc; - Goffset start; - GBool limited; - char buf[cachedStreamBufSize]; - char *bufPtr; - char *bufEnd; - Guint bufPos; - int savePos; - GBool saved; -}; - - -//------------------------------------------------------------------------ -// MemStream -//------------------------------------------------------------------------ - -template<typename T> -class BaseMemStream: public BaseStream { -public: - - BaseMemStream(T *bufA, Goffset startA, Goffset lengthA, Object &&dictA) : BaseStream(std::move(dictA), lengthA) { - buf = bufA; - start = startA; - length = lengthA; - bufEnd = buf + start + length; - bufPtr = buf + start; - } - - BaseStream *copy() override { - return new BaseMemStream(buf, start, length, dict.copy()); - } - - Stream *makeSubStream(Goffset startA, GBool limited, Goffset lengthA, Object &&dictA) override { - Goffset newLength; - - if (!limited || startA + lengthA > start + length) { - newLength = start + length - startA; - } else { - newLength = lengthA; - } - return new BaseMemStream(buf, startA, newLength, std::move(dictA)); - } - - StreamKind getKind() override { return strWeird; } - - void reset() override { - bufPtr = buf + start; - } - - void close() override { } - - int getChar() override - { return (bufPtr < bufEnd) ? (*bufPtr++ & 0xff) : EOF; } - - int lookChar() override - { return (bufPtr < bufEnd) ? (*bufPtr & 0xff) : EOF; } - - Goffset getPos() override { return (int)(bufPtr - buf); } - - void setPos(Goffset pos, int dir = 0) override { - Guint i; - - if (dir >= 0) { - i = pos; - } else { - i = start + length - pos; - } - if (i < start) { - i = start; - } else if (i > start + length) { - i = start + length; - } - bufPtr = buf + i; - } - - Goffset getStart() override { return start; } - - void moveStart(Goffset delta) override { - start += delta; - length -= delta; - bufPtr = buf + start; - } - - int getUnfilteredChar () override { return getChar(); } - - void unfilteredReset () override { reset (); } - -protected: - T *buf; - -private: - - GBool hasGetChars() override { return true; } - - int getChars(int nChars, Guchar *buffer) override { - int n; - - if (nChars <= 0) { - return 0; - } - if (bufEnd - bufPtr < nChars) { - n = (int)(bufEnd - bufPtr); - } else { - n = nChars; - } - memcpy(buffer, bufPtr, n); - bufPtr += n; - return n; - } - - Goffset start; - T *bufEnd; - T *bufPtr; -}; - -class MemStream : public BaseMemStream<const char> -{ -public: - MemStream(const char *bufA, Goffset startA, Goffset lengthA, Object &&dictA) - : BaseMemStream(bufA, startA, lengthA, std::move(dictA)) - { } -}; - -class AutoFreeMemStream : public BaseMemStream<char> -{ -public: - AutoFreeMemStream(char *bufA, Goffset startA, Goffset lengthA, Object &&dictA) - : BaseMemStream(bufA, startA, lengthA, std::move(dictA)) - { } - - ~AutoFreeMemStream() - { gfree(buf); } -}; - - -//------------------------------------------------------------------------ -// EmbedStream -// -// This is a special stream type used for embedded streams (inline -// images). It reads directly from the base stream -- after the -// EmbedStream is deleted, reads from the base stream will proceed where -// the BaseStream left off. Note that this is very different behavior -// that creating a new FileStream (using makeSubStream). -//------------------------------------------------------------------------ - -class EmbedStream: public BaseStream { -public: - - EmbedStream(Stream *strA, Object &&dictA, GBool limitedA, Goffset lengthA, GBool reusableA = gFalse); - ~EmbedStream(); - BaseStream *copy() override; - Stream *makeSubStream(Goffset start, GBool limitedA, - Goffset lengthA, Object &&dictA) override; - StreamKind getKind() override { return str->getKind(); } - void reset() override {} - int getChar() override; - int lookChar() override; - Goffset getPos() override; - void setPos(Goffset pos, int dir = 0) override; - Goffset getStart() override; - void moveStart(Goffset delta) override; - - int getUnfilteredChar () override { return str->getUnfilteredChar(); } - void unfilteredReset () override { str->unfilteredReset(); } - - void rewind(); - void restore(); - -private: - - GBool hasGetChars() override { return true; } - int getChars(int nChars, Guchar *buffer) override; - - Stream *str; - GBool limited; - GBool reusable; - GBool record; - GBool replay; - unsigned char *bufData; - long bufMax; - long bufLen; - long bufPos; - -}; - -//------------------------------------------------------------------------ -// ASCIIHexStream -//------------------------------------------------------------------------ - -class ASCIIHexStream: public FilterStream { -public: - - ASCIIHexStream(Stream *strA); - ~ASCIIHexStream(); - StreamKind getKind() override { return strASCIIHex; } - void reset() override; - int getChar() override - { int c = lookChar(); buf = EOF; return c; } - int lookChar() override; - GooString *getPSFilter(int psLevel, const char *indent) override; - GBool isBinary(GBool last = gTrue) override; - -private: - - int buf; - GBool eof; -}; - -//------------------------------------------------------------------------ -// ASCII85Stream -//------------------------------------------------------------------------ - -class ASCII85Stream: public FilterStream { -public: - - ASCII85Stream(Stream *strA); - ~ASCII85Stream(); - StreamKind getKind() override { return strASCII85; } - void reset() override; - int getChar() override - { int ch = lookChar(); ++index; return ch; } - int lookChar() override; - GooString *getPSFilter(int psLevel, const char *indent) override; - GBool isBinary(GBool last = gTrue) override; - -private: - - int c[5]; - int b[4]; - int index, n; - GBool eof; -}; - -//------------------------------------------------------------------------ -// LZWStream -//------------------------------------------------------------------------ - -class LZWStream: public FilterStream { -public: - - LZWStream(Stream *strA, int predictor, int columns, int colors, - int bits, int earlyA); - ~LZWStream(); - StreamKind getKind() override { return strLZW; } - void reset() override; - int getChar() override; - int lookChar() override; - int getRawChar() override; - void getRawChars(int nChars, int *buffer) override; - GooString *getPSFilter(int psLevel, const char *indent) override; - GBool isBinary(GBool last = gTrue) override; - -private: - - GBool hasGetChars() override { return true; } - int getChars(int nChars, Guchar *buffer) override; - - inline int doGetRawChar() { - if (eof) { - return EOF; - } - if (seqIndex >= seqLength) { - if (!processNextCode()) { - return EOF; - } - } - return seqBuf[seqIndex++]; - } - - StreamPredictor *pred; // predictor - int early; // early parameter - GBool eof; // true if at eof - unsigned int inputBuf; // input buffer - int inputBits; // number of bits in input buffer - struct { // decoding table - int length; - int head; - Guchar tail; - } table[4097]; - int nextCode; // next code to be used - int nextBits; // number of bits in next code word - int prevCode; // previous code used in stream - int newChar; // next char to be added to table - Guchar seqBuf[4097]; // buffer for current sequence - int seqLength; // length of current sequence - int seqIndex; // index into current sequence - GBool first; // first code after a table clear - - GBool processNextCode(); - void clearTable(); - int getCode(); -}; - -//------------------------------------------------------------------------ -// RunLengthStream -//------------------------------------------------------------------------ - -class RunLengthStream: public FilterStream { -public: - - RunLengthStream(Stream *strA); - ~RunLengthStream(); - StreamKind getKind() override { return strRunLength; } - void reset() override; - int getChar() override - { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); } - int lookChar() override - { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); } - GooString *getPSFilter(int psLevel, const char *indent) override; - GBool isBinary(GBool last = gTrue) override; - -private: - - GBool hasGetChars() override { return true; } - int getChars(int nChars, Guchar *buffer) override; - - char buf[128]; // buffer - char *bufPtr; // next char to read - char *bufEnd; // end of buffer - GBool eof; - - GBool fillBuf(); -}; - -//------------------------------------------------------------------------ -// CCITTFaxStream -//------------------------------------------------------------------------ - -struct CCITTCodeTable; - -class CCITTFaxStream: public FilterStream { -public: - - CCITTFaxStream(Stream *strA, int encodingA, GBool endOfLineA, - GBool byteAlignA, int columnsA, int rowsA, - GBool endOfBlockA, GBool blackA, int damagedRowsBeforeErrorA); - ~CCITTFaxStream(); - StreamKind getKind() override { return strCCITTFax; } - void reset() override; - int getChar() override - { int c = lookChar(); buf = EOF; return c; } - int lookChar() override; - GooString *getPSFilter(int psLevel, const char *indent) override; - GBool isBinary(GBool last = gTrue) override; - - void unfilteredReset () override; - - int getEncoding() { return encoding; } - GBool getEndOfLine() { return endOfLine; } - GBool getEncodedByteAlign() { return byteAlign; } - GBool getEndOfBlock() { return endOfBlock; } - int getColumns() { return columns; } - GBool getBlackIs1() { return black; } - int getDamagedRowsBeforeError() { return damagedRowsBeforeError; } - -private: - - void ccittReset(GBool unfiltered); - int encoding; // 'K' parameter - GBool endOfLine; // 'EndOfLine' parameter - GBool byteAlign; // 'EncodedByteAlign' parameter - int columns; // 'Columns' parameter - int rows; // 'Rows' parameter - GBool endOfBlock; // 'EndOfBlock' parameter - GBool black; // 'BlackIs1' parameter - int damagedRowsBeforeError; // 'DamagedRowsBeforeError' parameter - GBool eof; // true if at eof - GBool nextLine2D; // true if next line uses 2D encoding - int row; // current row - Guint inputBuf; // input buffer - int inputBits; // number of bits in input buffer - int *codingLine; // coding line changing elements - int *refLine; // reference line changing elements - int a0i; // index into codingLine - GBool err; // error on current line - int outputBits; // remaining ouput bits - int buf; // character buffer - - void addPixels(int a1, int blackPixels); - void addPixelsNeg(int a1, int blackPixels); - short getTwoDimCode(); - short getWhiteCode(); - short getBlackCode(); - short lookBits(int n); - void eatBits(int n) { if ((inputBits -= n) < 0) inputBits = 0; } -}; - -#ifndef ENABLE_LIBJPEG -//------------------------------------------------------------------------ -// DCTStream -//------------------------------------------------------------------------ - -// DCT component info -struct DCTCompInfo { - int id; // component ID - int hSample, vSample; // horiz/vert sampling resolutions - int quantTable; // quantization table number - int prevDC; // DC coefficient accumulator -}; - -struct DCTScanInfo { - GBool comp[4]; // comp[i] is set if component i is - // included in this scan - int numComps; // number of components in the scan - int dcHuffTable[4]; // DC Huffman table numbers - int acHuffTable[4]; // AC Huffman table numbers - int firstCoeff, lastCoeff; // first and last DCT coefficient - int ah, al; // successive approximation parameters -}; - -// DCT Huffman decoding table -struct DCTHuffTable { - Guchar firstSym[17]; // first symbol for this bit length - Gushort firstCode[17]; // first code for this bit length - Gushort numCodes[17]; // number of codes of this bit length - Guchar sym[256]; // symbols -}; - -class DCTStream: public FilterStream { -public: - - DCTStream(Stream *strA, int colorXformA, Dict *dict, int recursion); - virtual ~DCTStream(); - StreamKind getKind() override { return strDCT; } - void reset() override; - void close() override; - int getChar() override; - int lookChar() override; - GooString *getPSFilter(int psLevel, const char *indent) override; - GBool isBinary(GBool last = gTrue) override; - - void unfilteredReset() override; - -private: - - void dctReset(GBool unfiltered); - GBool progressive; // set if in progressive mode - GBool interleaved; // set if in interleaved mode - int width, height; // image size - int mcuWidth, mcuHeight; // size of min coding unit, in data units - int bufWidth, bufHeight; // frameBuf size - DCTCompInfo compInfo[4]; // info for each component - DCTScanInfo scanInfo; // info for the current scan - int numComps; // number of components in image - int colorXform; // color transform: -1 = unspecified - // 0 = none - // 1 = YUV/YUVK -> RGB/CMYK - GBool gotJFIFMarker; // set if APP0 JFIF marker was present - GBool gotAdobeMarker; // set if APP14 Adobe marker was present - int restartInterval; // restart interval, in MCUs - Gushort quantTables[4][64]; // quantization tables - int numQuantTables; // number of quantization tables - DCTHuffTable dcHuffTables[4]; // DC Huffman tables - DCTHuffTable acHuffTables[4]; // AC Huffman tables - int numDCHuffTables; // number of DC Huffman tables - int numACHuffTables; // number of AC Huffman tables - Guchar *rowBuf[4][32]; // buffer for one MCU (non-progressive mode) - int *frameBuf[4]; // buffer for frame (progressive mode) - int comp, x, y, dy; // current position within image/MCU - int restartCtr; // MCUs left until restart - int restartMarker; // next restart marker - int eobRun; // number of EOBs left in the current run - int inputBuf; // input buffer for variable length codes - int inputBits; // number of valid bits in input buffer - - void restart(); - GBool readMCURow(); - void readScan(); - GBool readDataUnit(DCTHuffTable *dcHuffTable, - DCTHuffTable *acHuffTable, - int *prevDC, int data[64]); - GBool readProgressiveDataUnit(DCTHuffTable *dcHuffTable, - DCTHuffTable *acHuffTable, - int *prevDC, int data[64]); - void decodeImage(); - void transformDataUnit(Gushort *quantTable, - int dataIn[64], Guchar dataOut[64]); - int readHuffSym(DCTHuffTable *table); - int readAmp(int size); - int readBit(); - GBool readHeader(); - GBool readBaselineSOF(); - GBool readProgressiveSOF(); - GBool readScanInfo(); - GBool readQuantTables(); - GBool readHuffmanTables(); - GBool readRestartInterval(); - GBool readJFIFMarker(); - GBool readAdobeMarker(); - GBool readTrailer(); - int readMarker(); - int read16(); -}; - -#endif - -#ifndef ENABLE_ZLIB_UNCOMPRESS -//------------------------------------------------------------------------ -// FlateStream -//------------------------------------------------------------------------ - -#define flateWindow 32768 // buffer size -#define flateMask (flateWindow-1) -#define flateMaxHuffman 15 // max Huffman code length -#define flateMaxCodeLenCodes 19 // max # code length codes -#define flateMaxLitCodes 288 // max # literal codes -#define flateMaxDistCodes 30 // max # distance codes - -// Huffman code table entry -struct FlateCode { - Gushort len; // code length, in bits - Gushort val; // value represented by this code -}; - -struct FlateHuffmanTab { - FlateCode *codes; - int maxLen; -}; - -// Decoding info for length and distance code words -struct FlateDecode { - int bits; // # extra bits - int first; // first length/distance -}; - -class FlateStream: public FilterStream { -public: - - FlateStream(Stream *strA, int predictor, int columns, - int colors, int bits); - ~FlateStream(); - StreamKind getKind() override { return strFlate; } - void reset() override; - int getChar() override; - int lookChar() override; - int getRawChar() override; - void getRawChars(int nChars, int *buffer) override; - GooString *getPSFilter(int psLevel, const char *indent) override; - GBool isBinary(GBool last = gTrue) override; - void unfilteredReset () override; - -private: - void flateReset(GBool unfiltered); - inline int doGetRawChar() { - int c; - - while (remain == 0) { - if (endOfBlock && eof) - return EOF; - readSome(); - } - c = buf[index]; - index = (index + 1) & flateMask; - --remain; - return c; - } - - GBool hasGetChars() override { return true; } - int getChars(int nChars, Guchar *buffer) override; - - StreamPredictor *pred; // predictor - Guchar buf[flateWindow]; // output data buffer - int index; // current index into output buffer - int remain; // number valid bytes in output buffer - int codeBuf; // input buffer - int codeSize; // number of bits in input buffer - int // literal and distance code lengths - codeLengths[flateMaxLitCodes + flateMaxDistCodes]; - FlateHuffmanTab litCodeTab; // literal code table - FlateHuffmanTab distCodeTab; // distance code table - GBool compressedBlock; // set if reading a compressed block - int blockLen; // remaining length of uncompressed block - GBool endOfBlock; // set when end of block is reached - GBool eof; // set when end of stream is reached - - static int // code length code reordering - codeLenCodeMap[flateMaxCodeLenCodes]; - static FlateDecode // length decoding info - lengthDecode[flateMaxLitCodes-257]; - static FlateDecode // distance decoding info - distDecode[flateMaxDistCodes]; - static FlateHuffmanTab // fixed literal code table - fixedLitCodeTab; - static FlateHuffmanTab // fixed distance code table - fixedDistCodeTab; - - void readSome(); - GBool startBlock(); - void loadFixedCodes(); - GBool readDynamicCodes(); - void compHuffmanCodes(int *lengths, int n, FlateHuffmanTab *tab); - int getHuffmanCodeWord(FlateHuffmanTab *tab); - int getCodeWord(int bits); -}; -#endif - -//------------------------------------------------------------------------ -// EOFStream -//------------------------------------------------------------------------ - -class EOFStream: public FilterStream { -public: - - EOFStream(Stream *strA); - ~EOFStream(); - StreamKind getKind() override { return strWeird; } - void reset() override {} - int getChar() override { return EOF; } - int lookChar() override { return EOF; } - GooString *getPSFilter(int /*psLevel*/, const char * /*indent*/) override { return NULL; } - GBool isBinary(GBool /*last = gTrue*/) override { return gFalse; } -}; - -//------------------------------------------------------------------------ -// BufStream -//------------------------------------------------------------------------ - -class BufStream: public FilterStream { -public: - - BufStream(Stream *strA, int bufSizeA); - ~BufStream(); - StreamKind getKind() override { return strWeird; } - void reset() override; - int getChar() override; - int lookChar() override; - GooString *getPSFilter(int psLevel, const char *indent) override - { return NULL; } - GBool isBinary(GBool last = gTrue) override; - - int lookChar(int idx); - -private: - - int *buf; - int bufSize; -}; - -//------------------------------------------------------------------------ -// FixedLengthEncoder -//------------------------------------------------------------------------ - -class FixedLengthEncoder: public FilterStream { -public: - - FixedLengthEncoder(Stream *strA, int lengthA); - ~FixedLengthEncoder(); - StreamKind getKind() override { return strWeird; } - void reset() override; - int getChar() override; - int lookChar() override; - GooString *getPSFilter(int /*psLevel*/, const char * /*indent*/) override { return NULL; } - GBool isBinary(GBool /*last = gTrue*/) override; - GBool isEncoder() override { return gTrue; } - -private: - - int length; - int count; -}; - -//------------------------------------------------------------------------ -// ASCIIHexEncoder -//------------------------------------------------------------------------ - -class ASCIIHexEncoder: public FilterStream { -public: - - ASCIIHexEncoder(Stream *strA); - ~ASCIIHexEncoder(); - StreamKind getKind() override { return strWeird; } - void reset() override; - int getChar() override - { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); } - int lookChar() override - { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); } - GooString *getPSFilter(int /*psLevel*/, const char * /*indent*/) override { return NULL; } - GBool isBinary(GBool /*last = gTrue*/) override { return gFalse; } - GBool isEncoder() override { return gTrue; } - -private: - - char buf[4]; - char *bufPtr; - char *bufEnd; - int lineLen; - GBool eof; - - GBool fillBuf(); -}; - -//------------------------------------------------------------------------ -// ASCII85Encoder -//------------------------------------------------------------------------ - -class ASCII85Encoder: public FilterStream { -public: - - ASCII85Encoder(Stream *strA); - ~ASCII85Encoder(); - StreamKind getKind() override { return strWeird; } - void reset() override; - int getChar() override - { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); } - int lookChar() override - { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); } - GooString *getPSFilter(int /*psLevel*/, const char * /*indent*/) override { return NULL; } - GBool isBinary(GBool /*last = gTrue*/) override { return gFalse; } - GBool isEncoder() override { return gTrue; } - -private: - - char buf[8]; - char *bufPtr; - char *bufEnd; - int lineLen; - GBool eof; - - GBool fillBuf(); -}; - -//------------------------------------------------------------------------ -// RunLengthEncoder -//------------------------------------------------------------------------ - -class RunLengthEncoder: public FilterStream { -public: - - RunLengthEncoder(Stream *strA); - ~RunLengthEncoder(); - StreamKind getKind() override { return strWeird; } - void reset() override; - int getChar() override - { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); } - int lookChar() override - { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); } - GooString *getPSFilter(int /*psLevel*/, const char * /*indent*/) override { return NULL; } - GBool isBinary(GBool /*last = gTrue*/) override { return gTrue; } - GBool isEncoder() override { return gTrue; } - -private: - - char buf[131]; - char *bufPtr; - char *bufEnd; - char *nextEnd; - GBool eof; - - GBool fillBuf(); -}; - -//------------------------------------------------------------------------ -// LZWEncoder -//------------------------------------------------------------------------ - -struct LZWEncoderNode { - int byte; - LZWEncoderNode *next; // next sibling - LZWEncoderNode *children; // first child -}; - -class LZWEncoder: public FilterStream { -public: - - LZWEncoder(Stream *strA); - ~LZWEncoder(); - StreamKind getKind() override { return strWeird; } - void reset() override; - int getChar() override; - int lookChar() override; - GooString *getPSFilter(int psLevel, const char *indent) override - { return NULL; } - GBool isBinary(GBool last = gTrue) override { return gTrue; } - GBool isEncoder() override { return gTrue; } - -private: - - LZWEncoderNode table[4096]; - int nextSeq; - int codeLen; - Guchar inBuf[4096]; - int inBufLen; - int outBuf; - int outBufLen; - GBool needEOD; - - void fillBuf(); -}; - -//------------------------------------------------------------------------ -// CMYKGrayEncoder -//------------------------------------------------------------------------ - -class CMYKGrayEncoder: public FilterStream { -public: - - CMYKGrayEncoder(Stream *strA); - ~CMYKGrayEncoder(); - StreamKind getKind() override { return strWeird; } - void reset() override; - int getChar() override - { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); } - int lookChar() override - { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); } - GooString *getPSFilter(int /*psLevel*/, const char * /*indent*/) override { return NULL; } - GBool isBinary(GBool /*last = gTrue*/) override { return gFalse; } - GBool isEncoder() override { return gTrue; } - -private: - - char buf[2]; - char *bufPtr; - char *bufEnd; - GBool eof; - - GBool fillBuf(); -}; - -//------------------------------------------------------------------------ -// RGBGrayEncoder -//------------------------------------------------------------------------ - -class RGBGrayEncoder: public FilterStream { -public: - - RGBGrayEncoder(Stream *strA); - ~RGBGrayEncoder(); - StreamKind getKind() override { return strWeird; } - void reset() override; - int getChar() override - { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); } - int lookChar() override - { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); } - GooString *getPSFilter(int /*psLevel*/, const char * /*indent*/) override { return NULL; } - GBool isBinary(GBool /*last = gTrue*/) override { return gFalse; } - GBool isEncoder() override { return gTrue; } - -private: - - char buf[2]; - char *bufPtr; - char *bufEnd; - GBool eof; - - GBool fillBuf(); -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/StructElement.cc b/Build/source/libs/poppler/poppler-src/poppler/StructElement.cc deleted file mode 100644 index d87cb20cc98..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/StructElement.cc +++ /dev/null @@ -1,1347 +0,0 @@ -//======================================================================== -// -// StructElement.cc -// -// This file is licensed under the GPLv2 or later -// -// Copyright 2013, 2014 Igalia S.L. -// Copyright 2014 Luigi Scarso <luigi.scarso@gmail.com> -// Copyright 2014, 2017, 2018 Albert Astals Cid <aacid@kde.org> -// Copyright 2015 Dmytro Morgun <lztoad@gmail.com> -// Copyright 2018 Adrian Johnson <ajohnson@redneon.com> -// Copyright 2018 Klarälvdalens Datakonsult AB, a KDAB Group company, <info@kdab.com>. Work sponsored by the LiMux project of the city of Munich -// -//======================================================================== - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "StructElement.h" -#include "StructTreeRoot.h" -#include "GlobalParams.h" -#include "UnicodeMap.h" -#include "PDFDoc.h" -#include "Dict.h" - -#include <assert.h> - -class GfxState; - - -static GBool isPlacementName(Object *value) -{ - return value->isName("Block") - || value->isName("Inline") - || value->isName("Before") - || value->isName("Start") - || value->isName("End"); -} - -static GBool isWritingModeName(Object *value) -{ - return value->isName("LrTb") - || value->isName("RlTb") - || value->isName("TbRl"); -} - -static GBool isBorderStyleName(Object *value) -{ - return value->isName("None") - || value->isName("Hidden") - || value->isName("Dotted") - || value->isName("Dashed") - || value->isName("Solid") - || value->isName("Double") - || value->isName("Groove") - || value->isName("Ridge") - || value->isName("Inset") - || value->isName("Outset"); -} - -static GBool isTextAlignName(Object *value) -{ - return value->isName("Start") - || value->isName("End") - || value->isName("Center") - || value->isName("Justify"); -} - -static GBool isBlockAlignName(Object *value) -{ - return value->isName("Before") - || value->isName("Middle") - || value->isName("After") - || value->isName("Justify"); -} - -static GBool isInlineAlignName(Object *value) -{ - return value->isName("Start") - || value->isName("End") - || value->isName("Center"); -} - -static GBool isNumber(Object *value) -{ - return value->isNum(); -} - -static GBool isLineHeight(Object *value) -{ - return value->isName("Normal") - || value->isName("Auto") - || isNumber(value); -} - -static GBool isTextDecorationName(Object *value) -{ - return value->isName("None") - || value->isName("Underline") - || value->isName("Overline") - || value->isName("LineThrough"); -} - -static GBool isRubyAlignName(Object *value) -{ - return value->isName("Start") - || value->isName("End") - || value->isName("Center") - || value->isName("Justify") - || value->isName("Distribute"); -} - -static GBool isRubyPositionName(Object *value) -{ - return value->isName("Before") - || value->isName("After") - || value->isName("Warichu") - || value->isName("Inline"); -} - -static GBool isGlyphOrientationName(Object *value) -{ - return value->isName("Auto") - || value->isName("90") - || value->isName("180") - || value->isName("270") - || value->isName("360") - || value->isName("-90") - || value->isName("-180"); -} - -static GBool isListNumberingName(Object *value) -{ - return value->isName("None") - || value->isName("Disc") - || value->isName("Circle") - || value->isName("Square") - || value->isName("Decimal") - || value->isName("UpperRoman") - || value->isName("LowerRoman") - || value->isName("UpperAlpha") - || value->isName("LowerAlpha"); -} - -static GBool isFieldRoleName(Object *value) -{ - return value->isName("rb") - || value->isName("cb") - || value->isName("pb") - || value->isName("tv"); -} - -static GBool isFieldCheckedName(Object *value) -{ - return value->isName("on") - || value->isName("off") - || value->isName("neutral"); -} - -static GBool isTableScopeName(Object *value) -{ - return value->isName("Row") - || value->isName("Column") - || value->isName("Both"); -} - -static GBool isRGBColor(Object *value) -{ - if (!(value->isArray() && value->arrayGetLength() == 3)) - return gFalse; - - GBool okay = gTrue; - for (int i = 0; i < 3; i++) { - Object obj = value->arrayGet(i); - if (!obj.isNum()) { - okay = gFalse; - break; - } - if (obj.getNum() < 0.0 || obj.getNum() > 1.0) { - okay = gFalse; - break; - } - } - - return okay; -} - -static GBool isNatural(Object *value) -{ - return (value->isInt() && value->getInt() > 0) - || (value->isInt64() && value->getInt64() > 0); -} - -static GBool isPositive(Object *value) -{ - return value->isNum() && value->getNum() >= 0.0; -} - -static GBool isNumberOrAuto(Object *value) -{ - return isNumber(value) || value->isName("Auto"); -} - -static GBool isTextString(Object *value) -{ - // XXX: Shall isName() also be checked? - return value->isString(); -} - - -#define ARRAY_CHECKER(name, checkItem, length, allowSingle, allowNulls) \ - static GBool name(Object *value) { \ - if (!value->isArray()) \ - return allowSingle ? checkItem(value) : gFalse; \ - \ - if (length && value->arrayGetLength() != length) \ - return gFalse; \ - \ - GBool okay = gTrue; \ - for (int i = 0; i < value->arrayGetLength(); i++) { \ - Object obj = value->arrayGet(i); \ - if ((!allowNulls && obj.isNull()) || !checkItem(&obj)) { \ - okay = gFalse; \ - break; \ - } \ - } \ - return okay; \ - } - -ARRAY_CHECKER(isRGBColorOrOptionalArray4, isRGBColor, 4, gTrue, gTrue ) -ARRAY_CHECKER(isPositiveOrOptionalArray4, isPositive, 4, gTrue, gTrue ) -ARRAY_CHECKER(isPositiveOrArray4, isPositive, 4, gTrue, gFalse) -ARRAY_CHECKER(isBorderStyle, isBorderStyleName, 4, gTrue, gTrue ) -ARRAY_CHECKER(isNumberArray4, isNumber, 4, gFalse, gFalse) -ARRAY_CHECKER(isNumberOrArrayN, isNumber, 0, gTrue, gFalse) -ARRAY_CHECKER(isTableHeaders, isTextString, 0, gFalse, gFalse) - - -// Type of functions used to do type-checking on attribute values -typedef GBool (*AttributeCheckFunc)(Object*); - -// Maps attributes to their names and whether the attribute can be inherited. -struct AttributeMapEntry { - Attribute::Type type; - const char *name; - const Object *defval; - GBool inherit; - AttributeCheckFunc check; -}; - -struct AttributeDefaults { - AttributeDefaults() {}; // needed to support old clang - - Object Inline = Object(objName, "Inline"); - Object LrTb = Object(objName, "LrTb"); - Object Normal = Object(objName, "Normal"); - Object Distribute = Object(objName, "Distribute"); - Object off = Object(objName, "off"); - Object Zero = Object(0.0); - Object Auto = Object(objName, "Auto"); - Object Start = Object(objName, "Start"); - Object None = Object(objName, "None"); - Object Before = Object(objName, "Before"); - Object Nat1 = Object(1); -}; - -static const AttributeDefaults attributeDefaults; - - -#define ATTR_LIST_END \ - { Attribute::Unknown, nullptr, nullptr, gFalse, nullptr } - -#define ATTR_WITH_DEFAULT(name, inherit, check, defval) \ - { Attribute::name, \ - #name, \ - &attributeDefaults.defval, \ - inherit, \ - check } - -#define ATTR(name, inherit, check) \ - { Attribute::name, \ - #name, \ - nullptr, \ - inherit, \ - check } - -static const AttributeMapEntry attributeMapCommonShared[] = -{ - ATTR_WITH_DEFAULT(Placement, gFalse, isPlacementName, Inline), - ATTR_WITH_DEFAULT(WritingMode, gTrue, isWritingModeName, LrTb), - ATTR (BackgroundColor, gFalse, isRGBColor), - ATTR (BorderColor, gTrue, isRGBColorOrOptionalArray4), - ATTR_WITH_DEFAULT(BorderStyle, gFalse, isBorderStyle, None), - ATTR (BorderThickness, gTrue, isPositiveOrOptionalArray4), - ATTR_WITH_DEFAULT(Padding, gFalse, isPositiveOrArray4, Zero), - ATTR (Color, gTrue, isRGBColor), - ATTR_LIST_END -}; - -static const AttributeMapEntry attributeMapCommonBlock[] = -{ - ATTR_WITH_DEFAULT(SpaceBefore, gFalse, isPositive, Zero), - ATTR_WITH_DEFAULT(SpaceAfter, gFalse, isPositive, Zero), - ATTR_WITH_DEFAULT(StartIndent, gTrue, isNumber, Zero), - ATTR_WITH_DEFAULT(EndIndent, gTrue, isNumber, Zero), - ATTR_WITH_DEFAULT(TextIndent, gTrue, isNumber, Zero), - ATTR_WITH_DEFAULT(TextAlign, gTrue, isTextAlignName, Start), - ATTR (BBox, gFalse, isNumberArray4), - ATTR_WITH_DEFAULT(Width, gFalse, isNumberOrAuto, Auto), - ATTR_WITH_DEFAULT(Height, gFalse, isNumberOrAuto, Auto), - ATTR_WITH_DEFAULT(BlockAlign, gTrue, isBlockAlignName, Before), - ATTR_WITH_DEFAULT(InlineAlign, gTrue, isInlineAlignName, Start), - ATTR_LIST_END -}; - -static const AttributeMapEntry attributeMapCommonInline[] = -{ - ATTR_WITH_DEFAULT(BaselineShift, gFalse, isNumber, Zero), - ATTR_WITH_DEFAULT(LineHeight, gTrue, isLineHeight, Normal), - ATTR (TextDecorationColor, gTrue, isRGBColor), - ATTR (TextDecorationThickness, gTrue, isPositive), - ATTR_WITH_DEFAULT(TextDecorationType, gFalse, isTextDecorationName, None), - ATTR_WITH_DEFAULT(GlyphOrientationVertical, gTrue, isGlyphOrientationName, Auto), - ATTR_LIST_END -}; - -static const AttributeMapEntry attributeMapCommonRubyText[] = -{ - ATTR_WITH_DEFAULT(RubyPosition, gTrue, isRubyPositionName, Before), - ATTR_WITH_DEFAULT(RubyAlign, gTrue, isRubyAlignName, Distribute), - ATTR_LIST_END -}; - -static const AttributeMapEntry attributeMapCommonColumns[] = -{ - ATTR_WITH_DEFAULT(ColumnCount, gFalse, isNatural, Nat1), - ATTR (ColumnGap, gFalse, isNumberOrArrayN), - ATTR (ColumnWidths, gFalse, isNumberOrArrayN), - ATTR_LIST_END -}; - -static const AttributeMapEntry attributeMapCommonList[] = { - ATTR_WITH_DEFAULT(ListNumbering, gTrue, isListNumberingName, None), - ATTR_LIST_END -}; - -static const AttributeMapEntry attributeMapCommonPrintField[] = -{ - ATTR (Role, gFalse, isFieldRoleName), - ATTR_WITH_DEFAULT(checked, gFalse, isFieldCheckedName, off), - ATTR (Desc, gFalse, isTextString), - ATTR_LIST_END -}; - -static const AttributeMapEntry attributeMapCommonTable[] = -{ - ATTR(Headers, gFalse, isTableHeaders), - ATTR(Scope, gFalse, isTableScopeName), - ATTR(Summary, gFalse, isTextString), - ATTR_LIST_END -}; - -static const AttributeMapEntry attributeMapCommonTableCell[] = -{ - ATTR_WITH_DEFAULT(RowSpan, gFalse, isNatural, Nat1), - ATTR_WITH_DEFAULT(ColSpan, gFalse, isNatural, Nat1), - ATTR_WITH_DEFAULT(TBorderStyle, gTrue, isBorderStyle, None), - ATTR_WITH_DEFAULT(TPadding, gTrue, isPositiveOrArray4, Zero), - ATTR_LIST_END -}; - -#undef ATTR_WITH_DEFAULT -#undef ATTR - - -static const AttributeMapEntry *attributeMapAll[] = { - attributeMapCommonShared, - attributeMapCommonBlock, - attributeMapCommonInline, - attributeMapCommonRubyText, - attributeMapCommonColumns, - attributeMapCommonList, - attributeMapCommonPrintField, - attributeMapCommonTable, - attributeMapCommonTableCell, - nullptr, -}; - -static const AttributeMapEntry *attributeMapShared[] = { - attributeMapCommonShared, - nullptr, -}; - -static const AttributeMapEntry *attributeMapBlock[] = { - attributeMapCommonShared, - attributeMapCommonBlock, - nullptr, -}; - -static const AttributeMapEntry *attributeMapInline[] = { - attributeMapCommonShared, - attributeMapCommonInline, - nullptr, -}; - -static const AttributeMapEntry *attributeMapTableCell[] = { - attributeMapCommonShared, - attributeMapCommonBlock, - attributeMapCommonTable, - attributeMapCommonTableCell, - nullptr, -}; - -static const AttributeMapEntry *attributeMapRubyText[] = { - attributeMapCommonShared, - attributeMapCommonInline, - attributeMapCommonRubyText, - nullptr, -}; - -static const AttributeMapEntry *attributeMapColumns[] = { - attributeMapCommonShared, - attributeMapCommonInline, - attributeMapCommonColumns, - nullptr, -}; - -static const AttributeMapEntry *attributeMapList[] = { - attributeMapCommonShared, - attributeMapCommonList, - nullptr, -}; - -static const AttributeMapEntry *attributeMapTable[] = { - attributeMapCommonShared, - attributeMapCommonBlock, - attributeMapCommonTable, - nullptr, -}; - -static const AttributeMapEntry *attributeMapIllustration[] = { - // XXX: Illustrations may have some attributes from the "shared", "inline", - // the "block" sets. This is a loose specification; making it better - // means duplicating entries from the sets. This seems good enough... - attributeMapCommonShared, - attributeMapCommonBlock, - attributeMapCommonInline, - nullptr, -}; - -// Table mapping owners of attributes to their names. -static const struct OwnerMapEntry { - Attribute::Owner owner; - const char *name; -} ownerMap[] = { - // XXX: Those are sorted in the owner priority resolution order. If the - // same attribute is defined with two owners, the order in the table - // can be used to know which one has more priority. - { Attribute::XML_1_00, "XML-1.00" }, - { Attribute::HTML_3_20, "HTML-3.20" }, - { Attribute::HTML_4_01, "HTML-4.01" }, - { Attribute::OEB_1_00, "OEB-1.00" }, - { Attribute::RTF_1_05, "RTF-1.05" }, - { Attribute::CSS_1_00, "CSS-1.00" }, - { Attribute::CSS_2_00, "CSS-2.00" }, - { Attribute::Layout, "Layout" }, - { Attribute::PrintField, "PrintField" }, - { Attribute::Table, "Table" }, - { Attribute::List, "List" }, - { Attribute::UserProperties, "UserProperties" }, -}; - - -static GBool ownerHasMorePriority(Attribute::Owner a, Attribute::Owner b) -{ - unsigned aIndex, bIndex; - - for (unsigned i = aIndex = bIndex = 0; i < sizeof(ownerMap) / sizeof(ownerMap[0]); i++) { - if (ownerMap[i].owner == a) - aIndex = i; - if (ownerMap[i].owner == b) - bIndex = i; - } - - return aIndex < bIndex; -} - - -// Maps element types to their names and also serves as lookup table -// for additional element type attributes. - -enum ElementType { - elementTypeUndefined, - elementTypeGrouping, - elementTypeInline, - elementTypeBlock, -}; - -static const struct TypeMapEntry { - StructElement::Type type; - const char *name; - ElementType elementType; - const AttributeMapEntry **attributes; -} typeMap[] = { - { StructElement::Document, "Document", elementTypeGrouping, attributeMapShared }, - { StructElement::Part, "Part", elementTypeGrouping, attributeMapShared }, - { StructElement::Art, "Art", elementTypeGrouping, attributeMapColumns }, - { StructElement::Sect, "Sect", elementTypeGrouping, attributeMapColumns }, - { StructElement::Div, "Div", elementTypeGrouping, attributeMapColumns }, - { StructElement::BlockQuote, "BlockQuote", elementTypeGrouping, attributeMapInline }, - { StructElement::Caption, "Caption", elementTypeGrouping, attributeMapInline }, - { StructElement::NonStruct, "NonStruct", elementTypeGrouping, attributeMapInline }, - { StructElement::Index, "Index", elementTypeGrouping, attributeMapInline }, - { StructElement::Private, "Private", elementTypeGrouping, attributeMapInline }, - { StructElement::Span, "Span", elementTypeInline, attributeMapInline }, - { StructElement::Quote, "Quote", elementTypeInline, attributeMapInline }, - { StructElement::Note, "Note", elementTypeInline, attributeMapInline }, - { StructElement::Reference, "Reference", elementTypeInline, attributeMapInline }, - { StructElement::BibEntry, "BibEntry", elementTypeInline, attributeMapInline }, - { StructElement::Code, "Code", elementTypeInline, attributeMapInline }, - { StructElement::Link, "Link", elementTypeInline, attributeMapInline }, - { StructElement::Annot, "Annot", elementTypeInline, attributeMapInline }, - { StructElement::Ruby, "Ruby", elementTypeInline, attributeMapRubyText }, - { StructElement::RB, "RB", elementTypeUndefined, attributeMapRubyText }, - { StructElement::RT, "RT", elementTypeUndefined, attributeMapRubyText }, - { StructElement::RP, "RP", elementTypeUndefined, attributeMapShared }, - { StructElement::Warichu, "Warichu", elementTypeInline, attributeMapRubyText }, - { StructElement::WT, "WT", elementTypeUndefined, attributeMapShared }, - { StructElement::WP, "WP", elementTypeUndefined, attributeMapShared }, - { StructElement::P, "P", elementTypeBlock, attributeMapBlock }, - { StructElement::H, "H", elementTypeBlock, attributeMapBlock }, - { StructElement::H1, "H1", elementTypeBlock, attributeMapBlock }, - { StructElement::H2, "H2", elementTypeBlock, attributeMapBlock }, - { StructElement::H3, "H3", elementTypeBlock, attributeMapBlock }, - { StructElement::H4, "H4", elementTypeBlock, attributeMapBlock }, - { StructElement::H5, "H5", elementTypeBlock, attributeMapBlock }, - { StructElement::H6, "H6", elementTypeBlock, attributeMapBlock }, - { StructElement::L, "L", elementTypeBlock, attributeMapList }, - { StructElement::LI, "LI", elementTypeBlock, attributeMapBlock }, - { StructElement::Lbl, "Lbl", elementTypeBlock, attributeMapBlock }, - { StructElement::LBody, "LBody", elementTypeBlock, attributeMapBlock }, - { StructElement::Table, "Table", elementTypeBlock, attributeMapTable }, - { StructElement::TR, "TR", elementTypeUndefined, attributeMapShared }, - { StructElement::TH, "TH", elementTypeUndefined, attributeMapTableCell }, - { StructElement::TD, "TD", elementTypeUndefined, attributeMapTableCell }, - { StructElement::THead, "THead", elementTypeUndefined, attributeMapShared }, - { StructElement::TFoot, "TFoot", elementTypeUndefined, attributeMapShared }, - { StructElement::TBody, "TBody", elementTypeUndefined, attributeMapShared }, - { StructElement::Figure, "Figure", elementTypeUndefined, attributeMapIllustration }, - { StructElement::Formula, "Formula", elementTypeUndefined, attributeMapIllustration }, - { StructElement::Form, "Form", elementTypeUndefined, attributeMapIllustration }, - { StructElement::TOC, "TOC", elementTypeGrouping, attributeMapShared }, - { StructElement::TOCI, "TOCI", elementTypeGrouping, attributeMapShared }, -}; - - -//------------------------------------------------------------------------ -// Helpers for the attribute and structure type tables -//------------------------------------------------------------------------ - -static inline const AttributeMapEntry * -getAttributeMapEntry(const AttributeMapEntry **entryList, Attribute::Type type) -{ - assert(entryList); - while (*entryList) { - const AttributeMapEntry *entry = *entryList; - while (entry->type != Attribute::Unknown) { - assert(entry->name); - if (type == entry->type) - return entry; - entry++; - } - entryList++; - } - return nullptr; -} - -static inline const AttributeMapEntry * -getAttributeMapEntry(const AttributeMapEntry **entryList, const char *name) -{ - assert(entryList); - while (*entryList) { - const AttributeMapEntry *entry = *entryList; - while (entry->type != Attribute::Unknown) { - assert(entry->name); - if (strcmp(name, entry->name) == 0) - return entry; - entry++; - } - entryList++; - } - return nullptr; -} - -static inline const OwnerMapEntry *getOwnerMapEntry(Attribute::Owner owner) -{ - for (unsigned i = 0; i < sizeof(ownerMap) / sizeof(ownerMap[0]); i++) { - if (owner == ownerMap[i].owner) - return &ownerMap[i]; - } - return nullptr; -} - -static inline const OwnerMapEntry *getOwnerMapEntry(const char *name) -{ - for (unsigned i = 0; i < sizeof(ownerMap) / sizeof(ownerMap[0]); i++) { - if (strcmp(name, ownerMap[i].name) == 0) - return &ownerMap[i]; - } - return nullptr; -} - -static const char *ownerToName(Attribute::Owner owner) -{ - const OwnerMapEntry *entry = getOwnerMapEntry(owner); - return entry ? entry->name : "UnknownOwner"; -} - -static Attribute::Owner nameToOwner(const char *name) -{ - const OwnerMapEntry *entry = getOwnerMapEntry(name); - return entry ? entry->owner : Attribute::UnknownOwner; -} - -static inline const TypeMapEntry *getTypeMapEntry(StructElement::Type type) -{ - for (unsigned i = 0; i < sizeof(typeMap) / sizeof(typeMap[0]); i++) { - if (type == typeMap[i].type) - return &typeMap[i]; - } - return nullptr; -} - -static inline const TypeMapEntry *getTypeMapEntry(const char *name) -{ - for (unsigned i = 0; i < sizeof(typeMap) / sizeof(typeMap[0]); i++) { - if (strcmp(name, typeMap[i].name) == 0) - return &typeMap[i]; - } - return nullptr; -} - -static const char *typeToName(StructElement::Type type) -{ - if (type == StructElement::MCID) - return "MarkedContent"; - if (type == StructElement::OBJR) - return "ObjectReference"; - - const TypeMapEntry *entry = getTypeMapEntry(type); - return entry ? entry->name : "Unknown"; -} - -static StructElement::Type nameToType(const char *name) -{ - const TypeMapEntry *entry = getTypeMapEntry(name); - return entry ? entry->type : StructElement::Unknown; -} - - -//------------------------------------------------------------------------ -// Attribute -//------------------------------------------------------------------------ - -Attribute::Attribute(const char *nameA, int nameLenA, Object *valueA): - type(UserProperty), - owner(UserProperties), - revision(0), - name(nameA, nameLenA), - value(), - hidden(gFalse), - formatted(nullptr) -{ - assert(valueA); - value = valueA->copy(); -} - -Attribute::Attribute(Type typeA, Object *valueA): - type(typeA), - owner(UserProperties), // TODO: Determine corresponding owner from Type - revision(0), - name(), - value(), - hidden(gFalse), - formatted(nullptr) -{ - assert(valueA); - - value = valueA->copy(); - - if (!checkType()) - type = Unknown; -} - -Attribute::~Attribute() -{ - delete formatted; -} - -const char *Attribute::getTypeName() const -{ - if (type == UserProperty) - return name.getCString(); - - const AttributeMapEntry *entry = getAttributeMapEntry(attributeMapAll, type); - if (entry) - return entry->name; - - return "Unknown"; -} - -const char *Attribute::getOwnerName() const -{ - return ownerToName(owner); -} - -Object *Attribute::getDefaultValue(Attribute::Type type) -{ - const AttributeMapEntry *entry = getAttributeMapEntry(attributeMapAll, type); - return entry ? const_cast<Object*>(entry->defval) : nullptr; -} - -void Attribute::setFormattedValue(const char *formattedA) -{ - if (formattedA) { - if (formatted) - formatted->Set(formattedA); - else - formatted = new GooString(formattedA); - } else { - delete formatted; - formatted = nullptr; - } -} - -GBool Attribute::checkType(StructElement *element) -{ - // If an element is passed, tighther type-checking can be done. - if (!element) - return gTrue; - - const TypeMapEntry *elementTypeEntry = getTypeMapEntry(element->getType()); - if (elementTypeEntry && elementTypeEntry->attributes) { - const AttributeMapEntry *entry = getAttributeMapEntry(elementTypeEntry->attributes, type); - if (entry) { - if (entry->check && !((*entry->check)(&value))) { - return gFalse; - } - } else { - // No entry: the attribute is not valid for the containing element. - return gFalse; - } - } - - return gTrue; -} - -Attribute::Type Attribute::getTypeForName(const char *name, StructElement *element) -{ - const AttributeMapEntry **attributes = attributeMapAll; - if (element) { - const TypeMapEntry *elementTypeEntry = getTypeMapEntry(element->getType()); - if (elementTypeEntry && elementTypeEntry->attributes) { - attributes = elementTypeEntry->attributes; - } - } - - const AttributeMapEntry *entry = getAttributeMapEntry(attributes, name); - return entry ? entry->type : Unknown; -} - -Attribute *Attribute::parseUserProperty(Dict *property) -{ - Object obj, value; - const char *name = nullptr; - int nameLen = GooString::CALC_STRING_LEN; - - obj = property->lookup("N"); - if (obj.isString()) { - const GooString *s = obj.getString(); - name = s->getCString(); - nameLen = s->getLength(); - } else if (obj.isName()) - name = obj.getName(); - else { - error(errSyntaxError, -1, "N object is wrong type ({0:s})", obj.getTypeName()); - return nullptr; - } - - value = property->lookup("V"); - if (value.isNull()) { - error(errSyntaxError, -1, "V object is wrong type ({0:s})", value.getTypeName()); - return nullptr; - } - - Attribute *attribute = new Attribute(name, nameLen, &value); - obj = property->lookup("F"); - if (obj.isString()) { - attribute->setFormattedValue(obj.getString()->getCString()); - } else if (!obj.isNull()) { - error(errSyntaxWarning, -1, "F object is wrong type ({0:s})", obj.getTypeName()); - } - - obj = property->lookup("H"); - if (obj.isBool()) { - attribute->setHidden(obj.getBool()); - } else if (!obj.isNull()) { - error(errSyntaxWarning, -1, "H object is wrong type ({0:s})", obj.getTypeName()); - } - - return attribute; -} - - -//------------------------------------------------------------------------ -// StructElement -//------------------------------------------------------------------------ - -StructElement::StructData::StructData(): - altText(nullptr), - actualText(nullptr), - id(nullptr), - title(nullptr), - expandedAbbr(nullptr), - language(nullptr), - revision(0) -{ -} - -StructElement::StructData::~StructData() -{ - delete altText; - delete actualText; - delete id; - delete title; - delete language; - for (ElemPtrArray::iterator i = elements.begin(); i != elements.end(); ++i) delete *i; - for (AttrPtrArray::iterator i = attributes.begin(); i != attributes.end(); ++i) delete *i; -} - - -StructElement::StructElement(Dict *element, - StructTreeRoot *treeRootA, - StructElement *parentA, - std::set<int> &seen): - type(Unknown), - treeRoot(treeRootA), - parent(parentA), - s(new StructData()) -{ - assert(treeRoot); - assert(element); - - parse(element); - parseChildren(element, seen); -} - -StructElement::StructElement(int mcid, StructTreeRoot *treeRootA, StructElement *parentA): - type(MCID), - treeRoot(treeRootA), - parent(parentA), - c(new ContentData(mcid)) -{ - assert(treeRoot); - assert(parent); -} - -StructElement::StructElement(const Ref& ref, StructTreeRoot *treeRootA, StructElement *parentA): - type(OBJR), - treeRoot(treeRootA), - parent(parentA), - c(new ContentData(ref)) -{ - assert(treeRoot); - assert(parent); -} - -StructElement::~StructElement() -{ - if (isContent()) - delete c; - else - delete s; -} - -GBool StructElement::isBlock() const -{ - const TypeMapEntry *entry = getTypeMapEntry(type); - return entry ? (entry->elementType == elementTypeBlock) : gFalse; -} - -GBool StructElement::isInline() const -{ - const TypeMapEntry *entry = getTypeMapEntry(type); - return entry ? (entry->elementType == elementTypeInline) : gFalse; -} - -GBool StructElement::isGrouping() const -{ - const TypeMapEntry *entry = getTypeMapEntry(type); - return entry ? (entry->elementType == elementTypeGrouping) : gFalse; -} - -GBool StructElement::hasPageRef() const -{ - return pageRef.isRef() || (parent && parent->hasPageRef()); -} - -bool StructElement::getPageRef(Ref& ref) const -{ - if (pageRef.isRef()) { - ref = pageRef.getRef(); - return gTrue; - } - - if (parent) - return parent->getPageRef(ref); - - return gFalse; -} - -const char *StructElement::getTypeName() const -{ - return typeToName(type); -} - -const Attribute *StructElement::findAttribute(Attribute::Type attributeType, GBool inherit, - Attribute::Owner attributeOwner) const -{ - if (isContent()) - return parent->findAttribute(attributeType, inherit, attributeOwner); - - if (attributeType == Attribute::Unknown || attributeType == Attribute::UserProperty) - return nullptr; - - const Attribute *result = nullptr; - - if (attributeOwner == Attribute::UnknownOwner) { - // Search for the attribute, no matter who the owner is - for (unsigned i = 0; i < getNumAttributes(); i++) { - const Attribute *attr = getAttribute(i); - if (attributeType == attr->getType()) { - if (!result || ownerHasMorePriority(attr->getOwner(), result->getOwner())) - result = attr; - } - } - } else { - // Search for the attribute, with a specific owner - for (unsigned i = 0; i < getNumAttributes(); i++) { - const Attribute *attr = getAttribute(i); - if (attributeType == attr->getType() && attributeOwner == attr->getOwner()) { - result = attr; - break; - } - } - } - - if (result) - return result; - - if (inherit && parent) { - const AttributeMapEntry *entry = getAttributeMapEntry(attributeMapAll, attributeType); - assert(entry); - // TODO: Take into account special inheritance cases, for example: - // inline elements which have been changed to be block using - // "/Placement/Block" have slightly different rules. - if (entry->inherit) - return parent->findAttribute(attributeType, inherit, attributeOwner); - } - - return nullptr; -} - -GooString* StructElement::appendSubTreeText(GooString *string, GBool recursive) const -{ - if (isContent() && !isObjectRef()) { - MarkedContentOutputDev mcdev(getMCID()); - const TextSpanArray& spans(getTextSpansInternal(mcdev)); - - if (!string) - string = new GooString(); - - for (TextSpanArray::const_iterator i = spans.begin(); i != spans.end(); ++i) - string->append(i->getText()); - - return string; - } - - if (!recursive) - return nullptr; - - // Do a depth-first traversal, to get elements in logical order - if (!string) - string = new GooString(); - - for (unsigned i = 0; i < getNumChildren(); i++) - getChild(i)->appendSubTreeText(string, recursive); - - return string; -} - -const TextSpanArray& StructElement::getTextSpansInternal(MarkedContentOutputDev& mcdev) const -{ - assert(isContent()); - - int startPage = 0, endPage = 0; - - Ref ref; - if (getPageRef(ref)) { - startPage = endPage = treeRoot->getDoc()->findPage(ref.num, ref.gen); - } - - if (!(startPage && endPage)) { - startPage = 1; - endPage = treeRoot->getDoc()->getNumPages(); - } - - treeRoot->getDoc()->displayPages(&mcdev, startPage, endPage, 72.0, 72.0, 0, gTrue, gFalse, gFalse); - return mcdev.getTextSpans(); -} - -static StructElement::Type roleMapResolve(Dict *roleMap, const char *name, const char *curName) -{ - // Circular reference - if (curName && !strcmp(name, curName)) - return StructElement::Unknown; - - Object resolved = roleMap->lookup(curName ? curName : name); - if (resolved.isName()) { - StructElement::Type type = nameToType(resolved.getName()); - return type == StructElement::Unknown - ? roleMapResolve(roleMap, name, resolved.getName()) - : type; - } - - if (!resolved.isNull()) - error(errSyntaxWarning, -1, "RoleMap entry is wrong type ({0:s})", resolved.getTypeName()); - return StructElement::Unknown; -} - -void StructElement::parse(Dict *element) -{ - Object obj; - - // Type is optional, but if present must be StructElem - obj = element->lookup("Type"); - if (!obj.isNull() && !obj.isName("StructElem")) { - error(errSyntaxError, -1, "Type of StructElem object is wrong"); - return; - } - - // Parent object reference (required). - s->parentRef = element->lookupNF("P"); - if (!s->parentRef.isRef()) { - error(errSyntaxError, -1, "P object is wrong type ({0:s})", obj.getTypeName()); - return; - } - - // Check whether the S-type is valid for the top level - // element and create a node of the appropriate type. - obj = element->lookup("S"); - if (!obj.isName()) { - error(errSyntaxError, -1, "S object is wrong type ({0:s})", obj.getTypeName()); - return; - } - - // Type name may not be standard, resolve through RoleMap first. - if (treeRoot->getRoleMap()) { - type = roleMapResolve(treeRoot->getRoleMap(), obj.getName(), nullptr); - } - - // Resolving through RoleMap may leave type as Unknown, e.g. for types - // which are not present in it, yet they are standard element types. - if (type == Unknown) - type = nameToType(obj.getName()); - - // At this point either the type name must have been resolved. - if (type == Unknown) { - error(errSyntaxError, -1, "StructElem object is wrong type ({0:s})", obj.getName()); - return; - } - - // Object ID (optional), to be looked at the IDTree in the tree root. - obj = element->lookup("ID"); - if (obj.isString()) { - s->id = obj.takeString(); - } - - // Page reference (optional) in which at least one of the child items - // is to be rendered in. Note: each element stores only the /Pg value - // contained by it, and StructElement::getPageRef() may look in parent - // elements to find the page where an element belongs. - pageRef = element->lookupNF("Pg"); - - // Revision number (optional). - obj = element->lookup("R"); - if (obj.isInt()) { - s->revision = obj.getInt(); - } - - // Element title (optional). - obj = element->lookup("T"); - if (obj.isString()) { - s->title = obj.takeString(); - } - - // Language (optional). - obj = element->lookup("Lang"); - if (obj.isString()) { - s->language = obj.takeString(); - } - - // Alternative text (optional). - obj = element->lookup("Alt"); - if (obj.isString()) { - s->altText = obj.takeString(); - } - - // Expanded form of an abbreviation (optional). - obj = element->lookup("E"); - if (obj.isString()) { - s->expandedAbbr = obj.takeString(); - } - - // Actual text (optional). - obj = element->lookup("ActualText"); - if (obj.isString()) { - s->actualText = obj.takeString(); - } - - // Attributes directly attached to the element (optional). - obj = element->lookup("A"); - if (obj.isDict()) { - parseAttributes(obj.getDict()); - } else if (obj.isArray()) { - unsigned attrIndex = getNumAttributes(); - for (int i = 0; i < obj.arrayGetLength(); i++) { - Object iobj = obj.arrayGet(i); - if (iobj.isDict()) { - attrIndex = getNumAttributes(); - parseAttributes(iobj.getDict()); - } else if (iobj.isInt()) { - const int revision = iobj.getInt(); - // Set revision numbers for the elements previously created. - for (unsigned j = attrIndex; j < getNumAttributes(); j++) - getAttribute(j)->setRevision(revision); - } else { - error(errSyntaxWarning, -1, "A item is wrong type ({0:s})", iobj.getTypeName()); - } - } - } else if (!obj.isNull()) { - error(errSyntaxWarning, -1, "A is wrong type ({0:s})", obj.getTypeName()); - } - - // Attributes referenced indirectly through the ClassMap (optional). - if (treeRoot->getClassMap()) { - Object classes = element->lookup("C"); - if (classes.isName()) { - Object attr = treeRoot->getClassMap()->lookup(classes.getName()); - if (attr.isDict()) { - parseAttributes(attr.getDict(), gTrue); - } else if (attr.isArray()) { - for (int i = 0; i < attr.arrayGetLength(); i++) { - unsigned attrIndex = getNumAttributes(); - Object iobj = attr.arrayGet(i); - if (iobj.isDict()) { - attrIndex = getNumAttributes(); - parseAttributes(iobj.getDict(), gTrue); - } else if (iobj.isInt()) { - // Set revision numbers for the elements previously created. - const int revision = iobj.getInt(); - for (unsigned j = attrIndex; j < getNumAttributes(); j++) - getAttribute(j)->setRevision(revision); - } else { - error(errSyntaxWarning, -1, "C item is wrong type ({0:s})", iobj.getTypeName()); - } - } - } else if (!attr.isNull()) { - error(errSyntaxWarning, -1, "C object is wrong type ({0:s})", classes.getTypeName()); - } - } - } -} - -StructElement *StructElement::parseChild(Object *ref, - Object *childObj, - std::set<int> &seen) -{ - assert(childObj); - assert(ref); - - StructElement *child = nullptr; - - if (childObj->isInt()) { - child = new StructElement(childObj->getInt(), treeRoot, this); - } else if (childObj->isDict("MCR")) { - /* - * TODO: The optional Stm/StwOwn attributes are not handled, so all the - * page will be always scanned when calling StructElement::getText(). - */ - Object mcidObj = childObj->dictLookup("MCID"); - if (!mcidObj.isInt()) { - error(errSyntaxError, -1, "MCID object is wrong type ({0:s})", mcidObj.getTypeName()); - return nullptr; - } - - child = new StructElement(mcidObj.getInt(), treeRoot, this); - - Object pageRefObj = childObj->dictLookupNF("Pg"); - if (pageRefObj.isRef()) { - child->pageRef = std::move(pageRefObj); - } - } else if (childObj->isDict("OBJR")) { - Object refObj = childObj->dictLookupNF("Obj"); - if (refObj.isRef()) { - - child = new StructElement(refObj.getRef(), treeRoot, this); - - Object pageRefObj = childObj->dictLookupNF("Pg"); - if (pageRefObj.isRef()) { - child->pageRef = std::move(pageRefObj); - } - } else { - error(errSyntaxError, -1, "Obj object is wrong type ({0:s})", refObj.getTypeName()); - } - } else if (childObj->isDict()) { - if (!ref->isRef()) { - error(errSyntaxError, -1, - "Structure element dictionary is not an indirect reference ({0:s})", - ref->getTypeName()); - } else if (seen.find(ref->getRefNum()) == seen.end()) { - seen.insert(ref->getRefNum()); - child = new StructElement(childObj->getDict(), treeRoot, this, seen); - } else { - error(errSyntaxWarning, -1, - "Loop detected in structure tree, skipping subtree at object {0:d}:{1:d}", - ref->getRefNum(), ref->getRefGen()); - } - } else { - error(errSyntaxWarning, -1, "K has a child of wrong type ({0:s})", childObj->getTypeName()); - } - - if (child) { - if (child->isOk()) { - appendChild(child); - if (ref->isRef()) - treeRoot->parentTreeAdd(ref->getRef(), child); - } else { - delete child; - child = nullptr; - } - } - - return child; -} - -void StructElement::parseChildren(Dict *element, std::set<int> &seen) -{ - Object kids = element->lookup("K"); - if (kids.isArray()) { - for (int i = 0; i < kids.arrayGetLength(); i++) { - Object obj = kids.arrayGet(i); - Object ref = kids.arrayGetNF(i); - parseChild(&ref, &obj, seen); - } - } else if (kids.isDict() || kids.isInt()) { - Object ref = element->lookupNF("K"); - parseChild(&ref, &kids, seen); - } -} - -void StructElement::parseAttributes(Dict *attributes, GBool keepExisting) -{ - Object owner = attributes->lookup("O"); - if (owner.isName("UserProperties")) { - // In this case /P is an array of UserProperty dictionaries - Object userProperties = attributes->lookup("P"); - if (userProperties.isArray()) { - for (int i = 0; i < userProperties.arrayGetLength(); i++) { - Object property = userProperties.arrayGet(i); - if (property.isDict()) { - Attribute *attribute = Attribute::parseUserProperty(property.getDict()); - if (attribute && attribute->isOk()) { - appendAttribute(attribute); - } else { - error(errSyntaxWarning, -1, "Item in P is invalid"); - delete attribute; - } - } else { - error(errSyntaxWarning, -1, "Item in P is wrong type ({0:s})", property.getTypeName()); - } - } - } - } else if (owner.isName()) { - // In this case /P contains standard attributes. - // Check first if the owner is a valid standard one. - Attribute::Owner ownerValue = nameToOwner(owner.getName()); - if (ownerValue != Attribute::UnknownOwner) { - // Iterate over the entries of the "attributes" dictionary. - // The /O entry (owner) is skipped. - for (int i = 0; i < attributes->getLength(); i++) { - const char *key = attributes->getKey(i); - if (strcmp(key, "O") != 0) { - Attribute::Type type = Attribute::getTypeForName(key, this); - - // Check if the attribute is already defined. - if (keepExisting) { - GBool exists = gFalse; - for (unsigned j = 0; j < getNumAttributes(); j++) { - if (getAttribute(j)->getType() == type) { - exists = gTrue; - break; - } - } - if (exists) - continue; - } - - if (type != Attribute::Unknown) { - Object value = attributes->getVal(i); - GBool typeCheckOk = gTrue; - Attribute *attribute = new Attribute(type, &value); - - if (attribute->isOk() && (typeCheckOk = attribute->checkType(this))) { - appendAttribute(attribute); - } else { - // It is not needed to free "value", the Attribute instance - // owns the contents, so deleting "attribute" is enough. - if (!typeCheckOk) { - error(errSyntaxWarning, -1, "Attribute {0:s} value is of wrong type ({1:s})", - attribute->getTypeName(), attribute->getValue()->getTypeName()); - } - delete attribute; - } - } else { - error(errSyntaxWarning, -1, "Wrong Attribute '{0:s}' in element {1:s}", key, getTypeName()); - } - } - } - } else { - error(errSyntaxWarning, -1, "O object is invalid value ({0:s})", owner.getName()); - } - } else if (!owner.isNull()) { - error(errSyntaxWarning, -1, "O is wrong type ({0:s})", owner.getTypeName()); - } -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/StructElement.h b/Build/source/libs/poppler/poppler-src/poppler/StructElement.h deleted file mode 100644 index f5fcc524fc1..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/StructElement.h +++ /dev/null @@ -1,313 +0,0 @@ -//======================================================================== -// -// StructElement.h -// -// This file is licensed under the GPLv2 or later -// -// Copyright 2013, 2014 Igalia S.L. -// Copyright 2014 Luigi Scarso <luigi.scarso@gmail.com> -// Copyright 2014, 2018 Albert Astals Cid <aacid@kde.org> -// -//======================================================================== - -#ifndef STRUCTELEMENT_H -#define STRUCTELEMENT_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "goo/gtypes.h" -#include "goo/GooString.h" -#include "MarkedContentOutputDev.h" -#include "Object.h" -#include <vector> -#include <set> - -class GooString; -class Dict; -class StructElement; -class StructTreeRoot; - - -class Attribute { -public: - enum Type { - Unknown = 0, // Uninitialized, parsing error, etc. - UserProperty, // User defined attribute (i.e. non-standard) - - // Common standard attributes - Placement, WritingMode, BackgroundColor, BorderColor, BorderStyle, - BorderThickness, Color, Padding, - - // Block element standard attributes - SpaceBefore, SpaceAfter, StartIndent, EndIndent, TextIndent, TextAlign, - BBox, Width, Height, BlockAlign, InlineAlign, TBorderStyle, TPadding, - - // Inline element standard attributes - BaselineShift, LineHeight, TextDecorationColor, TextDecorationThickness, - TextDecorationType, RubyAlign, RubyPosition, GlyphOrientationVertical, - - // Column-only standard attributes - ColumnCount, ColumnGap, ColumnWidths, - - // List-only standard attributes - ListNumbering, - - // PrintField-only standard attributes - Role, checked, Desc, - - // Table-only standard attributes - RowSpan, ColSpan, Headers, Scope, Summary, - }; - - enum Owner { - UnknownOwner = 0, - // User-defined attributes - UserProperties, - // Standard attributes - Layout, List, PrintField, Table, - // Translation to other formats - XML_1_00, HTML_3_20, HTML_4_01, OEB_1_00, RTF_1_05, CSS_1_00, CSS_2_00, - }; - - // Creates a standard attribute. The name is predefined, and the - // value is type-checked to conform to the PDF specification. - Attribute(Type type, Object *value); - - // Creates an UserProperty attribute, with an arbitrary name and value. - Attribute(const char *name, int nameLen, Object *value); - - GBool isOk() const { return type != Unknown; } - - // Name, type and value can be set only on construction. - Type getType() const { return type; } - Owner getOwner() const { return owner; } - const char *getTypeName() const; - const char *getOwnerName() const; - Object *getValue() const { return &value; } - static Object *getDefaultValue(Type type); - - // The caller gets the ownership of the return GooString and is responsible of deleting it - GooString *getName() const { return type == UserProperty ? name.copy() : new GooString(getTypeName()); } - - // The revision is optional, and defaults to zero. - Guint getRevision() const { return revision; } - void setRevision(Guint revisionA) { revision = revisionA; } - - // Hidden elements should not be displayed by the user agent - GBool isHidden() const { return hidden; } - void setHidden(GBool hiddenA) { hidden = hiddenA; } - - // The formatted value may be in the PDF, or be left undefined (NULL). - // In the later case the user agent should provide a default representation. - const char *getFormattedValue() const { return formatted ? formatted->getCString() : NULL; } - void setFormattedValue(const char *formattedA); - - ~Attribute(); - -private: - Type type; - Owner owner; - Guint revision; - mutable GooString name; - mutable Object value; - GBool hidden; - GooString *formatted; - - GBool checkType(StructElement *element = NULL); - static Type getTypeForName(const char *name, StructElement *element = NULL); - static Attribute *parseUserProperty(Dict *property); - - friend class StructElement; -}; - - -class StructElement { -public: - enum Type { - Unknown = 0, - MCID, // MCID reference, used internally - OBJR, // Object reference, used internally - - Document, Part, Art, Sect, Div, // Structural elements - - Span, Quote, Note, Reference, BibEntry, // Inline elements - Code, Link, Annot, - BlockQuote, Caption, NonStruct, - TOC, TOCI, Index, Private, - - P, H, H1, H2, H3, H4, H5, H6, // Paragraph-like - - L, LI, Lbl, LBody, // List elements - - Table, TR, TH, TD, THead, TFoot, TBody, // Table elements - - Ruby, RB, RT, RP, // Ruby text elements - Warichu, WT, WP, - - Figure, Formula, Form, // Illustration-like elements - }; - - static const Ref InvalidRef; - - const char *getTypeName() const; - Type getType() const { return type; } - GBool isOk() const { return type != Unknown; } - GBool isBlock() const; - GBool isInline() const; - GBool isGrouping() const; - - inline GBool isContent() const { return (type == MCID) || isObjectRef(); } - inline GBool isObjectRef() const { return (type == OBJR && c->ref.num != -1 && c->ref.gen != -1); } - - int getMCID() const { return c->mcid; } - Ref getObjectRef() const { return c->ref; } - Ref getParentRef() { return isContent() ? parent->getParentRef() : s->parentRef.getRef(); } - GBool hasPageRef() const; - GBool getPageRef(Ref& ref) const; - StructTreeRoot *getStructTreeRoot() { return treeRoot; } - - // Optional element identifier. - const GooString *getID() const { return isContent() ? nullptr : s->id; } - GooString *getID() { return isContent() ? nullptr : s->id; } - - // Optional ISO language name, e.g. en_US - GooString *getLanguage() { - if (!isContent() && s->language) return s->language; - return parent ? parent->getLanguage() : NULL; - } - const GooString *getLanguage() const { - if (!isContent() && s->language) return s->language; - return parent ? parent->getLanguage() : NULL; - } - - // Optional revision number, defaults to zero. - Guint getRevision() const { return isContent() ? 0 : s->revision; } - void setRevision(Guint revision) { if (isContent()) s->revision = revision; } - - // Optional element title, in human-readable form. - const GooString *getTitle() const { return isContent() ? nullptr : s->title; } - GooString *getTitle() { return isContent() ? nullptr : s->title; } - - // Optional element expanded abbreviation text. - const GooString *getExpandedAbbr() const { return isContent() ? nullptr : s->expandedAbbr; } - GooString *getExpandedAbbr() { return isContent() ? nullptr : s->expandedAbbr; } - - unsigned getNumChildren() const { return isContent() ? 0 : s->elements.size(); } - const StructElement *getChild(int i) const { return isContent() ? nullptr : s->elements.at(i); } - StructElement *getChild(int i) { return isContent() ? nullptr : s->elements.at(i); } - - void appendChild(StructElement *element) { - if (!isContent() && element && element->isOk()) { - s->elements.push_back(element); - } - } - - unsigned getNumAttributes() const { return isContent() ? 0 : s->attributes.size(); } - const Attribute *getAttribute(int i) const { return isContent() ? nullptr : s->attributes.at(i); } - Attribute *getAttribute(int i) { return isContent() ? nullptr : s->attributes.at(i); } - - void appendAttribute(Attribute *attribute) { - if (!isContent() && attribute) { - s->attributes.push_back(attribute); - } - } - - const Attribute* findAttribute(Attribute::Type attributeType, GBool inherit = gFalse, - Attribute::Owner owner = Attribute::UnknownOwner) const; - - const GooString *getAltText() const { return isContent() ? nullptr : s->altText; } - GooString *getAltText() { return isContent() ? nullptr : s->altText; } - - const GooString *getActualText() const { return isContent() ? nullptr : s->actualText; } - GooString *getActualText() { return isContent() ? nullptr : s->actualText; } - - // Content text referenced by the element: - // - // - For MCID reference elements, this is just the text of the - // corresponding marked content object in the page stream, regardless - // of the setting of the "recursive" flag. - // - For other elements, if the "recursive" flag is set, the text - // enclosed by *all* the child MCID reference elements of the subtree - // is returned. The text is assembled by traversing the leaf MCID - // reference elements in logical order. - // - In any other case, the function returns NULL. - // - // A new string is returned, and the ownership passed to the caller. - // - GooString *getText(GBool recursive = gTrue) const { - return appendSubTreeText(nullptr, recursive); - } - - const TextSpanArray getTextSpans() const { - if (!isContent()) - return TextSpanArray(); - MarkedContentOutputDev mcdev(getMCID()); - return getTextSpansInternal(mcdev); - } - - ~StructElement(); - -private: - GooString* appendSubTreeText(GooString *string, GBool recursive) const; - const TextSpanArray& getTextSpansInternal(MarkedContentOutputDev& mcdev) const; - - typedef std::vector<Attribute*> AttrPtrArray; - typedef std::vector<StructElement*> ElemPtrArray; - - struct StructData { - Object parentRef; - GooString *altText; - GooString *actualText; - GooString *id; - GooString *title; - GooString *expandedAbbr; - GooString *language; - Guint revision; - ElemPtrArray elements; - AttrPtrArray attributes; - - StructData(); - ~StructData(); - - StructData(const StructData &) = delete; - StructData& operator=(const StructData &) = delete; - }; - - // Data in content elements (MCID, MCR) - struct ContentData { - union { - int mcid; - Ref ref; - }; - - ContentData(int mcidA): mcid(mcidA) {} - ContentData(const Ref& r) { ref.num = r.num; ref.gen = r.gen; } - }; - - // Common data - Type type; - StructTreeRoot *treeRoot; - StructElement *parent; - mutable Object pageRef; - - union { - StructData *s; - ContentData *c; - }; - - StructElement(Dict *elementDict, StructTreeRoot *treeRootA, StructElement *parentA, std::set<int> &seen); - StructElement(int mcid, StructTreeRoot *treeRootA, StructElement *parentA); - StructElement(const Ref &ref, StructTreeRoot *treeRootA, StructElement *parentA); - - void parse(Dict* elementDict); - StructElement* parseChild(Object *ref, Object* childObj, std::set<int> &seen); - void parseChildren(Dict* element, std::set<int> &seen); - void parseAttributes(Dict *element, GBool keepExisting = gFalse); - - friend class StructTreeRoot; -}; - -#endif - diff --git a/Build/source/libs/poppler/poppler-src/poppler/StructTreeRoot.cc b/Build/source/libs/poppler/poppler-src/poppler/StructTreeRoot.cc deleted file mode 100644 index 58a4b6a63c7..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/StructTreeRoot.cc +++ /dev/null @@ -1,186 +0,0 @@ -//======================================================================== -// -// StructTreeRoot.cc -// -// This file is licensed under the GPLv2 or later -// -// Copyright 2013, 2014 Igalia S.L. -// Copyright 2014 Fabio D'Urso <fabiodurso@hotmail.it> -// Copyright 2017 Jan-Erik S <janerik234678@gmail.com> -// Copyright 2017, 2018 Albert Astals Cid <aacid@kde.org> -// Copyright 2017, 2018 Adrian Johnson <ajohnson@redneon.com> -// -//======================================================================== - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "goo/GooString.h" -#include "StructTreeRoot.h" -#include "StructElement.h" -#include "PDFDoc.h" -#include "Object.h" -#include "Dict.h" -#include <set> -#include <assert.h> - - -StructTreeRoot::StructTreeRoot(PDFDoc *docA, Dict *structTreeRootDict): - doc(docA) -{ - assert(doc); - assert(structTreeRootDict); - parse(structTreeRootDict); -} - -StructTreeRoot::~StructTreeRoot() -{ - for (ElemPtrArray::iterator i = elements.begin(); i != elements.end(); ++i) - delete *i; -} - -void StructTreeRoot::parse(Dict *root) -{ - // The RoleMap/ClassMap dictionaries are needed by all the parsing - // functions, which will resolve the custom names to canonical - // standard names. - roleMap = root->lookup("RoleMap"); - classMap = root->lookup("ClassMap"); - - // ParentTree (optional). If present, it must be a number tree, - // otherwise it is not possible to map stream objects to their - // corresponsing structure element. Here only the references are - // loaded into the array, the pointers to the StructElements will - // be filled-in later when parsing them. - const Object parentTreeObj = root->lookup("ParentTree"); - if (parentTreeObj.isDict()) { - parseNumberTreeNode(parentTreeObj.getDict()); - } - - std::set<int> seenElements; - - // Parse the children StructElements - const GBool marked = doc->getCatalog()->getMarkInfo() & Catalog::markInfoMarked; - Object kids = root->lookup("K"); - if (kids.isArray()) { - if (marked && kids.arrayGetLength() > 1) { - error(errSyntaxWarning, -1, "K in StructTreeRoot has more than one children in a tagged PDF"); - } - for (int i = 0; i < kids.arrayGetLength(); i++) { - Object ref = kids.arrayGetNF(i); - if (ref.isRef()) { - seenElements.insert(ref.getRefNum()); - } - Object obj = kids.arrayGet(i); - if (obj.isDict()) { - StructElement *child = new StructElement(obj.getDict(), this, nullptr, seenElements); - if (child->isOk()) { - if (marked && !(child->getType() == StructElement::Document || - child->getType() == StructElement::Part || - child->getType() == StructElement::Art || - child->getType() == StructElement::Div)) { - error(errSyntaxWarning, -1, "StructTreeRoot element of tagged PDF is wrong type ({0:s})", child->getTypeName()); - } - appendChild(child); - if (ref.isRef()) { - parentTreeAdd(ref.getRef(), child); - } - } else { - error(errSyntaxWarning, -1, "StructTreeRoot element could not be parsed"); - delete child; - } - } else { - error(errSyntaxWarning, -1, "K has a child of wrong type ({0:s})", obj.getTypeName()); - } - } - } else if (kids.isDict()) { - StructElement *child = new StructElement(kids.getDict(), this, nullptr, seenElements); - if (child->isOk()) { - appendChild(child); - Object ref = root->lookupNF("K"); - if (ref.isRef()) - parentTreeAdd(ref.getRef(), child); - } else { - error(errSyntaxWarning, -1, "StructTreeRoot element could not be parsed"); - delete child; - } - } else if (!kids.isNull()) { - error(errSyntaxWarning, -1, "K in StructTreeRoot is wrong type ({0:s})", kids.getTypeName()); - } - - // refToParentMap is only used during parsing. Ensure all memory used by it is freed. - std::multimap<Ref, Parent*, RefCompare>().swap(refToParentMap); -} - -void StructTreeRoot::parseNumberTreeNode(Dict *node) -{ - Object kids = node->lookup("Kids"); - if (kids.isArray()) { - for (int i = 0; i < kids.arrayGetLength(); i++) { - Object obj = kids.arrayGet(i); - if (obj.isDict()) { - parseNumberTreeNode(obj.getDict()); - } else { - error(errSyntaxError, -1, "Kids item at position {0:d} is wrong type ({1:s})", i, obj.getTypeName()); - } - } - return; - } else if (!kids.isNull()) { - error(errSyntaxError, -1, "Kids object is wrong type ({0:s})", kids.getTypeName()); - } - - Object nums = node->lookup("Nums"); - if (nums.isArray()) { - if (nums.arrayGetLength() % 2 == 0) { - // keys in even positions, references in odd ones - for (int i = 0; i < nums.arrayGetLength(); i += 2) { - Object key = nums.arrayGet(i); - - if (!key.isInt()) { - error(errSyntaxError, -1, "Nums item at position {0:d} is wrong type ({1:s})", i, key.getTypeName()); - continue; - } - int keyVal = key.getInt(); - std::vector<Parent>& vec = parentTree[keyVal]; - - Object value = nums.arrayGet(i + 1); - if (value.isArray()) { - vec.resize(value.arrayGetLength()); - for (int j = 0; j < value.arrayGetLength(); j++) { - Object itemvalue = value.arrayGetNF(j); - if (itemvalue.isRef()) { - Ref ref = itemvalue.getRef(); - vec[j].ref = ref; - refToParentMap.insert(std::pair<Ref, Parent*>(ref, &vec[j])); - } else if (!itemvalue.isNull()) { - error(errSyntaxError, -1, "Nums array item at position {0:d}/{1:d} is invalid type ({2:s})", i, j, itemvalue.getTypeName()); - } - } - } else { - value = nums.arrayGetNF(i + 1); - if (value.isRef()) { - Ref ref = value.getRef(); - vec.resize(1); - vec[0].ref = ref; - refToParentMap.insert(std::pair<Ref, Parent*>(ref, &vec[0])); - } else { - error(errSyntaxError, -1, "Nums item at position {0:d} is wrong type ({1:s})", i + 1, value.getTypeName()); - } - } - } - } else { - error(errSyntaxError, -1, "Nums array length is not a even ({0:d})", nums.arrayGetLength()); - } - } else { - error(errSyntaxError, -1, "Nums object is wrong type ({0:s})", nums.getTypeName()); - } -} - - -void StructTreeRoot::parentTreeAdd(const Ref &objectRef, StructElement *element) -{ - auto range = refToParentMap.equal_range(objectRef); - for (auto it = range.first; it !=range.second; ++it) - it->second->element = element; -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/StructTreeRoot.h b/Build/source/libs/poppler/poppler-src/poppler/StructTreeRoot.h deleted file mode 100644 index 89c7941cebf..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/StructTreeRoot.h +++ /dev/null @@ -1,92 +0,0 @@ -//======================================================================== -// -// StructTreeRoot.h -// -// This file is licensed under the GPLv2 or later -// -// Copyright 2013, 2014 Igalia S.L. -// Copyright 2018 Albert Astals Cid <aacid@kde.org> -// Copyright 2018 Adrian Johnson <ajohnson@redneon.com> -// -//======================================================================== - -#ifndef STRUCTTREEROOT_H -#define STRUCTTREEROOT_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "goo/gtypes.h" -#include "Object.h" -#include "StructElement.h" -#include <map> -#include <vector> - -class Dict; -class PDFDoc; - - -class StructTreeRoot -{ -public: - StructTreeRoot(PDFDoc *docA, Dict *rootDict); - ~StructTreeRoot(); - - StructTreeRoot& operator=(const StructTreeRoot &) = delete; - StructTreeRoot(const StructTreeRoot &) = delete; - - PDFDoc *getDoc() { return doc; } - Dict *getRoleMap() { return roleMap.isDict() ? roleMap.getDict() : NULL; } - Dict *getClassMap() { return classMap.isDict() ? classMap.getDict() : NULL; } - unsigned getNumChildren() const { return elements.size(); } - const StructElement *getChild(int i) const { return elements.at(i); } - StructElement *getChild(int i) { return elements.at(i); } - - void appendChild(StructElement *element) { - if (element && element->isOk()) { - elements.push_back(element); - } - } - - const StructElement *findParentElement(int key, unsigned mcid = 0) const { - auto it = parentTree.find(key); - if (it != parentTree.end()) { - if (mcid < it->second.size()) { - return it->second[mcid].element; - } - } - return NULL; - } - -private: - typedef std::vector<StructElement*> ElemPtrArray; - - // Structure for items in /ParentTree, it keeps a mapping of - // object references and pointers to StructElement objects. - struct Parent { - Ref ref; - StructElement *element; - - Parent(): element(nullptr) { ref.num = ref.gen = -1; } - Parent(const Parent &p) = default; - Parent& operator=(const Parent &) = default; - ~Parent() {} - }; - - PDFDoc *doc; - Object roleMap; - Object classMap; - ElemPtrArray elements; - std::map<int, std::vector<Parent> > parentTree; - std::multimap<Ref, Parent*, RefCompare> refToParentMap; - - void parse(Dict *rootDict); - void parseNumberTreeNode(Dict *node); - void parentTreeAdd(const Ref &objectRef, StructElement *element); - - friend class StructElement; -}; - -#endif - diff --git a/Build/source/libs/poppler/poppler-src/poppler/TextOutputDev.cc b/Build/source/libs/poppler/poppler-src/poppler/TextOutputDev.cc deleted file mode 100644 index 4a3070af7c0..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/TextOutputDev.cc +++ /dev/null @@ -1,5880 +0,0 @@ -//======================================================================== -// -// TextOutputDev.cc -// -// Copyright 1997-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2005-2007 Kristian Høgsberg <krh@redhat.com> -// Copyright (C) 2005 Nickolay V. Shmyrev <nshmyrev@yandex.ru> -// Copyright (C) 2006-2008, 2011-2013 Carlos Garcia Campos <carlosgc@gnome.org> -// Copyright (C) 2006, 2007, 2013 Ed Catmur <ed@catmur.co.uk> -// Copyright (C) 2006 Jeff Muizelaar <jeff@infidigm.net> -// Copyright (C) 2007, 2008, 2012, 2017 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2008 Koji Otani <sho@bbr.jp> -// Copyright (C) 2008, 2010-2012, 2014-2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2008 Pino Toscano <pino@kde.org> -// Copyright (C) 2008, 2010 Hib Eris <hib@hiberis.nl> -// Copyright (C) 2009 Ross Moore <ross@maths.mq.edu.au> -// Copyright (C) 2009 Kovid Goyal <kovid@kovidgoyal.net> -// Copyright (C) 2010 Brian Ewins <brian.ewins@gmail.com> -// Copyright (C) 2010 Marek Kasik <mkasik@redhat.com> -// Copyright (C) 2010 Suzuki Toshiya <mpsuzuki@hiroshima-u.ac.jp> -// Copyright (C) 2011 Sam Liao <phyomh@gmail.com> -// Copyright (C) 2012 Horst Prote <prote@fmi.uni-stuttgart.de> -// Copyright (C) 2012, 2013-2018 Jason Crain <jason@aquaticape.us> -// Copyright (C) 2012 Peter Breitenlohner <peb@mppmu.mpg.de> -// Copyright (C) 2013 José Aliste <jaliste@src.gnome.org> -// Copyright (C) 2013 Thomas Freitag <Thomas.Freitag@alfa.de> -// Copyright (C) 2013 Ed Catmur <ed@catmur.co.uk> -// Copyright (C) 2016 Khaled Hosny <khaledhosny@eglug.org> -// 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 -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include <config.h> - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include <stdio.h> -#include <stdlib.h> -#include <stddef.h> -#include <cmath> -#include <float.h> -#include <ctype.h> -#include <algorithm> -#ifdef _WIN32 -#include <fcntl.h> // for O_BINARY -#include <io.h> // for setmode -#endif -#include "goo/gmem.h" -#include "goo/GooString.h" -#include "goo/GooList.h" -#include "poppler-config.h" -#include "Error.h" -#include "GlobalParams.h" -#include "UnicodeMap.h" -#include "UnicodeTypeTable.h" -#include "Link.h" -#include "TextOutputDev.h" -#include "Page.h" -#include "Annot.h" -#include "UTF.h" - -#ifdef MACOS -// needed for setting type/creator of MacOS files -#include "ICSupport.h" -#endif - -//------------------------------------------------------------------------ -// parameters -//------------------------------------------------------------------------ - -// Each bucket in a text pool includes baselines within a range of -// this many points. -#define textPoolStep 4 - -// Inter-character space width which will cause addChar to start a new -// word. -#define minWordBreakSpace 0.1 - -// Negative inter-character space width, i.e., overlap, which will -// cause addChar to start a new word. -#define minDupBreakOverlap 0.2 - -// Max distance between baselines of two lines within a block, as a -// fraction of the font size. -#define maxLineSpacingDelta 1.5 - -// Max difference in primary font sizes on two lines in the same -// block. Delta1 is used when examining new lines above and below the -// current block; delta2 is used when examining text that overlaps the -// current block; delta3 is used when examining text to the left and -// right of the current block. -#define maxBlockFontSizeDelta1 0.05 -#define maxBlockFontSizeDelta2 0.6 -#define maxBlockFontSizeDelta3 0.2 - -// Max difference in font sizes inside a word. -#define maxWordFontSizeDelta 0.05 - -// Maximum distance between baselines of two words on the same line, -// e.g., distance between subscript or superscript and the primary -// baseline, as a fraction of the font size. -#define maxIntraLineDelta 0.5 - -// Minimum inter-word spacing, as a fraction of the font size. (Only -// used for raw ordering.) -#define minWordSpacing 0.15 - -// Maximum inter-word spacing, as a fraction of the font size. -#define maxWordSpacing 1.5 - -// Maximum horizontal spacing which will allow a word to be pulled -// into a block. -#define minColSpacing1 0.3 - -// Minimum spacing between columns, as a fraction of the font size. -#define minColSpacing2 1.0 - -// Maximum vertical spacing between blocks within a flow, as a -// multiple of the font size. -#define maxBlockSpacing 2.5 - -// Minimum spacing between characters within a word, as a fraction of -// the font size. -#define minCharSpacing -0.5 - -// Maximum spacing between characters within a word, as a fraction of -// the font size, when there is no obvious extra-wide character -// spacing. -#define maxCharSpacing 0.03 - -// When extra-wide character spacing is detected, the inter-character -// space threshold is set to the minimum inter-character space -// multiplied by this constant. -#define maxWideCharSpacingMul 1.3 - -// Upper limit on spacing between characters in a word. -#define maxWideCharSpacing 0.4 - -// Max difference in primary,secondary coordinates (as a fraction of -// the font size) allowed for duplicated text (fake boldface, drop -// shadows) which is to be discarded. -#define dupMaxPriDelta 0.1 -#define dupMaxSecDelta 0.2 - -// Max width of underlines (in points). -#define maxUnderlineWidth 3 - -// Min distance between baseline and underline (in points). -//~ this should be font-size-dependent -#define minUnderlineGap -2 - -// Max distance between baseline and underline (in points). -//~ this should be font-size-dependent -#define maxUnderlineGap 4 - -// Max horizontal distance between edge of word and start of underline -// (in points). -//~ this should be font-size-dependent -#define underlineSlack 1 - -// Max distance between edge of text and edge of link border -#define hyperlinkSlack 2 - -// Max distance between characters when combining a base character and -// combining character -#define combMaxMidDelta 0.3 -#define combMaxBaseDelta 0.4 - -static int reorderText(Unicode *text, int len, UnicodeMap *uMap, GBool primaryLR, GooString *s, Unicode* u) { - char lre[8], rle[8], popdf[8], buf[8]; - int lreLen = 0, rleLen = 0, popdfLen = 0, n; - int nCols, i, j, k; - - nCols = 0; - - if (s) { - lreLen = uMap->mapUnicode(0x202a, lre, sizeof(lre)); - rleLen = uMap->mapUnicode(0x202b, rle, sizeof(rle)); - popdfLen = uMap->mapUnicode(0x202c, popdf, sizeof(popdf)); - } - - if (primaryLR) { - i = 0; - while (i < len) { - // output a left-to-right section - for (j = i; j < len && !unicodeTypeR(text[j]); ++j) ; - for (k = i; k < j; ++k) { - if (s) { - n = uMap->mapUnicode(text[k], buf, sizeof(buf)); - s->append(buf, n); - } - if (u) u[nCols] = text[k]; - ++nCols; - } - i = j; - // output a right-to-left section - for (j = i; - j < len && !(unicodeTypeL(text[j]) || unicodeTypeNum(text[j])); - ++j) ; - if (j > i) { - if (s) s->append(rle, rleLen); - for (k = j - 1; k >= i; --k) { - if (s) { - n = uMap->mapUnicode(text[k], buf, sizeof(buf)); - s->append(buf, n); - } - if (u) u[nCols] = text[k]; - ++nCols; - } - if (s) s->append(popdf, popdfLen); - i = j; - } - } - } else { - // Note: This code treats numeric characters (European and - // Arabic/Indic) as left-to-right, which isn't strictly correct - // (incurs extra LRE/POPDF pairs), but does produce correct - // visual formatting. - if (s) s->append(rle, rleLen); - i = len - 1; - while (i >= 0) { - // output a right-to-left section - for (j = i; - j >= 0 && !(unicodeTypeL(text[j]) || unicodeTypeNum(text[j])); - --j) ; - for (k = i; k > j; --k) { - if (s) { - n = uMap->mapUnicode(text[k], buf, sizeof(buf)); - s->append(buf, n); - } - if (u) u[nCols] = text[k]; - ++nCols; - } - i = j; - // output a left-to-right section - for (j = i; j >= 0 && !unicodeTypeR(text[j]); --j) ; - if (j < i) { - if (s) s->append(lre, lreLen); - for (k = j + 1; k <= i; ++k) { - if (s) { - n = uMap->mapUnicode(text[k], buf, sizeof(buf)); - s->append(buf, n); - } - if (u) u[nCols] = text[k]; - ++nCols; - } - if (s) s->append(popdf, popdfLen); - i = j; - } - } - if (s) s->append(popdf, popdfLen); - } - - return nCols; -} - -//------------------------------------------------------------------------ -// TextUnderline -//------------------------------------------------------------------------ - -class TextUnderline { -public: - - TextUnderline(double x0A, double y0A, double x1A, double y1A) - { x0 = x0A; y0 = y0A; x1 = x1A; y1 = y1A; horiz = y0 == y1; } - ~TextUnderline() {} - - double x0, y0, x1, y1; - GBool horiz; -}; - -//------------------------------------------------------------------------ -// TextLink -//------------------------------------------------------------------------ - -class TextLink { -public: - - TextLink(int xMinA, int yMinA, int xMaxA, int yMaxA, AnnotLink *linkA) - { xMin = xMinA; yMin = yMinA; xMax = xMaxA; yMax = yMaxA; link = linkA; } - ~TextLink() {} - - int xMin, yMin, xMax, yMax; - AnnotLink *link; -}; - -//------------------------------------------------------------------------ -// TextFontInfo -//------------------------------------------------------------------------ - -TextFontInfo::TextFontInfo(GfxState *state) { - gfxFont = state->getFont(); - if (gfxFont) - gfxFont->incRefCnt(); -#ifdef TEXTOUT_WORD_LIST - fontName = (gfxFont && gfxFont->getName()) ? gfxFont->getName()->copy() - : (GooString *)nullptr; - flags = gfxFont ? gfxFont->getFlags() : 0; -#endif -} - -TextFontInfo::~TextFontInfo() { - if (gfxFont) - gfxFont->decRefCnt(); -#ifdef TEXTOUT_WORD_LIST - if (fontName) { - delete fontName; - } -#endif -} - -GBool TextFontInfo::matches(GfxState *state) { - return state->getFont() == gfxFont; -} - -GBool TextFontInfo::matches(TextFontInfo *fontInfo) { - return gfxFont == fontInfo->gfxFont; -} - -double TextFontInfo::getAscent() { - return gfxFont ? gfxFont->getAscent() : 0.95; -} - -double TextFontInfo::getDescent() { - return gfxFont ? gfxFont->getDescent() : -0.35; -} - -int TextFontInfo::getWMode() { - return gfxFont ? gfxFont->getWMode() : 0; -} - -//------------------------------------------------------------------------ -// TextWord -//------------------------------------------------------------------------ - -TextWord::TextWord(GfxState *state, int rotA, double fontSizeA) { - rot = rotA; - fontSize = fontSizeA; - text = nullptr; - charcode = nullptr; - edge = nullptr; - charPos = nullptr; - font = nullptr; - textMat = nullptr; - len = size = 0; - spaceAfter = gFalse; - next = nullptr; - -#ifdef TEXTOUT_WORD_LIST - GfxRGB rgb; - - if ((state->getRender() & 3) == 1) { - state->getStrokeRGB(&rgb); - } else { - state->getFillRGB(&rgb); - } - colorR = colToDbl(rgb.r); - colorG = colToDbl(rgb.g); - colorB = colToDbl(rgb.b); -#endif - - underlined = gFalse; - link = nullptr; -} - -TextWord::~TextWord() { - gfree(text); - gfree(charcode); - gfree(edge); - gfree(charPos); - gfree(font); - gfree(textMat); -} - -void TextWord::addChar(GfxState *state, TextFontInfo *fontA, double x, double y, - double dx, double dy, int charPosA, int charLen, - CharCode c, Unicode u, const Matrix &textMatA) { - ensureCapacity(len+1); - text[len] = u; - charcode[len] = c; - charPos[len] = charPosA; - charPos[len + 1] = charPosA + charLen; - font[len] = fontA; - textMat[len] = textMatA; - - if (len == 0) - setInitialBounds(fontA, x, y); - - if (wMode) { // vertical writing mode - // NB: the rotation value has been incremented by 1 (in - // TextPage::beginWord()) for vertical writing mode - switch (rot) { - case 0: - edge[len] = x - fontSize; - xMax = edge[len+1] = x; - break; - case 1: - edge[len] = y - fontSize; - yMax = edge[len+1] = y; - break; - case 2: - edge[len] = x + fontSize; - xMin = edge[len+1] = x; - break; - case 3: - edge[len] = y + fontSize; - yMin = edge[len+1] = y; - break; - } - } else { // horizontal writing mode - switch (rot) { - case 0: - edge[len] = x; - xMax = edge[len+1] = x + dx; - break; - case 1: - edge[len] = y; - yMax = edge[len+1] = y + dy; - break; - case 2: - edge[len] = x; - xMin = edge[len+1] = x + dx; - break; - case 3: - edge[len] = y; - yMin = edge[len+1] = y + dy; - break; - } - } - ++len; -} - -void TextWord::setInitialBounds(TextFontInfo *fontA, double x, double y) { - double ascent = fontA->getAscent() * fontSize; - double descent = fontA->getDescent() * fontSize; - wMode = fontA->getWMode(); - - if (wMode) { // vertical writing mode - // NB: the rotation value has been incremented by 1 (in - // TextPage::beginWord()) for vertical writing mode - switch (rot) { - case 0: - xMin = x - fontSize; - yMin = y - fontSize; - yMax = y; - base = y; - break; - case 1: - xMin = x; - yMin = y - fontSize; - xMax = x + fontSize; - base = x; - break; - case 2: - yMin = y; - xMax = x + fontSize; - yMax = y + fontSize; - base = y; - break; - case 3: - xMin = x - fontSize; - xMax = x; - yMax = y + fontSize; - base = x; - break; - } - } else { // horizontal writing mode - switch (rot) { - case 0: - xMin = x; - yMin = y - ascent; - yMax = y - descent; - if (yMin == yMax) { - // this is a sanity check for a case that shouldn't happen -- but - // if it does happen, we want to avoid dividing by zero later - yMin = y; - yMax = y + 1; - } - base = y; - break; - case 1: - xMin = x + descent; - yMin = y; - xMax = x + ascent; - if (xMin == xMax) { - // this is a sanity check for a case that shouldn't happen -- but - // if it does happen, we want to avoid dividing by zero later - xMin = x; - xMax = x + 1; - } - base = x; - break; - case 2: - yMin = y + descent; - xMax = x; - yMax = y + ascent; - if (yMin == yMax) { - // this is a sanity check for a case that shouldn't happen -- but - // if it does happen, we want to avoid dividing by zero later - yMin = y; - yMax = y + 1; - } - base = y; - break; - case 3: - xMin = x - ascent; - xMax = x - descent; - yMax = y; - if (xMin == xMax) { - // this is a sanity check for a case that shouldn't happen -- but - // if it does happen, we want to avoid dividing by zero later - xMin = x; - xMax = x + 1; - } - base = x; - break; - } - } -} - -void TextWord::ensureCapacity(int capacity) { - if (capacity > size) { - size = std::max(size + 16, capacity); - text = (Unicode *)greallocn(text, size, sizeof(Unicode)); - charcode = (CharCode *)greallocn(charcode, (size + 1), sizeof(CharCode)); - edge = (double *)greallocn(edge, (size + 1), sizeof(double)); - charPos = (int *)greallocn(charPos, size + 1, sizeof(int)); - font = (TextFontInfo **)greallocn(font, size, sizeof(TextFontInfo *)); - textMat = (Matrix *)greallocn(textMat, size, sizeof(Matrix)); - } -} - -struct CombiningTable { - Unicode base; - Unicode comb; -}; - -static struct CombiningTable combiningTable[] = { - {0x0060, 0x0300}, // grave - {0x00a8, 0x0308}, // dieresis - {0x00af, 0x0304}, // macron - {0x00b4, 0x0301}, // acute - {0x00b8, 0x0327}, // cedilla - {0x02c6, 0x0302}, // circumflex - {0x02c7, 0x030c}, // caron - {0x02d8, 0x0306}, // breve - {0x02d9, 0x0307}, // dotaccent - {0x02da, 0x030a}, // ring - {0x02dc, 0x0303}, // tilde - {0x02dd, 0x030b} // hungarumlaut (double acute accent) -}; - -// returning combining versions of characters -static Unicode getCombiningChar(Unicode u) { - int len = sizeof(combiningTable) / sizeof(combiningTable[0]); - for (int i = 0; i < len; ++i) { - if (u == combiningTable[i].base) - return combiningTable[i].comb; - } - return 0; -} - -GBool TextWord::addCombining(GfxState *state, TextFontInfo *fontA, double fontSizeA, double x, double y, - double dx, double dy, int charPosA, int charLen, - CharCode c, Unicode u, const Matrix &textMatA) { - if (len == 0 || wMode != 0 || fontA->getWMode() != 0) - return gFalse; - - Unicode cCurrent = getCombiningChar(u); - Unicode cPrev = getCombiningChar(text[len-1]); - double edgeMid = (edge[len-1] + edge[len]) / 2; - double charMid, maxScaledMidDelta, charBase, maxScaledBaseDelta; - - if (cCurrent != 0 && unicodeTypeAlphaNum(text[len-1])) { - // Current is a combining character, previous is base character - maxScaledMidDelta = fabs(edge[len] - edge[len-1]) * combMaxMidDelta; - charMid = charBase = maxScaledBaseDelta = 0; - - // Test if characters overlap - if (rot == 0 || rot == 2) { - charMid = x + (dx / 2); - charBase = y; - maxScaledBaseDelta = (yMax - yMin) * combMaxBaseDelta; - } else { - charMid = y + (dy / 2); - charBase = x; - maxScaledBaseDelta = (xMax - xMin) * combMaxBaseDelta; - } - - if (fabs(charMid - edgeMid) >= maxScaledMidDelta || - fabs(charBase - base) >= maxScaledBaseDelta) - return gFalse; - - // Add character, but don't adjust edge / bounding box because - // combining character's positioning could be odd. - ensureCapacity(len+1); - text[len] = cCurrent; - charcode[len] = c; - charPos[len] = charPosA; - charPos[len+1] = charPosA + charLen; - font[len] = fontA; - textMat[len] = textMatA; - edge[len+1] = edge[len]; - edge[len] = (edge[len+1] + edge[len-1]) / 2; - ++len; - return gTrue; - } - - if (cPrev != 0 && unicodeTypeAlphaNum(u)) { - // Previous is a combining character, current is base character - maxScaledBaseDelta = (fontA->getAscent() - fontA->getDescent()) * fontSizeA * combMaxBaseDelta; - charMid = charBase = maxScaledMidDelta = 0; - - // Test if characters overlap - if (rot == 0 || rot == 2) { - charMid = x + (dx / 2); - charBase = y; - maxScaledMidDelta = fabs(dx * combMaxMidDelta); - } else { - charMid = y + (dy / 2); - charBase = x; - maxScaledMidDelta = fabs(dy * combMaxMidDelta); - } - - if (fabs(charMid - edgeMid) >= maxScaledMidDelta || - fabs(charBase - base) >= maxScaledBaseDelta) - return gFalse; - - // move combining character to after base character - ensureCapacity(len+1); - fontSize = fontSizeA; - text[len] = cPrev; - charcode[len] = charcode[len-1]; - charPos[len] = charPosA; - charPos[len+1] = charPosA + charLen; - font[len] = font[len-1]; - textMat[len] = textMat[len-1]; - - text[len-1] = u; - charcode[len-1] = c; - font[len-1] = fontA; - textMat[len-1] = textMatA; - - if (len == 1) - setInitialBounds(fontA, x, y); - - // Updated edges / bounding box because we changed the base - // character. - if (wMode) { - switch (rot) { - case 0: - edge[len-1] = x - fontSize; - xMax = edge[len+1] = x; - break; - case 1: - edge[len-1] = y - fontSize; - yMax = edge[len+1] = y; - break; - case 2: - edge[len-1] = x + fontSize; - xMin = edge[len+1] = x; - break; - case 3: - edge[len-1] = y + fontSize; - yMin = edge[len+1] = y; - break; - } - } else { - switch (rot) { - case 0: - edge[len-1] = x; - xMax = edge[len+1] = x + dx; - break; - case 1: - edge[len-1] = y; - yMax = edge[len+1] = y + dy; - break; - case 2: - edge[len-1] = x; - xMin = edge[len+1] = x + dx; - break; - case 3: - edge[len-1] = y; - yMin = edge[len+1] = y + dy; - break; - } - } - - edge[len] = (edge[len+1] + edge[len-1]) / 2; - ++len; - return gTrue; - } - return gFalse; -} - -void TextWord::merge(TextWord *word) { - int i; - - if (word->xMin < xMin) { - xMin = word->xMin; - } - if (word->yMin < yMin) { - yMin = word->yMin; - } - if (word->xMax > xMax) { - xMax = word->xMax; - } - if (word->yMax > yMax) { - yMax = word->yMax; - } - ensureCapacity(len + word->len); - for (i = 0; i < word->len; ++i) { - text[len + i] = word->text[i]; - charcode[len + i] = word->charcode[i]; - edge[len + i] = word->edge[i]; - charPos[len + i] = word->charPos[i]; - font[len + i] = word->font[i]; - textMat[len + i] = word->textMat[i]; - } - edge[len + word->len] = word->edge[word->len]; - charPos[len + word->len] = word->charPos[word->len]; - len += word->len; -} - -inline int TextWord::primaryCmp(TextWord *word) { - double cmp; - - cmp = 0; // make gcc happy - switch (rot) { - case 0: - cmp = xMin - word->xMin; - break; - case 1: - cmp = yMin - word->yMin; - break; - case 2: - cmp = word->xMax - xMax; - break; - case 3: - cmp = word->yMax - yMax; - break; - } - return cmp < 0 ? -1 : cmp > 0 ? 1 : 0; -} - -double TextWord::primaryDelta(TextWord *word) { - double delta; - - delta = 0; // make gcc happy - switch (rot) { - case 0: - delta = word->xMin - xMax; - break; - case 1: - delta = word->yMin - yMax; - break; - case 2: - delta = xMin - word->xMax; - break; - case 3: - delta = yMin - word->yMax; - break; - } - return delta; -} - -int TextWord::cmpYX(const void *p1, const void *p2) { - TextWord *word1 = *(TextWord **)p1; - TextWord *word2 = *(TextWord **)p2; - double cmp; - - cmp = word1->yMin - word2->yMin; - if (cmp == 0) { - cmp = word1->xMin - word2->xMin; - } - return cmp < 0 ? -1 : cmp > 0 ? 1 : 0; -} - -#ifdef TEXTOUT_WORD_LIST - -GooString *TextWord::getText() { - GooString *s; - UnicodeMap *uMap; - char buf[8]; - int n, i; - - s = new GooString(); - if (!(uMap = globalParams->getTextEncoding())) { - return s; - } - for (i = 0; i < len; ++i) { - n = uMap->mapUnicode(text[i], buf, sizeof(buf)); - s->append(buf, n); - } - uMap->decRefCnt(); - return s; -} - -void TextWord::getCharBBox(int charIdx, double *xMinA, double *yMinA, - double *xMaxA, double *yMaxA) { - if (charIdx < 0 || charIdx >= len) { - return; - } - switch (rot) { - case 0: - *xMinA = edge[charIdx]; - *xMaxA = edge[charIdx + 1]; - *yMinA = yMin; - *yMaxA = yMax; - break; - case 1: - *xMinA = xMin; - *xMaxA = xMax; - *yMinA = edge[charIdx]; - *yMaxA = edge[charIdx + 1]; - break; - case 2: - *xMinA = edge[charIdx + 1]; - *xMaxA = edge[charIdx]; - *yMinA = yMin; - *yMaxA = yMax; - break; - case 3: - *xMinA = xMin; - *xMaxA = xMax; - *yMinA = edge[charIdx + 1]; - *yMaxA = edge[charIdx]; - break; - } -} - -#endif // TEXTOUT_WORD_LIST - -//------------------------------------------------------------------------ -// TextPool -//------------------------------------------------------------------------ - -TextPool::TextPool() { - minBaseIdx = 0; - maxBaseIdx = -1; - pool = nullptr; - cursor = nullptr; - cursorBaseIdx = -1; -} - -TextPool::~TextPool() { - int baseIdx; - TextWord *word, *word2; - - for (baseIdx = minBaseIdx; baseIdx <= maxBaseIdx; ++baseIdx) { - for (word = pool[baseIdx - minBaseIdx]; word; word = word2) { - word2 = word->next; - delete word; - } - } - gfree(pool); -} - -int TextPool::getBaseIdx(double base) { - int baseIdx; - - baseIdx = (int)(base / textPoolStep); - if (baseIdx < minBaseIdx) { - return minBaseIdx; - } - if (baseIdx > maxBaseIdx) { - return maxBaseIdx; - } - return baseIdx; -} - -void TextPool::addWord(TextWord *word) { - TextWord **newPool; - int wordBaseIdx, newMinBaseIdx, newMaxBaseIdx, baseIdx; - TextWord *w0, *w1; - - // expand the array if needed - wordBaseIdx = (int)(word->base / textPoolStep); - if (unlikely(wordBaseIdx <= INT_MIN + 128 || wordBaseIdx >= INT_MAX - 128)) { - error(errSyntaxWarning, -1, "wordBaseIdx out of range"); - delete word; - return; - } - if (minBaseIdx > maxBaseIdx) { - minBaseIdx = wordBaseIdx - 128; - maxBaseIdx = wordBaseIdx + 128; - pool = (TextWord **)gmallocn(maxBaseIdx - minBaseIdx + 1, - sizeof(TextWord *)); - for (baseIdx = minBaseIdx; baseIdx <= maxBaseIdx; ++baseIdx) { - pool[baseIdx - minBaseIdx] = nullptr; - } - } else if (wordBaseIdx < minBaseIdx) { - newMinBaseIdx = wordBaseIdx - 128; - newPool = (TextWord **)gmallocn(maxBaseIdx - newMinBaseIdx + 1, - sizeof(TextWord *)); - for (baseIdx = newMinBaseIdx; baseIdx < minBaseIdx; ++baseIdx) { - newPool[baseIdx - newMinBaseIdx] = nullptr; - } - memcpy(&newPool[minBaseIdx - newMinBaseIdx], pool, - (maxBaseIdx - minBaseIdx + 1) * sizeof(TextWord *)); - gfree(pool); - pool = newPool; - minBaseIdx = newMinBaseIdx; - } else if (wordBaseIdx > maxBaseIdx) { - newMaxBaseIdx = wordBaseIdx + 128; - pool = (TextWord **)greallocn(pool, newMaxBaseIdx - minBaseIdx + 1, - sizeof(TextWord *)); - for (baseIdx = maxBaseIdx + 1; baseIdx <= newMaxBaseIdx; ++baseIdx) { - pool[baseIdx - minBaseIdx] = nullptr; - } - maxBaseIdx = newMaxBaseIdx; - } - - // insert the new word - if (cursor && wordBaseIdx == cursorBaseIdx && - word->primaryCmp(cursor) >= 0) { - w0 = cursor; - w1 = cursor->next; - } else { - w0 = nullptr; - w1 = pool[wordBaseIdx - minBaseIdx]; - } - for (; w1 && word->primaryCmp(w1) > 0; w0 = w1, w1 = w1->next) ; - word->next = w1; - if (w0) { - w0->next = word; - } else { - pool[wordBaseIdx - minBaseIdx] = word; - } - cursor = word; - cursorBaseIdx = wordBaseIdx; -} - -//------------------------------------------------------------------------ -// TextLine -//------------------------------------------------------------------------ - -TextLine::TextLine(TextBlock *blkA, int rotA, double baseA) { - blk = blkA; - rot = rotA; - base = baseA; - words = lastWord = nullptr; - text = nullptr; - edge = nullptr; - col = nullptr; - len = 0; - convertedLen = 0; - hyphenated = gFalse; - next = nullptr; - xMin = yMin = 0; - xMax = yMax = -1; - normalized = nullptr; - normalized_len = 0; - normalized_idx = nullptr; -} - -TextLine::~TextLine() { - TextWord *word; - - while (words) { - word = words; - words = words->next; - delete word; - } - gfree(text); - gfree(edge); - gfree(col); - if (normalized) { - gfree(normalized); - gfree(normalized_idx); - } -} - -void TextLine::addWord(TextWord *word) { - if (lastWord) { - lastWord->next = word; - } else { - words = word; - } - lastWord = word; - - if (xMin > xMax) { - xMin = word->xMin; - xMax = word->xMax; - yMin = word->yMin; - yMax = word->yMax; - } else { - if (word->xMin < xMin) { - xMin = word->xMin; - } - if (word->xMax > xMax) { - xMax = word->xMax; - } - if (word->yMin < yMin) { - yMin = word->yMin; - } - if (word->yMax > yMax) { - yMax = word->yMax; - } - } -} - -double TextLine::primaryDelta(TextLine *line) { - double delta; - - delta = 0; // make gcc happy - switch (rot) { - case 0: - delta = line->xMin - xMax; - break; - case 1: - delta = line->yMin - yMax; - break; - case 2: - delta = xMin - line->xMax; - break; - case 3: - delta = yMin - line->yMax; - break; - } - return delta; -} - -int TextLine::primaryCmp(TextLine *line) { - double cmp; - - cmp = 0; // make gcc happy - switch (rot) { - case 0: - cmp = xMin - line->xMin; - break; - case 1: - cmp = yMin - line->yMin; - break; - case 2: - cmp = line->xMax - xMax; - break; - case 3: - cmp = line->yMax - yMax; - break; - } - return cmp < 0 ? -1 : cmp > 0 ? 1 : 0; -} - -int TextLine::secondaryCmp(TextLine *line) { - double cmp; - - cmp = (rot == 0 || rot == 3) ? base - line->base : line->base - base; - return cmp < 0 ? -1 : cmp > 0 ? 1 : 0; -} - -int TextLine::cmpYX(TextLine *line) { - int cmp; - - if ((cmp = secondaryCmp(line))) { - return cmp; - } - return primaryCmp(line); -} - -int TextLine::cmpXY(const void *p1, const void *p2) { - TextLine *line1 = *(TextLine **)p1; - TextLine *line2 = *(TextLine **)p2; - int cmp; - - if ((cmp = line1->primaryCmp(line2))) { - return cmp; - } - return line1->secondaryCmp(line2); -} - -void TextLine::coalesce(UnicodeMap *uMap) { - TextWord *word0, *word1; - double space, delta, minSpace; - GBool isUnicode; - char buf[8]; - int i, j; - - if (words->next) { - - // compute the inter-word space threshold - if (words->len > 1 || words->next->len > 1) { - minSpace = 0; - } else { - minSpace = words->primaryDelta(words->next); - for (word0 = words->next, word1 = word0->next; - word1 && minSpace > 0; - word0 = word1, word1 = word0->next) { - if (word1->len > 1) { - minSpace = 0; - } - delta = word0->primaryDelta(word1); - if (delta < minSpace) { - minSpace = delta; - } - } - } - if (minSpace <= 0) { - space = maxCharSpacing * words->fontSize; - } else { - space = maxWideCharSpacingMul * minSpace; - if (space > maxWideCharSpacing * words->fontSize) { - space = maxWideCharSpacing * words->fontSize; - } - } - - // merge words - word0 = words; - word1 = words->next; - while (word1) { - if (word0->primaryDelta(word1) >= space) { - word0->spaceAfter = gTrue; - word0 = word1; - word1 = word1->next; - } else if (word0->font[word0->len - 1] == word1->font[0] && - word0->underlined == word1->underlined && - fabs(word0->fontSize - word1->fontSize) < - maxWordFontSizeDelta * words->fontSize && - word1->charPos[0] == word0->charPos[word0->len]) { - word0->merge(word1); - word0->next = word1->next; - delete word1; - word1 = word0->next; - } else { - word0 = word1; - word1 = word1->next; - } - } - } - - // build the line text - isUnicode = uMap ? uMap->isUnicode() : gFalse; - len = 0; - for (word1 = words; word1; word1 = word1->next) { - len += word1->len; - if (word1->spaceAfter) { - ++len; - } - } - text = (Unicode *)gmallocn(len, sizeof(Unicode)); - edge = (double *)gmallocn(len + 1, sizeof(double)); - i = 0; - for (word1 = words; word1; word1 = word1->next) { - for (j = 0; j < word1->len; ++j) { - text[i] = word1->text[j]; - edge[i] = word1->edge[j]; - ++i; - } - edge[i] = word1->edge[word1->len]; - if (word1->spaceAfter) { - text[i] = (Unicode)0x0020; - ++i; - } - } - - // compute convertedLen and set up the col array - col = (int *)gmallocn(len + 1, sizeof(int)); - convertedLen = 0; - for (i = 0; i < len; ++i) { - col[i] = convertedLen; - if (isUnicode) { - ++convertedLen; - } else if (uMap) { - convertedLen += uMap->mapUnicode(text[i], buf, sizeof(buf)); - } - } - col[len] = convertedLen; - - // check for hyphen at end of line - //~ need to check for other chars used as hyphens - hyphenated = text[len - 1] == (Unicode)'-'; -} - -//------------------------------------------------------------------------ -// TextLineFrag -//------------------------------------------------------------------------ - -class TextLineFrag { -public: - - TextLine *line; // the line object - int start, len; // offset and length of this fragment - // (in Unicode chars) - double xMin, xMax; // bounding box coordinates - double yMin, yMax; - double base; // baseline virtual coordinate - int col; // first column - - void init(TextLine *lineA, int startA, int lenA); - void computeCoords(GBool oneRot); - - static int cmpYXPrimaryRot(const void *p1, const void *p2); - static int cmpYXLineRot(const void *p1, const void *p2); - static int cmpXYLineRot(const void *p1, const void *p2); - static int cmpXYColumnPrimaryRot(const void *p1, const void *p2); - static int cmpXYColumnLineRot(const void *p1, const void *p2); -}; - -void TextLineFrag::init(TextLine *lineA, int startA, int lenA) { - line = lineA; - start = startA; - len = lenA; - col = line->col[start]; -} - -void TextLineFrag::computeCoords(GBool oneRot) { - TextBlock *blk; - double d0, d1, d2, d3, d4; - - if (oneRot) { - - switch (line->rot) { - case 0: - xMin = line->edge[start]; - xMax = line->edge[start + len]; - yMin = line->yMin; - yMax = line->yMax; - break; - case 1: - xMin = line->xMin; - xMax = line->xMax; - yMin = line->edge[start]; - yMax = line->edge[start + len]; - break; - case 2: - xMin = line->edge[start + len]; - xMax = line->edge[start]; - yMin = line->yMin; - yMax = line->yMax; - break; - case 3: - xMin = line->xMin; - xMax = line->xMax; - yMin = line->edge[start + len]; - yMax = line->edge[start]; - break; - } - base = line->base; - - } else { - - if (line->rot == 0 && line->blk->page->primaryRot == 0) { - - xMin = line->edge[start]; - xMax = line->edge[start + len]; - yMin = line->yMin; - yMax = line->yMax; - base = line->base; - - } else { - - blk = line->blk; - d0 = line->edge[start]; - d1 = line->edge[start + len]; - d2 = d3 = d4 = 0; // make gcc happy - - switch (line->rot) { - case 0: - d2 = line->yMin; - d3 = line->yMax; - d4 = line->base; - d0 = (d0 - blk->xMin) / (blk->xMax - blk->xMin); - d1 = (d1 - blk->xMin) / (blk->xMax - blk->xMin); - d2 = (d2 - blk->yMin) / (blk->yMax - blk->yMin); - d3 = (d3 - blk->yMin) / (blk->yMax - blk->yMin); - d4 = (d4 - blk->yMin) / (blk->yMax - blk->yMin); - break; - case 1: - d2 = line->xMax; - d3 = line->xMin; - d4 = line->base; - d0 = (d0 - blk->yMin) / (blk->yMax - blk->yMin); - d1 = (d1 - blk->yMin) / (blk->yMax - blk->yMin); - d2 = (blk->xMax - d2) / (blk->xMax - blk->xMin); - d3 = (blk->xMax - d3) / (blk->xMax - blk->xMin); - d4 = (blk->xMax - d4) / (blk->xMax - blk->xMin); - break; - case 2: - d2 = line->yMax; - d3 = line->yMin; - d4 = line->base; - d0 = (blk->xMax - d0) / (blk->xMax - blk->xMin); - d1 = (blk->xMax - d1) / (blk->xMax - blk->xMin); - d2 = (blk->yMax - d2) / (blk->yMax - blk->yMin); - d3 = (blk->yMax - d3) / (blk->yMax - blk->yMin); - d4 = (blk->yMax - d4) / (blk->yMax - blk->yMin); - break; - case 3: - d2 = line->xMin; - d3 = line->xMax; - d4 = line->base; - d0 = (blk->yMax - d0) / (blk->yMax - blk->yMin); - d1 = (blk->yMax - d1) / (blk->yMax - blk->yMin); - d2 = (d2 - blk->xMin) / (blk->xMax - blk->xMin); - d3 = (d3 - blk->xMin) / (blk->xMax - blk->xMin); - d4 = (d4 - blk->xMin) / (blk->xMax - blk->xMin); - break; - } - - switch (line->blk->page->primaryRot) { - case 0: - xMin = blk->xMin + d0 * (blk->xMax - blk->xMin); - xMax = blk->xMin + d1 * (blk->xMax - blk->xMin); - yMin = blk->yMin + d2 * (blk->yMax - blk->yMin); - yMax = blk->yMin + d3 * (blk->yMax - blk->yMin); - base = blk->yMin + d4 * (blk->yMax - blk->yMin); - break; - case 1: - xMin = blk->xMax - d3 * (blk->xMax - blk->xMin); - xMax = blk->xMax - d2 * (blk->xMax - blk->xMin); - yMin = blk->yMin + d0 * (blk->yMax - blk->yMin); - yMax = blk->yMin + d1 * (blk->yMax - blk->yMin); - base = blk->xMax - d4 * (blk->xMax - blk->xMin); - break; - case 2: - xMin = blk->xMax - d1 * (blk->xMax - blk->xMin); - xMax = blk->xMax - d0 * (blk->xMax - blk->xMin); - yMin = blk->yMax - d3 * (blk->yMax - blk->yMin); - yMax = blk->yMax - d2 * (blk->yMax - blk->yMin); - base = blk->yMax - d4 * (blk->yMax - blk->yMin); - break; - case 3: - xMin = blk->xMin + d2 * (blk->xMax - blk->xMin); - xMax = blk->xMin + d3 * (blk->xMax - blk->xMin); - yMin = blk->yMax - d1 * (blk->yMax - blk->yMin); - yMax = blk->yMax - d0 * (blk->yMax - blk->yMin); - base = blk->xMin + d4 * (blk->xMax - blk->xMin); - break; - } - - } - } -} - -int TextLineFrag::cmpYXPrimaryRot(const void *p1, const void *p2) { - TextLineFrag *frag1 = (TextLineFrag *)p1; - TextLineFrag *frag2 = (TextLineFrag *)p2; - double cmp; - - cmp = 0; // make gcc happy - switch (frag1->line->blk->page->primaryRot) { - case 0: - if (fabs(cmp = frag1->yMin - frag2->yMin) < 0.01) { - cmp = frag1->xMin - frag2->xMin; - } - break; - case 1: - if (fabs(cmp = frag2->xMax - frag1->xMax) < 0.01) { - cmp = frag1->yMin - frag2->yMin; - } - break; - case 2: - if (fabs(cmp = frag2->yMin - frag1->yMin) < 0.01) { - cmp = frag2->xMax - frag1->xMax; - } - break; - case 3: - if (fabs(cmp = frag1->xMax - frag2->xMax) < 0.01) { - cmp = frag2->yMax - frag1->yMax; - } - break; - } - return cmp < 0 ? -1 : cmp > 0 ? 1 : 0; -} - -int TextLineFrag::cmpYXLineRot(const void *p1, const void *p2) { - TextLineFrag *frag1 = (TextLineFrag *)p1; - TextLineFrag *frag2 = (TextLineFrag *)p2; - double cmp; - - cmp = 0; // make gcc happy - switch (frag1->line->rot) { - case 0: - if ((cmp = frag1->yMin - frag2->yMin) == 0) { - cmp = frag1->xMin - frag2->xMin; - } - break; - case 1: - if ((cmp = frag2->xMax - frag1->xMax) == 0) { - cmp = frag1->yMin - frag2->yMin; - } - break; - case 2: - if ((cmp = frag2->yMin - frag1->yMin) == 0) { - cmp = frag2->xMax - frag1->xMax; - } - break; - case 3: - if ((cmp = frag1->xMax - frag2->xMax) == 0) { - cmp = frag2->yMax - frag1->yMax; - } - break; - } - return cmp < 0 ? -1 : cmp > 0 ? 1 : 0; -} - -int TextLineFrag::cmpXYLineRot(const void *p1, const void *p2) { - TextLineFrag *frag1 = (TextLineFrag *)p1; - TextLineFrag *frag2 = (TextLineFrag *)p2; - double cmp; - - cmp = 0; // make gcc happy - switch (frag1->line->rot) { - case 0: - if ((cmp = frag1->xMin - frag2->xMin) == 0) { - cmp = frag1->yMin - frag2->yMin; - } - break; - case 1: - if ((cmp = frag1->yMin - frag2->yMin) == 0) { - cmp = frag2->xMax - frag1->xMax; - } - break; - case 2: - if ((cmp = frag2->xMax - frag1->xMax) == 0) { - cmp = frag2->yMin - frag1->yMin; - } - break; - case 3: - if ((cmp = frag2->yMax - frag1->yMax) == 0) { - cmp = frag1->xMax - frag2->xMax; - } - break; - } - return cmp < 0 ? -1 : cmp > 0 ? 1 : 0; -} - -int TextLineFrag::cmpXYColumnPrimaryRot(const void *p1, const void *p2) { - TextLineFrag *frag1 = (TextLineFrag *)p1; - TextLineFrag *frag2 = (TextLineFrag *)p2; - double cmp; - - // if columns overlap, compare y values - if (frag1->col < frag2->col + (frag2->line->col[frag2->start + frag2->len] - - frag2->line->col[frag2->start]) && - frag2->col < frag1->col + (frag1->line->col[frag1->start + frag1->len] - - frag1->line->col[frag1->start])) { - cmp = 0; // make gcc happy - switch (frag1->line->blk->page->primaryRot) { - case 0: cmp = frag1->yMin - frag2->yMin; break; - case 1: cmp = frag2->xMax - frag1->xMax; break; - case 2: cmp = frag2->yMin - frag1->yMin; break; - case 3: cmp = frag1->xMax - frag2->xMax; break; - } - return cmp < 0 ? -1 : cmp > 0 ? 1 : 0; - } - - // otherwise, compare starting column - return frag1->col - frag2->col; -} - -int TextLineFrag::cmpXYColumnLineRot(const void *p1, const void *p2) { - TextLineFrag *frag1 = (TextLineFrag *)p1; - TextLineFrag *frag2 = (TextLineFrag *)p2; - double cmp; - - // if columns overlap, compare y values - if (frag1->col < frag2->col + (frag2->line->col[frag2->start + frag2->len] - - frag2->line->col[frag2->start]) && - frag2->col < frag1->col + (frag1->line->col[frag1->start + frag1->len] - - frag1->line->col[frag1->start])) { - cmp = 0; // make gcc happy - switch (frag1->line->rot) { - case 0: cmp = frag1->yMin - frag2->yMin; break; - case 1: cmp = frag2->xMax - frag1->xMax; break; - case 2: cmp = frag2->yMin - frag1->yMin; break; - case 3: cmp = frag1->xMax - frag2->xMax; break; - } - return cmp < 0 ? -1 : cmp > 0 ? 1 : 0; - } - - // otherwise, compare starting column - return frag1->col - frag2->col; -} - -//------------------------------------------------------------------------ -// TextBlock -//------------------------------------------------------------------------ - -TextBlock::TextBlock(TextPage *pageA, int rotA) { - page = pageA; - rot = rotA; - xMin = yMin = 0; - xMax = yMax = -1; - priMin = 0; - priMax = page->pageWidth; - pool = new TextPool(); - lines = nullptr; - curLine = nullptr; - next = nullptr; - stackNext = nullptr; - tableId = -1; - tableEnd = gFalse; -} - -TextBlock::~TextBlock() { - TextLine *line; - - delete pool; - while (lines) { - line = lines; - lines = lines->next; - delete line; - } -} - -void TextBlock::addWord(TextWord *word) { - pool->addWord(word); - if (xMin > xMax) { - xMin = word->xMin; - xMax = word->xMax; - yMin = word->yMin; - yMax = word->yMax; - } else { - if (word->xMin < xMin) { - xMin = word->xMin; - } - if (word->xMax > xMax) { - xMax = word->xMax; - } - if (word->yMin < yMin) { - yMin = word->yMin; - } - if (word->yMax > yMax) { - yMax = word->yMax; - } - } -} - -void TextBlock::coalesce(UnicodeMap *uMap, double fixedPitch) { - TextWord *word0, *word1, *word2, *bestWord0, *bestWord1, *lastWord; - TextLine *line, *line0, *line1; - int poolMinBaseIdx, startBaseIdx, minBaseIdx, maxBaseIdx; - int baseIdx, bestWordBaseIdx, idx0, idx1; - double minBase, maxBase; - double fontSize, wordSpacing, delta, priDelta, secDelta; - TextLine **lineArray; - GBool found, overlap; - int col1, col2; - int i, j, k; - - // discard duplicated text (fake boldface, drop shadows) - for (idx0 = pool->minBaseIdx; idx0 <= pool->maxBaseIdx; ++idx0) { - word0 = pool->getPool(idx0); - while (word0) { - priDelta = dupMaxPriDelta * word0->fontSize; - secDelta = dupMaxSecDelta * word0->fontSize; - maxBaseIdx = pool->getBaseIdx(word0->base + secDelta); - found = gFalse; - word1 = word2 = nullptr; // make gcc happy - for (idx1 = idx0; idx1 <= maxBaseIdx; ++idx1) { - if (idx1 == idx0) { - word1 = word0; - word2 = word0->next; - } else { - word1 = nullptr; - word2 = pool->getPool(idx1); - } - for (; word2; word1 = word2, word2 = word2->next) { - if (word2->len == word0->len && - !memcmp(word2->text, word0->text, - word0->len * sizeof(Unicode))) { - switch (rot) { - case 0: - case 2: - found = fabs(word0->xMin - word2->xMin) < priDelta && - fabs(word0->xMax - word2->xMax) < priDelta && - fabs(word0->yMin - word2->yMin) < secDelta && - fabs(word0->yMax - word2->yMax) < secDelta; - break; - case 1: - case 3: - found = fabs(word0->xMin - word2->xMin) < secDelta && - fabs(word0->xMax - word2->xMax) < secDelta && - fabs(word0->yMin - word2->yMin) < priDelta && - fabs(word0->yMax - word2->yMax) < priDelta; - break; - } - } - if (found) { - break; - } - } - if (found) { - break; - } - } - if (found) { - if (word1) { - word1->next = word2->next; - } else { - pool->setPool(idx1, word2->next); - } - delete word2; - } else { - word0 = word0->next; - } - } - } - - // build the lines - curLine = nullptr; - poolMinBaseIdx = pool->minBaseIdx; - charCount = 0; - nLines = 0; - while (1) { - - // find the first non-empty line in the pool - for (; - poolMinBaseIdx <= pool->maxBaseIdx && !pool->getPool(poolMinBaseIdx); - ++poolMinBaseIdx) ; - if (poolMinBaseIdx > pool->maxBaseIdx) { - break; - } - - // look for the left-most word in the first four lines of the - // pool -- this avoids starting with a superscript word - startBaseIdx = poolMinBaseIdx; - for (baseIdx = poolMinBaseIdx + 1; - baseIdx < poolMinBaseIdx + 4 && baseIdx <= pool->maxBaseIdx; - ++baseIdx) { - if (!pool->getPool(baseIdx)) { - continue; - } - if (pool->getPool(baseIdx)->primaryCmp(pool->getPool(startBaseIdx)) - < 0) { - startBaseIdx = baseIdx; - } - } - - // create a new line - word0 = pool->getPool(startBaseIdx); - pool->setPool(startBaseIdx, word0->next); - word0->next = nullptr; - line = new TextLine(this, word0->rot, word0->base); - line->addWord(word0); - lastWord = word0; - - // compute the search range - fontSize = word0->fontSize; - minBase = word0->base - maxIntraLineDelta * fontSize; - maxBase = word0->base + maxIntraLineDelta * fontSize; - minBaseIdx = pool->getBaseIdx(minBase); - maxBaseIdx = pool->getBaseIdx(maxBase); - wordSpacing = fixedPitch ? fixedPitch : maxWordSpacing * fontSize; - - // find the rest of the words in this line - while (1) { - - // find the left-most word whose baseline is in the range for - // this line - bestWordBaseIdx = 0; - bestWord0 = bestWord1 = nullptr; - overlap = gFalse; - for (baseIdx = minBaseIdx; - !overlap && baseIdx <= maxBaseIdx; - ++baseIdx) { - for (word0 = nullptr, word1 = pool->getPool(baseIdx); - word1; - word0 = word1, word1 = word1->next) { - if (word1->base >= minBase && - word1->base <= maxBase) { - delta = lastWord->primaryDelta(word1); - if (delta < minCharSpacing * fontSize) { - overlap = gTrue; - break; - } else { - if (delta < wordSpacing && - (!bestWord1 || word1->primaryCmp(bestWord1) < 0)) { - bestWordBaseIdx = baseIdx; - bestWord0 = word0; - bestWord1 = word1; - } - break; - } - } - } - } - if (overlap || !bestWord1) { - break; - } - - // remove it from the pool, and add it to the line - if (bestWord0) { - bestWord0->next = bestWord1->next; - } else { - pool->setPool(bestWordBaseIdx, bestWord1->next); - } - bestWord1->next = nullptr; - line->addWord(bestWord1); - lastWord = bestWord1; - } - - // add the line - if (curLine && line->cmpYX(curLine) > 0) { - line0 = curLine; - line1 = curLine->next; - } else { - line0 = nullptr; - line1 = lines; - } - for (; - line1 && line->cmpYX(line1) > 0; - line0 = line1, line1 = line1->next) ; - if (line0) { - line0->next = line; - } else { - lines = line; - } - line->next = line1; - curLine = line; - line->coalesce(uMap); - charCount += line->len; - ++nLines; - } - - // sort lines into xy order for column assignment - lineArray = (TextLine **)gmallocn(nLines, sizeof(TextLine *)); - for (line = lines, i = 0; line; line = line->next, ++i) { - lineArray[i] = line; - } - qsort(lineArray, nLines, sizeof(TextLine *), &TextLine::cmpXY); - - // column assignment - nColumns = 0; - if (fixedPitch) { - for (i = 0; i < nLines; ++i) { - line0 = lineArray[i]; - col1 = 0; // make gcc happy - switch (rot) { - case 0: - col1 = (int)((line0->xMin - xMin) / fixedPitch + 0.5); - break; - case 1: - col1 = (int)((line0->yMin - yMin) / fixedPitch + 0.5); - break; - case 2: - col1 = (int)((xMax - line0->xMax) / fixedPitch + 0.5); - break; - case 3: - col1 = (int)((yMax - line0->yMax) / fixedPitch + 0.5); - break; - } - for (k = 0; k <= line0->len; ++k) { - line0->col[k] += col1; - } - if (line0->col[line0->len] > nColumns) { - nColumns = line0->col[line0->len]; - } - } - } else { - for (i = 0; i < nLines; ++i) { - line0 = lineArray[i]; - col1 = 0; - for (j = 0; j < i; ++j) { - line1 = lineArray[j]; - if (line1->primaryDelta(line0) >= 0) { - col2 = line1->col[line1->len] + 1; - } else { - k = 0; // make gcc happy - switch (rot) { - case 0: - for (k = 0; - k < line1->len && - line0->xMin >= 0.5 * (line1->edge[k] + line1->edge[k+1]); - ++k) ; - break; - case 1: - for (k = 0; - k < line1->len && - line0->yMin >= 0.5 * (line1->edge[k] + line1->edge[k+1]); - ++k) ; - break; - case 2: - for (k = 0; - k < line1->len && - line0->xMax <= 0.5 * (line1->edge[k] + line1->edge[k+1]); - ++k) ; - break; - case 3: - for (k = 0; - k < line1->len && - line0->yMax <= 0.5 * (line1->edge[k] + line1->edge[k+1]); - ++k) ; - break; - } - col2 = line1->col[k]; - } - if (col2 > col1) { - col1 = col2; - } - } - for (k = 0; k <= line0->len; ++k) { - line0->col[k] += col1; - } - if (line0->col[line0->len] > nColumns) { - nColumns = line0->col[line0->len]; - } - } - } - gfree(lineArray); -} - -void TextBlock::updatePriMinMax(TextBlock *blk) { - double newPriMin, newPriMax; - GBool gotPriMin, gotPriMax; - - gotPriMin = gotPriMax = gFalse; - newPriMin = newPriMax = 0; // make gcc happy - switch (page->primaryRot) { - case 0: - case 2: - if (blk->yMin < yMax && blk->yMax > yMin) { - if (blk->xMin < xMin) { - newPriMin = blk->xMax; - gotPriMin = gTrue; - } - if (blk->xMax > xMax) { - newPriMax = blk->xMin; - gotPriMax = gTrue; - } - } - break; - case 1: - case 3: - if (blk->xMin < xMax && blk->xMax > xMin) { - if (blk->yMin < yMin) { - newPriMin = blk->yMax; - gotPriMin = gTrue; - } - if (blk->yMax > yMax) { - newPriMax = blk->yMin; - gotPriMax = gTrue; - } - } - break; - } - if (gotPriMin) { - if (newPriMin > xMin) { - newPriMin = xMin; - } - if (newPriMin > priMin) { - priMin = newPriMin; - } - } - if (gotPriMax) { - if (newPriMax < xMax) { - newPriMax = xMax; - } - if (newPriMax < priMax) { - priMax = newPriMax; - } - } -} - -int TextBlock::cmpXYPrimaryRot(const void *p1, const void *p2) { - TextBlock *blk1 = *(TextBlock **)p1; - TextBlock *blk2 = *(TextBlock **)p2; - double cmp; - - cmp = 0; // make gcc happy - switch (blk1->page->primaryRot) { - case 0: - if ((cmp = blk1->xMin - blk2->xMin) == 0) { - cmp = blk1->yMin - blk2->yMin; - } - break; - case 1: - if ((cmp = blk1->yMin - blk2->yMin) == 0) { - cmp = blk2->xMax - blk1->xMax; - } - break; - case 2: - if ((cmp = blk2->xMax - blk1->xMax) == 0) { - cmp = blk2->yMin - blk1->yMin; - } - break; - case 3: - if ((cmp = blk2->yMax - blk1->yMax) == 0) { - cmp = blk1->xMax - blk2->xMax; - } - break; - } - return cmp < 0 ? -1 : cmp > 0 ? 1 : 0; -} - -int TextBlock::cmpYXPrimaryRot(const void *p1, const void *p2) { - TextBlock *blk1 = *(TextBlock **)p1; - TextBlock *blk2 = *(TextBlock **)p2; - double cmp; - - cmp = 0; // make gcc happy - switch (blk1->page->primaryRot) { - case 0: - if ((cmp = blk1->yMin - blk2->yMin) == 0) { - cmp = blk1->xMin - blk2->xMin; - } - break; - case 1: - if ((cmp = blk2->xMax - blk1->xMax) == 0) { - cmp = blk1->yMin - blk2->yMin; - } - break; - case 2: - if ((cmp = blk2->yMin - blk1->yMin) == 0) { - cmp = blk2->xMax - blk1->xMax; - } - break; - case 3: - if ((cmp = blk1->xMax - blk2->xMax) == 0) { - cmp = blk2->yMax - blk1->yMax; - } - break; - } - return cmp < 0 ? -1 : cmp > 0 ? 1 : 0; -} - -int TextBlock::primaryCmp(TextBlock *blk) { - double cmp; - - cmp = 0; // make gcc happy - switch (rot) { - case 0: - cmp = xMin - blk->xMin; - break; - case 1: - cmp = yMin - blk->yMin; - break; - case 2: - cmp = blk->xMax - xMax; - break; - case 3: - cmp = blk->yMax - yMax; - break; - } - return cmp < 0 ? -1 : cmp > 0 ? 1 : 0; -} - -double TextBlock::secondaryDelta(TextBlock *blk) { - double delta; - - delta = 0; // make gcc happy - switch (rot) { - case 0: - delta = blk->yMin - yMax; - break; - case 1: - delta = xMin - blk->xMax; - break; - case 2: - delta = yMin - blk->yMax; - break; - case 3: - delta = blk->xMin - xMax; - break; - } - return delta; -} - -GBool TextBlock::isBelow(TextBlock *blk) { - GBool below; - - below = gFalse; // make gcc happy - switch (page->primaryRot) { - case 0: - below = xMin >= blk->priMin && xMax <= blk->priMax && - yMin > blk->yMin; - break; - case 1: - below = yMin >= blk->priMin && yMax <= blk->priMax && - xMax < blk->xMax; - break; - case 2: - below = xMin >= blk->priMin && xMax <= blk->priMax && - yMax < blk->yMax; - break; - case 3: - below = yMin >= blk->priMin && yMax <= blk->priMax && - xMin > blk->xMin; - break; - } - - return below; -} - -GBool TextBlock::isBeforeByRule1(TextBlock *blk1) { - GBool before = gFalse; - GBool overlap = gFalse; - - switch (this->page->primaryRot) { - case 0: - case 2: - overlap = ((this->ExMin <= blk1->ExMin) && - (blk1->ExMin <= this->ExMax)) || - ((blk1->ExMin <= this->ExMin) && - (this->ExMin <= blk1->ExMax)); - break; - case 1: - case 3: - overlap = ((this->EyMin <= blk1->EyMin) && - (blk1->EyMin <= this->EyMax)) || - ((blk1->EyMin <= this->EyMin) && - (this->EyMin <= blk1->EyMax)); - break; - } - switch (this->page->primaryRot) { - case 0: - before = overlap && this->EyMin < blk1->EyMin; - break; - case 1: - before = overlap && this->ExMax > blk1->ExMax; - break; - case 2: - before = overlap && this->EyMax > blk1->EyMax; - break; - case 3: - before = overlap && this->ExMin < blk1->ExMin; - break; - } - return before; -} - -GBool TextBlock::isBeforeByRule2(TextBlock *blk1) { - double cmp = 0; - int rotLR = rot; - - if (!page->primaryLR) { - rotLR = (rotLR + 2) % 4; - } - - switch (rotLR) { - case 0: - cmp = ExMax - blk1->ExMin; - break; - case 1: - cmp = EyMin - blk1->EyMax; - break; - case 2: - cmp = blk1->ExMax - ExMin; - break; - case 3: - cmp = blk1->EyMin - EyMax; - break; - } - return cmp <= 0; -} - -// Sort into reading order by performing a topological sort using the rules -// given in "High Performance Document Layout Analysis", T.M. Breuel, 2003. -// See http://pubs.iupr.org/#2003-breuel-sdiut -// Topological sort is done by depth first search, see -// http://en.wikipedia.org/wiki/Topological_sorting -int TextBlock::visitDepthFirst(TextBlock *blkList, int pos1, - TextBlock **sorted, int sortPos, - GBool* visited, - TextBlock **cache, int cacheSize) { - int pos2; - TextBlock *blk1, *blk2, *blk3; - GBool before; - - if (visited[pos1]) { - return sortPos; - } - - blk1 = this; - -#if 0 // for debugging - printf("visited: %d %.2f..%.2f %.2f..%.2f\n", - sortPos, blk1->ExMin, blk1->ExMax, blk1->EyMin, blk1->EyMax); -#endif - visited[pos1] = gTrue; - pos2 = -1; - for (blk2 = blkList; blk2; blk2 = blk2->next) { - pos2++; - if (visited[pos2]) { - // skip visited nodes - continue; - } - before = gFalse; - - // is blk2 before blk1? (for table entries) - if (blk1->tableId >= 0 && blk1->tableId == blk2->tableId) { - if (page->primaryLR) { - if (blk2->xMax <= blk1->xMin && - blk2->yMin <= blk1->yMax && - blk2->yMax >= blk1->yMin) - before = gTrue; - } else { - if (blk2->xMin >= blk1->xMax && - blk2->yMin <= blk1->yMax && - blk2->yMax >= blk1->yMin) - before = gTrue; - } - - if (blk2->yMax <= blk1->yMin) - before = gTrue; - } else { - if (blk2->isBeforeByRule1(blk1)) { - // Rule (1) blk1 and blk2 overlap, and blk2 is above blk1. - before = gTrue; -#if 0 // for debugging - printf("rule1: %.2f..%.2f %.2f..%.2f %.2f..%.2f %.2f..%.2f\n", - blk2->ExMin, blk2->ExMax, blk2->EyMin, blk2->EyMax, - blk1->ExMin, blk1->ExMax, blk1->EyMin, blk1->EyMax); -#endif - } else if (blk2->isBeforeByRule2(blk1)) { - // Rule (2) blk2 left of blk1, and no intervening blk3 - // such that blk1 is before blk3 by rule 1, - // and blk3 is before blk2 by rule 1. - before = gTrue; - for (int i = 0; i < cacheSize && cache[i]; ++i) { - if (blk1->isBeforeByRule1(cache[i]) && - cache[i]->isBeforeByRule1(blk2)) { - before = gFalse; - std::rotate(cache, cache + i, cache + i + 1); - break; - } - } - - if (before) { - for (blk3 = blkList; blk3; blk3 = blk3->next) { - if (blk3 == blk2 || blk3 == blk1) { - continue; - } - if (blk1->isBeforeByRule1(blk3) && - blk3->isBeforeByRule1(blk2)) { - before = gFalse; - std::copy_backward(cache, cache + cacheSize - 1, - cache + cacheSize); - cache[0] = blk3; - break; - } - } - } -#if 0 // for debugging - if (before) { - printf("rule2: %.2f..%.2f %.2f..%.2f %.2f..%.2f %.2f..%.2f\n", - blk1->ExMin, blk1->ExMax, blk1->EyMin, blk1->EyMax, - blk2->ExMin, blk2->ExMax, blk2->EyMin, blk2->EyMax); - } -#endif - } - } - if (before) { - // blk2 is before blk1, so it needs to be visited - // before we can add blk1 to the sorted list. - sortPos = blk2->visitDepthFirst(blkList, pos2, sorted, sortPos, visited, cache, cacheSize); - } - } -#if 0 // for debugging - printf("sorted: %d %.2f..%.2f %.2f..%.2f\n", - sortPos, blk1->ExMin, blk1->ExMax, blk1->EyMin, blk1->EyMax); -#endif - sorted[sortPos++] = blk1; - return sortPos; -} - -int TextBlock::visitDepthFirst(TextBlock *blkList, int pos1, - TextBlock **sorted, int sortPos, - GBool* visited) { - const int blockCacheSize = 4; - TextBlock *blockCache[blockCacheSize]; - std::fill(blockCache, blockCache + blockCacheSize, (TextBlock*)nullptr); - return visitDepthFirst(blkList, pos1, sorted, sortPos, visited, blockCache, - blockCacheSize); -} - -//------------------------------------------------------------------------ -// TextFlow -//------------------------------------------------------------------------ - -TextFlow::TextFlow(TextPage *pageA, TextBlock *blk) { - page = pageA; - xMin = blk->xMin; - xMax = blk->xMax; - yMin = blk->yMin; - yMax = blk->yMax; - priMin = blk->priMin; - priMax = blk->priMax; - blocks = lastBlk = blk; - next = nullptr; -} - -TextFlow::~TextFlow() { - TextBlock *blk; - - while (blocks) { - blk = blocks; - blocks = blocks->next; - delete blk; - } -} - -void TextFlow::addBlock(TextBlock *blk) { - if (lastBlk) { - lastBlk->next = blk; - } else { - blocks = blk; - } - lastBlk = blk; - if (blk->xMin < xMin) { - xMin = blk->xMin; - } - if (blk->xMax > xMax) { - xMax = blk->xMax; - } - if (blk->yMin < yMin) { - yMin = blk->yMin; - } - if (blk->yMax > yMax) { - yMax = blk->yMax; - } -} - -GBool TextFlow::blockFits(TextBlock *blk, TextBlock *prevBlk) { - GBool fits; - - // lower blocks must use smaller fonts - if (blk->lines->words->fontSize > lastBlk->lines->words->fontSize) { - return gFalse; - } - - fits = gFalse; // make gcc happy - switch (page->primaryRot) { - case 0: - fits = blk->xMin >= priMin && blk->xMax <= priMax; - break; - case 1: - fits = blk->yMin >= priMin && blk->yMax <= priMax; - break; - case 2: - fits = blk->xMin >= priMin && blk->xMax <= priMax; - break; - case 3: - fits = blk->yMin >= priMin && blk->yMax <= priMax; - break; - } - return fits; -} - -#ifdef TEXTOUT_WORD_LIST - -//------------------------------------------------------------------------ -// TextWordList -//------------------------------------------------------------------------ - -TextWordList::TextWordList(TextPage *text, GBool physLayout) { - TextFlow *flow; - TextBlock *blk; - TextLine *line; - TextWord *word; - TextWord **wordArray; - int nWords, i; - - words = new GooList(); - - if (text->rawOrder) { - for (word = text->rawWords; word; word = word->next) { - words->append(word); - } - - } else if (physLayout) { - // this is inefficient, but it's also the least useful of these - // three cases - nWords = 0; - for (flow = text->flows; flow; flow = flow->next) { - for (blk = flow->blocks; blk; blk = blk->next) { - for (line = blk->lines; line; line = line->next) { - for (word = line->words; word; word = word->next) { - ++nWords; - } - } - } - } - wordArray = (TextWord **)gmallocn(nWords, sizeof(TextWord *)); - i = 0; - for (flow = text->flows; flow; flow = flow->next) { - for (blk = flow->blocks; blk; blk = blk->next) { - for (line = blk->lines; line; line = line->next) { - for (word = line->words; word; word = word->next) { - wordArray[i++] = word; - } - } - } - } - qsort(wordArray, nWords, sizeof(TextWord *), &TextWord::cmpYX); - for (i = 0; i < nWords; ++i) { - words->append(wordArray[i]); - } - gfree(wordArray); - - } else { - for (flow = text->flows; flow; flow = flow->next) { - for (blk = flow->blocks; blk; blk = blk->next) { - for (line = blk->lines; line; line = line->next) { - for (word = line->words; word; word = word->next) { - words->append(word); - } - } - } - } - } -} - -TextWordList::~TextWordList() { - delete words; -} - -int TextWordList::getLength() { - return words->getLength(); -} - -TextWord *TextWordList::get(int idx) { - if (idx < 0 || idx >= words->getLength()) { - return nullptr; - } - return (TextWord *)words->get(idx); -} - -#endif // TEXTOUT_WORD_LIST - -//------------------------------------------------------------------------ -// TextPage -//------------------------------------------------------------------------ - -TextPage::TextPage(GBool rawOrderA) { - int rot; - - refCnt = 1; - rawOrder = rawOrderA; - curWord = nullptr; - charPos = 0; - curFont = nullptr; - curFontSize = 0; - nest = 0; - nTinyChars = 0; - lastCharOverlap = gFalse; - if (!rawOrder) { - for (rot = 0; rot < 4; ++rot) { - pools[rot] = new TextPool(); - } - } - flows = nullptr; - blocks = nullptr; - rawWords = nullptr; - rawLastWord = nullptr; - fonts = new GooList(); - lastFindXMin = lastFindYMin = 0; - haveLastFind = gFalse; - underlines = new GooList(); - links = new GooList(); - mergeCombining = gTrue; -} - -TextPage::~TextPage() { - int rot; - - clear(); - if (!rawOrder) { - for (rot = 0; rot < 4; ++rot) { - delete pools[rot]; - } - } - delete fonts; - deleteGooList(underlines, TextUnderline); - deleteGooList(links, TextLink); -} - -void TextPage::incRefCnt() { - refCnt++; -} - -void TextPage::decRefCnt() { - if (--refCnt == 0) - delete this; -} - -void TextPage::startPage(GfxState *state) { - clear(); - if (state) { - pageWidth = state->getPageWidth(); - pageHeight = state->getPageHeight(); - } else { - pageWidth = pageHeight = 0; - } -} - -void TextPage::endPage() { - if (curWord) { - endWord(); - } -} - -void TextPage::clear() { - int rot; - TextFlow *flow; - TextWord *word; - - if (curWord) { - delete curWord; - curWord = nullptr; - } - if (rawOrder) { - while (rawWords) { - word = rawWords; - rawWords = rawWords->next; - delete word; - } - } else { - for (rot = 0; rot < 4; ++rot) { - delete pools[rot]; - } - while (flows) { - flow = flows; - flows = flows->next; - delete flow; - } - gfree(blocks); - } - deleteGooList(fonts, TextFontInfo); - deleteGooList(underlines, TextUnderline); - deleteGooList(links, TextLink); - - curWord = nullptr; - charPos = 0; - curFont = nullptr; - curFontSize = 0; - nest = 0; - nTinyChars = 0; - if (!rawOrder) { - for (rot = 0; rot < 4; ++rot) { - pools[rot] = new TextPool(); - } - } - flows = nullptr; - blocks = nullptr; - rawWords = nullptr; - rawLastWord = nullptr; - fonts = new GooList(); - underlines = new GooList(); - links = new GooList(); -} - -void TextPage::updateFont(GfxState *state) { - GfxFont *gfxFont; - double *fm; - char *name; - int code, mCode, letterCode, anyCode; - double w; - int i; - - // get the font info object - curFont = nullptr; - for (i = 0; i < fonts->getLength(); ++i) { - curFont = (TextFontInfo *)fonts->get(i); - if (curFont->matches(state)) { - break; - } - curFont = nullptr; - } - if (!curFont) { - curFont = new TextFontInfo(state); - fonts->append(curFont); - } - - // adjust the font size - gfxFont = state->getFont(); - curFontSize = state->getTransformedFontSize(); - if (gfxFont && gfxFont->getType() == fontType3) { - // This is a hack which makes it possible to deal with some Type 3 - // fonts. The problem is that it's impossible to know what the - // base coordinate system used in the font is without actually - // rendering the font. This code tries to guess by looking at the - // width of the character 'm' (which breaks if the font is a - // subset that doesn't contain 'm'). - mCode = letterCode = anyCode = -1; - for (code = 0; code < 256; ++code) { - name = ((Gfx8BitFont *)gfxFont)->getCharName(code); - int nameLen = name ? strlen(name) : 0; - GBool nameOneChar = nameLen == 1 || (nameLen > 1 && name[1] == '\0'); - if (nameOneChar && name[0] == 'm') { - mCode = code; - } - if (letterCode < 0 && nameOneChar && - ((name[0] >= 'A' && name[0] <= 'Z') || - (name[0] >= 'a' && name[0] <= 'z'))) { - letterCode = code; - } - if (anyCode < 0 && name && - ((Gfx8BitFont *)gfxFont)->getWidth(code) > 0) { - anyCode = code; - } - } - if (mCode >= 0 && - (w = ((Gfx8BitFont *)gfxFont)->getWidth(mCode)) > 0) { - // 0.6 is a generic average 'm' width -- yes, this is a hack - curFontSize *= w / 0.6; - } else if (letterCode >= 0 && - (w = ((Gfx8BitFont *)gfxFont)->getWidth(letterCode)) > 0) { - // even more of a hack: 0.5 is a generic letter width - curFontSize *= w / 0.5; - } else if (anyCode >= 0 && - (w = ((Gfx8BitFont *)gfxFont)->getWidth(anyCode)) > 0) { - // better than nothing: 0.5 is a generic character width - curFontSize *= w / 0.5; - } - fm = gfxFont->getFontMatrix(); - if (fm[0] != 0) { - curFontSize *= fabs(fm[3] / fm[0]); - } - } -} - -void TextPage::beginWord(GfxState *state) { - GfxFont *gfxFont; - double *fontm; - double m[4], m2[4]; - int rot; - - // This check is needed because Type 3 characters can contain - // text-drawing operations (when TextPage is being used via - // {X,Win}SplashOutputDev rather than TextOutputDev). - if (curWord) { - ++nest; - return; - } - - // compute the rotation - state->getFontTransMat(&m[0], &m[1], &m[2], &m[3]); - gfxFont = state->getFont(); - if (gfxFont && gfxFont->getType() == fontType3) { - fontm = state->getFont()->getFontMatrix(); - m2[0] = fontm[0] * m[0] + fontm[1] * m[2]; - m2[1] = fontm[0] * m[1] + fontm[1] * m[3]; - m2[2] = fontm[2] * m[0] + fontm[3] * m[2]; - m2[3] = fontm[2] * m[1] + fontm[3] * m[3]; - m[0] = m2[0]; - m[1] = m2[1]; - m[2] = m2[2]; - m[3] = m2[3]; - } - if (fabs(m[0] * m[3]) > fabs(m[1] * m[2])) { - rot = (m[0] > 0 || m[3] < 0) ? 0 : 2; - } else { - rot = (m[2] > 0) ? 1 : 3; - } - - // for vertical writing mode, the lines are effectively rotated 90 - // degrees - if (gfxFont && gfxFont->getWMode()) { - rot = (rot + 1) & 3; - } - - curWord = new TextWord(state, rot, curFontSize); -} - -void TextPage::addChar(GfxState *state, double x, double y, - double dx, double dy, - CharCode c, int nBytes, Unicode *u, int uLen) { - double x1, y1, w1, h1, dx2, dy2, base, sp, delta; - GBool overlap; - int i; - int wMode; - Matrix mat; - - // subtract char and word spacing from the dx,dy values - sp = state->getCharSpace(); - if (c == (CharCode)0x20) { - sp += state->getWordSpace(); - } - state->textTransformDelta(sp * state->getHorizScaling(), 0, &dx2, &dy2); - dx -= dx2; - dy -= dy2; - state->transformDelta(dx, dy, &w1, &h1); - - // throw away chars that aren't inside the page bounds - // (and also do a sanity check on the character size) - state->transform(x, y, &x1, &y1); - if (x1 + w1 < 0 || x1 > pageWidth || - y1 + h1 < 0 || y1 > pageHeight || - x1 != x1 || y1 != y1 || // IEEE way of checking for isnan - w1 != w1 || h1 != h1) { - charPos += nBytes; - return; - } - - // check the tiny chars limit - if (fabs(w1) < 3 && fabs(h1) < 3) { - if (++nTinyChars > 50000) { - charPos += nBytes; - return; - } - } - - // break words at space character - if (uLen == 1 && UnicodeIsWhitespace(u[0])) { - charPos += nBytes; - endWord(); - return; - } else if (uLen == 1 && u[0] == (Unicode)0x0) { - // ignore null characters - charPos += nBytes; - return; - } - - state->getFontTransMat(&mat.m[0], &mat.m[1], &mat.m[2], &mat.m[3]); - mat.m[0] *= state->getHorizScaling(); - mat.m[1] *= state->getHorizScaling(); - mat.m[4] = x1; - mat.m[5] = y1; - - if (mergeCombining && curWord && uLen == 1 && - curWord->addCombining(state, curFont, curFontSize, x1, y1, w1, h1, charPos, nBytes, c, - u[0], mat)) { - charPos += nBytes; - return; - } - - // start a new word if: - // (1) this character doesn't fall in the right place relative to - // the end of the previous word (this places upper and lower - // constraints on the position deltas along both the primary - // and secondary axes), or - // (2) this character overlaps the previous one (duplicated text), or - // (3) the previous character was an overlap (we want each duplicated - // character to be in a word by itself at this stage), - // (4) the font size has changed - // (5) the WMode changed - if (curWord && curWord->len > 0) { - base = sp = delta = 0; // make gcc happy - switch (curWord->rot) { - case 0: - base = y1; - sp = x1 - curWord->xMax; - delta = x1 - curWord->edge[curWord->len - 1]; - break; - case 1: - base = x1; - sp = y1 - curWord->yMax; - delta = y1 - curWord->edge[curWord->len - 1]; - break; - case 2: - base = y1; - sp = curWord->xMin - x1; - delta = curWord->edge[curWord->len - 1] - x1; - break; - case 3: - base = x1; - sp = curWord->yMin - y1; - delta = curWord->edge[curWord->len - 1] - y1; - break; - } - overlap = fabs(delta) < dupMaxPriDelta * curWord->fontSize && - fabs(base - curWord->base) < dupMaxSecDelta * curWord->fontSize; - wMode = curFont->getWMode(); - if (overlap || lastCharOverlap || - sp < -minDupBreakOverlap * curWord->fontSize || - sp > minWordBreakSpace * curWord->fontSize || - fabs(base - curWord->base) > 0.5 || - curFontSize != curWord->fontSize || - wMode != curWord->wMode) { - endWord(); - } - lastCharOverlap = overlap; - } else { - lastCharOverlap = gFalse; - } - - if (uLen != 0) { - // start a new word if needed - if (!curWord) { - beginWord(state); - } - - // page rotation and/or transform matrices can cause text to be - // drawn in reverse order -- in this case, swap the begin/end - // coordinates and break text into individual chars - if ((curWord->rot == 0 && w1 < 0) || - (curWord->rot == 1 && h1 < 0) || - (curWord->rot == 2 && w1 > 0) || - (curWord->rot == 3 && h1 > 0)) { - endWord(); - beginWord(state); - x1 += w1; - y1 += h1; - w1 = -w1; - h1 = -h1; - } - - // add the characters to the current word - w1 /= uLen; - h1 /= uLen; - for (i = 0; i < uLen; ++i) { - curWord->addChar(state, curFont, x1 + i*w1, y1 + i*h1, w1, h1, charPos, nBytes, c, u[i], mat); - } - } - charPos += nBytes; -} - -void TextPage::incCharCount(int nChars) { - charPos += nChars; -} - -void TextPage::endWord() { - // This check is needed because Type 3 characters can contain - // text-drawing operations (when TextPage is being used via - // {X,Win}SplashOutputDev rather than TextOutputDev). - if (nest > 0) { - --nest; - return; - } - - if (curWord) { - addWord(curWord); - curWord = nullptr; - } -} - -void TextPage::addWord(TextWord *word) { - // throw away zero-length words -- they don't have valid xMin/xMax - // values, and they're useless anyway - if (word->len == 0) { - delete word; - return; - } - - if (rawOrder) { - if (rawLastWord) { - rawLastWord->next = word; - } else { - rawWords = word; - } - rawLastWord = word; - } else { - pools[word->rot]->addWord(word); - } -} - -void TextPage::addUnderline(double x0, double y0, double x1, double y1) { - underlines->append(new TextUnderline(x0, y0, x1, y1)); -} - -void TextPage::addLink(int xMin, int yMin, int xMax, int yMax, AnnotLink *link) { - links->append(new TextLink(xMin, yMin, xMax, yMax, link)); -} - -void TextPage::coalesce(GBool physLayout, double fixedPitch, GBool doHTML) { - UnicodeMap *uMap; - TextPool *pool; - TextWord *word0, *word1, *word2; - TextLine *line; - TextBlock *blkList, *blk, *lastBlk, *blk0, *blk1, *blk2; - TextFlow *flow, *lastFlow; - TextUnderline *underline; - TextLink *link; - int rot, poolMinBaseIdx, baseIdx, startBaseIdx, endBaseIdx; - double minBase, maxBase, newMinBase, newMaxBase; - double fontSize, colSpace1, colSpace2, lineSpace, intraLineSpace, blkSpace; - GBool found; - int count[4]; - int lrCount; - int col1, col2; - int i, j, n; - - if (rawOrder) { - primaryRot = 0; - primaryLR = gTrue; - return; - } - - uMap = globalParams->getTextEncoding(); - blkList = nullptr; - lastBlk = nullptr; - nBlocks = 0; - primaryRot = 0; - -#if 0 // for debugging - printf("*** initial words ***\n"); - for (rot = 0; rot < 4; ++rot) { - pool = pools[rot]; - for (baseIdx = pool->minBaseIdx; baseIdx <= pool->maxBaseIdx; ++baseIdx) { - for (word0 = pool->getPool(baseIdx); word0; word0 = word0->next) { - printf(" word: x=%.2f..%.2f y=%.2f..%.2f base=%.2f fontSize=%.2f rot=%d link=%p '", - word0->xMin, word0->xMax, word0->yMin, word0->yMax, - word0->base, word0->fontSize, rot*90, word0->link); - for (i = 0; i < word0->len; ++i) { - fputc(word0->text[i] & 0xff, stdout); - } - printf("'\n"); - } - } - } - printf("\n"); -#endif - -#if 0 //~ for debugging - for (i = 0; i < underlines->getLength(); ++i) { - underline = (TextUnderline *)underlines->get(i); - printf("underline: x=%g..%g y=%g..%g horiz=%d\n", - underline->x0, underline->x1, underline->y0, underline->y1, - underline->horiz); - } -#endif - - if (doHTML) { - - //----- handle underlining - for (i = 0; i < underlines->getLength(); ++i) { - underline = (TextUnderline *)underlines->get(i); - if (underline->horiz) { - // rot = 0 - if (pools[0]->minBaseIdx <= pools[0]->maxBaseIdx) { - startBaseIdx = pools[0]->getBaseIdx(underline->y0 + minUnderlineGap); - endBaseIdx = pools[0]->getBaseIdx(underline->y0 + maxUnderlineGap); - for (j = startBaseIdx; j <= endBaseIdx; ++j) { - for (word0 = pools[0]->getPool(j); word0; word0 = word0->next) { - //~ need to check the y value against the word baseline - if (underline->x0 < word0->xMin + underlineSlack && - word0->xMax - underlineSlack < underline->x1) { - word0->underlined = gTrue; - } - } - } - } - - // rot = 2 - if (pools[2]->minBaseIdx <= pools[2]->maxBaseIdx) { - startBaseIdx = pools[2]->getBaseIdx(underline->y0 - maxUnderlineGap); - endBaseIdx = pools[2]->getBaseIdx(underline->y0 - minUnderlineGap); - for (j = startBaseIdx; j <= endBaseIdx; ++j) { - for (word0 = pools[2]->getPool(j); word0; word0 = word0->next) { - if (underline->x0 < word0->xMin + underlineSlack && - word0->xMax - underlineSlack < underline->x1) { - word0->underlined = gTrue; - } - } - } - } - } else { - // rot = 1 - if (pools[1]->minBaseIdx <= pools[1]->maxBaseIdx) { - startBaseIdx = pools[1]->getBaseIdx(underline->x0 - maxUnderlineGap); - endBaseIdx = pools[1]->getBaseIdx(underline->x0 - minUnderlineGap); - for (j = startBaseIdx; j <= endBaseIdx; ++j) { - for (word0 = pools[1]->getPool(j); word0; word0 = word0->next) { - if (underline->y0 < word0->yMin + underlineSlack && - word0->yMax - underlineSlack < underline->y1) { - word0->underlined = gTrue; - } - } - } - } - - // rot = 3 - if (pools[3]->minBaseIdx <= pools[3]->maxBaseIdx) { - startBaseIdx = pools[3]->getBaseIdx(underline->x0 + minUnderlineGap); - endBaseIdx = pools[3]->getBaseIdx(underline->x0 + maxUnderlineGap); - for (j = startBaseIdx; j <= endBaseIdx; ++j) { - for (word0 = pools[3]->getPool(j); word0; word0 = word0->next) { - if (underline->y0 < word0->yMin + underlineSlack && - word0->yMax - underlineSlack < underline->y1) { - word0->underlined = gTrue; - } - } - } - } - } - } - - //----- handle links - for (i = 0; i < links->getLength(); ++i) { - link = (TextLink *)links->get(i); - - // rot = 0 - if (pools[0]->minBaseIdx <= pools[0]->maxBaseIdx) { - startBaseIdx = pools[0]->getBaseIdx(link->yMin); - endBaseIdx = pools[0]->getBaseIdx(link->yMax); - for (j = startBaseIdx; j <= endBaseIdx; ++j) { - for (word0 = pools[0]->getPool(j); word0; word0 = word0->next) { - if (link->xMin < word0->xMin + hyperlinkSlack && - word0->xMax - hyperlinkSlack < link->xMax && - link->yMin < word0->yMin + hyperlinkSlack && - word0->yMax - hyperlinkSlack < link->yMax) { - word0->link = link->link; - } - } - } - } - - // rot = 2 - if (pools[2]->minBaseIdx <= pools[2]->maxBaseIdx) { - startBaseIdx = pools[2]->getBaseIdx(link->yMin); - endBaseIdx = pools[2]->getBaseIdx(link->yMax); - for (j = startBaseIdx; j <= endBaseIdx; ++j) { - for (word0 = pools[2]->getPool(j); word0; word0 = word0->next) { - if (link->xMin < word0->xMin + hyperlinkSlack && - word0->xMax - hyperlinkSlack < link->xMax && - link->yMin < word0->yMin + hyperlinkSlack && - word0->yMax - hyperlinkSlack < link->yMax) { - word0->link = link->link; - } - } - } - } - - // rot = 1 - if (pools[1]->minBaseIdx <= pools[1]->maxBaseIdx) { - startBaseIdx = pools[1]->getBaseIdx(link->xMin); - endBaseIdx = pools[1]->getBaseIdx(link->xMax); - for (j = startBaseIdx; j <= endBaseIdx; ++j) { - for (word0 = pools[1]->getPool(j); word0; word0 = word0->next) { - if (link->yMin < word0->yMin + hyperlinkSlack && - word0->yMax - hyperlinkSlack < link->yMax && - link->xMin < word0->xMin + hyperlinkSlack && - word0->xMax - hyperlinkSlack < link->xMax) { - word0->link = link->link; - } - } - } - } - - // rot = 3 - if (pools[3]->minBaseIdx <= pools[3]->maxBaseIdx) { - startBaseIdx = pools[3]->getBaseIdx(link->xMin); - endBaseIdx = pools[3]->getBaseIdx(link->xMax); - for (j = startBaseIdx; j <= endBaseIdx; ++j) { - for (word0 = pools[3]->getPool(j); word0; word0 = word0->next) { - if (link->yMin < word0->yMin + hyperlinkSlack && - word0->yMax - hyperlinkSlack < link->yMax && - link->xMin < word0->xMin + hyperlinkSlack && - word0->xMax - hyperlinkSlack < link->xMax) { - word0->link = link->link; - } - } - } - } - } - } - - //----- assemble the blocks - - //~ add an outer loop for writing mode (vertical text) - - // build blocks for each rotation value - for (rot = 0; rot < 4; ++rot) { - pool = pools[rot]; - poolMinBaseIdx = pool->minBaseIdx; - count[rot] = 0; - - // add blocks until no more words are left - while (1) { - - // find the first non-empty line in the pool - for (; - poolMinBaseIdx <= pool->maxBaseIdx && - !pool->getPool(poolMinBaseIdx); - ++poolMinBaseIdx) ; - if (poolMinBaseIdx > pool->maxBaseIdx) { - break; - } - - // look for the left-most word in the first four lines of the - // pool -- this avoids starting with a superscript word - startBaseIdx = poolMinBaseIdx; - for (baseIdx = poolMinBaseIdx + 1; - baseIdx < poolMinBaseIdx + 4 && baseIdx <= pool->maxBaseIdx; - ++baseIdx) { - if (!pool->getPool(baseIdx)) { - continue; - } - if (pool->getPool(baseIdx)->primaryCmp(pool->getPool(startBaseIdx)) - < 0) { - startBaseIdx = baseIdx; - } - } - - // create a new block - word0 = pool->getPool(startBaseIdx); - pool->setPool(startBaseIdx, word0->next); - word0->next = nullptr; - blk = new TextBlock(this, rot); - blk->addWord(word0); - - fontSize = word0->fontSize; - minBase = maxBase = word0->base; - colSpace1 = minColSpacing1 * fontSize; - colSpace2 = minColSpacing2 * fontSize; - lineSpace = maxLineSpacingDelta * fontSize; - intraLineSpace = maxIntraLineDelta * fontSize; - - // add words to the block - do { - found = gFalse; - - // look for words on the line above the current top edge of - // the block - newMinBase = minBase; - for (baseIdx = pool->getBaseIdx(minBase); - baseIdx >= pool->getBaseIdx(minBase - lineSpace); - --baseIdx) { - word0 = nullptr; - word1 = pool->getPool(baseIdx); - while (word1) { - if (word1->base < minBase && - word1->base >= minBase - lineSpace && - ((rot == 0 || rot == 2) - ? (word1->xMin < blk->xMax && word1->xMax > blk->xMin) - : (word1->yMin < blk->yMax && word1->yMax > blk->yMin)) && - fabs(word1->fontSize - fontSize) < - maxBlockFontSizeDelta1 * fontSize) { - word2 = word1; - if (word0) { - word0->next = word1->next; - } else { - pool->setPool(baseIdx, word1->next); - } - word1 = word1->next; - word2->next = nullptr; - blk->addWord(word2); - found = gTrue; - newMinBase = word2->base; - } else { - word0 = word1; - word1 = word1->next; - } - } - } - minBase = newMinBase; - - // look for words on the line below the current bottom edge of - // the block - newMaxBase = maxBase; - for (baseIdx = pool->getBaseIdx(maxBase); - baseIdx <= pool->getBaseIdx(maxBase + lineSpace); - ++baseIdx) { - word0 = nullptr; - word1 = pool->getPool(baseIdx); - while (word1) { - if (word1->base > maxBase && - word1->base <= maxBase + lineSpace && - ((rot == 0 || rot == 2) - ? (word1->xMin < blk->xMax && word1->xMax > blk->xMin) - : (word1->yMin < blk->yMax && word1->yMax > blk->yMin)) && - fabs(word1->fontSize - fontSize) < - maxBlockFontSizeDelta1 * fontSize) { - word2 = word1; - if (word0) { - word0->next = word1->next; - } else { - pool->setPool(baseIdx, word1->next); - } - word1 = word1->next; - word2->next = nullptr; - blk->addWord(word2); - found = gTrue; - newMaxBase = word2->base; - } else { - word0 = word1; - word1 = word1->next; - } - } - } - maxBase = newMaxBase; - - // look for words that are on lines already in the block, and - // that overlap the block horizontally - for (baseIdx = pool->getBaseIdx(minBase - intraLineSpace); - baseIdx <= pool->getBaseIdx(maxBase + intraLineSpace); - ++baseIdx) { - word0 = nullptr; - word1 = pool->getPool(baseIdx); - while (word1) { - if (word1->base >= minBase - intraLineSpace && - word1->base <= maxBase + intraLineSpace && - ((rot == 0 || rot == 2) - ? (word1->xMin < blk->xMax + colSpace1 && - word1->xMax > blk->xMin - colSpace1) - : (word1->yMin < blk->yMax + colSpace1 && - word1->yMax > blk->yMin - colSpace1)) && - fabs(word1->fontSize - fontSize) < - maxBlockFontSizeDelta2 * fontSize) { - word2 = word1; - if (word0) { - word0->next = word1->next; - } else { - pool->setPool(baseIdx, word1->next); - } - word1 = word1->next; - word2->next = nullptr; - blk->addWord(word2); - found = gTrue; - } else { - word0 = word1; - word1 = word1->next; - } - } - } - - // only check for outlying words (the next two chunks of code) - // if we didn't find anything else - if (found) { - continue; - } - - // scan down the left side of the block, looking for words - // that are near (but not overlapping) the block; if there are - // three or fewer, add them to the block - n = 0; - for (baseIdx = pool->getBaseIdx(minBase - intraLineSpace); - baseIdx <= pool->getBaseIdx(maxBase + intraLineSpace); - ++baseIdx) { - word1 = pool->getPool(baseIdx); - while (word1) { - if (word1->base >= minBase - intraLineSpace && - word1->base <= maxBase + intraLineSpace && - ((rot == 0 || rot == 2) - ? (word1->xMax <= blk->xMin && - word1->xMax > blk->xMin - colSpace2) - : (word1->yMax <= blk->yMin && - word1->yMax > blk->yMin - colSpace2)) && - fabs(word1->fontSize - fontSize) < - maxBlockFontSizeDelta3 * fontSize) { - ++n; - break; - } - word1 = word1->next; - } - } - if (n > 0 && n <= 3) { - for (baseIdx = pool->getBaseIdx(minBase - intraLineSpace); - baseIdx <= pool->getBaseIdx(maxBase + intraLineSpace); - ++baseIdx) { - word0 = nullptr; - word1 = pool->getPool(baseIdx); - while (word1) { - if (word1->base >= minBase - intraLineSpace && - word1->base <= maxBase + intraLineSpace && - ((rot == 0 || rot == 2) - ? (word1->xMax <= blk->xMin && - word1->xMax > blk->xMin - colSpace2) - : (word1->yMax <= blk->yMin && - word1->yMax > blk->yMin - colSpace2)) && - fabs(word1->fontSize - fontSize) < - maxBlockFontSizeDelta3 * fontSize) { - word2 = word1; - if (word0) { - word0->next = word1->next; - } else { - pool->setPool(baseIdx, word1->next); - } - word1 = word1->next; - word2->next = nullptr; - blk->addWord(word2); - if (word2->base < minBase) { - minBase = word2->base; - } else if (word2->base > maxBase) { - maxBase = word2->base; - } - found = gTrue; - break; - } else { - word0 = word1; - word1 = word1->next; - } - } - } - } - - // scan down the right side of the block, looking for words - // that are near (but not overlapping) the block; if there are - // three or fewer, add them to the block - n = 0; - for (baseIdx = pool->getBaseIdx(minBase - intraLineSpace); - baseIdx <= pool->getBaseIdx(maxBase + intraLineSpace); - ++baseIdx) { - word1 = pool->getPool(baseIdx); - while (word1) { - if (word1->base >= minBase - intraLineSpace && - word1->base <= maxBase + intraLineSpace && - ((rot == 0 || rot == 2) - ? (word1->xMin >= blk->xMax && - word1->xMin < blk->xMax + colSpace2) - : (word1->yMin >= blk->yMax && - word1->yMin < blk->yMax + colSpace2)) && - fabs(word1->fontSize - fontSize) < - maxBlockFontSizeDelta3 * fontSize) { - ++n; - break; - } - word1 = word1->next; - } - } - if (n > 0 && n <= 3) { - for (baseIdx = pool->getBaseIdx(minBase - intraLineSpace); - baseIdx <= pool->getBaseIdx(maxBase + intraLineSpace); - ++baseIdx) { - word0 = nullptr; - word1 = pool->getPool(baseIdx); - while (word1) { - if (word1->base >= minBase - intraLineSpace && - word1->base <= maxBase + intraLineSpace && - ((rot == 0 || rot == 2) - ? (word1->xMin >= blk->xMax && - word1->xMin < blk->xMax + colSpace2) - : (word1->yMin >= blk->yMax && - word1->yMin < blk->yMax + colSpace2)) && - fabs(word1->fontSize - fontSize) < - maxBlockFontSizeDelta3 * fontSize) { - word2 = word1; - if (word0) { - word0->next = word1->next; - } else { - pool->setPool(baseIdx, word1->next); - } - word1 = word1->next; - word2->next = nullptr; - blk->addWord(word2); - if (word2->base < minBase) { - minBase = word2->base; - } else if (word2->base > maxBase) { - maxBase = word2->base; - } - found = gTrue; - break; - } else { - word0 = word1; - word1 = word1->next; - } - } - } - } - - } while (found); - - //~ need to compute the primary writing mode (horiz/vert) in - //~ addition to primary rotation - - // coalesce the block, and add it to the list - blk->coalesce(uMap, fixedPitch); - if (lastBlk) { - lastBlk->next = blk; - } else { - blkList = blk; - } - lastBlk = blk; - count[rot] += blk->charCount; - ++nBlocks; - } - - if (count[rot] > count[primaryRot]) { - primaryRot = rot; - } - } - -#if 0 // for debugging - printf("*** rotation ***\n"); - for (rot = 0; rot < 4; ++rot) { - printf(" %d: %6d\n", rot, count[rot]); - } - printf(" primary rot = %d\n", primaryRot); - printf("\n"); -#endif - -#if 0 // for debugging - printf("*** blocks ***\n"); - for (blk = blkList; blk; blk = blk->next) { - printf("block: rot=%d x=%.2f..%.2f y=%.2f..%.2f\n", - blk->rot, blk->xMin, blk->xMax, blk->yMin, blk->yMax); - for (line = blk->lines; line; line = line->next) { - printf(" line: x=%.2f..%.2f y=%.2f..%.2f base=%.2f\n", - line->xMin, line->xMax, line->yMin, line->yMax, line->base); - for (word0 = line->words; word0; word0 = word0->next) { - printf(" word: x=%.2f..%.2f y=%.2f..%.2f base=%.2f fontSize=%.2f space=%d: '", - word0->xMin, word0->xMax, word0->yMin, word0->yMax, - word0->base, word0->fontSize, word0->spaceAfter); - for (i = 0; i < word0->len; ++i) { - fputc(word0->text[i] & 0xff, stdout); - } - printf("'\n"); - } - } - } - printf("\n"); -#endif - - // determine the primary direction - lrCount = 0; - for (blk = blkList; blk; blk = blk->next) { - for (line = blk->lines; line; line = line->next) { - for (word0 = line->words; word0; word0 = word0->next) { - for (i = 0; i < word0->len; ++i) { - if (unicodeTypeL(word0->text[i])) { - ++lrCount; - } else if (unicodeTypeR(word0->text[i])) { - --lrCount; - } - } - } - } - } - primaryLR = lrCount >= 0; - -#if 0 // for debugging - printf("*** direction ***\n"); - printf("lrCount = %d\n", lrCount); - printf("primaryLR = %d\n", primaryLR); -#endif - - //----- column assignment - - // sort blocks into xy order for column assignment - if (blocks) - gfree (blocks); - if (physLayout && fixedPitch) { - - blocks = (TextBlock **)gmallocn(nBlocks, sizeof(TextBlock *)); - for (blk = blkList, i = 0; blk; blk = blk->next, ++i) { - blocks[i] = blk; - col1 = 0; // make gcc happy - switch (primaryRot) { - case 0: - col1 = (int)(blk->xMin / fixedPitch + 0.5); - break; - case 1: - col1 = (int)(blk->yMin / fixedPitch + 0.5); - break; - case 2: - col1 = (int)((pageWidth - blk->xMax) / fixedPitch + 0.5); - break; - case 3: - col1 = (int)((pageHeight - blk->yMax) / fixedPitch + 0.5); - break; - } - blk->col = col1; - for (line = blk->lines; line; line = line->next) { - for (j = 0; j <= line->len; ++j) { - line->col[j] += col1; - } - } - } - - } else { - - // sort blocks into xy order for column assignment - blocks = (TextBlock **)gmallocn(nBlocks, sizeof(TextBlock *)); - for (blk = blkList, i = 0; blk; blk = blk->next, ++i) { - blocks[i] = blk; - } - if (blocks) { - qsort(blocks, nBlocks, sizeof(TextBlock *), &TextBlock::cmpXYPrimaryRot); - } - - // column assignment - for (i = 0; i < nBlocks; ++i) { - blk0 = blocks[i]; - col1 = 0; - for (j = 0; j < i; ++j) { - blk1 = blocks[j]; - col2 = 0; // make gcc happy - switch (primaryRot) { - case 0: - if (blk0->xMin > blk1->xMax) { - col2 = blk1->col + blk1->nColumns + 3; - } else if (blk1->xMax == blk1->xMin) { - col2 = blk1->col; - } else { - col2 = blk1->col + (int)(((blk0->xMin - blk1->xMin) / - (blk1->xMax - blk1->xMin)) * - blk1->nColumns); - } - break; - case 1: - if (blk0->yMin > blk1->yMax) { - col2 = blk1->col + blk1->nColumns + 3; - } else if (blk1->yMax == blk1->yMin) { - col2 = blk1->col; - } else { - col2 = blk1->col + (int)(((blk0->yMin - blk1->yMin) / - (blk1->yMax - blk1->yMin)) * - blk1->nColumns); - } - break; - case 2: - if (blk0->xMax < blk1->xMin) { - col2 = blk1->col + blk1->nColumns + 3; - } else if (blk1->xMin == blk1->xMax) { - col2 = blk1->col; - } else { - col2 = blk1->col + (int)(((blk0->xMax - blk1->xMax) / - (blk1->xMin - blk1->xMax)) * - blk1->nColumns); - } - break; - case 3: - if (blk0->yMax < blk1->yMin) { - col2 = blk1->col + blk1->nColumns + 3; - } else if (blk1->yMin == blk1->yMax) { - col2 = blk1->col; - } else { - col2 = blk1->col + (int)(((blk0->yMax - blk1->yMax) / - (blk1->yMin - blk1->yMax)) * - blk1->nColumns); - } - break; - } - if (col2 > col1) { - col1 = col2; - } - } - blk0->col = col1; - for (line = blk0->lines; line; line = line->next) { - for (j = 0; j <= line->len; ++j) { - line->col[j] += col1; - } - } - } - - } - -#if 0 // for debugging - printf("*** blocks, after column assignment ***\n"); - for (blk = blkList; blk; blk = blk->next) { - printf("block: rot=%d x=%.2f..%.2f y=%.2f..%.2f col=%d nCols=%d\n", - blk->rot, blk->xMin, blk->xMax, blk->yMin, blk->yMax, blk->col, - blk->nColumns); - for (line = blk->lines; line; line = line->next) { - printf(" line: col[0]=%d\n", line->col[0]); - for (word0 = line->words; word0; word0 = word0->next) { - printf(" word: x=%.2f..%.2f y=%.2f..%.2f base=%.2f fontSize=%.2f space=%d: '", - word0->xMin, word0->xMax, word0->yMin, word0->yMax, - word0->base, word0->fontSize, word0->spaceAfter); - for (i = 0; i < word0->len; ++i) { - fputc(word0->text[i] & 0xff, stdout); - } - printf("'\n"); - } - } - } - printf("\n"); -#endif - - //----- reading order sort - - // compute space on left and right sides of each block - for (i = 0; i < nBlocks; ++i) { - blk0 = blocks[i]; - for (j = 0; j < nBlocks; ++j) { - blk1 = blocks[j]; - if (blk1 != blk0) { - blk0->updatePriMinMax(blk1); - } - } - } - -#if 0 // for debugging - printf("PAGE\n"); -#endif - - int sortPos = 0; - GBool *visited = (GBool *)gmallocn(nBlocks, sizeof(GBool)); - for (i = 0; i < nBlocks; i++) { - visited[i] = gFalse; - } - - double bxMin0, byMin0, bxMin1, byMin1; - int numTables = 0; - int tableId = -1; - int correspondenceX, correspondenceY; - double xCentre1, yCentre1, xCentre2, yCentre2; - double xCentre3, yCentre3, xCentre4, yCentre4; - double deltaX, deltaY; - TextBlock *fblk2 = nullptr, *fblk3 = nullptr, *fblk4 = nullptr; - - for (blk1 = blkList; blk1; blk1 = blk1->next) { - blk1->ExMin = blk1->xMin; - blk1->ExMax = blk1->xMax; - blk1->EyMin = blk1->yMin; - blk1->EyMax = blk1->yMax; - - bxMin0 = DBL_MAX; - byMin0 = DBL_MAX; - bxMin1 = DBL_MAX; - byMin1 = DBL_MAX; - - fblk2 = nullptr; - fblk3 = nullptr; - fblk4 = nullptr; - - /* find fblk2, fblk3 and fblk4 so that - * fblk2 is on the right of blk1 and overlap with blk1 in y axis - * fblk3 is under blk1 and overlap with blk1 in x axis - * fblk4 is under blk1 and on the right of blk1 - * and they are closest to blk1 - */ - for (blk2 = blkList; blk2; blk2 = blk2->next) { - if (blk2 != blk1) { - if (blk2->yMin <= blk1->yMax && - blk2->yMax >= blk1->yMin && - blk2->xMin > blk1->xMax && - blk2->xMin < bxMin0) { - bxMin0 = blk2->xMin; - fblk2 = blk2; - } else if (blk2->xMin <= blk1->xMax && - blk2->xMax >= blk1->xMin && - blk2->yMin > blk1->yMax && - blk2->yMin < byMin0) { - byMin0 = blk2->yMin; - fblk3 = blk2; - } else if (blk2->xMin > blk1->xMax && - blk2->xMin < bxMin1 && - blk2->yMin > blk1->yMax && - blk2->yMin < byMin1) { - bxMin1 = blk2->xMin; - byMin1 = blk2->yMin; - fblk4 = blk2; - } - } - } - - /* fblk4 can not overlap with fblk3 in x and with fblk2 in y - * fblk2 can not overlap with fblk3 in x and y - * fblk4 has to overlap with fblk3 in y and with fblk2 in x - */ - if (fblk2 != nullptr && - fblk3 != nullptr && - fblk4 != nullptr) { - if (((fblk3->xMin <= fblk4->xMax && fblk3->xMax >= fblk4->xMin) || - (fblk2->yMin <= fblk4->yMax && fblk2->yMax >= fblk4->yMin) || - (fblk2->xMin <= fblk3->xMax && fblk2->xMax >= fblk3->xMin) || - (fblk2->yMin <= fblk3->yMax && fblk2->yMax >= fblk3->yMin)) || - !(fblk4->xMin <= fblk2->xMax && fblk4->xMax >= fblk2->xMin && - fblk4->yMin <= fblk3->yMax && fblk4->yMax >= fblk3->yMin)) { - fblk2 = nullptr; - fblk3 = nullptr; - fblk4 = nullptr; - } - } - - // if we found any then look whether they form a table - if (fblk2 != nullptr && - fblk3 != nullptr && - fblk4 != nullptr) { - tableId = -1; - correspondenceX = 0; - correspondenceY = 0; - deltaX = 0.0; - deltaY = 0.0; - - if (blk1->lines && blk1->lines->words) - deltaX = blk1->lines->words->getFontSize(); - if (fblk2->lines && fblk2->lines->words) - deltaX = deltaX < fblk2->lines->words->getFontSize() ? - deltaX : fblk2->lines->words->getFontSize(); - if (fblk3->lines && fblk3->lines->words) - deltaX = deltaX < fblk3->lines->words->getFontSize() ? - deltaX : fblk3->lines->words->getFontSize(); - if (fblk4->lines && fblk4->lines->words) - deltaX = deltaX < fblk4->lines->words->getFontSize() ? - deltaX : fblk4->lines->words->getFontSize(); - - deltaY = deltaX; - - deltaX *= minColSpacing1; - deltaY *= maxIntraLineDelta; - - xCentre1 = (blk1->xMax + blk1->xMin) / 2.0; - yCentre1 = (blk1->yMax + blk1->yMin) / 2.0; - xCentre2 = (fblk2->xMax + fblk2->xMin) / 2.0; - yCentre2 = (fblk2->yMax + fblk2->yMin) / 2.0; - xCentre3 = (fblk3->xMax + fblk3->xMin) / 2.0; - yCentre3 = (fblk3->yMax + fblk3->yMin) / 2.0; - xCentre4 = (fblk4->xMax + fblk4->xMin) / 2.0; - yCentre4 = (fblk4->yMax + fblk4->yMin) / 2.0; - - // are blocks centrally aligned in x ? - if (fabs (xCentre1 - xCentre3) <= deltaX && - fabs (xCentre2 - xCentre4) <= deltaX) - correspondenceX++; - - // are blocks centrally aligned in y ? - if (fabs (yCentre1 - yCentre2) <= deltaY && - fabs (yCentre3 - yCentre4) <= deltaY) - correspondenceY++; - - // are blocks aligned to the left ? - if (fabs (blk1->xMin - fblk3->xMin) <= deltaX && - fabs (fblk2->xMin - fblk4->xMin) <= deltaX) - correspondenceX++; - - // are blocks aligned to the right ? - if (fabs (blk1->xMax - fblk3->xMax) <= deltaX && - fabs (fblk2->xMax - fblk4->xMax) <= deltaX) - correspondenceX++; - - // are blocks aligned to the top ? - if (fabs (blk1->yMin - fblk2->yMin) <= deltaY && - fabs (fblk3->yMin - fblk4->yMin) <= deltaY) - correspondenceY++; - - // are blocks aligned to the bottom ? - if (fabs (blk1->yMax - fblk2->yMax) <= deltaY && - fabs (fblk3->yMax - fblk4->yMax) <= deltaY) - correspondenceY++; - - // are blocks aligned in x and y ? - if (correspondenceX > 0 && - correspondenceY > 0) { - - // find maximal tableId - tableId = tableId < fblk4->tableId ? fblk4->tableId : tableId; - tableId = tableId < fblk3->tableId ? fblk3->tableId : tableId; - tableId = tableId < fblk2->tableId ? fblk2->tableId : tableId; - tableId = tableId < blk1->tableId ? blk1->tableId : tableId; - - // if the tableId is -1, then we found new table - if (tableId < 0) { - tableId = numTables; - numTables++; - } - - blk1->tableId = tableId; - fblk2->tableId = tableId; - fblk3->tableId = tableId; - fblk4->tableId = tableId; - } - } - } - - /* set extended bounding boxes of all table entries - * so that they contain whole table - * (we need to process whole table size when comparing it - * with regular text blocks) - */ - PDFRectangle *envelopes = new PDFRectangle [numTables]; - TextBlock **ending_blocks = new TextBlock* [numTables]; - - for (i = 0; i < numTables; i++) { - envelopes[i].x1 = DBL_MAX; - envelopes[i].x2 = DBL_MIN; - envelopes[i].y1 = DBL_MAX; - envelopes[i].y2 = DBL_MIN; - } - - for (blk1 = blkList; blk1; blk1 = blk1->next) { - if (blk1->tableId >= 0) { - if (blk1->ExMin < envelopes[blk1->tableId].x1) { - envelopes[blk1->tableId].x1 = blk1->ExMin; - if (!blk1->page->primaryLR) - ending_blocks[blk1->tableId] = blk1; - } - - if (blk1->ExMax > envelopes[blk1->tableId].x2) { - envelopes[blk1->tableId].x2 = blk1->ExMax; - if (blk1->page->primaryLR) - ending_blocks[blk1->tableId] = blk1; - } - - envelopes[blk1->tableId].y1 = blk1->EyMin < envelopes[blk1->tableId].y1 ? - blk1->EyMin : envelopes[blk1->tableId].y1; - envelopes[blk1->tableId].y2 = blk1->EyMax > envelopes[blk1->tableId].y2 ? - blk1->EyMax : envelopes[blk1->tableId].y2; - } - } - - for (blk1 = blkList; blk1; blk1 = blk1->next) { - if (blk1->tableId >= 0 && - blk1->xMin <= ending_blocks[blk1->tableId]->xMax && - blk1->xMax >= ending_blocks[blk1->tableId]->xMin) { - blk1->tableEnd = gTrue; - } - } - - for (blk1 = blkList; blk1; blk1 = blk1->next) { - if (blk1->tableId >= 0) { - blk1->ExMin = envelopes[blk1->tableId].x1; - blk1->ExMax = envelopes[blk1->tableId].x2; - blk1->EyMin = envelopes[blk1->tableId].y1; - blk1->EyMax = envelopes[blk1->tableId].y2; - } - } - delete[] envelopes; - delete[] ending_blocks; - - - /* set extended bounding boxes of all other blocks - * so that they extend in x without hitting neighbours - */ - for (blk1 = blkList; blk1; blk1 = blk1->next) { - if (!(blk1->tableId >= 0)) { - double xMax = DBL_MAX; - double xMin = DBL_MIN; - - for (blk2 = blkList; blk2; blk2 = blk2->next) { - if (blk2 == blk1) - continue; - - if (blk1->yMin <= blk2->yMax && blk1->yMax >= blk2->yMin) { - if (blk2->xMin < xMax && blk2->xMin > blk1->xMax) - xMax = blk2->xMin; - - if (blk2->xMax > xMin && blk2->xMax < blk1->xMin) - xMin = blk2->xMax; - } - } - - for (blk2 = blkList; blk2; blk2 = blk2->next) { - if (blk2 == blk1) - continue; - - if (blk2->xMax > blk1->ExMax && - blk2->xMax <= xMax && - blk2->yMin >= blk1->yMax) { - blk1->ExMax = blk2->xMax; - } - - if (blk2->xMin < blk1->ExMin && - blk2->xMin >= xMin && - blk2->yMin >= blk1->yMax) - blk1->ExMin = blk2->xMin; - } - } - } - - i = -1; - for (blk1 = blkList; blk1; blk1 = blk1->next) { - i++; - sortPos = blk1->visitDepthFirst(blkList, i, blocks, sortPos, visited); - } - if (visited) { - gfree(visited); - } - -#if 0 // for debugging - printf("*** blocks, after ro sort ***\n"); - for (i = 0; i < nBlocks; ++i) { - blk = blocks[i]; - printf("block: rot=%d x=%.2f..%.2f y=%.2f..%.2f space=%.2f..%.2f\n", - blk->rot, blk->xMin, blk->xMax, blk->yMin, blk->yMax, - blk->priMin, blk->priMax); - for (line = blk->lines; line; line = line->next) { - printf(" line:\n"); - for (word0 = line->words; word0; word0 = word0->next) { - printf(" word: x=%.2f..%.2f y=%.2f..%.2f base=%.2f fontSize=%.2f space=%d: '", - word0->xMin, word0->xMax, word0->yMin, word0->yMax, - word0->base, word0->fontSize, word0->spaceAfter); - for (j = 0; j < word0->len; ++j) { - fputc(word0->text[j] & 0xff, stdout); - } - printf("'\n"); - } - } - } - printf("\n"); - fflush(stdout); -#endif - - // build the flows - //~ this needs to be adjusted for writing mode (vertical text) - //~ this also needs to account for right-to-left column ordering - while (flows) { - flow = flows; - flows = flows->next; - delete flow; - } - flow = nullptr; - flows = lastFlow = nullptr; - // assume blocks are already in reading order, - // and construct flows accordingly. - for (i = 0; i < nBlocks; i++) { - blk = blocks[i]; - blk->next = nullptr; - if (flow) { - blk1 = blocks[i - 1]; - blkSpace = maxBlockSpacing * blk1->lines->words->fontSize; - if (blk1->secondaryDelta(blk) <= blkSpace && - blk->isBelow(blk1) && - flow->blockFits(blk, blk1)) { - flow->addBlock(blk); - continue; - } - } - flow = new TextFlow(this, blk); - if (lastFlow) { - lastFlow->next = flow; - } else { - flows = flow; - } - lastFlow = flow; - } - -#if 0 // for debugging - printf("*** flows ***\n"); - for (flow = flows; flow; flow = flow->next) { - printf("flow: x=%.2f..%.2f y=%.2f..%.2f pri:%.2f..%.2f\n", - flow->xMin, flow->xMax, flow->yMin, flow->yMax, - flow->priMin, flow->priMax); - for (blk = flow->blocks; blk; blk = blk->next) { - printf(" block: rot=%d x=%.2f..%.2f y=%.2f..%.2f pri=%.2f..%.2f\n", - blk->rot, blk->ExMin, blk->ExMax, blk->EyMin, blk->EyMax, - blk->priMin, blk->priMax); - for (line = blk->lines; line; line = line->next) { - printf(" line:\n"); - for (word0 = line->words; word0; word0 = word0->next) { - printf(" word: x=%.2f..%.2f y=%.2f..%.2f base=%.2f fontSize=%.2f space=%d: '", - word0->xMin, word0->xMax, word0->yMin, word0->yMax, - word0->base, word0->fontSize, word0->spaceAfter); - for (i = 0; i < word0->len; ++i) { - fputc(word0->text[i] & 0xff, stdout); - } - printf("'\n"); - } - } - } - } - printf("\n"); -#endif - - if (uMap) { - uMap->decRefCnt(); - } -} - -GBool TextPage::findText(Unicode *s, int len, - GBool startAtTop, GBool stopAtBottom, - GBool startAtLast, GBool stopAtLast, - GBool caseSensitive, GBool backward, - GBool wholeWord, - double *xMin, double *yMin, - double *xMax, double *yMax) { - TextBlock *blk; - TextLine *line; - Unicode *s2, *txt, *reordered; - Unicode *p; - int txtSize, m, i, j, k; - double xStart, yStart, xStop, yStop; - double xMin0, yMin0, xMax0, yMax0; - double xMin1, yMin1, xMax1, yMax1; - GBool found; - - - if (rawOrder) { - return gFalse; - } - - // handle right-to-left text - reordered = (Unicode*)gmallocn(len, sizeof(Unicode)); - reorderText(s, len, nullptr, primaryLR, nullptr, reordered); - - // normalize the search string - s2 = unicodeNormalizeNFKC(reordered, len, &len, nullptr); - - // convert the search string to uppercase - if (!caseSensitive) { - for (i = 0; i < len; ++i) { - s2[i] = unicodeToUpper(s2[i]); - } - } - - txt = nullptr; - txtSize = 0; - - xStart = yStart = xStop = yStop = 0; - if (startAtLast && haveLastFind) { - xStart = lastFindXMin; - yStart = lastFindYMin; - } else if (!startAtTop) { - xStart = *xMin; - yStart = *yMin; - } - if (stopAtLast && haveLastFind) { - xStop = lastFindXMin; - yStop = lastFindYMin; - } else if (!stopAtBottom) { - xStop = *xMax; - yStop = *yMax; - } - - found = gFalse; - xMin0 = xMax0 = yMin0 = yMax0 = 0; // make gcc happy - xMin1 = xMax1 = yMin1 = yMax1 = 0; // make gcc happy - - for (i = backward ? nBlocks - 1 : 0; - backward ? i >= 0 : i < nBlocks; - i += backward ? -1 : 1) { - blk = blocks[i]; - - // check: is the block above the top limit? - // (this only works if the page's primary rotation is zero -- - // otherwise the blocks won't be sorted in the useful order) - if (!startAtTop && primaryRot == 0 && - (backward ? blk->yMin > yStart : blk->yMax < yStart)) { - continue; - } - - // check: is the block below the bottom limit? - // (this only works if the page's primary rotation is zero -- - // otherwise the blocks won't be sorted in the useful order) - if (!stopAtBottom && primaryRot == 0 && - (backward ? blk->yMax < yStop : blk->yMin > yStop)) { - break; - } - - for (line = blk->lines; line; line = line->next) { - - // check: is the line above the top limit? - // (this only works if the page's primary rotation is zero -- - // otherwise the lines won't be sorted in the useful order) - if (!startAtTop && primaryRot == 0 && - (backward ? line->yMin > yStart : line->yMin < yStart)) { - continue; - } - - // check: is the line below the bottom limit? - // (this only works if the page's primary rotation is zero -- - // otherwise the lines won't be sorted in the useful order) - if (!stopAtBottom && primaryRot == 0 && - (backward ? line->yMin < yStop : line->yMin > yStop)) { - continue; - } - - if (!line->normalized) - line->normalized = unicodeNormalizeNFKC(line->text, line->len, - &line->normalized_len, - &line->normalized_idx, - true); - // convert the line to uppercase - m = line->normalized_len; - if (!caseSensitive) { - if (m > txtSize) { - txt = (Unicode *)greallocn(txt, m, sizeof(Unicode)); - txtSize = m; - } - for (k = 0; k < m; ++k) { - txt[k] = unicodeToUpper(line->normalized[k]); - } - } else { - txt = line->normalized; - } - - // search each position in this line - j = backward ? m - len : 0; - p = txt + j; - while (backward ? j >= 0 : j <= m - len) { - if (!wholeWord || - ((j == 0 || !unicodeTypeAlphaNum(txt[j - 1])) && - (j + len == m || !unicodeTypeAlphaNum(txt[j + len])))) { - - // compare the strings - for (k = 0; k < len; ++k) { - if (p[k] != s2[k]) { - break; - } - } - - // found it - if (k == len) { - // where s2 matches a subsequence of a compatibility equivalence - // decomposition, highlight the entire glyph, since we don't know - // the internal layout of subglyph components - int normStart = line->normalized_idx[j]; - int normAfterEnd = line->normalized_idx[j + len - 1] + 1; - switch (line->rot) { - case 0: - xMin1 = line->edge[normStart]; - xMax1 = line->edge[normAfterEnd]; - yMin1 = line->yMin; - yMax1 = line->yMax; - break; - case 1: - xMin1 = line->xMin; - xMax1 = line->xMax; - yMin1 = line->edge[normStart]; - yMax1 = line->edge[normAfterEnd]; - break; - case 2: - xMin1 = line->edge[normAfterEnd]; - xMax1 = line->edge[normStart]; - yMin1 = line->yMin; - yMax1 = line->yMax; - break; - case 3: - xMin1 = line->xMin; - xMax1 = line->xMax; - yMin1 = line->edge[normAfterEnd]; - yMax1 = line->edge[normStart]; - break; - } - if (backward) { - if ((startAtTop || - yMin1 < yStart || (yMin1 == yStart && xMin1 < xStart)) && - (stopAtBottom || - yMin1 > yStop || (yMin1 == yStop && xMin1 > xStop))) { - if (!found || - yMin1 > yMin0 || (yMin1 == yMin0 && xMin1 > xMin0)) { - xMin0 = xMin1; - xMax0 = xMax1; - yMin0 = yMin1; - yMax0 = yMax1; - found = gTrue; - } - } - } else { - if ((startAtTop || - yMin1 > yStart || (yMin1 == yStart && xMin1 > xStart)) && - (stopAtBottom || - yMin1 < yStop || (yMin1 == yStop && xMin1 < xStop))) { - if (!found || - yMin1 < yMin0 || (yMin1 == yMin0 && xMin1 < xMin0)) { - xMin0 = xMin1; - xMax0 = xMax1; - yMin0 = yMin1; - yMax0 = yMax1; - found = gTrue; - } - } - } - } - } - if (backward) { - --j; - --p; - } else { - ++j; - ++p; - } - } - } - } - - gfree(s2); - gfree(reordered); - if (!caseSensitive) { - gfree(txt); - } - - if (found) { - *xMin = xMin0; - *xMax = xMax0; - *yMin = yMin0; - *yMax = yMax0; - lastFindXMin = xMin0; - lastFindYMin = yMin0; - haveLastFind = gTrue; - return gTrue; - } - - return gFalse; -} - -GooString *TextPage::getText(double xMin, double yMin, - double xMax, double yMax) { - GooString *s; - UnicodeMap *uMap; - TextBlock *blk; - TextLine *line; - TextLineFrag *frags; - int nFrags, fragsSize; - TextLineFrag *frag; - char space[8], eol[16]; - int spaceLen, eolLen; - int lastRot; - double x, y, delta; - int col, idx0, idx1, i, j; - GBool multiLine, oneRot; - - s = new GooString(); - - // get the output encoding - if (!(uMap = globalParams->getTextEncoding())) { - return s; - } - - if (rawOrder) { - TextWord* word; - char mbc[16]; - int mbc_len; - - for (word = rawWords; word && word <= rawLastWord; word = word->next) { - for (j = 0; j < word->getLength(); ++j) { - double gXMin, gXMax, gYMin, gYMax; - word->getCharBBox(j, &gXMin, &gYMin, &gXMax, &gYMax); - if (xMin <= gXMin && gXMax <= xMax && yMin <= gYMin && gYMax <= yMax) - { - mbc_len = uMap->mapUnicode( *(word->getChar(j)), mbc, sizeof(mbc) ); - s->append(mbc, mbc_len); - } - } - } - return s; - } - - spaceLen = uMap->mapUnicode(0x20, space, sizeof(space)); - eolLen = 0; // make gcc happy - switch (globalParams->getTextEOL()) { - case eolUnix: - eolLen = uMap->mapUnicode(0x0a, eol, sizeof(eol)); - break; - case eolDOS: - eolLen = uMap->mapUnicode(0x0d, eol, sizeof(eol)); - eolLen += uMap->mapUnicode(0x0a, eol + eolLen, sizeof(eol) - eolLen); - break; - case eolMac: - eolLen = uMap->mapUnicode(0x0d, eol, sizeof(eol)); - break; - } - - //~ writing mode (horiz/vert) - - // collect the line fragments that are in the rectangle - fragsSize = 256; - frags = (TextLineFrag *)gmallocn(fragsSize, sizeof(TextLineFrag)); - nFrags = 0; - lastRot = -1; - oneRot = gTrue; - for (i = 0; i < nBlocks; ++i) { - blk = blocks[i]; - if (xMin < blk->xMax && blk->xMin < xMax && - yMin < blk->yMax && blk->yMin < yMax) { - for (line = blk->lines; line; line = line->next) { - if (xMin < line->xMax && line->xMin < xMax && - yMin < line->yMax && line->yMin < yMax) { - idx0 = idx1 = -1; - switch (line->rot) { - case 0: - y = 0.5 * (line->yMin + line->yMax); - if (yMin < y && y < yMax) { - j = 0; - while (j < line->len) { - if (0.5 * (line->edge[j] + line->edge[j+1]) > xMin) { - idx0 = j; - break; - } - ++j; - } - j = line->len - 1; - while (j >= 0) { - if (0.5 * (line->edge[j] + line->edge[j+1]) < xMax) { - idx1 = j; - break; - } - --j; - } - } - break; - case 1: - x = 0.5 * (line->xMin + line->xMax); - if (xMin < x && x < xMax) { - j = 0; - while (j < line->len) { - if (0.5 * (line->edge[j] + line->edge[j+1]) > yMin) { - idx0 = j; - break; - } - ++j; - } - j = line->len - 1; - while (j >= 0) { - if (0.5 * (line->edge[j] + line->edge[j+1]) < yMax) { - idx1 = j; - break; - } - --j; - } - } - break; - case 2: - y = 0.5 * (line->yMin + line->yMax); - if (yMin < y && y < yMax) { - j = 0; - while (j < line->len) { - if (0.5 * (line->edge[j] + line->edge[j+1]) < xMax) { - idx0 = j; - break; - } - ++j; - } - j = line->len - 1; - while (j >= 0) { - if (0.5 * (line->edge[j] + line->edge[j+1]) > xMin) { - idx1 = j; - break; - } - --j; - } - } - break; - case 3: - x = 0.5 * (line->xMin + line->xMax); - if (xMin < x && x < xMax) { - j = 0; - while (j < line->len) { - if (0.5 * (line->edge[j] + line->edge[j+1]) < yMax) { - idx0 = j; - break; - } - ++j; - } - j = line->len - 1; - while (j >= 0) { - if (0.5 * (line->edge[j] + line->edge[j+1]) > yMin) { - idx1 = j; - break; - } - --j; - } - } - break; - } - if (idx0 >= 0 && idx1 >= 0) { - if (nFrags == fragsSize) { - fragsSize *= 2; - frags = (TextLineFrag *) - greallocn(frags, fragsSize, sizeof(TextLineFrag)); - } - frags[nFrags].init(line, idx0, idx1 - idx0 + 1); - ++nFrags; - if (lastRot >= 0 && line->rot != lastRot) { - oneRot = gFalse; - } - lastRot = line->rot; - } - } - } - } - } - - // sort the fragments and generate the string - if (nFrags > 0) { - - for (i = 0; i < nFrags; ++i) { - frags[i].computeCoords(oneRot); - } - assignColumns(frags, nFrags, oneRot); - - // if all lines in the region have the same rotation, use it; - // otherwise, use the page's primary rotation - if (oneRot) { - qsort(frags, nFrags, sizeof(TextLineFrag), - &TextLineFrag::cmpYXLineRot); - } else { - qsort(frags, nFrags, sizeof(TextLineFrag), - &TextLineFrag::cmpYXPrimaryRot); - } - i = 0; - while (i < nFrags) { - delta = maxIntraLineDelta * frags[i].line->words->fontSize; - for (j = i+1; - j < nFrags && fabs(frags[j].base - frags[i].base) < delta; - ++j) ; - qsort(frags + i, j - i, sizeof(TextLineFrag), - oneRot ? &TextLineFrag::cmpXYColumnLineRot - : &TextLineFrag::cmpXYColumnPrimaryRot); - i = j; - } - - col = 0; - multiLine = gFalse; - for (i = 0; i < nFrags; ++i) { - frag = &frags[i]; - - // insert a return - if (frag->col < col || - (i > 0 && fabs(frag->base - frags[i-1].base) > - maxIntraLineDelta * frags[i-1].line->words->fontSize)) { - s->append(eol, eolLen); - col = 0; - multiLine = gTrue; - } - - // column alignment - for (; col < frag->col; ++col) { - s->append(space, spaceLen); - } - - // get the fragment text - col += dumpFragment(frag->line->text + frag->start, frag->len, uMap, s); - } - - if (multiLine) { - s->append(eol, eolLen); - } - } - - gfree(frags); - uMap->decRefCnt(); - - return s; -} - -class TextSelectionVisitor { -public: - TextSelectionVisitor (TextPage *page); - virtual ~TextSelectionVisitor () { } - TextSelectionVisitor(const TextSelectionVisitor &) = delete; - TextSelectionVisitor& operator=(const TextSelectionVisitor &) = delete; - virtual void visitBlock (TextBlock *block, - TextLine *begin, - TextLine *end, - PDFRectangle *selection) = 0; - virtual void visitLine (TextLine *line, - TextWord *begin, - TextWord *end, - int edge_begin, - int edge_end, - PDFRectangle *selection) = 0; - virtual void visitWord (TextWord *word, int begin, int end, - PDFRectangle *selection) = 0; - -protected: - TextPage *page; -}; - -TextSelectionVisitor::TextSelectionVisitor (TextPage *page) - : page(page) -{ -} - - -class TextSelectionDumper : public TextSelectionVisitor { -public: - TextSelectionDumper(TextPage *page); - ~TextSelectionDumper(); - - void visitBlock (TextBlock *block, - TextLine *begin, - TextLine *end, - PDFRectangle *selection) override { }; - void visitLine (TextLine *line, - TextWord *begin, - TextWord *end, - int edge_begin, - int edge_end, - PDFRectangle *selection) override; - void visitWord (TextWord *word, int begin, int end, - PDFRectangle *selection) override; - void endPage(); - - GooString *getText(void); - GooList **takeWordList(int *nLines); - -private: - - void startLine(); - void finishLine(); - - GooList **lines; - int nLines, linesSize; - GooList *words; - int tableId; - TextBlock *currentBlock; -}; - -TextSelectionDumper::TextSelectionDumper(TextPage *page) - : TextSelectionVisitor(page) -{ - linesSize = 256; - lines = (GooList **)gmallocn(linesSize, sizeof(GooList *)); - nLines = 0; - - tableId = -1; - currentBlock = nullptr; - words = nullptr; -} - -TextSelectionDumper::~TextSelectionDumper() -{ - for (int i = 0; i < nLines; i++) - deleteGooList(lines[i], TextWordSelection); - gfree(lines); -} - -void TextSelectionDumper::startLine() -{ - finishLine(); - words = new GooList(); -} - -void TextSelectionDumper::finishLine() -{ - if (nLines == linesSize) { - linesSize *= 2; - lines = (GooList **)grealloc(lines, linesSize * sizeof(GooList *)); - } - - if (words && words->getLength() > 0) - lines[nLines++] = words; - else if (words) - delete words; - words = nullptr; -} - -void TextSelectionDumper::visitLine (TextLine *line, - TextWord *begin, - TextWord *end, - int edge_begin, - int edge_end, - PDFRectangle *selection) -{ - TextLineFrag frag; - - frag.init(line, edge_begin, edge_end - edge_begin); - - if (tableId >= 0 && frag.line->blk->tableId < 0) { - finishLine(); - - tableId = -1; - currentBlock = nullptr; - } - - if (frag.line->blk->tableId >= 0) { // a table - if (tableId == -1) { - tableId = frag.line->blk->tableId; - currentBlock = frag.line->blk; - } - - if (currentBlock == frag.line->blk) { // the same block - startLine(); - } else { // another block - if (currentBlock->tableEnd) { // previous block ended its row - startLine(); - } - currentBlock = frag.line->blk; - } - } else { // not a table - startLine(); - } -} - -void TextSelectionDumper::visitWord (TextWord *word, int begin, int end, - PDFRectangle *selection) -{ - words->append(new TextWordSelection(word, begin, end)); -} - -void TextSelectionDumper::endPage() -{ - finishLine(); -} - -GooString *TextSelectionDumper::getText (void) -{ - GooString *text; - int i, j; - UnicodeMap *uMap; - char space[8], eol[16]; - int spaceLen, eolLen; - - text = new GooString(); - - if (!(uMap = globalParams->getTextEncoding())) - return text; - - spaceLen = uMap->mapUnicode(0x20, space, sizeof(space)); - eolLen = uMap->mapUnicode(0x0a, eol, sizeof(eol)); - - for (i = 0; i < nLines; i++) { - GooList *lineWords = lines[i]; - for (j = 0; j < lineWords->getLength(); j++) { - TextWordSelection *sel = (TextWordSelection *)lineWords->get(j); - - page->dumpFragment (sel->word->text + sel->begin, sel->end - sel->begin, uMap, text); - if (j < lineWords->getLength() - 1) - text->append(space, spaceLen); - } - if (i < nLines - 1) - text->append(eol, eolLen); - } - - uMap->decRefCnt(); - - return text; -} - -GooList **TextSelectionDumper::takeWordList(int *nLinesOut) -{ - GooList **returnValue = lines; - - *nLinesOut = nLines; - if (nLines == 0) - return nullptr; - - nLines = 0; - lines = nullptr; - - return returnValue; -} - -class TextSelectionSizer : public TextSelectionVisitor { -public: - TextSelectionSizer(TextPage *page, double scale); - ~TextSelectionSizer() { } - - void visitBlock (TextBlock *block, - TextLine *begin, - TextLine *end, - PDFRectangle *selection) override { }; - void visitLine (TextLine *line, - TextWord *begin, - TextWord *end, - int edge_begin, - int edge_end, - PDFRectangle *selection) override; - void visitWord (TextWord *word, int begin, int end, - PDFRectangle *selection) override { }; - - GooList *getRegion () { return list; } - -private: - GooList *list; - double scale; -}; - -TextSelectionSizer::TextSelectionSizer(TextPage *page, double scale) - : TextSelectionVisitor(page), - scale(scale) -{ - list = new GooList(); -} - -void TextSelectionSizer::visitLine (TextLine *line, - TextWord *begin, - TextWord *end, - int edge_begin, - int edge_end, - PDFRectangle *selection) -{ - PDFRectangle *rect; - double x1, y1, x2, y2, margin; - - margin = (line->yMax - line->yMin) / 8; - x1 = line->edge[edge_begin]; - y1 = line->yMin - margin; - x2 = line->edge[edge_end]; - y2 = line->yMax + margin; - - rect = new PDFRectangle (floor (x1 * scale), - floor (y1 * scale), - ceil (x2 * scale), - ceil (y2 * scale)); - list->append (rect); -} - - -class TextSelectionPainter : public TextSelectionVisitor { -public: - TextSelectionPainter(TextPage *page, - double scale, - int rotation, - OutputDev *out, - GfxColor *box_color, - GfxColor *glyph_color); - ~TextSelectionPainter(); - - void visitBlock (TextBlock *block, - TextLine *begin, - TextLine *end, - PDFRectangle *selection) override { }; - void visitLine (TextLine *line, - TextWord *begin, - TextWord *end, - int edge_begin, - int edge_end, - PDFRectangle *selection) override; - void visitWord (TextWord *word, int begin, int end, - PDFRectangle *selection) override; - void endPage(); - -private: - OutputDev *out; - GfxColor *box_color, *glyph_color; - GfxState *state; - GooList *selectionList; - Matrix ctm, ictm; -}; - -TextSelectionPainter::TextSelectionPainter(TextPage *page, - double scale, - int rotation, - OutputDev *out, - GfxColor *box_color, - GfxColor *glyph_color) - : TextSelectionVisitor(page), - out(out), - box_color(box_color), - glyph_color(glyph_color) -{ - PDFRectangle box(0, 0, page->pageWidth, page->pageHeight); - - selectionList = new GooList(); - state = new GfxState(72 * scale, 72 * scale, &box, rotation, gFalse); - - state->getCTM(&ctm); - ctm.invertTo(&ictm); - - out->startPage(0, state, nullptr); - out->setDefaultCTM (state->getCTM()); - - state->setFillColorSpace(new GfxDeviceRGBColorSpace()); - state->setFillColor(box_color); - out->updateFillColor(state); -} - -TextSelectionPainter::~TextSelectionPainter() -{ - deleteGooList(selectionList, TextWordSelection); - delete state; -} - -void TextSelectionPainter::visitLine (TextLine *line, - TextWord *begin, - TextWord *end, - int edge_begin, - int edge_end, - PDFRectangle *selection) -{ - double x1, y1, x2, y2, margin; - - margin = (line->yMax - line->yMin) / 8; - x1 = floor (line->edge[edge_begin]); - y1 = floor (line->yMin - margin); - x2 = ceil (line->edge[edge_end]); - y2 = ceil (line->yMax + margin); - - ctm.transform(line->edge[edge_begin], line->yMin - margin, &x1, &y1); - ctm.transform(line->edge[edge_end], line->yMax + margin, &x2, &y2); - - x1 = floor (x1); - y1 = floor (y1); - x2 = ceil (x2); - y2 = ceil (y2); - - ictm.transform(x1, y1, &x1, &y1); - ictm.transform(x2, y2, &x2, &y2); - - state->moveTo(x1, y1); - state->lineTo(x2, y1); - state->lineTo(x2, y2); - state->lineTo(x1, y2); - state->closePath(); -} - -void TextSelectionPainter::visitWord (TextWord *word, int begin, int end, - PDFRectangle *selection) -{ - selectionList->append(new TextWordSelection(word, begin, end)); -} - -void TextSelectionPainter::endPage() -{ - out->fill(state); - - out->saveState(state); - out->clip(state); - - state->clearPath(); - - state->setFillColor(glyph_color); - out->updateFillColor(state); - - for (int i = 0; i < selectionList->getLength(); i++) { - TextWordSelection *sel = (TextWordSelection *) selectionList->get(i); - int begin = sel->begin; - - while (begin < sel->end) { - TextFontInfo *font = sel->word->font[begin]; - font->gfxFont->incRefCnt(); - Matrix *mat = &sel->word->textMat[begin]; - - state->setTextMat(mat->m[0], mat->m[1], mat->m[2], mat->m[3], 0, 0); - state->setFont(font->gfxFont, 1); - out->updateFont(state); - - int fEnd = begin + 1; - while (fEnd < sel->end && font->matches(sel->word->font[fEnd]) && - mat->m[0] == sel->word->textMat[fEnd].m[0] && - mat->m[1] == sel->word->textMat[fEnd].m[1] && - mat->m[2] == sel->word->textMat[fEnd].m[2] && - mat->m[3] == sel->word->textMat[fEnd].m[3]) - fEnd++; - - /* The only purpose of this string is to let the output device query - * it's length. Might want to change this interface later. */ - GooString *string = new GooString ((char *) sel->word->charcode, fEnd - begin); - out->beginString(state, string); - - for (int i = begin; i < fEnd; i++) { - if (i != begin && sel->word->charPos[i] == sel->word->charPos[i - 1]) - continue; - - out->drawChar(state, sel->word->textMat[i].m[4], sel->word->textMat[i].m[5], 0, 0, 0, 0, - sel->word->charcode[i], 1, nullptr, 0); - } - out->endString(state); - delete string; - begin = fEnd; - } - } - - out->restoreState(state); - out->endPage (); -} - -void TextWord::visitSelection(TextSelectionVisitor *visitor, - PDFRectangle *selection, - SelectionStyle style) -{ - int i, begin, end; - double mid; - - begin = len; - end = 0; - for (i = 0; i < len; i++) { - mid = (edge[i] + edge[i + 1]) / 2; - if (selection->x1 < mid || selection->x2 < mid) - if (i < begin) - begin = i; - if (mid < selection->x1 || mid < selection->x2) - end = i + 1; - } - - /* Skip empty selection. */ - if (end <= begin) - return; - - visitor->visitWord (this, begin, end, selection); -} - -void TextLine::visitSelection(TextSelectionVisitor *visitor, - PDFRectangle *selection, - SelectionStyle style) { - TextWord *p, *begin, *end, *current; - int i, edge_begin, edge_end; - PDFRectangle child_selection; - - begin = nullptr; - end = nullptr; - current = nullptr; - for (p = words; p != nullptr; p = p->next) { - if (blk->page->primaryLR) { - if ((selection->x1 < p->xMax) || - (selection->x2 < p->xMax)) - if (begin == nullptr) - begin = p; - - if (((selection->x1 > p->xMin) || - (selection->x2 > p->xMin)) && (begin != nullptr)) { - end = p->next; - current = p; - } - } else { - if ((selection->x1 > p->xMin) || - (selection->x2 > p->xMin)) - if (begin == nullptr) - begin = p; - - if (((selection->x1 < p->xMax) || - (selection->x2 < p->xMax)) && (begin != nullptr)) { - end = p->next; - current = p; - } - } - } - - if (!current) - current = begin; - - child_selection = *selection; - if (style == selectionStyleWord) { - child_selection.x1 = begin ? begin->xMin : xMin; - if (end && end->xMax != -1) { - child_selection.x2 = current->xMax; - } else { - child_selection.x2 = xMax; - } - } - - edge_begin = len; - edge_end = 0; - for (i = 0; i < len; i++) { - double mid = (edge[i] + edge[i + 1]) / 2; - if (child_selection.x1 < mid || child_selection.x2 < mid) - if (i < edge_begin) - edge_begin = i; - if (mid < child_selection.x2 || mid < child_selection.x1) - edge_end = i + 1; - } - - /* Skip empty selection. */ - if (edge_end <= edge_begin) - return; - - visitor->visitLine (this, begin, end, edge_begin, edge_end, - &child_selection); - - for (p = begin; p != end; p = p->next) - p->visitSelection (visitor, &child_selection, style); -} - -void TextBlock::visitSelection(TextSelectionVisitor *visitor, - PDFRectangle *selection, - SelectionStyle style) { - PDFRectangle child_selection; - double x[2], y[2], d, best_d[2]; - TextLine *p, *best_line[2]; - int i, count = 0, best_count[2], start, stop; - GBool all[2]; - - x[0] = selection->x1; - y[0] = selection->y1; - x[1] = selection->x2; - y[1] = selection->y2; - - for (i = 0; i < 2; i++) { - // the first/last lines are often not nearest - // the corners, so we have to force them to be - // selected when the selection runs outside this - // block. - if (page->primaryLR) { - all[i] = x[i] >= this->xMax && y[i] >= this->yMax; - if (x[i] <= this->xMin && y[i] <= this->yMin) { - best_line[i] = this->lines; - best_count[i] = 1; - } else { - best_line[i] = nullptr; - best_count[i] = 0; - } - } else { - all[i] = x[i] <= this->xMin && y[i] >= this->yMax; - if (x[i] >= this->xMax && y[i] <= this->yMin) { - best_line[i] = this->lines; - best_count[i] = 1; - } else { - best_line[i] = nullptr; - best_count[i] = 0; - } - } - best_d[i] = 0; - } - - // find the nearest line to the selection points - // using the manhattan distance. - for (p = this->lines; p; p = p->next) { - count++; - for (i = 0; i < 2; i++) { - d = fmax(p->xMin - x[i], 0.0) + - fmax(x[i] - p->xMax, 0.0) + - fmax(p->yMin - y[i], 0.0) + - fmax(y[i] - p->yMax, 0.0); - if (!best_line[i] || all[i] || - d < best_d[i]) { - best_line[i] = p; - best_count[i] = count; - best_d[i] = d; - } - } - } - // assert: best is always set. - if (!best_line[0] || !best_line[1]) { - return; - } - - // Now decide which point was first. - if (best_count[0] < best_count[1] || - (best_count[0] == best_count[1] && - y[0] < y[1])) { - start = 0; - stop = 1; - } else { - start = 1; - stop = 0; - } - - visitor->visitBlock(this, best_line[start], best_line[stop], selection); - - for (p = best_line[start]; p; p = p->next) { - if (page->primaryLR) { - child_selection.x1 = p->xMin; - child_selection.x2 = p->xMax; - } else { - child_selection.x1 = p->xMax; - child_selection.x2 = p->xMin; - } - child_selection.y1 = p->yMin; - child_selection.y2 = p->yMax; - if (style == selectionStyleLine) { - if (p == best_line[start]) { - child_selection.x1 = 0; - child_selection.y1 = 0; - } - if (p == best_line[stop]) { - child_selection.x2 = page->pageWidth; - child_selection.y2 = page->pageHeight; - } - } else { - if (p == best_line[start]) { - child_selection.x1 = fmax(p->xMin, fmin(p->xMax, x[start])); - child_selection.y1 = fmax(p->yMin, fmin(p->yMax, y[start])); - } - if (p == best_line[stop]) { - child_selection.x2 = fmax(p->xMin, fmin(p->xMax, x[stop])); - child_selection.y2 = fmax(p->yMin, fmin(p->yMax, y[stop])); - } - } - p->visitSelection(visitor, &child_selection, style); - if (p == best_line[stop]) { - return; - } - } -} - -void TextPage::visitSelection(TextSelectionVisitor *visitor, - PDFRectangle *selection, - SelectionStyle style) -{ - PDFRectangle child_selection; - double x[2], y[2], d, best_d[2]; - double xMin, yMin, xMax, yMax; - TextFlow *flow, *best_flow[2]; - TextBlock *blk, *best_block[2]; - int i, count = 0, best_count[2], start, stop; - - if (!flows) - return; - - x[0] = selection->x1; - y[0] = selection->y1; - x[1] = selection->x2; - y[1] = selection->y2; - - xMin = pageWidth; - yMin = pageHeight; - xMax = 0.0; - yMax = 0.0; - - for (i = 0; i < 2; i++) { - best_block[i] = nullptr; - best_flow[i] = nullptr; - best_count[i] = 0; - best_d[i] = 0; - } - - // find the nearest blocks to the selection points - // using the manhattan distance. - for (flow = flows; flow; flow = flow->next) { - for (blk = flow->blocks; blk; blk = blk->next) { - count++; - // the first/last blocks in reading order are - // often not the closest to the page corners; - // track the corners, force those blocks to - // be selected if the selection runs across - // multiple pages. - xMin = fmin(xMin, blk->xMin); - yMin = fmin(yMin, blk->yMin); - xMax = fmax(xMax, blk->xMax); - yMax = fmax(yMax, blk->yMax); - for (i = 0; i < 2; i++) { - d = fmax(blk->xMin - x[i], 0.0) + - fmax(x[i] - blk->xMax, 0.0) + - fmax(blk->yMin - y[i], 0.0) + - fmax(y[i] - blk->yMax, 0.0); - if (!best_block[i] || - d < best_d[i] || - (!blk->next && !flow->next && - x[i] >= fmin(xMax, pageWidth) && - y[i] >= fmin(yMax, pageHeight))) { - best_block[i] = blk; - best_flow[i] = flow; - best_count[i] = count; - best_d[i] = d; - } - } - } - } - for (i = 0; i < 2; i++) { - if (primaryLR) { - if (x[i] < xMin && y[i] < yMin) { - best_block[i] = flows->blocks; - best_flow[i] = flows; - best_count[i] = 1; - } - } else { - if (x[i] > xMax && y[i] < yMin) { - best_block[i] = flows->blocks; - best_flow[i] = flows; - best_count[i] = 1; - } - } - } - // assert: best is always set. - if (!best_block[0] || !best_block[1]) { - return; - } - - // Now decide which point was first. - if (best_count[0] < best_count[1] || - (best_count[0] == best_count[1] && y[0] < y[1])) { - start = 0; - stop = 1; - } else { - start = 1; - stop = 0; - } - - for (flow = best_flow[start]; flow; flow = flow->next) { - if (flow == best_flow[start]) { - blk = best_block[start]; - } else { - blk = flow->blocks; - } - for (; blk; blk = blk->next) { - if (primaryLR) { - child_selection.x1 = blk->xMin; - child_selection.x2 = blk->xMax; - } else { - child_selection.x1 = blk->xMax; - child_selection.x2 = blk->xMin; - } - child_selection.y1 = blk->yMin; - child_selection.y2 = blk->yMax; - if (blk == best_block[start]) { - child_selection.x1 = fmax(blk->xMin, fmin(blk->xMax, x[start])); - child_selection.y1 = fmax(blk->yMin, fmin(blk->yMax, y[start])); - } - if (blk == best_block[stop]) { - child_selection.x2 = fmax(blk->xMin, fmin(blk->xMax, x[stop])); - child_selection.y2 = fmax(blk->yMin, fmin(blk->yMax, y[stop])); - blk->visitSelection(visitor, &child_selection, style); - return; - } - blk->visitSelection(visitor, &child_selection, style); - } - } -} - -void TextPage::drawSelection(OutputDev *out, - double scale, - int rotation, - PDFRectangle *selection, - SelectionStyle style, - GfxColor *glyph_color, GfxColor *box_color) -{ - TextSelectionPainter painter(this, scale, rotation, - out, box_color, glyph_color); - - visitSelection(&painter, selection, style); - painter.endPage(); -} - -GooList *TextPage::getSelectionRegion(PDFRectangle *selection, - SelectionStyle style, - double scale) { - TextSelectionSizer sizer(this, scale); - - visitSelection(&sizer, selection, style); - - return sizer.getRegion(); -} - -GooString *TextPage::getSelectionText(PDFRectangle *selection, - SelectionStyle style) -{ - TextSelectionDumper dumper(this); - - visitSelection(&dumper, selection, style); - dumper.endPage(); - - return dumper.getText(); -} - -GooList **TextPage::getSelectionWords(PDFRectangle *selection, - SelectionStyle style, - int *nLines) -{ - TextSelectionDumper dumper(this); - - visitSelection(&dumper, selection, style); - dumper.endPage(); - - return dumper.takeWordList(nLines); -} - -GBool TextPage::findCharRange(int pos, int length, - double *xMin, double *yMin, - double *xMax, double *yMax) { - TextBlock *blk; - TextLine *line; - TextWord *word; - double xMin0, xMax0, yMin0, yMax0; - double xMin1, xMax1, yMin1, yMax1; - GBool first; - int i, j0, j1; - - if (rawOrder) { - return gFalse; - } - - //~ this doesn't correctly handle ranges split across multiple lines - //~ (the highlighted region is the bounding box of all the parts of - //~ the range) - first = gTrue; - xMin0 = xMax0 = yMin0 = yMax0 = 0; // make gcc happy - xMin1 = xMax1 = yMin1 = yMax1 = 0; // make gcc happy - for (i = 0; i < nBlocks; ++i) { - blk = blocks[i]; - for (line = blk->lines; line; line = line->next) { - for (word = line->words; word; word = word->next) { - if (pos < word->charPos[word->len] && - pos + length > word->charPos[0]) { - for (j0 = 0; - j0 < word->len && pos >= word->charPos[j0 + 1]; - ++j0) ; - for (j1 = word->len - 1; - j1 > j0 && pos + length <= word->charPos[j1]; - --j1) ; - switch (line->rot) { - case 0: - xMin1 = word->edge[j0]; - xMax1 = word->edge[j1 + 1]; - yMin1 = word->yMin; - yMax1 = word->yMax; - break; - case 1: - xMin1 = word->xMin; - xMax1 = word->xMax; - yMin1 = word->edge[j0]; - yMax1 = word->edge[j1 + 1]; - break; - case 2: - xMin1 = word->edge[j1 + 1]; - xMax1 = word->edge[j0]; - yMin1 = word->yMin; - yMax1 = word->yMax; - break; - case 3: - xMin1 = word->xMin; - xMax1 = word->xMax; - yMin1 = word->edge[j1 + 1]; - yMax1 = word->edge[j0]; - break; - } - if (first || xMin1 < xMin0) { - xMin0 = xMin1; - } - if (first || xMax1 > xMax0) { - xMax0 = xMax1; - } - if (first || yMin1 < yMin0) { - yMin0 = yMin1; - } - if (first || yMax1 > yMax0) { - yMax0 = yMax1; - } - first = gFalse; - } - } - } - } - if (!first) { - *xMin = xMin0; - *xMax = xMax0; - *yMin = yMin0; - *yMax = yMax0; - return gTrue; - } - return gFalse; -} - -void TextPage::dump(void *outputStream, TextOutputFunc outputFunc, - GBool physLayout) { - UnicodeMap *uMap; - TextFlow *flow; - TextBlock *blk; - TextLine *line; - TextLineFrag *frags; - TextWord *word; - int nFrags, fragsSize; - TextLineFrag *frag; - char space[8], eol[16], eop[8]; - int spaceLen, eolLen, eopLen; - GBool pageBreaks; - GooString *s; - double delta; - int col, i, j, d, n; - - // get the output encoding - if (!(uMap = globalParams->getTextEncoding())) { - return; - } - spaceLen = uMap->mapUnicode(0x20, space, sizeof(space)); - eolLen = 0; // make gcc happy - switch (globalParams->getTextEOL()) { - case eolUnix: - eolLen = uMap->mapUnicode(0x0a, eol, sizeof(eol)); - break; - case eolDOS: - eolLen = uMap->mapUnicode(0x0d, eol, sizeof(eol)); - eolLen += uMap->mapUnicode(0x0a, eol + eolLen, sizeof(eol) - eolLen); - break; - case eolMac: - eolLen = uMap->mapUnicode(0x0d, eol, sizeof(eol)); - break; - } - eopLen = uMap->mapUnicode(0x0c, eop, sizeof(eop)); - pageBreaks = globalParams->getTextPageBreaks(); - - //~ writing mode (horiz/vert) - - // output the page in raw (content stream) order - if (rawOrder) { - - for (word = rawWords; word; word = word->next) { - s = new GooString(); - dumpFragment(word->text, word->len, uMap, s); - (*outputFunc)(outputStream, s->getCString(), s->getLength()); - delete s; - if (word->next && - fabs(word->next->base - word->base) < - maxIntraLineDelta * word->fontSize && - word->next->xMin > - word->xMax - minDupBreakOverlap * word->fontSize) { - if (word->next->xMin > word->xMax + minWordSpacing * word->fontSize) { - (*outputFunc)(outputStream, space, spaceLen); - } - } else { - (*outputFunc)(outputStream, eol, eolLen); - } - } - - // output the page, maintaining the original physical layout - } else if (physLayout) { - - // collect the line fragments for the page and sort them - fragsSize = 256; - frags = (TextLineFrag *)gmallocn(fragsSize, sizeof(TextLineFrag)); - nFrags = 0; - for (i = 0; i < nBlocks; ++i) { - blk = blocks[i]; - for (line = blk->lines; line; line = line->next) { - if (nFrags == fragsSize) { - fragsSize *= 2; - frags = (TextLineFrag *)greallocn(frags, - fragsSize, sizeof(TextLineFrag)); - } - frags[nFrags].init(line, 0, line->len); - frags[nFrags].computeCoords(gTrue); - ++nFrags; - } - } - qsort(frags, nFrags, sizeof(TextLineFrag), &TextLineFrag::cmpYXPrimaryRot); - i = 0; - while (i < nFrags) { - delta = maxIntraLineDelta * frags[i].line->words->fontSize; - for (j = i+1; - j < nFrags && fabs(frags[j].base - frags[i].base) < delta; - ++j) ; - qsort(frags + i, j - i, sizeof(TextLineFrag), - &TextLineFrag::cmpXYColumnPrimaryRot); - i = j; - } - -#if 0 // for debugging - printf("*** line fragments ***\n"); - for (i = 0; i < nFrags; ++i) { - frag = &frags[i]; - printf("frag: x=%.2f..%.2f y=%.2f..%.2f base=%.2f '", - frag->xMin, frag->xMax, frag->yMin, frag->yMax, frag->base); - for (n = 0; n < frag->len; ++n) { - fputc(frag->line->text[frag->start + n] & 0xff, stdout); - } - printf("'\n"); - } - printf("\n"); -#endif - - // generate output - col = 0; - for (i = 0; i < nFrags; ++i) { - frag = &frags[i]; - - // column alignment - for (; col < frag->col; ++col) { - (*outputFunc)(outputStream, space, spaceLen); - } - - // print the line - s = new GooString(); - col += dumpFragment(frag->line->text + frag->start, frag->len, uMap, s); - (*outputFunc)(outputStream, s->getCString(), s->getLength()); - delete s; - - // print one or more returns if necessary - if (i == nFrags - 1 || - frags[i+1].col < col || - fabs(frags[i+1].base - frag->base) > - maxIntraLineDelta * frag->line->words->fontSize) { - if (i < nFrags - 1) { - d = (int)((frags[i+1].base - frag->base) / - frag->line->words->fontSize); - if (d < 1) { - d = 1; - } else if (d > 5) { - d = 5; - } - } else { - d = 1; - } - for (; d > 0; --d) { - (*outputFunc)(outputStream, eol, eolLen); - } - col = 0; - } - } - - gfree(frags); - - // output the page, "undoing" the layout - } else { - for (flow = flows; flow; flow = flow->next) { - for (blk = flow->blocks; blk; blk = blk->next) { - for (line = blk->lines; line; line = line->next) { - n = line->len; - if (line->hyphenated && (line->next || blk->next)) { - --n; - } - s = new GooString(); - dumpFragment(line->text, n, uMap, s); - (*outputFunc)(outputStream, s->getCString(), s->getLength()); - delete s; - // output a newline when a hyphen is not suppressed - if (n == line->len) { - (*outputFunc)(outputStream, eol, eolLen); - } - } - } - (*outputFunc)(outputStream, eol, eolLen); - } - } - - // end of page - if (pageBreaks) { - (*outputFunc)(outputStream, eop, eopLen); - } - - uMap->decRefCnt(); -} - -void TextPage::setMergeCombining(GBool merge) { - mergeCombining = merge; -} - -void TextPage::assignColumns(TextLineFrag *frags, int nFrags, GBool oneRot) { - TextLineFrag *frag0, *frag1; - int rot, col1, col2, i, j, k; - - // all text in the region has the same rotation -- recompute the - // column numbers based only on the text in the region - if (oneRot) { - qsort(frags, nFrags, sizeof(TextLineFrag), &TextLineFrag::cmpXYLineRot); - rot = frags[0].line->rot; - for (i = 0; i < nFrags; ++i) { - frag0 = &frags[i]; - col1 = 0; - for (j = 0; j < i; ++j) { - frag1 = &frags[j]; - col2 = 0; // make gcc happy - switch (rot) { - case 0: - if (frag0->xMin >= frag1->xMax) { - col2 = frag1->col + (frag1->line->col[frag1->start + frag1->len] - - frag1->line->col[frag1->start]) + 1; - } else { - for (k = frag1->start; - k < frag1->start + frag1->len && - frag0->xMin >= 0.5 * (frag1->line->edge[k] + - frag1->line->edge[k+1]); - ++k) ; - col2 = frag1->col + - frag1->line->col[k] - frag1->line->col[frag1->start]; - } - break; - case 1: - if (frag0->yMin >= frag1->yMax) { - col2 = frag1->col + (frag1->line->col[frag1->start + frag1->len] - - frag1->line->col[frag1->start]) + 1; - } else { - for (k = frag1->start; - k < frag1->start + frag1->len && - frag0->yMin >= 0.5 * (frag1->line->edge[k] + - frag1->line->edge[k+1]); - ++k) ; - col2 = frag1->col + - frag1->line->col[k] - frag1->line->col[frag1->start]; - } - break; - case 2: - if (frag0->xMax <= frag1->xMin) { - col2 = frag1->col + (frag1->line->col[frag1->start + frag1->len] - - frag1->line->col[frag1->start]) + 1; - } else { - for (k = frag1->start; - k < frag1->start + frag1->len && - frag0->xMax <= 0.5 * (frag1->line->edge[k] + - frag1->line->edge[k+1]); - ++k) ; - col2 = frag1->col + - frag1->line->col[k] - frag1->line->col[frag1->start]; - } - break; - case 3: - if (frag0->yMax <= frag1->yMin) { - col2 = frag1->col + (frag1->line->col[frag1->start + frag1->len] - - frag1->line->col[frag1->start]) + 1; - } else { - for (k = frag1->start; - k < frag1->start + frag1->len && - frag0->yMax <= 0.5 * (frag1->line->edge[k] + - frag1->line->edge[k+1]); - ++k) ; - col2 = frag1->col + - frag1->line->col[k] - frag1->line->col[frag1->start]; - } - break; - } - if (col2 > col1) { - col1 = col2; - } - } - frag0->col = col1; - } - - // the region includes text at different rotations -- use the - // globally assigned column numbers, offset by the minimum column - // number (i.e., shift everything over to column 0) - } else { - col1 = frags[0].col; - for (i = 1; i < nFrags; ++i) { - if (frags[i].col < col1) { - col1 = frags[i].col; - } - } - for (i = 0; i < nFrags; ++i) { - frags[i].col -= col1; - } - } -} - -int TextPage::dumpFragment(Unicode *text, int len, UnicodeMap *uMap, - GooString *s) { - if (uMap->isUnicode()) { - return reorderText(text, len, uMap, primaryLR, s, nullptr); - } else { - int nCols = 0; - - char buf[8]; - int buflen = 0; - - for (int i = 0; i < len; ++i) { - buflen = uMap->mapUnicode(text[i], buf, sizeof(buf)); - s->append(buf, buflen); - nCols += buflen; - } - - return nCols; - } -} - -#ifdef TEXTOUT_WORD_LIST -TextWordList *TextPage::makeWordList(GBool physLayout) { - return new TextWordList(this, physLayout); -} -#endif - -//------------------------------------------------------------------------ -// ActualText -//------------------------------------------------------------------------ -ActualText::ActualText(TextPage *out) { - out->incRefCnt(); - text = out; - actualText = nullptr; - actualTextNBytes = 0; -} - -ActualText::~ActualText() { - if (actualText) - delete actualText; - text->decRefCnt(); -} - -void ActualText::addChar(GfxState *state, double x, double y, - double dx, double dy, - CharCode c, int nBytes, Unicode *u, int uLen) { - if (!actualText) { - text->addChar(state, x, y, dx, dy, c, nBytes, u, uLen); - return; - } - - // Inside ActualText span. - if (!actualTextNBytes) { - actualTextX0 = x; - actualTextY0 = y; - } - actualTextX1 = x + dx; - actualTextY1 = y + dy; - actualTextNBytes += nBytes; -} - -void ActualText::begin(GfxState *state, const GooString *text) { - if (actualText) - delete actualText; - actualText = new GooString(text); - actualTextNBytes = 0; -} - -void ActualText::end(GfxState *state) { - // ActualText span closed. Output the span text and the - // extents of all the glyphs inside the span - - if (actualTextNBytes) { - Unicode *uni = nullptr; - int length; - - // now that we have the position info for all of the text inside - // the marked content span, we feed the "ActualText" back through - // text->addChar() - length = TextStringToUCS4(actualText, &uni); - text->addChar(state, actualTextX0, actualTextY0, - actualTextX1 - actualTextX0, actualTextY1 - actualTextY0, - 0, actualTextNBytes, uni, length); - gfree(uni); - } - - delete actualText; - actualText = nullptr; - actualTextNBytes = 0; -} - -//------------------------------------------------------------------------ -// TextOutputDev -//------------------------------------------------------------------------ - -static void TextOutputDev_outputToFile(void *stream, const char *text, int len) { - fwrite(text, 1, len, (FILE *)stream); -} - -TextOutputDev::TextOutputDev(char *fileName, GBool physLayoutA, - double fixedPitchA, GBool rawOrderA, - GBool append) { - text = nullptr; - physLayout = physLayoutA; - fixedPitch = physLayout ? fixedPitchA : 0; - rawOrder = rawOrderA; - doHTML = gFalse; - ok = gTrue; - - // open file - needClose = gFalse; - if (fileName) { - if (!strcmp(fileName, "-")) { - outputStream = stdout; -#ifdef _WIN32 - // keep DOS from munging the end-of-line characters - setmode(fileno(stdout), O_BINARY); -#endif - } else if ((outputStream = fopen(fileName, append ? "ab" : "wb"))) { - needClose = gTrue; - } else { - error(errIO, -1, "Couldn't open text file '{0:s}'", fileName); - ok = gFalse; - actualText = nullptr; - return; - } - outputFunc = &TextOutputDev_outputToFile; - } else { - outputStream = nullptr; - } - - // set up text object - text = new TextPage(rawOrderA); - actualText = new ActualText(text); -} - -TextOutputDev::TextOutputDev(TextOutputFunc func, void *stream, - GBool physLayoutA, double fixedPitchA, - GBool rawOrderA) { - outputFunc = func; - outputStream = stream; - needClose = gFalse; - physLayout = physLayoutA; - fixedPitch = physLayout ? fixedPitchA : 0; - rawOrder = rawOrderA; - doHTML = gFalse; - text = new TextPage(rawOrderA); - actualText = new ActualText(text); - ok = gTrue; -} - -TextOutputDev::~TextOutputDev() { - if (needClose) { -#ifdef MACOS - ICS_MapRefNumAndAssign((short)((FILE *)outputStream)->handle); -#endif - fclose((FILE *)outputStream); - } - if (text) { - text->decRefCnt(); - } - delete actualText; -} - -void TextOutputDev::startPage(int pageNum, GfxState *state, XRef *xref) { - text->startPage(state); -} - -void TextOutputDev::endPage() { - text->endPage(); - text->coalesce(physLayout, fixedPitch, doHTML); - if (outputStream) { - text->dump(outputStream, outputFunc, physLayout); - } -} - -void TextOutputDev::restoreState(GfxState *state) { - text->updateFont(state); -} - -void TextOutputDev::updateFont(GfxState *state) { - text->updateFont(state); -} - -void TextOutputDev::beginString(GfxState *state, const GooString *s) { -} - -void TextOutputDev::endString(GfxState *state) { -} - -void TextOutputDev::drawChar(GfxState *state, double x, double y, - double dx, double dy, - double originX, double originY, - CharCode c, int nBytes, Unicode *u, int uLen) { - actualText->addChar(state, x, y, dx, dy, c, nBytes, u, uLen); -} - -void TextOutputDev::incCharCount(int nChars) { - text->incCharCount(nChars); -} - -void TextOutputDev::beginActualText(GfxState *state, const GooString *text) -{ - actualText->begin(state, text); -} - -void TextOutputDev::endActualText(GfxState *state) -{ - actualText->end(state); -} - -void TextOutputDev::stroke(GfxState *state) { - GfxPath *path; - GfxSubpath *subpath; - double x[2], y[2]; - - if (!doHTML) { - return; - } - path = state->getPath(); - if (path->getNumSubpaths() != 1) { - return; - } - subpath = path->getSubpath(0); - if (subpath->getNumPoints() != 2) { - return; - } - state->transform(subpath->getX(0), subpath->getY(0), &x[0], &y[0]); - state->transform(subpath->getX(1), subpath->getY(1), &x[1], &y[1]); - - // look for a vertical or horizontal line - if (x[0] == x[1] || y[0] == y[1]) { - text->addUnderline(x[0], y[0], x[1], y[1]); - } -} - -void TextOutputDev::fill(GfxState *state) { - GfxPath *path; - GfxSubpath *subpath; - double x[5], y[5]; - double rx0, ry0, rx1, ry1, t; - int i; - - if (!doHTML) { - return; - } - path = state->getPath(); - if (path->getNumSubpaths() != 1) { - return; - } - subpath = path->getSubpath(0); - if (subpath->getNumPoints() != 5) { - return; - } - for (i = 0; i < 5; ++i) { - if (subpath->getCurve(i)) { - return; - } - state->transform(subpath->getX(i), subpath->getY(i), &x[i], &y[i]); - } - - // look for a rectangle - if (x[0] == x[1] && y[1] == y[2] && x[2] == x[3] && y[3] == y[4] && - x[0] == x[4] && y[0] == y[4]) { - rx0 = x[0]; - ry0 = y[0]; - rx1 = x[2]; - ry1 = y[1]; - } else if (y[0] == y[1] && x[1] == x[2] && y[2] == y[3] && x[3] == x[4] && - x[0] == x[4] && y[0] == y[4]) { - rx0 = x[0]; - ry0 = y[0]; - rx1 = x[1]; - ry1 = y[2]; - } else { - return; - } - if (rx1 < rx0) { - t = rx0; - rx0 = rx1; - rx1 = t; - } - if (ry1 < ry0) { - t = ry0; - ry0 = ry1; - ry1 = t; - } - - // skinny horizontal rectangle - if (ry1 - ry0 < rx1 - rx0) { - if (ry1 - ry0 < maxUnderlineWidth) { - ry0 = 0.5 * (ry0 + ry1); - text->addUnderline(rx0, ry0, rx1, ry0); - } - - // skinny vertical rectangle - } else { - if (rx1 - rx0 < maxUnderlineWidth) { - rx0 = 0.5 * (rx0 + rx1); - text->addUnderline(rx0, ry0, rx0, ry1); - } - } -} - -void TextOutputDev::eoFill(GfxState *state) { - if (!doHTML) { - return; - } - fill(state); -} - -void TextOutputDev::processLink(AnnotLink *link) { - double x1, y1, x2, y2; - int xMin, yMin, xMax, yMax, x, y; - - if (!doHTML) { - return; - } - link->getRect(&x1, &y1, &x2, &y2); - cvtUserToDev(x1, y1, &x, &y); - xMin = xMax = x; - yMin = yMax = y; - cvtUserToDev(x1, y2, &x, &y); - if (x < xMin) { - xMin = x; - } else if (x > xMax) { - xMax = x; - } - if (y < yMin) { - yMin = y; - } else if (y > yMax) { - yMax = y; - } - cvtUserToDev(x2, y1, &x, &y); - if (x < xMin) { - xMin = x; - } else if (x > xMax) { - xMax = x; - } - if (y < yMin) { - yMin = y; - } else if (y > yMax) { - yMax = y; - } - cvtUserToDev(x2, y2, &x, &y); - if (x < xMin) { - xMin = x; - } else if (x > xMax) { - xMax = x; - } - if (y < yMin) { - yMin = y; - } else if (y > yMax) { - yMax = y; - } - text->addLink(xMin, yMin, xMax, yMax, link); -} - -GBool TextOutputDev::findText(Unicode *s, int len, - GBool startAtTop, GBool stopAtBottom, - GBool startAtLast, GBool stopAtLast, - GBool caseSensitive, GBool backward, - GBool wholeWord, - double *xMin, double *yMin, - double *xMax, double *yMax) { - return text->findText(s, len, startAtTop, stopAtBottom, - startAtLast, stopAtLast, - caseSensitive, backward, wholeWord, - xMin, yMin, xMax, yMax); -} - -GooString *TextOutputDev::getText(double xMin, double yMin, - double xMax, double yMax) { - return text->getText(xMin, yMin, xMax, yMax); -} - -void TextOutputDev::drawSelection(OutputDev *out, - double scale, - int rotation, - PDFRectangle *selection, - SelectionStyle style, - GfxColor *glyph_color, GfxColor *box_color) { - text->drawSelection(out, scale, rotation, selection, style, glyph_color, box_color); -} - -GooList *TextOutputDev::getSelectionRegion(PDFRectangle *selection, - SelectionStyle style, - double scale) { - return text->getSelectionRegion(selection, style, scale); -} - -GooString *TextOutputDev::getSelectionText(PDFRectangle *selection, - SelectionStyle style) -{ - return text->getSelectionText(selection, style); -} - -GBool TextOutputDev::findCharRange(int pos, int length, - double *xMin, double *yMin, - double *xMax, double *yMax) { - return text->findCharRange(pos, length, xMin, yMin, xMax, yMax); -} - -void TextOutputDev::setMergeCombining(GBool merge) { - text->setMergeCombining(merge); -} - -#ifdef TEXTOUT_WORD_LIST -TextWordList *TextOutputDev::makeWordList() { - return text->makeWordList(physLayout); -} -#endif - -TextPage *TextOutputDev::takeText() { - TextPage *ret; - - ret = text; - text = new TextPage(rawOrder); - return ret; -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/TextOutputDev.h b/Build/source/libs/poppler/poppler-src/poppler/TextOutputDev.h deleted file mode 100644 index 092acd6730f..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/TextOutputDev.h +++ /dev/null @@ -1,912 +0,0 @@ -//======================================================================== -// -// TextOutputDev.h -// -// Copyright 1997-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2005-2007 Kristian Høgsberg <krh@redhat.com> -// Copyright (C) 2006 Ed Catmur <ed@catmur.co.uk> -// Copyright (C) 2007, 2008, 2011, 2013 Carlos Garcia Campos <carlosgc@gnome.org> -// Copyright (C) 2007, 2017 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2008, 2010, 2015, 2016, 2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2010 Brian Ewins <brian.ewins@gmail.com> -// Copyright (C) 2012, 2013, 2015, 2016 Jason Crain <jason@aquaticape.us> -// Copyright (C) 2013 Thomas Freitag <Thomas.Freitag@alfa.de> -// 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 -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef TEXTOUTPUTDEV_H -#define TEXTOUTPUTDEV_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "poppler-config.h" -#include <stdio.h> -#include "goo/gtypes.h" -#include "GfxFont.h" -#include "GfxState.h" -#include "OutputDev.h" - -class GooString; -class GooList; -class Gfx; -class GfxFont; -class GfxState; -class UnicodeMap; -class AnnotLink; - -class TextWord; -class TextPool; -class TextLine; -class TextLineFrag; -class TextBlock; -class TextFlow; -class TextWordList; -class TextPage; -class TextSelectionVisitor; - -//------------------------------------------------------------------------ - -typedef void (*TextOutputFunc)(void *stream, const char *text, int len); - -enum SelectionStyle { - selectionStyleGlyph, - selectionStyleWord, - selectionStyleLine -}; - -//------------------------------------------------------------------------ -// TextFontInfo -//------------------------------------------------------------------------ - -class TextFontInfo { -public: - - TextFontInfo(GfxState *state); - ~TextFontInfo(); - - TextFontInfo(const TextFontInfo &) = delete; - TextFontInfo& operator=(const TextFontInfo &) = delete; - - GBool matches(GfxState *state); - GBool matches(TextFontInfo *fontInfo); - - // Get the font ascent, or a default value if the font is not set - double getAscent(); - - // Get the font descent, or a default value if the font is not set - double getDescent(); - - // Get the writing mode (0 or 1), or 0 if the font is not set - int getWMode(); - -#ifdef TEXTOUT_WORD_LIST - // Get the font name (which may be NULL). - GooString *getFontName() { return fontName; } - - // Get font descriptor flags. - GBool isFixedWidth() { return flags & fontFixedWidth; } - GBool isSerif() { return flags & fontSerif; } - GBool isSymbolic() { return flags & fontSymbolic; } - GBool isItalic() { return flags & fontItalic; } - GBool isBold() { return flags & fontBold; } -#endif - -private: - - GfxFont *gfxFont; -#ifdef TEXTOUT_WORD_LIST - GooString *fontName; - int flags; -#endif - - friend class TextWord; - friend class TextPage; - friend class TextSelectionPainter; -}; - -//------------------------------------------------------------------------ -// TextWord -//------------------------------------------------------------------------ - -class TextWord { -public: - - // Constructor. - TextWord(GfxState *state, int rotA, double fontSize); - - // Destructor. - ~TextWord(); - - TextWord(const TextWord &) = delete; - TextWord& operator=(const TextWord &) = delete; - - // Add a character to the word. - void addChar(GfxState *state, TextFontInfo *fontA, double x, double y, - double dx, double dy, int charPosA, int charLen, - CharCode c, Unicode u, const Matrix &textMatA); - - // Attempt to add a character to the word as a combining character. - // Either character u or the last character in the word must be an - // acute, dieresis, or other combining character. Returns true if - // the character was added. - GBool addCombining(GfxState *state, TextFontInfo *fontA, double fontSizeA, double x, double y, - double dx, double dy, int charPosA, int charLen, - CharCode c, Unicode u, const Matrix &textMatA); - - // Merge <word> onto the end of <this>. - void merge(TextWord *word); - - // Compares <this> to <word>, returning -1 (<), 0 (=), or +1 (>), - // based on a primary-axis comparison, e.g., x ordering if rot=0. - int primaryCmp(TextWord *word); - - // Return the distance along the primary axis between <this> and - // <word>. - double primaryDelta(TextWord *word); - - static int cmpYX(const void *p1, const void *p2); - - void visitSelection(TextSelectionVisitor *visitor, - PDFRectangle *selection, - SelectionStyle style); - - // Get the TextFontInfo object associated with a character. - TextFontInfo *getFontInfo(int idx) { return font[idx]; } - - // Get the next TextWord on the linked list. - TextWord *getNext() { return next; } - -#ifdef TEXTOUT_WORD_LIST - int getLength() { return len; } - const Unicode *getChar(int idx) { return &text[idx]; } - GooString *getText(); - GooString *getFontName(int idx) { return font[idx]->fontName; } - void getColor(double *r, double *g, double *b) - { *r = colorR; *g = colorG; *b = colorB; } - void getBBox(double *xMinA, double *yMinA, double *xMaxA, double *yMaxA) - { *xMinA = xMin; *yMinA = yMin; *xMaxA = xMax; *yMaxA = yMax; } - void getCharBBox(int charIdx, double *xMinA, double *yMinA, - double *xMaxA, double *yMaxA); - double getFontSize() { return fontSize; } - int getRotation() { return rot; } - int getCharPos() { return charPos[0]; } - int getCharLen() { return charPos[len] - charPos[0]; } - GBool getSpaceAfter() { return spaceAfter; } -#endif - GBool isUnderlined() { return underlined; } - AnnotLink *getLink() { return link; } - double getEdge(int i) { return edge[i]; } - double getBaseline () { return base; } - GBool hasSpaceAfter () { return spaceAfter; } - TextWord* nextWord () { return next; }; -private: - void ensureCapacity(int capacity); - void setInitialBounds(TextFontInfo *fontA, double x, double y); - - int rot; // rotation, multiple of 90 degrees - // (0, 1, 2, or 3) - int wMode; // horizontal (0) or vertical (1) writing mode - double xMin, xMax; // bounding box x coordinates - double yMin, yMax; // bounding box y coordinates - double base; // baseline x or y coordinate - Unicode *text; // the text - CharCode *charcode; // glyph indices - double *edge; // "near" edge x or y coord of each char - // (plus one extra entry for the last char) - int *charPos; // character position (within content stream) - // of each char (plus one extra entry for - // the last char) - int len; // length of text/edge/charPos/font arrays - int size; // size of text/edge/charPos/font arrays - TextFontInfo **font; // font information for each char - Matrix *textMat; // transformation matrix for each char - double fontSize; // font size - GBool spaceAfter; // set if there is a space between this - // word and the next word on the line - GBool underlined; - TextWord *next; // next word in line - -#ifdef TEXTOUT_WORD_LIST - double colorR, // word color - colorG, - colorB; -#endif - - AnnotLink *link; - - friend class TextPool; - friend class TextLine; - friend class TextBlock; - friend class TextFlow; - friend class TextWordList; - friend class TextPage; - - friend class TextSelectionPainter; - friend class TextSelectionDumper; -}; - -//------------------------------------------------------------------------ -// TextPool -//------------------------------------------------------------------------ - -class TextPool { -public: - - TextPool(); - ~TextPool(); - - TextPool(const TextPool &) = delete; - TextPool& operator=(const TextPool &) = delete; - - TextWord *getPool(int baseIdx) { return pool[baseIdx - minBaseIdx]; } - void setPool(int baseIdx, TextWord *p) { pool[baseIdx - minBaseIdx] = p; } - - int getBaseIdx(double base); - - void addWord(TextWord *word); - -private: - - int minBaseIdx; // min baseline bucket index - int maxBaseIdx; // max baseline bucket index - TextWord **pool; // array of linked lists, one for each - // baseline value (multiple of 4 pts) - TextWord *cursor; // pointer to last-accessed word - int cursorBaseIdx; // baseline bucket index of last-accessed word - - friend class TextBlock; - friend class TextPage; -}; - -struct TextFlowData; - -//------------------------------------------------------------------------ -// TextLine -//------------------------------------------------------------------------ - -class TextLine { -public: - - TextLine(TextBlock *blkA, int rotA, double baseA); - ~TextLine(); - - TextLine(const TextLine &) = delete; - TextLine& operator=(const TextLine &) = delete; - - void addWord(TextWord *word); - - // Return the distance along the primary axis between <this> and - // <line>. - double primaryDelta(TextLine *line); - - // Compares <this> to <line>, returning -1 (<), 0 (=), or +1 (>), - // based on a primary-axis comparison, e.g., x ordering if rot=0. - int primaryCmp(TextLine *line); - - // Compares <this> to <line>, returning -1 (<), 0 (=), or +1 (>), - // based on a secondary-axis comparison of the baselines, e.g., y - // ordering if rot=0. - int secondaryCmp(TextLine *line); - - int cmpYX(TextLine *line); - - static int cmpXY(const void *p1, const void *p2); - - void coalesce(UnicodeMap *uMap); - - void visitSelection(TextSelectionVisitor *visitor, - PDFRectangle *selection, - SelectionStyle style); - - // Get the head of the linked list of TextWords. - TextWord *getWords() { return words; } - - // Get the next TextLine on the linked list. - TextLine *getNext() { return next; } - - // Returns true if the last char of the line is a hyphen. - GBool isHyphenated() { return hyphenated; } - -private: - - TextBlock *blk; // parent block - int rot; // text rotation - double xMin, xMax; // bounding box x coordinates - double yMin, yMax; // bounding box y coordinates - double base; // baseline x or y coordinate - TextWord *words; // words in this line - TextWord *lastWord; // last word in this line - Unicode *text; // Unicode text of the line, including - // spaces between words - double *edge; // "near" edge x or y coord of each char - // (plus one extra entry for the last char) - int *col; // starting column number of each Unicode char - int len; // number of Unicode chars - int convertedLen; // total number of converted characters - GBool hyphenated; // set if last char is a hyphen - TextLine *next; // next line in block - Unicode *normalized; // normalized form of Unicode text - int normalized_len; // number of normalized Unicode chars - int *normalized_idx; // indices of normalized chars into Unicode text - - friend class TextLineFrag; - friend class TextBlock; - friend class TextFlow; - friend class TextWordList; - friend class TextPage; - - friend class TextSelectionPainter; - friend class TextSelectionSizer; - friend class TextSelectionDumper; -}; - -//------------------------------------------------------------------------ -// TextBlock -//------------------------------------------------------------------------ - -class TextBlock { -public: - - TextBlock(TextPage *pageA, int rotA); - ~TextBlock(); - - TextBlock(const TextBlock &) = delete; - TextBlock& operator=(const TextBlock &) = delete; - - void addWord(TextWord *word); - - void coalesce(UnicodeMap *uMap, double fixedPitch); - - // Update this block's priMin and priMax values, looking at <blk>. - void updatePriMinMax(TextBlock *blk); - - static int cmpXYPrimaryRot(const void *p1, const void *p2); - - static int cmpYXPrimaryRot(const void *p1, const void *p2); - - int primaryCmp(TextBlock *blk); - - double secondaryDelta(TextBlock *blk); - - // Returns true if <this> is below <blk>, relative to the page's - // primary rotation. - GBool isBelow(TextBlock *blk); - - void visitSelection(TextSelectionVisitor *visitor, - PDFRectangle *selection, - SelectionStyle style); - - // Get the head of the linked list of TextLines. - TextLine *getLines() { return lines; } - - // Get the next TextBlock on the linked list. - TextBlock *getNext() { return next; } - - void getBBox(double *xMinA, double *yMinA, double *xMaxA, double *yMaxA) - { *xMinA = xMin; *yMinA = yMin; *xMaxA = xMax; *yMaxA = yMax; } - - int getLineCount() { return nLines; } - -private: - - GBool isBeforeByRule1(TextBlock *blk1); - GBool isBeforeByRepeatedRule1(TextBlock *blkList, TextBlock *blk1); - GBool isBeforeByRule2(TextBlock *blk1); - - int visitDepthFirst(TextBlock *blkList, int pos1, - TextBlock **sorted, int sortPos, - GBool* visited); - int visitDepthFirst(TextBlock *blkList, int pos1, - TextBlock **sorted, int sortPos, - GBool* visited, - TextBlock **cache, int cacheSize); - - TextPage *page; // the parent page - int rot; // text rotation - double xMin, xMax; // bounding box x coordinates - double yMin, yMax; // bounding box y coordinates - double priMin, priMax; // whitespace bounding box along primary axis - double ExMin, ExMax; // extended bounding box x coordinates - double EyMin, EyMax; // extended bounding box y coordinates - int tableId; // id of table to which this block belongs - GBool tableEnd; // is this block at end of line of actual table - - TextPool *pool; // pool of words (used only until lines - // are built) - TextLine *lines; // linked list of lines - TextLine *curLine; // most recently added line - int nLines; // number of lines - int charCount; // number of characters in the block - int col; // starting column - int nColumns; // number of columns in the block - - TextBlock *next; - TextBlock *stackNext; - - friend class TextLine; - friend class TextLineFrag; - friend class TextFlow; - friend class TextWordList; - friend class TextPage; - friend class TextSelectionPainter; - friend class TextSelectionDumper; -}; - -//------------------------------------------------------------------------ -// TextFlow -//------------------------------------------------------------------------ - -class TextFlow { -public: - - TextFlow(TextPage *pageA, TextBlock *blk); - ~TextFlow(); - - TextFlow(const TextFlow &) = delete; - TextFlow& operator=(const TextFlow &) = delete; - - // Add a block to the end of this flow. - void addBlock(TextBlock *blk); - - // Returns true if <blk> fits below <prevBlk> in the flow, i.e., (1) - // it uses a font no larger than the last block added to the flow, - // and (2) it fits within the flow's [priMin, priMax] along the - // primary axis. - GBool blockFits(TextBlock *blk, TextBlock *prevBlk); - - // Get the head of the linked list of TextBlocks. - TextBlock *getBlocks() { return blocks; } - - // Get the next TextFlow on the linked list. - TextFlow *getNext() { return next; } - -private: - - TextPage *page; // the parent page - double xMin, xMax; // bounding box x coordinates - double yMin, yMax; // bounding box y coordinates - double priMin, priMax; // whitespace bounding box along primary axis - TextBlock *blocks; // blocks in flow - TextBlock *lastBlk; // last block in this flow - TextFlow *next; - - friend class TextWordList; - friend class TextPage; -}; - -#ifdef TEXTOUT_WORD_LIST - -//------------------------------------------------------------------------ -// TextWordList -//------------------------------------------------------------------------ - -class TextWordList { -public: - - // Build a flat word list, in content stream order (if - // text->rawOrder is true), physical layout order (if <physLayout> - // is true and text->rawOrder is false), or reading order (if both - // flags are false). - TextWordList(TextPage *text, GBool physLayout); - - ~TextWordList(); - - TextWordList(const TextWordList &) = delete; - TextWordList& operator=(const TextWordList &) = delete; - - // Return the number of words on the list. - int getLength(); - - // Return the <idx>th word from the list. - TextWord *get(int idx); - -private: - - GooList *words; // [TextWord] -}; - -#endif // TEXTOUT_WORD_LIST - -class TextWordSelection { -public: - TextWordSelection(TextWord *wordA, int beginA, int endA) - : word(wordA), begin(beginA), end(endA) - { - } - - TextWord * getWord() const { return word; } - int getBegin() const { return begin; } - int getEnd() const { return end; } - -private: - TextWord *word; - int begin; - int end; - - friend class TextSelectionPainter; - friend class TextSelectionDumper; -}; - -//------------------------------------------------------------------------ -// TextPage -//------------------------------------------------------------------------ - -class TextPage { -public: - - // Constructor. - TextPage(GBool rawOrderA); - - TextPage(const TextPage &) = delete; - TextPage& operator=(const TextPage &) = delete; - - void incRefCnt(); - void decRefCnt(); - - // Start a new page. - void startPage(GfxState *state); - - // End the current page. - void endPage(); - - // Update the current font. - void updateFont(GfxState *state); - - // Begin a new word. - void beginWord(GfxState *state); - - // Add a character to the current word. - void addChar(GfxState *state, double x, double y, - double dx, double dy, - CharCode c, int nBytes, Unicode *u, int uLen); - - // Add <nChars> invisible characters. - void incCharCount(int nChars); - - // End the current word, sorting it into the list of words. - void endWord(); - - // Add a word, sorting it into the list of words. - void addWord(TextWord *word); - - // Add a (potential) underline. - void addUnderline(double x0, double y0, double x1, double y1); - - // Add a hyperlink. - void addLink(int xMin, int yMin, int xMax, int yMax, AnnotLink *link); - - // Coalesce strings that look like parts of the same line. - void coalesce(GBool physLayout, double fixedPitch, GBool doHTML); - - // Find a string. If <startAtTop> is true, starts looking at the - // top of the page; else if <startAtLast> is true, starts looking - // immediately after the last find result; else starts looking at - // <xMin>,<yMin>. If <stopAtBottom> is true, stops looking at the - // bottom of the page; else if <stopAtLast> is true, stops looking - // just before the last find result; else stops looking at - // <xMax>,<yMax>. - GBool findText(Unicode *s, int len, - GBool startAtTop, GBool stopAtBottom, - GBool startAtLast, GBool stopAtLast, - GBool caseSensitive, GBool backward, - GBool wholeWord, - double *xMin, double *yMin, - double *xMax, double *yMax); - - // Get the text which is inside the specified rectangle. - GooString *getText(double xMin, double yMin, - double xMax, double yMax); - - void visitSelection(TextSelectionVisitor *visitor, - PDFRectangle *selection, - SelectionStyle style); - - void drawSelection(OutputDev *out, - double scale, - int rotation, - PDFRectangle *selection, - SelectionStyle style, - GfxColor *glyph_color, GfxColor *box_color); - - GooList *getSelectionRegion(PDFRectangle *selection, - SelectionStyle style, - double scale); - - GooString *getSelectionText(PDFRectangle *selection, - SelectionStyle style); - - GooList **getSelectionWords(PDFRectangle *selection, - SelectionStyle style, - int *nLines); - - // Find a string by character position and length. If found, sets - // the text bounding rectangle and returns true; otherwise returns - // false. - GBool findCharRange(int pos, int length, - double *xMin, double *yMin, - double *xMax, double *yMax); - - // Dump contents of page to a file. - void dump(void *outputStream, TextOutputFunc outputFunc, - GBool physLayout); - - // Get the head of the linked list of TextFlows. - TextFlow *getFlows() { return flows; } - - // If true, will combine characters when a base and combining - // character are drawn on eachother. - void setMergeCombining(GBool merge); - -#ifdef TEXTOUT_WORD_LIST - // Build a flat word list, in content stream order (if - // this->rawOrder is true), physical layout order (if <physLayout> - // is true and this->rawOrder is false), or reading order (if both - // flags are false). - TextWordList *makeWordList(GBool physLayout); -#endif - -private: - - // Destructor. - ~TextPage(); - - void clear(); - void assignColumns(TextLineFrag *frags, int nFrags, GBool rot); - int dumpFragment(Unicode *text, int len, UnicodeMap *uMap, GooString *s); - - GBool rawOrder; // keep text in content stream order - GBool mergeCombining; // merge when combining and base characters - // are drawn on top of each other - - double pageWidth, pageHeight; // width and height of current page - TextWord *curWord; // currently active string - int charPos; // next character position (within content - // stream) - TextFontInfo *curFont; // current font - double curFontSize; // current font size - int nest; // current nesting level (for Type 3 fonts) - int nTinyChars; // number of "tiny" chars seen so far - GBool lastCharOverlap; // set if the last added char overlapped the - // previous char - - TextPool *pools[4]; // a "pool" of TextWords for each rotation - TextFlow *flows; // linked list of flows - TextBlock **blocks; // array of blocks, in yx order - int nBlocks; // number of blocks - int primaryRot; // primary rotation - GBool primaryLR; // primary direction (true means L-to-R, - // false means R-to-L) - TextWord *rawWords; // list of words, in raw order (only if - // rawOrder is set) - TextWord *rawLastWord; // last word on rawWords list - - GooList *fonts; // all font info objects used on this - // page [TextFontInfo] - - double lastFindXMin, // coordinates of the last "find" result - lastFindYMin; - GBool haveLastFind; - - GooList *underlines; // [TextUnderline] - GooList *links; // [TextLink] - - int refCnt; - - friend class TextLine; - friend class TextLineFrag; - friend class TextBlock; - friend class TextFlow; - friend class TextWordList; - friend class TextSelectionPainter; - friend class TextSelectionDumper; -}; - -//------------------------------------------------------------------------ -// ActualText -//------------------------------------------------------------------------ - -class ActualText { -public: - // Create an ActualText - ActualText(TextPage *out); - ~ActualText(); - - ActualText(const ActualText &) = delete; - ActualText& operator=(const ActualText &) = delete; - - void addChar(GfxState *state, double x, double y, - double dx, double dy, - CharCode c, int nBytes, Unicode *u, int uLen); - void begin(GfxState *state, const GooString *text); - void end(GfxState *state); - -private: - TextPage *text; - - GooString *actualText; // replacement text for the span - double actualTextX0; - double actualTextY0; - double actualTextX1; - double actualTextY1; - int actualTextNBytes; -}; - - -//------------------------------------------------------------------------ -// TextOutputDev -//------------------------------------------------------------------------ - -class TextOutputDev: public OutputDev { -public: - - // Open a text output file. If <fileName> is NULL, no file is - // written (this is useful, e.g., for searching text). If - // <physLayoutA> is true, the original physical layout of the text - // is maintained. If <rawOrder> is true, the text is kept in - // content stream order. - TextOutputDev(char *fileName, GBool physLayoutA, - double fixedPitchA, GBool rawOrderA, - GBool append); - - // Create a TextOutputDev which will write to a generic stream. If - // <physLayoutA> is true, the original physical layout of the text - // is maintained. If <rawOrder> is true, the text is kept in - // content stream order. - TextOutputDev(TextOutputFunc func, void *stream, - GBool physLayoutA, double fixedPitchA, - GBool rawOrderA); - - // Destructor. - ~TextOutputDev(); - - // Check if file was successfully created. - virtual GBool isOk() { return ok; } - - //---- get info about output device - - // Does this device use upside-down coordinates? - // (Upside-down means (0,0) is the top left corner of the page.) - GBool upsideDown() override { return gTrue; } - - // Does this device use drawChar() or drawString()? - GBool useDrawChar() override { return gTrue; } - - // Does this device use beginType3Char/endType3Char? Otherwise, - // text in Type 3 fonts will be drawn with drawChar/drawString. - GBool interpretType3Chars() override { return gFalse; } - - // Does this device need non-text content? - GBool needNonText() override { return gFalse; } - - // Does this device require incCharCount to be called for text on - // non-shown layers? - GBool needCharCount() override { return gTrue; } - - //----- initialization and control - - // Start a page. - void startPage(int pageNum, GfxState *state, XRef *xref) override; - - // End a page. - void endPage() override; - - //----- save/restore graphics state - void restoreState(GfxState *state) override; - - //----- update text state - void updateFont(GfxState *state) override; - - //----- text drawing - void beginString(GfxState *state, const GooString *s) override; - void endString(GfxState *state) override; - void drawChar(GfxState *state, double x, double y, - double dx, double dy, - double originX, double originY, - CharCode c, int nBytes, Unicode *u, int uLen) override; - void incCharCount(int nChars) override; - void beginActualText(GfxState *state, const GooString *text) override; - void endActualText(GfxState *state) override; - - //----- path painting - void stroke(GfxState *state) override; - void fill(GfxState *state) override; - void eoFill(GfxState *state) override; - - //----- link borders - void processLink(AnnotLink *link) override; - - //----- special access - - // Find a string. If <startAtTop> is true, starts looking at the - // top of the page; else if <startAtLast> is true, starts looking - // immediately after the last find result; else starts looking at - // <xMin>,<yMin>. If <stopAtBottom> is true, stops looking at the - // bottom of the page; else if <stopAtLast> is true, stops looking - // just before the last find result; else stops looking at - // <xMax>,<yMax>. - GBool findText(Unicode *s, int len, - GBool startAtTop, GBool stopAtBottom, - GBool startAtLast, GBool stopAtLast, - GBool caseSensitive, GBool backward, - GBool wholeWord, - double *xMin, double *yMin, - double *xMax, double *yMax); - - // Get the text which is inside the specified rectangle. - GooString *getText(double xMin, double yMin, - double xMax, double yMax); - - // Find a string by character position and length. If found, sets - // the text bounding rectangle and returns true; otherwise returns - // false. - GBool findCharRange(int pos, int length, - double *xMin, double *yMin, - double *xMax, double *yMax); - - void drawSelection(OutputDev *out, double scale, int rotation, - PDFRectangle *selection, - SelectionStyle style, - GfxColor *glyph_color, GfxColor *box_color); - - GooList *getSelectionRegion(PDFRectangle *selection, - SelectionStyle style, - double scale); - - GooString *getSelectionText(PDFRectangle *selection, - SelectionStyle style); - - // If true, will combine characters when a base and combining - // character are drawn on eachother. - void setMergeCombining(GBool merge); - -#ifdef TEXTOUT_WORD_LIST - // Build a flat word list, in content stream order (if - // this->rawOrder is true), physical layout order (if - // this->physLayout is true and this->rawOrder is false), or reading - // order (if both flags are false). - TextWordList *makeWordList(); -#endif - - // Returns the TextPage object for the last rasterized page, - // transferring ownership to the caller. - TextPage *takeText(); - - // Turn extra processing for HTML conversion on or off. - void enableHTMLExtras(GBool doHTMLA) { doHTML = doHTMLA; } - -private: - - TextOutputFunc outputFunc; // output function - void *outputStream; // output stream - GBool needClose; // need to close the output file? - // (only if outputStream is a FILE*) - TextPage *text; // text for the current page - GBool physLayout; // maintain original physical layout when - // dumping text - double fixedPitch; // if physLayout is true and this is non-zero, - // assume fixed-pitch characters with this - // width - GBool rawOrder; // keep text in content stream order - GBool doHTML; // extra processing for HTML conversion - GBool ok; // set up ok? - - ActualText *actualText; -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/UTF.cc b/Build/source/libs/poppler/poppler-src/poppler/UTF.cc deleted file mode 100644 index a2003bffa11..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/UTF.cc +++ /dev/null @@ -1,418 +0,0 @@ -//======================================================================== -// -// UTF.cc -// -// Copyright 2001-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2008 Koji Otani <sho@bbr.jp> -// Copyright (C) 2012, 2017 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2012 Hib Eris <hib@hiberis.nl> -// Copyright (C) 2016, 2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2016 Jason Crain <jason@aquaticape.us> -// 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 -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include "goo/gmem.h" -#include "PDFDocEncoding.h" -#include "UTF.h" -#include "UnicodeMapFuncs.h" -#include <algorithm> - -bool UnicodeIsValid(Unicode ucs4) -{ - return (ucs4 < 0x110000) && - ((ucs4 & 0xfffff800) != 0xd800) && - (ucs4 < 0xfdd0 || ucs4 > 0xfdef) && - ((ucs4 & 0xfffe) != 0xfffe); -} - -int UTF16toUCS4(const Unicode *utf16, int utf16Len, Unicode **ucs4) -{ - int i, n, len; - Unicode *u; - - // count characters - len = 0; - for (i = 0; i < utf16Len; i++) { - if (utf16[i] >= 0xd800 && utf16[i] < 0xdc00 && i + 1 < utf16Len && - utf16[i+1] >= 0xdc00 && utf16[i+1] < 0xe000) { - i++; /* surrogate pair */ - } - len++; - } - if (ucs4 == nullptr) - return len; - - u = (Unicode*)gmallocn(len, sizeof(Unicode)); - n = 0; - // convert string - for (i = 0; i < utf16Len; i++) { - if (utf16[i] >= 0xd800 && utf16[i] < 0xdc00) { /* surrogate pair */ - if (i + 1 < utf16Len && utf16[i+1] >= 0xdc00 && utf16[i+1] < 0xe000) { - /* next code is a low surrogate */ - u[n] = (((utf16[i] & 0x3ff) << 10) | (utf16[i+1] & 0x3ff)) + 0x10000; - ++i; - } else { - /* missing low surrogate - replace it with REPLACEMENT CHARACTER (U+FFFD) */ - u[n] = 0xfffd; - } - } else if (utf16[i] >= 0xdc00 && utf16[i] < 0xe000) { - /* invalid low surrogate - replace it with REPLACEMENT CHARACTER (U+FFFD) */ - u[n] = 0xfffd; - } else { - u[n] = utf16[i]; - } - if (!UnicodeIsValid(u[n])) { - u[n] = 0xfffd; - } - n++; - } - *ucs4 = u; - return len; -} - -int TextStringToUCS4(const GooString *textStr, Unicode **ucs4) -{ - int i, len; - const char *s; - Unicode *u; - - len = textStr->getLength(); - s = textStr->getCString(); - if (len == 0) { - *ucs4 = nullptr; - return 0; - } - - if (textStr->hasUnicodeMarker()) { - Unicode *utf16; - len = len/2 - 1; - if (len > 0) { - utf16 = new Unicode[len]; - for (i = 0 ; i < len; i++) { - utf16[i] = (s[2 + i*2] & 0xff) << 8 | (s[3 + i*2] & 0xff); - } - len = UTF16toUCS4(utf16, len, &u); - delete[] utf16; - } else { - u = nullptr; - } - } else { - u = (Unicode*)gmallocn(len, sizeof(Unicode)); - for (i = 0 ; i < len; i++) { - u[i] = pdfDocEncoding[s[i] & 0xff]; - } - } - *ucs4 = u; - return len; -} - -bool UnicodeIsWhitespace(Unicode ucs4) -{ - static Unicode const spaces[] = { 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, - 0x0020, 0x0085, 0x00A0, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, - 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, 0x2028, 0x2029, 0x202F, 0x205F, - 0x3000 }; - Unicode const *end = spaces + sizeof(spaces) / sizeof(spaces[0]); - Unicode const *i = std::lower_bound(spaces, end, ucs4); - return (i != end && *i == ucs4); -} - -// -// decodeUtf8() and decodeUtf8Table are: -// -// Copyright (c) 2008-2009 Bjoern Hoehrmann <bjoern@hoehrmann.de> -// -// Permission is hereby granted, free of charge, to any person -// obtaining a copy of this software and associated documentation -// files (the "Software"), to deal in the Software without -// restriction, including without limitation the rights to use, copy, -// modify, merge, publish, distribute, sublicense, and/or sell copies -// of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS -// BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -// -// See http://bjoern.hoehrmann.de/utf-8/decoder/dfa/ for details. -// -static const uint32_t UTF8_ACCEPT = 0; -static const uint32_t UTF8_REJECT = 12; -static const uint32_t UCS4_MAX = 0x10FFFF; -static const Unicode REPLACEMENT_CHAR = 0xFFFD; - -static const uint8_t decodeUtf8Table[] = { - // The first part of the table maps bytes to character classes - // to reduce the size of the transition table and create bitmasks. - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 00..1f - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 20..3f - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 40..5f - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 60..7f - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, // 80..9f - 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, // a0..bf - 8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, // c0..df - 10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3, 11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8, // e0..ff - - // The second part is a transition table that maps a combination - // of a state of the automaton and a character class to a state. - 0,12,24,36,60,96,84,12,12,12,48,72, 12,12,12,12,12,12,12,12,12,12,12,12, - 12, 0,12,12,12,12,12, 0,12, 0,12,12, 12,24,12,12,12,12,12,24,12,24,12,12, - 12,12,12,12,12,12,12,24,12,12,12,12, 12,24,12,12,12,12,12,12,12,24,12,12, - 12,12,12,12,12,12,12,36,12,36,12,12, 12,36,12,12,12,12,12,36,12,36,12,12, - 12,36,12,12,12,12,12,12,12,12,12,12, -}; - -// Decode utf8 state machine for fast UTF-8 decoding. Initialise state -// to 0 and call decodeUtf8() for each byte of UTF-8. Return value -// (and state) is UTF8_ACCEPT when it has found a valid codepoint -// (codepoint returned in codep), UTF8_REJECT when the byte is not -// allowed to occur at its position, and some other positive value if -// more bytes have to be read. Reset state to 0 to recover from -// errors. -inline uint32_t decodeUtf8(uint32_t* state, uint32_t* codep, char byte) -{ - uint32_t b = (unsigned char)byte; - uint32_t type = decodeUtf8Table[b]; - - *codep = (*state != UTF8_ACCEPT) ? - (b & 0x3fu) | (*codep << 6) : - (0xff >> type) & (b); - - *state = decodeUtf8Table[256 + *state + type]; - return *state; -} - -// Count number of UTF-16 code units required to convert a UTF-8 string -// (excluding terminating NULL). Each invalid byte is counted as a -// code point since the UTF-8 conversion functions will replace it with -// REPLACEMENT_CHAR. -int utf8CountUtf16CodeUnits(const char *utf8) -{ - uint32_t codepoint; - uint32_t state = 0; - int count = 0; - - while (*utf8) { - decodeUtf8(&state, &codepoint, *utf8); - if (state == UTF8_ACCEPT) { - if (codepoint < 0x10000) - count++; - else if (codepoint <= UCS4_MAX) - count += 2; - else - count++; // replace with REPLACEMENT_CHAR - } else if (state == UTF8_REJECT) { - count++; // replace with REPLACEMENT_CHAR - state = 0; - } - utf8++; - } - if (state != UTF8_ACCEPT && state != UTF8_REJECT) - count++; // replace with REPLACEMENT_CHAR - - return count; -} - - -// Convert UTF-8 to UTF-16 -// utf8- UTF-8 string to convert. If not null terminated, set maxUtf8 to num -// bytes to convert -// utf16 - output buffer to write UTF-16 to. Output will always be null terminated. -// maxUtf16 - maximum size of output buffer including space for null. -// maxUtf8 - maximum number of UTF-8 bytes to convert. Conversion stops when -// either this count is reached or a null is encountered. -// Returns number of UTF-16 code units written (excluding NULL). -int utf8ToUtf16(const char *utf8, uint16_t *utf16, int maxUtf16, int maxUtf8) -{ - uint16_t *p = utf16; - uint32_t codepoint; - uint32_t state = 0; - int nIn = 0; - int nOut = 0; - while (*utf8 && nIn < maxUtf8 && nOut < maxUtf16 - 1) { - decodeUtf8(&state, &codepoint, *utf8); - if (state == UTF8_ACCEPT) { - if (codepoint < 0x10000) { - *p++ = (uint16_t)codepoint; - nOut++; - } else if (codepoint <= UCS4_MAX) { - *p++ = (uint16_t)(0xD7C0 + (codepoint >> 10)); - *p++ = (uint16_t)(0xDC00 + (codepoint & 0x3FF)); - nOut += 2; - } else { - *p++ = REPLACEMENT_CHAR; - nOut++; - state = 0; - } - } else if (state == UTF8_REJECT) { - *p++ = REPLACEMENT_CHAR; // invalid byte for this position - nOut++; - } - utf8++; - nIn++; - } - // replace any trailing bytes too short for a valid UTF-8 with a replacement char - if (state != UTF8_ACCEPT && state != UTF8_REJECT && nOut < maxUtf16 - 1) { - *p++ = REPLACEMENT_CHAR; - nOut++; - } - if (nOut > maxUtf16 - 1) - nOut = maxUtf16 - 1; - utf16[nOut] = 0; - return nOut; -} - -// Allocate utf16 string and convert utf8 into it. -uint16_t *utf8ToUtf16(const char *utf8, int *len) -{ - int n = utf8CountUtf16CodeUnits(utf8); - if (len) - *len = n; - uint16_t *utf16 = (uint16_t*)gmallocn(n + 1, sizeof(uint16_t)); - utf8ToUtf16(utf8, utf16); - return utf16; -} - -static const uint32_t UTF16_ACCEPT = 0; -static const uint32_t UTF16_REJECT = -1; - -// Initialise state to 0. Returns UTF16_ACCEPT when a valid code point -// has been found, UTF16_REJECT when invalid code unit for this state, -// some other valid if another code unit needs to be read. -inline uint32_t decodeUtf16(uint32_t* state, uint32_t* codePoint, uint16_t codeUnit) -{ - if (*state == 0) { - if (codeUnit >= 0xd800 && codeUnit < 0xdc00) { /* surrogate pair */ - *state = codeUnit; - return *state; - } else if (codeUnit >= 0xdc00 && codeUnit < 0xe000) { - /* invalid low surrogate */ - return UTF16_REJECT; - } else { - *codePoint = codeUnit; - return UTF16_ACCEPT; - } - } else { - if (codeUnit >= 0xdc00 && codeUnit < 0xe000) { - *codePoint = (((*state & 0x3ff) << 10) | (codeUnit & 0x3ff)) + 0x10000; - *state = 0; - return UTF16_ACCEPT; - } else { - /* invalid high surrogate */ - return UTF16_REJECT; - } - } -} - -// Count number of UTF-8 bytes required to convert a UTF-16 string to -// UTF-8 (excluding terminating NULL). -int utf16CountUtf8Bytes(const uint16_t *utf16) -{ - uint32_t codepoint = 0; - uint32_t state = 0; - int count = 0; - - while (*utf16) { - decodeUtf16(&state, &codepoint, *utf16); - if (state == UTF16_ACCEPT) { - if (codepoint < 0x80) - count++; - else if (codepoint < 0x800) - count += 2; - else if (codepoint < 0x10000) - count += 3; - else if (codepoint <= UCS4_MAX) - count += 4; - else - count += 3; // replace with REPLACEMENT_CHAR - } else if (state == UTF16_REJECT) { - count += 3; // replace with REPLACEMENT_CHAR - state = 0; - } - utf16++; - } - if (state != UTF8_ACCEPT && state != UTF8_REJECT) - count++; // replace with REPLACEMENT_CHAR - - return count; -} - -// Convert UTF-16 to UTF-8 -// utf16- UTF-16 string to convert. If not null terminated, set maxUtf16 to num -// code units to convert -// utf8 - output buffer to write UTF-8 to. Output will always be null terminated. -// maxUtf8 - maximum size of output buffer including space for null. -// maxUtf16 - maximum number of UTF-16 code units to convert. Conversion stops when -// either this count is reached or a null is encountered. -// Returns number of UTF-8 bytes written (excluding NULL). -int utf16ToUtf8(const uint16_t *utf16, char *utf8, int maxUtf8, int maxUtf16) -{ - uint32_t codepoint = 0; - uint32_t state = 0; - int nIn = 0; - int nOut = 0; - char *p = utf8; - while (*utf16 && nIn < maxUtf16 && nOut < maxUtf8 - 1) { - decodeUtf16(&state, &codepoint, *utf16); - if (state == UTF16_ACCEPT || state == UTF16_REJECT) { - if (state == UTF16_REJECT || codepoint > UCS4_MAX) { - codepoint = REPLACEMENT_CHAR; - state = 0; - } - - int bufSize = maxUtf8 - nOut; - int count = mapUTF8(codepoint, p, bufSize); - p += count; - nOut += count; - } - utf16++; - nIn++; - } - // replace any trailing bytes too short for a valid UTF-8 with a replacement char - if (state != UTF16_ACCEPT && state != UTF16_REJECT && nOut < maxUtf8 - 1) { - int bufSize = maxUtf8 - nOut; - int count = mapUTF8(REPLACEMENT_CHAR, p, bufSize); - p += count; - nOut += count; - nOut++; - } - if (nOut > maxUtf8 - 1) - nOut = maxUtf8 - 1; - utf8[nOut] = 0; - return nOut; -} - -// Allocate utf8 string and convert utf16 into it. -char *utf16ToUtf8(const uint16_t *utf16, int *len) -{ - int n = utf16CountUtf8Bytes(utf16); - if (len) - *len = n; - char *utf8 = (char*)gmalloc(n + 1); - utf16ToUtf8(utf16, utf8); - return utf8; -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/UTF.h b/Build/source/libs/poppler/poppler-src/poppler/UTF.h deleted file mode 100644 index a86c056dbe6..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/UTF.h +++ /dev/null @@ -1,82 +0,0 @@ -//======================================================================== -// -// UTF.h -// -// This file is licensed under the GPLv2 or later -// -// Copyright (C) 2012, 2017 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2016 Jason Crain <jason@aquaticape.us> -// 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 -// -//======================================================================== - -#ifndef UTF_H -#define UTF_H - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include <cstdint> -#include <climits> - -#include "goo/GooString.h" -#include "CharTypes.h" - -// Convert a UTF-16 string to a UCS-4 -// utf16 - utf16 bytes -// utf16_len - number of UTF-16 characters -// ucs4_out - if not NULL, allocates and returns UCS-4 string. Free with gfree. -// returns number of UCS-4 characters -int UTF16toUCS4(const Unicode *utf16, int utf16_len, Unicode **ucs4_out); - -// Convert a PDF Text String to UCS-4 -// s - PDF text string -// ucs4 - if the number of UCS-4 characters is > 0, allocates and -// returns UCS-4 string. Free with gfree. -// returns number of UCS-4 characters -int TextStringToUCS4(const GooString *textStr, Unicode **ucs4); - -// check if UCS-4 character is valid -bool UnicodeIsValid(Unicode ucs4); - -// is a unicode whitespace character -bool UnicodeIsWhitespace(Unicode ucs4); - -// Count number of UTF-16 code units required to convert a UTF-8 string -// (excluding terminating NULL). Each invalid byte is counted as a -// code point since the UTF-8 conversion functions will replace it with -// REPLACEMENT_CHAR. -int utf8CountUtf16CodeUnits(const char *utf8); - -// Convert UTF-8 to UTF-16 -// utf8- UTF-8 string to convert. If not null terminated, set maxUtf8 to num -// bytes to convert -// utf16 - output buffer to write UTF-16 to. Output will always be null terminated. -// maxUtf16 - maximum size of output buffer including space for null. -// maxUtf8 - maximum number of UTF-8 bytes to convert. Conversion stops when -// either this count is reached or a null is encountered. -// Returns number of UTF-16 code units written (excluding NULL). -int utf8ToUtf16(const char *utf8, uint16_t *utf16, int maxUtf16 = INT_MAX, int maxUtf8 = INT_MAX); - -// Allocate utf16 string and convert utf8 into it. -uint16_t *utf8ToUtf16(const char *utf8, int *len = nullptr); - -// Count number of UTF-8 bytes required to convert a UTF-16 string to -// UTF-8 (excluding terminating NULL). -int utf16CountUtf8Bytes(const uint16_t *utf16); - -// Convert UTF-16 to UTF-8 -// utf16- UTF-16 string to convert. If not null terminated, set maxUtf16 to num -// code units to convert -// utf8 - output buffer to write UTF-8 to. Output will always be null terminated. -// maxUtf8 - maximum size of output buffer including space for null. -// maxUtf16 - maximum number of UTF-16 code units to convert. Conversion stops when -// either this count is reached or a null is encountered. -// Returns number of UTF-8 bytes written (excluding NULL). -int utf16ToUtf8(const uint16_t *utf16, char *utf8, int maxUtf8 = INT_MAX, int maxUtf16 = INT_MAX); - -// Allocate utf8 string and convert utf16 into it. -char *utf16ToUtf8(const uint16_t *utf16, int *len = nullptr); - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/UnicodeCClassTables.h b/Build/source/libs/poppler/poppler-src/poppler/UnicodeCClassTables.h deleted file mode 100644 index 62f9ecc3657..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/UnicodeCClassTables.h +++ /dev/null @@ -1,1827 +0,0 @@ -// Copied from gunidecomp.h in GLib: -// s/[G]_UNICODE_MAX_TABLE_INDEX/UNICODE_MAX_TABLE_INDEX/g -// s/[g]uchar/Unicode/g -// s/[g]int16/short/g -// Can be regenerated from gen-unicode-tables.pl, also in GLib, with relevant -// Unicode data tables from ftp.unicode.org. - -static const Unicode cclass_data[][256] = { - { /* page 3, index 0 */ - 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 232, 220, 220, 220, 220, 232, 216, - 220, 220, 220, 220, 220, 202, 202, 220, 220, 220, 220, 202, 202, 220, - 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1, 1, 1, 1, 1, 220, - 220, 220, 220, 230, 230, 230, 230, 230, 230, 230, 230, 240, 230, 220, - 220, 220, 230, 230, 230, 220, 220, 0, 230, 230, 230, 220, 220, 220, 220, - 230, 0, 0, 0, 0, 0, 234, 234, 233, 234, 234, 233, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 230, 230, 230, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }, - { /* page 4, index 1 */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 230, 230, 230, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }, - { /* page 5, index 2 */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 220, 230, 230, 230, 230, 220, 230, 230, 230, 222, 220, 230, 230, 230, - 230, 230, 230, 0, 220, 220, 220, 220, 220, 230, 230, 220, 230, 230, 222, - 228, 230, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 0, 20, 21, 22, 0, 23, - 0, 24, 25, 0, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }, - { /* page 6, index 3 */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 230, 230, 230, 230, - 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 27, 28, 29, 30, 31, 32, 33, 34, 230, 230, 220, 220, - 230, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 230, 230, 230, 230, 230, 230, 230, 0, 0, 230, - 230, 230, 230, 220, 230, 0, 0, 230, 230, 0, 220, 230, 230, 220, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }, - { /* page 7, index 4 */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 230, 220, 230, 230, 220, 230, 230, 220, 220, 220, 230, 220, 220, 230, - 220, 230, 230, 230, 220, 230, 220, 230, 220, 230, 220, 230, 230, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }, - { /* page 9, index 5 */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 9, 0, 0, 0, 230, 220, 230, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }, - { /* page 10, index 6 */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }, - { /* page 11, index 7 */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }, - { /* page 12, index 8 */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 84, 91, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }, - { /* page 13, index 9 */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }, - { /* page 14, index 10 */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 103, 103, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 107, 107, 107, 107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 118, 118, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122, 122, 122, 122, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }, - { /* page 15, index 11 */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 220, 220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 220, 0, 220, 0, 216, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 129, 130, 0, - 132, 0, 0, 0, 0, 0, 130, 130, 130, 130, 0, 0, 130, 0, 230, 230, 9, 0, - 230, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 220, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0 - }, - { /* page 16, index 12 */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 7, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }, - { /* page 23, index 13 */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }, - { /* page 24, index 14 */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 228, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }, - { /* page 25, index 15 */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 222, 230, 220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }, - { /* page 32, index 16 */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 230, 1, 1, 230, 230, - 230, 230, 1, 1, 1, 230, 230, 0, 0, 0, 0, 230, 0, 0, 0, 1, 1, 230, 220, - 230, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }, - { /* page 48, index 17 */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 218, 228, 232, 222, - 224, 224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }, - { /* page 251, index 18 */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }, - { /* page 254, index 19 */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 230, 230, 230, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }, - { /* page 465, index 20 */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 216, 216, 1, 1, 1, 0, 0, 0, 226, 216, 216, 216, 216, 216, - 0, 0, 0, 0, 0, 0, 0, 0, 220, 220, 220, 220, 220, 220, 220, 220, 0, 0, - 230, 230, 230, 230, 230, 220, 220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 230, 230, 230, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0 - } -}; - -static const short combining_class_table_part1[763] = { - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 /* page 3 */, - 1 /* page 4 */, - 2 /* page 5 */, - 3 /* page 6 */, - 4 /* page 7 */, - 0 + UNICODE_MAX_TABLE_INDEX, - 5 /* page 9 */, - 6 /* page 10 */, - 7 /* page 11 */, - 8 /* page 12 */, - 9 /* page 13 */, - 10 /* page 14 */, - 11 /* page 15 */, - 12 /* page 16 */, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 13 /* page 23 */, - 14 /* page 24 */, - 15 /* page 25 */, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 16 /* page 32 */, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 17 /* page 48 */, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 18 /* page 251 */, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 19 /* page 254 */, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 20 /* page 465 */, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX -}; - -static const short combining_class_table_part2[768] = { - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX -}; diff --git a/Build/source/libs/poppler/poppler-src/poppler/UnicodeCompTables.h b/Build/source/libs/poppler/poppler-src/poppler/UnicodeCompTables.h deleted file mode 100644 index 68e2f86aee9..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/UnicodeCompTables.h +++ /dev/null @@ -1,665 +0,0 @@ -// Copied from gunicomp.h in GLib: -// s/[G]_UNICODE_MAX_TABLE_INDEX/UNICODE_MAX_TABLE_INDEX/g -// s/[g]uint16/unsigned short/g -// s/[g]int16/short/g -// Can be regenerated from gen-unicode-tables.pl, also in GLib, with relevant -// Unicode data tables from ftp.unicode.org. - -#define COMPOSE_FIRST_START 1 -#define COMPOSE_FIRST_SINGLE_START 147 -#define COMPOSE_SECOND_START 357 -#define COMPOSE_SECOND_SINGLE_START 388 - -#define COMPOSE_TABLE_LAST 48 - -static const unsigned short compose_data[][256] = { - { /* page 0, index 0 */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 147, 148, 149, 0, 0, 1, 2, 3, 4, 5, - 150, 6, 7, 8, 151, 9, 10, 11, 12, 13, 14, 0, 15, 16, 17, 18, 19, 20, 21, - 22, 23, 0, 0, 0, 0, 0, 0, 24, 25, 26, 27, 28, 152, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 0, 39, 40, 41, 42, 43, 44, 45, 46, 47, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 0, 153, 154, - 50, 155, 0, 0, 51, 0, 0, 0, 0, 156, 0, 0, 0, 0, 52, 53, 157, 0, 158, 0, - 0, 0, 54, 0, 0, 0, 0, 0, 55, 0, 159, 160, 56, 161, 0, 0, 57, 0, 0, 0, 0, - 162, 0, 0, 0, 0, 58, 59, 163, 0, 164, 0, 0, 0, 60, 0, 0, 0 - }, - { /* page 1, index 1 */ - 0, 0, 61, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 64, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 65, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 165, 166, 0, - 0, 0, 0, 167, 168, 0, 0, 0, 0, 0, 0, 169, 170, 171, 172, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 173, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, - 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 70, 0, 0, 0, 0, 0, 0, 174, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 175, 176, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0 - }, - { /* page 2, index 2 */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 177, 178, 179, 180, 0, 0, 0, 0, - 181, 182, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 183, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }, - { /* page 3, index 3 */ - 357, 358, 359, 360, 361, 0, 362, 363, 364, 365, 366, 367, 368, 0, 0, 369, - 0, 370, 0, 371, 372, 0, 0, 0, 0, 0, 0, 373, 0, 0, 0, 0, 0, 0, 0, 374, - 375, 376, 377, 378, 379, 0, 0, 0, 0, 380, 381, 0, 382, 383, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 384, 0, 0, 385, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, 0, 0, 0, - 72, 0, 73, 0, 74, 0, 0, 0, 0, 0, 75, 0, 184, 0, 0, 0, 76, 0, 0, 0, 77, 0, - 0, 185, 0, 186, 0, 0, 78, 0, 0, 0, 79, 0, 80, 0, 81, 0, 0, 0, 0, 0, 82, - 0, 83, 0, 0, 0, 84, 0, 0, 0, 85, 86, 87, 0, 0, 187, 0, 0, 0, 88, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }, - { /* page 4, index 4 */ - 0, 0, 0, 0, 0, 0, 188, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, 0, 0, 189, 0, 90, - 91, 190, 92, 0, 191, 0, 0, 0, 192, 0, 0, 0, 0, 93, 0, 0, 0, 193, 0, 0, 0, - 194, 0, 195, 0, 0, 94, 0, 0, 196, 0, 95, 96, 197, 97, 0, 198, 0, 0, 0, - 199, 0, 0, 0, 0, 98, 0, 0, 0, 200, 0, 0, 0, 201, 0, 202, 0, 0, 0, 0, 0, - 0, 0, 0, 203, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 204, 205, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 206, 207, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 208, 209, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 - }, - { /* page 6, index 5 */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 99, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 210, 0, 211, 0, 0, 0, 0, 0, 0, 0, 0, 388, 389, 390, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 212, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 213, 0, - 0, 214, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }, - { /* page 9, index 6 */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 215, 0, 0, 0, 0, 0, 0, 0, - 216, 0, 0, 217, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 391, - 0, 0, 0, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 392, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }, - { /* page 11, index 7 */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 393, 0, 0, 0, 0, 0, 0, 0, 0, - 101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 394, 395, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 218, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 396, 0, 0, 0, 0, 0, 0, 0, 102, 219, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 397, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }, - { /* page 12, index 8 */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 220, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 221, - 0, 0, 398, 0, 0, 0, 103, 0, 0, 0, 222, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 399, - 400, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }, - { /* page 13, index 9 */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 401, 0, 0, 0, 0, 0, 0, 0, 104, - 223, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 402, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 403, 0, 0, 0, 0, 404, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 105, 0, 0, 224, 0, 0, 405, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }, - { /* page 16, index 10 */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 225, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }, - { /* page 30, index 11 */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 226, 227, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 228, 229, 0, 0, - 0, 0, 0, 0, 230, 231, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 106, 107, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 233, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 234, 235, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }, - { /* page 31, index 12 */ - 108, 109, 236, 237, 238, 239, 240, 241, 110, 111, 242, 243, 244, 245, - 246, 247, 112, 113, 0, 0, 0, 0, 0, 0, 114, 115, 0, 0, 0, 0, 0, 0, 116, - 117, 248, 249, 250, 251, 252, 253, 118, 119, 254, 255, 256, 257, 258, - 259, 120, 121, 0, 0, 0, 0, 0, 0, 122, 123, 0, 0, 0, 0, 0, 0, 124, 125, 0, - 0, 0, 0, 0, 0, 126, 127, 0, 0, 0, 0, 0, 0, 128, 129, 0, 0, 0, 0, 0, 0, 0, - 130, 0, 0, 0, 0, 0, 0, 131, 132, 260, 261, 262, 263, 264, 265, 133, 134, - 266, 267, 268, 269, 270, 271, 272, 0, 0, 0, 273, 0, 0, 0, 0, 0, 0, 0, - 274, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 275, 0, 0, 0, 0, 0, 0, 0, 0, 135, 0, 0, 0, - 0, 0, 0, 276, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 277, 0, 0, 0, 0, 0, 0, 0, 136, 0 - }, - { /* page 33, index 13 */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 278, 0, 279, 0, 280, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 281, 0, 282, 0, - 283, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }, - { /* page 34, index 14 */ - 0, 0, 0, 284, 0, 0, 0, 0, 285, 0, 0, 286, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 287, 0, 288, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 289, 0, 0, 0, 0, 0, 0, 290, - 0, 291, 0, 0, 292, 0, 0, 0, 0, 293, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 294, 0, 0, 295, 296, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 297, 298, 0, 0, 299, 300, 0, 0, 301, 302, 303, 304, 0, 0, 0, 0, - 305, 306, 0, 0, 307, 308, 0, 0, 0, 0, 0, 0, 0, 0, 0, 309, 310, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 311, 0, 0, 0, 0, 0, 312, 313, 0, 314, - 0, 0, 0, 0, 0, 0, 315, 316, 317, 318, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }, - { /* page 48, index 15 */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 319, 0, - 0, 0, 0, 320, 0, 321, 0, 322, 0, 323, 0, 324, 0, 325, 0, 326, 0, 327, 0, - 328, 0, 329, 0, 330, 0, 331, 0, 0, 332, 0, 333, 0, 334, 0, 0, 0, 0, 0, 0, - 137, 0, 0, 138, 0, 0, 139, 0, 0, 140, 0, 0, 141, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 386, 387, - 0, 0, 335, 0, 0, 0, 0, 0, 0, 0, 0, 336, 0, 0, 0, 0, 337, 0, 338, 0, 339, - 0, 340, 0, 341, 0, 342, 0, 343, 0, 344, 0, 345, 0, 346, 0, 347, 0, 348, - 0, 0, 349, 0, 350, 0, 351, 0, 0, 0, 0, 0, 0, 142, 0, 0, 143, 0, 0, 144, - 0, 0, 145, 0, 0, 146, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 352, 353, 354, 355, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 356, 0, 0 - } -}; - -static const short compose_table[COMPOSE_TABLE_LAST + 1] = { - 0 /* page 0 */, - 1 /* page 1 */, - 2 /* page 2 */, - 3 /* page 3 */, - 4 /* page 4 */, - 0 + UNICODE_MAX_TABLE_INDEX, - 5 /* page 6 */, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 6 /* page 9 */, - 0 + UNICODE_MAX_TABLE_INDEX, - 7 /* page 11 */, - 8 /* page 12 */, - 9 /* page 13 */, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 10 /* page 16 */, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 11 /* page 30 */, - 12 /* page 31 */, - 0 + UNICODE_MAX_TABLE_INDEX, - 13 /* page 33 */, - 14 /* page 34 */, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 0 + UNICODE_MAX_TABLE_INDEX, - 15 /* page 48 */ -}; - -static const unsigned short compose_first_single[][2] = { - { 0x0338, 0x226e }, - { 0x0338, 0x2260 }, - { 0x0338, 0x226f }, - { 0x0307, 0x1e1e }, - { 0x0302, 0x0134 }, - { 0x0307, 0x1e1f }, - { 0x0304, 0x01de }, - { 0x0301, 0x01fa }, - { 0x0301, 0x1e08 }, - { 0x0301, 0x1e2e }, - { 0x0304, 0x022a }, - { 0x0301, 0x01fe }, - { 0x0304, 0x01df }, - { 0x0301, 0x01fb }, - { 0x0301, 0x1e09 }, - { 0x0301, 0x1e2f }, - { 0x0304, 0x022b }, - { 0x0301, 0x01ff }, - { 0x0307, 0x1e64 }, - { 0x0307, 0x1e65 }, - { 0x0307, 0x1e66 }, - { 0x0307, 0x1e67 }, - { 0x0301, 0x1e78 }, - { 0x0301, 0x1e79 }, - { 0x0308, 0x1e7a }, - { 0x0308, 0x1e7b }, - { 0x0307, 0x1e9b }, - { 0x030c, 0x01ee }, - { 0x0304, 0x01ec }, - { 0x0304, 0x01ed }, - { 0x0304, 0x01e0 }, - { 0x0304, 0x01e1 }, - { 0x0306, 0x1e1c }, - { 0x0306, 0x1e1d }, - { 0x0304, 0x0230 }, - { 0x0304, 0x0231 }, - { 0x030c, 0x01ef }, - { 0x0314, 0x1fec }, - { 0x0345, 0x1fb4 }, - { 0x0345, 0x1fc4 }, - { 0x0345, 0x1ff4 }, - { 0x0308, 0x0407 }, - { 0x0301, 0x0403 }, - { 0x0308, 0x04de }, - { 0x0301, 0x040c }, - { 0x0308, 0x04e6 }, - { 0x0308, 0x04f4 }, - { 0x0308, 0x04f8 }, - { 0x0308, 0x04ec }, - { 0x0301, 0x0453 }, - { 0x0308, 0x04df }, - { 0x0301, 0x045c }, - { 0x0308, 0x04e7 }, - { 0x0308, 0x04f5 }, - { 0x0308, 0x04f9 }, - { 0x0308, 0x04ed }, - { 0x0308, 0x0457 }, - { 0x030f, 0x0476 }, - { 0x030f, 0x0477 }, - { 0x0308, 0x04da }, - { 0x0308, 0x04db }, - { 0x0308, 0x04ea }, - { 0x0308, 0x04eb }, - { 0x0654, 0x0624 }, - { 0x0654, 0x0626 }, - { 0x0654, 0x06c2 }, - { 0x0654, 0x06d3 }, - { 0x0654, 0x06c0 }, - { 0x093c, 0x0929 }, - { 0x093c, 0x0931 }, - { 0x093c, 0x0934 }, - { 0x0bd7, 0x0b94 }, - { 0x0bbe, 0x0bcb }, - { 0x0c56, 0x0c48 }, - { 0x0cd5, 0x0cc0 }, - { 0x0cd5, 0x0ccb }, - { 0x0d3e, 0x0d4b }, - { 0x0dca, 0x0ddd }, - { 0x102e, 0x1026 }, - { 0x0304, 0x1e38 }, - { 0x0304, 0x1e39 }, - { 0x0304, 0x1e5c }, - { 0x0304, 0x1e5d }, - { 0x0307, 0x1e68 }, - { 0x0307, 0x1e69 }, - { 0x0302, 0x1ec6 }, - { 0x0302, 0x1ec7 }, - { 0x0302, 0x1ed8 }, - { 0x0302, 0x1ed9 }, - { 0x0345, 0x1f82 }, - { 0x0345, 0x1f83 }, - { 0x0345, 0x1f84 }, - { 0x0345, 0x1f85 }, - { 0x0345, 0x1f86 }, - { 0x0345, 0x1f87 }, - { 0x0345, 0x1f8a }, - { 0x0345, 0x1f8b }, - { 0x0345, 0x1f8c }, - { 0x0345, 0x1f8d }, - { 0x0345, 0x1f8e }, - { 0x0345, 0x1f8f }, - { 0x0345, 0x1f92 }, - { 0x0345, 0x1f93 }, - { 0x0345, 0x1f94 }, - { 0x0345, 0x1f95 }, - { 0x0345, 0x1f96 }, - { 0x0345, 0x1f97 }, - { 0x0345, 0x1f9a }, - { 0x0345, 0x1f9b }, - { 0x0345, 0x1f9c }, - { 0x0345, 0x1f9d }, - { 0x0345, 0x1f9e }, - { 0x0345, 0x1f9f }, - { 0x0345, 0x1fa2 }, - { 0x0345, 0x1fa3 }, - { 0x0345, 0x1fa4 }, - { 0x0345, 0x1fa5 }, - { 0x0345, 0x1fa6 }, - { 0x0345, 0x1fa7 }, - { 0x0345, 0x1faa }, - { 0x0345, 0x1fab }, - { 0x0345, 0x1fac }, - { 0x0345, 0x1fad }, - { 0x0345, 0x1fae }, - { 0x0345, 0x1faf }, - { 0x0345, 0x1fb2 }, - { 0x0345, 0x1fc2 }, - { 0x0345, 0x1ff2 }, - { 0x0345, 0x1fb7 }, - { 0x0345, 0x1fc7 }, - { 0x0345, 0x1ff7 }, - { 0x0338, 0x219a }, - { 0x0338, 0x219b }, - { 0x0338, 0x21ae }, - { 0x0338, 0x21cd }, - { 0x0338, 0x21cf }, - { 0x0338, 0x21ce }, - { 0x0338, 0x2204 }, - { 0x0338, 0x2209 }, - { 0x0338, 0x220c }, - { 0x0338, 0x2224 }, - { 0x0338, 0x2226 }, - { 0x0338, 0x2241 }, - { 0x0338, 0x2244 }, - { 0x0338, 0x2247 }, - { 0x0338, 0x2249 }, - { 0x0338, 0x226d }, - { 0x0338, 0x2262 }, - { 0x0338, 0x2270 }, - { 0x0338, 0x2271 }, - { 0x0338, 0x2274 }, - { 0x0338, 0x2275 }, - { 0x0338, 0x2278 }, - { 0x0338, 0x2279 }, - { 0x0338, 0x2280 }, - { 0x0338, 0x2281 }, - { 0x0338, 0x22e0 }, - { 0x0338, 0x22e1 }, - { 0x0338, 0x2284 }, - { 0x0338, 0x2285 }, - { 0x0338, 0x2288 }, - { 0x0338, 0x2289 }, - { 0x0338, 0x22e2 }, - { 0x0338, 0x22e3 }, - { 0x0338, 0x22ac }, - { 0x0338, 0x22ad }, - { 0x0338, 0x22ae }, - { 0x0338, 0x22af }, - { 0x0338, 0x22ea }, - { 0x0338, 0x22eb }, - { 0x0338, 0x22ec }, - { 0x0338, 0x22ed }, - { 0x3099, 0x3094 }, - { 0x3099, 0x304c }, - { 0x3099, 0x304e }, - { 0x3099, 0x3050 }, - { 0x3099, 0x3052 }, - { 0x3099, 0x3054 }, - { 0x3099, 0x3056 }, - { 0x3099, 0x3058 }, - { 0x3099, 0x305a }, - { 0x3099, 0x305c }, - { 0x3099, 0x305e }, - { 0x3099, 0x3060 }, - { 0x3099, 0x3062 }, - { 0x3099, 0x3065 }, - { 0x3099, 0x3067 }, - { 0x3099, 0x3069 }, - { 0x3099, 0x309e }, - { 0x3099, 0x30f4 }, - { 0x3099, 0x30ac }, - { 0x3099, 0x30ae }, - { 0x3099, 0x30b0 }, - { 0x3099, 0x30b2 }, - { 0x3099, 0x30b4 }, - { 0x3099, 0x30b6 }, - { 0x3099, 0x30b8 }, - { 0x3099, 0x30ba }, - { 0x3099, 0x30bc }, - { 0x3099, 0x30be }, - { 0x3099, 0x30c0 }, - { 0x3099, 0x30c2 }, - { 0x3099, 0x30c5 }, - { 0x3099, 0x30c7 }, - { 0x3099, 0x30c9 }, - { 0x3099, 0x30f7 }, - { 0x3099, 0x30f8 }, - { 0x3099, 0x30f9 }, - { 0x3099, 0x30fa }, - { 0x3099, 0x30fe } -}; -static const unsigned short compose_second_single[][2] = { - { 0x0627, 0x0622 }, - { 0x0627, 0x0623 }, - { 0x0627, 0x0625 }, - { 0x09c7, 0x09cb }, - { 0x09c7, 0x09cc }, - { 0x0b47, 0x0b4b }, - { 0x0b47, 0x0b48 }, - { 0x0b47, 0x0b4c }, - { 0x0bc6, 0x0bca }, - { 0x0bc6, 0x0bcc }, - { 0x0cc6, 0x0cca }, - { 0x0cc6, 0x0cc7 }, - { 0x0cc6, 0x0cc8 }, - { 0x0d46, 0x0d4a }, - { 0x0d46, 0x0d4c }, - { 0x0dd9, 0x0dda }, - { 0x0dd9, 0x0ddc }, - { 0x0dd9, 0x0dde } -}; -static const unsigned short compose_array[146][31] = { - { 0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x0100, 0x0102, 0x0226, 0x00c4, 0x1ea2, 0x00c5, 0, 0x01cd, 0x0200, 0x0202, 0, 0, 0, 0x1ea0, 0, 0x1e00, 0, 0, 0x0104, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 0, 0x1e02, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1e04, 0, 0, 0, 0, 0, 0, 0, 0, 0x1e06, 0, 0, 0, 0 }, - { 0, 0x0106, 0x0108, 0, 0, 0, 0x010a, 0, 0, 0, 0, 0x010c, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x00c7, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 0, 0x1e0a, 0, 0, 0, 0, 0x010e, 0, 0, 0, 0, 0, 0x1e0c, 0, 0, 0, 0x1e10, 0, 0x1e12, 0, 0, 0x1e0e, 0, 0, 0, 0 }, - { 0x00c8, 0x00c9, 0x00ca, 0x1ebc, 0x0112, 0x0114, 0x0116, 0x00cb, 0x1eba, 0, 0, 0x011a, 0x0204, 0x0206, 0, 0, 0, 0x1eb8, 0, 0, 0, 0x0228, 0x0118, 0x1e18, 0, 0x1e1a, 0, 0, 0, 0, 0 }, - { 0, 0x01f4, 0x011c, 0, 0x1e20, 0x011e, 0x0120, 0, 0, 0, 0, 0x01e6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x0122, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 0x0124, 0, 0, 0, 0x1e22, 0x1e26, 0, 0, 0, 0x021e, 0, 0, 0, 0, 0, 0x1e24, 0, 0, 0, 0x1e28, 0, 0, 0x1e2a, 0, 0, 0, 0, 0, 0 }, - { 0x00cc, 0x00cd, 0x00ce, 0x0128, 0x012a, 0x012c, 0x0130, 0x00cf, 0x1ec8, 0, 0, 0x01cf, 0x0208, 0x020a, 0, 0, 0, 0x1eca, 0, 0, 0, 0, 0x012e, 0, 0, 0x1e2c, 0, 0, 0, 0, 0 }, - { 0, 0x1e30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x01e8, 0, 0, 0, 0, 0, 0x1e32, 0, 0, 0, 0x0136, 0, 0, 0, 0, 0x1e34, 0, 0, 0, 0 }, - { 0, 0x0139, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x013d, 0, 0, 0, 0, 0, 0x1e36, 0, 0, 0, 0x013b, 0, 0x1e3c, 0, 0, 0x1e3a, 0, 0, 0, 0 }, - { 0, 0x1e3e, 0, 0, 0, 0, 0x1e40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1e42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0x01f8, 0x0143, 0, 0x00d1, 0, 0, 0x1e44, 0, 0, 0, 0, 0x0147, 0, 0, 0, 0, 0, 0x1e46, 0, 0, 0, 0x0145, 0, 0x1e4a, 0, 0, 0x1e48, 0, 0, 0, 0 }, - { 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x014c, 0x014e, 0x022e, 0x00d6, 0x1ece, 0, 0x0150, 0x01d1, 0x020c, 0x020e, 0, 0, 0x01a0, 0x1ecc, 0, 0, 0, 0, 0x01ea, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0x1e54, 0, 0, 0, 0, 0x1e56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0x0154, 0, 0, 0, 0, 0x1e58, 0, 0, 0, 0, 0x0158, 0x0210, 0x0212, 0, 0, 0, 0x1e5a, 0, 0, 0, 0x0156, 0, 0, 0, 0, 0x1e5e, 0, 0, 0, 0 }, - { 0, 0x015a, 0x015c, 0, 0, 0, 0x1e60, 0, 0, 0, 0, 0x0160, 0, 0, 0, 0, 0, 0x1e62, 0, 0, 0x0218, 0x015e, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 0, 0x1e6a, 0, 0, 0, 0, 0x0164, 0, 0, 0, 0, 0, 0x1e6c, 0, 0, 0x021a, 0x0162, 0, 0x1e70, 0, 0, 0x1e6e, 0, 0, 0, 0 }, - { 0x00d9, 0x00da, 0x00db, 0x0168, 0x016a, 0x016c, 0, 0x00dc, 0x1ee6, 0x016e, 0x0170, 0x01d3, 0x0214, 0x0216, 0, 0, 0x01af, 0x1ee4, 0x1e72, 0, 0, 0, 0x0172, 0x1e76, 0, 0x1e74, 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0x1e7c, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1e7e, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0x1e80, 0x1e82, 0x0174, 0, 0, 0, 0x1e86, 0x1e84, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1e88, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 0, 0x1e8a, 0x1e8c, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0x1ef2, 0x00dd, 0x0176, 0x1ef8, 0x0232, 0, 0x1e8e, 0x0178, 0x1ef6, 0, 0, 0, 0, 0, 0, 0, 0, 0x1ef4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0x0179, 0x1e90, 0, 0, 0, 0x017b, 0, 0, 0, 0, 0x017d, 0, 0, 0, 0, 0, 0x1e92, 0, 0, 0, 0, 0, 0, 0, 0, 0x1e94, 0, 0, 0, 0 }, - { 0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x0101, 0x0103, 0x0227, 0x00e4, 0x1ea3, 0x00e5, 0, 0x01ce, 0x0201, 0x0203, 0, 0, 0, 0x1ea1, 0, 0x1e01, 0, 0, 0x0105, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 0, 0x1e03, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1e05, 0, 0, 0, 0, 0, 0, 0, 0, 0x1e07, 0, 0, 0, 0 }, - { 0, 0x0107, 0x0109, 0, 0, 0, 0x010b, 0, 0, 0, 0, 0x010d, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x00e7, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 0, 0x1e0b, 0, 0, 0, 0, 0x010f, 0, 0, 0, 0, 0, 0x1e0d, 0, 0, 0, 0x1e11, 0, 0x1e13, 0, 0, 0x1e0f, 0, 0, 0, 0 }, - { 0x00e8, 0x00e9, 0x00ea, 0x1ebd, 0x0113, 0x0115, 0x0117, 0x00eb, 0x1ebb, 0, 0, 0x011b, 0x0205, 0x0207, 0, 0, 0, 0x1eb9, 0, 0, 0, 0x0229, 0x0119, 0x1e19, 0, 0x1e1b, 0, 0, 0, 0, 0 }, - { 0, 0x01f5, 0x011d, 0, 0x1e21, 0x011f, 0x0121, 0, 0, 0, 0, 0x01e7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x0123, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 0x0125, 0, 0, 0, 0x1e23, 0x1e27, 0, 0, 0, 0x021f, 0, 0, 0, 0, 0, 0x1e25, 0, 0, 0, 0x1e29, 0, 0, 0x1e2b, 0, 0x1e96, 0, 0, 0, 0 }, - { 0x00ec, 0x00ed, 0x00ee, 0x0129, 0x012b, 0x012d, 0, 0x00ef, 0x1ec9, 0, 0, 0x01d0, 0x0209, 0x020b, 0, 0, 0, 0x1ecb, 0, 0, 0, 0, 0x012f, 0, 0, 0x1e2d, 0, 0, 0, 0, 0 }, - { 0, 0, 0x0135, 0, 0, 0, 0, 0, 0, 0, 0, 0x01f0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0x1e31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x01e9, 0, 0, 0, 0, 0, 0x1e33, 0, 0, 0, 0x0137, 0, 0, 0, 0, 0x1e35, 0, 0, 0, 0 }, - { 0, 0x013a, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x013e, 0, 0, 0, 0, 0, 0x1e37, 0, 0, 0, 0x013c, 0, 0x1e3d, 0, 0, 0x1e3b, 0, 0, 0, 0 }, - { 0, 0x1e3f, 0, 0, 0, 0, 0x1e41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1e43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0x01f9, 0x0144, 0, 0x00f1, 0, 0, 0x1e45, 0, 0, 0, 0, 0x0148, 0, 0, 0, 0, 0, 0x1e47, 0, 0, 0, 0x0146, 0, 0x1e4b, 0, 0, 0x1e49, 0, 0, 0, 0 }, - { 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x014d, 0x014f, 0x022f, 0x00f6, 0x1ecf, 0, 0x0151, 0x01d2, 0x020d, 0x020f, 0, 0, 0x01a1, 0x1ecd, 0, 0, 0, 0, 0x01eb, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0x1e55, 0, 0, 0, 0, 0x1e57, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0x0155, 0, 0, 0, 0, 0x1e59, 0, 0, 0, 0, 0x0159, 0x0211, 0x0213, 0, 0, 0, 0x1e5b, 0, 0, 0, 0x0157, 0, 0, 0, 0, 0x1e5f, 0, 0, 0, 0 }, - { 0, 0x015b, 0x015d, 0, 0, 0, 0x1e61, 0, 0, 0, 0, 0x0161, 0, 0, 0, 0, 0, 0x1e63, 0, 0, 0x0219, 0x015f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 0, 0x1e6b, 0x1e97, 0, 0, 0, 0x0165, 0, 0, 0, 0, 0, 0x1e6d, 0, 0, 0x021b, 0x0163, 0, 0x1e71, 0, 0, 0x1e6f, 0, 0, 0, 0 }, - { 0x00f9, 0x00fa, 0x00fb, 0x0169, 0x016b, 0x016d, 0, 0x00fc, 0x1ee7, 0x016f, 0x0171, 0x01d4, 0x0215, 0x0217, 0, 0, 0x01b0, 0x1ee5, 0x1e73, 0, 0, 0, 0x0173, 0x1e77, 0, 0x1e75, 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0x1e7d, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1e7f, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0x1e81, 0x1e83, 0x0175, 0, 0, 0, 0x1e87, 0x1e85, 0, 0x1e98, 0, 0, 0, 0, 0, 0, 0, 0x1e89, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 0, 0x1e8b, 0x1e8d, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0x1ef3, 0x00fd, 0x0177, 0x1ef9, 0x0233, 0, 0x1e8f, 0x00ff, 0x1ef7, 0x1e99, 0, 0, 0, 0, 0, 0, 0, 0x1ef5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0x017a, 0x1e91, 0, 0, 0, 0x017c, 0, 0, 0, 0, 0x017e, 0, 0, 0, 0, 0, 0x1e93, 0, 0, 0, 0, 0, 0, 0, 0, 0x1e95, 0, 0, 0, 0 }, - { 0x1fed, 0x0385, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1fc1, 0, 0, 0 }, - { 0x1ea6, 0x1ea4, 0, 0x1eaa, 0, 0, 0, 0, 0x1ea8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0x01fc, 0, 0, 0x01e2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0x1ec0, 0x1ebe, 0, 0x1ec4, 0, 0, 0, 0, 0x1ec2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0x1ed2, 0x1ed0, 0, 0x1ed6, 0, 0, 0, 0, 0x1ed4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0x1e4c, 0, 0, 0x022c, 0, 0, 0x1e4e, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0x01db, 0x01d7, 0, 0, 0x01d5, 0, 0, 0, 0, 0, 0, 0x01d9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0x1ea7, 0x1ea5, 0, 0x1eab, 0, 0, 0, 0, 0x1ea9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0x01fd, 0, 0, 0x01e3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0x1ec1, 0x1ebf, 0, 0x1ec5, 0, 0, 0, 0, 0x1ec3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0x1ed3, 0x1ed1, 0, 0x1ed7, 0, 0, 0, 0, 0x1ed5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0x1e4d, 0, 0, 0x022d, 0, 0, 0x1e4f, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0x01dc, 0x01d8, 0, 0, 0x01d6, 0, 0, 0, 0, 0, 0, 0x01da, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0x1eb0, 0x1eae, 0, 0x1eb4, 0, 0, 0, 0, 0x1eb2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0x1eb1, 0x1eaf, 0, 0x1eb5, 0, 0, 0, 0, 0x1eb3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0x1e14, 0x1e16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0x1e15, 0x1e17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0x1e50, 0x1e52, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0x1e51, 0x1e53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0x1edc, 0x1eda, 0, 0x1ee0, 0, 0, 0, 0, 0x1ede, 0, 0, 0, 0, 0, 0, 0, 0, 0x1ee2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0x1edd, 0x1edb, 0, 0x1ee1, 0, 0, 0, 0, 0x1edf, 0, 0, 0, 0, 0, 0, 0, 0, 0x1ee3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0x1eea, 0x1ee8, 0, 0x1eee, 0, 0, 0, 0, 0x1eec, 0, 0, 0, 0, 0, 0, 0, 0, 0x1ef0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0x1eeb, 0x1ee9, 0, 0x1eef, 0, 0, 0, 0, 0x1eed, 0, 0, 0, 0, 0, 0, 0, 0, 0x1ef1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0x1fba, 0x0386, 0, 0, 0x1fb9, 0x1fb8, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f08, 0x1f09, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1fbc, 0, 0 }, - { 0x1fc8, 0x0388, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f18, 0x1f19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0x1fca, 0x0389, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f28, 0x1f29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1fcc, 0, 0 }, - { 0x1fda, 0x038a, 0, 0, 0x1fd9, 0x1fd8, 0, 0x03aa, 0, 0, 0, 0, 0, 0, 0x1f38, 0x1f39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0x1ff8, 0x038c, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f48, 0x1f49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0x1fea, 0x038e, 0, 0, 0x1fe9, 0x1fe8, 0, 0x03ab, 0, 0, 0, 0, 0, 0, 0, 0x1f59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0x1ffa, 0x038f, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f68, 0x1f69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1ffc, 0, 0 }, - { 0x1f70, 0x03ac, 0, 0, 0x1fb1, 0x1fb0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f00, 0x1f01, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1fb6, 0x1fb3, 0, 0 }, - { 0x1f72, 0x03ad, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f10, 0x1f11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0x1f74, 0x03ae, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f20, 0x1f21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1fc6, 0x1fc3, 0, 0 }, - { 0x1f76, 0x03af, 0, 0, 0x1fd1, 0x1fd0, 0, 0x03ca, 0, 0, 0, 0, 0, 0, 0x1f30, 0x1f31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1fd6, 0, 0, 0 }, - { 0x1f78, 0x03cc, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f40, 0x1f41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1fe4, 0x1fe5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0x1f7a, 0x03cd, 0, 0, 0x1fe1, 0x1fe0, 0, 0x03cb, 0, 0, 0, 0, 0, 0, 0x1f50, 0x1f51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1fe6, 0, 0, 0 }, - { 0x1f7c, 0x03ce, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f60, 0x1f61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1ff6, 0x1ff3, 0, 0 }, - { 0x1fd2, 0x0390, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1fd7, 0, 0, 0 }, - { 0x1fe2, 0x03b0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1fe7, 0, 0, 0 }, - { 0, 0x03d3, 0, 0, 0, 0, 0, 0x03d4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 0x04d0, 0, 0x04d2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0x0400, 0, 0, 0, 0, 0x04d6, 0, 0x0401, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 0x04c1, 0, 0x04dc, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0x040d, 0, 0, 0, 0x04e2, 0x0419, 0, 0x04e4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0x04ee, 0x040e, 0, 0x04f0, 0, 0, 0x04f2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 0x04d1, 0, 0x04d3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0x0450, 0, 0, 0, 0, 0x04d7, 0, 0x0451, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 0x04c2, 0, 0x04dd, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0x045d, 0, 0, 0, 0x04e3, 0x0439, 0, 0x04e5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0x04ef, 0x045e, 0, 0x04f1, 0, 0, 0x04f3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 0x1eac, 0, 0, 0x1eb6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 0x1ead, 0, 0, 0x1eb7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0x1f02, 0x1f04, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f06, 0x1f80, 0, 0 }, - { 0x1f03, 0x1f05, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f07, 0x1f81, 0, 0 }, - { 0x1f0a, 0x1f0c, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f0e, 0x1f88, 0, 0 }, - { 0x1f0b, 0x1f0d, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f0f, 0x1f89, 0, 0 }, - { 0x1f12, 0x1f14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0x1f13, 0x1f15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0x1f1a, 0x1f1c, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0x1f1b, 0x1f1d, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0x1f22, 0x1f24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f26, 0x1f90, 0, 0 }, - { 0x1f23, 0x1f25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f27, 0x1f91, 0, 0 }, - { 0x1f2a, 0x1f2c, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f2e, 0x1f98, 0, 0 }, - { 0x1f2b, 0x1f2d, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f2f, 0x1f99, 0, 0 }, - { 0x1f32, 0x1f34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f36, 0, 0, 0 }, - { 0x1f33, 0x1f35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f37, 0, 0, 0 }, - { 0x1f3a, 0x1f3c, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f3e, 0, 0, 0 }, - { 0x1f3b, 0x1f3d, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f3f, 0, 0, 0 }, - { 0x1f42, 0x1f44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0x1f43, 0x1f45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0x1f4a, 0x1f4c, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0x1f4b, 0x1f4d, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 0x1f52, 0x1f54, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f56, 0, 0, 0 }, - { 0x1f53, 0x1f55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f57, 0, 0, 0 }, - { 0x1f5b, 0x1f5d, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f5f, 0, 0, 0 }, - { 0x1f62, 0x1f64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f66, 0x1fa0, 0, 0 }, - { 0x1f63, 0x1f65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f67, 0x1fa1, 0, 0 }, - { 0x1f6a, 0x1f6c, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f6e, 0x1fa8, 0, 0 }, - { 0x1f6b, 0x1f6d, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f6f, 0x1fa9, 0, 0 }, - { 0x1fcd, 0x1fce, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1fcf, 0, 0, 0 }, - { 0x1fdd, 0x1fde, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1fdf, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x3070, 0x3071 }, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x3073, 0x3074 }, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x3076, 0x3077 }, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x3079, 0x307a }, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x307c, 0x307d }, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x30d0, 0x30d1 }, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x30d3, 0x30d4 }, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x30d6, 0x30d7 }, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x30d9, 0x30da }, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x30dc, 0x30dd } -}; diff --git a/Build/source/libs/poppler/poppler-src/poppler/UnicodeDecompTables.h b/Build/source/libs/poppler/poppler-src/poppler/UnicodeDecompTables.h deleted file mode 100644 index 4bc34b18d99..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/UnicodeDecompTables.h +++ /dev/null @@ -1,8526 +0,0 @@ -// Generated by gen-unicode-tables.py - -typedef struct { - Unicode character; - int length; - int offset; -} decomposition; - -#define DECOMP_TABLE_LENGTH 5143 - -static const decomposition decomp_table[] = { - { 0xa0, 1, 0 }, - { 0xa8, 2, 1 }, - { 0xaa, 1, 3 }, - { 0xaf, 2, 4 }, - { 0xb2, 1, 6 }, - { 0xb3, 1, 7 }, - { 0xb4, 2, 8 }, - { 0xb5, 1, 10 }, - { 0xb8, 2, 11 }, - { 0xb9, 1, 13 }, - { 0xba, 1, 14 }, - { 0xbc, 3, 15 }, - { 0xbd, 3, 18 }, - { 0xbe, 3, 21 }, - { 0xc0, 2, 24 }, - { 0xc1, 2, 26 }, - { 0xc2, 2, 28 }, - { 0xc3, 2, 30 }, - { 0xc4, 2, 32 }, - { 0xc5, 2, 34 }, - { 0xc7, 2, 36 }, - { 0xc8, 2, 38 }, - { 0xc9, 2, 40 }, - { 0xca, 2, 42 }, - { 0xcb, 2, 44 }, - { 0xcc, 2, 46 }, - { 0xcd, 2, 48 }, - { 0xce, 2, 50 }, - { 0xcf, 2, 52 }, - { 0xd1, 2, 54 }, - { 0xd2, 2, 56 }, - { 0xd3, 2, 58 }, - { 0xd4, 2, 60 }, - { 0xd5, 2, 62 }, - { 0xd6, 2, 64 }, - { 0xd9, 2, 66 }, - { 0xda, 2, 68 }, - { 0xdb, 2, 70 }, - { 0xdc, 2, 72 }, - { 0xdd, 2, 74 }, - { 0xe0, 2, 76 }, - { 0xe1, 2, 78 }, - { 0xe2, 2, 80 }, - { 0xe3, 2, 82 }, - { 0xe4, 2, 84 }, - { 0xe5, 2, 86 }, - { 0xe7, 2, 88 }, - { 0xe8, 2, 90 }, - { 0xe9, 2, 92 }, - { 0xea, 2, 94 }, - { 0xeb, 2, 96 }, - { 0xec, 2, 98 }, - { 0xed, 2, 100 }, - { 0xee, 2, 102 }, - { 0xef, 2, 104 }, - { 0xf1, 2, 106 }, - { 0xf2, 2, 108 }, - { 0xf3, 2, 110 }, - { 0xf4, 2, 112 }, - { 0xf5, 2, 114 }, - { 0xf6, 2, 116 }, - { 0xf9, 2, 118 }, - { 0xfa, 2, 120 }, - { 0xfb, 2, 122 }, - { 0xfc, 2, 124 }, - { 0xfd, 2, 126 }, - { 0xff, 2, 128 }, - { 0x100, 2, 130 }, - { 0x101, 2, 132 }, - { 0x102, 2, 134 }, - { 0x103, 2, 136 }, - { 0x104, 2, 138 }, - { 0x105, 2, 140 }, - { 0x106, 2, 142 }, - { 0x107, 2, 144 }, - { 0x108, 2, 146 }, - { 0x109, 2, 148 }, - { 0x10a, 2, 150 }, - { 0x10b, 2, 152 }, - { 0x10c, 2, 154 }, - { 0x10d, 2, 156 }, - { 0x10e, 2, 158 }, - { 0x10f, 2, 160 }, - { 0x112, 2, 162 }, - { 0x113, 2, 164 }, - { 0x114, 2, 166 }, - { 0x115, 2, 168 }, - { 0x116, 2, 170 }, - { 0x117, 2, 172 }, - { 0x118, 2, 174 }, - { 0x119, 2, 176 }, - { 0x11a, 2, 178 }, - { 0x11b, 2, 180 }, - { 0x11c, 2, 182 }, - { 0x11d, 2, 184 }, - { 0x11e, 2, 186 }, - { 0x11f, 2, 188 }, - { 0x120, 2, 190 }, - { 0x121, 2, 192 }, - { 0x122, 2, 194 }, - { 0x123, 2, 196 }, - { 0x124, 2, 198 }, - { 0x125, 2, 200 }, - { 0x128, 2, 202 }, - { 0x129, 2, 204 }, - { 0x12a, 2, 206 }, - { 0x12b, 2, 208 }, - { 0x12c, 2, 210 }, - { 0x12d, 2, 212 }, - { 0x12e, 2, 214 }, - { 0x12f, 2, 216 }, - { 0x130, 2, 218 }, - { 0x132, 2, 220 }, - { 0x133, 2, 222 }, - { 0x134, 2, 224 }, - { 0x135, 2, 226 }, - { 0x136, 2, 228 }, - { 0x137, 2, 230 }, - { 0x139, 2, 232 }, - { 0x13a, 2, 234 }, - { 0x13b, 2, 236 }, - { 0x13c, 2, 238 }, - { 0x13d, 2, 240 }, - { 0x13e, 2, 242 }, - { 0x13f, 2, 244 }, - { 0x140, 2, 246 }, - { 0x143, 2, 248 }, - { 0x144, 2, 250 }, - { 0x145, 2, 252 }, - { 0x146, 2, 254 }, - { 0x147, 2, 256 }, - { 0x148, 2, 258 }, - { 0x149, 2, 260 }, - { 0x14c, 2, 262 }, - { 0x14d, 2, 264 }, - { 0x14e, 2, 266 }, - { 0x14f, 2, 268 }, - { 0x150, 2, 270 }, - { 0x151, 2, 272 }, - { 0x154, 2, 274 }, - { 0x155, 2, 276 }, - { 0x156, 2, 278 }, - { 0x157, 2, 280 }, - { 0x158, 2, 282 }, - { 0x159, 2, 284 }, - { 0x15a, 2, 286 }, - { 0x15b, 2, 288 }, - { 0x15c, 2, 290 }, - { 0x15d, 2, 292 }, - { 0x15e, 2, 294 }, - { 0x15f, 2, 296 }, - { 0x160, 2, 298 }, - { 0x161, 2, 300 }, - { 0x162, 2, 302 }, - { 0x163, 2, 304 }, - { 0x164, 2, 306 }, - { 0x165, 2, 308 }, - { 0x168, 2, 310 }, - { 0x169, 2, 312 }, - { 0x16a, 2, 314 }, - { 0x16b, 2, 316 }, - { 0x16c, 2, 318 }, - { 0x16d, 2, 320 }, - { 0x16e, 2, 322 }, - { 0x16f, 2, 324 }, - { 0x170, 2, 326 }, - { 0x171, 2, 328 }, - { 0x172, 2, 330 }, - { 0x173, 2, 332 }, - { 0x174, 2, 334 }, - { 0x175, 2, 336 }, - { 0x176, 2, 338 }, - { 0x177, 2, 340 }, - { 0x178, 2, 342 }, - { 0x179, 2, 344 }, - { 0x17a, 2, 346 }, - { 0x17b, 2, 348 }, - { 0x17c, 2, 350 }, - { 0x17d, 2, 352 }, - { 0x17e, 2, 354 }, - { 0x17f, 1, 356 }, - { 0x1a0, 2, 357 }, - { 0x1a1, 2, 359 }, - { 0x1af, 2, 361 }, - { 0x1b0, 2, 363 }, - { 0x1c4, 3, 365 }, - { 0x1c5, 3, 368 }, - { 0x1c6, 3, 371 }, - { 0x1c7, 2, 374 }, - { 0x1c8, 2, 376 }, - { 0x1c9, 2, 378 }, - { 0x1ca, 2, 380 }, - { 0x1cb, 2, 382 }, - { 0x1cc, 2, 384 }, - { 0x1cd, 2, 386 }, - { 0x1ce, 2, 388 }, - { 0x1cf, 2, 390 }, - { 0x1d0, 2, 392 }, - { 0x1d1, 2, 394 }, - { 0x1d2, 2, 396 }, - { 0x1d3, 2, 398 }, - { 0x1d4, 2, 400 }, - { 0x1d5, 3, 402 }, - { 0x1d6, 3, 405 }, - { 0x1d7, 3, 408 }, - { 0x1d8, 3, 411 }, - { 0x1d9, 3, 414 }, - { 0x1da, 3, 417 }, - { 0x1db, 3, 420 }, - { 0x1dc, 3, 423 }, - { 0x1de, 3, 426 }, - { 0x1df, 3, 429 }, - { 0x1e0, 3, 432 }, - { 0x1e1, 3, 435 }, - { 0x1e2, 2, 438 }, - { 0x1e3, 2, 440 }, - { 0x1e6, 2, 442 }, - { 0x1e7, 2, 444 }, - { 0x1e8, 2, 446 }, - { 0x1e9, 2, 448 }, - { 0x1ea, 2, 450 }, - { 0x1eb, 2, 452 }, - { 0x1ec, 3, 454 }, - { 0x1ed, 3, 457 }, - { 0x1ee, 2, 460 }, - { 0x1ef, 2, 462 }, - { 0x1f0, 2, 464 }, - { 0x1f1, 2, 466 }, - { 0x1f2, 2, 468 }, - { 0x1f3, 2, 470 }, - { 0x1f4, 2, 472 }, - { 0x1f5, 2, 474 }, - { 0x1f8, 2, 476 }, - { 0x1f9, 2, 478 }, - { 0x1fa, 3, 480 }, - { 0x1fb, 3, 483 }, - { 0x1fc, 2, 486 }, - { 0x1fd, 2, 488 }, - { 0x1fe, 2, 490 }, - { 0x1ff, 2, 492 }, - { 0x200, 2, 494 }, - { 0x201, 2, 496 }, - { 0x202, 2, 498 }, - { 0x203, 2, 500 }, - { 0x204, 2, 502 }, - { 0x205, 2, 504 }, - { 0x206, 2, 506 }, - { 0x207, 2, 508 }, - { 0x208, 2, 510 }, - { 0x209, 2, 512 }, - { 0x20a, 2, 514 }, - { 0x20b, 2, 516 }, - { 0x20c, 2, 518 }, - { 0x20d, 2, 520 }, - { 0x20e, 2, 522 }, - { 0x20f, 2, 524 }, - { 0x210, 2, 526 }, - { 0x211, 2, 528 }, - { 0x212, 2, 530 }, - { 0x213, 2, 532 }, - { 0x214, 2, 534 }, - { 0x215, 2, 536 }, - { 0x216, 2, 538 }, - { 0x217, 2, 540 }, - { 0x218, 2, 542 }, - { 0x219, 2, 544 }, - { 0x21a, 2, 546 }, - { 0x21b, 2, 548 }, - { 0x21e, 2, 550 }, - { 0x21f, 2, 552 }, - { 0x226, 2, 554 }, - { 0x227, 2, 556 }, - { 0x228, 2, 558 }, - { 0x229, 2, 560 }, - { 0x22a, 3, 562 }, - { 0x22b, 3, 565 }, - { 0x22c, 3, 568 }, - { 0x22d, 3, 571 }, - { 0x22e, 2, 574 }, - { 0x22f, 2, 576 }, - { 0x230, 3, 578 }, - { 0x231, 3, 581 }, - { 0x232, 2, 584 }, - { 0x233, 2, 586 }, - { 0x2b0, 1, 588 }, - { 0x2b1, 1, 589 }, - { 0x2b2, 1, 590 }, - { 0x2b3, 1, 591 }, - { 0x2b4, 1, 592 }, - { 0x2b5, 1, 593 }, - { 0x2b6, 1, 594 }, - { 0x2b7, 1, 595 }, - { 0x2b8, 1, 596 }, - { 0x2d8, 2, 597 }, - { 0x2d9, 2, 599 }, - { 0x2da, 2, 601 }, - { 0x2db, 2, 603 }, - { 0x2dc, 2, 605 }, - { 0x2dd, 2, 607 }, - { 0x2e0, 1, 609 }, - { 0x2e1, 1, 610 }, - { 0x2e2, 1, 356 }, - { 0x2e3, 1, 611 }, - { 0x2e4, 1, 612 }, - { 0x340, 1, 613 }, - { 0x341, 1, 614 }, - { 0x343, 1, 615 }, - { 0x344, 2, 616 }, - { 0x374, 1, 618 }, - { 0x37a, 2, 619 }, - { 0x37e, 1, 621 }, - { 0x384, 2, 8 }, - { 0x385, 3, 622 }, - { 0x386, 2, 625 }, - { 0x387, 1, 627 }, - { 0x388, 2, 628 }, - { 0x389, 2, 630 }, - { 0x38a, 2, 632 }, - { 0x38c, 2, 634 }, - { 0x38e, 2, 636 }, - { 0x38f, 2, 638 }, - { 0x390, 3, 640 }, - { 0x3aa, 2, 643 }, - { 0x3ab, 2, 645 }, - { 0x3ac, 2, 647 }, - { 0x3ad, 2, 649 }, - { 0x3ae, 2, 651 }, - { 0x3af, 2, 653 }, - { 0x3b0, 3, 655 }, - { 0x3ca, 2, 658 }, - { 0x3cb, 2, 660 }, - { 0x3cc, 2, 662 }, - { 0x3cd, 2, 664 }, - { 0x3ce, 2, 666 }, - { 0x3d0, 1, 668 }, - { 0x3d1, 1, 669 }, - { 0x3d2, 1, 670 }, - { 0x3d3, 2, 636 }, - { 0x3d4, 2, 645 }, - { 0x3d5, 1, 671 }, - { 0x3d6, 1, 672 }, - { 0x3f0, 1, 673 }, - { 0x3f1, 1, 674 }, - { 0x3f2, 1, 675 }, - { 0x3f4, 1, 676 }, - { 0x3f5, 1, 677 }, - { 0x400, 2, 678 }, - { 0x401, 2, 680 }, - { 0x403, 2, 682 }, - { 0x407, 2, 684 }, - { 0x40c, 2, 686 }, - { 0x40d, 2, 688 }, - { 0x40e, 2, 690 }, - { 0x419, 2, 692 }, - { 0x439, 2, 694 }, - { 0x450, 2, 696 }, - { 0x451, 2, 698 }, - { 0x453, 2, 700 }, - { 0x457, 2, 702 }, - { 0x45c, 2, 704 }, - { 0x45d, 2, 706 }, - { 0x45e, 2, 708 }, - { 0x476, 2, 710 }, - { 0x477, 2, 712 }, - { 0x4c1, 2, 714 }, - { 0x4c2, 2, 716 }, - { 0x4d0, 2, 718 }, - { 0x4d1, 2, 720 }, - { 0x4d2, 2, 722 }, - { 0x4d3, 2, 724 }, - { 0x4d6, 2, 726 }, - { 0x4d7, 2, 728 }, - { 0x4da, 2, 730 }, - { 0x4db, 2, 732 }, - { 0x4dc, 2, 734 }, - { 0x4dd, 2, 736 }, - { 0x4de, 2, 738 }, - { 0x4df, 2, 740 }, - { 0x4e2, 2, 742 }, - { 0x4e3, 2, 744 }, - { 0x4e4, 2, 746 }, - { 0x4e5, 2, 748 }, - { 0x4e6, 2, 750 }, - { 0x4e7, 2, 752 }, - { 0x4ea, 2, 754 }, - { 0x4eb, 2, 756 }, - { 0x4ec, 2, 758 }, - { 0x4ed, 2, 760 }, - { 0x4ee, 2, 762 }, - { 0x4ef, 2, 764 }, - { 0x4f0, 2, 766 }, - { 0x4f1, 2, 768 }, - { 0x4f2, 2, 770 }, - { 0x4f3, 2, 772 }, - { 0x4f4, 2, 774 }, - { 0x4f5, 2, 776 }, - { 0x4f8, 2, 778 }, - { 0x4f9, 2, 780 }, - { 0x587, 2, 782 }, - { 0x622, 2, 784 }, - { 0x623, 2, 786 }, - { 0x624, 2, 788 }, - { 0x625, 2, 790 }, - { 0x626, 2, 792 }, - { 0x675, 2, 794 }, - { 0x676, 2, 796 }, - { 0x677, 2, 798 }, - { 0x678, 2, 800 }, - { 0x6c0, 2, 802 }, - { 0x6c2, 2, 804 }, - { 0x6d3, 2, 806 }, - { 0x929, 2, 808 }, - { 0x931, 2, 810 }, - { 0x934, 2, 812 }, - { 0x958, 2, 814 }, - { 0x959, 2, 816 }, - { 0x95a, 2, 818 }, - { 0x95b, 2, 820 }, - { 0x95c, 2, 822 }, - { 0x95d, 2, 824 }, - { 0x95e, 2, 826 }, - { 0x95f, 2, 828 }, - { 0x9cb, 2, 830 }, - { 0x9cc, 2, 832 }, - { 0x9dc, 2, 834 }, - { 0x9dd, 2, 836 }, - { 0x9df, 2, 838 }, - { 0xa33, 2, 840 }, - { 0xa36, 2, 842 }, - { 0xa59, 2, 844 }, - { 0xa5a, 2, 846 }, - { 0xa5b, 2, 848 }, - { 0xa5e, 2, 850 }, - { 0xb48, 2, 852 }, - { 0xb4b, 2, 854 }, - { 0xb4c, 2, 856 }, - { 0xb5c, 2, 858 }, - { 0xb5d, 2, 860 }, - { 0xb94, 2, 862 }, - { 0xbca, 2, 864 }, - { 0xbcb, 2, 866 }, - { 0xbcc, 2, 868 }, - { 0xc48, 2, 870 }, - { 0xcc0, 2, 872 }, - { 0xcc7, 2, 874 }, - { 0xcc8, 2, 876 }, - { 0xcca, 2, 878 }, - { 0xccb, 3, 880 }, - { 0xd4a, 2, 883 }, - { 0xd4b, 2, 885 }, - { 0xd4c, 2, 887 }, - { 0xdda, 2, 889 }, - { 0xddc, 2, 891 }, - { 0xddd, 3, 893 }, - { 0xdde, 2, 896 }, - { 0xe33, 2, 898 }, - { 0xeb3, 2, 900 }, - { 0xedc, 2, 902 }, - { 0xedd, 2, 904 }, - { 0xf0c, 1, 906 }, - { 0xf43, 2, 907 }, - { 0xf4d, 2, 909 }, - { 0xf52, 2, 911 }, - { 0xf57, 2, 913 }, - { 0xf5c, 2, 915 }, - { 0xf69, 2, 917 }, - { 0xf73, 2, 919 }, - { 0xf75, 2, 921 }, - { 0xf76, 2, 923 }, - { 0xf77, 3, 925 }, - { 0xf78, 2, 928 }, - { 0xf79, 3, 930 }, - { 0xf81, 2, 933 }, - { 0xf93, 2, 935 }, - { 0xf9d, 2, 937 }, - { 0xfa2, 2, 939 }, - { 0xfa7, 2, 941 }, - { 0xfac, 2, 943 }, - { 0xfb9, 2, 945 }, - { 0x1026, 2, 947 }, - { 0x1e00, 2, 949 }, - { 0x1e01, 2, 951 }, - { 0x1e02, 2, 953 }, - { 0x1e03, 2, 955 }, - { 0x1e04, 2, 957 }, - { 0x1e05, 2, 959 }, - { 0x1e06, 2, 961 }, - { 0x1e07, 2, 963 }, - { 0x1e08, 3, 965 }, - { 0x1e09, 3, 968 }, - { 0x1e0a, 2, 971 }, - { 0x1e0b, 2, 973 }, - { 0x1e0c, 2, 975 }, - { 0x1e0d, 2, 977 }, - { 0x1e0e, 2, 979 }, - { 0x1e0f, 2, 981 }, - { 0x1e10, 2, 983 }, - { 0x1e11, 2, 985 }, - { 0x1e12, 2, 987 }, - { 0x1e13, 2, 989 }, - { 0x1e14, 3, 991 }, - { 0x1e15, 3, 994 }, - { 0x1e16, 3, 997 }, - { 0x1e17, 3, 1000 }, - { 0x1e18, 2, 1003 }, - { 0x1e19, 2, 1005 }, - { 0x1e1a, 2, 1007 }, - { 0x1e1b, 2, 1009 }, - { 0x1e1c, 3, 1011 }, - { 0x1e1d, 3, 1014 }, - { 0x1e1e, 2, 1017 }, - { 0x1e1f, 2, 1019 }, - { 0x1e20, 2, 1021 }, - { 0x1e21, 2, 1023 }, - { 0x1e22, 2, 1025 }, - { 0x1e23, 2, 1027 }, - { 0x1e24, 2, 1029 }, - { 0x1e25, 2, 1031 }, - { 0x1e26, 2, 1033 }, - { 0x1e27, 2, 1035 }, - { 0x1e28, 2, 1037 }, - { 0x1e29, 2, 1039 }, - { 0x1e2a, 2, 1041 }, - { 0x1e2b, 2, 1043 }, - { 0x1e2c, 2, 1045 }, - { 0x1e2d, 2, 1047 }, - { 0x1e2e, 3, 1049 }, - { 0x1e2f, 3, 1052 }, - { 0x1e30, 2, 1055 }, - { 0x1e31, 2, 1057 }, - { 0x1e32, 2, 1059 }, - { 0x1e33, 2, 1061 }, - { 0x1e34, 2, 1063 }, - { 0x1e35, 2, 1065 }, - { 0x1e36, 2, 1067 }, - { 0x1e37, 2, 1069 }, - { 0x1e38, 3, 1071 }, - { 0x1e39, 3, 1074 }, - { 0x1e3a, 2, 1077 }, - { 0x1e3b, 2, 1079 }, - { 0x1e3c, 2, 1081 }, - { 0x1e3d, 2, 1083 }, - { 0x1e3e, 2, 1085 }, - { 0x1e3f, 2, 1087 }, - { 0x1e40, 2, 1089 }, - { 0x1e41, 2, 1091 }, - { 0x1e42, 2, 1093 }, - { 0x1e43, 2, 1095 }, - { 0x1e44, 2, 1097 }, - { 0x1e45, 2, 1099 }, - { 0x1e46, 2, 1101 }, - { 0x1e47, 2, 1103 }, - { 0x1e48, 2, 1105 }, - { 0x1e49, 2, 1107 }, - { 0x1e4a, 2, 1109 }, - { 0x1e4b, 2, 1111 }, - { 0x1e4c, 3, 1113 }, - { 0x1e4d, 3, 1116 }, - { 0x1e4e, 3, 1119 }, - { 0x1e4f, 3, 1122 }, - { 0x1e50, 3, 1125 }, - { 0x1e51, 3, 1128 }, - { 0x1e52, 3, 1131 }, - { 0x1e53, 3, 1134 }, - { 0x1e54, 2, 1137 }, - { 0x1e55, 2, 1139 }, - { 0x1e56, 2, 1141 }, - { 0x1e57, 2, 1143 }, - { 0x1e58, 2, 1145 }, - { 0x1e59, 2, 1147 }, - { 0x1e5a, 2, 1149 }, - { 0x1e5b, 2, 1151 }, - { 0x1e5c, 3, 1153 }, - { 0x1e5d, 3, 1156 }, - { 0x1e5e, 2, 1159 }, - { 0x1e5f, 2, 1161 }, - { 0x1e60, 2, 1163 }, - { 0x1e61, 2, 1165 }, - { 0x1e62, 2, 1167 }, - { 0x1e63, 2, 1169 }, - { 0x1e64, 3, 1171 }, - { 0x1e65, 3, 1174 }, - { 0x1e66, 3, 1177 }, - { 0x1e67, 3, 1180 }, - { 0x1e68, 3, 1183 }, - { 0x1e69, 3, 1186 }, - { 0x1e6a, 2, 1189 }, - { 0x1e6b, 2, 1191 }, - { 0x1e6c, 2, 1193 }, - { 0x1e6d, 2, 1195 }, - { 0x1e6e, 2, 1197 }, - { 0x1e6f, 2, 1199 }, - { 0x1e70, 2, 1201 }, - { 0x1e71, 2, 1203 }, - { 0x1e72, 2, 1205 }, - { 0x1e73, 2, 1207 }, - { 0x1e74, 2, 1209 }, - { 0x1e75, 2, 1211 }, - { 0x1e76, 2, 1213 }, - { 0x1e77, 2, 1215 }, - { 0x1e78, 3, 1217 }, - { 0x1e79, 3, 1220 }, - { 0x1e7a, 3, 1223 }, - { 0x1e7b, 3, 1226 }, - { 0x1e7c, 2, 1229 }, - { 0x1e7d, 2, 1231 }, - { 0x1e7e, 2, 1233 }, - { 0x1e7f, 2, 1235 }, - { 0x1e80, 2, 1237 }, - { 0x1e81, 2, 1239 }, - { 0x1e82, 2, 1241 }, - { 0x1e83, 2, 1243 }, - { 0x1e84, 2, 1245 }, - { 0x1e85, 2, 1247 }, - { 0x1e86, 2, 1249 }, - { 0x1e87, 2, 1251 }, - { 0x1e88, 2, 1253 }, - { 0x1e89, 2, 1255 }, - { 0x1e8a, 2, 1257 }, - { 0x1e8b, 2, 1259 }, - { 0x1e8c, 2, 1261 }, - { 0x1e8d, 2, 1263 }, - { 0x1e8e, 2, 1265 }, - { 0x1e8f, 2, 1267 }, - { 0x1e90, 2, 1269 }, - { 0x1e91, 2, 1271 }, - { 0x1e92, 2, 1273 }, - { 0x1e93, 2, 1275 }, - { 0x1e94, 2, 1277 }, - { 0x1e95, 2, 1279 }, - { 0x1e96, 2, 1281 }, - { 0x1e97, 2, 1283 }, - { 0x1e98, 2, 1285 }, - { 0x1e99, 2, 1287 }, - { 0x1e9a, 2, 1289 }, - { 0x1e9b, 2, 1165 }, - { 0x1ea0, 2, 1291 }, - { 0x1ea1, 2, 1293 }, - { 0x1ea2, 2, 1295 }, - { 0x1ea3, 2, 1297 }, - { 0x1ea4, 3, 1299 }, - { 0x1ea5, 3, 1302 }, - { 0x1ea6, 3, 1305 }, - { 0x1ea7, 3, 1308 }, - { 0x1ea8, 3, 1311 }, - { 0x1ea9, 3, 1314 }, - { 0x1eaa, 3, 1317 }, - { 0x1eab, 3, 1320 }, - { 0x1eac, 3, 1323 }, - { 0x1ead, 3, 1326 }, - { 0x1eae, 3, 1329 }, - { 0x1eaf, 3, 1332 }, - { 0x1eb0, 3, 1335 }, - { 0x1eb1, 3, 1338 }, - { 0x1eb2, 3, 1341 }, - { 0x1eb3, 3, 1344 }, - { 0x1eb4, 3, 1347 }, - { 0x1eb5, 3, 1350 }, - { 0x1eb6, 3, 1353 }, - { 0x1eb7, 3, 1356 }, - { 0x1eb8, 2, 1359 }, - { 0x1eb9, 2, 1361 }, - { 0x1eba, 2, 1363 }, - { 0x1ebb, 2, 1365 }, - { 0x1ebc, 2, 1367 }, - { 0x1ebd, 2, 1369 }, - { 0x1ebe, 3, 1371 }, - { 0x1ebf, 3, 1374 }, - { 0x1ec0, 3, 1377 }, - { 0x1ec1, 3, 1380 }, - { 0x1ec2, 3, 1383 }, - { 0x1ec3, 3, 1386 }, - { 0x1ec4, 3, 1389 }, - { 0x1ec5, 3, 1392 }, - { 0x1ec6, 3, 1395 }, - { 0x1ec7, 3, 1398 }, - { 0x1ec8, 2, 1401 }, - { 0x1ec9, 2, 1403 }, - { 0x1eca, 2, 1405 }, - { 0x1ecb, 2, 1407 }, - { 0x1ecc, 2, 1409 }, - { 0x1ecd, 2, 1411 }, - { 0x1ece, 2, 1413 }, - { 0x1ecf, 2, 1415 }, - { 0x1ed0, 3, 1417 }, - { 0x1ed1, 3, 1420 }, - { 0x1ed2, 3, 1423 }, - { 0x1ed3, 3, 1426 }, - { 0x1ed4, 3, 1429 }, - { 0x1ed5, 3, 1432 }, - { 0x1ed6, 3, 1435 }, - { 0x1ed7, 3, 1438 }, - { 0x1ed8, 3, 1441 }, - { 0x1ed9, 3, 1444 }, - { 0x1eda, 3, 1447 }, - { 0x1edb, 3, 1450 }, - { 0x1edc, 3, 1453 }, - { 0x1edd, 3, 1456 }, - { 0x1ede, 3, 1459 }, - { 0x1edf, 3, 1462 }, - { 0x1ee0, 3, 1465 }, - { 0x1ee1, 3, 1468 }, - { 0x1ee2, 3, 1471 }, - { 0x1ee3, 3, 1474 }, - { 0x1ee4, 2, 1477 }, - { 0x1ee5, 2, 1479 }, - { 0x1ee6, 2, 1481 }, - { 0x1ee7, 2, 1483 }, - { 0x1ee8, 3, 1485 }, - { 0x1ee9, 3, 1488 }, - { 0x1eea, 3, 1491 }, - { 0x1eeb, 3, 1494 }, - { 0x1eec, 3, 1497 }, - { 0x1eed, 3, 1500 }, - { 0x1eee, 3, 1503 }, - { 0x1eef, 3, 1506 }, - { 0x1ef0, 3, 1509 }, - { 0x1ef1, 3, 1512 }, - { 0x1ef2, 2, 1515 }, - { 0x1ef3, 2, 1517 }, - { 0x1ef4, 2, 1519 }, - { 0x1ef5, 2, 1521 }, - { 0x1ef6, 2, 1523 }, - { 0x1ef7, 2, 1525 }, - { 0x1ef8, 2, 1527 }, - { 0x1ef9, 2, 1529 }, - { 0x1f00, 2, 1531 }, - { 0x1f01, 2, 1533 }, - { 0x1f02, 3, 1535 }, - { 0x1f03, 3, 1538 }, - { 0x1f04, 3, 1541 }, - { 0x1f05, 3, 1544 }, - { 0x1f06, 3, 1547 }, - { 0x1f07, 3, 1550 }, - { 0x1f08, 2, 1553 }, - { 0x1f09, 2, 1555 }, - { 0x1f0a, 3, 1557 }, - { 0x1f0b, 3, 1560 }, - { 0x1f0c, 3, 1563 }, - { 0x1f0d, 3, 1566 }, - { 0x1f0e, 3, 1569 }, - { 0x1f0f, 3, 1572 }, - { 0x1f10, 2, 1575 }, - { 0x1f11, 2, 1577 }, - { 0x1f12, 3, 1579 }, - { 0x1f13, 3, 1582 }, - { 0x1f14, 3, 1585 }, - { 0x1f15, 3, 1588 }, - { 0x1f18, 2, 1591 }, - { 0x1f19, 2, 1593 }, - { 0x1f1a, 3, 1595 }, - { 0x1f1b, 3, 1598 }, - { 0x1f1c, 3, 1601 }, - { 0x1f1d, 3, 1604 }, - { 0x1f20, 2, 1607 }, - { 0x1f21, 2, 1609 }, - { 0x1f22, 3, 1611 }, - { 0x1f23, 3, 1614 }, - { 0x1f24, 3, 1617 }, - { 0x1f25, 3, 1620 }, - { 0x1f26, 3, 1623 }, - { 0x1f27, 3, 1626 }, - { 0x1f28, 2, 1629 }, - { 0x1f29, 2, 1631 }, - { 0x1f2a, 3, 1633 }, - { 0x1f2b, 3, 1636 }, - { 0x1f2c, 3, 1639 }, - { 0x1f2d, 3, 1642 }, - { 0x1f2e, 3, 1645 }, - { 0x1f2f, 3, 1648 }, - { 0x1f30, 2, 1651 }, - { 0x1f31, 2, 1653 }, - { 0x1f32, 3, 1655 }, - { 0x1f33, 3, 1658 }, - { 0x1f34, 3, 1661 }, - { 0x1f35, 3, 1664 }, - { 0x1f36, 3, 1667 }, - { 0x1f37, 3, 1670 }, - { 0x1f38, 2, 1673 }, - { 0x1f39, 2, 1675 }, - { 0x1f3a, 3, 1677 }, - { 0x1f3b, 3, 1680 }, - { 0x1f3c, 3, 1683 }, - { 0x1f3d, 3, 1686 }, - { 0x1f3e, 3, 1689 }, - { 0x1f3f, 3, 1692 }, - { 0x1f40, 2, 1695 }, - { 0x1f41, 2, 1697 }, - { 0x1f42, 3, 1699 }, - { 0x1f43, 3, 1702 }, - { 0x1f44, 3, 1705 }, - { 0x1f45, 3, 1708 }, - { 0x1f48, 2, 1711 }, - { 0x1f49, 2, 1713 }, - { 0x1f4a, 3, 1715 }, - { 0x1f4b, 3, 1718 }, - { 0x1f4c, 3, 1721 }, - { 0x1f4d, 3, 1724 }, - { 0x1f50, 2, 1727 }, - { 0x1f51, 2, 1729 }, - { 0x1f52, 3, 1731 }, - { 0x1f53, 3, 1734 }, - { 0x1f54, 3, 1737 }, - { 0x1f55, 3, 1740 }, - { 0x1f56, 3, 1743 }, - { 0x1f57, 3, 1746 }, - { 0x1f59, 2, 1749 }, - { 0x1f5b, 3, 1751 }, - { 0x1f5d, 3, 1754 }, - { 0x1f5f, 3, 1757 }, - { 0x1f60, 2, 1760 }, - { 0x1f61, 2, 1762 }, - { 0x1f62, 3, 1764 }, - { 0x1f63, 3, 1767 }, - { 0x1f64, 3, 1770 }, - { 0x1f65, 3, 1773 }, - { 0x1f66, 3, 1776 }, - { 0x1f67, 3, 1779 }, - { 0x1f68, 2, 1782 }, - { 0x1f69, 2, 1784 }, - { 0x1f6a, 3, 1786 }, - { 0x1f6b, 3, 1789 }, - { 0x1f6c, 3, 1792 }, - { 0x1f6d, 3, 1795 }, - { 0x1f6e, 3, 1798 }, - { 0x1f6f, 3, 1801 }, - { 0x1f70, 2, 1804 }, - { 0x1f71, 2, 647 }, - { 0x1f72, 2, 1806 }, - { 0x1f73, 2, 649 }, - { 0x1f74, 2, 1808 }, - { 0x1f75, 2, 651 }, - { 0x1f76, 2, 1810 }, - { 0x1f77, 2, 653 }, - { 0x1f78, 2, 1812 }, - { 0x1f79, 2, 662 }, - { 0x1f7a, 2, 1814 }, - { 0x1f7b, 2, 664 }, - { 0x1f7c, 2, 1816 }, - { 0x1f7d, 2, 666 }, - { 0x1f80, 3, 1818 }, - { 0x1f81, 3, 1821 }, - { 0x1f82, 4, 1824 }, - { 0x1f83, 4, 1828 }, - { 0x1f84, 4, 1832 }, - { 0x1f85, 4, 1836 }, - { 0x1f86, 4, 1840 }, - { 0x1f87, 4, 1844 }, - { 0x1f88, 3, 1848 }, - { 0x1f89, 3, 1851 }, - { 0x1f8a, 4, 1854 }, - { 0x1f8b, 4, 1858 }, - { 0x1f8c, 4, 1862 }, - { 0x1f8d, 4, 1866 }, - { 0x1f8e, 4, 1870 }, - { 0x1f8f, 4, 1874 }, - { 0x1f90, 3, 1878 }, - { 0x1f91, 3, 1881 }, - { 0x1f92, 4, 1884 }, - { 0x1f93, 4, 1888 }, - { 0x1f94, 4, 1892 }, - { 0x1f95, 4, 1896 }, - { 0x1f96, 4, 1900 }, - { 0x1f97, 4, 1904 }, - { 0x1f98, 3, 1908 }, - { 0x1f99, 3, 1911 }, - { 0x1f9a, 4, 1914 }, - { 0x1f9b, 4, 1918 }, - { 0x1f9c, 4, 1922 }, - { 0x1f9d, 4, 1926 }, - { 0x1f9e, 4, 1930 }, - { 0x1f9f, 4, 1934 }, - { 0x1fa0, 3, 1938 }, - { 0x1fa1, 3, 1941 }, - { 0x1fa2, 4, 1944 }, - { 0x1fa3, 4, 1948 }, - { 0x1fa4, 4, 1952 }, - { 0x1fa5, 4, 1956 }, - { 0x1fa6, 4, 1960 }, - { 0x1fa7, 4, 1964 }, - { 0x1fa8, 3, 1968 }, - { 0x1fa9, 3, 1971 }, - { 0x1faa, 4, 1974 }, - { 0x1fab, 4, 1978 }, - { 0x1fac, 4, 1982 }, - { 0x1fad, 4, 1986 }, - { 0x1fae, 4, 1990 }, - { 0x1faf, 4, 1994 }, - { 0x1fb0, 2, 1998 }, - { 0x1fb1, 2, 2000 }, - { 0x1fb2, 3, 2002 }, - { 0x1fb3, 2, 2005 }, - { 0x1fb4, 3, 2007 }, - { 0x1fb6, 2, 2010 }, - { 0x1fb7, 3, 2012 }, - { 0x1fb8, 2, 2015 }, - { 0x1fb9, 2, 2017 }, - { 0x1fba, 2, 2019 }, - { 0x1fbb, 2, 625 }, - { 0x1fbc, 2, 2021 }, - { 0x1fbd, 2, 2023 }, - { 0x1fbe, 1, 2025 }, - { 0x1fbf, 2, 2023 }, - { 0x1fc0, 2, 2026 }, - { 0x1fc1, 3, 2028 }, - { 0x1fc2, 3, 2031 }, - { 0x1fc3, 2, 2034 }, - { 0x1fc4, 3, 2036 }, - { 0x1fc6, 2, 2039 }, - { 0x1fc7, 3, 2041 }, - { 0x1fc8, 2, 2044 }, - { 0x1fc9, 2, 628 }, - { 0x1fca, 2, 2046 }, - { 0x1fcb, 2, 630 }, - { 0x1fcc, 2, 2048 }, - { 0x1fcd, 3, 2050 }, - { 0x1fce, 3, 2053 }, - { 0x1fcf, 3, 2056 }, - { 0x1fd0, 2, 2059 }, - { 0x1fd1, 2, 2061 }, - { 0x1fd2, 3, 2063 }, - { 0x1fd3, 3, 640 }, - { 0x1fd6, 2, 2066 }, - { 0x1fd7, 3, 2068 }, - { 0x1fd8, 2, 2071 }, - { 0x1fd9, 2, 2073 }, - { 0x1fda, 2, 2075 }, - { 0x1fdb, 2, 632 }, - { 0x1fdd, 3, 2077 }, - { 0x1fde, 3, 2080 }, - { 0x1fdf, 3, 2083 }, - { 0x1fe0, 2, 2086 }, - { 0x1fe1, 2, 2088 }, - { 0x1fe2, 3, 2090 }, - { 0x1fe3, 3, 655 }, - { 0x1fe4, 2, 2093 }, - { 0x1fe5, 2, 2095 }, - { 0x1fe6, 2, 2097 }, - { 0x1fe7, 3, 2099 }, - { 0x1fe8, 2, 2102 }, - { 0x1fe9, 2, 2104 }, - { 0x1fea, 2, 2106 }, - { 0x1feb, 2, 636 }, - { 0x1fec, 2, 2108 }, - { 0x1fed, 3, 2110 }, - { 0x1fee, 3, 622 }, - { 0x1fef, 1, 2113 }, - { 0x1ff2, 3, 2114 }, - { 0x1ff3, 2, 2117 }, - { 0x1ff4, 3, 2119 }, - { 0x1ff6, 2, 2122 }, - { 0x1ff7, 3, 2124 }, - { 0x1ff8, 2, 2127 }, - { 0x1ff9, 2, 634 }, - { 0x1ffa, 2, 2129 }, - { 0x1ffb, 2, 638 }, - { 0x1ffc, 2, 2131 }, - { 0x1ffd, 2, 8 }, - { 0x1ffe, 2, 2133 }, - { 0x2000, 1, 0 }, - { 0x2001, 1, 0 }, - { 0x2002, 1, 0 }, - { 0x2003, 1, 0 }, - { 0x2004, 1, 0 }, - { 0x2005, 1, 0 }, - { 0x2006, 1, 0 }, - { 0x2007, 1, 0 }, - { 0x2008, 1, 0 }, - { 0x2009, 1, 0 }, - { 0x200a, 1, 0 }, - { 0x2011, 1, 2135 }, - { 0x2017, 2, 2136 }, - { 0x2024, 1, 2138 }, - { 0x2025, 2, 2139 }, - { 0x2026, 3, 2141 }, - { 0x202f, 1, 0 }, - { 0x2033, 2, 2144 }, - { 0x2034, 3, 2146 }, - { 0x2036, 2, 2149 }, - { 0x2037, 3, 2151 }, - { 0x203c, 2, 2154 }, - { 0x203e, 2, 2156 }, - { 0x2047, 2, 2158 }, - { 0x2048, 2, 2160 }, - { 0x2049, 2, 2162 }, - { 0x2057, 4, 2164 }, - { 0x205f, 1, 0 }, - { 0x2070, 1, 2168 }, - { 0x2071, 1, 2169 }, - { 0x2074, 1, 2170 }, - { 0x2075, 1, 2171 }, - { 0x2076, 1, 2172 }, - { 0x2077, 1, 2173 }, - { 0x2078, 1, 2174 }, - { 0x2079, 1, 2175 }, - { 0x207a, 1, 2176 }, - { 0x207b, 1, 2177 }, - { 0x207c, 1, 2178 }, - { 0x207d, 1, 2179 }, - { 0x207e, 1, 2180 }, - { 0x207f, 1, 2181 }, - { 0x2080, 1, 2168 }, - { 0x2081, 1, 13 }, - { 0x2082, 1, 6 }, - { 0x2083, 1, 7 }, - { 0x2084, 1, 2170 }, - { 0x2085, 1, 2171 }, - { 0x2086, 1, 2172 }, - { 0x2087, 1, 2173 }, - { 0x2088, 1, 2174 }, - { 0x2089, 1, 2175 }, - { 0x208a, 1, 2176 }, - { 0x208b, 1, 2177 }, - { 0x208c, 1, 2178 }, - { 0x208d, 1, 2179 }, - { 0x208e, 1, 2180 }, - { 0x20a8, 2, 2182 }, - { 0x2100, 3, 2184 }, - { 0x2101, 3, 2187 }, - { 0x2102, 1, 2190 }, - { 0x2103, 2, 2191 }, - { 0x2105, 3, 2193 }, - { 0x2106, 3, 2196 }, - { 0x2107, 1, 2199 }, - { 0x2109, 2, 2200 }, - { 0x210a, 1, 2202 }, - { 0x210b, 1, 2203 }, - { 0x210c, 1, 2203 }, - { 0x210d, 1, 2203 }, - { 0x210e, 1, 588 }, - { 0x210f, 1, 2204 }, - { 0x2110, 1, 2205 }, - { 0x2111, 1, 2205 }, - { 0x2112, 1, 2206 }, - { 0x2113, 1, 610 }, - { 0x2115, 1, 2207 }, - { 0x2116, 2, 2208 }, - { 0x2119, 1, 2210 }, - { 0x211a, 1, 2211 }, - { 0x211b, 1, 2212 }, - { 0x211c, 1, 2212 }, - { 0x211d, 1, 2212 }, - { 0x2120, 2, 2213 }, - { 0x2121, 3, 2215 }, - { 0x2122, 2, 2218 }, - { 0x2124, 1, 2220 }, - { 0x2126, 1, 2221 }, - { 0x2128, 1, 2220 }, - { 0x212a, 1, 2222 }, - { 0x212b, 2, 34 }, - { 0x212c, 1, 2223 }, - { 0x212d, 1, 2190 }, - { 0x212f, 1, 2224 }, - { 0x2130, 1, 2225 }, - { 0x2131, 1, 2226 }, - { 0x2133, 1, 2227 }, - { 0x2134, 1, 14 }, - { 0x2135, 1, 2228 }, - { 0x2136, 1, 2229 }, - { 0x2137, 1, 2230 }, - { 0x2138, 1, 2231 }, - { 0x2139, 1, 2169 }, - { 0x213d, 1, 2232 }, - { 0x213e, 1, 2233 }, - { 0x213f, 1, 2234 }, - { 0x2140, 1, 2235 }, - { 0x2145, 1, 2236 }, - { 0x2146, 1, 2237 }, - { 0x2147, 1, 2224 }, - { 0x2148, 1, 2169 }, - { 0x2149, 1, 590 }, - { 0x2153, 3, 2238 }, - { 0x2154, 3, 2241 }, - { 0x2155, 3, 2244 }, - { 0x2156, 3, 2247 }, - { 0x2157, 3, 2250 }, - { 0x2158, 3, 2253 }, - { 0x2159, 3, 2256 }, - { 0x215a, 3, 2259 }, - { 0x215b, 3, 2262 }, - { 0x215c, 3, 2265 }, - { 0x215d, 3, 2268 }, - { 0x215e, 3, 2271 }, - { 0x215f, 2, 2274 }, - { 0x2160, 1, 2205 }, - { 0x2161, 2, 2276 }, - { 0x2162, 3, 2278 }, - { 0x2163, 2, 2281 }, - { 0x2164, 1, 2283 }, - { 0x2165, 2, 2284 }, - { 0x2166, 3, 2286 }, - { 0x2167, 4, 2289 }, - { 0x2168, 2, 2293 }, - { 0x2169, 1, 2295 }, - { 0x216a, 2, 2296 }, - { 0x216b, 3, 2298 }, - { 0x216c, 1, 2206 }, - { 0x216d, 1, 2190 }, - { 0x216e, 1, 2236 }, - { 0x216f, 1, 2227 }, - { 0x2170, 1, 2169 }, - { 0x2171, 2, 2301 }, - { 0x2172, 3, 2303 }, - { 0x2173, 2, 2306 }, - { 0x2174, 1, 2308 }, - { 0x2175, 2, 2309 }, - { 0x2176, 3, 2311 }, - { 0x2177, 4, 2314 }, - { 0x2178, 2, 2318 }, - { 0x2179, 1, 611 }, - { 0x217a, 2, 2320 }, - { 0x217b, 3, 2322 }, - { 0x217c, 1, 610 }, - { 0x217d, 1, 2325 }, - { 0x217e, 1, 2237 }, - { 0x217f, 1, 2326 }, - { 0x219a, 2, 2327 }, - { 0x219b, 2, 2329 }, - { 0x21ae, 2, 2331 }, - { 0x21cd, 2, 2333 }, - { 0x21ce, 2, 2335 }, - { 0x21cf, 2, 2337 }, - { 0x2204, 2, 2339 }, - { 0x2209, 2, 2341 }, - { 0x220c, 2, 2343 }, - { 0x2224, 2, 2345 }, - { 0x2226, 2, 2347 }, - { 0x222c, 2, 2349 }, - { 0x222d, 3, 2351 }, - { 0x222f, 2, 2354 }, - { 0x2230, 3, 2356 }, - { 0x2241, 2, 2359 }, - { 0x2244, 2, 2361 }, - { 0x2247, 2, 2363 }, - { 0x2249, 2, 2365 }, - { 0x2260, 2, 2367 }, - { 0x2262, 2, 2369 }, - { 0x226d, 2, 2371 }, - { 0x226e, 2, 2373 }, - { 0x226f, 2, 2375 }, - { 0x2270, 2, 2377 }, - { 0x2271, 2, 2379 }, - { 0x2274, 2, 2381 }, - { 0x2275, 2, 2383 }, - { 0x2278, 2, 2385 }, - { 0x2279, 2, 2387 }, - { 0x2280, 2, 2389 }, - { 0x2281, 2, 2391 }, - { 0x2284, 2, 2393 }, - { 0x2285, 2, 2395 }, - { 0x2288, 2, 2397 }, - { 0x2289, 2, 2399 }, - { 0x22ac, 2, 2401 }, - { 0x22ad, 2, 2403 }, - { 0x22ae, 2, 2405 }, - { 0x22af, 2, 2407 }, - { 0x22e0, 2, 2409 }, - { 0x22e1, 2, 2411 }, - { 0x22e2, 2, 2413 }, - { 0x22e3, 2, 2415 }, - { 0x22ea, 2, 2417 }, - { 0x22eb, 2, 2419 }, - { 0x22ec, 2, 2421 }, - { 0x22ed, 2, 2423 }, - { 0x2329, 1, 2425 }, - { 0x232a, 1, 2426 }, - { 0x2460, 1, 13 }, - { 0x2461, 1, 6 }, - { 0x2462, 1, 7 }, - { 0x2463, 1, 2170 }, - { 0x2464, 1, 2171 }, - { 0x2465, 1, 2172 }, - { 0x2466, 1, 2173 }, - { 0x2467, 1, 2174 }, - { 0x2468, 1, 2175 }, - { 0x2469, 2, 2427 }, - { 0x246a, 2, 2429 }, - { 0x246b, 2, 2431 }, - { 0x246c, 2, 2433 }, - { 0x246d, 2, 2435 }, - { 0x246e, 2, 2437 }, - { 0x246f, 2, 2439 }, - { 0x2470, 2, 2441 }, - { 0x2471, 2, 2443 }, - { 0x2472, 2, 2445 }, - { 0x2473, 2, 2447 }, - { 0x2474, 3, 2449 }, - { 0x2475, 3, 2452 }, - { 0x2476, 3, 2455 }, - { 0x2477, 3, 2458 }, - { 0x2478, 3, 2461 }, - { 0x2479, 3, 2464 }, - { 0x247a, 3, 2467 }, - { 0x247b, 3, 2470 }, - { 0x247c, 3, 2473 }, - { 0x247d, 4, 2476 }, - { 0x247e, 4, 2480 }, - { 0x247f, 4, 2484 }, - { 0x2480, 4, 2488 }, - { 0x2481, 4, 2492 }, - { 0x2482, 4, 2496 }, - { 0x2483, 4, 2500 }, - { 0x2484, 4, 2504 }, - { 0x2485, 4, 2508 }, - { 0x2486, 4, 2512 }, - { 0x2487, 4, 2516 }, - { 0x2488, 2, 2520 }, - { 0x2489, 2, 2522 }, - { 0x248a, 2, 2524 }, - { 0x248b, 2, 2526 }, - { 0x248c, 2, 2528 }, - { 0x248d, 2, 2530 }, - { 0x248e, 2, 2532 }, - { 0x248f, 2, 2534 }, - { 0x2490, 2, 2536 }, - { 0x2491, 3, 2538 }, - { 0x2492, 3, 2541 }, - { 0x2493, 3, 2544 }, - { 0x2494, 3, 2547 }, - { 0x2495, 3, 2550 }, - { 0x2496, 3, 2553 }, - { 0x2497, 3, 2556 }, - { 0x2498, 3, 2559 }, - { 0x2499, 3, 2562 }, - { 0x249a, 3, 2565 }, - { 0x249b, 3, 2568 }, - { 0x249c, 3, 2571 }, - { 0x249d, 3, 2574 }, - { 0x249e, 3, 2577 }, - { 0x249f, 3, 2580 }, - { 0x24a0, 3, 2583 }, - { 0x24a1, 3, 2586 }, - { 0x24a2, 3, 2589 }, - { 0x24a3, 3, 2592 }, - { 0x24a4, 3, 2595 }, - { 0x24a5, 3, 2598 }, - { 0x24a6, 3, 2601 }, - { 0x24a7, 3, 2604 }, - { 0x24a8, 3, 2607 }, - { 0x24a9, 3, 2610 }, - { 0x24aa, 3, 2613 }, - { 0x24ab, 3, 2616 }, - { 0x24ac, 3, 2619 }, - { 0x24ad, 3, 2622 }, - { 0x24ae, 3, 2625 }, - { 0x24af, 3, 2628 }, - { 0x24b0, 3, 2631 }, - { 0x24b1, 3, 2634 }, - { 0x24b2, 3, 2637 }, - { 0x24b3, 3, 2640 }, - { 0x24b4, 3, 2643 }, - { 0x24b5, 3, 2646 }, - { 0x24b6, 1, 2649 }, - { 0x24b7, 1, 2223 }, - { 0x24b8, 1, 2190 }, - { 0x24b9, 1, 2236 }, - { 0x24ba, 1, 2225 }, - { 0x24bb, 1, 2226 }, - { 0x24bc, 1, 2650 }, - { 0x24bd, 1, 2203 }, - { 0x24be, 1, 2205 }, - { 0x24bf, 1, 2651 }, - { 0x24c0, 1, 2222 }, - { 0x24c1, 1, 2206 }, - { 0x24c2, 1, 2227 }, - { 0x24c3, 1, 2207 }, - { 0x24c4, 1, 2652 }, - { 0x24c5, 1, 2210 }, - { 0x24c6, 1, 2211 }, - { 0x24c7, 1, 2212 }, - { 0x24c8, 1, 2653 }, - { 0x24c9, 1, 2654 }, - { 0x24ca, 1, 2655 }, - { 0x24cb, 1, 2283 }, - { 0x24cc, 1, 2656 }, - { 0x24cd, 1, 2295 }, - { 0x24ce, 1, 2657 }, - { 0x24cf, 1, 2220 }, - { 0x24d0, 1, 3 }, - { 0x24d1, 1, 2658 }, - { 0x24d2, 1, 2325 }, - { 0x24d3, 1, 2237 }, - { 0x24d4, 1, 2224 }, - { 0x24d5, 1, 2659 }, - { 0x24d6, 1, 2202 }, - { 0x24d7, 1, 588 }, - { 0x24d8, 1, 2169 }, - { 0x24d9, 1, 590 }, - { 0x24da, 1, 2660 }, - { 0x24db, 1, 610 }, - { 0x24dc, 1, 2326 }, - { 0x24dd, 1, 2181 }, - { 0x24de, 1, 14 }, - { 0x24df, 1, 2661 }, - { 0x24e0, 1, 2662 }, - { 0x24e1, 1, 591 }, - { 0x24e2, 1, 356 }, - { 0x24e3, 1, 2663 }, - { 0x24e4, 1, 2664 }, - { 0x24e5, 1, 2308 }, - { 0x24e6, 1, 595 }, - { 0x24e7, 1, 611 }, - { 0x24e8, 1, 596 }, - { 0x24e9, 1, 2665 }, - { 0x24ea, 1, 2168 }, - { 0x2a0c, 4, 2666 }, - { 0x2a74, 3, 2670 }, - { 0x2a75, 2, 2673 }, - { 0x2a76, 3, 2675 }, - { 0x2adc, 2, 2678 }, - { 0x2e9f, 1, 2680 }, - { 0x2ef3, 1, 2681 }, - { 0x2f00, 1, 2682 }, - { 0x2f01, 1, 2683 }, - { 0x2f02, 1, 2684 }, - { 0x2f03, 1, 2685 }, - { 0x2f04, 1, 2686 }, - { 0x2f05, 1, 2687 }, - { 0x2f06, 1, 2688 }, - { 0x2f07, 1, 2689 }, - { 0x2f08, 1, 2690 }, - { 0x2f09, 1, 2691 }, - { 0x2f0a, 1, 2692 }, - { 0x2f0b, 1, 2693 }, - { 0x2f0c, 1, 2694 }, - { 0x2f0d, 1, 2695 }, - { 0x2f0e, 1, 2696 }, - { 0x2f0f, 1, 2697 }, - { 0x2f10, 1, 2698 }, - { 0x2f11, 1, 2699 }, - { 0x2f12, 1, 2700 }, - { 0x2f13, 1, 2701 }, - { 0x2f14, 1, 2702 }, - { 0x2f15, 1, 2703 }, - { 0x2f16, 1, 2704 }, - { 0x2f17, 1, 2705 }, - { 0x2f18, 1, 2706 }, - { 0x2f19, 1, 2707 }, - { 0x2f1a, 1, 2708 }, - { 0x2f1b, 1, 2709 }, - { 0x2f1c, 1, 2710 }, - { 0x2f1d, 1, 2711 }, - { 0x2f1e, 1, 2712 }, - { 0x2f1f, 1, 2713 }, - { 0x2f20, 1, 2714 }, - { 0x2f21, 1, 2715 }, - { 0x2f22, 1, 2716 }, - { 0x2f23, 1, 2717 }, - { 0x2f24, 1, 2718 }, - { 0x2f25, 1, 2719 }, - { 0x2f26, 1, 2720 }, - { 0x2f27, 1, 2721 }, - { 0x2f28, 1, 2722 }, - { 0x2f29, 1, 2723 }, - { 0x2f2a, 1, 2724 }, - { 0x2f2b, 1, 2725 }, - { 0x2f2c, 1, 2726 }, - { 0x2f2d, 1, 2727 }, - { 0x2f2e, 1, 2728 }, - { 0x2f2f, 1, 2729 }, - { 0x2f30, 1, 2730 }, - { 0x2f31, 1, 2731 }, - { 0x2f32, 1, 2732 }, - { 0x2f33, 1, 2733 }, - { 0x2f34, 1, 2734 }, - { 0x2f35, 1, 2735 }, - { 0x2f36, 1, 2736 }, - { 0x2f37, 1, 2737 }, - { 0x2f38, 1, 2738 }, - { 0x2f39, 1, 2739 }, - { 0x2f3a, 1, 2740 }, - { 0x2f3b, 1, 2741 }, - { 0x2f3c, 1, 2742 }, - { 0x2f3d, 1, 2743 }, - { 0x2f3e, 1, 2744 }, - { 0x2f3f, 1, 2745 }, - { 0x2f40, 1, 2746 }, - { 0x2f41, 1, 2747 }, - { 0x2f42, 1, 2748 }, - { 0x2f43, 1, 2749 }, - { 0x2f44, 1, 2750 }, - { 0x2f45, 1, 2751 }, - { 0x2f46, 1, 2752 }, - { 0x2f47, 1, 2753 }, - { 0x2f48, 1, 2754 }, - { 0x2f49, 1, 2755 }, - { 0x2f4a, 1, 2756 }, - { 0x2f4b, 1, 2757 }, - { 0x2f4c, 1, 2758 }, - { 0x2f4d, 1, 2759 }, - { 0x2f4e, 1, 2760 }, - { 0x2f4f, 1, 2761 }, - { 0x2f50, 1, 2762 }, - { 0x2f51, 1, 2763 }, - { 0x2f52, 1, 2764 }, - { 0x2f53, 1, 2765 }, - { 0x2f54, 1, 2766 }, - { 0x2f55, 1, 2767 }, - { 0x2f56, 1, 2768 }, - { 0x2f57, 1, 2769 }, - { 0x2f58, 1, 2770 }, - { 0x2f59, 1, 2771 }, - { 0x2f5a, 1, 2772 }, - { 0x2f5b, 1, 2773 }, - { 0x2f5c, 1, 2774 }, - { 0x2f5d, 1, 2775 }, - { 0x2f5e, 1, 2776 }, - { 0x2f5f, 1, 2777 }, - { 0x2f60, 1, 2778 }, - { 0x2f61, 1, 2779 }, - { 0x2f62, 1, 2780 }, - { 0x2f63, 1, 2781 }, - { 0x2f64, 1, 2782 }, - { 0x2f65, 1, 2783 }, - { 0x2f66, 1, 2784 }, - { 0x2f67, 1, 2785 }, - { 0x2f68, 1, 2786 }, - { 0x2f69, 1, 2787 }, - { 0x2f6a, 1, 2788 }, - { 0x2f6b, 1, 2789 }, - { 0x2f6c, 1, 2790 }, - { 0x2f6d, 1, 2791 }, - { 0x2f6e, 1, 2792 }, - { 0x2f6f, 1, 2793 }, - { 0x2f70, 1, 2794 }, - { 0x2f71, 1, 2795 }, - { 0x2f72, 1, 2796 }, - { 0x2f73, 1, 2797 }, - { 0x2f74, 1, 2798 }, - { 0x2f75, 1, 2799 }, - { 0x2f76, 1, 2800 }, - { 0x2f77, 1, 2801 }, - { 0x2f78, 1, 2802 }, - { 0x2f79, 1, 2803 }, - { 0x2f7a, 1, 2804 }, - { 0x2f7b, 1, 2805 }, - { 0x2f7c, 1, 2806 }, - { 0x2f7d, 1, 2807 }, - { 0x2f7e, 1, 2808 }, - { 0x2f7f, 1, 2809 }, - { 0x2f80, 1, 2810 }, - { 0x2f81, 1, 2811 }, - { 0x2f82, 1, 2812 }, - { 0x2f83, 1, 2813 }, - { 0x2f84, 1, 2814 }, - { 0x2f85, 1, 2815 }, - { 0x2f86, 1, 2816 }, - { 0x2f87, 1, 2817 }, - { 0x2f88, 1, 2818 }, - { 0x2f89, 1, 2819 }, - { 0x2f8a, 1, 2820 }, - { 0x2f8b, 1, 2821 }, - { 0x2f8c, 1, 2822 }, - { 0x2f8d, 1, 2823 }, - { 0x2f8e, 1, 2824 }, - { 0x2f8f, 1, 2825 }, - { 0x2f90, 1, 2826 }, - { 0x2f91, 1, 2827 }, - { 0x2f92, 1, 2828 }, - { 0x2f93, 1, 2829 }, - { 0x2f94, 1, 2830 }, - { 0x2f95, 1, 2831 }, - { 0x2f96, 1, 2832 }, - { 0x2f97, 1, 2833 }, - { 0x2f98, 1, 2834 }, - { 0x2f99, 1, 2835 }, - { 0x2f9a, 1, 2836 }, - { 0x2f9b, 1, 2837 }, - { 0x2f9c, 1, 2838 }, - { 0x2f9d, 1, 2839 }, - { 0x2f9e, 1, 2840 }, - { 0x2f9f, 1, 2841 }, - { 0x2fa0, 1, 2842 }, - { 0x2fa1, 1, 2843 }, - { 0x2fa2, 1, 2844 }, - { 0x2fa3, 1, 2845 }, - { 0x2fa4, 1, 2846 }, - { 0x2fa5, 1, 2847 }, - { 0x2fa6, 1, 2848 }, - { 0x2fa7, 1, 2849 }, - { 0x2fa8, 1, 2850 }, - { 0x2fa9, 1, 2851 }, - { 0x2faa, 1, 2852 }, - { 0x2fab, 1, 2853 }, - { 0x2fac, 1, 2854 }, - { 0x2fad, 1, 2855 }, - { 0x2fae, 1, 2856 }, - { 0x2faf, 1, 2857 }, - { 0x2fb0, 1, 2858 }, - { 0x2fb1, 1, 2859 }, - { 0x2fb2, 1, 2860 }, - { 0x2fb3, 1, 2861 }, - { 0x2fb4, 1, 2862 }, - { 0x2fb5, 1, 2863 }, - { 0x2fb6, 1, 2864 }, - { 0x2fb7, 1, 2865 }, - { 0x2fb8, 1, 2866 }, - { 0x2fb9, 1, 2867 }, - { 0x2fba, 1, 2868 }, - { 0x2fbb, 1, 2869 }, - { 0x2fbc, 1, 2870 }, - { 0x2fbd, 1, 2871 }, - { 0x2fbe, 1, 2872 }, - { 0x2fbf, 1, 2873 }, - { 0x2fc0, 1, 2874 }, - { 0x2fc1, 1, 2875 }, - { 0x2fc2, 1, 2876 }, - { 0x2fc3, 1, 2877 }, - { 0x2fc4, 1, 2878 }, - { 0x2fc5, 1, 2879 }, - { 0x2fc6, 1, 2880 }, - { 0x2fc7, 1, 2881 }, - { 0x2fc8, 1, 2882 }, - { 0x2fc9, 1, 2883 }, - { 0x2fca, 1, 2884 }, - { 0x2fcb, 1, 2885 }, - { 0x2fcc, 1, 2886 }, - { 0x2fcd, 1, 2887 }, - { 0x2fce, 1, 2888 }, - { 0x2fcf, 1, 2889 }, - { 0x2fd0, 1, 2890 }, - { 0x2fd1, 1, 2891 }, - { 0x2fd2, 1, 2892 }, - { 0x2fd3, 1, 2893 }, - { 0x2fd4, 1, 2894 }, - { 0x2fd5, 1, 2895 }, - { 0x3000, 1, 0 }, - { 0x3036, 1, 2896 }, - { 0x3038, 1, 2705 }, - { 0x3039, 1, 2897 }, - { 0x303a, 1, 2898 }, - { 0x304c, 2, 2899 }, - { 0x304e, 2, 2901 }, - { 0x3050, 2, 2903 }, - { 0x3052, 2, 2905 }, - { 0x3054, 2, 2907 }, - { 0x3056, 2, 2909 }, - { 0x3058, 2, 2911 }, - { 0x305a, 2, 2913 }, - { 0x305c, 2, 2915 }, - { 0x305e, 2, 2917 }, - { 0x3060, 2, 2919 }, - { 0x3062, 2, 2921 }, - { 0x3065, 2, 2923 }, - { 0x3067, 2, 2925 }, - { 0x3069, 2, 2927 }, - { 0x3070, 2, 2929 }, - { 0x3071, 2, 2931 }, - { 0x3073, 2, 2933 }, - { 0x3074, 2, 2935 }, - { 0x3076, 2, 2937 }, - { 0x3077, 2, 2939 }, - { 0x3079, 2, 2941 }, - { 0x307a, 2, 2943 }, - { 0x307c, 2, 2945 }, - { 0x307d, 2, 2947 }, - { 0x3094, 2, 2949 }, - { 0x309b, 2, 2951 }, - { 0x309c, 2, 2953 }, - { 0x309e, 2, 2955 }, - { 0x309f, 2, 2957 }, - { 0x30ac, 2, 2959 }, - { 0x30ae, 2, 2961 }, - { 0x30b0, 2, 2963 }, - { 0x30b2, 2, 2965 }, - { 0x30b4, 2, 2967 }, - { 0x30b6, 2, 2969 }, - { 0x30b8, 2, 2971 }, - { 0x30ba, 2, 2973 }, - { 0x30bc, 2, 2975 }, - { 0x30be, 2, 2977 }, - { 0x30c0, 2, 2979 }, - { 0x30c2, 2, 2981 }, - { 0x30c5, 2, 2983 }, - { 0x30c7, 2, 2985 }, - { 0x30c9, 2, 2987 }, - { 0x30d0, 2, 2989 }, - { 0x30d1, 2, 2991 }, - { 0x30d3, 2, 2993 }, - { 0x30d4, 2, 2995 }, - { 0x30d6, 2, 2997 }, - { 0x30d7, 2, 2999 }, - { 0x30d9, 2, 3001 }, - { 0x30da, 2, 3003 }, - { 0x30dc, 2, 3005 }, - { 0x30dd, 2, 3007 }, - { 0x30f4, 2, 3009 }, - { 0x30f7, 2, 3011 }, - { 0x30f8, 2, 3013 }, - { 0x30f9, 2, 3015 }, - { 0x30fa, 2, 3017 }, - { 0x30fe, 2, 3019 }, - { 0x30ff, 2, 3021 }, - { 0x3131, 1, 3023 }, - { 0x3132, 1, 3024 }, - { 0x3133, 1, 3025 }, - { 0x3134, 1, 3026 }, - { 0x3135, 1, 3027 }, - { 0x3136, 1, 3028 }, - { 0x3137, 1, 3029 }, - { 0x3138, 1, 3030 }, - { 0x3139, 1, 3031 }, - { 0x313a, 1, 3032 }, - { 0x313b, 1, 3033 }, - { 0x313c, 1, 3034 }, - { 0x313d, 1, 3035 }, - { 0x313e, 1, 3036 }, - { 0x313f, 1, 3037 }, - { 0x3140, 1, 3038 }, - { 0x3141, 1, 3039 }, - { 0x3142, 1, 3040 }, - { 0x3143, 1, 3041 }, - { 0x3144, 1, 3042 }, - { 0x3145, 1, 3043 }, - { 0x3146, 1, 3044 }, - { 0x3147, 1, 3045 }, - { 0x3148, 1, 3046 }, - { 0x3149, 1, 3047 }, - { 0x314a, 1, 3048 }, - { 0x314b, 1, 3049 }, - { 0x314c, 1, 3050 }, - { 0x314d, 1, 3051 }, - { 0x314e, 1, 3052 }, - { 0x314f, 1, 3053 }, - { 0x3150, 1, 3054 }, - { 0x3151, 1, 3055 }, - { 0x3152, 1, 3056 }, - { 0x3153, 1, 3057 }, - { 0x3154, 1, 3058 }, - { 0x3155, 1, 3059 }, - { 0x3156, 1, 3060 }, - { 0x3157, 1, 3061 }, - { 0x3158, 1, 3062 }, - { 0x3159, 1, 3063 }, - { 0x315a, 1, 3064 }, - { 0x315b, 1, 3065 }, - { 0x315c, 1, 3066 }, - { 0x315d, 1, 3067 }, - { 0x315e, 1, 3068 }, - { 0x315f, 1, 3069 }, - { 0x3160, 1, 3070 }, - { 0x3161, 1, 3071 }, - { 0x3162, 1, 3072 }, - { 0x3163, 1, 3073 }, - { 0x3164, 1, 3074 }, - { 0x3165, 1, 3075 }, - { 0x3166, 1, 3076 }, - { 0x3167, 1, 3077 }, - { 0x3168, 1, 3078 }, - { 0x3169, 1, 3079 }, - { 0x316a, 1, 3080 }, - { 0x316b, 1, 3081 }, - { 0x316c, 1, 3082 }, - { 0x316d, 1, 3083 }, - { 0x316e, 1, 3084 }, - { 0x316f, 1, 3085 }, - { 0x3170, 1, 3086 }, - { 0x3171, 1, 3087 }, - { 0x3172, 1, 3088 }, - { 0x3173, 1, 3089 }, - { 0x3174, 1, 3090 }, - { 0x3175, 1, 3091 }, - { 0x3176, 1, 3092 }, - { 0x3177, 1, 3093 }, - { 0x3178, 1, 3094 }, - { 0x3179, 1, 3095 }, - { 0x317a, 1, 3096 }, - { 0x317b, 1, 3097 }, - { 0x317c, 1, 3098 }, - { 0x317d, 1, 3099 }, - { 0x317e, 1, 3100 }, - { 0x317f, 1, 3101 }, - { 0x3180, 1, 3102 }, - { 0x3181, 1, 3103 }, - { 0x3182, 1, 3104 }, - { 0x3183, 1, 3105 }, - { 0x3184, 1, 3106 }, - { 0x3185, 1, 3107 }, - { 0x3186, 1, 3108 }, - { 0x3187, 1, 3109 }, - { 0x3188, 1, 3110 }, - { 0x3189, 1, 3111 }, - { 0x318a, 1, 3112 }, - { 0x318b, 1, 3113 }, - { 0x318c, 1, 3114 }, - { 0x318d, 1, 3115 }, - { 0x318e, 1, 3116 }, - { 0x3192, 1, 2682 }, - { 0x3193, 1, 2688 }, - { 0x3194, 1, 3117 }, - { 0x3195, 1, 3118 }, - { 0x3196, 1, 3119 }, - { 0x3197, 1, 3120 }, - { 0x3198, 1, 3121 }, - { 0x3199, 1, 3122 }, - { 0x319a, 1, 2686 }, - { 0x319b, 1, 3123 }, - { 0x319c, 1, 3124 }, - { 0x319d, 1, 3125 }, - { 0x319e, 1, 3126 }, - { 0x319f, 1, 2690 }, - { 0x3200, 3, 3127 }, - { 0x3201, 3, 3130 }, - { 0x3202, 3, 3133 }, - { 0x3203, 3, 3136 }, - { 0x3204, 3, 3139 }, - { 0x3205, 3, 3142 }, - { 0x3206, 3, 3145 }, - { 0x3207, 3, 3148 }, - { 0x3208, 3, 3151 }, - { 0x3209, 3, 3154 }, - { 0x320a, 3, 3157 }, - { 0x320b, 3, 3160 }, - { 0x320c, 3, 3163 }, - { 0x320d, 3, 3166 }, - { 0x320e, 4, 3169 }, - { 0x320f, 4, 3173 }, - { 0x3210, 4, 3177 }, - { 0x3211, 4, 3181 }, - { 0x3212, 4, 3185 }, - { 0x3213, 4, 3189 }, - { 0x3214, 4, 3193 }, - { 0x3215, 4, 3197 }, - { 0x3216, 4, 3201 }, - { 0x3217, 4, 3205 }, - { 0x3218, 4, 3209 }, - { 0x3219, 4, 3213 }, - { 0x321a, 4, 3217 }, - { 0x321b, 4, 3221 }, - { 0x321c, 4, 3225 }, - { 0x3220, 3, 3229 }, - { 0x3221, 3, 3232 }, - { 0x3222, 3, 3235 }, - { 0x3223, 3, 3238 }, - { 0x3224, 3, 3241 }, - { 0x3225, 3, 3244 }, - { 0x3226, 3, 3247 }, - { 0x3227, 3, 3250 }, - { 0x3228, 3, 3253 }, - { 0x3229, 3, 3256 }, - { 0x322a, 3, 3259 }, - { 0x322b, 3, 3262 }, - { 0x322c, 3, 3265 }, - { 0x322d, 3, 3268 }, - { 0x322e, 3, 3271 }, - { 0x322f, 3, 3274 }, - { 0x3230, 3, 3277 }, - { 0x3231, 3, 3280 }, - { 0x3232, 3, 3283 }, - { 0x3233, 3, 3286 }, - { 0x3234, 3, 3289 }, - { 0x3235, 3, 3292 }, - { 0x3236, 3, 3295 }, - { 0x3237, 3, 3298 }, - { 0x3238, 3, 3301 }, - { 0x3239, 3, 3304 }, - { 0x323a, 3, 3307 }, - { 0x323b, 3, 3310 }, - { 0x323c, 3, 3313 }, - { 0x323d, 3, 3316 }, - { 0x323e, 3, 3319 }, - { 0x323f, 3, 3322 }, - { 0x3240, 3, 3325 }, - { 0x3241, 3, 3328 }, - { 0x3242, 3, 3331 }, - { 0x3243, 3, 3334 }, - { 0x3251, 2, 3337 }, - { 0x3252, 2, 3339 }, - { 0x3253, 2, 3341 }, - { 0x3254, 2, 3343 }, - { 0x3255, 2, 3345 }, - { 0x3256, 2, 3347 }, - { 0x3257, 2, 3349 }, - { 0x3258, 2, 3351 }, - { 0x3259, 2, 3353 }, - { 0x325a, 2, 3355 }, - { 0x325b, 2, 3357 }, - { 0x325c, 2, 3359 }, - { 0x325d, 2, 3361 }, - { 0x325e, 2, 3363 }, - { 0x325f, 2, 3365 }, - { 0x3260, 1, 3023 }, - { 0x3261, 1, 3026 }, - { 0x3262, 1, 3029 }, - { 0x3263, 1, 3031 }, - { 0x3264, 1, 3039 }, - { 0x3265, 1, 3040 }, - { 0x3266, 1, 3043 }, - { 0x3267, 1, 3045 }, - { 0x3268, 1, 3046 }, - { 0x3269, 1, 3048 }, - { 0x326a, 1, 3049 }, - { 0x326b, 1, 3050 }, - { 0x326c, 1, 3051 }, - { 0x326d, 1, 3052 }, - { 0x326e, 2, 3367 }, - { 0x326f, 2, 3369 }, - { 0x3270, 2, 3371 }, - { 0x3271, 2, 3373 }, - { 0x3272, 2, 3375 }, - { 0x3273, 2, 3377 }, - { 0x3274, 2, 3379 }, - { 0x3275, 2, 3381 }, - { 0x3276, 2, 3383 }, - { 0x3277, 2, 3385 }, - { 0x3278, 2, 3387 }, - { 0x3279, 2, 3389 }, - { 0x327a, 2, 3391 }, - { 0x327b, 2, 3393 }, - { 0x3280, 1, 2682 }, - { 0x3281, 1, 2688 }, - { 0x3282, 1, 3117 }, - { 0x3283, 1, 3118 }, - { 0x3284, 1, 3395 }, - { 0x3285, 1, 3396 }, - { 0x3286, 1, 3397 }, - { 0x3287, 1, 2693 }, - { 0x3288, 1, 3398 }, - { 0x3289, 1, 2705 }, - { 0x328a, 1, 2755 }, - { 0x328b, 1, 2767 }, - { 0x328c, 1, 2766 }, - { 0x328d, 1, 2756 }, - { 0x328e, 1, 2848 }, - { 0x328f, 1, 2713 }, - { 0x3290, 1, 2753 }, - { 0x3291, 1, 3399 }, - { 0x3292, 1, 3400 }, - { 0x3293, 1, 3401 }, - { 0x3294, 1, 3402 }, - { 0x3295, 1, 3403 }, - { 0x3296, 1, 3404 }, - { 0x3297, 1, 3405 }, - { 0x3298, 1, 3406 }, - { 0x3299, 1, 3407 }, - { 0x329a, 1, 3408 }, - { 0x329b, 1, 2719 }, - { 0x329c, 1, 3409 }, - { 0x329d, 1, 3410 }, - { 0x329e, 1, 3411 }, - { 0x329f, 1, 3412 }, - { 0x32a0, 1, 3413 }, - { 0x32a1, 1, 3414 }, - { 0x32a2, 1, 3415 }, - { 0x32a3, 1, 3416 }, - { 0x32a4, 1, 3119 }, - { 0x32a5, 1, 3120 }, - { 0x32a6, 1, 3121 }, - { 0x32a7, 1, 3417 }, - { 0x32a8, 1, 3418 }, - { 0x32a9, 1, 3419 }, - { 0x32aa, 1, 3420 }, - { 0x32ab, 1, 3421 }, - { 0x32ac, 1, 3422 }, - { 0x32ad, 1, 3423 }, - { 0x32ae, 1, 3424 }, - { 0x32af, 1, 3425 }, - { 0x32b0, 1, 3426 }, - { 0x32b1, 2, 3427 }, - { 0x32b2, 2, 3429 }, - { 0x32b3, 2, 3431 }, - { 0x32b4, 2, 3433 }, - { 0x32b5, 2, 3435 }, - { 0x32b6, 2, 3437 }, - { 0x32b7, 2, 3439 }, - { 0x32b8, 2, 3441 }, - { 0x32b9, 2, 3443 }, - { 0x32ba, 2, 3445 }, - { 0x32bb, 2, 3447 }, - { 0x32bc, 2, 3449 }, - { 0x32bd, 2, 3451 }, - { 0x32be, 2, 3453 }, - { 0x32bf, 2, 3455 }, - { 0x32c0, 2, 3457 }, - { 0x32c1, 2, 3459 }, - { 0x32c2, 2, 3461 }, - { 0x32c3, 2, 3463 }, - { 0x32c4, 2, 3465 }, - { 0x32c5, 2, 3467 }, - { 0x32c6, 2, 3469 }, - { 0x32c7, 2, 3471 }, - { 0x32c8, 2, 3473 }, - { 0x32c9, 3, 3475 }, - { 0x32ca, 3, 3478 }, - { 0x32cb, 3, 3481 }, - { 0x32d0, 1, 3484 }, - { 0x32d1, 1, 3485 }, - { 0x32d2, 1, 3486 }, - { 0x32d3, 1, 3487 }, - { 0x32d4, 1, 3488 }, - { 0x32d5, 1, 3489 }, - { 0x32d6, 1, 3490 }, - { 0x32d7, 1, 3491 }, - { 0x32d8, 1, 3492 }, - { 0x32d9, 1, 3493 }, - { 0x32da, 1, 3494 }, - { 0x32db, 1, 3495 }, - { 0x32dc, 1, 3496 }, - { 0x32dd, 1, 3497 }, - { 0x32de, 1, 3498 }, - { 0x32df, 1, 3499 }, - { 0x32e0, 1, 3500 }, - { 0x32e1, 1, 3501 }, - { 0x32e2, 1, 3502 }, - { 0x32e3, 1, 3503 }, - { 0x32e4, 1, 3504 }, - { 0x32e5, 1, 3505 }, - { 0x32e6, 1, 3506 }, - { 0x32e7, 1, 3507 }, - { 0x32e8, 1, 3508 }, - { 0x32e9, 1, 3509 }, - { 0x32ea, 1, 3510 }, - { 0x32eb, 1, 3511 }, - { 0x32ec, 1, 3512 }, - { 0x32ed, 1, 3513 }, - { 0x32ee, 1, 3514 }, - { 0x32ef, 1, 3515 }, - { 0x32f0, 1, 3516 }, - { 0x32f1, 1, 3517 }, - { 0x32f2, 1, 3518 }, - { 0x32f3, 1, 3519 }, - { 0x32f4, 1, 3520 }, - { 0x32f5, 1, 3521 }, - { 0x32f6, 1, 3522 }, - { 0x32f7, 1, 3523 }, - { 0x32f8, 1, 3524 }, - { 0x32f9, 1, 3525 }, - { 0x32fa, 1, 3526 }, - { 0x32fb, 1, 3527 }, - { 0x32fc, 1, 3528 }, - { 0x32fd, 1, 3529 }, - { 0x32fe, 1, 3530 }, - { 0x3300, 5, 3531 }, - { 0x3301, 4, 3536 }, - { 0x3302, 5, 3540 }, - { 0x3303, 3, 3545 }, - { 0x3304, 5, 3548 }, - { 0x3305, 3, 3553 }, - { 0x3306, 3, 3556 }, - { 0x3307, 6, 3559 }, - { 0x3308, 4, 3565 }, - { 0x3309, 3, 3569 }, - { 0x330a, 3, 3572 }, - { 0x330b, 3, 3575 }, - { 0x330c, 4, 3578 }, - { 0x330d, 4, 3582 }, - { 0x330e, 4, 3586 }, - { 0x330f, 4, 3590 }, - { 0x3310, 4, 3594 }, - { 0x3311, 4, 3598 }, - { 0x3312, 4, 3602 }, - { 0x3313, 6, 3606 }, - { 0x3314, 2, 3612 }, - { 0x3315, 6, 3614 }, - { 0x3316, 6, 3620 }, - { 0x3317, 5, 3626 }, - { 0x3318, 4, 3631 }, - { 0x3319, 6, 3635 }, - { 0x331a, 6, 3641 }, - { 0x331b, 4, 3647 }, - { 0x331c, 3, 3651 }, - { 0x331d, 3, 3654 }, - { 0x331e, 4, 3657 }, - { 0x331f, 4, 3661 }, - { 0x3320, 5, 3665 }, - { 0x3321, 5, 3670 }, - { 0x3322, 3, 3675 }, - { 0x3323, 3, 3678 }, - { 0x3324, 4, 3681 }, - { 0x3325, 3, 3685 }, - { 0x3326, 3, 3688 }, - { 0x3327, 2, 3691 }, - { 0x3328, 2, 3693 }, - { 0x3329, 3, 3695 }, - { 0x332a, 3, 3698 }, - { 0x332b, 6, 3701 }, - { 0x332c, 4, 3707 }, - { 0x332d, 5, 3711 }, - { 0x332e, 6, 3716 }, - { 0x332f, 4, 3722 }, - { 0x3330, 3, 3726 }, - { 0x3331, 3, 3729 }, - { 0x3332, 6, 3732 }, - { 0x3333, 4, 3738 }, - { 0x3334, 6, 3742 }, - { 0x3335, 3, 3748 }, - { 0x3336, 5, 3751 }, - { 0x3337, 3, 3756 }, - { 0x3338, 4, 3759 }, - { 0x3339, 3, 3763 }, - { 0x333a, 4, 3766 }, - { 0x333b, 5, 3770 }, - { 0x333c, 4, 3775 }, - { 0x333d, 5, 3779 }, - { 0x333e, 4, 3784 }, - { 0x333f, 2, 3788 }, - { 0x3340, 5, 3790 }, - { 0x3341, 3, 3795 }, - { 0x3342, 3, 3798 }, - { 0x3343, 4, 3801 }, - { 0x3344, 3, 3805 }, - { 0x3345, 3, 3808 }, - { 0x3346, 3, 3811 }, - { 0x3347, 5, 3814 }, - { 0x3348, 4, 3819 }, - { 0x3349, 2, 3823 }, - { 0x334a, 6, 3825 }, - { 0x334b, 3, 3831 }, - { 0x334c, 5, 3834 }, - { 0x334d, 4, 3839 }, - { 0x334e, 4, 3843 }, - { 0x334f, 3, 3847 }, - { 0x3350, 3, 3850 }, - { 0x3351, 4, 3853 }, - { 0x3352, 2, 3857 }, - { 0x3353, 4, 3859 }, - { 0x3354, 5, 3863 }, - { 0x3355, 2, 3868 }, - { 0x3356, 6, 3870 }, - { 0x3357, 3, 3876 }, - { 0x3358, 2, 3879 }, - { 0x3359, 2, 3881 }, - { 0x335a, 2, 3883 }, - { 0x335b, 2, 3885 }, - { 0x335c, 2, 3887 }, - { 0x335d, 2, 3889 }, - { 0x335e, 2, 3891 }, - { 0x335f, 2, 3893 }, - { 0x3360, 2, 3895 }, - { 0x3361, 2, 3897 }, - { 0x3362, 3, 3899 }, - { 0x3363, 3, 3902 }, - { 0x3364, 3, 3905 }, - { 0x3365, 3, 3908 }, - { 0x3366, 3, 3911 }, - { 0x3367, 3, 3914 }, - { 0x3368, 3, 3917 }, - { 0x3369, 3, 3920 }, - { 0x336a, 3, 3923 }, - { 0x336b, 3, 3926 }, - { 0x336c, 3, 3929 }, - { 0x336d, 3, 3932 }, - { 0x336e, 3, 3935 }, - { 0x336f, 3, 3938 }, - { 0x3370, 3, 3941 }, - { 0x3371, 3, 3944 }, - { 0x3372, 2, 3947 }, - { 0x3373, 2, 3949 }, - { 0x3374, 3, 3951 }, - { 0x3375, 2, 3954 }, - { 0x3376, 2, 3956 }, - { 0x337b, 2, 3958 }, - { 0x337c, 2, 3960 }, - { 0x337d, 2, 3962 }, - { 0x337e, 2, 3964 }, - { 0x337f, 4, 3966 }, - { 0x3380, 2, 3970 }, - { 0x3381, 2, 3972 }, - { 0x3382, 2, 3974 }, - { 0x3383, 2, 3976 }, - { 0x3384, 2, 3978 }, - { 0x3385, 2, 3980 }, - { 0x3386, 2, 3982 }, - { 0x3387, 2, 3984 }, - { 0x3388, 3, 3986 }, - { 0x3389, 4, 3989 }, - { 0x338a, 2, 3993 }, - { 0x338b, 2, 3995 }, - { 0x338c, 2, 3997 }, - { 0x338d, 2, 3999 }, - { 0x338e, 2, 4001 }, - { 0x338f, 2, 4003 }, - { 0x3390, 2, 4005 }, - { 0x3391, 3, 4007 }, - { 0x3392, 3, 4010 }, - { 0x3393, 3, 4013 }, - { 0x3394, 3, 4016 }, - { 0x3395, 2, 4019 }, - { 0x3396, 2, 4021 }, - { 0x3397, 2, 4023 }, - { 0x3398, 2, 4025 }, - { 0x3399, 2, 4027 }, - { 0x339a, 2, 4029 }, - { 0x339b, 2, 4031 }, - { 0x339c, 2, 4033 }, - { 0x339d, 2, 4035 }, - { 0x339e, 2, 4037 }, - { 0x339f, 3, 4039 }, - { 0x33a0, 3, 4042 }, - { 0x33a1, 2, 4045 }, - { 0x33a2, 3, 4047 }, - { 0x33a3, 3, 4050 }, - { 0x33a4, 3, 4053 }, - { 0x33a5, 2, 4056 }, - { 0x33a6, 3, 4058 }, - { 0x33a7, 3, 4061 }, - { 0x33a8, 4, 4064 }, - { 0x33a9, 2, 4068 }, - { 0x33aa, 3, 4070 }, - { 0x33ab, 3, 4073 }, - { 0x33ac, 3, 4076 }, - { 0x33ad, 3, 4079 }, - { 0x33ae, 5, 4082 }, - { 0x33af, 6, 4087 }, - { 0x33b0, 2, 4093 }, - { 0x33b1, 2, 4095 }, - { 0x33b2, 2, 4097 }, - { 0x33b3, 2, 4099 }, - { 0x33b4, 2, 4101 }, - { 0x33b5, 2, 4103 }, - { 0x33b6, 2, 4105 }, - { 0x33b7, 2, 4107 }, - { 0x33b8, 2, 4109 }, - { 0x33b9, 2, 4111 }, - { 0x33ba, 2, 4113 }, - { 0x33bb, 2, 4115 }, - { 0x33bc, 2, 4117 }, - { 0x33bd, 2, 4119 }, - { 0x33be, 2, 4121 }, - { 0x33bf, 2, 4123 }, - { 0x33c0, 2, 4125 }, - { 0x33c1, 2, 4127 }, - { 0x33c2, 4, 4129 }, - { 0x33c3, 2, 4133 }, - { 0x33c4, 2, 4135 }, - { 0x33c5, 2, 4137 }, - { 0x33c6, 4, 4139 }, - { 0x33c7, 3, 4143 }, - { 0x33c8, 2, 4146 }, - { 0x33c9, 2, 4148 }, - { 0x33ca, 2, 4150 }, - { 0x33cb, 2, 4152 }, - { 0x33cc, 2, 4154 }, - { 0x33cd, 2, 4156 }, - { 0x33ce, 2, 4158 }, - { 0x33cf, 2, 4160 }, - { 0x33d0, 2, 4162 }, - { 0x33d1, 2, 4164 }, - { 0x33d2, 3, 4166 }, - { 0x33d3, 2, 4169 }, - { 0x33d4, 2, 4171 }, - { 0x33d5, 3, 4173 }, - { 0x33d6, 3, 4176 }, - { 0x33d7, 2, 4179 }, - { 0x33d8, 4, 4181 }, - { 0x33d9, 3, 4185 }, - { 0x33da, 2, 4188 }, - { 0x33db, 2, 4190 }, - { 0x33dc, 2, 4192 }, - { 0x33dd, 2, 4194 }, - { 0x33e0, 2, 4196 }, - { 0x33e1, 2, 4198 }, - { 0x33e2, 2, 4200 }, - { 0x33e3, 2, 4202 }, - { 0x33e4, 2, 4204 }, - { 0x33e5, 2, 4206 }, - { 0x33e6, 2, 4208 }, - { 0x33e7, 2, 4210 }, - { 0x33e8, 2, 4212 }, - { 0x33e9, 3, 4214 }, - { 0x33ea, 3, 4217 }, - { 0x33eb, 3, 4220 }, - { 0x33ec, 3, 4223 }, - { 0x33ed, 3, 4226 }, - { 0x33ee, 3, 4229 }, - { 0x33ef, 3, 4232 }, - { 0x33f0, 3, 4235 }, - { 0x33f1, 3, 4238 }, - { 0x33f2, 3, 4241 }, - { 0x33f3, 3, 4244 }, - { 0x33f4, 3, 4247 }, - { 0x33f5, 3, 4250 }, - { 0x33f6, 3, 4253 }, - { 0x33f7, 3, 4256 }, - { 0x33f8, 3, 4259 }, - { 0x33f9, 3, 4262 }, - { 0x33fa, 3, 4265 }, - { 0x33fb, 3, 4268 }, - { 0x33fc, 3, 4271 }, - { 0x33fd, 3, 4274 }, - { 0x33fe, 3, 4277 }, - { 0xf900, 1, 4280 }, - { 0xf901, 1, 4281 }, - { 0xf902, 1, 2840 }, - { 0xf903, 1, 4282 }, - { 0xf904, 1, 4283 }, - { 0xf905, 1, 4284 }, - { 0xf906, 1, 4285 }, - { 0xf907, 1, 2894 }, - { 0xf908, 1, 2894 }, - { 0xf909, 1, 4286 }, - { 0xf90a, 1, 2848 }, - { 0xf90b, 1, 4287 }, - { 0xf90c, 1, 4288 }, - { 0xf90d, 1, 4289 }, - { 0xf90e, 1, 4290 }, - { 0xf90f, 1, 4291 }, - { 0xf910, 1, 4292 }, - { 0xf911, 1, 4293 }, - { 0xf912, 1, 4294 }, - { 0xf913, 1, 4295 }, - { 0xf914, 1, 4296 }, - { 0xf915, 1, 4297 }, - { 0xf916, 1, 4298 }, - { 0xf917, 1, 4299 }, - { 0xf918, 1, 4300 }, - { 0xf919, 1, 4301 }, - { 0xf91a, 1, 4302 }, - { 0xf91b, 1, 4303 }, - { 0xf91c, 1, 4304 }, - { 0xf91d, 1, 4305 }, - { 0xf91e, 1, 4306 }, - { 0xf91f, 1, 4307 }, - { 0xf920, 1, 4308 }, - { 0xf921, 1, 4309 }, - { 0xf922, 1, 4310 }, - { 0xf923, 1, 4311 }, - { 0xf924, 1, 4312 }, - { 0xf925, 1, 4313 }, - { 0xf926, 1, 4314 }, - { 0xf927, 1, 4315 }, - { 0xf928, 1, 4316 }, - { 0xf929, 1, 4317 }, - { 0xf92a, 1, 4318 }, - { 0xf92b, 1, 4319 }, - { 0xf92c, 1, 4320 }, - { 0xf92d, 1, 4321 }, - { 0xf92e, 1, 4322 }, - { 0xf92f, 1, 4323 }, - { 0xf930, 1, 4324 }, - { 0xf931, 1, 4325 }, - { 0xf932, 1, 4326 }, - { 0xf933, 1, 4327 }, - { 0xf934, 1, 2806 }, - { 0xf935, 1, 4328 }, - { 0xf936, 1, 4329 }, - { 0xf937, 1, 4330 }, - { 0xf938, 1, 4331 }, - { 0xf939, 1, 4332 }, - { 0xf93a, 1, 4333 }, - { 0xf93b, 1, 4334 }, - { 0xf93c, 1, 4335 }, - { 0xf93d, 1, 4336 }, - { 0xf93e, 1, 4337 }, - { 0xf93f, 1, 4338 }, - { 0xf940, 1, 2879 }, - { 0xf941, 1, 4339 }, - { 0xf942, 1, 4340 }, - { 0xf943, 1, 4341 }, - { 0xf944, 1, 4342 }, - { 0xf945, 1, 4343 }, - { 0xf946, 1, 4344 }, - { 0xf947, 1, 4345 }, - { 0xf948, 1, 4346 }, - { 0xf949, 1, 4347 }, - { 0xf94a, 1, 4348 }, - { 0xf94b, 1, 4349 }, - { 0xf94c, 1, 4350 }, - { 0xf94d, 1, 4351 }, - { 0xf94e, 1, 4352 }, - { 0xf94f, 1, 4353 }, - { 0xf950, 1, 4354 }, - { 0xf951, 1, 4355 }, - { 0xf952, 1, 4356 }, - { 0xf953, 1, 4357 }, - { 0xf954, 1, 4358 }, - { 0xf955, 1, 4359 }, - { 0xf956, 1, 4360 }, - { 0xf957, 1, 4361 }, - { 0xf958, 1, 4362 }, - { 0xf959, 1, 4363 }, - { 0xf95a, 1, 4364 }, - { 0xf95b, 1, 4365 }, - { 0xf95c, 1, 4296 }, - { 0xf95d, 1, 4366 }, - { 0xf95e, 1, 4367 }, - { 0xf95f, 1, 4368 }, - { 0xf960, 1, 4369 }, - { 0xf961, 1, 4370 }, - { 0xf962, 1, 4371 }, - { 0xf963, 1, 4372 }, - { 0xf964, 1, 4373 }, - { 0xf965, 1, 4374 }, - { 0xf966, 1, 4375 }, - { 0xf967, 1, 4376 }, - { 0xf968, 1, 4377 }, - { 0xf969, 1, 4378 }, - { 0xf96a, 1, 4379 }, - { 0xf96b, 1, 4380 }, - { 0xf96c, 1, 4381 }, - { 0xf96d, 1, 4382 }, - { 0xf96e, 1, 4383 }, - { 0xf96f, 1, 4384 }, - { 0xf970, 1, 4385 }, - { 0xf971, 1, 2842 }, - { 0xf972, 1, 4386 }, - { 0xf973, 1, 4387 }, - { 0xf974, 1, 4388 }, - { 0xf975, 1, 4389 }, - { 0xf976, 1, 4390 }, - { 0xf977, 1, 4391 }, - { 0xf978, 1, 4392 }, - { 0xf979, 1, 4393 }, - { 0xf97a, 1, 4394 }, - { 0xf97b, 1, 4395 }, - { 0xf97c, 1, 4396 }, - { 0xf97d, 1, 4397 }, - { 0xf97e, 1, 4398 }, - { 0xf97f, 1, 4399 }, - { 0xf980, 1, 4400 }, - { 0xf981, 1, 2719 }, - { 0xf982, 1, 4401 }, - { 0xf983, 1, 4402 }, - { 0xf984, 1, 4403 }, - { 0xf985, 1, 4404 }, - { 0xf986, 1, 4405 }, - { 0xf987, 1, 4406 }, - { 0xf988, 1, 4407 }, - { 0xf989, 1, 4408 }, - { 0xf98a, 1, 2700 }, - { 0xf98b, 1, 4409 }, - { 0xf98c, 1, 4410 }, - { 0xf98d, 1, 4411 }, - { 0xf98e, 1, 4412 }, - { 0xf98f, 1, 4413 }, - { 0xf990, 1, 4414 }, - { 0xf991, 1, 4415 }, - { 0xf992, 1, 4416 }, - { 0xf993, 1, 4417 }, - { 0xf994, 1, 4418 }, - { 0xf995, 1, 4419 }, - { 0xf996, 1, 4420 }, - { 0xf997, 1, 4421 }, - { 0xf998, 1, 4422 }, - { 0xf999, 1, 4423 }, - { 0xf99a, 1, 4424 }, - { 0xf99b, 1, 4425 }, - { 0xf99c, 1, 4426 }, - { 0xf99d, 1, 4427 }, - { 0xf99e, 1, 4428 }, - { 0xf99f, 1, 4429 }, - { 0xf9a0, 1, 4430 }, - { 0xf9a1, 1, 4384 }, - { 0xf9a2, 1, 4431 }, - { 0xf9a3, 1, 4432 }, - { 0xf9a4, 1, 4433 }, - { 0xf9a5, 1, 4434 }, - { 0xf9a6, 1, 4435 }, - { 0xf9a7, 1, 4436 }, - { 0xf9a8, 1, 4437 }, - { 0xf9a9, 1, 4438 }, - { 0xf9aa, 1, 4368 }, - { 0xf9ab, 1, 4439 }, - { 0xf9ac, 1, 4440 }, - { 0xf9ad, 1, 4441 }, - { 0xf9ae, 1, 4442 }, - { 0xf9af, 1, 4443 }, - { 0xf9b0, 1, 4444 }, - { 0xf9b1, 1, 4445 }, - { 0xf9b2, 1, 4446 }, - { 0xf9b3, 1, 4447 }, - { 0xf9b4, 1, 4448 }, - { 0xf9b5, 1, 4449 }, - { 0xf9b6, 1, 4450 }, - { 0xf9b7, 1, 4451 }, - { 0xf9b8, 1, 4452 }, - { 0xf9b9, 1, 4453 }, - { 0xf9ba, 1, 4454 }, - { 0xf9bb, 1, 4455 }, - { 0xf9bc, 1, 4456 }, - { 0xf9bd, 1, 4457 }, - { 0xf9be, 1, 4458 }, - { 0xf9bf, 1, 4296 }, - { 0xf9c0, 1, 4459 }, - { 0xf9c1, 1, 4460 }, - { 0xf9c2, 1, 4461 }, - { 0xf9c3, 1, 4462 }, - { 0xf9c4, 1, 2893 }, - { 0xf9c5, 1, 4463 }, - { 0xf9c6, 1, 4464 }, - { 0xf9c7, 1, 4465 }, - { 0xf9c8, 1, 4466 }, - { 0xf9c9, 1, 4467 }, - { 0xf9ca, 1, 4468 }, - { 0xf9cb, 1, 4469 }, - { 0xf9cc, 1, 4470 }, - { 0xf9cd, 1, 4471 }, - { 0xf9ce, 1, 4472 }, - { 0xf9cf, 1, 4473 }, - { 0xf9d0, 1, 4474 }, - { 0xf9d1, 1, 3396 }, - { 0xf9d2, 1, 4475 }, - { 0xf9d3, 1, 4476 }, - { 0xf9d4, 1, 4477 }, - { 0xf9d5, 1, 4478 }, - { 0xf9d6, 1, 4479 }, - { 0xf9d7, 1, 4480 }, - { 0xf9d8, 1, 4481 }, - { 0xf9d9, 1, 4482 }, - { 0xf9da, 1, 4483 }, - { 0xf9db, 1, 4370 }, - { 0xf9dc, 1, 4484 }, - { 0xf9dd, 1, 4485 }, - { 0xf9de, 1, 4486 }, - { 0xf9df, 1, 4487 }, - { 0xf9e0, 1, 4488 }, - { 0xf9e1, 1, 4489 }, - { 0xf9e2, 1, 4490 }, - { 0xf9e3, 1, 4491 }, - { 0xf9e4, 1, 4492 }, - { 0xf9e5, 1, 4493 }, - { 0xf9e6, 1, 4494 }, - { 0xf9e7, 1, 4495 }, - { 0xf9e8, 1, 4496 }, - { 0xf9e9, 1, 2847 }, - { 0xf9ea, 1, 4497 }, - { 0xf9eb, 1, 4498 }, - { 0xf9ec, 1, 4499 }, - { 0xf9ed, 1, 4500 }, - { 0xf9ee, 1, 4501 }, - { 0xf9ef, 1, 4502 }, - { 0xf9f0, 1, 4503 }, - { 0xf9f1, 1, 4504 }, - { 0xf9f2, 1, 4505 }, - { 0xf9f3, 1, 4506 }, - { 0xf9f4, 1, 4507 }, - { 0xf9f5, 1, 4508 }, - { 0xf9f6, 1, 4509 }, - { 0xf9f7, 1, 2798 }, - { 0xf9f8, 1, 4510 }, - { 0xf9f9, 1, 4511 }, - { 0xf9fa, 1, 4512 }, - { 0xf9fb, 1, 4513 }, - { 0xf9fc, 1, 4514 }, - { 0xf9fd, 1, 4515 }, - { 0xf9fe, 1, 4516 }, - { 0xf9ff, 1, 4517 }, - { 0xfa00, 1, 4518 }, - { 0xfa01, 1, 4519 }, - { 0xfa02, 1, 4520 }, - { 0xfa03, 1, 4521 }, - { 0xfa04, 1, 4522 }, - { 0xfa05, 1, 4523 }, - { 0xfa06, 1, 4524 }, - { 0xfa07, 1, 4525 }, - { 0xfa08, 1, 2825 }, - { 0xfa09, 1, 4526 }, - { 0xfa0a, 1, 2828 }, - { 0xfa0b, 1, 4527 }, - { 0xfa0c, 1, 4528 }, - { 0xfa0d, 1, 4529 }, - { 0xfa10, 1, 4530 }, - { 0xfa12, 1, 4531 }, - { 0xfa15, 1, 4532 }, - { 0xfa16, 1, 4533 }, - { 0xfa17, 1, 4534 }, - { 0xfa18, 1, 4535 }, - { 0xfa19, 1, 4536 }, - { 0xfa1a, 1, 4537 }, - { 0xfa1b, 1, 4538 }, - { 0xfa1c, 1, 4539 }, - { 0xfa1d, 1, 4540 }, - { 0xfa1e, 1, 2805 }, - { 0xfa20, 1, 4541 }, - { 0xfa22, 1, 4542 }, - { 0xfa25, 1, 4543 }, - { 0xfa26, 1, 4544 }, - { 0xfa2a, 1, 4545 }, - { 0xfa2b, 1, 4546 }, - { 0xfa2c, 1, 4547 }, - { 0xfa2d, 1, 4548 }, - { 0xfa30, 1, 4549 }, - { 0xfa31, 1, 4550 }, - { 0xfa32, 1, 4551 }, - { 0xfa33, 1, 4552 }, - { 0xfa34, 1, 4553 }, - { 0xfa35, 1, 4554 }, - { 0xfa36, 1, 4555 }, - { 0xfa37, 1, 4556 }, - { 0xfa38, 1, 4557 }, - { 0xfa39, 1, 4558 }, - { 0xfa3a, 1, 4559 }, - { 0xfa3b, 1, 4560 }, - { 0xfa3c, 1, 2726 }, - { 0xfa3d, 1, 4561 }, - { 0xfa3e, 1, 4562 }, - { 0xfa3f, 1, 4563 }, - { 0xfa40, 1, 4564 }, - { 0xfa41, 1, 4565 }, - { 0xfa42, 1, 4566 }, - { 0xfa43, 1, 4567 }, - { 0xfa44, 1, 4568 }, - { 0xfa45, 1, 4569 }, - { 0xfa46, 1, 4570 }, - { 0xfa47, 1, 4571 }, - { 0xfa48, 1, 4572 }, - { 0xfa49, 1, 4573 }, - { 0xfa4a, 1, 4574 }, - { 0xfa4b, 1, 4575 }, - { 0xfa4c, 1, 3401 }, - { 0xfa4d, 1, 4576 }, - { 0xfa4e, 1, 4577 }, - { 0xfa4f, 1, 4578 }, - { 0xfa50, 1, 4579 }, - { 0xfa51, 1, 3405 }, - { 0xfa52, 1, 4580 }, - { 0xfa53, 1, 4581 }, - { 0xfa54, 1, 4582 }, - { 0xfa55, 1, 4583 }, - { 0xfa56, 1, 4584 }, - { 0xfa57, 1, 4420 }, - { 0xfa58, 1, 4585 }, - { 0xfa59, 1, 4586 }, - { 0xfa5a, 1, 4587 }, - { 0xfa5b, 1, 4588 }, - { 0xfa5c, 1, 4589 }, - { 0xfa5d, 1, 4590 }, - { 0xfa5e, 1, 4590 }, - { 0xfa5f, 1, 4591 }, - { 0xfa60, 1, 4592 }, - { 0xfa61, 1, 4593 }, - { 0xfa62, 1, 4594 }, - { 0xfa63, 1, 4595 }, - { 0xfa64, 1, 4596 }, - { 0xfa65, 1, 4597 }, - { 0xfa66, 1, 4598 }, - { 0xfa67, 1, 4543 }, - { 0xfa68, 1, 4599 }, - { 0xfa69, 1, 4600 }, - { 0xfa6a, 1, 4601 }, - { 0xfb00, 2, 4602 }, - { 0xfb01, 2, 4604 }, - { 0xfb02, 2, 4606 }, - { 0xfb03, 3, 4608 }, - { 0xfb04, 3, 4611 }, - { 0xfb05, 2, 4614 }, - { 0xfb06, 2, 4614 }, - { 0xfb13, 2, 4616 }, - { 0xfb14, 2, 4618 }, - { 0xfb15, 2, 4620 }, - { 0xfb16, 2, 4622 }, - { 0xfb17, 2, 4624 }, - { 0xfb1d, 2, 4626 }, - { 0xfb1f, 2, 4628 }, - { 0xfb20, 1, 4630 }, - { 0xfb21, 1, 2228 }, - { 0xfb22, 1, 2231 }, - { 0xfb23, 1, 4631 }, - { 0xfb24, 1, 4632 }, - { 0xfb25, 1, 4633 }, - { 0xfb26, 1, 4634 }, - { 0xfb27, 1, 4635 }, - { 0xfb28, 1, 4636 }, - { 0xfb29, 1, 2176 }, - { 0xfb2a, 2, 4637 }, - { 0xfb2b, 2, 4639 }, - { 0xfb2c, 3, 4641 }, - { 0xfb2d, 3, 4644 }, - { 0xfb2e, 2, 4647 }, - { 0xfb2f, 2, 4649 }, - { 0xfb30, 2, 4651 }, - { 0xfb31, 2, 4653 }, - { 0xfb32, 2, 4655 }, - { 0xfb33, 2, 4657 }, - { 0xfb34, 2, 4659 }, - { 0xfb35, 2, 4661 }, - { 0xfb36, 2, 4663 }, - { 0xfb38, 2, 4665 }, - { 0xfb39, 2, 4667 }, - { 0xfb3a, 2, 4669 }, - { 0xfb3b, 2, 4671 }, - { 0xfb3c, 2, 4673 }, - { 0xfb3e, 2, 4675 }, - { 0xfb40, 2, 4677 }, - { 0xfb41, 2, 4679 }, - { 0xfb43, 2, 4681 }, - { 0xfb44, 2, 4683 }, - { 0xfb46, 2, 4685 }, - { 0xfb47, 2, 4687 }, - { 0xfb48, 2, 4689 }, - { 0xfb49, 2, 4691 }, - { 0xfb4a, 2, 4693 }, - { 0xfb4b, 2, 4695 }, - { 0xfb4c, 2, 4697 }, - { 0xfb4d, 2, 4699 }, - { 0xfb4e, 2, 4701 }, - { 0xfb4f, 2, 4703 }, - { 0xfb50, 1, 4705 }, - { 0xfb51, 1, 4705 }, - { 0xfb52, 1, 4706 }, - { 0xfb53, 1, 4706 }, - { 0xfb54, 1, 4706 }, - { 0xfb55, 1, 4706 }, - { 0xfb56, 1, 4707 }, - { 0xfb57, 1, 4707 }, - { 0xfb58, 1, 4707 }, - { 0xfb59, 1, 4707 }, - { 0xfb5a, 1, 4708 }, - { 0xfb5b, 1, 4708 }, - { 0xfb5c, 1, 4708 }, - { 0xfb5d, 1, 4708 }, - { 0xfb5e, 1, 4709 }, - { 0xfb5f, 1, 4709 }, - { 0xfb60, 1, 4709 }, - { 0xfb61, 1, 4709 }, - { 0xfb62, 1, 4710 }, - { 0xfb63, 1, 4710 }, - { 0xfb64, 1, 4710 }, - { 0xfb65, 1, 4710 }, - { 0xfb66, 1, 4711 }, - { 0xfb67, 1, 4711 }, - { 0xfb68, 1, 4711 }, - { 0xfb69, 1, 4711 }, - { 0xfb6a, 1, 4712 }, - { 0xfb6b, 1, 4712 }, - { 0xfb6c, 1, 4712 }, - { 0xfb6d, 1, 4712 }, - { 0xfb6e, 1, 4713 }, - { 0xfb6f, 1, 4713 }, - { 0xfb70, 1, 4713 }, - { 0xfb71, 1, 4713 }, - { 0xfb72, 1, 4714 }, - { 0xfb73, 1, 4714 }, - { 0xfb74, 1, 4714 }, - { 0xfb75, 1, 4714 }, - { 0xfb76, 1, 4715 }, - { 0xfb77, 1, 4715 }, - { 0xfb78, 1, 4715 }, - { 0xfb79, 1, 4715 }, - { 0xfb7a, 1, 4716 }, - { 0xfb7b, 1, 4716 }, - { 0xfb7c, 1, 4716 }, - { 0xfb7d, 1, 4716 }, - { 0xfb7e, 1, 4717 }, - { 0xfb7f, 1, 4717 }, - { 0xfb80, 1, 4717 }, - { 0xfb81, 1, 4717 }, - { 0xfb82, 1, 4718 }, - { 0xfb83, 1, 4718 }, - { 0xfb84, 1, 4719 }, - { 0xfb85, 1, 4719 }, - { 0xfb86, 1, 4720 }, - { 0xfb87, 1, 4720 }, - { 0xfb88, 1, 4721 }, - { 0xfb89, 1, 4721 }, - { 0xfb8a, 1, 4722 }, - { 0xfb8b, 1, 4722 }, - { 0xfb8c, 1, 4723 }, - { 0xfb8d, 1, 4723 }, - { 0xfb8e, 1, 4724 }, - { 0xfb8f, 1, 4724 }, - { 0xfb90, 1, 4724 }, - { 0xfb91, 1, 4724 }, - { 0xfb92, 1, 4725 }, - { 0xfb93, 1, 4725 }, - { 0xfb94, 1, 4725 }, - { 0xfb95, 1, 4725 }, - { 0xfb96, 1, 4726 }, - { 0xfb97, 1, 4726 }, - { 0xfb98, 1, 4726 }, - { 0xfb99, 1, 4726 }, - { 0xfb9a, 1, 4727 }, - { 0xfb9b, 1, 4727 }, - { 0xfb9c, 1, 4727 }, - { 0xfb9d, 1, 4727 }, - { 0xfb9e, 1, 4728 }, - { 0xfb9f, 1, 4728 }, - { 0xfba0, 1, 4729 }, - { 0xfba1, 1, 4729 }, - { 0xfba2, 1, 4729 }, - { 0xfba3, 1, 4729 }, - { 0xfba4, 2, 802 }, - { 0xfba5, 2, 802 }, - { 0xfba6, 1, 4730 }, - { 0xfba7, 1, 4730 }, - { 0xfba8, 1, 4730 }, - { 0xfba9, 1, 4730 }, - { 0xfbaa, 1, 4731 }, - { 0xfbab, 1, 4731 }, - { 0xfbac, 1, 4731 }, - { 0xfbad, 1, 4731 }, - { 0xfbae, 1, 4732 }, - { 0xfbaf, 1, 4732 }, - { 0xfbb0, 2, 806 }, - { 0xfbb1, 2, 806 }, - { 0xfbd3, 1, 4733 }, - { 0xfbd4, 1, 4733 }, - { 0xfbd5, 1, 4733 }, - { 0xfbd6, 1, 4733 }, - { 0xfbd7, 1, 4734 }, - { 0xfbd8, 1, 4734 }, - { 0xfbd9, 1, 4735 }, - { 0xfbda, 1, 4735 }, - { 0xfbdb, 1, 4736 }, - { 0xfbdc, 1, 4736 }, - { 0xfbdd, 2, 798 }, - { 0xfbde, 1, 4737 }, - { 0xfbdf, 1, 4737 }, - { 0xfbe0, 1, 4738 }, - { 0xfbe1, 1, 4738 }, - { 0xfbe2, 1, 4739 }, - { 0xfbe3, 1, 4739 }, - { 0xfbe4, 1, 4740 }, - { 0xfbe5, 1, 4740 }, - { 0xfbe6, 1, 4740 }, - { 0xfbe7, 1, 4740 }, - { 0xfbe8, 1, 4741 }, - { 0xfbe9, 1, 4741 }, - { 0xfbea, 3, 4742 }, - { 0xfbeb, 3, 4742 }, - { 0xfbec, 3, 4745 }, - { 0xfbed, 3, 4745 }, - { 0xfbee, 3, 4748 }, - { 0xfbef, 3, 4748 }, - { 0xfbf0, 3, 4751 }, - { 0xfbf1, 3, 4751 }, - { 0xfbf2, 3, 4754 }, - { 0xfbf3, 3, 4754 }, - { 0xfbf4, 3, 4757 }, - { 0xfbf5, 3, 4757 }, - { 0xfbf6, 3, 4760 }, - { 0xfbf7, 3, 4760 }, - { 0xfbf8, 3, 4760 }, - { 0xfbf9, 3, 4763 }, - { 0xfbfa, 3, 4763 }, - { 0xfbfb, 3, 4763 }, - { 0xfbfc, 1, 4766 }, - { 0xfbfd, 1, 4766 }, - { 0xfbfe, 1, 4766 }, - { 0xfbff, 1, 4766 }, - { 0xfc00, 3, 4767 }, - { 0xfc01, 3, 4770 }, - { 0xfc02, 3, 4773 }, - { 0xfc03, 3, 4763 }, - { 0xfc04, 3, 4776 }, - { 0xfc05, 2, 4779 }, - { 0xfc06, 2, 4781 }, - { 0xfc07, 2, 4783 }, - { 0xfc08, 2, 4785 }, - { 0xfc09, 2, 4787 }, - { 0xfc0a, 2, 4789 }, - { 0xfc0b, 2, 4791 }, - { 0xfc0c, 2, 4793 }, - { 0xfc0d, 2, 4795 }, - { 0xfc0e, 2, 4797 }, - { 0xfc0f, 2, 4799 }, - { 0xfc10, 2, 4801 }, - { 0xfc11, 2, 4803 }, - { 0xfc12, 2, 4805 }, - { 0xfc13, 2, 4807 }, - { 0xfc14, 2, 4809 }, - { 0xfc15, 2, 4811 }, - { 0xfc16, 2, 4813 }, - { 0xfc17, 2, 4815 }, - { 0xfc18, 2, 4817 }, - { 0xfc19, 2, 4819 }, - { 0xfc1a, 2, 4821 }, - { 0xfc1b, 2, 4823 }, - { 0xfc1c, 2, 4825 }, - { 0xfc1d, 2, 4827 }, - { 0xfc1e, 2, 4829 }, - { 0xfc1f, 2, 4831 }, - { 0xfc20, 2, 4833 }, - { 0xfc21, 2, 4835 }, - { 0xfc22, 2, 4837 }, - { 0xfc23, 2, 4839 }, - { 0xfc24, 2, 4841 }, - { 0xfc25, 2, 4843 }, - { 0xfc26, 2, 4845 }, - { 0xfc27, 2, 4847 }, - { 0xfc28, 2, 4849 }, - { 0xfc29, 2, 4851 }, - { 0xfc2a, 2, 4853 }, - { 0xfc2b, 2, 4855 }, - { 0xfc2c, 2, 4857 }, - { 0xfc2d, 2, 4859 }, - { 0xfc2e, 2, 4861 }, - { 0xfc2f, 2, 4863 }, - { 0xfc30, 2, 4865 }, - { 0xfc31, 2, 4867 }, - { 0xfc32, 2, 4869 }, - { 0xfc33, 2, 4871 }, - { 0xfc34, 2, 4873 }, - { 0xfc35, 2, 4875 }, - { 0xfc36, 2, 4877 }, - { 0xfc37, 2, 4879 }, - { 0xfc38, 2, 4881 }, - { 0xfc39, 2, 4883 }, - { 0xfc3a, 2, 4885 }, - { 0xfc3b, 2, 4887 }, - { 0xfc3c, 2, 4889 }, - { 0xfc3d, 2, 4891 }, - { 0xfc3e, 2, 4893 }, - { 0xfc3f, 2, 4895 }, - { 0xfc40, 2, 4897 }, - { 0xfc41, 2, 4899 }, - { 0xfc42, 2, 4901 }, - { 0xfc43, 2, 4903 }, - { 0xfc44, 2, 4905 }, - { 0xfc45, 2, 4907 }, - { 0xfc46, 2, 4909 }, - { 0xfc47, 2, 4911 }, - { 0xfc48, 2, 4913 }, - { 0xfc49, 2, 4915 }, - { 0xfc4a, 2, 4917 }, - { 0xfc4b, 2, 4919 }, - { 0xfc4c, 2, 4921 }, - { 0xfc4d, 2, 4923 }, - { 0xfc4e, 2, 4925 }, - { 0xfc4f, 2, 4927 }, - { 0xfc50, 2, 4929 }, - { 0xfc51, 2, 4931 }, - { 0xfc52, 2, 4933 }, - { 0xfc53, 2, 4935 }, - { 0xfc54, 2, 4937 }, - { 0xfc55, 2, 4939 }, - { 0xfc56, 2, 4941 }, - { 0xfc57, 2, 4943 }, - { 0xfc58, 2, 4945 }, - { 0xfc59, 2, 4947 }, - { 0xfc5a, 2, 4949 }, - { 0xfc5b, 2, 4951 }, - { 0xfc5c, 2, 4953 }, - { 0xfc5d, 2, 4955 }, - { 0xfc5e, 3, 4957 }, - { 0xfc5f, 3, 4960 }, - { 0xfc60, 3, 4963 }, - { 0xfc61, 3, 4966 }, - { 0xfc62, 3, 4969 }, - { 0xfc63, 3, 4972 }, - { 0xfc64, 3, 4975 }, - { 0xfc65, 3, 4978 }, - { 0xfc66, 3, 4773 }, - { 0xfc67, 3, 4981 }, - { 0xfc68, 3, 4763 }, - { 0xfc69, 3, 4776 }, - { 0xfc6a, 2, 4984 }, - { 0xfc6b, 2, 4986 }, - { 0xfc6c, 2, 4785 }, - { 0xfc6d, 2, 4988 }, - { 0xfc6e, 2, 4787 }, - { 0xfc6f, 2, 4789 }, - { 0xfc70, 2, 4990 }, - { 0xfc71, 2, 4992 }, - { 0xfc72, 2, 4797 }, - { 0xfc73, 2, 4994 }, - { 0xfc74, 2, 4799 }, - { 0xfc75, 2, 4801 }, - { 0xfc76, 2, 4996 }, - { 0xfc77, 2, 4998 }, - { 0xfc78, 2, 4805 }, - { 0xfc79, 2, 5000 }, - { 0xfc7a, 2, 4807 }, - { 0xfc7b, 2, 4809 }, - { 0xfc7c, 2, 4867 }, - { 0xfc7d, 2, 4869 }, - { 0xfc7e, 2, 4875 }, - { 0xfc7f, 2, 4877 }, - { 0xfc80, 2, 4879 }, - { 0xfc81, 2, 4887 }, - { 0xfc82, 2, 4889 }, - { 0xfc83, 2, 4891 }, - { 0xfc84, 2, 4893 }, - { 0xfc85, 2, 4901 }, - { 0xfc86, 2, 4903 }, - { 0xfc87, 2, 4905 }, - { 0xfc88, 2, 5002 }, - { 0xfc89, 2, 4913 }, - { 0xfc8a, 2, 5004 }, - { 0xfc8b, 2, 5006 }, - { 0xfc8c, 2, 4925 }, - { 0xfc8d, 2, 5008 }, - { 0xfc8e, 2, 4927 }, - { 0xfc8f, 2, 4929 }, - { 0xfc90, 2, 4955 }, - { 0xfc91, 2, 5010 }, - { 0xfc92, 2, 5012 }, - { 0xfc93, 2, 4945 }, - { 0xfc94, 2, 5014 }, - { 0xfc95, 2, 4947 }, - { 0xfc96, 2, 4949 }, - { 0xfc97, 3, 4767 }, - { 0xfc98, 3, 4770 }, - { 0xfc99, 3, 5016 }, - { 0xfc9a, 3, 4773 }, - { 0xfc9b, 3, 5019 }, - { 0xfc9c, 2, 4779 }, - { 0xfc9d, 2, 4781 }, - { 0xfc9e, 2, 4783 }, - { 0xfc9f, 2, 4785 }, - { 0xfca0, 2, 5022 }, - { 0xfca1, 2, 4791 }, - { 0xfca2, 2, 4793 }, - { 0xfca3, 2, 4795 }, - { 0xfca4, 2, 4797 }, - { 0xfca5, 2, 5024 }, - { 0xfca6, 2, 4805 }, - { 0xfca7, 2, 4811 }, - { 0xfca8, 2, 4813 }, - { 0xfca9, 2, 4815 }, - { 0xfcaa, 2, 4817 }, - { 0xfcab, 2, 4819 }, - { 0xfcac, 2, 4823 }, - { 0xfcad, 2, 4825 }, - { 0xfcae, 2, 4827 }, - { 0xfcaf, 2, 4829 }, - { 0xfcb0, 2, 4831 }, - { 0xfcb1, 2, 4833 }, - { 0xfcb2, 2, 5026 }, - { 0xfcb3, 2, 4835 }, - { 0xfcb4, 2, 4837 }, - { 0xfcb5, 2, 4839 }, - { 0xfcb6, 2, 4841 }, - { 0xfcb7, 2, 4843 }, - { 0xfcb8, 2, 4845 }, - { 0xfcb9, 2, 4849 }, - { 0xfcba, 2, 4851 }, - { 0xfcbb, 2, 4853 }, - { 0xfcbc, 2, 4855 }, - { 0xfcbd, 2, 4857 }, - { 0xfcbe, 2, 4859 }, - { 0xfcbf, 2, 4861 }, - { 0xfcc0, 2, 4863 }, - { 0xfcc1, 2, 4865 }, - { 0xfcc2, 2, 4871 }, - { 0xfcc3, 2, 4873 }, - { 0xfcc4, 2, 4881 }, - { 0xfcc5, 2, 4883 }, - { 0xfcc6, 2, 4885 }, - { 0xfcc7, 2, 4887 }, - { 0xfcc8, 2, 4889 }, - { 0xfcc9, 2, 4895 }, - { 0xfcca, 2, 4897 }, - { 0xfccb, 2, 4899 }, - { 0xfccc, 2, 4901 }, - { 0xfccd, 2, 5028 }, - { 0xfcce, 2, 4907 }, - { 0xfccf, 2, 4909 }, - { 0xfcd0, 2, 4911 }, - { 0xfcd1, 2, 4913 }, - { 0xfcd2, 2, 4919 }, - { 0xfcd3, 2, 4921 }, - { 0xfcd4, 2, 4923 }, - { 0xfcd5, 2, 4925 }, - { 0xfcd6, 2, 5030 }, - { 0xfcd7, 2, 4931 }, - { 0xfcd8, 2, 4933 }, - { 0xfcd9, 2, 5032 }, - { 0xfcda, 2, 4939 }, - { 0xfcdb, 2, 4941 }, - { 0xfcdc, 2, 4943 }, - { 0xfcdd, 2, 4945 }, - { 0xfcde, 2, 5034 }, - { 0xfcdf, 3, 4773 }, - { 0xfce0, 3, 5019 }, - { 0xfce1, 2, 4785 }, - { 0xfce2, 2, 5022 }, - { 0xfce3, 2, 4797 }, - { 0xfce4, 2, 5024 }, - { 0xfce5, 2, 4805 }, - { 0xfce6, 2, 5036 }, - { 0xfce7, 2, 4831 }, - { 0xfce8, 2, 5038 }, - { 0xfce9, 2, 5040 }, - { 0xfcea, 2, 5042 }, - { 0xfceb, 2, 4887 }, - { 0xfcec, 2, 4889 }, - { 0xfced, 2, 4901 }, - { 0xfcee, 2, 4925 }, - { 0xfcef, 2, 5030 }, - { 0xfcf0, 2, 4945 }, - { 0xfcf1, 2, 5034 }, - { 0xfcf2, 3, 5044 }, - { 0xfcf3, 3, 5047 }, - { 0xfcf4, 3, 5050 }, - { 0xfcf5, 2, 5053 }, - { 0xfcf6, 2, 5055 }, - { 0xfcf7, 2, 5057 }, - { 0xfcf8, 2, 5059 }, - { 0xfcf9, 2, 5061 }, - { 0xfcfa, 2, 5063 }, - { 0xfcfb, 2, 5065 }, - { 0xfcfc, 2, 5067 }, - { 0xfcfd, 2, 5069 }, - { 0xfcfe, 2, 5071 }, - { 0xfcff, 2, 5073 }, - { 0xfd00, 2, 5075 }, - { 0xfd01, 2, 5077 }, - { 0xfd02, 2, 5079 }, - { 0xfd03, 2, 5081 }, - { 0xfd04, 2, 5083 }, - { 0xfd05, 2, 5085 }, - { 0xfd06, 2, 5087 }, - { 0xfd07, 2, 5089 }, - { 0xfd08, 2, 5091 }, - { 0xfd09, 2, 5093 }, - { 0xfd0a, 2, 5095 }, - { 0xfd0b, 2, 5097 }, - { 0xfd0c, 2, 5040 }, - { 0xfd0d, 2, 5099 }, - { 0xfd0e, 2, 5101 }, - { 0xfd0f, 2, 5103 }, - { 0xfd10, 2, 5105 }, - { 0xfd11, 2, 5053 }, - { 0xfd12, 2, 5055 }, - { 0xfd13, 2, 5057 }, - { 0xfd14, 2, 5059 }, - { 0xfd15, 2, 5061 }, - { 0xfd16, 2, 5063 }, - { 0xfd17, 2, 5065 }, - { 0xfd18, 2, 5067 }, - { 0xfd19, 2, 5069 }, - { 0xfd1a, 2, 5071 }, - { 0xfd1b, 2, 5073 }, - { 0xfd1c, 2, 5075 }, - { 0xfd1d, 2, 5077 }, - { 0xfd1e, 2, 5079 }, - { 0xfd1f, 2, 5081 }, - { 0xfd20, 2, 5083 }, - { 0xfd21, 2, 5085 }, - { 0xfd22, 2, 5087 }, - { 0xfd23, 2, 5089 }, - { 0xfd24, 2, 5091 }, - { 0xfd25, 2, 5093 }, - { 0xfd26, 2, 5095 }, - { 0xfd27, 2, 5097 }, - { 0xfd28, 2, 5040 }, - { 0xfd29, 2, 5099 }, - { 0xfd2a, 2, 5101 }, - { 0xfd2b, 2, 5103 }, - { 0xfd2c, 2, 5105 }, - { 0xfd2d, 2, 5093 }, - { 0xfd2e, 2, 5095 }, - { 0xfd2f, 2, 5097 }, - { 0xfd30, 2, 5040 }, - { 0xfd31, 2, 5038 }, - { 0xfd32, 2, 5042 }, - { 0xfd33, 2, 4847 }, - { 0xfd34, 2, 4825 }, - { 0xfd35, 2, 4827 }, - { 0xfd36, 2, 4829 }, - { 0xfd37, 2, 5093 }, - { 0xfd38, 2, 5095 }, - { 0xfd39, 2, 5097 }, - { 0xfd3a, 2, 4847 }, - { 0xfd3b, 2, 4849 }, - { 0xfd3c, 2, 5107 }, - { 0xfd3d, 2, 5107 }, - { 0xfd50, 3, 5109 }, - { 0xfd51, 3, 5112 }, - { 0xfd52, 3, 5112 }, - { 0xfd53, 3, 5115 }, - { 0xfd54, 3, 5118 }, - { 0xfd55, 3, 5121 }, - { 0xfd56, 3, 5124 }, - { 0xfd57, 3, 5127 }, - { 0xfd58, 3, 5130 }, - { 0xfd59, 3, 5130 }, - { 0xfd5a, 3, 5133 }, - { 0xfd5b, 3, 5136 }, - { 0xfd5c, 3, 5139 }, - { 0xfd5d, 3, 5142 }, - { 0xfd5e, 3, 5145 }, - { 0xfd5f, 3, 5148 }, - { 0xfd60, 3, 5148 }, - { 0xfd61, 3, 5151 }, - { 0xfd62, 3, 5154 }, - { 0xfd63, 3, 5154 }, - { 0xfd64, 3, 5157 }, - { 0xfd65, 3, 5157 }, - { 0xfd66, 3, 5160 }, - { 0xfd67, 3, 5163 }, - { 0xfd68, 3, 5163 }, - { 0xfd69, 3, 5166 }, - { 0xfd6a, 3, 5169 }, - { 0xfd6b, 3, 5169 }, - { 0xfd6c, 3, 5172 }, - { 0xfd6d, 3, 5172 }, - { 0xfd6e, 3, 5175 }, - { 0xfd6f, 3, 5178 }, - { 0xfd70, 3, 5178 }, - { 0xfd71, 3, 5181 }, - { 0xfd72, 3, 5181 }, - { 0xfd73, 3, 5184 }, - { 0xfd74, 3, 5187 }, - { 0xfd75, 3, 5190 }, - { 0xfd76, 3, 5193 }, - { 0xfd77, 3, 5193 }, - { 0xfd78, 3, 5196 }, - { 0xfd79, 3, 5199 }, - { 0xfd7a, 3, 5202 }, - { 0xfd7b, 3, 5205 }, - { 0xfd7c, 3, 5208 }, - { 0xfd7d, 3, 5208 }, - { 0xfd7e, 3, 5211 }, - { 0xfd7f, 3, 5214 }, - { 0xfd80, 3, 5217 }, - { 0xfd81, 3, 5220 }, - { 0xfd82, 3, 5223 }, - { 0xfd83, 3, 5226 }, - { 0xfd84, 3, 5226 }, - { 0xfd85, 3, 5229 }, - { 0xfd86, 3, 5229 }, - { 0xfd87, 3, 5232 }, - { 0xfd88, 3, 5232 }, - { 0xfd89, 3, 5235 }, - { 0xfd8a, 3, 5238 }, - { 0xfd8b, 3, 5241 }, - { 0xfd8c, 3, 5244 }, - { 0xfd8d, 3, 5247 }, - { 0xfd8e, 3, 5250 }, - { 0xfd8f, 3, 5253 }, - { 0xfd92, 3, 5256 }, - { 0xfd93, 3, 5259 }, - { 0xfd94, 3, 5262 }, - { 0xfd95, 3, 5265 }, - { 0xfd96, 3, 5268 }, - { 0xfd97, 3, 5271 }, - { 0xfd98, 3, 5271 }, - { 0xfd99, 3, 5274 }, - { 0xfd9a, 3, 5277 }, - { 0xfd9b, 3, 5280 }, - { 0xfd9c, 3, 5283 }, - { 0xfd9d, 3, 5283 }, - { 0xfd9e, 3, 5286 }, - { 0xfd9f, 3, 5289 }, - { 0xfda0, 3, 5292 }, - { 0xfda1, 3, 5295 }, - { 0xfda2, 3, 5298 }, - { 0xfda3, 3, 5301 }, - { 0xfda4, 3, 5304 }, - { 0xfda5, 3, 5307 }, - { 0xfda6, 3, 5310 }, - { 0xfda7, 3, 5313 }, - { 0xfda8, 3, 5316 }, - { 0xfda9, 3, 5319 }, - { 0xfdaa, 3, 5322 }, - { 0xfdab, 3, 5325 }, - { 0xfdac, 3, 5328 }, - { 0xfdad, 3, 5331 }, - { 0xfdae, 3, 5334 }, - { 0xfdaf, 3, 5337 }, - { 0xfdb0, 3, 5340 }, - { 0xfdb1, 3, 5343 }, - { 0xfdb2, 3, 5346 }, - { 0xfdb3, 3, 5349 }, - { 0xfdb4, 3, 5211 }, - { 0xfdb5, 3, 5217 }, - { 0xfdb6, 3, 5352 }, - { 0xfdb7, 3, 5355 }, - { 0xfdb8, 3, 5358 }, - { 0xfdb9, 3, 5361 }, - { 0xfdba, 3, 5364 }, - { 0xfdbb, 3, 5367 }, - { 0xfdbc, 3, 5364 }, - { 0xfdbd, 3, 5358 }, - { 0xfdbe, 3, 5370 }, - { 0xfdbf, 3, 5373 }, - { 0xfdc0, 3, 5376 }, - { 0xfdc1, 3, 5379 }, - { 0xfdc2, 3, 5382 }, - { 0xfdc3, 3, 5367 }, - { 0xfdc4, 3, 5190 }, - { 0xfdc5, 3, 5160 }, - { 0xfdc6, 3, 5385 }, - { 0xfdc7, 3, 5388 }, - { 0xfdf0, 3, 5391 }, - { 0xfdf1, 3, 5394 }, - { 0xfdf2, 4, 5397 }, - { 0xfdf3, 4, 5401 }, - { 0xfdf4, 4, 5405 }, - { 0xfdf5, 4, 5409 }, - { 0xfdf6, 4, 5413 }, - { 0xfdf7, 4, 5417 }, - { 0xfdf8, 4, 5421 }, - { 0xfdf9, 3, 5425 }, - { 0xfdfa, 18, 5428 }, - { 0xfdfb, 8, 5446 }, - { 0xfdfc, 4, 5454 }, - { 0xfe30, 2, 2139 }, - { 0xfe31, 1, 5458 }, - { 0xfe32, 1, 5459 }, - { 0xfe33, 1, 5460 }, - { 0xfe34, 1, 5460 }, - { 0xfe35, 1, 2179 }, - { 0xfe36, 1, 2180 }, - { 0xfe37, 1, 5461 }, - { 0xfe38, 1, 5462 }, - { 0xfe39, 1, 5463 }, - { 0xfe3a, 1, 5464 }, - { 0xfe3b, 1, 5465 }, - { 0xfe3c, 1, 5466 }, - { 0xfe3d, 1, 5467 }, - { 0xfe3e, 1, 5468 }, - { 0xfe3f, 1, 2425 }, - { 0xfe40, 1, 2426 }, - { 0xfe41, 1, 5469 }, - { 0xfe42, 1, 5470 }, - { 0xfe43, 1, 5471 }, - { 0xfe44, 1, 5472 }, - { 0xfe49, 2, 2156 }, - { 0xfe4a, 2, 2156 }, - { 0xfe4b, 2, 2156 }, - { 0xfe4c, 2, 2156 }, - { 0xfe4d, 1, 5460 }, - { 0xfe4e, 1, 5460 }, - { 0xfe4f, 1, 5460 }, - { 0xfe50, 1, 5473 }, - { 0xfe51, 1, 5474 }, - { 0xfe52, 1, 2138 }, - { 0xfe54, 1, 621 }, - { 0xfe55, 1, 5475 }, - { 0xfe56, 1, 5476 }, - { 0xfe57, 1, 5477 }, - { 0xfe58, 1, 5458 }, - { 0xfe59, 1, 2179 }, - { 0xfe5a, 1, 2180 }, - { 0xfe5b, 1, 5461 }, - { 0xfe5c, 1, 5462 }, - { 0xfe5d, 1, 5463 }, - { 0xfe5e, 1, 5464 }, - { 0xfe5f, 1, 5478 }, - { 0xfe60, 1, 5479 }, - { 0xfe61, 1, 5480 }, - { 0xfe62, 1, 2176 }, - { 0xfe63, 1, 5481 }, - { 0xfe64, 1, 5482 }, - { 0xfe65, 1, 5483 }, - { 0xfe66, 1, 2178 }, - { 0xfe68, 1, 5484 }, - { 0xfe69, 1, 5485 }, - { 0xfe6a, 1, 5486 }, - { 0xfe6b, 1, 5487 }, - { 0xfe70, 2, 5488 }, - { 0xfe71, 2, 5490 }, - { 0xfe72, 2, 5492 }, - { 0xfe74, 2, 5494 }, - { 0xfe76, 2, 5496 }, - { 0xfe77, 2, 5498 }, - { 0xfe78, 2, 5500 }, - { 0xfe79, 2, 5502 }, - { 0xfe7a, 2, 5504 }, - { 0xfe7b, 2, 5506 }, - { 0xfe7c, 2, 5508 }, - { 0xfe7d, 2, 5510 }, - { 0xfe7e, 2, 5512 }, - { 0xfe7f, 2, 5514 }, - { 0xfe80, 1, 5516 }, - { 0xfe81, 2, 784 }, - { 0xfe82, 2, 784 }, - { 0xfe83, 2, 786 }, - { 0xfe84, 2, 786 }, - { 0xfe85, 2, 788 }, - { 0xfe86, 2, 788 }, - { 0xfe87, 2, 790 }, - { 0xfe88, 2, 790 }, - { 0xfe89, 2, 792 }, - { 0xfe8a, 2, 792 }, - { 0xfe8b, 2, 792 }, - { 0xfe8c, 2, 792 }, - { 0xfe8d, 1, 5517 }, - { 0xfe8e, 1, 5517 }, - { 0xfe8f, 1, 5518 }, - { 0xfe90, 1, 5518 }, - { 0xfe91, 1, 5518 }, - { 0xfe92, 1, 5518 }, - { 0xfe93, 1, 5519 }, - { 0xfe94, 1, 5519 }, - { 0xfe95, 1, 5520 }, - { 0xfe96, 1, 5520 }, - { 0xfe97, 1, 5520 }, - { 0xfe98, 1, 5520 }, - { 0xfe99, 1, 5521 }, - { 0xfe9a, 1, 5521 }, - { 0xfe9b, 1, 5521 }, - { 0xfe9c, 1, 5521 }, - { 0xfe9d, 1, 5522 }, - { 0xfe9e, 1, 5522 }, - { 0xfe9f, 1, 5522 }, - { 0xfea0, 1, 5522 }, - { 0xfea1, 1, 5523 }, - { 0xfea2, 1, 5523 }, - { 0xfea3, 1, 5523 }, - { 0xfea4, 1, 5523 }, - { 0xfea5, 1, 5524 }, - { 0xfea6, 1, 5524 }, - { 0xfea7, 1, 5524 }, - { 0xfea8, 1, 5524 }, - { 0xfea9, 1, 5525 }, - { 0xfeaa, 1, 5525 }, - { 0xfeab, 1, 5526 }, - { 0xfeac, 1, 5526 }, - { 0xfead, 1, 5527 }, - { 0xfeae, 1, 5527 }, - { 0xfeaf, 1, 5528 }, - { 0xfeb0, 1, 5528 }, - { 0xfeb1, 1, 5529 }, - { 0xfeb2, 1, 5529 }, - { 0xfeb3, 1, 5529 }, - { 0xfeb4, 1, 5529 }, - { 0xfeb5, 1, 5530 }, - { 0xfeb6, 1, 5530 }, - { 0xfeb7, 1, 5530 }, - { 0xfeb8, 1, 5530 }, - { 0xfeb9, 1, 5531 }, - { 0xfeba, 1, 5531 }, - { 0xfebb, 1, 5531 }, - { 0xfebc, 1, 5531 }, - { 0xfebd, 1, 5532 }, - { 0xfebe, 1, 5532 }, - { 0xfebf, 1, 5532 }, - { 0xfec0, 1, 5532 }, - { 0xfec1, 1, 5533 }, - { 0xfec2, 1, 5533 }, - { 0xfec3, 1, 5533 }, - { 0xfec4, 1, 5533 }, - { 0xfec5, 1, 5534 }, - { 0xfec6, 1, 5534 }, - { 0xfec7, 1, 5534 }, - { 0xfec8, 1, 5534 }, - { 0xfec9, 1, 5535 }, - { 0xfeca, 1, 5535 }, - { 0xfecb, 1, 5535 }, - { 0xfecc, 1, 5535 }, - { 0xfecd, 1, 5536 }, - { 0xfece, 1, 5536 }, - { 0xfecf, 1, 5536 }, - { 0xfed0, 1, 5536 }, - { 0xfed1, 1, 5537 }, - { 0xfed2, 1, 5537 }, - { 0xfed3, 1, 5537 }, - { 0xfed4, 1, 5537 }, - { 0xfed5, 1, 5538 }, - { 0xfed6, 1, 5538 }, - { 0xfed7, 1, 5538 }, - { 0xfed8, 1, 5538 }, - { 0xfed9, 1, 5539 }, - { 0xfeda, 1, 5539 }, - { 0xfedb, 1, 5539 }, - { 0xfedc, 1, 5539 }, - { 0xfedd, 1, 5540 }, - { 0xfede, 1, 5540 }, - { 0xfedf, 1, 5540 }, - { 0xfee0, 1, 5540 }, - { 0xfee1, 1, 5541 }, - { 0xfee2, 1, 5541 }, - { 0xfee3, 1, 5541 }, - { 0xfee4, 1, 5541 }, - { 0xfee5, 1, 5542 }, - { 0xfee6, 1, 5542 }, - { 0xfee7, 1, 5542 }, - { 0xfee8, 1, 5542 }, - { 0xfee9, 1, 5543 }, - { 0xfeea, 1, 5543 }, - { 0xfeeb, 1, 5543 }, - { 0xfeec, 1, 5543 }, - { 0xfeed, 1, 5544 }, - { 0xfeee, 1, 5544 }, - { 0xfeef, 1, 4741 }, - { 0xfef0, 1, 4741 }, - { 0xfef1, 1, 5545 }, - { 0xfef2, 1, 5545 }, - { 0xfef3, 1, 5545 }, - { 0xfef4, 1, 5545 }, - { 0xfef5, 3, 5546 }, - { 0xfef6, 3, 5546 }, - { 0xfef7, 3, 5549 }, - { 0xfef8, 3, 5549 }, - { 0xfef9, 3, 5552 }, - { 0xfefa, 3, 5552 }, - { 0xfefb, 2, 5555 }, - { 0xfefc, 2, 5555 }, - { 0xff01, 1, 5477 }, - { 0xff02, 1, 5557 }, - { 0xff03, 1, 5478 }, - { 0xff04, 1, 5485 }, - { 0xff05, 1, 5486 }, - { 0xff06, 1, 5479 }, - { 0xff07, 1, 5558 }, - { 0xff08, 1, 2179 }, - { 0xff09, 1, 2180 }, - { 0xff0a, 1, 5480 }, - { 0xff0b, 1, 2176 }, - { 0xff0c, 1, 5473 }, - { 0xff0d, 1, 5481 }, - { 0xff0e, 1, 2138 }, - { 0xff0f, 1, 5559 }, - { 0xff10, 1, 2168 }, - { 0xff11, 1, 13 }, - { 0xff12, 1, 6 }, - { 0xff13, 1, 7 }, - { 0xff14, 1, 2170 }, - { 0xff15, 1, 2171 }, - { 0xff16, 1, 2172 }, - { 0xff17, 1, 2173 }, - { 0xff18, 1, 2174 }, - { 0xff19, 1, 2175 }, - { 0xff1a, 1, 5475 }, - { 0xff1b, 1, 621 }, - { 0xff1c, 1, 5482 }, - { 0xff1d, 1, 2178 }, - { 0xff1e, 1, 5483 }, - { 0xff1f, 1, 5476 }, - { 0xff20, 1, 5487 }, - { 0xff21, 1, 2649 }, - { 0xff22, 1, 2223 }, - { 0xff23, 1, 2190 }, - { 0xff24, 1, 2236 }, - { 0xff25, 1, 2225 }, - { 0xff26, 1, 2226 }, - { 0xff27, 1, 2650 }, - { 0xff28, 1, 2203 }, - { 0xff29, 1, 2205 }, - { 0xff2a, 1, 2651 }, - { 0xff2b, 1, 2222 }, - { 0xff2c, 1, 2206 }, - { 0xff2d, 1, 2227 }, - { 0xff2e, 1, 2207 }, - { 0xff2f, 1, 2652 }, - { 0xff30, 1, 2210 }, - { 0xff31, 1, 2211 }, - { 0xff32, 1, 2212 }, - { 0xff33, 1, 2653 }, - { 0xff34, 1, 2654 }, - { 0xff35, 1, 2655 }, - { 0xff36, 1, 2283 }, - { 0xff37, 1, 2656 }, - { 0xff38, 1, 2295 }, - { 0xff39, 1, 2657 }, - { 0xff3a, 1, 2220 }, - { 0xff3b, 1, 5560 }, - { 0xff3c, 1, 5484 }, - { 0xff3d, 1, 5561 }, - { 0xff3e, 1, 5562 }, - { 0xff3f, 1, 5460 }, - { 0xff40, 1, 2113 }, - { 0xff41, 1, 3 }, - { 0xff42, 1, 2658 }, - { 0xff43, 1, 2325 }, - { 0xff44, 1, 2237 }, - { 0xff45, 1, 2224 }, - { 0xff46, 1, 2659 }, - { 0xff47, 1, 2202 }, - { 0xff48, 1, 588 }, - { 0xff49, 1, 2169 }, - { 0xff4a, 1, 590 }, - { 0xff4b, 1, 2660 }, - { 0xff4c, 1, 610 }, - { 0xff4d, 1, 2326 }, - { 0xff4e, 1, 2181 }, - { 0xff4f, 1, 14 }, - { 0xff50, 1, 2661 }, - { 0xff51, 1, 2662 }, - { 0xff52, 1, 591 }, - { 0xff53, 1, 356 }, - { 0xff54, 1, 2663 }, - { 0xff55, 1, 2664 }, - { 0xff56, 1, 2308 }, - { 0xff57, 1, 595 }, - { 0xff58, 1, 611 }, - { 0xff59, 1, 596 }, - { 0xff5a, 1, 2665 }, - { 0xff5b, 1, 5461 }, - { 0xff5c, 1, 5563 }, - { 0xff5d, 1, 5462 }, - { 0xff5e, 1, 5564 }, - { 0xff5f, 1, 5565 }, - { 0xff60, 1, 5566 }, - { 0xff61, 1, 5567 }, - { 0xff62, 1, 5469 }, - { 0xff63, 1, 5470 }, - { 0xff64, 1, 5474 }, - { 0xff65, 1, 5568 }, - { 0xff66, 1, 3530 }, - { 0xff67, 1, 5569 }, - { 0xff68, 1, 5570 }, - { 0xff69, 1, 5571 }, - { 0xff6a, 1, 5572 }, - { 0xff6b, 1, 5573 }, - { 0xff6c, 1, 5574 }, - { 0xff6d, 1, 5575 }, - { 0xff6e, 1, 5576 }, - { 0xff6f, 1, 5577 }, - { 0xff70, 1, 5578 }, - { 0xff71, 1, 3484 }, - { 0xff72, 1, 3485 }, - { 0xff73, 1, 3486 }, - { 0xff74, 1, 3487 }, - { 0xff75, 1, 3488 }, - { 0xff76, 1, 3489 }, - { 0xff77, 1, 3490 }, - { 0xff78, 1, 3491 }, - { 0xff79, 1, 3492 }, - { 0xff7a, 1, 3493 }, - { 0xff7b, 1, 3494 }, - { 0xff7c, 1, 3495 }, - { 0xff7d, 1, 3496 }, - { 0xff7e, 1, 3497 }, - { 0xff7f, 1, 3498 }, - { 0xff80, 1, 3499 }, - { 0xff81, 1, 3500 }, - { 0xff82, 1, 3501 }, - { 0xff83, 1, 3502 }, - { 0xff84, 1, 3503 }, - { 0xff85, 1, 3504 }, - { 0xff86, 1, 3505 }, - { 0xff87, 1, 3506 }, - { 0xff88, 1, 3507 }, - { 0xff89, 1, 3508 }, - { 0xff8a, 1, 3509 }, - { 0xff8b, 1, 3510 }, - { 0xff8c, 1, 3511 }, - { 0xff8d, 1, 3512 }, - { 0xff8e, 1, 3513 }, - { 0xff8f, 1, 3514 }, - { 0xff90, 1, 3515 }, - { 0xff91, 1, 3516 }, - { 0xff92, 1, 3517 }, - { 0xff93, 1, 3518 }, - { 0xff94, 1, 3519 }, - { 0xff95, 1, 3520 }, - { 0xff96, 1, 3521 }, - { 0xff97, 1, 3522 }, - { 0xff98, 1, 3523 }, - { 0xff99, 1, 3524 }, - { 0xff9a, 1, 3525 }, - { 0xff9b, 1, 3526 }, - { 0xff9c, 1, 3527 }, - { 0xff9d, 1, 5579 }, - { 0xff9e, 1, 5580 }, - { 0xff9f, 1, 5581 }, - { 0xffa0, 1, 3074 }, - { 0xffa1, 1, 3023 }, - { 0xffa2, 1, 3024 }, - { 0xffa3, 1, 3025 }, - { 0xffa4, 1, 3026 }, - { 0xffa5, 1, 3027 }, - { 0xffa6, 1, 3028 }, - { 0xffa7, 1, 3029 }, - { 0xffa8, 1, 3030 }, - { 0xffa9, 1, 3031 }, - { 0xffaa, 1, 3032 }, - { 0xffab, 1, 3033 }, - { 0xffac, 1, 3034 }, - { 0xffad, 1, 3035 }, - { 0xffae, 1, 3036 }, - { 0xffaf, 1, 3037 }, - { 0xffb0, 1, 3038 }, - { 0xffb1, 1, 3039 }, - { 0xffb2, 1, 3040 }, - { 0xffb3, 1, 3041 }, - { 0xffb4, 1, 3042 }, - { 0xffb5, 1, 3043 }, - { 0xffb6, 1, 3044 }, - { 0xffb7, 1, 3045 }, - { 0xffb8, 1, 3046 }, - { 0xffb9, 1, 3047 }, - { 0xffba, 1, 3048 }, - { 0xffbb, 1, 3049 }, - { 0xffbc, 1, 3050 }, - { 0xffbd, 1, 3051 }, - { 0xffbe, 1, 3052 }, - { 0xffc2, 1, 3053 }, - { 0xffc3, 1, 3054 }, - { 0xffc4, 1, 3055 }, - { 0xffc5, 1, 3056 }, - { 0xffc6, 1, 3057 }, - { 0xffc7, 1, 3058 }, - { 0xffca, 1, 3059 }, - { 0xffcb, 1, 3060 }, - { 0xffcc, 1, 3061 }, - { 0xffcd, 1, 3062 }, - { 0xffce, 1, 3063 }, - { 0xffcf, 1, 3064 }, - { 0xffd2, 1, 3065 }, - { 0xffd3, 1, 3066 }, - { 0xffd4, 1, 3067 }, - { 0xffd5, 1, 3068 }, - { 0xffd6, 1, 3069 }, - { 0xffd7, 1, 3070 }, - { 0xffda, 1, 3071 }, - { 0xffdb, 1, 3072 }, - { 0xffdc, 1, 3073 }, - { 0xffe0, 1, 5582 }, - { 0xffe1, 1, 5583 }, - { 0xffe2, 1, 5584 }, - { 0xffe3, 2, 4 }, - { 0xffe4, 1, 5585 }, - { 0xffe5, 1, 5586 }, - { 0xffe6, 1, 5587 }, - { 0xffe8, 1, 5588 }, - { 0xffe9, 1, 5589 }, - { 0xffea, 1, 5590 }, - { 0xffeb, 1, 5591 }, - { 0xffec, 1, 5592 }, - { 0xffed, 1, 5593 }, - { 0xffee, 1, 5594 }, - { 0x1d15e, 2, 5595 }, - { 0x1d15f, 2, 5597 }, - { 0x1d160, 3, 5599 }, - { 0x1d161, 3, 5602 }, - { 0x1d162, 3, 5605 }, - { 0x1d163, 3, 5608 }, - { 0x1d164, 3, 5611 }, - { 0x1d1bb, 2, 5614 }, - { 0x1d1bc, 2, 5616 }, - { 0x1d1bd, 3, 5618 }, - { 0x1d1be, 3, 5621 }, - { 0x1d1bf, 3, 5624 }, - { 0x1d1c0, 3, 5627 }, - { 0x1d400, 1, 2649 }, - { 0x1d401, 1, 2223 }, - { 0x1d402, 1, 2190 }, - { 0x1d403, 1, 2236 }, - { 0x1d404, 1, 2225 }, - { 0x1d405, 1, 2226 }, - { 0x1d406, 1, 2650 }, - { 0x1d407, 1, 2203 }, - { 0x1d408, 1, 2205 }, - { 0x1d409, 1, 2651 }, - { 0x1d40a, 1, 2222 }, - { 0x1d40b, 1, 2206 }, - { 0x1d40c, 1, 2227 }, - { 0x1d40d, 1, 2207 }, - { 0x1d40e, 1, 2652 }, - { 0x1d40f, 1, 2210 }, - { 0x1d410, 1, 2211 }, - { 0x1d411, 1, 2212 }, - { 0x1d412, 1, 2653 }, - { 0x1d413, 1, 2654 }, - { 0x1d414, 1, 2655 }, - { 0x1d415, 1, 2283 }, - { 0x1d416, 1, 2656 }, - { 0x1d417, 1, 2295 }, - { 0x1d418, 1, 2657 }, - { 0x1d419, 1, 2220 }, - { 0x1d41a, 1, 3 }, - { 0x1d41b, 1, 2658 }, - { 0x1d41c, 1, 2325 }, - { 0x1d41d, 1, 2237 }, - { 0x1d41e, 1, 2224 }, - { 0x1d41f, 1, 2659 }, - { 0x1d420, 1, 2202 }, - { 0x1d421, 1, 588 }, - { 0x1d422, 1, 2169 }, - { 0x1d423, 1, 590 }, - { 0x1d424, 1, 2660 }, - { 0x1d425, 1, 610 }, - { 0x1d426, 1, 2326 }, - { 0x1d427, 1, 2181 }, - { 0x1d428, 1, 14 }, - { 0x1d429, 1, 2661 }, - { 0x1d42a, 1, 2662 }, - { 0x1d42b, 1, 591 }, - { 0x1d42c, 1, 356 }, - { 0x1d42d, 1, 2663 }, - { 0x1d42e, 1, 2664 }, - { 0x1d42f, 1, 2308 }, - { 0x1d430, 1, 595 }, - { 0x1d431, 1, 611 }, - { 0x1d432, 1, 596 }, - { 0x1d433, 1, 2665 }, - { 0x1d434, 1, 2649 }, - { 0x1d435, 1, 2223 }, - { 0x1d436, 1, 2190 }, - { 0x1d437, 1, 2236 }, - { 0x1d438, 1, 2225 }, - { 0x1d439, 1, 2226 }, - { 0x1d43a, 1, 2650 }, - { 0x1d43b, 1, 2203 }, - { 0x1d43c, 1, 2205 }, - { 0x1d43d, 1, 2651 }, - { 0x1d43e, 1, 2222 }, - { 0x1d43f, 1, 2206 }, - { 0x1d440, 1, 2227 }, - { 0x1d441, 1, 2207 }, - { 0x1d442, 1, 2652 }, - { 0x1d443, 1, 2210 }, - { 0x1d444, 1, 2211 }, - { 0x1d445, 1, 2212 }, - { 0x1d446, 1, 2653 }, - { 0x1d447, 1, 2654 }, - { 0x1d448, 1, 2655 }, - { 0x1d449, 1, 2283 }, - { 0x1d44a, 1, 2656 }, - { 0x1d44b, 1, 2295 }, - { 0x1d44c, 1, 2657 }, - { 0x1d44d, 1, 2220 }, - { 0x1d44e, 1, 3 }, - { 0x1d44f, 1, 2658 }, - { 0x1d450, 1, 2325 }, - { 0x1d451, 1, 2237 }, - { 0x1d452, 1, 2224 }, - { 0x1d453, 1, 2659 }, - { 0x1d454, 1, 2202 }, - { 0x1d456, 1, 2169 }, - { 0x1d457, 1, 590 }, - { 0x1d458, 1, 2660 }, - { 0x1d459, 1, 610 }, - { 0x1d45a, 1, 2326 }, - { 0x1d45b, 1, 2181 }, - { 0x1d45c, 1, 14 }, - { 0x1d45d, 1, 2661 }, - { 0x1d45e, 1, 2662 }, - { 0x1d45f, 1, 591 }, - { 0x1d460, 1, 356 }, - { 0x1d461, 1, 2663 }, - { 0x1d462, 1, 2664 }, - { 0x1d463, 1, 2308 }, - { 0x1d464, 1, 595 }, - { 0x1d465, 1, 611 }, - { 0x1d466, 1, 596 }, - { 0x1d467, 1, 2665 }, - { 0x1d468, 1, 2649 }, - { 0x1d469, 1, 2223 }, - { 0x1d46a, 1, 2190 }, - { 0x1d46b, 1, 2236 }, - { 0x1d46c, 1, 2225 }, - { 0x1d46d, 1, 2226 }, - { 0x1d46e, 1, 2650 }, - { 0x1d46f, 1, 2203 }, - { 0x1d470, 1, 2205 }, - { 0x1d471, 1, 2651 }, - { 0x1d472, 1, 2222 }, - { 0x1d473, 1, 2206 }, - { 0x1d474, 1, 2227 }, - { 0x1d475, 1, 2207 }, - { 0x1d476, 1, 2652 }, - { 0x1d477, 1, 2210 }, - { 0x1d478, 1, 2211 }, - { 0x1d479, 1, 2212 }, - { 0x1d47a, 1, 2653 }, - { 0x1d47b, 1, 2654 }, - { 0x1d47c, 1, 2655 }, - { 0x1d47d, 1, 2283 }, - { 0x1d47e, 1, 2656 }, - { 0x1d47f, 1, 2295 }, - { 0x1d480, 1, 2657 }, - { 0x1d481, 1, 2220 }, - { 0x1d482, 1, 3 }, - { 0x1d483, 1, 2658 }, - { 0x1d484, 1, 2325 }, - { 0x1d485, 1, 2237 }, - { 0x1d486, 1, 2224 }, - { 0x1d487, 1, 2659 }, - { 0x1d488, 1, 2202 }, - { 0x1d489, 1, 588 }, - { 0x1d48a, 1, 2169 }, - { 0x1d48b, 1, 590 }, - { 0x1d48c, 1, 2660 }, - { 0x1d48d, 1, 610 }, - { 0x1d48e, 1, 2326 }, - { 0x1d48f, 1, 2181 }, - { 0x1d490, 1, 14 }, - { 0x1d491, 1, 2661 }, - { 0x1d492, 1, 2662 }, - { 0x1d493, 1, 591 }, - { 0x1d494, 1, 356 }, - { 0x1d495, 1, 2663 }, - { 0x1d496, 1, 2664 }, - { 0x1d497, 1, 2308 }, - { 0x1d498, 1, 595 }, - { 0x1d499, 1, 611 }, - { 0x1d49a, 1, 596 }, - { 0x1d49b, 1, 2665 }, - { 0x1d49c, 1, 2649 }, - { 0x1d49e, 1, 2190 }, - { 0x1d49f, 1, 2236 }, - { 0x1d4a2, 1, 2650 }, - { 0x1d4a5, 1, 2651 }, - { 0x1d4a6, 1, 2222 }, - { 0x1d4a9, 1, 2207 }, - { 0x1d4aa, 1, 2652 }, - { 0x1d4ab, 1, 2210 }, - { 0x1d4ac, 1, 2211 }, - { 0x1d4ae, 1, 2653 }, - { 0x1d4af, 1, 2654 }, - { 0x1d4b0, 1, 2655 }, - { 0x1d4b1, 1, 2283 }, - { 0x1d4b2, 1, 2656 }, - { 0x1d4b3, 1, 2295 }, - { 0x1d4b4, 1, 2657 }, - { 0x1d4b5, 1, 2220 }, - { 0x1d4b6, 1, 3 }, - { 0x1d4b7, 1, 2658 }, - { 0x1d4b8, 1, 2325 }, - { 0x1d4b9, 1, 2237 }, - { 0x1d4bb, 1, 2659 }, - { 0x1d4bd, 1, 588 }, - { 0x1d4be, 1, 2169 }, - { 0x1d4bf, 1, 590 }, - { 0x1d4c0, 1, 2660 }, - { 0x1d4c2, 1, 2326 }, - { 0x1d4c3, 1, 2181 }, - { 0x1d4c5, 1, 2661 }, - { 0x1d4c6, 1, 2662 }, - { 0x1d4c7, 1, 591 }, - { 0x1d4c8, 1, 356 }, - { 0x1d4c9, 1, 2663 }, - { 0x1d4ca, 1, 2664 }, - { 0x1d4cb, 1, 2308 }, - { 0x1d4cc, 1, 595 }, - { 0x1d4cd, 1, 611 }, - { 0x1d4ce, 1, 596 }, - { 0x1d4cf, 1, 2665 }, - { 0x1d4d0, 1, 2649 }, - { 0x1d4d1, 1, 2223 }, - { 0x1d4d2, 1, 2190 }, - { 0x1d4d3, 1, 2236 }, - { 0x1d4d4, 1, 2225 }, - { 0x1d4d5, 1, 2226 }, - { 0x1d4d6, 1, 2650 }, - { 0x1d4d7, 1, 2203 }, - { 0x1d4d8, 1, 2205 }, - { 0x1d4d9, 1, 2651 }, - { 0x1d4da, 1, 2222 }, - { 0x1d4db, 1, 2206 }, - { 0x1d4dc, 1, 2227 }, - { 0x1d4dd, 1, 2207 }, - { 0x1d4de, 1, 2652 }, - { 0x1d4df, 1, 2210 }, - { 0x1d4e0, 1, 2211 }, - { 0x1d4e1, 1, 2212 }, - { 0x1d4e2, 1, 2653 }, - { 0x1d4e3, 1, 2654 }, - { 0x1d4e4, 1, 2655 }, - { 0x1d4e5, 1, 2283 }, - { 0x1d4e6, 1, 2656 }, - { 0x1d4e7, 1, 2295 }, - { 0x1d4e8, 1, 2657 }, - { 0x1d4e9, 1, 2220 }, - { 0x1d4ea, 1, 3 }, - { 0x1d4eb, 1, 2658 }, - { 0x1d4ec, 1, 2325 }, - { 0x1d4ed, 1, 2237 }, - { 0x1d4ee, 1, 2224 }, - { 0x1d4ef, 1, 2659 }, - { 0x1d4f0, 1, 2202 }, - { 0x1d4f1, 1, 588 }, - { 0x1d4f2, 1, 2169 }, - { 0x1d4f3, 1, 590 }, - { 0x1d4f4, 1, 2660 }, - { 0x1d4f5, 1, 610 }, - { 0x1d4f6, 1, 2326 }, - { 0x1d4f7, 1, 2181 }, - { 0x1d4f8, 1, 14 }, - { 0x1d4f9, 1, 2661 }, - { 0x1d4fa, 1, 2662 }, - { 0x1d4fb, 1, 591 }, - { 0x1d4fc, 1, 356 }, - { 0x1d4fd, 1, 2663 }, - { 0x1d4fe, 1, 2664 }, - { 0x1d4ff, 1, 2308 }, - { 0x1d500, 1, 595 }, - { 0x1d501, 1, 611 }, - { 0x1d502, 1, 596 }, - { 0x1d503, 1, 2665 }, - { 0x1d504, 1, 2649 }, - { 0x1d505, 1, 2223 }, - { 0x1d507, 1, 2236 }, - { 0x1d508, 1, 2225 }, - { 0x1d509, 1, 2226 }, - { 0x1d50a, 1, 2650 }, - { 0x1d50d, 1, 2651 }, - { 0x1d50e, 1, 2222 }, - { 0x1d50f, 1, 2206 }, - { 0x1d510, 1, 2227 }, - { 0x1d511, 1, 2207 }, - { 0x1d512, 1, 2652 }, - { 0x1d513, 1, 2210 }, - { 0x1d514, 1, 2211 }, - { 0x1d516, 1, 2653 }, - { 0x1d517, 1, 2654 }, - { 0x1d518, 1, 2655 }, - { 0x1d519, 1, 2283 }, - { 0x1d51a, 1, 2656 }, - { 0x1d51b, 1, 2295 }, - { 0x1d51c, 1, 2657 }, - { 0x1d51e, 1, 3 }, - { 0x1d51f, 1, 2658 }, - { 0x1d520, 1, 2325 }, - { 0x1d521, 1, 2237 }, - { 0x1d522, 1, 2224 }, - { 0x1d523, 1, 2659 }, - { 0x1d524, 1, 2202 }, - { 0x1d525, 1, 588 }, - { 0x1d526, 1, 2169 }, - { 0x1d527, 1, 590 }, - { 0x1d528, 1, 2660 }, - { 0x1d529, 1, 610 }, - { 0x1d52a, 1, 2326 }, - { 0x1d52b, 1, 2181 }, - { 0x1d52c, 1, 14 }, - { 0x1d52d, 1, 2661 }, - { 0x1d52e, 1, 2662 }, - { 0x1d52f, 1, 591 }, - { 0x1d530, 1, 356 }, - { 0x1d531, 1, 2663 }, - { 0x1d532, 1, 2664 }, - { 0x1d533, 1, 2308 }, - { 0x1d534, 1, 595 }, - { 0x1d535, 1, 611 }, - { 0x1d536, 1, 596 }, - { 0x1d537, 1, 2665 }, - { 0x1d538, 1, 2649 }, - { 0x1d539, 1, 2223 }, - { 0x1d53b, 1, 2236 }, - { 0x1d53c, 1, 2225 }, - { 0x1d53d, 1, 2226 }, - { 0x1d53e, 1, 2650 }, - { 0x1d540, 1, 2205 }, - { 0x1d541, 1, 2651 }, - { 0x1d542, 1, 2222 }, - { 0x1d543, 1, 2206 }, - { 0x1d544, 1, 2227 }, - { 0x1d546, 1, 2652 }, - { 0x1d54a, 1, 2653 }, - { 0x1d54b, 1, 2654 }, - { 0x1d54c, 1, 2655 }, - { 0x1d54d, 1, 2283 }, - { 0x1d54e, 1, 2656 }, - { 0x1d54f, 1, 2295 }, - { 0x1d550, 1, 2657 }, - { 0x1d552, 1, 3 }, - { 0x1d553, 1, 2658 }, - { 0x1d554, 1, 2325 }, - { 0x1d555, 1, 2237 }, - { 0x1d556, 1, 2224 }, - { 0x1d557, 1, 2659 }, - { 0x1d558, 1, 2202 }, - { 0x1d559, 1, 588 }, - { 0x1d55a, 1, 2169 }, - { 0x1d55b, 1, 590 }, - { 0x1d55c, 1, 2660 }, - { 0x1d55d, 1, 610 }, - { 0x1d55e, 1, 2326 }, - { 0x1d55f, 1, 2181 }, - { 0x1d560, 1, 14 }, - { 0x1d561, 1, 2661 }, - { 0x1d562, 1, 2662 }, - { 0x1d563, 1, 591 }, - { 0x1d564, 1, 356 }, - { 0x1d565, 1, 2663 }, - { 0x1d566, 1, 2664 }, - { 0x1d567, 1, 2308 }, - { 0x1d568, 1, 595 }, - { 0x1d569, 1, 611 }, - { 0x1d56a, 1, 596 }, - { 0x1d56b, 1, 2665 }, - { 0x1d56c, 1, 2649 }, - { 0x1d56d, 1, 2223 }, - { 0x1d56e, 1, 2190 }, - { 0x1d56f, 1, 2236 }, - { 0x1d570, 1, 2225 }, - { 0x1d571, 1, 2226 }, - { 0x1d572, 1, 2650 }, - { 0x1d573, 1, 2203 }, - { 0x1d574, 1, 2205 }, - { 0x1d575, 1, 2651 }, - { 0x1d576, 1, 2222 }, - { 0x1d577, 1, 2206 }, - { 0x1d578, 1, 2227 }, - { 0x1d579, 1, 2207 }, - { 0x1d57a, 1, 2652 }, - { 0x1d57b, 1, 2210 }, - { 0x1d57c, 1, 2211 }, - { 0x1d57d, 1, 2212 }, - { 0x1d57e, 1, 2653 }, - { 0x1d57f, 1, 2654 }, - { 0x1d580, 1, 2655 }, - { 0x1d581, 1, 2283 }, - { 0x1d582, 1, 2656 }, - { 0x1d583, 1, 2295 }, - { 0x1d584, 1, 2657 }, - { 0x1d585, 1, 2220 }, - { 0x1d586, 1, 3 }, - { 0x1d587, 1, 2658 }, - { 0x1d588, 1, 2325 }, - { 0x1d589, 1, 2237 }, - { 0x1d58a, 1, 2224 }, - { 0x1d58b, 1, 2659 }, - { 0x1d58c, 1, 2202 }, - { 0x1d58d, 1, 588 }, - { 0x1d58e, 1, 2169 }, - { 0x1d58f, 1, 590 }, - { 0x1d590, 1, 2660 }, - { 0x1d591, 1, 610 }, - { 0x1d592, 1, 2326 }, - { 0x1d593, 1, 2181 }, - { 0x1d594, 1, 14 }, - { 0x1d595, 1, 2661 }, - { 0x1d596, 1, 2662 }, - { 0x1d597, 1, 591 }, - { 0x1d598, 1, 356 }, - { 0x1d599, 1, 2663 }, - { 0x1d59a, 1, 2664 }, - { 0x1d59b, 1, 2308 }, - { 0x1d59c, 1, 595 }, - { 0x1d59d, 1, 611 }, - { 0x1d59e, 1, 596 }, - { 0x1d59f, 1, 2665 }, - { 0x1d5a0, 1, 2649 }, - { 0x1d5a1, 1, 2223 }, - { 0x1d5a2, 1, 2190 }, - { 0x1d5a3, 1, 2236 }, - { 0x1d5a4, 1, 2225 }, - { 0x1d5a5, 1, 2226 }, - { 0x1d5a6, 1, 2650 }, - { 0x1d5a7, 1, 2203 }, - { 0x1d5a8, 1, 2205 }, - { 0x1d5a9, 1, 2651 }, - { 0x1d5aa, 1, 2222 }, - { 0x1d5ab, 1, 2206 }, - { 0x1d5ac, 1, 2227 }, - { 0x1d5ad, 1, 2207 }, - { 0x1d5ae, 1, 2652 }, - { 0x1d5af, 1, 2210 }, - { 0x1d5b0, 1, 2211 }, - { 0x1d5b1, 1, 2212 }, - { 0x1d5b2, 1, 2653 }, - { 0x1d5b3, 1, 2654 }, - { 0x1d5b4, 1, 2655 }, - { 0x1d5b5, 1, 2283 }, - { 0x1d5b6, 1, 2656 }, - { 0x1d5b7, 1, 2295 }, - { 0x1d5b8, 1, 2657 }, - { 0x1d5b9, 1, 2220 }, - { 0x1d5ba, 1, 3 }, - { 0x1d5bb, 1, 2658 }, - { 0x1d5bc, 1, 2325 }, - { 0x1d5bd, 1, 2237 }, - { 0x1d5be, 1, 2224 }, - { 0x1d5bf, 1, 2659 }, - { 0x1d5c0, 1, 2202 }, - { 0x1d5c1, 1, 588 }, - { 0x1d5c2, 1, 2169 }, - { 0x1d5c3, 1, 590 }, - { 0x1d5c4, 1, 2660 }, - { 0x1d5c5, 1, 610 }, - { 0x1d5c6, 1, 2326 }, - { 0x1d5c7, 1, 2181 }, - { 0x1d5c8, 1, 14 }, - { 0x1d5c9, 1, 2661 }, - { 0x1d5ca, 1, 2662 }, - { 0x1d5cb, 1, 591 }, - { 0x1d5cc, 1, 356 }, - { 0x1d5cd, 1, 2663 }, - { 0x1d5ce, 1, 2664 }, - { 0x1d5cf, 1, 2308 }, - { 0x1d5d0, 1, 595 }, - { 0x1d5d1, 1, 611 }, - { 0x1d5d2, 1, 596 }, - { 0x1d5d3, 1, 2665 }, - { 0x1d5d4, 1, 2649 }, - { 0x1d5d5, 1, 2223 }, - { 0x1d5d6, 1, 2190 }, - { 0x1d5d7, 1, 2236 }, - { 0x1d5d8, 1, 2225 }, - { 0x1d5d9, 1, 2226 }, - { 0x1d5da, 1, 2650 }, - { 0x1d5db, 1, 2203 }, - { 0x1d5dc, 1, 2205 }, - { 0x1d5dd, 1, 2651 }, - { 0x1d5de, 1, 2222 }, - { 0x1d5df, 1, 2206 }, - { 0x1d5e0, 1, 2227 }, - { 0x1d5e1, 1, 2207 }, - { 0x1d5e2, 1, 2652 }, - { 0x1d5e3, 1, 2210 }, - { 0x1d5e4, 1, 2211 }, - { 0x1d5e5, 1, 2212 }, - { 0x1d5e6, 1, 2653 }, - { 0x1d5e7, 1, 2654 }, - { 0x1d5e8, 1, 2655 }, - { 0x1d5e9, 1, 2283 }, - { 0x1d5ea, 1, 2656 }, - { 0x1d5eb, 1, 2295 }, - { 0x1d5ec, 1, 2657 }, - { 0x1d5ed, 1, 2220 }, - { 0x1d5ee, 1, 3 }, - { 0x1d5ef, 1, 2658 }, - { 0x1d5f0, 1, 2325 }, - { 0x1d5f1, 1, 2237 }, - { 0x1d5f2, 1, 2224 }, - { 0x1d5f3, 1, 2659 }, - { 0x1d5f4, 1, 2202 }, - { 0x1d5f5, 1, 588 }, - { 0x1d5f6, 1, 2169 }, - { 0x1d5f7, 1, 590 }, - { 0x1d5f8, 1, 2660 }, - { 0x1d5f9, 1, 610 }, - { 0x1d5fa, 1, 2326 }, - { 0x1d5fb, 1, 2181 }, - { 0x1d5fc, 1, 14 }, - { 0x1d5fd, 1, 2661 }, - { 0x1d5fe, 1, 2662 }, - { 0x1d5ff, 1, 591 }, - { 0x1d600, 1, 356 }, - { 0x1d601, 1, 2663 }, - { 0x1d602, 1, 2664 }, - { 0x1d603, 1, 2308 }, - { 0x1d604, 1, 595 }, - { 0x1d605, 1, 611 }, - { 0x1d606, 1, 596 }, - { 0x1d607, 1, 2665 }, - { 0x1d608, 1, 2649 }, - { 0x1d609, 1, 2223 }, - { 0x1d60a, 1, 2190 }, - { 0x1d60b, 1, 2236 }, - { 0x1d60c, 1, 2225 }, - { 0x1d60d, 1, 2226 }, - { 0x1d60e, 1, 2650 }, - { 0x1d60f, 1, 2203 }, - { 0x1d610, 1, 2205 }, - { 0x1d611, 1, 2651 }, - { 0x1d612, 1, 2222 }, - { 0x1d613, 1, 2206 }, - { 0x1d614, 1, 2227 }, - { 0x1d615, 1, 2207 }, - { 0x1d616, 1, 2652 }, - { 0x1d617, 1, 2210 }, - { 0x1d618, 1, 2211 }, - { 0x1d619, 1, 2212 }, - { 0x1d61a, 1, 2653 }, - { 0x1d61b, 1, 2654 }, - { 0x1d61c, 1, 2655 }, - { 0x1d61d, 1, 2283 }, - { 0x1d61e, 1, 2656 }, - { 0x1d61f, 1, 2295 }, - { 0x1d620, 1, 2657 }, - { 0x1d621, 1, 2220 }, - { 0x1d622, 1, 3 }, - { 0x1d623, 1, 2658 }, - { 0x1d624, 1, 2325 }, - { 0x1d625, 1, 2237 }, - { 0x1d626, 1, 2224 }, - { 0x1d627, 1, 2659 }, - { 0x1d628, 1, 2202 }, - { 0x1d629, 1, 588 }, - { 0x1d62a, 1, 2169 }, - { 0x1d62b, 1, 590 }, - { 0x1d62c, 1, 2660 }, - { 0x1d62d, 1, 610 }, - { 0x1d62e, 1, 2326 }, - { 0x1d62f, 1, 2181 }, - { 0x1d630, 1, 14 }, - { 0x1d631, 1, 2661 }, - { 0x1d632, 1, 2662 }, - { 0x1d633, 1, 591 }, - { 0x1d634, 1, 356 }, - { 0x1d635, 1, 2663 }, - { 0x1d636, 1, 2664 }, - { 0x1d637, 1, 2308 }, - { 0x1d638, 1, 595 }, - { 0x1d639, 1, 611 }, - { 0x1d63a, 1, 596 }, - { 0x1d63b, 1, 2665 }, - { 0x1d63c, 1, 2649 }, - { 0x1d63d, 1, 2223 }, - { 0x1d63e, 1, 2190 }, - { 0x1d63f, 1, 2236 }, - { 0x1d640, 1, 2225 }, - { 0x1d641, 1, 2226 }, - { 0x1d642, 1, 2650 }, - { 0x1d643, 1, 2203 }, - { 0x1d644, 1, 2205 }, - { 0x1d645, 1, 2651 }, - { 0x1d646, 1, 2222 }, - { 0x1d647, 1, 2206 }, - { 0x1d648, 1, 2227 }, - { 0x1d649, 1, 2207 }, - { 0x1d64a, 1, 2652 }, - { 0x1d64b, 1, 2210 }, - { 0x1d64c, 1, 2211 }, - { 0x1d64d, 1, 2212 }, - { 0x1d64e, 1, 2653 }, - { 0x1d64f, 1, 2654 }, - { 0x1d650, 1, 2655 }, - { 0x1d651, 1, 2283 }, - { 0x1d652, 1, 2656 }, - { 0x1d653, 1, 2295 }, - { 0x1d654, 1, 2657 }, - { 0x1d655, 1, 2220 }, - { 0x1d656, 1, 3 }, - { 0x1d657, 1, 2658 }, - { 0x1d658, 1, 2325 }, - { 0x1d659, 1, 2237 }, - { 0x1d65a, 1, 2224 }, - { 0x1d65b, 1, 2659 }, - { 0x1d65c, 1, 2202 }, - { 0x1d65d, 1, 588 }, - { 0x1d65e, 1, 2169 }, - { 0x1d65f, 1, 590 }, - { 0x1d660, 1, 2660 }, - { 0x1d661, 1, 610 }, - { 0x1d662, 1, 2326 }, - { 0x1d663, 1, 2181 }, - { 0x1d664, 1, 14 }, - { 0x1d665, 1, 2661 }, - { 0x1d666, 1, 2662 }, - { 0x1d667, 1, 591 }, - { 0x1d668, 1, 356 }, - { 0x1d669, 1, 2663 }, - { 0x1d66a, 1, 2664 }, - { 0x1d66b, 1, 2308 }, - { 0x1d66c, 1, 595 }, - { 0x1d66d, 1, 611 }, - { 0x1d66e, 1, 596 }, - { 0x1d66f, 1, 2665 }, - { 0x1d670, 1, 2649 }, - { 0x1d671, 1, 2223 }, - { 0x1d672, 1, 2190 }, - { 0x1d673, 1, 2236 }, - { 0x1d674, 1, 2225 }, - { 0x1d675, 1, 2226 }, - { 0x1d676, 1, 2650 }, - { 0x1d677, 1, 2203 }, - { 0x1d678, 1, 2205 }, - { 0x1d679, 1, 2651 }, - { 0x1d67a, 1, 2222 }, - { 0x1d67b, 1, 2206 }, - { 0x1d67c, 1, 2227 }, - { 0x1d67d, 1, 2207 }, - { 0x1d67e, 1, 2652 }, - { 0x1d67f, 1, 2210 }, - { 0x1d680, 1, 2211 }, - { 0x1d681, 1, 2212 }, - { 0x1d682, 1, 2653 }, - { 0x1d683, 1, 2654 }, - { 0x1d684, 1, 2655 }, - { 0x1d685, 1, 2283 }, - { 0x1d686, 1, 2656 }, - { 0x1d687, 1, 2295 }, - { 0x1d688, 1, 2657 }, - { 0x1d689, 1, 2220 }, - { 0x1d68a, 1, 3 }, - { 0x1d68b, 1, 2658 }, - { 0x1d68c, 1, 2325 }, - { 0x1d68d, 1, 2237 }, - { 0x1d68e, 1, 2224 }, - { 0x1d68f, 1, 2659 }, - { 0x1d690, 1, 2202 }, - { 0x1d691, 1, 588 }, - { 0x1d692, 1, 2169 }, - { 0x1d693, 1, 590 }, - { 0x1d694, 1, 2660 }, - { 0x1d695, 1, 610 }, - { 0x1d696, 1, 2326 }, - { 0x1d697, 1, 2181 }, - { 0x1d698, 1, 14 }, - { 0x1d699, 1, 2661 }, - { 0x1d69a, 1, 2662 }, - { 0x1d69b, 1, 591 }, - { 0x1d69c, 1, 356 }, - { 0x1d69d, 1, 2663 }, - { 0x1d69e, 1, 2664 }, - { 0x1d69f, 1, 2308 }, - { 0x1d6a0, 1, 595 }, - { 0x1d6a1, 1, 611 }, - { 0x1d6a2, 1, 596 }, - { 0x1d6a3, 1, 2665 }, - { 0x1d6a8, 1, 5630 }, - { 0x1d6a9, 1, 5631 }, - { 0x1d6aa, 1, 2233 }, - { 0x1d6ab, 1, 5632 }, - { 0x1d6ac, 1, 5633 }, - { 0x1d6ad, 1, 5634 }, - { 0x1d6ae, 1, 5635 }, - { 0x1d6af, 1, 676 }, - { 0x1d6b0, 1, 5636 }, - { 0x1d6b1, 1, 5637 }, - { 0x1d6b2, 1, 5638 }, - { 0x1d6b3, 1, 5639 }, - { 0x1d6b4, 1, 5640 }, - { 0x1d6b5, 1, 5641 }, - { 0x1d6b6, 1, 5642 }, - { 0x1d6b7, 1, 2234 }, - { 0x1d6b8, 1, 5643 }, - { 0x1d6b9, 1, 676 }, - { 0x1d6ba, 1, 5644 }, - { 0x1d6bb, 1, 5645 }, - { 0x1d6bc, 1, 670 }, - { 0x1d6bd, 1, 5646 }, - { 0x1d6be, 1, 5647 }, - { 0x1d6bf, 1, 5648 }, - { 0x1d6c0, 1, 2221 }, - { 0x1d6c1, 1, 5649 }, - { 0x1d6c2, 1, 5650 }, - { 0x1d6c3, 1, 668 }, - { 0x1d6c4, 1, 2232 }, - { 0x1d6c5, 1, 5651 }, - { 0x1d6c6, 1, 677 }, - { 0x1d6c7, 1, 5652 }, - { 0x1d6c8, 1, 5653 }, - { 0x1d6c9, 1, 669 }, - { 0x1d6ca, 1, 2025 }, - { 0x1d6cb, 1, 673 }, - { 0x1d6cc, 1, 5654 }, - { 0x1d6cd, 1, 10 }, - { 0x1d6ce, 1, 5655 }, - { 0x1d6cf, 1, 5656 }, - { 0x1d6d0, 1, 5657 }, - { 0x1d6d1, 1, 672 }, - { 0x1d6d2, 1, 674 }, - { 0x1d6d3, 1, 675 }, - { 0x1d6d4, 1, 5658 }, - { 0x1d6d5, 1, 5659 }, - { 0x1d6d6, 1, 5660 }, - { 0x1d6d7, 1, 671 }, - { 0x1d6d8, 1, 5661 }, - { 0x1d6d9, 1, 5662 }, - { 0x1d6da, 1, 5663 }, - { 0x1d6db, 1, 5664 }, - { 0x1d6dc, 1, 677 }, - { 0x1d6dd, 1, 669 }, - { 0x1d6de, 1, 673 }, - { 0x1d6df, 1, 671 }, - { 0x1d6e0, 1, 674 }, - { 0x1d6e1, 1, 672 }, - { 0x1d6e2, 1, 5630 }, - { 0x1d6e3, 1, 5631 }, - { 0x1d6e4, 1, 2233 }, - { 0x1d6e5, 1, 5632 }, - { 0x1d6e6, 1, 5633 }, - { 0x1d6e7, 1, 5634 }, - { 0x1d6e8, 1, 5635 }, - { 0x1d6e9, 1, 676 }, - { 0x1d6ea, 1, 5636 }, - { 0x1d6eb, 1, 5637 }, - { 0x1d6ec, 1, 5638 }, - { 0x1d6ed, 1, 5639 }, - { 0x1d6ee, 1, 5640 }, - { 0x1d6ef, 1, 5641 }, - { 0x1d6f0, 1, 5642 }, - { 0x1d6f1, 1, 2234 }, - { 0x1d6f2, 1, 5643 }, - { 0x1d6f3, 1, 676 }, - { 0x1d6f4, 1, 5644 }, - { 0x1d6f5, 1, 5645 }, - { 0x1d6f6, 1, 670 }, - { 0x1d6f7, 1, 5646 }, - { 0x1d6f8, 1, 5647 }, - { 0x1d6f9, 1, 5648 }, - { 0x1d6fa, 1, 2221 }, - { 0x1d6fb, 1, 5649 }, - { 0x1d6fc, 1, 5650 }, - { 0x1d6fd, 1, 668 }, - { 0x1d6fe, 1, 2232 }, - { 0x1d6ff, 1, 5651 }, - { 0x1d700, 1, 677 }, - { 0x1d701, 1, 5652 }, - { 0x1d702, 1, 5653 }, - { 0x1d703, 1, 669 }, - { 0x1d704, 1, 2025 }, - { 0x1d705, 1, 673 }, - { 0x1d706, 1, 5654 }, - { 0x1d707, 1, 10 }, - { 0x1d708, 1, 5655 }, - { 0x1d709, 1, 5656 }, - { 0x1d70a, 1, 5657 }, - { 0x1d70b, 1, 672 }, - { 0x1d70c, 1, 674 }, - { 0x1d70d, 1, 675 }, - { 0x1d70e, 1, 5658 }, - { 0x1d70f, 1, 5659 }, - { 0x1d710, 1, 5660 }, - { 0x1d711, 1, 671 }, - { 0x1d712, 1, 5661 }, - { 0x1d713, 1, 5662 }, - { 0x1d714, 1, 5663 }, - { 0x1d715, 1, 5664 }, - { 0x1d716, 1, 677 }, - { 0x1d717, 1, 669 }, - { 0x1d718, 1, 673 }, - { 0x1d719, 1, 671 }, - { 0x1d71a, 1, 674 }, - { 0x1d71b, 1, 672 }, - { 0x1d71c, 1, 5630 }, - { 0x1d71d, 1, 5631 }, - { 0x1d71e, 1, 2233 }, - { 0x1d71f, 1, 5632 }, - { 0x1d720, 1, 5633 }, - { 0x1d721, 1, 5634 }, - { 0x1d722, 1, 5635 }, - { 0x1d723, 1, 676 }, - { 0x1d724, 1, 5636 }, - { 0x1d725, 1, 5637 }, - { 0x1d726, 1, 5638 }, - { 0x1d727, 1, 5639 }, - { 0x1d728, 1, 5640 }, - { 0x1d729, 1, 5641 }, - { 0x1d72a, 1, 5642 }, - { 0x1d72b, 1, 2234 }, - { 0x1d72c, 1, 5643 }, - { 0x1d72d, 1, 676 }, - { 0x1d72e, 1, 5644 }, - { 0x1d72f, 1, 5645 }, - { 0x1d730, 1, 670 }, - { 0x1d731, 1, 5646 }, - { 0x1d732, 1, 5647 }, - { 0x1d733, 1, 5648 }, - { 0x1d734, 1, 2221 }, - { 0x1d735, 1, 5649 }, - { 0x1d736, 1, 5650 }, - { 0x1d737, 1, 668 }, - { 0x1d738, 1, 2232 }, - { 0x1d739, 1, 5651 }, - { 0x1d73a, 1, 677 }, - { 0x1d73b, 1, 5652 }, - { 0x1d73c, 1, 5653 }, - { 0x1d73d, 1, 669 }, - { 0x1d73e, 1, 2025 }, - { 0x1d73f, 1, 673 }, - { 0x1d740, 1, 5654 }, - { 0x1d741, 1, 10 }, - { 0x1d742, 1, 5655 }, - { 0x1d743, 1, 5656 }, - { 0x1d744, 1, 5657 }, - { 0x1d745, 1, 672 }, - { 0x1d746, 1, 674 }, - { 0x1d747, 1, 675 }, - { 0x1d748, 1, 5658 }, - { 0x1d749, 1, 5659 }, - { 0x1d74a, 1, 5660 }, - { 0x1d74b, 1, 671 }, - { 0x1d74c, 1, 5661 }, - { 0x1d74d, 1, 5662 }, - { 0x1d74e, 1, 5663 }, - { 0x1d74f, 1, 5664 }, - { 0x1d750, 1, 677 }, - { 0x1d751, 1, 669 }, - { 0x1d752, 1, 673 }, - { 0x1d753, 1, 671 }, - { 0x1d754, 1, 674 }, - { 0x1d755, 1, 672 }, - { 0x1d756, 1, 5630 }, - { 0x1d757, 1, 5631 }, - { 0x1d758, 1, 2233 }, - { 0x1d759, 1, 5632 }, - { 0x1d75a, 1, 5633 }, - { 0x1d75b, 1, 5634 }, - { 0x1d75c, 1, 5635 }, - { 0x1d75d, 1, 676 }, - { 0x1d75e, 1, 5636 }, - { 0x1d75f, 1, 5637 }, - { 0x1d760, 1, 5638 }, - { 0x1d761, 1, 5639 }, - { 0x1d762, 1, 5640 }, - { 0x1d763, 1, 5641 }, - { 0x1d764, 1, 5642 }, - { 0x1d765, 1, 2234 }, - { 0x1d766, 1, 5643 }, - { 0x1d767, 1, 676 }, - { 0x1d768, 1, 5644 }, - { 0x1d769, 1, 5645 }, - { 0x1d76a, 1, 670 }, - { 0x1d76b, 1, 5646 }, - { 0x1d76c, 1, 5647 }, - { 0x1d76d, 1, 5648 }, - { 0x1d76e, 1, 2221 }, - { 0x1d76f, 1, 5649 }, - { 0x1d770, 1, 5650 }, - { 0x1d771, 1, 668 }, - { 0x1d772, 1, 2232 }, - { 0x1d773, 1, 5651 }, - { 0x1d774, 1, 677 }, - { 0x1d775, 1, 5652 }, - { 0x1d776, 1, 5653 }, - { 0x1d777, 1, 669 }, - { 0x1d778, 1, 2025 }, - { 0x1d779, 1, 673 }, - { 0x1d77a, 1, 5654 }, - { 0x1d77b, 1, 10 }, - { 0x1d77c, 1, 5655 }, - { 0x1d77d, 1, 5656 }, - { 0x1d77e, 1, 5657 }, - { 0x1d77f, 1, 672 }, - { 0x1d780, 1, 674 }, - { 0x1d781, 1, 675 }, - { 0x1d782, 1, 5658 }, - { 0x1d783, 1, 5659 }, - { 0x1d784, 1, 5660 }, - { 0x1d785, 1, 671 }, - { 0x1d786, 1, 5661 }, - { 0x1d787, 1, 5662 }, - { 0x1d788, 1, 5663 }, - { 0x1d789, 1, 5664 }, - { 0x1d78a, 1, 677 }, - { 0x1d78b, 1, 669 }, - { 0x1d78c, 1, 673 }, - { 0x1d78d, 1, 671 }, - { 0x1d78e, 1, 674 }, - { 0x1d78f, 1, 672 }, - { 0x1d790, 1, 5630 }, - { 0x1d791, 1, 5631 }, - { 0x1d792, 1, 2233 }, - { 0x1d793, 1, 5632 }, - { 0x1d794, 1, 5633 }, - { 0x1d795, 1, 5634 }, - { 0x1d796, 1, 5635 }, - { 0x1d797, 1, 676 }, - { 0x1d798, 1, 5636 }, - { 0x1d799, 1, 5637 }, - { 0x1d79a, 1, 5638 }, - { 0x1d79b, 1, 5639 }, - { 0x1d79c, 1, 5640 }, - { 0x1d79d, 1, 5641 }, - { 0x1d79e, 1, 5642 }, - { 0x1d79f, 1, 2234 }, - { 0x1d7a0, 1, 5643 }, - { 0x1d7a1, 1, 676 }, - { 0x1d7a2, 1, 5644 }, - { 0x1d7a3, 1, 5645 }, - { 0x1d7a4, 1, 670 }, - { 0x1d7a5, 1, 5646 }, - { 0x1d7a6, 1, 5647 }, - { 0x1d7a7, 1, 5648 }, - { 0x1d7a8, 1, 2221 }, - { 0x1d7a9, 1, 5649 }, - { 0x1d7aa, 1, 5650 }, - { 0x1d7ab, 1, 668 }, - { 0x1d7ac, 1, 2232 }, - { 0x1d7ad, 1, 5651 }, - { 0x1d7ae, 1, 677 }, - { 0x1d7af, 1, 5652 }, - { 0x1d7b0, 1, 5653 }, - { 0x1d7b1, 1, 669 }, - { 0x1d7b2, 1, 2025 }, - { 0x1d7b3, 1, 673 }, - { 0x1d7b4, 1, 5654 }, - { 0x1d7b5, 1, 10 }, - { 0x1d7b6, 1, 5655 }, - { 0x1d7b7, 1, 5656 }, - { 0x1d7b8, 1, 5657 }, - { 0x1d7b9, 1, 672 }, - { 0x1d7ba, 1, 674 }, - { 0x1d7bb, 1, 675 }, - { 0x1d7bc, 1, 5658 }, - { 0x1d7bd, 1, 5659 }, - { 0x1d7be, 1, 5660 }, - { 0x1d7bf, 1, 671 }, - { 0x1d7c0, 1, 5661 }, - { 0x1d7c1, 1, 5662 }, - { 0x1d7c2, 1, 5663 }, - { 0x1d7c3, 1, 5664 }, - { 0x1d7c4, 1, 677 }, - { 0x1d7c5, 1, 669 }, - { 0x1d7c6, 1, 673 }, - { 0x1d7c7, 1, 671 }, - { 0x1d7c8, 1, 674 }, - { 0x1d7c9, 1, 672 }, - { 0x1d7ce, 1, 2168 }, - { 0x1d7cf, 1, 13 }, - { 0x1d7d0, 1, 6 }, - { 0x1d7d1, 1, 7 }, - { 0x1d7d2, 1, 2170 }, - { 0x1d7d3, 1, 2171 }, - { 0x1d7d4, 1, 2172 }, - { 0x1d7d5, 1, 2173 }, - { 0x1d7d6, 1, 2174 }, - { 0x1d7d7, 1, 2175 }, - { 0x1d7d8, 1, 2168 }, - { 0x1d7d9, 1, 13 }, - { 0x1d7da, 1, 6 }, - { 0x1d7db, 1, 7 }, - { 0x1d7dc, 1, 2170 }, - { 0x1d7dd, 1, 2171 }, - { 0x1d7de, 1, 2172 }, - { 0x1d7df, 1, 2173 }, - { 0x1d7e0, 1, 2174 }, - { 0x1d7e1, 1, 2175 }, - { 0x1d7e2, 1, 2168 }, - { 0x1d7e3, 1, 13 }, - { 0x1d7e4, 1, 6 }, - { 0x1d7e5, 1, 7 }, - { 0x1d7e6, 1, 2170 }, - { 0x1d7e7, 1, 2171 }, - { 0x1d7e8, 1, 2172 }, - { 0x1d7e9, 1, 2173 }, - { 0x1d7ea, 1, 2174 }, - { 0x1d7eb, 1, 2175 }, - { 0x1d7ec, 1, 2168 }, - { 0x1d7ed, 1, 13 }, - { 0x1d7ee, 1, 6 }, - { 0x1d7ef, 1, 7 }, - { 0x1d7f0, 1, 2170 }, - { 0x1d7f1, 1, 2171 }, - { 0x1d7f2, 1, 2172 }, - { 0x1d7f3, 1, 2173 }, - { 0x1d7f4, 1, 2174 }, - { 0x1d7f5, 1, 2175 }, - { 0x1d7f6, 1, 2168 }, - { 0x1d7f7, 1, 13 }, - { 0x1d7f8, 1, 6 }, - { 0x1d7f9, 1, 7 }, - { 0x1d7fa, 1, 2170 }, - { 0x1d7fb, 1, 2171 }, - { 0x1d7fc, 1, 2172 }, - { 0x1d7fd, 1, 2173 }, - { 0x1d7fe, 1, 2174 }, - { 0x1d7ff, 1, 2175 }, - { 0x2f800, 1, 5665 }, - { 0x2f801, 1, 5666 }, - { 0x2f802, 1, 5667 }, - { 0x2f803, 1, 5668 }, - { 0x2f804, 1, 5669 }, - { 0x2f805, 1, 4549 }, - { 0x2f806, 1, 5670 }, - { 0x2f807, 1, 5671 }, - { 0x2f808, 1, 5672 }, - { 0x2f809, 1, 5673 }, - { 0x2f80a, 1, 4550 }, - { 0x2f80b, 1, 5674 }, - { 0x2f80c, 1, 5675 }, - { 0x2f80d, 1, 5676 }, - { 0x2f80e, 1, 4551 }, - { 0x2f80f, 1, 5677 }, - { 0x2f810, 1, 5678 }, - { 0x2f811, 1, 5679 }, - { 0x2f812, 1, 5680 }, - { 0x2f813, 1, 5681 }, - { 0x2f814, 1, 5682 }, - { 0x2f815, 1, 5683 }, - { 0x2f816, 1, 5684 }, - { 0x2f817, 1, 5685 }, - { 0x2f818, 1, 5686 }, - { 0x2f819, 1, 5687 }, - { 0x2f81a, 1, 5688 }, - { 0x2f81b, 1, 5689 }, - { 0x2f81c, 1, 5690 }, - { 0x2f81d, 1, 2698 }, - { 0x2f81e, 1, 5691 }, - { 0x2f81f, 1, 5692 }, - { 0x2f820, 1, 5693 }, - { 0x2f821, 1, 5694 }, - { 0x2f822, 1, 5695 }, - { 0x2f823, 1, 5696 }, - { 0x2f824, 1, 5697 }, - { 0x2f825, 1, 5698 }, - { 0x2f826, 1, 4552 }, - { 0x2f827, 1, 4553 }, - { 0x2f828, 1, 5699 }, - { 0x2f829, 1, 5700 }, - { 0x2f82a, 1, 5701 }, - { 0x2f82b, 1, 4372 }, - { 0x2f82c, 1, 5702 }, - { 0x2f82d, 1, 4554 }, - { 0x2f82e, 1, 5703 }, - { 0x2f82f, 1, 5704 }, - { 0x2f830, 1, 5705 }, - { 0x2f831, 1, 5706 }, - { 0x2f832, 1, 5706 }, - { 0x2f833, 1, 5706 }, - { 0x2f834, 1, 5707 }, - { 0x2f835, 1, 5708 }, - { 0x2f836, 1, 5709 }, - { 0x2f837, 1, 5710 }, - { 0x2f838, 1, 5711 }, - { 0x2f839, 1, 5712 }, - { 0x2f83a, 1, 5713 }, - { 0x2f83b, 1, 5714 }, - { 0x2f83c, 1, 5715 }, - { 0x2f83d, 1, 5716 }, - { 0x2f83e, 1, 5717 }, - { 0x2f83f, 1, 5718 }, - { 0x2f840, 1, 5719 }, - { 0x2f841, 1, 5720 }, - { 0x2f842, 1, 5721 }, - { 0x2f843, 1, 5722 }, - { 0x2f844, 1, 5723 }, - { 0x2f845, 1, 5724 }, - { 0x2f846, 1, 5724 }, - { 0x2f847, 1, 5725 }, - { 0x2f848, 1, 5726 }, - { 0x2f849, 1, 5727 }, - { 0x2f84a, 1, 5728 }, - { 0x2f84b, 1, 5729 }, - { 0x2f84c, 1, 4556 }, - { 0x2f84d, 1, 5730 }, - { 0x2f84e, 1, 5731 }, - { 0x2f84f, 1, 5732 }, - { 0x2f850, 1, 4518 }, - { 0x2f851, 1, 5733 }, - { 0x2f852, 1, 5734 }, - { 0x2f853, 1, 5735 }, - { 0x2f854, 1, 5736 }, - { 0x2f855, 1, 5737 }, - { 0x2f856, 1, 5738 }, - { 0x2f857, 1, 5739 }, - { 0x2f858, 1, 5740 }, - { 0x2f859, 1, 5741 }, - { 0x2f85a, 1, 5742 }, - { 0x2f85b, 1, 5743 }, - { 0x2f85c, 1, 5744 }, - { 0x2f85d, 1, 5745 }, - { 0x2f85e, 1, 5746 }, - { 0x2f85f, 1, 5747 }, - { 0x2f860, 1, 5748 }, - { 0x2f861, 1, 5749 }, - { 0x2f862, 1, 5750 }, - { 0x2f863, 1, 5751 }, - { 0x2f864, 1, 5752 }, - { 0x2f865, 1, 5753 }, - { 0x2f866, 1, 5754 }, - { 0x2f867, 1, 5755 }, - { 0x2f868, 1, 5756 }, - { 0x2f869, 1, 5757 }, - { 0x2f86a, 1, 5758 }, - { 0x2f86b, 1, 5758 }, - { 0x2f86c, 1, 5759 }, - { 0x2f86d, 1, 5760 }, - { 0x2f86e, 1, 5761 }, - { 0x2f86f, 1, 4368 }, - { 0x2f870, 1, 5762 }, - { 0x2f871, 1, 5763 }, - { 0x2f872, 1, 5764 }, - { 0x2f873, 1, 5765 }, - { 0x2f874, 1, 5766 }, - { 0x2f875, 1, 2724 }, - { 0x2f876, 1, 5767 }, - { 0x2f877, 1, 5768 }, - { 0x2f878, 1, 2726 }, - { 0x2f879, 1, 5769 }, - { 0x2f87a, 1, 5770 }, - { 0x2f87b, 1, 5771 }, - { 0x2f87c, 1, 5772 }, - { 0x2f87d, 1, 5773 }, - { 0x2f87e, 1, 5774 }, - { 0x2f87f, 1, 5775 }, - { 0x2f880, 1, 5776 }, - { 0x2f881, 1, 5777 }, - { 0x2f882, 1, 5778 }, - { 0x2f883, 1, 5779 }, - { 0x2f884, 1, 5780 }, - { 0x2f885, 1, 5781 }, - { 0x2f886, 1, 5782 }, - { 0x2f887, 1, 5783 }, - { 0x2f888, 1, 5784 }, - { 0x2f889, 1, 5785 }, - { 0x2f88a, 1, 5786 }, - { 0x2f88b, 1, 5787 }, - { 0x2f88c, 1, 5788 }, - { 0x2f88d, 1, 5789 }, - { 0x2f88e, 1, 4316 }, - { 0x2f88f, 1, 5790 }, - { 0x2f890, 1, 2736 }, - { 0x2f891, 1, 5791 }, - { 0x2f892, 1, 5791 }, - { 0x2f893, 1, 5792 }, - { 0x2f894, 1, 5793 }, - { 0x2f895, 1, 5793 }, - { 0x2f896, 1, 5794 }, - { 0x2f897, 1, 5795 }, - { 0x2f898, 1, 5796 }, - { 0x2f899, 1, 5797 }, - { 0x2f89a, 1, 5798 }, - { 0x2f89b, 1, 5799 }, - { 0x2f89c, 1, 5800 }, - { 0x2f89d, 1, 5801 }, - { 0x2f89e, 1, 5802 }, - { 0x2f89f, 1, 5803 }, - { 0x2f8a0, 1, 5804 }, - { 0x2f8a1, 1, 5805 }, - { 0x2f8a2, 1, 5806 }, - { 0x2f8a3, 1, 4561 }, - { 0x2f8a4, 1, 5807 }, - { 0x2f8a5, 1, 5808 }, - { 0x2f8a6, 1, 5809 }, - { 0x2f8a7, 1, 5810 }, - { 0x2f8a8, 1, 5811 }, - { 0x2f8a9, 1, 5810 }, - { 0x2f8aa, 1, 5812 }, - { 0x2f8ab, 1, 4563 }, - { 0x2f8ac, 1, 5813 }, - { 0x2f8ad, 1, 5814 }, - { 0x2f8ae, 1, 5815 }, - { 0x2f8af, 1, 5816 }, - { 0x2f8b0, 1, 4564 }, - { 0x2f8b1, 1, 4289 }, - { 0x2f8b2, 1, 5817 }, - { 0x2f8b3, 1, 5818 }, - { 0x2f8b4, 1, 5819 }, - { 0x2f8b5, 1, 5820 }, - { 0x2f8b6, 1, 5821 }, - { 0x2f8b7, 1, 5822 }, - { 0x2f8b8, 1, 5823 }, - { 0x2f8b9, 1, 5824 }, - { 0x2f8ba, 1, 5825 }, - { 0x2f8bb, 1, 5826 }, - { 0x2f8bc, 1, 5827 }, - { 0x2f8bd, 1, 5828 }, - { 0x2f8be, 1, 5829 }, - { 0x2f8bf, 1, 5830 }, - { 0x2f8c0, 1, 5831 }, - { 0x2f8c1, 1, 5832 }, - { 0x2f8c2, 1, 5833 }, - { 0x2f8c3, 1, 5834 }, - { 0x2f8c4, 1, 5835 }, - { 0x2f8c5, 1, 5836 }, - { 0x2f8c6, 1, 5837 }, - { 0x2f8c7, 1, 5838 }, - { 0x2f8c8, 1, 4565 }, - { 0x2f8c9, 1, 5839 }, - { 0x2f8ca, 1, 5840 }, - { 0x2f8cb, 1, 5841 }, - { 0x2f8cc, 1, 5842 }, - { 0x2f8cd, 1, 5843 }, - { 0x2f8ce, 1, 5844 }, - { 0x2f8cf, 1, 4567 }, - { 0x2f8d0, 1, 5845 }, - { 0x2f8d1, 1, 5846 }, - { 0x2f8d2, 1, 5847 }, - { 0x2f8d3, 1, 5848 }, - { 0x2f8d4, 1, 5849 }, - { 0x2f8d5, 1, 5850 }, - { 0x2f8d6, 1, 5851 }, - { 0x2f8d7, 1, 5852 }, - { 0x2f8d8, 1, 4317 }, - { 0x2f8d9, 1, 5853 }, - { 0x2f8da, 1, 5854 }, - { 0x2f8db, 1, 5855 }, - { 0x2f8dc, 1, 5856 }, - { 0x2f8dd, 1, 5857 }, - { 0x2f8de, 1, 5858 }, - { 0x2f8df, 1, 5859 }, - { 0x2f8e0, 1, 5860 }, - { 0x2f8e1, 1, 5861 }, - { 0x2f8e2, 1, 4568 }, - { 0x2f8e3, 1, 5862 }, - { 0x2f8e4, 1, 5863 }, - { 0x2f8e5, 1, 5864 }, - { 0x2f8e6, 1, 5865 }, - { 0x2f8e7, 1, 5866 }, - { 0x2f8e8, 1, 5867 }, - { 0x2f8e9, 1, 5868 }, - { 0x2f8ea, 1, 5869 }, - { 0x2f8eb, 1, 5870 }, - { 0x2f8ec, 1, 5871 }, - { 0x2f8ed, 1, 5872 }, - { 0x2f8ee, 1, 5873 }, - { 0x2f8ef, 1, 5874 }, - { 0x2f8f0, 1, 5875 }, - { 0x2f8f1, 1, 5876 }, - { 0x2f8f2, 1, 5877 }, - { 0x2f8f3, 1, 5878 }, - { 0x2f8f4, 1, 5879 }, - { 0x2f8f5, 1, 4385 }, - { 0x2f8f6, 1, 5880 }, - { 0x2f8f7, 1, 5881 }, - { 0x2f8f8, 1, 5882 }, - { 0x2f8f9, 1, 5883 }, - { 0x2f8fa, 1, 5884 }, - { 0x2f8fb, 1, 5885 }, - { 0x2f8fc, 1, 5886 }, - { 0x2f8fd, 1, 5887 }, - { 0x2f8fe, 1, 5888 }, - { 0x2f8ff, 1, 5889 }, - { 0x2f900, 1, 5890 }, - { 0x2f901, 1, 4569 }, - { 0x2f902, 1, 4468 }, - { 0x2f903, 1, 5891 }, - { 0x2f904, 1, 5892 }, - { 0x2f905, 1, 5893 }, - { 0x2f906, 1, 5894 }, - { 0x2f907, 1, 5895 }, - { 0x2f908, 1, 5896 }, - { 0x2f909, 1, 5897 }, - { 0x2f90a, 1, 5898 }, - { 0x2f90b, 1, 5899 }, - { 0x2f90c, 1, 5900 }, - { 0x2f90d, 1, 5901 }, - { 0x2f90e, 1, 5902 }, - { 0x2f90f, 1, 5903 }, - { 0x2f910, 1, 5904 }, - { 0x2f911, 1, 5905 }, - { 0x2f912, 1, 5906 }, - { 0x2f913, 1, 5907 }, - { 0x2f914, 1, 5908 }, - { 0x2f915, 1, 5909 }, - { 0x2f916, 1, 5910 }, - { 0x2f917, 1, 5911 }, - { 0x2f918, 1, 5912 }, - { 0x2f919, 1, 5913 }, - { 0x2f91a, 1, 5914 }, - { 0x2f91b, 1, 5915 }, - { 0x2f91c, 1, 5916 }, - { 0x2f91d, 1, 5917 }, - { 0x2f91e, 1, 5918 }, - { 0x2f91f, 1, 5919 }, - { 0x2f920, 1, 5920 }, - { 0x2f921, 1, 5921 }, - { 0x2f922, 1, 5922 }, - { 0x2f923, 1, 5923 }, - { 0x2f924, 1, 5924 }, - { 0x2f925, 1, 5925 }, - { 0x2f926, 1, 5926 }, - { 0x2f927, 1, 5927 }, - { 0x2f928, 1, 5928 }, - { 0x2f929, 1, 5929 }, - { 0x2f92a, 1, 5930 }, - { 0x2f92b, 1, 5931 }, - { 0x2f92c, 1, 5932 }, - { 0x2f92d, 1, 5932 }, - { 0x2f92e, 1, 5933 }, - { 0x2f92f, 1, 5934 }, - { 0x2f930, 1, 5935 }, - { 0x2f931, 1, 5936 }, - { 0x2f932, 1, 5937 }, - { 0x2f933, 1, 5938 }, - { 0x2f934, 1, 5939 }, - { 0x2f935, 1, 5940 }, - { 0x2f936, 1, 5941 }, - { 0x2f937, 1, 5942 }, - { 0x2f938, 1, 4371 }, - { 0x2f939, 1, 5943 }, - { 0x2f93a, 1, 5944 }, - { 0x2f93b, 1, 5945 }, - { 0x2f93c, 1, 5946 }, - { 0x2f93d, 1, 5947 }, - { 0x2f93e, 1, 5948 }, - { 0x2f93f, 1, 5949 }, - { 0x2f940, 1, 5950 }, - { 0x2f941, 1, 5951 }, - { 0x2f942, 1, 5952 }, - { 0x2f943, 1, 5953 }, - { 0x2f944, 1, 5954 }, - { 0x2f945, 1, 5955 }, - { 0x2f946, 1, 5956 }, - { 0x2f947, 1, 5956 }, - { 0x2f948, 1, 5957 }, - { 0x2f949, 1, 5958 }, - { 0x2f94a, 1, 5959 }, - { 0x2f94b, 1, 5960 }, - { 0x2f94c, 1, 5961 }, - { 0x2f94d, 1, 5962 }, - { 0x2f94e, 1, 5963 }, - { 0x2f94f, 1, 4334 }, - { 0x2f950, 1, 5964 }, - { 0x2f951, 1, 5965 }, - { 0x2f952, 1, 5966 }, - { 0x2f953, 1, 4579 }, - { 0x2f954, 1, 5967 }, - { 0x2f955, 1, 5968 }, - { 0x2f956, 1, 4538 }, - { 0x2f957, 1, 5969 }, - { 0x2f958, 1, 5970 }, - { 0x2f959, 1, 4582 }, - { 0x2f95a, 1, 5971 }, - { 0x2f95b, 1, 5972 }, - { 0x2f95c, 1, 5973 }, - { 0x2f95d, 1, 5974 }, - { 0x2f95e, 1, 5974 }, - { 0x2f95f, 1, 5975 }, - { 0x2f960, 1, 5976 }, - { 0x2f961, 1, 5977 }, - { 0x2f962, 1, 5978 }, - { 0x2f963, 1, 5979 }, - { 0x2f964, 1, 5980 }, - { 0x2f965, 1, 5981 }, - { 0x2f966, 1, 5982 }, - { 0x2f967, 1, 5983 }, - { 0x2f968, 1, 5984 }, - { 0x2f969, 1, 5985 }, - { 0x2f96a, 1, 5986 }, - { 0x2f96b, 1, 5987 }, - { 0x2f96c, 1, 5988 }, - { 0x2f96d, 1, 5989 }, - { 0x2f96e, 1, 5990 }, - { 0x2f96f, 1, 5991 }, - { 0x2f970, 1, 5992 }, - { 0x2f971, 1, 5993 }, - { 0x2f972, 1, 5994 }, - { 0x2f973, 1, 5995 }, - { 0x2f974, 1, 5996 }, - { 0x2f975, 1, 5997 }, - { 0x2f976, 1, 5998 }, - { 0x2f977, 1, 5999 }, - { 0x2f978, 1, 6000 }, - { 0x2f979, 1, 6001 }, - { 0x2f97a, 1, 4588 }, - { 0x2f97b, 1, 6002 }, - { 0x2f97c, 1, 6003 }, - { 0x2f97d, 1, 6004 }, - { 0x2f97e, 1, 6005 }, - { 0x2f97f, 1, 6006 }, - { 0x2f980, 1, 6007 }, - { 0x2f981, 1, 6008 }, - { 0x2f982, 1, 6009 }, - { 0x2f983, 1, 6010 }, - { 0x2f984, 1, 6011 }, - { 0x2f985, 1, 6012 }, - { 0x2f986, 1, 6013 }, - { 0x2f987, 1, 6014 }, - { 0x2f988, 1, 6015 }, - { 0x2f989, 1, 6016 }, - { 0x2f98a, 1, 6017 }, - { 0x2f98b, 1, 5792 }, - { 0x2f98c, 1, 6018 }, - { 0x2f98d, 1, 6019 }, - { 0x2f98e, 1, 6020 }, - { 0x2f98f, 1, 6021 }, - { 0x2f990, 1, 6022 }, - { 0x2f991, 1, 6023 }, - { 0x2f992, 1, 6024 }, - { 0x2f993, 1, 6025 }, - { 0x2f994, 1, 6026 }, - { 0x2f995, 1, 6027 }, - { 0x2f996, 1, 6028 }, - { 0x2f997, 1, 6029 }, - { 0x2f998, 1, 4388 }, - { 0x2f999, 1, 6030 }, - { 0x2f99a, 1, 6031 }, - { 0x2f99b, 1, 6032 }, - { 0x2f99c, 1, 6033 }, - { 0x2f99d, 1, 6034 }, - { 0x2f99e, 1, 6035 }, - { 0x2f99f, 1, 4591 }, - { 0x2f9a0, 1, 6036 }, - { 0x2f9a1, 1, 6037 }, - { 0x2f9a2, 1, 6038 }, - { 0x2f9a3, 1, 6039 }, - { 0x2f9a4, 1, 6040 }, - { 0x2f9a5, 1, 6041 }, - { 0x2f9a6, 1, 6042 }, - { 0x2f9a7, 1, 6043 }, - { 0x2f9a8, 1, 6044 }, - { 0x2f9a9, 1, 6045 }, - { 0x2f9aa, 1, 6046 }, - { 0x2f9ab, 1, 6047 }, - { 0x2f9ac, 1, 6048 }, - { 0x2f9ad, 1, 6049 }, - { 0x2f9ae, 1, 6050 }, - { 0x2f9af, 1, 6051 }, - { 0x2f9b0, 1, 6052 }, - { 0x2f9b1, 1, 6053 }, - { 0x2f9b2, 1, 6054 }, - { 0x2f9b3, 1, 6055 }, - { 0x2f9b4, 1, 4329 }, - { 0x2f9b5, 1, 6056 }, - { 0x2f9b6, 1, 6057 }, - { 0x2f9b7, 1, 6058 }, - { 0x2f9b8, 1, 6059 }, - { 0x2f9b9, 1, 6060 }, - { 0x2f9ba, 1, 6061 }, - { 0x2f9bb, 1, 6062 }, - { 0x2f9bc, 1, 6063 }, - { 0x2f9bd, 1, 6064 }, - { 0x2f9be, 1, 6065 }, - { 0x2f9bf, 1, 6066 }, - { 0x2f9c0, 1, 6067 }, - { 0x2f9c1, 1, 6068 }, - { 0x2f9c2, 1, 6069 }, - { 0x2f9c3, 1, 6070 }, - { 0x2f9c4, 1, 2826 }, - { 0x2f9c5, 1, 6071 }, - { 0x2f9c6, 1, 6072 }, - { 0x2f9c7, 1, 6073 }, - { 0x2f9c8, 1, 6074 }, - { 0x2f9c9, 1, 6075 }, - { 0x2f9ca, 1, 6076 }, - { 0x2f9cb, 1, 6077 }, - { 0x2f9cc, 1, 6078 }, - { 0x2f9cd, 1, 6079 }, - { 0x2f9ce, 1, 6080 }, - { 0x2f9cf, 1, 6081 }, - { 0x2f9d0, 1, 6082 }, - { 0x2f9d1, 1, 6083 }, - { 0x2f9d2, 1, 2833 }, - { 0x2f9d3, 1, 6084 }, - { 0x2f9d4, 1, 6085 }, - { 0x2f9d5, 1, 6086 }, - { 0x2f9d6, 1, 6087 }, - { 0x2f9d7, 1, 6088 }, - { 0x2f9d8, 1, 6089 }, - { 0x2f9d9, 1, 6090 }, - { 0x2f9da, 1, 6091 }, - { 0x2f9db, 1, 6092 }, - { 0x2f9dc, 1, 6093 }, - { 0x2f9dd, 1, 6094 }, - { 0x2f9de, 1, 6095 }, - { 0x2f9df, 1, 6096 }, - { 0x2f9e0, 1, 6097 }, - { 0x2f9e1, 1, 6098 }, - { 0x2f9e2, 1, 6099 }, - { 0x2f9e3, 1, 6100 }, - { 0x2f9e4, 1, 6101 }, - { 0x2f9e5, 1, 6102 }, - { 0x2f9e6, 1, 6103 }, - { 0x2f9e7, 1, 6104 }, - { 0x2f9e8, 1, 6105 }, - { 0x2f9e9, 1, 6106 }, - { 0x2f9ea, 1, 6107 }, - { 0x2f9eb, 1, 6108 }, - { 0x2f9ec, 1, 6109 }, - { 0x2f9ed, 1, 6110 }, - { 0x2f9ee, 1, 6111 }, - { 0x2f9ef, 1, 6112 }, - { 0x2f9f0, 1, 6113 }, - { 0x2f9f1, 1, 6114 }, - { 0x2f9f2, 1, 6115 }, - { 0x2f9f3, 1, 6116 }, - { 0x2f9f4, 1, 6117 }, - { 0x2f9f5, 1, 6118 }, - { 0x2f9f6, 1, 6119 }, - { 0x2f9f7, 1, 6120 }, - { 0x2f9f8, 1, 6121 }, - { 0x2f9f9, 1, 6122 }, - { 0x2f9fa, 1, 6123 }, - { 0x2f9fb, 1, 6124 }, - { 0x2f9fc, 1, 6125 }, - { 0x2f9fd, 1, 6126 }, - { 0x2f9fe, 1, 6127 }, - { 0x2f9ff, 1, 6127 }, - { 0x2fa00, 1, 6128 }, - { 0x2fa01, 1, 6129 }, - { 0x2fa02, 1, 6130 }, - { 0x2fa03, 1, 6131 }, - { 0x2fa04, 1, 6132 }, - { 0x2fa05, 1, 6133 }, - { 0x2fa06, 1, 6134 }, - { 0x2fa07, 1, 6135 }, - { 0x2fa08, 1, 6136 }, - { 0x2fa09, 1, 6137 }, - { 0x2fa0a, 1, 6138 }, - { 0x2fa0b, 1, 6139 }, - { 0x2fa0c, 1, 6140 }, - { 0x2fa0d, 1, 6141 }, - { 0x2fa0e, 1, 6142 }, - { 0x2fa0f, 1, 6143 }, - { 0x2fa10, 1, 6144 }, - { 0x2fa11, 1, 6145 }, - { 0x2fa12, 1, 6146 }, - { 0x2fa13, 1, 6147 }, - { 0x2fa14, 1, 6148 }, - { 0x2fa15, 1, 2881 }, - { 0x2fa16, 1, 6149 }, - { 0x2fa17, 1, 2885 }, - { 0x2fa18, 1, 6150 }, - { 0x2fa19, 1, 6151 }, - { 0x2fa1a, 1, 6152 }, - { 0x2fa1b, 1, 6153 }, - { 0x2fa1c, 1, 2890 }, - { 0x2fa1d, 1, 6154 } -}; - -static const Unicode decomp_expansion[] = { - 0x20 /* offset 0 */ , - 0x20, 0x308 /* offset 1 */ , - 0x61 /* offset 3 */ , - 0x20, 0x304 /* offset 4 */ , - 0x32 /* offset 6 */ , - 0x33 /* offset 7 */ , - 0x20, 0x301 /* offset 8 */ , - 0x3bc /* offset 10 */ , - 0x20, 0x327 /* offset 11 */ , - 0x31 /* offset 13 */ , - 0x6f /* offset 14 */ , - 0x31, 0x2044, 0x34 /* offset 15 */ , - 0x31, 0x2044, 0x32 /* offset 18 */ , - 0x33, 0x2044, 0x34 /* offset 21 */ , - 0x41, 0x300 /* offset 24 */ , - 0x41, 0x301 /* offset 26 */ , - 0x41, 0x302 /* offset 28 */ , - 0x41, 0x303 /* offset 30 */ , - 0x41, 0x308 /* offset 32 */ , - 0x41, 0x30a /* offset 34 */ , - 0x43, 0x327 /* offset 36 */ , - 0x45, 0x300 /* offset 38 */ , - 0x45, 0x301 /* offset 40 */ , - 0x45, 0x302 /* offset 42 */ , - 0x45, 0x308 /* offset 44 */ , - 0x49, 0x300 /* offset 46 */ , - 0x49, 0x301 /* offset 48 */ , - 0x49, 0x302 /* offset 50 */ , - 0x49, 0x308 /* offset 52 */ , - 0x4e, 0x303 /* offset 54 */ , - 0x4f, 0x300 /* offset 56 */ , - 0x4f, 0x301 /* offset 58 */ , - 0x4f, 0x302 /* offset 60 */ , - 0x4f, 0x303 /* offset 62 */ , - 0x4f, 0x308 /* offset 64 */ , - 0x55, 0x300 /* offset 66 */ , - 0x55, 0x301 /* offset 68 */ , - 0x55, 0x302 /* offset 70 */ , - 0x55, 0x308 /* offset 72 */ , - 0x59, 0x301 /* offset 74 */ , - 0x61, 0x300 /* offset 76 */ , - 0x61, 0x301 /* offset 78 */ , - 0x61, 0x302 /* offset 80 */ , - 0x61, 0x303 /* offset 82 */ , - 0x61, 0x308 /* offset 84 */ , - 0x61, 0x30a /* offset 86 */ , - 0x63, 0x327 /* offset 88 */ , - 0x65, 0x300 /* offset 90 */ , - 0x65, 0x301 /* offset 92 */ , - 0x65, 0x302 /* offset 94 */ , - 0x65, 0x308 /* offset 96 */ , - 0x69, 0x300 /* offset 98 */ , - 0x69, 0x301 /* offset 100 */ , - 0x69, 0x302 /* offset 102 */ , - 0x69, 0x308 /* offset 104 */ , - 0x6e, 0x303 /* offset 106 */ , - 0x6f, 0x300 /* offset 108 */ , - 0x6f, 0x301 /* offset 110 */ , - 0x6f, 0x302 /* offset 112 */ , - 0x6f, 0x303 /* offset 114 */ , - 0x6f, 0x308 /* offset 116 */ , - 0x75, 0x300 /* offset 118 */ , - 0x75, 0x301 /* offset 120 */ , - 0x75, 0x302 /* offset 122 */ , - 0x75, 0x308 /* offset 124 */ , - 0x79, 0x301 /* offset 126 */ , - 0x79, 0x308 /* offset 128 */ , - 0x41, 0x304 /* offset 130 */ , - 0x61, 0x304 /* offset 132 */ , - 0x41, 0x306 /* offset 134 */ , - 0x61, 0x306 /* offset 136 */ , - 0x41, 0x328 /* offset 138 */ , - 0x61, 0x328 /* offset 140 */ , - 0x43, 0x301 /* offset 142 */ , - 0x63, 0x301 /* offset 144 */ , - 0x43, 0x302 /* offset 146 */ , - 0x63, 0x302 /* offset 148 */ , - 0x43, 0x307 /* offset 150 */ , - 0x63, 0x307 /* offset 152 */ , - 0x43, 0x30c /* offset 154 */ , - 0x63, 0x30c /* offset 156 */ , - 0x44, 0x30c /* offset 158 */ , - 0x64, 0x30c /* offset 160 */ , - 0x45, 0x304 /* offset 162 */ , - 0x65, 0x304 /* offset 164 */ , - 0x45, 0x306 /* offset 166 */ , - 0x65, 0x306 /* offset 168 */ , - 0x45, 0x307 /* offset 170 */ , - 0x65, 0x307 /* offset 172 */ , - 0x45, 0x328 /* offset 174 */ , - 0x65, 0x328 /* offset 176 */ , - 0x45, 0x30c /* offset 178 */ , - 0x65, 0x30c /* offset 180 */ , - 0x47, 0x302 /* offset 182 */ , - 0x67, 0x302 /* offset 184 */ , - 0x47, 0x306 /* offset 186 */ , - 0x67, 0x306 /* offset 188 */ , - 0x47, 0x307 /* offset 190 */ , - 0x67, 0x307 /* offset 192 */ , - 0x47, 0x327 /* offset 194 */ , - 0x67, 0x327 /* offset 196 */ , - 0x48, 0x302 /* offset 198 */ , - 0x68, 0x302 /* offset 200 */ , - 0x49, 0x303 /* offset 202 */ , - 0x69, 0x303 /* offset 204 */ , - 0x49, 0x304 /* offset 206 */ , - 0x69, 0x304 /* offset 208 */ , - 0x49, 0x306 /* offset 210 */ , - 0x69, 0x306 /* offset 212 */ , - 0x49, 0x328 /* offset 214 */ , - 0x69, 0x328 /* offset 216 */ , - 0x49, 0x307 /* offset 218 */ , - 0x49, 0x4a /* offset 220 */ , - 0x69, 0x6a /* offset 222 */ , - 0x4a, 0x302 /* offset 224 */ , - 0x6a, 0x302 /* offset 226 */ , - 0x4b, 0x327 /* offset 228 */ , - 0x6b, 0x327 /* offset 230 */ , - 0x4c, 0x301 /* offset 232 */ , - 0x6c, 0x301 /* offset 234 */ , - 0x4c, 0x327 /* offset 236 */ , - 0x6c, 0x327 /* offset 238 */ , - 0x4c, 0x30c /* offset 240 */ , - 0x6c, 0x30c /* offset 242 */ , - 0x4c, 0xb7 /* offset 244 */ , - 0x6c, 0xb7 /* offset 246 */ , - 0x4e, 0x301 /* offset 248 */ , - 0x6e, 0x301 /* offset 250 */ , - 0x4e, 0x327 /* offset 252 */ , - 0x6e, 0x327 /* offset 254 */ , - 0x4e, 0x30c /* offset 256 */ , - 0x6e, 0x30c /* offset 258 */ , - 0x2bc, 0x6e /* offset 260 */ , - 0x4f, 0x304 /* offset 262 */ , - 0x6f, 0x304 /* offset 264 */ , - 0x4f, 0x306 /* offset 266 */ , - 0x6f, 0x306 /* offset 268 */ , - 0x4f, 0x30b /* offset 270 */ , - 0x6f, 0x30b /* offset 272 */ , - 0x52, 0x301 /* offset 274 */ , - 0x72, 0x301 /* offset 276 */ , - 0x52, 0x327 /* offset 278 */ , - 0x72, 0x327 /* offset 280 */ , - 0x52, 0x30c /* offset 282 */ , - 0x72, 0x30c /* offset 284 */ , - 0x53, 0x301 /* offset 286 */ , - 0x73, 0x301 /* offset 288 */ , - 0x53, 0x302 /* offset 290 */ , - 0x73, 0x302 /* offset 292 */ , - 0x53, 0x327 /* offset 294 */ , - 0x73, 0x327 /* offset 296 */ , - 0x53, 0x30c /* offset 298 */ , - 0x73, 0x30c /* offset 300 */ , - 0x54, 0x327 /* offset 302 */ , - 0x74, 0x327 /* offset 304 */ , - 0x54, 0x30c /* offset 306 */ , - 0x74, 0x30c /* offset 308 */ , - 0x55, 0x303 /* offset 310 */ , - 0x75, 0x303 /* offset 312 */ , - 0x55, 0x304 /* offset 314 */ , - 0x75, 0x304 /* offset 316 */ , - 0x55, 0x306 /* offset 318 */ , - 0x75, 0x306 /* offset 320 */ , - 0x55, 0x30a /* offset 322 */ , - 0x75, 0x30a /* offset 324 */ , - 0x55, 0x30b /* offset 326 */ , - 0x75, 0x30b /* offset 328 */ , - 0x55, 0x328 /* offset 330 */ , - 0x75, 0x328 /* offset 332 */ , - 0x57, 0x302 /* offset 334 */ , - 0x77, 0x302 /* offset 336 */ , - 0x59, 0x302 /* offset 338 */ , - 0x79, 0x302 /* offset 340 */ , - 0x59, 0x308 /* offset 342 */ , - 0x5a, 0x301 /* offset 344 */ , - 0x7a, 0x301 /* offset 346 */ , - 0x5a, 0x307 /* offset 348 */ , - 0x7a, 0x307 /* offset 350 */ , - 0x5a, 0x30c /* offset 352 */ , - 0x7a, 0x30c /* offset 354 */ , - 0x73 /* offset 356 */ , - 0x4f, 0x31b /* offset 357 */ , - 0x6f, 0x31b /* offset 359 */ , - 0x55, 0x31b /* offset 361 */ , - 0x75, 0x31b /* offset 363 */ , - 0x44, 0x5a, 0x30c /* offset 365 */ , - 0x44, 0x7a, 0x30c /* offset 368 */ , - 0x64, 0x7a, 0x30c /* offset 371 */ , - 0x4c, 0x4a /* offset 374 */ , - 0x4c, 0x6a /* offset 376 */ , - 0x6c, 0x6a /* offset 378 */ , - 0x4e, 0x4a /* offset 380 */ , - 0x4e, 0x6a /* offset 382 */ , - 0x6e, 0x6a /* offset 384 */ , - 0x41, 0x30c /* offset 386 */ , - 0x61, 0x30c /* offset 388 */ , - 0x49, 0x30c /* offset 390 */ , - 0x69, 0x30c /* offset 392 */ , - 0x4f, 0x30c /* offset 394 */ , - 0x6f, 0x30c /* offset 396 */ , - 0x55, 0x30c /* offset 398 */ , - 0x75, 0x30c /* offset 400 */ , - 0x55, 0x308, 0x304 /* offset 402 */ , - 0x75, 0x308, 0x304 /* offset 405 */ , - 0x55, 0x308, 0x301 /* offset 408 */ , - 0x75, 0x308, 0x301 /* offset 411 */ , - 0x55, 0x308, 0x30c /* offset 414 */ , - 0x75, 0x308, 0x30c /* offset 417 */ , - 0x55, 0x308, 0x300 /* offset 420 */ , - 0x75, 0x308, 0x300 /* offset 423 */ , - 0x41, 0x308, 0x304 /* offset 426 */ , - 0x61, 0x308, 0x304 /* offset 429 */ , - 0x41, 0x307, 0x304 /* offset 432 */ , - 0x61, 0x307, 0x304 /* offset 435 */ , - 0xc6, 0x304 /* offset 438 */ , - 0xe6, 0x304 /* offset 440 */ , - 0x47, 0x30c /* offset 442 */ , - 0x67, 0x30c /* offset 444 */ , - 0x4b, 0x30c /* offset 446 */ , - 0x6b, 0x30c /* offset 448 */ , - 0x4f, 0x328 /* offset 450 */ , - 0x6f, 0x328 /* offset 452 */ , - 0x4f, 0x328, 0x304 /* offset 454 */ , - 0x6f, 0x328, 0x304 /* offset 457 */ , - 0x1b7, 0x30c /* offset 460 */ , - 0x292, 0x30c /* offset 462 */ , - 0x6a, 0x30c /* offset 464 */ , - 0x44, 0x5a /* offset 466 */ , - 0x44, 0x7a /* offset 468 */ , - 0x64, 0x7a /* offset 470 */ , - 0x47, 0x301 /* offset 472 */ , - 0x67, 0x301 /* offset 474 */ , - 0x4e, 0x300 /* offset 476 */ , - 0x6e, 0x300 /* offset 478 */ , - 0x41, 0x30a, 0x301 /* offset 480 */ , - 0x61, 0x30a, 0x301 /* offset 483 */ , - 0xc6, 0x301 /* offset 486 */ , - 0xe6, 0x301 /* offset 488 */ , - 0xd8, 0x301 /* offset 490 */ , - 0xf8, 0x301 /* offset 492 */ , - 0x41, 0x30f /* offset 494 */ , - 0x61, 0x30f /* offset 496 */ , - 0x41, 0x311 /* offset 498 */ , - 0x61, 0x311 /* offset 500 */ , - 0x45, 0x30f /* offset 502 */ , - 0x65, 0x30f /* offset 504 */ , - 0x45, 0x311 /* offset 506 */ , - 0x65, 0x311 /* offset 508 */ , - 0x49, 0x30f /* offset 510 */ , - 0x69, 0x30f /* offset 512 */ , - 0x49, 0x311 /* offset 514 */ , - 0x69, 0x311 /* offset 516 */ , - 0x4f, 0x30f /* offset 518 */ , - 0x6f, 0x30f /* offset 520 */ , - 0x4f, 0x311 /* offset 522 */ , - 0x6f, 0x311 /* offset 524 */ , - 0x52, 0x30f /* offset 526 */ , - 0x72, 0x30f /* offset 528 */ , - 0x52, 0x311 /* offset 530 */ , - 0x72, 0x311 /* offset 532 */ , - 0x55, 0x30f /* offset 534 */ , - 0x75, 0x30f /* offset 536 */ , - 0x55, 0x311 /* offset 538 */ , - 0x75, 0x311 /* offset 540 */ , - 0x53, 0x326 /* offset 542 */ , - 0x73, 0x326 /* offset 544 */ , - 0x54, 0x326 /* offset 546 */ , - 0x74, 0x326 /* offset 548 */ , - 0x48, 0x30c /* offset 550 */ , - 0x68, 0x30c /* offset 552 */ , - 0x41, 0x307 /* offset 554 */ , - 0x61, 0x307 /* offset 556 */ , - 0x45, 0x327 /* offset 558 */ , - 0x65, 0x327 /* offset 560 */ , - 0x4f, 0x308, 0x304 /* offset 562 */ , - 0x6f, 0x308, 0x304 /* offset 565 */ , - 0x4f, 0x303, 0x304 /* offset 568 */ , - 0x6f, 0x303, 0x304 /* offset 571 */ , - 0x4f, 0x307 /* offset 574 */ , - 0x6f, 0x307 /* offset 576 */ , - 0x4f, 0x307, 0x304 /* offset 578 */ , - 0x6f, 0x307, 0x304 /* offset 581 */ , - 0x59, 0x304 /* offset 584 */ , - 0x79, 0x304 /* offset 586 */ , - 0x68 /* offset 588 */ , - 0x266 /* offset 589 */ , - 0x6a /* offset 590 */ , - 0x72 /* offset 591 */ , - 0x279 /* offset 592 */ , - 0x27b /* offset 593 */ , - 0x281 /* offset 594 */ , - 0x77 /* offset 595 */ , - 0x79 /* offset 596 */ , - 0x20, 0x306 /* offset 597 */ , - 0x20, 0x307 /* offset 599 */ , - 0x20, 0x30a /* offset 601 */ , - 0x20, 0x328 /* offset 603 */ , - 0x20, 0x303 /* offset 605 */ , - 0x20, 0x30b /* offset 607 */ , - 0x263 /* offset 609 */ , - 0x6c /* offset 610 */ , - 0x78 /* offset 611 */ , - 0x295 /* offset 612 */ , - 0x300 /* offset 613 */ , - 0x301 /* offset 614 */ , - 0x313 /* offset 615 */ , - 0x308, 0x301 /* offset 616 */ , - 0x2b9 /* offset 618 */ , - 0x20, 0x345 /* offset 619 */ , - 0x3b /* offset 621 */ , - 0x20, 0x308, 0x301 /* offset 622 */ , - 0x391, 0x301 /* offset 625 */ , - 0xb7 /* offset 627 */ , - 0x395, 0x301 /* offset 628 */ , - 0x397, 0x301 /* offset 630 */ , - 0x399, 0x301 /* offset 632 */ , - 0x39f, 0x301 /* offset 634 */ , - 0x3a5, 0x301 /* offset 636 */ , - 0x3a9, 0x301 /* offset 638 */ , - 0x3b9, 0x308, 0x301 /* offset 640 */ , - 0x399, 0x308 /* offset 643 */ , - 0x3a5, 0x308 /* offset 645 */ , - 0x3b1, 0x301 /* offset 647 */ , - 0x3b5, 0x301 /* offset 649 */ , - 0x3b7, 0x301 /* offset 651 */ , - 0x3b9, 0x301 /* offset 653 */ , - 0x3c5, 0x308, 0x301 /* offset 655 */ , - 0x3b9, 0x308 /* offset 658 */ , - 0x3c5, 0x308 /* offset 660 */ , - 0x3bf, 0x301 /* offset 662 */ , - 0x3c5, 0x301 /* offset 664 */ , - 0x3c9, 0x301 /* offset 666 */ , - 0x3b2 /* offset 668 */ , - 0x3b8 /* offset 669 */ , - 0x3a5 /* offset 670 */ , - 0x3c6 /* offset 671 */ , - 0x3c0 /* offset 672 */ , - 0x3ba /* offset 673 */ , - 0x3c1 /* offset 674 */ , - 0x3c2 /* offset 675 */ , - 0x398 /* offset 676 */ , - 0x3b5 /* offset 677 */ , - 0x415, 0x300 /* offset 678 */ , - 0x415, 0x308 /* offset 680 */ , - 0x413, 0x301 /* offset 682 */ , - 0x406, 0x308 /* offset 684 */ , - 0x41a, 0x301 /* offset 686 */ , - 0x418, 0x300 /* offset 688 */ , - 0x423, 0x306 /* offset 690 */ , - 0x418, 0x306 /* offset 692 */ , - 0x438, 0x306 /* offset 694 */ , - 0x435, 0x300 /* offset 696 */ , - 0x435, 0x308 /* offset 698 */ , - 0x433, 0x301 /* offset 700 */ , - 0x456, 0x308 /* offset 702 */ , - 0x43a, 0x301 /* offset 704 */ , - 0x438, 0x300 /* offset 706 */ , - 0x443, 0x306 /* offset 708 */ , - 0x474, 0x30f /* offset 710 */ , - 0x475, 0x30f /* offset 712 */ , - 0x416, 0x306 /* offset 714 */ , - 0x436, 0x306 /* offset 716 */ , - 0x410, 0x306 /* offset 718 */ , - 0x430, 0x306 /* offset 720 */ , - 0x410, 0x308 /* offset 722 */ , - 0x430, 0x308 /* offset 724 */ , - 0x415, 0x306 /* offset 726 */ , - 0x435, 0x306 /* offset 728 */ , - 0x4d8, 0x308 /* offset 730 */ , - 0x4d9, 0x308 /* offset 732 */ , - 0x416, 0x308 /* offset 734 */ , - 0x436, 0x308 /* offset 736 */ , - 0x417, 0x308 /* offset 738 */ , - 0x437, 0x308 /* offset 740 */ , - 0x418, 0x304 /* offset 742 */ , - 0x438, 0x304 /* offset 744 */ , - 0x418, 0x308 /* offset 746 */ , - 0x438, 0x308 /* offset 748 */ , - 0x41e, 0x308 /* offset 750 */ , - 0x43e, 0x308 /* offset 752 */ , - 0x4e8, 0x308 /* offset 754 */ , - 0x4e9, 0x308 /* offset 756 */ , - 0x42d, 0x308 /* offset 758 */ , - 0x44d, 0x308 /* offset 760 */ , - 0x423, 0x304 /* offset 762 */ , - 0x443, 0x304 /* offset 764 */ , - 0x423, 0x308 /* offset 766 */ , - 0x443, 0x308 /* offset 768 */ , - 0x423, 0x30b /* offset 770 */ , - 0x443, 0x30b /* offset 772 */ , - 0x427, 0x308 /* offset 774 */ , - 0x447, 0x308 /* offset 776 */ , - 0x42b, 0x308 /* offset 778 */ , - 0x44b, 0x308 /* offset 780 */ , - 0x565, 0x582 /* offset 782 */ , - 0x627, 0x653 /* offset 784 */ , - 0x627, 0x654 /* offset 786 */ , - 0x648, 0x654 /* offset 788 */ , - 0x627, 0x655 /* offset 790 */ , - 0x64a, 0x654 /* offset 792 */ , - 0x627, 0x674 /* offset 794 */ , - 0x648, 0x674 /* offset 796 */ , - 0x6c7, 0x674 /* offset 798 */ , - 0x64a, 0x674 /* offset 800 */ , - 0x6d5, 0x654 /* offset 802 */ , - 0x6c1, 0x654 /* offset 804 */ , - 0x6d2, 0x654 /* offset 806 */ , - 0x928, 0x93c /* offset 808 */ , - 0x930, 0x93c /* offset 810 */ , - 0x933, 0x93c /* offset 812 */ , - 0x915, 0x93c /* offset 814 */ , - 0x916, 0x93c /* offset 816 */ , - 0x917, 0x93c /* offset 818 */ , - 0x91c, 0x93c /* offset 820 */ , - 0x921, 0x93c /* offset 822 */ , - 0x922, 0x93c /* offset 824 */ , - 0x92b, 0x93c /* offset 826 */ , - 0x92f, 0x93c /* offset 828 */ , - 0x9c7, 0x9be /* offset 830 */ , - 0x9c7, 0x9d7 /* offset 832 */ , - 0x9a1, 0x9bc /* offset 834 */ , - 0x9a2, 0x9bc /* offset 836 */ , - 0x9af, 0x9bc /* offset 838 */ , - 0xa32, 0xa3c /* offset 840 */ , - 0xa38, 0xa3c /* offset 842 */ , - 0xa16, 0xa3c /* offset 844 */ , - 0xa17, 0xa3c /* offset 846 */ , - 0xa1c, 0xa3c /* offset 848 */ , - 0xa2b, 0xa3c /* offset 850 */ , - 0xb47, 0xb56 /* offset 852 */ , - 0xb47, 0xb3e /* offset 854 */ , - 0xb47, 0xb57 /* offset 856 */ , - 0xb21, 0xb3c /* offset 858 */ , - 0xb22, 0xb3c /* offset 860 */ , - 0xb92, 0xbd7 /* offset 862 */ , - 0xbc6, 0xbbe /* offset 864 */ , - 0xbc7, 0xbbe /* offset 866 */ , - 0xbc6, 0xbd7 /* offset 868 */ , - 0xc46, 0xc56 /* offset 870 */ , - 0xcbf, 0xcd5 /* offset 872 */ , - 0xcc6, 0xcd5 /* offset 874 */ , - 0xcc6, 0xcd6 /* offset 876 */ , - 0xcc6, 0xcc2 /* offset 878 */ , - 0xcc6, 0xcc2, 0xcd5 /* offset 880 */ , - 0xd46, 0xd3e /* offset 883 */ , - 0xd47, 0xd3e /* offset 885 */ , - 0xd46, 0xd57 /* offset 887 */ , - 0xdd9, 0xdca /* offset 889 */ , - 0xdd9, 0xdcf /* offset 891 */ , - 0xdd9, 0xdcf, 0xdca /* offset 893 */ , - 0xdd9, 0xddf /* offset 896 */ , - 0xe4d, 0xe32 /* offset 898 */ , - 0xecd, 0xeb2 /* offset 900 */ , - 0xeab, 0xe99 /* offset 902 */ , - 0xeab, 0xea1 /* offset 904 */ , - 0xf0b /* offset 906 */ , - 0xf42, 0xfb7 /* offset 907 */ , - 0xf4c, 0xfb7 /* offset 909 */ , - 0xf51, 0xfb7 /* offset 911 */ , - 0xf56, 0xfb7 /* offset 913 */ , - 0xf5b, 0xfb7 /* offset 915 */ , - 0xf40, 0xfb5 /* offset 917 */ , - 0xf71, 0xf72 /* offset 919 */ , - 0xf71, 0xf74 /* offset 921 */ , - 0xfb2, 0xf80 /* offset 923 */ , - 0xfb2, 0xf71, 0xf80 /* offset 925 */ , - 0xfb3, 0xf80 /* offset 928 */ , - 0xfb3, 0xf71, 0xf80 /* offset 930 */ , - 0xf71, 0xf80 /* offset 933 */ , - 0xf92, 0xfb7 /* offset 935 */ , - 0xf9c, 0xfb7 /* offset 937 */ , - 0xfa1, 0xfb7 /* offset 939 */ , - 0xfa6, 0xfb7 /* offset 941 */ , - 0xfab, 0xfb7 /* offset 943 */ , - 0xf90, 0xfb5 /* offset 945 */ , - 0x1025, 0x102e /* offset 947 */ , - 0x41, 0x325 /* offset 949 */ , - 0x61, 0x325 /* offset 951 */ , - 0x42, 0x307 /* offset 953 */ , - 0x62, 0x307 /* offset 955 */ , - 0x42, 0x323 /* offset 957 */ , - 0x62, 0x323 /* offset 959 */ , - 0x42, 0x331 /* offset 961 */ , - 0x62, 0x331 /* offset 963 */ , - 0x43, 0x327, 0x301 /* offset 965 */ , - 0x63, 0x327, 0x301 /* offset 968 */ , - 0x44, 0x307 /* offset 971 */ , - 0x64, 0x307 /* offset 973 */ , - 0x44, 0x323 /* offset 975 */ , - 0x64, 0x323 /* offset 977 */ , - 0x44, 0x331 /* offset 979 */ , - 0x64, 0x331 /* offset 981 */ , - 0x44, 0x327 /* offset 983 */ , - 0x64, 0x327 /* offset 985 */ , - 0x44, 0x32d /* offset 987 */ , - 0x64, 0x32d /* offset 989 */ , - 0x45, 0x304, 0x300 /* offset 991 */ , - 0x65, 0x304, 0x300 /* offset 994 */ , - 0x45, 0x304, 0x301 /* offset 997 */ , - 0x65, 0x304, 0x301 /* offset 1000 */ , - 0x45, 0x32d /* offset 1003 */ , - 0x65, 0x32d /* offset 1005 */ , - 0x45, 0x330 /* offset 1007 */ , - 0x65, 0x330 /* offset 1009 */ , - 0x45, 0x327, 0x306 /* offset 1011 */ , - 0x65, 0x327, 0x306 /* offset 1014 */ , - 0x46, 0x307 /* offset 1017 */ , - 0x66, 0x307 /* offset 1019 */ , - 0x47, 0x304 /* offset 1021 */ , - 0x67, 0x304 /* offset 1023 */ , - 0x48, 0x307 /* offset 1025 */ , - 0x68, 0x307 /* offset 1027 */ , - 0x48, 0x323 /* offset 1029 */ , - 0x68, 0x323 /* offset 1031 */ , - 0x48, 0x308 /* offset 1033 */ , - 0x68, 0x308 /* offset 1035 */ , - 0x48, 0x327 /* offset 1037 */ , - 0x68, 0x327 /* offset 1039 */ , - 0x48, 0x32e /* offset 1041 */ , - 0x68, 0x32e /* offset 1043 */ , - 0x49, 0x330 /* offset 1045 */ , - 0x69, 0x330 /* offset 1047 */ , - 0x49, 0x308, 0x301 /* offset 1049 */ , - 0x69, 0x308, 0x301 /* offset 1052 */ , - 0x4b, 0x301 /* offset 1055 */ , - 0x6b, 0x301 /* offset 1057 */ , - 0x4b, 0x323 /* offset 1059 */ , - 0x6b, 0x323 /* offset 1061 */ , - 0x4b, 0x331 /* offset 1063 */ , - 0x6b, 0x331 /* offset 1065 */ , - 0x4c, 0x323 /* offset 1067 */ , - 0x6c, 0x323 /* offset 1069 */ , - 0x4c, 0x323, 0x304 /* offset 1071 */ , - 0x6c, 0x323, 0x304 /* offset 1074 */ , - 0x4c, 0x331 /* offset 1077 */ , - 0x6c, 0x331 /* offset 1079 */ , - 0x4c, 0x32d /* offset 1081 */ , - 0x6c, 0x32d /* offset 1083 */ , - 0x4d, 0x301 /* offset 1085 */ , - 0x6d, 0x301 /* offset 1087 */ , - 0x4d, 0x307 /* offset 1089 */ , - 0x6d, 0x307 /* offset 1091 */ , - 0x4d, 0x323 /* offset 1093 */ , - 0x6d, 0x323 /* offset 1095 */ , - 0x4e, 0x307 /* offset 1097 */ , - 0x6e, 0x307 /* offset 1099 */ , - 0x4e, 0x323 /* offset 1101 */ , - 0x6e, 0x323 /* offset 1103 */ , - 0x4e, 0x331 /* offset 1105 */ , - 0x6e, 0x331 /* offset 1107 */ , - 0x4e, 0x32d /* offset 1109 */ , - 0x6e, 0x32d /* offset 1111 */ , - 0x4f, 0x303, 0x301 /* offset 1113 */ , - 0x6f, 0x303, 0x301 /* offset 1116 */ , - 0x4f, 0x303, 0x308 /* offset 1119 */ , - 0x6f, 0x303, 0x308 /* offset 1122 */ , - 0x4f, 0x304, 0x300 /* offset 1125 */ , - 0x6f, 0x304, 0x300 /* offset 1128 */ , - 0x4f, 0x304, 0x301 /* offset 1131 */ , - 0x6f, 0x304, 0x301 /* offset 1134 */ , - 0x50, 0x301 /* offset 1137 */ , - 0x70, 0x301 /* offset 1139 */ , - 0x50, 0x307 /* offset 1141 */ , - 0x70, 0x307 /* offset 1143 */ , - 0x52, 0x307 /* offset 1145 */ , - 0x72, 0x307 /* offset 1147 */ , - 0x52, 0x323 /* offset 1149 */ , - 0x72, 0x323 /* offset 1151 */ , - 0x52, 0x323, 0x304 /* offset 1153 */ , - 0x72, 0x323, 0x304 /* offset 1156 */ , - 0x52, 0x331 /* offset 1159 */ , - 0x72, 0x331 /* offset 1161 */ , - 0x53, 0x307 /* offset 1163 */ , - 0x73, 0x307 /* offset 1165 */ , - 0x53, 0x323 /* offset 1167 */ , - 0x73, 0x323 /* offset 1169 */ , - 0x53, 0x301, 0x307 /* offset 1171 */ , - 0x73, 0x301, 0x307 /* offset 1174 */ , - 0x53, 0x30c, 0x307 /* offset 1177 */ , - 0x73, 0x30c, 0x307 /* offset 1180 */ , - 0x53, 0x323, 0x307 /* offset 1183 */ , - 0x73, 0x323, 0x307 /* offset 1186 */ , - 0x54, 0x307 /* offset 1189 */ , - 0x74, 0x307 /* offset 1191 */ , - 0x54, 0x323 /* offset 1193 */ , - 0x74, 0x323 /* offset 1195 */ , - 0x54, 0x331 /* offset 1197 */ , - 0x74, 0x331 /* offset 1199 */ , - 0x54, 0x32d /* offset 1201 */ , - 0x74, 0x32d /* offset 1203 */ , - 0x55, 0x324 /* offset 1205 */ , - 0x75, 0x324 /* offset 1207 */ , - 0x55, 0x330 /* offset 1209 */ , - 0x75, 0x330 /* offset 1211 */ , - 0x55, 0x32d /* offset 1213 */ , - 0x75, 0x32d /* offset 1215 */ , - 0x55, 0x303, 0x301 /* offset 1217 */ , - 0x75, 0x303, 0x301 /* offset 1220 */ , - 0x55, 0x304, 0x308 /* offset 1223 */ , - 0x75, 0x304, 0x308 /* offset 1226 */ , - 0x56, 0x303 /* offset 1229 */ , - 0x76, 0x303 /* offset 1231 */ , - 0x56, 0x323 /* offset 1233 */ , - 0x76, 0x323 /* offset 1235 */ , - 0x57, 0x300 /* offset 1237 */ , - 0x77, 0x300 /* offset 1239 */ , - 0x57, 0x301 /* offset 1241 */ , - 0x77, 0x301 /* offset 1243 */ , - 0x57, 0x308 /* offset 1245 */ , - 0x77, 0x308 /* offset 1247 */ , - 0x57, 0x307 /* offset 1249 */ , - 0x77, 0x307 /* offset 1251 */ , - 0x57, 0x323 /* offset 1253 */ , - 0x77, 0x323 /* offset 1255 */ , - 0x58, 0x307 /* offset 1257 */ , - 0x78, 0x307 /* offset 1259 */ , - 0x58, 0x308 /* offset 1261 */ , - 0x78, 0x308 /* offset 1263 */ , - 0x59, 0x307 /* offset 1265 */ , - 0x79, 0x307 /* offset 1267 */ , - 0x5a, 0x302 /* offset 1269 */ , - 0x7a, 0x302 /* offset 1271 */ , - 0x5a, 0x323 /* offset 1273 */ , - 0x7a, 0x323 /* offset 1275 */ , - 0x5a, 0x331 /* offset 1277 */ , - 0x7a, 0x331 /* offset 1279 */ , - 0x68, 0x331 /* offset 1281 */ , - 0x74, 0x308 /* offset 1283 */ , - 0x77, 0x30a /* offset 1285 */ , - 0x79, 0x30a /* offset 1287 */ , - 0x61, 0x2be /* offset 1289 */ , - 0x41, 0x323 /* offset 1291 */ , - 0x61, 0x323 /* offset 1293 */ , - 0x41, 0x309 /* offset 1295 */ , - 0x61, 0x309 /* offset 1297 */ , - 0x41, 0x302, 0x301 /* offset 1299 */ , - 0x61, 0x302, 0x301 /* offset 1302 */ , - 0x41, 0x302, 0x300 /* offset 1305 */ , - 0x61, 0x302, 0x300 /* offset 1308 */ , - 0x41, 0x302, 0x309 /* offset 1311 */ , - 0x61, 0x302, 0x309 /* offset 1314 */ , - 0x41, 0x302, 0x303 /* offset 1317 */ , - 0x61, 0x302, 0x303 /* offset 1320 */ , - 0x41, 0x323, 0x302 /* offset 1323 */ , - 0x61, 0x323, 0x302 /* offset 1326 */ , - 0x41, 0x306, 0x301 /* offset 1329 */ , - 0x61, 0x306, 0x301 /* offset 1332 */ , - 0x41, 0x306, 0x300 /* offset 1335 */ , - 0x61, 0x306, 0x300 /* offset 1338 */ , - 0x41, 0x306, 0x309 /* offset 1341 */ , - 0x61, 0x306, 0x309 /* offset 1344 */ , - 0x41, 0x306, 0x303 /* offset 1347 */ , - 0x61, 0x306, 0x303 /* offset 1350 */ , - 0x41, 0x323, 0x306 /* offset 1353 */ , - 0x61, 0x323, 0x306 /* offset 1356 */ , - 0x45, 0x323 /* offset 1359 */ , - 0x65, 0x323 /* offset 1361 */ , - 0x45, 0x309 /* offset 1363 */ , - 0x65, 0x309 /* offset 1365 */ , - 0x45, 0x303 /* offset 1367 */ , - 0x65, 0x303 /* offset 1369 */ , - 0x45, 0x302, 0x301 /* offset 1371 */ , - 0x65, 0x302, 0x301 /* offset 1374 */ , - 0x45, 0x302, 0x300 /* offset 1377 */ , - 0x65, 0x302, 0x300 /* offset 1380 */ , - 0x45, 0x302, 0x309 /* offset 1383 */ , - 0x65, 0x302, 0x309 /* offset 1386 */ , - 0x45, 0x302, 0x303 /* offset 1389 */ , - 0x65, 0x302, 0x303 /* offset 1392 */ , - 0x45, 0x323, 0x302 /* offset 1395 */ , - 0x65, 0x323, 0x302 /* offset 1398 */ , - 0x49, 0x309 /* offset 1401 */ , - 0x69, 0x309 /* offset 1403 */ , - 0x49, 0x323 /* offset 1405 */ , - 0x69, 0x323 /* offset 1407 */ , - 0x4f, 0x323 /* offset 1409 */ , - 0x6f, 0x323 /* offset 1411 */ , - 0x4f, 0x309 /* offset 1413 */ , - 0x6f, 0x309 /* offset 1415 */ , - 0x4f, 0x302, 0x301 /* offset 1417 */ , - 0x6f, 0x302, 0x301 /* offset 1420 */ , - 0x4f, 0x302, 0x300 /* offset 1423 */ , - 0x6f, 0x302, 0x300 /* offset 1426 */ , - 0x4f, 0x302, 0x309 /* offset 1429 */ , - 0x6f, 0x302, 0x309 /* offset 1432 */ , - 0x4f, 0x302, 0x303 /* offset 1435 */ , - 0x6f, 0x302, 0x303 /* offset 1438 */ , - 0x4f, 0x323, 0x302 /* offset 1441 */ , - 0x6f, 0x323, 0x302 /* offset 1444 */ , - 0x4f, 0x31b, 0x301 /* offset 1447 */ , - 0x6f, 0x31b, 0x301 /* offset 1450 */ , - 0x4f, 0x31b, 0x300 /* offset 1453 */ , - 0x6f, 0x31b, 0x300 /* offset 1456 */ , - 0x4f, 0x31b, 0x309 /* offset 1459 */ , - 0x6f, 0x31b, 0x309 /* offset 1462 */ , - 0x4f, 0x31b, 0x303 /* offset 1465 */ , - 0x6f, 0x31b, 0x303 /* offset 1468 */ , - 0x4f, 0x31b, 0x323 /* offset 1471 */ , - 0x6f, 0x31b, 0x323 /* offset 1474 */ , - 0x55, 0x323 /* offset 1477 */ , - 0x75, 0x323 /* offset 1479 */ , - 0x55, 0x309 /* offset 1481 */ , - 0x75, 0x309 /* offset 1483 */ , - 0x55, 0x31b, 0x301 /* offset 1485 */ , - 0x75, 0x31b, 0x301 /* offset 1488 */ , - 0x55, 0x31b, 0x300 /* offset 1491 */ , - 0x75, 0x31b, 0x300 /* offset 1494 */ , - 0x55, 0x31b, 0x309 /* offset 1497 */ , - 0x75, 0x31b, 0x309 /* offset 1500 */ , - 0x55, 0x31b, 0x303 /* offset 1503 */ , - 0x75, 0x31b, 0x303 /* offset 1506 */ , - 0x55, 0x31b, 0x323 /* offset 1509 */ , - 0x75, 0x31b, 0x323 /* offset 1512 */ , - 0x59, 0x300 /* offset 1515 */ , - 0x79, 0x300 /* offset 1517 */ , - 0x59, 0x323 /* offset 1519 */ , - 0x79, 0x323 /* offset 1521 */ , - 0x59, 0x309 /* offset 1523 */ , - 0x79, 0x309 /* offset 1525 */ , - 0x59, 0x303 /* offset 1527 */ , - 0x79, 0x303 /* offset 1529 */ , - 0x3b1, 0x313 /* offset 1531 */ , - 0x3b1, 0x314 /* offset 1533 */ , - 0x3b1, 0x313, 0x300 /* offset 1535 */ , - 0x3b1, 0x314, 0x300 /* offset 1538 */ , - 0x3b1, 0x313, 0x301 /* offset 1541 */ , - 0x3b1, 0x314, 0x301 /* offset 1544 */ , - 0x3b1, 0x313, 0x342 /* offset 1547 */ , - 0x3b1, 0x314, 0x342 /* offset 1550 */ , - 0x391, 0x313 /* offset 1553 */ , - 0x391, 0x314 /* offset 1555 */ , - 0x391, 0x313, 0x300 /* offset 1557 */ , - 0x391, 0x314, 0x300 /* offset 1560 */ , - 0x391, 0x313, 0x301 /* offset 1563 */ , - 0x391, 0x314, 0x301 /* offset 1566 */ , - 0x391, 0x313, 0x342 /* offset 1569 */ , - 0x391, 0x314, 0x342 /* offset 1572 */ , - 0x3b5, 0x313 /* offset 1575 */ , - 0x3b5, 0x314 /* offset 1577 */ , - 0x3b5, 0x313, 0x300 /* offset 1579 */ , - 0x3b5, 0x314, 0x300 /* offset 1582 */ , - 0x3b5, 0x313, 0x301 /* offset 1585 */ , - 0x3b5, 0x314, 0x301 /* offset 1588 */ , - 0x395, 0x313 /* offset 1591 */ , - 0x395, 0x314 /* offset 1593 */ , - 0x395, 0x313, 0x300 /* offset 1595 */ , - 0x395, 0x314, 0x300 /* offset 1598 */ , - 0x395, 0x313, 0x301 /* offset 1601 */ , - 0x395, 0x314, 0x301 /* offset 1604 */ , - 0x3b7, 0x313 /* offset 1607 */ , - 0x3b7, 0x314 /* offset 1609 */ , - 0x3b7, 0x313, 0x300 /* offset 1611 */ , - 0x3b7, 0x314, 0x300 /* offset 1614 */ , - 0x3b7, 0x313, 0x301 /* offset 1617 */ , - 0x3b7, 0x314, 0x301 /* offset 1620 */ , - 0x3b7, 0x313, 0x342 /* offset 1623 */ , - 0x3b7, 0x314, 0x342 /* offset 1626 */ , - 0x397, 0x313 /* offset 1629 */ , - 0x397, 0x314 /* offset 1631 */ , - 0x397, 0x313, 0x300 /* offset 1633 */ , - 0x397, 0x314, 0x300 /* offset 1636 */ , - 0x397, 0x313, 0x301 /* offset 1639 */ , - 0x397, 0x314, 0x301 /* offset 1642 */ , - 0x397, 0x313, 0x342 /* offset 1645 */ , - 0x397, 0x314, 0x342 /* offset 1648 */ , - 0x3b9, 0x313 /* offset 1651 */ , - 0x3b9, 0x314 /* offset 1653 */ , - 0x3b9, 0x313, 0x300 /* offset 1655 */ , - 0x3b9, 0x314, 0x300 /* offset 1658 */ , - 0x3b9, 0x313, 0x301 /* offset 1661 */ , - 0x3b9, 0x314, 0x301 /* offset 1664 */ , - 0x3b9, 0x313, 0x342 /* offset 1667 */ , - 0x3b9, 0x314, 0x342 /* offset 1670 */ , - 0x399, 0x313 /* offset 1673 */ , - 0x399, 0x314 /* offset 1675 */ , - 0x399, 0x313, 0x300 /* offset 1677 */ , - 0x399, 0x314, 0x300 /* offset 1680 */ , - 0x399, 0x313, 0x301 /* offset 1683 */ , - 0x399, 0x314, 0x301 /* offset 1686 */ , - 0x399, 0x313, 0x342 /* offset 1689 */ , - 0x399, 0x314, 0x342 /* offset 1692 */ , - 0x3bf, 0x313 /* offset 1695 */ , - 0x3bf, 0x314 /* offset 1697 */ , - 0x3bf, 0x313, 0x300 /* offset 1699 */ , - 0x3bf, 0x314, 0x300 /* offset 1702 */ , - 0x3bf, 0x313, 0x301 /* offset 1705 */ , - 0x3bf, 0x314, 0x301 /* offset 1708 */ , - 0x39f, 0x313 /* offset 1711 */ , - 0x39f, 0x314 /* offset 1713 */ , - 0x39f, 0x313, 0x300 /* offset 1715 */ , - 0x39f, 0x314, 0x300 /* offset 1718 */ , - 0x39f, 0x313, 0x301 /* offset 1721 */ , - 0x39f, 0x314, 0x301 /* offset 1724 */ , - 0x3c5, 0x313 /* offset 1727 */ , - 0x3c5, 0x314 /* offset 1729 */ , - 0x3c5, 0x313, 0x300 /* offset 1731 */ , - 0x3c5, 0x314, 0x300 /* offset 1734 */ , - 0x3c5, 0x313, 0x301 /* offset 1737 */ , - 0x3c5, 0x314, 0x301 /* offset 1740 */ , - 0x3c5, 0x313, 0x342 /* offset 1743 */ , - 0x3c5, 0x314, 0x342 /* offset 1746 */ , - 0x3a5, 0x314 /* offset 1749 */ , - 0x3a5, 0x314, 0x300 /* offset 1751 */ , - 0x3a5, 0x314, 0x301 /* offset 1754 */ , - 0x3a5, 0x314, 0x342 /* offset 1757 */ , - 0x3c9, 0x313 /* offset 1760 */ , - 0x3c9, 0x314 /* offset 1762 */ , - 0x3c9, 0x313, 0x300 /* offset 1764 */ , - 0x3c9, 0x314, 0x300 /* offset 1767 */ , - 0x3c9, 0x313, 0x301 /* offset 1770 */ , - 0x3c9, 0x314, 0x301 /* offset 1773 */ , - 0x3c9, 0x313, 0x342 /* offset 1776 */ , - 0x3c9, 0x314, 0x342 /* offset 1779 */ , - 0x3a9, 0x313 /* offset 1782 */ , - 0x3a9, 0x314 /* offset 1784 */ , - 0x3a9, 0x313, 0x300 /* offset 1786 */ , - 0x3a9, 0x314, 0x300 /* offset 1789 */ , - 0x3a9, 0x313, 0x301 /* offset 1792 */ , - 0x3a9, 0x314, 0x301 /* offset 1795 */ , - 0x3a9, 0x313, 0x342 /* offset 1798 */ , - 0x3a9, 0x314, 0x342 /* offset 1801 */ , - 0x3b1, 0x300 /* offset 1804 */ , - 0x3b5, 0x300 /* offset 1806 */ , - 0x3b7, 0x300 /* offset 1808 */ , - 0x3b9, 0x300 /* offset 1810 */ , - 0x3bf, 0x300 /* offset 1812 */ , - 0x3c5, 0x300 /* offset 1814 */ , - 0x3c9, 0x300 /* offset 1816 */ , - 0x3b1, 0x313, 0x345 /* offset 1818 */ , - 0x3b1, 0x314, 0x345 /* offset 1821 */ , - 0x3b1, 0x313, 0x300, 0x345 /* offset 1824 */ , - 0x3b1, 0x314, 0x300, 0x345 /* offset 1828 */ , - 0x3b1, 0x313, 0x301, 0x345 /* offset 1832 */ , - 0x3b1, 0x314, 0x301, 0x345 /* offset 1836 */ , - 0x3b1, 0x313, 0x342, 0x345 /* offset 1840 */ , - 0x3b1, 0x314, 0x342, 0x345 /* offset 1844 */ , - 0x391, 0x313, 0x345 /* offset 1848 */ , - 0x391, 0x314, 0x345 /* offset 1851 */ , - 0x391, 0x313, 0x300, 0x345 /* offset 1854 */ , - 0x391, 0x314, 0x300, 0x345 /* offset 1858 */ , - 0x391, 0x313, 0x301, 0x345 /* offset 1862 */ , - 0x391, 0x314, 0x301, 0x345 /* offset 1866 */ , - 0x391, 0x313, 0x342, 0x345 /* offset 1870 */ , - 0x391, 0x314, 0x342, 0x345 /* offset 1874 */ , - 0x3b7, 0x313, 0x345 /* offset 1878 */ , - 0x3b7, 0x314, 0x345 /* offset 1881 */ , - 0x3b7, 0x313, 0x300, 0x345 /* offset 1884 */ , - 0x3b7, 0x314, 0x300, 0x345 /* offset 1888 */ , - 0x3b7, 0x313, 0x301, 0x345 /* offset 1892 */ , - 0x3b7, 0x314, 0x301, 0x345 /* offset 1896 */ , - 0x3b7, 0x313, 0x342, 0x345 /* offset 1900 */ , - 0x3b7, 0x314, 0x342, 0x345 /* offset 1904 */ , - 0x397, 0x313, 0x345 /* offset 1908 */ , - 0x397, 0x314, 0x345 /* offset 1911 */ , - 0x397, 0x313, 0x300, 0x345 /* offset 1914 */ , - 0x397, 0x314, 0x300, 0x345 /* offset 1918 */ , - 0x397, 0x313, 0x301, 0x345 /* offset 1922 */ , - 0x397, 0x314, 0x301, 0x345 /* offset 1926 */ , - 0x397, 0x313, 0x342, 0x345 /* offset 1930 */ , - 0x397, 0x314, 0x342, 0x345 /* offset 1934 */ , - 0x3c9, 0x313, 0x345 /* offset 1938 */ , - 0x3c9, 0x314, 0x345 /* offset 1941 */ , - 0x3c9, 0x313, 0x300, 0x345 /* offset 1944 */ , - 0x3c9, 0x314, 0x300, 0x345 /* offset 1948 */ , - 0x3c9, 0x313, 0x301, 0x345 /* offset 1952 */ , - 0x3c9, 0x314, 0x301, 0x345 /* offset 1956 */ , - 0x3c9, 0x313, 0x342, 0x345 /* offset 1960 */ , - 0x3c9, 0x314, 0x342, 0x345 /* offset 1964 */ , - 0x3a9, 0x313, 0x345 /* offset 1968 */ , - 0x3a9, 0x314, 0x345 /* offset 1971 */ , - 0x3a9, 0x313, 0x300, 0x345 /* offset 1974 */ , - 0x3a9, 0x314, 0x300, 0x345 /* offset 1978 */ , - 0x3a9, 0x313, 0x301, 0x345 /* offset 1982 */ , - 0x3a9, 0x314, 0x301, 0x345 /* offset 1986 */ , - 0x3a9, 0x313, 0x342, 0x345 /* offset 1990 */ , - 0x3a9, 0x314, 0x342, 0x345 /* offset 1994 */ , - 0x3b1, 0x306 /* offset 1998 */ , - 0x3b1, 0x304 /* offset 2000 */ , - 0x3b1, 0x300, 0x345 /* offset 2002 */ , - 0x3b1, 0x345 /* offset 2005 */ , - 0x3b1, 0x301, 0x345 /* offset 2007 */ , - 0x3b1, 0x342 /* offset 2010 */ , - 0x3b1, 0x342, 0x345 /* offset 2012 */ , - 0x391, 0x306 /* offset 2015 */ , - 0x391, 0x304 /* offset 2017 */ , - 0x391, 0x300 /* offset 2019 */ , - 0x391, 0x345 /* offset 2021 */ , - 0x20, 0x313 /* offset 2023 */ , - 0x3b9 /* offset 2025 */ , - 0x20, 0x342 /* offset 2026 */ , - 0x20, 0x308, 0x342 /* offset 2028 */ , - 0x3b7, 0x300, 0x345 /* offset 2031 */ , - 0x3b7, 0x345 /* offset 2034 */ , - 0x3b7, 0x301, 0x345 /* offset 2036 */ , - 0x3b7, 0x342 /* offset 2039 */ , - 0x3b7, 0x342, 0x345 /* offset 2041 */ , - 0x395, 0x300 /* offset 2044 */ , - 0x397, 0x300 /* offset 2046 */ , - 0x397, 0x345 /* offset 2048 */ , - 0x20, 0x313, 0x300 /* offset 2050 */ , - 0x20, 0x313, 0x301 /* offset 2053 */ , - 0x20, 0x313, 0x342 /* offset 2056 */ , - 0x3b9, 0x306 /* offset 2059 */ , - 0x3b9, 0x304 /* offset 2061 */ , - 0x3b9, 0x308, 0x300 /* offset 2063 */ , - 0x3b9, 0x342 /* offset 2066 */ , - 0x3b9, 0x308, 0x342 /* offset 2068 */ , - 0x399, 0x306 /* offset 2071 */ , - 0x399, 0x304 /* offset 2073 */ , - 0x399, 0x300 /* offset 2075 */ , - 0x20, 0x314, 0x300 /* offset 2077 */ , - 0x20, 0x314, 0x301 /* offset 2080 */ , - 0x20, 0x314, 0x342 /* offset 2083 */ , - 0x3c5, 0x306 /* offset 2086 */ , - 0x3c5, 0x304 /* offset 2088 */ , - 0x3c5, 0x308, 0x300 /* offset 2090 */ , - 0x3c1, 0x313 /* offset 2093 */ , - 0x3c1, 0x314 /* offset 2095 */ , - 0x3c5, 0x342 /* offset 2097 */ , - 0x3c5, 0x308, 0x342 /* offset 2099 */ , - 0x3a5, 0x306 /* offset 2102 */ , - 0x3a5, 0x304 /* offset 2104 */ , - 0x3a5, 0x300 /* offset 2106 */ , - 0x3a1, 0x314 /* offset 2108 */ , - 0x20, 0x308, 0x300 /* offset 2110 */ , - 0x60 /* offset 2113 */ , - 0x3c9, 0x300, 0x345 /* offset 2114 */ , - 0x3c9, 0x345 /* offset 2117 */ , - 0x3c9, 0x301, 0x345 /* offset 2119 */ , - 0x3c9, 0x342 /* offset 2122 */ , - 0x3c9, 0x342, 0x345 /* offset 2124 */ , - 0x39f, 0x300 /* offset 2127 */ , - 0x3a9, 0x300 /* offset 2129 */ , - 0x3a9, 0x345 /* offset 2131 */ , - 0x20, 0x314 /* offset 2133 */ , - 0x2010 /* offset 2135 */ , - 0x20, 0x333 /* offset 2136 */ , - 0x2e /* offset 2138 */ , - 0x2e, 0x2e /* offset 2139 */ , - 0x2e, 0x2e, 0x2e /* offset 2141 */ , - 0x2032, 0x2032 /* offset 2144 */ , - 0x2032, 0x2032, 0x2032 /* offset 2146 */ , - 0x2035, 0x2035 /* offset 2149 */ , - 0x2035, 0x2035, 0x2035 /* offset 2151 */ , - 0x21, 0x21 /* offset 2154 */ , - 0x20, 0x305 /* offset 2156 */ , - 0x3f, 0x3f /* offset 2158 */ , - 0x3f, 0x21 /* offset 2160 */ , - 0x21, 0x3f /* offset 2162 */ , - 0x2032, 0x2032, 0x2032, 0x2032 /* offset 2164 */ , - 0x30 /* offset 2168 */ , - 0x69 /* offset 2169 */ , - 0x34 /* offset 2170 */ , - 0x35 /* offset 2171 */ , - 0x36 /* offset 2172 */ , - 0x37 /* offset 2173 */ , - 0x38 /* offset 2174 */ , - 0x39 /* offset 2175 */ , - 0x2b /* offset 2176 */ , - 0x2212 /* offset 2177 */ , - 0x3d /* offset 2178 */ , - 0x28 /* offset 2179 */ , - 0x29 /* offset 2180 */ , - 0x6e /* offset 2181 */ , - 0x52, 0x73 /* offset 2182 */ , - 0x61, 0x2f, 0x63 /* offset 2184 */ , - 0x61, 0x2f, 0x73 /* offset 2187 */ , - 0x43 /* offset 2190 */ , - 0xb0, 0x43 /* offset 2191 */ , - 0x63, 0x2f, 0x6f /* offset 2193 */ , - 0x63, 0x2f, 0x75 /* offset 2196 */ , - 0x190 /* offset 2199 */ , - 0xb0, 0x46 /* offset 2200 */ , - 0x67 /* offset 2202 */ , - 0x48 /* offset 2203 */ , - 0x127 /* offset 2204 */ , - 0x49 /* offset 2205 */ , - 0x4c /* offset 2206 */ , - 0x4e /* offset 2207 */ , - 0x4e, 0x6f /* offset 2208 */ , - 0x50 /* offset 2210 */ , - 0x51 /* offset 2211 */ , - 0x52 /* offset 2212 */ , - 0x53, 0x4d /* offset 2213 */ , - 0x54, 0x45, 0x4c /* offset 2215 */ , - 0x54, 0x4d /* offset 2218 */ , - 0x5a /* offset 2220 */ , - 0x3a9 /* offset 2221 */ , - 0x4b /* offset 2222 */ , - 0x42 /* offset 2223 */ , - 0x65 /* offset 2224 */ , - 0x45 /* offset 2225 */ , - 0x46 /* offset 2226 */ , - 0x4d /* offset 2227 */ , - 0x5d0 /* offset 2228 */ , - 0x5d1 /* offset 2229 */ , - 0x5d2 /* offset 2230 */ , - 0x5d3 /* offset 2231 */ , - 0x3b3 /* offset 2232 */ , - 0x393 /* offset 2233 */ , - 0x3a0 /* offset 2234 */ , - 0x2211 /* offset 2235 */ , - 0x44 /* offset 2236 */ , - 0x64 /* offset 2237 */ , - 0x31, 0x2044, 0x33 /* offset 2238 */ , - 0x32, 0x2044, 0x33 /* offset 2241 */ , - 0x31, 0x2044, 0x35 /* offset 2244 */ , - 0x32, 0x2044, 0x35 /* offset 2247 */ , - 0x33, 0x2044, 0x35 /* offset 2250 */ , - 0x34, 0x2044, 0x35 /* offset 2253 */ , - 0x31, 0x2044, 0x36 /* offset 2256 */ , - 0x35, 0x2044, 0x36 /* offset 2259 */ , - 0x31, 0x2044, 0x38 /* offset 2262 */ , - 0x33, 0x2044, 0x38 /* offset 2265 */ , - 0x35, 0x2044, 0x38 /* offset 2268 */ , - 0x37, 0x2044, 0x38 /* offset 2271 */ , - 0x31, 0x2044 /* offset 2274 */ , - 0x49, 0x49 /* offset 2276 */ , - 0x49, 0x49, 0x49 /* offset 2278 */ , - 0x49, 0x56 /* offset 2281 */ , - 0x56 /* offset 2283 */ , - 0x56, 0x49 /* offset 2284 */ , - 0x56, 0x49, 0x49 /* offset 2286 */ , - 0x56, 0x49, 0x49, 0x49 /* offset 2289 */ , - 0x49, 0x58 /* offset 2293 */ , - 0x58 /* offset 2295 */ , - 0x58, 0x49 /* offset 2296 */ , - 0x58, 0x49, 0x49 /* offset 2298 */ , - 0x69, 0x69 /* offset 2301 */ , - 0x69, 0x69, 0x69 /* offset 2303 */ , - 0x69, 0x76 /* offset 2306 */ , - 0x76 /* offset 2308 */ , - 0x76, 0x69 /* offset 2309 */ , - 0x76, 0x69, 0x69 /* offset 2311 */ , - 0x76, 0x69, 0x69, 0x69 /* offset 2314 */ , - 0x69, 0x78 /* offset 2318 */ , - 0x78, 0x69 /* offset 2320 */ , - 0x78, 0x69, 0x69 /* offset 2322 */ , - 0x63 /* offset 2325 */ , - 0x6d /* offset 2326 */ , - 0x2190, 0x338 /* offset 2327 */ , - 0x2192, 0x338 /* offset 2329 */ , - 0x2194, 0x338 /* offset 2331 */ , - 0x21d0, 0x338 /* offset 2333 */ , - 0x21d4, 0x338 /* offset 2335 */ , - 0x21d2, 0x338 /* offset 2337 */ , - 0x2203, 0x338 /* offset 2339 */ , - 0x2208, 0x338 /* offset 2341 */ , - 0x220b, 0x338 /* offset 2343 */ , - 0x2223, 0x338 /* offset 2345 */ , - 0x2225, 0x338 /* offset 2347 */ , - 0x222b, 0x222b /* offset 2349 */ , - 0x222b, 0x222b, 0x222b /* offset 2351 */ , - 0x222e, 0x222e /* offset 2354 */ , - 0x222e, 0x222e, 0x222e /* offset 2356 */ , - 0x223c, 0x338 /* offset 2359 */ , - 0x2243, 0x338 /* offset 2361 */ , - 0x2245, 0x338 /* offset 2363 */ , - 0x2248, 0x338 /* offset 2365 */ , - 0x3d, 0x338 /* offset 2367 */ , - 0x2261, 0x338 /* offset 2369 */ , - 0x224d, 0x338 /* offset 2371 */ , - 0x3c, 0x338 /* offset 2373 */ , - 0x3e, 0x338 /* offset 2375 */ , - 0x2264, 0x338 /* offset 2377 */ , - 0x2265, 0x338 /* offset 2379 */ , - 0x2272, 0x338 /* offset 2381 */ , - 0x2273, 0x338 /* offset 2383 */ , - 0x2276, 0x338 /* offset 2385 */ , - 0x2277, 0x338 /* offset 2387 */ , - 0x227a, 0x338 /* offset 2389 */ , - 0x227b, 0x338 /* offset 2391 */ , - 0x2282, 0x338 /* offset 2393 */ , - 0x2283, 0x338 /* offset 2395 */ , - 0x2286, 0x338 /* offset 2397 */ , - 0x2287, 0x338 /* offset 2399 */ , - 0x22a2, 0x338 /* offset 2401 */ , - 0x22a8, 0x338 /* offset 2403 */ , - 0x22a9, 0x338 /* offset 2405 */ , - 0x22ab, 0x338 /* offset 2407 */ , - 0x227c, 0x338 /* offset 2409 */ , - 0x227d, 0x338 /* offset 2411 */ , - 0x2291, 0x338 /* offset 2413 */ , - 0x2292, 0x338 /* offset 2415 */ , - 0x22b2, 0x338 /* offset 2417 */ , - 0x22b3, 0x338 /* offset 2419 */ , - 0x22b4, 0x338 /* offset 2421 */ , - 0x22b5, 0x338 /* offset 2423 */ , - 0x3008 /* offset 2425 */ , - 0x3009 /* offset 2426 */ , - 0x31, 0x30 /* offset 2427 */ , - 0x31, 0x31 /* offset 2429 */ , - 0x31, 0x32 /* offset 2431 */ , - 0x31, 0x33 /* offset 2433 */ , - 0x31, 0x34 /* offset 2435 */ , - 0x31, 0x35 /* offset 2437 */ , - 0x31, 0x36 /* offset 2439 */ , - 0x31, 0x37 /* offset 2441 */ , - 0x31, 0x38 /* offset 2443 */ , - 0x31, 0x39 /* offset 2445 */ , - 0x32, 0x30 /* offset 2447 */ , - 0x28, 0x31, 0x29 /* offset 2449 */ , - 0x28, 0x32, 0x29 /* offset 2452 */ , - 0x28, 0x33, 0x29 /* offset 2455 */ , - 0x28, 0x34, 0x29 /* offset 2458 */ , - 0x28, 0x35, 0x29 /* offset 2461 */ , - 0x28, 0x36, 0x29 /* offset 2464 */ , - 0x28, 0x37, 0x29 /* offset 2467 */ , - 0x28, 0x38, 0x29 /* offset 2470 */ , - 0x28, 0x39, 0x29 /* offset 2473 */ , - 0x28, 0x31, 0x30, 0x29 /* offset 2476 */ , - 0x28, 0x31, 0x31, 0x29 /* offset 2480 */ , - 0x28, 0x31, 0x32, 0x29 /* offset 2484 */ , - 0x28, 0x31, 0x33, 0x29 /* offset 2488 */ , - 0x28, 0x31, 0x34, 0x29 /* offset 2492 */ , - 0x28, 0x31, 0x35, 0x29 /* offset 2496 */ , - 0x28, 0x31, 0x36, 0x29 /* offset 2500 */ , - 0x28, 0x31, 0x37, 0x29 /* offset 2504 */ , - 0x28, 0x31, 0x38, 0x29 /* offset 2508 */ , - 0x28, 0x31, 0x39, 0x29 /* offset 2512 */ , - 0x28, 0x32, 0x30, 0x29 /* offset 2516 */ , - 0x31, 0x2e /* offset 2520 */ , - 0x32, 0x2e /* offset 2522 */ , - 0x33, 0x2e /* offset 2524 */ , - 0x34, 0x2e /* offset 2526 */ , - 0x35, 0x2e /* offset 2528 */ , - 0x36, 0x2e /* offset 2530 */ , - 0x37, 0x2e /* offset 2532 */ , - 0x38, 0x2e /* offset 2534 */ , - 0x39, 0x2e /* offset 2536 */ , - 0x31, 0x30, 0x2e /* offset 2538 */ , - 0x31, 0x31, 0x2e /* offset 2541 */ , - 0x31, 0x32, 0x2e /* offset 2544 */ , - 0x31, 0x33, 0x2e /* offset 2547 */ , - 0x31, 0x34, 0x2e /* offset 2550 */ , - 0x31, 0x35, 0x2e /* offset 2553 */ , - 0x31, 0x36, 0x2e /* offset 2556 */ , - 0x31, 0x37, 0x2e /* offset 2559 */ , - 0x31, 0x38, 0x2e /* offset 2562 */ , - 0x31, 0x39, 0x2e /* offset 2565 */ , - 0x32, 0x30, 0x2e /* offset 2568 */ , - 0x28, 0x61, 0x29 /* offset 2571 */ , - 0x28, 0x62, 0x29 /* offset 2574 */ , - 0x28, 0x63, 0x29 /* offset 2577 */ , - 0x28, 0x64, 0x29 /* offset 2580 */ , - 0x28, 0x65, 0x29 /* offset 2583 */ , - 0x28, 0x66, 0x29 /* offset 2586 */ , - 0x28, 0x67, 0x29 /* offset 2589 */ , - 0x28, 0x68, 0x29 /* offset 2592 */ , - 0x28, 0x69, 0x29 /* offset 2595 */ , - 0x28, 0x6a, 0x29 /* offset 2598 */ , - 0x28, 0x6b, 0x29 /* offset 2601 */ , - 0x28, 0x6c, 0x29 /* offset 2604 */ , - 0x28, 0x6d, 0x29 /* offset 2607 */ , - 0x28, 0x6e, 0x29 /* offset 2610 */ , - 0x28, 0x6f, 0x29 /* offset 2613 */ , - 0x28, 0x70, 0x29 /* offset 2616 */ , - 0x28, 0x71, 0x29 /* offset 2619 */ , - 0x28, 0x72, 0x29 /* offset 2622 */ , - 0x28, 0x73, 0x29 /* offset 2625 */ , - 0x28, 0x74, 0x29 /* offset 2628 */ , - 0x28, 0x75, 0x29 /* offset 2631 */ , - 0x28, 0x76, 0x29 /* offset 2634 */ , - 0x28, 0x77, 0x29 /* offset 2637 */ , - 0x28, 0x78, 0x29 /* offset 2640 */ , - 0x28, 0x79, 0x29 /* offset 2643 */ , - 0x28, 0x7a, 0x29 /* offset 2646 */ , - 0x41 /* offset 2649 */ , - 0x47 /* offset 2650 */ , - 0x4a /* offset 2651 */ , - 0x4f /* offset 2652 */ , - 0x53 /* offset 2653 */ , - 0x54 /* offset 2654 */ , - 0x55 /* offset 2655 */ , - 0x57 /* offset 2656 */ , - 0x59 /* offset 2657 */ , - 0x62 /* offset 2658 */ , - 0x66 /* offset 2659 */ , - 0x6b /* offset 2660 */ , - 0x70 /* offset 2661 */ , - 0x71 /* offset 2662 */ , - 0x74 /* offset 2663 */ , - 0x75 /* offset 2664 */ , - 0x7a /* offset 2665 */ , - 0x222b, 0x222b, 0x222b, 0x222b /* offset 2666 */ , - 0x3a, 0x3a, 0x3d /* offset 2670 */ , - 0x3d, 0x3d /* offset 2673 */ , - 0x3d, 0x3d, 0x3d /* offset 2675 */ , - 0x2add, 0x338 /* offset 2678 */ , - 0x6bcd /* offset 2680 */ , - 0x9f9f /* offset 2681 */ , - 0x4e00 /* offset 2682 */ , - 0x4e28 /* offset 2683 */ , - 0x4e36 /* offset 2684 */ , - 0x4e3f /* offset 2685 */ , - 0x4e59 /* offset 2686 */ , - 0x4e85 /* offset 2687 */ , - 0x4e8c /* offset 2688 */ , - 0x4ea0 /* offset 2689 */ , - 0x4eba /* offset 2690 */ , - 0x513f /* offset 2691 */ , - 0x5165 /* offset 2692 */ , - 0x516b /* offset 2693 */ , - 0x5182 /* offset 2694 */ , - 0x5196 /* offset 2695 */ , - 0x51ab /* offset 2696 */ , - 0x51e0 /* offset 2697 */ , - 0x51f5 /* offset 2698 */ , - 0x5200 /* offset 2699 */ , - 0x529b /* offset 2700 */ , - 0x52f9 /* offset 2701 */ , - 0x5315 /* offset 2702 */ , - 0x531a /* offset 2703 */ , - 0x5338 /* offset 2704 */ , - 0x5341 /* offset 2705 */ , - 0x535c /* offset 2706 */ , - 0x5369 /* offset 2707 */ , - 0x5382 /* offset 2708 */ , - 0x53b6 /* offset 2709 */ , - 0x53c8 /* offset 2710 */ , - 0x53e3 /* offset 2711 */ , - 0x56d7 /* offset 2712 */ , - 0x571f /* offset 2713 */ , - 0x58eb /* offset 2714 */ , - 0x5902 /* offset 2715 */ , - 0x590a /* offset 2716 */ , - 0x5915 /* offset 2717 */ , - 0x5927 /* offset 2718 */ , - 0x5973 /* offset 2719 */ , - 0x5b50 /* offset 2720 */ , - 0x5b80 /* offset 2721 */ , - 0x5bf8 /* offset 2722 */ , - 0x5c0f /* offset 2723 */ , - 0x5c22 /* offset 2724 */ , - 0x5c38 /* offset 2725 */ , - 0x5c6e /* offset 2726 */ , - 0x5c71 /* offset 2727 */ , - 0x5ddb /* offset 2728 */ , - 0x5de5 /* offset 2729 */ , - 0x5df1 /* offset 2730 */ , - 0x5dfe /* offset 2731 */ , - 0x5e72 /* offset 2732 */ , - 0x5e7a /* offset 2733 */ , - 0x5e7f /* offset 2734 */ , - 0x5ef4 /* offset 2735 */ , - 0x5efe /* offset 2736 */ , - 0x5f0b /* offset 2737 */ , - 0x5f13 /* offset 2738 */ , - 0x5f50 /* offset 2739 */ , - 0x5f61 /* offset 2740 */ , - 0x5f73 /* offset 2741 */ , - 0x5fc3 /* offset 2742 */ , - 0x6208 /* offset 2743 */ , - 0x6236 /* offset 2744 */ , - 0x624b /* offset 2745 */ , - 0x652f /* offset 2746 */ , - 0x6534 /* offset 2747 */ , - 0x6587 /* offset 2748 */ , - 0x6597 /* offset 2749 */ , - 0x65a4 /* offset 2750 */ , - 0x65b9 /* offset 2751 */ , - 0x65e0 /* offset 2752 */ , - 0x65e5 /* offset 2753 */ , - 0x66f0 /* offset 2754 */ , - 0x6708 /* offset 2755 */ , - 0x6728 /* offset 2756 */ , - 0x6b20 /* offset 2757 */ , - 0x6b62 /* offset 2758 */ , - 0x6b79 /* offset 2759 */ , - 0x6bb3 /* offset 2760 */ , - 0x6bcb /* offset 2761 */ , - 0x6bd4 /* offset 2762 */ , - 0x6bdb /* offset 2763 */ , - 0x6c0f /* offset 2764 */ , - 0x6c14 /* offset 2765 */ , - 0x6c34 /* offset 2766 */ , - 0x706b /* offset 2767 */ , - 0x722a /* offset 2768 */ , - 0x7236 /* offset 2769 */ , - 0x723b /* offset 2770 */ , - 0x723f /* offset 2771 */ , - 0x7247 /* offset 2772 */ , - 0x7259 /* offset 2773 */ , - 0x725b /* offset 2774 */ , - 0x72ac /* offset 2775 */ , - 0x7384 /* offset 2776 */ , - 0x7389 /* offset 2777 */ , - 0x74dc /* offset 2778 */ , - 0x74e6 /* offset 2779 */ , - 0x7518 /* offset 2780 */ , - 0x751f /* offset 2781 */ , - 0x7528 /* offset 2782 */ , - 0x7530 /* offset 2783 */ , - 0x758b /* offset 2784 */ , - 0x7592 /* offset 2785 */ , - 0x7676 /* offset 2786 */ , - 0x767d /* offset 2787 */ , - 0x76ae /* offset 2788 */ , - 0x76bf /* offset 2789 */ , - 0x76ee /* offset 2790 */ , - 0x77db /* offset 2791 */ , - 0x77e2 /* offset 2792 */ , - 0x77f3 /* offset 2793 */ , - 0x793a /* offset 2794 */ , - 0x79b8 /* offset 2795 */ , - 0x79be /* offset 2796 */ , - 0x7a74 /* offset 2797 */ , - 0x7acb /* offset 2798 */ , - 0x7af9 /* offset 2799 */ , - 0x7c73 /* offset 2800 */ , - 0x7cf8 /* offset 2801 */ , - 0x7f36 /* offset 2802 */ , - 0x7f51 /* offset 2803 */ , - 0x7f8a /* offset 2804 */ , - 0x7fbd /* offset 2805 */ , - 0x8001 /* offset 2806 */ , - 0x800c /* offset 2807 */ , - 0x8012 /* offset 2808 */ , - 0x8033 /* offset 2809 */ , - 0x807f /* offset 2810 */ , - 0x8089 /* offset 2811 */ , - 0x81e3 /* offset 2812 */ , - 0x81ea /* offset 2813 */ , - 0x81f3 /* offset 2814 */ , - 0x81fc /* offset 2815 */ , - 0x820c /* offset 2816 */ , - 0x821b /* offset 2817 */ , - 0x821f /* offset 2818 */ , - 0x826e /* offset 2819 */ , - 0x8272 /* offset 2820 */ , - 0x8278 /* offset 2821 */ , - 0x864d /* offset 2822 */ , - 0x866b /* offset 2823 */ , - 0x8840 /* offset 2824 */ , - 0x884c /* offset 2825 */ , - 0x8863 /* offset 2826 */ , - 0x897e /* offset 2827 */ , - 0x898b /* offset 2828 */ , - 0x89d2 /* offset 2829 */ , - 0x8a00 /* offset 2830 */ , - 0x8c37 /* offset 2831 */ , - 0x8c46 /* offset 2832 */ , - 0x8c55 /* offset 2833 */ , - 0x8c78 /* offset 2834 */ , - 0x8c9d /* offset 2835 */ , - 0x8d64 /* offset 2836 */ , - 0x8d70 /* offset 2837 */ , - 0x8db3 /* offset 2838 */ , - 0x8eab /* offset 2839 */ , - 0x8eca /* offset 2840 */ , - 0x8f9b /* offset 2841 */ , - 0x8fb0 /* offset 2842 */ , - 0x8fb5 /* offset 2843 */ , - 0x9091 /* offset 2844 */ , - 0x9149 /* offset 2845 */ , - 0x91c6 /* offset 2846 */ , - 0x91cc /* offset 2847 */ , - 0x91d1 /* offset 2848 */ , - 0x9577 /* offset 2849 */ , - 0x9580 /* offset 2850 */ , - 0x961c /* offset 2851 */ , - 0x96b6 /* offset 2852 */ , - 0x96b9 /* offset 2853 */ , - 0x96e8 /* offset 2854 */ , - 0x9751 /* offset 2855 */ , - 0x975e /* offset 2856 */ , - 0x9762 /* offset 2857 */ , - 0x9769 /* offset 2858 */ , - 0x97cb /* offset 2859 */ , - 0x97ed /* offset 2860 */ , - 0x97f3 /* offset 2861 */ , - 0x9801 /* offset 2862 */ , - 0x98a8 /* offset 2863 */ , - 0x98db /* offset 2864 */ , - 0x98df /* offset 2865 */ , - 0x9996 /* offset 2866 */ , - 0x9999 /* offset 2867 */ , - 0x99ac /* offset 2868 */ , - 0x9aa8 /* offset 2869 */ , - 0x9ad8 /* offset 2870 */ , - 0x9adf /* offset 2871 */ , - 0x9b25 /* offset 2872 */ , - 0x9b2f /* offset 2873 */ , - 0x9b32 /* offset 2874 */ , - 0x9b3c /* offset 2875 */ , - 0x9b5a /* offset 2876 */ , - 0x9ce5 /* offset 2877 */ , - 0x9e75 /* offset 2878 */ , - 0x9e7f /* offset 2879 */ , - 0x9ea5 /* offset 2880 */ , - 0x9ebb /* offset 2881 */ , - 0x9ec3 /* offset 2882 */ , - 0x9ecd /* offset 2883 */ , - 0x9ed1 /* offset 2884 */ , - 0x9ef9 /* offset 2885 */ , - 0x9efd /* offset 2886 */ , - 0x9f0e /* offset 2887 */ , - 0x9f13 /* offset 2888 */ , - 0x9f20 /* offset 2889 */ , - 0x9f3b /* offset 2890 */ , - 0x9f4a /* offset 2891 */ , - 0x9f52 /* offset 2892 */ , - 0x9f8d /* offset 2893 */ , - 0x9f9c /* offset 2894 */ , - 0x9fa0 /* offset 2895 */ , - 0x3012 /* offset 2896 */ , - 0x5344 /* offset 2897 */ , - 0x5345 /* offset 2898 */ , - 0x304b, 0x3099 /* offset 2899 */ , - 0x304d, 0x3099 /* offset 2901 */ , - 0x304f, 0x3099 /* offset 2903 */ , - 0x3051, 0x3099 /* offset 2905 */ , - 0x3053, 0x3099 /* offset 2907 */ , - 0x3055, 0x3099 /* offset 2909 */ , - 0x3057, 0x3099 /* offset 2911 */ , - 0x3059, 0x3099 /* offset 2913 */ , - 0x305b, 0x3099 /* offset 2915 */ , - 0x305d, 0x3099 /* offset 2917 */ , - 0x305f, 0x3099 /* offset 2919 */ , - 0x3061, 0x3099 /* offset 2921 */ , - 0x3064, 0x3099 /* offset 2923 */ , - 0x3066, 0x3099 /* offset 2925 */ , - 0x3068, 0x3099 /* offset 2927 */ , - 0x306f, 0x3099 /* offset 2929 */ , - 0x306f, 0x309a /* offset 2931 */ , - 0x3072, 0x3099 /* offset 2933 */ , - 0x3072, 0x309a /* offset 2935 */ , - 0x3075, 0x3099 /* offset 2937 */ , - 0x3075, 0x309a /* offset 2939 */ , - 0x3078, 0x3099 /* offset 2941 */ , - 0x3078, 0x309a /* offset 2943 */ , - 0x307b, 0x3099 /* offset 2945 */ , - 0x307b, 0x309a /* offset 2947 */ , - 0x3046, 0x3099 /* offset 2949 */ , - 0x20, 0x3099 /* offset 2951 */ , - 0x20, 0x309a /* offset 2953 */ , - 0x309d, 0x3099 /* offset 2955 */ , - 0x3088, 0x308a /* offset 2957 */ , - 0x30ab, 0x3099 /* offset 2959 */ , - 0x30ad, 0x3099 /* offset 2961 */ , - 0x30af, 0x3099 /* offset 2963 */ , - 0x30b1, 0x3099 /* offset 2965 */ , - 0x30b3, 0x3099 /* offset 2967 */ , - 0x30b5, 0x3099 /* offset 2969 */ , - 0x30b7, 0x3099 /* offset 2971 */ , - 0x30b9, 0x3099 /* offset 2973 */ , - 0x30bb, 0x3099 /* offset 2975 */ , - 0x30bd, 0x3099 /* offset 2977 */ , - 0x30bf, 0x3099 /* offset 2979 */ , - 0x30c1, 0x3099 /* offset 2981 */ , - 0x30c4, 0x3099 /* offset 2983 */ , - 0x30c6, 0x3099 /* offset 2985 */ , - 0x30c8, 0x3099 /* offset 2987 */ , - 0x30cf, 0x3099 /* offset 2989 */ , - 0x30cf, 0x309a /* offset 2991 */ , - 0x30d2, 0x3099 /* offset 2993 */ , - 0x30d2, 0x309a /* offset 2995 */ , - 0x30d5, 0x3099 /* offset 2997 */ , - 0x30d5, 0x309a /* offset 2999 */ , - 0x30d8, 0x3099 /* offset 3001 */ , - 0x30d8, 0x309a /* offset 3003 */ , - 0x30db, 0x3099 /* offset 3005 */ , - 0x30db, 0x309a /* offset 3007 */ , - 0x30a6, 0x3099 /* offset 3009 */ , - 0x30ef, 0x3099 /* offset 3011 */ , - 0x30f0, 0x3099 /* offset 3013 */ , - 0x30f1, 0x3099 /* offset 3015 */ , - 0x30f2, 0x3099 /* offset 3017 */ , - 0x30fd, 0x3099 /* offset 3019 */ , - 0x30b3, 0x30c8 /* offset 3021 */ , - 0x1100 /* offset 3023 */ , - 0x1101 /* offset 3024 */ , - 0x11aa /* offset 3025 */ , - 0x1102 /* offset 3026 */ , - 0x11ac /* offset 3027 */ , - 0x11ad /* offset 3028 */ , - 0x1103 /* offset 3029 */ , - 0x1104 /* offset 3030 */ , - 0x1105 /* offset 3031 */ , - 0x11b0 /* offset 3032 */ , - 0x11b1 /* offset 3033 */ , - 0x11b2 /* offset 3034 */ , - 0x11b3 /* offset 3035 */ , - 0x11b4 /* offset 3036 */ , - 0x11b5 /* offset 3037 */ , - 0x111a /* offset 3038 */ , - 0x1106 /* offset 3039 */ , - 0x1107 /* offset 3040 */ , - 0x1108 /* offset 3041 */ , - 0x1121 /* offset 3042 */ , - 0x1109 /* offset 3043 */ , - 0x110a /* offset 3044 */ , - 0x110b /* offset 3045 */ , - 0x110c /* offset 3046 */ , - 0x110d /* offset 3047 */ , - 0x110e /* offset 3048 */ , - 0x110f /* offset 3049 */ , - 0x1110 /* offset 3050 */ , - 0x1111 /* offset 3051 */ , - 0x1112 /* offset 3052 */ , - 0x1161 /* offset 3053 */ , - 0x1162 /* offset 3054 */ , - 0x1163 /* offset 3055 */ , - 0x1164 /* offset 3056 */ , - 0x1165 /* offset 3057 */ , - 0x1166 /* offset 3058 */ , - 0x1167 /* offset 3059 */ , - 0x1168 /* offset 3060 */ , - 0x1169 /* offset 3061 */ , - 0x116a /* offset 3062 */ , - 0x116b /* offset 3063 */ , - 0x116c /* offset 3064 */ , - 0x116d /* offset 3065 */ , - 0x116e /* offset 3066 */ , - 0x116f /* offset 3067 */ , - 0x1170 /* offset 3068 */ , - 0x1171 /* offset 3069 */ , - 0x1172 /* offset 3070 */ , - 0x1173 /* offset 3071 */ , - 0x1174 /* offset 3072 */ , - 0x1175 /* offset 3073 */ , - 0x1160 /* offset 3074 */ , - 0x1114 /* offset 3075 */ , - 0x1115 /* offset 3076 */ , - 0x11c7 /* offset 3077 */ , - 0x11c8 /* offset 3078 */ , - 0x11cc /* offset 3079 */ , - 0x11ce /* offset 3080 */ , - 0x11d3 /* offset 3081 */ , - 0x11d7 /* offset 3082 */ , - 0x11d9 /* offset 3083 */ , - 0x111c /* offset 3084 */ , - 0x11dd /* offset 3085 */ , - 0x11df /* offset 3086 */ , - 0x111d /* offset 3087 */ , - 0x111e /* offset 3088 */ , - 0x1120 /* offset 3089 */ , - 0x1122 /* offset 3090 */ , - 0x1123 /* offset 3091 */ , - 0x1127 /* offset 3092 */ , - 0x1129 /* offset 3093 */ , - 0x112b /* offset 3094 */ , - 0x112c /* offset 3095 */ , - 0x112d /* offset 3096 */ , - 0x112e /* offset 3097 */ , - 0x112f /* offset 3098 */ , - 0x1132 /* offset 3099 */ , - 0x1136 /* offset 3100 */ , - 0x1140 /* offset 3101 */ , - 0x1147 /* offset 3102 */ , - 0x114c /* offset 3103 */ , - 0x11f1 /* offset 3104 */ , - 0x11f2 /* offset 3105 */ , - 0x1157 /* offset 3106 */ , - 0x1158 /* offset 3107 */ , - 0x1159 /* offset 3108 */ , - 0x1184 /* offset 3109 */ , - 0x1185 /* offset 3110 */ , - 0x1188 /* offset 3111 */ , - 0x1191 /* offset 3112 */ , - 0x1192 /* offset 3113 */ , - 0x1194 /* offset 3114 */ , - 0x119e /* offset 3115 */ , - 0x11a1 /* offset 3116 */ , - 0x4e09 /* offset 3117 */ , - 0x56db /* offset 3118 */ , - 0x4e0a /* offset 3119 */ , - 0x4e2d /* offset 3120 */ , - 0x4e0b /* offset 3121 */ , - 0x7532 /* offset 3122 */ , - 0x4e19 /* offset 3123 */ , - 0x4e01 /* offset 3124 */ , - 0x5929 /* offset 3125 */ , - 0x5730 /* offset 3126 */ , - 0x28, 0x1100, 0x29 /* offset 3127 */ , - 0x28, 0x1102, 0x29 /* offset 3130 */ , - 0x28, 0x1103, 0x29 /* offset 3133 */ , - 0x28, 0x1105, 0x29 /* offset 3136 */ , - 0x28, 0x1106, 0x29 /* offset 3139 */ , - 0x28, 0x1107, 0x29 /* offset 3142 */ , - 0x28, 0x1109, 0x29 /* offset 3145 */ , - 0x28, 0x110b, 0x29 /* offset 3148 */ , - 0x28, 0x110c, 0x29 /* offset 3151 */ , - 0x28, 0x110e, 0x29 /* offset 3154 */ , - 0x28, 0x110f, 0x29 /* offset 3157 */ , - 0x28, 0x1110, 0x29 /* offset 3160 */ , - 0x28, 0x1111, 0x29 /* offset 3163 */ , - 0x28, 0x1112, 0x29 /* offset 3166 */ , - 0x28, 0x1100, 0x1161, 0x29 /* offset 3169 */ , - 0x28, 0x1102, 0x1161, 0x29 /* offset 3173 */ , - 0x28, 0x1103, 0x1161, 0x29 /* offset 3177 */ , - 0x28, 0x1105, 0x1161, 0x29 /* offset 3181 */ , - 0x28, 0x1106, 0x1161, 0x29 /* offset 3185 */ , - 0x28, 0x1107, 0x1161, 0x29 /* offset 3189 */ , - 0x28, 0x1109, 0x1161, 0x29 /* offset 3193 */ , - 0x28, 0x110b, 0x1161, 0x29 /* offset 3197 */ , - 0x28, 0x110c, 0x1161, 0x29 /* offset 3201 */ , - 0x28, 0x110e, 0x1161, 0x29 /* offset 3205 */ , - 0x28, 0x110f, 0x1161, 0x29 /* offset 3209 */ , - 0x28, 0x1110, 0x1161, 0x29 /* offset 3213 */ , - 0x28, 0x1111, 0x1161, 0x29 /* offset 3217 */ , - 0x28, 0x1112, 0x1161, 0x29 /* offset 3221 */ , - 0x28, 0x110c, 0x116e, 0x29 /* offset 3225 */ , - 0x28, 0x4e00, 0x29 /* offset 3229 */ , - 0x28, 0x4e8c, 0x29 /* offset 3232 */ , - 0x28, 0x4e09, 0x29 /* offset 3235 */ , - 0x28, 0x56db, 0x29 /* offset 3238 */ , - 0x28, 0x4e94, 0x29 /* offset 3241 */ , - 0x28, 0x516d, 0x29 /* offset 3244 */ , - 0x28, 0x4e03, 0x29 /* offset 3247 */ , - 0x28, 0x516b, 0x29 /* offset 3250 */ , - 0x28, 0x4e5d, 0x29 /* offset 3253 */ , - 0x28, 0x5341, 0x29 /* offset 3256 */ , - 0x28, 0x6708, 0x29 /* offset 3259 */ , - 0x28, 0x706b, 0x29 /* offset 3262 */ , - 0x28, 0x6c34, 0x29 /* offset 3265 */ , - 0x28, 0x6728, 0x29 /* offset 3268 */ , - 0x28, 0x91d1, 0x29 /* offset 3271 */ , - 0x28, 0x571f, 0x29 /* offset 3274 */ , - 0x28, 0x65e5, 0x29 /* offset 3277 */ , - 0x28, 0x682a, 0x29 /* offset 3280 */ , - 0x28, 0x6709, 0x29 /* offset 3283 */ , - 0x28, 0x793e, 0x29 /* offset 3286 */ , - 0x28, 0x540d, 0x29 /* offset 3289 */ , - 0x28, 0x7279, 0x29 /* offset 3292 */ , - 0x28, 0x8ca1, 0x29 /* offset 3295 */ , - 0x28, 0x795d, 0x29 /* offset 3298 */ , - 0x28, 0x52b4, 0x29 /* offset 3301 */ , - 0x28, 0x4ee3, 0x29 /* offset 3304 */ , - 0x28, 0x547c, 0x29 /* offset 3307 */ , - 0x28, 0x5b66, 0x29 /* offset 3310 */ , - 0x28, 0x76e3, 0x29 /* offset 3313 */ , - 0x28, 0x4f01, 0x29 /* offset 3316 */ , - 0x28, 0x8cc7, 0x29 /* offset 3319 */ , - 0x28, 0x5354, 0x29 /* offset 3322 */ , - 0x28, 0x796d, 0x29 /* offset 3325 */ , - 0x28, 0x4f11, 0x29 /* offset 3328 */ , - 0x28, 0x81ea, 0x29 /* offset 3331 */ , - 0x28, 0x81f3, 0x29 /* offset 3334 */ , - 0x32, 0x31 /* offset 3337 */ , - 0x32, 0x32 /* offset 3339 */ , - 0x32, 0x33 /* offset 3341 */ , - 0x32, 0x34 /* offset 3343 */ , - 0x32, 0x35 /* offset 3345 */ , - 0x32, 0x36 /* offset 3347 */ , - 0x32, 0x37 /* offset 3349 */ , - 0x32, 0x38 /* offset 3351 */ , - 0x32, 0x39 /* offset 3353 */ , - 0x33, 0x30 /* offset 3355 */ , - 0x33, 0x31 /* offset 3357 */ , - 0x33, 0x32 /* offset 3359 */ , - 0x33, 0x33 /* offset 3361 */ , - 0x33, 0x34 /* offset 3363 */ , - 0x33, 0x35 /* offset 3365 */ , - 0x1100, 0x1161 /* offset 3367 */ , - 0x1102, 0x1161 /* offset 3369 */ , - 0x1103, 0x1161 /* offset 3371 */ , - 0x1105, 0x1161 /* offset 3373 */ , - 0x1106, 0x1161 /* offset 3375 */ , - 0x1107, 0x1161 /* offset 3377 */ , - 0x1109, 0x1161 /* offset 3379 */ , - 0x110b, 0x1161 /* offset 3381 */ , - 0x110c, 0x1161 /* offset 3383 */ , - 0x110e, 0x1161 /* offset 3385 */ , - 0x110f, 0x1161 /* offset 3387 */ , - 0x1110, 0x1161 /* offset 3389 */ , - 0x1111, 0x1161 /* offset 3391 */ , - 0x1112, 0x1161 /* offset 3393 */ , - 0x4e94 /* offset 3395 */ , - 0x516d /* offset 3396 */ , - 0x4e03 /* offset 3397 */ , - 0x4e5d /* offset 3398 */ , - 0x682a /* offset 3399 */ , - 0x6709 /* offset 3400 */ , - 0x793e /* offset 3401 */ , - 0x540d /* offset 3402 */ , - 0x7279 /* offset 3403 */ , - 0x8ca1 /* offset 3404 */ , - 0x795d /* offset 3405 */ , - 0x52b4 /* offset 3406 */ , - 0x79d8 /* offset 3407 */ , - 0x7537 /* offset 3408 */ , - 0x9069 /* offset 3409 */ , - 0x512a /* offset 3410 */ , - 0x5370 /* offset 3411 */ , - 0x6ce8 /* offset 3412 */ , - 0x9805 /* offset 3413 */ , - 0x4f11 /* offset 3414 */ , - 0x5199 /* offset 3415 */ , - 0x6b63 /* offset 3416 */ , - 0x5de6 /* offset 3417 */ , - 0x53f3 /* offset 3418 */ , - 0x533b /* offset 3419 */ , - 0x5b97 /* offset 3420 */ , - 0x5b66 /* offset 3421 */ , - 0x76e3 /* offset 3422 */ , - 0x4f01 /* offset 3423 */ , - 0x8cc7 /* offset 3424 */ , - 0x5354 /* offset 3425 */ , - 0x591c /* offset 3426 */ , - 0x33, 0x36 /* offset 3427 */ , - 0x33, 0x37 /* offset 3429 */ , - 0x33, 0x38 /* offset 3431 */ , - 0x33, 0x39 /* offset 3433 */ , - 0x34, 0x30 /* offset 3435 */ , - 0x34, 0x31 /* offset 3437 */ , - 0x34, 0x32 /* offset 3439 */ , - 0x34, 0x33 /* offset 3441 */ , - 0x34, 0x34 /* offset 3443 */ , - 0x34, 0x35 /* offset 3445 */ , - 0x34, 0x36 /* offset 3447 */ , - 0x34, 0x37 /* offset 3449 */ , - 0x34, 0x38 /* offset 3451 */ , - 0x34, 0x39 /* offset 3453 */ , - 0x35, 0x30 /* offset 3455 */ , - 0x31, 0x6708 /* offset 3457 */ , - 0x32, 0x6708 /* offset 3459 */ , - 0x33, 0x6708 /* offset 3461 */ , - 0x34, 0x6708 /* offset 3463 */ , - 0x35, 0x6708 /* offset 3465 */ , - 0x36, 0x6708 /* offset 3467 */ , - 0x37, 0x6708 /* offset 3469 */ , - 0x38, 0x6708 /* offset 3471 */ , - 0x39, 0x6708 /* offset 3473 */ , - 0x31, 0x30, 0x6708 /* offset 3475 */ , - 0x31, 0x31, 0x6708 /* offset 3478 */ , - 0x31, 0x32, 0x6708 /* offset 3481 */ , - 0x30a2 /* offset 3484 */ , - 0x30a4 /* offset 3485 */ , - 0x30a6 /* offset 3486 */ , - 0x30a8 /* offset 3487 */ , - 0x30aa /* offset 3488 */ , - 0x30ab /* offset 3489 */ , - 0x30ad /* offset 3490 */ , - 0x30af /* offset 3491 */ , - 0x30b1 /* offset 3492 */ , - 0x30b3 /* offset 3493 */ , - 0x30b5 /* offset 3494 */ , - 0x30b7 /* offset 3495 */ , - 0x30b9 /* offset 3496 */ , - 0x30bb /* offset 3497 */ , - 0x30bd /* offset 3498 */ , - 0x30bf /* offset 3499 */ , - 0x30c1 /* offset 3500 */ , - 0x30c4 /* offset 3501 */ , - 0x30c6 /* offset 3502 */ , - 0x30c8 /* offset 3503 */ , - 0x30ca /* offset 3504 */ , - 0x30cb /* offset 3505 */ , - 0x30cc /* offset 3506 */ , - 0x30cd /* offset 3507 */ , - 0x30ce /* offset 3508 */ , - 0x30cf /* offset 3509 */ , - 0x30d2 /* offset 3510 */ , - 0x30d5 /* offset 3511 */ , - 0x30d8 /* offset 3512 */ , - 0x30db /* offset 3513 */ , - 0x30de /* offset 3514 */ , - 0x30df /* offset 3515 */ , - 0x30e0 /* offset 3516 */ , - 0x30e1 /* offset 3517 */ , - 0x30e2 /* offset 3518 */ , - 0x30e4 /* offset 3519 */ , - 0x30e6 /* offset 3520 */ , - 0x30e8 /* offset 3521 */ , - 0x30e9 /* offset 3522 */ , - 0x30ea /* offset 3523 */ , - 0x30eb /* offset 3524 */ , - 0x30ec /* offset 3525 */ , - 0x30ed /* offset 3526 */ , - 0x30ef /* offset 3527 */ , - 0x30f0 /* offset 3528 */ , - 0x30f1 /* offset 3529 */ , - 0x30f2 /* offset 3530 */ , - 0x30a2, 0x30cf, 0x309a, 0x30fc, 0x30c8 /* offset 3531 */ , - 0x30a2, 0x30eb, 0x30d5, 0x30a1 /* offset 3536 */ , - 0x30a2, 0x30f3, 0x30d8, 0x309a, 0x30a2 /* offset 3540 */ , - 0x30a2, 0x30fc, 0x30eb /* offset 3545 */ , - 0x30a4, 0x30cb, 0x30f3, 0x30af, 0x3099 /* offset 3548 */ , - 0x30a4, 0x30f3, 0x30c1 /* offset 3553 */ , - 0x30a6, 0x30a9, 0x30f3 /* offset 3556 */ , - 0x30a8, 0x30b9, 0x30af, 0x30fc, 0x30c8, 0x3099 /* offset 3559 */ , - 0x30a8, 0x30fc, 0x30ab, 0x30fc /* offset 3565 */ , - 0x30aa, 0x30f3, 0x30b9 /* offset 3569 */ , - 0x30aa, 0x30fc, 0x30e0 /* offset 3572 */ , - 0x30ab, 0x30a4, 0x30ea /* offset 3575 */ , - 0x30ab, 0x30e9, 0x30c3, 0x30c8 /* offset 3578 */ , - 0x30ab, 0x30ed, 0x30ea, 0x30fc /* offset 3582 */ , - 0x30ab, 0x3099, 0x30ed, 0x30f3 /* offset 3586 */ , - 0x30ab, 0x3099, 0x30f3, 0x30de /* offset 3590 */ , - 0x30ad, 0x3099, 0x30ab, 0x3099 /* offset 3594 */ , - 0x30ad, 0x3099, 0x30cb, 0x30fc /* offset 3598 */ , - 0x30ad, 0x30e5, 0x30ea, 0x30fc /* offset 3602 */ , - 0x30ad, 0x3099, 0x30eb, 0x30bf, 0x3099, 0x30fc /* offset 3606 */ , - 0x30ad, 0x30ed /* offset 3612 */ , - 0x30ad, 0x30ed, 0x30af, 0x3099, 0x30e9, 0x30e0 /* offset 3614 */ , - 0x30ad, 0x30ed, 0x30e1, 0x30fc, 0x30c8, 0x30eb /* offset 3620 */ , - 0x30ad, 0x30ed, 0x30ef, 0x30c3, 0x30c8 /* offset 3626 */ , - 0x30af, 0x3099, 0x30e9, 0x30e0 /* offset 3631 */ , - 0x30af, 0x3099, 0x30e9, 0x30e0, 0x30c8, 0x30f3 /* offset 3635 */ , - 0x30af, 0x30eb, 0x30bb, 0x3099, 0x30a4, 0x30ed /* offset 3641 */ , - 0x30af, 0x30ed, 0x30fc, 0x30cd /* offset 3647 */ , - 0x30b1, 0x30fc, 0x30b9 /* offset 3651 */ , - 0x30b3, 0x30eb, 0x30ca /* offset 3654 */ , - 0x30b3, 0x30fc, 0x30db, 0x309a /* offset 3657 */ , - 0x30b5, 0x30a4, 0x30af, 0x30eb /* offset 3661 */ , - 0x30b5, 0x30f3, 0x30c1, 0x30fc, 0x30e0 /* offset 3665 */ , - 0x30b7, 0x30ea, 0x30f3, 0x30af, 0x3099 /* offset 3670 */ , - 0x30bb, 0x30f3, 0x30c1 /* offset 3675 */ , - 0x30bb, 0x30f3, 0x30c8 /* offset 3678 */ , - 0x30bf, 0x3099, 0x30fc, 0x30b9 /* offset 3681 */ , - 0x30c6, 0x3099, 0x30b7 /* offset 3685 */ , - 0x30c8, 0x3099, 0x30eb /* offset 3688 */ , - 0x30c8, 0x30f3 /* offset 3691 */ , - 0x30ca, 0x30ce /* offset 3693 */ , - 0x30ce, 0x30c3, 0x30c8 /* offset 3695 */ , - 0x30cf, 0x30a4, 0x30c4 /* offset 3698 */ , - 0x30cf, 0x309a, 0x30fc, 0x30bb, 0x30f3, 0x30c8 /* offset 3701 */ , - 0x30cf, 0x309a, 0x30fc, 0x30c4 /* offset 3707 */ , - 0x30cf, 0x3099, 0x30fc, 0x30ec, 0x30eb /* offset 3711 */ , - 0x30d2, 0x309a, 0x30a2, 0x30b9, 0x30c8, 0x30eb /* offset 3716 */ , - 0x30d2, 0x309a, 0x30af, 0x30eb /* offset 3722 */ , - 0x30d2, 0x309a, 0x30b3 /* offset 3726 */ , - 0x30d2, 0x3099, 0x30eb /* offset 3729 */ , - 0x30d5, 0x30a1, 0x30e9, 0x30c3, 0x30c8, 0x3099 /* offset 3732 */ , - 0x30d5, 0x30a3, 0x30fc, 0x30c8 /* offset 3738 */ , - 0x30d5, 0x3099, 0x30c3, 0x30b7, 0x30a7, 0x30eb /* offset 3742 */ , - 0x30d5, 0x30e9, 0x30f3 /* offset 3748 */ , - 0x30d8, 0x30af, 0x30bf, 0x30fc, 0x30eb /* offset 3751 */ , - 0x30d8, 0x309a, 0x30bd /* offset 3756 */ , - 0x30d8, 0x309a, 0x30cb, 0x30d2 /* offset 3759 */ , - 0x30d8, 0x30eb, 0x30c4 /* offset 3763 */ , - 0x30d8, 0x309a, 0x30f3, 0x30b9 /* offset 3766 */ , - 0x30d8, 0x309a, 0x30fc, 0x30b7, 0x3099 /* offset 3770 */ , - 0x30d8, 0x3099, 0x30fc, 0x30bf /* offset 3775 */ , - 0x30db, 0x309a, 0x30a4, 0x30f3, 0x30c8 /* offset 3779 */ , - 0x30db, 0x3099, 0x30eb, 0x30c8 /* offset 3784 */ , - 0x30db, 0x30f3 /* offset 3788 */ , - 0x30db, 0x309a, 0x30f3, 0x30c8, 0x3099 /* offset 3790 */ , - 0x30db, 0x30fc, 0x30eb /* offset 3795 */ , - 0x30db, 0x30fc, 0x30f3 /* offset 3798 */ , - 0x30de, 0x30a4, 0x30af, 0x30ed /* offset 3801 */ , - 0x30de, 0x30a4, 0x30eb /* offset 3805 */ , - 0x30de, 0x30c3, 0x30cf /* offset 3808 */ , - 0x30de, 0x30eb, 0x30af /* offset 3811 */ , - 0x30de, 0x30f3, 0x30b7, 0x30e7, 0x30f3 /* offset 3814 */ , - 0x30df, 0x30af, 0x30ed, 0x30f3 /* offset 3819 */ , - 0x30df, 0x30ea /* offset 3823 */ , - 0x30df, 0x30ea, 0x30cf, 0x3099, 0x30fc, 0x30eb /* offset 3825 */ , - 0x30e1, 0x30ab, 0x3099 /* offset 3831 */ , - 0x30e1, 0x30ab, 0x3099, 0x30c8, 0x30f3 /* offset 3834 */ , - 0x30e1, 0x30fc, 0x30c8, 0x30eb /* offset 3839 */ , - 0x30e4, 0x30fc, 0x30c8, 0x3099 /* offset 3843 */ , - 0x30e4, 0x30fc, 0x30eb /* offset 3847 */ , - 0x30e6, 0x30a2, 0x30f3 /* offset 3850 */ , - 0x30ea, 0x30c3, 0x30c8, 0x30eb /* offset 3853 */ , - 0x30ea, 0x30e9 /* offset 3857 */ , - 0x30eb, 0x30d2, 0x309a, 0x30fc /* offset 3859 */ , - 0x30eb, 0x30fc, 0x30d5, 0x3099, 0x30eb /* offset 3863 */ , - 0x30ec, 0x30e0 /* offset 3868 */ , - 0x30ec, 0x30f3, 0x30c8, 0x30b1, 0x3099, 0x30f3 /* offset 3870 */ , - 0x30ef, 0x30c3, 0x30c8 /* offset 3876 */ , - 0x30, 0x70b9 /* offset 3879 */ , - 0x31, 0x70b9 /* offset 3881 */ , - 0x32, 0x70b9 /* offset 3883 */ , - 0x33, 0x70b9 /* offset 3885 */ , - 0x34, 0x70b9 /* offset 3887 */ , - 0x35, 0x70b9 /* offset 3889 */ , - 0x36, 0x70b9 /* offset 3891 */ , - 0x37, 0x70b9 /* offset 3893 */ , - 0x38, 0x70b9 /* offset 3895 */ , - 0x39, 0x70b9 /* offset 3897 */ , - 0x31, 0x30, 0x70b9 /* offset 3899 */ , - 0x31, 0x31, 0x70b9 /* offset 3902 */ , - 0x31, 0x32, 0x70b9 /* offset 3905 */ , - 0x31, 0x33, 0x70b9 /* offset 3908 */ , - 0x31, 0x34, 0x70b9 /* offset 3911 */ , - 0x31, 0x35, 0x70b9 /* offset 3914 */ , - 0x31, 0x36, 0x70b9 /* offset 3917 */ , - 0x31, 0x37, 0x70b9 /* offset 3920 */ , - 0x31, 0x38, 0x70b9 /* offset 3923 */ , - 0x31, 0x39, 0x70b9 /* offset 3926 */ , - 0x32, 0x30, 0x70b9 /* offset 3929 */ , - 0x32, 0x31, 0x70b9 /* offset 3932 */ , - 0x32, 0x32, 0x70b9 /* offset 3935 */ , - 0x32, 0x33, 0x70b9 /* offset 3938 */ , - 0x32, 0x34, 0x70b9 /* offset 3941 */ , - 0x68, 0x50, 0x61 /* offset 3944 */ , - 0x64, 0x61 /* offset 3947 */ , - 0x41, 0x55 /* offset 3949 */ , - 0x62, 0x61, 0x72 /* offset 3951 */ , - 0x6f, 0x56 /* offset 3954 */ , - 0x70, 0x63 /* offset 3956 */ , - 0x5e73, 0x6210 /* offset 3958 */ , - 0x662d, 0x548c /* offset 3960 */ , - 0x5927, 0x6b63 /* offset 3962 */ , - 0x660e, 0x6cbb /* offset 3964 */ , - 0x682a, 0x5f0f, 0x4f1a, 0x793e /* offset 3966 */ , - 0x70, 0x41 /* offset 3970 */ , - 0x6e, 0x41 /* offset 3972 */ , - 0x3bc, 0x41 /* offset 3974 */ , - 0x6d, 0x41 /* offset 3976 */ , - 0x6b, 0x41 /* offset 3978 */ , - 0x4b, 0x42 /* offset 3980 */ , - 0x4d, 0x42 /* offset 3982 */ , - 0x47, 0x42 /* offset 3984 */ , - 0x63, 0x61, 0x6c /* offset 3986 */ , - 0x6b, 0x63, 0x61, 0x6c /* offset 3989 */ , - 0x70, 0x46 /* offset 3993 */ , - 0x6e, 0x46 /* offset 3995 */ , - 0x3bc, 0x46 /* offset 3997 */ , - 0x3bc, 0x67 /* offset 3999 */ , - 0x6d, 0x67 /* offset 4001 */ , - 0x6b, 0x67 /* offset 4003 */ , - 0x48, 0x7a /* offset 4005 */ , - 0x6b, 0x48, 0x7a /* offset 4007 */ , - 0x4d, 0x48, 0x7a /* offset 4010 */ , - 0x47, 0x48, 0x7a /* offset 4013 */ , - 0x54, 0x48, 0x7a /* offset 4016 */ , - 0x3bc, 0x6c /* offset 4019 */ , - 0x6d, 0x6c /* offset 4021 */ , - 0x64, 0x6c /* offset 4023 */ , - 0x6b, 0x6c /* offset 4025 */ , - 0x66, 0x6d /* offset 4027 */ , - 0x6e, 0x6d /* offset 4029 */ , - 0x3bc, 0x6d /* offset 4031 */ , - 0x6d, 0x6d /* offset 4033 */ , - 0x63, 0x6d /* offset 4035 */ , - 0x6b, 0x6d /* offset 4037 */ , - 0x6d, 0x6d, 0x32 /* offset 4039 */ , - 0x63, 0x6d, 0x32 /* offset 4042 */ , - 0x6d, 0x32 /* offset 4045 */ , - 0x6b, 0x6d, 0x32 /* offset 4047 */ , - 0x6d, 0x6d, 0x33 /* offset 4050 */ , - 0x63, 0x6d, 0x33 /* offset 4053 */ , - 0x6d, 0x33 /* offset 4056 */ , - 0x6b, 0x6d, 0x33 /* offset 4058 */ , - 0x6d, 0x2215, 0x73 /* offset 4061 */ , - 0x6d, 0x2215, 0x73, 0x32 /* offset 4064 */ , - 0x50, 0x61 /* offset 4068 */ , - 0x6b, 0x50, 0x61 /* offset 4070 */ , - 0x4d, 0x50, 0x61 /* offset 4073 */ , - 0x47, 0x50, 0x61 /* offset 4076 */ , - 0x72, 0x61, 0x64 /* offset 4079 */ , - 0x72, 0x61, 0x64, 0x2215, 0x73 /* offset 4082 */ , - 0x72, 0x61, 0x64, 0x2215, 0x73, 0x32 /* offset 4087 */ , - 0x70, 0x73 /* offset 4093 */ , - 0x6e, 0x73 /* offset 4095 */ , - 0x3bc, 0x73 /* offset 4097 */ , - 0x6d, 0x73 /* offset 4099 */ , - 0x70, 0x56 /* offset 4101 */ , - 0x6e, 0x56 /* offset 4103 */ , - 0x3bc, 0x56 /* offset 4105 */ , - 0x6d, 0x56 /* offset 4107 */ , - 0x6b, 0x56 /* offset 4109 */ , - 0x4d, 0x56 /* offset 4111 */ , - 0x70, 0x57 /* offset 4113 */ , - 0x6e, 0x57 /* offset 4115 */ , - 0x3bc, 0x57 /* offset 4117 */ , - 0x6d, 0x57 /* offset 4119 */ , - 0x6b, 0x57 /* offset 4121 */ , - 0x4d, 0x57 /* offset 4123 */ , - 0x6b, 0x3a9 /* offset 4125 */ , - 0x4d, 0x3a9 /* offset 4127 */ , - 0x61, 0x2e, 0x6d, 0x2e /* offset 4129 */ , - 0x42, 0x71 /* offset 4133 */ , - 0x63, 0x63 /* offset 4135 */ , - 0x63, 0x64 /* offset 4137 */ , - 0x43, 0x2215, 0x6b, 0x67 /* offset 4139 */ , - 0x43, 0x6f, 0x2e /* offset 4143 */ , - 0x64, 0x42 /* offset 4146 */ , - 0x47, 0x79 /* offset 4148 */ , - 0x68, 0x61 /* offset 4150 */ , - 0x48, 0x50 /* offset 4152 */ , - 0x69, 0x6e /* offset 4154 */ , - 0x4b, 0x4b /* offset 4156 */ , - 0x4b, 0x4d /* offset 4158 */ , - 0x6b, 0x74 /* offset 4160 */ , - 0x6c, 0x6d /* offset 4162 */ , - 0x6c, 0x6e /* offset 4164 */ , - 0x6c, 0x6f, 0x67 /* offset 4166 */ , - 0x6c, 0x78 /* offset 4169 */ , - 0x6d, 0x62 /* offset 4171 */ , - 0x6d, 0x69, 0x6c /* offset 4173 */ , - 0x6d, 0x6f, 0x6c /* offset 4176 */ , - 0x50, 0x48 /* offset 4179 */ , - 0x70, 0x2e, 0x6d, 0x2e /* offset 4181 */ , - 0x50, 0x50, 0x4d /* offset 4185 */ , - 0x50, 0x52 /* offset 4188 */ , - 0x73, 0x72 /* offset 4190 */ , - 0x53, 0x76 /* offset 4192 */ , - 0x57, 0x62 /* offset 4194 */ , - 0x31, 0x65e5 /* offset 4196 */ , - 0x32, 0x65e5 /* offset 4198 */ , - 0x33, 0x65e5 /* offset 4200 */ , - 0x34, 0x65e5 /* offset 4202 */ , - 0x35, 0x65e5 /* offset 4204 */ , - 0x36, 0x65e5 /* offset 4206 */ , - 0x37, 0x65e5 /* offset 4208 */ , - 0x38, 0x65e5 /* offset 4210 */ , - 0x39, 0x65e5 /* offset 4212 */ , - 0x31, 0x30, 0x65e5 /* offset 4214 */ , - 0x31, 0x31, 0x65e5 /* offset 4217 */ , - 0x31, 0x32, 0x65e5 /* offset 4220 */ , - 0x31, 0x33, 0x65e5 /* offset 4223 */ , - 0x31, 0x34, 0x65e5 /* offset 4226 */ , - 0x31, 0x35, 0x65e5 /* offset 4229 */ , - 0x31, 0x36, 0x65e5 /* offset 4232 */ , - 0x31, 0x37, 0x65e5 /* offset 4235 */ , - 0x31, 0x38, 0x65e5 /* offset 4238 */ , - 0x31, 0x39, 0x65e5 /* offset 4241 */ , - 0x32, 0x30, 0x65e5 /* offset 4244 */ , - 0x32, 0x31, 0x65e5 /* offset 4247 */ , - 0x32, 0x32, 0x65e5 /* offset 4250 */ , - 0x32, 0x33, 0x65e5 /* offset 4253 */ , - 0x32, 0x34, 0x65e5 /* offset 4256 */ , - 0x32, 0x35, 0x65e5 /* offset 4259 */ , - 0x32, 0x36, 0x65e5 /* offset 4262 */ , - 0x32, 0x37, 0x65e5 /* offset 4265 */ , - 0x32, 0x38, 0x65e5 /* offset 4268 */ , - 0x32, 0x39, 0x65e5 /* offset 4271 */ , - 0x33, 0x30, 0x65e5 /* offset 4274 */ , - 0x33, 0x31, 0x65e5 /* offset 4277 */ , - 0x8c48 /* offset 4280 */ , - 0x66f4 /* offset 4281 */ , - 0x8cc8 /* offset 4282 */ , - 0x6ed1 /* offset 4283 */ , - 0x4e32 /* offset 4284 */ , - 0x53e5 /* offset 4285 */ , - 0x5951 /* offset 4286 */ , - 0x5587 /* offset 4287 */ , - 0x5948 /* offset 4288 */ , - 0x61f6 /* offset 4289 */ , - 0x7669 /* offset 4290 */ , - 0x7f85 /* offset 4291 */ , - 0x863f /* offset 4292 */ , - 0x87ba /* offset 4293 */ , - 0x88f8 /* offset 4294 */ , - 0x908f /* offset 4295 */ , - 0x6a02 /* offset 4296 */ , - 0x6d1b /* offset 4297 */ , - 0x70d9 /* offset 4298 */ , - 0x73de /* offset 4299 */ , - 0x843d /* offset 4300 */ , - 0x916a /* offset 4301 */ , - 0x99f1 /* offset 4302 */ , - 0x4e82 /* offset 4303 */ , - 0x5375 /* offset 4304 */ , - 0x6b04 /* offset 4305 */ , - 0x721b /* offset 4306 */ , - 0x862d /* offset 4307 */ , - 0x9e1e /* offset 4308 */ , - 0x5d50 /* offset 4309 */ , - 0x6feb /* offset 4310 */ , - 0x85cd /* offset 4311 */ , - 0x8964 /* offset 4312 */ , - 0x62c9 /* offset 4313 */ , - 0x81d8 /* offset 4314 */ , - 0x881f /* offset 4315 */ , - 0x5eca /* offset 4316 */ , - 0x6717 /* offset 4317 */ , - 0x6d6a /* offset 4318 */ , - 0x72fc /* offset 4319 */ , - 0x90ce /* offset 4320 */ , - 0x4f86 /* offset 4321 */ , - 0x51b7 /* offset 4322 */ , - 0x52de /* offset 4323 */ , - 0x64c4 /* offset 4324 */ , - 0x6ad3 /* offset 4325 */ , - 0x7210 /* offset 4326 */ , - 0x76e7 /* offset 4327 */ , - 0x8606 /* offset 4328 */ , - 0x865c /* offset 4329 */ , - 0x8def /* offset 4330 */ , - 0x9732 /* offset 4331 */ , - 0x9b6f /* offset 4332 */ , - 0x9dfa /* offset 4333 */ , - 0x788c /* offset 4334 */ , - 0x797f /* offset 4335 */ , - 0x7da0 /* offset 4336 */ , - 0x83c9 /* offset 4337 */ , - 0x9304 /* offset 4338 */ , - 0x8ad6 /* offset 4339 */ , - 0x58df /* offset 4340 */ , - 0x5f04 /* offset 4341 */ , - 0x7c60 /* offset 4342 */ , - 0x807e /* offset 4343 */ , - 0x7262 /* offset 4344 */ , - 0x78ca /* offset 4345 */ , - 0x8cc2 /* offset 4346 */ , - 0x96f7 /* offset 4347 */ , - 0x58d8 /* offset 4348 */ , - 0x5c62 /* offset 4349 */ , - 0x6a13 /* offset 4350 */ , - 0x6dda /* offset 4351 */ , - 0x6f0f /* offset 4352 */ , - 0x7d2f /* offset 4353 */ , - 0x7e37 /* offset 4354 */ , - 0x964b /* offset 4355 */ , - 0x52d2 /* offset 4356 */ , - 0x808b /* offset 4357 */ , - 0x51dc /* offset 4358 */ , - 0x51cc /* offset 4359 */ , - 0x7a1c /* offset 4360 */ , - 0x7dbe /* offset 4361 */ , - 0x83f1 /* offset 4362 */ , - 0x9675 /* offset 4363 */ , - 0x8b80 /* offset 4364 */ , - 0x62cf /* offset 4365 */ , - 0x8afe /* offset 4366 */ , - 0x4e39 /* offset 4367 */ , - 0x5be7 /* offset 4368 */ , - 0x6012 /* offset 4369 */ , - 0x7387 /* offset 4370 */ , - 0x7570 /* offset 4371 */ , - 0x5317 /* offset 4372 */ , - 0x78fb /* offset 4373 */ , - 0x4fbf /* offset 4374 */ , - 0x5fa9 /* offset 4375 */ , - 0x4e0d /* offset 4376 */ , - 0x6ccc /* offset 4377 */ , - 0x6578 /* offset 4378 */ , - 0x7d22 /* offset 4379 */ , - 0x53c3 /* offset 4380 */ , - 0x585e /* offset 4381 */ , - 0x7701 /* offset 4382 */ , - 0x8449 /* offset 4383 */ , - 0x8aaa /* offset 4384 */ , - 0x6bba /* offset 4385 */ , - 0x6c88 /* offset 4386 */ , - 0x62fe /* offset 4387 */ , - 0x82e5 /* offset 4388 */ , - 0x63a0 /* offset 4389 */ , - 0x7565 /* offset 4390 */ , - 0x4eae /* offset 4391 */ , - 0x5169 /* offset 4392 */ , - 0x51c9 /* offset 4393 */ , - 0x6881 /* offset 4394 */ , - 0x7ce7 /* offset 4395 */ , - 0x826f /* offset 4396 */ , - 0x8ad2 /* offset 4397 */ , - 0x91cf /* offset 4398 */ , - 0x52f5 /* offset 4399 */ , - 0x5442 /* offset 4400 */ , - 0x5eec /* offset 4401 */ , - 0x65c5 /* offset 4402 */ , - 0x6ffe /* offset 4403 */ , - 0x792a /* offset 4404 */ , - 0x95ad /* offset 4405 */ , - 0x9a6a /* offset 4406 */ , - 0x9e97 /* offset 4407 */ , - 0x9ece /* offset 4408 */ , - 0x66c6 /* offset 4409 */ , - 0x6b77 /* offset 4410 */ , - 0x8f62 /* offset 4411 */ , - 0x5e74 /* offset 4412 */ , - 0x6190 /* offset 4413 */ , - 0x6200 /* offset 4414 */ , - 0x649a /* offset 4415 */ , - 0x6f23 /* offset 4416 */ , - 0x7149 /* offset 4417 */ , - 0x7489 /* offset 4418 */ , - 0x79ca /* offset 4419 */ , - 0x7df4 /* offset 4420 */ , - 0x806f /* offset 4421 */ , - 0x8f26 /* offset 4422 */ , - 0x84ee /* offset 4423 */ , - 0x9023 /* offset 4424 */ , - 0x934a /* offset 4425 */ , - 0x5217 /* offset 4426 */ , - 0x52a3 /* offset 4427 */ , - 0x54bd /* offset 4428 */ , - 0x70c8 /* offset 4429 */ , - 0x88c2 /* offset 4430 */ , - 0x5ec9 /* offset 4431 */ , - 0x5ff5 /* offset 4432 */ , - 0x637b /* offset 4433 */ , - 0x6bae /* offset 4434 */ , - 0x7c3e /* offset 4435 */ , - 0x7375 /* offset 4436 */ , - 0x4ee4 /* offset 4437 */ , - 0x56f9 /* offset 4438 */ , - 0x5dba /* offset 4439 */ , - 0x601c /* offset 4440 */ , - 0x73b2 /* offset 4441 */ , - 0x7469 /* offset 4442 */ , - 0x7f9a /* offset 4443 */ , - 0x8046 /* offset 4444 */ , - 0x9234 /* offset 4445 */ , - 0x96f6 /* offset 4446 */ , - 0x9748 /* offset 4447 */ , - 0x9818 /* offset 4448 */ , - 0x4f8b /* offset 4449 */ , - 0x79ae /* offset 4450 */ , - 0x91b4 /* offset 4451 */ , - 0x96b8 /* offset 4452 */ , - 0x60e1 /* offset 4453 */ , - 0x4e86 /* offset 4454 */ , - 0x50da /* offset 4455 */ , - 0x5bee /* offset 4456 */ , - 0x5c3f /* offset 4457 */ , - 0x6599 /* offset 4458 */ , - 0x71ce /* offset 4459 */ , - 0x7642 /* offset 4460 */ , - 0x84fc /* offset 4461 */ , - 0x907c /* offset 4462 */ , - 0x6688 /* offset 4463 */ , - 0x962e /* offset 4464 */ , - 0x5289 /* offset 4465 */ , - 0x677b /* offset 4466 */ , - 0x67f3 /* offset 4467 */ , - 0x6d41 /* offset 4468 */ , - 0x6e9c /* offset 4469 */ , - 0x7409 /* offset 4470 */ , - 0x7559 /* offset 4471 */ , - 0x786b /* offset 4472 */ , - 0x7d10 /* offset 4473 */ , - 0x985e /* offset 4474 */ , - 0x622e /* offset 4475 */ , - 0x9678 /* offset 4476 */ , - 0x502b /* offset 4477 */ , - 0x5d19 /* offset 4478 */ , - 0x6dea /* offset 4479 */ , - 0x8f2a /* offset 4480 */ , - 0x5f8b /* offset 4481 */ , - 0x6144 /* offset 4482 */ , - 0x6817 /* offset 4483 */ , - 0x9686 /* offset 4484 */ , - 0x5229 /* offset 4485 */ , - 0x540f /* offset 4486 */ , - 0x5c65 /* offset 4487 */ , - 0x6613 /* offset 4488 */ , - 0x674e /* offset 4489 */ , - 0x68a8 /* offset 4490 */ , - 0x6ce5 /* offset 4491 */ , - 0x7406 /* offset 4492 */ , - 0x75e2 /* offset 4493 */ , - 0x7f79 /* offset 4494 */ , - 0x88cf /* offset 4495 */ , - 0x88e1 /* offset 4496 */ , - 0x96e2 /* offset 4497 */ , - 0x533f /* offset 4498 */ , - 0x6eba /* offset 4499 */ , - 0x541d /* offset 4500 */ , - 0x71d0 /* offset 4501 */ , - 0x7498 /* offset 4502 */ , - 0x85fa /* offset 4503 */ , - 0x96a3 /* offset 4504 */ , - 0x9c57 /* offset 4505 */ , - 0x9e9f /* offset 4506 */ , - 0x6797 /* offset 4507 */ , - 0x6dcb /* offset 4508 */ , - 0x81e8 /* offset 4509 */ , - 0x7b20 /* offset 4510 */ , - 0x7c92 /* offset 4511 */ , - 0x72c0 /* offset 4512 */ , - 0x7099 /* offset 4513 */ , - 0x8b58 /* offset 4514 */ , - 0x4ec0 /* offset 4515 */ , - 0x8336 /* offset 4516 */ , - 0x523a /* offset 4517 */ , - 0x5207 /* offset 4518 */ , - 0x5ea6 /* offset 4519 */ , - 0x62d3 /* offset 4520 */ , - 0x7cd6 /* offset 4521 */ , - 0x5b85 /* offset 4522 */ , - 0x6d1e /* offset 4523 */ , - 0x66b4 /* offset 4524 */ , - 0x8f3b /* offset 4525 */ , - 0x964d /* offset 4526 */ , - 0x5ed3 /* offset 4527 */ , - 0x5140 /* offset 4528 */ , - 0x55c0 /* offset 4529 */ , - 0x585a /* offset 4530 */ , - 0x6674 /* offset 4531 */ , - 0x51de /* offset 4532 */ , - 0x732a /* offset 4533 */ , - 0x76ca /* offset 4534 */ , - 0x793c /* offset 4535 */ , - 0x795e /* offset 4536 */ , - 0x7965 /* offset 4537 */ , - 0x798f /* offset 4538 */ , - 0x9756 /* offset 4539 */ , - 0x7cbe /* offset 4540 */ , - 0x8612 /* offset 4541 */ , - 0x8af8 /* offset 4542 */ , - 0x9038 /* offset 4543 */ , - 0x90fd /* offset 4544 */ , - 0x98ef /* offset 4545 */ , - 0x98fc /* offset 4546 */ , - 0x9928 /* offset 4547 */ , - 0x9db4 /* offset 4548 */ , - 0x4fae /* offset 4549 */ , - 0x50e7 /* offset 4550 */ , - 0x514d /* offset 4551 */ , - 0x52c9 /* offset 4552 */ , - 0x52e4 /* offset 4553 */ , - 0x5351 /* offset 4554 */ , - 0x559d /* offset 4555 */ , - 0x5606 /* offset 4556 */ , - 0x5668 /* offset 4557 */ , - 0x5840 /* offset 4558 */ , - 0x58a8 /* offset 4559 */ , - 0x5c64 /* offset 4560 */ , - 0x6094 /* offset 4561 */ , - 0x6168 /* offset 4562 */ , - 0x618e /* offset 4563 */ , - 0x61f2 /* offset 4564 */ , - 0x654f /* offset 4565 */ , - 0x65e2 /* offset 4566 */ , - 0x6691 /* offset 4567 */ , - 0x6885 /* offset 4568 */ , - 0x6d77 /* offset 4569 */ , - 0x6e1a /* offset 4570 */ , - 0x6f22 /* offset 4571 */ , - 0x716e /* offset 4572 */ , - 0x722b /* offset 4573 */ , - 0x7422 /* offset 4574 */ , - 0x7891 /* offset 4575 */ , - 0x7949 /* offset 4576 */ , - 0x7948 /* offset 4577 */ , - 0x7950 /* offset 4578 */ , - 0x7956 /* offset 4579 */ , - 0x798d /* offset 4580 */ , - 0x798e /* offset 4581 */ , - 0x7a40 /* offset 4582 */ , - 0x7a81 /* offset 4583 */ , - 0x7bc0 /* offset 4584 */ , - 0x7e09 /* offset 4585 */ , - 0x7e41 /* offset 4586 */ , - 0x7f72 /* offset 4587 */ , - 0x8005 /* offset 4588 */ , - 0x81ed /* offset 4589 */ , - 0x8279 /* offset 4590 */ , - 0x8457 /* offset 4591 */ , - 0x8910 /* offset 4592 */ , - 0x8996 /* offset 4593 */ , - 0x8b01 /* offset 4594 */ , - 0x8b39 /* offset 4595 */ , - 0x8cd3 /* offset 4596 */ , - 0x8d08 /* offset 4597 */ , - 0x8fb6 /* offset 4598 */ , - 0x96e3 /* offset 4599 */ , - 0x97ff /* offset 4600 */ , - 0x983b /* offset 4601 */ , - 0x66, 0x66 /* offset 4602 */ , - 0x66, 0x69 /* offset 4604 */ , - 0x66, 0x6c /* offset 4606 */ , - 0x66, 0x66, 0x69 /* offset 4608 */ , - 0x66, 0x66, 0x6c /* offset 4611 */ , - 0x73, 0x74 /* offset 4614 */ , - 0x574, 0x576 /* offset 4616 */ , - 0x574, 0x565 /* offset 4618 */ , - 0x574, 0x56b /* offset 4620 */ , - 0x57e, 0x576 /* offset 4622 */ , - 0x574, 0x56d /* offset 4624 */ , - 0x5d9, 0x5b4 /* offset 4626 */ , - 0x5f2, 0x5b7 /* offset 4628 */ , - 0x5e2 /* offset 4630 */ , - 0x5d4 /* offset 4631 */ , - 0x5db /* offset 4632 */ , - 0x5dc /* offset 4633 */ , - 0x5dd /* offset 4634 */ , - 0x5e8 /* offset 4635 */ , - 0x5ea /* offset 4636 */ , - 0x5e9, 0x5c1 /* offset 4637 */ , - 0x5e9, 0x5c2 /* offset 4639 */ , - 0x5e9, 0x5bc, 0x5c1 /* offset 4641 */ , - 0x5e9, 0x5bc, 0x5c2 /* offset 4644 */ , - 0x5d0, 0x5b7 /* offset 4647 */ , - 0x5d0, 0x5b8 /* offset 4649 */ , - 0x5d0, 0x5bc /* offset 4651 */ , - 0x5d1, 0x5bc /* offset 4653 */ , - 0x5d2, 0x5bc /* offset 4655 */ , - 0x5d3, 0x5bc /* offset 4657 */ , - 0x5d4, 0x5bc /* offset 4659 */ , - 0x5d5, 0x5bc /* offset 4661 */ , - 0x5d6, 0x5bc /* offset 4663 */ , - 0x5d8, 0x5bc /* offset 4665 */ , - 0x5d9, 0x5bc /* offset 4667 */ , - 0x5da, 0x5bc /* offset 4669 */ , - 0x5db, 0x5bc /* offset 4671 */ , - 0x5dc, 0x5bc /* offset 4673 */ , - 0x5de, 0x5bc /* offset 4675 */ , - 0x5e0, 0x5bc /* offset 4677 */ , - 0x5e1, 0x5bc /* offset 4679 */ , - 0x5e3, 0x5bc /* offset 4681 */ , - 0x5e4, 0x5bc /* offset 4683 */ , - 0x5e6, 0x5bc /* offset 4685 */ , - 0x5e7, 0x5bc /* offset 4687 */ , - 0x5e8, 0x5bc /* offset 4689 */ , - 0x5e9, 0x5bc /* offset 4691 */ , - 0x5ea, 0x5bc /* offset 4693 */ , - 0x5d5, 0x5b9 /* offset 4695 */ , - 0x5d1, 0x5bf /* offset 4697 */ , - 0x5db, 0x5bf /* offset 4699 */ , - 0x5e4, 0x5bf /* offset 4701 */ , - 0x5d0, 0x5dc /* offset 4703 */ , - 0x671 /* offset 4705 */ , - 0x67b /* offset 4706 */ , - 0x67e /* offset 4707 */ , - 0x680 /* offset 4708 */ , - 0x67a /* offset 4709 */ , - 0x67f /* offset 4710 */ , - 0x679 /* offset 4711 */ , - 0x6a4 /* offset 4712 */ , - 0x6a6 /* offset 4713 */ , - 0x684 /* offset 4714 */ , - 0x683 /* offset 4715 */ , - 0x686 /* offset 4716 */ , - 0x687 /* offset 4717 */ , - 0x68d /* offset 4718 */ , - 0x68c /* offset 4719 */ , - 0x68e /* offset 4720 */ , - 0x688 /* offset 4721 */ , - 0x698 /* offset 4722 */ , - 0x691 /* offset 4723 */ , - 0x6a9 /* offset 4724 */ , - 0x6af /* offset 4725 */ , - 0x6b3 /* offset 4726 */ , - 0x6b1 /* offset 4727 */ , - 0x6ba /* offset 4728 */ , - 0x6bb /* offset 4729 */ , - 0x6c1 /* offset 4730 */ , - 0x6be /* offset 4731 */ , - 0x6d2 /* offset 4732 */ , - 0x6ad /* offset 4733 */ , - 0x6c7 /* offset 4734 */ , - 0x6c6 /* offset 4735 */ , - 0x6c8 /* offset 4736 */ , - 0x6cb /* offset 4737 */ , - 0x6c5 /* offset 4738 */ , - 0x6c9 /* offset 4739 */ , - 0x6d0 /* offset 4740 */ , - 0x649 /* offset 4741 */ , - 0x64a, 0x654, 0x627 /* offset 4742 */ , - 0x64a, 0x654, 0x6d5 /* offset 4745 */ , - 0x64a, 0x654, 0x648 /* offset 4748 */ , - 0x64a, 0x654, 0x6c7 /* offset 4751 */ , - 0x64a, 0x654, 0x6c6 /* offset 4754 */ , - 0x64a, 0x654, 0x6c8 /* offset 4757 */ , - 0x64a, 0x654, 0x6d0 /* offset 4760 */ , - 0x64a, 0x654, 0x649 /* offset 4763 */ , - 0x6cc /* offset 4766 */ , - 0x64a, 0x654, 0x62c /* offset 4767 */ , - 0x64a, 0x654, 0x62d /* offset 4770 */ , - 0x64a, 0x654, 0x645 /* offset 4773 */ , - 0x64a, 0x654, 0x64a /* offset 4776 */ , - 0x628, 0x62c /* offset 4779 */ , - 0x628, 0x62d /* offset 4781 */ , - 0x628, 0x62e /* offset 4783 */ , - 0x628, 0x645 /* offset 4785 */ , - 0x628, 0x649 /* offset 4787 */ , - 0x628, 0x64a /* offset 4789 */ , - 0x62a, 0x62c /* offset 4791 */ , - 0x62a, 0x62d /* offset 4793 */ , - 0x62a, 0x62e /* offset 4795 */ , - 0x62a, 0x645 /* offset 4797 */ , - 0x62a, 0x649 /* offset 4799 */ , - 0x62a, 0x64a /* offset 4801 */ , - 0x62b, 0x62c /* offset 4803 */ , - 0x62b, 0x645 /* offset 4805 */ , - 0x62b, 0x649 /* offset 4807 */ , - 0x62b, 0x64a /* offset 4809 */ , - 0x62c, 0x62d /* offset 4811 */ , - 0x62c, 0x645 /* offset 4813 */ , - 0x62d, 0x62c /* offset 4815 */ , - 0x62d, 0x645 /* offset 4817 */ , - 0x62e, 0x62c /* offset 4819 */ , - 0x62e, 0x62d /* offset 4821 */ , - 0x62e, 0x645 /* offset 4823 */ , - 0x633, 0x62c /* offset 4825 */ , - 0x633, 0x62d /* offset 4827 */ , - 0x633, 0x62e /* offset 4829 */ , - 0x633, 0x645 /* offset 4831 */ , - 0x635, 0x62d /* offset 4833 */ , - 0x635, 0x645 /* offset 4835 */ , - 0x636, 0x62c /* offset 4837 */ , - 0x636, 0x62d /* offset 4839 */ , - 0x636, 0x62e /* offset 4841 */ , - 0x636, 0x645 /* offset 4843 */ , - 0x637, 0x62d /* offset 4845 */ , - 0x637, 0x645 /* offset 4847 */ , - 0x638, 0x645 /* offset 4849 */ , - 0x639, 0x62c /* offset 4851 */ , - 0x639, 0x645 /* offset 4853 */ , - 0x63a, 0x62c /* offset 4855 */ , - 0x63a, 0x645 /* offset 4857 */ , - 0x641, 0x62c /* offset 4859 */ , - 0x641, 0x62d /* offset 4861 */ , - 0x641, 0x62e /* offset 4863 */ , - 0x641, 0x645 /* offset 4865 */ , - 0x641, 0x649 /* offset 4867 */ , - 0x641, 0x64a /* offset 4869 */ , - 0x642, 0x62d /* offset 4871 */ , - 0x642, 0x645 /* offset 4873 */ , - 0x642, 0x649 /* offset 4875 */ , - 0x642, 0x64a /* offset 4877 */ , - 0x643, 0x627 /* offset 4879 */ , - 0x643, 0x62c /* offset 4881 */ , - 0x643, 0x62d /* offset 4883 */ , - 0x643, 0x62e /* offset 4885 */ , - 0x643, 0x644 /* offset 4887 */ , - 0x643, 0x645 /* offset 4889 */ , - 0x643, 0x649 /* offset 4891 */ , - 0x643, 0x64a /* offset 4893 */ , - 0x644, 0x62c /* offset 4895 */ , - 0x644, 0x62d /* offset 4897 */ , - 0x644, 0x62e /* offset 4899 */ , - 0x644, 0x645 /* offset 4901 */ , - 0x644, 0x649 /* offset 4903 */ , - 0x644, 0x64a /* offset 4905 */ , - 0x645, 0x62c /* offset 4907 */ , - 0x645, 0x62d /* offset 4909 */ , - 0x645, 0x62e /* offset 4911 */ , - 0x645, 0x645 /* offset 4913 */ , - 0x645, 0x649 /* offset 4915 */ , - 0x645, 0x64a /* offset 4917 */ , - 0x646, 0x62c /* offset 4919 */ , - 0x646, 0x62d /* offset 4921 */ , - 0x646, 0x62e /* offset 4923 */ , - 0x646, 0x645 /* offset 4925 */ , - 0x646, 0x649 /* offset 4927 */ , - 0x646, 0x64a /* offset 4929 */ , - 0x647, 0x62c /* offset 4931 */ , - 0x647, 0x645 /* offset 4933 */ , - 0x647, 0x649 /* offset 4935 */ , - 0x647, 0x64a /* offset 4937 */ , - 0x64a, 0x62c /* offset 4939 */ , - 0x64a, 0x62d /* offset 4941 */ , - 0x64a, 0x62e /* offset 4943 */ , - 0x64a, 0x645 /* offset 4945 */ , - 0x64a, 0x649 /* offset 4947 */ , - 0x64a, 0x64a /* offset 4949 */ , - 0x630, 0x670 /* offset 4951 */ , - 0x631, 0x670 /* offset 4953 */ , - 0x649, 0x670 /* offset 4955 */ , - 0x20, 0x64c, 0x651 /* offset 4957 */ , - 0x20, 0x64d, 0x651 /* offset 4960 */ , - 0x20, 0x64e, 0x651 /* offset 4963 */ , - 0x20, 0x64f, 0x651 /* offset 4966 */ , - 0x20, 0x650, 0x651 /* offset 4969 */ , - 0x20, 0x651, 0x670 /* offset 4972 */ , - 0x64a, 0x654, 0x631 /* offset 4975 */ , - 0x64a, 0x654, 0x632 /* offset 4978 */ , - 0x64a, 0x654, 0x646 /* offset 4981 */ , - 0x628, 0x631 /* offset 4984 */ , - 0x628, 0x632 /* offset 4986 */ , - 0x628, 0x646 /* offset 4988 */ , - 0x62a, 0x631 /* offset 4990 */ , - 0x62a, 0x632 /* offset 4992 */ , - 0x62a, 0x646 /* offset 4994 */ , - 0x62b, 0x631 /* offset 4996 */ , - 0x62b, 0x632 /* offset 4998 */ , - 0x62b, 0x646 /* offset 5000 */ , - 0x645, 0x627 /* offset 5002 */ , - 0x646, 0x631 /* offset 5004 */ , - 0x646, 0x632 /* offset 5006 */ , - 0x646, 0x646 /* offset 5008 */ , - 0x64a, 0x631 /* offset 5010 */ , - 0x64a, 0x632 /* offset 5012 */ , - 0x64a, 0x646 /* offset 5014 */ , - 0x64a, 0x654, 0x62e /* offset 5016 */ , - 0x64a, 0x654, 0x647 /* offset 5019 */ , - 0x628, 0x647 /* offset 5022 */ , - 0x62a, 0x647 /* offset 5024 */ , - 0x635, 0x62e /* offset 5026 */ , - 0x644, 0x647 /* offset 5028 */ , - 0x646, 0x647 /* offset 5030 */ , - 0x647, 0x670 /* offset 5032 */ , - 0x64a, 0x647 /* offset 5034 */ , - 0x62b, 0x647 /* offset 5036 */ , - 0x633, 0x647 /* offset 5038 */ , - 0x634, 0x645 /* offset 5040 */ , - 0x634, 0x647 /* offset 5042 */ , - 0x640, 0x64e, 0x651 /* offset 5044 */ , - 0x640, 0x64f, 0x651 /* offset 5047 */ , - 0x640, 0x650, 0x651 /* offset 5050 */ , - 0x637, 0x649 /* offset 5053 */ , - 0x637, 0x64a /* offset 5055 */ , - 0x639, 0x649 /* offset 5057 */ , - 0x639, 0x64a /* offset 5059 */ , - 0x63a, 0x649 /* offset 5061 */ , - 0x63a, 0x64a /* offset 5063 */ , - 0x633, 0x649 /* offset 5065 */ , - 0x633, 0x64a /* offset 5067 */ , - 0x634, 0x649 /* offset 5069 */ , - 0x634, 0x64a /* offset 5071 */ , - 0x62d, 0x649 /* offset 5073 */ , - 0x62d, 0x64a /* offset 5075 */ , - 0x62c, 0x649 /* offset 5077 */ , - 0x62c, 0x64a /* offset 5079 */ , - 0x62e, 0x649 /* offset 5081 */ , - 0x62e, 0x64a /* offset 5083 */ , - 0x635, 0x649 /* offset 5085 */ , - 0x635, 0x64a /* offset 5087 */ , - 0x636, 0x649 /* offset 5089 */ , - 0x636, 0x64a /* offset 5091 */ , - 0x634, 0x62c /* offset 5093 */ , - 0x634, 0x62d /* offset 5095 */ , - 0x634, 0x62e /* offset 5097 */ , - 0x634, 0x631 /* offset 5099 */ , - 0x633, 0x631 /* offset 5101 */ , - 0x635, 0x631 /* offset 5103 */ , - 0x636, 0x631 /* offset 5105 */ , - 0x627, 0x64b /* offset 5107 */ , - 0x62a, 0x62c, 0x645 /* offset 5109 */ , - 0x62a, 0x62d, 0x62c /* offset 5112 */ , - 0x62a, 0x62d, 0x645 /* offset 5115 */ , - 0x62a, 0x62e, 0x645 /* offset 5118 */ , - 0x62a, 0x645, 0x62c /* offset 5121 */ , - 0x62a, 0x645, 0x62d /* offset 5124 */ , - 0x62a, 0x645, 0x62e /* offset 5127 */ , - 0x62c, 0x645, 0x62d /* offset 5130 */ , - 0x62d, 0x645, 0x64a /* offset 5133 */ , - 0x62d, 0x645, 0x649 /* offset 5136 */ , - 0x633, 0x62d, 0x62c /* offset 5139 */ , - 0x633, 0x62c, 0x62d /* offset 5142 */ , - 0x633, 0x62c, 0x649 /* offset 5145 */ , - 0x633, 0x645, 0x62d /* offset 5148 */ , - 0x633, 0x645, 0x62c /* offset 5151 */ , - 0x633, 0x645, 0x645 /* offset 5154 */ , - 0x635, 0x62d, 0x62d /* offset 5157 */ , - 0x635, 0x645, 0x645 /* offset 5160 */ , - 0x634, 0x62d, 0x645 /* offset 5163 */ , - 0x634, 0x62c, 0x64a /* offset 5166 */ , - 0x634, 0x645, 0x62e /* offset 5169 */ , - 0x634, 0x645, 0x645 /* offset 5172 */ , - 0x636, 0x62d, 0x649 /* offset 5175 */ , - 0x636, 0x62e, 0x645 /* offset 5178 */ , - 0x637, 0x645, 0x62d /* offset 5181 */ , - 0x637, 0x645, 0x645 /* offset 5184 */ , - 0x637, 0x645, 0x64a /* offset 5187 */ , - 0x639, 0x62c, 0x645 /* offset 5190 */ , - 0x639, 0x645, 0x645 /* offset 5193 */ , - 0x639, 0x645, 0x649 /* offset 5196 */ , - 0x63a, 0x645, 0x645 /* offset 5199 */ , - 0x63a, 0x645, 0x64a /* offset 5202 */ , - 0x63a, 0x645, 0x649 /* offset 5205 */ , - 0x641, 0x62e, 0x645 /* offset 5208 */ , - 0x642, 0x645, 0x62d /* offset 5211 */ , - 0x642, 0x645, 0x645 /* offset 5214 */ , - 0x644, 0x62d, 0x645 /* offset 5217 */ , - 0x644, 0x62d, 0x64a /* offset 5220 */ , - 0x644, 0x62d, 0x649 /* offset 5223 */ , - 0x644, 0x62c, 0x62c /* offset 5226 */ , - 0x644, 0x62e, 0x645 /* offset 5229 */ , - 0x644, 0x645, 0x62d /* offset 5232 */ , - 0x645, 0x62d, 0x62c /* offset 5235 */ , - 0x645, 0x62d, 0x645 /* offset 5238 */ , - 0x645, 0x62d, 0x64a /* offset 5241 */ , - 0x645, 0x62c, 0x62d /* offset 5244 */ , - 0x645, 0x62c, 0x645 /* offset 5247 */ , - 0x645, 0x62e, 0x62c /* offset 5250 */ , - 0x645, 0x62e, 0x645 /* offset 5253 */ , - 0x645, 0x62c, 0x62e /* offset 5256 */ , - 0x647, 0x645, 0x62c /* offset 5259 */ , - 0x647, 0x645, 0x645 /* offset 5262 */ , - 0x646, 0x62d, 0x645 /* offset 5265 */ , - 0x646, 0x62d, 0x649 /* offset 5268 */ , - 0x646, 0x62c, 0x645 /* offset 5271 */ , - 0x646, 0x62c, 0x649 /* offset 5274 */ , - 0x646, 0x645, 0x64a /* offset 5277 */ , - 0x646, 0x645, 0x649 /* offset 5280 */ , - 0x64a, 0x645, 0x645 /* offset 5283 */ , - 0x628, 0x62e, 0x64a /* offset 5286 */ , - 0x62a, 0x62c, 0x64a /* offset 5289 */ , - 0x62a, 0x62c, 0x649 /* offset 5292 */ , - 0x62a, 0x62e, 0x64a /* offset 5295 */ , - 0x62a, 0x62e, 0x649 /* offset 5298 */ , - 0x62a, 0x645, 0x64a /* offset 5301 */ , - 0x62a, 0x645, 0x649 /* offset 5304 */ , - 0x62c, 0x645, 0x64a /* offset 5307 */ , - 0x62c, 0x62d, 0x649 /* offset 5310 */ , - 0x62c, 0x645, 0x649 /* offset 5313 */ , - 0x633, 0x62e, 0x649 /* offset 5316 */ , - 0x635, 0x62d, 0x64a /* offset 5319 */ , - 0x634, 0x62d, 0x64a /* offset 5322 */ , - 0x636, 0x62d, 0x64a /* offset 5325 */ , - 0x644, 0x62c, 0x64a /* offset 5328 */ , - 0x644, 0x645, 0x64a /* offset 5331 */ , - 0x64a, 0x62d, 0x64a /* offset 5334 */ , - 0x64a, 0x62c, 0x64a /* offset 5337 */ , - 0x64a, 0x645, 0x64a /* offset 5340 */ , - 0x645, 0x645, 0x64a /* offset 5343 */ , - 0x642, 0x645, 0x64a /* offset 5346 */ , - 0x646, 0x62d, 0x64a /* offset 5349 */ , - 0x639, 0x645, 0x64a /* offset 5352 */ , - 0x643, 0x645, 0x64a /* offset 5355 */ , - 0x646, 0x62c, 0x62d /* offset 5358 */ , - 0x645, 0x62e, 0x64a /* offset 5361 */ , - 0x644, 0x62c, 0x645 /* offset 5364 */ , - 0x643, 0x645, 0x645 /* offset 5367 */ , - 0x62c, 0x62d, 0x64a /* offset 5370 */ , - 0x62d, 0x62c, 0x64a /* offset 5373 */ , - 0x645, 0x62c, 0x64a /* offset 5376 */ , - 0x641, 0x645, 0x64a /* offset 5379 */ , - 0x628, 0x62d, 0x64a /* offset 5382 */ , - 0x633, 0x62e, 0x64a /* offset 5385 */ , - 0x646, 0x62c, 0x64a /* offset 5388 */ , - 0x635, 0x644, 0x6d2 /* offset 5391 */ , - 0x642, 0x644, 0x6d2 /* offset 5394 */ , - 0x627, 0x644, 0x644, 0x647 /* offset 5397 */ , - 0x627, 0x643, 0x628, 0x631 /* offset 5401 */ , - 0x645, 0x62d, 0x645, 0x62f /* offset 5405 */ , - 0x635, 0x644, 0x639, 0x645 /* offset 5409 */ , - 0x631, 0x633, 0x648, 0x644 /* offset 5413 */ , - 0x639, 0x644, 0x64a, 0x647 /* offset 5417 */ , - 0x648, 0x633, 0x644, 0x645 /* offset 5421 */ , - 0x635, 0x644, 0x649 /* offset 5425 */ , - 0x635, 0x644, 0x649, 0x20, 0x627, 0x644, 0x644, 0x647, 0x20, 0x639, 0x644, 0x64a, 0x647, 0x20, 0x648, 0x633, 0x644, 0x645 /* offset 5428 */ , - 0x62c, 0x644, 0x20, 0x62c, 0x644, 0x627, 0x644, 0x647 /* offset 5446 */ , - 0x631, 0x6cc, 0x627, 0x644 /* offset 5454 */ , - 0x2014 /* offset 5458 */ , - 0x2013 /* offset 5459 */ , - 0x5f /* offset 5460 */ , - 0x7b /* offset 5461 */ , - 0x7d /* offset 5462 */ , - 0x3014 /* offset 5463 */ , - 0x3015 /* offset 5464 */ , - 0x3010 /* offset 5465 */ , - 0x3011 /* offset 5466 */ , - 0x300a /* offset 5467 */ , - 0x300b /* offset 5468 */ , - 0x300c /* offset 5469 */ , - 0x300d /* offset 5470 */ , - 0x300e /* offset 5471 */ , - 0x300f /* offset 5472 */ , - 0x2c /* offset 5473 */ , - 0x3001 /* offset 5474 */ , - 0x3a /* offset 5475 */ , - 0x3f /* offset 5476 */ , - 0x21 /* offset 5477 */ , - 0x23 /* offset 5478 */ , - 0x26 /* offset 5479 */ , - 0x2a /* offset 5480 */ , - 0x2d /* offset 5481 */ , - 0x3c /* offset 5482 */ , - 0x3e /* offset 5483 */ , - 0x5c /* offset 5484 */ , - 0x24 /* offset 5485 */ , - 0x25 /* offset 5486 */ , - 0x40 /* offset 5487 */ , - 0x20, 0x64b /* offset 5488 */ , - 0x640, 0x64b /* offset 5490 */ , - 0x20, 0x64c /* offset 5492 */ , - 0x20, 0x64d /* offset 5494 */ , - 0x20, 0x64e /* offset 5496 */ , - 0x640, 0x64e /* offset 5498 */ , - 0x20, 0x64f /* offset 5500 */ , - 0x640, 0x64f /* offset 5502 */ , - 0x20, 0x650 /* offset 5504 */ , - 0x640, 0x650 /* offset 5506 */ , - 0x20, 0x651 /* offset 5508 */ , - 0x640, 0x651 /* offset 5510 */ , - 0x20, 0x652 /* offset 5512 */ , - 0x640, 0x652 /* offset 5514 */ , - 0x621 /* offset 5516 */ , - 0x627 /* offset 5517 */ , - 0x628 /* offset 5518 */ , - 0x629 /* offset 5519 */ , - 0x62a /* offset 5520 */ , - 0x62b /* offset 5521 */ , - 0x62c /* offset 5522 */ , - 0x62d /* offset 5523 */ , - 0x62e /* offset 5524 */ , - 0x62f /* offset 5525 */ , - 0x630 /* offset 5526 */ , - 0x631 /* offset 5527 */ , - 0x632 /* offset 5528 */ , - 0x633 /* offset 5529 */ , - 0x634 /* offset 5530 */ , - 0x635 /* offset 5531 */ , - 0x636 /* offset 5532 */ , - 0x637 /* offset 5533 */ , - 0x638 /* offset 5534 */ , - 0x639 /* offset 5535 */ , - 0x63a /* offset 5536 */ , - 0x641 /* offset 5537 */ , - 0x642 /* offset 5538 */ , - 0x643 /* offset 5539 */ , - 0x644 /* offset 5540 */ , - 0x645 /* offset 5541 */ , - 0x646 /* offset 5542 */ , - 0x647 /* offset 5543 */ , - 0x648 /* offset 5544 */ , - 0x64a /* offset 5545 */ , - 0x644, 0x627, 0x653 /* offset 5546 */ , - 0x644, 0x627, 0x654 /* offset 5549 */ , - 0x644, 0x627, 0x655 /* offset 5552 */ , - 0x644, 0x627 /* offset 5555 */ , - 0x22 /* offset 5557 */ , - 0x27 /* offset 5558 */ , - 0x2f /* offset 5559 */ , - 0x5b /* offset 5560 */ , - 0x5d /* offset 5561 */ , - 0x5e /* offset 5562 */ , - 0x7c /* offset 5563 */ , - 0x7e /* offset 5564 */ , - 0x2985 /* offset 5565 */ , - 0x2986 /* offset 5566 */ , - 0x3002 /* offset 5567 */ , - 0x30fb /* offset 5568 */ , - 0x30a1 /* offset 5569 */ , - 0x30a3 /* offset 5570 */ , - 0x30a5 /* offset 5571 */ , - 0x30a7 /* offset 5572 */ , - 0x30a9 /* offset 5573 */ , - 0x30e3 /* offset 5574 */ , - 0x30e5 /* offset 5575 */ , - 0x30e7 /* offset 5576 */ , - 0x30c3 /* offset 5577 */ , - 0x30fc /* offset 5578 */ , - 0x30f3 /* offset 5579 */ , - 0x3099 /* offset 5580 */ , - 0x309a /* offset 5581 */ , - 0xa2 /* offset 5582 */ , - 0xa3 /* offset 5583 */ , - 0xac /* offset 5584 */ , - 0xa6 /* offset 5585 */ , - 0xa5 /* offset 5586 */ , - 0x20a9 /* offset 5587 */ , - 0x2502 /* offset 5588 */ , - 0x2190 /* offset 5589 */ , - 0x2191 /* offset 5590 */ , - 0x2192 /* offset 5591 */ , - 0x2193 /* offset 5592 */ , - 0x25a0 /* offset 5593 */ , - 0x25cb /* offset 5594 */ , - 0x1d157, 0x1d165 /* offset 5595 */ , - 0x1d158, 0x1d165 /* offset 5597 */ , - 0x1d158, 0x1d165, 0x1d16e /* offset 5599 */ , - 0x1d158, 0x1d165, 0x1d16f /* offset 5602 */ , - 0x1d158, 0x1d165, 0x1d170 /* offset 5605 */ , - 0x1d158, 0x1d165, 0x1d171 /* offset 5608 */ , - 0x1d158, 0x1d165, 0x1d172 /* offset 5611 */ , - 0x1d1b9, 0x1d165 /* offset 5614 */ , - 0x1d1ba, 0x1d165 /* offset 5616 */ , - 0x1d1b9, 0x1d165, 0x1d16e /* offset 5618 */ , - 0x1d1ba, 0x1d165, 0x1d16e /* offset 5621 */ , - 0x1d1b9, 0x1d165, 0x1d16f /* offset 5624 */ , - 0x1d1ba, 0x1d165, 0x1d16f /* offset 5627 */ , - 0x391 /* offset 5630 */ , - 0x392 /* offset 5631 */ , - 0x394 /* offset 5632 */ , - 0x395 /* offset 5633 */ , - 0x396 /* offset 5634 */ , - 0x397 /* offset 5635 */ , - 0x399 /* offset 5636 */ , - 0x39a /* offset 5637 */ , - 0x39b /* offset 5638 */ , - 0x39c /* offset 5639 */ , - 0x39d /* offset 5640 */ , - 0x39e /* offset 5641 */ , - 0x39f /* offset 5642 */ , - 0x3a1 /* offset 5643 */ , - 0x3a3 /* offset 5644 */ , - 0x3a4 /* offset 5645 */ , - 0x3a6 /* offset 5646 */ , - 0x3a7 /* offset 5647 */ , - 0x3a8 /* offset 5648 */ , - 0x2207 /* offset 5649 */ , - 0x3b1 /* offset 5650 */ , - 0x3b4 /* offset 5651 */ , - 0x3b6 /* offset 5652 */ , - 0x3b7 /* offset 5653 */ , - 0x3bb /* offset 5654 */ , - 0x3bd /* offset 5655 */ , - 0x3be /* offset 5656 */ , - 0x3bf /* offset 5657 */ , - 0x3c3 /* offset 5658 */ , - 0x3c4 /* offset 5659 */ , - 0x3c5 /* offset 5660 */ , - 0x3c7 /* offset 5661 */ , - 0x3c8 /* offset 5662 */ , - 0x3c9 /* offset 5663 */ , - 0x2202 /* offset 5664 */ , - 0x4e3d /* offset 5665 */ , - 0x4e38 /* offset 5666 */ , - 0x4e41 /* offset 5667 */ , - 0x20122 /* offset 5668 */ , - 0x4f60 /* offset 5669 */ , - 0x4fbb /* offset 5670 */ , - 0x5002 /* offset 5671 */ , - 0x507a /* offset 5672 */ , - 0x5099 /* offset 5673 */ , - 0x50cf /* offset 5674 */ , - 0x349e /* offset 5675 */ , - 0x2063a /* offset 5676 */ , - 0x5154 /* offset 5677 */ , - 0x5164 /* offset 5678 */ , - 0x5177 /* offset 5679 */ , - 0x2051c /* offset 5680 */ , - 0x34b9 /* offset 5681 */ , - 0x5167 /* offset 5682 */ , - 0x518d /* offset 5683 */ , - 0x2054b /* offset 5684 */ , - 0x5197 /* offset 5685 */ , - 0x51a4 /* offset 5686 */ , - 0x4ecc /* offset 5687 */ , - 0x51ac /* offset 5688 */ , - 0x51b5 /* offset 5689 */ , - 0x291df /* offset 5690 */ , - 0x5203 /* offset 5691 */ , - 0x34df /* offset 5692 */ , - 0x523b /* offset 5693 */ , - 0x5246 /* offset 5694 */ , - 0x5272 /* offset 5695 */ , - 0x5277 /* offset 5696 */ , - 0x3515 /* offset 5697 */ , - 0x52c7 /* offset 5698 */ , - 0x52fa /* offset 5699 */ , - 0x5305 /* offset 5700 */ , - 0x5306 /* offset 5701 */ , - 0x5349 /* offset 5702 */ , - 0x535a /* offset 5703 */ , - 0x5373 /* offset 5704 */ , - 0x537d /* offset 5705 */ , - 0x537f /* offset 5706 */ , - 0x20a2c /* offset 5707 */ , - 0x7070 /* offset 5708 */ , - 0x53ca /* offset 5709 */ , - 0x53df /* offset 5710 */ , - 0x20b63 /* offset 5711 */ , - 0x53eb /* offset 5712 */ , - 0x53f1 /* offset 5713 */ , - 0x5406 /* offset 5714 */ , - 0x549e /* offset 5715 */ , - 0x5438 /* offset 5716 */ , - 0x5448 /* offset 5717 */ , - 0x5468 /* offset 5718 */ , - 0x54a2 /* offset 5719 */ , - 0x54f6 /* offset 5720 */ , - 0x5510 /* offset 5721 */ , - 0x5553 /* offset 5722 */ , - 0x5563 /* offset 5723 */ , - 0x5584 /* offset 5724 */ , - 0x5599 /* offset 5725 */ , - 0x55ab /* offset 5726 */ , - 0x55b3 /* offset 5727 */ , - 0x55c2 /* offset 5728 */ , - 0x5716 /* offset 5729 */ , - 0x5717 /* offset 5730 */ , - 0x5651 /* offset 5731 */ , - 0x5674 /* offset 5732 */ , - 0x58ee /* offset 5733 */ , - 0x57ce /* offset 5734 */ , - 0x57f4 /* offset 5735 */ , - 0x580d /* offset 5736 */ , - 0x578b /* offset 5737 */ , - 0x5832 /* offset 5738 */ , - 0x5831 /* offset 5739 */ , - 0x58ac /* offset 5740 */ , - 0x214e4 /* offset 5741 */ , - 0x58f2 /* offset 5742 */ , - 0x58f7 /* offset 5743 */ , - 0x5906 /* offset 5744 */ , - 0x591a /* offset 5745 */ , - 0x5922 /* offset 5746 */ , - 0x5962 /* offset 5747 */ , - 0x216a8 /* offset 5748 */ , - 0x216ea /* offset 5749 */ , - 0x59ec /* offset 5750 */ , - 0x5a1b /* offset 5751 */ , - 0x5a27 /* offset 5752 */ , - 0x59d8 /* offset 5753 */ , - 0x5a66 /* offset 5754 */ , - 0x36ee /* offset 5755 */ , - 0x2136a /* offset 5756 */ , - 0x5b08 /* offset 5757 */ , - 0x5b3e /* offset 5758 */ , - 0x219c8 /* offset 5759 */ , - 0x5bc3 /* offset 5760 */ , - 0x5bd8 /* offset 5761 */ , - 0x5bf3 /* offset 5762 */ , - 0x21b18 /* offset 5763 */ , - 0x5bff /* offset 5764 */ , - 0x5c06 /* offset 5765 */ , - 0x5f33 /* offset 5766 */ , - 0x3781 /* offset 5767 */ , - 0x5c60 /* offset 5768 */ , - 0x5cc0 /* offset 5769 */ , - 0x5c8d /* offset 5770 */ , - 0x21de4 /* offset 5771 */ , - 0x5d43 /* offset 5772 */ , - 0x21de6 /* offset 5773 */ , - 0x5d6e /* offset 5774 */ , - 0x5d6b /* offset 5775 */ , - 0x5d7c /* offset 5776 */ , - 0x5de1 /* offset 5777 */ , - 0x5de2 /* offset 5778 */ , - 0x382f /* offset 5779 */ , - 0x5dfd /* offset 5780 */ , - 0x5e28 /* offset 5781 */ , - 0x5e3d /* offset 5782 */ , - 0x5e69 /* offset 5783 */ , - 0x3862 /* offset 5784 */ , - 0x22183 /* offset 5785 */ , - 0x387c /* offset 5786 */ , - 0x5eb0 /* offset 5787 */ , - 0x5eb3 /* offset 5788 */ , - 0x5eb6 /* offset 5789 */ , - 0x2a392 /* offset 5790 */ , - 0x22331 /* offset 5791 */ , - 0x8201 /* offset 5792 */ , - 0x5f22 /* offset 5793 */ , - 0x38c7 /* offset 5794 */ , - 0x232b8 /* offset 5795 */ , - 0x261da /* offset 5796 */ , - 0x5f62 /* offset 5797 */ , - 0x5f6b /* offset 5798 */ , - 0x38e3 /* offset 5799 */ , - 0x5f9a /* offset 5800 */ , - 0x5fcd /* offset 5801 */ , - 0x5fd7 /* offset 5802 */ , - 0x5ff9 /* offset 5803 */ , - 0x6081 /* offset 5804 */ , - 0x393a /* offset 5805 */ , - 0x391c /* offset 5806 */ , - 0x226d4 /* offset 5807 */ , - 0x60c7 /* offset 5808 */ , - 0x6148 /* offset 5809 */ , - 0x614c /* offset 5810 */ , - 0x614e /* offset 5811 */ , - 0x617a /* offset 5812 */ , - 0x61b2 /* offset 5813 */ , - 0x61a4 /* offset 5814 */ , - 0x61af /* offset 5815 */ , - 0x61de /* offset 5816 */ , - 0x6210 /* offset 5817 */ , - 0x621b /* offset 5818 */ , - 0x625d /* offset 5819 */ , - 0x62b1 /* offset 5820 */ , - 0x62d4 /* offset 5821 */ , - 0x6350 /* offset 5822 */ , - 0x22b0c /* offset 5823 */ , - 0x633d /* offset 5824 */ , - 0x62fc /* offset 5825 */ , - 0x6368 /* offset 5826 */ , - 0x6383 /* offset 5827 */ , - 0x63e4 /* offset 5828 */ , - 0x22bf1 /* offset 5829 */ , - 0x6422 /* offset 5830 */ , - 0x63c5 /* offset 5831 */ , - 0x63a9 /* offset 5832 */ , - 0x3a2e /* offset 5833 */ , - 0x6469 /* offset 5834 */ , - 0x647e /* offset 5835 */ , - 0x649d /* offset 5836 */ , - 0x6477 /* offset 5837 */ , - 0x3a6c /* offset 5838 */ , - 0x656c /* offset 5839 */ , - 0x2300a /* offset 5840 */ , - 0x65e3 /* offset 5841 */ , - 0x66f8 /* offset 5842 */ , - 0x6649 /* offset 5843 */ , - 0x3b19 /* offset 5844 */ , - 0x3b08 /* offset 5845 */ , - 0x3ae4 /* offset 5846 */ , - 0x5192 /* offset 5847 */ , - 0x5195 /* offset 5848 */ , - 0x6700 /* offset 5849 */ , - 0x669c /* offset 5850 */ , - 0x80ad /* offset 5851 */ , - 0x43d9 /* offset 5852 */ , - 0x671b /* offset 5853 */ , - 0x6721 /* offset 5854 */ , - 0x675e /* offset 5855 */ , - 0x6753 /* offset 5856 */ , - 0x233c3 /* offset 5857 */ , - 0x3b49 /* offset 5858 */ , - 0x67fa /* offset 5859 */ , - 0x6785 /* offset 5860 */ , - 0x6852 /* offset 5861 */ , - 0x2346d /* offset 5862 */ , - 0x688e /* offset 5863 */ , - 0x681f /* offset 5864 */ , - 0x6914 /* offset 5865 */ , - 0x3b9d /* offset 5866 */ , - 0x6942 /* offset 5867 */ , - 0x69a3 /* offset 5868 */ , - 0x69ea /* offset 5869 */ , - 0x6aa8 /* offset 5870 */ , - 0x236a3 /* offset 5871 */ , - 0x6adb /* offset 5872 */ , - 0x3c18 /* offset 5873 */ , - 0x6b21 /* offset 5874 */ , - 0x238a7 /* offset 5875 */ , - 0x6b54 /* offset 5876 */ , - 0x3c4e /* offset 5877 */ , - 0x6b72 /* offset 5878 */ , - 0x6b9f /* offset 5879 */ , - 0x6bbb /* offset 5880 */ , - 0x23a8d /* offset 5881 */ , - 0x21d0b /* offset 5882 */ , - 0x23afa /* offset 5883 */ , - 0x6c4e /* offset 5884 */ , - 0x23cbc /* offset 5885 */ , - 0x6cbf /* offset 5886 */ , - 0x6ccd /* offset 5887 */ , - 0x6c67 /* offset 5888 */ , - 0x6d16 /* offset 5889 */ , - 0x6d3e /* offset 5890 */ , - 0x6d69 /* offset 5891 */ , - 0x6d78 /* offset 5892 */ , - 0x6d85 /* offset 5893 */ , - 0x23d1e /* offset 5894 */ , - 0x6d34 /* offset 5895 */ , - 0x6e2f /* offset 5896 */ , - 0x6e6e /* offset 5897 */ , - 0x3d33 /* offset 5898 */ , - 0x6ecb /* offset 5899 */ , - 0x6ec7 /* offset 5900 */ , - 0x23ed1 /* offset 5901 */ , - 0x6df9 /* offset 5902 */ , - 0x6f6e /* offset 5903 */ , - 0x23f5e /* offset 5904 */ , - 0x23f8e /* offset 5905 */ , - 0x6fc6 /* offset 5906 */ , - 0x7039 /* offset 5907 */ , - 0x701e /* offset 5908 */ , - 0x701b /* offset 5909 */ , - 0x3d96 /* offset 5910 */ , - 0x704a /* offset 5911 */ , - 0x707d /* offset 5912 */ , - 0x7077 /* offset 5913 */ , - 0x70ad /* offset 5914 */ , - 0x20525 /* offset 5915 */ , - 0x7145 /* offset 5916 */ , - 0x24263 /* offset 5917 */ , - 0x719c /* offset 5918 */ , - 0x43ab /* offset 5919 */ , - 0x7228 /* offset 5920 */ , - 0x7235 /* offset 5921 */ , - 0x7250 /* offset 5922 */ , - 0x24608 /* offset 5923 */ , - 0x7280 /* offset 5924 */ , - 0x7295 /* offset 5925 */ , - 0x24735 /* offset 5926 */ , - 0x24814 /* offset 5927 */ , - 0x737a /* offset 5928 */ , - 0x738b /* offset 5929 */ , - 0x3eac /* offset 5930 */ , - 0x73a5 /* offset 5931 */ , - 0x3eb8 /* offset 5932 */ , - 0x7447 /* offset 5933 */ , - 0x745c /* offset 5934 */ , - 0x7471 /* offset 5935 */ , - 0x7485 /* offset 5936 */ , - 0x74ca /* offset 5937 */ , - 0x3f1b /* offset 5938 */ , - 0x7524 /* offset 5939 */ , - 0x24c36 /* offset 5940 */ , - 0x753e /* offset 5941 */ , - 0x24c92 /* offset 5942 */ , - 0x2219f /* offset 5943 */ , - 0x7610 /* offset 5944 */ , - 0x24fa1 /* offset 5945 */ , - 0x24fb8 /* offset 5946 */ , - 0x25044 /* offset 5947 */ , - 0x3ffc /* offset 5948 */ , - 0x4008 /* offset 5949 */ , - 0x76f4 /* offset 5950 */ , - 0x250f3 /* offset 5951 */ , - 0x250f2 /* offset 5952 */ , - 0x25119 /* offset 5953 */ , - 0x25133 /* offset 5954 */ , - 0x771e /* offset 5955 */ , - 0x771f /* offset 5956 */ , - 0x774a /* offset 5957 */ , - 0x4039 /* offset 5958 */ , - 0x778b /* offset 5959 */ , - 0x4046 /* offset 5960 */ , - 0x4096 /* offset 5961 */ , - 0x2541d /* offset 5962 */ , - 0x784e /* offset 5963 */ , - 0x78cc /* offset 5964 */ , - 0x40e3 /* offset 5965 */ , - 0x25626 /* offset 5966 */ , - 0x2569a /* offset 5967 */ , - 0x256c5 /* offset 5968 */ , - 0x79eb /* offset 5969 */ , - 0x412f /* offset 5970 */ , - 0x7a4a /* offset 5971 */ , - 0x7a4f /* offset 5972 */ , - 0x2597c /* offset 5973 */ , - 0x25aa7 /* offset 5974 */ , - 0x7aae /* offset 5975 */ , - 0x4202 /* offset 5976 */ , - 0x25bab /* offset 5977 */ , - 0x7bc6 /* offset 5978 */ , - 0x7bc9 /* offset 5979 */ , - 0x4227 /* offset 5980 */ , - 0x25c80 /* offset 5981 */ , - 0x7cd2 /* offset 5982 */ , - 0x42a0 /* offset 5983 */ , - 0x7ce8 /* offset 5984 */ , - 0x7ce3 /* offset 5985 */ , - 0x7d00 /* offset 5986 */ , - 0x25f86 /* offset 5987 */ , - 0x7d63 /* offset 5988 */ , - 0x4301 /* offset 5989 */ , - 0x7dc7 /* offset 5990 */ , - 0x7e02 /* offset 5991 */ , - 0x7e45 /* offset 5992 */ , - 0x4334 /* offset 5993 */ , - 0x26228 /* offset 5994 */ , - 0x26247 /* offset 5995 */ , - 0x4359 /* offset 5996 */ , - 0x262d9 /* offset 5997 */ , - 0x7f7a /* offset 5998 */ , - 0x2633e /* offset 5999 */ , - 0x7f95 /* offset 6000 */ , - 0x7ffa /* offset 6001 */ , - 0x264da /* offset 6002 */ , - 0x26523 /* offset 6003 */ , - 0x8060 /* offset 6004 */ , - 0x265a8 /* offset 6005 */ , - 0x8070 /* offset 6006 */ , - 0x2335f /* offset 6007 */ , - 0x43d5 /* offset 6008 */ , - 0x80b2 /* offset 6009 */ , - 0x8103 /* offset 6010 */ , - 0x440b /* offset 6011 */ , - 0x813e /* offset 6012 */ , - 0x5ab5 /* offset 6013 */ , - 0x267a7 /* offset 6014 */ , - 0x267b5 /* offset 6015 */ , - 0x23393 /* offset 6016 */ , - 0x2339c /* offset 6017 */ , - 0x8204 /* offset 6018 */ , - 0x8f9e /* offset 6019 */ , - 0x446b /* offset 6020 */ , - 0x8291 /* offset 6021 */ , - 0x828b /* offset 6022 */ , - 0x829d /* offset 6023 */ , - 0x52b3 /* offset 6024 */ , - 0x82b1 /* offset 6025 */ , - 0x82b3 /* offset 6026 */ , - 0x82bd /* offset 6027 */ , - 0x82e6 /* offset 6028 */ , - 0x26b3c /* offset 6029 */ , - 0x831d /* offset 6030 */ , - 0x8363 /* offset 6031 */ , - 0x83ad /* offset 6032 */ , - 0x8323 /* offset 6033 */ , - 0x83bd /* offset 6034 */ , - 0x83e7 /* offset 6035 */ , - 0x8353 /* offset 6036 */ , - 0x83ca /* offset 6037 */ , - 0x83cc /* offset 6038 */ , - 0x83dc /* offset 6039 */ , - 0x26c36 /* offset 6040 */ , - 0x26d6b /* offset 6041 */ , - 0x26cd5 /* offset 6042 */ , - 0x452b /* offset 6043 */ , - 0x84f1 /* offset 6044 */ , - 0x84f3 /* offset 6045 */ , - 0x8516 /* offset 6046 */ , - 0x273ca /* offset 6047 */ , - 0x8564 /* offset 6048 */ , - 0x26f2c /* offset 6049 */ , - 0x455d /* offset 6050 */ , - 0x4561 /* offset 6051 */ , - 0x26fb1 /* offset 6052 */ , - 0x270d2 /* offset 6053 */ , - 0x456b /* offset 6054 */ , - 0x8650 /* offset 6055 */ , - 0x8667 /* offset 6056 */ , - 0x8669 /* offset 6057 */ , - 0x86a9 /* offset 6058 */ , - 0x8688 /* offset 6059 */ , - 0x870e /* offset 6060 */ , - 0x86e2 /* offset 6061 */ , - 0x8779 /* offset 6062 */ , - 0x8728 /* offset 6063 */ , - 0x876b /* offset 6064 */ , - 0x8786 /* offset 6065 */ , - 0x4d57 /* offset 6066 */ , - 0x87e1 /* offset 6067 */ , - 0x8801 /* offset 6068 */ , - 0x45f9 /* offset 6069 */ , - 0x8860 /* offset 6070 */ , - 0x27667 /* offset 6071 */ , - 0x88d7 /* offset 6072 */ , - 0x88de /* offset 6073 */ , - 0x4635 /* offset 6074 */ , - 0x88fa /* offset 6075 */ , - 0x34bb /* offset 6076 */ , - 0x278ae /* offset 6077 */ , - 0x27966 /* offset 6078 */ , - 0x46be /* offset 6079 */ , - 0x46c7 /* offset 6080 */ , - 0x8aa0 /* offset 6081 */ , - 0x8aed /* offset 6082 */ , - 0x8b8a /* offset 6083 */ , - 0x27ca8 /* offset 6084 */ , - 0x8cab /* offset 6085 */ , - 0x8cc1 /* offset 6086 */ , - 0x8d1b /* offset 6087 */ , - 0x8d77 /* offset 6088 */ , - 0x27f2f /* offset 6089 */ , - 0x20804 /* offset 6090 */ , - 0x8dcb /* offset 6091 */ , - 0x8dbc /* offset 6092 */ , - 0x8df0 /* offset 6093 */ , - 0x208de /* offset 6094 */ , - 0x8ed4 /* offset 6095 */ , - 0x8f38 /* offset 6096 */ , - 0x285d2 /* offset 6097 */ , - 0x285ed /* offset 6098 */ , - 0x9094 /* offset 6099 */ , - 0x90f1 /* offset 6100 */ , - 0x9111 /* offset 6101 */ , - 0x2872e /* offset 6102 */ , - 0x911b /* offset 6103 */ , - 0x9238 /* offset 6104 */ , - 0x92d7 /* offset 6105 */ , - 0x92d8 /* offset 6106 */ , - 0x927c /* offset 6107 */ , - 0x93f9 /* offset 6108 */ , - 0x9415 /* offset 6109 */ , - 0x28bfa /* offset 6110 */ , - 0x958b /* offset 6111 */ , - 0x4995 /* offset 6112 */ , - 0x95b7 /* offset 6113 */ , - 0x28d77 /* offset 6114 */ , - 0x49e6 /* offset 6115 */ , - 0x96c3 /* offset 6116 */ , - 0x5db2 /* offset 6117 */ , - 0x9723 /* offset 6118 */ , - 0x29145 /* offset 6119 */ , - 0x2921a /* offset 6120 */ , - 0x4a6e /* offset 6121 */ , - 0x4a76 /* offset 6122 */ , - 0x97e0 /* offset 6123 */ , - 0x2940a /* offset 6124 */ , - 0x4ab2 /* offset 6125 */ , - 0x29496 /* offset 6126 */ , - 0x980b /* offset 6127 */ , - 0x9829 /* offset 6128 */ , - 0x295b6 /* offset 6129 */ , - 0x98e2 /* offset 6130 */ , - 0x4b33 /* offset 6131 */ , - 0x9929 /* offset 6132 */ , - 0x99a7 /* offset 6133 */ , - 0x99c2 /* offset 6134 */ , - 0x99fe /* offset 6135 */ , - 0x4bce /* offset 6136 */ , - 0x29b30 /* offset 6137 */ , - 0x9b12 /* offset 6138 */ , - 0x9c40 /* offset 6139 */ , - 0x9cfd /* offset 6140 */ , - 0x4cce /* offset 6141 */ , - 0x4ced /* offset 6142 */ , - 0x9d67 /* offset 6143 */ , - 0x2a0ce /* offset 6144 */ , - 0x4cf8 /* offset 6145 */ , - 0x2a105 /* offset 6146 */ , - 0x2a20e /* offset 6147 */ , - 0x2a291 /* offset 6148 */ , - 0x4d56 /* offset 6149 */ , - 0x9efe /* offset 6150 */ , - 0x9f05 /* offset 6151 */ , - 0x9f0f /* offset 6152 */ , - 0x9f16 /* offset 6153 */ , - 0x2a600 /* offset 6154 */ -}; - diff --git a/Build/source/libs/poppler/poppler-src/poppler/UnicodeMap.cc b/Build/source/libs/poppler/poppler-src/poppler/UnicodeMap.cc deleted file mode 100644 index a7c59edf796..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/UnicodeMap.cc +++ /dev/null @@ -1,364 +0,0 @@ -//======================================================================== -// -// UnicodeMap.cc -// -// Copyright 2001-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2010 Jakub Wilk <jwilk@jwilk.net> -// Copyright (C) 2017 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2017 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2017 Jean Ghali <jghali@libertysurf.fr> -// Copyright (C) 2018 Adam Reichold <adam.reichold@t-online.de> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include <config.h> - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include <stdio.h> -#include <string.h> -#include "goo/glibc.h" -#include "goo/gmem.h" -#include "goo/gfile.h" -#include "goo/GooString.h" -#include "goo/GooList.h" -#include "Error.h" -#include "GlobalParams.h" -#include "UnicodeMap.h" - -//------------------------------------------------------------------------ - -#define maxExtCode 16 - -struct UnicodeMapExt { - Unicode u; // Unicode char - char code[maxExtCode]; - Guint nBytes; -}; - -//------------------------------------------------------------------------ - -UnicodeMap *UnicodeMap::parse(GooString *encodingNameA) { - FILE *f; - UnicodeMap *map; - UnicodeMapRange *range; - UnicodeMapExt *eMap; - int size, eMapsSize; - char buf[256]; - int line, nBytes, i; - char *tok1, *tok2, *tok3; - char *tokptr; - - if (!(f = globalParams->getUnicodeMapFile(encodingNameA))) { - error(errSyntaxError, -1, - "Couldn't find unicodeMap file for the '{0:t}' encoding", - encodingNameA); - return nullptr; - } - - map = new UnicodeMap(encodingNameA->copy()); - - size = 8; - map->ranges = (UnicodeMapRange *)gmallocn(size, sizeof(UnicodeMapRange)); - eMapsSize = 0; - - line = 1; - while (getLine(buf, sizeof(buf), f)) { - if ((tok1 = strtok_r(buf, " \t\r\n", &tokptr)) && - (tok2 = strtok_r(nullptr, " \t\r\n", &tokptr))) { - if (!(tok3 = strtok_r(nullptr, " \t\r\n", &tokptr))) { - tok3 = tok2; - tok2 = tok1; - } - nBytes = strlen(tok3) / 2; - if (nBytes <= 4) { - if (map->len == size) { - size *= 2; - map->ranges = (UnicodeMapRange *) - greallocn(map->ranges, size, sizeof(UnicodeMapRange)); - } - range = &map->ranges[map->len]; - sscanf(tok1, "%x", &range->start); - sscanf(tok2, "%x", &range->end); - sscanf(tok3, "%x", &range->code); - range->nBytes = nBytes; - ++map->len; - } else if (tok2 == tok1) { - if (map->eMapsLen == eMapsSize) { - eMapsSize += 16; - map->eMaps = (UnicodeMapExt *) - greallocn(map->eMaps, eMapsSize, sizeof(UnicodeMapExt)); - } - eMap = &map->eMaps[map->eMapsLen]; - sscanf(tok1, "%x", &eMap->u); - for (i = 0; i < nBytes; ++i) { - unsigned int x; - sscanf(tok3 + i*2, "%2x", &x); - eMap->code[i] = (char)x; - } - eMap->nBytes = nBytes; - ++map->eMapsLen; - } else { - error(errSyntaxError, -1, - "Bad line ({0:d}) in unicodeMap file for the '{1:t}' encoding", - line, encodingNameA); - } - } else { - error(errSyntaxError, -1, - "Bad line ({0:d}) in unicodeMap file for the '{1:t}' encoding", - line, encodingNameA); - } - ++line; - } - - fclose(f); - - return map; -} - -UnicodeMap::UnicodeMap(GooString *encodingNameA) { - encodingName = encodingNameA; - unicodeOut = gFalse; - kind = unicodeMapUser; - ranges = nullptr; - len = 0; - eMaps = nullptr; - eMapsLen = 0; - refCnt = 1; -} - -UnicodeMap::UnicodeMap(const char *encodingNameA, GBool unicodeOutA, - UnicodeMapRange *rangesA, int lenA) { - encodingName = new GooString(encodingNameA); - unicodeOut = unicodeOutA; - kind = unicodeMapResident; - ranges = rangesA; - len = lenA; - eMaps = nullptr; - eMapsLen = 0; - refCnt = 1; -} - -UnicodeMap::UnicodeMap(const char *encodingNameA, GBool unicodeOutA, - UnicodeMapFunc funcA) { - encodingName = new GooString(encodingNameA); - unicodeOut = unicodeOutA; - kind = unicodeMapFunc; - func = funcA; - eMaps = nullptr; - eMapsLen = 0; - refCnt = 1; -} - -UnicodeMap::~UnicodeMap() { - delete encodingName; - if (kind == unicodeMapUser && ranges) { - gfree(ranges); - } - if (eMaps) { - gfree(eMaps); - } -} - -UnicodeMap::UnicodeMap(UnicodeMap &&other) noexcept - : encodingName{other.encodingName} - , kind{other.kind} - , unicodeOut{other.unicodeOut} - , len{other.len} - , eMaps{other.eMaps} - , eMapsLen{other.eMapsLen} - , refCnt{1} -{ - switch (kind) { - case unicodeMapUser: - case unicodeMapResident: - ranges = other.ranges; - other.ranges = nullptr; - break; - case unicodeMapFunc: - func = other.func; - break; - } - other.encodingName = nullptr; - other.eMaps = nullptr; -} - -UnicodeMap& UnicodeMap::operator=(UnicodeMap &&other) noexcept -{ - if (this != &other) - swap(other); - return *this; -} - -void UnicodeMap::swap(UnicodeMap &other) noexcept -{ - using std::swap; - swap(encodingName, other.encodingName); - swap(unicodeOut, other.unicodeOut); - switch (kind) { - case unicodeMapUser: - case unicodeMapResident: - switch (other.kind) { - case unicodeMapUser: - case unicodeMapResident: - swap(ranges, other.ranges); - break; - case unicodeMapFunc: - { - const auto tmp = ranges; - func = other.func; - other.ranges = tmp; - break; - } - } - break; - case unicodeMapFunc: - switch (other.kind) { - case unicodeMapUser: - case unicodeMapResident: - { - const auto tmp = func; - ranges = other.ranges; - other.func = tmp; - break; - } - case unicodeMapFunc: - swap(func, other.func); - break; - } - break; - } - swap(kind, other.kind); - swap(len, other.len); - swap(eMaps, other.eMaps); - swap(eMapsLen, other.eMapsLen); -} - -void UnicodeMap::incRefCnt() { - refCnt.fetch_add(1); -} - -void UnicodeMap::decRefCnt() { - if (refCnt.fetch_sub(1) == 1) { - delete this; - } -} - -GBool UnicodeMap::match(GooString *encodingNameA) { - return !encodingName->cmp(encodingNameA); -} - -int UnicodeMap::mapUnicode(Unicode u, char *buf, int bufSize) { - int a, b, m, n, i, j; - Guint code; - - if (kind == unicodeMapFunc) { - return (*func)(u, buf, bufSize); - } - - a = 0; - b = len; - if (u >= ranges[a].start) { - // invariant: ranges[a].start <= u < ranges[b].start - while (b - a > 1) { - m = (a + b) / 2; - if (u >= ranges[m].start) { - a = m; - } else if (u < ranges[m].start) { - b = m; - } - } - if (u <= ranges[a].end) { - n = ranges[a].nBytes; - if (n > bufSize) { - return 0; - } - code = ranges[a].code + (u - ranges[a].start); - for (i = n - 1; i >= 0; --i) { - buf[i] = (char)(code & 0xff); - code >>= 8; - } - return n; - } - } - - for (i = 0; i < eMapsLen; ++i) { - if (eMaps[i].u == u) { - n = eMaps[i].nBytes; - for (j = 0; j < n; ++j) { - buf[j] = eMaps[i].code[j]; - } - return n; - } - } - - return 0; -} - -//------------------------------------------------------------------------ - -UnicodeMapCache::UnicodeMapCache() { - int i; - - for (i = 0; i < unicodeMapCacheSize; ++i) { - cache[i] = nullptr; - } -} - -UnicodeMapCache::~UnicodeMapCache() { - int i; - - for (i = 0; i < unicodeMapCacheSize; ++i) { - if (cache[i]) { - cache[i]->decRefCnt(); - } - } -} - -UnicodeMap *UnicodeMapCache::getUnicodeMap(GooString *encodingName) { - UnicodeMap *map; - int i, j; - - if (cache[0] && cache[0]->match(encodingName)) { - cache[0]->incRefCnt(); - return cache[0]; - } - for (i = 1; i < unicodeMapCacheSize; ++i) { - if (cache[i] && cache[i]->match(encodingName)) { - map = cache[i]; - for (j = i; j >= 1; --j) { - cache[j] = cache[j - 1]; - } - cache[0] = map; - map->incRefCnt(); - return map; - } - } - if ((map = UnicodeMap::parse(encodingName))) { - if (cache[unicodeMapCacheSize - 1]) { - cache[unicodeMapCacheSize - 1]->decRefCnt(); - } - for (j = unicodeMapCacheSize - 1; j >= 1; --j) { - cache[j] = cache[j - 1]; - } - cache[0] = map; - map->incRefCnt(); - return map; - } - return nullptr; -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/UnicodeMap.h b/Build/source/libs/poppler/poppler-src/poppler/UnicodeMap.h deleted file mode 100644 index 871c656a8ae..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/UnicodeMap.h +++ /dev/null @@ -1,143 +0,0 @@ -//======================================================================== -// -// UnicodeMap.h -// -// Mapping from Unicode to an encoding. -// -// Copyright 2001-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2017 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2018 Adam Reichold <adam.reichold@t-online.de> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef UNICODEMAP_H -#define UNICODEMAP_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "poppler-config.h" -#include "goo/gtypes.h" -#include "CharTypes.h" -#include <atomic> - -class GooString; - -//------------------------------------------------------------------------ - -enum UnicodeMapKind { - unicodeMapUser, // read from a file - unicodeMapResident, // static list of ranges - unicodeMapFunc // function pointer -}; - -typedef int (*UnicodeMapFunc)(Unicode u, char *buf, int bufSize); - -struct UnicodeMapRange { - Unicode start, end; // range of Unicode chars - Guint code, nBytes; // first output code -}; - -struct UnicodeMapExt; - -//------------------------------------------------------------------------ - -class UnicodeMap { -public: - - // Create the UnicodeMap specified by <encodingName>. Sets the - // initial reference count to 1. Returns NULL on failure. - static UnicodeMap *parse(GooString *encodingNameA); - - // Create a resident UnicodeMap. - UnicodeMap(const char *encodingNameA, GBool unicodeOutA, - UnicodeMapRange *rangesA, int lenA); - - // Create a resident UnicodeMap that uses a function instead of a - // list of ranges. - UnicodeMap(const char *encodingNameA, GBool unicodeOutA, - UnicodeMapFunc funcA); - - UnicodeMap(UnicodeMap &&other) noexcept; - UnicodeMap& operator=(UnicodeMap &&other) noexcept; - - void swap(UnicodeMap& other) noexcept; - - ~UnicodeMap(); - - UnicodeMap(const UnicodeMap &) = delete; - UnicodeMap& operator=(const UnicodeMap &) = delete; - - void incRefCnt(); - void decRefCnt(); - - GooString *getEncodingName() { return encodingName; } - - GBool isUnicode() { return unicodeOut; } - - // Return true if this UnicodeMap matches the specified - // <encodingNameA>. - GBool match(GooString *encodingNameA); - - // Map Unicode to the target encoding. Fills in <buf> with the - // output and returns the number of bytes used. Output will be - // truncated at <bufSize> bytes. No string terminator is written. - // Returns 0 if no mapping is found. - int mapUnicode(Unicode u, char *buf, int bufSize); - -private: - - UnicodeMap(GooString *encodingNameA); - - GooString *encodingName; - UnicodeMapKind kind; - GBool unicodeOut; - union { - UnicodeMapRange *ranges; // (user, resident) - UnicodeMapFunc func; // (func) - }; - int len; // (user, resident) - UnicodeMapExt *eMaps; // (user) - int eMapsLen; // (user) - std::atomic_int refCnt; -}; - -//------------------------------------------------------------------------ - -#define unicodeMapCacheSize 4 - -class UnicodeMapCache { -public: - - UnicodeMapCache(); - ~UnicodeMapCache(); - - UnicodeMapCache(const UnicodeMapCache &) = delete; - UnicodeMapCache& operator=(const UnicodeMapCache &) = delete; - - // Get the UnicodeMap for <encodingName>. Increments its reference - // count; there will be one reference for the cache plus one for the - // caller of this function. Returns NULL on failure. - UnicodeMap *getUnicodeMap(GooString *encodingName); - -private: - - UnicodeMap *cache[unicodeMapCacheSize]; -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/UnicodeMapFuncs.cc b/Build/source/libs/poppler/poppler-src/poppler/UnicodeMapFuncs.cc deleted file mode 100644 index 3eb82d501e8..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/UnicodeMapFuncs.cc +++ /dev/null @@ -1,88 +0,0 @@ -//======================================================================== -// -// UnicodeMapFuncs.cc -// -// Copyright 2001-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2008 Koji Otani <sho@bbr.jp> -// Copyright (C) 2017 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2018 Albert Astals Cid <aacid@kde.org> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include "UnicodeMapFuncs.h" - -int mapUTF8(Unicode u, char *buf, int bufSize) { - if (u <= 0x0000007f) { - if (bufSize < 1) { - return 0; - } - buf[0] = (char)u; - return 1; - } else if (u <= 0x000007ff) { - if (bufSize < 2) { - return 0; - } - buf[0] = (char)(0xc0 + (u >> 6)); - buf[1] = (char)(0x80 + (u & 0x3f)); - return 2; - } else if (u <= 0x0000ffff) { - if (bufSize < 3) { - return 0; - } - buf[0] = (char)(0xe0 + (u >> 12)); - buf[1] = (char)(0x80 + ((u >> 6) & 0x3f)); - buf[2] = (char)(0x80 + (u & 0x3f)); - return 3; - } else if (u <= 0x0010ffff) { - if (bufSize < 4) { - return 0; - } - buf[0] = (char)(0xf0 + (u >> 18)); - buf[1] = (char)(0x80 + ((u >> 12) & 0x3f)); - buf[2] = (char)(0x80 + ((u >> 6) & 0x3f)); - buf[3] = (char)(0x80 + (u & 0x3f)); - return 4; - } else { - return 0; - } -} - -int mapUTF16(Unicode u, char *buf, int bufSize) { - if (u <= 0xffff) { - if (bufSize < 2) { - return 0; - } - buf[0] = (char)((u >> 8) & 0xff); - buf[1] = (char)(u & 0xff); - return 2; - } else if (u < 0x110000) { - Unicode uu; - - /* using surrogate pair */ - if (bufSize < 4) { - return 0; - } - uu = ((u - 0x10000) >> 10) + 0xd800; - buf[0] = (char)((uu >> 8) & 0xff); - buf[1] = (char)(uu & 0xff); - uu = (u & 0x3ff)+0xdc00; - buf[2] = (char)((uu >> 8) & 0xff); - buf[3] = (char)(uu & 0xff); - return 4; - } else { - return 0; - } -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/UnicodeMapFuncs.h b/Build/source/libs/poppler/poppler-src/poppler/UnicodeMapFuncs.h deleted file mode 100644 index 613363967f1..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/UnicodeMapFuncs.h +++ /dev/null @@ -1,29 +0,0 @@ -//======================================================================== -// -// UnicodeMapFuncs.h -// -// Copyright 2001-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2008 Koji Otani <sho@bbr.jp> -// Copyright (C) 2017 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2018 Albert Astals Cid <aacid@kde.org> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include "UTF.h" - -int mapUTF8(Unicode u, char *buf, int bufSize); - -int mapUTF16(Unicode u, char *buf, int bufSize); diff --git a/Build/source/libs/poppler/poppler-src/poppler/UnicodeMapTables.h b/Build/source/libs/poppler/poppler-src/poppler/UnicodeMapTables.h deleted file mode 100644 index 073e474e6be..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/UnicodeMapTables.h +++ /dev/null @@ -1,365 +0,0 @@ -//======================================================================== -// -// UnicodeMapTables.h -// -// Copyright 2001-2009 Glyph & Cog, LLC -// -//======================================================================== - -static UnicodeMapRange latin1UnicodeMapRanges[] = { - { 0x000a, 0x000a, 0x0a, 1 }, - { 0x000c, 0x000d, 0x0c, 1 }, - { 0x0020, 0x007e, 0x20, 1 }, - { 0x00a0, 0x00a0, 0x20, 1 }, - { 0x00a1, 0x00ac, 0xa1, 1 }, - { 0x00ae, 0x00ff, 0xae, 1 }, - { 0x010c, 0x010c, 0x43, 1 }, - { 0x010d, 0x010d, 0x63, 1 }, - { 0x0131, 0x0131, 0x69, 1 }, - { 0x0141, 0x0141, 0x4c, 1 }, - { 0x0142, 0x0142, 0x6c, 1 }, - { 0x0152, 0x0152, 0x4f45, 2 }, - { 0x0153, 0x0153, 0x6f65, 2 }, - { 0x0160, 0x0160, 0x53, 1 }, - { 0x0161, 0x0161, 0x73, 1 }, - { 0x0178, 0x0178, 0x59, 1 }, - { 0x017d, 0x017d, 0x5a, 1 }, - { 0x017e, 0x017e, 0x7a, 1 }, - { 0x02c6, 0x02c6, 0x5e, 1 }, - { 0x02da, 0x02da, 0xb0, 1 }, - { 0x02dc, 0x02dc, 0x7e, 1 }, - { 0x2013, 0x2013, 0xad, 1 }, - { 0x2014, 0x2014, 0x2d2d, 2 }, - { 0x2018, 0x2018, 0x60, 1 }, - { 0x2019, 0x2019, 0x27, 1 }, - { 0x201a, 0x201a, 0x2c, 1 }, - { 0x201c, 0x201c, 0x22, 1 }, - { 0x201d, 0x201d, 0x22, 1 }, - { 0x201e, 0x201e, 0x2c2c, 2 }, - { 0x2022, 0x2022, 0xb7, 1 }, - { 0x2026, 0x2026, 0x2e2e2e, 3 }, - { 0x2039, 0x2039, 0x3c, 1 }, - { 0x203a, 0x203a, 0x3e, 1 }, - { 0x2044, 0x2044, 0x2f, 1 }, - { 0x2122, 0x2122, 0x544d, 2 }, - { 0x2212, 0x2212, 0x2d, 1 }, - { 0xf6f9, 0xf6f9, 0x4c, 1 }, - { 0xf6fa, 0xf6fa, 0x4f45, 2 }, - { 0xf6fc, 0xf6fc, 0xb0, 1 }, - { 0xf6fd, 0xf6fd, 0x53, 1 }, - { 0xf6fe, 0xf6fe, 0x7e, 1 }, - { 0xf6ff, 0xf6ff, 0x5a, 1 }, - { 0xf721, 0xf721, 0x21, 1 }, - { 0xf724, 0xf724, 0x24, 1 }, - { 0xf726, 0xf726, 0x26, 1 }, - { 0xf730, 0xf739, 0x30, 1 }, - { 0xf73f, 0xf73f, 0x3f, 1 }, - { 0xf761, 0xf77a, 0x41, 1 }, - { 0xf7a1, 0xf7a2, 0xa1, 1 }, - { 0xf7bf, 0xf7bf, 0xbf, 1 }, - { 0xf7e0, 0xf7f6, 0xc0, 1 }, - { 0xf7f8, 0xf7fe, 0xd8, 1 }, - { 0xf7ff, 0xf7ff, 0x59, 1 }, - { 0xfb00, 0xfb00, 0x6666, 2 }, - { 0xfb01, 0xfb01, 0x6669, 2 }, - { 0xfb02, 0xfb02, 0x666c, 2 }, - { 0xfb03, 0xfb03, 0x666669, 3 }, - { 0xfb04, 0xfb04, 0x66666c, 3 }, - { 0xfb05, 0xfb05, 0x7374, 2 }, - { 0xfb06, 0xfb06, 0x7374, 2 } -}; -#define latin1UnicodeMapLen (sizeof(latin1UnicodeMapRanges) / sizeof(UnicodeMapRange)) - -static UnicodeMapRange ascii7UnicodeMapRanges[] = { - { 0x000a, 0x000a, 0x0a, 1 }, - { 0x000c, 0x000d, 0x0c, 1 }, - { 0x0020, 0x005f, 0x20, 1 }, - { 0x0061, 0x007e, 0x61, 1 }, - { 0x00a6, 0x00a6, 0x7c, 1 }, - { 0x00a9, 0x00a9, 0x286329, 3 }, - { 0x00ae, 0x00ae, 0x285229, 3 }, - { 0x00b7, 0x00b7, 0x2a, 1 }, - { 0x00bc, 0x00bc, 0x312f34, 3 }, - { 0x00bd, 0x00bd, 0x312f32, 3 }, - { 0x00be, 0x00be, 0x332f34, 3 }, - { 0x00c0, 0x00c0, 0x41, 1 }, - { 0x00c1, 0x00c1, 0x41, 1 }, - { 0x00c2, 0x00c2, 0x41, 1 }, - { 0x00c3, 0x00c3, 0x41, 1 }, - { 0x00c4, 0x00c4, 0x41, 1 }, - { 0x00c5, 0x00c5, 0x41, 1 }, - { 0x00c6, 0x00c6, 0x4145, 2 }, - { 0x00c7, 0x00c7, 0x43, 1 }, - { 0x00c8, 0x00c8, 0x45, 1 }, - { 0x00c9, 0x00c9, 0x45, 1 }, - { 0x00ca, 0x00ca, 0x45, 1 }, - { 0x00cb, 0x00cb, 0x45, 1 }, - { 0x00cc, 0x00cc, 0x49, 1 }, - { 0x00cd, 0x00cd, 0x49, 1 }, - { 0x00ce, 0x00ce, 0x49, 1 }, - { 0x00cf, 0x00cf, 0x49, 1 }, - { 0x00d1, 0x00d2, 0x4e, 1 }, - { 0x00d3, 0x00d3, 0x4f, 1 }, - { 0x00d4, 0x00d4, 0x4f, 1 }, - { 0x00d5, 0x00d5, 0x4f, 1 }, - { 0x00d6, 0x00d6, 0x4f, 1 }, - { 0x00d7, 0x00d7, 0x78, 1 }, - { 0x00d8, 0x00d8, 0x4f, 1 }, - { 0x00d9, 0x00d9, 0x55, 1 }, - { 0x00da, 0x00da, 0x55, 1 }, - { 0x00db, 0x00db, 0x55, 1 }, - { 0x00dc, 0x00dc, 0x55, 1 }, - { 0x00dd, 0x00dd, 0x59, 1 }, - { 0x00e0, 0x00e0, 0x61, 1 }, - { 0x00e1, 0x00e1, 0x61, 1 }, - { 0x00e2, 0x00e2, 0x61, 1 }, - { 0x00e3, 0x00e3, 0x61, 1 }, - { 0x00e4, 0x00e4, 0x61, 1 }, - { 0x00e5, 0x00e5, 0x61, 1 }, - { 0x00e6, 0x00e6, 0x6165, 2 }, - { 0x00e7, 0x00e7, 0x63, 1 }, - { 0x00e8, 0x00e8, 0x65, 1 }, - { 0x00e9, 0x00e9, 0x65, 1 }, - { 0x00ea, 0x00ea, 0x65, 1 }, - { 0x00eb, 0x00eb, 0x65, 1 }, - { 0x00ec, 0x00ec, 0x69, 1 }, - { 0x00ed, 0x00ed, 0x69, 1 }, - { 0x00ee, 0x00ee, 0x69, 1 }, - { 0x00ef, 0x00ef, 0x69, 1 }, - { 0x00f1, 0x00f2, 0x6e, 1 }, - { 0x00f3, 0x00f3, 0x6f, 1 }, - { 0x00f4, 0x00f4, 0x6f, 1 }, - { 0x00f5, 0x00f5, 0x6f, 1 }, - { 0x00f6, 0x00f6, 0x6f, 1 }, - { 0x00f7, 0x00f7, 0x2f, 1 }, - { 0x00f8, 0x00f8, 0x6f, 1 }, - { 0x00f9, 0x00f9, 0x75, 1 }, - { 0x00fa, 0x00fa, 0x75, 1 }, - { 0x00fb, 0x00fb, 0x75, 1 }, - { 0x00fc, 0x00fc, 0x75, 1 }, - { 0x00fd, 0x00fd, 0x79, 1 }, - { 0x00ff, 0x00ff, 0x79, 1 }, - { 0x0131, 0x0131, 0x69, 1 }, - { 0x0141, 0x0141, 0x4c, 1 }, - { 0x0152, 0x0152, 0x4f45, 2 }, - { 0x0153, 0x0153, 0x6f65, 2 }, - { 0x0160, 0x0160, 0x53, 1 }, - { 0x0178, 0x0178, 0x59, 1 }, - { 0x017d, 0x017d, 0x5a, 1 }, - { 0x2013, 0x2013, 0x2d, 1 }, - { 0x2014, 0x2014, 0x2d2d, 2 }, - { 0x2018, 0x2018, 0x60, 1 }, - { 0x2019, 0x2019, 0x27, 1 }, - { 0x201c, 0x201c, 0x22, 1 }, - { 0x201d, 0x201d, 0x22, 1 }, - { 0x2022, 0x2022, 0x2a, 1 }, - { 0x2026, 0x2026, 0x2e2e2e, 3 }, - { 0x2122, 0x2122, 0x544d, 2 }, - { 0x2212, 0x2212, 0x2d, 1 }, - { 0xf6f9, 0xf6f9, 0x4c, 1 }, - { 0xf6fa, 0xf6fa, 0x4f45, 2 }, - { 0xf6fd, 0xf6fd, 0x53, 1 }, - { 0xf6fe, 0xf6fe, 0x7e, 1 }, - { 0xf6ff, 0xf6ff, 0x5a, 1 }, - { 0xf721, 0xf721, 0x21, 1 }, - { 0xf724, 0xf724, 0x24, 1 }, - { 0xf726, 0xf726, 0x26, 1 }, - { 0xf730, 0xf739, 0x30, 1 }, - { 0xf73f, 0xf73f, 0x3f, 1 }, - { 0xf761, 0xf77a, 0x41, 1 }, - { 0xf7e0, 0xf7e0, 0x41, 1 }, - { 0xf7e1, 0xf7e1, 0x41, 1 }, - { 0xf7e2, 0xf7e2, 0x41, 1 }, - { 0xf7e3, 0xf7e3, 0x41, 1 }, - { 0xf7e4, 0xf7e4, 0x41, 1 }, - { 0xf7e5, 0xf7e5, 0x41, 1 }, - { 0xf7e6, 0xf7e6, 0x4145, 2 }, - { 0xf7e7, 0xf7e7, 0x43, 1 }, - { 0xf7e8, 0xf7e8, 0x45, 1 }, - { 0xf7e9, 0xf7e9, 0x45, 1 }, - { 0xf7ea, 0xf7ea, 0x45, 1 }, - { 0xf7eb, 0xf7eb, 0x45, 1 }, - { 0xf7ec, 0xf7ec, 0x49, 1 }, - { 0xf7ed, 0xf7ed, 0x49, 1 }, - { 0xf7ee, 0xf7ee, 0x49, 1 }, - { 0xf7ef, 0xf7ef, 0x49, 1 }, - { 0xf7f1, 0xf7f2, 0x4e, 1 }, - { 0xf7f3, 0xf7f3, 0x4f, 1 }, - { 0xf7f4, 0xf7f4, 0x4f, 1 }, - { 0xf7f5, 0xf7f5, 0x4f, 1 }, - { 0xf7f6, 0xf7f6, 0x4f, 1 }, - { 0xf7f8, 0xf7f8, 0x4f, 1 }, - { 0xf7f9, 0xf7f9, 0x55, 1 }, - { 0xf7fa, 0xf7fa, 0x55, 1 }, - { 0xf7fb, 0xf7fb, 0x55, 1 }, - { 0xf7fc, 0xf7fc, 0x55, 1 }, - { 0xf7fd, 0xf7fd, 0x59, 1 }, - { 0xf7ff, 0xf7ff, 0x59, 1 }, - { 0xfb00, 0xfb00, 0x6666, 2 }, - { 0xfb01, 0xfb01, 0x6669, 2 }, - { 0xfb02, 0xfb02, 0x666c, 2 }, - { 0xfb03, 0xfb03, 0x666669, 3 }, - { 0xfb04, 0xfb04, 0x66666c, 3 }, - { 0xfb05, 0xfb05, 0x7374, 2 }, - { 0xfb06, 0xfb06, 0x7374, 2 } -}; -#define ascii7UnicodeMapLen (sizeof(ascii7UnicodeMapRanges) / sizeof(UnicodeMapRange)) - -static UnicodeMapRange symbolUnicodeMapRanges[] = { - { 0x0020, 0x0021, 0x20, 1 }, - { 0x0023, 0x0023, 0x23, 1 }, - { 0x0025, 0x0026, 0x25, 1 }, - { 0x0028, 0x0029, 0x28, 1 }, - { 0x002b, 0x002c, 0x2b, 1 }, - { 0x002e, 0x003f, 0x2e, 1 }, - { 0x005b, 0x005b, 0x5b, 1 }, - { 0x005d, 0x005d, 0x5d, 1 }, - { 0x005f, 0x005f, 0x5f, 1 }, - { 0x007b, 0x007d, 0x7b, 1 }, - { 0x00ac, 0x00ac, 0xd8, 1 }, - { 0x00b0, 0x00b1, 0xb0, 1 }, - { 0x00b5, 0x00b5, 0x6d, 1 }, - { 0x00d7, 0x00d7, 0xb4, 1 }, - { 0x00f7, 0x00f7, 0xb8, 1 }, - { 0x0192, 0x0192, 0xa6, 1 }, - { 0x0391, 0x0392, 0x41, 1 }, - { 0x0393, 0x0393, 0x47, 1 }, - { 0x0395, 0x0395, 0x45, 1 }, - { 0x0396, 0x0396, 0x5a, 1 }, - { 0x0397, 0x0397, 0x48, 1 }, - { 0x0398, 0x0398, 0x51, 1 }, - { 0x0399, 0x0399, 0x49, 1 }, - { 0x039a, 0x039d, 0x4b, 1 }, - { 0x039e, 0x039e, 0x58, 1 }, - { 0x039f, 0x03a0, 0x4f, 1 }, - { 0x03a1, 0x03a1, 0x52, 1 }, - { 0x03a3, 0x03a5, 0x53, 1 }, - { 0x03a6, 0x03a6, 0x46, 1 }, - { 0x03a7, 0x03a7, 0x43, 1 }, - { 0x03a8, 0x03a8, 0x59, 1 }, - { 0x03b1, 0x03b2, 0x61, 1 }, - { 0x03b3, 0x03b3, 0x67, 1 }, - { 0x03b4, 0x03b5, 0x64, 1 }, - { 0x03b6, 0x03b6, 0x7a, 1 }, - { 0x03b7, 0x03b7, 0x68, 1 }, - { 0x03b8, 0x03b8, 0x71, 1 }, - { 0x03b9, 0x03b9, 0x69, 1 }, - { 0x03ba, 0x03bb, 0x6b, 1 }, - { 0x03bd, 0x03bd, 0x6e, 1 }, - { 0x03be, 0x03be, 0x78, 1 }, - { 0x03bf, 0x03c0, 0x6f, 1 }, - { 0x03c1, 0x03c1, 0x72, 1 }, - { 0x03c2, 0x03c2, 0x56, 1 }, - { 0x03c3, 0x03c5, 0x73, 1 }, - { 0x03c6, 0x03c6, 0x66, 1 }, - { 0x03c7, 0x03c7, 0x63, 1 }, - { 0x03c8, 0x03c8, 0x79, 1 }, - { 0x03c9, 0x03c9, 0x77, 1 }, - { 0x03d1, 0x03d1, 0x4a, 1 }, - { 0x03d2, 0x03d2, 0xa1, 1 }, - { 0x03d5, 0x03d5, 0x6a, 1 }, - { 0x03d6, 0x03d6, 0x76, 1 }, - { 0x2022, 0x2022, 0xb7, 1 }, - { 0x2026, 0x2026, 0xbc, 1 }, - { 0x2032, 0x2032, 0xa2, 1 }, - { 0x2033, 0x2033, 0xb2, 1 }, - { 0x2044, 0x2044, 0xa4, 1 }, - { 0x2111, 0x2111, 0xc1, 1 }, - { 0x2118, 0x2118, 0xc3, 1 }, - { 0x211c, 0x211c, 0xc2, 1 }, - { 0x2126, 0x2126, 0x57, 1 }, - { 0x2135, 0x2135, 0xc0, 1 }, - { 0x2190, 0x2193, 0xac, 1 }, - { 0x2194, 0x2194, 0xab, 1 }, - { 0x21b5, 0x21b5, 0xbf, 1 }, - { 0x21d0, 0x21d3, 0xdc, 1 }, - { 0x21d4, 0x21d4, 0xdb, 1 }, - { 0x2200, 0x2200, 0x22, 1 }, - { 0x2202, 0x2202, 0xb6, 1 }, - { 0x2203, 0x2203, 0x24, 1 }, - { 0x2205, 0x2205, 0xc6, 1 }, - { 0x2206, 0x2206, 0x44, 1 }, - { 0x2207, 0x2207, 0xd1, 1 }, - { 0x2208, 0x2209, 0xce, 1 }, - { 0x220b, 0x220b, 0x27, 1 }, - { 0x220f, 0x220f, 0xd5, 1 }, - { 0x2211, 0x2211, 0xe5, 1 }, - { 0x2212, 0x2212, 0x2d, 1 }, - { 0x2217, 0x2217, 0x2a, 1 }, - { 0x221a, 0x221a, 0xd6, 1 }, - { 0x221d, 0x221d, 0xb5, 1 }, - { 0x221e, 0x221e, 0xa5, 1 }, - { 0x2220, 0x2220, 0xd0, 1 }, - { 0x2227, 0x2228, 0xd9, 1 }, - { 0x2229, 0x222a, 0xc7, 1 }, - { 0x222b, 0x222b, 0xf2, 1 }, - { 0x2234, 0x2234, 0x5c, 1 }, - { 0x223c, 0x223c, 0x7e, 1 }, - { 0x2245, 0x2245, 0x40, 1 }, - { 0x2248, 0x2248, 0xbb, 1 }, - { 0x2260, 0x2261, 0xb9, 1 }, - { 0x2264, 0x2264, 0xa3, 1 }, - { 0x2265, 0x2265, 0xb3, 1 }, - { 0x2282, 0x2282, 0xcc, 1 }, - { 0x2283, 0x2283, 0xc9, 1 }, - { 0x2284, 0x2284, 0xcb, 1 }, - { 0x2286, 0x2286, 0xcd, 1 }, - { 0x2287, 0x2287, 0xca, 1 }, - { 0x2295, 0x2295, 0xc5, 1 }, - { 0x2297, 0x2297, 0xc4, 1 }, - { 0x22a5, 0x22a5, 0x5e, 1 }, - { 0x22c5, 0x22c5, 0xd7, 1 }, - { 0x2320, 0x2320, 0xf3, 1 }, - { 0x2321, 0x2321, 0xf5, 1 }, - { 0x2329, 0x2329, 0xe1, 1 }, - { 0x232a, 0x232a, 0xf1, 1 }, - { 0x25ca, 0x25ca, 0xe0, 1 }, - { 0x2660, 0x2660, 0xaa, 1 }, - { 0x2663, 0x2663, 0xa7, 1 }, - { 0x2665, 0x2665, 0xa9, 1 }, - { 0x2666, 0x2666, 0xa8, 1 }, - { 0xf6d9, 0xf6d9, 0xd3, 1 }, - { 0xf6da, 0xf6da, 0xd2, 1 }, - { 0xf6db, 0xf6db, 0xd4, 1 }, - { 0xf8e5, 0xf8e5, 0x60, 1 }, - { 0xf8e6, 0xf8e7, 0xbd, 1 }, - { 0xf8e8, 0xf8ea, 0xe2, 1 }, - { 0xf8eb, 0xf8f4, 0xe6, 1 }, - { 0xf8f5, 0xf8f5, 0xf4, 1 }, - { 0xf8f6, 0xf8fe, 0xf6, 1 } -}; -#define symbolUnicodeMapLen (sizeof(symbolUnicodeMapRanges) / sizeof(UnicodeMapRange)) - -static UnicodeMapRange zapfDingbatsUnicodeMapRanges[] = { - { 0x0020, 0x0020, 0x20, 1 }, - { 0x2192, 0x2192, 0xd5, 1 }, - { 0x2194, 0x2195, 0xd6, 1 }, - { 0x2460, 0x2469, 0xac, 1 }, - { 0x25a0, 0x25a0, 0x6e, 1 }, - { 0x25b2, 0x25b2, 0x73, 1 }, - { 0x25bc, 0x25bc, 0x74, 1 }, - { 0x25c6, 0x25c6, 0x75, 1 }, - { 0x25cf, 0x25cf, 0x6c, 1 }, - { 0x25d7, 0x25d7, 0x77, 1 }, - { 0x2605, 0x2605, 0x48, 1 }, - { 0x260e, 0x260e, 0x25, 1 }, - { 0x261b, 0x261b, 0x2a, 1 }, - { 0x261e, 0x261e, 0x2b, 1 }, - { 0x2660, 0x2660, 0xab, 1 }, - { 0x2663, 0x2663, 0xa8, 1 }, - { 0x2665, 0x2665, 0xaa, 1 }, - { 0x2666, 0x2666, 0xa9, 1 }, - { 0x2701, 0x2704, 0x21, 1 }, - { 0x2706, 0x2709, 0x26, 1 }, - { 0x270c, 0x2727, 0x2c, 1 }, - { 0x2729, 0x274b, 0x49, 1 }, - { 0x274d, 0x274d, 0x6d, 1 }, - { 0x274f, 0x2752, 0x6f, 1 }, - { 0x2756, 0x2756, 0x76, 1 }, - { 0x2758, 0x275e, 0x78, 1 }, - { 0x2761, 0x2767, 0xa1, 1 }, - { 0x2776, 0x2794, 0xb6, 1 }, - { 0x2798, 0x27af, 0xd8, 1 }, - { 0x27b1, 0x27be, 0xf1, 1 } -}; -#define zapfDingbatsUnicodeMapLen (sizeof(zapfDingbatsUnicodeMapRanges) / sizeof(UnicodeMapRange)) diff --git a/Build/source/libs/poppler/poppler-src/poppler/UnicodeTypeTable.cc b/Build/source/libs/poppler/poppler-src/poppler/UnicodeTypeTable.cc deleted file mode 100644 index 2d1bd7680b9..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/UnicodeTypeTable.cc +++ /dev/null @@ -1,1238 +0,0 @@ -//======================================================================== -// -// UnicodeTypeTable.cc -// -// Copyright 2004 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2006, 2007 Ed Catmur <ed@catmur.co.uk> -// Copyright (C) 2007 Jeff Muizelaar <jeff@infidigm.net> -// Copyright (C) 2008, 2016 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2012 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2016 Khaled Hosny <khaledhosny@eglug.org> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include <stdlib.h> -#include "CharTypes.h" -#include "UnicodeTypeTable.h" -#include "goo/gmem.h" - -struct UnicodeMapTableEntry { - const char *vector; - const char type; -}; - -struct UnicodeCaseTableVector { - Unicode codes[256]; -}; - -static const UnicodeMapTableEntry typeTable[256] = { - { "NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN###NNNNN################NNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN#N####NNNNLNNNNN####NLNNN#LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLL", 'X' }, - { nullptr, 'L' }, - { "LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNLLLLLLLNNNNNNNNNNNNNNLLNNNNNNNNNNNNNNLLLLLNNNNNNNNNLNNNNNNNNNNNNNNNNN", 'X' }, - { "NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNLLLLLNNNNNNNNNNNLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLL", 'X' }, - { "LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL", 'X' }, - { "LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNRNRNNRNRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR", 'X' }, - { "RRRR#########RNNNNNNNNRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRNNNNNNNNNNNNNN####################RRRNRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRNNNNNNNRNNNNNNNRRNNNNNNNRR##########RRRRRR", 'X' }, - { "RRRRRRRRRRRRRRNNRNRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRNNNNNNNNNNNNNNNNNNNNNNNNNNNRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRNNNNNNNNNNNRNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN", 'X' }, - { nullptr, 'N' }, - { "NNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNLLLLNNNNNNNNLLLLNLLLNNNNLLLLLLLLLLLLLNNLLLLLLLLLLLLLNNNNNNNNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNLLLLNNNNLLLLLLLLNLLLLLLLLLLLLLLLLLLLLNNLLLLLLLLLLLLLL##LLLLLLLNNNNN", 'X' }, - { "NNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNLLLLNNNNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNLLLNNNNNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNLLLLNNNNNNNNLLLLNLLLLLLLLLLLLLLLLLLLLNNLLLLLLLLLLLL##NNNNNNNNNNNNNN", 'X' }, - { "NNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNLLNLNNNLLLLLLLLLNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNN#NLLLLL", 'X' }, - { "LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNLLLLNNNNNNNNNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNLLLLLLLLLLLLLLLNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL", 'X' }, - { "LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNLLLLLLLNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL", 'X' }, - { "LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNLLNNNNNNN#####LLLLLLLNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNLLNNNNNNNNNLLLLLLLLLLNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL", 'X' }, - { "LLLLLLLLLLLLLLLLLLLLLLLLNNLLLLLLLLLLLLLLLLLLLLLLLLLLLNLNLNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNNNNNNNNNNNNNNLNNNNNLNNLLLLNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL", 'X' }, - { "LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNLNNNNNNLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL", 'X' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { "LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL", 'X' }, - { "LLLLLLLLLLLLLLLLLLNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNLLLLLLLLNLLNNNNNNNNNNNLLLLLLL#LNLLLLLLLLLLLLNNNNNNNNNNNNNNNNNNNNNN", 'X' }, - { "NNNNNNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL", 'X' }, - { "LLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLNNNNNLLLLLLNLLLLLLNNNNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN", 'X' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { "LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNLNNNLLLLLLLLLLLNNNLLLLLLLLLLLLNNNNLLLLLLLLLLLLLNNNLLLLLLLLLLLLLNNN", 'X' }, - { "NNNNNNNNNNNNNNLRNNNNNNNNNNNNNNNNNNNNNNNNNNLRNLRN#####NNNNNNNNNNNNNNN#NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN#L##########NNNL############NNN###################################NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN", 'X' }, - { "NNLNNNNLNNLLLLLLLLLLNLNNNLLLLLNNNNNNLNLNLNLLLL#LLLNLLLLLLLNNLLLLNNNNNLLLLLNNNNNNNNNNNNNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN", 'X' }, - { "NNNNNNNNNNNNNNNNNN##NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN", 'X' }, - { "NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNNNNNNNNNNNNNNNNNNNNLNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN", 'X' }, - { "NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN####################LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNNNNNNNNNNNNNNNN", 'X' }, - { nullptr, 'N' }, - { nullptr, 'N' }, - { nullptr, 'N' }, - { nullptr, 'L' }, - { nullptr, 'N' }, - { nullptr, 'N' }, - { nullptr, 'N' }, - { nullptr, 'N' }, - { nullptr, 'N' }, - { nullptr, 'N' }, - { nullptr, 'N' }, - { "NNNNNLLLNNNNNNNNNNNNNNNNNNNNNNNNNLLLLLLLLLNNNNNNNLLLLLNNLLLLLNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNLLLL", 'X' }, - { nullptr, 'L' }, - { "LLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNNNNNNNNNNNNNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNNNNNNNNNLLLLLLLLLLLLNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL", 'X' }, - { "LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN", 'X' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { "LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN", 'X' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { "LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL", 'X' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { nullptr, 'L' }, - { "LLLLLLLLLLLLLLLLLLLLLLLLRRRRRRNRRRRRRRRRR#RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR", 'X' }, - { nullptr, 'R' }, - { "RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRNNRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRNNN", 'X' }, - { "NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN#N#NN#NNNNNNNNN#NN##NNNNN##NRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRNNN", 'X' }, - { "NNN###NNNNN################NNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL#####NNN##NNNNNNNNNNNNNNNNNNNNNNNLL", 'X' } -}; - -static const UnicodeCaseTableVector caseTable00 = {{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, - 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, - 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, - 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f, - 0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, - 0x00a8, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af, - 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x03bc, 0x00b6, 0x00b7, - 0x00b8, 0x00b9, 0x00ba, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00bf, - 0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7, - 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef, - 0x00f0, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00d7, - 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x00df, - 0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7, - 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef, - 0x00f0, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7, - 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x00ff -}}; -static const UnicodeCaseTableVector caseTable01 = {{ - 0x0101, 0x0101, 0x0103, 0x0103, 0x0105, 0x0105, 0x0107, 0x0107, - 0x0109, 0x0109, 0x010b, 0x010b, 0x010d, 0x010d, 0x010f, 0x010f, - 0x0111, 0x0111, 0x0113, 0x0113, 0x0115, 0x0115, 0x0117, 0x0117, - 0x0119, 0x0119, 0x011b, 0x011b, 0x011d, 0x011d, 0x011f, 0x011f, - 0x0121, 0x0121, 0x0123, 0x0123, 0x0125, 0x0125, 0x0127, 0x0127, - 0x0129, 0x0129, 0x012b, 0x012b, 0x012d, 0x012d, 0x012f, 0x012f, - 0x0130, 0x0131, 0x0133, 0x0133, 0x0135, 0x0135, 0x0137, 0x0137, - 0x0138, 0x013a, 0x013a, 0x013c, 0x013c, 0x013e, 0x013e, 0x0140, - 0x0140, 0x0142, 0x0142, 0x0144, 0x0144, 0x0146, 0x0146, 0x0148, - 0x0148, 0x0149, 0x014b, 0x014b, 0x014d, 0x014d, 0x014f, 0x014f, - 0x0151, 0x0151, 0x0153, 0x0153, 0x0155, 0x0155, 0x0157, 0x0157, - 0x0159, 0x0159, 0x015b, 0x015b, 0x015d, 0x015d, 0x015f, 0x015f, - 0x0161, 0x0161, 0x0163, 0x0163, 0x0165, 0x0165, 0x0167, 0x0167, - 0x0169, 0x0169, 0x016b, 0x016b, 0x016d, 0x016d, 0x016f, 0x016f, - 0x0171, 0x0171, 0x0173, 0x0173, 0x0175, 0x0175, 0x0177, 0x0177, - 0x00ff, 0x017a, 0x017a, 0x017c, 0x017c, 0x017e, 0x017e, 0x0073, - 0x0180, 0x0253, 0x0183, 0x0183, 0x0185, 0x0185, 0x0254, 0x0188, - 0x0188, 0x0256, 0x0257, 0x018c, 0x018c, 0x018d, 0x01dd, 0x0259, - 0x025b, 0x0192, 0x0192, 0x0260, 0x0263, 0x0195, 0x0269, 0x0268, - 0x0199, 0x0199, 0x019a, 0x019b, 0x026f, 0x0272, 0x019e, 0x0275, - 0x01a1, 0x01a1, 0x01a3, 0x01a3, 0x01a5, 0x01a5, 0x0280, 0x01a8, - 0x01a8, 0x0283, 0x01aa, 0x01ab, 0x01ad, 0x01ad, 0x0288, 0x01b0, - 0x01b0, 0x028a, 0x028b, 0x01b4, 0x01b4, 0x01b6, 0x01b6, 0x0292, - 0x01b9, 0x01b9, 0x01ba, 0x01bb, 0x01bd, 0x01bd, 0x01be, 0x01bf, - 0x01c0, 0x01c1, 0x01c2, 0x01c3, 0x01c6, 0x01c6, 0x01c6, 0x01c9, - 0x01c9, 0x01c9, 0x01cc, 0x01cc, 0x01cc, 0x01ce, 0x01ce, 0x01d0, - 0x01d0, 0x01d2, 0x01d2, 0x01d4, 0x01d4, 0x01d6, 0x01d6, 0x01d8, - 0x01d8, 0x01da, 0x01da, 0x01dc, 0x01dc, 0x01dd, 0x01df, 0x01df, - 0x01e1, 0x01e1, 0x01e3, 0x01e3, 0x01e5, 0x01e5, 0x01e7, 0x01e7, - 0x01e9, 0x01e9, 0x01eb, 0x01eb, 0x01ed, 0x01ed, 0x01ef, 0x01ef, - 0x01f0, 0x01f3, 0x01f3, 0x01f3, 0x01f5, 0x01f5, 0x0195, 0x01bf, - 0x01f9, 0x01f9, 0x01fb, 0x01fb, 0x01fd, 0x01fd, 0x01ff, 0x01ff -}}; -static const UnicodeCaseTableVector caseTable02 = {{ - 0x0201, 0x0201, 0x0203, 0x0203, 0x0205, 0x0205, 0x0207, 0x0207, - 0x0209, 0x0209, 0x020b, 0x020b, 0x020d, 0x020d, 0x020f, 0x020f, - 0x0211, 0x0211, 0x0213, 0x0213, 0x0215, 0x0215, 0x0217, 0x0217, - 0x0219, 0x0219, 0x021b, 0x021b, 0x021d, 0x021d, 0x021f, 0x021f, - 0x019e, 0x0221, 0x0223, 0x0223, 0x0225, 0x0225, 0x0227, 0x0227, - 0x0229, 0x0229, 0x022b, 0x022b, 0x022d, 0x022d, 0x022f, 0x022f, - 0x0231, 0x0231, 0x0233, 0x0233, 0x0234, 0x0235, 0x0236, 0x0237, - 0x0238, 0x0239, 0x023a, 0x023b, 0x023c, 0x023d, 0x023e, 0x023f, - 0x0240, 0x0241, 0x0242, 0x0243, 0x0244, 0x0245, 0x0246, 0x0247, - 0x0248, 0x0249, 0x024a, 0x024b, 0x024c, 0x024d, 0x024e, 0x024f, - 0x0250, 0x0251, 0x0252, 0x0253, 0x0254, 0x0255, 0x0256, 0x0257, - 0x0258, 0x0259, 0x025a, 0x025b, 0x025c, 0x025d, 0x025e, 0x025f, - 0x0260, 0x0261, 0x0262, 0x0263, 0x0264, 0x0265, 0x0266, 0x0267, - 0x0268, 0x0269, 0x026a, 0x026b, 0x026c, 0x026d, 0x026e, 0x026f, - 0x0270, 0x0271, 0x0272, 0x0273, 0x0274, 0x0275, 0x0276, 0x0277, - 0x0278, 0x0279, 0x027a, 0x027b, 0x027c, 0x027d, 0x027e, 0x027f, - 0x0280, 0x0281, 0x0282, 0x0283, 0x0284, 0x0285, 0x0286, 0x0287, - 0x0288, 0x0289, 0x028a, 0x028b, 0x028c, 0x028d, 0x028e, 0x028f, - 0x0290, 0x0291, 0x0292, 0x0293, 0x0294, 0x0295, 0x0296, 0x0297, - 0x0298, 0x0299, 0x029a, 0x029b, 0x029c, 0x029d, 0x029e, 0x029f, - 0x02a0, 0x02a1, 0x02a2, 0x02a3, 0x02a4, 0x02a5, 0x02a6, 0x02a7, - 0x02a8, 0x02a9, 0x02aa, 0x02ab, 0x02ac, 0x02ad, 0x02ae, 0x02af, - 0x02b0, 0x02b1, 0x02b2, 0x02b3, 0x02b4, 0x02b5, 0x02b6, 0x02b7, - 0x02b8, 0x02b9, 0x02ba, 0x02bb, 0x02bc, 0x02bd, 0x02be, 0x02bf, - 0x02c0, 0x02c1, 0x02c2, 0x02c3, 0x02c4, 0x02c5, 0x02c6, 0x02c7, - 0x02c8, 0x02c9, 0x02ca, 0x02cb, 0x02cc, 0x02cd, 0x02ce, 0x02cf, - 0x02d0, 0x02d1, 0x02d2, 0x02d3, 0x02d4, 0x02d5, 0x02d6, 0x02d7, - 0x02d8, 0x02d9, 0x02da, 0x02db, 0x02dc, 0x02dd, 0x02de, 0x02df, - 0x02e0, 0x02e1, 0x02e2, 0x02e3, 0x02e4, 0x02e5, 0x02e6, 0x02e7, - 0x02e8, 0x02e9, 0x02ea, 0x02eb, 0x02ec, 0x02ed, 0x02ee, 0x02ef, - 0x02f0, 0x02f1, 0x02f2, 0x02f3, 0x02f4, 0x02f5, 0x02f6, 0x02f7, - 0x02f8, 0x02f9, 0x02fa, 0x02fb, 0x02fc, 0x02fd, 0x02fe, 0x02ff -}}; -static const UnicodeCaseTableVector caseTable03 = {{ - 0x0300, 0x0301, 0x0302, 0x0303, 0x0304, 0x0305, 0x0306, 0x0307, - 0x0308, 0x0309, 0x030a, 0x030b, 0x030c, 0x030d, 0x030e, 0x030f, - 0x0310, 0x0311, 0x0312, 0x0313, 0x0314, 0x0315, 0x0316, 0x0317, - 0x0318, 0x0319, 0x031a, 0x031b, 0x031c, 0x031d, 0x031e, 0x031f, - 0x0320, 0x0321, 0x0322, 0x0323, 0x0324, 0x0325, 0x0326, 0x0327, - 0x0328, 0x0329, 0x032a, 0x032b, 0x032c, 0x032d, 0x032e, 0x032f, - 0x0330, 0x0331, 0x0332, 0x0333, 0x0334, 0x0335, 0x0336, 0x0337, - 0x0338, 0x0339, 0x033a, 0x033b, 0x033c, 0x033d, 0x033e, 0x033f, - 0x0340, 0x0341, 0x0342, 0x0343, 0x0344, 0x03b9, 0x0346, 0x0347, - 0x0348, 0x0349, 0x034a, 0x034b, 0x034c, 0x034d, 0x034e, 0x034f, - 0x0350, 0x0351, 0x0352, 0x0353, 0x0354, 0x0355, 0x0356, 0x0357, - 0x0358, 0x0359, 0x035a, 0x035b, 0x035c, 0x035d, 0x035e, 0x035f, - 0x0360, 0x0361, 0x0362, 0x0363, 0x0364, 0x0365, 0x0366, 0x0367, - 0x0368, 0x0369, 0x036a, 0x036b, 0x036c, 0x036d, 0x036e, 0x036f, - 0x0370, 0x0371, 0x0372, 0x0373, 0x0374, 0x0375, 0x0376, 0x0377, - 0x0378, 0x0379, 0x037a, 0x037b, 0x037c, 0x037d, 0x037e, 0x037f, - 0x0380, 0x0381, 0x0382, 0x0383, 0x0384, 0x0385, 0x03ac, 0x0387, - 0x03ad, 0x03ae, 0x03af, 0x038b, 0x03cc, 0x038d, 0x03cd, 0x03ce, - 0x0390, 0x03b1, 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7, - 0x03b8, 0x03b9, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf, - 0x03c0, 0x03c1, 0x03a2, 0x03c3, 0x03c4, 0x03c5, 0x03c6, 0x03c7, - 0x03c8, 0x03c9, 0x03ca, 0x03cb, 0x03ac, 0x03ad, 0x03ae, 0x03af, - 0x03b0, 0x03b1, 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7, - 0x03b8, 0x03b9, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf, - 0x03c0, 0x03c1, 0x03c3, 0x03c3, 0x03c4, 0x03c5, 0x03c6, 0x03c7, - 0x03c8, 0x03c9, 0x03ca, 0x03cb, 0x03cc, 0x03cd, 0x03ce, 0x03cf, - 0x03b2, 0x03b8, 0x03d2, 0x03d3, 0x03d4, 0x03c6, 0x03c0, 0x03d7, - 0x03d9, 0x03d9, 0x03db, 0x03db, 0x03dd, 0x03dd, 0x03df, 0x03df, - 0x03e1, 0x03e1, 0x03e3, 0x03e3, 0x03e5, 0x03e5, 0x03e7, 0x03e7, - 0x03e9, 0x03e9, 0x03eb, 0x03eb, 0x03ed, 0x03ed, 0x03ef, 0x03ef, - 0x03ba, 0x03c1, 0x03f2, 0x03f3, 0x03b8, 0x03b5, 0x03f6, 0x03f8, - 0x03f8, 0x03f2, 0x03fb, 0x03fb, 0x03fc, 0x03fd, 0x03fe, 0x03ff -}}; -static const UnicodeCaseTableVector caseTable04 = {{ - 0x0450, 0x0451, 0x0452, 0x0453, 0x0454, 0x0455, 0x0456, 0x0457, - 0x0458, 0x0459, 0x045a, 0x045b, 0x045c, 0x045d, 0x045e, 0x045f, - 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, - 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f, - 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, - 0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f, - 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, - 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f, - 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, - 0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f, - 0x0450, 0x0451, 0x0452, 0x0453, 0x0454, 0x0455, 0x0456, 0x0457, - 0x0458, 0x0459, 0x045a, 0x045b, 0x045c, 0x045d, 0x045e, 0x045f, - 0x0461, 0x0461, 0x0463, 0x0463, 0x0465, 0x0465, 0x0467, 0x0467, - 0x0469, 0x0469, 0x046b, 0x046b, 0x046d, 0x046d, 0x046f, 0x046f, - 0x0471, 0x0471, 0x0473, 0x0473, 0x0475, 0x0475, 0x0477, 0x0477, - 0x0479, 0x0479, 0x047b, 0x047b, 0x047d, 0x047d, 0x047f, 0x047f, - 0x0481, 0x0481, 0x0482, 0x0483, 0x0484, 0x0485, 0x0486, 0x0487, - 0x0488, 0x0489, 0x048b, 0x048b, 0x048d, 0x048d, 0x048f, 0x048f, - 0x0491, 0x0491, 0x0493, 0x0493, 0x0495, 0x0495, 0x0497, 0x0497, - 0x0499, 0x0499, 0x049b, 0x049b, 0x049d, 0x049d, 0x049f, 0x049f, - 0x04a1, 0x04a1, 0x04a3, 0x04a3, 0x04a5, 0x04a5, 0x04a7, 0x04a7, - 0x04a9, 0x04a9, 0x04ab, 0x04ab, 0x04ad, 0x04ad, 0x04af, 0x04af, - 0x04b1, 0x04b1, 0x04b3, 0x04b3, 0x04b5, 0x04b5, 0x04b7, 0x04b7, - 0x04b9, 0x04b9, 0x04bb, 0x04bb, 0x04bd, 0x04bd, 0x04bf, 0x04bf, - 0x04c0, 0x04c2, 0x04c2, 0x04c4, 0x04c4, 0x04c6, 0x04c6, 0x04c8, - 0x04c8, 0x04ca, 0x04ca, 0x04cc, 0x04cc, 0x04ce, 0x04ce, 0x04cf, - 0x04d1, 0x04d1, 0x04d3, 0x04d3, 0x04d5, 0x04d5, 0x04d7, 0x04d7, - 0x04d9, 0x04d9, 0x04db, 0x04db, 0x04dd, 0x04dd, 0x04df, 0x04df, - 0x04e1, 0x04e1, 0x04e3, 0x04e3, 0x04e5, 0x04e5, 0x04e7, 0x04e7, - 0x04e9, 0x04e9, 0x04eb, 0x04eb, 0x04ed, 0x04ed, 0x04ef, 0x04ef, - 0x04f1, 0x04f1, 0x04f3, 0x04f3, 0x04f5, 0x04f5, 0x04f6, 0x04f7, - 0x04f9, 0x04f9, 0x04fa, 0x04fb, 0x04fc, 0x04fd, 0x04fe, 0x04ff -}}; -static const UnicodeCaseTableVector caseTable05 = {{ - 0x0501, 0x0501, 0x0503, 0x0503, 0x0505, 0x0505, 0x0507, 0x0507, - 0x0509, 0x0509, 0x050b, 0x050b, 0x050d, 0x050d, 0x050f, 0x050f, - 0x0510, 0x0511, 0x0512, 0x0513, 0x0514, 0x0515, 0x0516, 0x0517, - 0x0518, 0x0519, 0x051a, 0x051b, 0x051c, 0x051d, 0x051e, 0x051f, - 0x0520, 0x0521, 0x0522, 0x0523, 0x0524, 0x0525, 0x0526, 0x0527, - 0x0528, 0x0529, 0x052a, 0x052b, 0x052c, 0x052d, 0x052e, 0x052f, - 0x0530, 0x0561, 0x0562, 0x0563, 0x0564, 0x0565, 0x0566, 0x0567, - 0x0568, 0x0569, 0x056a, 0x056b, 0x056c, 0x056d, 0x056e, 0x056f, - 0x0570, 0x0571, 0x0572, 0x0573, 0x0574, 0x0575, 0x0576, 0x0577, - 0x0578, 0x0579, 0x057a, 0x057b, 0x057c, 0x057d, 0x057e, 0x057f, - 0x0580, 0x0581, 0x0582, 0x0583, 0x0584, 0x0585, 0x0586, 0x0557, - 0x0558, 0x0559, 0x055a, 0x055b, 0x055c, 0x055d, 0x055e, 0x055f, - 0x0560, 0x0561, 0x0562, 0x0563, 0x0564, 0x0565, 0x0566, 0x0567, - 0x0568, 0x0569, 0x056a, 0x056b, 0x056c, 0x056d, 0x056e, 0x056f, - 0x0570, 0x0571, 0x0572, 0x0573, 0x0574, 0x0575, 0x0576, 0x0577, - 0x0578, 0x0579, 0x057a, 0x057b, 0x057c, 0x057d, 0x057e, 0x057f, - 0x0580, 0x0581, 0x0582, 0x0583, 0x0584, 0x0585, 0x0586, 0x0587, - 0x0588, 0x0589, 0x058a, 0x058b, 0x058c, 0x058d, 0x058e, 0x058f, - 0x0590, 0x0591, 0x0592, 0x0593, 0x0594, 0x0595, 0x0596, 0x0597, - 0x0598, 0x0599, 0x059a, 0x059b, 0x059c, 0x059d, 0x059e, 0x059f, - 0x05a0, 0x05a1, 0x05a2, 0x05a3, 0x05a4, 0x05a5, 0x05a6, 0x05a7, - 0x05a8, 0x05a9, 0x05aa, 0x05ab, 0x05ac, 0x05ad, 0x05ae, 0x05af, - 0x05b0, 0x05b1, 0x05b2, 0x05b3, 0x05b4, 0x05b5, 0x05b6, 0x05b7, - 0x05b8, 0x05b9, 0x05ba, 0x05bb, 0x05bc, 0x05bd, 0x05be, 0x05bf, - 0x05c0, 0x05c1, 0x05c2, 0x05c3, 0x05c4, 0x05c5, 0x05c6, 0x05c7, - 0x05c8, 0x05c9, 0x05ca, 0x05cb, 0x05cc, 0x05cd, 0x05ce, 0x05cf, - 0x05d0, 0x05d1, 0x05d2, 0x05d3, 0x05d4, 0x05d5, 0x05d6, 0x05d7, - 0x05d8, 0x05d9, 0x05da, 0x05db, 0x05dc, 0x05dd, 0x05de, 0x05df, - 0x05e0, 0x05e1, 0x05e2, 0x05e3, 0x05e4, 0x05e5, 0x05e6, 0x05e7, - 0x05e8, 0x05e9, 0x05ea, 0x05eb, 0x05ec, 0x05ed, 0x05ee, 0x05ef, - 0x05f0, 0x05f1, 0x05f2, 0x05f3, 0x05f4, 0x05f5, 0x05f6, 0x05f7, - 0x05f8, 0x05f9, 0x05fa, 0x05fb, 0x05fc, 0x05fd, 0x05fe, 0x05ff -}}; -static const UnicodeCaseTableVector caseTable1e = {{ - 0x1e01, 0x1e01, 0x1e03, 0x1e03, 0x1e05, 0x1e05, 0x1e07, 0x1e07, - 0x1e09, 0x1e09, 0x1e0b, 0x1e0b, 0x1e0d, 0x1e0d, 0x1e0f, 0x1e0f, - 0x1e11, 0x1e11, 0x1e13, 0x1e13, 0x1e15, 0x1e15, 0x1e17, 0x1e17, - 0x1e19, 0x1e19, 0x1e1b, 0x1e1b, 0x1e1d, 0x1e1d, 0x1e1f, 0x1e1f, - 0x1e21, 0x1e21, 0x1e23, 0x1e23, 0x1e25, 0x1e25, 0x1e27, 0x1e27, - 0x1e29, 0x1e29, 0x1e2b, 0x1e2b, 0x1e2d, 0x1e2d, 0x1e2f, 0x1e2f, - 0x1e31, 0x1e31, 0x1e33, 0x1e33, 0x1e35, 0x1e35, 0x1e37, 0x1e37, - 0x1e39, 0x1e39, 0x1e3b, 0x1e3b, 0x1e3d, 0x1e3d, 0x1e3f, 0x1e3f, - 0x1e41, 0x1e41, 0x1e43, 0x1e43, 0x1e45, 0x1e45, 0x1e47, 0x1e47, - 0x1e49, 0x1e49, 0x1e4b, 0x1e4b, 0x1e4d, 0x1e4d, 0x1e4f, 0x1e4f, - 0x1e51, 0x1e51, 0x1e53, 0x1e53, 0x1e55, 0x1e55, 0x1e57, 0x1e57, - 0x1e59, 0x1e59, 0x1e5b, 0x1e5b, 0x1e5d, 0x1e5d, 0x1e5f, 0x1e5f, - 0x1e61, 0x1e61, 0x1e63, 0x1e63, 0x1e65, 0x1e65, 0x1e67, 0x1e67, - 0x1e69, 0x1e69, 0x1e6b, 0x1e6b, 0x1e6d, 0x1e6d, 0x1e6f, 0x1e6f, - 0x1e71, 0x1e71, 0x1e73, 0x1e73, 0x1e75, 0x1e75, 0x1e77, 0x1e77, - 0x1e79, 0x1e79, 0x1e7b, 0x1e7b, 0x1e7d, 0x1e7d, 0x1e7f, 0x1e7f, - 0x1e81, 0x1e81, 0x1e83, 0x1e83, 0x1e85, 0x1e85, 0x1e87, 0x1e87, - 0x1e89, 0x1e89, 0x1e8b, 0x1e8b, 0x1e8d, 0x1e8d, 0x1e8f, 0x1e8f, - 0x1e91, 0x1e91, 0x1e93, 0x1e93, 0x1e95, 0x1e95, 0x1e96, 0x1e97, - 0x1e98, 0x1e99, 0x1e9a, 0x1e61, 0x1e9c, 0x1e9d, 0x1e9e, 0x1e9f, - 0x1ea1, 0x1ea1, 0x1ea3, 0x1ea3, 0x1ea5, 0x1ea5, 0x1ea7, 0x1ea7, - 0x1ea9, 0x1ea9, 0x1eab, 0x1eab, 0x1ead, 0x1ead, 0x1eaf, 0x1eaf, - 0x1eb1, 0x1eb1, 0x1eb3, 0x1eb3, 0x1eb5, 0x1eb5, 0x1eb7, 0x1eb7, - 0x1eb9, 0x1eb9, 0x1ebb, 0x1ebb, 0x1ebd, 0x1ebd, 0x1ebf, 0x1ebf, - 0x1ec1, 0x1ec1, 0x1ec3, 0x1ec3, 0x1ec5, 0x1ec5, 0x1ec7, 0x1ec7, - 0x1ec9, 0x1ec9, 0x1ecb, 0x1ecb, 0x1ecd, 0x1ecd, 0x1ecf, 0x1ecf, - 0x1ed1, 0x1ed1, 0x1ed3, 0x1ed3, 0x1ed5, 0x1ed5, 0x1ed7, 0x1ed7, - 0x1ed9, 0x1ed9, 0x1edb, 0x1edb, 0x1edd, 0x1edd, 0x1edf, 0x1edf, - 0x1ee1, 0x1ee1, 0x1ee3, 0x1ee3, 0x1ee5, 0x1ee5, 0x1ee7, 0x1ee7, - 0x1ee9, 0x1ee9, 0x1eeb, 0x1eeb, 0x1eed, 0x1eed, 0x1eef, 0x1eef, - 0x1ef1, 0x1ef1, 0x1ef3, 0x1ef3, 0x1ef5, 0x1ef5, 0x1ef7, 0x1ef7, - 0x1ef9, 0x1ef9, 0x1efa, 0x1efb, 0x1efc, 0x1efd, 0x1efe, 0x1eff -}}; -static const UnicodeCaseTableVector caseTable1f = {{ - 0x1f00, 0x1f01, 0x1f02, 0x1f03, 0x1f04, 0x1f05, 0x1f06, 0x1f07, - 0x1f00, 0x1f01, 0x1f02, 0x1f03, 0x1f04, 0x1f05, 0x1f06, 0x1f07, - 0x1f10, 0x1f11, 0x1f12, 0x1f13, 0x1f14, 0x1f15, 0x1f16, 0x1f17, - 0x1f10, 0x1f11, 0x1f12, 0x1f13, 0x1f14, 0x1f15, 0x1f1e, 0x1f1f, - 0x1f20, 0x1f21, 0x1f22, 0x1f23, 0x1f24, 0x1f25, 0x1f26, 0x1f27, - 0x1f20, 0x1f21, 0x1f22, 0x1f23, 0x1f24, 0x1f25, 0x1f26, 0x1f27, - 0x1f30, 0x1f31, 0x1f32, 0x1f33, 0x1f34, 0x1f35, 0x1f36, 0x1f37, - 0x1f30, 0x1f31, 0x1f32, 0x1f33, 0x1f34, 0x1f35, 0x1f36, 0x1f37, - 0x1f40, 0x1f41, 0x1f42, 0x1f43, 0x1f44, 0x1f45, 0x1f46, 0x1f47, - 0x1f40, 0x1f41, 0x1f42, 0x1f43, 0x1f44, 0x1f45, 0x1f4e, 0x1f4f, - 0x1f50, 0x1f51, 0x1f52, 0x1f53, 0x1f54, 0x1f55, 0x1f56, 0x1f57, - 0x1f58, 0x1f51, 0x1f5a, 0x1f53, 0x1f5c, 0x1f55, 0x1f5e, 0x1f57, - 0x1f60, 0x1f61, 0x1f62, 0x1f63, 0x1f64, 0x1f65, 0x1f66, 0x1f67, - 0x1f60, 0x1f61, 0x1f62, 0x1f63, 0x1f64, 0x1f65, 0x1f66, 0x1f67, - 0x1f70, 0x1f71, 0x1f72, 0x1f73, 0x1f74, 0x1f75, 0x1f76, 0x1f77, - 0x1f78, 0x1f79, 0x1f7a, 0x1f7b, 0x1f7c, 0x1f7d, 0x1f7e, 0x1f7f, - 0x1f80, 0x1f81, 0x1f82, 0x1f83, 0x1f84, 0x1f85, 0x1f86, 0x1f87, - 0x1f80, 0x1f81, 0x1f82, 0x1f83, 0x1f84, 0x1f85, 0x1f86, 0x1f87, - 0x1f90, 0x1f91, 0x1f92, 0x1f93, 0x1f94, 0x1f95, 0x1f96, 0x1f97, - 0x1f90, 0x1f91, 0x1f92, 0x1f93, 0x1f94, 0x1f95, 0x1f96, 0x1f97, - 0x1fa0, 0x1fa1, 0x1fa2, 0x1fa3, 0x1fa4, 0x1fa5, 0x1fa6, 0x1fa7, - 0x1fa0, 0x1fa1, 0x1fa2, 0x1fa3, 0x1fa4, 0x1fa5, 0x1fa6, 0x1fa7, - 0x1fb0, 0x1fb1, 0x1fb2, 0x1fb3, 0x1fb4, 0x1fb5, 0x1fb6, 0x1fb7, - 0x1fb0, 0x1fb1, 0x1f70, 0x1f71, 0x1fb3, 0x1fbd, 0x03b9, 0x1fbf, - 0x1fc0, 0x1fc1, 0x1fc2, 0x1fc3, 0x1fc4, 0x1fc5, 0x1fc6, 0x1fc7, - 0x1f72, 0x1f73, 0x1f74, 0x1f75, 0x1fc3, 0x1fcd, 0x1fce, 0x1fcf, - 0x1fd0, 0x1fd1, 0x1fd2, 0x1fd3, 0x1fd4, 0x1fd5, 0x1fd6, 0x1fd7, - 0x1fd0, 0x1fd1, 0x1f76, 0x1f77, 0x1fdc, 0x1fdd, 0x1fde, 0x1fdf, - 0x1fe0, 0x1fe1, 0x1fe2, 0x1fe3, 0x1fe4, 0x1fe5, 0x1fe6, 0x1fe7, - 0x1fe0, 0x1fe1, 0x1f7a, 0x1f7b, 0x1fe5, 0x1fed, 0x1fee, 0x1fef, - 0x1ff0, 0x1ff1, 0x1ff2, 0x1ff3, 0x1ff4, 0x1ff5, 0x1ff6, 0x1ff7, - 0x1f78, 0x1f79, 0x1f7c, 0x1f7d, 0x1ff3, 0x1ffd, 0x1ffe, 0x1fff -}}; -static const UnicodeCaseTableVector caseTable21 = {{ - 0x2100, 0x2101, 0x2102, 0x2103, 0x2104, 0x2105, 0x2106, 0x2107, - 0x2108, 0x2109, 0x210a, 0x210b, 0x210c, 0x210d, 0x210e, 0x210f, - 0x2110, 0x2111, 0x2112, 0x2113, 0x2114, 0x2115, 0x2116, 0x2117, - 0x2118, 0x2119, 0x211a, 0x211b, 0x211c, 0x211d, 0x211e, 0x211f, - 0x2120, 0x2121, 0x2122, 0x2123, 0x2124, 0x2125, 0x03c9, 0x2127, - 0x2128, 0x2129, 0x006b, 0x00e5, 0x212c, 0x212d, 0x212e, 0x212f, - 0x2130, 0x2131, 0x2132, 0x2133, 0x2134, 0x2135, 0x2136, 0x2137, - 0x2138, 0x2139, 0x213a, 0x213b, 0x213c, 0x213d, 0x213e, 0x213f, - 0x2140, 0x2141, 0x2142, 0x2143, 0x2144, 0x2145, 0x2146, 0x2147, - 0x2148, 0x2149, 0x214a, 0x214b, 0x214c, 0x214d, 0x214e, 0x214f, - 0x2150, 0x2151, 0x2152, 0x2153, 0x2154, 0x2155, 0x2156, 0x2157, - 0x2158, 0x2159, 0x215a, 0x215b, 0x215c, 0x215d, 0x215e, 0x215f, - 0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, 0x2177, - 0x2178, 0x2179, 0x217a, 0x217b, 0x217c, 0x217d, 0x217e, 0x217f, - 0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, 0x2177, - 0x2178, 0x2179, 0x217a, 0x217b, 0x217c, 0x217d, 0x217e, 0x217f, - 0x2180, 0x2181, 0x2182, 0x2183, 0x2184, 0x2185, 0x2186, 0x2187, - 0x2188, 0x2189, 0x218a, 0x218b, 0x218c, 0x218d, 0x218e, 0x218f, - 0x2190, 0x2191, 0x2192, 0x2193, 0x2194, 0x2195, 0x2196, 0x2197, - 0x2198, 0x2199, 0x219a, 0x219b, 0x219c, 0x219d, 0x219e, 0x219f, - 0x21a0, 0x21a1, 0x21a2, 0x21a3, 0x21a4, 0x21a5, 0x21a6, 0x21a7, - 0x21a8, 0x21a9, 0x21aa, 0x21ab, 0x21ac, 0x21ad, 0x21ae, 0x21af, - 0x21b0, 0x21b1, 0x21b2, 0x21b3, 0x21b4, 0x21b5, 0x21b6, 0x21b7, - 0x21b8, 0x21b9, 0x21ba, 0x21bb, 0x21bc, 0x21bd, 0x21be, 0x21bf, - 0x21c0, 0x21c1, 0x21c2, 0x21c3, 0x21c4, 0x21c5, 0x21c6, 0x21c7, - 0x21c8, 0x21c9, 0x21ca, 0x21cb, 0x21cc, 0x21cd, 0x21ce, 0x21cf, - 0x21d0, 0x21d1, 0x21d2, 0x21d3, 0x21d4, 0x21d5, 0x21d6, 0x21d7, - 0x21d8, 0x21d9, 0x21da, 0x21db, 0x21dc, 0x21dd, 0x21de, 0x21df, - 0x21e0, 0x21e1, 0x21e2, 0x21e3, 0x21e4, 0x21e5, 0x21e6, 0x21e7, - 0x21e8, 0x21e9, 0x21ea, 0x21eb, 0x21ec, 0x21ed, 0x21ee, 0x21ef, - 0x21f0, 0x21f1, 0x21f2, 0x21f3, 0x21f4, 0x21f5, 0x21f6, 0x21f7, - 0x21f8, 0x21f9, 0x21fa, 0x21fb, 0x21fc, 0x21fd, 0x21fe, 0x21ff -}}; -static const UnicodeCaseTableVector caseTable24 = {{ - 0x2400, 0x2401, 0x2402, 0x2403, 0x2404, 0x2405, 0x2406, 0x2407, - 0x2408, 0x2409, 0x240a, 0x240b, 0x240c, 0x240d, 0x240e, 0x240f, - 0x2410, 0x2411, 0x2412, 0x2413, 0x2414, 0x2415, 0x2416, 0x2417, - 0x2418, 0x2419, 0x241a, 0x241b, 0x241c, 0x241d, 0x241e, 0x241f, - 0x2420, 0x2421, 0x2422, 0x2423, 0x2424, 0x2425, 0x2426, 0x2427, - 0x2428, 0x2429, 0x242a, 0x242b, 0x242c, 0x242d, 0x242e, 0x242f, - 0x2430, 0x2431, 0x2432, 0x2433, 0x2434, 0x2435, 0x2436, 0x2437, - 0x2438, 0x2439, 0x243a, 0x243b, 0x243c, 0x243d, 0x243e, 0x243f, - 0x2440, 0x2441, 0x2442, 0x2443, 0x2444, 0x2445, 0x2446, 0x2447, - 0x2448, 0x2449, 0x244a, 0x244b, 0x244c, 0x244d, 0x244e, 0x244f, - 0x2450, 0x2451, 0x2452, 0x2453, 0x2454, 0x2455, 0x2456, 0x2457, - 0x2458, 0x2459, 0x245a, 0x245b, 0x245c, 0x245d, 0x245e, 0x245f, - 0x2460, 0x2461, 0x2462, 0x2463, 0x2464, 0x2465, 0x2466, 0x2467, - 0x2468, 0x2469, 0x246a, 0x246b, 0x246c, 0x246d, 0x246e, 0x246f, - 0x2470, 0x2471, 0x2472, 0x2473, 0x2474, 0x2475, 0x2476, 0x2477, - 0x2478, 0x2479, 0x247a, 0x247b, 0x247c, 0x247d, 0x247e, 0x247f, - 0x2480, 0x2481, 0x2482, 0x2483, 0x2484, 0x2485, 0x2486, 0x2487, - 0x2488, 0x2489, 0x248a, 0x248b, 0x248c, 0x248d, 0x248e, 0x248f, - 0x2490, 0x2491, 0x2492, 0x2493, 0x2494, 0x2495, 0x2496, 0x2497, - 0x2498, 0x2499, 0x249a, 0x249b, 0x249c, 0x249d, 0x249e, 0x249f, - 0x24a0, 0x24a1, 0x24a2, 0x24a3, 0x24a4, 0x24a5, 0x24a6, 0x24a7, - 0x24a8, 0x24a9, 0x24aa, 0x24ab, 0x24ac, 0x24ad, 0x24ae, 0x24af, - 0x24b0, 0x24b1, 0x24b2, 0x24b3, 0x24b4, 0x24b5, 0x24d0, 0x24d1, - 0x24d2, 0x24d3, 0x24d4, 0x24d5, 0x24d6, 0x24d7, 0x24d8, 0x24d9, - 0x24da, 0x24db, 0x24dc, 0x24dd, 0x24de, 0x24df, 0x24e0, 0x24e1, - 0x24e2, 0x24e3, 0x24e4, 0x24e5, 0x24e6, 0x24e7, 0x24e8, 0x24e9, - 0x24d0, 0x24d1, 0x24d2, 0x24d3, 0x24d4, 0x24d5, 0x24d6, 0x24d7, - 0x24d8, 0x24d9, 0x24da, 0x24db, 0x24dc, 0x24dd, 0x24de, 0x24df, - 0x24e0, 0x24e1, 0x24e2, 0x24e3, 0x24e4, 0x24e5, 0x24e6, 0x24e7, - 0x24e8, 0x24e9, 0x24ea, 0x24eb, 0x24ec, 0x24ed, 0x24ee, 0x24ef, - 0x24f0, 0x24f1, 0x24f2, 0x24f3, 0x24f4, 0x24f5, 0x24f6, 0x24f7, - 0x24f8, 0x24f9, 0x24fa, 0x24fb, 0x24fc, 0x24fd, 0x24fe, 0x24ff -}}; -static const UnicodeCaseTableVector caseTableff = {{ - 0xff00, 0xff01, 0xff02, 0xff03, 0xff04, 0xff05, 0xff06, 0xff07, - 0xff08, 0xff09, 0xff0a, 0xff0b, 0xff0c, 0xff0d, 0xff0e, 0xff0f, - 0xff10, 0xff11, 0xff12, 0xff13, 0xff14, 0xff15, 0xff16, 0xff17, - 0xff18, 0xff19, 0xff1a, 0xff1b, 0xff1c, 0xff1d, 0xff1e, 0xff1f, - 0xff20, 0xff41, 0xff42, 0xff43, 0xff44, 0xff45, 0xff46, 0xff47, - 0xff48, 0xff49, 0xff4a, 0xff4b, 0xff4c, 0xff4d, 0xff4e, 0xff4f, - 0xff50, 0xff51, 0xff52, 0xff53, 0xff54, 0xff55, 0xff56, 0xff57, - 0xff58, 0xff59, 0xff5a, 0xff3b, 0xff3c, 0xff3d, 0xff3e, 0xff3f, - 0xff40, 0xff41, 0xff42, 0xff43, 0xff44, 0xff45, 0xff46, 0xff47, - 0xff48, 0xff49, 0xff4a, 0xff4b, 0xff4c, 0xff4d, 0xff4e, 0xff4f, - 0xff50, 0xff51, 0xff52, 0xff53, 0xff54, 0xff55, 0xff56, 0xff57, - 0xff58, 0xff59, 0xff5a, 0xff5b, 0xff5c, 0xff5d, 0xff5e, 0xff5f, - 0xff60, 0xff61, 0xff62, 0xff63, 0xff64, 0xff65, 0xff66, 0xff67, - 0xff68, 0xff69, 0xff6a, 0xff6b, 0xff6c, 0xff6d, 0xff6e, 0xff6f, - 0xff70, 0xff71, 0xff72, 0xff73, 0xff74, 0xff75, 0xff76, 0xff77, - 0xff78, 0xff79, 0xff7a, 0xff7b, 0xff7c, 0xff7d, 0xff7e, 0xff7f, - 0xff80, 0xff81, 0xff82, 0xff83, 0xff84, 0xff85, 0xff86, 0xff87, - 0xff88, 0xff89, 0xff8a, 0xff8b, 0xff8c, 0xff8d, 0xff8e, 0xff8f, - 0xff90, 0xff91, 0xff92, 0xff93, 0xff94, 0xff95, 0xff96, 0xff97, - 0xff98, 0xff99, 0xff9a, 0xff9b, 0xff9c, 0xff9d, 0xff9e, 0xff9f, - 0xffa0, 0xffa1, 0xffa2, 0xffa3, 0xffa4, 0xffa5, 0xffa6, 0xffa7, - 0xffa8, 0xffa9, 0xffaa, 0xffab, 0xffac, 0xffad, 0xffae, 0xffaf, - 0xffb0, 0xffb1, 0xffb2, 0xffb3, 0xffb4, 0xffb5, 0xffb6, 0xffb7, - 0xffb8, 0xffb9, 0xffba, 0xffbb, 0xffbc, 0xffbd, 0xffbe, 0xffbf, - 0xffc0, 0xffc1, 0xffc2, 0xffc3, 0xffc4, 0xffc5, 0xffc6, 0xffc7, - 0xffc8, 0xffc9, 0xffca, 0xffcb, 0xffcc, 0xffcd, 0xffce, 0xffcf, - 0xffd0, 0xffd1, 0xffd2, 0xffd3, 0xffd4, 0xffd5, 0xffd6, 0xffd7, - 0xffd8, 0xffd9, 0xffda, 0xffdb, 0xffdc, 0xffdd, 0xffde, 0xffdf, - 0xffe0, 0xffe1, 0xffe2, 0xffe3, 0xffe4, 0xffe5, 0xffe6, 0xffe7, - 0xffe8, 0xffe9, 0xffea, 0xffeb, 0xffec, 0xffed, 0xffee, 0xffef, - 0xfff0, 0xfff1, 0xfff2, 0xfff3, 0xfff4, 0xfff5, 0xfff6, 0xfff7, - 0xfff8, 0xfff9, 0xfffa, 0xfffb, 0xfffc, 0xfffd, 0xfffe, 0xffff -}}; -static const UnicodeCaseTableVector *caseTable[256] = { - &caseTable00, - &caseTable01, - &caseTable02, - &caseTable03, - &caseTable04, - &caseTable05, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - &caseTable1e, - &caseTable1f, - nullptr, - &caseTable21, - nullptr, - nullptr, - &caseTable24, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - nullptr, - &caseTableff -}; - -static inline char getType(Unicode c) { - int i; - char type; - - if (c > 0xffff) { - type = 'X'; - } else { - i = (c >> 8) & 0xff; - if ((type = typeTable[i].type) == 'X') { - type = typeTable[i].vector[c & 0xff]; - } - } - return type; -} - -GBool unicodeTypeL(Unicode c) { - return getType(c) == 'L'; -} - -GBool unicodeTypeR(Unicode c) { - return getType(c) == 'R'; -} - -GBool unicodeTypeNum(Unicode c) { - return getType(c) == '#'; -} - -GBool unicodeTypeAlphaNum(Unicode c) { - char t; - - t = getType(c); - return t == 'L' || t == 'R' || t == '#'; -} - -#define UNICODE_ALPHABETIC_PRESENTATION_BLOCK_BEGIN 0xFB00 -#define UNICODE_ALPHABETIC_PRESENTATION_BLOCK_END 0xFB4F - -GBool unicodeIsAlphabeticPresentationForm(Unicode c) { - return c >= UNICODE_ALPHABETIC_PRESENTATION_BLOCK_BEGIN - && c <= UNICODE_ALPHABETIC_PRESENTATION_BLOCK_END; -} - -Unicode unicodeToUpper(Unicode c) { - int i; - - if (c > 0xffff) { - return c; - } - i = (c >> 8) & 0xff; - if (caseTable[i]) { - return caseTable[i]->codes[c & 0xff]; - } - return c; -} - -#define UNICODE_LAST_CHAR 0x10FFFF -#define UNICODE_MAX_TABLE_INDEX (UNICODE_LAST_CHAR / 256 + 1) -// large empty block between U+2FA1D and U+E0001 -#define UNICODE_LAST_CHAR_PART1 0x2FAFF -#define UNICODE_LAST_PAGE_PART1 (UNICODE_LAST_CHAR_PART1 / 256) -#define UNICODE_PART2_START 0xE0000 - -#include "UnicodeCClassTables.h" -#include "UnicodeCompTables.h" -#include "UnicodeDecompTables.h" - -#define CC_PART1(Page, Char) \ - ((combining_class_table_part1[Page] >= UNICODE_MAX_TABLE_INDEX) \ - ? (combining_class_table_part1[Page] - UNICODE_MAX_TABLE_INDEX) \ - : (cclass_data[combining_class_table_part1[Page]][Char])) - -#define CC_PART2(Page, Char) \ - ((combining_class_table_part2[Page] >= UNICODE_MAX_TABLE_INDEX) \ - ? (combining_class_table_part2[Page] - UNICODE_MAX_TABLE_INDEX) \ - : (cclass_data[combining_class_table_part2[Page]][Char])) - -#define COMBINING_CLASS(u) (((u) <= UNICODE_LAST_CHAR_PART1) \ - ? CC_PART1((u) / 256, (u) % 256) \ - : (((u) >= UNICODE_PART2_START && (u) <= UNICODE_LAST_CHAR) \ - ? CC_PART2(((u) - UNICODE_PART2_START) / 256, (u) % 256) \ - : 0)) - -// Write the compatibility decomposition of @u into @buf, returning the number -// of characters written. @buf may be NULL, in which case the length of the -// decomposition is returned but nothing is written. If @u is its own -// decomposition, write @u into @buf and return 1. -// If reverseRTL is true, then decompositions of RTL characters will be output -// in reverse order. -static int decomp_compat(Unicode u, Unicode *buf, GBool reverseRTL = false) { - // decomposition tables stored as lists {character, decomp_length, offset} - // so we do a binary search - int start = 0, end = DECOMP_TABLE_LENGTH; - if (u >= decomp_table[start].character - && u <= decomp_table[end - 1].character) - while (gTrue) { - int midpoint = (start + end) / 2; - if (u == decomp_table[midpoint].character) { - int offset = decomp_table[midpoint].offset; - if (offset == -1) { - break; - } else { - int length = decomp_table[midpoint].length, i; - if (buf) { - for (i = 0; i < length; ++i) { - if (unicodeTypeR(u) && reverseRTL) { - buf[i] = decomp_expansion[offset + length - i - 1]; - } else { - buf[i] = decomp_expansion[offset + i]; - } - } - } - return length; - } - } else if (midpoint == start) - break; - else if (u > decomp_table[midpoint].character) - start = midpoint; - else - end = midpoint; - } - if (buf) - *buf = u; - return 1; -} - -#define CI(Page, Char) \ - ((compose_table[Page] >= UNICODE_MAX_TABLE_INDEX) \ - ? (compose_table[Page] - UNICODE_MAX_TABLE_INDEX) \ - : (compose_data[compose_table[Page]][Char])) - -#define COMPOSE_INDEX(u) \ - ((((u) / 256) > (COMPOSE_TABLE_LAST)) ? 0 : CI((u) / 256, (u) % 256)) - -// If @add combines with @base, write the combination to @out and return -// gTrue. Otherwise return gFalse. -static GBool combine(Unicode base, Unicode add, Unicode *out) { - unsigned short idx_base, idx_add; - - idx_base = COMPOSE_INDEX(base); - if (idx_base >= COMPOSE_FIRST_SINGLE_START - && idx_base < COMPOSE_SECOND_START) { - if (compose_first_single[idx_base - COMPOSE_FIRST_SINGLE_START][0] - == add) { - *out = compose_first_single[idx_base - COMPOSE_FIRST_SINGLE_START][1]; - return gTrue; - } else - return gFalse; - } - - idx_add = COMPOSE_INDEX(add); - if (idx_add >= COMPOSE_SECOND_SINGLE_START) { - if (compose_second_single[idx_add - COMPOSE_SECOND_SINGLE_START][0] - == base) { - *out = compose_second_single[idx_add - COMPOSE_SECOND_SINGLE_START][1]; - return gTrue; - } else - return gFalse; - } - - if (idx_base >= COMPOSE_FIRST_START && idx_base < COMPOSE_FIRST_SINGLE_START - && idx_add >= COMPOSE_SECOND_START - && idx_add < COMPOSE_SECOND_SINGLE_START) { - Unicode o = compose_array[idx_base - COMPOSE_FIRST_START] - [idx_add - COMPOSE_SECOND_START]; - if (o) { - *out = o; - return gTrue; - } - } - - return gFalse; -} - -#define HANGUL_S_BASE 0xAC00 -#define HANGUL_L_BASE 0x1100 -#define HANGUL_V_BASE 0x1161 -#define HANGUL_T_BASE 0x11A7 -#define HANGUL_L_COUNT 19 -#define HANGUL_V_COUNT 21 -#define HANGUL_T_COUNT 28 -#define HANGUL_S_COUNT (HANGUL_L_COUNT * HANGUL_V_COUNT * HANGUL_T_COUNT) -#define HANGUL_N_COUNT (HANGUL_V_COUNT * HANGUL_T_COUNT) -#define HANGUL_IS_L(u) (((u) >= HANGUL_L_BASE) \ - && ((u) < HANGUL_L_BASE + HANGUL_L_COUNT)) -#define HANGUL_IS_V(u) (((u) >= HANGUL_V_BASE) \ - && ((u) < HANGUL_V_BASE + HANGUL_V_COUNT)) -#define HANGUL_IS_T(u) (((u) >= HANGUL_T_BASE) \ - && ((u) < HANGUL_T_BASE + HANGUL_T_COUNT)) -#define HANGUL_IS_SYLLABLE(u) (((u) >= HANGUL_S_BASE) \ - && ((u) < HANGUL_S_BASE + HANGUL_S_COUNT)) -#define HANGUL_SYLLABLE_IS_LV(u) (((u) - HANGUL_S_BASE) % HANGUL_T_COUNT == 0) -#define IS_HANGUL(u) (HANGUL_IS_L(u) || HANGUL_IS_V(u) || HANGUL_IS_T(u) \ - || HANGUL_IS_SYLLABLE(u)) -#define HANGUL_COMPOSE_L_V(l, v) (HANGUL_S_BASE + (HANGUL_T_COUNT * \ - (((v) - HANGUL_V_BASE) + (HANGUL_V_COUNT * ((l) - HANGUL_L_BASE))))) -#define HANGUL_COMPOSE_LV_T(lv, t) ((lv) + ((t) - HANGUL_T_BASE)) - -// Converts Unicode string @in of length @len to its normalization in form -// NFKC (compatibility decomposition + canonical composition). The length of -// the resulting Unicode string is returned in @out_len. If non-NULL, @indices -// is assigned the location of a newly-allocated array of length @out_len + 1, -// for each character in the normalized string giving the index in @in of the -// corresponding unnormalized character. @indices is not guaranteed monotone or -// onto. -Unicode *unicodeNormalizeNFKC(Unicode *in, int len, - int *out_len, int **indices) { - return unicodeNormalizeNFKC(in, len, out_len, indices, false); -} - -Unicode *unicodeNormalizeNFKC(Unicode *in, int len, - int *out_len, int **indices, - GBool reverseRTL) { - Unicode *out; - int i, o, *classes, *idx = nullptr; - - for (i = 0, o = 0; i < len; ++i) { - if (HANGUL_IS_L(in[i]) || HANGUL_IS_SYLLABLE(in[i])) { - o += 1; - } else - o += decomp_compat(in[i], nullptr); - } - - out = (Unicode *) gmallocn(o, sizeof(Unicode)); - classes = (int *) gmallocn(o, sizeof(int)); - if (indices) - idx = (int *) gmallocn(o + 1, sizeof(int)); - - for (i = 0, o = 0; i < len; ) { - Unicode u = in[i]; - if (IS_HANGUL(u)) { - if (HANGUL_IS_L(u)) { - Unicode l = u; - if (i+1 < len && HANGUL_IS_V(in[i+1])) { - Unicode lv = HANGUL_COMPOSE_L_V(l, in[++i]); - if (i+1 < len && HANGUL_IS_T(in[i+1])) - out[o] = HANGUL_COMPOSE_LV_T(lv, in[++i]); - else - out[o] = lv; - } else - out[o] = l; - } else if (HANGUL_SYLLABLE_IS_LV(u)) { - Unicode lv = u; - if (i+1 < len && HANGUL_IS_T(in[i+1])) - out[o] = HANGUL_COMPOSE_LV_T(lv, in[++i]); - else - out[o] = lv; - } else - out[o] = u; - if (indices) - idx[o] = i; - ++i; ++o; - } else { - int j, p, q, r, s, dlen; - // write compatibility decompositions into out (we have enough space) - // chomp in until a starter is reached - for (j = i, p = o; j < len; ++j) { - u = in[j]; - if (j != i && COMBINING_CLASS(u) == 0) - break; - dlen = decomp_compat(u, out + p, reverseRTL); - for (q = p; q < p + dlen; ++q) { - classes[q] = COMBINING_CLASS(out[q]); - if (indices) - idx[q] = j; - } - p += dlen; - } - // put out[o, p) in canonical ordering - for (q = o + 1; q < p; ++q) - for (r = q; r > o + 1; --r) { // FIXME worth using a better sort? - int swap; - if (classes[r] >= classes[r-1]) - break; - u = out[r]; out[r] = out[r - 1]; out[r - 1] = u; - swap = classes[r]; classes[r] = classes[r - 1]; classes[r - 1] = swap; - if (indices) { - swap = idx[r]; - idx[r] = idx[r - 1]; - idx[r - 1] = swap; - } - } - // canonical compose out[o, p) - for (q = o + 1; q < p; ++q) - if (!combine(out[o], out[q], &out[o])) - break; - // move out[q, p) back to [o+1, ?) - if (q != o + 1) - for (r = q, s = o + 1; r < p; ++r, ++s) { - out[s] = out[r]; - if (indices) - idx[s] = idx[r]; - } - else - s = p; - i = j; o = s; - } - } - - *out_len = o; - gfree(classes); - if (indices) { - idx[o] = len; - *indices = idx; - } - return out; -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/UnicodeTypeTable.h b/Build/source/libs/poppler/poppler-src/poppler/UnicodeTypeTable.h deleted file mode 100644 index 978d889f691..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/UnicodeTypeTable.h +++ /dev/null @@ -1,49 +0,0 @@ -//======================================================================== -// -// UnicodeTypeTable.h -// -// Copyright 2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2006 Ed Catmur <ed@catmur.co.uk> -// Copyright (C) 2012 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2016 Khaled Hosny <khaledhosny@eglug.org> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef UNICODETYPETABLE_H -#define UNICODETYPETABLE_H - -#include "goo/gtypes.h" - -extern GBool unicodeTypeL(Unicode c); - -extern GBool unicodeTypeR(Unicode c); - -extern GBool unicodeTypeNum(Unicode c); - -extern GBool unicodeTypeAlphaNum(Unicode c); - -extern GBool unicodeIsAlphabeticPresentationForm(Unicode c); - -extern Unicode unicodeToUpper(Unicode c); - -extern Unicode *unicodeNormalizeNFKC(Unicode *in, int len, - int *out_len, int **offsets); - -extern Unicode *unicodeNormalizeNFKC(Unicode *in, int len, - int *out_len, int **offsets, - GBool reverseRTL); - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/ViewerPreferences.cc b/Build/source/libs/poppler/poppler-src/poppler/ViewerPreferences.cc deleted file mode 100644 index e45134f2bc3..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/ViewerPreferences.cc +++ /dev/null @@ -1,116 +0,0 @@ -//======================================================================== -// -// ViewerPreferences.cc -// -// This file is licensed under the GPLv2 or later -// -// Copyright 2011 Pino Toscano <pino@kde.org> -// Copyright 2017 Albert Astals Cid <aacid@kde.org> -// -//======================================================================== - -#include <config.h> - -#include "ViewerPreferences.h" - -#include "Object.h" -#include "Dict.h" - -ViewerPreferences::ViewerPreferences(Dict *prefDict) -{ - init(); - - Object obj = prefDict->lookup("HideToolbar"); - if (obj.isBool()) { - hideToolbar = obj.getBool(); - } - - obj = prefDict->lookup("HideMenubar"); - if (obj.isBool()) { - hideMenubar = obj.getBool(); - } - - obj = prefDict->lookup("HideWindowUI"); - if (obj.isBool()) { - hideWindowUI = obj.getBool(); - } - - obj = prefDict->lookup("FitWindow"); - if (obj.isBool()) { - fitWindow = obj.getBool(); - } - - obj = prefDict->lookup("CenterWindow"); - if (obj.isBool()) { - centerWindow = obj.getBool(); - } - - obj = prefDict->lookup("DisplayDocTitle"); - if (obj.isBool()) { - displayDocTitle = obj.getBool(); - } - - obj = prefDict->lookup("NonFullScreenPageMode"); - if (obj.isName()) { - const char *mode = obj.getName(); - if (!strcmp(mode, "UseNone")) { - nonFullScreenPageMode = nfpmUseNone; - } else if (!strcmp(mode, "UseOutlines")) { - nonFullScreenPageMode = nfpmUseOutlines; - } else if (!strcmp(mode, "UseThumbs")) { - nonFullScreenPageMode = nfpmUseThumbs; - } else if (!strcmp(mode, "UseOC")) { - nonFullScreenPageMode = nfpmUseOC; - } - } - - obj = prefDict->lookup("Direction"); - if (obj.isName()) { - const char *dir = obj.getName(); - if (!strcmp(dir, "L2R")) { - direction = directionL2R; - } else if (!strcmp(dir, "R2L")) { - direction = directionR2L; - } - } - - obj = prefDict->lookup("PrintScaling"); - if (obj.isName()) { - const char *ps = obj.getName(); - if (!strcmp(ps, "None")) { - printScaling = printScalingNone; - } else if (!strcmp(ps, "AppDefault")) { - printScaling = printScalingAppDefault; - } - } - - obj = prefDict->lookup("Duplex"); - if (obj.isName()) { - const char *d = obj.getName(); - if (!strcmp(d, "Simplex")) { - duplex = duplexSimplex; - } else if (!strcmp(d, "DuplexFlipShortEdge")) { - duplex = duplexDuplexFlipShortEdge; - } else if (!strcmp(d, "DuplexFlipLongEdge")) { - duplex = duplexDuplexFlipLongEdge; - } - } -} - -ViewerPreferences::~ViewerPreferences() -{ -} - -void ViewerPreferences::init() -{ - hideToolbar = gFalse; - hideMenubar = gFalse; - hideWindowUI = gFalse; - fitWindow = gFalse; - centerWindow = gFalse; - displayDocTitle = gFalse; - nonFullScreenPageMode = nfpmUseNone; - direction = directionL2R; - printScaling = printScalingAppDefault; - duplex = duplexNone; -} diff --git a/Build/source/libs/poppler/poppler-src/poppler/ViewerPreferences.h b/Build/source/libs/poppler/poppler-src/poppler/ViewerPreferences.h deleted file mode 100644 index 8cdc4d40a73..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/ViewerPreferences.h +++ /dev/null @@ -1,76 +0,0 @@ -//======================================================================== -// -// ViewerPreferences.h -// -// This file is licensed under the GPLv2 or later -// -// Copyright 2011 Pino Toscano <pino@kde.org> -// -//======================================================================== - -#ifndef VIEWERPREFERENCES_H -#define VIEWERPREFERENCES_H - -#include "goo/gtypes.h" - -class Dict; - -//------------------------------------------------------------------------ -// ViewerPreferences -//------------------------------------------------------------------------ - -class ViewerPreferences { -public: - - enum NonFullScreenPageMode { - nfpmUseNone, - nfpmUseOutlines, - nfpmUseThumbs, - nfpmUseOC - }; - enum Direction { - directionL2R, - directionR2L - }; - enum PrintScaling { - printScalingNone, - printScalingAppDefault - }; - enum Duplex { - duplexNone, - duplexSimplex, - duplexDuplexFlipShortEdge, - duplexDuplexFlipLongEdge - }; - - ViewerPreferences(Dict *prefDict); - ~ViewerPreferences(); - - GBool getHideToolbar() const { return hideToolbar; } - GBool getHideMenubar() const { return hideMenubar; } - GBool getHideWindowUI() const { return hideWindowUI; } - GBool getFitWindow() const { return fitWindow; } - GBool getCenterWindow() const { return centerWindow; } - GBool getDisplayDocTitle() const { return displayDocTitle; } - NonFullScreenPageMode getNonFullScreenPageMode() const { return nonFullScreenPageMode; } - Direction getDirection() const { return direction; } - PrintScaling getPrintScaling() const { return printScaling; } - Duplex getDuplex() const { return duplex; } - -private: - - void init(); - - GBool hideToolbar; - GBool hideMenubar; - GBool hideWindowUI; - GBool fitWindow; - GBool centerWindow; - GBool displayDocTitle; - NonFullScreenPageMode nonFullScreenPageMode; - Direction direction; - PrintScaling printScaling; - Duplex duplex; -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/XRef.cc b/Build/source/libs/poppler/poppler-src/poppler/XRef.cc deleted file mode 100644 index 4352146ec45..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/XRef.cc +++ /dev/null @@ -1,1747 +0,0 @@ -//======================================================================== -// -// XRef.cc -// -// Copyright 1996-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2005 Dan Sheridan <dan.sheridan@postman.org.uk> -// Copyright (C) 2005 Brad Hards <bradh@frogmouth.net> -// Copyright (C) 2006, 2008, 2010, 2012-2014, 2016-2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2007-2008 Julien Rebetez <julienr@svn.gnome.org> -// Copyright (C) 2007 Carlos Garcia Campos <carlosgc@gnome.org> -// Copyright (C) 2009, 2010 Ilya Gorenbein <igorenbein@finjan.com> -// Copyright (C) 2010 Hib Eris <hib@hiberis.nl> -// Copyright (C) 2012, 2013, 2016 Thomas Freitag <Thomas.Freitag@kabelmail.de> -// Copyright (C) 2012, 2013 Fabio D'Urso <fabiodurso@hotmail.it> -// Copyright (C) 2013, 2014, 2017 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2013 Pino Toscano <pino@kde.org> -// Copyright (C) 2016 Jakub Alba <jakubalba@gmail.com> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include <config.h> -#include "poppler-config.h" - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include <stdlib.h> -#include <stddef.h> -#include <string.h> -#include <math.h> -#include <ctype.h> -#include <limits.h> -#include <float.h> -#include "goo/gfile.h" -#include "goo/gmem.h" -#include "Object.h" -#include "Stream.h" -#include "Lexer.h" -#include "Parser.h" -#include "Dict.h" -#include "Error.h" -#include "ErrorCodes.h" -#include "XRef.h" -#include "PopplerCache.h" - -//------------------------------------------------------------------------ -// Permission bits -// Note that the PDF spec uses 1 base (eg bit 3 is 1<<2) -//------------------------------------------------------------------------ - -#define permPrint (1<<2) // bit 3 -#define permChange (1<<3) // bit 4 -#define permCopy (1<<4) // bit 5 -#define permNotes (1<<5) // bit 6 -#define permFillForm (1<<8) // bit 9 -#define permAccessibility (1<<9) // bit 10 -#define permAssemble (1<<10) // bit 11 -#define permHighResPrint (1<<11) // bit 12 -#define defPermFlags 0xfffc - -#ifdef MULTITHREADED -# define xrefLocker() MutexLocker locker(&mutex) -# define xrefCondLocker(X) MutexLocker locker(&mutex, (X)) -#else -# define xrefLocker() -# define xrefCondLocker(X) -#endif - -//------------------------------------------------------------------------ -// ObjectStream -//------------------------------------------------------------------------ - -class ObjectStream { -public: - - // Create an object stream, using object number <objStrNum>, - // generation 0. - ObjectStream(XRef *xref, int objStrNumA, int recursion = 0); - - GBool isOk() { return ok; } - - ~ObjectStream(); - - ObjectStream(const ObjectStream &) = delete; - ObjectStream& operator=(const ObjectStream &) = delete; - - // Return the object number of this object stream. - int getObjStrNum() { return objStrNum; } - - // Get the <objIdx>th object from this stream, which should be - // object number <objNum>, generation 0. - Object getObject(int objIdx, int objNum); - -private: - - int objStrNum; // object number of the object stream - int nObjects; // number of objects in the stream - Object *objs; // the objects (length = nObjects) - int *objNums; // the object numbers (length = nObjects) - GBool ok; -}; - -class ObjectStreamKey : public PopplerCacheKey -{ - public: - ObjectStreamKey(int num) : objStrNum(num) - { - } - - bool operator==(const PopplerCacheKey &key) const override - { - const ObjectStreamKey *k = static_cast<const ObjectStreamKey*>(&key); - return objStrNum == k->objStrNum; - } - - const int objStrNum; -}; - -class ObjectStreamItem : public PopplerCacheItem -{ - public: - ObjectStreamItem(ObjectStream *objStr) : objStream(objStr) - { - } - - ~ObjectStreamItem() - { - delete objStream; - } - - ObjectStream *objStream; -}; - -ObjectStream::ObjectStream(XRef *xref, int objStrNumA, int recursion) { - Stream *str; - Parser *parser; - Goffset *offsets; - Object objStr, obj1; - Goffset first; - int i; - - objStrNum = objStrNumA; - nObjects = 0; - objs = nullptr; - objNums = nullptr; - ok = gFalse; - - objStr = xref->fetch(objStrNum, 0, recursion); - if (!objStr.isStream()) { - return; - } - - obj1 = objStr.streamGetDict()->lookup("N", recursion); - if (!obj1.isInt()) { - return; - } - nObjects = obj1.getInt(); - if (nObjects <= 0) { - return; - } - - obj1 = objStr.streamGetDict()->lookup("First", recursion); - if (!obj1.isInt() && !obj1.isInt64()) { - return; - } - if (obj1.isInt()) - first = obj1.getInt(); - else - first = obj1.getInt64(); - if (first < 0) { - return; - } - - // this is an arbitrary limit to avoid integer overflow problems - // in the 'new Object[nObjects]' call (Acrobat apparently limits - // object streams to 100-200 objects) - if (nObjects > 1000000) { - error(errSyntaxError, -1, "Too many objects in an object stream"); - return; - } - objs = new Object[nObjects]; - objNums = (int *)gmallocn(nObjects, sizeof(int)); - offsets = (Goffset *)gmallocn(nObjects, sizeof(Goffset)); - - // parse the header: object numbers and offsets - objStr.streamReset(); - str = new EmbedStream(objStr.getStream(), Object(objNull), gTrue, first); - parser = new Parser(xref, new Lexer(xref, str), gFalse); - for (i = 0; i < nObjects; ++i) { - obj1 = parser->getObj(); - Object obj2 = parser->getObj(); - if (!obj1.isInt() || !(obj2.isInt() || obj2.isInt64())) { - delete parser; - gfree(offsets); - return; - } - objNums[i] = obj1.getInt(); - if (obj2.isInt()) - offsets[i] = obj2.getInt(); - else - offsets[i] = obj2.getInt64(); - if (objNums[i] < 0 || offsets[i] < 0 || - (i > 0 && offsets[i] < offsets[i-1])) { - delete parser; - gfree(offsets); - return; - } - } - while (str->getChar() != EOF) ; - delete parser; - - // skip to the first object - this shouldn't be necessary because - // the First key is supposed to be equal to offsets[0], but just in - // case... - for (Goffset pos = first; pos < offsets[0]; ++pos) { - objStr.getStream()->getChar(); - } - - // parse the objects - for (i = 0; i < nObjects; ++i) { - if (i == nObjects - 1) { - str = new EmbedStream(objStr.getStream(), Object(objNull), gFalse, 0); - } else { - str = new EmbedStream(objStr.getStream(), Object(objNull), gTrue, - offsets[i+1] - offsets[i]); - } - parser = new Parser(xref, new Lexer(xref, str), gFalse); - objs[i] = parser->getObj(); - while (str->getChar() != EOF) ; - delete parser; - } - - gfree(offsets); - ok = gTrue; -} - -ObjectStream::~ObjectStream() { - delete[] objs; - gfree(objNums); -} - -Object ObjectStream::getObject(int objIdx, int objNum) { - if (objIdx < 0 || objIdx >= nObjects || objNum != objNums[objIdx]) { - return Object(objNull); - } - return objs[objIdx].copy(); -} - -//------------------------------------------------------------------------ -// XRef -//------------------------------------------------------------------------ - -void XRef::init() { -#ifdef MULTITHREADED - gInitMutex(&mutex); -#endif - ok = gTrue; - errCode = errNone; - entries = nullptr; - capacity = 0; - size = 0; - modified = gFalse; - streamEnds = nullptr; - streamEndsLen = 0; - objStrs = new PopplerCache(5); - mainXRefEntriesOffset = 0; - xRefStream = gFalse; - scannedSpecialFlags = gFalse; - encrypted = gFalse; - permFlags = defPermFlags; - ownerPasswordOk = gFalse; - rootNum = -1; - strOwner = gFalse; - xrefReconstructed = gFalse; - encAlgorithm = cryptNone; -} - -XRef::XRef() { - init(); -} - -XRef::XRef(const Object *trailerDictA) { - init(); - - if (trailerDictA->isDict()) - trailerDict = trailerDictA->copy(); -} - -XRef::XRef(BaseStream *strA, Goffset pos, Goffset mainXRefEntriesOffsetA, GBool *wasReconstructed, GBool reconstruct) { - Object obj; - - init(); - mainXRefEntriesOffset = mainXRefEntriesOffsetA; - - // read the trailer - str = strA; - start = str->getStart(); - prevXRefOffset = mainXRefOffset = pos; - - if (reconstruct && !(ok = constructXRef(wasReconstructed))) - { - errCode = errDamaged; - return; - } - else - { - // if there was a problem with the 'startxref' position, try to - // reconstruct the xref table - if (prevXRefOffset == 0) { - if (!(ok = constructXRef(wasReconstructed))) { - errCode = errDamaged; - return; - } - - // read the xref table - } else { - std::vector<Goffset> followedXRefStm; - readXRef(&prevXRefOffset, &followedXRefStm, nullptr); - - // if there was a problem with the xref table, - // try to reconstruct it - if (!ok) { - if (!(ok = constructXRef(wasReconstructed))) { - errCode = errDamaged; - return; - } - } - } - - // set size to (at least) the size specified in trailer dict - obj = trailerDict.dictLookupNF("Size"); - if (!obj.isInt()) { - error(errSyntaxWarning, -1, "No valid XRef size in trailer"); - } else { - if (obj.getInt() > size) { - if (resize(obj.getInt()) != obj.getInt()) { - if (!(ok = constructXRef(wasReconstructed))) { - errCode = errDamaged; - return; - } - } - } - } - - // get the root dictionary (catalog) object - obj = trailerDict.dictLookupNF("Root"); - if (obj.isRef()) { - rootNum = obj.getRefNum(); - rootGen = obj.getRefGen(); - } else { - if (!(ok = constructXRef(wasReconstructed))) { - errCode = errDamaged; - return; - } - } - } - // now set the trailer dictionary's xref pointer so we can fetch - // indirect objects from it - trailerDict.getDict()->setXRef(this); -} - -XRef::~XRef() { - for(int i=0; i<size; i++) { - entries[i].obj.free (); - } - gfree(entries); - - if (streamEnds) { - gfree(streamEnds); - } - if (objStrs) { - delete objStrs; - } - if (strOwner) { - delete str; - } -#ifdef MULTITHREADED - gDestroyMutex(&mutex); -#endif -} - -XRef *XRef::copy() const { - XRef *xref = new XRef(); - xref->str = str->copy(); - xref->strOwner = gTrue; - xref->encrypted = encrypted; - xref->permFlags = permFlags; - xref->ownerPasswordOk = ownerPasswordOk; - xref->rootGen = rootGen; - xref->rootNum = rootNum; - - xref->start = start; - xref->prevXRefOffset = prevXRefOffset; - xref->mainXRefEntriesOffset = mainXRefEntriesOffset; - xref->xRefStream = xRefStream; - xref->trailerDict = trailerDict.copy(); - xref->encAlgorithm = encAlgorithm; - xref->encRevision = encRevision; - xref->encVersion = encVersion; - xref->permFlags = permFlags; - xref->keyLength = keyLength; - xref->permFlags = permFlags; - for (int i = 0; i < 32; i++) { - xref->fileKey[i] = fileKey[i]; - } - - if (xref->reserve(size) == 0) { - error(errSyntaxError, -1, "unable to allocate {0:d} entries", size); - delete xref; - return nullptr; - } - xref->size = size; - for (int i = 0; i < size; ++i) { - xref->entries[i].offset = entries[i].offset; - xref->entries[i].type = entries[i].type; - xref->entries[i].obj.initNullAfterMalloc(); - xref->entries[i].flags = entries[i].flags; - xref->entries[i].gen = entries[i].gen; - } - xref->streamEndsLen = streamEndsLen; - if (streamEndsLen != 0) { - xref->streamEnds = (Goffset *)gmalloc(streamEndsLen * sizeof(Goffset)); - for (int i = 0; i < streamEndsLen; i++) { - xref->streamEnds[i] = streamEnds[i]; - } - } - return xref; -} - -int XRef::reserve(int newSize) -{ - if (newSize > capacity) { - - int realNewSize; - for (realNewSize = capacity ? 2 * capacity : 1024; - newSize > realNewSize && realNewSize > 0; - realNewSize <<= 1) ; - if ((realNewSize < 0) || - (realNewSize >= INT_MAX / (int)sizeof(XRefEntry))) { - return 0; - } - - void *p = greallocn_checkoverflow(entries, realNewSize, sizeof(XRefEntry)); - if (p == nullptr) { - return 0; - } - - entries = (XRefEntry *) p; - capacity = realNewSize; - - } - - return capacity; -} - -int XRef::resize(int newSize) -{ - if (newSize > size) { - - if (reserve(newSize) < newSize) return size; - - for (int i = size; i < newSize; ++i) { - entries[i].offset = -1; - entries[i].type = xrefEntryNone; - entries[i].obj.initNullAfterMalloc (); - entries[i].flags = 0; - entries[i].gen = 0; - } - } else { - for (int i = newSize; i < size; i++) { - entries[i].obj.free (); - } - } - - size = newSize; - - return size; -} - -/* Read one xref table section. Also reads the associated trailer - * dictionary, and returns the prev pointer (if any). - * Arguments: - * pos Points to a Goffset containing the offset of the XRef - * section to be read. If a prev pointer is found, *pos is - * updated with its value - * followedXRefStm Used in case of nested readXRef calls to spot circular - * references in XRefStm pointers - * xrefStreamObjsNum If not NULL, every time a XRef stream is encountered, - * its object number is appended - * Return value: - * gTrue if a prev pointer is found, otherwise gFalse - */ -GBool XRef::readXRef(Goffset *pos, std::vector<Goffset> *followedXRefStm, std::vector<int> *xrefStreamObjsNum) { - Parser *parser; - Object obj; - GBool more; - - if (unlikely(start > (LLONG_MAX - *pos))) { - ok = gFalse; - return gFalse; - } - - // start up a parser, parse one token - parser = new Parser(nullptr, - new Lexer(nullptr, - str->makeSubStream(start + *pos, gFalse, 0, Object(objNull))), - gTrue); - obj = parser->getObj(gTrue); - - // parse an old-style xref table - if (obj.isCmd("xref")) { - more = readXRefTable(parser, pos, followedXRefStm, xrefStreamObjsNum); - - // parse an xref stream - } else if (obj.isInt()) { - const int objNum = obj.getInt(); - if (obj = parser->getObj(gTrue), !obj.isInt()) { - goto err1; - } - if (obj = parser->getObj(gTrue), !obj.isCmd("obj")) { - goto err1; - } - if (obj = parser->getObj(), !obj.isStream()) { - goto err1; - } - if (trailerDict.isNone()) { - xRefStream = gTrue; - } - if (xrefStreamObjsNum) { - xrefStreamObjsNum->push_back(objNum); - } - more = readXRefStream(obj.getStream(), pos); - - } else { - goto err1; - } - - delete parser; - return more; - - err1: - delete parser; - ok = gFalse; - return gFalse; -} - -GBool XRef::readXRefTable(Parser *parser, Goffset *pos, std::vector<Goffset> *followedXRefStm, std::vector<int> *xrefStreamObjsNum) { - XRefEntry entry; - GBool more; - Object obj, obj2; - Goffset pos2; - int first, n; - - while (1) { - obj = parser->getObj(gTrue); - if (obj.isCmd("trailer")) { - break; - } - if (!obj.isInt()) { - goto err0; - } - first = obj.getInt(); - obj = parser->getObj(gTrue); - if (!obj.isInt()) { - goto err0; - } - n = obj.getInt(); - if (first < 0 || n < 0 || first > INT_MAX - n) { - goto err0; - } - if (first + n > size) { - if (resize(first + n) != first + n) { - error(errSyntaxError, -1, "Invalid 'obj' parameters'"); - goto err0; - } - } - for (int i = first; i < first + n; ++i) { - obj = parser->getObj(gTrue); - if (obj.isInt()) { - entry.offset = obj.getInt(); - } else if (obj.isInt64()) { - entry.offset = obj.getInt64(); - } else { - goto err0; - } - obj = parser->getObj(gTrue); - if (!obj.isInt()) { - goto err0; - } - entry.gen = obj.getInt(); - entry.flags = 0; - obj = parser->getObj(gTrue); - if (obj.isCmd("n")) { - entry.type = xrefEntryUncompressed; - } else if (obj.isCmd("f")) { - entry.type = xrefEntryFree; - } else { - goto err0; - } - if (entries[i].offset == -1) { - entries[i].offset = entry.offset; - entries[i].gen = entry.gen; - entries[i].type = entry.type; - entries[i].flags = entry.flags; - entries[i].obj.setToNull(); - - // PDF files of patents from the IBM Intellectual Property - // Network have a bug: the xref table claims to start at 1 - // instead of 0. - if (i == 1 && first == 1 && - entries[1].offset == 0 && entries[1].gen == 65535 && - entries[1].type == xrefEntryFree) { - i = first = 0; - entries[0].offset = 0; - entries[0].gen = 65535; - entries[0].type = xrefEntryFree; - entries[0].flags = entries[1].flags; - entries[0].obj = std::move(entries[1].obj); - - entries[1].offset = -1; - entries[1].obj.setToNull(); - } - } - } - } - - // read the trailer dictionary - obj = parser->getObj(); - if (!obj.isDict()) { - goto err0; - } - - // get the 'Prev' pointer - obj2 = obj.getDict()->lookupNF("Prev"); - if (obj2.isInt() || obj2.isInt64()) { - if (obj2.isInt()) - pos2 = obj2.getInt(); - else - pos2 = obj2.getInt64(); - if (pos2 != *pos) { - *pos = pos2; - more = gTrue; - } else { - error(errSyntaxWarning, -1, "Infinite loop in xref table"); - more = gFalse; - } - } else if (obj2.isRef()) { - // certain buggy PDF generators generate "/Prev NNN 0 R" instead - // of "/Prev NNN" - pos2 = (Guint)obj2.getRefNum(); - if (pos2 != *pos) { - *pos = pos2; - more = gTrue; - } else { - error(errSyntaxWarning, -1, "Infinite loop in xref table"); - more = gFalse; - } - } else { - more = gFalse; - } - - // save the first trailer dictionary - if (trailerDict.isNone()) { - trailerDict = obj.copy(); - } - - // check for an 'XRefStm' key - obj2 = obj.getDict()->lookup("XRefStm"); - if (obj2.isInt() || obj2.isInt64()) { - if (obj2.isInt()) - pos2 = obj2.getInt(); - else - pos2 = obj2.getInt64(); - for (size_t i = 0; ok == gTrue && i < followedXRefStm->size(); ++i) { - if (followedXRefStm->at(i) == pos2) { - ok = gFalse; - } - } - if (ok) { - followedXRefStm->push_back(pos2); - readXRef(&pos2, followedXRefStm, xrefStreamObjsNum); - } - if (!ok) { - goto err0; - } - } - - return more; - - err0: - ok = gFalse; - return gFalse; -} - -GBool XRef::readXRefStream(Stream *xrefStr, Goffset *pos) { - int w[3]; - GBool more; - Object obj; - - ok = gFalse; - - Dict *dict = xrefStr->getDict(); - obj = dict->lookupNF("Size"); - if (!obj.isInt()) { - return gFalse; - } - int newSize = obj.getInt(); - if (newSize < 0) { - return gFalse; - } - if (newSize > size) { - if (resize(newSize) != newSize) { - error(errSyntaxError, -1, "Invalid 'size' parameter"); - return gFalse; - } - } - - obj = dict->lookupNF("W"); - if (!obj.isArray() || obj.arrayGetLength() < 3) { - return gFalse; - } - for (int i = 0; i < 3; ++i) { - Object obj2 = obj.arrayGet(i); - if (!obj2.isInt()) { - return gFalse; - } - w[i] = obj2.getInt(); - if (w[i] < 0) { - return gFalse; - } - } - if (w[0] > (int)sizeof(int) || w[1] > (int)sizeof(long long) || w[2] > (int)sizeof(long long)) { - return gFalse; - } - - xrefStr->reset(); - Object idx = dict->lookupNF("Index"); - if (idx.isArray()) { - for (int i = 0; i+1 < idx.arrayGetLength(); i += 2) { - obj = idx.arrayGet(i); - if (!obj.isInt()) { - return gFalse; - } - int first = obj.getInt(); - obj = idx.arrayGet(i+1); - if (!obj.isInt()) { - return gFalse; - } - int n = obj.getInt(); - if (first < 0 || n < 0 || - !readXRefStreamSection(xrefStr, w, first, n)) { - return gFalse; - } - } - } else { - if (!readXRefStreamSection(xrefStr, w, 0, newSize)) { - return gFalse; - } - } - - obj = dict->lookupNF("Prev"); - if (obj.isInt()) { - *pos = obj.getInt(); - more = gTrue; - } else if (obj.isInt64()) { - *pos = obj.getInt64(); - more = gTrue; - } else { - more = gFalse; - } - if (trailerDict.isNone()) { - trailerDict = xrefStr->getDictObject()->copy(); - } - - ok = gTrue; - return more; -} - -GBool XRef::readXRefStreamSection(Stream *xrefStr, int *w, int first, int n) { - unsigned long long offset, gen; - int type, c, i, j; - - if (first > INT_MAX - n) { - return gFalse; - } - if (first + n < 0) { - return gFalse; - } - if (first + n > size) { - if (resize(first + n) != size) { - error(errSyntaxError, -1, "Invalid 'size' inside xref table"); - return gFalse; - } - if (first + n > size) { - error(errSyntaxError, -1, "Invalid 'first' or 'n' inside xref table"); - return gFalse; - } - } - for (i = first; i < first + n; ++i) { - if (w[0] == 0) { - type = 1; - } else { - for (type = 0, j = 0; j < w[0]; ++j) { - if ((c = xrefStr->getChar()) == EOF) { - return gFalse; - } - type = (type << 8) + c; - } - } - for (offset = 0, j = 0; j < w[1]; ++j) { - if ((c = xrefStr->getChar()) == EOF) { - return gFalse; - } - offset = (offset << 8) + c; - } - if (offset > (unsigned long long)GoffsetMax()) { - error(errSyntaxError, -1, "Offset inside xref table too large for fseek"); - return gFalse; - } - for (gen = 0, j = 0; j < w[2]; ++j) { - if ((c = xrefStr->getChar()) == EOF) { - return gFalse; - } - gen = (gen << 8) + c; - } - if (gen > INT_MAX) { - error(errSyntaxError, -1, "Gen inside xref table too large (bigger than INT_MAX)"); - return gFalse; - } - if (entries[i].offset == -1) { - switch (type) { - case 0: - entries[i].offset = offset; - entries[i].gen = gen; - entries[i].type = xrefEntryFree; - break; - case 1: - entries[i].offset = offset; - entries[i].gen = gen; - entries[i].type = xrefEntryUncompressed; - break; - case 2: - entries[i].offset = offset; - entries[i].gen = gen; - entries[i].type = xrefEntryCompressed; - break; - default: - return gFalse; - } - } - } - - return gTrue; -} - -// Attempt to construct an xref table for a damaged file. -GBool XRef::constructXRef(GBool *wasReconstructed, GBool needCatalogDict) { - Parser *parser; - Object obj; - char buf[256]; - Goffset pos; - int num, gen; - int streamEndsSize; - char *p; - GBool gotRoot; - char* token = nullptr; - bool oneCycle = true; - int offset = 0; - - resize(0); // free entries properly - gfree(entries); - capacity = 0; - size = 0; - entries = nullptr; - - gotRoot = gFalse; - streamEndsLen = streamEndsSize = 0; - - if (wasReconstructed) - { - *wasReconstructed = true; - } - - str->reset(); - while (1) { - pos = str->getPos(); - if (!str->getLine(buf, 256)) { - break; - } - p = buf; - - // skip whitespace - while (*p && Lexer::isSpace(*p & 0xff)) ++p; - - oneCycle = true; - offset = 0; - - while( ( token = strstr( p, "endobj" ) ) || oneCycle ) { - oneCycle = false; - - if( token ) { - oneCycle = true; - token[0] = '\0'; - offset = token - p; - } - - // got trailer dictionary - if (!strncmp(p, "trailer", 7)) { - parser = new Parser(nullptr, - new Lexer(nullptr, - str->makeSubStream(pos + 7, gFalse, 0, Object(objNull))), - gFalse); - Object newTrailerDict = parser->getObj(); - if (newTrailerDict.isDict()) { - obj = newTrailerDict.dictLookupNF("Root"); - if (obj.isRef() && (!gotRoot || !needCatalogDict) && rootNum != obj.getRefNum()) { - rootNum = obj.getRefNum(); - rootGen = obj.getRefGen(); - trailerDict = newTrailerDict.copy(); - gotRoot = gTrue; - } - } - delete parser; - - // look for object - } else if (isdigit(*p & 0xff)) { - num = atoi(p); - if (num > 0) { - do { - ++p; - } while (*p && isdigit(*p & 0xff)); - if ((*p & 0xff) == 0 || isspace(*p & 0xff)) { - if ((*p & 0xff) == 0) { - //new line, continue with next line! - str->getLine(buf, 256); - p = buf; - } else { - ++p; - } - while (*p && isspace(*p & 0xff)) ++p; - if (isdigit(*p & 0xff)) { - gen = atoi(p); - do { - ++p; - } while (*p && isdigit(*p & 0xff)); - if ((*p & 0xff) == 0 || isspace(*p & 0xff)) { - if ((*p & 0xff) == 0) { - //new line, continue with next line! - str->getLine(buf, 256); - p = buf; - } else { - ++p; - } - while (*p && isspace(*p & 0xff)) ++p; - if (!strncmp(p, "obj", 3)) { - if (num >= size) { - if (unlikely(num >= INT_MAX - 1 - 255)) { - error(errSyntaxError, -1, "Bad object number"); - return gFalse; - } - const int newSize = (num + 1 + 255) & ~255; - if (newSize < 0) { - error(errSyntaxError, -1, "Bad object number"); - return gFalse; - } - if (resize(newSize) != newSize) { - error(errSyntaxError, -1, "Invalid 'obj' parameters"); - return gFalse; - } - } - if (entries[num].type == xrefEntryFree || - gen >= entries[num].gen) { - entries[num].offset = pos - start; - entries[num].gen = gen; - entries[num].type = xrefEntryUncompressed; - } - } - } - } - } - } - - } else { - char *endstream = strstr( p, "endstream" ); - if (endstream) { - int endstreamPos = endstream - p; - if ((endstreamPos == 0 || Lexer::isSpace(p[endstreamPos-1] & 0xff)) // endstream is either at beginning or preceeded by space - && (endstreamPos + 9 >= 256 || Lexer::isSpace(p[endstreamPos+9] & 0xff))) // endstream is either at end or followed by space - { - if (streamEndsLen == streamEndsSize) { - streamEndsSize += 64; - if (streamEndsSize >= INT_MAX / (int)sizeof(int)) { - error(errSyntaxError, -1, "Invalid 'endstream' parameter."); - return gFalse; - } - streamEnds = (Goffset *)greallocn(streamEnds, - streamEndsSize, sizeof(Goffset)); - } - streamEnds[streamEndsLen++] = pos + endstreamPos; - } - } - } - if( token ) { - p = token + 6;// strlen( "endobj" ) = 6 - pos += offset + 6;// strlen( "endobj" ) = 6 - while (*p && Lexer::isSpace(*p & 0xff)) { - ++p; - ++pos; - } - } - } - } - - if (gotRoot) - return gTrue; - - error(errSyntaxError, -1, "Couldn't find trailer dictionary"); - return gFalse; -} - -void XRef::setEncryption(int permFlagsA, GBool ownerPasswordOkA, - const Guchar *fileKeyA, int keyLengthA, - int encVersionA, int encRevisionA, - CryptAlgorithm encAlgorithmA) { - int i; - - encrypted = gTrue; - permFlags = permFlagsA; - ownerPasswordOk = ownerPasswordOkA; - if (keyLengthA <= 32) { - keyLength = keyLengthA; - } else { - keyLength = 32; - } - for (i = 0; i < keyLength; ++i) { - fileKey[i] = fileKeyA[i]; - } - encVersion = encVersionA; - encRevision = encRevisionA; - encAlgorithm = encAlgorithmA; -} - -void XRef::getEncryptionParameters(Guchar **fileKeyA, CryptAlgorithm *encAlgorithmA, - int *keyLengthA) { - if (encrypted) { - *fileKeyA = fileKey; - *encAlgorithmA = encAlgorithm; - *keyLengthA = keyLength; - } else { - // null encryption parameters - *fileKeyA = nullptr; - *encAlgorithmA = cryptRC4; - *keyLengthA = 0; - } -} - -GBool XRef::okToPrint(GBool ignoreOwnerPW) const { - return (!ignoreOwnerPW && ownerPasswordOk) || (permFlags & permPrint); -} - -// we can print at high res if we are only doing security handler revision -// 2 (and we are allowed to print at all), or with security handler rev -// 3 and we are allowed to print, and bit 12 is set. -GBool XRef::okToPrintHighRes(GBool ignoreOwnerPW) const { - if (encrypted) { - if (2 == encRevision) { - return (okToPrint(ignoreOwnerPW)); - } else if (encRevision >= 3) { - return (okToPrint(ignoreOwnerPW) && (permFlags & permHighResPrint)); - } else { - // something weird - unknown security handler version - return gFalse; - } - } else { - return gTrue; - } -} - -GBool XRef::okToChange(GBool ignoreOwnerPW) const { - return (!ignoreOwnerPW && ownerPasswordOk) || (permFlags & permChange); -} - -GBool XRef::okToCopy(GBool ignoreOwnerPW) const { - return (!ignoreOwnerPW && ownerPasswordOk) || (permFlags & permCopy); -} - -GBool XRef::okToAddNotes(GBool ignoreOwnerPW) const { - return (!ignoreOwnerPW && ownerPasswordOk) || (permFlags & permNotes); -} - -GBool XRef::okToFillForm(GBool ignoreOwnerPW) const { - return (!ignoreOwnerPW && ownerPasswordOk) || (permFlags & permFillForm); -} - -GBool XRef::okToAccessibility(GBool ignoreOwnerPW) const { - return (!ignoreOwnerPW && ownerPasswordOk) || (permFlags & permAccessibility); -} - -GBool XRef::okToAssemble(GBool ignoreOwnerPW) const { - return (!ignoreOwnerPW && ownerPasswordOk) || (permFlags & permAssemble); -} - -Object XRef::getCatalog() { - Object catalog = fetch(rootNum, rootGen); - if (catalog.isDict()) { - return catalog; - } - GBool wasReconstructed = false; - if (constructXRef(&wasReconstructed, gTrue)) { - catalog = fetch(rootNum, rootGen); - } - return catalog; -} - -Object XRef::fetch(int num, int gen, int recursion) { - XRefEntry *e; - Parser *parser; - Object obj1, obj2, obj3; - - xrefLocker(); - // check for bogus ref - this can happen in corrupted PDF files - if (num < 0 || num >= size) { - goto err; - } - - e = getEntry(num); - if(!e->obj.isNull ()) { //check for updated object - return e->obj.copy(); - } - - switch (e->type) { - - case xrefEntryUncompressed: - { - if (e->gen != gen || e->offset < 0) { - goto err; - } - parser = new Parser(this, - new Lexer(this, - str->makeSubStream(start + e->offset, gFalse, 0, Object(objNull))), - gTrue); - obj1 = parser->getObj(recursion); - obj2 = parser->getObj(recursion); - obj3 = parser->getObj(recursion); - if (!obj1.isInt() || obj1.getInt() != num || - !obj2.isInt() || obj2.getInt() != gen || - !obj3.isCmd("obj")) { - // some buggy pdf have obj1234 for ints that represent 1234 - // try to recover here - if (obj1.isInt() && obj1.getInt() == num && - obj2.isInt() && obj2.getInt() == gen && - obj3.isCmd()) { - char *cmd = obj3.getCmd(); - if (strlen(cmd) > 3 && - cmd[0] == 'o' && - cmd[1] == 'b' && - cmd[2] == 'j') { - char *end_ptr; - long longNumber = strtol(cmd + 3, &end_ptr, 0); - if (longNumber <= INT_MAX && longNumber >= INT_MIN && *end_ptr == '\0') { - int number = longNumber; - error(errSyntaxWarning, -1, "Cmd was not obj but {0:s}, assuming the creator meant obj {1:d}", cmd, number); - delete parser; - return Object(number); - } - } - } - delete parser; - goto err; - } - Object obj = parser->getObj(gFalse, (encrypted && !e->getFlag(XRefEntry::Unencrypted)) ? fileKey : nullptr, - encAlgorithm, keyLength, num, gen, recursion); - delete parser; - return obj; - } - - case xrefEntryCompressed: - { -#if 0 // Adobe apparently ignores the generation number on compressed objects - if (gen != 0) { - goto err; - } -#endif - if (e->offset >= (Guint)size || - entries[e->offset].type != xrefEntryUncompressed) { - error(errSyntaxError, -1, "Invalid object stream"); - goto err; - } - - ObjectStream *objStr = nullptr; - ObjectStreamKey key(e->offset); - PopplerCacheItem *item = objStrs->lookup(key); - if (item) { - ObjectStreamItem *it = static_cast<ObjectStreamItem *>(item); - objStr = it->objStream; - } - - if (!objStr) { - objStr = new ObjectStream(this, e->offset, recursion + 1); - if (!objStr->isOk()) { - delete objStr; - objStr = nullptr; - goto err; - } else { - // XRef could be reconstructed in constructor of ObjectStream: - e = getEntry(num); - ObjectStreamKey *newkey = new ObjectStreamKey(e->offset); - ObjectStreamItem *newitem = new ObjectStreamItem(objStr); - objStrs->put(newkey, newitem); - } - } - return objStr->getObject(e->gen, num); - } - - default: - goto err; - } - - err: - if (!xRefStream && !xrefReconstructed) { - error(errInternal, -1, "xref num {0:d} not found but needed, try to reconstruct\n", num); - rootNum = -1; - constructXRef(&xrefReconstructed); - return fetch(num, gen, ++recursion); - } - return Object(objNull); -} - -void XRef::lock() { -#ifdef MULTITHREADED - gLockMutex(&mutex); -#endif -} - -void XRef::unlock() { -#ifdef MULTITHREADED - gUnlockMutex(&mutex); -#endif -} - -Object XRef::getDocInfo() { - return trailerDict.dictLookup("Info"); -} - -// Added for the pdftex project. -Object XRef::getDocInfoNF() { - return trailerDict.dictLookupNF("Info"); -} - -Object XRef::createDocInfoIfNoneExists() { - Object obj = getDocInfo(); - - if (obj.isDict()) { - return obj; - } else if (!obj.isNull()) { - // DocInfo exists, but isn't a dictionary (doesn't comply with the PDF reference) - removeDocInfo(); - } - - obj = Object(new Dict(this)); - const Ref ref = addIndirectObject(&obj); - trailerDict.dictSet("Info", Object(ref.num, ref.gen)); - - return obj; -} - -void XRef::removeDocInfo() { - Object infoObjRef = getDocInfoNF(); - if (infoObjRef.isNull()) { - return; - } - - trailerDict.dictRemove("Info"); - - removeIndirectObject(infoObjRef.getRef()); -} - -GBool XRef::getStreamEnd(Goffset streamStart, Goffset *streamEnd) { - int a, b, m; - - if (streamEndsLen == 0 || - streamStart > streamEnds[streamEndsLen - 1]) { - return gFalse; - } - - a = -1; - b = streamEndsLen - 1; - // invariant: streamEnds[a] < streamStart <= streamEnds[b] - while (b - a > 1) { - m = (a + b) / 2; - if (streamStart <= streamEnds[m]) { - b = m; - } else { - a = m; - } - } - *streamEnd = streamEnds[b]; - return gTrue; -} - -int XRef::getNumEntry(Goffset offset) -{ - if (size > 0) - { - int res = 0; - Goffset resOffset = getEntry(0)->offset; - XRefEntry *e; - for (int i = 1; i < size; ++i) - { - e = getEntry(i, gFalse); - if (e->type != xrefEntryFree && e->offset < offset && e->offset >= resOffset) - { - res = i; - resOffset = e->offset; - } - } - return res; - } - else return -1; -} - -void XRef::add(int num, int gen, Goffset offs, GBool used) { - xrefLocker(); - if (num >= size) { - if (num >= capacity) { - entries = (XRefEntry *)greallocn(entries, num + 1, sizeof(XRefEntry)); - capacity = num + 1; - } - for (int i = size; i < num + 1; ++i) { - entries[i].offset = -1; - entries[i].type = xrefEntryFree; - entries[i].obj.initNullAfterMalloc(); - entries[i].flags = 0; - entries[i].gen = 0; - } - size = num + 1; - } - XRefEntry *e = getEntry(num); - e->gen = gen; - e->obj.setToNull(); - e->flags = 0; - if (used) { - e->type = xrefEntryUncompressed; - e->offset = offs; - } else { - e->type = xrefEntryFree; - e->offset = 0; - } -} - -void XRef::setModifiedObject (const Object* o, Ref r) { - xrefLocker(); - if (r.num < 0 || r.num >= size) { - error(errInternal, -1,"XRef::setModifiedObject on unknown ref: {0:d}, {1:d}\n", r.num, r.gen); - return; - } - XRefEntry *e = getEntry(r.num); - e->obj = o->copy(); - e->setFlag(XRefEntry::Updated, gTrue); - setModified(); -} - -Ref XRef::addIndirectObject (const Object *o) { - int entryIndexToUse = -1; - for (int i = 1; entryIndexToUse == -1 && i < size; ++i) { - XRefEntry *e = getEntry(i, false /* complainIfMissing */); - if (e->type == xrefEntryFree && e->gen != 65535) { - entryIndexToUse = i; - } - } - - XRefEntry *e; - if (entryIndexToUse == -1) { - entryIndexToUse = size; - add(entryIndexToUse, 0, 0, gFalse); - e = getEntry(entryIndexToUse); - } else { - //reuse a free entry - e = getEntry(entryIndexToUse); - //we don't touch gen number, because it should have been - //incremented when the object was deleted - } - e->type = xrefEntryUncompressed; - e->obj = o->copy(); - e->setFlag(XRefEntry::Updated, gTrue); - setModified(); - - Ref r; - r.num = entryIndexToUse; - r.gen = e->gen; - return r; -} - -void XRef::removeIndirectObject(Ref r) { - xrefLocker(); - if (r.num < 0 || r.num >= size) { - error(errInternal, -1,"XRef::removeIndirectObject on unknown ref: {0:d}, {1:d}\n", r.num, r.gen); - return; - } - XRefEntry *e = getEntry(r.num); - if (e->type == xrefEntryFree) { - return; - } - e->obj.free(); - e->type = xrefEntryFree; - e->gen++; - e->setFlag(XRefEntry::Updated, gTrue); - setModified(); -} - -void XRef::writeXRef(XRef::XRefWriter *writer, GBool writeAllEntries) { - //create free entries linked-list - if (getEntry(0)->gen != 65535) { - error(errInternal, -1, "XRef::writeXRef, entry 0 of the XRef is invalid (gen != 65535)\n"); - } - int lastFreeEntry = 0; - for (int i=0; i<size; i++) { - if (getEntry(i)->type == xrefEntryFree) { - getEntry(lastFreeEntry)->offset = i; - lastFreeEntry = i; - } - } - getEntry(lastFreeEntry)->offset = 0; - - if (writeAllEntries) { - writer->startSection(0, size); - for (int i=0; i<size; i++) { - XRefEntry *e = getEntry(i); - if(e->gen > 65535) e->gen = 65535; //cap generation number to 65535 (required by PDFReference) - writer->writeEntry(e->offset, e->gen, e->type); - } - } else { - int i = 0; - while (i < size) { - int j; - for(j=i; j<size; j++) { //look for consecutive entries - if ((getEntry(j)->type == xrefEntryFree) && (getEntry(j)->gen == 0)) - break; - } - if (j-i != 0) - { - writer->startSection(i, j-i); - for (int k=i; k<j; k++) { - XRefEntry *e = getEntry(k); - if(e->gen > 65535) e->gen = 65535; //cap generation number to 65535 (required by PDFReference) - writer->writeEntry(e->offset, e->gen, e->type); - } - i = j; - } - else ++i; - } - } -} - -XRef::XRefTableWriter::XRefTableWriter(OutStream* outStrA) { - outStr = outStrA; -} - -void XRef::XRefTableWriter::startSection(int first, int count) { - outStr->printf("%i %i\r\n", first, count); -} - -void XRef::XRefTableWriter::writeEntry(Goffset offset, int gen, XRefEntryType type) { - outStr->printf("%010lli %05i %c\r\n", (long long)offset, gen, (type==xrefEntryFree)?'f':'n'); -} - -void XRef::writeTableToFile(OutStream* outStr, GBool writeAllEntries) { - XRefTableWriter writer(outStr); - outStr->printf("xref\r\n"); - writeXRef(&writer, writeAllEntries); -} - -XRef::XRefStreamWriter::XRefStreamWriter(Array *indexA, GooString *stmBufA, int offsetSizeA) { - index = indexA; - stmBuf = stmBufA; - offsetSize = offsetSizeA; -} - -void XRef::XRefStreamWriter::startSection(int first, int count) { - index->add( Object(first) ); - index->add( Object(count) ); -} - -void XRef::XRefStreamWriter::writeEntry(Goffset offset, int gen, XRefEntryType type) { - const int entryTotalSize = 1 + offsetSize + 2; /* type + offset + gen */ - char data[16]; - data[0] = (type==xrefEntryFree) ? 0 : 1; - for (int i = offsetSize; i > 0; i--) { - data[i] = offset & 0xff; - offset >>= 8; - } - data[offsetSize + 1] = (gen >> 8) & 0xff; - data[offsetSize + 2] = gen & 0xff; - stmBuf->append(data, entryTotalSize); -} - -XRef::XRefPreScanWriter::XRefPreScanWriter() { - hasOffsetsBeyond4GB = gFalse; -} - -void XRef::XRefPreScanWriter::startSection(int first, int count) { -} - -void XRef::XRefPreScanWriter::writeEntry(Goffset offset, int gen, XRefEntryType type) { - if (offset >= 0x100000000ll) - hasOffsetsBeyond4GB = gTrue; -} - -void XRef::writeStreamToBuffer(GooString *stmBuf, Dict *xrefDict, XRef *xref) { - Array *index = new Array(xref); - stmBuf->clear(); - - // First pass: determine whether all offsets fit in 4 bytes or not - XRefPreScanWriter prescan; - writeXRef(&prescan, gFalse); - const int offsetSize = prescan.hasOffsetsBeyond4GB ? sizeof(Goffset) : 4; - - // Second pass: actually write the xref stream - XRefStreamWriter writer(index, stmBuf, offsetSize); - writeXRef(&writer, gFalse); - - xrefDict->set("Type", Object(objName, "XRef")); - xrefDict->set("Index", Object(index)); - Array *wArray = new Array(xref); - wArray->add( Object(1) ); - wArray->add( Object(offsetSize) ); - wArray->add( Object(2) ); - xrefDict->set("W", Object(wArray)); -} - -GBool XRef::parseEntry(Goffset offset, XRefEntry *entry) -{ - GBool r; - - if (unlikely(entry == nullptr)) - return gFalse; - - Parser parser(nullptr, new Lexer(nullptr, - str->makeSubStream(offset, gFalse, 20, Object(objNull))), gTrue); - - Object obj1, obj2, obj3; - if (((obj1 = parser.getObj(), obj1.isInt()) || obj1.isInt64()) && - (obj2 = parser.getObj(), obj2.isInt()) && - (obj3 = parser.getObj(), obj3.isCmd("n") || obj3.isCmd("f"))) { - if (obj1.isInt64()) - entry->offset = obj1.getInt64(); - else - entry->offset = obj1.getInt(); - entry->gen = obj2.getInt(); - entry->type = obj3.isCmd("n") ? xrefEntryUncompressed : xrefEntryFree; - entry->obj.setToNull(); - entry->flags = 0; - r = gTrue; - } else { - r = gFalse; - } - - return r; -} - -/* Traverse all XRef tables and, if untilEntryNum != -1, stop as soon as - * untilEntryNum is found, or try to reconstruct the xref table if it's not - * present in any xref. - * If xrefStreamObjsNum is not NULL, it is filled with the list of the object - * numbers of the XRef streams that have been traversed */ -void XRef::readXRefUntil(int untilEntryNum, std::vector<int> *xrefStreamObjsNum) -{ - std::vector<Goffset> followedPrev; - while (prevXRefOffset && (untilEntryNum == -1 || (untilEntryNum < size && entries[untilEntryNum].type == xrefEntryNone))) { - bool followed = false; - for (size_t j = 0; j < followedPrev.size(); j++) { - if (followedPrev.at(j) == prevXRefOffset) { - followed = true; - break; - } - } - if (followed) { - error(errSyntaxError, -1, "Circular XRef"); - if (!(ok = constructXRef(nullptr))) { - errCode = errDamaged; - } - break; - } - - followedPrev.push_back (prevXRefOffset); - - std::vector<Goffset> followedXRefStm; - if (!readXRef(&prevXRefOffset, &followedXRefStm, xrefStreamObjsNum)) { - prevXRefOffset = 0; - } - - // if there was a problem with the xref table, or we haven't found the entry - // we were looking for, try to reconstruct the xref - if (!ok || (!prevXRefOffset && untilEntryNum != -1 && entries[untilEntryNum].type == xrefEntryNone)) { - GBool wasReconstructed = false; - if (!(ok = constructXRef(&wasReconstructed))) { - errCode = errDamaged; - break; - } - break; - } - } -} - -XRefEntry *XRef::getEntry(int i, GBool complainIfMissing) -{ - if (i >= size || entries[i].type == xrefEntryNone) { - - if ((!xRefStream) && mainXRefEntriesOffset) { - if (!parseEntry(mainXRefEntriesOffset + 20*i, &entries[i])) { - error(errSyntaxError, -1, "Failed to parse XRef entry [{0:d}].", i); - } - } else { - // Read XRef tables until the entry we're looking for is found - readXRefUntil(i); - - // We might have reconstructed the xref - // Check again i is in bounds - if (unlikely(i >= size)) { - static XRefEntry dummy; - dummy.offset = 0; - dummy.gen = -1; - dummy.type = xrefEntryNone; - dummy.flags = 0; - return &dummy; - } - - if (entries[i].type == xrefEntryNone) { - if (complainIfMissing) { - error(errSyntaxError, -1, "Invalid XRef entry"); - } - entries[i].type = xrefEntryFree; - } - } - } - - return &entries[i]; -} - -// Recursively sets the Unencrypted flag in all referenced xref entries -void XRef::markUnencrypted(Object *obj) { - Object obj1; - - switch (obj->getType()) { - case objArray: - { - Array *array = obj->getArray(); - for (int i = 0; i < array->getLength(); i++) { - obj1 = array->getNF(i); - markUnencrypted(&obj1); - } - break; - } - case objStream: - case objDict: - { - Dict *dict; - if (obj->getType() == objStream) { - Stream *stream = obj->getStream(); - dict = stream->getDict(); - } else { - dict = obj->getDict(); - } - for (int i = 0; i < dict->getLength(); i++) { - obj1 = dict->getValNF(i); - markUnencrypted(&obj1); - } - break; - } - case objRef: - { - Ref ref = obj->getRef(); - XRefEntry *e = getEntry(ref.num); - if (e->getFlag(XRefEntry::Unencrypted)) - return; // We've already been here: prevent infinite recursion - e->setFlag(XRefEntry::Unencrypted, gTrue); - obj1 = fetch(ref.num, ref.gen); - markUnencrypted(&obj1); - break; - } - default: - break; - } -} - -void XRef::scanSpecialFlags() { - if (scannedSpecialFlags) { - return; - } - scannedSpecialFlags = gTrue; - - // "Rewind" the XRef linked list, so that readXRefUntil re-reads all XRef - // tables/streams, even those that had already been parsed - prevXRefOffset = mainXRefOffset; - - std::vector<int> xrefStreamObjNums; - if (!streamEndsLen) { // don't do it for already reconstructed xref - readXRefUntil(-1 /* read all xref sections */, &xrefStreamObjNums); - } - - // Mark object streams as DontRewrite, because we write each object - // individually in full rewrite mode. - for (int i = 0; i < size; ++i) { - if (entries[i].type == xrefEntryCompressed) { - const int objStmNum = entries[i].offset; - if (unlikely(objStmNum < 0 || objStmNum >= size)) { - error(errSyntaxError, -1, "Compressed object offset out of xref bounds"); - } else { - getEntry(objStmNum)->setFlag(XRefEntry::DontRewrite, gTrue); - } - } - } - - // Mark XRef streams objects as Unencrypted and DontRewrite - for (size_t i = 0; i < xrefStreamObjNums.size(); ++i) { - const int objNum = xrefStreamObjNums.at(i); - getEntry(objNum)->setFlag(XRefEntry::Unencrypted, gTrue); - getEntry(objNum)->setFlag(XRefEntry::DontRewrite, gTrue); - } - - // Mark objects referred from the Encrypt dict as Unencrypted - markUnencrypted(); -} - -void XRef::markUnencrypted() { - // Mark objects referred from the Encrypt dict as Unencrypted - Object obj = trailerDict.dictLookupNF("Encrypt"); - if (obj.isRef()) { - XRefEntry *e = getEntry(obj.getRefNum()); - e->setFlag(XRefEntry::Unencrypted, gTrue); - } -} - diff --git a/Build/source/libs/poppler/poppler-src/poppler/XRef.h b/Build/source/libs/poppler/poppler-src/poppler/XRef.h deleted file mode 100644 index bf904d507c0..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/XRef.h +++ /dev/null @@ -1,303 +0,0 @@ -//======================================================================== -// -// XRef.h -// -// Copyright 1996-2003 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2005 Brad Hards <bradh@frogmouth.net> -// Copyright (C) 2006, 2008, 2010-2013, 2017, 2018 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2007-2008 Julien Rebetez <julienr@svn.gnome.org> -// Copyright (C) 2007 Carlos Garcia Campos <carlosgc@gnome.org> -// Copyright (C) 2010 Ilya Gorenbein <igorenbein@finjan.com> -// Copyright (C) 2010 Hib Eris <hib@hiberis.nl> -// Copyright (C) 2012, 2013, 2016 Thomas Freitag <Thomas.Freitag@kabelmail.de> -// Copyright (C) 2012, 2013 Fabio D'Urso <fabiodurso@hotmail.it> -// Copyright (C) 2013, 2017 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2016 Jakub Alba <jakubalba@gmail.com> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef XREF_H -#define XREF_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "poppler-config.h" -#include "goo/gtypes.h" -#include "goo/GooMutex.h" -#include "Object.h" -#include "Stream.h" - -#include <vector> - -class Dict; -class Stream; -class Parser; -class PopplerCache; - -//------------------------------------------------------------------------ -// XRef -//------------------------------------------------------------------------ - -enum XRefEntryType { - xrefEntryFree, - xrefEntryUncompressed, - xrefEntryCompressed, - xrefEntryNone -}; - -struct XRefEntry { - Goffset offset; - int gen; - XRefEntryType type; - int flags; - Object obj; //if this entry was updated, obj will contains the updated object - - enum Flag { - // Regular flags - Updated, // Entry was modified - - // Special flags -- available only after xref->scanSpecialFlags() is run - Unencrypted, // Entry is stored in unencrypted form (meaningless in unencrypted documents) - DontRewrite // Entry must not be written back in case of full rewrite - }; - - inline GBool getFlag(Flag flag) const { - const int mask = (1 << (int)flag); - return (flags & mask) != 0; - } - - inline void setFlag(Flag flag, GBool value) { - const int mask = (1 << (int)flag); - if (value) { - flags |= mask; - } else { - flags &= ~mask; - } - } -}; - -class XRef { -public: - - // Constructor, create an empty XRef, used for PDF writing - XRef(); - // Constructor, create an empty XRef but with info dict, used for PDF writing - XRef(const Object *trailerDictA); - // Constructor. Read xref table from stream. - XRef(BaseStream *strA, Goffset pos, Goffset mainXRefEntriesOffsetA = 0, GBool *wasReconstructed = NULL, GBool reconstruct = false); - - // Destructor. - ~XRef(); - - XRef(const XRef &) = delete; - XRef& operator=(const XRef &) = delete; - - // Copy xref but with new base stream! - XRef *copy() const; - - // Is xref table valid? - GBool isOk() const { return ok; } - - // Is the last XRef section a stream or a table? - GBool isXRefStream() const { return xRefStream; } - - // Get the error code (if isOk() returns false). - int getErrorCode() const { return errCode; } - - // Set the encryption parameters. - void setEncryption(int permFlagsA, GBool ownerPasswordOkA, - const Guchar *fileKeyA, int keyLengthA, - int encVersionA, int encRevisionA, - CryptAlgorithm encAlgorithmA); - // Mark Encrypt entry as Unencrypted - void markUnencrypted(); - - void getEncryptionParameters(Guchar **fileKeyA, CryptAlgorithm *encAlgorithmA, int *keyLengthA); - - // Is the file encrypted? - GBool isEncrypted() const { return encrypted; } - - // Check various permissions. - GBool okToPrint(GBool ignoreOwnerPW = gFalse) const; - GBool okToPrintHighRes(GBool ignoreOwnerPW = gFalse) const; - GBool okToChange(GBool ignoreOwnerPW = gFalse) const; - GBool okToCopy(GBool ignoreOwnerPW = gFalse) const; - GBool okToAddNotes(GBool ignoreOwnerPW = gFalse) const; - GBool okToFillForm(GBool ignoreOwnerPW = gFalse) const; - GBool okToAccessibility(GBool ignoreOwnerPW = gFalse) const; - GBool okToAssemble(GBool ignoreOwnerPW = gFalse) const; - int getPermFlags() const { return permFlags; } - - // Get catalog object. - Object getCatalog(); - - // Fetch an indirect reference. - Object fetch(int num, int gen, int recursion = 0); - - // Return the document's Info dictionary (if any). - Object getDocInfo(); - Object getDocInfoNF(); - - // Create and return the document's Info dictionary if none exists. - // Otherwise return the existing one. - Object createDocInfoIfNoneExists(); - - // Remove the document's Info dictionary and update the trailer dictionary. - void removeDocInfo(); - - // Return the number of objects in the xref table. - int getNumObjects() const { return size; } - - // Return the catalog object reference. - int getRootNum() const { return rootNum; } - int getRootGen() const { return rootGen; } - - // Get end position for a stream in a damaged file. - // Returns false if unknown or file is not damaged. - GBool getStreamEnd(Goffset streamStart, Goffset *streamEnd); - - // Retuns the entry that belongs to the offset - int getNumEntry(Goffset offset); - - // Scans the document and sets special flags in all xref entries. One of those - // flags is Unencrypted, which affects how the object is fetched. Therefore, - // this function must be called before fetching unencrypted objects (e.g. - // Encrypt dictionary, XRef streams). Note that the code that initializes - // decryption doesn't need to call this function, because it runs before - // decryption is enabled, and therefore the Unencrypted flag is ignored. - void scanSpecialFlags(); - - // Direct access. - XRefEntry *getEntry(int i, GBool complainIfMissing = gTrue); - Object *getTrailerDict() { return &trailerDict; } - - // Was the XRef modified? - GBool isModified() const { return modified; } - // Set the modification flag for XRef to true. - void setModified() { modified = gTrue; } - - // Write access - void setModifiedObject(const Object* o, Ref r); - Ref addIndirectObject (const Object* o); - void removeIndirectObject(Ref r); - void add(int num, int gen, Goffset offs, GBool used); - - // Output XRef table to stream - void writeTableToFile(OutStream* outStr, GBool writeAllEntries); - // Output XRef stream contents to GooString and fill trailerDict fields accordingly - void writeStreamToBuffer(GooString *stmBuf, Dict *xrefDict, XRef *xref); - - // to be thread safe during write where changes are not allowed - void lock(); - void unlock(); - -private: - - BaseStream *str; // input stream - Goffset start; // offset in file (to allow for garbage - // at beginning of file) - XRefEntry *entries; // xref entries - int capacity; // size of <entries> array - int size; // number of entries - int rootNum, rootGen; // catalog dict - GBool ok; // true if xref table is valid - int errCode; // error code (if <ok> is false) - GBool xrefReconstructed; // marker, true if xref was already reconstructed - Object trailerDict; // trailer dictionary - GBool modified; - Goffset *streamEnds; // 'endstream' positions - only used in - // damaged files - int streamEndsLen; // number of valid entries in streamEnds - PopplerCache *objStrs; // cached object streams - GBool encrypted; // true if file is encrypted - int encRevision; - int encVersion; // encryption algorithm - CryptAlgorithm encAlgorithm; // encryption algorithm - int keyLength; // length of key, in bytes - int permFlags; // permission bits - Guchar fileKey[32]; // file decryption key - GBool ownerPasswordOk; // true if owner password is correct - Goffset prevXRefOffset; // position of prev XRef section (= next to read) - Goffset mainXRefEntriesOffset; // offset of entries in main XRef table - GBool xRefStream; // true if last XRef section is a stream - Goffset mainXRefOffset; // position of the main XRef table/stream - GBool scannedSpecialFlags; // true if scanSpecialFlags has been called - GBool strOwner; // true if str is owned by the instance -#ifdef MULTITHREADED - GooMutex mutex; -#endif - - void init(); - int reserve(int newSize); - int resize(int newSize); - GBool readXRef(Goffset *pos, std::vector<Goffset> *followedXRefStm, std::vector<int> *xrefStreamObjsNum); - GBool readXRefTable(Parser *parser, Goffset *pos, std::vector<Goffset> *followedXRefStm, std::vector<int> *xrefStreamObjsNum); - GBool readXRefStreamSection(Stream *xrefStr, int *w, int first, int n); - GBool readXRefStream(Stream *xrefStr, Goffset *pos); - GBool constructXRef(GBool *wasReconstructed, GBool needCatalogDict = gFalse); - GBool parseEntry(Goffset offset, XRefEntry *entry); - void readXRefUntil(int untilEntryNum, std::vector<int> *xrefStreamObjsNum = NULL); - void markUnencrypted(Object *obj); - - class XRefWriter { - public: - XRefWriter() = default; - virtual void startSection(int first, int count) = 0; - virtual void writeEntry(Goffset offset, int gen, XRefEntryType type) = 0; - virtual ~XRefWriter() {}; - - XRefWriter(const XRefWriter &) = delete; - XRefWriter& operator=(const XRefWriter &other) = delete; - }; - - // XRefWriter subclass that writes a XRef table - class XRefTableWriter: public XRefWriter { - public: - XRefTableWriter(OutStream* outStrA); - void startSection(int first, int count) override; - void writeEntry(Goffset offset, int gen, XRefEntryType type) override; - private: - OutStream* outStr; - }; - - // XRefWriter subclass that writes a XRef stream - class XRefStreamWriter: public XRefWriter { - public: - XRefStreamWriter(Array *index, GooString *stmBuf, int offsetSize); - void startSection(int first, int count) override; - void writeEntry(Goffset offset, int gen, XRefEntryType type) override; - private: - Array *index; - GooString *stmBuf; - int offsetSize; - }; - - // Dummy XRefWriter subclass that only checks if all offsets fit in 4 bytes - class XRefPreScanWriter: public XRefWriter { - public: - XRefPreScanWriter(); - void startSection(int first, int count) override; - void writeEntry(Goffset offset, int gen, XRefEntryType type) override; - - GBool hasOffsetsBeyond4GB; - }; - - void writeXRef(XRefWriter *writer, GBool writeAllEntries); -}; - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/XpdfPluginAPI.cc b/Build/source/libs/poppler/poppler-src/poppler/XpdfPluginAPI.cc deleted file mode 100644 index 834c681d991..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/XpdfPluginAPI.cc +++ /dev/null @@ -1,243 +0,0 @@ -//======================================================================== -// -// XpdfPluginAPI.cc -// -// Copyright 2004 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2009 Kovid Goyal <kovid@kovidgoyal.net> -// Copyright (C) 2012 Albert Astals Cid <aacid@kde.org> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#include "config.h" - -#ifdef ENABLE_PLUGINS - -#include "gmem.h" -#include "GlobalParams.h" -#include "Object.h" -#include "PDFDoc.h" -#include "XpdfPluginAPI.h" - -//------------------------------------------------------------------------ - -//~ This should use a pool of Objects; change xpdfFreeObj to match. -static Object *allocObj() { - return (Object *)gmalloc(sizeof(Object)); -} - -//------------------------------------------------------------------------ -// Document access functions -//------------------------------------------------------------------------ - -XpdfObject _xpdfGetInfoDict(XpdfDoc doc) { - Object *obj; - - obj = allocObj(); - return (XpdfObject)((PDFDoc *)doc)->getDocInfo(obj); -} - -XpdfObject _xpdfGetCatalog(XpdfDoc doc) { - Object *obj; - - obj = allocObj(); - return (XpdfObject)((PDFDoc *)doc)->getXRef()->getCatalog(obj); -} - -//------------------------------------------------------------------------ -// Object access functions. -//------------------------------------------------------------------------ - -XpdfBool _xpdfObjIsBool(XpdfObject obj) { - return (XpdfBool)((Object *)obj)->isBool(); -} - -XpdfBool _xpdfObjIsInt(XpdfObject obj) { - return (XpdfBool)((Object *)obj)->isInt(); -} - -XpdfBool _xpdfObjIsReal(XpdfObject obj) { - return (XpdfBool)((Object *)obj)->isReal(); -} - -XpdfBool _xpdfObjIsNumber(XpdfObject obj) { - return (XpdfBool)((Object *)obj)->isNum(); -} - -XpdfBool _xpdfObjIsString(XpdfObject obj) { - return (XpdfBool)((Object *)obj)->isString(); -} - -XpdfBool _xpdfObjIsName(XpdfObject obj) { - return (XpdfBool)((Object *)obj)->isName(); -} - -XpdfBool _xpdfObjIsNull(XpdfObject obj) { - return (XpdfBool)((Object *)obj)->isNull(); -} - -XpdfBool _xpdfObjIsArray(XpdfObject obj) { - return (XpdfBool)((Object *)obj)->isArray(); -} - -XpdfBool _xpdfObjIsDict(XpdfObject obj) { - return (XpdfBool)((Object *)obj)->isDict(); -} - -XpdfBool _xpdfObjIsStream(XpdfObject obj) { - return (XpdfBool)((Object *)obj)->isStream(); -} - -XpdfBool _xpdfObjIsRef(XpdfObject obj) { - return (XpdfBool)((Object *)obj)->isRef(); -} - -XpdfBool _xpdfBoolValue(XpdfObject obj) { - return (XpdfBool)((Object *)obj)->getBool(); -} - -int _xpdfIntValue(XpdfObject obj) { - if (!((Object *)obj)->isInt()) { - return 0; - } - return ((Object *)obj)->getInt(); -} - -double _xpdfRealValue(XpdfObject obj) { - if (!((Object *)obj)->isReal()) { - return 0; - } - return ((Object *)obj)->getReal(); -} - -double _xpdfNumberValue(XpdfObject obj) { - if (!((Object *)obj)->isNum()) { - return 0; - } - return ((Object *)obj)->getNum(); -} - -int _xpdfStringLength(XpdfObject obj) { - if (!((Object *)obj)->isString()) { - return 0; - } - return ((Object *)obj)->getString()->getLength(); -} - -char *_xpdfStringValue(XpdfObject obj) { - if (!((Object *)obj)->isString()) { - return 0; - } - return ((Object *)obj)->getString()->getCString(); -} - -char *_xpdfNameValue(XpdfObject obj) { - if (!((Object *)obj)->isName()) { - return NULL; - } - return ((Object *)obj)->getName(); -} - -int _xpdfArrayLength(XpdfObject obj) { - if (!((Object *)obj)->isArray()) { - return 0; - } - return ((Object *)obj)->arrayGetLength(); -} - -XpdfObject _xpdfArrayGet(XpdfObject obj, int idx) { - Object *elem; - - elem = allocObj(); - if (!((Object *)obj)->isArray()) { - return (XpdfObject)elem->initNull(); - } - return (XpdfObject)((Object *)obj)->arrayGet(idx, elem); -} - -XpdfObject _xpdfDictGet(XpdfObject obj, char *key) { - Object *elem; - - elem = allocObj(); - if (!((Object *)obj)->isDict()) { - return (XpdfObject)elem->initNull(); - } - return (XpdfObject)((Object *)obj)->dictLookup(key, elem); -} - -void _xpdfFreeObj(XpdfObject obj) { - ((Object *)obj)->free(); - gfree(obj); -} - -//------------------------------------------------------------------------ -// Memory allocation functions -//------------------------------------------------------------------------ - -void *_xpdfMalloc(int size) { - return gmalloc(size); -} - -void *_xpdfRealloc(void *p, int size) { - return grealloc(p, size); -} - -void _xpdfFree(void *p) { - gfree(p); -} - -//------------------------------------------------------------------------ -// Security handlers -//------------------------------------------------------------------------ - -void _xpdfRegisterSecurityHandler(XpdfSecurityHandler *handler) { - if (handler->version <= xpdfPluginAPIVersion) { - globalParams->addSecurityHandler(handler); - } -} - -//------------------------------------------------------------------------ - -XpdfPluginVecTable xpdfPluginVecTable = { - xpdfPluginAPIVersion, - &_xpdfGetInfoDict, - &_xpdfGetCatalog, - &_xpdfObjIsBool, - &_xpdfObjIsInt, - &_xpdfObjIsReal, - &_xpdfObjIsString, - &_xpdfObjIsName, - &_xpdfObjIsNull, - &_xpdfObjIsArray, - &_xpdfObjIsDict, - &_xpdfObjIsStream, - &_xpdfObjIsRef, - &_xpdfBoolValue, - &_xpdfIntValue, - &_xpdfRealValue, - &_xpdfStringLength, - &_xpdfStringValue, - &_xpdfNameValue, - &_xpdfArrayLength, - &_xpdfArrayGet, - &_xpdfDictGet, - &_xpdfFreeObj, - &_xpdfMalloc, - &_xpdfRealloc, - &_xpdfFree, - &_xpdfRegisterSecurityHandler, -}; - -#endif // ENABLE_PLUGINS diff --git a/Build/source/libs/poppler/poppler-src/poppler/XpdfPluginAPI.h b/Build/source/libs/poppler/poppler-src/poppler/XpdfPluginAPI.h deleted file mode 100644 index 6ed890a8f1f..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/XpdfPluginAPI.h +++ /dev/null @@ -1,342 +0,0 @@ -/* - * XpdfPluginAPI.h - * - * Copyright 2004 Glyph & Cog, LLC - */ - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2012 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2014 Bogdan Cristea <cristeab@gmail.com> -// Copyright (C) 2014 Peter Breitenlohner <peb@mppmu.mpg.de> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef XPDFPLUGINAPI_H -#define XPDFPLUGINAPI_H - -#ifdef _WIN32 -#ifndef NOMINMAX -#define NOMINMAX -#endif -#include <windows.h> -#else -#define Object XtObject -#include <X11/Intrinsic.h> -#undef Object -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/*------------------------------------------------------------------------ - * Macros - *------------------------------------------------------------------------*/ - -/* - * The current API version. - */ -#define xpdfPluginAPIVersion 1 - -#ifdef _WIN32 -# ifdef __cplusplus -# define PLUGINFUNC(retType) extern "C" __declspec(dllexport) retType -# else -# define PLUGINFUNC(retType) extern __declspec(dllexport) retType -# endif -#else -# ifdef __cplusplus -# define PLUGINFUNC(retType) extern "C" retType -# else -# define PLUGINFUNC(retType) extern retType -# endif -#endif - -/*------------------------------------------------------------------------ - * Plugin setup/cleanup - *------------------------------------------------------------------------*/ - -/* - * All plugins are required to implement two functions: - * - * -- Initialize the plugin. Returns non-zero if successful. - * PLUGINFUNC(XpdfBool) xpdfInitPlugin(void); - * - * -- Free the plugin. - * PLUGINFUNC(void) xpdfFreePlugin(void); - */ - -/*------------------------------------------------------------------------ - * Types - *------------------------------------------------------------------------*/ - -/* - * Standard C boolean -- zero = false, non-zero = true. - */ -typedef int XpdfBool; -#define xpdfTrue 1 -#define xpdfFalse 0 - -/* - * PDF document handle. - */ -typedef struct _XpdfDoc *XpdfDoc; - -/* - * PDF object handle. - */ -typedef struct _XpdfObject *XpdfObject; - -/* - * Document access permissions. Any of these can be bitwise 'or'ed - * together. If xpdfPermissionOpen is not included, the document - * cannot be opened at all, and the other bits are ignored. - */ -typedef unsigned int XpdfPermission; -#define xpdfPermissionOpen (1 << 0) -#define xpdfPermissionPrint (1 << 2) -#define xpdfPermissionChange (1 << 3) -#define xpdfPermissionCopy (1 << 4) -#define xpdfPermissionNotes (1 << 5) - -/*------------------------------------------------------------------------ - * Security handler - *------------------------------------------------------------------------*/ - -/* - * XpdfSecurityHandler - a security handler plugin should create one - * of these and pass it to xpdfRegisterSecurityHandler. - */ -#ifdef __cplusplus -struct XpdfSecurityHandler { -#else -typedef struct { -#endif - - /* - * Version of the security handler spec (this document) -- use - * xpdfPluginAPIVersion. - */ - int version; - - /* - * Security handler name. - */ - char *name; - - /* - * Any global data the security handler needs. XpdfViewer will pass - * this pointer to all handler functions as the <handlerData> - * argument. - */ - void *handlerData; - - /* - * Allocate and initialize data for a new document. XpdfViewer will - * pass the returned pointer to all other handler functions as the - * <docData> argument. Returns non-zero if successful. - */ - XpdfBool (*newDoc)(void *handlerData, XpdfDoc doc, - XpdfObject encryptDict, void **docData); - - /* - * Free the data allocated by newDoc. - */ - void (*freeDoc)(void *handlerData, void *docData); - - /* - * Construct authorization data based on the supplied owner and user - * passwords (either or both of which may be NULL). This function - * is called in "batch" mode, i.e., if the password was supplied on - * the command line or via an Xpdf library API. It should not - * generate any user interaction (e.g., a password dialog). It is - * not required to support this function: the makeAuthData function - * pointer can be set to NULL. Returns non-zero if successful. - */ - XpdfBool (*makeAuthData)(void *handlerData, void *docData, - char *ownerPassword, char *userPassword, - void **authData); - - /* - * Request any needed information (e.g., a password) from the user, - * and construct an authorization data object. Returns non-zero if - * successful. - */ - XpdfBool (*getAuthData)(void *handlerData, void *docData, - void **authData); - - /* - * Free the data allocated by getAuthData. - */ - void (*freeAuthData)(void *handlerData, void *docData, - void *authData); - - /* - * Request permission to access the document. This returns all - * permissions granted by authData. - */ - XpdfPermission (*authorize)(void *handlerData, void *docData, - void *authData); - - /* - * Get the decryption key and algorithm version associated with the - * document. Returns non-zero if successful. - */ - XpdfBool (*getKey)(void *handlerData, void *docData, - char **key, int *keyLen, int *cryptVersion, int *cryptRevision); - - /* - * Free the data allocated by getKey. - */ - void (*freeKey)(void *handlerData, void *docData, - char *key, int keyLen); - -#ifdef __cplusplus -}; -#else -} XpdfSecurityHandler; -#endif - -/*------------------------------------------------------------------------*/ - -typedef struct { - int version; - -/*------------------------------------------------------------------------ - * Document access functions - *------------------------------------------------------------------------*/ - -/* - * Get a document's info dictionary. (The returned object must be - * freed with xpdfFreeObj.) - */ -XpdfObject (*_xpdfGetInfoDict)(XpdfDoc doc); - -/* - * Get a document's catalog ("root") dictionary. (The returned object - * must be freed with xpdfFreeObj.) - */ -XpdfObject (*_xpdfGetCatalog)(XpdfDoc doc); - -/*------------------------------------------------------------------------ - * Object access functions - *------------------------------------------------------------------------*/ - -/* - * Check an object's type. - */ -XpdfBool (*_xpdfObjIsBool)(XpdfObject obj); -XpdfBool (*_xpdfObjIsInt)(XpdfObject obj); -XpdfBool (*_xpdfObjIsReal)(XpdfObject obj); -XpdfBool (*_xpdfObjIsString)(XpdfObject obj); -XpdfBool (*_xpdfObjIsName)(XpdfObject obj); -XpdfBool (*_xpdfObjIsNull)(XpdfObject obj); -XpdfBool (*_xpdfObjIsArray)(XpdfObject obj); -XpdfBool (*_xpdfObjIsDict)(XpdfObject obj); -XpdfBool (*_xpdfObjIsStream)(XpdfObject obj); -XpdfBool (*_xpdfObjIsRef)(XpdfObject obj); - -/* - * Value access. - * (Objects returned by xpdfArrayGet and xpdfDictGet must be freed - * with xpdfFreeObj.) - */ -XpdfBool (*_xpdfBoolValue)(XpdfObject obj); -int (*_xpdfIntValue)(XpdfObject obj); -double (*_xpdfRealValue)(XpdfObject obj); -int (*_xpdfStringLength)(XpdfObject obj); -char *(*_xpdfStringValue)(XpdfObject obj); -char *(*_xpdfNameValue)(XpdfObject obj); -int (*_xpdfArrayLength)(XpdfObject obj); -XpdfObject (*_xpdfArrayGet)(XpdfObject obj, int idx); -XpdfObject (*_xpdfDictGet)(XpdfObject obj, char *key); - -/* - * Object destruction. NB: *all* objects must be freed after use. - */ -void (*_xpdfFreeObj)(XpdfObject obj); - -/*------------------------------------------------------------------------ - * Memory allocation functions - *------------------------------------------------------------------------*/ - -void *(*_xpdfMalloc)(int size); -void *(*_xpdfRealloc)(void *p, int size); -void (*_xpdfFree)(void *p); - -/*------------------------------------------------------------------------ - * Security handler functions - *------------------------------------------------------------------------*/ - -/* - * Register a new security handler. - */ -void (*_xpdfRegisterSecurityHandler)(XpdfSecurityHandler *handler); - -/*------------------------------------------------------------------------*/ - -} XpdfPluginVecTable; - -#ifdef _WIN32 - -extern __declspec(dllexport) XpdfPluginVecTable xpdfPluginVecTable; - -#define xpdfPluginSetup \ - extern __declspec(dllexport) \ - XpdfPluginVecTable xpdfPluginVecTable = {xpdfPluginAPIVersion}; - -#else - -extern XpdfPluginVecTable xpdfPluginVecTable; - -#define xpdfPluginSetup \ - XpdfPluginVecTable xpdfPluginVecTable = {xpdfPluginAPIVersion}; - -#endif - -#define xpdfGetInfoDict (*xpdfPluginVecTable._xpdfGetInfoDict) -#define xpdfGetCatalog (*xpdfPluginVecTable._xpdfGetCatalog) -#ifdef _WIN32 -#define xpdfWin32GetWindow (*xpdfPluginVecTable._xpdfWin32GetWindow) -#else -#define xpdfXGetWindow (*xpdfPluginVecTable._xpdfXGetWindow) -#endif -#define xpdfObjIsBool (*xpdfPluginVecTable._xpdfObjIsBool) -#define xpdfObjIsInt (*xpdfPluginVecTable._xpdfObjIsInt) -#define xpdfObjIsReal (*xpdfPluginVecTable._xpdfObjIsReal) -#define xpdfObjIsString (*xpdfPluginVecTable._xpdfObjIsString) -#define xpdfObjIsName (*xpdfPluginVecTable._xpdfObjIsName) -#define xpdfObjIsNull (*xpdfPluginVecTable._xpdfObjIsNull) -#define xpdfObjIsArray (*xpdfPluginVecTable._xpdfObjIsArray) -#define xpdfObjIsDict (*xpdfPluginVecTable._xpdfObjIsDict) -#define xpdfObjIsStream (*xpdfPluginVecTable._xpdfObjIsStream) -#define xpdfObjIsRef (*xpdfPluginVecTable._xpdfObjIsRef) -#define xpdfBoolValue (*xpdfPluginVecTable._xpdfBoolValue) -#define xpdfIntValue (*xpdfPluginVecTable._xpdfIntValue) -#define xpdfRealValue (*xpdfPluginVecTable._xpdfRealValue) -#define xpdfStringLength (*xpdfPluginVecTable._xpdfStringLength) -#define xpdfStringValue (*xpdfPluginVecTable._xpdfStringValue) -#define xpdfNameValue (*xpdfPluginVecTable._xpdfNameValue) -#define xpdfArrayLength (*xpdfPluginVecTable._xpdfArrayLength) -#define xpdfArrayGet (*xpdfPluginVecTable._xpdfArrayGet) -#define xpdfDictGet (*xpdfPluginVecTable._xpdfDictGet) -#define xpdfFreeObj (*xpdfPluginVecTable._xpdfFreeObj) -#define xpdfMalloc (*xpdfPluginVecTable._xpdfMalloc) -#define xpdfRealloc (*xpdfPluginVecTable._xpdfRealloc) -#define xpdfFree (*xpdfPluginVecTable._xpdfFree) -#define xpdfRegisterSecurityHandler (*xpdfPluginVecTable._xpdfRegisterSecurityHandler) - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/Build/source/libs/poppler/poppler-src/poppler/gen-unicode-tables.py b/Build/source/libs/poppler/poppler-src/poppler/gen-unicode-tables.py deleted file mode 100644 index 282f6e52518..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/gen-unicode-tables.py +++ /dev/null @@ -1,38 +0,0 @@ -UNICODE_LAST_CHAR_PART1 = 0x2FAFF -HANGUL_S_BASE = 0xAC00 -HANGUL_S_COUNT = 19 * 21 * 28 -import unicodedata - -print """// Generated by gen-unicode-tables.py - -typedef struct { - Unicode character; - int length; - int offset; -} decomposition; -""" - -decomp_table = [] -max_index = 0 -decomp_expansion_index = {} -decomp_expansion = [] -for u in xrange(0, UNICODE_LAST_CHAR_PART1): - if (u >= HANGUL_S_BASE and u < HANGUL_S_BASE + HANGUL_S_COUNT): - continue - norm = tuple(map(ord, unicodedata.normalize("NFKD", unichr(u)))) - if norm != (u,): - try: - i = decomp_expansion_index[norm] - decomp_table.append((u, len(norm), i)) - except KeyError: - decomp_table.append((u, len(norm), max_index)) - decomp_expansion_index[norm] = max_index - decomp_expansion.append((norm, max_index)) - max_index += len(norm) -print "#define DECOMP_TABLE_LENGTH %d\n" % len(decomp_table) -print "static const decomposition decomp_table[] = {\n%s\n};\n" % ", \n".join( - " { 0x%x, %d, %d }" % (character, length, offset) - for character, length, offset in decomp_table) -print "static const Unicode decomp_expansion[] = {\n%s\n};\n" % ", \n".join( - " %s /* offset %d */ " % (", ".join("0x%x" % u for u in norm), - index) for norm, index in decomp_expansion) diff --git a/Build/source/libs/poppler/poppler-src/poppler/poppler-config.h.cmake b/Build/source/libs/poppler/poppler-src/poppler/poppler-config.h.cmake deleted file mode 100644 index f6a6c27ff6b..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/poppler-config.h.cmake +++ /dev/null @@ -1,162 +0,0 @@ -//================================================= -*- mode: c++ -*- ==== -// -// poppler-config.h -// -// Copyright 1996-2011 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2014 Bogdan Cristea <cristeab@gmail.com> -// Copyright (C) 2014 Hib Eris <hib@hiberis.nl> -// Copyright (C) 2016 Tor Lillqvist <tml@collabora.com> -// Copyright (C) 2017 Adrian Johnson <ajohnson@redneon.com> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef POPPLER_CONFIG_H -#define POPPLER_CONFIG_H - -// We duplicate some of the config.h #define's here since they are -// used in some of the header files we install. The #ifndef/#endif -// around #undef look odd, but it's to silence warnings about -// redefining those symbols. - -/* Defines the poppler version. */ -#ifndef POPPLER_VERSION -#define POPPLER_VERSION "${POPPLER_VERSION}" -#endif - -/* Enable multithreading support. */ -#ifndef MULTITHREADED -#cmakedefine MULTITHREADED 1 -#endif - -/* Use fixedpoint. */ -#ifndef USE_FIXEDPOINT -#cmakedefine USE_FIXEDPOINT 1 -#endif - -/* Use single precision arithmetic in the Splash backend */ -#ifndef USE_FLOAT -#cmakedefine USE_FLOAT 1 -#endif - -/* Include support for OPI comments. */ -#ifndef OPI_SUPPORT -#cmakedefine OPI_SUPPORT 1 -#endif - -/* Enable word list support. */ -#ifndef TEXTOUT_WORD_LIST -#cmakedefine TEXTOUT_WORD_LIST 1 -#endif - -/* Support for curl is compiled in. */ -#ifndef POPPLER_HAS_CURL_SUPPORT -#cmakedefine POPPLER_HAS_CURL_SUPPORT 1 -#endif - -/* Use libjpeg instead of builtin jpeg decoder. */ -#ifndef ENABLE_LIBJPEG -#cmakedefine ENABLE_LIBJPEG 1 -#endif - -/* Build against libtiff. */ -#ifndef ENABLE_LIBTIFF -#cmakedefine ENABLE_LIBTIFF 1 -#endif - -/* Build against libpng. */ -#ifndef ENABLE_LIBPNG -#cmakedefine ENABLE_LIBPNG 1 -#endif - -/* Use zlib instead of builtin zlib decoder. */ -#ifndef ENABLE_ZLIB -#cmakedefine ENABLE_ZLIB 1 -#endif - -/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'. - */ -#ifndef HAVE_DIRENT_H -#cmakedefine HAVE_DIRENT_H 1 -#endif - -/* Defines if gettimeofday is available on your system */ -#ifndef HAVE_GETTIMEOFDAY -#cmakedefine HAVE_GETTIMEOFDAY 1 -#endif - -/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */ -#ifndef HAVE_NDIR_H -#cmakedefine HAVE_NDIR_H 1 -#endif - -/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'. - */ -#ifndef HAVE_SYS_DIR_H -#cmakedefine HAVE_SYS_DIR_H 1 -#endif - -/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'. - */ -#ifndef HAVE_SYS_NDIR_H -#cmakedefine HAVE_SYS_NDIR_H 1 -#endif - -/* Defines if use cms */ -#ifndef USE_CMS -#cmakedefine USE_CMS 1 -#endif - -// Also, there are preprocessor symbols in the header files -// that are used but never defined when building poppler using configure -// or cmake: DISABLE_OUTLINE, DEBUG_MEM, -// ENABLE_PLUGINS, DEBUG_FORMS - -//------------------------------------------------------------------------ -// version -//------------------------------------------------------------------------ - -// copyright notice -#define popplerCopyright "Copyright 2005-2018 The Poppler Developers - http://poppler.freedesktop.org" -#define xpdfCopyright "Copyright 1996-2011 Glyph & Cog, LLC" - -//------------------------------------------------------------------------ -// Win32 stuff -//------------------------------------------------------------------------ - -#if defined(_WIN32) && !defined(_MSC_VER) -#include <windef.h> -#else -#define CDECL -#endif - -//------------------------------------------------------------------------ -// Compiler -//------------------------------------------------------------------------ - -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4) -#include <stdio.h> // __MINGW_PRINTF_FORMAT is defined in the mingw stdio.h -#ifdef __MINGW_PRINTF_FORMAT -#define GCC_PRINTF_FORMAT(fmt_index, va_index) \ - __attribute__((__format__(__MINGW_PRINTF_FORMAT, fmt_index, va_index))) -#else -#define GCC_PRINTF_FORMAT(fmt_index, va_index) \ - __attribute__((__format__(__printf__, fmt_index, va_index))) -#endif -#else -#define GCC_PRINTF_FORMAT(fmt_index, va_index) -#endif - -#endif /* POPPLER_CONFIG_H */ diff --git a/Build/source/libs/poppler/poppler-src/poppler/poppler-config.h.in b/Build/source/libs/poppler/poppler-src/poppler/poppler-config.h.in deleted file mode 100644 index 0d0aa9e52b4..00000000000 --- a/Build/source/libs/poppler/poppler-src/poppler/poppler-config.h.in +++ /dev/null @@ -1,196 +0,0 @@ -//================================================= -*- mode: c++ -*- ==== -// -// poppler-config.h -// -// Copyright 1996-2011 Glyph & Cog, LLC -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2014 Bogdan Cristea <cristeab@gmail.com> -// Copyright (C) 2014 Hib Eris <hib@hiberis.nl> -// Copyright (C) 2016 Tor Lillqvist <tml@collabora.com> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef POPPLER_CONFIG_H -#define POPPLER_CONFIG_H - -#include <stdio.h> - -// We duplicate some of the config.h #define's here since they are -// used in some of the header files we install. The #ifndef/#endif -// around #undef look odd, but it's to silence warnings about -// redefining those symbols. - -/* Defines the poppler version. */ -#ifndef POPPLER_VERSION -#undef POPPLER_VERSION -#endif - -/* Enable multithreading support. */ -#ifndef MULTITHREADED -#undef MULTITHREADED -#endif - -/* Use fixedpoint. */ -#ifndef USE_FIXEDPOINT -#undef USE_FIXEDPOINT -#endif - -/* Use single precision arithmetic in the Splash backend */ -#ifndef USE_FLOAT -#undef USE_FLOAT -#endif - -/* Include support for OPI comments. */ -#ifndef OPI_SUPPORT -#undef OPI_SUPPORT -#endif - -/* Enable word list support. */ -#ifndef TEXTOUT_WORD_LIST -#undef TEXTOUT_WORD_LIST -#endif - -/* Support for curl is compiled in. */ -#ifndef POPPLER_HAS_CURL_SUPPORT -#undef POPPLER_HAS_CURL_SUPPORT -#endif - -/* Use libjpeg instead of builtin jpeg decoder. */ -#ifndef ENABLE_LIBJPEG -#undef ENABLE_LIBJPEG -#endif - -/* Build against libtiff. */ -#ifndef ENABLE_LIBTIFF -#undef ENABLE_LIBTIFF -#endif - -/* Build against libpng. */ -#ifndef ENABLE_LIBPNG -#undef ENABLE_LIBPNG -#endif - -/* Use zlib instead of builtin zlib decoder for uncompressing flate streams. */ -#ifndef ENABLE_ZLIB_UNCOMPRESS -#undef ENABLE_ZLIB_UNCOMPRESS -#endif - -/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'. - */ -#ifndef HAVE_DIRENT_H -#undef HAVE_DIRENT_H -#endif - -/* Defines if gettimeofday is available on your system */ -#ifndef HAVE_GETTIMEOFDAY -#undef HAVE_GETTIMEOFDAY -#endif - -/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */ -#ifndef HAVE_NDIR_H -#undef HAVE_NDIR_H -#endif - -/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'. - */ -#ifndef HAVE_SYS_DIR_H -#undef HAVE_SYS_DIR_H -#endif - -/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'. - */ -#ifndef HAVE_SYS_NDIR_H -#undef HAVE_SYS_NDIR_H -#endif - -/* Have FreeType2 include files */ -#ifndef HAVE_FREETYPE_H -#undef HAVE_FREETYPE_H -#endif - -/* Defines if use cms */ -#ifndef USE_CMS -#undef USE_CMS -#endif - -// Also, there are preprocessor symbols in the header files -// that are used but never defined when building poppler using configure -// or cmake: DISABLE_OUTLINE, DEBUG_MEM, SPLASH_CMYK, HAVE_T1LIB_H, -// ENABLE_PLUGINS, DEBUG_FORMS, HAVE_FREETYPE_FREETYPE_H - -//------------------------------------------------------------------------ -// version -//------------------------------------------------------------------------ - -// copyright notice -#define popplerCopyright "Copyright 2005-2017 The Poppler Developers - http://poppler.freedesktop.org" -#define xpdfCopyright "Copyright 1996-2011 Glyph & Cog, LLC" - -//------------------------------------------------------------------------ -// popen -//------------------------------------------------------------------------ - -#if defined(_MSC_VER) || defined(__BORLANDC__) -#define popen _popen -#define pclose _pclose -#endif - -#if defined(VMS) || defined(VMCMS) || defined(DOS) || defined(OS2) || defined(__EMX__) || defined(_WIN32) || defined(__DJGPP__) || defined(MACOS) -#define POPEN_READ_MODE "rb" -#else -#define POPEN_READ_MODE "r" -#endif - -//------------------------------------------------------------------------ -// Win32 stuff -//------------------------------------------------------------------------ - -#if defined(_WIN32) && !defined(_MSC_VER) -#include <windef.h> -#else -#define CDECL -#endif - -#if defined(_WIN32) -#ifdef _MSC_VER -#define strtok_r strtok_s -#elif __MINGW32__ && !defined(__WINPTHREADS_VERSION) -char * strtok_r (char *s, const char *delim, char **save_ptr); -#endif -#endif - -//------------------------------------------------------------------------ -// Compiler -//------------------------------------------------------------------------ - -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4) -#ifdef __MINGW_PRINTF_FORMAT -#define GCC_PRINTF_FORMAT(fmt_index, va_index) \ - __attribute__((__format__(__MINGW_PRINTF_FORMAT, fmt_index, va_index))) -#else -#define GCC_PRINTF_FORMAT(fmt_index, va_index) \ - __attribute__((__format__(__printf__, fmt_index, va_index))) -#endif -#else -#define GCC_PRINTF_FORMAT(fmt_index, va_index) -#endif - -#if defined(_MSC_VER) && _MSC_VER < 1800 -#define fmax(a, b) std::max(a, b) -#define fmin(a, b) std::min(a, b) -#endif - - -#endif /* POPPLER_CONFIG_H */ diff --git a/Build/source/libs/poppler/poppler-src/splash/SplashTypes.h b/Build/source/libs/poppler/poppler-src/splash/SplashTypes.h deleted file mode 100644 index 1bede11cd5e..00000000000 --- a/Build/source/libs/poppler/poppler-src/splash/SplashTypes.h +++ /dev/null @@ -1,201 +0,0 @@ -//======================================================================== -// -// SplashTypes.h -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2006, 2010 Albert Astals Cid <aacid@kde.org> -// Copyright (C) 2008 Tomas Are Haavet <tomasare@gmail.com> -// Copyright (C) 2009, 2011-2013 Thomas Freitag <Thomas.Freitag@alfa.de> -// Copyright (C) 2009 Stefan Thomas <thomas@eload24.com> -// Copyright (C) 2010 William Bader <williambader@hotmail.com> -// Copyright (C) 2017 Adrian Johnson <ajohnson@redneon.com> -// Copyright (C) 2018 Stefan Brüns <stefan.bruens@rwth-aachen.de> -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef SPLASHTYPES_H -#define SPLASHTYPES_H - -#include "goo/gtypes.h" - -//------------------------------------------------------------------------ -// coordinates -//------------------------------------------------------------------------ - -#if defined(USE_FIXEDPOINT) -#include "goo/FixedPoint.h" -typedef FixedPoint SplashCoord; -#elif defined(USE_FLOAT) -typedef float SplashCoord; -#else -typedef double SplashCoord; -#endif - -//------------------------------------------------------------------------ -// antialiasing -//------------------------------------------------------------------------ - -#define splashAASize 4 - -#ifndef SPOT_NCOMPS -#define SPOT_NCOMPS 4 -#endif - -//------------------------------------------------------------------------ -// colors -//------------------------------------------------------------------------ - -enum SplashColorMode { - splashModeMono1, // 1 bit per component, 8 pixels per byte, - // MSbit is on the left - splashModeMono8, // 1 byte per component, 1 byte per pixel - splashModeRGB8, // 1 byte per component, 3 bytes per pixel: - // RGBRGB... - splashModeBGR8, // 1 byte per component, 3 bytes per pixel: - // BGRBGR... - splashModeXBGR8 // 1 byte per component, 4 bytes per pixel: - // XBGRXBGR... -#ifdef SPLASH_CMYK - , - splashModeCMYK8, // 1 byte per component, 4 bytes per pixel: - // CMYKCMYK... - splashModeDeviceN8 // 1 byte per component, - // 4 bytes + n bytes spot colors per pixel: - // CMYKSSSSCMYKSSSS... -#endif -}; - -enum SplashThinLineMode { - splashThinLineDefault, // if SA on: draw solid if requested line width, transformed into - // device space, is less than half a pixel and a shaped line else - splashThinLineSolid, // draw line solid at least with 1 pixel - splashThinLineShape // draw line shaped at least with 1 pixel -}; -// number of components in each color mode -// (defined in SplashState.cc) -extern int splashColorModeNComps[]; - -// max number of components in any SplashColor -#ifdef SPLASH_CMYK -#define splashMaxColorComps SPOT_NCOMPS+4 -#else -#define splashMaxColorComps 4 -#endif - -typedef Guchar SplashColor[splashMaxColorComps]; -typedef Guchar *SplashColorPtr; - -// RGB8 -static inline Guchar splashRGB8R(SplashColorPtr rgb8) { return rgb8[0]; } -static inline Guchar splashRGB8G(SplashColorPtr rgb8) { return rgb8[1]; } -static inline Guchar splashRGB8B(SplashColorPtr rgb8) { return rgb8[2]; } - -// BGR8 -static inline Guchar splashBGR8R(SplashColorPtr bgr8) { return bgr8[2]; } -static inline Guchar splashBGR8G(SplashColorPtr bgr8) { return bgr8[1]; } -static inline Guchar splashBGR8B(SplashColorPtr bgr8) { return bgr8[0]; } - -#ifdef SPLASH_CMYK -// CMYK8 -static inline Guchar splashCMYK8C(SplashColorPtr cmyk8) { return cmyk8[0]; } -static inline Guchar splashCMYK8M(SplashColorPtr cmyk8) { return cmyk8[1]; } -static inline Guchar splashCMYK8Y(SplashColorPtr cmyk8) { return cmyk8[2]; } -static inline Guchar splashCMYK8K(SplashColorPtr cmyk8) { return cmyk8[3]; } - -// DEVICEN8 -static inline Guchar splashDeviceN8C(SplashColorPtr deviceN8) { return deviceN8[0]; } -static inline Guchar splashDeviceN8M(SplashColorPtr deviceN8) { return deviceN8[1]; } -static inline Guchar splashDeviceN8Y(SplashColorPtr deviceN8) { return deviceN8[2]; } -static inline Guchar splashDeviceN8K(SplashColorPtr deviceN8) { return deviceN8[3]; } -static inline Guchar splashDeviceN8S(SplashColorPtr deviceN8, int nSpot) { return deviceN8[4 + nSpot]; } -#endif - -static inline void splashClearColor(SplashColorPtr dest) { - dest[0] = 0; - dest[1] = 0; - dest[2] = 0; -#ifdef SPLASH_CMYK - dest[3] = 0; - for (int i = 4; i < SPOT_NCOMPS + 4; i++) - dest[i] = 0; -#endif -} - -static inline void splashColorCopy(SplashColorPtr dest, SplashColorPtr src) { - dest[0] = src[0]; - dest[1] = src[1]; - dest[2] = src[2]; -#ifdef SPLASH_CMYK - dest[3] = src[3]; - for (int i = 4; i < SPOT_NCOMPS + 4; i++) - dest[i] = src[i]; -#endif -} - -static inline void splashColorXor(SplashColorPtr dest, SplashColorPtr src) { - dest[0] ^= src[0]; - dest[1] ^= src[1]; - dest[2] ^= src[2]; -#ifdef SPLASH_CMYK - dest[3] ^= src[3]; - for (int i = 4; i < SPOT_NCOMPS + 4; i++) - dest[i] ^= src[i]; -#endif -} - -//------------------------------------------------------------------------ -// blend functions -//------------------------------------------------------------------------ - -typedef void (*SplashBlendFunc)(SplashColorPtr src, SplashColorPtr dest, - SplashColorPtr blend, SplashColorMode cm); - -//------------------------------------------------------------------------ -// screen parameters -//------------------------------------------------------------------------ - -enum SplashScreenType { - splashScreenDispersed, - splashScreenClustered, - splashScreenStochasticClustered -}; - -struct SplashScreenParams { - SplashScreenType type; - int size; - int dotRadius; - SplashCoord gamma; - SplashCoord blackThreshold; - SplashCoord whiteThreshold; -}; - -//------------------------------------------------------------------------ -// error results -//------------------------------------------------------------------------ - -typedef int SplashError; - - -//------------------------------------------------------------------------ -// image file formats -//------------------------------------------------------------------------ - -enum SplashImageFileFormat { - splashFormatJpeg, - splashFormatPng, - splashFormatTiff, - splashFormatJpegCMYK -}; - -#endif diff --git a/Build/source/libs/poppler/version.ac b/Build/source/libs/poppler/version.ac deleted file mode 100644 index 7f633325435..00000000000 --- a/Build/source/libs/poppler/version.ac +++ /dev/null @@ -1,12 +0,0 @@ -dnl $Id$ -dnl Copyright 2018 Karl Berry <tex-live@tug.org> -dnl Copyright 2011-2015 Peter Breitenlohner <tex-live@tug.org> -dnl -dnl This file is free software; the copyright holder -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. -dnl -dnl -------------------------------------------------------- -dnl -dnl m4-include this file to define the current poppler version -m4_define([poppler_version], [0.68.0]) diff --git a/Build/source/libs/xpdf/ChangeLog b/Build/source/libs/xpdf/ChangeLog index 7b963d2a8ee..b619191ae89 100644 --- a/Build/source/libs/xpdf/ChangeLog +++ b/Build/source/libs/xpdf/ChangeLog @@ -1,3 +1,7 @@ +2020-05-14 Karl Berry <karl@freefriends.org> + + * ac/xpdf.ac: doc change for poppler no longer supported in TL. + 2019-09-29 Akira Kakuto <kakuto@w32tex.org> * Import xpdf-4.02. diff --git a/Build/source/libs/xpdf/ac/xpdf.ac b/Build/source/libs/xpdf/ac/xpdf.ac index f3402389af1..549f3c2768f 100644 --- a/Build/source/libs/xpdf/ac/xpdf.ac +++ b/Build/source/libs/xpdf/ac/xpdf.ac @@ -1,9 +1,12 @@ +dnl $Id$ ## libs/xpdf/ac/xpdf.ac: configure.ac fragment for the TeX Live subdirectory libs/xpdf/ dnl -dnl Copyright (C) 2009 Peter Breitenlohner <tex-live@tug.org> +dnl Copyright 2015-2020 Karl Berry <tex-live@tug.org> +dnl Copyright 2009-2015 Peter Breitenlohner <tex-live@tug.org> dnl You may freely use, modify and/or distribute this file. dnl -## basic check of system xpdf (poppler) +## basic check of system xpdf (a.k.a. poppler, no longer supported in +## TL sources) KPSE_TRY_LIBXX([xpdf], [#include <GfxFont.h>], [GfxFont *gfxFont; gfxFont->decRefCnt();]) diff --git a/Build/source/m4/ChangeLog b/Build/source/m4/ChangeLog index 4dfe8ed2e93..599419def6a 100644 --- a/Build/source/m4/ChangeLog +++ b/Build/source/m4/ChangeLog @@ -1,3 +1,11 @@ +2020-05-14 Karl Berry <karl@freefriends.org> + + * kpse-pkgs.m4 (KPSE_LIBS_PKGS), + (KPSE_POPPLER_SYSTEM_FLAGS): remove poppler. + * kpse-poppler-flags.m4: remove file. + * kpse-xpdf-flags.m4 (KPSE_XPDF_OPTIONS): no more system option. + (KPSE_XPDF_SYSTEM_FLAGS): no-op. + 2020-04-21 Luigi Scarso <luigi.scarso@gmail.com> * kpse-pkgs.m4 (KPSE_LIBS_PKGS): add pplib. diff --git a/Build/source/m4/kpse-pkgs.m4 b/Build/source/m4/kpse-pkgs.m4 index c8832bd2247..08e9d8beae9 100644 --- a/Build/source/m4/kpse-pkgs.m4 +++ b/Build/source/m4/kpse-pkgs.m4 @@ -1,6 +1,6 @@ # $Id$ # Private Autoconf macros for the TeX Live (TL) tree. -# Copyright 2016-2019 Karl Berry <tex-live@tug.org> +# Copyright 2016-2020 Karl Berry <tex-live@tug.org> # Copyright 2009-2015 Peter Breitenlohner <tex-live@tug.org> # # This file is free software; the copyright holder @@ -32,7 +32,6 @@ teckit graphite2 zziplib xpdf -poppler mpfr gmp cairo @@ -68,7 +67,6 @@ AC_REQUIRE([KPSE_PIXMAN_SYSTEM_FLAGS])[]dnl AC_REQUIRE([KPSE_CAIRO_SYSTEM_FLAGS])[]dnl AC_REQUIRE([KPSE_GMP_SYSTEM_FLAGS])[]dnl AC_REQUIRE([KPSE_MPFR_SYSTEM_FLAGS])[]dnl -AC_REQUIRE([KPSE_POPPLER_SYSTEM_FLAGS])[]dnl AC_REQUIRE([KPSE_XPDF_SYSTEM_FLAGS])[]dnl AC_REQUIRE([KPSE_ZZIPLIB_SYSTEM_FLAGS])[]dnl AC_REQUIRE([KPSE_GRAPHITE2_SYSTEM_FLAGS])[]dnl diff --git a/Build/source/m4/kpse-poppler-flags.m4 b/Build/source/m4/kpse-poppler-flags.m4 deleted file mode 100644 index 812d8c7d028..00000000000 --- a/Build/source/m4/kpse-poppler-flags.m4 +++ /dev/null @@ -1,34 +0,0 @@ -# Public macros for the TeX Live (TL) tree. -# Copyright (C) 2011-2015 Peter Breitenlohner <tex-live@tug.org> -# -# This file is free software; the copyright holder -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# KPSE_POPPLER_FLAGS -# ------------------ -# Provide the configure option '--with-system-poppler' (if in the TL tree). -# -# Set the make variables POPPLER_INCLUDES and POPPLER_LIBS to the CPPFLAGS and -# LIBS required for the `-lpoppler' library in libs/poppler/ of the TL tree. -AC_DEFUN([KPSE_POPPLER_FLAGS], [dnl -AC_REQUIRE([KPSE_CHECK_WIN32])[]dnl -AC_REQUIRE([KPSE_ZLIB_FLAGS])[]dnl -_KPSE_LIB_FLAGS([poppler], [poppler], [], - [-IBLD/libs/poppler/include], - [BLD/libs/poppler/libpoppler.a], [], - [], [${top_builddir}/../../libs/poppler/include/Stream.h])[]dnl -test "x$kpse_cv_have_win32" = xno || POPPLER_LIBS="$POPPLER_LIBS -lgdi32" -]) # KPSE_POPPLER_FLAGS - -# KPSE_POPPLER_OPTIONS([WITH-SYSTEM]) -# ----------------------------------- -AC_DEFUN([KPSE_POPPLER_OPTIONS], [_KPSE_LIB_OPTIONS([poppler], [$1], [pkg-config])]) - -# KPSE_POPPLER_SYSTEM_FLAGS -# ------------------------- -AC_DEFUN([KPSE_POPPLER_SYSTEM_FLAGS], [dnl -_KPSE_PKG_CONFIG_FLAGS([poppler], [poppler], [0.30]) -POPPLER_VERSION='-DPOPPLER_VERSION=\"'`$PKG_CONFIG poppler --modversion`'\"' -POPPLER_INCLUDES="$POPPLER_VERSION $POPPLER_INCLUDES" -]) # KPSE_POPPLER_SYSTEM_FLAGS diff --git a/Build/source/m4/kpse-xpdf-flags.m4 b/Build/source/m4/kpse-xpdf-flags.m4 index e2207b8ad5e..9e4f718f589 100644 --- a/Build/source/m4/kpse-xpdf-flags.m4 +++ b/Build/source/m4/kpse-xpdf-flags.m4 @@ -1,9 +1,29 @@ +# $Id$ # Public macros for the TeX Live (TL) tree. -# Copyright (C) 2009-2015 Peter Breitenlohner <tex-live@tug.org> +# Copyright 2015-2020 Karl Berry <tex-live@tug.org> +# Copyright 2009-2015 Peter Breitenlohner <tex-live@tug.org> # # This file is free software; the copyright holder # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# +# Support for our semi-homegrown libs/xpdf library. This is derived +# from xpdf source code, but xpdf does not distribute it as a library. +# It is used by pdftex (and nothing else) to read PDF images. +# Other engines use the semi-homegrown pplib library (q.v.) for that. + +# The well-known poppler library is also originally derived from xpdf +# source code, but has been greatly revised and extended. TL used to +# (sort of) support poppler as the system xpdf, but after the TL 2020 +# release we dropped this, because we switched XeTeX to use pplib, and +# nothing else used poppler. (No engines ever used poppler to generate +# their PDF output). +# +# poppler is aggressively developed, with requirements for new compilers +# and language versions. That's fine for them, but since we don't need +# anything new, it has become too time-consuming and problematic to +# continue to support it in the TL sources, when we don't have any +# requirement for it. # KPSE_XPDF_FLAGS # --------------- @@ -20,19 +40,25 @@ _KPSE_LIB_FLAGS([xpdf], [xpdf], [], test "x$kpse_cv_have_win32" = xno || XPDF_LIBS="$XPDF_LIBS -lgdi32" ]) # KPSE_XPDF_FLAGS -# KPSE_XPDF_OPTIONS([WITH-SYSTEM]) +# KPSE_XPDF_OPTIONS([WITH-SYSTEM]) -- as above, no more poppler. +# Keep this macro's expansion as a valid shell command, though. +# since it is used internally in the configure scripts. # -------------------------------- -AC_DEFUN([KPSE_XPDF_OPTIONS], -[m4_ifval([$1], - [AC_ARG_WITH([system-xpdf], - AS_HELP_STRING([--with-system-xpdf], - [use installed poppler headers and library instead of xpdf library from TL (requires pkg-config)]))])[]dnl +AC_DEFUN([KPSE_XPDF_OPTIONS], [dnl +: "kpse_xpdf_options - no-op" ]) # KPSE_XPDF_OPTIONS +dnl [m4_ifval([$1], +dnl [AC_ARG_WITH([system-xpdf], +dnl AS_HELP_STRING([--with-system-xpdf], +dnl [use installed poppler headers and library instead of xpdf library from TL (requires pkg-config)]))])[]dnl +dnl ]) # KPSE_XPDF_OPTIONS -# KPSE_XPDF_SYSTEM_FLAGS +# KPSE_XPDF_SYSTEM_FLAGS -- as above, no more poppler. # ---------------------- AC_DEFUN([KPSE_XPDF_SYSTEM_FLAGS], [dnl -_KPSE_PKG_CONFIG_FLAGS([xpdf], [poppler], [0.12]) -POPPLER_VERSION='-DPOPPLER_VERSION=\"'`$PKG_CONFIG poppler --modversion`'\"' -XPDF_INCLUDES="$POPPLER_VERSION $XPDF_INCLUDES" +: "kpse_xpdf_system_flags - no-op" ]) # KPSE_XPDF_SYSTEM_FLAGS +dnl _KPSE_PKG_CONFIG_FLAGS([xpdf], [poppler], [0.12]) +dnl POPPLER_VERSION='-DPOPPLER_VERSION=\"'`$PKG_CONFIG poppler --modversion`'\"' +dnl XPDF_INCLUDES="$POPPLER_VERSION $XPDF_INCLUDES" +dnl ]) # KPSE_XPDF_SYSTEM_FLAGS diff --git a/Build/source/texk/Makefile.in b/Build/source/texk/Makefile.in index d02ad8cfd91..f871e1e1305 100644 --- a/Build/source/texk/Makefile.in +++ b/Build/source/texk/Makefile.in @@ -107,7 +107,6 @@ am__aclocal_m4_deps = $(top_srcdir)/../m4/kpse-cairo-flags.m4 \ $(top_srcdir)/../m4/kpse-options.m4 \ $(top_srcdir)/../m4/kpse-pixman-flags.m4 \ $(top_srcdir)/../m4/kpse-pkgs.m4 \ - $(top_srcdir)/../m4/kpse-poppler-flags.m4 \ $(top_srcdir)/../m4/kpse-ptexenc-flags.m4 \ $(top_srcdir)/../m4/kpse-setup.m4 \ $(top_srcdir)/../m4/kpse-teckit-flags.m4 \ @@ -178,7 +177,6 @@ am__aclocal_m4_deps = $(top_srcdir)/../m4/kpse-cairo-flags.m4 \ $(top_srcdir)/../libs/graphite2/ac/withenable.ac \ $(top_srcdir)/../libs/zziplib/ac/withenable.ac \ $(top_srcdir)/../libs/xpdf/ac/withenable.ac \ - $(top_srcdir)/../libs/poppler/ac/withenable.ac \ $(top_srcdir)/../libs/mpfr/ac/withenable.ac \ $(top_srcdir)/../libs/gmp/ac/withenable.ac \ $(top_srcdir)/../libs/cairo/ac/withenable.ac \ diff --git a/Build/source/texk/aclocal.m4 b/Build/source/texk/aclocal.m4 index 023c395f2e4..e17f1337fed 100644 --- a/Build/source/texk/aclocal.m4 +++ b/Build/source/texk/aclocal.m4 @@ -1189,7 +1189,6 @@ m4_include([../m4/kpse-mpfr-flags.m4]) m4_include([../m4/kpse-options.m4]) m4_include([../m4/kpse-pixman-flags.m4]) m4_include([../m4/kpse-pkgs.m4]) -m4_include([../m4/kpse-poppler-flags.m4]) m4_include([../m4/kpse-ptexenc-flags.m4]) m4_include([../m4/kpse-setup.m4]) m4_include([../m4/kpse-teckit-flags.m4]) diff --git a/Build/source/texk/configure b/Build/source/texk/configure index d0b1a78e9b7..37ac5f7b419 100755 --- a/Build/source/texk/configure +++ b/Build/source/texk/configure @@ -812,8 +812,6 @@ with_system_icu with_system_teckit with_system_graphite2 with_system_zziplib -with_system_xpdf -with_system_poppler with_system_mpfr with_mpfr_includes with_mpfr_libdir @@ -1642,10 +1640,6 @@ Optional Packages: (requires pkg-config) --with-system-zziplib use installed zziplib headers and library (requires pkg-config) - --with-system-xpdf use installed poppler headers and library instead of - xpdf library from TL (requires pkg-config) - --with-system-poppler use installed poppler headers and library (requires - pkg-config) --with-system-mpfr use installed mpfr headers and library --with-mpfr-includes=DIR mpfr headers installed in DIR @@ -4007,7 +4001,7 @@ if test "${enable_xetex_synctex+set}" = set; then : fi test "x$enable_web2c:$enable_xetex" = xyes:yes && { - need_poppler=yes + need_pplib=yes need_libpng=yes need_freetype2=yes need_teckit=yes @@ -5119,11 +5113,7 @@ test "x$need_zziplib" = xyes && { ## libs/xpdf/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/xpdf/ ## configure options and TL libraries required for xpdf - -# Check whether --with-system-xpdf was given. -if test "${with_system_xpdf+set}" = set; then : - withval=$with_system_xpdf; -fi +: "kpse_xpdf_options - no-op" if test "x$with_system_xpdf" = x; then if test -f $srcdir/../libs/xpdf/configure; then { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`xpdf' headers and library from TL tree" >&5 @@ -5137,40 +5127,6 @@ $as_echo "$as_me: Assuming installed \`xpdf' headers and library" >&6;} ac_configure_args="$ac_configure_args '--with-system-xpdf=$with_system_xpdf'" fi -## libs/poppler/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/poppler/ -## configure options and TL libraries required for poppler - -# Check whether --with-system-poppler was given. -if test "${with_system_poppler+set}" = set; then : - withval=$with_system_poppler; -fi -if test "x$with_system_poppler" = x; then - if test -f $srcdir/../libs/poppler/configure; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`poppler' headers and library from TL tree" >&5 -$as_echo "$as_me: Assuming \`poppler' headers and library from TL tree" >&6;} - with_system_poppler=no - else - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming installed \`poppler' headers and library" >&5 -$as_echo "$as_me: Assuming installed \`poppler' headers and library" >&6;} - with_system_poppler=yes - fi - ac_configure_args="$ac_configure_args '--with-system-poppler=$with_system_poppler'" -fi -if test "x$with_system_poppler" = xyes; then - if test "x$with_system_zlib" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: -> installed \`zlib' headers and library" >&5 -$as_echo "$as_me: -> installed \`zlib' headers and library" >&6;} - with_system_zlib=yes - ac_configure_args="$ac_configure_args '--with-system-zlib'" - elif test "x$with_system_zlib" != xyes; then - as_fn_error $? "Sorry, \`--with-system-poppler' requires \`--with-system-zlib'" "$LINENO" 5 - fi -fi - -test "x$need_poppler" = xyes && { - need_zlib=yes -} - ## libs/mpfr/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/mpfr/ ## configure options and TL libraries required for mpfr diff --git a/Build/source/texk/dvidvi/Makefile.in b/Build/source/texk/dvidvi/Makefile.in index 5f47ac0e5ac..d7ff87f8ac3 100644 --- a/Build/source/texk/dvidvi/Makefile.in +++ b/Build/source/texk/dvidvi/Makefile.in @@ -100,7 +100,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../../m4/kpse-common.m4 \ $(top_srcdir)/../../m4/ltsugar.m4 \ $(top_srcdir)/../../m4/ltversion.m4 \ $(top_srcdir)/../../m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/../../version.ac $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ diff --git a/Build/source/texk/dvidvi/configure b/Build/source/texk/dvidvi/configure index e01e71e79a1..35fdadea359 100755 --- a/Build/source/texk/dvidvi/configure +++ b/Build/source/texk/dvidvi/configure @@ -741,7 +741,6 @@ infodir docdir oldincludedir includedir -runstatedir localstatedir sharedstatedir sysconfdir @@ -828,7 +827,6 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1081,15 +1079,6 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; - -runstatedir | --runstatedir | --runstatedi | --runstated \ - | --runstate | --runstat | --runsta | --runst | --runs \ - | --run | --ru | --r) - ac_prev=runstatedir ;; - -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ - | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ - | --run=* | --ru=* | --r=*) - runstatedir=$ac_optarg ;; - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1227,7 +1216,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir runstatedir + libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1380,7 +1369,6 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -12698,7 +12686,7 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -12744,7 +12732,7 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -12768,7 +12756,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -12813,7 +12801,7 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -12837,7 +12825,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; diff --git a/Build/source/texk/dviout-util/Makefile.in b/Build/source/texk/dviout-util/Makefile.in index 923f7ae871a..87f240bcacd 100644 --- a/Build/source/texk/dviout-util/Makefile.in +++ b/Build/source/texk/dviout-util/Makefile.in @@ -543,7 +543,6 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ -runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/Build/source/texk/dvipdfm-x/Makefile.in b/Build/source/texk/dvipdfm-x/Makefile.in index c7d8f46d793..3a1d69ec6e3 100644 --- a/Build/source/texk/dvipdfm-x/Makefile.in +++ b/Build/source/texk/dvipdfm-x/Makefile.in @@ -628,7 +628,6 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ -runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/Build/source/texk/dvipsk/Makefile.in b/Build/source/texk/dvipsk/Makefile.in index b39e6e2e71d..553e2b61881 100644 --- a/Build/source/texk/dvipsk/Makefile.in +++ b/Build/source/texk/dvipsk/Makefile.in @@ -657,7 +657,6 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ -runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/Build/source/texk/seetexk/Makefile.in b/Build/source/texk/seetexk/Makefile.in index 15bc8b6a944..fdcce509df8 100644 --- a/Build/source/texk/seetexk/Makefile.in +++ b/Build/source/texk/seetexk/Makefile.in @@ -102,7 +102,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../../m4/kpse-common.m4 \ $(top_srcdir)/../../m4/ltsugar.m4 \ $(top_srcdir)/../../m4/ltversion.m4 \ $(top_srcdir)/../../m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/../../version.ac $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ diff --git a/Build/source/texk/seetexk/configure b/Build/source/texk/seetexk/configure index 242dc767c3b..3da81e7ff2b 100755 --- a/Build/source/texk/seetexk/configure +++ b/Build/source/texk/seetexk/configure @@ -739,7 +739,6 @@ infodir docdir oldincludedir includedir -runstatedir localstatedir sharedstatedir sysconfdir @@ -826,7 +825,6 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1079,15 +1077,6 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; - -runstatedir | --runstatedir | --runstatedi | --runstated \ - | --runstate | --runstat | --runsta | --runst | --runs \ - | --run | --ru | --r) - ac_prev=runstatedir ;; - -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ - | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ - | --run=* | --ru=* | --r=*) - runstatedir=$ac_optarg ;; - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1225,7 +1214,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir runstatedir + libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1378,7 +1367,6 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -12696,7 +12684,7 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -12742,7 +12730,7 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -12766,7 +12754,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -12811,7 +12799,7 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -12835,7 +12823,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; diff --git a/Build/source/texk/texlive/linked_scripts/Makefile.in b/Build/source/texk/texlive/linked_scripts/Makefile.in index f04d1b24fad..2b1e2ad3761 100644 --- a/Build/source/texk/texlive/linked_scripts/Makefile.in +++ b/Build/source/texk/texlive/linked_scripts/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff --git a/Build/source/texk/web2c/ChangeLog b/Build/source/texk/web2c/ChangeLog index 4d41ed72b14..edf1415be1f 100644 --- a/Build/source/texk/web2c/ChangeLog +++ b/Build/source/texk/web2c/ChangeLog @@ -1,3 +1,10 @@ +2020-05-14 Karl Berry <karl@freefriends.org> + + * Makefile.am (POPPLER_RULE): remove. + * ac/web2c.ac (kpse_tex_progs) <xetex>: now depends on pplib + instead of poppler. + * configure.ac (KPSE_POPPLER_FLAGS): remove. + 2020-05-05 Andreas Scherer <https://ascherer.github.io> * mft.ch: Restore section numbering from mft.web. diff --git a/Build/source/texk/web2c/Makefile.am b/Build/source/texk/web2c/Makefile.am index cdf26e5929b..7393c56a53e 100644 --- a/Build/source/texk/web2c/Makefile.am +++ b/Build/source/texk/web2c/Makefile.am @@ -1,7 +1,7 @@ ## $Id$ ## Makefile.am for the TeX Live subdirectory texk/web2c/. ## -## Copyright 2017 Karl Berry <tex-live@tug.org> +## Copyright 2017-2020 Karl Berry <tex-live@tug.org> ## Copyright 2009-2015 Peter Breitenlohner <tex-live@tug.org> ## You may freely use, modify and/or distribute this file. ## @@ -109,8 +109,6 @@ $(proglib): ${srcdir}/lib/*.c @XPDF_RULE@ ## Rebuild pplib @PPLIB_RULE@ -## Rebuild poppler -@POPPLER_RULE@ ## Rebuild libzzip @ZZIPLIB_RULE@ ## Rebuild libTEXkit diff --git a/Build/source/texk/web2c/Makefile.in b/Build/source/texk/web2c/Makefile.in index ed190aa9398..59f30b35f89 100644 --- a/Build/source/texk/web2c/Makefile.in +++ b/Build/source/texk/web2c/Makefile.in @@ -383,7 +383,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/web2c-disable.m4 \ $(top_srcdir)/../../m4/kpse-macos-framework.m4 \ $(top_srcdir)/../../m4/kpse-mpfr-flags.m4 \ $(top_srcdir)/../../m4/kpse-pixman-flags.m4 \ - $(top_srcdir)/../../m4/kpse-poppler-flags.m4 \ $(top_srcdir)/../../m4/kpse-pplib-flags.m4 \ $(top_srcdir)/../../m4/kpse-ptexenc-flags.m4 \ $(top_srcdir)/../../m4/kpse-socket-libs.m4 \ @@ -2741,9 +2740,6 @@ PIXMAN_DEPEND = @PIXMAN_DEPEND@ PIXMAN_INCLUDES = @PIXMAN_INCLUDES@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -POPPLER_DEPEND = @POPPLER_DEPEND@ -POPPLER_INCLUDES = @POPPLER_INCLUDES@ -POPPLER_LIBS = @POPPLER_LIBS@ PPLIB_DEPEND = @PPLIB_DEPEND@ PPLIB_INCLUDES = @PPLIB_INCLUDES@ PPLIB_LIBS = @PPLIB_LIBS@ @@ -17830,7 +17826,6 @@ $(proglib): ${srcdir}/lib/*.c @MPFR_RULE@ @XPDF_RULE@ @PPLIB_RULE@ -@POPPLER_RULE@ @ZZIPLIB_RULE@ @TECKIT_RULE@ @ICU_RULE@ diff --git a/Build/source/texk/web2c/ac/web2c.ac b/Build/source/texk/web2c/ac/web2c.ac index 890ff13e41a..c9bbe115f7d 100644 --- a/Build/source/texk/web2c/ac/web2c.ac +++ b/Build/source/texk/web2c/ac/web2c.ac @@ -1,7 +1,7 @@ # $Id$ # texk/web2c/ac/web2c.ac: configure.ac fragment for the TeX Live subdirectory texk/web2c/ dnl -dnl Copyright 2016-2019 Karl Berry <tex-live@tug.org> +dnl Copyright 2015-2019 Karl Berry <tex-live@tug.org> dnl Copyright 2009-2015 Peter Breitenlohner <tex-live@tug.org> dnl You may freely use, modify and/or distribute this file. dnl @@ -44,7 +44,7 @@ m4_define([kpse_tex_progs], [dnl [[mp], [yes], [], [MetaPost], [mpfr cairo libpng]], [[pmp], [yes], [], [pMetaPost], [mpfr cairo libpng ptexenc]], [[upmp], [yes], [], [upMetaPost], [mpfr cairo libpng ptexenc]], -[[xetex], [yes], [yes], [XeTeX], [poppler libpng freetype2 teckit harfbuzz]], +[[xetex], [yes], [yes], [XeTeX], [pplib libpng freetype2 teckit harfbuzz]], ])[]dnl m4_foreach([Kpse_Prog], [kpse_tex_progs], [m4_ifset([Kpse_Prog], diff --git a/Build/source/texk/web2c/aclocal.m4 b/Build/source/texk/web2c/aclocal.m4 index 8b84c66565d..e520a23edf3 100644 --- a/Build/source/texk/web2c/aclocal.m4 +++ b/Build/source/texk/web2c/aclocal.m4 @@ -1232,7 +1232,6 @@ m4_include([../../m4/kpse-luajit-flags.m4]) m4_include([../../m4/kpse-macos-framework.m4]) m4_include([../../m4/kpse-mpfr-flags.m4]) m4_include([../../m4/kpse-pixman-flags.m4]) -m4_include([../../m4/kpse-poppler-flags.m4]) m4_include([../../m4/kpse-pplib-flags.m4]) m4_include([../../m4/kpse-ptexenc-flags.m4]) m4_include([../../m4/kpse-socket-libs.m4]) diff --git a/Build/source/texk/web2c/configure b/Build/source/texk/web2c/configure index 2404cc1cdcb..e247b2c89aa 100755 --- a/Build/source/texk/web2c/configure +++ b/Build/source/texk/web2c/configure @@ -676,10 +676,6 @@ XPDF_RULE XPDF_DEPEND XPDF_LIBS XPDF_INCLUDES -POPPLER_RULE -POPPLER_DEPEND -POPPLER_LIBS -POPPLER_INCLUDES MPFR_RULE MPFR_DEPEND MPFR_LIBS @@ -1057,8 +1053,6 @@ with_gmp_libdir with_system_mpfr with_mpfr_includes with_mpfr_libdir -with_system_poppler -with_system_xpdf with_system_zziplib with_system_teckit with_system_graphite2 @@ -1816,10 +1810,6 @@ Optional Packages: --with-mpfr-includes=DIR mpfr headers installed in DIR --with-mpfr-libdir=DIR mpfr library installed in DIR - --with-system-poppler use installed poppler headers and library (requires - pkg-config) - --with-system-xpdf use installed poppler headers and library instead of - xpdf library from TL (requires pkg-config) --with-system-zziplib use installed zziplib headers and library (requires pkg-config) --with-system-teckit use installed teckit headers and library (requires @@ -18912,7 +18902,7 @@ if test "${enable_xetex_synctex+set}" = set; then : fi test "x$enable_web2c:$enable_xetex" = xyes:yes && { - need_poppler=yes + need_pplib=yes need_libpng=yes need_freetype2=yes need_teckit=yes @@ -19040,11 +19030,10 @@ fi -# XeTeX now requires C++11 because poppler does :(. -# XeTeX also requires C+11 because of ICU. +# XeTeX now requires C++11 because ICU does :(. if test "x$enable_xetex" = xyes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++11, since XeTeX enabled" >&5 -$as_echo "$as_me: checking for C++11, since XeTeX enabled" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++11, since XeTeX is enabled" >&5 +$as_echo "$as_me: checking for C++11, since XeTeX is enabled" >&6;} ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' @@ -25514,54 +25503,12 @@ ${top_builddir}/../../libs/mpfr/include/mpfr.h: cd ${top_builddir}/../../libs/mpfr && $(MAKE) $(AM_MAKEFLAGS) rebuild' fi -##tldbg _KPSE_LIB_FLAGS: Setup poppler (-lpoppler) flags. -echo 'tldbg:_KPSE_LIB_FLAGS called: libdir=poppler, libname=poppler, options=, tlincl=-IBLD/libs/poppler/include, tllib=BLD/libs/poppler/libpoppler.a, tlextra=, rebuildsrcdeps=, rebuildblddeps=${top_builddir}/../../libs/poppler/include/Stream.h.' >&5 -##tldbg _KPSE_LIB_FLAGS_TL: poppler (poppler) . - -# Check whether --with-system-poppler was given. -if test "${with_system_poppler+set}" = set; then : - withval=$with_system_poppler; -fi -if test "x$with_system_poppler" = xyes; then - if $PKG_CONFIG poppler --atleast-version=0.30; then - POPPLER_INCLUDES=`$PKG_CONFIG poppler --cflags` - POPPLER_LIBS=`$PKG_CONFIG poppler --libs` -elif test "x$need_poppler:$with_system_poppler" = xyes:yes; then - as_fn_error $? "did not find poppler 0.30 or better" "$LINENO" 5 -fi - -POPPLER_VERSION='-DPOPPLER_VERSION=\"'`$PKG_CONFIG poppler --modversion`'\"' -POPPLER_INCLUDES="$POPPLER_VERSION $POPPLER_INCLUDES" -else - POPPLER_INCLUDES="-I$kpse_BLD/libs/poppler/include" - POPPLER_LIBS="$kpse_BLD/libs/poppler/libpoppler.a" - POPPLER_DEPEND='${top_builddir}/../../libs/poppler/libpoppler.a' - POPPLER_RULE='# Rebuild libpoppler -$(POPPLER_DEPEND): ${top_builddir}/../../libs/poppler/include/Stream.h - cd ${top_builddir}/../../libs/poppler && $(MAKE) $(AM_MAKEFLAGS) rebuild -${top_builddir}/../../libs/poppler/include/Stream.h: - cd ${top_builddir}/../../libs/poppler && $(MAKE) $(AM_MAKEFLAGS) rebuild' -fi -test "x$kpse_cv_have_win32" = xno || POPPLER_LIBS="$POPPLER_LIBS -lgdi32" - ##tldbg _KPSE_LIB_FLAGS: Setup xpdf (-lxpdf) flags. echo 'tldbg:_KPSE_LIB_FLAGS called: libdir=xpdf, libname=xpdf, options=, tlincl=-DPDF_PARSER_ONLY -IBLD/libs/xpdf -IBLD/libs/xpdf/goo -IBLD/libs/xpdf/xpdf, tllib=BLD/libs/xpdf/libxpdf.a, tlextra=, rebuildsrcdeps=, rebuildblddeps=${top_builddir}/../../libs/xpdf/xpdf/Stream.h.' >&5 ##tldbg _KPSE_LIB_FLAGS_TL: xpdf (xpdf) . - -# Check whether --with-system-xpdf was given. -if test "${with_system_xpdf+set}" = set; then : - withval=$with_system_xpdf; -fi +: "kpse_xpdf_options - no-op" if test "x$with_system_xpdf" = xyes; then - if $PKG_CONFIG poppler --atleast-version=0.12; then - XPDF_INCLUDES=`$PKG_CONFIG poppler --cflags` - XPDF_LIBS=`$PKG_CONFIG poppler --libs` -elif test "x$need_xpdf:$with_system_xpdf" = xyes:yes; then - as_fn_error $? "did not find poppler 0.12 or better" "$LINENO" 5 -fi - -POPPLER_VERSION='-DPOPPLER_VERSION=\"'`$PKG_CONFIG poppler --modversion`'\"' -XPDF_INCLUDES="$POPPLER_VERSION $XPDF_INCLUDES" + : "kpse_xpdf_system_flags - no-op" else XPDF_INCLUDES="-DPDF_PARSER_ONLY -I$kpse_BLD/libs/xpdf -I$kpse_BLD/libs/xpdf/goo -I$kpse_BLD/libs/xpdf/xpdf" XPDF_LIBS="$kpse_BLD/libs/xpdf/libxpdf.a" @@ -25994,9 +25941,6 @@ else fi -eval CPPFLAGS=\"$POPPLER_INCLUDES \$CPPFLAGS\" -eval LIBS=\"$POPPLER_LIBS \$LIBS\" - ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' diff --git a/Build/source/texk/web2c/configure.ac b/Build/source/texk/web2c/configure.ac index 9ddc894afa0..f2ecd7f26ca 100644 --- a/Build/source/texk/web2c/configure.ac +++ b/Build/source/texk/web2c/configure.ac @@ -46,10 +46,9 @@ KPSE_LT_HACK KPSE_WEB2C_PREPARE m4_include([ac/web2c.ac]) -# XeTeX now requires C++11 because poppler does :(. -# XeTeX also requires C+11 because of ICU. +# XeTeX now requires C++11 because ICU does :(. if test "x$enable_xetex" = xyes; then - AC_MSG_NOTICE([checking for C++11, since XeTeX enabled]) + AC_MSG_NOTICE([checking for C++11, since XeTeX is enabled]) AX_CXX_COMPILE_STDCXX([11]) fi @@ -260,7 +259,6 @@ KPSE_PIXMAN_FLAGS KPSE_CAIRO_FLAGS KPSE_GMP_FLAGS KPSE_MPFR_FLAGS -KPSE_POPPLER_FLAGS KPSE_XPDF_FLAGS KPSE_ZZIPLIB_FLAGS KPSE_TECKIT_FLAGS @@ -305,7 +303,6 @@ fi AC_SUBST([KPATHSEA_PATHS_H]) dnl Check for Object::initCmd(const char *) etc -KPSE_ADD_FLAGS([poppler]) AC_LANG_PUSH([C++]) AC_MSG_CHECKING([for Object::[initCmd(const char*)] etc]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <Object.h>]], diff --git a/Build/source/texk/web2c/doc/Makefile.in b/Build/source/texk/web2c/doc/Makefile.in index a9063ea82bf..8b1a65d9cb4 100644 --- a/Build/source/texk/web2c/doc/Makefile.in +++ b/Build/source/texk/web2c/doc/Makefile.in @@ -113,7 +113,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/web2c-disable.m4 \ $(top_srcdir)/../../m4/kpse-macos-framework.m4 \ $(top_srcdir)/../../m4/kpse-mpfr-flags.m4 \ $(top_srcdir)/../../m4/kpse-pixman-flags.m4 \ - $(top_srcdir)/../../m4/kpse-poppler-flags.m4 \ $(top_srcdir)/../../m4/kpse-pplib-flags.m4 \ $(top_srcdir)/../../m4/kpse-ptexenc-flags.m4 \ $(top_srcdir)/../../m4/kpse-socket-libs.m4 \ @@ -360,9 +359,6 @@ PIXMAN_DEPEND = @PIXMAN_DEPEND@ PIXMAN_INCLUDES = @PIXMAN_INCLUDES@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -POPPLER_DEPEND = @POPPLER_DEPEND@ -POPPLER_INCLUDES = @POPPLER_INCLUDES@ -POPPLER_LIBS = @POPPLER_LIBS@ PPLIB_DEPEND = @PPLIB_DEPEND@ PPLIB_INCLUDES = @PPLIB_INCLUDES@ PPLIB_LIBS = @PPLIB_LIBS@ diff --git a/Build/source/texk/web2c/lib/Makefile.in b/Build/source/texk/web2c/lib/Makefile.in index 01dce3cb95a..5f2c3588f23 100644 --- a/Build/source/texk/web2c/lib/Makefile.in +++ b/Build/source/texk/web2c/lib/Makefile.in @@ -115,7 +115,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/web2c-disable.m4 \ $(top_srcdir)/../../m4/kpse-macos-framework.m4 \ $(top_srcdir)/../../m4/kpse-mpfr-flags.m4 \ $(top_srcdir)/../../m4/kpse-pixman-flags.m4 \ - $(top_srcdir)/../../m4/kpse-poppler-flags.m4 \ $(top_srcdir)/../../m4/kpse-pplib-flags.m4 \ $(top_srcdir)/../../m4/kpse-ptexenc-flags.m4 \ $(top_srcdir)/../../m4/kpse-socket-libs.m4 \ @@ -366,9 +365,6 @@ PIXMAN_DEPEND = @PIXMAN_DEPEND@ PIXMAN_INCLUDES = @PIXMAN_INCLUDES@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -POPPLER_DEPEND = @POPPLER_DEPEND@ -POPPLER_INCLUDES = @POPPLER_INCLUDES@ -POPPLER_LIBS = @POPPLER_LIBS@ PPLIB_DEPEND = @PPLIB_DEPEND@ PPLIB_INCLUDES = @PPLIB_INCLUDES@ PPLIB_LIBS = @PPLIB_LIBS@ diff --git a/Build/source/texk/web2c/man/Makefile.in b/Build/source/texk/web2c/man/Makefile.in index c20e82c9351..ce09a8010cd 100644 --- a/Build/source/texk/web2c/man/Makefile.in +++ b/Build/source/texk/web2c/man/Makefile.in @@ -136,7 +136,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/web2c-disable.m4 \ $(top_srcdir)/../../m4/kpse-macos-framework.m4 \ $(top_srcdir)/../../m4/kpse-mpfr-flags.m4 \ $(top_srcdir)/../../m4/kpse-pixman-flags.m4 \ - $(top_srcdir)/../../m4/kpse-poppler-flags.m4 \ $(top_srcdir)/../../m4/kpse-pplib-flags.m4 \ $(top_srcdir)/../../m4/kpse-ptexenc-flags.m4 \ $(top_srcdir)/../../m4/kpse-socket-libs.m4 \ @@ -344,9 +343,6 @@ PIXMAN_DEPEND = @PIXMAN_DEPEND@ PIXMAN_INCLUDES = @PIXMAN_INCLUDES@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -POPPLER_DEPEND = @POPPLER_DEPEND@ -POPPLER_INCLUDES = @POPPLER_INCLUDES@ -POPPLER_LIBS = @POPPLER_LIBS@ PPLIB_DEPEND = @PPLIB_DEPEND@ PPLIB_INCLUDES = @PPLIB_INCLUDES@ PPLIB_LIBS = @PPLIB_LIBS@ diff --git a/Build/source/texk/web2c/omegafonts/Makefile.in b/Build/source/texk/web2c/omegafonts/Makefile.in index 2bc6e951357..f5e207b5cf1 100644 --- a/Build/source/texk/web2c/omegafonts/Makefile.in +++ b/Build/source/texk/web2c/omegafonts/Makefile.in @@ -118,7 +118,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/web2c-disable.m4 \ $(top_srcdir)/../../m4/kpse-macos-framework.m4 \ $(top_srcdir)/../../m4/kpse-mpfr-flags.m4 \ $(top_srcdir)/../../m4/kpse-pixman-flags.m4 \ - $(top_srcdir)/../../m4/kpse-poppler-flags.m4 \ $(top_srcdir)/../../m4/kpse-pplib-flags.m4 \ $(top_srcdir)/../../m4/kpse-ptexenc-flags.m4 \ $(top_srcdir)/../../m4/kpse-socket-libs.m4 \ @@ -591,9 +590,6 @@ PIXMAN_DEPEND = @PIXMAN_DEPEND@ PIXMAN_INCLUDES = @PIXMAN_INCLUDES@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -POPPLER_DEPEND = @POPPLER_DEPEND@ -POPPLER_INCLUDES = @POPPLER_INCLUDES@ -POPPLER_LIBS = @POPPLER_LIBS@ PPLIB_DEPEND = @PPLIB_DEPEND@ PPLIB_INCLUDES = @PPLIB_INCLUDES@ PPLIB_LIBS = @PPLIB_LIBS@ diff --git a/Build/source/texk/web2c/otps/Makefile.in b/Build/source/texk/web2c/otps/Makefile.in index cf35999da69..31c4b7e79e5 100644 --- a/Build/source/texk/web2c/otps/Makefile.in +++ b/Build/source/texk/web2c/otps/Makefile.in @@ -118,7 +118,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/web2c-disable.m4 \ $(top_srcdir)/../../m4/kpse-macos-framework.m4 \ $(top_srcdir)/../../m4/kpse-mpfr-flags.m4 \ $(top_srcdir)/../../m4/kpse-pixman-flags.m4 \ - $(top_srcdir)/../../m4/kpse-poppler-flags.m4 \ $(top_srcdir)/../../m4/kpse-pplib-flags.m4 \ $(top_srcdir)/../../m4/kpse-ptexenc-flags.m4 \ $(top_srcdir)/../../m4/kpse-socket-libs.m4 \ @@ -625,9 +624,6 @@ PIXMAN_DEPEND = @PIXMAN_DEPEND@ PIXMAN_INCLUDES = @PIXMAN_INCLUDES@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -POPPLER_DEPEND = @POPPLER_DEPEND@ -POPPLER_INCLUDES = @POPPLER_INCLUDES@ -POPPLER_LIBS = @POPPLER_LIBS@ PPLIB_DEPEND = @PPLIB_DEPEND@ PPLIB_INCLUDES = @PPLIB_INCLUDES@ PPLIB_LIBS = @PPLIB_LIBS@ diff --git a/Build/source/texk/web2c/otps/win32/Makefile.in b/Build/source/texk/web2c/otps/win32/Makefile.in index f32331a7347..11334ec7b33 100644 --- a/Build/source/texk/web2c/otps/win32/Makefile.in +++ b/Build/source/texk/web2c/otps/win32/Makefile.in @@ -115,7 +115,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/web2c-disable.m4 \ $(top_srcdir)/../../m4/kpse-macos-framework.m4 \ $(top_srcdir)/../../m4/kpse-mpfr-flags.m4 \ $(top_srcdir)/../../m4/kpse-pixman-flags.m4 \ - $(top_srcdir)/../../m4/kpse-poppler-flags.m4 \ $(top_srcdir)/../../m4/kpse-pplib-flags.m4 \ $(top_srcdir)/../../m4/kpse-ptexenc-flags.m4 \ $(top_srcdir)/../../m4/kpse-socket-libs.m4 \ @@ -345,9 +344,6 @@ PIXMAN_DEPEND = @PIXMAN_DEPEND@ PIXMAN_INCLUDES = @PIXMAN_INCLUDES@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -POPPLER_DEPEND = @POPPLER_DEPEND@ -POPPLER_INCLUDES = @POPPLER_INCLUDES@ -POPPLER_LIBS = @POPPLER_LIBS@ PPLIB_DEPEND = @PPLIB_DEPEND@ PPLIB_INCLUDES = @PPLIB_INCLUDES@ PPLIB_LIBS = @PPLIB_LIBS@ diff --git a/Build/source/texk/web2c/pdftexdir/ChangeLog b/Build/source/texk/web2c/pdftexdir/ChangeLog index dd98cb54230..b4378b8a335 100644 --- a/Build/source/texk/web2c/pdftexdir/ChangeLog +++ b/Build/source/texk/web2c/pdftexdir/ChangeLog @@ -1,3 +1,22 @@ +2020-05-14 Karl Berry <karl@freefriends.org> + + * pdftoepdf-poppler0.68.0.cc, + * pdftoepdf-poppler0.69.0.cc, + * pdftoepdf-poppler0.70.0.cc, + * pdftoepdf-poppler0.71.0.cc, + * pdftoepdf-poppler0.72.0.cc, + * pdftoepdf-poppler0.75.0.cc, + * pdftoepdf-poppler0.76.0.cc, + * pdftoepdf-poppler0.83.0.cc, + * pdftoepdf-poppler0.86.0.cc, + * pdftosrc-newpoppler.cc, + * pdftosrc-poppler0.71.0.cc, + * pdftosrc-poppler0.72.0.cc, + * pdftosrc-poppler0.76.0.cc, + * pdftosrc-poppler0.83.0.cc: remove these interim stabs at poppler + support; now poppler is not supported in TL. + See source/m4/kpse-xpdf-flags.m4 for some discussion. + 2020-03-27 Karl Berry <karl@tug.org> * TeX Live 2020, pdftex 1.40.21. diff --git a/Build/source/texk/web2c/pdftexdir/pdftoepdf-poppler0.68.0.cc b/Build/source/texk/web2c/pdftexdir/pdftoepdf-poppler0.68.0.cc deleted file mode 100644 index 00d82436a97..00000000000 --- a/Build/source/texk/web2c/pdftexdir/pdftoepdf-poppler0.68.0.cc +++ /dev/null @@ -1,1113 +0,0 @@ -/* -Copyright 1996-2017 Han The Thanh, <thanh@pdftex.org> - -This file is part of pdfTeX. - -pdfTeX is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -pdfTeX is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -/* -This is based on the patch texlive-poppler-0.59.patch <2017-09-19> at -https://git.archlinux.org/svntogit/packages.git/plain/texlive-bin/trunk -by Arch Linux. A little modifications are made to avoid a crash for -some kind of pdf images, such as figure_missing.pdf in gnuplot. -The poppler should be 0.59.0, ..., 0.68.0. -POPPLER_VERSION should be defined. -*/ - -/* Do this early in order to avoid a conflict between - MINGW32 <rpcndr.h> defining 'boolean' as 'unsigned char' and - <kpathsea/types.h> defining Pascal's boolean as 'int'. -*/ -#include <w2c/config.h> -#include <kpathsea/lib.h> - -#include <stdlib.h> -#include <math.h> -#include <stddef.h> -#include <stdio.h> -#include <string.h> -#include <ctype.h> - -#ifdef POPPLER_VERSION -#include <dirent.h> -#include <poppler-config.h> -#include <goo/GooString.h> -#include <goo/gmem.h> -#include <goo/gfile.h> -#define GString GooString -#else -#error POPPLER_VERSION should be defined. -#endif -#include <assert.h> - -#include "Object.h" -#include "Stream.h" -#include "Array.h" -#include "Dict.h" -#include "XRef.h" -#include "Catalog.h" -#include "Link.h" -#include "Page.h" -#include "GfxFont.h" -#include "PDFDoc.h" -#include "GlobalParams.h" -#include "Error.h" - -// This file is mostly C and not very much C++; it's just used to interface -// the functions of xpdf, which are written in C++. - -extern "C" { -#include <pdftexdir/ptexmac.h> -#include <pdftexdir/pdftex-common.h> - -// These functions from pdftex.web gets declared in pdftexcoerce.h in the -// usual web2c way, but we cannot include that file here because C++ -// does not allow it. -extern int getpdfsuppresswarningpagegroup(void); -extern integer getpdfsuppressptexinfo(void); -extern integer zround(double); -} - -// The prefix "PTEX" for the PDF keys is special to pdfTeX; -// this has been registered with Adobe by Hans Hagen. - -#define pdfkeyprefix "PTEX" - -#define MASK_SUPPRESS_PTEX_FULLBANNER 0x01 -#define MASK_SUPPRESS_PTEX_FILENAME 0x02 -#define MASK_SUPPRESS_PTEX_PAGENUMBER 0x04 -#define MASK_SUPPRESS_PTEX_INFODICT 0x08 - -// When copying the Resources of the selected page, all objects are copied -// recusively top-down. Indirect objects however are not fetched during -// copying, but get a new object number from pdfTeX and then will be -// appended into a linked list. Duplicates are checked and removed from the -// list of indirect objects during appending. - -enum InObjType { - objFont, - objFontDesc, - objOther -}; - -struct InObj { - Ref ref; // ref in original PDF - InObjType type; // object type - InObj *next; // next entry in list of indirect objects - int num; // new object number in output PDF - fd_entry *fd; // pointer to /FontDescriptor object structure - int enc_objnum; // Encoding for objFont - int written; // has it been written to output PDF? -}; - -struct UsedEncoding { - int enc_objnum; - GfxFont *font; - UsedEncoding *next; -}; - -static InObj *inObjList; -static UsedEncoding *encodingList; -static GBool isInit = gFalse; - -// -------------------------------------------------------------------- -// Maintain list of open embedded PDF files -// -------------------------------------------------------------------- - -struct PdfDocument { - char *file_name; - PDFDoc *doc; - XRef *xref; - InObj *inObjList; - int occurences; // number of references to the document; the doc can be - // deleted when this is negative - PdfDocument *next; -}; - -static PdfDocument *pdfDocuments = 0; - -static XRef *xref = 0; - -// Returns pointer to PdfDocument record for PDF file. -// Creates a new record if it doesn't exist yet. -// xref is made current for the document. - -static PdfDocument *find_add_document(char *file_name) -{ - PdfDocument *p = pdfDocuments; - while (p && strcmp(p->file_name, file_name) != 0) - p = p->next; - if (p) { - xref = p->xref; - (p->occurences)++; - return p; - } - p = new PdfDocument; - p->file_name = xstrdup(file_name); - p->xref = xref = 0; - p->occurences = 0; - GString *docName = new GString(p->file_name); - p->doc = new PDFDoc(docName); // takes ownership of docName - if (!p->doc->isOk() || !p->doc->okToPrint()) { - pdftex_fail("xpdf: reading PDF image failed"); - } - p->inObjList = 0; - p->next = pdfDocuments; - pdfDocuments = p; - return p; -} - -// Deallocate a PdfDocument with all its resources - -static void delete_document(PdfDocument * pdf_doc) -{ - PdfDocument **p = &pdfDocuments; - while (*p && *p != pdf_doc) - p = &((*p)->next); - // should not happen: - if (!*p) - return; - // unlink from list - *p = pdf_doc->next; - // free pdf_doc's resources - InObj *r, *n; - for (r = pdf_doc->inObjList; r != 0; r = n) { - n = r->next; - delete r; - } - xref = pdf_doc->xref; - delete pdf_doc->doc; - xfree(pdf_doc->file_name); - delete pdf_doc; -} - -// -------------------------------------------------------------------- - -static int addEncoding(GfxFont * gfont) -{ - UsedEncoding *n; - n = new UsedEncoding; - n->next = encodingList; - encodingList = n; - n->font = gfont; - n->enc_objnum = pdfnewobjnum(); - return n->enc_objnum; -} - -#define addFont(ref, fd, enc_objnum) \ - addInObj(objFont, ref, fd, enc_objnum) - -// addFontDesc is only used to avoid writing the original FontDescriptor -// from the PDF file. - -#define addFontDesc(ref, fd) \ - addInObj(objFontDesc, ref, fd, 0) - -#define addOther(ref) \ - addInObj(objOther, ref, 0, 0) - -static int addInObj(InObjType type, Ref ref, fd_entry * fd, int e) -{ - InObj *p, *q, *n = new InObj; - if (ref.num == 0) - pdftex_fail("PDF inclusion: invalid reference"); - n->ref = ref; - n->type = type; - n->next = 0; - n->fd = fd; - n->enc_objnum = e; - n->written = 0; - if (inObjList == 0) - inObjList = n; - else { - for (p = inObjList; p != 0; p = p->next) { - if (p->ref.num == ref.num && p->ref.gen == ref.gen) { - delete n; - return p->num; - } - q = p; - } - // it is important to add new objects at the end of the list, - // because new objects are being added while the list is being - // written out. - q->next = n; - } - if (type == objFontDesc) - n->num = get_fd_objnum(fd); - else - n->num = pdfnewobjnum(); - return n->num; -} - -#if 0 /* unusewd */ -static int getNewObjectNumber(Ref ref) -{ - InObj *p; - if (inObjList == 0) { - pdftex_fail("No objects copied yet"); - } else { - for (p = inObjList; p != 0; p = p->next) { - if (p->ref.num == ref.num && p->ref.gen == ref.gen) { - return p->num; - } - } - pdftex_fail("Object not yet copied: %i %i", ref.num, ref.gen); - } -#ifdef _MSC_VER - /* Never reached, but without __attribute__((noreturn)) for pdftex_fail() - MSVC 5.0 requires an int return value. */ - return -60000; -#endif -} -#endif - -static void copyObject(Object *); - -static void copyName(char *s) -{ - pdf_puts("/"); - for (; *s != 0; s++) { - if (isdigit(*s) || isupper(*s) || islower(*s) || *s == '_' || - *s == '.' || *s == '-' || *s == '+') - pdfout(*s); - else - pdf_printf("#%.2X", *s & 0xFF); - } -} - -static void copyDictEntry(Object * obj, int i) -{ - Object obj1; - copyName((char *)obj->dictGetKey(i)); - pdf_puts(" "); - obj1 = obj->dictGetValNF(i); - copyObject(&obj1); - pdf_puts("\n"); -} - -static void copyDict(Object * obj) -{ - int i, l; - if (!obj->isDict()) - pdftex_fail("PDF inclusion: invalid dict type <%s>", - obj->getTypeName()); - for (i = 0, l = obj->dictGetLength(); i < l; ++i) - copyDictEntry(obj, i); -} - -static void copyFontDict(Object * obj, InObj * r) -{ - int i, l; - char *key; - if (!obj->isDict()) - pdftex_fail("PDF inclusion: invalid dict type <%s>", - obj->getTypeName()); - pdf_puts("<<\n"); - assert(r->type == objFont); // FontDescriptor is in fd_tree - for (i = 0, l = obj->dictGetLength(); i < l; ++i) { - key = obj->dictGetKey(i); - if (strncmp("FontDescriptor", key, strlen("FontDescriptor")) == 0 - || strncmp("BaseFont", key, strlen("BaseFont")) == 0 - || strncmp("Encoding", key, strlen("Encoding")) == 0) - continue; // skip original values - copyDictEntry(obj, i); - } - // write new FontDescriptor, BaseFont, and Encoding - pdf_printf("/FontDescriptor %d 0 R\n", get_fd_objnum(r->fd)); - pdf_printf("/BaseFont %d 0 R\n", get_fn_objnum(r->fd)); - pdf_printf("/Encoding %d 0 R\n", r->enc_objnum); - pdf_puts(">>"); -} - -static void copyStream(Stream * str) -{ - int c, c2 = 0; - str->reset(); - while ((c = str->getChar()) != EOF) { - pdfout(c); - c2 = c; - } - pdflastbyte = c2; -} - -static void copyProcSet(Object * obj) -{ - int i, l; - Object procset; - if (!obj->isArray()) - pdftex_fail("PDF inclusion: invalid ProcSet array type <%s>", - obj->getTypeName()); - pdf_puts("/ProcSet [ "); - for (i = 0, l = obj->arrayGetLength(); i < l; ++i) { - procset = obj->arrayGetNF(i); - if (!procset.isName()) - pdftex_fail("PDF inclusion: invalid ProcSet entry type <%s>", - procset.getTypeName()); - copyName((char *)procset.getName()); - pdf_puts(" "); - } - pdf_puts("]\n"); -} - -#define REPLACE_TYPE1C true - -static bool embeddableFont(Object * fontdesc) -{ - Object fontfile, ffsubtype; - - if (!fontdesc->isDict()) - return false; - fontfile = fontdesc->dictLookup("FontFile"); - if (fontfile.isStream()) - return true; - if (REPLACE_TYPE1C) { - fontfile = fontdesc->dictLookup("FontFile3"); - if (!fontfile.isStream()) - return false; - ffsubtype = fontfile.streamGetDict()->lookup("Subtype"); - return ffsubtype.isName() && !strcmp(ffsubtype.getName(), "Type1C"); - } - return false; -} - -static void copyFont(char *tag, Object * fontRef) -{ - Object fontdict, subtype, basefont, fontdescRef, fontdesc, charset, - stemV; - GfxFont *gfont; - fd_entry *fd; - fm_entry *fontmap; - // Check whether the font has already been embedded before analysing it. - InObj *p; - Ref ref = fontRef->getRef(); - for (p = inObjList; p; p = p->next) { - if (p->ref.num == ref.num && p->ref.gen == ref.gen) { - copyName(tag); - pdf_printf(" %d 0 R ", p->num); - return; - } - } - // Only handle included Type1 (and Type1C) fonts; anything else will be copied. - // Type1C fonts are replaced by Type1 fonts, if REPLACE_TYPE1C is true. - fontdict = fontRef->fetch(xref); - fontdesc = Object(objNull); - if (fontdict.isDict()) { - subtype = fontdict.dictLookup("Subtype"); - basefont = fontdict.dictLookup("BaseFont"); - fontdescRef = fontdict.dictLookupNF("FontDescriptor"); - if (fontdescRef.isRef()) { - fontdesc = fontdescRef.fetch(xref); - } - } - if (!fixedinclusioncopyfont && fontdict.isDict() - && subtype.isName() - && !strcmp(subtype.getName(), "Type1") - && basefont.isName() - && fontdescRef.isRef() - && fontdesc.isDict() - && embeddableFont(&fontdesc) - && (fontmap = lookup_fontmap((char *)basefont.getName())) != NULL) { - // round /StemV value, since the PDF input is a float - // (see Font Descriptors in PDF reference), but we only store an - // integer, since we don't want to change the struct. - stemV = fontdesc.dictLookup("StemV"); - fd = epdf_create_fontdescriptor(fontmap, zround(stemV.getNum())); - charset = fontdesc.dictLookup("CharSet"); - if (!charset.isNull() && - charset.isString() && is_subsetable(fontmap)) - epdf_mark_glyphs(fd, (char *)charset.getString()->getCString()); - else - embed_whole_font(fd); - addFontDesc(fontdescRef.getRef(), fd); - copyName(tag); - gfont = GfxFont::makeFont(xref, tag, fontRef->getRef(), - fontdict.getDict()); - pdf_printf(" %d 0 R ", addFont(fontRef->getRef(), fd, - addEncoding(gfont))); - } else { - copyName(tag); - pdf_puts(" "); - copyObject(fontRef); - } -} - -static void copyFontResources(Object * obj) -{ - Object fontRef; - int i, l; - if (!obj->isDict()) - pdftex_fail("PDF inclusion: invalid font resources dict type <%s>", - obj->getTypeName()); - pdf_puts("/Font << "); - for (i = 0, l = obj->dictGetLength(); i < l; ++i) { - fontRef = obj->dictGetValNF(i); - if (fontRef.isRef()) - copyFont(obj->dictGetKey(i), &fontRef); - else if (fontRef.isDict()) { // some programs generate pdf with embedded font object - copyName((char *)obj->dictGetKey(i)); - pdf_puts(" "); - copyObject(&fontRef); - } - else - pdftex_fail("PDF inclusion: invalid font in reference type <%s>", - fontRef.getTypeName()); - } - pdf_puts(">>\n"); -} - -static void copyOtherResources(Object * obj, char *key) -{ - // copies all other resources (write_epdf handles Fonts and ProcSets), - - // if Subtype is present, it must be a name - if (strcmp("Subtype", key) == 0) { - if (!obj->isName()) { - pdftex_warn("PDF inclusion: Subtype in Resources dict is not a name" - " (key '%s', type <%s>); ignored.", - key, obj->getTypeName()); - return; - } - } else if (!obj->isDict()) { - //FIXME: Write the message only to the log file - pdftex_warn("PDF inclusion: invalid other resource which is no dict" - " (key '%s', type <%s>); ignored.", - key, obj->getTypeName()); - return; - } - copyName(key); - pdf_puts(" "); - copyObject(obj); -} - -// Function onverts double to string; very small and very large numbers -// are NOT converted to scientific notation. -// n must be a number or real conforming to the implementation limits -// of PDF as specified in appendix C.1 of the PDF Ref. -// These are: -// maximum value of ints is +2^32 -// maximum value of reals is +2^15 -// smalles values of reals is 1/(2^16) - -static char *convertNumToPDF(double n) -{ - static const int precision = 6; - static const int fact = (int) 1E6; // must be 10^precision - static const double epsilon = 0.5E-6; // 2epsilon must be 10^-precision - static char buf[64]; - // handle very small values: return 0 - if (fabs(n) < epsilon) { - buf[0] = '0'; - buf[1] = '\0'; - } else { - char ints[64]; - int bindex = 0, sindex = 0; - int ival, fval; - // handle the sign part if n is negative - if (n < 0) { - buf[bindex++] = '-'; - n = -n; - } - n += epsilon; // for rounding - // handle the integer part, simply with sprintf - ival = (int) floor(n); - n -= ival; - sprintf(ints, "%d", ival); - while (ints[sindex] != 0) - buf[bindex++] = ints[sindex++]; - // handle the fractional part up to 'precision' digits - fval = (int) floor(n * fact); - if (fval) { - // set a dot - buf[bindex++] = '.'; - sindex = bindex + precision; - buf[sindex--] = '\0'; - // fill up trailing zeros with the string terminator NULL - while (((fval % 10) == 0) && (sindex >= bindex)) { - buf[sindex--] = '\0'; - fval /= 10; - } - // fill up the fractional part back to front - while (sindex >= bindex) { - buf[sindex--] = (fval % 10) + '0'; - fval /= 10; - } - } else - buf[bindex++] = 0; - } - return (char *) buf; -} - -static void copyObject(Object * obj) -{ - Object obj1; - int i, l, c; - Ref ref; - char *p; - GString *s; - if (obj->isBool()) { - pdf_printf("%s", obj->getBool()? "true" : "false"); - } else if (obj->isInt()) { - pdf_printf("%i", obj->getInt()); - } else if (obj->isReal()) { - pdf_printf("%s", convertNumToPDF(obj->getReal())); - } else if (obj->isNum()) { - pdf_printf("%s", convertNumToPDF(obj->getNum())); - } else if (obj->isString()) { - s = (GooString *)obj->getString(); - p = s->getCString(); - l = s->getLength(); - if (strlen(p) == (unsigned int) l) { - pdf_puts("("); - for (; *p != 0; p++) { - c = (unsigned char) *p; - if (c == '(' || c == ')' || c == '\\') - pdf_printf("\\%c", c); - else if (c < 0x20 || c > 0x7F) - pdf_printf("\\%03o", c); - else - pdfout(c); - } - pdf_puts(")"); - } else { - pdf_puts("<"); - for (i = 0; i < l; i++) { - c = s->getChar(i) & 0xFF; - pdf_printf("%.2x", c); - } - pdf_puts(">"); - } - } else if (obj->isName()) { - copyName((char *)obj->getName()); - } else if (obj->isNull()) { - pdf_puts("null"); - } else if (obj->isArray()) { - pdf_puts("["); - for (i = 0, l = obj->arrayGetLength(); i < l; ++i) { - obj1 = obj->arrayGetNF(i); - if (!obj1.isName()) - pdf_puts(" "); - copyObject(&obj1); - } - pdf_puts("]"); - } else if (obj->isDict()) { - pdf_puts("<<\n"); - copyDict(obj); - pdf_puts(">>"); - } else if (obj->isStream()) { - pdf_puts("<<\n"); - copyDict(obj->getStream()->getDictObject()); - pdf_puts(">>\n"); - pdf_puts("stream\n"); - copyStream(obj->getStream()->getUndecodedStream()); - pdf_puts("\nendstream"); - } else if (obj->isRef()) { - ref = obj->getRef(); - if (ref.num == 0) { - pdftex_fail - ("PDF inclusion: reference to invalid object" - " (is the included pdf broken?)"); - } else - pdf_printf("%d 0 R", addOther(ref)); - } else { - pdftex_fail("PDF inclusion: type <%s> cannot be copied", - obj->getTypeName()); - } -} - -static void writeRefs() -{ - InObj *r; - for (r = inObjList; r != 0; r = r->next) { - if (!r->written) { - r->written = 1; - Object obj1 = xref->fetch(r->ref.num, r->ref.gen); - if (r->type == objFont) { - assert(!obj1.isStream()); - pdfbeginobj(r->num, 2); // \pdfobjcompresslevel = 2 is for this - copyFontDict(&obj1, r); - pdf_puts("\n"); - pdfendobj(); - } else if (r->type != objFontDesc) { // /FontDescriptor is written via write_fontdescriptor() - if (obj1.isStream()) - pdfbeginobj(r->num, 0); - else - pdfbeginobj(r->num, 2); // \pdfobjcompresslevel = 2 is for this - copyObject(&obj1); - pdf_puts("\n"); - pdfendobj(); - } - } - } -} - -static void writeEncodings() -{ - UsedEncoding *r, *n; - char *glyphNames[256], *s; - int i; - for (r = encodingList; r != 0; r = r->next) { - for (i = 0; i < 256; i++) { - if (r->font->isCIDFont()) { - pdftex_fail - ("PDF inclusion: CID fonts are not supported" - " (try to disable font replacement to fix this)"); - } - if ((s = ((Gfx8BitFont *) r->font)->getCharName(i)) != 0) - glyphNames[i] = s; - else - glyphNames[i] = notdef; - } - epdf_write_enc(glyphNames, r->enc_objnum); - } - for (r = encodingList; r != 0; r = n) { - n = r->next; -#ifdef POPPLER_VERSION - r->font->decRefCnt(); -#else -#error POPPLER_VERSION should be defined. -#endif - delete r; - } -} - -// get the pagebox according to the pagebox_spec -static PDFRectangle *get_pagebox(Page * page, int pagebox_spec) -{ - if (pagebox_spec == pdfboxspecmedia) - return page->getMediaBox(); - else if (pagebox_spec == pdfboxspeccrop) - return page->getCropBox(); - else if (pagebox_spec == pdfboxspecbleed) - return page->getBleedBox(); - else if (pagebox_spec == pdfboxspectrim) - return page->getTrimBox(); - else if (pagebox_spec == pdfboxspecart) - return page->getArtBox(); - else - pdftex_fail("PDF inclusion: unknown value of pagebox spec (%i)", - (int) pagebox_spec); - return page->getMediaBox(); // to make the compiler happy -} - - -// Reads various information about the PDF and sets it up for later inclusion. -// This will fail if the PDF version of the PDF is higher than -// minor_pdf_version_wanted or page_name is given and can not be found. -// It makes no sense to give page_name _and_ page_num. -// Returns the page number. - -int -read_pdf_info(char *image_name, char *page_name, int page_num, - int pagebox_spec, int major_pdf_version_wanted, int minor_pdf_version_wanted, - int pdf_inclusion_errorlevel) -{ - PdfDocument *pdf_doc; - Page *page; - PDFRectangle *pagebox; -#ifdef POPPLER_VERSION - int pdf_major_version_found, pdf_minor_version_found; -#else -#error POPPLER_VERSION should be defined. -#endif - // initialize - if (!isInit) { - globalParams = new GlobalParams(); - globalParams->setErrQuiet(gFalse); - isInit = gTrue; - } - // open PDF file - pdf_doc = find_add_document(image_name); - epdf_doc = (void *) pdf_doc; - - // check PDF version - // this works only for PDF 1.x -- but since any versions of PDF newer - // than 1.x will not be backwards compatible to PDF 1.x, pdfTeX will - // then have to changed drastically anyway. -#ifdef POPPLER_VERSION - pdf_major_version_found = pdf_doc->doc->getPDFMajorVersion(); - pdf_minor_version_found = pdf_doc->doc->getPDFMinorVersion(); - if ((pdf_major_version_found > major_pdf_version_wanted) - || (pdf_minor_version_found > minor_pdf_version_wanted)) { - const char *msg = - "PDF inclusion: found PDF version <%d.%d>, but at most version <%d.%d> allowed"; - if (pdf_inclusion_errorlevel > 0) { - pdftex_fail(msg, pdf_major_version_found, pdf_minor_version_found, major_pdf_version_wanted, minor_pdf_version_wanted); - } else if (pdf_inclusion_errorlevel < 0) { - ; /* do nothing */ - } else { /* = 0, give warning */ - pdftex_warn(msg, pdf_major_version_found, pdf_minor_version_found, major_pdf_version_wanted, minor_pdf_version_wanted); - } - } -#else -#error POPPLER_VERSION should be defined. -#endif - epdf_num_pages = pdf_doc->doc->getCatalog()->getNumPages(); - if (page_name) { - // get page by name - GString name(page_name); - LinkDest *link = pdf_doc->doc->findDest(&name); - if (link == 0 || !link->isOk()) - pdftex_fail("PDF inclusion: invalid destination <%s>", page_name); - Ref ref = link->getPageRef(); - page_num = pdf_doc->doc->getCatalog()->findPage(ref.num, ref.gen); - if (page_num == 0) - pdftex_fail("PDF inclusion: destination is not a page <%s>", - page_name); - delete link; - } else { - // get page by number - if (page_num <= 0 || page_num > epdf_num_pages) - pdftex_fail("PDF inclusion: required page does not exist <%i>", - epdf_num_pages); - } - // get the required page - page = pdf_doc->doc->getCatalog()->getPage(page_num); - - // get the pagebox (media, crop...) to use. - pagebox = get_pagebox(page, pagebox_spec); - if (pagebox->x2 > pagebox->x1) { - epdf_orig_x = pagebox->x1; - epdf_width = pagebox->x2 - pagebox->x1; - } else { - epdf_orig_x = pagebox->x2; - epdf_width = pagebox->x1 - pagebox->x2; - } - if (pagebox->y2 > pagebox->y1) { - epdf_orig_y = pagebox->y1; - epdf_height = pagebox->y2 - pagebox->y1; - } else { - epdf_orig_y = pagebox->y2; - epdf_height = pagebox->y1 - pagebox->y2; - } - - // get page rotation - epdf_rotate = page->getRotate() % 360; - if (epdf_rotate < 0) - epdf_rotate += 360; - - // page group - if (page->getGroup() != NULL) - epdf_has_page_group = 1; // only flag that page group is present; - // the actual object number will be - // generated in pdftex.web - else - epdf_has_page_group = 0; // no page group present - - pdf_doc->xref = pdf_doc->doc->getXRef(); - return page_num; -} - -// writes the current epf_doc. -// Here the included PDF is copied, so most errors that can happen during PDF -// inclusion will arise here. - -void write_epdf(void) -{ - Page *page; - Ref *pageRef; - Dict *pageDict; - Object contents, obj1, obj2, pageObj, dictObj; - Object groupDict; - bool writeSepGroup = false; - Object info; - char *key; - char s[256]; - int i, l; - int rotate; - double scale[6] = { 0, 0, 0, 0, 0, 0 }; - bool writematrix = false; - int suppress_ptex_info = getpdfsuppressptexinfo(); - static const char *pageDictKeys[] = { - "LastModified", - "Metadata", - "PieceInfo", - "SeparationInfo", -// "Group", -// "Resources", - NULL - }; - - PdfDocument *pdf_doc = (PdfDocument *) epdf_doc; - (pdf_doc->occurences)--; - xref = pdf_doc->xref; - inObjList = pdf_doc->inObjList; - encodingList = 0; - page = pdf_doc->doc->getCatalog()->getPage(epdf_selected_page); - pageRef = pdf_doc->doc->getCatalog()->getPageRef(epdf_selected_page); - pageObj = xref->fetch(pageRef->num, pageRef->gen); - pageDict = pageObj.getDict(); - rotate = page->getRotate(); - PDFRectangle *pagebox; - // write the Page header - pdf_puts("/Type /XObject\n"); - pdf_puts("/Subtype /Form\n"); - pdf_puts("/FormType 1\n"); - - // write additional information - if ((suppress_ptex_info & MASK_SUPPRESS_PTEX_FILENAME) == 0) { - pdf_printf("/%s.FileName (%s)\n", pdfkeyprefix, - convertStringToPDFString(pdf_doc->file_name, - strlen(pdf_doc->file_name))); - } - if ((suppress_ptex_info & MASK_SUPPRESS_PTEX_PAGENUMBER) == 0) { - pdf_printf("/%s.PageNumber %i\n", pdfkeyprefix, (int) epdf_selected_page); - } - if ((suppress_ptex_info & MASK_SUPPRESS_PTEX_INFODICT) == 0) { - info = pdf_doc->doc->getDocInfoNF(); - if (info.isRef()) { - // the info dict must be indirect (PDF Ref p. 61) - pdf_printf("/%s.InfoDict ", pdfkeyprefix); - pdf_printf("%d 0 R\n", addOther(info.getRef())); - } - } - // get the pagebox (media, crop...) to use. - pagebox = get_pagebox(page, epdf_page_box); - - // handle page rotation - if (rotate != 0) { - if (rotate % 90 == 0) { - // this handles only the simple case: multiple of 90s but these - // are the only values allowed according to the reference - // (v1.3, p. 78). - // the image is rotated around its center. - // the /Rotate key is clockwise while the matrix is - // counterclockwise :-% - tex_printf(", page is rotated %d degrees", rotate); - switch (rotate) { - case 90: - scale[1] = -1; - scale[2] = 1; - scale[4] = pagebox->x1 - pagebox->y1; - scale[5] = pagebox->y1 + pagebox->x2; - writematrix = true; - break; - case 180: - scale[0] = scale[3] = -1; - scale[4] = pagebox->x1 + pagebox->x2; - scale[5] = pagebox->y1 + pagebox->y2; - writematrix = true; - break; // width and height are exchanged - case 270: - scale[1] = 1; - scale[2] = -1; - scale[4] = pagebox->x1 + pagebox->y2; - scale[5] = pagebox->y1 - pagebox->x1; - writematrix = true; - break; - } - if (writematrix) { // The matrix is only written if the image is rotated. - sprintf(s, "/Matrix [%.8f %.8f %.8f %.8f %.8f %.8f]\n", - scale[0], - scale[1], scale[2], scale[3], scale[4], scale[5]); - pdf_puts(stripzeros(s)); - } - } - } - - sprintf(s, "/BBox [%.8f %.8f %.8f %.8f]\n", - pagebox->x1, pagebox->y1, pagebox->x2, pagebox->y2); - pdf_puts(stripzeros(s)); - - // Metadata validity check (as a stream it must be indirect) - dictObj = pageDict->lookupNF("Metadata"); - if (!dictObj.isNull() && !dictObj.isRef()) - pdftex_warn("PDF inclusion: /Metadata must be indirect object"); - - // copy selected items in Page dictionary except Resources & Group - for (i = 0; pageDictKeys[i] != NULL; i++) { - dictObj = pageDict->lookupNF(pageDictKeys[i]); - if (!dictObj.isNull()) { - pdf_newline(); - pdf_printf("/%s ", pageDictKeys[i]); - copyObject(&dictObj); // preserves indirection - } - } - - // handle page group - dictObj = pageDict->lookupNF("Group"); - if (!dictObj.isNull()) { - if (pdfpagegroupval == 0) { - // another pdf with page group was included earlier on the - // same page; copy the Group entry as is. See manual for - // info on why this is a warning. - if (getpdfsuppresswarningpagegroup() == 0) { - pdftex_warn - ("PDF inclusion: multiple pdfs with page group included in a single page"); - } - pdf_newline(); - pdf_puts("/Group "); - copyObject(&dictObj); - } else { - // write Group dict as a separate object, since the Page dict also refers to it - dictObj = pageDict->lookup("Group"); - if (!dictObj.isDict()) - pdftex_fail("PDF inclusion: /Group dict missing"); - writeSepGroup = true; -/* -This part is only a single line - groupDict = Object(page->getGroup()); -in the original patch. In this case, however, pdftex crashes at -"delete pdf_doc->doc" in "delete_document()" for inclusion of some -kind of pdf images, for example, figure_missing.pdf in gnuplot. -A change - groupDict = Object(page->getGroup()).copy(); -does not improve the situation. -The changes below seem to work fine. -*/ -// begin modification - groupDict = pageDict->lookup("Group"); - const Dict& dic1 = page->getGroup(); - const Dict& dic2 = groupDict.getDict(); - // replace dic2 in groupDict with dic1 - l = dic2.getLength(); - for (i = 0; i < l; i++) { - groupDict.dictRemove(dic2.getKey(i)); - } - l = dic1.getLength(); - for (i = 0; i < l; i++) { - groupDict.dictAdd(copyString(dic1.getKey(i)), - dic1.getValNF(i)); - } -// end modification - pdf_printf("/Group %ld 0 R\n", (long)pdfpagegroupval); - } - } - - // write the Resources dictionary - if (page->getResourceDict() == NULL) { - // Resources can be missing (files without them have been spotted - // in the wild); in which case the /Resouces of the /Page will be used. - // "This practice is not recommended". - pdftex_warn - ("PDF inclusion: /Resources missing. 'This practice is not recommended' (PDF Ref)"); - } else { - Object *obj1 = page->getResourceDictObject(); - if (!obj1->isDict()) - pdftex_fail("PDF inclusion: invalid resources dict type <%s>", - obj1->getTypeName()); - pdf_newline(); - pdf_puts("/Resources <<\n"); - for (i = 0, l = obj1->dictGetLength(); i < l; ++i) { - obj2 = obj1->dictGetVal(i); - key = obj1->dictGetKey(i); - if (strcmp("Font", key) == 0) - copyFontResources(&obj2); - else if (strcmp("ProcSet", key) == 0) - copyProcSet(&obj2); - else - copyOtherResources(&obj2, key); - } - pdf_puts(">>\n"); - } - - // write the page contents - contents = page->getContents(); - if (contents.isStream()) { - - // Variant A: get stream and recompress under control - // of \pdfcompresslevel - // - // pdfbeginstream(); - // copyStream(contents->getStream()); - // pdfendstream(); - - // Variant B: copy stream without recompressing - // - obj1 = contents.streamGetDict()->lookup("F"); - if (!obj1.isNull()) { - pdftex_fail("PDF inclusion: Unsupported external stream"); - } - obj1 = contents.streamGetDict()->lookup("Length"); - assert(!obj1.isNull()); - pdf_puts("/Length "); - copyObject(&obj1); - pdf_puts("\n"); - obj1 = contents.streamGetDict()->lookup("Filter"); - if (!obj1.isNull()) { - pdf_puts("/Filter "); - copyObject(&obj1); - pdf_puts("\n"); - obj1 = contents.streamGetDict()->lookup("DecodeParms"); - if (!obj1.isNull()) { - pdf_puts("/DecodeParms "); - copyObject(&obj1); - pdf_puts("\n"); - } - } - pdf_puts(">>\nstream\n"); - copyStream(contents.getStream()->getUndecodedStream()); - pdfendstream(); - } else if (contents.isArray()) { - pdfbeginstream(); - for (i = 0, l = contents.arrayGetLength(); i < l; ++i) { - Object contentsobj = contents.arrayGet(i); - copyStream(contentsobj.getStream()); - if (i < l - 1) - pdf_newline(); // add a newline after each stream except the last - } - pdfendstream(); - } else { // the contents are optional, but we need to include an empty stream - pdfbeginstream(); - pdfendstream(); - } - - // write out all indirect objects - writeRefs(); - - // write out all used encodings (and delete list) - writeEncodings(); - - // write the Group dict if needed - if (writeSepGroup) { - pdfbeginobj(pdfpagegroupval, 2); - copyObject(&groupDict); - pdf_puts("\n"); - pdfendobj(); - pdfpagegroupval = 0; // only the 1st included pdf on a page gets its - // Group included in the Page dict - } - - // save object list, xref - pdf_doc->inObjList = inObjList; - pdf_doc->xref = xref; -} - -// Called when an image has been written and it's resources in image_tab are -// freed and it's not referenced anymore. - -void epdf_delete() -{ - PdfDocument *pdf_doc = (PdfDocument *) epdf_doc; - xref = pdf_doc->xref; - if (pdf_doc->occurences < 0) { - delete_document(pdf_doc); - } -} - -// Called when PDF embedding system is finalized. -// Now deallocate all remaining PdfDocuments. - -void epdf_check_mem() -{ - if (isInit) { - PdfDocument *p, *n; - for (p = pdfDocuments; p; p = n) { - n = p->next; - delete_document(p); - } - // see above for globalParams - delete globalParams; - } -} diff --git a/Build/source/texk/web2c/pdftexdir/pdftoepdf-poppler0.69.0.cc b/Build/source/texk/web2c/pdftexdir/pdftoepdf-poppler0.69.0.cc deleted file mode 100644 index ed97c506b73..00000000000 --- a/Build/source/texk/web2c/pdftexdir/pdftoepdf-poppler0.69.0.cc +++ /dev/null @@ -1,1113 +0,0 @@ -/* -Copyright 1996-2017 Han The Thanh, <thanh@pdftex.org> - -This file is part of pdfTeX. - -pdfTeX is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -pdfTeX is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -/* -This is based on the patch texlive-poppler-0.59.patch <2017-09-19> at -https://git.archlinux.org/svntogit/packages.git/plain/texlive-bin/trunk -by Arch Linux. A little modifications are made to avoid a crash for -some kind of pdf images, such as figure_missing.pdf in gnuplot. -The poppler should be 0.69.0. -POPPLER_VERSION should be defined. -*/ - -/* Do this early in order to avoid a conflict between - MINGW32 <rpcndr.h> defining 'boolean' as 'unsigned char' and - <kpathsea/types.h> defining Pascal's boolean as 'int'. -*/ -#include <w2c/config.h> -#include <kpathsea/lib.h> - -#include <stdlib.h> -#include <math.h> -#include <stddef.h> -#include <stdio.h> -#include <string.h> -#include <ctype.h> - -#ifdef POPPLER_VERSION -#include <dirent.h> -#include <poppler-config.h> -#include <goo/GooString.h> -#include <goo/gmem.h> -#include <goo/gfile.h> -#define GString GooString -#else -#error POPPLER_VERSION should be defined. -#endif -#include <assert.h> - -#include "Object.h" -#include "Stream.h" -#include "Array.h" -#include "Dict.h" -#include "XRef.h" -#include "Catalog.h" -#include "Link.h" -#include "Page.h" -#include "GfxFont.h" -#include "PDFDoc.h" -#include "GlobalParams.h" -#include "Error.h" - -// This file is mostly C and not very much C++; it's just used to interface -// the functions of xpdf, which are written in C++. - -extern "C" { -#include <pdftexdir/ptexmac.h> -#include <pdftexdir/pdftex-common.h> - -// These functions from pdftex.web gets declared in pdftexcoerce.h in the -// usual web2c way, but we cannot include that file here because C++ -// does not allow it. -extern int getpdfsuppresswarningpagegroup(void); -extern integer getpdfsuppressptexinfo(void); -extern integer zround(double); -} - -// The prefix "PTEX" for the PDF keys is special to pdfTeX; -// this has been registered with Adobe by Hans Hagen. - -#define pdfkeyprefix "PTEX" - -#define MASK_SUPPRESS_PTEX_FULLBANNER 0x01 -#define MASK_SUPPRESS_PTEX_FILENAME 0x02 -#define MASK_SUPPRESS_PTEX_PAGENUMBER 0x04 -#define MASK_SUPPRESS_PTEX_INFODICT 0x08 - -// When copying the Resources of the selected page, all objects are copied -// recusively top-down. Indirect objects however are not fetched during -// copying, but get a new object number from pdfTeX and then will be -// appended into a linked list. Duplicates are checked and removed from the -// list of indirect objects during appending. - -enum InObjType { - objFont, - objFontDesc, - objOther -}; - -struct InObj { - Ref ref; // ref in original PDF - InObjType type; // object type - InObj *next; // next entry in list of indirect objects - int num; // new object number in output PDF - fd_entry *fd; // pointer to /FontDescriptor object structure - int enc_objnum; // Encoding for objFont - int written; // has it been written to output PDF? -}; - -struct UsedEncoding { - int enc_objnum; - GfxFont *font; - UsedEncoding *next; -}; - -static InObj *inObjList; -static UsedEncoding *encodingList; -static GBool isInit = gFalse; - -// -------------------------------------------------------------------- -// Maintain list of open embedded PDF files -// -------------------------------------------------------------------- - -struct PdfDocument { - char *file_name; - PDFDoc *doc; - XRef *xref; - InObj *inObjList; - int occurences; // number of references to the document; the doc can be - // deleted when this is negative - PdfDocument *next; -}; - -static PdfDocument *pdfDocuments = 0; - -static XRef *xref = 0; - -// Returns pointer to PdfDocument record for PDF file. -// Creates a new record if it doesn't exist yet. -// xref is made current for the document. - -static PdfDocument *find_add_document(char *file_name) -{ - PdfDocument *p = pdfDocuments; - while (p && strcmp(p->file_name, file_name) != 0) - p = p->next; - if (p) { - xref = p->xref; - (p->occurences)++; - return p; - } - p = new PdfDocument; - p->file_name = xstrdup(file_name); - p->xref = xref = 0; - p->occurences = 0; - GString *docName = new GString(p->file_name); - p->doc = new PDFDoc(docName); // takes ownership of docName - if (!p->doc->isOk() || !p->doc->okToPrint()) { - pdftex_fail("xpdf: reading PDF image failed"); - } - p->inObjList = 0; - p->next = pdfDocuments; - pdfDocuments = p; - return p; -} - -// Deallocate a PdfDocument with all its resources - -static void delete_document(PdfDocument * pdf_doc) -{ - PdfDocument **p = &pdfDocuments; - while (*p && *p != pdf_doc) - p = &((*p)->next); - // should not happen: - if (!*p) - return; - // unlink from list - *p = pdf_doc->next; - // free pdf_doc's resources - InObj *r, *n; - for (r = pdf_doc->inObjList; r != 0; r = n) { - n = r->next; - delete r; - } - xref = pdf_doc->xref; - delete pdf_doc->doc; - xfree(pdf_doc->file_name); - delete pdf_doc; -} - -// -------------------------------------------------------------------- - -static int addEncoding(GfxFont * gfont) -{ - UsedEncoding *n; - n = new UsedEncoding; - n->next = encodingList; - encodingList = n; - n->font = gfont; - n->enc_objnum = pdfnewobjnum(); - return n->enc_objnum; -} - -#define addFont(ref, fd, enc_objnum) \ - addInObj(objFont, ref, fd, enc_objnum) - -// addFontDesc is only used to avoid writing the original FontDescriptor -// from the PDF file. - -#define addFontDesc(ref, fd) \ - addInObj(objFontDesc, ref, fd, 0) - -#define addOther(ref) \ - addInObj(objOther, ref, 0, 0) - -static int addInObj(InObjType type, Ref ref, fd_entry * fd, int e) -{ - InObj *p, *q, *n = new InObj; - if (ref.num == 0) - pdftex_fail("PDF inclusion: invalid reference"); - n->ref = ref; - n->type = type; - n->next = 0; - n->fd = fd; - n->enc_objnum = e; - n->written = 0; - if (inObjList == 0) - inObjList = n; - else { - for (p = inObjList; p != 0; p = p->next) { - if (p->ref.num == ref.num && p->ref.gen == ref.gen) { - delete n; - return p->num; - } - q = p; - } - // it is important to add new objects at the end of the list, - // because new objects are being added while the list is being - // written out. - q->next = n; - } - if (type == objFontDesc) - n->num = get_fd_objnum(fd); - else - n->num = pdfnewobjnum(); - return n->num; -} - -#if 0 /* unusewd */ -static int getNewObjectNumber(Ref ref) -{ - InObj *p; - if (inObjList == 0) { - pdftex_fail("No objects copied yet"); - } else { - for (p = inObjList; p != 0; p = p->next) { - if (p->ref.num == ref.num && p->ref.gen == ref.gen) { - return p->num; - } - } - pdftex_fail("Object not yet copied: %i %i", ref.num, ref.gen); - } -#ifdef _MSC_VER - /* Never reached, but without __attribute__((noreturn)) for pdftex_fail() - MSVC 5.0 requires an int return value. */ - return -60000; -#endif -} -#endif - -static void copyObject(Object *); - -static void copyName(char *s) -{ - pdf_puts("/"); - for (; *s != 0; s++) { - if (isdigit(*s) || isupper(*s) || islower(*s) || *s == '_' || - *s == '.' || *s == '-' || *s == '+') - pdfout(*s); - else - pdf_printf("#%.2X", *s & 0xFF); - } -} - -static void copyDictEntry(Object * obj, int i) -{ - Object obj1; - copyName((char *)obj->dictGetKey(i)); - pdf_puts(" "); - obj1 = obj->dictGetValNF(i); - copyObject(&obj1); - pdf_puts("\n"); -} - -static void copyDict(Object * obj) -{ - int i, l; - if (!obj->isDict()) - pdftex_fail("PDF inclusion: invalid dict type <%s>", - obj->getTypeName()); - for (i = 0, l = obj->dictGetLength(); i < l; ++i) - copyDictEntry(obj, i); -} - -static void copyFontDict(Object * obj, InObj * r) -{ - int i, l; - char *key; - if (!obj->isDict()) - pdftex_fail("PDF inclusion: invalid dict type <%s>", - obj->getTypeName()); - pdf_puts("<<\n"); - assert(r->type == objFont); // FontDescriptor is in fd_tree - for (i = 0, l = obj->dictGetLength(); i < l; ++i) { - key = (char *)obj->dictGetKey(i); - if (strncmp("FontDescriptor", key, strlen("FontDescriptor")) == 0 - || strncmp("BaseFont", key, strlen("BaseFont")) == 0 - || strncmp("Encoding", key, strlen("Encoding")) == 0) - continue; // skip original values - copyDictEntry(obj, i); - } - // write new FontDescriptor, BaseFont, and Encoding - pdf_printf("/FontDescriptor %d 0 R\n", get_fd_objnum(r->fd)); - pdf_printf("/BaseFont %d 0 R\n", get_fn_objnum(r->fd)); - pdf_printf("/Encoding %d 0 R\n", r->enc_objnum); - pdf_puts(">>"); -} - -static void copyStream(Stream * str) -{ - int c, c2 = 0; - str->reset(); - while ((c = str->getChar()) != EOF) { - pdfout(c); - c2 = c; - } - pdflastbyte = c2; -} - -static void copyProcSet(Object * obj) -{ - int i, l; - Object procset; - if (!obj->isArray()) - pdftex_fail("PDF inclusion: invalid ProcSet array type <%s>", - obj->getTypeName()); - pdf_puts("/ProcSet [ "); - for (i = 0, l = obj->arrayGetLength(); i < l; ++i) { - procset = obj->arrayGetNF(i); - if (!procset.isName()) - pdftex_fail("PDF inclusion: invalid ProcSet entry type <%s>", - procset.getTypeName()); - copyName((char *)procset.getName()); - pdf_puts(" "); - } - pdf_puts("]\n"); -} - -#define REPLACE_TYPE1C true - -static bool embeddableFont(Object * fontdesc) -{ - Object fontfile, ffsubtype; - - if (!fontdesc->isDict()) - return false; - fontfile = fontdesc->dictLookup("FontFile"); - if (fontfile.isStream()) - return true; - if (REPLACE_TYPE1C) { - fontfile = fontdesc->dictLookup("FontFile3"); - if (!fontfile.isStream()) - return false; - ffsubtype = fontfile.streamGetDict()->lookup("Subtype"); - return ffsubtype.isName() && !strcmp(ffsubtype.getName(), "Type1C"); - } - return false; -} - -static void copyFont(char *tag, Object * fontRef) -{ - Object fontdict, subtype, basefont, fontdescRef, fontdesc, charset, - stemV; - GfxFont *gfont; - fd_entry *fd; - fm_entry *fontmap; - // Check whether the font has already been embedded before analysing it. - InObj *p; - Ref ref = fontRef->getRef(); - for (p = inObjList; p; p = p->next) { - if (p->ref.num == ref.num && p->ref.gen == ref.gen) { - copyName(tag); - pdf_printf(" %d 0 R ", p->num); - return; - } - } - // Only handle included Type1 (and Type1C) fonts; anything else will be copied. - // Type1C fonts are replaced by Type1 fonts, if REPLACE_TYPE1C is true. - fontdict = fontRef->fetch(xref); - fontdesc = Object(objNull); - if (fontdict.isDict()) { - subtype = fontdict.dictLookup("Subtype"); - basefont = fontdict.dictLookup("BaseFont"); - fontdescRef = fontdict.dictLookupNF("FontDescriptor"); - if (fontdescRef.isRef()) { - fontdesc = fontdescRef.fetch(xref); - } - } - if (!fixedinclusioncopyfont && fontdict.isDict() - && subtype.isName() - && !strcmp(subtype.getName(), "Type1") - && basefont.isName() - && fontdescRef.isRef() - && fontdesc.isDict() - && embeddableFont(&fontdesc) - && (fontmap = lookup_fontmap((char *)basefont.getName())) != NULL) { - // round /StemV value, since the PDF input is a float - // (see Font Descriptors in PDF reference), but we only store an - // integer, since we don't want to change the struct. - stemV = fontdesc.dictLookup("StemV"); - fd = epdf_create_fontdescriptor(fontmap, zround(stemV.getNum())); - charset = fontdesc.dictLookup("CharSet"); - if (!charset.isNull() && - charset.isString() && is_subsetable(fontmap)) - epdf_mark_glyphs(fd, (char *)charset.getString()->getCString()); - else - embed_whole_font(fd); - addFontDesc(fontdescRef.getRef(), fd); - copyName(tag); - gfont = GfxFont::makeFont(xref, tag, fontRef->getRef(), - fontdict.getDict()); - pdf_printf(" %d 0 R ", addFont(fontRef->getRef(), fd, - addEncoding(gfont))); - } else { - copyName(tag); - pdf_puts(" "); - copyObject(fontRef); - } -} - -static void copyFontResources(Object * obj) -{ - Object fontRef; - int i, l; - if (!obj->isDict()) - pdftex_fail("PDF inclusion: invalid font resources dict type <%s>", - obj->getTypeName()); - pdf_puts("/Font << "); - for (i = 0, l = obj->dictGetLength(); i < l; ++i) { - fontRef = obj->dictGetValNF(i); - if (fontRef.isRef()) - copyFont((char *)obj->dictGetKey(i), &fontRef); - else if (fontRef.isDict()) { // some programs generate pdf with embedded font object - copyName((char *)obj->dictGetKey(i)); - pdf_puts(" "); - copyObject(&fontRef); - } - else - pdftex_fail("PDF inclusion: invalid font in reference type <%s>", - fontRef.getTypeName()); - } - pdf_puts(">>\n"); -} - -static void copyOtherResources(Object * obj, char *key) -{ - // copies all other resources (write_epdf handles Fonts and ProcSets), - - // if Subtype is present, it must be a name - if (strcmp("Subtype", key) == 0) { - if (!obj->isName()) { - pdftex_warn("PDF inclusion: Subtype in Resources dict is not a name" - " (key '%s', type <%s>); ignored.", - key, obj->getTypeName()); - return; - } - } else if (!obj->isDict()) { - //FIXME: Write the message only to the log file - pdftex_warn("PDF inclusion: invalid other resource which is no dict" - " (key '%s', type <%s>); ignored.", - key, obj->getTypeName()); - return; - } - copyName(key); - pdf_puts(" "); - copyObject(obj); -} - -// Function onverts double to string; very small and very large numbers -// are NOT converted to scientific notation. -// n must be a number or real conforming to the implementation limits -// of PDF as specified in appendix C.1 of the PDF Ref. -// These are: -// maximum value of ints is +2^32 -// maximum value of reals is +2^15 -// smalles values of reals is 1/(2^16) - -static char *convertNumToPDF(double n) -{ - static const int precision = 6; - static const int fact = (int) 1E6; // must be 10^precision - static const double epsilon = 0.5E-6; // 2epsilon must be 10^-precision - static char buf[64]; - // handle very small values: return 0 - if (fabs(n) < epsilon) { - buf[0] = '0'; - buf[1] = '\0'; - } else { - char ints[64]; - int bindex = 0, sindex = 0; - int ival, fval; - // handle the sign part if n is negative - if (n < 0) { - buf[bindex++] = '-'; - n = -n; - } - n += epsilon; // for rounding - // handle the integer part, simply with sprintf - ival = (int) floor(n); - n -= ival; - sprintf(ints, "%d", ival); - while (ints[sindex] != 0) - buf[bindex++] = ints[sindex++]; - // handle the fractional part up to 'precision' digits - fval = (int) floor(n * fact); - if (fval) { - // set a dot - buf[bindex++] = '.'; - sindex = bindex + precision; - buf[sindex--] = '\0'; - // fill up trailing zeros with the string terminator NULL - while (((fval % 10) == 0) && (sindex >= bindex)) { - buf[sindex--] = '\0'; - fval /= 10; - } - // fill up the fractional part back to front - while (sindex >= bindex) { - buf[sindex--] = (fval % 10) + '0'; - fval /= 10; - } - } else - buf[bindex++] = 0; - } - return (char *) buf; -} - -static void copyObject(Object * obj) -{ - Object obj1; - int i, l, c; - Ref ref; - char *p; - GString *s; - if (obj->isBool()) { - pdf_printf("%s", obj->getBool()? "true" : "false"); - } else if (obj->isInt()) { - pdf_printf("%i", obj->getInt()); - } else if (obj->isReal()) { - pdf_printf("%s", convertNumToPDF(obj->getReal())); - } else if (obj->isNum()) { - pdf_printf("%s", convertNumToPDF(obj->getNum())); - } else if (obj->isString()) { - s = (GooString *)obj->getString(); - p = s->getCString(); - l = s->getLength(); - if (strlen(p) == (unsigned int) l) { - pdf_puts("("); - for (; *p != 0; p++) { - c = (unsigned char) *p; - if (c == '(' || c == ')' || c == '\\') - pdf_printf("\\%c", c); - else if (c < 0x20 || c > 0x7F) - pdf_printf("\\%03o", c); - else - pdfout(c); - } - pdf_puts(")"); - } else { - pdf_puts("<"); - for (i = 0; i < l; i++) { - c = s->getChar(i) & 0xFF; - pdf_printf("%.2x", c); - } - pdf_puts(">"); - } - } else if (obj->isName()) { - copyName((char *)obj->getName()); - } else if (obj->isNull()) { - pdf_puts("null"); - } else if (obj->isArray()) { - pdf_puts("["); - for (i = 0, l = obj->arrayGetLength(); i < l; ++i) { - obj1 = obj->arrayGetNF(i); - if (!obj1.isName()) - pdf_puts(" "); - copyObject(&obj1); - } - pdf_puts("]"); - } else if (obj->isDict()) { - pdf_puts("<<\n"); - copyDict(obj); - pdf_puts(">>"); - } else if (obj->isStream()) { - pdf_puts("<<\n"); - copyDict(obj->getStream()->getDictObject()); - pdf_puts(">>\n"); - pdf_puts("stream\n"); - copyStream(obj->getStream()->getUndecodedStream()); - pdf_puts("\nendstream"); - } else if (obj->isRef()) { - ref = obj->getRef(); - if (ref.num == 0) { - pdftex_fail - ("PDF inclusion: reference to invalid object" - " (is the included pdf broken?)"); - } else - pdf_printf("%d 0 R", addOther(ref)); - } else { - pdftex_fail("PDF inclusion: type <%s> cannot be copied", - obj->getTypeName()); - } -} - -static void writeRefs() -{ - InObj *r; - for (r = inObjList; r != 0; r = r->next) { - if (!r->written) { - r->written = 1; - Object obj1 = xref->fetch(r->ref.num, r->ref.gen); - if (r->type == objFont) { - assert(!obj1.isStream()); - pdfbeginobj(r->num, 2); // \pdfobjcompresslevel = 2 is for this - copyFontDict(&obj1, r); - pdf_puts("\n"); - pdfendobj(); - } else if (r->type != objFontDesc) { // /FontDescriptor is written via write_fontdescriptor() - if (obj1.isStream()) - pdfbeginobj(r->num, 0); - else - pdfbeginobj(r->num, 2); // \pdfobjcompresslevel = 2 is for this - copyObject(&obj1); - pdf_puts("\n"); - pdfendobj(); - } - } - } -} - -static void writeEncodings() -{ - UsedEncoding *r, *n; - char *glyphNames[256], *s; - int i; - for (r = encodingList; r != 0; r = r->next) { - for (i = 0; i < 256; i++) { - if (r->font->isCIDFont()) { - pdftex_fail - ("PDF inclusion: CID fonts are not supported" - " (try to disable font replacement to fix this)"); - } - if ((s = ((Gfx8BitFont *) r->font)->getCharName(i)) != 0) - glyphNames[i] = s; - else - glyphNames[i] = notdef; - } - epdf_write_enc(glyphNames, r->enc_objnum); - } - for (r = encodingList; r != 0; r = n) { - n = r->next; -#ifdef POPPLER_VERSION - r->font->decRefCnt(); -#else -#error POPPLER_VERSION should be defined. -#endif - delete r; - } -} - -// get the pagebox according to the pagebox_spec -static PDFRectangle *get_pagebox(Page * page, int pagebox_spec) -{ - if (pagebox_spec == pdfboxspecmedia) - return page->getMediaBox(); - else if (pagebox_spec == pdfboxspeccrop) - return page->getCropBox(); - else if (pagebox_spec == pdfboxspecbleed) - return page->getBleedBox(); - else if (pagebox_spec == pdfboxspectrim) - return page->getTrimBox(); - else if (pagebox_spec == pdfboxspecart) - return page->getArtBox(); - else - pdftex_fail("PDF inclusion: unknown value of pagebox spec (%i)", - (int) pagebox_spec); - return page->getMediaBox(); // to make the compiler happy -} - - -// Reads various information about the PDF and sets it up for later inclusion. -// This will fail if the PDF version of the PDF is higher than -// minor_pdf_version_wanted or page_name is given and can not be found. -// It makes no sense to give page_name _and_ page_num. -// Returns the page number. - -int -read_pdf_info(char *image_name, char *page_name, int page_num, - int pagebox_spec, int major_pdf_version_wanted, int minor_pdf_version_wanted, - int pdf_inclusion_errorlevel) -{ - PdfDocument *pdf_doc; - Page *page; - PDFRectangle *pagebox; -#ifdef POPPLER_VERSION - int pdf_major_version_found, pdf_minor_version_found; -#else -#error POPPLER_VERSION should be defined. -#endif - // initialize - if (!isInit) { - globalParams = new GlobalParams(); - globalParams->setErrQuiet(gFalse); - isInit = gTrue; - } - // open PDF file - pdf_doc = find_add_document(image_name); - epdf_doc = (void *) pdf_doc; - - // check PDF version - // this works only for PDF 1.x -- but since any versions of PDF newer - // than 1.x will not be backwards compatible to PDF 1.x, pdfTeX will - // then have to changed drastically anyway. -#ifdef POPPLER_VERSION - pdf_major_version_found = pdf_doc->doc->getPDFMajorVersion(); - pdf_minor_version_found = pdf_doc->doc->getPDFMinorVersion(); - if ((pdf_major_version_found > major_pdf_version_wanted) - || (pdf_minor_version_found > minor_pdf_version_wanted)) { - const char *msg = - "PDF inclusion: found PDF version <%d.%d>, but at most version <%d.%d> allowed"; - if (pdf_inclusion_errorlevel > 0) { - pdftex_fail(msg, pdf_major_version_found, pdf_minor_version_found, major_pdf_version_wanted, minor_pdf_version_wanted); - } else if (pdf_inclusion_errorlevel < 0) { - ; /* do nothing */ - } else { /* = 0, give warning */ - pdftex_warn(msg, pdf_major_version_found, pdf_minor_version_found, major_pdf_version_wanted, minor_pdf_version_wanted); - } - } -#else -#error POPPLER_VERSION should be defined. -#endif - epdf_num_pages = pdf_doc->doc->getCatalog()->getNumPages(); - if (page_name) { - // get page by name - GString name(page_name); - LinkDest *link = pdf_doc->doc->findDest(&name); - if (link == 0 || !link->isOk()) - pdftex_fail("PDF inclusion: invalid destination <%s>", page_name); - Ref ref = link->getPageRef(); - page_num = pdf_doc->doc->getCatalog()->findPage(ref.num, ref.gen); - if (page_num == 0) - pdftex_fail("PDF inclusion: destination is not a page <%s>", - page_name); - delete link; - } else { - // get page by number - if (page_num <= 0 || page_num > epdf_num_pages) - pdftex_fail("PDF inclusion: required page does not exist <%i>", - epdf_num_pages); - } - // get the required page - page = pdf_doc->doc->getCatalog()->getPage(page_num); - - // get the pagebox (media, crop...) to use. - pagebox = get_pagebox(page, pagebox_spec); - if (pagebox->x2 > pagebox->x1) { - epdf_orig_x = pagebox->x1; - epdf_width = pagebox->x2 - pagebox->x1; - } else { - epdf_orig_x = pagebox->x2; - epdf_width = pagebox->x1 - pagebox->x2; - } - if (pagebox->y2 > pagebox->y1) { - epdf_orig_y = pagebox->y1; - epdf_height = pagebox->y2 - pagebox->y1; - } else { - epdf_orig_y = pagebox->y2; - epdf_height = pagebox->y1 - pagebox->y2; - } - - // get page rotation - epdf_rotate = page->getRotate() % 360; - if (epdf_rotate < 0) - epdf_rotate += 360; - - // page group - if (page->getGroup() != NULL) - epdf_has_page_group = 1; // only flag that page group is present; - // the actual object number will be - // generated in pdftex.web - else - epdf_has_page_group = 0; // no page group present - - pdf_doc->xref = pdf_doc->doc->getXRef(); - return page_num; -} - -// writes the current epf_doc. -// Here the included PDF is copied, so most errors that can happen during PDF -// inclusion will arise here. - -void write_epdf(void) -{ - Page *page; - Ref *pageRef; - Dict *pageDict; - Object contents, obj1, obj2, pageObj, dictObj; - Object groupDict; - bool writeSepGroup = false; - Object info; - char *key; - char s[256]; - int i, l; - int rotate; - double scale[6] = { 0, 0, 0, 0, 0, 0 }; - bool writematrix = false; - int suppress_ptex_info = getpdfsuppressptexinfo(); - static const char *pageDictKeys[] = { - "LastModified", - "Metadata", - "PieceInfo", - "SeparationInfo", -// "Group", -// "Resources", - NULL - }; - - PdfDocument *pdf_doc = (PdfDocument *) epdf_doc; - (pdf_doc->occurences)--; - xref = pdf_doc->xref; - inObjList = pdf_doc->inObjList; - encodingList = 0; - page = pdf_doc->doc->getCatalog()->getPage(epdf_selected_page); - pageRef = pdf_doc->doc->getCatalog()->getPageRef(epdf_selected_page); - pageObj = xref->fetch(pageRef->num, pageRef->gen); - pageDict = pageObj.getDict(); - rotate = page->getRotate(); - PDFRectangle *pagebox; - // write the Page header - pdf_puts("/Type /XObject\n"); - pdf_puts("/Subtype /Form\n"); - pdf_puts("/FormType 1\n"); - - // write additional information - if ((suppress_ptex_info & MASK_SUPPRESS_PTEX_FILENAME) == 0) { - pdf_printf("/%s.FileName (%s)\n", pdfkeyprefix, - convertStringToPDFString(pdf_doc->file_name, - strlen(pdf_doc->file_name))); - } - if ((suppress_ptex_info & MASK_SUPPRESS_PTEX_PAGENUMBER) == 0) { - pdf_printf("/%s.PageNumber %i\n", pdfkeyprefix, (int) epdf_selected_page); - } - if ((suppress_ptex_info & MASK_SUPPRESS_PTEX_INFODICT) == 0) { - info = pdf_doc->doc->getDocInfoNF(); - if (info.isRef()) { - // the info dict must be indirect (PDF Ref p. 61) - pdf_printf("/%s.InfoDict ", pdfkeyprefix); - pdf_printf("%d 0 R\n", addOther(info.getRef())); - } - } - // get the pagebox (media, crop...) to use. - pagebox = get_pagebox(page, epdf_page_box); - - // handle page rotation - if (rotate != 0) { - if (rotate % 90 == 0) { - // this handles only the simple case: multiple of 90s but these - // are the only values allowed according to the reference - // (v1.3, p. 78). - // the image is rotated around its center. - // the /Rotate key is clockwise while the matrix is - // counterclockwise :-% - tex_printf(", page is rotated %d degrees", rotate); - switch (rotate) { - case 90: - scale[1] = -1; - scale[2] = 1; - scale[4] = pagebox->x1 - pagebox->y1; - scale[5] = pagebox->y1 + pagebox->x2; - writematrix = true; - break; - case 180: - scale[0] = scale[3] = -1; - scale[4] = pagebox->x1 + pagebox->x2; - scale[5] = pagebox->y1 + pagebox->y2; - writematrix = true; - break; // width and height are exchanged - case 270: - scale[1] = 1; - scale[2] = -1; - scale[4] = pagebox->x1 + pagebox->y2; - scale[5] = pagebox->y1 - pagebox->x1; - writematrix = true; - break; - } - if (writematrix) { // The matrix is only written if the image is rotated. - sprintf(s, "/Matrix [%.8f %.8f %.8f %.8f %.8f %.8f]\n", - scale[0], - scale[1], scale[2], scale[3], scale[4], scale[5]); - pdf_puts(stripzeros(s)); - } - } - } - - sprintf(s, "/BBox [%.8f %.8f %.8f %.8f]\n", - pagebox->x1, pagebox->y1, pagebox->x2, pagebox->y2); - pdf_puts(stripzeros(s)); - - // Metadata validity check (as a stream it must be indirect) - dictObj = pageDict->lookupNF("Metadata"); - if (!dictObj.isNull() && !dictObj.isRef()) - pdftex_warn("PDF inclusion: /Metadata must be indirect object"); - - // copy selected items in Page dictionary except Resources & Group - for (i = 0; pageDictKeys[i] != NULL; i++) { - dictObj = pageDict->lookupNF(pageDictKeys[i]); - if (!dictObj.isNull()) { - pdf_newline(); - pdf_printf("/%s ", pageDictKeys[i]); - copyObject(&dictObj); // preserves indirection - } - } - - // handle page group - dictObj = pageDict->lookupNF("Group"); - if (!dictObj.isNull()) { - if (pdfpagegroupval == 0) { - // another pdf with page group was included earlier on the - // same page; copy the Group entry as is. See manual for - // info on why this is a warning. - if (getpdfsuppresswarningpagegroup() == 0) { - pdftex_warn - ("PDF inclusion: multiple pdfs with page group included in a single page"); - } - pdf_newline(); - pdf_puts("/Group "); - copyObject(&dictObj); - } else { - // write Group dict as a separate object, since the Page dict also refers to it - dictObj = pageDict->lookup("Group"); - if (!dictObj.isDict()) - pdftex_fail("PDF inclusion: /Group dict missing"); - writeSepGroup = true; -/* -This part is only a single line - groupDict = Object(page->getGroup()); -in the original patch. In this case, however, pdftex crashes at -"delete pdf_doc->doc" in "delete_document()" for inclusion of some -kind of pdf images, for example, figure_missing.pdf in gnuplot. -A change - groupDict = Object(page->getGroup()).copy(); -does not improve the situation. -The changes below seem to work fine. -*/ -// begin modification - groupDict = pageDict->lookup("Group"); - const Dict& dic1 = page->getGroup(); - const Dict& dic2 = groupDict.getDict(); - // replace dic2 in groupDict with dic1 - l = dic2.getLength(); - for (i = 0; i < l; i++) { - groupDict.dictRemove(dic2.getKey(i)); - } - l = dic1.getLength(); - for (i = 0; i < l; i++) { - groupDict.dictAdd((const char *)copyString(dic1.getKey(i)), - dic1.getValNF(i)); - } -// end modification - pdf_printf("/Group %ld 0 R\n", (long)pdfpagegroupval); - } - } - - // write the Resources dictionary - if (page->getResourceDict() == NULL) { - // Resources can be missing (files without them have been spotted - // in the wild); in which case the /Resouces of the /Page will be used. - // "This practice is not recommended". - pdftex_warn - ("PDF inclusion: /Resources missing. 'This practice is not recommended' (PDF Ref)"); - } else { - Object *obj1 = page->getResourceDictObject(); - if (!obj1->isDict()) - pdftex_fail("PDF inclusion: invalid resources dict type <%s>", - obj1->getTypeName()); - pdf_newline(); - pdf_puts("/Resources <<\n"); - for (i = 0, l = obj1->dictGetLength(); i < l; ++i) { - obj2 = obj1->dictGetVal(i); - key = (char *)obj1->dictGetKey(i); - if (strcmp("Font", key) == 0) - copyFontResources(&obj2); - else if (strcmp("ProcSet", key) == 0) - copyProcSet(&obj2); - else - copyOtherResources(&obj2, (char *)key); - } - pdf_puts(">>\n"); - } - - // write the page contents - contents = page->getContents(); - if (contents.isStream()) { - - // Variant A: get stream and recompress under control - // of \pdfcompresslevel - // - // pdfbeginstream(); - // copyStream(contents->getStream()); - // pdfendstream(); - - // Variant B: copy stream without recompressing - // - obj1 = contents.streamGetDict()->lookup("F"); - if (!obj1.isNull()) { - pdftex_fail("PDF inclusion: Unsupported external stream"); - } - obj1 = contents.streamGetDict()->lookup("Length"); - assert(!obj1.isNull()); - pdf_puts("/Length "); - copyObject(&obj1); - pdf_puts("\n"); - obj1 = contents.streamGetDict()->lookup("Filter"); - if (!obj1.isNull()) { - pdf_puts("/Filter "); - copyObject(&obj1); - pdf_puts("\n"); - obj1 = contents.streamGetDict()->lookup("DecodeParms"); - if (!obj1.isNull()) { - pdf_puts("/DecodeParms "); - copyObject(&obj1); - pdf_puts("\n"); - } - } - pdf_puts(">>\nstream\n"); - copyStream(contents.getStream()->getUndecodedStream()); - pdfendstream(); - } else if (contents.isArray()) { - pdfbeginstream(); - for (i = 0, l = contents.arrayGetLength(); i < l; ++i) { - Object contentsobj = contents.arrayGet(i); - copyStream(contentsobj.getStream()); - if (i < l - 1) - pdf_newline(); // add a newline after each stream except the last - } - pdfendstream(); - } else { // the contents are optional, but we need to include an empty stream - pdfbeginstream(); - pdfendstream(); - } - - // write out all indirect objects - writeRefs(); - - // write out all used encodings (and delete list) - writeEncodings(); - - // write the Group dict if needed - if (writeSepGroup) { - pdfbeginobj(pdfpagegroupval, 2); - copyObject(&groupDict); - pdf_puts("\n"); - pdfendobj(); - pdfpagegroupval = 0; // only the 1st included pdf on a page gets its - // Group included in the Page dict - } - - // save object list, xref - pdf_doc->inObjList = inObjList; - pdf_doc->xref = xref; -} - -// Called when an image has been written and it's resources in image_tab are -// freed and it's not referenced anymore. - -void epdf_delete() -{ - PdfDocument *pdf_doc = (PdfDocument *) epdf_doc; - xref = pdf_doc->xref; - if (pdf_doc->occurences < 0) { - delete_document(pdf_doc); - } -} - -// Called when PDF embedding system is finalized. -// Now deallocate all remaining PdfDocuments. - -void epdf_check_mem() -{ - if (isInit) { - PdfDocument *p, *n; - for (p = pdfDocuments; p; p = n) { - n = p->next; - delete_document(p); - } - // see above for globalParams - delete globalParams; - } -} diff --git a/Build/source/texk/web2c/pdftexdir/pdftoepdf-poppler0.70.0.cc b/Build/source/texk/web2c/pdftexdir/pdftoepdf-poppler0.70.0.cc deleted file mode 100644 index 903dcb40554..00000000000 --- a/Build/source/texk/web2c/pdftexdir/pdftoepdf-poppler0.70.0.cc +++ /dev/null @@ -1,1113 +0,0 @@ -/* -Copyright 1996-2017 Han The Thanh, <thanh@pdftex.org> - -This file is part of pdfTeX. - -pdfTeX is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -pdfTeX is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -/* -This is based on the patch texlive-poppler-0.59.patch <2017-09-19> at -https://git.archlinux.org/svntogit/packages.git/plain/texlive-bin/trunk -by Arch Linux. A little modifications are made to avoid a crash for -some kind of pdf images, such as figure_missing.pdf in gnuplot. -The poppler should be 0.70.0 or 0.70.1. -POPPLER_VERSION should be defined. -*/ - -/* Do this early in order to avoid a conflict between - MINGW32 <rpcndr.h> defining 'boolean' as 'unsigned char' and - <kpathsea/types.h> defining Pascal's boolean as 'int'. -*/ -#include <w2c/config.h> -#include <kpathsea/lib.h> - -#include <stdlib.h> -#include <math.h> -#include <stddef.h> -#include <stdio.h> -#include <string.h> -#include <ctype.h> - -#ifdef POPPLER_VERSION -#include <dirent.h> -#include <poppler-config.h> -#include <goo/GooString.h> -#include <goo/gmem.h> -#include <goo/gfile.h> -#define GString GooString -#else -#error POPPLER_VERSION should be defined. -#endif -#include <assert.h> - -#include "Object.h" -#include "Stream.h" -#include "Array.h" -#include "Dict.h" -#include "XRef.h" -#include "Catalog.h" -#include "Link.h" -#include "Page.h" -#include "GfxFont.h" -#include "PDFDoc.h" -#include "GlobalParams.h" -#include "Error.h" - -// This file is mostly C and not very much C++; it's just used to interface -// the functions of xpdf, which are written in C++. - -extern "C" { -#include <pdftexdir/ptexmac.h> -#include <pdftexdir/pdftex-common.h> - -// These functions from pdftex.web gets declared in pdftexcoerce.h in the -// usual web2c way, but we cannot include that file here because C++ -// does not allow it. -extern int getpdfsuppresswarningpagegroup(void); -extern integer getpdfsuppressptexinfo(void); -extern integer zround(double); -} - -// The prefix "PTEX" for the PDF keys is special to pdfTeX; -// this has been registered with Adobe by Hans Hagen. - -#define pdfkeyprefix "PTEX" - -#define MASK_SUPPRESS_PTEX_FULLBANNER 0x01 -#define MASK_SUPPRESS_PTEX_FILENAME 0x02 -#define MASK_SUPPRESS_PTEX_PAGENUMBER 0x04 -#define MASK_SUPPRESS_PTEX_INFODICT 0x08 - -// When copying the Resources of the selected page, all objects are copied -// recusively top-down. Indirect objects however are not fetched during -// copying, but get a new object number from pdfTeX and then will be -// appended into a linked list. Duplicates are checked and removed from the -// list of indirect objects during appending. - -enum InObjType { - objFont, - objFontDesc, - objOther -}; - -struct InObj { - Ref ref; // ref in original PDF - InObjType type; // object type - InObj *next; // next entry in list of indirect objects - int num; // new object number in output PDF - fd_entry *fd; // pointer to /FontDescriptor object structure - int enc_objnum; // Encoding for objFont - int written; // has it been written to output PDF? -}; - -struct UsedEncoding { - int enc_objnum; - GfxFont *font; - UsedEncoding *next; -}; - -static InObj *inObjList; -static UsedEncoding *encodingList; -static GBool isInit = gFalse; - -// -------------------------------------------------------------------- -// Maintain list of open embedded PDF files -// -------------------------------------------------------------------- - -struct PdfDocument { - char *file_name; - PDFDoc *doc; - XRef *xref; - InObj *inObjList; - int occurences; // number of references to the document; the doc can be - // deleted when this is negative - PdfDocument *next; -}; - -static PdfDocument *pdfDocuments = 0; - -static XRef *xref = 0; - -// Returns pointer to PdfDocument record for PDF file. -// Creates a new record if it doesn't exist yet. -// xref is made current for the document. - -static PdfDocument *find_add_document(char *file_name) -{ - PdfDocument *p = pdfDocuments; - while (p && strcmp(p->file_name, file_name) != 0) - p = p->next; - if (p) { - xref = p->xref; - (p->occurences)++; - return p; - } - p = new PdfDocument; - p->file_name = xstrdup(file_name); - p->xref = xref = 0; - p->occurences = 0; - GString *docName = new GString(p->file_name); - p->doc = new PDFDoc(docName); // takes ownership of docName - if (!p->doc->isOk() || !p->doc->okToPrint()) { - pdftex_fail("xpdf: reading PDF image failed"); - } - p->inObjList = 0; - p->next = pdfDocuments; - pdfDocuments = p; - return p; -} - -// Deallocate a PdfDocument with all its resources - -static void delete_document(PdfDocument * pdf_doc) -{ - PdfDocument **p = &pdfDocuments; - while (*p && *p != pdf_doc) - p = &((*p)->next); - // should not happen: - if (!*p) - return; - // unlink from list - *p = pdf_doc->next; - // free pdf_doc's resources - InObj *r, *n; - for (r = pdf_doc->inObjList; r != 0; r = n) { - n = r->next; - delete r; - } - xref = pdf_doc->xref; - delete pdf_doc->doc; - xfree(pdf_doc->file_name); - delete pdf_doc; -} - -// -------------------------------------------------------------------- - -static int addEncoding(GfxFont * gfont) -{ - UsedEncoding *n; - n = new UsedEncoding; - n->next = encodingList; - encodingList = n; - n->font = gfont; - n->enc_objnum = pdfnewobjnum(); - return n->enc_objnum; -} - -#define addFont(ref, fd, enc_objnum) \ - addInObj(objFont, ref, fd, enc_objnum) - -// addFontDesc is only used to avoid writing the original FontDescriptor -// from the PDF file. - -#define addFontDesc(ref, fd) \ - addInObj(objFontDesc, ref, fd, 0) - -#define addOther(ref) \ - addInObj(objOther, ref, 0, 0) - -static int addInObj(InObjType type, Ref ref, fd_entry * fd, int e) -{ - InObj *p, *q, *n = new InObj; - if (ref.num == 0) - pdftex_fail("PDF inclusion: invalid reference"); - n->ref = ref; - n->type = type; - n->next = 0; - n->fd = fd; - n->enc_objnum = e; - n->written = 0; - if (inObjList == 0) - inObjList = n; - else { - for (p = inObjList; p != 0; p = p->next) { - if (p->ref.num == ref.num && p->ref.gen == ref.gen) { - delete n; - return p->num; - } - q = p; - } - // it is important to add new objects at the end of the list, - // because new objects are being added while the list is being - // written out. - q->next = n; - } - if (type == objFontDesc) - n->num = get_fd_objnum(fd); - else - n->num = pdfnewobjnum(); - return n->num; -} - -#if 0 /* unusewd */ -static int getNewObjectNumber(Ref ref) -{ - InObj *p; - if (inObjList == 0) { - pdftex_fail("No objects copied yet"); - } else { - for (p = inObjList; p != 0; p = p->next) { - if (p->ref.num == ref.num && p->ref.gen == ref.gen) { - return p->num; - } - } - pdftex_fail("Object not yet copied: %i %i", ref.num, ref.gen); - } -#ifdef _MSC_VER - /* Never reached, but without __attribute__((noreturn)) for pdftex_fail() - MSVC 5.0 requires an int return value. */ - return -60000; -#endif -} -#endif - -static void copyObject(Object *); - -static void copyName(char *s) -{ - pdf_puts("/"); - for (; *s != 0; s++) { - if (isdigit(*s) || isupper(*s) || islower(*s) || *s == '_' || - *s == '.' || *s == '-' || *s == '+') - pdfout(*s); - else - pdf_printf("#%.2X", *s & 0xFF); - } -} - -static void copyDictEntry(Object * obj, int i) -{ - Object obj1; - copyName((char *)obj->dictGetKey(i)); - pdf_puts(" "); - obj1 = obj->dictGetValNF(i); - copyObject(&obj1); - pdf_puts("\n"); -} - -static void copyDict(Object * obj) -{ - int i, l; - if (!obj->isDict()) - pdftex_fail("PDF inclusion: invalid dict type <%s>", - obj->getTypeName()); - for (i = 0, l = obj->dictGetLength(); i < l; ++i) - copyDictEntry(obj, i); -} - -static void copyFontDict(Object * obj, InObj * r) -{ - int i, l; - char *key; - if (!obj->isDict()) - pdftex_fail("PDF inclusion: invalid dict type <%s>", - obj->getTypeName()); - pdf_puts("<<\n"); - assert(r->type == objFont); // FontDescriptor is in fd_tree - for (i = 0, l = obj->dictGetLength(); i < l; ++i) { - key = (char *)obj->dictGetKey(i); - if (strncmp("FontDescriptor", key, strlen("FontDescriptor")) == 0 - || strncmp("BaseFont", key, strlen("BaseFont")) == 0 - || strncmp("Encoding", key, strlen("Encoding")) == 0) - continue; // skip original values - copyDictEntry(obj, i); - } - // write new FontDescriptor, BaseFont, and Encoding - pdf_printf("/FontDescriptor %d 0 R\n", get_fd_objnum(r->fd)); - pdf_printf("/BaseFont %d 0 R\n", get_fn_objnum(r->fd)); - pdf_printf("/Encoding %d 0 R\n", r->enc_objnum); - pdf_puts(">>"); -} - -static void copyStream(Stream * str) -{ - int c, c2 = 0; - str->reset(); - while ((c = str->getChar()) != EOF) { - pdfout(c); - c2 = c; - } - pdflastbyte = c2; -} - -static void copyProcSet(Object * obj) -{ - int i, l; - Object procset; - if (!obj->isArray()) - pdftex_fail("PDF inclusion: invalid ProcSet array type <%s>", - obj->getTypeName()); - pdf_puts("/ProcSet [ "); - for (i = 0, l = obj->arrayGetLength(); i < l; ++i) { - procset = obj->arrayGetNF(i); - if (!procset.isName()) - pdftex_fail("PDF inclusion: invalid ProcSet entry type <%s>", - procset.getTypeName()); - copyName((char *)procset.getName()); - pdf_puts(" "); - } - pdf_puts("]\n"); -} - -#define REPLACE_TYPE1C true - -static bool embeddableFont(Object * fontdesc) -{ - Object fontfile, ffsubtype; - - if (!fontdesc->isDict()) - return false; - fontfile = fontdesc->dictLookup("FontFile"); - if (fontfile.isStream()) - return true; - if (REPLACE_TYPE1C) { - fontfile = fontdesc->dictLookup("FontFile3"); - if (!fontfile.isStream()) - return false; - ffsubtype = fontfile.streamGetDict()->lookup("Subtype"); - return ffsubtype.isName() && !strcmp(ffsubtype.getName(), "Type1C"); - } - return false; -} - -static void copyFont(char *tag, Object * fontRef) -{ - Object fontdict, subtype, basefont, fontdescRef, fontdesc, charset, - stemV; - GfxFont *gfont; - fd_entry *fd; - fm_entry *fontmap; - // Check whether the font has already been embedded before analysing it. - InObj *p; - Ref ref = fontRef->getRef(); - for (p = inObjList; p; p = p->next) { - if (p->ref.num == ref.num && p->ref.gen == ref.gen) { - copyName(tag); - pdf_printf(" %d 0 R ", p->num); - return; - } - } - // Only handle included Type1 (and Type1C) fonts; anything else will be copied. - // Type1C fonts are replaced by Type1 fonts, if REPLACE_TYPE1C is true. - fontdict = fontRef->fetch(xref); - fontdesc = Object(objNull); - if (fontdict.isDict()) { - subtype = fontdict.dictLookup("Subtype"); - basefont = fontdict.dictLookup("BaseFont"); - fontdescRef = fontdict.dictLookupNF("FontDescriptor"); - if (fontdescRef.isRef()) { - fontdesc = fontdescRef.fetch(xref); - } - } - if (!fixedinclusioncopyfont && fontdict.isDict() - && subtype.isName() - && !strcmp(subtype.getName(), "Type1") - && basefont.isName() - && fontdescRef.isRef() - && fontdesc.isDict() - && embeddableFont(&fontdesc) - && (fontmap = lookup_fontmap((char *)basefont.getName())) != NULL) { - // round /StemV value, since the PDF input is a float - // (see Font Descriptors in PDF reference), but we only store an - // integer, since we don't want to change the struct. - stemV = fontdesc.dictLookup("StemV"); - fd = epdf_create_fontdescriptor(fontmap, zround(stemV.getNum())); - charset = fontdesc.dictLookup("CharSet"); - if (!charset.isNull() && - charset.isString() && is_subsetable(fontmap)) - epdf_mark_glyphs(fd, (char *)charset.getString()->getCString()); - else - embed_whole_font(fd); - addFontDesc(fontdescRef.getRef(), fd); - copyName(tag); - gfont = GfxFont::makeFont(xref, tag, fontRef->getRef(), - fontdict.getDict()); - pdf_printf(" %d 0 R ", addFont(fontRef->getRef(), fd, - addEncoding(gfont))); - } else { - copyName(tag); - pdf_puts(" "); - copyObject(fontRef); - } -} - -static void copyFontResources(Object * obj) -{ - Object fontRef; - int i, l; - if (!obj->isDict()) - pdftex_fail("PDF inclusion: invalid font resources dict type <%s>", - obj->getTypeName()); - pdf_puts("/Font << "); - for (i = 0, l = obj->dictGetLength(); i < l; ++i) { - fontRef = obj->dictGetValNF(i); - if (fontRef.isRef()) - copyFont((char *)obj->dictGetKey(i), &fontRef); - else if (fontRef.isDict()) { // some programs generate pdf with embedded font object - copyName((char *)obj->dictGetKey(i)); - pdf_puts(" "); - copyObject(&fontRef); - } - else - pdftex_fail("PDF inclusion: invalid font in reference type <%s>", - fontRef.getTypeName()); - } - pdf_puts(">>\n"); -} - -static void copyOtherResources(Object * obj, char *key) -{ - // copies all other resources (write_epdf handles Fonts and ProcSets), - - // if Subtype is present, it must be a name - if (strcmp("Subtype", key) == 0) { - if (!obj->isName()) { - pdftex_warn("PDF inclusion: Subtype in Resources dict is not a name" - " (key '%s', type <%s>); ignored.", - key, obj->getTypeName()); - return; - } - } else if (!obj->isDict()) { - //FIXME: Write the message only to the log file - pdftex_warn("PDF inclusion: invalid other resource which is no dict" - " (key '%s', type <%s>); ignored.", - key, obj->getTypeName()); - return; - } - copyName(key); - pdf_puts(" "); - copyObject(obj); -} - -// Function onverts double to string; very small and very large numbers -// are NOT converted to scientific notation. -// n must be a number or real conforming to the implementation limits -// of PDF as specified in appendix C.1 of the PDF Ref. -// These are: -// maximum value of ints is +2^32 -// maximum value of reals is +2^15 -// smalles values of reals is 1/(2^16) - -static char *convertNumToPDF(double n) -{ - static const int precision = 6; - static const int fact = (int) 1E6; // must be 10^precision - static const double epsilon = 0.5E-6; // 2epsilon must be 10^-precision - static char buf[64]; - // handle very small values: return 0 - if (fabs(n) < epsilon) { - buf[0] = '0'; - buf[1] = '\0'; - } else { - char ints[64]; - int bindex = 0, sindex = 0; - int ival, fval; - // handle the sign part if n is negative - if (n < 0) { - buf[bindex++] = '-'; - n = -n; - } - n += epsilon; // for rounding - // handle the integer part, simply with sprintf - ival = (int) floor(n); - n -= ival; - sprintf(ints, "%d", ival); - while (ints[sindex] != 0) - buf[bindex++] = ints[sindex++]; - // handle the fractional part up to 'precision' digits - fval = (int) floor(n * fact); - if (fval) { - // set a dot - buf[bindex++] = '.'; - sindex = bindex + precision; - buf[sindex--] = '\0'; - // fill up trailing zeros with the string terminator NULL - while (((fval % 10) == 0) && (sindex >= bindex)) { - buf[sindex--] = '\0'; - fval /= 10; - } - // fill up the fractional part back to front - while (sindex >= bindex) { - buf[sindex--] = (fval % 10) + '0'; - fval /= 10; - } - } else - buf[bindex++] = 0; - } - return (char *) buf; -} - -static void copyObject(Object * obj) -{ - Object obj1; - int i, l, c; - Ref ref; - char *p; - GString *s; - if (obj->isBool()) { - pdf_printf("%s", obj->getBool()? "true" : "false"); - } else if (obj->isInt()) { - pdf_printf("%i", obj->getInt()); - } else if (obj->isReal()) { - pdf_printf("%s", convertNumToPDF(obj->getReal())); - } else if (obj->isNum()) { - pdf_printf("%s", convertNumToPDF(obj->getNum())); - } else if (obj->isString()) { - s = (GooString *)obj->getString(); - p = (char *)s->getCString(); - l = s->getLength(); - if (strlen(p) == (unsigned int) l) { - pdf_puts("("); - for (; *p != 0; p++) { - c = (unsigned char) *p; - if (c == '(' || c == ')' || c == '\\') - pdf_printf("\\%c", c); - else if (c < 0x20 || c > 0x7F) - pdf_printf("\\%03o", c); - else - pdfout(c); - } - pdf_puts(")"); - } else { - pdf_puts("<"); - for (i = 0; i < l; i++) { - c = s->getChar(i) & 0xFF; - pdf_printf("%.2x", c); - } - pdf_puts(">"); - } - } else if (obj->isName()) { - copyName((char *)obj->getName()); - } else if (obj->isNull()) { - pdf_puts("null"); - } else if (obj->isArray()) { - pdf_puts("["); - for (i = 0, l = obj->arrayGetLength(); i < l; ++i) { - obj1 = obj->arrayGetNF(i); - if (!obj1.isName()) - pdf_puts(" "); - copyObject(&obj1); - } - pdf_puts("]"); - } else if (obj->isDict()) { - pdf_puts("<<\n"); - copyDict(obj); - pdf_puts(">>"); - } else if (obj->isStream()) { - pdf_puts("<<\n"); - copyDict(obj->getStream()->getDictObject()); - pdf_puts(">>\n"); - pdf_puts("stream\n"); - copyStream(obj->getStream()->getUndecodedStream()); - pdf_puts("\nendstream"); - } else if (obj->isRef()) { - ref = obj->getRef(); - if (ref.num == 0) { - pdftex_fail - ("PDF inclusion: reference to invalid object" - " (is the included pdf broken?)"); - } else - pdf_printf("%d 0 R", addOther(ref)); - } else { - pdftex_fail("PDF inclusion: type <%s> cannot be copied", - obj->getTypeName()); - } -} - -static void writeRefs() -{ - InObj *r; - for (r = inObjList; r != 0; r = r->next) { - if (!r->written) { - r->written = 1; - Object obj1 = xref->fetch(r->ref.num, r->ref.gen); - if (r->type == objFont) { - assert(!obj1.isStream()); - pdfbeginobj(r->num, 2); // \pdfobjcompresslevel = 2 is for this - copyFontDict(&obj1, r); - pdf_puts("\n"); - pdfendobj(); - } else if (r->type != objFontDesc) { // /FontDescriptor is written via write_fontdescriptor() - if (obj1.isStream()) - pdfbeginobj(r->num, 0); - else - pdfbeginobj(r->num, 2); // \pdfobjcompresslevel = 2 is for this - copyObject(&obj1); - pdf_puts("\n"); - pdfendobj(); - } - } - } -} - -static void writeEncodings() -{ - UsedEncoding *r, *n; - char *glyphNames[256], *s; - int i; - for (r = encodingList; r != 0; r = r->next) { - for (i = 0; i < 256; i++) { - if (r->font->isCIDFont()) { - pdftex_fail - ("PDF inclusion: CID fonts are not supported" - " (try to disable font replacement to fix this)"); - } - if ((s = (char *)((Gfx8BitFont *) r->font)->getCharName(i)) != 0) - glyphNames[i] = s; - else - glyphNames[i] = notdef; - } - epdf_write_enc(glyphNames, r->enc_objnum); - } - for (r = encodingList; r != 0; r = n) { - n = r->next; -#ifdef POPPLER_VERSION - r->font->decRefCnt(); -#else -#error POPPLER_VERSION should be defined. -#endif - delete r; - } -} - -// get the pagebox according to the pagebox_spec -static const PDFRectangle *get_pagebox(Page * page, int pagebox_spec) -{ - if (pagebox_spec == pdfboxspecmedia) - return page->getMediaBox(); - else if (pagebox_spec == pdfboxspeccrop) - return page->getCropBox(); - else if (pagebox_spec == pdfboxspecbleed) - return page->getBleedBox(); - else if (pagebox_spec == pdfboxspectrim) - return page->getTrimBox(); - else if (pagebox_spec == pdfboxspecart) - return page->getArtBox(); - else - pdftex_fail("PDF inclusion: unknown value of pagebox spec (%i)", - (int) pagebox_spec); - return page->getMediaBox(); // to make the compiler happy -} - - -// Reads various information about the PDF and sets it up for later inclusion. -// This will fail if the PDF version of the PDF is higher than -// minor_pdf_version_wanted or page_name is given and can not be found. -// It makes no sense to give page_name _and_ page_num. -// Returns the page number. - -int -read_pdf_info(char *image_name, char *page_name, int page_num, - int pagebox_spec, int major_pdf_version_wanted, int minor_pdf_version_wanted, - int pdf_inclusion_errorlevel) -{ - PdfDocument *pdf_doc; - Page *page; - const PDFRectangle *pagebox; -#ifdef POPPLER_VERSION - int pdf_major_version_found, pdf_minor_version_found; -#else -#error POPPLER_VERSION should be defined. -#endif - // initialize - if (!isInit) { - globalParams = new GlobalParams(); - globalParams->setErrQuiet(gFalse); - isInit = gTrue; - } - // open PDF file - pdf_doc = find_add_document(image_name); - epdf_doc = (void *) pdf_doc; - - // check PDF version - // this works only for PDF 1.x -- but since any versions of PDF newer - // than 1.x will not be backwards compatible to PDF 1.x, pdfTeX will - // then have to changed drastically anyway. -#ifdef POPPLER_VERSION - pdf_major_version_found = pdf_doc->doc->getPDFMajorVersion(); - pdf_minor_version_found = pdf_doc->doc->getPDFMinorVersion(); - if ((pdf_major_version_found > major_pdf_version_wanted) - || (pdf_minor_version_found > minor_pdf_version_wanted)) { - const char *msg = - "PDF inclusion: found PDF version <%d.%d>, but at most version <%d.%d> allowed"; - if (pdf_inclusion_errorlevel > 0) { - pdftex_fail(msg, pdf_major_version_found, pdf_minor_version_found, major_pdf_version_wanted, minor_pdf_version_wanted); - } else if (pdf_inclusion_errorlevel < 0) { - ; /* do nothing */ - } else { /* = 0, give warning */ - pdftex_warn(msg, pdf_major_version_found, pdf_minor_version_found, major_pdf_version_wanted, minor_pdf_version_wanted); - } - } -#else -#error POPPLER_VERSION should be defined. -#endif - epdf_num_pages = pdf_doc->doc->getCatalog()->getNumPages(); - if (page_name) { - // get page by name - GString name(page_name); - LinkDest *link = pdf_doc->doc->findDest(&name); - if (link == 0 || !link->isOk()) - pdftex_fail("PDF inclusion: invalid destination <%s>", page_name); - Ref ref = link->getPageRef(); - page_num = pdf_doc->doc->getCatalog()->findPage(ref.num, ref.gen); - if (page_num == 0) - pdftex_fail("PDF inclusion: destination is not a page <%s>", - page_name); - delete link; - } else { - // get page by number - if (page_num <= 0 || page_num > epdf_num_pages) - pdftex_fail("PDF inclusion: required page does not exist <%i>", - epdf_num_pages); - } - // get the required page - page = pdf_doc->doc->getCatalog()->getPage(page_num); - - // get the pagebox (media, crop...) to use. - pagebox = get_pagebox(page, pagebox_spec); - if (pagebox->x2 > pagebox->x1) { - epdf_orig_x = pagebox->x1; - epdf_width = pagebox->x2 - pagebox->x1; - } else { - epdf_orig_x = pagebox->x2; - epdf_width = pagebox->x1 - pagebox->x2; - } - if (pagebox->y2 > pagebox->y1) { - epdf_orig_y = pagebox->y1; - epdf_height = pagebox->y2 - pagebox->y1; - } else { - epdf_orig_y = pagebox->y2; - epdf_height = pagebox->y1 - pagebox->y2; - } - - // get page rotation - epdf_rotate = page->getRotate() % 360; - if (epdf_rotate < 0) - epdf_rotate += 360; - - // page group - if (page->getGroup() != NULL) - epdf_has_page_group = 1; // only flag that page group is present; - // the actual object number will be - // generated in pdftex.web - else - epdf_has_page_group = 0; // no page group present - - pdf_doc->xref = pdf_doc->doc->getXRef(); - return page_num; -} - -// writes the current epf_doc. -// Here the included PDF is copied, so most errors that can happen during PDF -// inclusion will arise here. - -void write_epdf(void) -{ - Page *page; - Ref *pageRef; - Dict *pageDict; - Object contents, obj1, obj2, pageObj, dictObj; - Object groupDict; - bool writeSepGroup = false; - Object info; - char *key; - char s[256]; - int i, l; - int rotate; - double scale[6] = { 0, 0, 0, 0, 0, 0 }; - bool writematrix = false; - int suppress_ptex_info = getpdfsuppressptexinfo(); - static const char *pageDictKeys[] = { - "LastModified", - "Metadata", - "PieceInfo", - "SeparationInfo", -// "Group", -// "Resources", - NULL - }; - - PdfDocument *pdf_doc = (PdfDocument *) epdf_doc; - (pdf_doc->occurences)--; - xref = pdf_doc->xref; - inObjList = pdf_doc->inObjList; - encodingList = 0; - page = pdf_doc->doc->getCatalog()->getPage(epdf_selected_page); - pageRef = pdf_doc->doc->getCatalog()->getPageRef(epdf_selected_page); - pageObj = xref->fetch(pageRef->num, pageRef->gen); - pageDict = pageObj.getDict(); - rotate = page->getRotate(); - const PDFRectangle *pagebox; - // write the Page header - pdf_puts("/Type /XObject\n"); - pdf_puts("/Subtype /Form\n"); - pdf_puts("/FormType 1\n"); - - // write additional information - if ((suppress_ptex_info & MASK_SUPPRESS_PTEX_FILENAME) == 0) { - pdf_printf("/%s.FileName (%s)\n", pdfkeyprefix, - convertStringToPDFString(pdf_doc->file_name, - strlen(pdf_doc->file_name))); - } - if ((suppress_ptex_info & MASK_SUPPRESS_PTEX_PAGENUMBER) == 0) { - pdf_printf("/%s.PageNumber %i\n", pdfkeyprefix, (int) epdf_selected_page); - } - if ((suppress_ptex_info & MASK_SUPPRESS_PTEX_INFODICT) == 0) { - info = pdf_doc->doc->getDocInfoNF(); - if (info.isRef()) { - // the info dict must be indirect (PDF Ref p. 61) - pdf_printf("/%s.InfoDict ", pdfkeyprefix); - pdf_printf("%d 0 R\n", addOther(info.getRef())); - } - } - // get the pagebox (media, crop...) to use. - pagebox = get_pagebox(page, epdf_page_box); - - // handle page rotation - if (rotate != 0) { - if (rotate % 90 == 0) { - // this handles only the simple case: multiple of 90s but these - // are the only values allowed according to the reference - // (v1.3, p. 78). - // the image is rotated around its center. - // the /Rotate key is clockwise while the matrix is - // counterclockwise :-% - tex_printf(", page is rotated %d degrees", rotate); - switch (rotate) { - case 90: - scale[1] = -1; - scale[2] = 1; - scale[4] = pagebox->x1 - pagebox->y1; - scale[5] = pagebox->y1 + pagebox->x2; - writematrix = true; - break; - case 180: - scale[0] = scale[3] = -1; - scale[4] = pagebox->x1 + pagebox->x2; - scale[5] = pagebox->y1 + pagebox->y2; - writematrix = true; - break; // width and height are exchanged - case 270: - scale[1] = 1; - scale[2] = -1; - scale[4] = pagebox->x1 + pagebox->y2; - scale[5] = pagebox->y1 - pagebox->x1; - writematrix = true; - break; - } - if (writematrix) { // The matrix is only written if the image is rotated. - sprintf(s, "/Matrix [%.8f %.8f %.8f %.8f %.8f %.8f]\n", - scale[0], - scale[1], scale[2], scale[3], scale[4], scale[5]); - pdf_puts(stripzeros(s)); - } - } - } - - sprintf(s, "/BBox [%.8f %.8f %.8f %.8f]\n", - pagebox->x1, pagebox->y1, pagebox->x2, pagebox->y2); - pdf_puts(stripzeros(s)); - - // Metadata validity check (as a stream it must be indirect) - dictObj = pageDict->lookupNF("Metadata"); - if (!dictObj.isNull() && !dictObj.isRef()) - pdftex_warn("PDF inclusion: /Metadata must be indirect object"); - - // copy selected items in Page dictionary except Resources & Group - for (i = 0; pageDictKeys[i] != NULL; i++) { - dictObj = pageDict->lookupNF(pageDictKeys[i]); - if (!dictObj.isNull()) { - pdf_newline(); - pdf_printf("/%s ", pageDictKeys[i]); - copyObject(&dictObj); // preserves indirection - } - } - - // handle page group - dictObj = pageDict->lookupNF("Group"); - if (!dictObj.isNull()) { - if (pdfpagegroupval == 0) { - // another pdf with page group was included earlier on the - // same page; copy the Group entry as is. See manual for - // info on why this is a warning. - if (getpdfsuppresswarningpagegroup() == 0) { - pdftex_warn - ("PDF inclusion: multiple pdfs with page group included in a single page"); - } - pdf_newline(); - pdf_puts("/Group "); - copyObject(&dictObj); - } else { - // write Group dict as a separate object, since the Page dict also refers to it - dictObj = pageDict->lookup("Group"); - if (!dictObj.isDict()) - pdftex_fail("PDF inclusion: /Group dict missing"); - writeSepGroup = true; -/* -This part is only a single line - groupDict = Object(page->getGroup()); -in the original patch. In this case, however, pdftex crashes at -"delete pdf_doc->doc" in "delete_document()" for inclusion of some -kind of pdf images, for example, figure_missing.pdf in gnuplot. -A change - groupDict = Object(page->getGroup()).copy(); -does not improve the situation. -The changes below seem to work fine. -*/ -// begin modification - groupDict = pageDict->lookup("Group"); - const Dict& dic1 = page->getGroup(); - const Dict& dic2 = groupDict.getDict(); - // replace dic2 in groupDict with dic1 - l = dic2.getLength(); - for (i = 0; i < l; i++) { - groupDict.dictRemove(dic2.getKey(i)); - } - l = dic1.getLength(); - for (i = 0; i < l; i++) { - groupDict.dictAdd((const char *)copyString(dic1.getKey(i)), - dic1.getValNF(i)); - } -// end modification - pdf_printf("/Group %ld 0 R\n", (long)pdfpagegroupval); - } - } - - // write the Resources dictionary - if (page->getResourceDict() == NULL) { - // Resources can be missing (files without them have been spotted - // in the wild); in which case the /Resouces of the /Page will be used. - // "This practice is not recommended". - pdftex_warn - ("PDF inclusion: /Resources missing. 'This practice is not recommended' (PDF Ref)"); - } else { - Object *obj1 = page->getResourceDictObject(); - if (!obj1->isDict()) - pdftex_fail("PDF inclusion: invalid resources dict type <%s>", - obj1->getTypeName()); - pdf_newline(); - pdf_puts("/Resources <<\n"); - for (i = 0, l = obj1->dictGetLength(); i < l; ++i) { - obj2 = obj1->dictGetVal(i); - key = (char *)obj1->dictGetKey(i); - if (strcmp("Font", key) == 0) - copyFontResources(&obj2); - else if (strcmp("ProcSet", key) == 0) - copyProcSet(&obj2); - else - copyOtherResources(&obj2, (char *)key); - } - pdf_puts(">>\n"); - } - - // write the page contents - contents = page->getContents(); - if (contents.isStream()) { - - // Variant A: get stream and recompress under control - // of \pdfcompresslevel - // - // pdfbeginstream(); - // copyStream(contents->getStream()); - // pdfendstream(); - - // Variant B: copy stream without recompressing - // - obj1 = contents.streamGetDict()->lookup("F"); - if (!obj1.isNull()) { - pdftex_fail("PDF inclusion: Unsupported external stream"); - } - obj1 = contents.streamGetDict()->lookup("Length"); - assert(!obj1.isNull()); - pdf_puts("/Length "); - copyObject(&obj1); - pdf_puts("\n"); - obj1 = contents.streamGetDict()->lookup("Filter"); - if (!obj1.isNull()) { - pdf_puts("/Filter "); - copyObject(&obj1); - pdf_puts("\n"); - obj1 = contents.streamGetDict()->lookup("DecodeParms"); - if (!obj1.isNull()) { - pdf_puts("/DecodeParms "); - copyObject(&obj1); - pdf_puts("\n"); - } - } - pdf_puts(">>\nstream\n"); - copyStream(contents.getStream()->getUndecodedStream()); - pdfendstream(); - } else if (contents.isArray()) { - pdfbeginstream(); - for (i = 0, l = contents.arrayGetLength(); i < l; ++i) { - Object contentsobj = contents.arrayGet(i); - copyStream(contentsobj.getStream()); - if (i < l - 1) - pdf_newline(); // add a newline after each stream except the last - } - pdfendstream(); - } else { // the contents are optional, but we need to include an empty stream - pdfbeginstream(); - pdfendstream(); - } - - // write out all indirect objects - writeRefs(); - - // write out all used encodings (and delete list) - writeEncodings(); - - // write the Group dict if needed - if (writeSepGroup) { - pdfbeginobj(pdfpagegroupval, 2); - copyObject(&groupDict); - pdf_puts("\n"); - pdfendobj(); - pdfpagegroupval = 0; // only the 1st included pdf on a page gets its - // Group included in the Page dict - } - - // save object list, xref - pdf_doc->inObjList = inObjList; - pdf_doc->xref = xref; -} - -// Called when an image has been written and it's resources in image_tab are -// freed and it's not referenced anymore. - -void epdf_delete() -{ - PdfDocument *pdf_doc = (PdfDocument *) epdf_doc; - xref = pdf_doc->xref; - if (pdf_doc->occurences < 0) { - delete_document(pdf_doc); - } -} - -// Called when PDF embedding system is finalized. -// Now deallocate all remaining PdfDocuments. - -void epdf_check_mem() -{ - if (isInit) { - PdfDocument *p, *n; - for (p = pdfDocuments; p; p = n) { - n = p->next; - delete_document(p); - } - // see above for globalParams - delete globalParams; - } -} diff --git a/Build/source/texk/web2c/pdftexdir/pdftoepdf-poppler0.71.0.cc b/Build/source/texk/web2c/pdftexdir/pdftoepdf-poppler0.71.0.cc deleted file mode 100644 index 5bd88346ce0..00000000000 --- a/Build/source/texk/web2c/pdftexdir/pdftoepdf-poppler0.71.0.cc +++ /dev/null @@ -1,1113 +0,0 @@ -/* -Copyright 1996-2017 Han The Thanh, <thanh@pdftex.org> - -This file is part of pdfTeX. - -pdfTeX is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -pdfTeX is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -/* -This is based on the patch texlive-poppler-0.59.patch <2017-09-19> at -https://git.archlinux.org/svntogit/packages.git/plain/texlive-bin/trunk -by Arch Linux. A little modifications are made to avoid a crash for -some kind of pdf images, such as figure_missing.pdf in gnuplot. -The poppler should be 0.71.0. -POPPLER_VERSION should be defined. -*/ - -/* Do this early in order to avoid a conflict between - MINGW32 <rpcndr.h> defining 'boolean' as 'unsigned char' and - <kpathsea/types.h> defining Pascal's boolean as 'int'. -*/ -#include <w2c/config.h> -#include <kpathsea/lib.h> - -#include <stdlib.h> -#include <math.h> -#include <stddef.h> -#include <stdio.h> -#include <string.h> -#include <ctype.h> - -#ifdef POPPLER_VERSION -#include <dirent.h> -#include <poppler-config.h> -#include <goo/GooString.h> -#include <goo/gmem.h> -#include <goo/gfile.h> -#define GString GooString -#else -#error POPPLER_VERSION should be defined. -#endif -#include <assert.h> - -#include "Object.h" -#include "Stream.h" -#include "Array.h" -#include "Dict.h" -#include "XRef.h" -#include "Catalog.h" -#include "Link.h" -#include "Page.h" -#include "GfxFont.h" -#include "PDFDoc.h" -#include "GlobalParams.h" -#include "Error.h" - -// This file is mostly C and not very much C++; it's just used to interface -// the functions of xpdf, which are written in C++. - -extern "C" { -#include <pdftexdir/ptexmac.h> -#include <pdftexdir/pdftex-common.h> - -// These functions from pdftex.web gets declared in pdftexcoerce.h in the -// usual web2c way, but we cannot include that file here because C++ -// does not allow it. -extern int getpdfsuppresswarningpagegroup(void); -extern integer getpdfsuppressptexinfo(void); -extern integer zround(double); -} - -// The prefix "PTEX" for the PDF keys is special to pdfTeX; -// this has been registered with Adobe by Hans Hagen. - -#define pdfkeyprefix "PTEX" - -#define MASK_SUPPRESS_PTEX_FULLBANNER 0x01 -#define MASK_SUPPRESS_PTEX_FILENAME 0x02 -#define MASK_SUPPRESS_PTEX_PAGENUMBER 0x04 -#define MASK_SUPPRESS_PTEX_INFODICT 0x08 - -// When copying the Resources of the selected page, all objects are copied -// recusively top-down. Indirect objects however are not fetched during -// copying, but get a new object number from pdfTeX and then will be -// appended into a linked list. Duplicates are checked and removed from the -// list of indirect objects during appending. - -enum InObjType { - objFont, - objFontDesc, - objOther -}; - -struct InObj { - Ref ref; // ref in original PDF - InObjType type; // object type - InObj *next; // next entry in list of indirect objects - int num; // new object number in output PDF - fd_entry *fd; // pointer to /FontDescriptor object structure - int enc_objnum; // Encoding for objFont - int written; // has it been written to output PDF? -}; - -struct UsedEncoding { - int enc_objnum; - GfxFont *font; - UsedEncoding *next; -}; - -static InObj *inObjList; -static UsedEncoding *encodingList; -static bool isInit = false; - -// -------------------------------------------------------------------- -// Maintain list of open embedded PDF files -// -------------------------------------------------------------------- - -struct PdfDocument { - char *file_name; - PDFDoc *doc; - XRef *xref; - InObj *inObjList; - int occurences; // number of references to the document; the doc can be - // deleted when this is negative - PdfDocument *next; -}; - -static PdfDocument *pdfDocuments = 0; - -static XRef *xref = 0; - -// Returns pointer to PdfDocument record for PDF file. -// Creates a new record if it doesn't exist yet. -// xref is made current for the document. - -static PdfDocument *find_add_document(char *file_name) -{ - PdfDocument *p = pdfDocuments; - while (p && strcmp(p->file_name, file_name) != 0) - p = p->next; - if (p) { - xref = p->xref; - (p->occurences)++; - return p; - } - p = new PdfDocument; - p->file_name = xstrdup(file_name); - p->xref = xref = 0; - p->occurences = 0; - GString *docName = new GString(p->file_name); - p->doc = new PDFDoc(docName); // takes ownership of docName - if (!p->doc->isOk() || !p->doc->okToPrint()) { - pdftex_fail("xpdf: reading PDF image failed"); - } - p->inObjList = 0; - p->next = pdfDocuments; - pdfDocuments = p; - return p; -} - -// Deallocate a PdfDocument with all its resources - -static void delete_document(PdfDocument * pdf_doc) -{ - PdfDocument **p = &pdfDocuments; - while (*p && *p != pdf_doc) - p = &((*p)->next); - // should not happen: - if (!*p) - return; - // unlink from list - *p = pdf_doc->next; - // free pdf_doc's resources - InObj *r, *n; - for (r = pdf_doc->inObjList; r != 0; r = n) { - n = r->next; - delete r; - } - xref = pdf_doc->xref; - delete pdf_doc->doc; - xfree(pdf_doc->file_name); - delete pdf_doc; -} - -// -------------------------------------------------------------------- - -static int addEncoding(GfxFont * gfont) -{ - UsedEncoding *n; - n = new UsedEncoding; - n->next = encodingList; - encodingList = n; - n->font = gfont; - n->enc_objnum = pdfnewobjnum(); - return n->enc_objnum; -} - -#define addFont(ref, fd, enc_objnum) \ - addInObj(objFont, ref, fd, enc_objnum) - -// addFontDesc is only used to avoid writing the original FontDescriptor -// from the PDF file. - -#define addFontDesc(ref, fd) \ - addInObj(objFontDesc, ref, fd, 0) - -#define addOther(ref) \ - addInObj(objOther, ref, 0, 0) - -static int addInObj(InObjType type, Ref ref, fd_entry * fd, int e) -{ - InObj *p, *q, *n = new InObj; - if (ref.num == 0) - pdftex_fail("PDF inclusion: invalid reference"); - n->ref = ref; - n->type = type; - n->next = 0; - n->fd = fd; - n->enc_objnum = e; - n->written = 0; - if (inObjList == 0) - inObjList = n; - else { - for (p = inObjList; p != 0; p = p->next) { - if (p->ref.num == ref.num && p->ref.gen == ref.gen) { - delete n; - return p->num; - } - q = p; - } - // it is important to add new objects at the end of the list, - // because new objects are being added while the list is being - // written out. - q->next = n; - } - if (type == objFontDesc) - n->num = get_fd_objnum(fd); - else - n->num = pdfnewobjnum(); - return n->num; -} - -#if 0 /* unusewd */ -static int getNewObjectNumber(Ref ref) -{ - InObj *p; - if (inObjList == 0) { - pdftex_fail("No objects copied yet"); - } else { - for (p = inObjList; p != 0; p = p->next) { - if (p->ref.num == ref.num && p->ref.gen == ref.gen) { - return p->num; - } - } - pdftex_fail("Object not yet copied: %i %i", ref.num, ref.gen); - } -#ifdef _MSC_VER - /* Never reached, but without __attribute__((noreturn)) for pdftex_fail() - MSVC 5.0 requires an int return value. */ - return -60000; -#endif -} -#endif - -static void copyObject(Object *); - -static void copyName(char *s) -{ - pdf_puts("/"); - for (; *s != 0; s++) { - if (isdigit(*s) || isupper(*s) || islower(*s) || *s == '_' || - *s == '.' || *s == '-' || *s == '+') - pdfout(*s); - else - pdf_printf("#%.2X", *s & 0xFF); - } -} - -static void copyDictEntry(Object * obj, int i) -{ - Object obj1; - copyName((char *)obj->dictGetKey(i)); - pdf_puts(" "); - obj1 = obj->dictGetValNF(i); - copyObject(&obj1); - pdf_puts("\n"); -} - -static void copyDict(Object * obj) -{ - int i, l; - if (!obj->isDict()) - pdftex_fail("PDF inclusion: invalid dict type <%s>", - obj->getTypeName()); - for (i = 0, l = obj->dictGetLength(); i < l; ++i) - copyDictEntry(obj, i); -} - -static void copyFontDict(Object * obj, InObj * r) -{ - int i, l; - char *key; - if (!obj->isDict()) - pdftex_fail("PDF inclusion: invalid dict type <%s>", - obj->getTypeName()); - pdf_puts("<<\n"); - assert(r->type == objFont); // FontDescriptor is in fd_tree - for (i = 0, l = obj->dictGetLength(); i < l; ++i) { - key = (char *)obj->dictGetKey(i); - if (strncmp("FontDescriptor", key, strlen("FontDescriptor")) == 0 - || strncmp("BaseFont", key, strlen("BaseFont")) == 0 - || strncmp("Encoding", key, strlen("Encoding")) == 0) - continue; // skip original values - copyDictEntry(obj, i); - } - // write new FontDescriptor, BaseFont, and Encoding - pdf_printf("/FontDescriptor %d 0 R\n", get_fd_objnum(r->fd)); - pdf_printf("/BaseFont %d 0 R\n", get_fn_objnum(r->fd)); - pdf_printf("/Encoding %d 0 R\n", r->enc_objnum); - pdf_puts(">>"); -} - -static void copyStream(Stream * str) -{ - int c, c2 = 0; - str->reset(); - while ((c = str->getChar()) != EOF) { - pdfout(c); - c2 = c; - } - pdflastbyte = c2; -} - -static void copyProcSet(Object * obj) -{ - int i, l; - Object procset; - if (!obj->isArray()) - pdftex_fail("PDF inclusion: invalid ProcSet array type <%s>", - obj->getTypeName()); - pdf_puts("/ProcSet [ "); - for (i = 0, l = obj->arrayGetLength(); i < l; ++i) { - procset = obj->arrayGetNF(i); - if (!procset.isName()) - pdftex_fail("PDF inclusion: invalid ProcSet entry type <%s>", - procset.getTypeName()); - copyName((char *)procset.getName()); - pdf_puts(" "); - } - pdf_puts("]\n"); -} - -#define REPLACE_TYPE1C true - -static bool embeddableFont(Object * fontdesc) -{ - Object fontfile, ffsubtype; - - if (!fontdesc->isDict()) - return false; - fontfile = fontdesc->dictLookup("FontFile"); - if (fontfile.isStream()) - return true; - if (REPLACE_TYPE1C) { - fontfile = fontdesc->dictLookup("FontFile3"); - if (!fontfile.isStream()) - return false; - ffsubtype = fontfile.streamGetDict()->lookup("Subtype"); - return ffsubtype.isName() && !strcmp(ffsubtype.getName(), "Type1C"); - } - return false; -} - -static void copyFont(char *tag, Object * fontRef) -{ - Object fontdict, subtype, basefont, fontdescRef, fontdesc, charset, - stemV; - GfxFont *gfont; - fd_entry *fd; - fm_entry *fontmap; - // Check whether the font has already been embedded before analysing it. - InObj *p; - Ref ref = fontRef->getRef(); - for (p = inObjList; p; p = p->next) { - if (p->ref.num == ref.num && p->ref.gen == ref.gen) { - copyName(tag); - pdf_printf(" %d 0 R ", p->num); - return; - } - } - // Only handle included Type1 (and Type1C) fonts; anything else will be copied. - // Type1C fonts are replaced by Type1 fonts, if REPLACE_TYPE1C is true. - fontdict = fontRef->fetch(xref); - fontdesc = Object(objNull); - if (fontdict.isDict()) { - subtype = fontdict.dictLookup("Subtype"); - basefont = fontdict.dictLookup("BaseFont"); - fontdescRef = fontdict.dictLookupNF("FontDescriptor"); - if (fontdescRef.isRef()) { - fontdesc = fontdescRef.fetch(xref); - } - } - if (!fixedinclusioncopyfont && fontdict.isDict() - && subtype.isName() - && !strcmp(subtype.getName(), "Type1") - && basefont.isName() - && fontdescRef.isRef() - && fontdesc.isDict() - && embeddableFont(&fontdesc) - && (fontmap = lookup_fontmap((char *)basefont.getName())) != NULL) { - // round /StemV value, since the PDF input is a float - // (see Font Descriptors in PDF reference), but we only store an - // integer, since we don't want to change the struct. - stemV = fontdesc.dictLookup("StemV"); - fd = epdf_create_fontdescriptor(fontmap, zround(stemV.getNum())); - charset = fontdesc.dictLookup("CharSet"); - if (!charset.isNull() && - charset.isString() && is_subsetable(fontmap)) - epdf_mark_glyphs(fd, (char *)charset.getString()->getCString()); - else - embed_whole_font(fd); - addFontDesc(fontdescRef.getRef(), fd); - copyName(tag); - gfont = GfxFont::makeFont(xref, tag, fontRef->getRef(), - fontdict.getDict()); - pdf_printf(" %d 0 R ", addFont(fontRef->getRef(), fd, - addEncoding(gfont))); - } else { - copyName(tag); - pdf_puts(" "); - copyObject(fontRef); - } -} - -static void copyFontResources(Object * obj) -{ - Object fontRef; - int i, l; - if (!obj->isDict()) - pdftex_fail("PDF inclusion: invalid font resources dict type <%s>", - obj->getTypeName()); - pdf_puts("/Font << "); - for (i = 0, l = obj->dictGetLength(); i < l; ++i) { - fontRef = obj->dictGetValNF(i); - if (fontRef.isRef()) - copyFont((char *)obj->dictGetKey(i), &fontRef); - else if (fontRef.isDict()) { // some programs generate pdf with embedded font object - copyName((char *)obj->dictGetKey(i)); - pdf_puts(" "); - copyObject(&fontRef); - } - else - pdftex_fail("PDF inclusion: invalid font in reference type <%s>", - fontRef.getTypeName()); - } - pdf_puts(">>\n"); -} - -static void copyOtherResources(Object * obj, char *key) -{ - // copies all other resources (write_epdf handles Fonts and ProcSets), - - // if Subtype is present, it must be a name - if (strcmp("Subtype", key) == 0) { - if (!obj->isName()) { - pdftex_warn("PDF inclusion: Subtype in Resources dict is not a name" - " (key '%s', type <%s>); ignored.", - key, obj->getTypeName()); - return; - } - } else if (!obj->isDict()) { - //FIXME: Write the message only to the log file - pdftex_warn("PDF inclusion: invalid other resource which is no dict" - " (key '%s', type <%s>); ignored.", - key, obj->getTypeName()); - return; - } - copyName(key); - pdf_puts(" "); - copyObject(obj); -} - -// Function onverts double to string; very small and very large numbers -// are NOT converted to scientific notation. -// n must be a number or real conforming to the implementation limits -// of PDF as specified in appendix C.1 of the PDF Ref. -// These are: -// maximum value of ints is +2^32 -// maximum value of reals is +2^15 -// smalles values of reals is 1/(2^16) - -static char *convertNumToPDF(double n) -{ - static const int precision = 6; - static const int fact = (int) 1E6; // must be 10^precision - static const double epsilon = 0.5E-6; // 2epsilon must be 10^-precision - static char buf[64]; - // handle very small values: return 0 - if (fabs(n) < epsilon) { - buf[0] = '0'; - buf[1] = '\0'; - } else { - char ints[64]; - int bindex = 0, sindex = 0; - int ival, fval; - // handle the sign part if n is negative - if (n < 0) { - buf[bindex++] = '-'; - n = -n; - } - n += epsilon; // for rounding - // handle the integer part, simply with sprintf - ival = (int) floor(n); - n -= ival; - sprintf(ints, "%d", ival); - while (ints[sindex] != 0) - buf[bindex++] = ints[sindex++]; - // handle the fractional part up to 'precision' digits - fval = (int) floor(n * fact); - if (fval) { - // set a dot - buf[bindex++] = '.'; - sindex = bindex + precision; - buf[sindex--] = '\0'; - // fill up trailing zeros with the string terminator NULL - while (((fval % 10) == 0) && (sindex >= bindex)) { - buf[sindex--] = '\0'; - fval /= 10; - } - // fill up the fractional part back to front - while (sindex >= bindex) { - buf[sindex--] = (fval % 10) + '0'; - fval /= 10; - } - } else - buf[bindex++] = 0; - } - return (char *) buf; -} - -static void copyObject(Object * obj) -{ - Object obj1; - int i, l, c; - Ref ref; - char *p; - GString *s; - if (obj->isBool()) { - pdf_printf("%s", obj->getBool()? "true" : "false"); - } else if (obj->isInt()) { - pdf_printf("%i", obj->getInt()); - } else if (obj->isReal()) { - pdf_printf("%s", convertNumToPDF(obj->getReal())); - } else if (obj->isNum()) { - pdf_printf("%s", convertNumToPDF(obj->getNum())); - } else if (obj->isString()) { - s = (GooString *)obj->getString(); - p = (char *)s->getCString(); - l = s->getLength(); - if (strlen(p) == (unsigned int) l) { - pdf_puts("("); - for (; *p != 0; p++) { - c = (unsigned char) *p; - if (c == '(' || c == ')' || c == '\\') - pdf_printf("\\%c", c); - else if (c < 0x20 || c > 0x7F) - pdf_printf("\\%03o", c); - else - pdfout(c); - } - pdf_puts(")"); - } else { - pdf_puts("<"); - for (i = 0; i < l; i++) { - c = s->getChar(i) & 0xFF; - pdf_printf("%.2x", c); - } - pdf_puts(">"); - } - } else if (obj->isName()) { - copyName((char *)obj->getName()); - } else if (obj->isNull()) { - pdf_puts("null"); - } else if (obj->isArray()) { - pdf_puts("["); - for (i = 0, l = obj->arrayGetLength(); i < l; ++i) { - obj1 = obj->arrayGetNF(i); - if (!obj1.isName()) - pdf_puts(" "); - copyObject(&obj1); - } - pdf_puts("]"); - } else if (obj->isDict()) { - pdf_puts("<<\n"); - copyDict(obj); - pdf_puts(">>"); - } else if (obj->isStream()) { - pdf_puts("<<\n"); - copyDict(obj->getStream()->getDictObject()); - pdf_puts(">>\n"); - pdf_puts("stream\n"); - copyStream(obj->getStream()->getUndecodedStream()); - pdf_puts("\nendstream"); - } else if (obj->isRef()) { - ref = obj->getRef(); - if (ref.num == 0) { - pdftex_fail - ("PDF inclusion: reference to invalid object" - " (is the included pdf broken?)"); - } else - pdf_printf("%d 0 R", addOther(ref)); - } else { - pdftex_fail("PDF inclusion: type <%s> cannot be copied", - obj->getTypeName()); - } -} - -static void writeRefs() -{ - InObj *r; - for (r = inObjList; r != 0; r = r->next) { - if (!r->written) { - r->written = 1; - Object obj1 = xref->fetch(r->ref.num, r->ref.gen); - if (r->type == objFont) { - assert(!obj1.isStream()); - pdfbeginobj(r->num, 2); // \pdfobjcompresslevel = 2 is for this - copyFontDict(&obj1, r); - pdf_puts("\n"); - pdfendobj(); - } else if (r->type != objFontDesc) { // /FontDescriptor is written via write_fontdescriptor() - if (obj1.isStream()) - pdfbeginobj(r->num, 0); - else - pdfbeginobj(r->num, 2); // \pdfobjcompresslevel = 2 is for this - copyObject(&obj1); - pdf_puts("\n"); - pdfendobj(); - } - } - } -} - -static void writeEncodings() -{ - UsedEncoding *r, *n; - char *glyphNames[256], *s; - int i; - for (r = encodingList; r != 0; r = r->next) { - for (i = 0; i < 256; i++) { - if (r->font->isCIDFont()) { - pdftex_fail - ("PDF inclusion: CID fonts are not supported" - " (try to disable font replacement to fix this)"); - } - if ((s = (char *)((Gfx8BitFont *) r->font)->getCharName(i)) != 0) - glyphNames[i] = s; - else - glyphNames[i] = notdef; - } - epdf_write_enc(glyphNames, r->enc_objnum); - } - for (r = encodingList; r != 0; r = n) { - n = r->next; -#ifdef POPPLER_VERSION - r->font->decRefCnt(); -#else -#error POPPLER_VERSION should be defined. -#endif - delete r; - } -} - -// get the pagebox according to the pagebox_spec -static const PDFRectangle *get_pagebox(Page * page, int pagebox_spec) -{ - if (pagebox_spec == pdfboxspecmedia) - return page->getMediaBox(); - else if (pagebox_spec == pdfboxspeccrop) - return page->getCropBox(); - else if (pagebox_spec == pdfboxspecbleed) - return page->getBleedBox(); - else if (pagebox_spec == pdfboxspectrim) - return page->getTrimBox(); - else if (pagebox_spec == pdfboxspecart) - return page->getArtBox(); - else - pdftex_fail("PDF inclusion: unknown value of pagebox spec (%i)", - (int) pagebox_spec); - return page->getMediaBox(); // to make the compiler happy -} - - -// Reads various information about the PDF and sets it up for later inclusion. -// This will fail if the PDF version of the PDF is higher than -// minor_pdf_version_wanted or page_name is given and can not be found. -// It makes no sense to give page_name _and_ page_num. -// Returns the page number. - -int -read_pdf_info(char *image_name, char *page_name, int page_num, - int pagebox_spec, int major_pdf_version_wanted, int minor_pdf_version_wanted, - int pdf_inclusion_errorlevel) -{ - PdfDocument *pdf_doc; - Page *page; - const PDFRectangle *pagebox; -#ifdef POPPLER_VERSION - int pdf_major_version_found, pdf_minor_version_found; -#else -#error POPPLER_VERSION should be defined. -#endif - // initialize - if (!isInit) { - globalParams = new GlobalParams(); - globalParams->setErrQuiet(false); - isInit = true; - } - // open PDF file - pdf_doc = find_add_document(image_name); - epdf_doc = (void *) pdf_doc; - - // check PDF version - // this works only for PDF 1.x -- but since any versions of PDF newer - // than 1.x will not be backwards compatible to PDF 1.x, pdfTeX will - // then have to changed drastically anyway. -#ifdef POPPLER_VERSION - pdf_major_version_found = pdf_doc->doc->getPDFMajorVersion(); - pdf_minor_version_found = pdf_doc->doc->getPDFMinorVersion(); - if ((pdf_major_version_found > major_pdf_version_wanted) - || (pdf_minor_version_found > minor_pdf_version_wanted)) { - const char *msg = - "PDF inclusion: found PDF version <%d.%d>, but at most version <%d.%d> allowed"; - if (pdf_inclusion_errorlevel > 0) { - pdftex_fail(msg, pdf_major_version_found, pdf_minor_version_found, major_pdf_version_wanted, minor_pdf_version_wanted); - } else if (pdf_inclusion_errorlevel < 0) { - ; /* do nothing */ - } else { /* = 0, give warning */ - pdftex_warn(msg, pdf_major_version_found, pdf_minor_version_found, major_pdf_version_wanted, minor_pdf_version_wanted); - } - } -#else -#error POPPLER_VERSION should be defined. -#endif - epdf_num_pages = pdf_doc->doc->getCatalog()->getNumPages(); - if (page_name) { - // get page by name - GString name(page_name); - LinkDest *link = pdf_doc->doc->findDest(&name); - if (link == 0 || !link->isOk()) - pdftex_fail("PDF inclusion: invalid destination <%s>", page_name); - Ref ref = link->getPageRef(); - page_num = pdf_doc->doc->getCatalog()->findPage(ref.num, ref.gen); - if (page_num == 0) - pdftex_fail("PDF inclusion: destination is not a page <%s>", - page_name); - delete link; - } else { - // get page by number - if (page_num <= 0 || page_num > epdf_num_pages) - pdftex_fail("PDF inclusion: required page does not exist <%i>", - epdf_num_pages); - } - // get the required page - page = pdf_doc->doc->getCatalog()->getPage(page_num); - - // get the pagebox (media, crop...) to use. - pagebox = get_pagebox(page, pagebox_spec); - if (pagebox->x2 > pagebox->x1) { - epdf_orig_x = pagebox->x1; - epdf_width = pagebox->x2 - pagebox->x1; - } else { - epdf_orig_x = pagebox->x2; - epdf_width = pagebox->x1 - pagebox->x2; - } - if (pagebox->y2 > pagebox->y1) { - epdf_orig_y = pagebox->y1; - epdf_height = pagebox->y2 - pagebox->y1; - } else { - epdf_orig_y = pagebox->y2; - epdf_height = pagebox->y1 - pagebox->y2; - } - - // get page rotation - epdf_rotate = page->getRotate() % 360; - if (epdf_rotate < 0) - epdf_rotate += 360; - - // page group - if (page->getGroup() != NULL) - epdf_has_page_group = 1; // only flag that page group is present; - // the actual object number will be - // generated in pdftex.web - else - epdf_has_page_group = 0; // no page group present - - pdf_doc->xref = pdf_doc->doc->getXRef(); - return page_num; -} - -// writes the current epf_doc. -// Here the included PDF is copied, so most errors that can happen during PDF -// inclusion will arise here. - -void write_epdf(void) -{ - Page *page; - Ref *pageRef; - Dict *pageDict; - Object contents, obj1, obj2, pageObj, dictObj; - Object groupDict; - bool writeSepGroup = false; - Object info; - char *key; - char s[256]; - int i, l; - int rotate; - double scale[6] = { 0, 0, 0, 0, 0, 0 }; - bool writematrix = false; - int suppress_ptex_info = getpdfsuppressptexinfo(); - static const char *pageDictKeys[] = { - "LastModified", - "Metadata", - "PieceInfo", - "SeparationInfo", -// "Group", -// "Resources", - NULL - }; - - PdfDocument *pdf_doc = (PdfDocument *) epdf_doc; - (pdf_doc->occurences)--; - xref = pdf_doc->xref; - inObjList = pdf_doc->inObjList; - encodingList = 0; - page = pdf_doc->doc->getCatalog()->getPage(epdf_selected_page); - pageRef = pdf_doc->doc->getCatalog()->getPageRef(epdf_selected_page); - pageObj = xref->fetch(pageRef->num, pageRef->gen); - pageDict = pageObj.getDict(); - rotate = page->getRotate(); - const PDFRectangle *pagebox; - // write the Page header - pdf_puts("/Type /XObject\n"); - pdf_puts("/Subtype /Form\n"); - pdf_puts("/FormType 1\n"); - - // write additional information - if ((suppress_ptex_info & MASK_SUPPRESS_PTEX_FILENAME) == 0) { - pdf_printf("/%s.FileName (%s)\n", pdfkeyprefix, - convertStringToPDFString(pdf_doc->file_name, - strlen(pdf_doc->file_name))); - } - if ((suppress_ptex_info & MASK_SUPPRESS_PTEX_PAGENUMBER) == 0) { - pdf_printf("/%s.PageNumber %i\n", pdfkeyprefix, (int) epdf_selected_page); - } - if ((suppress_ptex_info & MASK_SUPPRESS_PTEX_INFODICT) == 0) { - info = pdf_doc->doc->getDocInfoNF(); - if (info.isRef()) { - // the info dict must be indirect (PDF Ref p. 61) - pdf_printf("/%s.InfoDict ", pdfkeyprefix); - pdf_printf("%d 0 R\n", addOther(info.getRef())); - } - } - // get the pagebox (media, crop...) to use. - pagebox = get_pagebox(page, epdf_page_box); - - // handle page rotation - if (rotate != 0) { - if (rotate % 90 == 0) { - // this handles only the simple case: multiple of 90s but these - // are the only values allowed according to the reference - // (v1.3, p. 78). - // the image is rotated around its center. - // the /Rotate key is clockwise while the matrix is - // counterclockwise :-% - tex_printf(", page is rotated %d degrees", rotate); - switch (rotate) { - case 90: - scale[1] = -1; - scale[2] = 1; - scale[4] = pagebox->x1 - pagebox->y1; - scale[5] = pagebox->y1 + pagebox->x2; - writematrix = true; - break; - case 180: - scale[0] = scale[3] = -1; - scale[4] = pagebox->x1 + pagebox->x2; - scale[5] = pagebox->y1 + pagebox->y2; - writematrix = true; - break; // width and height are exchanged - case 270: - scale[1] = 1; - scale[2] = -1; - scale[4] = pagebox->x1 + pagebox->y2; - scale[5] = pagebox->y1 - pagebox->x1; - writematrix = true; - break; - } - if (writematrix) { // The matrix is only written if the image is rotated. - sprintf(s, "/Matrix [%.8f %.8f %.8f %.8f %.8f %.8f]\n", - scale[0], - scale[1], scale[2], scale[3], scale[4], scale[5]); - pdf_puts(stripzeros(s)); - } - } - } - - sprintf(s, "/BBox [%.8f %.8f %.8f %.8f]\n", - pagebox->x1, pagebox->y1, pagebox->x2, pagebox->y2); - pdf_puts(stripzeros(s)); - - // Metadata validity check (as a stream it must be indirect) - dictObj = pageDict->lookupNF("Metadata"); - if (!dictObj.isNull() && !dictObj.isRef()) - pdftex_warn("PDF inclusion: /Metadata must be indirect object"); - - // copy selected items in Page dictionary except Resources & Group - for (i = 0; pageDictKeys[i] != NULL; i++) { - dictObj = pageDict->lookupNF(pageDictKeys[i]); - if (!dictObj.isNull()) { - pdf_newline(); - pdf_printf("/%s ", pageDictKeys[i]); - copyObject(&dictObj); // preserves indirection - } - } - - // handle page group - dictObj = pageDict->lookupNF("Group"); - if (!dictObj.isNull()) { - if (pdfpagegroupval == 0) { - // another pdf with page group was included earlier on the - // same page; copy the Group entry as is. See manual for - // info on why this is a warning. - if (getpdfsuppresswarningpagegroup() == 0) { - pdftex_warn - ("PDF inclusion: multiple pdfs with page group included in a single page"); - } - pdf_newline(); - pdf_puts("/Group "); - copyObject(&dictObj); - } else { - // write Group dict as a separate object, since the Page dict also refers to it - dictObj = pageDict->lookup("Group"); - if (!dictObj.isDict()) - pdftex_fail("PDF inclusion: /Group dict missing"); - writeSepGroup = true; -/* -This part is only a single line - groupDict = Object(page->getGroup()); -in the original patch. In this case, however, pdftex crashes at -"delete pdf_doc->doc" in "delete_document()" for inclusion of some -kind of pdf images, for example, figure_missing.pdf in gnuplot. -A change - groupDict = Object(page->getGroup()).copy(); -does not improve the situation. -The changes below seem to work fine. -*/ -// begin modification - groupDict = pageDict->lookup("Group"); - const Dict& dic1 = page->getGroup(); - const Dict& dic2 = groupDict.getDict(); - // replace dic2 in groupDict with dic1 - l = dic2.getLength(); - for (i = 0; i < l; i++) { - groupDict.dictRemove(dic2.getKey(i)); - } - l = dic1.getLength(); - for (i = 0; i < l; i++) { - groupDict.dictAdd((const char *)copyString(dic1.getKey(i)), - dic1.getValNF(i)); - } -// end modification - pdf_printf("/Group %ld 0 R\n", (long)pdfpagegroupval); - } - } - - // write the Resources dictionary - if (page->getResourceDict() == NULL) { - // Resources can be missing (files without them have been spotted - // in the wild); in which case the /Resouces of the /Page will be used. - // "This practice is not recommended". - pdftex_warn - ("PDF inclusion: /Resources missing. 'This practice is not recommended' (PDF Ref)"); - } else { - Object *obj1 = page->getResourceDictObject(); - if (!obj1->isDict()) - pdftex_fail("PDF inclusion: invalid resources dict type <%s>", - obj1->getTypeName()); - pdf_newline(); - pdf_puts("/Resources <<\n"); - for (i = 0, l = obj1->dictGetLength(); i < l; ++i) { - obj2 = obj1->dictGetVal(i); - key = (char *)obj1->dictGetKey(i); - if (strcmp("Font", key) == 0) - copyFontResources(&obj2); - else if (strcmp("ProcSet", key) == 0) - copyProcSet(&obj2); - else - copyOtherResources(&obj2, (char *)key); - } - pdf_puts(">>\n"); - } - - // write the page contents - contents = page->getContents(); - if (contents.isStream()) { - - // Variant A: get stream and recompress under control - // of \pdfcompresslevel - // - // pdfbeginstream(); - // copyStream(contents->getStream()); - // pdfendstream(); - - // Variant B: copy stream without recompressing - // - obj1 = contents.streamGetDict()->lookup("F"); - if (!obj1.isNull()) { - pdftex_fail("PDF inclusion: Unsupported external stream"); - } - obj1 = contents.streamGetDict()->lookup("Length"); - assert(!obj1.isNull()); - pdf_puts("/Length "); - copyObject(&obj1); - pdf_puts("\n"); - obj1 = contents.streamGetDict()->lookup("Filter"); - if (!obj1.isNull()) { - pdf_puts("/Filter "); - copyObject(&obj1); - pdf_puts("\n"); - obj1 = contents.streamGetDict()->lookup("DecodeParms"); - if (!obj1.isNull()) { - pdf_puts("/DecodeParms "); - copyObject(&obj1); - pdf_puts("\n"); - } - } - pdf_puts(">>\nstream\n"); - copyStream(contents.getStream()->getUndecodedStream()); - pdfendstream(); - } else if (contents.isArray()) { - pdfbeginstream(); - for (i = 0, l = contents.arrayGetLength(); i < l; ++i) { - Object contentsobj = contents.arrayGet(i); - copyStream(contentsobj.getStream()); - if (i < l - 1) - pdf_newline(); // add a newline after each stream except the last - } - pdfendstream(); - } else { // the contents are optional, but we need to include an empty stream - pdfbeginstream(); - pdfendstream(); - } - - // write out all indirect objects - writeRefs(); - - // write out all used encodings (and delete list) - writeEncodings(); - - // write the Group dict if needed - if (writeSepGroup) { - pdfbeginobj(pdfpagegroupval, 2); - copyObject(&groupDict); - pdf_puts("\n"); - pdfendobj(); - pdfpagegroupval = 0; // only the 1st included pdf on a page gets its - // Group included in the Page dict - } - - // save object list, xref - pdf_doc->inObjList = inObjList; - pdf_doc->xref = xref; -} - -// Called when an image has been written and it's resources in image_tab are -// freed and it's not referenced anymore. - -void epdf_delete() -{ - PdfDocument *pdf_doc = (PdfDocument *) epdf_doc; - xref = pdf_doc->xref; - if (pdf_doc->occurences < 0) { - delete_document(pdf_doc); - } -} - -// Called when PDF embedding system is finalized. -// Now deallocate all remaining PdfDocuments. - -void epdf_check_mem() -{ - if (isInit) { - PdfDocument *p, *n; - for (p = pdfDocuments; p; p = n) { - n = p->next; - delete_document(p); - } - // see above for globalParams - delete globalParams; - } -} diff --git a/Build/source/texk/web2c/pdftexdir/pdftoepdf-poppler0.72.0.cc b/Build/source/texk/web2c/pdftexdir/pdftoepdf-poppler0.72.0.cc deleted file mode 100644 index d3c4db1764d..00000000000 --- a/Build/source/texk/web2c/pdftexdir/pdftoepdf-poppler0.72.0.cc +++ /dev/null @@ -1,1114 +0,0 @@ -/* -Copyright 1996-2017 Han The Thanh, <thanh@pdftex.org> - -This file is part of pdfTeX. - -pdfTeX is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -pdfTeX is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -/* -This is based on the patch texlive-poppler-0.59.patch <2017-09-19> at -https://git.archlinux.org/svntogit/packages.git/plain/texlive-bin/trunk -by Arch Linux. A little modifications are made to avoid a crash for -some kind of pdf images, such as figure_missing.pdf in gnuplot. -The poppler should be 0.72.0 or newer versions. -It is tested upto the poppler 0.74.0. -POPPLER_VERSION should be defined. -*/ - -/* Do this early in order to avoid a conflict between - MINGW32 <rpcndr.h> defining 'boolean' as 'unsigned char' and - <kpathsea/types.h> defining Pascal's boolean as 'int'. -*/ -#include <w2c/config.h> -#include <kpathsea/lib.h> - -#include <stdlib.h> -#include <math.h> -#include <stddef.h> -#include <stdio.h> -#include <string.h> -#include <ctype.h> - -#ifdef POPPLER_VERSION -#include <dirent.h> -#include <poppler-config.h> -#include <goo/GooString.h> -#include <goo/gmem.h> -#include <goo/gfile.h> -#define GString GooString -#else -#error POPPLER_VERSION should be defined. -#endif -#include <assert.h> - -#include "Object.h" -#include "Stream.h" -#include "Array.h" -#include "Dict.h" -#include "XRef.h" -#include "Catalog.h" -#include "Link.h" -#include "Page.h" -#include "GfxFont.h" -#include "PDFDoc.h" -#include "GlobalParams.h" -#include "Error.h" - -// This file is mostly C and not very much C++; it's just used to interface -// the functions of xpdf, which are written in C++. - -extern "C" { -#include <pdftexdir/ptexmac.h> -#include <pdftexdir/pdftex-common.h> - -// These functions from pdftex.web gets declared in pdftexcoerce.h in the -// usual web2c way, but we cannot include that file here because C++ -// does not allow it. -extern int getpdfsuppresswarningpagegroup(void); -extern integer getpdfsuppressptexinfo(void); -extern integer zround(double); -} - -// The prefix "PTEX" for the PDF keys is special to pdfTeX; -// this has been registered with Adobe by Hans Hagen. - -#define pdfkeyprefix "PTEX" - -#define MASK_SUPPRESS_PTEX_FULLBANNER 0x01 -#define MASK_SUPPRESS_PTEX_FILENAME 0x02 -#define MASK_SUPPRESS_PTEX_PAGENUMBER 0x04 -#define MASK_SUPPRESS_PTEX_INFODICT 0x08 - -// When copying the Resources of the selected page, all objects are copied -// recusively top-down. Indirect objects however are not fetched during -// copying, but get a new object number from pdfTeX and then will be -// appended into a linked list. Duplicates are checked and removed from the -// list of indirect objects during appending. - -enum InObjType { - objFont, - objFontDesc, - objOther -}; - -struct InObj { - Ref ref; // ref in original PDF - InObjType type; // object type - InObj *next; // next entry in list of indirect objects - int num; // new object number in output PDF - fd_entry *fd; // pointer to /FontDescriptor object structure - int enc_objnum; // Encoding for objFont - int written; // has it been written to output PDF? -}; - -struct UsedEncoding { - int enc_objnum; - GfxFont *font; - UsedEncoding *next; -}; - -static InObj *inObjList; -static UsedEncoding *encodingList; -static bool isInit = false; - -// -------------------------------------------------------------------- -// Maintain list of open embedded PDF files -// -------------------------------------------------------------------- - -struct PdfDocument { - char *file_name; - PDFDoc *doc; - XRef *xref; - InObj *inObjList; - int occurences; // number of references to the document; the doc can be - // deleted when this is negative - PdfDocument *next; -}; - -static PdfDocument *pdfDocuments = 0; - -static XRef *xref = 0; - -// Returns pointer to PdfDocument record for PDF file. -// Creates a new record if it doesn't exist yet. -// xref is made current for the document. - -static PdfDocument *find_add_document(char *file_name) -{ - PdfDocument *p = pdfDocuments; - while (p && strcmp(p->file_name, file_name) != 0) - p = p->next; - if (p) { - xref = p->xref; - (p->occurences)++; - return p; - } - p = new PdfDocument; - p->file_name = xstrdup(file_name); - p->xref = xref = 0; - p->occurences = 0; - GString *docName = new GString(p->file_name); - p->doc = new PDFDoc(docName); // takes ownership of docName - if (!p->doc->isOk() || !p->doc->okToPrint()) { - pdftex_fail("xpdf: reading PDF image failed"); - } - p->inObjList = 0; - p->next = pdfDocuments; - pdfDocuments = p; - return p; -} - -// Deallocate a PdfDocument with all its resources - -static void delete_document(PdfDocument * pdf_doc) -{ - PdfDocument **p = &pdfDocuments; - while (*p && *p != pdf_doc) - p = &((*p)->next); - // should not happen: - if (!*p) - return; - // unlink from list - *p = pdf_doc->next; - // free pdf_doc's resources - InObj *r, *n; - for (r = pdf_doc->inObjList; r != 0; r = n) { - n = r->next; - delete r; - } - xref = pdf_doc->xref; - delete pdf_doc->doc; - xfree(pdf_doc->file_name); - delete pdf_doc; -} - -// -------------------------------------------------------------------- - -static int addEncoding(GfxFont * gfont) -{ - UsedEncoding *n; - n = new UsedEncoding; - n->next = encodingList; - encodingList = n; - n->font = gfont; - n->enc_objnum = pdfnewobjnum(); - return n->enc_objnum; -} - -#define addFont(ref, fd, enc_objnum) \ - addInObj(objFont, ref, fd, enc_objnum) - -// addFontDesc is only used to avoid writing the original FontDescriptor -// from the PDF file. - -#define addFontDesc(ref, fd) \ - addInObj(objFontDesc, ref, fd, 0) - -#define addOther(ref) \ - addInObj(objOther, ref, 0, 0) - -static int addInObj(InObjType type, Ref ref, fd_entry * fd, int e) -{ - InObj *p, *q, *n = new InObj; - if (ref.num == 0) - pdftex_fail("PDF inclusion: invalid reference"); - n->ref = ref; - n->type = type; - n->next = 0; - n->fd = fd; - n->enc_objnum = e; - n->written = 0; - if (inObjList == 0) - inObjList = n; - else { - for (p = inObjList; p != 0; p = p->next) { - if (p->ref.num == ref.num && p->ref.gen == ref.gen) { - delete n; - return p->num; - } - q = p; - } - // it is important to add new objects at the end of the list, - // because new objects are being added while the list is being - // written out. - q->next = n; - } - if (type == objFontDesc) - n->num = get_fd_objnum(fd); - else - n->num = pdfnewobjnum(); - return n->num; -} - -#if 0 /* unusewd */ -static int getNewObjectNumber(Ref ref) -{ - InObj *p; - if (inObjList == 0) { - pdftex_fail("No objects copied yet"); - } else { - for (p = inObjList; p != 0; p = p->next) { - if (p->ref.num == ref.num && p->ref.gen == ref.gen) { - return p->num; - } - } - pdftex_fail("Object not yet copied: %i %i", ref.num, ref.gen); - } -#ifdef _MSC_VER - /* Never reached, but without __attribute__((noreturn)) for pdftex_fail() - MSVC 5.0 requires an int return value. */ - return -60000; -#endif -} -#endif - -static void copyObject(Object *); - -static void copyName(char *s) -{ - pdf_puts("/"); - for (; *s != 0; s++) { - if (isdigit(*s) || isupper(*s) || islower(*s) || *s == '_' || - *s == '.' || *s == '-' || *s == '+') - pdfout(*s); - else - pdf_printf("#%.2X", *s & 0xFF); - } -} - -static void copyDictEntry(Object * obj, int i) -{ - Object obj1; - copyName((char *)obj->dictGetKey(i)); - pdf_puts(" "); - obj1 = obj->dictGetValNF(i); - copyObject(&obj1); - pdf_puts("\n"); -} - -static void copyDict(Object * obj) -{ - int i, l; - if (!obj->isDict()) - pdftex_fail("PDF inclusion: invalid dict type <%s>", - obj->getTypeName()); - for (i = 0, l = obj->dictGetLength(); i < l; ++i) - copyDictEntry(obj, i); -} - -static void copyFontDict(Object * obj, InObj * r) -{ - int i, l; - char *key; - if (!obj->isDict()) - pdftex_fail("PDF inclusion: invalid dict type <%s>", - obj->getTypeName()); - pdf_puts("<<\n"); - assert(r->type == objFont); // FontDescriptor is in fd_tree - for (i = 0, l = obj->dictGetLength(); i < l; ++i) { - key = (char *)obj->dictGetKey(i); - if (strncmp("FontDescriptor", key, strlen("FontDescriptor")) == 0 - || strncmp("BaseFont", key, strlen("BaseFont")) == 0 - || strncmp("Encoding", key, strlen("Encoding")) == 0) - continue; // skip original values - copyDictEntry(obj, i); - } - // write new FontDescriptor, BaseFont, and Encoding - pdf_printf("/FontDescriptor %d 0 R\n", get_fd_objnum(r->fd)); - pdf_printf("/BaseFont %d 0 R\n", get_fn_objnum(r->fd)); - pdf_printf("/Encoding %d 0 R\n", r->enc_objnum); - pdf_puts(">>"); -} - -static void copyStream(Stream * str) -{ - int c, c2 = 0; - str->reset(); - while ((c = str->getChar()) != EOF) { - pdfout(c); - c2 = c; - } - pdflastbyte = c2; -} - -static void copyProcSet(Object * obj) -{ - int i, l; - Object procset; - if (!obj->isArray()) - pdftex_fail("PDF inclusion: invalid ProcSet array type <%s>", - obj->getTypeName()); - pdf_puts("/ProcSet [ "); - for (i = 0, l = obj->arrayGetLength(); i < l; ++i) { - procset = obj->arrayGetNF(i); - if (!procset.isName()) - pdftex_fail("PDF inclusion: invalid ProcSet entry type <%s>", - procset.getTypeName()); - copyName((char *)procset.getName()); - pdf_puts(" "); - } - pdf_puts("]\n"); -} - -#define REPLACE_TYPE1C true - -static bool embeddableFont(Object * fontdesc) -{ - Object fontfile, ffsubtype; - - if (!fontdesc->isDict()) - return false; - fontfile = fontdesc->dictLookup("FontFile"); - if (fontfile.isStream()) - return true; - if (REPLACE_TYPE1C) { - fontfile = fontdesc->dictLookup("FontFile3"); - if (!fontfile.isStream()) - return false; - ffsubtype = fontfile.streamGetDict()->lookup("Subtype"); - return ffsubtype.isName() && !strcmp(ffsubtype.getName(), "Type1C"); - } - return false; -} - -static void copyFont(char *tag, Object * fontRef) -{ - Object fontdict, subtype, basefont, fontdescRef, fontdesc, charset, - stemV; - GfxFont *gfont; - fd_entry *fd; - fm_entry *fontmap; - // Check whether the font has already been embedded before analysing it. - InObj *p; - Ref ref = fontRef->getRef(); - for (p = inObjList; p; p = p->next) { - if (p->ref.num == ref.num && p->ref.gen == ref.gen) { - copyName(tag); - pdf_printf(" %d 0 R ", p->num); - return; - } - } - // Only handle included Type1 (and Type1C) fonts; anything else will be copied. - // Type1C fonts are replaced by Type1 fonts, if REPLACE_TYPE1C is true. - fontdict = fontRef->fetch(xref); - fontdesc = Object(objNull); - if (fontdict.isDict()) { - subtype = fontdict.dictLookup("Subtype"); - basefont = fontdict.dictLookup("BaseFont"); - fontdescRef = fontdict.dictLookupNF("FontDescriptor"); - if (fontdescRef.isRef()) { - fontdesc = fontdescRef.fetch(xref); - } - } - if (!fixedinclusioncopyfont && fontdict.isDict() - && subtype.isName() - && !strcmp(subtype.getName(), "Type1") - && basefont.isName() - && fontdescRef.isRef() - && fontdesc.isDict() - && embeddableFont(&fontdesc) - && (fontmap = lookup_fontmap((char *)basefont.getName())) != NULL) { - // round /StemV value, since the PDF input is a float - // (see Font Descriptors in PDF reference), but we only store an - // integer, since we don't want to change the struct. - stemV = fontdesc.dictLookup("StemV"); - fd = epdf_create_fontdescriptor(fontmap, zround(stemV.getNum())); - charset = fontdesc.dictLookup("CharSet"); - if (!charset.isNull() && - charset.isString() && is_subsetable(fontmap)) - epdf_mark_glyphs(fd, (char *)charset.getString()->c_str()); - else - embed_whole_font(fd); - addFontDesc(fontdescRef.getRef(), fd); - copyName(tag); - gfont = GfxFont::makeFont(xref, tag, fontRef->getRef(), - fontdict.getDict()); - pdf_printf(" %d 0 R ", addFont(fontRef->getRef(), fd, - addEncoding(gfont))); - } else { - copyName(tag); - pdf_puts(" "); - copyObject(fontRef); - } -} - -static void copyFontResources(Object * obj) -{ - Object fontRef; - int i, l; - if (!obj->isDict()) - pdftex_fail("PDF inclusion: invalid font resources dict type <%s>", - obj->getTypeName()); - pdf_puts("/Font << "); - for (i = 0, l = obj->dictGetLength(); i < l; ++i) { - fontRef = obj->dictGetValNF(i); - if (fontRef.isRef()) - copyFont((char *)obj->dictGetKey(i), &fontRef); - else if (fontRef.isDict()) { // some programs generate pdf with embedded font object - copyName((char *)obj->dictGetKey(i)); - pdf_puts(" "); - copyObject(&fontRef); - } - else - pdftex_fail("PDF inclusion: invalid font in reference type <%s>", - fontRef.getTypeName()); - } - pdf_puts(">>\n"); -} - -static void copyOtherResources(Object * obj, char *key) -{ - // copies all other resources (write_epdf handles Fonts and ProcSets), - - // if Subtype is present, it must be a name - if (strcmp("Subtype", key) == 0) { - if (!obj->isName()) { - pdftex_warn("PDF inclusion: Subtype in Resources dict is not a name" - " (key '%s', type <%s>); ignored.", - key, obj->getTypeName()); - return; - } - } else if (!obj->isDict()) { - //FIXME: Write the message only to the log file - pdftex_warn("PDF inclusion: invalid other resource which is no dict" - " (key '%s', type <%s>); ignored.", - key, obj->getTypeName()); - return; - } - copyName(key); - pdf_puts(" "); - copyObject(obj); -} - -// Function onverts double to string; very small and very large numbers -// are NOT converted to scientific notation. -// n must be a number or real conforming to the implementation limits -// of PDF as specified in appendix C.1 of the PDF Ref. -// These are: -// maximum value of ints is +2^32 -// maximum value of reals is +2^15 -// smalles values of reals is 1/(2^16) - -static char *convertNumToPDF(double n) -{ - static const int precision = 6; - static const int fact = (int) 1E6; // must be 10^precision - static const double epsilon = 0.5E-6; // 2epsilon must be 10^-precision - static char buf[64]; - // handle very small values: return 0 - if (fabs(n) < epsilon) { - buf[0] = '0'; - buf[1] = '\0'; - } else { - char ints[64]; - int bindex = 0, sindex = 0; - int ival, fval; - // handle the sign part if n is negative - if (n < 0) { - buf[bindex++] = '-'; - n = -n; - } - n += epsilon; // for rounding - // handle the integer part, simply with sprintf - ival = (int) floor(n); - n -= ival; - sprintf(ints, "%d", ival); - while (ints[sindex] != 0) - buf[bindex++] = ints[sindex++]; - // handle the fractional part up to 'precision' digits - fval = (int) floor(n * fact); - if (fval) { - // set a dot - buf[bindex++] = '.'; - sindex = bindex + precision; - buf[sindex--] = '\0'; - // fill up trailing zeros with the string terminator NULL - while (((fval % 10) == 0) && (sindex >= bindex)) { - buf[sindex--] = '\0'; - fval /= 10; - } - // fill up the fractional part back to front - while (sindex >= bindex) { - buf[sindex--] = (fval % 10) + '0'; - fval /= 10; - } - } else - buf[bindex++] = 0; - } - return (char *) buf; -} - -static void copyObject(Object * obj) -{ - Object obj1; - int i, l, c; - Ref ref; - char *p; - GString *s; - if (obj->isBool()) { - pdf_printf("%s", obj->getBool()? "true" : "false"); - } else if (obj->isInt()) { - pdf_printf("%i", obj->getInt()); - } else if (obj->isReal()) { - pdf_printf("%s", convertNumToPDF(obj->getReal())); - } else if (obj->isNum()) { - pdf_printf("%s", convertNumToPDF(obj->getNum())); - } else if (obj->isString()) { - s = (GooString *)obj->getString(); - p = (char *)s->c_str(); - l = s->getLength(); - if (strlen(p) == (unsigned int) l) { - pdf_puts("("); - for (; *p != 0; p++) { - c = (unsigned char) *p; - if (c == '(' || c == ')' || c == '\\') - pdf_printf("\\%c", c); - else if (c < 0x20 || c > 0x7F) - pdf_printf("\\%03o", c); - else - pdfout(c); - } - pdf_puts(")"); - } else { - pdf_puts("<"); - for (i = 0; i < l; i++) { - c = s->getChar(i) & 0xFF; - pdf_printf("%.2x", c); - } - pdf_puts(">"); - } - } else if (obj->isName()) { - copyName((char *)obj->getName()); - } else if (obj->isNull()) { - pdf_puts("null"); - } else if (obj->isArray()) { - pdf_puts("["); - for (i = 0, l = obj->arrayGetLength(); i < l; ++i) { - obj1 = obj->arrayGetNF(i); - if (!obj1.isName()) - pdf_puts(" "); - copyObject(&obj1); - } - pdf_puts("]"); - } else if (obj->isDict()) { - pdf_puts("<<\n"); - copyDict(obj); - pdf_puts(">>"); - } else if (obj->isStream()) { - pdf_puts("<<\n"); - copyDict(obj->getStream()->getDictObject()); - pdf_puts(">>\n"); - pdf_puts("stream\n"); - copyStream(obj->getStream()->getUndecodedStream()); - pdf_puts("\nendstream"); - } else if (obj->isRef()) { - ref = obj->getRef(); - if (ref.num == 0) { - pdftex_fail - ("PDF inclusion: reference to invalid object" - " (is the included pdf broken?)"); - } else - pdf_printf("%d 0 R", addOther(ref)); - } else { - pdftex_fail("PDF inclusion: type <%s> cannot be copied", - obj->getTypeName()); - } -} - -static void writeRefs() -{ - InObj *r; - for (r = inObjList; r != 0; r = r->next) { - if (!r->written) { - r->written = 1; - Object obj1 = xref->fetch(r->ref.num, r->ref.gen); - if (r->type == objFont) { - assert(!obj1.isStream()); - pdfbeginobj(r->num, 2); // \pdfobjcompresslevel = 2 is for this - copyFontDict(&obj1, r); - pdf_puts("\n"); - pdfendobj(); - } else if (r->type != objFontDesc) { // /FontDescriptor is written via write_fontdescriptor() - if (obj1.isStream()) - pdfbeginobj(r->num, 0); - else - pdfbeginobj(r->num, 2); // \pdfobjcompresslevel = 2 is for this - copyObject(&obj1); - pdf_puts("\n"); - pdfendobj(); - } - } - } -} - -static void writeEncodings() -{ - UsedEncoding *r, *n; - char *glyphNames[256], *s; - int i; - for (r = encodingList; r != 0; r = r->next) { - for (i = 0; i < 256; i++) { - if (r->font->isCIDFont()) { - pdftex_fail - ("PDF inclusion: CID fonts are not supported" - " (try to disable font replacement to fix this)"); - } - if ((s = (char *)((Gfx8BitFont *) r->font)->getCharName(i)) != 0) - glyphNames[i] = s; - else - glyphNames[i] = notdef; - } - epdf_write_enc(glyphNames, r->enc_objnum); - } - for (r = encodingList; r != 0; r = n) { - n = r->next; -#ifdef POPPLER_VERSION - r->font->decRefCnt(); -#else -#error POPPLER_VERSION should be defined. -#endif - delete r; - } -} - -// get the pagebox according to the pagebox_spec -static const PDFRectangle *get_pagebox(Page * page, int pagebox_spec) -{ - if (pagebox_spec == pdfboxspecmedia) - return page->getMediaBox(); - else if (pagebox_spec == pdfboxspeccrop) - return page->getCropBox(); - else if (pagebox_spec == pdfboxspecbleed) - return page->getBleedBox(); - else if (pagebox_spec == pdfboxspectrim) - return page->getTrimBox(); - else if (pagebox_spec == pdfboxspecart) - return page->getArtBox(); - else - pdftex_fail("PDF inclusion: unknown value of pagebox spec (%i)", - (int) pagebox_spec); - return page->getMediaBox(); // to make the compiler happy -} - - -// Reads various information about the PDF and sets it up for later inclusion. -// This will fail if the PDF version of the PDF is higher than -// minor_pdf_version_wanted or page_name is given and can not be found. -// It makes no sense to give page_name _and_ page_num. -// Returns the page number. - -int -read_pdf_info(char *image_name, char *page_name, int page_num, - int pagebox_spec, int major_pdf_version_wanted, int minor_pdf_version_wanted, - int pdf_inclusion_errorlevel) -{ - PdfDocument *pdf_doc; - Page *page; - const PDFRectangle *pagebox; -#ifdef POPPLER_VERSION - int pdf_major_version_found, pdf_minor_version_found; -#else -#error POPPLER_VERSION should be defined. -#endif - // initialize - if (!isInit) { - globalParams = new GlobalParams(); - globalParams->setErrQuiet(false); - isInit = true; - } - // open PDF file - pdf_doc = find_add_document(image_name); - epdf_doc = (void *) pdf_doc; - - // check PDF version - // this works only for PDF 1.x -- but since any versions of PDF newer - // than 1.x will not be backwards compatible to PDF 1.x, pdfTeX will - // then have to changed drastically anyway. -#ifdef POPPLER_VERSION - pdf_major_version_found = pdf_doc->doc->getPDFMajorVersion(); - pdf_minor_version_found = pdf_doc->doc->getPDFMinorVersion(); - if ((pdf_major_version_found > major_pdf_version_wanted) - || (pdf_minor_version_found > minor_pdf_version_wanted)) { - const char *msg = - "PDF inclusion: found PDF version <%d.%d>, but at most version <%d.%d> allowed"; - if (pdf_inclusion_errorlevel > 0) { - pdftex_fail(msg, pdf_major_version_found, pdf_minor_version_found, major_pdf_version_wanted, minor_pdf_version_wanted); - } else if (pdf_inclusion_errorlevel < 0) { - ; /* do nothing */ - } else { /* = 0, give warning */ - pdftex_warn(msg, pdf_major_version_found, pdf_minor_version_found, major_pdf_version_wanted, minor_pdf_version_wanted); - } - } -#else -#error POPPLER_VERSION should be defined. -#endif - epdf_num_pages = pdf_doc->doc->getCatalog()->getNumPages(); - if (page_name) { - // get page by name - GString name(page_name); - LinkDest *link = pdf_doc->doc->findDest(&name); - if (link == 0 || !link->isOk()) - pdftex_fail("PDF inclusion: invalid destination <%s>", page_name); - Ref ref = link->getPageRef(); - page_num = pdf_doc->doc->getCatalog()->findPage(ref.num, ref.gen); - if (page_num == 0) - pdftex_fail("PDF inclusion: destination is not a page <%s>", - page_name); - delete link; - } else { - // get page by number - if (page_num <= 0 || page_num > epdf_num_pages) - pdftex_fail("PDF inclusion: required page does not exist <%i>", - epdf_num_pages); - } - // get the required page - page = pdf_doc->doc->getCatalog()->getPage(page_num); - - // get the pagebox (media, crop...) to use. - pagebox = get_pagebox(page, pagebox_spec); - if (pagebox->x2 > pagebox->x1) { - epdf_orig_x = pagebox->x1; - epdf_width = pagebox->x2 - pagebox->x1; - } else { - epdf_orig_x = pagebox->x2; - epdf_width = pagebox->x1 - pagebox->x2; - } - if (pagebox->y2 > pagebox->y1) { - epdf_orig_y = pagebox->y1; - epdf_height = pagebox->y2 - pagebox->y1; - } else { - epdf_orig_y = pagebox->y2; - epdf_height = pagebox->y1 - pagebox->y2; - } - - // get page rotation - epdf_rotate = page->getRotate() % 360; - if (epdf_rotate < 0) - epdf_rotate += 360; - - // page group - if (page->getGroup() != NULL) - epdf_has_page_group = 1; // only flag that page group is present; - // the actual object number will be - // generated in pdftex.web - else - epdf_has_page_group = 0; // no page group present - - pdf_doc->xref = pdf_doc->doc->getXRef(); - return page_num; -} - -// writes the current epf_doc. -// Here the included PDF is copied, so most errors that can happen during PDF -// inclusion will arise here. - -void write_epdf(void) -{ - Page *page; - Ref *pageRef; - Dict *pageDict; - Object contents, obj1, obj2, pageObj, dictObj; - Object groupDict; - bool writeSepGroup = false; - Object info; - char *key; - char s[256]; - int i, l; - int rotate; - double scale[6] = { 0, 0, 0, 0, 0, 0 }; - bool writematrix = false; - int suppress_ptex_info = getpdfsuppressptexinfo(); - static const char *pageDictKeys[] = { - "LastModified", - "Metadata", - "PieceInfo", - "SeparationInfo", -// "Group", -// "Resources", - NULL - }; - - PdfDocument *pdf_doc = (PdfDocument *) epdf_doc; - (pdf_doc->occurences)--; - xref = pdf_doc->xref; - inObjList = pdf_doc->inObjList; - encodingList = 0; - page = pdf_doc->doc->getCatalog()->getPage(epdf_selected_page); - pageRef = pdf_doc->doc->getCatalog()->getPageRef(epdf_selected_page); - pageObj = xref->fetch(pageRef->num, pageRef->gen); - pageDict = pageObj.getDict(); - rotate = page->getRotate(); - const PDFRectangle *pagebox; - // write the Page header - pdf_puts("/Type /XObject\n"); - pdf_puts("/Subtype /Form\n"); - pdf_puts("/FormType 1\n"); - - // write additional information - if ((suppress_ptex_info & MASK_SUPPRESS_PTEX_FILENAME) == 0) { - pdf_printf("/%s.FileName (%s)\n", pdfkeyprefix, - convertStringToPDFString(pdf_doc->file_name, - strlen(pdf_doc->file_name))); - } - if ((suppress_ptex_info & MASK_SUPPRESS_PTEX_PAGENUMBER) == 0) { - pdf_printf("/%s.PageNumber %i\n", pdfkeyprefix, (int) epdf_selected_page); - } - if ((suppress_ptex_info & MASK_SUPPRESS_PTEX_INFODICT) == 0) { - info = pdf_doc->doc->getDocInfoNF(); - if (info.isRef()) { - // the info dict must be indirect (PDF Ref p. 61) - pdf_printf("/%s.InfoDict ", pdfkeyprefix); - pdf_printf("%d 0 R\n", addOther(info.getRef())); - } - } - // get the pagebox (media, crop...) to use. - pagebox = get_pagebox(page, epdf_page_box); - - // handle page rotation - if (rotate != 0) { - if (rotate % 90 == 0) { - // this handles only the simple case: multiple of 90s but these - // are the only values allowed according to the reference - // (v1.3, p. 78). - // the image is rotated around its center. - // the /Rotate key is clockwise while the matrix is - // counterclockwise :-% - tex_printf(", page is rotated %d degrees", rotate); - switch (rotate) { - case 90: - scale[1] = -1; - scale[2] = 1; - scale[4] = pagebox->x1 - pagebox->y1; - scale[5] = pagebox->y1 + pagebox->x2; - writematrix = true; - break; - case 180: - scale[0] = scale[3] = -1; - scale[4] = pagebox->x1 + pagebox->x2; - scale[5] = pagebox->y1 + pagebox->y2; - writematrix = true; - break; // width and height are exchanged - case 270: - scale[1] = 1; - scale[2] = -1; - scale[4] = pagebox->x1 + pagebox->y2; - scale[5] = pagebox->y1 - pagebox->x1; - writematrix = true; - break; - } - if (writematrix) { // The matrix is only written if the image is rotated. - sprintf(s, "/Matrix [%.8f %.8f %.8f %.8f %.8f %.8f]\n", - scale[0], - scale[1], scale[2], scale[3], scale[4], scale[5]); - pdf_puts(stripzeros(s)); - } - } - } - - sprintf(s, "/BBox [%.8f %.8f %.8f %.8f]\n", - pagebox->x1, pagebox->y1, pagebox->x2, pagebox->y2); - pdf_puts(stripzeros(s)); - - // Metadata validity check (as a stream it must be indirect) - dictObj = pageDict->lookupNF("Metadata"); - if (!dictObj.isNull() && !dictObj.isRef()) - pdftex_warn("PDF inclusion: /Metadata must be indirect object"); - - // copy selected items in Page dictionary except Resources & Group - for (i = 0; pageDictKeys[i] != NULL; i++) { - dictObj = pageDict->lookupNF(pageDictKeys[i]); - if (!dictObj.isNull()) { - pdf_newline(); - pdf_printf("/%s ", pageDictKeys[i]); - copyObject(&dictObj); // preserves indirection - } - } - - // handle page group - dictObj = pageDict->lookupNF("Group"); - if (!dictObj.isNull()) { - if (pdfpagegroupval == 0) { - // another pdf with page group was included earlier on the - // same page; copy the Group entry as is. See manual for - // info on why this is a warning. - if (getpdfsuppresswarningpagegroup() == 0) { - pdftex_warn - ("PDF inclusion: multiple pdfs with page group included in a single page"); - } - pdf_newline(); - pdf_puts("/Group "); - copyObject(&dictObj); - } else { - // write Group dict as a separate object, since the Page dict also refers to it - dictObj = pageDict->lookup("Group"); - if (!dictObj.isDict()) - pdftex_fail("PDF inclusion: /Group dict missing"); - writeSepGroup = true; -/* -This part is only a single line - groupDict = Object(page->getGroup()); -in the original patch. In this case, however, pdftex crashes at -"delete pdf_doc->doc" in "delete_document()" for inclusion of some -kind of pdf images, for example, figure_missing.pdf in gnuplot. -A change - groupDict = Object(page->getGroup()).copy(); -does not improve the situation. -The changes below seem to work fine. -*/ -// begin modification - groupDict = pageDict->lookup("Group"); - const Dict& dic1 = page->getGroup(); - const Dict& dic2 = groupDict.getDict(); - // replace dic2 in groupDict with dic1 - l = dic2.getLength(); - for (i = 0; i < l; i++) { - groupDict.dictRemove(dic2.getKey(i)); - } - l = dic1.getLength(); - for (i = 0; i < l; i++) { - groupDict.dictAdd((const char *)copyString(dic1.getKey(i)), - dic1.getValNF(i)); - } -// end modification - pdf_printf("/Group %ld 0 R\n", (long)pdfpagegroupval); - } - } - - // write the Resources dictionary - if (page->getResourceDict() == NULL) { - // Resources can be missing (files without them have been spotted - // in the wild); in which case the /Resouces of the /Page will be used. - // "This practice is not recommended". - pdftex_warn - ("PDF inclusion: /Resources missing. 'This practice is not recommended' (PDF Ref)"); - } else { - Object *obj1 = page->getResourceDictObject(); - if (!obj1->isDict()) - pdftex_fail("PDF inclusion: invalid resources dict type <%s>", - obj1->getTypeName()); - pdf_newline(); - pdf_puts("/Resources <<\n"); - for (i = 0, l = obj1->dictGetLength(); i < l; ++i) { - obj2 = obj1->dictGetVal(i); - key = (char *)obj1->dictGetKey(i); - if (strcmp("Font", key) == 0) - copyFontResources(&obj2); - else if (strcmp("ProcSet", key) == 0) - copyProcSet(&obj2); - else - copyOtherResources(&obj2, (char *)key); - } - pdf_puts(">>\n"); - } - - // write the page contents - contents = page->getContents(); - if (contents.isStream()) { - - // Variant A: get stream and recompress under control - // of \pdfcompresslevel - // - // pdfbeginstream(); - // copyStream(contents->getStream()); - // pdfendstream(); - - // Variant B: copy stream without recompressing - // - obj1 = contents.streamGetDict()->lookup("F"); - if (!obj1.isNull()) { - pdftex_fail("PDF inclusion: Unsupported external stream"); - } - obj1 = contents.streamGetDict()->lookup("Length"); - assert(!obj1.isNull()); - pdf_puts("/Length "); - copyObject(&obj1); - pdf_puts("\n"); - obj1 = contents.streamGetDict()->lookup("Filter"); - if (!obj1.isNull()) { - pdf_puts("/Filter "); - copyObject(&obj1); - pdf_puts("\n"); - obj1 = contents.streamGetDict()->lookup("DecodeParms"); - if (!obj1.isNull()) { - pdf_puts("/DecodeParms "); - copyObject(&obj1); - pdf_puts("\n"); - } - } - pdf_puts(">>\nstream\n"); - copyStream(contents.getStream()->getUndecodedStream()); - pdfendstream(); - } else if (contents.isArray()) { - pdfbeginstream(); - for (i = 0, l = contents.arrayGetLength(); i < l; ++i) { - Object contentsobj = contents.arrayGet(i); - copyStream(contentsobj.getStream()); - if (i < l - 1) - pdf_newline(); // add a newline after each stream except the last - } - pdfendstream(); - } else { // the contents are optional, but we need to include an empty stream - pdfbeginstream(); - pdfendstream(); - } - - // write out all indirect objects - writeRefs(); - - // write out all used encodings (and delete list) - writeEncodings(); - - // write the Group dict if needed - if (writeSepGroup) { - pdfbeginobj(pdfpagegroupval, 2); - copyObject(&groupDict); - pdf_puts("\n"); - pdfendobj(); - pdfpagegroupval = 0; // only the 1st included pdf on a page gets its - // Group included in the Page dict - } - - // save object list, xref - pdf_doc->inObjList = inObjList; - pdf_doc->xref = xref; -} - -// Called when an image has been written and it's resources in image_tab are -// freed and it's not referenced anymore. - -void epdf_delete() -{ - PdfDocument *pdf_doc = (PdfDocument *) epdf_doc; - xref = pdf_doc->xref; - if (pdf_doc->occurences < 0) { - delete_document(pdf_doc); - } -} - -// Called when PDF embedding system is finalized. -// Now deallocate all remaining PdfDocuments. - -void epdf_check_mem() -{ - if (isInit) { - PdfDocument *p, *n; - for (p = pdfDocuments; p; p = n) { - n = p->next; - delete_document(p); - } - // see above for globalParams - delete globalParams; - } -} diff --git a/Build/source/texk/web2c/pdftexdir/pdftoepdf-poppler0.75.0.cc b/Build/source/texk/web2c/pdftexdir/pdftoepdf-poppler0.75.0.cc deleted file mode 100644 index 1d099c361df..00000000000 --- a/Build/source/texk/web2c/pdftexdir/pdftoepdf-poppler0.75.0.cc +++ /dev/null @@ -1,1113 +0,0 @@ -/* -Copyright 1996-2017 Han The Thanh, <thanh@pdftex.org> - -This file is part of pdfTeX. - -pdfTeX is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -pdfTeX is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -/* -This is based on the patch texlive-poppler-0.59.patch <2017-09-19> at -https://git.archlinux.org/svntogit/packages.git/plain/texlive-bin/trunk -by Arch Linux. A little modifications are made to avoid a crash for -some kind of pdf images, such as figure_missing.pdf in gnuplot. -The poppler should be 0.75.0. -POPPLER_VERSION should be defined. -*/ - -/* Do this early in order to avoid a conflict between - MINGW32 <rpcndr.h> defining 'boolean' as 'unsigned char' and - <kpathsea/types.h> defining Pascal's boolean as 'int'. -*/ -#include <w2c/config.h> -#include <kpathsea/lib.h> - -#include <stdlib.h> -#include <math.h> -#include <stddef.h> -#include <stdio.h> -#include <string.h> -#include <ctype.h> - -#ifdef POPPLER_VERSION -#include <dirent.h> -#include <poppler-config.h> -#include <goo/GooString.h> -#include <goo/gmem.h> -#include <goo/gfile.h> -#define GString GooString -#else -#error POPPLER_VERSION should be defined. -#endif -#include <assert.h> - -#include "Object.h" -#include "Stream.h" -#include "Array.h" -#include "Dict.h" -#include "XRef.h" -#include "Catalog.h" -#include "Link.h" -#include "Page.h" -#include "GfxFont.h" -#include "PDFDoc.h" -#include "GlobalParams.h" -#include "Error.h" - -// This file is mostly C and not very much C++; it's just used to interface -// the functions of xpdf, which are written in C++. - -extern "C" { -#include <pdftexdir/ptexmac.h> -#include <pdftexdir/pdftex-common.h> - -// These functions from pdftex.web gets declared in pdftexcoerce.h in the -// usual web2c way, but we cannot include that file here because C++ -// does not allow it. -extern int getpdfsuppresswarningpagegroup(void); -extern integer getpdfsuppressptexinfo(void); -extern integer zround(double); -} - -// The prefix "PTEX" for the PDF keys is special to pdfTeX; -// this has been registered with Adobe by Hans Hagen. - -#define pdfkeyprefix "PTEX" - -#define MASK_SUPPRESS_PTEX_FULLBANNER 0x01 -#define MASK_SUPPRESS_PTEX_FILENAME 0x02 -#define MASK_SUPPRESS_PTEX_PAGENUMBER 0x04 -#define MASK_SUPPRESS_PTEX_INFODICT 0x08 - -// When copying the Resources of the selected page, all objects are copied -// recusively top-down. Indirect objects however are not fetched during -// copying, but get a new object number from pdfTeX and then will be -// appended into a linked list. Duplicates are checked and removed from the -// list of indirect objects during appending. - -enum InObjType { - objFont, - objFontDesc, - objOther -}; - -struct InObj { - Ref ref; // ref in original PDF - InObjType type; // object type - InObj *next; // next entry in list of indirect objects - int num; // new object number in output PDF - fd_entry *fd; // pointer to /FontDescriptor object structure - int enc_objnum; // Encoding for objFont - int written; // has it been written to output PDF? -}; - -struct UsedEncoding { - int enc_objnum; - GfxFont *font; - UsedEncoding *next; -}; - -static InObj *inObjList; -static UsedEncoding *encodingList; -static bool isInit = false; - -// -------------------------------------------------------------------- -// Maintain list of open embedded PDF files -// -------------------------------------------------------------------- - -struct PdfDocument { - char *file_name; - PDFDoc *doc; - XRef *xref; - InObj *inObjList; - int occurences; // number of references to the document; the doc can be - // deleted when this is negative - PdfDocument *next; -}; - -static PdfDocument *pdfDocuments = 0; - -static XRef *xref = 0; - -// Returns pointer to PdfDocument record for PDF file. -// Creates a new record if it doesn't exist yet. -// xref is made current for the document. - -static PdfDocument *find_add_document(char *file_name) -{ - PdfDocument *p = pdfDocuments; - while (p && strcmp(p->file_name, file_name) != 0) - p = p->next; - if (p) { - xref = p->xref; - (p->occurences)++; - return p; - } - p = new PdfDocument; - p->file_name = xstrdup(file_name); - p->xref = xref = 0; - p->occurences = 0; - GString *docName = new GString(p->file_name); - p->doc = new PDFDoc(docName); // takes ownership of docName - if (!p->doc->isOk() || !p->doc->okToPrint()) { - pdftex_fail("xpdf: reading PDF image failed"); - } - p->inObjList = 0; - p->next = pdfDocuments; - pdfDocuments = p; - return p; -} - -// Deallocate a PdfDocument with all its resources - -static void delete_document(PdfDocument * pdf_doc) -{ - PdfDocument **p = &pdfDocuments; - while (*p && *p != pdf_doc) - p = &((*p)->next); - // should not happen: - if (!*p) - return; - // unlink from list - *p = pdf_doc->next; - // free pdf_doc's resources - InObj *r, *n; - for (r = pdf_doc->inObjList; r != 0; r = n) { - n = r->next; - delete r; - } - xref = pdf_doc->xref; - delete pdf_doc->doc; - xfree(pdf_doc->file_name); - delete pdf_doc; -} - -// -------------------------------------------------------------------- - -static int addEncoding(GfxFont * gfont) -{ - UsedEncoding *n; - n = new UsedEncoding; - n->next = encodingList; - encodingList = n; - n->font = gfont; - n->enc_objnum = pdfnewobjnum(); - return n->enc_objnum; -} - -#define addFont(ref, fd, enc_objnum) \ - addInObj(objFont, ref, fd, enc_objnum) - -// addFontDesc is only used to avoid writing the original FontDescriptor -// from the PDF file. - -#define addFontDesc(ref, fd) \ - addInObj(objFontDesc, ref, fd, 0) - -#define addOther(ref) \ - addInObj(objOther, ref, 0, 0) - -static int addInObj(InObjType type, Ref ref, fd_entry * fd, int e) -{ - InObj *p, *q, *n = new InObj; - if (ref.num == 0) - pdftex_fail("PDF inclusion: invalid reference"); - n->ref = ref; - n->type = type; - n->next = 0; - n->fd = fd; - n->enc_objnum = e; - n->written = 0; - if (inObjList == 0) - inObjList = n; - else { - for (p = inObjList; p != 0; p = p->next) { - if (p->ref.num == ref.num && p->ref.gen == ref.gen) { - delete n; - return p->num; - } - q = p; - } - // it is important to add new objects at the end of the list, - // because new objects are being added while the list is being - // written out. - q->next = n; - } - if (type == objFontDesc) - n->num = get_fd_objnum(fd); - else - n->num = pdfnewobjnum(); - return n->num; -} - -#if 0 /* unusewd */ -static int getNewObjectNumber(Ref ref) -{ - InObj *p; - if (inObjList == 0) { - pdftex_fail("No objects copied yet"); - } else { - for (p = inObjList; p != 0; p = p->next) { - if (p->ref.num == ref.num && p->ref.gen == ref.gen) { - return p->num; - } - } - pdftex_fail("Object not yet copied: %i %i", ref.num, ref.gen); - } -#ifdef _MSC_VER - /* Never reached, but without __attribute__((noreturn)) for pdftex_fail() - MSVC 5.0 requires an int return value. */ - return -60000; -#endif -} -#endif - -static void copyObject(Object *); - -static void copyName(char *s) -{ - pdf_puts("/"); - for (; *s != 0; s++) { - if (isdigit(*s) || isupper(*s) || islower(*s) || *s == '_' || - *s == '.' || *s == '-' || *s == '+') - pdfout(*s); - else - pdf_printf("#%.2X", *s & 0xFF); - } -} - -static void copyDictEntry(Object * obj, int i) -{ - Object obj1; - copyName((char *)obj->dictGetKey(i)); - pdf_puts(" "); - obj1 = obj->dictGetValNF(i).copy(); - copyObject(&obj1); - pdf_puts("\n"); -} - -static void copyDict(Object * obj) -{ - int i, l; - if (!obj->isDict()) - pdftex_fail("PDF inclusion: invalid dict type <%s>", - obj->getTypeName()); - for (i = 0, l = obj->dictGetLength(); i < l; ++i) - copyDictEntry(obj, i); -} - -static void copyFontDict(Object * obj, InObj * r) -{ - int i, l; - char *key; - if (!obj->isDict()) - pdftex_fail("PDF inclusion: invalid dict type <%s>", - obj->getTypeName()); - pdf_puts("<<\n"); - assert(r->type == objFont); // FontDescriptor is in fd_tree - for (i = 0, l = obj->dictGetLength(); i < l; ++i) { - key = (char *)obj->dictGetKey(i); - if (strncmp("FontDescriptor", key, strlen("FontDescriptor")) == 0 - || strncmp("BaseFont", key, strlen("BaseFont")) == 0 - || strncmp("Encoding", key, strlen("Encoding")) == 0) - continue; // skip original values - copyDictEntry(obj, i); - } - // write new FontDescriptor, BaseFont, and Encoding - pdf_printf("/FontDescriptor %d 0 R\n", get_fd_objnum(r->fd)); - pdf_printf("/BaseFont %d 0 R\n", get_fn_objnum(r->fd)); - pdf_printf("/Encoding %d 0 R\n", r->enc_objnum); - pdf_puts(">>"); -} - -static void copyStream(Stream * str) -{ - int c, c2 = 0; - str->reset(); - while ((c = str->getChar()) != EOF) { - pdfout(c); - c2 = c; - } - pdflastbyte = c2; -} - -static void copyProcSet(Object * obj) -{ - int i, l; - Object procset; - if (!obj->isArray()) - pdftex_fail("PDF inclusion: invalid ProcSet array type <%s>", - obj->getTypeName()); - pdf_puts("/ProcSet [ "); - for (i = 0, l = obj->arrayGetLength(); i < l; ++i) { - procset = obj->arrayGetNF(i).copy(); - if (!procset.isName()) - pdftex_fail("PDF inclusion: invalid ProcSet entry type <%s>", - procset.getTypeName()); - copyName((char *)procset.getName()); - pdf_puts(" "); - } - pdf_puts("]\n"); -} - -#define REPLACE_TYPE1C true - -static bool embeddableFont(Object * fontdesc) -{ - Object fontfile, ffsubtype; - - if (!fontdesc->isDict()) - return false; - fontfile = fontdesc->dictLookup("FontFile"); - if (fontfile.isStream()) - return true; - if (REPLACE_TYPE1C) { - fontfile = fontdesc->dictLookup("FontFile3"); - if (!fontfile.isStream()) - return false; - ffsubtype = fontfile.streamGetDict()->lookup("Subtype"); - return ffsubtype.isName() && !strcmp(ffsubtype.getName(), "Type1C"); - } - return false; -} - -static void copyFont(char *tag, Object * fontRef) -{ - Object fontdict, subtype, basefont, fontdescRef, fontdesc, charset, - stemV; - GfxFont *gfont; - fd_entry *fd; - fm_entry *fontmap; - // Check whether the font has already been embedded before analysing it. - InObj *p; - Ref ref = fontRef->getRef(); - for (p = inObjList; p; p = p->next) { - if (p->ref.num == ref.num && p->ref.gen == ref.gen) { - copyName(tag); - pdf_printf(" %d 0 R ", p->num); - return; - } - } - // Only handle included Type1 (and Type1C) fonts; anything else will be copied. - // Type1C fonts are replaced by Type1 fonts, if REPLACE_TYPE1C is true. - fontdict = fontRef->fetch(xref); - fontdesc = Object(objNull); - if (fontdict.isDict()) { - subtype = fontdict.dictLookup("Subtype"); - basefont = fontdict.dictLookup("BaseFont"); - fontdescRef = fontdict.dictLookupNF("FontDescriptor").copy(); - if (fontdescRef.isRef()) { - fontdesc = fontdescRef.fetch(xref); - } - } - if (!fixedinclusioncopyfont && fontdict.isDict() - && subtype.isName() - && !strcmp(subtype.getName(), "Type1") - && basefont.isName() - && fontdescRef.isRef() - && fontdesc.isDict() - && embeddableFont(&fontdesc) - && (fontmap = lookup_fontmap((char *)basefont.getName())) != NULL) { - // round /StemV value, since the PDF input is a float - // (see Font Descriptors in PDF reference), but we only store an - // integer, since we don't want to change the struct. - stemV = fontdesc.dictLookup("StemV"); - fd = epdf_create_fontdescriptor(fontmap, zround(stemV.getNum())); - charset = fontdesc.dictLookup("CharSet"); - if (!charset.isNull() && - charset.isString() && is_subsetable(fontmap)) - epdf_mark_glyphs(fd, (char *)charset.getString()->c_str()); - else - embed_whole_font(fd); - addFontDesc(fontdescRef.getRef(), fd); - copyName(tag); - gfont = GfxFont::makeFont(xref, tag, fontRef->getRef(), - fontdict.getDict()); - pdf_printf(" %d 0 R ", addFont(fontRef->getRef(), fd, - addEncoding(gfont))); - } else { - copyName(tag); - pdf_puts(" "); - copyObject(fontRef); - } -} - -static void copyFontResources(Object * obj) -{ - Object fontRef; - int i, l; - if (!obj->isDict()) - pdftex_fail("PDF inclusion: invalid font resources dict type <%s>", - obj->getTypeName()); - pdf_puts("/Font << "); - for (i = 0, l = obj->dictGetLength(); i < l; ++i) { - fontRef = obj->dictGetValNF(i).copy(); - if (fontRef.isRef()) - copyFont((char *)obj->dictGetKey(i), &fontRef); - else if (fontRef.isDict()) { // some programs generate pdf with embedded font object - copyName((char *)obj->dictGetKey(i)); - pdf_puts(" "); - copyObject(&fontRef); - } - else - pdftex_fail("PDF inclusion: invalid font in reference type <%s>", - fontRef.getTypeName()); - } - pdf_puts(">>\n"); -} - -static void copyOtherResources(Object * obj, char *key) -{ - // copies all other resources (write_epdf handles Fonts and ProcSets), - - // if Subtype is present, it must be a name - if (strcmp("Subtype", key) == 0) { - if (!obj->isName()) { - pdftex_warn("PDF inclusion: Subtype in Resources dict is not a name" - " (key '%s', type <%s>); ignored.", - key, obj->getTypeName()); - return; - } - } else if (!obj->isDict()) { - //FIXME: Write the message only to the log file - pdftex_warn("PDF inclusion: invalid other resource which is no dict" - " (key '%s', type <%s>); ignored.", - key, obj->getTypeName()); - return; - } - copyName(key); - pdf_puts(" "); - copyObject(obj); -} - -// Function onverts double to string; very small and very large numbers -// are NOT converted to scientific notation. -// n must be a number or real conforming to the implementation limits -// of PDF as specified in appendix C.1 of the PDF Ref. -// These are: -// maximum value of ints is +2^32 -// maximum value of reals is +2^15 -// smalles values of reals is 1/(2^16) - -static char *convertNumToPDF(double n) -{ - static const int precision = 6; - static const int fact = (int) 1E6; // must be 10^precision - static const double epsilon = 0.5E-6; // 2epsilon must be 10^-precision - static char buf[64]; - // handle very small values: return 0 - if (fabs(n) < epsilon) { - buf[0] = '0'; - buf[1] = '\0'; - } else { - char ints[64]; - int bindex = 0, sindex = 0; - int ival, fval; - // handle the sign part if n is negative - if (n < 0) { - buf[bindex++] = '-'; - n = -n; - } - n += epsilon; // for rounding - // handle the integer part, simply with sprintf - ival = (int) floor(n); - n -= ival; - sprintf(ints, "%d", ival); - while (ints[sindex] != 0) - buf[bindex++] = ints[sindex++]; - // handle the fractional part up to 'precision' digits - fval = (int) floor(n * fact); - if (fval) { - // set a dot - buf[bindex++] = '.'; - sindex = bindex + precision; - buf[sindex--] = '\0'; - // fill up trailing zeros with the string terminator NULL - while (((fval % 10) == 0) && (sindex >= bindex)) { - buf[sindex--] = '\0'; - fval /= 10; - } - // fill up the fractional part back to front - while (sindex >= bindex) { - buf[sindex--] = (fval % 10) + '0'; - fval /= 10; - } - } else - buf[bindex++] = 0; - } - return (char *) buf; -} - -static void copyObject(Object * obj) -{ - Object obj1; - int i, l, c; - Ref ref; - char *p; - GString *s; - if (obj->isBool()) { - pdf_printf("%s", obj->getBool()? "true" : "false"); - } else if (obj->isInt()) { - pdf_printf("%i", obj->getInt()); - } else if (obj->isReal()) { - pdf_printf("%s", convertNumToPDF(obj->getReal())); - } else if (obj->isNum()) { - pdf_printf("%s", convertNumToPDF(obj->getNum())); - } else if (obj->isString()) { - s = (GooString *)obj->getString(); - p = (char *)s->c_str(); - l = s->getLength(); - if (strlen(p) == (unsigned int) l) { - pdf_puts("("); - for (; *p != 0; p++) { - c = (unsigned char) *p; - if (c == '(' || c == ')' || c == '\\') - pdf_printf("\\%c", c); - else if (c < 0x20 || c > 0x7F) - pdf_printf("\\%03o", c); - else - pdfout(c); - } - pdf_puts(")"); - } else { - pdf_puts("<"); - for (i = 0; i < l; i++) { - c = s->getChar(i) & 0xFF; - pdf_printf("%.2x", c); - } - pdf_puts(">"); - } - } else if (obj->isName()) { - copyName((char *)obj->getName()); - } else if (obj->isNull()) { - pdf_puts("null"); - } else if (obj->isArray()) { - pdf_puts("["); - for (i = 0, l = obj->arrayGetLength(); i < l; ++i) { - obj1 = obj->arrayGetNF(i).copy(); - if (!obj1.isName()) - pdf_puts(" "); - copyObject(&obj1); - } - pdf_puts("]"); - } else if (obj->isDict()) { - pdf_puts("<<\n"); - copyDict(obj); - pdf_puts(">>"); - } else if (obj->isStream()) { - pdf_puts("<<\n"); - copyDict(obj->getStream()->getDictObject()); - pdf_puts(">>\n"); - pdf_puts("stream\n"); - copyStream(obj->getStream()->getUndecodedStream()); - pdf_puts("\nendstream"); - } else if (obj->isRef()) { - ref = obj->getRef(); - if (ref.num == 0) { - pdftex_fail - ("PDF inclusion: reference to invalid object" - " (is the included pdf broken?)"); - } else - pdf_printf("%d 0 R", addOther(ref)); - } else { - pdftex_fail("PDF inclusion: type <%s> cannot be copied", - obj->getTypeName()); - } -} - -static void writeRefs() -{ - InObj *r; - for (r = inObjList; r != 0; r = r->next) { - if (!r->written) { - r->written = 1; - Object obj1 = xref->fetch(r->ref.num, r->ref.gen); - if (r->type == objFont) { - assert(!obj1.isStream()); - pdfbeginobj(r->num, 2); // \pdfobjcompresslevel = 2 is for this - copyFontDict(&obj1, r); - pdf_puts("\n"); - pdfendobj(); - } else if (r->type != objFontDesc) { // /FontDescriptor is written via write_fontdescriptor() - if (obj1.isStream()) - pdfbeginobj(r->num, 0); - else - pdfbeginobj(r->num, 2); // \pdfobjcompresslevel = 2 is for this - copyObject(&obj1); - pdf_puts("\n"); - pdfendobj(); - } - } - } -} - -static void writeEncodings() -{ - UsedEncoding *r, *n; - char *glyphNames[256], *s; - int i; - for (r = encodingList; r != 0; r = r->next) { - for (i = 0; i < 256; i++) { - if (r->font->isCIDFont()) { - pdftex_fail - ("PDF inclusion: CID fonts are not supported" - " (try to disable font replacement to fix this)"); - } - if ((s = (char *)((Gfx8BitFont *) r->font)->getCharName(i)) != 0) - glyphNames[i] = s; - else - glyphNames[i] = notdef; - } - epdf_write_enc(glyphNames, r->enc_objnum); - } - for (r = encodingList; r != 0; r = n) { - n = r->next; -#ifdef POPPLER_VERSION - r->font->decRefCnt(); -#else -#error POPPLER_VERSION should be defined. -#endif - delete r; - } -} - -// get the pagebox according to the pagebox_spec -static const PDFRectangle *get_pagebox(Page * page, int pagebox_spec) -{ - if (pagebox_spec == pdfboxspecmedia) - return page->getMediaBox(); - else if (pagebox_spec == pdfboxspeccrop) - return page->getCropBox(); - else if (pagebox_spec == pdfboxspecbleed) - return page->getBleedBox(); - else if (pagebox_spec == pdfboxspectrim) - return page->getTrimBox(); - else if (pagebox_spec == pdfboxspecart) - return page->getArtBox(); - else - pdftex_fail("PDF inclusion: unknown value of pagebox spec (%i)", - (int) pagebox_spec); - return page->getMediaBox(); // to make the compiler happy -} - - -// Reads various information about the PDF and sets it up for later inclusion. -// This will fail if the PDF version of the PDF is higher than -// minor_pdf_version_wanted or page_name is given and can not be found. -// It makes no sense to give page_name _and_ page_num. -// Returns the page number. - -int -read_pdf_info(char *image_name, char *page_name, int page_num, - int pagebox_spec, int major_pdf_version_wanted, int minor_pdf_version_wanted, - int pdf_inclusion_errorlevel) -{ - PdfDocument *pdf_doc; - Page *page; - const PDFRectangle *pagebox; -#ifdef POPPLER_VERSION - int pdf_major_version_found, pdf_minor_version_found; -#else -#error POPPLER_VERSION should be defined. -#endif - // initialize - if (!isInit) { - globalParams = new GlobalParams(); - globalParams->setErrQuiet(false); - isInit = true; - } - // open PDF file - pdf_doc = find_add_document(image_name); - epdf_doc = (void *) pdf_doc; - - // check PDF version - // this works only for PDF 1.x -- but since any versions of PDF newer - // than 1.x will not be backwards compatible to PDF 1.x, pdfTeX will - // then have to changed drastically anyway. -#ifdef POPPLER_VERSION - pdf_major_version_found = pdf_doc->doc->getPDFMajorVersion(); - pdf_minor_version_found = pdf_doc->doc->getPDFMinorVersion(); - if ((pdf_major_version_found > major_pdf_version_wanted) - || (pdf_minor_version_found > minor_pdf_version_wanted)) { - const char *msg = - "PDF inclusion: found PDF version <%d.%d>, but at most version <%d.%d> allowed"; - if (pdf_inclusion_errorlevel > 0) { - pdftex_fail(msg, pdf_major_version_found, pdf_minor_version_found, major_pdf_version_wanted, minor_pdf_version_wanted); - } else if (pdf_inclusion_errorlevel < 0) { - ; /* do nothing */ - } else { /* = 0, give warning */ - pdftex_warn(msg, pdf_major_version_found, pdf_minor_version_found, major_pdf_version_wanted, minor_pdf_version_wanted); - } - } -#else -#error POPPLER_VERSION should be defined. -#endif - epdf_num_pages = pdf_doc->doc->getCatalog()->getNumPages(); - if (page_name) { - // get page by name - GString name(page_name); - LinkDest *link = pdf_doc->doc->findDest(&name); - if (link == 0 || !link->isOk()) - pdftex_fail("PDF inclusion: invalid destination <%s>", page_name); - Ref ref = link->getPageRef(); - page_num = pdf_doc->doc->getCatalog()->findPage(ref.num, ref.gen); - if (page_num == 0) - pdftex_fail("PDF inclusion: destination is not a page <%s>", - page_name); - delete link; - } else { - // get page by number - if (page_num <= 0 || page_num > epdf_num_pages) - pdftex_fail("PDF inclusion: required page does not exist <%i>", - epdf_num_pages); - } - // get the required page - page = pdf_doc->doc->getCatalog()->getPage(page_num); - - // get the pagebox (media, crop...) to use. - pagebox = get_pagebox(page, pagebox_spec); - if (pagebox->x2 > pagebox->x1) { - epdf_orig_x = pagebox->x1; - epdf_width = pagebox->x2 - pagebox->x1; - } else { - epdf_orig_x = pagebox->x2; - epdf_width = pagebox->x1 - pagebox->x2; - } - if (pagebox->y2 > pagebox->y1) { - epdf_orig_y = pagebox->y1; - epdf_height = pagebox->y2 - pagebox->y1; - } else { - epdf_orig_y = pagebox->y2; - epdf_height = pagebox->y1 - pagebox->y2; - } - - // get page rotation - epdf_rotate = page->getRotate() % 360; - if (epdf_rotate < 0) - epdf_rotate += 360; - - // page group - if (page->getGroup() != NULL) - epdf_has_page_group = 1; // only flag that page group is present; - // the actual object number will be - // generated in pdftex.web - else - epdf_has_page_group = 0; // no page group present - - pdf_doc->xref = pdf_doc->doc->getXRef(); - return page_num; -} - -// writes the current epf_doc. -// Here the included PDF is copied, so most errors that can happen during PDF -// inclusion will arise here. - -void write_epdf(void) -{ - Page *page; - Ref *pageRef; - Dict *pageDict; - Object contents, obj1, obj2, pageObj, dictObj; - Object groupDict; - bool writeSepGroup = false; - Object info; - char *key; - char s[256]; - int i, l; - int rotate; - double scale[6] = { 0, 0, 0, 0, 0, 0 }; - bool writematrix = false; - int suppress_ptex_info = getpdfsuppressptexinfo(); - static const char *pageDictKeys[] = { - "LastModified", - "Metadata", - "PieceInfo", - "SeparationInfo", -// "Group", -// "Resources", - NULL - }; - - PdfDocument *pdf_doc = (PdfDocument *) epdf_doc; - (pdf_doc->occurences)--; - xref = pdf_doc->xref; - inObjList = pdf_doc->inObjList; - encodingList = 0; - page = pdf_doc->doc->getCatalog()->getPage(epdf_selected_page); - pageRef = pdf_doc->doc->getCatalog()->getPageRef(epdf_selected_page); - pageObj = xref->fetch(pageRef->num, pageRef->gen); - pageDict = pageObj.getDict(); - rotate = page->getRotate(); - const PDFRectangle *pagebox; - // write the Page header - pdf_puts("/Type /XObject\n"); - pdf_puts("/Subtype /Form\n"); - pdf_puts("/FormType 1\n"); - - // write additional information - if ((suppress_ptex_info & MASK_SUPPRESS_PTEX_FILENAME) == 0) { - pdf_printf("/%s.FileName (%s)\n", pdfkeyprefix, - convertStringToPDFString(pdf_doc->file_name, - strlen(pdf_doc->file_name))); - } - if ((suppress_ptex_info & MASK_SUPPRESS_PTEX_PAGENUMBER) == 0) { - pdf_printf("/%s.PageNumber %i\n", pdfkeyprefix, (int) epdf_selected_page); - } - if ((suppress_ptex_info & MASK_SUPPRESS_PTEX_INFODICT) == 0) { - info = pdf_doc->doc->getDocInfoNF().copy(); - if (info.isRef()) { - // the info dict must be indirect (PDF Ref p. 61) - pdf_printf("/%s.InfoDict ", pdfkeyprefix); - pdf_printf("%d 0 R\n", addOther(info.getRef())); - } - } - // get the pagebox (media, crop...) to use. - pagebox = get_pagebox(page, epdf_page_box); - - // handle page rotation - if (rotate != 0) { - if (rotate % 90 == 0) { - // this handles only the simple case: multiple of 90s but these - // are the only values allowed according to the reference - // (v1.3, p. 78). - // the image is rotated around its center. - // the /Rotate key is clockwise while the matrix is - // counterclockwise :-% - tex_printf(", page is rotated %d degrees", rotate); - switch (rotate) { - case 90: - scale[1] = -1; - scale[2] = 1; - scale[4] = pagebox->x1 - pagebox->y1; - scale[5] = pagebox->y1 + pagebox->x2; - writematrix = true; - break; - case 180: - scale[0] = scale[3] = -1; - scale[4] = pagebox->x1 + pagebox->x2; - scale[5] = pagebox->y1 + pagebox->y2; - writematrix = true; - break; // width and height are exchanged - case 270: - scale[1] = 1; - scale[2] = -1; - scale[4] = pagebox->x1 + pagebox->y2; - scale[5] = pagebox->y1 - pagebox->x1; - writematrix = true; - break; - } - if (writematrix) { // The matrix is only written if the image is rotated. - sprintf(s, "/Matrix [%.8f %.8f %.8f %.8f %.8f %.8f]\n", - scale[0], - scale[1], scale[2], scale[3], scale[4], scale[5]); - pdf_puts(stripzeros(s)); - } - } - } - - sprintf(s, "/BBox [%.8f %.8f %.8f %.8f]\n", - pagebox->x1, pagebox->y1, pagebox->x2, pagebox->y2); - pdf_puts(stripzeros(s)); - - // Metadata validity check (as a stream it must be indirect) - dictObj = pageDict->lookupNF("Metadata").copy(); - if (!dictObj.isNull() && !dictObj.isRef()) - pdftex_warn("PDF inclusion: /Metadata must be indirect object"); - - // copy selected items in Page dictionary except Resources & Group - for (i = 0; pageDictKeys[i] != NULL; i++) { - dictObj = pageDict->lookupNF(pageDictKeys[i]).copy(); - if (!dictObj.isNull()) { - pdf_newline(); - pdf_printf("/%s ", pageDictKeys[i]); - copyObject(&dictObj); // preserves indirection - } - } - - // handle page group - dictObj = pageDict->lookupNF("Group").copy(); - if (!dictObj.isNull()) { - if (pdfpagegroupval == 0) { - // another pdf with page group was included earlier on the - // same page; copy the Group entry as is. See manual for - // info on why this is a warning. - if (getpdfsuppresswarningpagegroup() == 0) { - pdftex_warn - ("PDF inclusion: multiple pdfs with page group included in a single page"); - } - pdf_newline(); - pdf_puts("/Group "); - copyObject(&dictObj); - } else { - // write Group dict as a separate object, since the Page dict also refers to it - dictObj = pageDict->lookup("Group"); - if (!dictObj.isDict()) - pdftex_fail("PDF inclusion: /Group dict missing"); - writeSepGroup = true; -/* -This part is only a single line - groupDict = Object(page->getGroup()); -in the original patch. In this case, however, pdftex crashes at -"delete pdf_doc->doc" in "delete_document()" for inclusion of some -kind of pdf images, for example, figure_missing.pdf in gnuplot. -A change - groupDict = Object(page->getGroup()).copy(); -does not improve the situation. -The changes below seem to work fine. -*/ -// begin modification - groupDict = pageDict->lookup("Group"); - const Dict& dic1 = page->getGroup(); - const Dict& dic2 = groupDict.getDict(); - // replace dic2 in groupDict with dic1 - l = dic2.getLength(); - for (i = 0; i < l; i++) { - groupDict.dictRemove(dic2.getKey(i)); - } - l = dic1.getLength(); - for (i = 0; i < l; i++) { - groupDict.dictAdd((const char *)copyString(dic1.getKey(i)), - dic1.getValNF(i).copy()); - } -// end modification - pdf_printf("/Group %ld 0 R\n", (long)pdfpagegroupval); - } - } - - // write the Resources dictionary - if (page->getResourceDict() == NULL) { - // Resources can be missing (files without them have been spotted - // in the wild); in which case the /Resouces of the /Page will be used. - // "This practice is not recommended". - pdftex_warn - ("PDF inclusion: /Resources missing. 'This practice is not recommended' (PDF Ref)"); - } else { - Object *obj1 = page->getResourceDictObject(); - if (!obj1->isDict()) - pdftex_fail("PDF inclusion: invalid resources dict type <%s>", - obj1->getTypeName()); - pdf_newline(); - pdf_puts("/Resources <<\n"); - for (i = 0, l = obj1->dictGetLength(); i < l; ++i) { - obj2 = obj1->dictGetVal(i); - key = (char *)obj1->dictGetKey(i); - if (strcmp("Font", key) == 0) - copyFontResources(&obj2); - else if (strcmp("ProcSet", key) == 0) - copyProcSet(&obj2); - else - copyOtherResources(&obj2, (char *)key); - } - pdf_puts(">>\n"); - } - - // write the page contents - contents = page->getContents(); - if (contents.isStream()) { - - // Variant A: get stream and recompress under control - // of \pdfcompresslevel - // - // pdfbeginstream(); - // copyStream(contents->getStream()); - // pdfendstream(); - - // Variant B: copy stream without recompressing - // - obj1 = contents.streamGetDict()->lookup("F"); - if (!obj1.isNull()) { - pdftex_fail("PDF inclusion: Unsupported external stream"); - } - obj1 = contents.streamGetDict()->lookup("Length"); - assert(!obj1.isNull()); - pdf_puts("/Length "); - copyObject(&obj1); - pdf_puts("\n"); - obj1 = contents.streamGetDict()->lookup("Filter"); - if (!obj1.isNull()) { - pdf_puts("/Filter "); - copyObject(&obj1); - pdf_puts("\n"); - obj1 = contents.streamGetDict()->lookup("DecodeParms"); - if (!obj1.isNull()) { - pdf_puts("/DecodeParms "); - copyObject(&obj1); - pdf_puts("\n"); - } - } - pdf_puts(">>\nstream\n"); - copyStream(contents.getStream()->getUndecodedStream()); - pdfendstream(); - } else if (contents.isArray()) { - pdfbeginstream(); - for (i = 0, l = contents.arrayGetLength(); i < l; ++i) { - Object contentsobj = contents.arrayGet(i); - copyStream(contentsobj.getStream()); - if (i < l - 1) - pdf_newline(); // add a newline after each stream except the last - } - pdfendstream(); - } else { // the contents are optional, but we need to include an empty stream - pdfbeginstream(); - pdfendstream(); - } - - // write out all indirect objects - writeRefs(); - - // write out all used encodings (and delete list) - writeEncodings(); - - // write the Group dict if needed - if (writeSepGroup) { - pdfbeginobj(pdfpagegroupval, 2); - copyObject(&groupDict); - pdf_puts("\n"); - pdfendobj(); - pdfpagegroupval = 0; // only the 1st included pdf on a page gets its - // Group included in the Page dict - } - - // save object list, xref - pdf_doc->inObjList = inObjList; - pdf_doc->xref = xref; -} - -// Called when an image has been written and it's resources in image_tab are -// freed and it's not referenced anymore. - -void epdf_delete() -{ - PdfDocument *pdf_doc = (PdfDocument *) epdf_doc; - xref = pdf_doc->xref; - if (pdf_doc->occurences < 0) { - delete_document(pdf_doc); - } -} - -// Called when PDF embedding system is finalized. -// Now deallocate all remaining PdfDocuments. - -void epdf_check_mem() -{ - if (isInit) { - PdfDocument *p, *n; - for (p = pdfDocuments; p; p = n) { - n = p->next; - delete_document(p); - } - // see above for globalParams - delete globalParams; - } -} diff --git a/Build/source/texk/web2c/pdftexdir/pdftoepdf-poppler0.76.0.cc b/Build/source/texk/web2c/pdftexdir/pdftoepdf-poppler0.76.0.cc deleted file mode 100644 index 6a21e45fd78..00000000000 --- a/Build/source/texk/web2c/pdftexdir/pdftoepdf-poppler0.76.0.cc +++ /dev/null @@ -1,1113 +0,0 @@ -/* -Copyright 1996-2017 Han The Thanh, <thanh@pdftex.org> - -This file is part of pdfTeX. - -pdfTeX is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -pdfTeX is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -/* -This is based on the patch texlive-poppler-0.59.patch <2017-09-19> at -https://git.archlinux.org/svntogit/packages.git/plain/texlive-bin/trunk -by Arch Linux. A little modifications are made to avoid a crash for -some kind of pdf images, such as figure_missing.pdf in gnuplot. -The poppler should be 0.76.0 upto 0.82.0. -POPPLER_VERSION should be defined. -*/ - -/* Do this early in order to avoid a conflict between - MINGW32 <rpcndr.h> defining 'boolean' as 'unsigned char' and - <kpathsea/types.h> defining Pascal's boolean as 'int'. -*/ -#include <w2c/config.h> -#include <kpathsea/lib.h> - -#include <stdlib.h> -#include <math.h> -#include <stddef.h> -#include <stdio.h> -#include <string.h> -#include <ctype.h> - -#ifdef POPPLER_VERSION -#include <dirent.h> -#include <poppler-config.h> -#include <goo/GooString.h> -#include <goo/gmem.h> -#include <goo/gfile.h> -#define GString GooString -#else -#error POPPLER_VERSION should be defined. -#endif -#include <assert.h> - -#include "Object.h" -#include "Stream.h" -#include "Array.h" -#include "Dict.h" -#include "XRef.h" -#include "Catalog.h" -#include "Link.h" -#include "Page.h" -#include "GfxFont.h" -#include "PDFDoc.h" -#include "GlobalParams.h" -#include "Error.h" - -// This file is mostly C and not very much C++; it's just used to interface -// the functions of xpdf, which are written in C++. - -extern "C" { -#include <pdftexdir/ptexmac.h> -#include <pdftexdir/pdftex-common.h> - -// These functions from pdftex.web gets declared in pdftexcoerce.h in the -// usual web2c way, but we cannot include that file here because C++ -// does not allow it. -extern int getpdfsuppresswarningpagegroup(void); -extern integer getpdfsuppressptexinfo(void); -extern integer zround(double); -} - -// The prefix "PTEX" for the PDF keys is special to pdfTeX; -// this has been registered with Adobe by Hans Hagen. - -#define pdfkeyprefix "PTEX" - -#define MASK_SUPPRESS_PTEX_FULLBANNER 0x01 -#define MASK_SUPPRESS_PTEX_FILENAME 0x02 -#define MASK_SUPPRESS_PTEX_PAGENUMBER 0x04 -#define MASK_SUPPRESS_PTEX_INFODICT 0x08 - -// When copying the Resources of the selected page, all objects are copied -// recusively top-down. Indirect objects however are not fetched during -// copying, but get a new object number from pdfTeX and then will be -// appended into a linked list. Duplicates are checked and removed from the -// list of indirect objects during appending. - -enum InObjType { - objFont, - objFontDesc, - objOther -}; - -struct InObj { - Ref ref; // ref in original PDF - InObjType type; // object type - InObj *next; // next entry in list of indirect objects - int num; // new object number in output PDF - fd_entry *fd; // pointer to /FontDescriptor object structure - int enc_objnum; // Encoding for objFont - int written; // has it been written to output PDF? -}; - -struct UsedEncoding { - int enc_objnum; - GfxFont *font; - UsedEncoding *next; -}; - -static InObj *inObjList; -static UsedEncoding *encodingList; -static bool isInit = false; - -// -------------------------------------------------------------------- -// Maintain list of open embedded PDF files -// -------------------------------------------------------------------- - -struct PdfDocument { - char *file_name; - PDFDoc *doc; - XRef *xref; - InObj *inObjList; - int occurences; // number of references to the document; the doc can be - // deleted when this is negative - PdfDocument *next; -}; - -static PdfDocument *pdfDocuments = 0; - -static XRef *xref = 0; - -// Returns pointer to PdfDocument record for PDF file. -// Creates a new record if it doesn't exist yet. -// xref is made current for the document. - -static PdfDocument *find_add_document(char *file_name) -{ - PdfDocument *p = pdfDocuments; - while (p && strcmp(p->file_name, file_name) != 0) - p = p->next; - if (p) { - xref = p->xref; - (p->occurences)++; - return p; - } - p = new PdfDocument; - p->file_name = xstrdup(file_name); - p->xref = xref = 0; - p->occurences = 0; - GString *docName = new GString(p->file_name); - p->doc = new PDFDoc(docName); // takes ownership of docName - if (!p->doc->isOk() || !p->doc->okToPrint()) { - pdftex_fail("xpdf: reading PDF image failed"); - } - p->inObjList = 0; - p->next = pdfDocuments; - pdfDocuments = p; - return p; -} - -// Deallocate a PdfDocument with all its resources - -static void delete_document(PdfDocument * pdf_doc) -{ - PdfDocument **p = &pdfDocuments; - while (*p && *p != pdf_doc) - p = &((*p)->next); - // should not happen: - if (!*p) - return; - // unlink from list - *p = pdf_doc->next; - // free pdf_doc's resources - InObj *r, *n; - for (r = pdf_doc->inObjList; r != 0; r = n) { - n = r->next; - delete r; - } - xref = pdf_doc->xref; - delete pdf_doc->doc; - xfree(pdf_doc->file_name); - delete pdf_doc; -} - -// -------------------------------------------------------------------- - -static int addEncoding(GfxFont * gfont) -{ - UsedEncoding *n; - n = new UsedEncoding; - n->next = encodingList; - encodingList = n; - n->font = gfont; - n->enc_objnum = pdfnewobjnum(); - return n->enc_objnum; -} - -#define addFont(ref, fd, enc_objnum) \ - addInObj(objFont, ref, fd, enc_objnum) - -// addFontDesc is only used to avoid writing the original FontDescriptor -// from the PDF file. - -#define addFontDesc(ref, fd) \ - addInObj(objFontDesc, ref, fd, 0) - -#define addOther(ref) \ - addInObj(objOther, ref, 0, 0) - -static int addInObj(InObjType type, Ref ref, fd_entry * fd, int e) -{ - InObj *p, *q, *n = new InObj; - if (ref.num == 0) - pdftex_fail("PDF inclusion: invalid reference"); - n->ref = ref; - n->type = type; - n->next = 0; - n->fd = fd; - n->enc_objnum = e; - n->written = 0; - if (inObjList == 0) - inObjList = n; - else { - for (p = inObjList; p != 0; p = p->next) { - if (p->ref.num == ref.num && p->ref.gen == ref.gen) { - delete n; - return p->num; - } - q = p; - } - // it is important to add new objects at the end of the list, - // because new objects are being added while the list is being - // written out. - q->next = n; - } - if (type == objFontDesc) - n->num = get_fd_objnum(fd); - else - n->num = pdfnewobjnum(); - return n->num; -} - -#if 0 /* unusewd */ -static int getNewObjectNumber(Ref ref) -{ - InObj *p; - if (inObjList == 0) { - pdftex_fail("No objects copied yet"); - } else { - for (p = inObjList; p != 0; p = p->next) { - if (p->ref.num == ref.num && p->ref.gen == ref.gen) { - return p->num; - } - } - pdftex_fail("Object not yet copied: %i %i", ref.num, ref.gen); - } -#ifdef _MSC_VER - /* Never reached, but without __attribute__((noreturn)) for pdftex_fail() - MSVC 5.0 requires an int return value. */ - return -60000; -#endif -} -#endif - -static void copyObject(Object *); - -static void copyName(char *s) -{ - pdf_puts("/"); - for (; *s != 0; s++) { - if (isdigit(*s) || isupper(*s) || islower(*s) || *s == '_' || - *s == '.' || *s == '-' || *s == '+') - pdfout(*s); - else - pdf_printf("#%.2X", *s & 0xFF); - } -} - -static void copyDictEntry(Object * obj, int i) -{ - Object obj1; - copyName((char *)obj->dictGetKey(i)); - pdf_puts(" "); - obj1 = obj->dictGetValNF(i).copy(); - copyObject(&obj1); - pdf_puts("\n"); -} - -static void copyDict(Object * obj) -{ - int i, l; - if (!obj->isDict()) - pdftex_fail("PDF inclusion: invalid dict type <%s>", - obj->getTypeName()); - for (i = 0, l = obj->dictGetLength(); i < l; ++i) - copyDictEntry(obj, i); -} - -static void copyFontDict(Object * obj, InObj * r) -{ - int i, l; - char *key; - if (!obj->isDict()) - pdftex_fail("PDF inclusion: invalid dict type <%s>", - obj->getTypeName()); - pdf_puts("<<\n"); - assert(r->type == objFont); // FontDescriptor is in fd_tree - for (i = 0, l = obj->dictGetLength(); i < l; ++i) { - key = (char *)obj->dictGetKey(i); - if (strncmp("FontDescriptor", key, strlen("FontDescriptor")) == 0 - || strncmp("BaseFont", key, strlen("BaseFont")) == 0 - || strncmp("Encoding", key, strlen("Encoding")) == 0) - continue; // skip original values - copyDictEntry(obj, i); - } - // write new FontDescriptor, BaseFont, and Encoding - pdf_printf("/FontDescriptor %d 0 R\n", get_fd_objnum(r->fd)); - pdf_printf("/BaseFont %d 0 R\n", get_fn_objnum(r->fd)); - pdf_printf("/Encoding %d 0 R\n", r->enc_objnum); - pdf_puts(">>"); -} - -static void copyStream(Stream * str) -{ - int c, c2 = 0; - str->reset(); - while ((c = str->getChar()) != EOF) { - pdfout(c); - c2 = c; - } - pdflastbyte = c2; -} - -static void copyProcSet(Object * obj) -{ - int i, l; - Object procset; - if (!obj->isArray()) - pdftex_fail("PDF inclusion: invalid ProcSet array type <%s>", - obj->getTypeName()); - pdf_puts("/ProcSet [ "); - for (i = 0, l = obj->arrayGetLength(); i < l; ++i) { - procset = obj->arrayGetNF(i).copy(); - if (!procset.isName()) - pdftex_fail("PDF inclusion: invalid ProcSet entry type <%s>", - procset.getTypeName()); - copyName((char *)procset.getName()); - pdf_puts(" "); - } - pdf_puts("]\n"); -} - -#define REPLACE_TYPE1C true - -static bool embeddableFont(Object * fontdesc) -{ - Object fontfile, ffsubtype; - - if (!fontdesc->isDict()) - return false; - fontfile = fontdesc->dictLookup("FontFile"); - if (fontfile.isStream()) - return true; - if (REPLACE_TYPE1C) { - fontfile = fontdesc->dictLookup("FontFile3"); - if (!fontfile.isStream()) - return false; - ffsubtype = fontfile.streamGetDict()->lookup("Subtype"); - return ffsubtype.isName() && !strcmp(ffsubtype.getName(), "Type1C"); - } - return false; -} - -static void copyFont(char *tag, Object * fontRef) -{ - Object fontdict, subtype, basefont, fontdescRef, fontdesc, charset, - stemV; - GfxFont *gfont; - fd_entry *fd; - fm_entry *fontmap; - // Check whether the font has already been embedded before analysing it. - InObj *p; - Ref ref = fontRef->getRef(); - for (p = inObjList; p; p = p->next) { - if (p->ref.num == ref.num && p->ref.gen == ref.gen) { - copyName(tag); - pdf_printf(" %d 0 R ", p->num); - return; - } - } - // Only handle included Type1 (and Type1C) fonts; anything else will be copied. - // Type1C fonts are replaced by Type1 fonts, if REPLACE_TYPE1C is true. - fontdict = fontRef->fetch(xref); - fontdesc = Object(objNull); - if (fontdict.isDict()) { - subtype = fontdict.dictLookup("Subtype"); - basefont = fontdict.dictLookup("BaseFont"); - fontdescRef = fontdict.dictLookupNF("FontDescriptor").copy(); - if (fontdescRef.isRef()) { - fontdesc = fontdescRef.fetch(xref); - } - } - if (!fixedinclusioncopyfont && fontdict.isDict() - && subtype.isName() - && !strcmp(subtype.getName(), "Type1") - && basefont.isName() - && fontdescRef.isRef() - && fontdesc.isDict() - && embeddableFont(&fontdesc) - && (fontmap = lookup_fontmap((char *)basefont.getName())) != NULL) { - // round /StemV value, since the PDF input is a float - // (see Font Descriptors in PDF reference), but we only store an - // integer, since we don't want to change the struct. - stemV = fontdesc.dictLookup("StemV"); - fd = epdf_create_fontdescriptor(fontmap, zround(stemV.getNum())); - charset = fontdesc.dictLookup("CharSet"); - if (!charset.isNull() && - charset.isString() && is_subsetable(fontmap)) - epdf_mark_glyphs(fd, (char *)charset.getString()->c_str()); - else - embed_whole_font(fd); - addFontDesc(fontdescRef.getRef(), fd); - copyName(tag); - gfont = GfxFont::makeFont(xref, tag, fontRef->getRef(), - fontdict.getDict()); - pdf_printf(" %d 0 R ", addFont(fontRef->getRef(), fd, - addEncoding(gfont))); - } else { - copyName(tag); - pdf_puts(" "); - copyObject(fontRef); - } -} - -static void copyFontResources(Object * obj) -{ - Object fontRef; - int i, l; - if (!obj->isDict()) - pdftex_fail("PDF inclusion: invalid font resources dict type <%s>", - obj->getTypeName()); - pdf_puts("/Font << "); - for (i = 0, l = obj->dictGetLength(); i < l; ++i) { - fontRef = obj->dictGetValNF(i).copy(); - if (fontRef.isRef()) - copyFont((char *)obj->dictGetKey(i), &fontRef); - else if (fontRef.isDict()) { // some programs generate pdf with embedded font object - copyName((char *)obj->dictGetKey(i)); - pdf_puts(" "); - copyObject(&fontRef); - } - else - pdftex_fail("PDF inclusion: invalid font in reference type <%s>", - fontRef.getTypeName()); - } - pdf_puts(">>\n"); -} - -static void copyOtherResources(Object * obj, char *key) -{ - // copies all other resources (write_epdf handles Fonts and ProcSets), - - // if Subtype is present, it must be a name - if (strcmp("Subtype", key) == 0) { - if (!obj->isName()) { - pdftex_warn("PDF inclusion: Subtype in Resources dict is not a name" - " (key '%s', type <%s>); ignored.", - key, obj->getTypeName()); - return; - } - } else if (!obj->isDict()) { - //FIXME: Write the message only to the log file - pdftex_warn("PDF inclusion: invalid other resource which is no dict" - " (key '%s', type <%s>); ignored.", - key, obj->getTypeName()); - return; - } - copyName(key); - pdf_puts(" "); - copyObject(obj); -} - -// Function onverts double to string; very small and very large numbers -// are NOT converted to scientific notation. -// n must be a number or real conforming to the implementation limits -// of PDF as specified in appendix C.1 of the PDF Ref. -// These are: -// maximum value of ints is +2^32 -// maximum value of reals is +2^15 -// smalles values of reals is 1/(2^16) - -static char *convertNumToPDF(double n) -{ - static const int precision = 6; - static const int fact = (int) 1E6; // must be 10^precision - static const double epsilon = 0.5E-6; // 2epsilon must be 10^-precision - static char buf[64]; - // handle very small values: return 0 - if (fabs(n) < epsilon) { - buf[0] = '0'; - buf[1] = '\0'; - } else { - char ints[64]; - int bindex = 0, sindex = 0; - int ival, fval; - // handle the sign part if n is negative - if (n < 0) { - buf[bindex++] = '-'; - n = -n; - } - n += epsilon; // for rounding - // handle the integer part, simply with sprintf - ival = (int) floor(n); - n -= ival; - sprintf(ints, "%d", ival); - while (ints[sindex] != 0) - buf[bindex++] = ints[sindex++]; - // handle the fractional part up to 'precision' digits - fval = (int) floor(n * fact); - if (fval) { - // set a dot - buf[bindex++] = '.'; - sindex = bindex + precision; - buf[sindex--] = '\0'; - // fill up trailing zeros with the string terminator NULL - while (((fval % 10) == 0) && (sindex >= bindex)) { - buf[sindex--] = '\0'; - fval /= 10; - } - // fill up the fractional part back to front - while (sindex >= bindex) { - buf[sindex--] = (fval % 10) + '0'; - fval /= 10; - } - } else - buf[bindex++] = 0; - } - return (char *) buf; -} - -static void copyObject(Object * obj) -{ - Object obj1; - int i, l, c; - Ref ref; - char *p; - GString *s; - if (obj->isBool()) { - pdf_printf("%s", obj->getBool()? "true" : "false"); - } else if (obj->isInt()) { - pdf_printf("%i", obj->getInt()); - } else if (obj->isReal()) { - pdf_printf("%s", convertNumToPDF(obj->getReal())); - } else if (obj->isNum()) { - pdf_printf("%s", convertNumToPDF(obj->getNum())); - } else if (obj->isString()) { - s = (GooString *)obj->getString(); - p = (char *)s->c_str(); - l = s->getLength(); - if (strlen(p) == (unsigned int) l) { - pdf_puts("("); - for (; *p != 0; p++) { - c = (unsigned char) *p; - if (c == '(' || c == ')' || c == '\\') - pdf_printf("\\%c", c); - else if (c < 0x20 || c > 0x7F) - pdf_printf("\\%03o", c); - else - pdfout(c); - } - pdf_puts(")"); - } else { - pdf_puts("<"); - for (i = 0; i < l; i++) { - c = s->getChar(i) & 0xFF; - pdf_printf("%.2x", c); - } - pdf_puts(">"); - } - } else if (obj->isName()) { - copyName((char *)obj->getName()); - } else if (obj->isNull()) { - pdf_puts("null"); - } else if (obj->isArray()) { - pdf_puts("["); - for (i = 0, l = obj->arrayGetLength(); i < l; ++i) { - obj1 = obj->arrayGetNF(i).copy(); - if (!obj1.isName()) - pdf_puts(" "); - copyObject(&obj1); - } - pdf_puts("]"); - } else if (obj->isDict()) { - pdf_puts("<<\n"); - copyDict(obj); - pdf_puts(">>"); - } else if (obj->isStream()) { - pdf_puts("<<\n"); - copyDict(obj->getStream()->getDictObject()); - pdf_puts(">>\n"); - pdf_puts("stream\n"); - copyStream(obj->getStream()->getUndecodedStream()); - pdf_puts("\nendstream"); - } else if (obj->isRef()) { - ref = obj->getRef(); - if (ref.num == 0) { - pdftex_fail - ("PDF inclusion: reference to invalid object" - " (is the included pdf broken?)"); - } else - pdf_printf("%d 0 R", addOther(ref)); - } else { - pdftex_fail("PDF inclusion: type <%s> cannot be copied", - obj->getTypeName()); - } -} - -static void writeRefs() -{ - InObj *r; - for (r = inObjList; r != 0; r = r->next) { - if (!r->written) { - r->written = 1; - Object obj1 = xref->fetch(r->ref.num, r->ref.gen); - if (r->type == objFont) { - assert(!obj1.isStream()); - pdfbeginobj(r->num, 2); // \pdfobjcompresslevel = 2 is for this - copyFontDict(&obj1, r); - pdf_puts("\n"); - pdfendobj(); - } else if (r->type != objFontDesc) { // /FontDescriptor is written via write_fontdescriptor() - if (obj1.isStream()) - pdfbeginobj(r->num, 0); - else - pdfbeginobj(r->num, 2); // \pdfobjcompresslevel = 2 is for this - copyObject(&obj1); - pdf_puts("\n"); - pdfendobj(); - } - } - } -} - -static void writeEncodings() -{ - UsedEncoding *r, *n; - char *glyphNames[256], *s; - int i; - for (r = encodingList; r != 0; r = r->next) { - for (i = 0; i < 256; i++) { - if (r->font->isCIDFont()) { - pdftex_fail - ("PDF inclusion: CID fonts are not supported" - " (try to disable font replacement to fix this)"); - } - if ((s = (char *)((Gfx8BitFont *) r->font)->getCharName(i)) != 0) - glyphNames[i] = s; - else - glyphNames[i] = notdef; - } - epdf_write_enc(glyphNames, r->enc_objnum); - } - for (r = encodingList; r != 0; r = n) { - n = r->next; -#ifdef POPPLER_VERSION - r->font->decRefCnt(); -#else -#error POPPLER_VERSION should be defined. -#endif - delete r; - } -} - -// get the pagebox according to the pagebox_spec -static const PDFRectangle *get_pagebox(Page * page, int pagebox_spec) -{ - if (pagebox_spec == pdfboxspecmedia) - return page->getMediaBox(); - else if (pagebox_spec == pdfboxspeccrop) - return page->getCropBox(); - else if (pagebox_spec == pdfboxspecbleed) - return page->getBleedBox(); - else if (pagebox_spec == pdfboxspectrim) - return page->getTrimBox(); - else if (pagebox_spec == pdfboxspecart) - return page->getArtBox(); - else - pdftex_fail("PDF inclusion: unknown value of pagebox spec (%i)", - (int) pagebox_spec); - return page->getMediaBox(); // to make the compiler happy -} - - -// Reads various information about the PDF and sets it up for later inclusion. -// This will fail if the PDF version of the PDF is higher than -// minor_pdf_version_wanted or page_name is given and can not be found. -// It makes no sense to give page_name _and_ page_num. -// Returns the page number. - -int -read_pdf_info(char *image_name, char *page_name, int page_num, - int pagebox_spec, int major_pdf_version_wanted, int minor_pdf_version_wanted, - int pdf_inclusion_errorlevel) -{ - PdfDocument *pdf_doc; - Page *page; - const PDFRectangle *pagebox; -#ifdef POPPLER_VERSION - int pdf_major_version_found, pdf_minor_version_found; -#else -#error POPPLER_VERSION should be defined. -#endif - // initialize - if (!isInit) { - globalParams = new GlobalParams(); - globalParams->setErrQuiet(false); - isInit = true; - } - // open PDF file - pdf_doc = find_add_document(image_name); - epdf_doc = (void *) pdf_doc; - - // check PDF version - // this works only for PDF 1.x -- but since any versions of PDF newer - // than 1.x will not be backwards compatible to PDF 1.x, pdfTeX will - // then have to changed drastically anyway. -#ifdef POPPLER_VERSION - pdf_major_version_found = pdf_doc->doc->getPDFMajorVersion(); - pdf_minor_version_found = pdf_doc->doc->getPDFMinorVersion(); - if ((pdf_major_version_found > major_pdf_version_wanted) - || (pdf_minor_version_found > minor_pdf_version_wanted)) { - const char *msg = - "PDF inclusion: found PDF version <%d.%d>, but at most version <%d.%d> allowed"; - if (pdf_inclusion_errorlevel > 0) { - pdftex_fail(msg, pdf_major_version_found, pdf_minor_version_found, major_pdf_version_wanted, minor_pdf_version_wanted); - } else if (pdf_inclusion_errorlevel < 0) { - ; /* do nothing */ - } else { /* = 0, give warning */ - pdftex_warn(msg, pdf_major_version_found, pdf_minor_version_found, major_pdf_version_wanted, minor_pdf_version_wanted); - } - } -#else -#error POPPLER_VERSION should be defined. -#endif - epdf_num_pages = pdf_doc->doc->getCatalog()->getNumPages(); - if (page_name) { - // get page by name - GString name(page_name); - LinkDest *link = pdf_doc->doc->findDest(&name); - if (link == 0 || !link->isOk()) - pdftex_fail("PDF inclusion: invalid destination <%s>", page_name); - Ref ref = link->getPageRef(); - page_num = pdf_doc->doc->getCatalog()->findPage(ref); - if (page_num == 0) - pdftex_fail("PDF inclusion: destination is not a page <%s>", - page_name); - delete link; - } else { - // get page by number - if (page_num <= 0 || page_num > epdf_num_pages) - pdftex_fail("PDF inclusion: required page does not exist <%i>", - epdf_num_pages); - } - // get the required page - page = pdf_doc->doc->getCatalog()->getPage(page_num); - - // get the pagebox (media, crop...) to use. - pagebox = get_pagebox(page, pagebox_spec); - if (pagebox->x2 > pagebox->x1) { - epdf_orig_x = pagebox->x1; - epdf_width = pagebox->x2 - pagebox->x1; - } else { - epdf_orig_x = pagebox->x2; - epdf_width = pagebox->x1 - pagebox->x2; - } - if (pagebox->y2 > pagebox->y1) { - epdf_orig_y = pagebox->y1; - epdf_height = pagebox->y2 - pagebox->y1; - } else { - epdf_orig_y = pagebox->y2; - epdf_height = pagebox->y1 - pagebox->y2; - } - - // get page rotation - epdf_rotate = page->getRotate() % 360; - if (epdf_rotate < 0) - epdf_rotate += 360; - - // page group - if (page->getGroup() != NULL) - epdf_has_page_group = 1; // only flag that page group is present; - // the actual object number will be - // generated in pdftex.web - else - epdf_has_page_group = 0; // no page group present - - pdf_doc->xref = pdf_doc->doc->getXRef(); - return page_num; -} - -// writes the current epf_doc. -// Here the included PDF is copied, so most errors that can happen during PDF -// inclusion will arise here. - -void write_epdf(void) -{ - Page *page; - Ref *pageRef; - Dict *pageDict; - Object contents, obj1, obj2, pageObj, dictObj; - Object groupDict; - bool writeSepGroup = false; - Object info; - char *key; - char s[256]; - int i, l; - int rotate; - double scale[6] = { 0, 0, 0, 0, 0, 0 }; - bool writematrix = false; - int suppress_ptex_info = getpdfsuppressptexinfo(); - static const char *pageDictKeys[] = { - "LastModified", - "Metadata", - "PieceInfo", - "SeparationInfo", -// "Group", -// "Resources", - NULL - }; - - PdfDocument *pdf_doc = (PdfDocument *) epdf_doc; - (pdf_doc->occurences)--; - xref = pdf_doc->xref; - inObjList = pdf_doc->inObjList; - encodingList = 0; - page = pdf_doc->doc->getCatalog()->getPage(epdf_selected_page); - pageRef = pdf_doc->doc->getCatalog()->getPageRef(epdf_selected_page); - pageObj = xref->fetch(pageRef->num, pageRef->gen); - pageDict = pageObj.getDict(); - rotate = page->getRotate(); - const PDFRectangle *pagebox; - // write the Page header - pdf_puts("/Type /XObject\n"); - pdf_puts("/Subtype /Form\n"); - pdf_puts("/FormType 1\n"); - - // write additional information - if ((suppress_ptex_info & MASK_SUPPRESS_PTEX_FILENAME) == 0) { - pdf_printf("/%s.FileName (%s)\n", pdfkeyprefix, - convertStringToPDFString(pdf_doc->file_name, - strlen(pdf_doc->file_name))); - } - if ((suppress_ptex_info & MASK_SUPPRESS_PTEX_PAGENUMBER) == 0) { - pdf_printf("/%s.PageNumber %i\n", pdfkeyprefix, (int) epdf_selected_page); - } - if ((suppress_ptex_info & MASK_SUPPRESS_PTEX_INFODICT) == 0) { - info = pdf_doc->doc->getDocInfoNF().copy(); - if (info.isRef()) { - // the info dict must be indirect (PDF Ref p. 61) - pdf_printf("/%s.InfoDict ", pdfkeyprefix); - pdf_printf("%d 0 R\n", addOther(info.getRef())); - } - } - // get the pagebox (media, crop...) to use. - pagebox = get_pagebox(page, epdf_page_box); - - // handle page rotation - if (rotate != 0) { - if (rotate % 90 == 0) { - // this handles only the simple case: multiple of 90s but these - // are the only values allowed according to the reference - // (v1.3, p. 78). - // the image is rotated around its center. - // the /Rotate key is clockwise while the matrix is - // counterclockwise :-% - tex_printf(", page is rotated %d degrees", rotate); - switch (rotate) { - case 90: - scale[1] = -1; - scale[2] = 1; - scale[4] = pagebox->x1 - pagebox->y1; - scale[5] = pagebox->y1 + pagebox->x2; - writematrix = true; - break; - case 180: - scale[0] = scale[3] = -1; - scale[4] = pagebox->x1 + pagebox->x2; - scale[5] = pagebox->y1 + pagebox->y2; - writematrix = true; - break; // width and height are exchanged - case 270: - scale[1] = 1; - scale[2] = -1; - scale[4] = pagebox->x1 + pagebox->y2; - scale[5] = pagebox->y1 - pagebox->x1; - writematrix = true; - break; - } - if (writematrix) { // The matrix is only written if the image is rotated. - sprintf(s, "/Matrix [%.8f %.8f %.8f %.8f %.8f %.8f]\n", - scale[0], - scale[1], scale[2], scale[3], scale[4], scale[5]); - pdf_puts(stripzeros(s)); - } - } - } - - sprintf(s, "/BBox [%.8f %.8f %.8f %.8f]\n", - pagebox->x1, pagebox->y1, pagebox->x2, pagebox->y2); - pdf_puts(stripzeros(s)); - - // Metadata validity check (as a stream it must be indirect) - dictObj = pageDict->lookupNF("Metadata").copy(); - if (!dictObj.isNull() && !dictObj.isRef()) - pdftex_warn("PDF inclusion: /Metadata must be indirect object"); - - // copy selected items in Page dictionary except Resources & Group - for (i = 0; pageDictKeys[i] != NULL; i++) { - dictObj = pageDict->lookupNF(pageDictKeys[i]).copy(); - if (!dictObj.isNull()) { - pdf_newline(); - pdf_printf("/%s ", pageDictKeys[i]); - copyObject(&dictObj); // preserves indirection - } - } - - // handle page group - dictObj = pageDict->lookupNF("Group").copy(); - if (!dictObj.isNull()) { - if (pdfpagegroupval == 0) { - // another pdf with page group was included earlier on the - // same page; copy the Group entry as is. See manual for - // info on why this is a warning. - if (getpdfsuppresswarningpagegroup() == 0) { - pdftex_warn - ("PDF inclusion: multiple pdfs with page group included in a single page"); - } - pdf_newline(); - pdf_puts("/Group "); - copyObject(&dictObj); - } else { - // write Group dict as a separate object, since the Page dict also refers to it - dictObj = pageDict->lookup("Group"); - if (!dictObj.isDict()) - pdftex_fail("PDF inclusion: /Group dict missing"); - writeSepGroup = true; -/* -This part is only a single line - groupDict = Object(page->getGroup()); -in the original patch. In this case, however, pdftex crashes at -"delete pdf_doc->doc" in "delete_document()" for inclusion of some -kind of pdf images, for example, figure_missing.pdf in gnuplot. -A change - groupDict = Object(page->getGroup()).copy(); -does not improve the situation. -The changes below seem to work fine. -*/ -// begin modification - groupDict = pageDict->lookup("Group"); - const Dict& dic1 = page->getGroup(); - const Dict& dic2 = groupDict.getDict(); - // replace dic2 in groupDict with dic1 - l = dic2.getLength(); - for (i = 0; i < l; i++) { - groupDict.dictRemove(dic2.getKey(i)); - } - l = dic1.getLength(); - for (i = 0; i < l; i++) { - groupDict.dictAdd((const char *)copyString(dic1.getKey(i)), - dic1.getValNF(i).copy()); - } -// end modification - pdf_printf("/Group %ld 0 R\n", (long)pdfpagegroupval); - } - } - - // write the Resources dictionary - if (page->getResourceDict() == NULL) { - // Resources can be missing (files without them have been spotted - // in the wild); in which case the /Resouces of the /Page will be used. - // "This practice is not recommended". - pdftex_warn - ("PDF inclusion: /Resources missing. 'This practice is not recommended' (PDF Ref)"); - } else { - Object *obj1 = page->getResourceDictObject(); - if (!obj1->isDict()) - pdftex_fail("PDF inclusion: invalid resources dict type <%s>", - obj1->getTypeName()); - pdf_newline(); - pdf_puts("/Resources <<\n"); - for (i = 0, l = obj1->dictGetLength(); i < l; ++i) { - obj2 = obj1->dictGetVal(i); - key = (char *)obj1->dictGetKey(i); - if (strcmp("Font", key) == 0) - copyFontResources(&obj2); - else if (strcmp("ProcSet", key) == 0) - copyProcSet(&obj2); - else - copyOtherResources(&obj2, (char *)key); - } - pdf_puts(">>\n"); - } - - // write the page contents - contents = page->getContents(); - if (contents.isStream()) { - - // Variant A: get stream and recompress under control - // of \pdfcompresslevel - // - // pdfbeginstream(); - // copyStream(contents->getStream()); - // pdfendstream(); - - // Variant B: copy stream without recompressing - // - obj1 = contents.streamGetDict()->lookup("F"); - if (!obj1.isNull()) { - pdftex_fail("PDF inclusion: Unsupported external stream"); - } - obj1 = contents.streamGetDict()->lookup("Length"); - assert(!obj1.isNull()); - pdf_puts("/Length "); - copyObject(&obj1); - pdf_puts("\n"); - obj1 = contents.streamGetDict()->lookup("Filter"); - if (!obj1.isNull()) { - pdf_puts("/Filter "); - copyObject(&obj1); - pdf_puts("\n"); - obj1 = contents.streamGetDict()->lookup("DecodeParms"); - if (!obj1.isNull()) { - pdf_puts("/DecodeParms "); - copyObject(&obj1); - pdf_puts("\n"); - } - } - pdf_puts(">>\nstream\n"); - copyStream(contents.getStream()->getUndecodedStream()); - pdfendstream(); - } else if (contents.isArray()) { - pdfbeginstream(); - for (i = 0, l = contents.arrayGetLength(); i < l; ++i) { - Object contentsobj = contents.arrayGet(i); - copyStream(contentsobj.getStream()); - if (i < l - 1) - pdf_newline(); // add a newline after each stream except the last - } - pdfendstream(); - } else { // the contents are optional, but we need to include an empty stream - pdfbeginstream(); - pdfendstream(); - } - - // write out all indirect objects - writeRefs(); - - // write out all used encodings (and delete list) - writeEncodings(); - - // write the Group dict if needed - if (writeSepGroup) { - pdfbeginobj(pdfpagegroupval, 2); - copyObject(&groupDict); - pdf_puts("\n"); - pdfendobj(); - pdfpagegroupval = 0; // only the 1st included pdf on a page gets its - // Group included in the Page dict - } - - // save object list, xref - pdf_doc->inObjList = inObjList; - pdf_doc->xref = xref; -} - -// Called when an image has been written and it's resources in image_tab are -// freed and it's not referenced anymore. - -void epdf_delete() -{ - PdfDocument *pdf_doc = (PdfDocument *) epdf_doc; - xref = pdf_doc->xref; - if (pdf_doc->occurences < 0) { - delete_document(pdf_doc); - } -} - -// Called when PDF embedding system is finalized. -// Now deallocate all remaining PdfDocuments. - -void epdf_check_mem() -{ - if (isInit) { - PdfDocument *p, *n; - for (p = pdfDocuments; p; p = n) { - n = p->next; - delete_document(p); - } - // see above for globalParams - delete globalParams; - } -} diff --git a/Build/source/texk/web2c/pdftexdir/pdftoepdf-poppler0.83.0.cc b/Build/source/texk/web2c/pdftexdir/pdftoepdf-poppler0.83.0.cc deleted file mode 100644 index 20ee8a66c26..00000000000 --- a/Build/source/texk/web2c/pdftexdir/pdftoepdf-poppler0.83.0.cc +++ /dev/null @@ -1,1111 +0,0 @@ -/* -Copyright 1996-2017 Han The Thanh, <thanh@pdftex.org> - -This file is part of pdfTeX. - -pdfTeX is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -pdfTeX is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -/* -This is based on the patch texlive-poppler-0.59.patch <2017-09-19> at -https://git.archlinux.org/svntogit/packages.git/plain/texlive-bin/trunk -by Arch Linux. A little modifications are made to avoid a crash for -some kind of pdf images, such as figure_missing.pdf in gnuplot. -The poppler should be 0.83.0 up to 0.85.0. -POPPLER_VERSION should be defined. -*/ - -/* Do this early in order to avoid a conflict between - MINGW32 <rpcndr.h> defining 'boolean' as 'unsigned char' and - <kpathsea/types.h> defining Pascal's boolean as 'int'. -*/ -#include <w2c/config.h> -#include <kpathsea/lib.h> - -#include <stdlib.h> -#include <math.h> -#include <stddef.h> -#include <stdio.h> -#include <string.h> -#include <ctype.h> - -#ifdef POPPLER_VERSION -#include <dirent.h> -#include <poppler-config.h> -#include <goo/GooString.h> -#include <goo/gmem.h> -#include <goo/gfile.h> -#define GString GooString -#else -#error POPPLER_VERSION should be defined. -#endif -#include <assert.h> - -#include "Object.h" -#include "Stream.h" -#include "Array.h" -#include "Dict.h" -#include "XRef.h" -#include "Catalog.h" -#include "Link.h" -#include "Page.h" -#include "GfxFont.h" -#include "PDFDoc.h" -#include "GlobalParams.h" -#include "Error.h" - -// This file is mostly C and not very much C++; it's just used to interface -// the functions of xpdf, which are written in C++. - -extern "C" { -#include <pdftexdir/ptexmac.h> -#include <pdftexdir/pdftex-common.h> - -// These functions from pdftex.web gets declared in pdftexcoerce.h in the -// usual web2c way, but we cannot include that file here because C++ -// does not allow it. -extern int getpdfsuppresswarningpagegroup(void); -extern integer getpdfsuppressptexinfo(void); -extern integer zround(double); -} - -// The prefix "PTEX" for the PDF keys is special to pdfTeX; -// this has been registered with Adobe by Hans Hagen. - -#define pdfkeyprefix "PTEX" - -#define MASK_SUPPRESS_PTEX_FULLBANNER 0x01 -#define MASK_SUPPRESS_PTEX_FILENAME 0x02 -#define MASK_SUPPRESS_PTEX_PAGENUMBER 0x04 -#define MASK_SUPPRESS_PTEX_INFODICT 0x08 - -// When copying the Resources of the selected page, all objects are copied -// recusively top-down. Indirect objects however are not fetched during -// copying, but get a new object number from pdfTeX and then will be -// appended into a linked list. Duplicates are checked and removed from the -// list of indirect objects during appending. - -enum InObjType { - objFont, - objFontDesc, - objOther -}; - -struct InObj { - Ref ref; // ref in original PDF - InObjType type; // object type - InObj *next; // next entry in list of indirect objects - int num; // new object number in output PDF - fd_entry *fd; // pointer to /FontDescriptor object structure - int enc_objnum; // Encoding for objFont - int written; // has it been written to output PDF? -}; - -struct UsedEncoding { - int enc_objnum; - GfxFont *font; - UsedEncoding *next; -}; - -static InObj *inObjList; -static UsedEncoding *encodingList; -static bool isInit = false; - -// -------------------------------------------------------------------- -// Maintain list of open embedded PDF files -// -------------------------------------------------------------------- - -struct PdfDocument { - char *file_name; - PDFDoc *doc; - XRef *xref; - InObj *inObjList; - int occurences; // number of references to the document; the doc can be - // deleted when this is negative - PdfDocument *next; -}; - -static PdfDocument *pdfDocuments = 0; - -static XRef *xref = 0; - -// Returns pointer to PdfDocument record for PDF file. -// Creates a new record if it doesn't exist yet. -// xref is made current for the document. - -static PdfDocument *find_add_document(char *file_name) -{ - PdfDocument *p = pdfDocuments; - while (p && strcmp(p->file_name, file_name) != 0) - p = p->next; - if (p) { - xref = p->xref; - (p->occurences)++; - return p; - } - p = new PdfDocument; - p->file_name = xstrdup(file_name); - p->xref = xref = 0; - p->occurences = 0; - GString *docName = new GString(p->file_name); - p->doc = new PDFDoc(docName); // takes ownership of docName - if (!p->doc->isOk() || !p->doc->okToPrint()) { - pdftex_fail("xpdf: reading PDF image failed"); - } - p->inObjList = 0; - p->next = pdfDocuments; - pdfDocuments = p; - return p; -} - -// Deallocate a PdfDocument with all its resources - -static void delete_document(PdfDocument * pdf_doc) -{ - PdfDocument **p = &pdfDocuments; - while (*p && *p != pdf_doc) - p = &((*p)->next); - // should not happen: - if (!*p) - return; - // unlink from list - *p = pdf_doc->next; - // free pdf_doc's resources - InObj *r, *n; - for (r = pdf_doc->inObjList; r != 0; r = n) { - n = r->next; - delete r; - } - xref = pdf_doc->xref; - delete pdf_doc->doc; - xfree(pdf_doc->file_name); - delete pdf_doc; -} - -// -------------------------------------------------------------------- - -static int addEncoding(GfxFont * gfont) -{ - UsedEncoding *n; - n = new UsedEncoding; - n->next = encodingList; - encodingList = n; - n->font = gfont; - n->enc_objnum = pdfnewobjnum(); - return n->enc_objnum; -} - -#define addFont(ref, fd, enc_objnum) \ - addInObj(objFont, ref, fd, enc_objnum) - -// addFontDesc is only used to avoid writing the original FontDescriptor -// from the PDF file. - -#define addFontDesc(ref, fd) \ - addInObj(objFontDesc, ref, fd, 0) - -#define addOther(ref) \ - addInObj(objOther, ref, 0, 0) - -static int addInObj(InObjType type, Ref ref, fd_entry * fd, int e) -{ - InObj *p, *q, *n = new InObj; - if (ref.num == 0) - pdftex_fail("PDF inclusion: invalid reference"); - n->ref = ref; - n->type = type; - n->next = 0; - n->fd = fd; - n->enc_objnum = e; - n->written = 0; - if (inObjList == 0) - inObjList = n; - else { - for (p = inObjList; p != 0; p = p->next) { - if (p->ref.num == ref.num && p->ref.gen == ref.gen) { - delete n; - return p->num; - } - q = p; - } - // it is important to add new objects at the end of the list, - // because new objects are being added while the list is being - // written out. - q->next = n; - } - if (type == objFontDesc) - n->num = get_fd_objnum(fd); - else - n->num = pdfnewobjnum(); - return n->num; -} - -#if 0 /* unusewd */ -static int getNewObjectNumber(Ref ref) -{ - InObj *p; - if (inObjList == 0) { - pdftex_fail("No objects copied yet"); - } else { - for (p = inObjList; p != 0; p = p->next) { - if (p->ref.num == ref.num && p->ref.gen == ref.gen) { - return p->num; - } - } - pdftex_fail("Object not yet copied: %i %i", ref.num, ref.gen); - } -#ifdef _MSC_VER - /* Never reached, but without __attribute__((noreturn)) for pdftex_fail() - MSVC 5.0 requires an int return value. */ - return -60000; -#endif -} -#endif - -static void copyObject(Object *); - -static void copyName(char *s) -{ - pdf_puts("/"); - for (; *s != 0; s++) { - if (isdigit(*s) || isupper(*s) || islower(*s) || *s == '_' || - *s == '.' || *s == '-' || *s == '+') - pdfout(*s); - else - pdf_printf("#%.2X", *s & 0xFF); - } -} - -static void copyDictEntry(Object * obj, int i) -{ - Object obj1; - copyName((char *)obj->dictGetKey(i)); - pdf_puts(" "); - obj1 = obj->dictGetValNF(i).copy(); - copyObject(&obj1); - pdf_puts("\n"); -} - -static void copyDict(Object * obj) -{ - int i, l; - if (!obj->isDict()) - pdftex_fail("PDF inclusion: invalid dict type <%s>", - obj->getTypeName()); - for (i = 0, l = obj->dictGetLength(); i < l; ++i) - copyDictEntry(obj, i); -} - -static void copyFontDict(Object * obj, InObj * r) -{ - int i, l; - char *key; - if (!obj->isDict()) - pdftex_fail("PDF inclusion: invalid dict type <%s>", - obj->getTypeName()); - pdf_puts("<<\n"); - assert(r->type == objFont); // FontDescriptor is in fd_tree - for (i = 0, l = obj->dictGetLength(); i < l; ++i) { - key = (char *)obj->dictGetKey(i); - if (strncmp("FontDescriptor", key, strlen("FontDescriptor")) == 0 - || strncmp("BaseFont", key, strlen("BaseFont")) == 0 - || strncmp("Encoding", key, strlen("Encoding")) == 0) - continue; // skip original values - copyDictEntry(obj, i); - } - // write new FontDescriptor, BaseFont, and Encoding - pdf_printf("/FontDescriptor %d 0 R\n", get_fd_objnum(r->fd)); - pdf_printf("/BaseFont %d 0 R\n", get_fn_objnum(r->fd)); - pdf_printf("/Encoding %d 0 R\n", r->enc_objnum); - pdf_puts(">>"); -} - -static void copyStream(Stream * str) -{ - int c, c2 = 0; - str->reset(); - while ((c = str->getChar()) != EOF) { - pdfout(c); - c2 = c; - } - pdflastbyte = c2; -} - -static void copyProcSet(Object * obj) -{ - int i, l; - Object procset; - if (!obj->isArray()) - pdftex_fail("PDF inclusion: invalid ProcSet array type <%s>", - obj->getTypeName()); - pdf_puts("/ProcSet [ "); - for (i = 0, l = obj->arrayGetLength(); i < l; ++i) { - procset = obj->arrayGetNF(i).copy(); - if (!procset.isName()) - pdftex_fail("PDF inclusion: invalid ProcSet entry type <%s>", - procset.getTypeName()); - copyName((char *)procset.getName()); - pdf_puts(" "); - } - pdf_puts("]\n"); -} - -#define REPLACE_TYPE1C true - -static bool embeddableFont(Object * fontdesc) -{ - Object fontfile, ffsubtype; - - if (!fontdesc->isDict()) - return false; - fontfile = fontdesc->dictLookup("FontFile"); - if (fontfile.isStream()) - return true; - if (REPLACE_TYPE1C) { - fontfile = fontdesc->dictLookup("FontFile3"); - if (!fontfile.isStream()) - return false; - ffsubtype = fontfile.streamGetDict()->lookup("Subtype"); - return ffsubtype.isName() && !strcmp(ffsubtype.getName(), "Type1C"); - } - return false; -} - -static void copyFont(char *tag, Object * fontRef) -{ - Object fontdict, subtype, basefont, fontdescRef, fontdesc, charset, - stemV; - GfxFont *gfont; - fd_entry *fd; - fm_entry *fontmap; - // Check whether the font has already been embedded before analysing it. - InObj *p; - Ref ref = fontRef->getRef(); - for (p = inObjList; p; p = p->next) { - if (p->ref.num == ref.num && p->ref.gen == ref.gen) { - copyName(tag); - pdf_printf(" %d 0 R ", p->num); - return; - } - } - // Only handle included Type1 (and Type1C) fonts; anything else will be copied. - // Type1C fonts are replaced by Type1 fonts, if REPLACE_TYPE1C is true. - fontdict = fontRef->fetch(xref); - fontdesc = Object(objNull); - if (fontdict.isDict()) { - subtype = fontdict.dictLookup("Subtype"); - basefont = fontdict.dictLookup("BaseFont"); - fontdescRef = fontdict.dictLookupNF("FontDescriptor").copy(); - if (fontdescRef.isRef()) { - fontdesc = fontdescRef.fetch(xref); - } - } - if (!fixedinclusioncopyfont && fontdict.isDict() - && subtype.isName() - && !strcmp(subtype.getName(), "Type1") - && basefont.isName() - && fontdescRef.isRef() - && fontdesc.isDict() - && embeddableFont(&fontdesc) - && (fontmap = lookup_fontmap((char *)basefont.getName())) != NULL) { - // round /StemV value, since the PDF input is a float - // (see Font Descriptors in PDF reference), but we only store an - // integer, since we don't want to change the struct. - stemV = fontdesc.dictLookup("StemV"); - fd = epdf_create_fontdescriptor(fontmap, zround(stemV.getNum())); - charset = fontdesc.dictLookup("CharSet"); - if (!charset.isNull() && - charset.isString() && is_subsetable(fontmap)) - epdf_mark_glyphs(fd, (char *)charset.getString()->c_str()); - else - embed_whole_font(fd); - addFontDesc(fontdescRef.getRef(), fd); - copyName(tag); - gfont = GfxFont::makeFont(xref, tag, fontRef->getRef(), - fontdict.getDict()); - pdf_printf(" %d 0 R ", addFont(fontRef->getRef(), fd, - addEncoding(gfont))); - } else { - copyName(tag); - pdf_puts(" "); - copyObject(fontRef); - } -} - -static void copyFontResources(Object * obj) -{ - Object fontRef; - int i, l; - if (!obj->isDict()) - pdftex_fail("PDF inclusion: invalid font resources dict type <%s>", - obj->getTypeName()); - pdf_puts("/Font << "); - for (i = 0, l = obj->dictGetLength(); i < l; ++i) { - fontRef = obj->dictGetValNF(i).copy(); - if (fontRef.isRef()) - copyFont((char *)obj->dictGetKey(i), &fontRef); - else if (fontRef.isDict()) { // some programs generate pdf with embedded font object - copyName((char *)obj->dictGetKey(i)); - pdf_puts(" "); - copyObject(&fontRef); - } - else - pdftex_fail("PDF inclusion: invalid font in reference type <%s>", - fontRef.getTypeName()); - } - pdf_puts(">>\n"); -} - -static void copyOtherResources(Object * obj, char *key) -{ - // copies all other resources (write_epdf handles Fonts and ProcSets), - - // if Subtype is present, it must be a name - if (strcmp("Subtype", key) == 0) { - if (!obj->isName()) { - pdftex_warn("PDF inclusion: Subtype in Resources dict is not a name" - " (key '%s', type <%s>); ignored.", - key, obj->getTypeName()); - return; - } - } else if (!obj->isDict()) { - //FIXME: Write the message only to the log file - pdftex_warn("PDF inclusion: invalid other resource which is no dict" - " (key '%s', type <%s>); ignored.", - key, obj->getTypeName()); - return; - } - copyName(key); - pdf_puts(" "); - copyObject(obj); -} - -// Function onverts double to string; very small and very large numbers -// are NOT converted to scientific notation. -// n must be a number or real conforming to the implementation limits -// of PDF as specified in appendix C.1 of the PDF Ref. -// These are: -// maximum value of ints is +2^32 -// maximum value of reals is +2^15 -// smalles values of reals is 1/(2^16) - -static char *convertNumToPDF(double n) -{ - static const int precision = 6; - static const int fact = (int) 1E6; // must be 10^precision - static const double epsilon = 0.5E-6; // 2epsilon must be 10^-precision - static char buf[64]; - // handle very small values: return 0 - if (fabs(n) < epsilon) { - buf[0] = '0'; - buf[1] = '\0'; - } else { - char ints[64]; - int bindex = 0, sindex = 0; - int ival, fval; - // handle the sign part if n is negative - if (n < 0) { - buf[bindex++] = '-'; - n = -n; - } - n += epsilon; // for rounding - // handle the integer part, simply with sprintf - ival = (int) floor(n); - n -= ival; - sprintf(ints, "%d", ival); - while (ints[sindex] != 0) - buf[bindex++] = ints[sindex++]; - // handle the fractional part up to 'precision' digits - fval = (int) floor(n * fact); - if (fval) { - // set a dot - buf[bindex++] = '.'; - sindex = bindex + precision; - buf[sindex--] = '\0'; - // fill up trailing zeros with the string terminator NULL - while (((fval % 10) == 0) && (sindex >= bindex)) { - buf[sindex--] = '\0'; - fval /= 10; - } - // fill up the fractional part back to front - while (sindex >= bindex) { - buf[sindex--] = (fval % 10) + '0'; - fval /= 10; - } - } else - buf[bindex++] = 0; - } - return (char *) buf; -} - -static void copyObject(Object * obj) -{ - Object obj1; - int i, l, c; - Ref ref; - char *p; - GString *s; - if (obj->isBool()) { - pdf_printf("%s", obj->getBool()? "true" : "false"); - } else if (obj->isInt()) { - pdf_printf("%i", obj->getInt()); - } else if (obj->isReal()) { - pdf_printf("%s", convertNumToPDF(obj->getReal())); - } else if (obj->isNum()) { - pdf_printf("%s", convertNumToPDF(obj->getNum())); - } else if (obj->isString()) { - s = (GooString *)obj->getString(); - p = (char *)s->c_str(); - l = s->getLength(); - if (strlen(p) == (unsigned int) l) { - pdf_puts("("); - for (; *p != 0; p++) { - c = (unsigned char) *p; - if (c == '(' || c == ')' || c == '\\') - pdf_printf("\\%c", c); - else if (c < 0x20 || c > 0x7F) - pdf_printf("\\%03o", c); - else - pdfout(c); - } - pdf_puts(")"); - } else { - pdf_puts("<"); - for (i = 0; i < l; i++) { - c = s->getChar(i) & 0xFF; - pdf_printf("%.2x", c); - } - pdf_puts(">"); - } - } else if (obj->isName()) { - copyName((char *)obj->getName()); - } else if (obj->isNull()) { - pdf_puts("null"); - } else if (obj->isArray()) { - pdf_puts("["); - for (i = 0, l = obj->arrayGetLength(); i < l; ++i) { - obj1 = obj->arrayGetNF(i).copy(); - if (!obj1.isName()) - pdf_puts(" "); - copyObject(&obj1); - } - pdf_puts("]"); - } else if (obj->isDict()) { - pdf_puts("<<\n"); - copyDict(obj); - pdf_puts(">>"); - } else if (obj->isStream()) { - pdf_puts("<<\n"); - copyDict(obj->getStream()->getDictObject()); - pdf_puts(">>\n"); - pdf_puts("stream\n"); - copyStream(obj->getStream()->getUndecodedStream()); - pdf_puts("\nendstream"); - } else if (obj->isRef()) { - ref = obj->getRef(); - if (ref.num == 0) { - pdftex_fail - ("PDF inclusion: reference to invalid object" - " (is the included pdf broken?)"); - } else - pdf_printf("%d 0 R", addOther(ref)); - } else { - pdftex_fail("PDF inclusion: type <%s> cannot be copied", - obj->getTypeName()); - } -} - -static void writeRefs() -{ - InObj *r; - for (r = inObjList; r != 0; r = r->next) { - if (!r->written) { - r->written = 1; - Object obj1 = xref->fetch(r->ref.num, r->ref.gen); - if (r->type == objFont) { - assert(!obj1.isStream()); - pdfbeginobj(r->num, 2); // \pdfobjcompresslevel = 2 is for this - copyFontDict(&obj1, r); - pdf_puts("\n"); - pdfendobj(); - } else if (r->type != objFontDesc) { // /FontDescriptor is written via write_fontdescriptor() - if (obj1.isStream()) - pdfbeginobj(r->num, 0); - else - pdfbeginobj(r->num, 2); // \pdfobjcompresslevel = 2 is for this - copyObject(&obj1); - pdf_puts("\n"); - pdfendobj(); - } - } - } -} - -static void writeEncodings() -{ - UsedEncoding *r, *n; - char *glyphNames[256], *s; - int i; - for (r = encodingList; r != 0; r = r->next) { - for (i = 0; i < 256; i++) { - if (r->font->isCIDFont()) { - pdftex_fail - ("PDF inclusion: CID fonts are not supported" - " (try to disable font replacement to fix this)"); - } - if ((s = (char *)((Gfx8BitFont *) r->font)->getCharName(i)) != 0) - glyphNames[i] = s; - else - glyphNames[i] = notdef; - } - epdf_write_enc(glyphNames, r->enc_objnum); - } - for (r = encodingList; r != 0; r = n) { - n = r->next; -#ifdef POPPLER_VERSION - r->font->decRefCnt(); -#else -#error POPPLER_VERSION should be defined. -#endif - delete r; - } -} - -// get the pagebox according to the pagebox_spec -static const PDFRectangle *get_pagebox(Page * page, int pagebox_spec) -{ - if (pagebox_spec == pdfboxspecmedia) - return page->getMediaBox(); - else if (pagebox_spec == pdfboxspeccrop) - return page->getCropBox(); - else if (pagebox_spec == pdfboxspecbleed) - return page->getBleedBox(); - else if (pagebox_spec == pdfboxspectrim) - return page->getTrimBox(); - else if (pagebox_spec == pdfboxspecart) - return page->getArtBox(); - else - pdftex_fail("PDF inclusion: unknown value of pagebox spec (%i)", - (int) pagebox_spec); - return page->getMediaBox(); // to make the compiler happy -} - - -// Reads various information about the PDF and sets it up for later inclusion. -// This will fail if the PDF version of the PDF is higher than -// minor_pdf_version_wanted or page_name is given and can not be found. -// It makes no sense to give page_name _and_ page_num. -// Returns the page number. - -int -read_pdf_info(char *image_name, char *page_name, int page_num, - int pagebox_spec, int major_pdf_version_wanted, int minor_pdf_version_wanted, - int pdf_inclusion_errorlevel) -{ - PdfDocument *pdf_doc; - Page *page; - const PDFRectangle *pagebox; -#ifdef POPPLER_VERSION - int pdf_major_version_found, pdf_minor_version_found; -#else -#error POPPLER_VERSION should be defined. -#endif - // initialize - if (!isInit) { - globalParams = std::make_unique<GlobalParams>(); - globalParams->setErrQuiet(false); - isInit = true; - } - // open PDF file - pdf_doc = find_add_document(image_name); - epdf_doc = (void *) pdf_doc; - - // check PDF version - // this works only for PDF 1.x -- but since any versions of PDF newer - // than 1.x will not be backwards compatible to PDF 1.x, pdfTeX will - // then have to changed drastically anyway. -#ifdef POPPLER_VERSION - pdf_major_version_found = pdf_doc->doc->getPDFMajorVersion(); - pdf_minor_version_found = pdf_doc->doc->getPDFMinorVersion(); - if ((pdf_major_version_found > major_pdf_version_wanted) - || (pdf_minor_version_found > minor_pdf_version_wanted)) { - const char *msg = - "PDF inclusion: found PDF version <%d.%d>, but at most version <%d.%d> allowed"; - if (pdf_inclusion_errorlevel > 0) { - pdftex_fail(msg, pdf_major_version_found, pdf_minor_version_found, major_pdf_version_wanted, minor_pdf_version_wanted); - } else if (pdf_inclusion_errorlevel < 0) { - ; /* do nothing */ - } else { /* = 0, give warning */ - pdftex_warn(msg, pdf_major_version_found, pdf_minor_version_found, major_pdf_version_wanted, minor_pdf_version_wanted); - } - } -#else -#error POPPLER_VERSION should be defined. -#endif - epdf_num_pages = pdf_doc->doc->getCatalog()->getNumPages(); - if (page_name) { - // get page by name - GString name(page_name); - LinkDest *link = pdf_doc->doc->findDest(&name); - if (link == 0 || !link->isOk()) - pdftex_fail("PDF inclusion: invalid destination <%s>", page_name); - Ref ref = link->getPageRef(); - page_num = pdf_doc->doc->getCatalog()->findPage(ref); - if (page_num == 0) - pdftex_fail("PDF inclusion: destination is not a page <%s>", - page_name); - delete link; - } else { - // get page by number - if (page_num <= 0 || page_num > epdf_num_pages) - pdftex_fail("PDF inclusion: required page does not exist <%i>", - epdf_num_pages); - } - // get the required page - page = pdf_doc->doc->getCatalog()->getPage(page_num); - - // get the pagebox (media, crop...) to use. - pagebox = get_pagebox(page, pagebox_spec); - if (pagebox->x2 > pagebox->x1) { - epdf_orig_x = pagebox->x1; - epdf_width = pagebox->x2 - pagebox->x1; - } else { - epdf_orig_x = pagebox->x2; - epdf_width = pagebox->x1 - pagebox->x2; - } - if (pagebox->y2 > pagebox->y1) { - epdf_orig_y = pagebox->y1; - epdf_height = pagebox->y2 - pagebox->y1; - } else { - epdf_orig_y = pagebox->y2; - epdf_height = pagebox->y1 - pagebox->y2; - } - - // get page rotation - epdf_rotate = page->getRotate() % 360; - if (epdf_rotate < 0) - epdf_rotate += 360; - - // page group - if (page->getGroup() != NULL) - epdf_has_page_group = 1; // only flag that page group is present; - // the actual object number will be - // generated in pdftex.web - else - epdf_has_page_group = 0; // no page group present - - pdf_doc->xref = pdf_doc->doc->getXRef(); - return page_num; -} - -// writes the current epf_doc. -// Here the included PDF is copied, so most errors that can happen during PDF -// inclusion will arise here. - -void write_epdf(void) -{ - Page *page; - Ref *pageRef; - Dict *pageDict; - Object contents, obj1, obj2, pageObj, dictObj; - Object groupDict; - bool writeSepGroup = false; - Object info; - char *key; - char s[256]; - int i, l; - int rotate; - double scale[6] = { 0, 0, 0, 0, 0, 0 }; - bool writematrix = false; - int suppress_ptex_info = getpdfsuppressptexinfo(); - static const char *pageDictKeys[] = { - "LastModified", - "Metadata", - "PieceInfo", - "SeparationInfo", -// "Group", -// "Resources", - NULL - }; - - PdfDocument *pdf_doc = (PdfDocument *) epdf_doc; - (pdf_doc->occurences)--; - xref = pdf_doc->xref; - inObjList = pdf_doc->inObjList; - encodingList = 0; - page = pdf_doc->doc->getCatalog()->getPage(epdf_selected_page); - pageRef = pdf_doc->doc->getCatalog()->getPageRef(epdf_selected_page); - pageObj = xref->fetch(pageRef->num, pageRef->gen); - pageDict = pageObj.getDict(); - rotate = page->getRotate(); - const PDFRectangle *pagebox; - // write the Page header - pdf_puts("/Type /XObject\n"); - pdf_puts("/Subtype /Form\n"); - pdf_puts("/FormType 1\n"); - - // write additional information - if ((suppress_ptex_info & MASK_SUPPRESS_PTEX_FILENAME) == 0) { - pdf_printf("/%s.FileName (%s)\n", pdfkeyprefix, - convertStringToPDFString(pdf_doc->file_name, - strlen(pdf_doc->file_name))); - } - if ((suppress_ptex_info & MASK_SUPPRESS_PTEX_PAGENUMBER) == 0) { - pdf_printf("/%s.PageNumber %i\n", pdfkeyprefix, (int) epdf_selected_page); - } - if ((suppress_ptex_info & MASK_SUPPRESS_PTEX_INFODICT) == 0) { - info = pdf_doc->doc->getDocInfoNF().copy(); - if (info.isRef()) { - // the info dict must be indirect (PDF Ref p. 61) - pdf_printf("/%s.InfoDict ", pdfkeyprefix); - pdf_printf("%d 0 R\n", addOther(info.getRef())); - } - } - // get the pagebox (media, crop...) to use. - pagebox = get_pagebox(page, epdf_page_box); - - // handle page rotation - if (rotate != 0) { - if (rotate % 90 == 0) { - // this handles only the simple case: multiple of 90s but these - // are the only values allowed according to the reference - // (v1.3, p. 78). - // the image is rotated around its center. - // the /Rotate key is clockwise while the matrix is - // counterclockwise :-% - tex_printf(", page is rotated %d degrees", rotate); - switch (rotate) { - case 90: - scale[1] = -1; - scale[2] = 1; - scale[4] = pagebox->x1 - pagebox->y1; - scale[5] = pagebox->y1 + pagebox->x2; - writematrix = true; - break; - case 180: - scale[0] = scale[3] = -1; - scale[4] = pagebox->x1 + pagebox->x2; - scale[5] = pagebox->y1 + pagebox->y2; - writematrix = true; - break; // width and height are exchanged - case 270: - scale[1] = 1; - scale[2] = -1; - scale[4] = pagebox->x1 + pagebox->y2; - scale[5] = pagebox->y1 - pagebox->x1; - writematrix = true; - break; - } - if (writematrix) { // The matrix is only written if the image is rotated. - sprintf(s, "/Matrix [%.8f %.8f %.8f %.8f %.8f %.8f]\n", - scale[0], - scale[1], scale[2], scale[3], scale[4], scale[5]); - pdf_puts(stripzeros(s)); - } - } - } - - sprintf(s, "/BBox [%.8f %.8f %.8f %.8f]\n", - pagebox->x1, pagebox->y1, pagebox->x2, pagebox->y2); - pdf_puts(stripzeros(s)); - - // Metadata validity check (as a stream it must be indirect) - dictObj = pageDict->lookupNF("Metadata").copy(); - if (!dictObj.isNull() && !dictObj.isRef()) - pdftex_warn("PDF inclusion: /Metadata must be indirect object"); - - // copy selected items in Page dictionary except Resources & Group - for (i = 0; pageDictKeys[i] != NULL; i++) { - dictObj = pageDict->lookupNF(pageDictKeys[i]).copy(); - if (!dictObj.isNull()) { - pdf_newline(); - pdf_printf("/%s ", pageDictKeys[i]); - copyObject(&dictObj); // preserves indirection - } - } - - // handle page group - dictObj = pageDict->lookupNF("Group").copy(); - if (!dictObj.isNull()) { - if (pdfpagegroupval == 0) { - // another pdf with page group was included earlier on the - // same page; copy the Group entry as is. See manual for - // info on why this is a warning. - if (getpdfsuppresswarningpagegroup() == 0) { - pdftex_warn - ("PDF inclusion: multiple pdfs with page group included in a single page"); - } - pdf_newline(); - pdf_puts("/Group "); - copyObject(&dictObj); - } else { - // write Group dict as a separate object, since the Page dict also refers to it - dictObj = pageDict->lookup("Group"); - if (!dictObj.isDict()) - pdftex_fail("PDF inclusion: /Group dict missing"); - writeSepGroup = true; -/* -This part is only a single line - groupDict = Object(page->getGroup()); -in the original patch. In this case, however, pdftex crashes at -"delete pdf_doc->doc" in "delete_document()" for inclusion of some -kind of pdf images, for example, figure_missing.pdf in gnuplot. -A change - groupDict = Object(page->getGroup()).copy(); -does not improve the situation. -The changes below seem to work fine. -*/ -// begin modification - groupDict = pageDict->lookup("Group"); - const Dict& dic1 = page->getGroup(); - const Dict& dic2 = groupDict.getDict(); - // replace dic2 in groupDict with dic1 - l = dic2.getLength(); - for (i = 0; i < l; i++) { - groupDict.dictRemove(dic2.getKey(i)); - } - l = dic1.getLength(); - for (i = 0; i < l; i++) { - groupDict.dictAdd((const char *)copyString(dic1.getKey(i)), - dic1.getValNF(i).copy()); - } -// end modification - pdf_printf("/Group %ld 0 R\n", (long)pdfpagegroupval); - } - } - - // write the Resources dictionary - if (page->getResourceDict() == NULL) { - // Resources can be missing (files without them have been spotted - // in the wild); in which case the /Resouces of the /Page will be used. - // "This practice is not recommended". - pdftex_warn - ("PDF inclusion: /Resources missing. 'This practice is not recommended' (PDF Ref)"); - } else { - Object *obj1 = page->getResourceDictObject(); - if (!obj1->isDict()) - pdftex_fail("PDF inclusion: invalid resources dict type <%s>", - obj1->getTypeName()); - pdf_newline(); - pdf_puts("/Resources <<\n"); - for (i = 0, l = obj1->dictGetLength(); i < l; ++i) { - obj2 = obj1->dictGetVal(i); - key = (char *)obj1->dictGetKey(i); - if (strcmp("Font", key) == 0) - copyFontResources(&obj2); - else if (strcmp("ProcSet", key) == 0) - copyProcSet(&obj2); - else - copyOtherResources(&obj2, (char *)key); - } - pdf_puts(">>\n"); - } - - // write the page contents - contents = page->getContents(); - if (contents.isStream()) { - - // Variant A: get stream and recompress under control - // of \pdfcompresslevel - // - // pdfbeginstream(); - // copyStream(contents->getStream()); - // pdfendstream(); - - // Variant B: copy stream without recompressing - // - obj1 = contents.streamGetDict()->lookup("F"); - if (!obj1.isNull()) { - pdftex_fail("PDF inclusion: Unsupported external stream"); - } - obj1 = contents.streamGetDict()->lookup("Length"); - assert(!obj1.isNull()); - pdf_puts("/Length "); - copyObject(&obj1); - pdf_puts("\n"); - obj1 = contents.streamGetDict()->lookup("Filter"); - if (!obj1.isNull()) { - pdf_puts("/Filter "); - copyObject(&obj1); - pdf_puts("\n"); - obj1 = contents.streamGetDict()->lookup("DecodeParms"); - if (!obj1.isNull()) { - pdf_puts("/DecodeParms "); - copyObject(&obj1); - pdf_puts("\n"); - } - } - pdf_puts(">>\nstream\n"); - copyStream(contents.getStream()->getUndecodedStream()); - pdfendstream(); - } else if (contents.isArray()) { - pdfbeginstream(); - for (i = 0, l = contents.arrayGetLength(); i < l; ++i) { - Object contentsobj = contents.arrayGet(i); - copyStream(contentsobj.getStream()); - if (i < l - 1) - pdf_newline(); // add a newline after each stream except the last - } - pdfendstream(); - } else { // the contents are optional, but we need to include an empty stream - pdfbeginstream(); - pdfendstream(); - } - - // write out all indirect objects - writeRefs(); - - // write out all used encodings (and delete list) - writeEncodings(); - - // write the Group dict if needed - if (writeSepGroup) { - pdfbeginobj(pdfpagegroupval, 2); - copyObject(&groupDict); - pdf_puts("\n"); - pdfendobj(); - pdfpagegroupval = 0; // only the 1st included pdf on a page gets its - // Group included in the Page dict - } - - // save object list, xref - pdf_doc->inObjList = inObjList; - pdf_doc->xref = xref; -} - -// Called when an image has been written and it's resources in image_tab are -// freed and it's not referenced anymore. - -void epdf_delete() -{ - PdfDocument *pdf_doc = (PdfDocument *) epdf_doc; - xref = pdf_doc->xref; - if (pdf_doc->occurences < 0) { - delete_document(pdf_doc); - } -} - -// Called when PDF embedding system is finalized. -// Now deallocate all remaining PdfDocuments. - -void epdf_check_mem() -{ - if (isInit) { - PdfDocument *p, *n; - for (p = pdfDocuments; p; p = n) { - n = p->next; - delete_document(p); - } - } -} diff --git a/Build/source/texk/web2c/pdftexdir/pdftoepdf-poppler0.86.0.cc b/Build/source/texk/web2c/pdftexdir/pdftoepdf-poppler0.86.0.cc deleted file mode 100644 index b9cdf38e62d..00000000000 --- a/Build/source/texk/web2c/pdftexdir/pdftoepdf-poppler0.86.0.cc +++ /dev/null @@ -1,1110 +0,0 @@ -/* -Copyright 1996-2017 Han The Thanh, <thanh@pdftex.org> - -This file is part of pdfTeX. - -pdfTeX is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -pdfTeX is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -/* -This is based on the patch texlive-poppler-0.59.patch <2017-09-19> at -https://git.archlinux.org/svntogit/packages.git/plain/texlive-bin/trunk -by Arch Linux. A little modifications are made to avoid a crash for -some kind of pdf images, such as figure_missing.pdf in gnuplot. -The poppler should be 0.86.0 or newer versions. -POPPLER_VERSION should be defined. -*/ - -/* Do this early in order to avoid a conflict between - MINGW32 <rpcndr.h> defining 'boolean' as 'unsigned char' and - <kpathsea/types.h> defining Pascal's boolean as 'int'. -*/ -#include <w2c/config.h> -#include <kpathsea/lib.h> - -#include <stdlib.h> -#include <math.h> -#include <stddef.h> -#include <stdio.h> -#include <string.h> -#include <ctype.h> - -#ifdef POPPLER_VERSION -#include <dirent.h> -#include <poppler-config.h> -#include <goo/GooString.h> -#include <goo/gmem.h> -#include <goo/gfile.h> -#define GString GooString -#else -#error POPPLER_VERSION should be defined. -#endif -#include <assert.h> - -#include "Object.h" -#include "Stream.h" -#include "Array.h" -#include "Dict.h" -#include "XRef.h" -#include "Catalog.h" -#include "Link.h" -#include "Page.h" -#include "GfxFont.h" -#include "PDFDoc.h" -#include "GlobalParams.h" -#include "Error.h" - -// This file is mostly C and not very much C++; it's just used to interface -// the functions of xpdf, which are written in C++. - -extern "C" { -#include <pdftexdir/ptexmac.h> -#include <pdftexdir/pdftex-common.h> - -// These functions from pdftex.web gets declared in pdftexcoerce.h in the -// usual web2c way, but we cannot include that file here because C++ -// does not allow it. -extern int getpdfsuppresswarningpagegroup(void); -extern integer getpdfsuppressptexinfo(void); -extern integer zround(double); -} - -// The prefix "PTEX" for the PDF keys is special to pdfTeX; -// this has been registered with Adobe by Hans Hagen. - -#define pdfkeyprefix "PTEX" - -#define MASK_SUPPRESS_PTEX_FULLBANNER 0x01 -#define MASK_SUPPRESS_PTEX_FILENAME 0x02 -#define MASK_SUPPRESS_PTEX_PAGENUMBER 0x04 -#define MASK_SUPPRESS_PTEX_INFODICT 0x08 - -// When copying the Resources of the selected page, all objects are copied -// recusively top-down. Indirect objects however are not fetched during -// copying, but get a new object number from pdfTeX and then will be -// appended into a linked list. Duplicates are checked and removed from the -// list of indirect objects during appending. - -enum InObjType { - objFont, - objFontDesc, - objOther -}; - -struct InObj { - Ref ref; // ref in original PDF - InObjType type; // object type - InObj *next; // next entry in list of indirect objects - int num; // new object number in output PDF - fd_entry *fd; // pointer to /FontDescriptor object structure - int enc_objnum; // Encoding for objFont - int written; // has it been written to output PDF? -}; - -struct UsedEncoding { - int enc_objnum; - GfxFont *font; - UsedEncoding *next; -}; - -static InObj *inObjList; -static UsedEncoding *encodingList; -static bool isInit = false; - -// -------------------------------------------------------------------- -// Maintain list of open embedded PDF files -// -------------------------------------------------------------------- - -struct PdfDocument { - char *file_name; - PDFDoc *doc; - XRef *xref; - InObj *inObjList; - int occurences; // number of references to the document; the doc can be - // deleted when this is negative - PdfDocument *next; -}; - -static PdfDocument *pdfDocuments = 0; - -static XRef *xref = 0; - -// Returns pointer to PdfDocument record for PDF file. -// Creates a new record if it doesn't exist yet. -// xref is made current for the document. - -static PdfDocument *find_add_document(char *file_name) -{ - PdfDocument *p = pdfDocuments; - while (p && strcmp(p->file_name, file_name) != 0) - p = p->next; - if (p) { - xref = p->xref; - (p->occurences)++; - return p; - } - p = new PdfDocument; - p->file_name = xstrdup(file_name); - p->xref = xref = 0; - p->occurences = 0; - GString *docName = new GString(p->file_name); - p->doc = new PDFDoc(docName); // takes ownership of docName - if (!p->doc->isOk() || !p->doc->okToPrint()) { - pdftex_fail("xpdf: reading PDF image failed"); - } - p->inObjList = 0; - p->next = pdfDocuments; - pdfDocuments = p; - return p; -} - -// Deallocate a PdfDocument with all its resources - -static void delete_document(PdfDocument * pdf_doc) -{ - PdfDocument **p = &pdfDocuments; - while (*p && *p != pdf_doc) - p = &((*p)->next); - // should not happen: - if (!*p) - return; - // unlink from list - *p = pdf_doc->next; - // free pdf_doc's resources - InObj *r, *n; - for (r = pdf_doc->inObjList; r != 0; r = n) { - n = r->next; - delete r; - } - xref = pdf_doc->xref; - delete pdf_doc->doc; - xfree(pdf_doc->file_name); - delete pdf_doc; -} - -// -------------------------------------------------------------------- - -static int addEncoding(GfxFont * gfont) -{ - UsedEncoding *n; - n = new UsedEncoding; - n->next = encodingList; - encodingList = n; - n->font = gfont; - n->enc_objnum = pdfnewobjnum(); - return n->enc_objnum; -} - -#define addFont(ref, fd, enc_objnum) \ - addInObj(objFont, ref, fd, enc_objnum) - -// addFontDesc is only used to avoid writing the original FontDescriptor -// from the PDF file. - -#define addFontDesc(ref, fd) \ - addInObj(objFontDesc, ref, fd, 0) - -#define addOther(ref) \ - addInObj(objOther, ref, 0, 0) - -static int addInObj(InObjType type, Ref ref, fd_entry * fd, int e) -{ - InObj *p, *q, *n = new InObj; - if (ref.num == 0) - pdftex_fail("PDF inclusion: invalid reference"); - n->ref = ref; - n->type = type; - n->next = 0; - n->fd = fd; - n->enc_objnum = e; - n->written = 0; - if (inObjList == 0) - inObjList = n; - else { - for (p = inObjList; p != 0; p = p->next) { - if (p->ref.num == ref.num && p->ref.gen == ref.gen) { - delete n; - return p->num; - } - q = p; - } - // it is important to add new objects at the end of the list, - // because new objects are being added while the list is being - // written out. - q->next = n; - } - if (type == objFontDesc) - n->num = get_fd_objnum(fd); - else - n->num = pdfnewobjnum(); - return n->num; -} - -#if 0 /* unusewd */ -static int getNewObjectNumber(Ref ref) -{ - InObj *p; - if (inObjList == 0) { - pdftex_fail("No objects copied yet"); - } else { - for (p = inObjList; p != 0; p = p->next) { - if (p->ref.num == ref.num && p->ref.gen == ref.gen) { - return p->num; - } - } - pdftex_fail("Object not yet copied: %i %i", ref.num, ref.gen); - } -#ifdef _MSC_VER - /* Never reached, but without __attribute__((noreturn)) for pdftex_fail() - MSVC 5.0 requires an int return value. */ - return -60000; -#endif -} -#endif - -static void copyObject(Object *); - -static void copyName(char *s) -{ - pdf_puts("/"); - for (; *s != 0; s++) { - if (isdigit(*s) || isupper(*s) || islower(*s) || *s == '_' || - *s == '.' || *s == '-' || *s == '+') - pdfout(*s); - else - pdf_printf("#%.2X", *s & 0xFF); - } -} - -static void copyDictEntry(Object * obj, int i) -{ - Object obj1; - copyName((char *)obj->dictGetKey(i)); - pdf_puts(" "); - obj1 = obj->dictGetValNF(i).copy(); - copyObject(&obj1); - pdf_puts("\n"); -} - -static void copyDict(Object * obj) -{ - int i, l; - if (!obj->isDict()) - pdftex_fail("PDF inclusion: invalid dict type <%s>", - obj->getTypeName()); - for (i = 0, l = obj->dictGetLength(); i < l; ++i) - copyDictEntry(obj, i); -} - -static void copyFontDict(Object * obj, InObj * r) -{ - int i, l; - char *key; - if (!obj->isDict()) - pdftex_fail("PDF inclusion: invalid dict type <%s>", - obj->getTypeName()); - pdf_puts("<<\n"); - assert(r->type == objFont); // FontDescriptor is in fd_tree - for (i = 0, l = obj->dictGetLength(); i < l; ++i) { - key = (char *)obj->dictGetKey(i); - if (strncmp("FontDescriptor", key, strlen("FontDescriptor")) == 0 - || strncmp("BaseFont", key, strlen("BaseFont")) == 0 - || strncmp("Encoding", key, strlen("Encoding")) == 0) - continue; // skip original values - copyDictEntry(obj, i); - } - // write new FontDescriptor, BaseFont, and Encoding - pdf_printf("/FontDescriptor %d 0 R\n", get_fd_objnum(r->fd)); - pdf_printf("/BaseFont %d 0 R\n", get_fn_objnum(r->fd)); - pdf_printf("/Encoding %d 0 R\n", r->enc_objnum); - pdf_puts(">>"); -} - -static void copyStream(Stream * str) -{ - int c, c2 = 0; - str->reset(); - while ((c = str->getChar()) != EOF) { - pdfout(c); - c2 = c; - } - pdflastbyte = c2; -} - -static void copyProcSet(Object * obj) -{ - int i, l; - Object procset; - if (!obj->isArray()) - pdftex_fail("PDF inclusion: invalid ProcSet array type <%s>", - obj->getTypeName()); - pdf_puts("/ProcSet [ "); - for (i = 0, l = obj->arrayGetLength(); i < l; ++i) { - procset = obj->arrayGetNF(i).copy(); - if (!procset.isName()) - pdftex_fail("PDF inclusion: invalid ProcSet entry type <%s>", - procset.getTypeName()); - copyName((char *)procset.getName()); - pdf_puts(" "); - } - pdf_puts("]\n"); -} - -#define REPLACE_TYPE1C true - -static bool embeddableFont(Object * fontdesc) -{ - Object fontfile, ffsubtype; - - if (!fontdesc->isDict()) - return false; - fontfile = fontdesc->dictLookup("FontFile"); - if (fontfile.isStream()) - return true; - if (REPLACE_TYPE1C) { - fontfile = fontdesc->dictLookup("FontFile3"); - if (!fontfile.isStream()) - return false; - ffsubtype = fontfile.streamGetDict()->lookup("Subtype"); - return ffsubtype.isName() && !strcmp(ffsubtype.getName(), "Type1C"); - } - return false; -} - -static void copyFont(char *tag, Object * fontRef) -{ - Object fontdict, subtype, basefont, fontdescRef, fontdesc, charset, - stemV; - GfxFont *gfont; - fd_entry *fd; - fm_entry *fontmap; - // Check whether the font has already been embedded before analysing it. - InObj *p; - Ref ref = fontRef->getRef(); - for (p = inObjList; p; p = p->next) { - if (p->ref.num == ref.num && p->ref.gen == ref.gen) { - copyName(tag); - pdf_printf(" %d 0 R ", p->num); - return; - } - } - // Only handle included Type1 (and Type1C) fonts; anything else will be copied. - // Type1C fonts are replaced by Type1 fonts, if REPLACE_TYPE1C is true. - fontdict = fontRef->fetch(xref); - fontdesc = Object(objNull); - if (fontdict.isDict()) { - subtype = fontdict.dictLookup("Subtype"); - basefont = fontdict.dictLookup("BaseFont"); - fontdescRef = fontdict.dictLookupNF("FontDescriptor").copy(); - if (fontdescRef.isRef()) { - fontdesc = fontdescRef.fetch(xref); - } - } - if (!fixedinclusioncopyfont && fontdict.isDict() - && subtype.isName() - && !strcmp(subtype.getName(), "Type1") - && basefont.isName() - && fontdescRef.isRef() - && fontdesc.isDict() - && embeddableFont(&fontdesc) - && (fontmap = lookup_fontmap((char *)basefont.getName())) != NULL) { - // round /StemV value, since the PDF input is a float - // (see Font Descriptors in PDF reference), but we only store an - // integer, since we don't want to change the struct. - stemV = fontdesc.dictLookup("StemV"); - fd = epdf_create_fontdescriptor(fontmap, zround(stemV.getNum())); - charset = fontdesc.dictLookup("CharSet"); - if (!charset.isNull() && - charset.isString() && is_subsetable(fontmap)) - epdf_mark_glyphs(fd, (char *)charset.getString()->c_str()); - else - embed_whole_font(fd); - addFontDesc(fontdescRef.getRef(), fd); - copyName(tag); - gfont = GfxFont::makeFont(xref, tag, fontRef->getRef(), - fontdict.getDict()); - pdf_printf(" %d 0 R ", addFont(fontRef->getRef(), fd, - addEncoding(gfont))); - } else { - copyName(tag); - pdf_puts(" "); - copyObject(fontRef); - } -} - -static void copyFontResources(Object * obj) -{ - Object fontRef; - int i, l; - if (!obj->isDict()) - pdftex_fail("PDF inclusion: invalid font resources dict type <%s>", - obj->getTypeName()); - pdf_puts("/Font << "); - for (i = 0, l = obj->dictGetLength(); i < l; ++i) { - fontRef = obj->dictGetValNF(i).copy(); - if (fontRef.isRef()) - copyFont((char *)obj->dictGetKey(i), &fontRef); - else if (fontRef.isDict()) { // some programs generate pdf with embedded font object - copyName((char *)obj->dictGetKey(i)); - pdf_puts(" "); - copyObject(&fontRef); - } - else - pdftex_fail("PDF inclusion: invalid font in reference type <%s>", - fontRef.getTypeName()); - } - pdf_puts(">>\n"); -} - -static void copyOtherResources(Object * obj, char *key) -{ - // copies all other resources (write_epdf handles Fonts and ProcSets), - - // if Subtype is present, it must be a name - if (strcmp("Subtype", key) == 0) { - if (!obj->isName()) { - pdftex_warn("PDF inclusion: Subtype in Resources dict is not a name" - " (key '%s', type <%s>); ignored.", - key, obj->getTypeName()); - return; - } - } else if (!obj->isDict()) { - //FIXME: Write the message only to the log file - pdftex_warn("PDF inclusion: invalid other resource which is no dict" - " (key '%s', type <%s>); ignored.", - key, obj->getTypeName()); - return; - } - copyName(key); - pdf_puts(" "); - copyObject(obj); -} - -// Function onverts double to string; very small and very large numbers -// are NOT converted to scientific notation. -// n must be a number or real conforming to the implementation limits -// of PDF as specified in appendix C.1 of the PDF Ref. -// These are: -// maximum value of ints is +2^32 -// maximum value of reals is +2^15 -// smalles values of reals is 1/(2^16) - -static char *convertNumToPDF(double n) -{ - static const int precision = 6; - static const int fact = (int) 1E6; // must be 10^precision - static const double epsilon = 0.5E-6; // 2epsilon must be 10^-precision - static char buf[64]; - // handle very small values: return 0 - if (fabs(n) < epsilon) { - buf[0] = '0'; - buf[1] = '\0'; - } else { - char ints[64]; - int bindex = 0, sindex = 0; - int ival, fval; - // handle the sign part if n is negative - if (n < 0) { - buf[bindex++] = '-'; - n = -n; - } - n += epsilon; // for rounding - // handle the integer part, simply with sprintf - ival = (int) floor(n); - n -= ival; - sprintf(ints, "%d", ival); - while (ints[sindex] != 0) - buf[bindex++] = ints[sindex++]; - // handle the fractional part up to 'precision' digits - fval = (int) floor(n * fact); - if (fval) { - // set a dot - buf[bindex++] = '.'; - sindex = bindex + precision; - buf[sindex--] = '\0'; - // fill up trailing zeros with the string terminator NULL - while (((fval % 10) == 0) && (sindex >= bindex)) { - buf[sindex--] = '\0'; - fval /= 10; - } - // fill up the fractional part back to front - while (sindex >= bindex) { - buf[sindex--] = (fval % 10) + '0'; - fval /= 10; - } - } else - buf[bindex++] = 0; - } - return (char *) buf; -} - -static void copyObject(Object * obj) -{ - Object obj1; - int i, l, c; - Ref ref; - char *p; - GString *s; - if (obj->isBool()) { - pdf_printf("%s", obj->getBool()? "true" : "false"); - } else if (obj->isInt()) { - pdf_printf("%i", obj->getInt()); - } else if (obj->isReal()) { - pdf_printf("%s", convertNumToPDF(obj->getReal())); - } else if (obj->isNum()) { - pdf_printf("%s", convertNumToPDF(obj->getNum())); - } else if (obj->isString()) { - s = (GooString *)obj->getString(); - p = (char *)s->c_str(); - l = s->getLength(); - if (strlen(p) == (unsigned int) l) { - pdf_puts("("); - for (; *p != 0; p++) { - c = (unsigned char) *p; - if (c == '(' || c == ')' || c == '\\') - pdf_printf("\\%c", c); - else if (c < 0x20 || c > 0x7F) - pdf_printf("\\%03o", c); - else - pdfout(c); - } - pdf_puts(")"); - } else { - pdf_puts("<"); - for (i = 0; i < l; i++) { - c = s->getChar(i) & 0xFF; - pdf_printf("%.2x", c); - } - pdf_puts(">"); - } - } else if (obj->isName()) { - copyName((char *)obj->getName()); - } else if (obj->isNull()) { - pdf_puts("null"); - } else if (obj->isArray()) { - pdf_puts("["); - for (i = 0, l = obj->arrayGetLength(); i < l; ++i) { - obj1 = obj->arrayGetNF(i).copy(); - if (!obj1.isName()) - pdf_puts(" "); - copyObject(&obj1); - } - pdf_puts("]"); - } else if (obj->isDict()) { - pdf_puts("<<\n"); - copyDict(obj); - pdf_puts(">>"); - } else if (obj->isStream()) { - pdf_puts("<<\n"); - copyDict(obj->getStream()->getDictObject()); - pdf_puts(">>\n"); - pdf_puts("stream\n"); - copyStream(obj->getStream()->getUndecodedStream()); - pdf_puts("\nendstream"); - } else if (obj->isRef()) { - ref = obj->getRef(); - if (ref.num == 0) { - pdftex_fail - ("PDF inclusion: reference to invalid object" - " (is the included pdf broken?)"); - } else - pdf_printf("%d 0 R", addOther(ref)); - } else { - pdftex_fail("PDF inclusion: type <%s> cannot be copied", - obj->getTypeName()); - } -} - -static void writeRefs() -{ - InObj *r; - for (r = inObjList; r != 0; r = r->next) { - if (!r->written) { - r->written = 1; - Object obj1 = xref->fetch(r->ref.num, r->ref.gen); - if (r->type == objFont) { - assert(!obj1.isStream()); - pdfbeginobj(r->num, 2); // \pdfobjcompresslevel = 2 is for this - copyFontDict(&obj1, r); - pdf_puts("\n"); - pdfendobj(); - } else if (r->type != objFontDesc) { // /FontDescriptor is written via write_fontdescriptor() - if (obj1.isStream()) - pdfbeginobj(r->num, 0); - else - pdfbeginobj(r->num, 2); // \pdfobjcompresslevel = 2 is for this - copyObject(&obj1); - pdf_puts("\n"); - pdfendobj(); - } - } - } -} - -static void writeEncodings() -{ - UsedEncoding *r, *n; - char *glyphNames[256], *s; - int i; - for (r = encodingList; r != 0; r = r->next) { - for (i = 0; i < 256; i++) { - if (r->font->isCIDFont()) { - pdftex_fail - ("PDF inclusion: CID fonts are not supported" - " (try to disable font replacement to fix this)"); - } - if ((s = (char *)((Gfx8BitFont *) r->font)->getCharName(i)) != 0) - glyphNames[i] = s; - else - glyphNames[i] = notdef; - } - epdf_write_enc(glyphNames, r->enc_objnum); - } - for (r = encodingList; r != 0; r = n) { - n = r->next; -#ifdef POPPLER_VERSION - r->font->decRefCnt(); -#else -#error POPPLER_VERSION should be defined. -#endif - delete r; - } -} - -// get the pagebox according to the pagebox_spec -static const PDFRectangle *get_pagebox(Page * page, int pagebox_spec) -{ - if (pagebox_spec == pdfboxspecmedia) - return page->getMediaBox(); - else if (pagebox_spec == pdfboxspeccrop) - return page->getCropBox(); - else if (pagebox_spec == pdfboxspecbleed) - return page->getBleedBox(); - else if (pagebox_spec == pdfboxspectrim) - return page->getTrimBox(); - else if (pagebox_spec == pdfboxspecart) - return page->getArtBox(); - else - pdftex_fail("PDF inclusion: unknown value of pagebox spec (%i)", - (int) pagebox_spec); - return page->getMediaBox(); // to make the compiler happy -} - - -// Reads various information about the PDF and sets it up for later inclusion. -// This will fail if the PDF version of the PDF is higher than -// minor_pdf_version_wanted or page_name is given and can not be found. -// It makes no sense to give page_name _and_ page_num. -// Returns the page number. - -int -read_pdf_info(char *image_name, char *page_name, int page_num, - int pagebox_spec, int major_pdf_version_wanted, int minor_pdf_version_wanted, - int pdf_inclusion_errorlevel) -{ - PdfDocument *pdf_doc; - Page *page; - const PDFRectangle *pagebox; -#ifdef POPPLER_VERSION - int pdf_major_version_found, pdf_minor_version_found; -#else -#error POPPLER_VERSION should be defined. -#endif - // initialize - if (!isInit) { - globalParams = std::make_unique<GlobalParams>(); - globalParams->setErrQuiet(false); - isInit = true; - } - // open PDF file - pdf_doc = find_add_document(image_name); - epdf_doc = (void *) pdf_doc; - - // check PDF version - // this works only for PDF 1.x -- but since any versions of PDF newer - // than 1.x will not be backwards compatible to PDF 1.x, pdfTeX will - // then have to changed drastically anyway. -#ifdef POPPLER_VERSION - pdf_major_version_found = pdf_doc->doc->getPDFMajorVersion(); - pdf_minor_version_found = pdf_doc->doc->getPDFMinorVersion(); - if ((pdf_major_version_found > major_pdf_version_wanted) - || (pdf_minor_version_found > minor_pdf_version_wanted)) { - const char *msg = - "PDF inclusion: found PDF version <%d.%d>, but at most version <%d.%d> allowed"; - if (pdf_inclusion_errorlevel > 0) { - pdftex_fail(msg, pdf_major_version_found, pdf_minor_version_found, major_pdf_version_wanted, minor_pdf_version_wanted); - } else if (pdf_inclusion_errorlevel < 0) { - ; /* do nothing */ - } else { /* = 0, give warning */ - pdftex_warn(msg, pdf_major_version_found, pdf_minor_version_found, major_pdf_version_wanted, minor_pdf_version_wanted); - } - } -#else -#error POPPLER_VERSION should be defined. -#endif - epdf_num_pages = pdf_doc->doc->getCatalog()->getNumPages(); - if (page_name) { - // get page by name - GString name(page_name); - std::unique_ptr<LinkDest> link = pdf_doc->doc->findDest(&name); - if (link == 0 || !link->isOk()) - pdftex_fail("PDF inclusion: invalid destination <%s>", page_name); - Ref ref = link->getPageRef(); - page_num = pdf_doc->doc->getCatalog()->findPage(ref); - if (page_num == 0) - pdftex_fail("PDF inclusion: destination is not a page <%s>", - page_name); - } else { - // get page by number - if (page_num <= 0 || page_num > epdf_num_pages) - pdftex_fail("PDF inclusion: required page does not exist <%i>", - epdf_num_pages); - } - // get the required page - page = pdf_doc->doc->getCatalog()->getPage(page_num); - - // get the pagebox (media, crop...) to use. - pagebox = get_pagebox(page, pagebox_spec); - if (pagebox->x2 > pagebox->x1) { - epdf_orig_x = pagebox->x1; - epdf_width = pagebox->x2 - pagebox->x1; - } else { - epdf_orig_x = pagebox->x2; - epdf_width = pagebox->x1 - pagebox->x2; - } - if (pagebox->y2 > pagebox->y1) { - epdf_orig_y = pagebox->y1; - epdf_height = pagebox->y2 - pagebox->y1; - } else { - epdf_orig_y = pagebox->y2; - epdf_height = pagebox->y1 - pagebox->y2; - } - - // get page rotation - epdf_rotate = page->getRotate() % 360; - if (epdf_rotate < 0) - epdf_rotate += 360; - - // page group - if (page->getGroup() != NULL) - epdf_has_page_group = 1; // only flag that page group is present; - // the actual object number will be - // generated in pdftex.web - else - epdf_has_page_group = 0; // no page group present - - pdf_doc->xref = pdf_doc->doc->getXRef(); - return page_num; -} - -// writes the current epf_doc. -// Here the included PDF is copied, so most errors that can happen during PDF -// inclusion will arise here. - -void write_epdf(void) -{ - Page *page; - Ref *pageRef; - Dict *pageDict; - Object contents, obj1, obj2, pageObj, dictObj; - Object groupDict; - bool writeSepGroup = false; - Object info; - char *key; - char s[256]; - int i, l; - int rotate; - double scale[6] = { 0, 0, 0, 0, 0, 0 }; - bool writematrix = false; - int suppress_ptex_info = getpdfsuppressptexinfo(); - static const char *pageDictKeys[] = { - "LastModified", - "Metadata", - "PieceInfo", - "SeparationInfo", -// "Group", -// "Resources", - NULL - }; - - PdfDocument *pdf_doc = (PdfDocument *) epdf_doc; - (pdf_doc->occurences)--; - xref = pdf_doc->xref; - inObjList = pdf_doc->inObjList; - encodingList = 0; - page = pdf_doc->doc->getCatalog()->getPage(epdf_selected_page); - pageRef = pdf_doc->doc->getCatalog()->getPageRef(epdf_selected_page); - pageObj = xref->fetch(pageRef->num, pageRef->gen); - pageDict = pageObj.getDict(); - rotate = page->getRotate(); - const PDFRectangle *pagebox; - // write the Page header - pdf_puts("/Type /XObject\n"); - pdf_puts("/Subtype /Form\n"); - pdf_puts("/FormType 1\n"); - - // write additional information - if ((suppress_ptex_info & MASK_SUPPRESS_PTEX_FILENAME) == 0) { - pdf_printf("/%s.FileName (%s)\n", pdfkeyprefix, - convertStringToPDFString(pdf_doc->file_name, - strlen(pdf_doc->file_name))); - } - if ((suppress_ptex_info & MASK_SUPPRESS_PTEX_PAGENUMBER) == 0) { - pdf_printf("/%s.PageNumber %i\n", pdfkeyprefix, (int) epdf_selected_page); - } - if ((suppress_ptex_info & MASK_SUPPRESS_PTEX_INFODICT) == 0) { - info = pdf_doc->doc->getDocInfoNF().copy(); - if (info.isRef()) { - // the info dict must be indirect (PDF Ref p. 61) - pdf_printf("/%s.InfoDict ", pdfkeyprefix); - pdf_printf("%d 0 R\n", addOther(info.getRef())); - } - } - // get the pagebox (media, crop...) to use. - pagebox = get_pagebox(page, epdf_page_box); - - // handle page rotation - if (rotate != 0) { - if (rotate % 90 == 0) { - // this handles only the simple case: multiple of 90s but these - // are the only values allowed according to the reference - // (v1.3, p. 78). - // the image is rotated around its center. - // the /Rotate key is clockwise while the matrix is - // counterclockwise :-% - tex_printf(", page is rotated %d degrees", rotate); - switch (rotate) { - case 90: - scale[1] = -1; - scale[2] = 1; - scale[4] = pagebox->x1 - pagebox->y1; - scale[5] = pagebox->y1 + pagebox->x2; - writematrix = true; - break; - case 180: - scale[0] = scale[3] = -1; - scale[4] = pagebox->x1 + pagebox->x2; - scale[5] = pagebox->y1 + pagebox->y2; - writematrix = true; - break; // width and height are exchanged - case 270: - scale[1] = 1; - scale[2] = -1; - scale[4] = pagebox->x1 + pagebox->y2; - scale[5] = pagebox->y1 - pagebox->x1; - writematrix = true; - break; - } - if (writematrix) { // The matrix is only written if the image is rotated. - sprintf(s, "/Matrix [%.8f %.8f %.8f %.8f %.8f %.8f]\n", - scale[0], - scale[1], scale[2], scale[3], scale[4], scale[5]); - pdf_puts(stripzeros(s)); - } - } - } - - sprintf(s, "/BBox [%.8f %.8f %.8f %.8f]\n", - pagebox->x1, pagebox->y1, pagebox->x2, pagebox->y2); - pdf_puts(stripzeros(s)); - - // Metadata validity check (as a stream it must be indirect) - dictObj = pageDict->lookupNF("Metadata").copy(); - if (!dictObj.isNull() && !dictObj.isRef()) - pdftex_warn("PDF inclusion: /Metadata must be indirect object"); - - // copy selected items in Page dictionary except Resources & Group - for (i = 0; pageDictKeys[i] != NULL; i++) { - dictObj = pageDict->lookupNF(pageDictKeys[i]).copy(); - if (!dictObj.isNull()) { - pdf_newline(); - pdf_printf("/%s ", pageDictKeys[i]); - copyObject(&dictObj); // preserves indirection - } - } - - // handle page group - dictObj = pageDict->lookupNF("Group").copy(); - if (!dictObj.isNull()) { - if (pdfpagegroupval == 0) { - // another pdf with page group was included earlier on the - // same page; copy the Group entry as is. See manual for - // info on why this is a warning. - if (getpdfsuppresswarningpagegroup() == 0) { - pdftex_warn - ("PDF inclusion: multiple pdfs with page group included in a single page"); - } - pdf_newline(); - pdf_puts("/Group "); - copyObject(&dictObj); - } else { - // write Group dict as a separate object, since the Page dict also refers to it - dictObj = pageDict->lookup("Group"); - if (!dictObj.isDict()) - pdftex_fail("PDF inclusion: /Group dict missing"); - writeSepGroup = true; -/* -This part is only a single line - groupDict = Object(page->getGroup()); -in the original patch. In this case, however, pdftex crashes at -"delete pdf_doc->doc" in "delete_document()" for inclusion of some -kind of pdf images, for example, figure_missing.pdf in gnuplot. -A change - groupDict = Object(page->getGroup()).copy(); -does not improve the situation. -The changes below seem to work fine. -*/ -// begin modification - groupDict = pageDict->lookup("Group"); - const Dict& dic1 = page->getGroup(); - const Dict& dic2 = groupDict.getDict(); - // replace dic2 in groupDict with dic1 - l = dic2.getLength(); - for (i = 0; i < l; i++) { - groupDict.dictRemove(dic2.getKey(i)); - } - l = dic1.getLength(); - for (i = 0; i < l; i++) { - groupDict.dictAdd((const char *)copyString(dic1.getKey(i)), - dic1.getValNF(i).copy()); - } -// end modification - pdf_printf("/Group %ld 0 R\n", (long)pdfpagegroupval); - } - } - - // write the Resources dictionary - if (page->getResourceDict() == NULL) { - // Resources can be missing (files without them have been spotted - // in the wild); in which case the /Resouces of the /Page will be used. - // "This practice is not recommended". - pdftex_warn - ("PDF inclusion: /Resources missing. 'This practice is not recommended' (PDF Ref)"); - } else { - Object *obj1 = page->getResourceDictObject(); - if (!obj1->isDict()) - pdftex_fail("PDF inclusion: invalid resources dict type <%s>", - obj1->getTypeName()); - pdf_newline(); - pdf_puts("/Resources <<\n"); - for (i = 0, l = obj1->dictGetLength(); i < l; ++i) { - obj2 = obj1->dictGetVal(i); - key = (char *)obj1->dictGetKey(i); - if (strcmp("Font", key) == 0) - copyFontResources(&obj2); - else if (strcmp("ProcSet", key) == 0) - copyProcSet(&obj2); - else - copyOtherResources(&obj2, (char *)key); - } - pdf_puts(">>\n"); - } - - // write the page contents - contents = page->getContents(); - if (contents.isStream()) { - - // Variant A: get stream and recompress under control - // of \pdfcompresslevel - // - // pdfbeginstream(); - // copyStream(contents->getStream()); - // pdfendstream(); - - // Variant B: copy stream without recompressing - // - obj1 = contents.streamGetDict()->lookup("F"); - if (!obj1.isNull()) { - pdftex_fail("PDF inclusion: Unsupported external stream"); - } - obj1 = contents.streamGetDict()->lookup("Length"); - assert(!obj1.isNull()); - pdf_puts("/Length "); - copyObject(&obj1); - pdf_puts("\n"); - obj1 = contents.streamGetDict()->lookup("Filter"); - if (!obj1.isNull()) { - pdf_puts("/Filter "); - copyObject(&obj1); - pdf_puts("\n"); - obj1 = contents.streamGetDict()->lookup("DecodeParms"); - if (!obj1.isNull()) { - pdf_puts("/DecodeParms "); - copyObject(&obj1); - pdf_puts("\n"); - } - } - pdf_puts(">>\nstream\n"); - copyStream(contents.getStream()->getUndecodedStream()); - pdfendstream(); - } else if (contents.isArray()) { - pdfbeginstream(); - for (i = 0, l = contents.arrayGetLength(); i < l; ++i) { - Object contentsobj = contents.arrayGet(i); - copyStream(contentsobj.getStream()); - if (i < l - 1) - pdf_newline(); // add a newline after each stream except the last - } - pdfendstream(); - } else { // the contents are optional, but we need to include an empty stream - pdfbeginstream(); - pdfendstream(); - } - - // write out all indirect objects - writeRefs(); - - // write out all used encodings (and delete list) - writeEncodings(); - - // write the Group dict if needed - if (writeSepGroup) { - pdfbeginobj(pdfpagegroupval, 2); - copyObject(&groupDict); - pdf_puts("\n"); - pdfendobj(); - pdfpagegroupval = 0; // only the 1st included pdf on a page gets its - // Group included in the Page dict - } - - // save object list, xref - pdf_doc->inObjList = inObjList; - pdf_doc->xref = xref; -} - -// Called when an image has been written and it's resources in image_tab are -// freed and it's not referenced anymore. - -void epdf_delete() -{ - PdfDocument *pdf_doc = (PdfDocument *) epdf_doc; - xref = pdf_doc->xref; - if (pdf_doc->occurences < 0) { - delete_document(pdf_doc); - } -} - -// Called when PDF embedding system is finalized. -// Now deallocate all remaining PdfDocuments. - -void epdf_check_mem() -{ - if (isInit) { - PdfDocument *p, *n; - for (p = pdfDocuments; p; p = n) { - n = p->next; - delete_document(p); - } - } -} diff --git a/Build/source/texk/web2c/pdftexdir/pdftosrc-newpoppler.cc b/Build/source/texk/web2c/pdftexdir/pdftosrc-newpoppler.cc deleted file mode 100644 index cebf578fd77..00000000000 --- a/Build/source/texk/web2c/pdftexdir/pdftosrc-newpoppler.cc +++ /dev/null @@ -1,208 +0,0 @@ -/* -Copyright 1996-2017 Han The Thanh, <thanh@pdftex.org> - -This file is part of pdfTeX. - -pdfTeX is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -pdfTeX is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -/* -This is based on the patch texlive-poppler-0.59.patch <2017-09-19> at -https://git.archlinux.org/svntogit/packages.git/plain/texlive-bin/trunk -by Arch Linux. The poppler should be 0.59.0 or newer versions. -It is tested upto the poppler 0.70.1. -POPPLER_VERSION should be defined. -*/ - -#include <w2c/config.h> - -#include <stdlib.h> -#include <stddef.h> -#include <stdio.h> -#include <string.h> -#include <ctype.h> - -#ifdef POPPLER_VERSION -#define GString GooString -#define xpdfVersion POPPLER_VERSION -#include <dirent.h> -#include <goo/GooString.h> -#include <goo/gmem.h> -#include <goo/gfile.h> -#else -#error POPPLER_VERSION should be defined. -#endif -#include <assert.h> - -#include "Object.h" -#include "Stream.h" -#include "Lexer.h" -#include "Parser.h" -#include "Array.h" -#include "Dict.h" -#include "XRef.h" -#include "Catalog.h" -#include "Page.h" -#include "GfxFont.h" -#include "PDFDoc.h" -#include "GlobalParams.h" -#include "Error.h" - -static XRef *xref = 0; - -int main(int argc, char *argv[]) -{ - char *p, buf[1024]; - PDFDoc *doc; - GString *fileName; - Stream *s; - Object srcStream, srcName, catalogDict; - FILE *outfile; - char *outname; - int objnum = 0, objgen = 0; - bool extract_xref_table = false; - int c; - fprintf(stderr, "pdftosrc version %s\n", xpdfVersion); - if (argc < 2) { - fprintf(stderr, - "Usage: pdftosrc <PDF-file> [<stream-object-number>]\n"); - exit(1); - } - fileName = new GString(argv[1]); - globalParams = new GlobalParams(); - doc = new PDFDoc(fileName); - if (!doc->isOk()) { - fprintf(stderr, "Invalid PDF file\n"); - exit(1); - } - if (argc >= 3) { - objnum = atoi(argv[2]); - if (argc >= 4) - objgen = atoi(argv[3]); - } - xref = doc->getXRef(); - catalogDict = xref->getCatalog(); - if (!catalogDict.isDict("Catalog")) { - fprintf(stderr, "No Catalog found\n"); - exit(1); - } - srcStream = Object(objNull); - if (objnum == 0) { - srcStream = catalogDict.dictLookup("SourceObject"); - static char const_SourceFile[] = "SourceFile"; - if (!srcStream.isStream(const_SourceFile)) { - fprintf(stderr, "No SourceObject found\n"); - exit(1); - } - srcName = srcStream.getStream()->getDict()->lookup("SourceName"); - if (!srcName.isString()) { - fprintf(stderr, "No SourceName found\n"); - exit(1); - } - outname = (char *)srcName.getString()->getCString(); - // We cannot free srcName, as objname shares its string. - // srcName.free(); - } else if (objnum > 0) { - srcStream = xref->fetch(objnum, objgen); - if (!srcStream.isStream()) { - fprintf(stderr, "Not a Stream object\n"); - exit(1); - } - sprintf(buf, "%s", fileName->getCString()); - if ((p = strrchr(buf, '.')) == 0) - p = strchr(buf, 0); - if (objgen == 0) - sprintf(p, ".%i", objnum); - else - sprintf(p, ".%i+%i", objnum, objgen); - outname = buf; - } else { // objnum < 0 means we are extracting the XRef table - extract_xref_table = true; - sprintf(buf, "%s", fileName->getCString()); - if ((p = strrchr(buf, '.')) == 0) - p = strchr(buf, 0); - sprintf(p, ".xref"); - outname = buf; - } - if (!(outfile = fopen(outname, "wb"))) { - fprintf(stderr, "Cannot open file \"%s\" for writing\n", outname); - exit(1); - } - if (extract_xref_table) { - int size = xref->getNumObjects(); - int i; - for (i = 0; i < size; i++) { - if (xref->getEntry(i)->offset == 0xffffffff) - break; - } - size = i; - fprintf(outfile, "xref\n"); - fprintf(outfile, "0 %i\n", size); - for (i = 0; i < size; i++) { - XRefEntry *e = xref->getEntry(i); - if (e->type != xrefEntryCompressed) - fprintf(outfile, "%.10lu %.5i %s\n", - (long unsigned) e->offset, e->gen, - (e->type == xrefEntryFree ? "f" : "n")); - else { // e->offset is the object number of the object stream - Stream *str; - Lexer *lexer; - Parser *parser; - Object objStr, obj1, obj2; - int nObjects, first, n; - int localOffset = 0; - Guint firstOffset; - - objStr = xref->fetch(e->offset, 0); - assert(objStr.isStream()); - obj1 = objStr.streamGetDict()->lookup("N"); - nObjects = obj1.getInt(); - obj1 = objStr.streamGetDict()->lookup("First"); - first = obj1.getInt(); - firstOffset = objStr.getStream()->getBaseStream()->getStart() + first; - - // parse the header: object numbers and offsets - objStr.streamReset(); - str = new EmbedStream(objStr.getStream(), Object(objNull), gTrue, first); - lexer = new Lexer(xref, str); - parser = new Parser(xref, lexer, gFalse); - for (n = 0; n < nObjects; ++n) { - obj1 = parser->getObj(); - obj2 = parser->getObj(); - if (n == e->gen) - localOffset = obj2.getInt(); - } - while (str->getChar() != EOF) ; - delete parser; - - fprintf(outfile, "%.10lu 00000 n\n", - (long unsigned)(firstOffset + localOffset)); - } - } - } else { - s = srcStream.getStream(); - s->reset(); - while ((c = s->getChar()) != EOF) - fputc(c, outfile); - } - if (objnum == 0) - fprintf(stderr, "Source file extracted to %s\n", outname); - else if (objnum > 0) - fprintf(stderr, "Stream object extracted to %s\n", outname); - else - fprintf(stderr, "Cross-reference table extracted to %s\n", outname); - fclose(outfile); - delete doc; - delete globalParams; -} diff --git a/Build/source/texk/web2c/pdftexdir/pdftosrc-poppler0.71.0.cc b/Build/source/texk/web2c/pdftexdir/pdftosrc-poppler0.71.0.cc deleted file mode 100644 index cddbbbad33d..00000000000 --- a/Build/source/texk/web2c/pdftexdir/pdftosrc-poppler0.71.0.cc +++ /dev/null @@ -1,207 +0,0 @@ -/* -Copyright 1996-2017 Han The Thanh, <thanh@pdftex.org> - -This file is part of pdfTeX. - -pdfTeX is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -pdfTeX is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -/* -This is based on the patch texlive-poppler-0.59.patch <2017-09-19> at -https://git.archlinux.org/svntogit/packages.git/plain/texlive-bin/trunk -by Arch Linux. The poppler should be 0.71.0. -POPPLER_VERSION should be defined. -*/ - -#include <w2c/config.h> - -#include <stdlib.h> -#include <stddef.h> -#include <stdio.h> -#include <string.h> -#include <ctype.h> - -#ifdef POPPLER_VERSION -#define GString GooString -#define xpdfVersion POPPLER_VERSION -#include <dirent.h> -#include <goo/GooString.h> -#include <goo/gmem.h> -#include <goo/gfile.h> -#else -#error POPPLER_VERSION should be defined. -#endif -#include <assert.h> - -#include "Object.h" -#include "Stream.h" -#include "Lexer.h" -#include "Parser.h" -#include "Array.h" -#include "Dict.h" -#include "XRef.h" -#include "Catalog.h" -#include "Page.h" -#include "GfxFont.h" -#include "PDFDoc.h" -#include "GlobalParams.h" -#include "Error.h" - -static XRef *xref = 0; - -int main(int argc, char *argv[]) -{ - char *p, buf[1024]; - PDFDoc *doc; - GString *fileName; - Stream *s; - Object srcStream, srcName, catalogDict; - FILE *outfile; - char *outname; - int objnum = 0, objgen = 0; - bool extract_xref_table = false; - int c; - fprintf(stderr, "pdftosrc version %s\n", xpdfVersion); - if (argc < 2) { - fprintf(stderr, - "Usage: pdftosrc <PDF-file> [<stream-object-number>]\n"); - exit(1); - } - fileName = new GString(argv[1]); - globalParams = new GlobalParams(); - doc = new PDFDoc(fileName); - if (!doc->isOk()) { - fprintf(stderr, "Invalid PDF file\n"); - exit(1); - } - if (argc >= 3) { - objnum = atoi(argv[2]); - if (argc >= 4) - objgen = atoi(argv[3]); - } - xref = doc->getXRef(); - catalogDict = xref->getCatalog(); - if (!catalogDict.isDict("Catalog")) { - fprintf(stderr, "No Catalog found\n"); - exit(1); - } - srcStream = Object(objNull); - if (objnum == 0) { - srcStream = catalogDict.dictLookup("SourceObject"); - static char const_SourceFile[] = "SourceFile"; - if (!srcStream.isStream(const_SourceFile)) { - fprintf(stderr, "No SourceObject found\n"); - exit(1); - } - srcName = srcStream.getStream()->getDict()->lookup("SourceName"); - if (!srcName.isString()) { - fprintf(stderr, "No SourceName found\n"); - exit(1); - } - outname = (char *)srcName.getString()->getCString(); - // We cannot free srcName, as objname shares its string. - // srcName.free(); - } else if (objnum > 0) { - srcStream = xref->fetch(objnum, objgen); - if (!srcStream.isStream()) { - fprintf(stderr, "Not a Stream object\n"); - exit(1); - } - sprintf(buf, "%s", fileName->getCString()); - if ((p = strrchr(buf, '.')) == 0) - p = strchr(buf, 0); - if (objgen == 0) - sprintf(p, ".%i", objnum); - else - sprintf(p, ".%i+%i", objnum, objgen); - outname = buf; - } else { // objnum < 0 means we are extracting the XRef table - extract_xref_table = true; - sprintf(buf, "%s", fileName->getCString()); - if ((p = strrchr(buf, '.')) == 0) - p = strchr(buf, 0); - sprintf(p, ".xref"); - outname = buf; - } - if (!(outfile = fopen(outname, "wb"))) { - fprintf(stderr, "Cannot open file \"%s\" for writing\n", outname); - exit(1); - } - if (extract_xref_table) { - int size = xref->getNumObjects(); - int i; - for (i = 0; i < size; i++) { - if (xref->getEntry(i)->offset == 0xffffffff) - break; - } - size = i; - fprintf(outfile, "xref\n"); - fprintf(outfile, "0 %i\n", size); - for (i = 0; i < size; i++) { - XRefEntry *e = xref->getEntry(i); - if (e->type != xrefEntryCompressed) - fprintf(outfile, "%.10lu %.5i %s\n", - (long unsigned) e->offset, e->gen, - (e->type == xrefEntryFree ? "f" : "n")); - else { // e->offset is the object number of the object stream - Stream *str; - Lexer *lexer; - Parser *parser; - Object objStr, obj1, obj2; - int nObjects, first, n; - int localOffset = 0; - Guint firstOffset; - - objStr = xref->fetch(e->offset, 0); - assert(objStr.isStream()); - obj1 = objStr.streamGetDict()->lookup("N"); - nObjects = obj1.getInt(); - obj1 = objStr.streamGetDict()->lookup("First"); - first = obj1.getInt(); - firstOffset = objStr.getStream()->getBaseStream()->getStart() + first; - - // parse the header: object numbers and offsets - objStr.streamReset(); - str = new EmbedStream(objStr.getStream(), Object(objNull), true, first); - lexer = new Lexer(xref, str); - parser = new Parser(xref, lexer, false); - for (n = 0; n < nObjects; ++n) { - obj1 = parser->getObj(); - obj2 = parser->getObj(); - if (n == e->gen) - localOffset = obj2.getInt(); - } - while (str->getChar() != EOF) ; - delete parser; - - fprintf(outfile, "%.10lu 00000 n\n", - (long unsigned)(firstOffset + localOffset)); - } - } - } else { - s = srcStream.getStream(); - s->reset(); - while ((c = s->getChar()) != EOF) - fputc(c, outfile); - } - if (objnum == 0) - fprintf(stderr, "Source file extracted to %s\n", outname); - else if (objnum > 0) - fprintf(stderr, "Stream object extracted to %s\n", outname); - else - fprintf(stderr, "Cross-reference table extracted to %s\n", outname); - fclose(outfile); - delete doc; - delete globalParams; -} diff --git a/Build/source/texk/web2c/pdftexdir/pdftosrc-poppler0.72.0.cc b/Build/source/texk/web2c/pdftexdir/pdftosrc-poppler0.72.0.cc deleted file mode 100644 index 34bad9ccfd1..00000000000 --- a/Build/source/texk/web2c/pdftexdir/pdftosrc-poppler0.72.0.cc +++ /dev/null @@ -1,208 +0,0 @@ -/* -Copyright 1996-2017 Han The Thanh, <thanh@pdftex.org> - -This file is part of pdfTeX. - -pdfTeX is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -pdfTeX is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -/* -This is based on the patch texlive-poppler-0.59.patch <2017-09-19> at -https://git.archlinux.org/svntogit/packages.git/plain/texlive-bin/trunk -by Arch Linux. The poppler should be 0.72.0 or newer versions. -It is tested upto the poppler 0.75.0. -POPPLER_VERSION should be defined. -*/ - -#include <w2c/config.h> - -#include <stdlib.h> -#include <stddef.h> -#include <stdio.h> -#include <string.h> -#include <ctype.h> - -#ifdef POPPLER_VERSION -#define GString GooString -#define xpdfVersion POPPLER_VERSION -#include <dirent.h> -#include <goo/GooString.h> -#include <goo/gmem.h> -#include <goo/gfile.h> -#else -#error POPPLER_VERSION should be defined. -#endif -#include <assert.h> - -#include "Object.h" -#include "Stream.h" -#include "Lexer.h" -#include "Parser.h" -#include "Array.h" -#include "Dict.h" -#include "XRef.h" -#include "Catalog.h" -#include "Page.h" -#include "GfxFont.h" -#include "PDFDoc.h" -#include "GlobalParams.h" -#include "Error.h" - -static XRef *xref = 0; - -int main(int argc, char *argv[]) -{ - char *p, buf[1024]; - PDFDoc *doc; - GString *fileName; - Stream *s; - Object srcStream, srcName, catalogDict; - FILE *outfile; - char *outname; - int objnum = 0, objgen = 0; - bool extract_xref_table = false; - int c; - fprintf(stderr, "pdftosrc version %s\n", xpdfVersion); - if (argc < 2) { - fprintf(stderr, - "Usage: pdftosrc <PDF-file> [<stream-object-number>]\n"); - exit(1); - } - fileName = new GString(argv[1]); - globalParams = new GlobalParams(); - doc = new PDFDoc(fileName); - if (!doc->isOk()) { - fprintf(stderr, "Invalid PDF file\n"); - exit(1); - } - if (argc >= 3) { - objnum = atoi(argv[2]); - if (argc >= 4) - objgen = atoi(argv[3]); - } - xref = doc->getXRef(); - catalogDict = xref->getCatalog(); - if (!catalogDict.isDict("Catalog")) { - fprintf(stderr, "No Catalog found\n"); - exit(1); - } - srcStream = Object(objNull); - if (objnum == 0) { - srcStream = catalogDict.dictLookup("SourceObject"); - static char const_SourceFile[] = "SourceFile"; - if (!srcStream.isStream(const_SourceFile)) { - fprintf(stderr, "No SourceObject found\n"); - exit(1); - } - srcName = srcStream.getStream()->getDict()->lookup("SourceName"); - if (!srcName.isString()) { - fprintf(stderr, "No SourceName found\n"); - exit(1); - } - outname = (char *)srcName.getString()->c_str(); - // We cannot free srcName, as objname shares its string. - // srcName.free(); - } else if (objnum > 0) { - srcStream = xref->fetch(objnum, objgen); - if (!srcStream.isStream()) { - fprintf(stderr, "Not a Stream object\n"); - exit(1); - } - sprintf(buf, "%s", fileName->c_str()); - if ((p = strrchr(buf, '.')) == 0) - p = strchr(buf, 0); - if (objgen == 0) - sprintf(p, ".%i", objnum); - else - sprintf(p, ".%i+%i", objnum, objgen); - outname = buf; - } else { // objnum < 0 means we are extracting the XRef table - extract_xref_table = true; - sprintf(buf, "%s", fileName->c_str()); - if ((p = strrchr(buf, '.')) == 0) - p = strchr(buf, 0); - sprintf(p, ".xref"); - outname = buf; - } - if (!(outfile = fopen(outname, "wb"))) { - fprintf(stderr, "Cannot open file \"%s\" for writing\n", outname); - exit(1); - } - if (extract_xref_table) { - int size = xref->getNumObjects(); - int i; - for (i = 0; i < size; i++) { - if (xref->getEntry(i)->offset == 0xffffffff) - break; - } - size = i; - fprintf(outfile, "xref\n"); - fprintf(outfile, "0 %i\n", size); - for (i = 0; i < size; i++) { - XRefEntry *e = xref->getEntry(i); - if (e->type != xrefEntryCompressed) - fprintf(outfile, "%.10lu %.5i %s\n", - (long unsigned) e->offset, e->gen, - (e->type == xrefEntryFree ? "f" : "n")); - else { // e->offset is the object number of the object stream - Stream *str; - Lexer *lexer; - Parser *parser; - Object objStr, obj1, obj2; - int nObjects, first, n; - int localOffset = 0; - unsigned int firstOffset; - - objStr = xref->fetch(e->offset, 0); - assert(objStr.isStream()); - obj1 = objStr.streamGetDict()->lookup("N"); - nObjects = obj1.getInt(); - obj1 = objStr.streamGetDict()->lookup("First"); - first = obj1.getInt(); - firstOffset = objStr.getStream()->getBaseStream()->getStart() + first; - - // parse the header: object numbers and offsets - objStr.streamReset(); - str = new EmbedStream(objStr.getStream(), Object(objNull), true, first); - lexer = new Lexer(xref, str); - parser = new Parser(xref, lexer, false); - for (n = 0; n < nObjects; ++n) { - obj1 = parser->getObj(); - obj2 = parser->getObj(); - if (n == e->gen) - localOffset = obj2.getInt(); - } - while (str->getChar() != EOF) ; - delete parser; - - fprintf(outfile, "%.10lu 00000 n\n", - (long unsigned)(firstOffset + localOffset)); - } - } - } else { - s = srcStream.getStream(); - s->reset(); - while ((c = s->getChar()) != EOF) - fputc(c, outfile); - } - if (objnum == 0) - fprintf(stderr, "Source file extracted to %s\n", outname); - else if (objnum > 0) - fprintf(stderr, "Stream object extracted to %s\n", outname); - else - fprintf(stderr, "Cross-reference table extracted to %s\n", outname); - fclose(outfile); - delete doc; - delete globalParams; -} diff --git a/Build/source/texk/web2c/pdftexdir/pdftosrc-poppler0.76.0.cc b/Build/source/texk/web2c/pdftexdir/pdftosrc-poppler0.76.0.cc deleted file mode 100644 index 5df91d5c4bf..00000000000 --- a/Build/source/texk/web2c/pdftexdir/pdftosrc-poppler0.76.0.cc +++ /dev/null @@ -1,206 +0,0 @@ -/* -Copyright 1996-2017 Han The Thanh, <thanh@pdftex.org> - -This file is part of pdfTeX. - -pdfTeX is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -pdfTeX is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -/* -This is based on the patch texlive-poppler-0.59.patch <2017-09-19> at -https://git.archlinux.org/svntogit/packages.git/plain/texlive-bin/trunk -by Arch Linux. The poppler should be 0.76.0 upto 0.82.0. -POPPLER_VERSION should be defined. -*/ - -#include <w2c/config.h> - -#include <stdlib.h> -#include <stddef.h> -#include <stdio.h> -#include <string.h> -#include <ctype.h> - -#ifdef POPPLER_VERSION -#define GString GooString -#define xpdfVersion POPPLER_VERSION -#include <dirent.h> -#include <goo/GooString.h> -#include <goo/gmem.h> -#include <goo/gfile.h> -#else -#error POPPLER_VERSION should be defined. -#endif -#include <assert.h> - -#include "Object.h" -#include "Stream.h" -#include "Lexer.h" -#include "Parser.h" -#include "Array.h" -#include "Dict.h" -#include "XRef.h" -#include "Catalog.h" -#include "Page.h" -#include "GfxFont.h" -#include "PDFDoc.h" -#include "GlobalParams.h" -#include "Error.h" - -static XRef *xref = 0; - -int main(int argc, char *argv[]) -{ - char *p, buf[1024]; - PDFDoc *doc; - GString *fileName; - Stream *s; - Object srcStream, srcName, catalogDict; - FILE *outfile; - char *outname; - int objnum = 0, objgen = 0; - bool extract_xref_table = false; - int c; - fprintf(stderr, "pdftosrc version %s\n", xpdfVersion); - if (argc < 2) { - fprintf(stderr, - "Usage: pdftosrc <PDF-file> [<stream-object-number>]\n"); - exit(1); - } - fileName = new GString(argv[1]); - globalParams = new GlobalParams(); - doc = new PDFDoc(fileName); - if (!doc->isOk()) { - fprintf(stderr, "Invalid PDF file\n"); - exit(1); - } - if (argc >= 3) { - objnum = atoi(argv[2]); - if (argc >= 4) - objgen = atoi(argv[3]); - } - xref = doc->getXRef(); - catalogDict = xref->getCatalog(); - if (!catalogDict.isDict("Catalog")) { - fprintf(stderr, "No Catalog found\n"); - exit(1); - } - srcStream = Object(objNull); - if (objnum == 0) { - srcStream = catalogDict.dictLookup("SourceObject"); - static char const_SourceFile[] = "SourceFile"; - if (!srcStream.isStream(const_SourceFile)) { - fprintf(stderr, "No SourceObject found\n"); - exit(1); - } - srcName = srcStream.getStream()->getDict()->lookup("SourceName"); - if (!srcName.isString()) { - fprintf(stderr, "No SourceName found\n"); - exit(1); - } - outname = (char *)srcName.getString()->c_str(); - // We cannot free srcName, as objname shares its string. - // srcName.free(); - } else if (objnum > 0) { - srcStream = xref->fetch(objnum, objgen); - if (!srcStream.isStream()) { - fprintf(stderr, "Not a Stream object\n"); - exit(1); - } - sprintf(buf, "%s", fileName->c_str()); - if ((p = strrchr(buf, '.')) == 0) - p = strchr(buf, 0); - if (objgen == 0) - sprintf(p, ".%i", objnum); - else - sprintf(p, ".%i+%i", objnum, objgen); - outname = buf; - } else { // objnum < 0 means we are extracting the XRef table - extract_xref_table = true; - sprintf(buf, "%s", fileName->c_str()); - if ((p = strrchr(buf, '.')) == 0) - p = strchr(buf, 0); - sprintf(p, ".xref"); - outname = buf; - } - if (!(outfile = fopen(outname, "wb"))) { - fprintf(stderr, "Cannot open file \"%s\" for writing\n", outname); - exit(1); - } - if (extract_xref_table) { - int size = xref->getNumObjects(); - int i; - for (i = 0; i < size; i++) { - if (xref->getEntry(i)->offset == 0xffffffff) - break; - } - size = i; - fprintf(outfile, "xref\n"); - fprintf(outfile, "0 %i\n", size); - for (i = 0; i < size; i++) { - XRefEntry *e = xref->getEntry(i); - if (e->type != xrefEntryCompressed) - fprintf(outfile, "%.10lu %.5i %s\n", - (long unsigned) e->offset, e->gen, - (e->type == xrefEntryFree ? "f" : "n")); - else { // e->offset is the object number of the object stream - Stream *str; - Lexer *lexer; - Parser *parser; - Object objStr, obj1, obj2; - int nObjects, first, n; - int localOffset = 0; - unsigned int firstOffset; - - objStr = xref->fetch(e->offset, 0); - assert(objStr.isStream()); - obj1 = objStr.streamGetDict()->lookup("N"); - nObjects = obj1.getInt(); - obj1 = objStr.streamGetDict()->lookup("First"); - first = obj1.getInt(); - firstOffset = objStr.getStream()->getBaseStream()->getStart() + first; - - // parse the header: object numbers and offsets - objStr.streamReset(); - str = new EmbedStream(objStr.getStream(), Object(objNull), true, first); - parser = new Parser(xref, str, false); - for (n = 0; n < nObjects; ++n) { - obj1 = parser->getObj(); - obj2 = parser->getObj(); - if (n == e->gen) - localOffset = obj2.getInt(); - } - while (str->getChar() != EOF) ; - delete parser; - - fprintf(outfile, "%.10lu 00000 n\n", - (long unsigned)(firstOffset + localOffset)); - } - } - } else { - s = srcStream.getStream(); - s->reset(); - while ((c = s->getChar()) != EOF) - fputc(c, outfile); - } - if (objnum == 0) - fprintf(stderr, "Source file extracted to %s\n", outname); - else if (objnum > 0) - fprintf(stderr, "Stream object extracted to %s\n", outname); - else - fprintf(stderr, "Cross-reference table extracted to %s\n", outname); - fclose(outfile); - delete doc; - delete globalParams; -} diff --git a/Build/source/texk/web2c/pdftexdir/pdftosrc-poppler0.83.0.cc b/Build/source/texk/web2c/pdftexdir/pdftosrc-poppler0.83.0.cc deleted file mode 100644 index 950e14ff390..00000000000 --- a/Build/source/texk/web2c/pdftexdir/pdftosrc-poppler0.83.0.cc +++ /dev/null @@ -1,205 +0,0 @@ -/* -Copyright 1996-2017 Han The Thanh, <thanh@pdftex.org> - -This file is part of pdfTeX. - -pdfTeX is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -pdfTeX is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -/* -This is based on the patch texlive-poppler-0.59.patch <2017-09-19> at -https://git.archlinux.org/svntogit/packages.git/plain/texlive-bin/trunk -by Arch Linux. The poppler should be 0.83.0 or newer versions. -POPPLER_VERSION should be defined. -*/ - -#include <w2c/config.h> - -#include <stdlib.h> -#include <stddef.h> -#include <stdio.h> -#include <string.h> -#include <ctype.h> - -#ifdef POPPLER_VERSION -#define GString GooString -#define xpdfVersion POPPLER_VERSION -#include <dirent.h> -#include <goo/GooString.h> -#include <goo/gmem.h> -#include <goo/gfile.h> -#else -#error POPPLER_VERSION should be defined. -#endif -#include <assert.h> - -#include "Object.h" -#include "Stream.h" -#include "Lexer.h" -#include "Parser.h" -#include "Array.h" -#include "Dict.h" -#include "XRef.h" -#include "Catalog.h" -#include "Page.h" -#include "GfxFont.h" -#include "PDFDoc.h" -#include "GlobalParams.h" -#include "Error.h" - -static XRef *xref = 0; - -int main(int argc, char *argv[]) -{ - char *p, buf[1024]; - PDFDoc *doc; - GString *fileName; - Stream *s; - Object srcStream, srcName, catalogDict; - FILE *outfile; - char *outname; - int objnum = 0, objgen = 0; - bool extract_xref_table = false; - int c; - fprintf(stderr, "pdftosrc version %s\n", xpdfVersion); - if (argc < 2) { - fprintf(stderr, - "Usage: pdftosrc <PDF-file> [<stream-object-number>]\n"); - exit(1); - } - fileName = new GString(argv[1]); - globalParams = std::make_unique<GlobalParams>(); - doc = new PDFDoc(fileName); - if (!doc->isOk()) { - fprintf(stderr, "Invalid PDF file\n"); - exit(1); - } - if (argc >= 3) { - objnum = atoi(argv[2]); - if (argc >= 4) - objgen = atoi(argv[3]); - } - xref = doc->getXRef(); - catalogDict = xref->getCatalog(); - if (!catalogDict.isDict("Catalog")) { - fprintf(stderr, "No Catalog found\n"); - exit(1); - } - srcStream = Object(objNull); - if (objnum == 0) { - srcStream = catalogDict.dictLookup("SourceObject"); - static const char *const_SourceFile = "SourceFile"; - if (!srcStream.isDict(const_SourceFile)) { - fprintf(stderr, "No SourceObject found\n"); - exit(1); - } - srcName = srcStream.getStream()->getDict()->lookup("SourceName"); - if (!srcName.isString()) { - fprintf(stderr, "No SourceName found\n"); - exit(1); - } - outname = (char *)srcName.getString()->c_str(); - // We cannot free srcName, as objname shares its string. - // srcName.free(); - } else if (objnum > 0) { - srcStream = xref->fetch(objnum, objgen); - if (!srcStream.isStream()) { - fprintf(stderr, "Not a Stream object\n"); - exit(1); - } - sprintf(buf, "%s", fileName->c_str()); - if ((p = strrchr(buf, '.')) == 0) - p = strchr(buf, 0); - if (objgen == 0) - sprintf(p, ".%i", objnum); - else - sprintf(p, ".%i+%i", objnum, objgen); - outname = buf; - } else { // objnum < 0 means we are extracting the XRef table - extract_xref_table = true; - sprintf(buf, "%s", fileName->c_str()); - if ((p = strrchr(buf, '.')) == 0) - p = strchr(buf, 0); - sprintf(p, ".xref"); - outname = buf; - } - if (!(outfile = fopen(outname, "wb"))) { - fprintf(stderr, "Cannot open file \"%s\" for writing\n", outname); - exit(1); - } - if (extract_xref_table) { - int size = xref->getNumObjects(); - int i; - for (i = 0; i < size; i++) { - if (xref->getEntry(i)->offset == 0xffffffff) - break; - } - size = i; - fprintf(outfile, "xref\n"); - fprintf(outfile, "0 %i\n", size); - for (i = 0; i < size; i++) { - XRefEntry *e = xref->getEntry(i); - if (e->type != xrefEntryCompressed) - fprintf(outfile, "%.10lu %.5i %s\n", - (long unsigned) e->offset, e->gen, - (e->type == xrefEntryFree ? "f" : "n")); - else { // e->offset is the object number of the object stream - Stream *str; - Lexer *lexer; - Parser *parser; - Object objStr, obj1, obj2; - int nObjects, first, n; - int localOffset = 0; - unsigned int firstOffset; - - objStr = xref->fetch(e->offset, 0); - assert(objStr.isStream()); - obj1 = objStr.streamGetDict()->lookup("N"); - nObjects = obj1.getInt(); - obj1 = objStr.streamGetDict()->lookup("First"); - first = obj1.getInt(); - firstOffset = objStr.getStream()->getBaseStream()->getStart() + first; - - // parse the header: object numbers and offsets - objStr.streamReset(); - str = new EmbedStream(objStr.getStream(), Object(objNull), true, first); - parser = new Parser(xref, str, false); - for (n = 0; n < nObjects; ++n) { - obj1 = parser->getObj(); - obj2 = parser->getObj(); - if (n == e->gen) - localOffset = obj2.getInt(); - } - while (str->getChar() != EOF) ; - delete parser; - - fprintf(outfile, "%.10lu 00000 n\n", - (long unsigned)(firstOffset + localOffset)); - } - } - } else { - s = srcStream.getStream(); - s->reset(); - while ((c = s->getChar()) != EOF) - fputc(c, outfile); - } - if (objnum == 0) - fprintf(stderr, "Source file extracted to %s\n", outname); - else if (objnum > 0) - fprintf(stderr, "Stream object extracted to %s\n", outname); - else - fprintf(stderr, "Cross-reference table extracted to %s\n", outname); - fclose(outfile); - delete doc; -} diff --git a/Build/source/texk/web2c/window/Makefile.in b/Build/source/texk/web2c/window/Makefile.in index 3b8b1fab066..e1fd5eb132e 100644 --- a/Build/source/texk/web2c/window/Makefile.in +++ b/Build/source/texk/web2c/window/Makefile.in @@ -115,7 +115,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/web2c-disable.m4 \ $(top_srcdir)/../../m4/kpse-macos-framework.m4 \ $(top_srcdir)/../../m4/kpse-mpfr-flags.m4 \ $(top_srcdir)/../../m4/kpse-pixman-flags.m4 \ - $(top_srcdir)/../../m4/kpse-poppler-flags.m4 \ $(top_srcdir)/../../m4/kpse-pplib-flags.m4 \ $(top_srcdir)/../../m4/kpse-ptexenc-flags.m4 \ $(top_srcdir)/../../m4/kpse-socket-libs.m4 \ @@ -360,9 +359,6 @@ PIXMAN_DEPEND = @PIXMAN_DEPEND@ PIXMAN_INCLUDES = @PIXMAN_INCLUDES@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -POPPLER_DEPEND = @POPPLER_DEPEND@ -POPPLER_INCLUDES = @POPPLER_INCLUDES@ -POPPLER_LIBS = @POPPLER_LIBS@ PPLIB_DEPEND = @PPLIB_DEPEND@ PPLIB_INCLUDES = @PPLIB_INCLUDES@ PPLIB_LIBS = @PPLIB_LIBS@ diff --git a/Build/source/utils/Makefile.in b/Build/source/utils/Makefile.in index 64616110492..4fc12e1e2a7 100644 --- a/Build/source/utils/Makefile.in +++ b/Build/source/utils/Makefile.in @@ -107,7 +107,6 @@ am__aclocal_m4_deps = $(top_srcdir)/../m4/kpse-cairo-flags.m4 \ $(top_srcdir)/../m4/kpse-options.m4 \ $(top_srcdir)/../m4/kpse-pixman-flags.m4 \ $(top_srcdir)/../m4/kpse-pkgs.m4 \ - $(top_srcdir)/../m4/kpse-poppler-flags.m4 \ $(top_srcdir)/../m4/kpse-ptexenc-flags.m4 \ $(top_srcdir)/../m4/kpse-setup.m4 \ $(top_srcdir)/../m4/kpse-teckit-flags.m4 \ @@ -178,7 +177,6 @@ am__aclocal_m4_deps = $(top_srcdir)/../m4/kpse-cairo-flags.m4 \ $(top_srcdir)/../libs/graphite2/ac/withenable.ac \ $(top_srcdir)/../libs/zziplib/ac/withenable.ac \ $(top_srcdir)/../libs/xpdf/ac/withenable.ac \ - $(top_srcdir)/../libs/poppler/ac/withenable.ac \ $(top_srcdir)/../libs/mpfr/ac/withenable.ac \ $(top_srcdir)/../libs/gmp/ac/withenable.ac \ $(top_srcdir)/../libs/cairo/ac/withenable.ac \ diff --git a/Build/source/utils/aclocal.m4 b/Build/source/utils/aclocal.m4 index 023c395f2e4..e17f1337fed 100644 --- a/Build/source/utils/aclocal.m4 +++ b/Build/source/utils/aclocal.m4 @@ -1189,7 +1189,6 @@ m4_include([../m4/kpse-mpfr-flags.m4]) m4_include([../m4/kpse-options.m4]) m4_include([../m4/kpse-pixman-flags.m4]) m4_include([../m4/kpse-pkgs.m4]) -m4_include([../m4/kpse-poppler-flags.m4]) m4_include([../m4/kpse-ptexenc-flags.m4]) m4_include([../m4/kpse-setup.m4]) m4_include([../m4/kpse-teckit-flags.m4]) diff --git a/Build/source/utils/configure b/Build/source/utils/configure index f4e5171632d..e26daa55fb9 100755 --- a/Build/source/utils/configure +++ b/Build/source/utils/configure @@ -812,8 +812,6 @@ with_system_icu with_system_teckit with_system_graphite2 with_system_zziplib -with_system_xpdf -with_system_poppler with_system_mpfr with_mpfr_includes with_mpfr_libdir @@ -1642,10 +1640,6 @@ Optional Packages: (requires pkg-config) --with-system-zziplib use installed zziplib headers and library (requires pkg-config) - --with-system-xpdf use installed poppler headers and library instead of - xpdf library from TL (requires pkg-config) - --with-system-poppler use installed poppler headers and library (requires - pkg-config) --with-system-mpfr use installed mpfr headers and library --with-mpfr-includes=DIR mpfr headers installed in DIR @@ -4007,7 +4001,7 @@ if test "${enable_xetex_synctex+set}" = set; then : fi test "x$enable_web2c:$enable_xetex" = xyes:yes && { - need_poppler=yes + need_pplib=yes need_libpng=yes need_freetype2=yes need_teckit=yes @@ -5119,11 +5113,7 @@ test "x$need_zziplib" = xyes && { ## libs/xpdf/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/xpdf/ ## configure options and TL libraries required for xpdf - -# Check whether --with-system-xpdf was given. -if test "${with_system_xpdf+set}" = set; then : - withval=$with_system_xpdf; -fi +: "kpse_xpdf_options - no-op" if test "x$with_system_xpdf" = x; then if test -f $srcdir/../libs/xpdf/configure; then { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`xpdf' headers and library from TL tree" >&5 @@ -5137,40 +5127,6 @@ $as_echo "$as_me: Assuming installed \`xpdf' headers and library" >&6;} ac_configure_args="$ac_configure_args '--with-system-xpdf=$with_system_xpdf'" fi -## libs/poppler/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/poppler/ -## configure options and TL libraries required for poppler - -# Check whether --with-system-poppler was given. -if test "${with_system_poppler+set}" = set; then : - withval=$with_system_poppler; -fi -if test "x$with_system_poppler" = x; then - if test -f $srcdir/../libs/poppler/configure; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`poppler' headers and library from TL tree" >&5 -$as_echo "$as_me: Assuming \`poppler' headers and library from TL tree" >&6;} - with_system_poppler=no - else - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming installed \`poppler' headers and library" >&5 -$as_echo "$as_me: Assuming installed \`poppler' headers and library" >&6;} - with_system_poppler=yes - fi - ac_configure_args="$ac_configure_args '--with-system-poppler=$with_system_poppler'" -fi -if test "x$with_system_poppler" = xyes; then - if test "x$with_system_zlib" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: -> installed \`zlib' headers and library" >&5 -$as_echo "$as_me: -> installed \`zlib' headers and library" >&6;} - with_system_zlib=yes - ac_configure_args="$ac_configure_args '--with-system-zlib'" - elif test "x$with_system_zlib" != xyes; then - as_fn_error $? "Sorry, \`--with-system-poppler' requires \`--with-system-zlib'" "$LINENO" 5 - fi -fi - -test "x$need_poppler" = xyes && { - need_zlib=yes -} - ## libs/mpfr/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/mpfr/ ## configure options and TL libraries required for mpfr -- cgit v1.2.3