diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:06:44 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:06:44 +0000 |
commit | ed5640d8b587fbcfed7dd7967f3de04b37a76f26 (patch) | |
tree | 7a5f7c6c9d02226d7471cb3cc8fbbf631b415303 /external/pdfium | |
parent | Initial commit. (diff) | |
download | libreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.tar.xz libreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.zip |
Adding upstream version 4:7.4.7.upstream/4%7.4.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'external/pdfium')
-rw-r--r-- | external/pdfium/AndroidNDK19.patch.1 | 16 | ||||
-rw-r--r-- | external/pdfium/Library_pdfium.mk | 733 | ||||
-rw-r--r-- | external/pdfium/Makefile | 7 | ||||
-rw-r--r-- | external/pdfium/Module_pdfium.mk | 17 | ||||
-rw-r--r-- | external/pdfium/README | 17 | ||||
-rw-r--r-- | external/pdfium/UnpackedTarball_pdfium.mk | 61 | ||||
-rw-r--r-- | external/pdfium/build.patch.1 | 147 | ||||
-rw-r--r-- | external/pdfium/c++20-comparison.patch | 13 | ||||
-rw-r--r-- | external/pdfium/cg-instead-of-carbon.patch.1 | 23 | ||||
-rw-r--r-- | external/pdfium/gcc-c++20-comparison.patch | 18 | ||||
-rw-r--r-- | external/pdfium/inc/pch/precompiled_pdfium.cxx | 12 | ||||
-rw-r--r-- | external/pdfium/inc/pch/precompiled_pdfium.hxx | 496 | ||||
-rw-r--r-- | external/pdfium/include.patch | 11 | ||||
-rw-r--r-- | external/pdfium/ubsan.patch | 24 | ||||
-rw-r--r-- | external/pdfium/windows7.patch.1 | 34 |
15 files changed, 1629 insertions, 0 deletions
diff --git a/external/pdfium/AndroidNDK19.patch.1 b/external/pdfium/AndroidNDK19.patch.1 new file mode 100644 index 000000000..f0d926f55 --- /dev/null +++ b/external/pdfium/AndroidNDK19.patch.1 @@ -0,0 +1,16 @@ +diff -Naur pdfium.org/third_party/base/allocator/partition_allocator/page_allocator_internals_posix.h pdfium/third_party/base/allocator/partition_allocator/page_allocator_internals_posix.h +--- pdfium.org/third_party/base/allocator/partition_allocator/page_allocator_internals_posix.h 2021-05-05 23:01:25.705057178 +0200 ++++ pdfium/third_party/base/allocator/partition_allocator/page_allocator_internals_posix.h 2021-05-05 23:06:52.194081762 +0200 +@@ -15,6 +15,12 @@ + #endif + #if BUILDFLAG(IS_ANDROID) + #include <sys/prctl.h> ++#ifndef PR_SET_VMA ++#define PR_SET_VMA 0x53564d41 ++#endif ++#ifndef PR_SET_VMA_ANON_NAME ++#define PR_SET_VMA_ANON_NAME 0 ++#endif + #endif + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) + #include <sys/resource.h> diff --git a/external/pdfium/Library_pdfium.mk b/external/pdfium/Library_pdfium.mk new file mode 100644 index 000000000..57f676934 --- /dev/null +++ b/external/pdfium/Library_pdfium.mk @@ -0,0 +1,733 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_Library_Library,pdfium)) + +$(eval $(call gb_Library_use_unpacked,pdfium,pdfium)) + +$(eval $(call gb_Library_set_warnings_disabled,pdfium)) + +$(eval $(call gb_Library_set_precompiled_header,pdfium,external/pdfium/inc/pch/precompiled_pdfium)) + +$(eval $(call gb_Library_set_include,pdfium,\ + -I$(call gb_UnpackedTarball_get_dir,pdfium) \ + -I$(call gb_UnpackedTarball_get_dir,pdfium)/third_party \ + -I$(call gb_UnpackedTarball_get_dir,pdfium)/third_party/agg23 \ + $(if $(filter TRUE,$(SYSTEM_ABSEIL)),$(ABSEIL_CFLAGS),-I$(call gb_UnpackedTarball_get_dir,pdfium)/third_party/abseil-cpp) \ + $(if $(filter TRUE,$(SYSTEM_OPENJPEG2)),$(OPENJPEG2_CFLAGS)) \ + $$(INCLUDE) \ +)) + +$(eval $(call gb_Library_add_defs,pdfium,\ + -DFPDF_IMPLEMENTATION \ + -DUSE_SYSTEM_LCMS2 \ + -DUSE_SYSTEM_LIBJPEG \ + -DUSE_SYSTEM_ZLIB \ + -DUSE_SYSTEM_ICUUC \ + -DMEMORY_TOOL_REPLACES_ALLOCATOR \ + -DUNICODE \ + -DWIN32_LEAN_AND_MEAN \ + -DCOMPONENT_BUILD \ +)) +ifeq ($(SYSTEM_OPENJPEG2),TRUE) +$(eval $(call gb_Library_add_defs,pdfium,\ + -DUSE_SYSTEM_LIBOPENJPEG2 \ +)) +endif + + +$(eval $(call gb_Library_set_generated_cxx_suffix,pdfium,cpp)) + +# pdfium +$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ + UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_annot \ + UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_annotiteration \ + UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_baannot \ + UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_formfillenvironment \ + UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_pageview \ + UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_widget \ + UnpackedTarball/pdfium/fpdfsdk/fpdf_dataavail \ + UnpackedTarball/pdfium/fpdfsdk/fpdf_ext \ + UnpackedTarball/pdfium/fpdfsdk/fpdf_flatten \ + UnpackedTarball/pdfium/fpdfsdk/fpdf_progressive \ + UnpackedTarball/pdfium/fpdfsdk/fpdf_searchex \ + UnpackedTarball/pdfium/fpdfsdk/fpdf_structtree \ + UnpackedTarball/pdfium/fpdfsdk/fpdf_sysfontinfo \ + UnpackedTarball/pdfium/fpdfsdk/fpdf_transformpage \ + UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_annotiterator \ + UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_customaccess \ + UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_filewriteadapter \ + UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_helpers \ + UnpackedTarball/pdfium/fpdfsdk/fpdf_annot \ + UnpackedTarball/pdfium/fpdfsdk/fpdf_attachment \ + UnpackedTarball/pdfium/fpdfsdk/fpdf_catalog \ + UnpackedTarball/pdfium/fpdfsdk/fpdf_doc \ + UnpackedTarball/pdfium/fpdfsdk/fpdf_editimg \ + UnpackedTarball/pdfium/fpdfsdk/fpdf_editpage \ + UnpackedTarball/pdfium/fpdfsdk/fpdf_editpath \ + UnpackedTarball/pdfium/fpdfsdk/fpdf_edittext \ + UnpackedTarball/pdfium/fpdfsdk/fpdf_formfill \ + UnpackedTarball/pdfium/fpdfsdk/fpdf_save \ + UnpackedTarball/pdfium/fpdfsdk/fpdf_text \ + UnpackedTarball/pdfium/fpdfsdk/fpdf_view \ + UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_pauseadapter \ + UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_interactiveform \ + UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_renderpage \ + UnpackedTarball/pdfium/fpdfsdk/fpdf_signature \ + UnpackedTarball/pdfium/constants/annotation_common \ + UnpackedTarball/pdfium/constants/appearance \ + UnpackedTarball/pdfium/constants/form_fields \ + UnpackedTarball/pdfium/constants/page_object \ + UnpackedTarball/pdfium/constants/stream_dict_common \ + UnpackedTarball/pdfium/constants/transparency \ + UnpackedTarball/pdfium/constants/font_encodings \ +)) + +# fdrm +$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ + UnpackedTarball/pdfium/core/fdrm/fx_crypt \ + UnpackedTarball/pdfium/core/fdrm/fx_crypt_aes \ + UnpackedTarball/pdfium/core/fdrm/fx_crypt_sha \ +)) + +# formfiller +$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ + UnpackedTarball/pdfium/fpdfsdk/formfiller/cffl_checkbox \ + UnpackedTarball/pdfium/fpdfsdk/formfiller/cffl_combobox \ + UnpackedTarball/pdfium/fpdfsdk/formfiller/cffl_formfield \ + UnpackedTarball/pdfium/fpdfsdk/formfiller/cffl_interactiveformfiller \ + UnpackedTarball/pdfium/fpdfsdk/formfiller/cffl_listbox \ + UnpackedTarball/pdfium/fpdfsdk/formfiller/cffl_pushbutton \ + UnpackedTarball/pdfium/fpdfsdk/formfiller/cffl_radiobutton \ + UnpackedTarball/pdfium/fpdfsdk/formfiller/cffl_textfield \ + UnpackedTarball/pdfium/fpdfsdk/formfiller/cffl_button \ + UnpackedTarball/pdfium/fpdfsdk/formfiller/cffl_textobject \ + UnpackedTarball/pdfium/fpdfsdk/formfiller/cffl_fieldaction \ + UnpackedTarball/pdfium/fpdfsdk/formfiller/cffl_perwindowdata \ +)) + +# fpdfapi +$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/CNS1/Adobe-CNS1-UCS2_5 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/CNS1/B5pc-H_0 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/CNS1/B5pc-V_0 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/CNS1/CNS-EUC-H_0 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/CNS1/CNS-EUC-V_0 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/CNS1/ETen-B5-H_0 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/CNS1/ETen-B5-V_0 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/CNS1/ETenms-B5-H_0 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/CNS1/ETenms-B5-V_0 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/CNS1/HKscs-B5-H_5 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/CNS1/HKscs-B5-V_5 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/CNS1/UniCNS-UCS2-H_3 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/CNS1/UniCNS-UCS2-V_3 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/CNS1/UniCNS-UTF16-H_0 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/CNS1/cmaps_cns1 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/GB1/Adobe-GB1-UCS2_5 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/GB1/GB-EUC-H_0 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/GB1/GB-EUC-V_0 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/GB1/GBK-EUC-H_2 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/GB1/GBK-EUC-V_2 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/GB1/GBK2K-H_5 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/GB1/GBK2K-V_5 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/GB1/GBKp-EUC-H_2 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/GB1/GBKp-EUC-V_2 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/GB1/GBpc-EUC-H_0 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/GB1/GBpc-EUC-V_0 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/GB1/UniGB-UCS2-H_4 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/GB1/UniGB-UCS2-V_4 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/GB1/cmaps_gb1 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/Japan1/83pv-RKSJ-H_1 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/Japan1/90ms-RKSJ-H_2 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/Japan1/90ms-RKSJ-V_2 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/Japan1/90msp-RKSJ-H_2 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/Japan1/90msp-RKSJ-V_2 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/Japan1/90pv-RKSJ-H_1 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/Japan1/Add-RKSJ-H_1 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/Japan1/Add-RKSJ-V_1 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/Japan1/Adobe-Japan1-UCS2_4 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/Japan1/EUC-H_1 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/Japan1/EUC-V_1 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/Japan1/Ext-RKSJ-H_2 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/Japan1/Ext-RKSJ-V_2 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/Japan1/H_1 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/Japan1/UniJIS-UCS2-HW-H_4 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/Japan1/UniJIS-UCS2-HW-V_4 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/Japan1/UniJIS-UCS2-H_4 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/Japan1/UniJIS-UCS2-V_4 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/Japan1/V_1 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/Japan1/cmaps_japan1 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/Korea1/Adobe-Korea1-UCS2_2 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/Korea1/KSC-EUC-H_0 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/Korea1/KSC-EUC-V_0 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/Korea1/KSCms-UHC-HW-H_1 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/Korea1/KSCms-UHC-HW-V_1 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/Korea1/KSCms-UHC-H_1 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/Korea1/KSCms-UHC-V_1 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/Korea1/KSCpc-EUC-H_0 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/Korea1/UniKS-UCS2-H_1 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/Korea1/UniKS-UCS2-V_1 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/Korea1/UniKS-UTF16-H_0 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/Korea1/cmaps_korea1 \ + UnpackedTarball/pdfium/core/fpdfapi/cmaps/fpdf_cmaps \ + UnpackedTarball/pdfium/core/fpdfapi/edit/cpdf_pagecontentgenerator \ + UnpackedTarball/pdfium/core/fpdfapi/font/cpdf_cidfont \ + UnpackedTarball/pdfium/core/fpdfapi/font/cpdf_font \ + UnpackedTarball/pdfium/core/fpdfapi/font/cpdf_fontencoding \ + UnpackedTarball/pdfium/core/fpdfapi/font/cpdf_simplefont \ + UnpackedTarball/pdfium/core/fpdfapi/font/cpdf_truetypefont \ + UnpackedTarball/pdfium/core/fpdfapi/font/cpdf_type1font \ + UnpackedTarball/pdfium/core/fpdfapi/font/cpdf_type3char \ + UnpackedTarball/pdfium/core/fpdfapi/font/cpdf_type3font \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_allstates \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_clippath \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_color \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_colorspace \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_colorstate \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_contentmarks \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_contentmarkitem \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_contentparser \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_docpagedata \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_form \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_formobject \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_generalstate \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_graphicstates \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_image \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_imageobject \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_meshstream \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_page \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_pagemodule \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_pageobject \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_pageobjectholder \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_path \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_pathobject \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_pattern \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_shadingobject \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_shadingpattern \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_streamcontentparser \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_streamparser \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_textobject \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_textstate \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_tilingpattern \ + UnpackedTarball/pdfium/core/fpdfapi/parser/cfdf_document \ + UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_array \ + UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_boolean \ + UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_crypto_handler \ + UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_data_avail \ + UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_dictionary \ + UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_document \ + UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_hint_tables \ + UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_indirect_object_holder \ + UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_linearized_header \ + UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_name \ + UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_null \ + UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_number \ + UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_object \ + UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_parser \ + UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_reference \ + UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_security_handler \ + UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_simple_parser \ + UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_stream \ + UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_stream_acc \ + UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_string \ + UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_syntax_parser \ + UnpackedTarball/pdfium/core/fpdfapi/parser/fpdf_parser_decode \ + UnpackedTarball/pdfium/core/fpdfapi/parser/fpdf_parser_utility \ + UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_object_walker \ + UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_read_validator \ + UnpackedTarball/pdfium/core/fpdfapi/render/charposlist \ + UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_devicebuffer \ + UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_docrenderdata \ + UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_imagecacheentry \ + UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_imageloader \ + UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_imagerenderer \ + UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_pagerendercache \ + UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_progressiverenderer \ + UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_rendercontext \ + UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_renderoptions \ + UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_renderstatus \ + UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_scaledrenderbuffer \ + UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_textrenderer \ + UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_type3cache \ + UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_type3glyphmap \ + UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_rendershading \ + UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_rendertiling \ + UnpackedTarball/pdfium/core/fpdfapi/edit/cpdf_creator \ + UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_encryptor \ + UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_flateencoder \ + UnpackedTarball/pdfium/core/fpdfapi/font/cfx_cttgsubtable \ + UnpackedTarball/pdfium/core/fpdfapi/font/cfx_stockfontarray \ + UnpackedTarball/pdfium/core/fpdfapi/font/cpdf_cid2unicodemap \ + UnpackedTarball/pdfium/core/fpdfapi/font/cpdf_cmap \ + UnpackedTarball/pdfium/core/fpdfapi/font/cpdf_cmapparser \ + UnpackedTarball/pdfium/core/fpdfapi/font/cpdf_fontglobals \ + UnpackedTarball/pdfium/core/fpdfapi/font/cpdf_tounicodemap \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_devicecs \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_expintfunc \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_function \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_iccprofile \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_patterncs \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_psengine \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_psfunc \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_sampledfunc \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_stitchfunc \ + UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_object_avail \ + UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_page_object_avail \ + UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_cross_ref_avail \ + UnpackedTarball/pdfium/core/fpdfapi/edit/cpdf_pagecontentmanager \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_transparency \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_dib \ + UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_object_stream \ + UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_cross_ref_table \ + UnpackedTarball/pdfium/core/fpdfapi/edit/cpdf_stringarchivestream \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_occontext \ + UnpackedTarball/pdfium/core/fpdfapi/edit/cpdf_contentstream_write_utils \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_annotcontext \ + UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_pagerendercontext \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_transferfuncdib \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_transferfunc \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_basedcs \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_indexedcs \ +)) + +# fpdfdoc +$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ + UnpackedTarball/pdfium/core/fpdfdoc/cpdf_aaction \ + UnpackedTarball/pdfium/core/fpdfdoc/cpdf_action \ + UnpackedTarball/pdfium/core/fpdfdoc/cpdf_annot \ + UnpackedTarball/pdfium/core/fpdfdoc/cpdf_annotlist \ + UnpackedTarball/pdfium/core/fpdfdoc/cpdf_apsettings \ + UnpackedTarball/pdfium/core/fpdfdoc/cpdf_bookmark \ + UnpackedTarball/pdfium/core/fpdfdoc/cpdf_bookmarktree \ + UnpackedTarball/pdfium/core/fpdfdoc/cpdf_defaultappearance \ + UnpackedTarball/pdfium/core/fpdfdoc/cpdf_dest \ + UnpackedTarball/pdfium/core/fpdfdoc/cpdf_filespec \ + UnpackedTarball/pdfium/core/fpdfdoc/cpdf_formcontrol \ + UnpackedTarball/pdfium/core/fpdfdoc/cpdf_formfield \ + UnpackedTarball/pdfium/core/fpdfdoc/cpdf_iconfit \ + UnpackedTarball/pdfium/core/fpdfdoc/cpdf_interactiveform \ + UnpackedTarball/pdfium/core/fpdfdoc/cpdf_link \ + UnpackedTarball/pdfium/core/fpdfdoc/cpdf_linklist \ + UnpackedTarball/pdfium/core/fpdfdoc/cpdf_metadata \ + UnpackedTarball/pdfium/core/fpdfdoc/cpdf_nametree \ + UnpackedTarball/pdfium/core/fpdfdoc/cpdf_numbertree \ + UnpackedTarball/pdfium/core/fpdfdoc/cpdf_pagelabel \ + UnpackedTarball/pdfium/core/fpdfdoc/cpdf_viewerpreferences \ + UnpackedTarball/pdfium/core/fpdfdoc/cpvt_fontmap \ + UnpackedTarball/pdfium/core/fpdfdoc/cpvt_wordinfo \ + UnpackedTarball/pdfium/core/fpdfdoc/cpdf_structelement \ + UnpackedTarball/pdfium/core/fpdfdoc/cpdf_structtree \ + UnpackedTarball/pdfium/core/fpdfdoc/cpdf_color_utils \ + UnpackedTarball/pdfium/core/fpdfdoc/cpdf_icon \ + UnpackedTarball/pdfium/core/fpdfdoc/cpdf_bafontmap \ + UnpackedTarball/pdfium/core/fpdfdoc/cpdf_generateap \ + UnpackedTarball/pdfium/core/fpdfdoc/cpvt_section \ + UnpackedTarball/pdfium/core/fpdfdoc/cpvt_variabletext \ +)) + +# fpdftext +$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ + UnpackedTarball/pdfium/core/fpdftext/cpdf_linkextract \ + UnpackedTarball/pdfium/core/fpdftext/cpdf_textpage \ + UnpackedTarball/pdfium/core/fpdftext/cpdf_textpagefind \ + UnpackedTarball/pdfium/core/fpdftext/unicodenormalizationdata \ +)) + +# fxcodec +$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ + UnpackedTarball/pdfium/core/fxcodec/fx_codec \ + UnpackedTarball/pdfium/core/fxcodec/jbig2/JBig2_ArithDecoder \ + UnpackedTarball/pdfium/core/fxcodec/jbig2/JBig2_ArithIntDecoder \ + UnpackedTarball/pdfium/core/fxcodec/jbig2/JBig2_BitStream \ + UnpackedTarball/pdfium/core/fxcodec/jbig2/JBig2_Context \ + UnpackedTarball/pdfium/core/fxcodec/jbig2/JBig2_GrdProc \ + UnpackedTarball/pdfium/core/fxcodec/jbig2/JBig2_GrrdProc \ + UnpackedTarball/pdfium/core/fxcodec/jbig2/JBig2_HtrdProc \ + UnpackedTarball/pdfium/core/fxcodec/jbig2/JBig2_HuffmanDecoder \ + UnpackedTarball/pdfium/core/fxcodec/jbig2/JBig2_HuffmanTable \ + UnpackedTarball/pdfium/core/fxcodec/jbig2/JBig2_Image \ + UnpackedTarball/pdfium/core/fxcodec/jbig2/JBig2_PatternDict \ + UnpackedTarball/pdfium/core/fxcodec/jbig2/JBig2_PddProc \ + UnpackedTarball/pdfium/core/fxcodec/jbig2/JBig2_SddProc \ + UnpackedTarball/pdfium/core/fxcodec/jbig2/JBig2_Segment \ + UnpackedTarball/pdfium/core/fxcodec/jbig2/JBig2_SymbolDict \ + UnpackedTarball/pdfium/core/fxcodec/jbig2/JBig2_TrdProc \ + UnpackedTarball/pdfium/core/fxcodec/gif/cfx_gif \ + UnpackedTarball/pdfium/core/fxcodec/gif/lzw_decompressor \ + UnpackedTarball/pdfium/core/fxcodec/cfx_codec_memory \ + UnpackedTarball/pdfium/core/fxcodec/fax/faxmodule \ + UnpackedTarball/pdfium/core/fxcodec/scanlinedecoder \ + UnpackedTarball/pdfium/core/fxcodec/jpeg/jpegmodule \ + UnpackedTarball/pdfium/core/fxcodec/jpx/cjpx_decoder \ + UnpackedTarball/pdfium/core/fxcodec/jpx/jpx_decode_utils \ + UnpackedTarball/pdfium/core/fxcodec/jbig2/JBig2_DocumentContext \ + UnpackedTarball/pdfium/core/fxcodec/basic/basicmodule \ + UnpackedTarball/pdfium/core/fxcodec/flate/flatemodule \ + UnpackedTarball/pdfium/core/fxcodec/icc/icc_transform \ + UnpackedTarball/pdfium/core/fxcodec/jbig2/jbig2_decoder \ + UnpackedTarball/pdfium/core/fxcodec/jpeg/jpeg_common \ +)) + +# fxcrt +$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ + UnpackedTarball/pdfium/core/fxcrt/cfx_memorystream \ + UnpackedTarball/pdfium/core/fxcrt/cfx_seekablestreamproxy \ + UnpackedTarball/pdfium/core/fxcrt/fx_bidi \ + UnpackedTarball/pdfium/core/fxcrt/fx_coordinates \ + UnpackedTarball/pdfium/core/fxcrt/fx_extension \ + UnpackedTarball/pdfium/core/fxcrt/fx_memory \ + UnpackedTarball/pdfium/core/fxcrt/fx_stream \ + UnpackedTarball/pdfium/core/fxcrt/fx_system \ + UnpackedTarball/pdfium/core/fxcrt/fx_unicode \ + UnpackedTarball/pdfium/core/fxcrt/xml/cfx_xmldocument \ + UnpackedTarball/pdfium/core/fxcrt/xml/cfx_xmlelement \ + UnpackedTarball/pdfium/core/fxcrt/xml/cfx_xmlparser \ + UnpackedTarball/pdfium/core/fxcrt/xml/cfx_xmlnode \ + UnpackedTarball/pdfium/core/fxcrt/xml/cfx_xmlinstruction \ + UnpackedTarball/pdfium/core/fxcrt/xml/cfx_xmltext \ + UnpackedTarball/pdfium/core/fxcrt/xml/cfx_xmlchardata \ + UnpackedTarball/pdfium/core/fxcrt/css/cfx_csscolorvalue \ + UnpackedTarball/pdfium/core/fxcrt/css/cfx_csscomputedstyle \ + UnpackedTarball/pdfium/core/fxcrt/css/cfx_csscustomproperty \ + UnpackedTarball/pdfium/core/fxcrt/css/cfx_cssdeclaration \ + UnpackedTarball/pdfium/core/fxcrt/css/cfx_cssenumvalue \ + UnpackedTarball/pdfium/core/fxcrt/css/cfx_cssnumbervalue \ + UnpackedTarball/pdfium/core/fxcrt/css/cfx_csspropertyholder \ + UnpackedTarball/pdfium/core/fxcrt/css/cfx_cssrulecollection \ + UnpackedTarball/pdfium/core/fxcrt/css/cfx_cssselector \ + UnpackedTarball/pdfium/core/fxcrt/css/cfx_cssstringvalue \ + UnpackedTarball/pdfium/core/fxcrt/css/cfx_cssstylerule \ + UnpackedTarball/pdfium/core/fxcrt/css/cfx_cssstyleselector \ + UnpackedTarball/pdfium/core/fxcrt/css/cfx_cssstylesheet \ + UnpackedTarball/pdfium/core/fxcrt/css/cfx_csssyntaxparser \ + UnpackedTarball/pdfium/core/fxcrt/css/cfx_cssvalue \ + UnpackedTarball/pdfium/core/fxcrt/css/cfx_cssvaluelist \ + UnpackedTarball/pdfium/core/fxcrt/css/cfx_cssvaluelistparser \ + UnpackedTarball/pdfium/core/fxcrt/css/cfx_cssinputtextbuf \ + UnpackedTarball/pdfium/core/fxcrt/css/cfx_cssoutputtextbuf \ + UnpackedTarball/pdfium/core/fxcrt/cfx_datetime \ + UnpackedTarball/pdfium/core/fxcrt/bytestring \ + UnpackedTarball/pdfium/core/fxcrt/cfx_binarybuf \ + UnpackedTarball/pdfium/core/fxcrt/cfx_bitstream \ + UnpackedTarball/pdfium/core/fxcrt/cfx_utf8decoder \ + UnpackedTarball/pdfium/core/fxcrt/cfx_widetextbuf \ + UnpackedTarball/pdfium/core/fxcrt/fx_random \ + UnpackedTarball/pdfium/core/fxcrt/fx_string \ + UnpackedTarball/pdfium/core/fxcrt/widestring \ + UnpackedTarball/pdfium/core/fxcrt/css/cfx_cssdata \ + UnpackedTarball/pdfium/core/fxcrt/fx_codepage \ + UnpackedTarball/pdfium/core/fxcrt/fx_number \ + UnpackedTarball/pdfium/core/fxcrt/cfx_utf8encoder \ + UnpackedTarball/pdfium/core/fxcrt/cfx_readonlymemorystream \ + UnpackedTarball/pdfium/core/fxcrt/observed_ptr \ + UnpackedTarball/pdfium/core/fxcrt/string_data_template \ +)) + +# fxge +$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ + UnpackedTarball/pdfium/core/fxge/dib/cfx_bitmapcomposer \ + UnpackedTarball/pdfium/core/fxge/dib/cfx_bitmapstorer \ + UnpackedTarball/pdfium/core/fxge/dib/cfx_dibextractor \ + UnpackedTarball/pdfium/core/fxge/dib/cfx_dibitmap \ + UnpackedTarball/pdfium/core/fxge/cfx_drawutils \ + UnpackedTarball/pdfium/core/fxge/dib/cfx_imagerenderer \ + UnpackedTarball/pdfium/core/fxge/dib/cfx_imagestretcher \ + UnpackedTarball/pdfium/core/fxge/dib/cfx_imagetransformer \ + UnpackedTarball/pdfium/core/fxge/dib/cfx_scanlinecompositor \ + UnpackedTarball/pdfium/core/fxge/dib/cstretchengine \ + UnpackedTarball/pdfium/core/fxge/dib/fx_dib \ + UnpackedTarball/pdfium/core/fxge/fontdata/chromefontdata/FoxitDingbats \ + UnpackedTarball/pdfium/core/fxge/fontdata/chromefontdata/FoxitFixed \ + UnpackedTarball/pdfium/core/fxge/fontdata/chromefontdata/FoxitFixedBold \ + UnpackedTarball/pdfium/core/fxge/fontdata/chromefontdata/FoxitFixedBoldItalic \ + UnpackedTarball/pdfium/core/fxge/fontdata/chromefontdata/FoxitFixedItalic \ + UnpackedTarball/pdfium/core/fxge/fontdata/chromefontdata/FoxitSans \ + UnpackedTarball/pdfium/core/fxge/fontdata/chromefontdata/FoxitSansBold \ + UnpackedTarball/pdfium/core/fxge/fontdata/chromefontdata/FoxitSansBoldItalic \ + UnpackedTarball/pdfium/core/fxge/fontdata/chromefontdata/FoxitSansItalic \ + UnpackedTarball/pdfium/core/fxge/fontdata/chromefontdata/FoxitSansMM \ + UnpackedTarball/pdfium/core/fxge/fontdata/chromefontdata/FoxitSerif \ + UnpackedTarball/pdfium/core/fxge/fontdata/chromefontdata/FoxitSerifBold \ + UnpackedTarball/pdfium/core/fxge/fontdata/chromefontdata/FoxitSerifBoldItalic \ + UnpackedTarball/pdfium/core/fxge/fontdata/chromefontdata/FoxitSerifItalic \ + UnpackedTarball/pdfium/core/fxge/fontdata/chromefontdata/FoxitSerifMM \ + UnpackedTarball/pdfium/core/fxge/fontdata/chromefontdata/FoxitSymbol \ + UnpackedTarball/pdfium/core/fxge/freetype/fx_freetype \ + UnpackedTarball/pdfium/core/fxge/renderdevicedriver_iface \ + UnpackedTarball/pdfium/core/fxge/agg/fx_agg_driver \ + UnpackedTarball/pdfium/core/fxge/cfx_cliprgn \ + UnpackedTarball/pdfium/core/fxge/cfx_color \ + UnpackedTarball/pdfium/core/fxge/cfx_glyphcache \ + UnpackedTarball/pdfium/core/fxge/cfx_folderfontinfo \ + UnpackedTarball/pdfium/core/fxge/cfx_font \ + UnpackedTarball/pdfium/core/fxge/cfx_fontcache \ + UnpackedTarball/pdfium/core/fxge/cfx_fontmapper \ + UnpackedTarball/pdfium/core/fxge/cfx_fontmgr \ + UnpackedTarball/pdfium/core/fxge/cfx_gemodule \ + UnpackedTarball/pdfium/core/fxge/cfx_graphstate \ + UnpackedTarball/pdfium/core/fxge/cfx_graphstatedata \ + UnpackedTarball/pdfium/core/fxge/cfx_path \ + UnpackedTarball/pdfium/core/fxge/cfx_renderdevice \ + UnpackedTarball/pdfium/core/fxge/cfx_substfont \ + UnpackedTarball/pdfium/core/fxge/cfx_unicodeencoding \ + UnpackedTarball/pdfium/core/fxge/cfx_glyphbitmap \ + UnpackedTarball/pdfium/core/fxge/scoped_font_transform \ + UnpackedTarball/pdfium/core/fxge/text_glyph_pos \ + UnpackedTarball/pdfium/core/fxge/fx_font \ + UnpackedTarball/pdfium/core/fxge/dib/cfx_dibbase \ + UnpackedTarball/pdfium/core/fxge/dib/cfx_cmyk_to_srgb \ + UnpackedTarball/pdfium/core/fxge/text_char_pos \ + UnpackedTarball/pdfium/core/fxge/cfx_face \ + UnpackedTarball/pdfium/core/fxge/calculate_pitch \ +)) + +# javascript, build with pdf_enable_v8 disabled. +$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ + UnpackedTarball/pdfium/fxjs/cjs_event_context_stub \ + UnpackedTarball/pdfium/fxjs/cjs_runtimestub \ + UnpackedTarball/pdfium/fxjs/ijs_runtime \ +)) + +# pwl +$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ + UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_appstream \ + UnpackedTarball/pdfium/fpdfsdk/pwl/cpwl_button \ + UnpackedTarball/pdfium/fpdfsdk/pwl/cpwl_caret \ + UnpackedTarball/pdfium/fpdfsdk/pwl/cpwl_combo_box \ + UnpackedTarball/pdfium/fpdfsdk/pwl/cpwl_edit \ + UnpackedTarball/pdfium/fpdfsdk/pwl/cpwl_edit_impl \ + UnpackedTarball/pdfium/fpdfsdk/pwl/cpwl_sbbutton \ + UnpackedTarball/pdfium/fpdfsdk/pwl/cpwl_list_box \ + UnpackedTarball/pdfium/fpdfsdk/pwl/cpwl_cbbutton \ + UnpackedTarball/pdfium/fpdfsdk/pwl/cpwl_cblistbox \ + UnpackedTarball/pdfium/fpdfsdk/pwl/cpwl_list_ctrl \ + UnpackedTarball/pdfium/fpdfsdk/pwl/cpwl_scroll_bar \ + UnpackedTarball/pdfium/fpdfsdk/pwl/cpwl_special_button \ + UnpackedTarball/pdfium/core/fxcrt/cfx_timer \ + UnpackedTarball/pdfium/fpdfsdk/pwl/cpwl_wnd \ +)) + +# third_party/fx_agg +$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ + UnpackedTarball/pdfium/third_party/agg23/agg_curves \ + UnpackedTarball/pdfium/third_party/agg23/agg_path_storage \ + UnpackedTarball/pdfium/third_party/agg23/agg_rasterizer_scanline_aa \ + UnpackedTarball/pdfium/third_party/agg23/agg_vcgen_dash \ + UnpackedTarball/pdfium/third_party/agg23/agg_vcgen_stroke \ +)) + +ifneq ($(SYSTEM_ABSEIL),TRUE) +# third_party/abseil-cpp +$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ + UnpackedTarball/pdfium/third_party/abseil-cpp/absl/types/bad_optional_access \ +)) +endif + +ifneq ($(SYSTEM_OPENJPEG2),TRUE) +# third_party/fx_libopenjpeg +$(eval $(call gb_Library_add_generated_cobjects,pdfium,\ + UnpackedTarball/pdfium/third_party/libopenjpeg20/bio \ + UnpackedTarball/pdfium/third_party/libopenjpeg20/cio \ + UnpackedTarball/pdfium/third_party/libopenjpeg20/dwt \ + UnpackedTarball/pdfium/third_party/libopenjpeg20/event \ + UnpackedTarball/pdfium/third_party/libopenjpeg20/function_list \ + UnpackedTarball/pdfium/third_party/libopenjpeg20/image \ + UnpackedTarball/pdfium/third_party/libopenjpeg20/invert \ + UnpackedTarball/pdfium/third_party/libopenjpeg20/j2k \ + UnpackedTarball/pdfium/third_party/libopenjpeg20/jp2 \ + UnpackedTarball/pdfium/third_party/libopenjpeg20/mct \ + UnpackedTarball/pdfium/third_party/libopenjpeg20/mqc \ + UnpackedTarball/pdfium/third_party/libopenjpeg20/openjpeg \ + UnpackedTarball/pdfium/third_party/libopenjpeg20/opj_clock \ + UnpackedTarball/pdfium/third_party/libopenjpeg20/pi \ + UnpackedTarball/pdfium/third_party/libopenjpeg20/thread \ + UnpackedTarball/pdfium/third_party/libopenjpeg20/t1 \ + UnpackedTarball/pdfium/third_party/libopenjpeg20/t2 \ + UnpackedTarball/pdfium/third_party/libopenjpeg20/tcd \ + UnpackedTarball/pdfium/third_party/libopenjpeg20/tgt \ + UnpackedTarball/pdfium/third_party/libopenjpeg20/sparse_array \ +)) + +$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ + UnpackedTarball/pdfium/third_party/libopenjpeg20/opj_malloc \ +)) +endif + +# pdfium_base +$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ + UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/address_space_randomization \ + UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/page_allocator \ + UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/spin_lock \ + UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/partition_alloc \ + UnpackedTarball/pdfium/third_party/base/debug/alias \ + UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/oom_callback \ + UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/partition_bucket \ + UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/partition_oom \ + UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/partition_page \ + UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/partition_root_base \ + UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/random \ + UnpackedTarball/pdfium/third_party/base/memory/aligned_memory \ +)) + +# skia_shared +$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ + UnpackedTarball/pdfium/third_party/skia_shared/SkFloatToDecimal \ +)) + +$(eval $(call gb_Library_use_externals,pdfium,\ + libjpeg \ + lcms2 \ + zlib \ + icu_headers \ + icuuc \ +)) + +ifneq (,$(filter LINUX ANDROID,$(OS))) +$(eval $(call gb_Library_add_libs,pdfium,\ + -ldl \ + -lrt \ +)) + +ifeq ($(SYSTEM_OPENJPEG2),TRUE) +$(eval $(call gb_Library_add_libs,pdfium,\ + $(OPENJPEG2_LIBS) \ +)) +endif + +ifeq ($(SYSTEM_ABSEIL),TRUE) +$(eval $(call gb_Library_add_libs,pdfium,\ + $(ABSEIL_LIBS) \ +)) +endif + +$(eval $(call gb_Library_use_external,pdfium,freetype)) +$(eval $(call gb_Library_add_defs,pdfium,\ + -DDEFINE_PS_TABLES_DATA \ +)) + +else +$(eval $(call gb_Library_set_include,pdfium,\ + -I$(call gb_UnpackedTarball_get_dir,pdfium)/third_party/freetype/include/ \ + -I$(call gb_UnpackedTarball_get_dir,pdfium)/third_party/freetype/src/include/ \ + $$(INCLUDE) \ +)) + +$(eval $(call gb_Library_add_defs,pdfium,\ + -DFT2_BUILD_LIBRARY \ + -DFT_CONFIG_MODULES_H='<freetype-custom-config/ftmodule.h>' \ + -DFT_CONFIG_OPTIONS_H='<freetype-custom-config/ftoption.h>' \ +)) + +# third_party/freetype +$(eval $(call gb_Library_add_generated_cobjects,pdfium,\ + UnpackedTarball/pdfium/third_party/freetype/src/src/base/ftbase \ + UnpackedTarball/pdfium/third_party/freetype/src/src/base/ftbitmap \ + UnpackedTarball/pdfium/third_party/freetype/src/src/base/ftglyph \ + UnpackedTarball/pdfium/third_party/freetype/src/src/base/ftinit \ + UnpackedTarball/pdfium/third_party/freetype/src/src/base/ftmm \ + UnpackedTarball/pdfium/third_party/freetype/src/src/base/ftsystem \ + UnpackedTarball/pdfium/third_party/freetype/src/src/cff/cff \ + UnpackedTarball/pdfium/third_party/freetype/src/src/cid/type1cid \ + UnpackedTarball/pdfium/third_party/freetype/src/src/psaux/psaux \ + UnpackedTarball/pdfium/third_party/freetype/src/src/pshinter/pshinter \ + UnpackedTarball/pdfium/third_party/freetype/src/src/psnames/psmodule \ + UnpackedTarball/pdfium/third_party/freetype/src/src/raster/raster \ + UnpackedTarball/pdfium/third_party/freetype/src/src/sfnt/sfnt \ + UnpackedTarball/pdfium/third_party/freetype/src/src/smooth/smooth \ + UnpackedTarball/pdfium/third_party/freetype/src/src/truetype/truetype \ + UnpackedTarball/pdfium/third_party/freetype/src/src/type1/type1 \ + UnpackedTarball/pdfium/third_party/freetype/src/src/base/ftdebug \ + UnpackedTarball/pdfium/third_party/freetype/src/src/base/ftfstype \ +)) +endif + +ifneq ($(OS),WNT) +$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ + UnpackedTarball/pdfium/core/fxcrt/cfx_fileaccess_posix \ + UnpackedTarball/pdfium/core/fxcrt/fx_folder_posix \ +)) +endif + +ifeq ($(OS),WNT) +# fxge +$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ + UnpackedTarball/pdfium/core/fxge/win32/cfx_psrenderer \ + UnpackedTarball/pdfium/core/fxge/win32/cpsoutput \ + UnpackedTarball/pdfium/core/fxge/win32/cgdi_device_driver \ + UnpackedTarball/pdfium/core/fxge/win32/cgdi_display_driver \ + UnpackedTarball/pdfium/core/fxge/win32/cgdi_plus_ext \ + UnpackedTarball/pdfium/core/fxge/win32/cgdi_printer_driver \ + UnpackedTarball/pdfium/core/fxge/win32/cps_printer_driver \ + UnpackedTarball/pdfium/core/fxge/win32/ctext_only_printer_driver \ + UnpackedTarball/pdfium/core/fxge/win32/cwin32_platform \ + UnpackedTarball/pdfium/core/fxge/win32/cfx_psfonttracker \ + UnpackedTarball/pdfium/core/fxge/cfx_windowsrenderdevice \ + UnpackedTarball/pdfium/core/fxcrt/cfx_fileaccess_windows \ + UnpackedTarball/pdfium/core/fxcrt/fx_folder_windows \ + UnpackedTarball/pdfium/third_party/base/win/win_util \ + UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_windowsrenderdevice \ +)) + +$(eval $(call gb_Library_use_system_win32_libs,pdfium,\ + gdi32 \ +)) + +$(eval $(call gb_Library_add_defs,pdfium,\ + -DWIN32 \ +)) +endif + +ifeq ($(OS),MACOSX) +# fxge +$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ + UnpackedTarball/pdfium/core/fxge/apple/fx_apple_platform \ + UnpackedTarball/pdfium/core/fxge/apple/fx_apple_impl \ + UnpackedTarball/pdfium/core/fxge/apple/fx_quartz_device \ +)) + +$(eval $(call gb_Library_use_system_darwin_frameworks,pdfium,\ + AppKit \ + CoreFoundation \ +)) +endif + +ifeq ($(OS),iOS) +# fxge +$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ + UnpackedTarball/pdfium/core/fxge/apple/fx_apple_platform \ + UnpackedTarball/pdfium/core/fxge/apple/fx_apple_impl \ + UnpackedTarball/pdfium/core/fxge/apple/fx_quartz_device \ +)) + +$(eval $(call gb_Library_use_system_darwin_frameworks,pdfium,\ + CoreGraphics \ + CoreFoundation \ +)) +endif + +ifeq ($(OS),ANDROID) +# fxge +$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ + UnpackedTarball/pdfium/core/fxge/android/cfpf_skiadevicemodule \ + UnpackedTarball/pdfium/core/fxge/android/cfpf_skiafont \ + UnpackedTarball/pdfium/core/fxge/android/cfpf_skiafontmgr \ + UnpackedTarball/pdfium/core/fxge/android/cfx_androidfontinfo \ + UnpackedTarball/pdfium/core/fxge/android/fx_android_impl \ + UnpackedTarball/pdfium/core/fxge/android/cfpf_skiapathfont \ +)) +endif + +ifeq ($(OS),LINUX) +# fxge +$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ + UnpackedTarball/pdfium/core/fxge/linux/fx_linux_impl \ +)) +endif + +# vim: set noet sw=4 ts=4: diff --git a/external/pdfium/Makefile b/external/pdfium/Makefile new file mode 100644 index 000000000..e4968cf85 --- /dev/null +++ b/external/pdfium/Makefile @@ -0,0 +1,7 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- + +module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST)))) + +include $(module_directory)/../../solenv/gbuild/partial_build.mk + +# vim: set noet sw=4 ts=4: diff --git a/external/pdfium/Module_pdfium.mk b/external/pdfium/Module_pdfium.mk new file mode 100644 index 000000000..3a52d5bd0 --- /dev/null +++ b/external/pdfium/Module_pdfium.mk @@ -0,0 +1,17 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_Module_Module,pdfium)) + +$(eval $(call gb_Module_add_targets,pdfium,\ + Library_pdfium \ + UnpackedTarball_pdfium \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/external/pdfium/README b/external/pdfium/README new file mode 100644 index 000000000..2be9e8f11 --- /dev/null +++ b/external/pdfium/README @@ -0,0 +1,17 @@ +External package containing pdfium. + +"Insert -> Picture -> From File..." uses this library when a PDF file is +selected. + +https://pdfium.googlesource.com/pdfium/ + +How to update the tarball: + +version=$(git for-each-ref|grep chromium/|tail -n 1|sed 's|.*/||') +git checkout --track origin/chromium/$version +gclient sync +git archive --prefix=pdfium/ --format=tar origin/chromium/${version} > pdfium-${version}.tar +(cd ..; tar --append --file pdfium/pdfium-${version}.tar pdfium/third_party/freetype/src/include/ pdfium/third_party/freetype/src/src/) +(cd ..; tar --append --file pdfium/pdfium-${version}.tar pdfium/third_party/abseil-cpp/absl/) +(cd ..; tar --append --file pdfium/pdfium-${version}.tar pdfium/build/build_config.h pdfium/build/buildflag.h) +bzip2 pdfium-${version}.tar diff --git a/external/pdfium/UnpackedTarball_pdfium.mk b/external/pdfium/UnpackedTarball_pdfium.mk new file mode 100644 index 000000000..06b94e4d0 --- /dev/null +++ b/external/pdfium/UnpackedTarball_pdfium.mk @@ -0,0 +1,61 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +pdfium_patches := +pdfium_patches += ubsan.patch +# Fixes build on our baseline. +pdfium_patches += build.patch.1 +# Avoids Windows 8 build dependency. +pdfium_patches += windows7.patch.1 +pdfium_patches += c++20-comparison.patch +# Use CoreGraphics.h instead of Carbon.h +pdfium_patches += cg-instead-of-carbon.patch.1 +# Android NDK 19 - that is known to work well - does not have 2 defines +pdfium_patches += AndroidNDK19.patch.1 + +# Work around <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94141> "c++20 rewritten operator== +# recursive call mixing friend and external operators for template class" in GCC with +# --with-latest-c++: +pdfium_patches += gcc-c++20-comparison.patch + +pdfium_patches += include.patch + +$(eval $(call gb_UnpackedTarball_UnpackedTarball,pdfium)) + +$(eval $(call gb_UnpackedTarball_set_tarball,pdfium,$(PDFIUM_TARBALL))) + +$(eval $(call gb_UnpackedTarball_set_patchlevel,pdfium,0)) + +$(eval $(call gb_UnpackedTarball_add_patches,pdfium,\ + $(foreach patch,$(pdfium_patches),external/pdfium/$(patch)) \ +)) + +$(eval $(call gb_UnpackedTarball_set_post_action,pdfium,\ + mv third_party/bigint/BigInteger.cc third_party/bigint/BigInteger.cpp && \ + mv third_party/bigint/BigIntegerUtils.cc third_party/bigint/BigIntegerUtils.cpp && \ + mv third_party/bigint/BigUnsigned.cc third_party/bigint/BigUnsigned.cpp && \ + mv third_party/bigint/BigUnsignedInABase.cc third_party/bigint/BigUnsignedInABase.cpp && \ + mv third_party/base/allocator/partition_allocator/address_space_randomization.cc third_party/base/allocator/partition_allocator/address_space_randomization.cpp && \ + mv third_party/base/allocator/partition_allocator/page_allocator.cc third_party/base/allocator/partition_allocator/page_allocator.cpp && \ + mv third_party/base/allocator/partition_allocator/partition_alloc.cc third_party/base/allocator/partition_allocator/partition_alloc.cpp && \ + mv third_party/base/allocator/partition_allocator/spin_lock.cc third_party/base/allocator/partition_allocator/spin_lock.cpp && \ + mv third_party/base/debug/alias.cc third_party/base/debug/alias.cpp && \ + mv third_party/base/allocator/partition_allocator/oom_callback.cc third_party/base/allocator/partition_allocator/oom_callback.cpp && \ + mv third_party/base/allocator/partition_allocator/partition_bucket.cc third_party/base/allocator/partition_allocator/partition_bucket.cpp && \ + mv third_party/base/allocator/partition_allocator/partition_oom.cc third_party/base/allocator/partition_allocator/partition_oom.cpp && \ + mv third_party/base/allocator/partition_allocator/partition_page.cc third_party/base/allocator/partition_allocator/partition_page.cpp && \ + mv third_party/base/allocator/partition_allocator/partition_root_base.cc third_party/base/allocator/partition_allocator/partition_root_base.cpp && \ + mv third_party/base/allocator/partition_allocator/random.cc third_party/base/allocator/partition_allocator/random.cpp && \ + mv third_party/base/memory/aligned_memory.cc third_party/base/memory/aligned_memory.cpp && \ + mv third_party/base/win/win_util.cc third_party/base/win/win_util.cpp && \ + mv third_party/libopenjpeg20/opj_malloc.cc third_party/libopenjpeg20/opj_malloc.cpp && \ + mv third_party/abseil-cpp/absl/types/bad_optional_access.cc third_party/abseil-cpp/absl/types/bad_optional_access.cpp \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/external/pdfium/build.patch.1 b/external/pdfium/build.patch.1 new file mode 100644 index 000000000..46ea17fbc --- /dev/null +++ b/external/pdfium/build.patch.1 @@ -0,0 +1,147 @@ +-*- Mode: diff -*- +diff --git a/core/fpdfdoc/cpdf_metadata.cpp b/core/fpdfdoc/cpdf_metadata.cpp +index 323de4ffc..f11a0b0ad 100644 +--- a/core/fpdfdoc/cpdf_metadata.cpp ++++ b/core/fpdfdoc/cpdf_metadata.cpp +@@ -74,7 +74,7 @@ std::vector<UnsupportedFeature> CPDF_Metadata::CheckForSharedForm() const { + CFX_XMLParser parser(stream); + std::unique_ptr<CFX_XMLDocument> doc = parser.Parse(); + if (!doc) +- return {}; ++ return std::vector<UnsupportedFeature>(); + + std::vector<UnsupportedFeature> unsupported; + CheckForSharedFormInternal(doc->GetRoot(), &unsupported); +diff --git a/third_party/base/span.h b/third_party/base/span.h +index 0fb627ba8..f71c362e2 100644 +--- a/third_party/base/span.h ++++ b/third_party/base/span.h +@@ -214,7 +214,7 @@ class span { + // Conversions from spans of compatible types: this allows a span<T> to be + // seamlessly used as a span<const T>, but not the other way around. + template <typename U, typename = internal::EnableIfLegalSpanConversion<U, T>> +- constexpr span(const span<U>& other) : span(other.data(), other.size()) {} ++ span(const span<U>& other) : span(other.data(), other.size()) {} + span& operator=(const span& other) noexcept = default; + ~span() noexcept { + if (!size_) { +diff --git a/third_party/base/span.h b/third_party/base/span.h +index 0fb627ba8..dda1fc8bc 100644 +--- a/third_party/base/span.h ++++ b/third_party/base/span.h +@@ -204,7 +204,7 @@ class span { + // size()|. + template <typename Container, + typename = internal::EnableIfSpanCompatibleContainer<Container, T>> +- constexpr span(Container& container) ++ span(Container& container) + : span(container.data(), container.size()) {} + template < + typename Container, +diff --git a/core/fxcodec/jpx/cjpx_decoder.cpp b/core/fxcodec/jpx/cjpx_decoder.cpp +index d8875786c..bc019ebe1 100644 +--- a/core/fxcodec/jpx/cjpx_decoder.cpp ++++ b/core/fxcodec/jpx/cjpx_decoder.cpp +@@ -73,7 +73,7 @@ absl::optional<OpjImageRgbData> alloc_rgb(size_t size) { + if (!data.b) + return absl::nullopt; + +- return data; ++ return std::move(data); + } + + void sycc_to_rgb(int offset, +diff --git a/core/fxge/cfx_font.cpp b/core/fxge/cfx_font.cpp +index 8b3a72700..ea1db23f4 100644 +--- a/core/fxge/cfx_font.cpp ++++ b/core/fxge/cfx_font.cpp +@@ -47,25 +47,9 @@ struct OUTLINE_PARAMS { + // TODO(crbug.com/pdfium/1400): When FT_Done_MM_Var() is more likely to be + // available to all users in the future, remove FreeMMVar() and use + // FT_Done_MM_Var() directly. +-// +-// Use weak symbols to check if FT_Done_MM_Var() is available at runtime. +-#if !BUILDFLAG(IS_WIN) +-extern "C" __attribute__((weak)) decltype(FT_Done_MM_Var) FT_Done_MM_Var; +-#endif + + void FreeMMVar(FXFT_FaceRec* rec, FXFT_MM_VarPtr variation_desc) { +-#if BUILDFLAG(IS_WIN) +- // Assume `use_system_freetype` GN var is never set on Windows. +- constexpr bool has_ft_done_mm_var_func = true; +-#else +- static const bool has_ft_done_mm_var_func = !!FT_Done_MM_Var; +-#endif +- if (has_ft_done_mm_var_func) { +- FT_Done_MM_Var(CFX_GEModule::Get()->GetFontMgr()->GetFTLibrary(), +- variation_desc); +- } else { + FXFT_Free(rec, variation_desc); +- } + } + + FX_RECT FXRectFromFTPos(FT_Pos left, FT_Pos top, FT_Pos right, FT_Pos bottom) { +diff --git a/third_party/base/numerics/safe_conversions_impl.h b/third_party/base/numerics/safe_conversions_impl.h +index 4d8a7b7d9..d14c6dc06 100644 +--- a/third_party/base/numerics/safe_conversions_impl.h ++++ b/third_party/base/numerics/safe_conversions_impl.h +@@ -88,7 +88,7 @@ constexpr typename std::make_unsigned<T>::type SafeUnsignedAbs(T value) { + + // TODO(jschuh): Switch to std::is_constant_evaluated() once C++20 is supported. + // Alternately, the usage could be restructured for "consteval if" in C++23. +-#define IsConstantEvaluated() (__builtin_is_constant_evaluated()) ++#define IsConstantEvaluated() (false) + + // TODO(jschuh): Debug builds don't reliably propagate constants, so we restrict + // some accelerated runtime paths to release builds until this can be forced +--- pdfium/core/fpdfapi/font/cpdf_cidfont.cpp.orig 2022-05-20 09:25:52.066728467 +0000 ++++ pdfium/core/fpdfapi/font/cpdf_cidfont.cpp 2022-05-20 09:25:56.146736531 +0000 +@@ -738,7 +738,7 @@ + uint32_t maccode = CharCodeFromUnicodeForFreetypeEncoding( + FT_ENCODING_APPLE_ROMAN, name_unicode); + index = maccode ? FT_Get_Char_Index(face, maccode) +- : FT_Get_Name_Index(face, name); ++ : FT_Get_Name_Index(face, const_cast<char*>(name)); + } + if (index == 0 || index == 0xffff) + return charcode ? static_cast<int>(charcode) : -1; +--- pdfium/core/fpdfapi/font/cpdf_type1font.cpp.orig 2022-05-20 09:26:59.090862058 +0000 ++++ pdfium/core/fpdfapi/font/cpdf_type1font.cpp 2022-05-20 09:27:33.810932435 +0000 +@@ -260,7 +260,7 @@ + static_cast<uint32_t>(charcode)); + if (name) { + m_Encoding.SetUnicode(charcode, UnicodeFromAdobeName(name)); +- m_GlyphIndex[charcode] = FT_Get_Name_Index(m_Font.GetFaceRec(), name); ++ m_GlyphIndex[charcode] = FT_Get_Name_Index(m_Font.GetFaceRec(), const_cast<char*>(name)); + } else { + m_GlyphIndex[charcode] = FT_Get_Char_Index( + m_Font.GetFaceRec(), static_cast<uint32_t>(charcode)); +@@ -291,7 +291,7 @@ + continue; + + m_Encoding.SetUnicode(charcode, UnicodeFromAdobeName(name)); +- m_GlyphIndex[charcode] = FT_Get_Name_Index(m_Font.GetFaceRec(), name); ++ m_GlyphIndex[charcode] = FT_Get_Name_Index(m_Font.GetFaceRec(), const_cast<char*>(name)); + if (m_GlyphIndex[charcode] != 0) + continue; + +--- pdfium/core/fpdfapi/font/cpdf_truetypefont.cpp.orig 2022-05-20 09:26:12.066767996 +0000 ++++ pdfium/core/fpdfapi/font/cpdf_truetypefont.cpp 2022-05-20 09:26:46.690836923 +0000 +@@ -90,7 +90,7 @@ + FT_ENCODING_APPLE_ROMAN, + m_Encoding.UnicodeFromCharCode(charcode)); + if (!maccode) { +- m_GlyphIndex[charcode] = FT_Get_Name_Index(face, name); ++ m_GlyphIndex[charcode] = FT_Get_Name_Index(face, const_cast<char*>(name)); + } else { + m_GlyphIndex[charcode] = FT_Get_Char_Index(face, maccode); + } +@@ -104,7 +104,7 @@ + m_GlyphIndex[charcode] = FT_Get_Char_Index(face, 32); + continue; + } +- m_GlyphIndex[charcode] = FT_Get_Name_Index(face, name); ++ m_GlyphIndex[charcode] = FT_Get_Name_Index(face, const_cast<char*>(name)); + if (m_GlyphIndex[charcode] != 0 || !bToUnicode) + continue; + diff --git a/external/pdfium/c++20-comparison.patch b/external/pdfium/c++20-comparison.patch new file mode 100644 index 000000000..638497f6a --- /dev/null +++ b/external/pdfium/c++20-comparison.patch @@ -0,0 +1,13 @@ +--- core/fxcrt/fx_memory_wrappers.h ++++ core/fxcrt/fx_memory_wrappers.h +@@ -70,8 +70,8 @@ struct FxPartitionAllocAllocator { + } + + // There's no state, so they are all the same, +- bool operator==(const FxPartitionAllocAllocator& that) { return true; } +- bool operator!=(const FxPartitionAllocAllocator& that) { return false; } ++ bool operator==(const FxPartitionAllocAllocator& that) const { return true; } ++ bool operator!=(const FxPartitionAllocAllocator& that) const { return false; } + }; + + // Used to put backing store for std::vector<> and such diff --git a/external/pdfium/cg-instead-of-carbon.patch.1 b/external/pdfium/cg-instead-of-carbon.patch.1 new file mode 100644 index 000000000..055eac735 --- /dev/null +++ b/external/pdfium/cg-instead-of-carbon.patch.1 @@ -0,0 +1,23 @@ +-*- Mode: Diff -*- +--- a/core/fxge/apple/fx_quartz_device.h ++++ b/core/fxge/apple/fx_quartz_device.h +@@ -7,7 +7,7 @@ + #ifndef CORE_FXGE_APPLE_FX_QUARTZ_DEVICE_H_ + #define CORE_FXGE_APPLE_FX_QUARTZ_DEVICE_H_ + +-#include <Carbon/Carbon.h> ++#include <CoreGraphics/CoreGraphics.h> + #include <stdint.h> + + #include "core/fxcrt/retain_ptr.h" +--- a/core/fpdfapi/font/cpdf_type1font.cpp ++++ b/core/fpdfapi/font/cpdf_type1font.cpp +@@ -19,7 +19,7 @@ + #include "core/fxge/fx_font.h" + + #if BUILDFLAG(IS_APPLE) +-#include <Carbon/Carbon.h> ++#include <CoreGraphics/CoreGraphics.h> + #endif // BUILDFLAG(IS_APPLE) + + namespace { diff --git a/external/pdfium/gcc-c++20-comparison.patch b/external/pdfium/gcc-c++20-comparison.patch new file mode 100644 index 000000000..0895ea8b5 --- /dev/null +++ b/external/pdfium/gcc-c++20-comparison.patch @@ -0,0 +1,18 @@ +--- core/fxcrt/retain_ptr.h ++++ core/fxcrt/retain_ptr.h +@@ -135,6 +135,7 @@ + mutable intptr_t m_nRefCount = 0; + }; + ++#if __cplusplus < 202002L + template <typename T, typename U> + inline bool operator==(const U* lhs, const RetainPtr<T>& rhs) { + return rhs == lhs; +@@ -144,6 +144,7 @@ + inline bool operator!=(const U* lhs, const RetainPtr<T>& rhs) { + return rhs != lhs; + } ++#endif + + } // namespace fxcrt + diff --git a/external/pdfium/inc/pch/precompiled_pdfium.cxx b/external/pdfium/inc/pch/precompiled_pdfium.cxx new file mode 100644 index 000000000..063660fe2 --- /dev/null +++ b/external/pdfium/inc/pch/precompiled_pdfium.cxx @@ -0,0 +1,12 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include "precompiled_pdfium.hxx" + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/external/pdfium/inc/pch/precompiled_pdfium.hxx b/external/pdfium/inc/pch/precompiled_pdfium.hxx new file mode 100644 index 000000000..eaa6090cf --- /dev/null +++ b/external/pdfium/inc/pch/precompiled_pdfium.hxx @@ -0,0 +1,496 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +/* + This file has been autogenerated by update_pch.sh. It is possible to edit it + manually (such as when an include file has been moved/renamed/removed). All such + manual changes will be rewritten by the next run of update_pch.sh (which presumably + also fixes all possible problems, so it's usually better to use it). + + Generated on 2020-09-21 15:21:21 using: + ./bin/update_pch external/pdfium pdfium --cutoff=1 --exclude:system --include:module --include:local + + If after updating build fails, use the following command to locate conflicting headers: + ./bin/update_pch_bisect ./external/pdfium/inc/pch/precompiled_pdfium.hxx "make external/pdfium.build" --find-conflicts +*/ + +#include <sal/config.h> +#if PCH_LEVEL >= 1 +#include <agg_curves.h> +#include <agg_math.h> +#include <agg_path_storage.h> +#include <agg_rasterizer_scanline_aa.h> +#include <agg_shorten_path.h> +#include <agg_vcgen_dash.h> +#include <agg_vcgen_stroke.h> +#include <algorithm> +#include <array> +#include <atomic> +#include <cassert> +#include <cfloat> +#include <climits> +#include <cmath> +#include <ctype.h> +#include <functional> +#include <iterator> +#include <limits.h> +#include <limits> +#include <list> +#include <map> +#include <math.h> +#include <memory> +#include <new> +#include <numeric> +#include <ostream> +#include <set> +#include <setjmp.h> +#include <sstream> +#include <stack> +#include <stdarg.h> +#include <stddef.h> +#include <stdlib.h> +#include <string.h> +#include <string> +#include <time.h> +#include <tuple> +#include <type_traits> +#include <utility> +#include <vector> +#include <wchar.h> +#endif // PCH_LEVEL >= 1 +#if PCH_LEVEL >= 2 +#endif // PCH_LEVEL >= 2 +#if PCH_LEVEL >= 3 +#include <build/build_config.h> +#include <constants/access_permissions.h> +#include <constants/annotation_common.h> +#include <constants/annotation_flags.h> +#include <constants/appearance.h> +#include <constants/ascii.h> +#include <constants/font_encodings.h> +#include <constants/form_fields.h> +#include <constants/form_flags.h> +#include <constants/page_object.h> +#include <constants/stream_dict_common.h> +#include <constants/transparency.h> +#include <core/fdrm/fx_crypt.h> +#include <core/fpdfapi/cmaps/CNS1/cmaps_cns1.h> +#include <core/fpdfapi/cmaps/GB1/cmaps_gb1.h> +#include <core/fpdfapi/cmaps/Japan1/cmaps_japan1.h> +#include <core/fpdfapi/cmaps/Korea1/cmaps_korea1.h> +#include <core/fpdfapi/cmaps/fpdf_cmaps.h> +#include <core/fpdfapi/edit/cpdf_contentstream_write_utils.h> +#include <core/fpdfapi/edit/cpdf_creator.h> +#include <core/fpdfapi/edit/cpdf_pagecontentgenerator.h> +#include <core/fpdfapi/edit/cpdf_pagecontentmanager.h> +#include <core/fpdfapi/edit/cpdf_stringarchivestream.h> +#include <core/fpdfapi/font/cfx_cttgsubtable.h> +#include <core/fpdfapi/font/cfx_stockfontarray.h> +#include <core/fpdfapi/font/cpdf_cid2unicodemap.h> +#include <core/fpdfapi/font/cpdf_cidfont.h> +#include <core/fpdfapi/font/cpdf_cmap.h> +#include <core/fpdfapi/font/cpdf_cmapparser.h> +#include <core/fpdfapi/font/cpdf_font.h> +#include <core/fpdfapi/font/cpdf_fontencoding.h> +#include <core/fpdfapi/font/cpdf_fontglobals.h> +#include <core/fpdfapi/font/cpdf_simplefont.h> +#include <core/fpdfapi/font/cpdf_tounicodemap.h> +#include <core/fpdfapi/font/cpdf_truetypefont.h> +#include <core/fpdfapi/font/cpdf_type1font.h> +#include <core/fpdfapi/font/cpdf_type3char.h> +#include <core/fpdfapi/font/cpdf_type3font.h> +#include <core/fpdfapi/page/cpdf_allstates.h> +#include <core/fpdfapi/page/cpdf_annotcontext.h> +#include <core/fpdfapi/page/cpdf_basedcs.h> +#include <core/fpdfapi/page/cpdf_clippath.h> +#include <core/fpdfapi/page/cpdf_color.h> +#include <core/fpdfapi/page/cpdf_colorspace.h> +#include <core/fpdfapi/page/cpdf_colorstate.h> +#include <core/fpdfapi/page/cpdf_contentmarkitem.h> +#include <core/fpdfapi/page/cpdf_contentmarks.h> +#include <core/fpdfapi/page/cpdf_contentparser.h> +#include <core/fpdfapi/page/cpdf_devicecs.h> +#include <core/fpdfapi/page/cpdf_dib.h> +#include <core/fpdfapi/page/cpdf_docpagedata.h> +#include <core/fpdfapi/page/cpdf_expintfunc.h> +#include <core/fpdfapi/page/cpdf_form.h> +#include <core/fpdfapi/page/cpdf_formobject.h> +#include <core/fpdfapi/page/cpdf_function.h> +#include <core/fpdfapi/page/cpdf_generalstate.h> +#include <core/fpdfapi/page/cpdf_graphicstates.h> +#include <core/fpdfapi/page/cpdf_iccprofile.h> +#include <core/fpdfapi/page/cpdf_image.h> +#include <core/fpdfapi/page/cpdf_imageobject.h> +#include <core/fpdfapi/page/cpdf_indexedcs.h> +#include <core/fpdfapi/page/cpdf_meshstream.h> +#include <core/fpdfapi/page/cpdf_occontext.h> +#include <core/fpdfapi/page/cpdf_page.h> +#include <core/fpdfapi/page/cpdf_pagemodule.h> +#include <core/fpdfapi/page/cpdf_pageobject.h> +#include <core/fpdfapi/page/cpdf_pageobjectholder.h> +#include <core/fpdfapi/page/cpdf_path.h> +#include <core/fpdfapi/page/cpdf_pathobject.h> +#include <core/fpdfapi/page/cpdf_pattern.h> +#include <core/fpdfapi/page/cpdf_patterncs.h> +#include <core/fpdfapi/page/cpdf_psengine.h> +#include <core/fpdfapi/page/cpdf_psfunc.h> +#include <core/fpdfapi/page/cpdf_sampledfunc.h> +#include <core/fpdfapi/page/cpdf_shadingobject.h> +#include <core/fpdfapi/page/cpdf_shadingpattern.h> +#include <core/fpdfapi/page/cpdf_stitchfunc.h> +#include <core/fpdfapi/page/cpdf_streamcontentparser.h> +#include <core/fpdfapi/page/cpdf_streamparser.h> +#include <core/fpdfapi/page/cpdf_textobject.h> +#include <core/fpdfapi/page/cpdf_textstate.h> +#include <core/fpdfapi/page/cpdf_tilingpattern.h> +#include <core/fpdfapi/page/cpdf_transferfunc.h> +#include <core/fpdfapi/page/cpdf_transferfuncdib.h> +#include <core/fpdfapi/page/cpdf_transparency.h> +#include <core/fpdfapi/parser/cfdf_document.h> +#include <core/fpdfapi/parser/cpdf_array.h> +#include <core/fpdfapi/parser/cpdf_boolean.h> +#include <core/fpdfapi/parser/cpdf_cross_ref_avail.h> +#include <core/fpdfapi/parser/cpdf_cross_ref_table.h> +#include <core/fpdfapi/parser/cpdf_crypto_handler.h> +#include <core/fpdfapi/parser/cpdf_data_avail.h> +#include <core/fpdfapi/parser/cpdf_dictionary.h> +#include <core/fpdfapi/parser/cpdf_document.h> +#include <core/fpdfapi/parser/cpdf_encryptor.h> +#include <core/fpdfapi/parser/cpdf_flateencoder.h> +#include <core/fpdfapi/parser/cpdf_hint_tables.h> +#include <core/fpdfapi/parser/cpdf_indirect_object_holder.h> +#include <core/fpdfapi/parser/cpdf_linearized_header.h> +#include <core/fpdfapi/parser/cpdf_name.h> +#include <core/fpdfapi/parser/cpdf_null.h> +#include <core/fpdfapi/parser/cpdf_number.h> +#include <core/fpdfapi/parser/cpdf_object.h> +#include <core/fpdfapi/parser/cpdf_object_avail.h> +#include <core/fpdfapi/parser/cpdf_object_stream.h> +#include <core/fpdfapi/parser/cpdf_object_walker.h> +#include <core/fpdfapi/parser/cpdf_page_object_avail.h> +#include <core/fpdfapi/parser/cpdf_parser.h> +#include <core/fpdfapi/parser/cpdf_read_validator.h> +#include <core/fpdfapi/parser/cpdf_reference.h> +#include <core/fpdfapi/parser/cpdf_security_handler.h> +#include <core/fpdfapi/parser/cpdf_simple_parser.h> +#include <core/fpdfapi/parser/cpdf_stream.h> +#include <core/fpdfapi/parser/cpdf_stream_acc.h> +#include <core/fpdfapi/parser/cpdf_string.h> +#include <core/fpdfapi/parser/cpdf_syntax_parser.h> +#include <core/fpdfapi/parser/fpdf_parser_decode.h> +#include <core/fpdfapi/parser/fpdf_parser_utility.h> +#include <core/fpdfapi/render/charposlist.h> +#include <core/fpdfapi/render/cpdf_devicebuffer.h> +#include <core/fpdfapi/render/cpdf_docrenderdata.h> +#include <core/fpdfapi/render/cpdf_imagecacheentry.h> +#include <core/fpdfapi/render/cpdf_imageloader.h> +#include <core/fpdfapi/render/cpdf_imagerenderer.h> +#include <core/fpdfapi/render/cpdf_pagerendercache.h> +#include <core/fpdfapi/render/cpdf_pagerendercontext.h> +#include <core/fpdfapi/render/cpdf_progressiverenderer.h> +#include <core/fpdfapi/render/cpdf_rendercontext.h> +#include <core/fpdfapi/render/cpdf_renderoptions.h> +#include <core/fpdfapi/render/cpdf_rendershading.h> +#include <core/fpdfapi/render/cpdf_renderstatus.h> +#include <core/fpdfapi/render/cpdf_rendertiling.h> +#include <core/fpdfapi/render/cpdf_scaledrenderbuffer.h> +#include <core/fpdfapi/render/cpdf_textrenderer.h> +#include <core/fpdfapi/render/cpdf_type3cache.h> +#include <core/fpdfapi/render/cpdf_type3glyphmap.h> +#include <core/fpdfdoc/cpdf_aaction.h> +#include <core/fpdfdoc/cpdf_action.h> +#include <core/fpdfdoc/cpdf_annot.h> +#include <core/fpdfdoc/cpdf_annotlist.h> +#include <core/fpdfdoc/cpdf_apsettings.h> +#include <core/fpdfdoc/cpdf_bafontmap.h> +#include <core/fpdfdoc/cpdf_bookmark.h> +#include <core/fpdfdoc/cpdf_bookmarktree.h> +#include <core/fpdfdoc/cpdf_color_utils.h> +#include <core/fpdfdoc/cpdf_defaultappearance.h> +#include <core/fpdfdoc/cpdf_dest.h> +#include <core/fpdfdoc/cpdf_filespec.h> +#include <core/fpdfdoc/cpdf_formcontrol.h> +#include <core/fpdfdoc/cpdf_formfield.h> +#include <core/fpdfdoc/cpdf_generateap.h> +#include <core/fpdfdoc/cpdf_icon.h> +#include <core/fpdfdoc/cpdf_iconfit.h> +#include <core/fpdfdoc/cpdf_interactiveform.h> +#include <core/fpdfdoc/cpdf_link.h> +#include <core/fpdfdoc/cpdf_linklist.h> +#include <core/fpdfdoc/cpdf_metadata.h> +#include <core/fpdfdoc/cpdf_nametree.h> +#include <core/fpdfdoc/cpdf_numbertree.h> +#include <core/fpdfdoc/cpdf_pagelabel.h> +#include <core/fpdfdoc/cpdf_structelement.h> +#include <core/fpdfdoc/cpdf_structtree.h> +#include <core/fpdfdoc/cpdf_viewerpreferences.h> +#include <core/fpdfdoc/cpvt_fontmap.h> +#include <core/fpdfdoc/cpvt_section.h> +#include <core/fpdfdoc/cpvt_variabletext.h> +#include <core/fpdfdoc/cpvt_word.h> +#include <core/fpdfdoc/cpvt_wordinfo.h> +#include <core/fpdfdoc/ipvt_fontmap.h> +#include <core/fpdftext/cpdf_linkextract.h> +#include <core/fpdftext/cpdf_textpage.h> +#include <core/fpdftext/cpdf_textpagefind.h> +#include <core/fpdftext/unicodenormalizationdata.h> +#include <core/fxcodec/basic/basicmodule.h> +#include <core/fxcodec/cfx_codec_memory.h> +#include <core/fxcodec/fax/faxmodule.h> +#include <core/fxcodec/flate/flatemodule.h> +#include <core/fxcodec/fx_codec.h> +#include <core/fxcodec/gif/cfx_gif.h> +#include <core/fxcodec/gif/lzw_decompressor.h> +#include <core/fxcodec/icc/icc_transform.h> +#include <core/fxcodec/jbig2/JBig2_ArithDecoder.h> +#include <core/fxcodec/jbig2/JBig2_ArithIntDecoder.h> +#include <core/fxcodec/jbig2/JBig2_BitStream.h> +#include <core/fxcodec/jbig2/JBig2_Context.h> +#include <core/fxcodec/jbig2/JBig2_Define.h> +#include <core/fxcodec/jbig2/JBig2_DocumentContext.h> +#include <core/fxcodec/jbig2/JBig2_GrdProc.h> +#include <core/fxcodec/jbig2/JBig2_GrrdProc.h> +#include <core/fxcodec/jbig2/JBig2_HtrdProc.h> +#include <core/fxcodec/jbig2/JBig2_HuffmanDecoder.h> +#include <core/fxcodec/jbig2/JBig2_HuffmanTable.h> +#include <core/fxcodec/jbig2/JBig2_Image.h> +#include <core/fxcodec/jbig2/JBig2_PatternDict.h> +#include <core/fxcodec/jbig2/JBig2_PddProc.h> +#include <core/fxcodec/jbig2/JBig2_SddProc.h> +#include <core/fxcodec/jbig2/JBig2_Segment.h> +#include <core/fxcodec/jbig2/JBig2_SymbolDict.h> +#include <core/fxcodec/jbig2/JBig2_TrdProc.h> +#include <core/fxcodec/jbig2/jbig2_decoder.h> +#include <core/fxcodec/jpeg/jpeg_common.h> +#include <core/fxcodec/jpeg/jpegmodule.h> +#include <core/fxcodec/jpx/cjpx_decoder.h> +#include <core/fxcodec/jpx/jpx_decode_utils.h> +#include <core/fxcodec/scanlinedecoder.h> +#include <core/fxcrt/autonuller.h> +#include <core/fxcrt/autorestorer.h> +#include <core/fxcrt/bytestring.h> +#include <core/fxcrt/cfx_binarybuf.h> +#include <core/fxcrt/cfx_bitstream.h> +#include <core/fxcrt/cfx_datetime.h> +#include <core/fxcrt/cfx_fixedbufgrow.h> +#include <core/fxcrt/cfx_memorystream.h> +#include <core/fxcrt/cfx_readonlymemorystream.h> +#include <core/fxcrt/cfx_seekablestreamproxy.h> +#include <core/fxcrt/cfx_timer.h> +#include <core/fxcrt/cfx_utf8decoder.h> +#include <core/fxcrt/cfx_utf8encoder.h> +#include <core/fxcrt/cfx_widetextbuf.h> +#include <core/fxcrt/css/cfx_css.h> +#include <core/fxcrt/css/cfx_csscolorvalue.h> +#include <core/fxcrt/css/cfx_csscomputedstyle.h> +#include <core/fxcrt/css/cfx_csscustomproperty.h> +#include <core/fxcrt/css/cfx_cssdata.h> +#include <core/fxcrt/css/cfx_cssdeclaration.h> +#include <core/fxcrt/css/cfx_cssenumvalue.h> +#include <core/fxcrt/css/cfx_cssinputtextbuf.h> +#include <core/fxcrt/css/cfx_cssnumbervalue.h> +#include <core/fxcrt/css/cfx_cssoutputtextbuf.h> +#include <core/fxcrt/css/cfx_csspropertyholder.h> +#include <core/fxcrt/css/cfx_cssrulecollection.h> +#include <core/fxcrt/css/cfx_cssselector.h> +#include <core/fxcrt/css/cfx_cssstringvalue.h> +#include <core/fxcrt/css/cfx_cssstylerule.h> +#include <core/fxcrt/css/cfx_cssstyleselector.h> +#include <core/fxcrt/css/cfx_cssstylesheet.h> +#include <core/fxcrt/css/cfx_csssyntaxparser.h> +#include <core/fxcrt/css/cfx_cssvalue.h> +#include <core/fxcrt/css/cfx_cssvaluelist.h> +#include <core/fxcrt/css/cfx_cssvaluelistparser.h> +#include <core/fxcrt/fileaccess_iface.h> +#include <core/fxcrt/fx_bidi.h> +#include <core/fxcrt/fx_codepage.h> +#include <core/fxcrt/fx_coordinates.h> +#include <core/fxcrt/fx_extension.h> +#include <core/fxcrt/fx_folder.h> +#include <core/fxcrt/fx_memory.h> +#include <core/fxcrt/fx_memory_wrappers.h> +#include <core/fxcrt/fx_number.h> +#include <core/fxcrt/fx_random.h> +#include <core/fxcrt/fx_safe_types.h> +#include <core/fxcrt/fx_stream.h> +#include <core/fxcrt/fx_string.h> +#include <core/fxcrt/fx_string_wrappers.h> +#include <core/fxcrt/fx_system.h> +#include <core/fxcrt/fx_unicode.h> +#include <core/fxcrt/maybe_owned.h> +#include <core/fxcrt/observed_ptr.h> +#include <core/fxcrt/pauseindicator_iface.h> +#include <core/fxcrt/retain_ptr.h> +#include <core/fxcrt/scoped_set_insertion.h> +#include <core/fxcrt/span_util.h> +#include <core/fxcrt/stl_util.h> +#include <core/fxcrt/string_data_template.h> +#include <core/fxcrt/string_pool_template.h> +#include <core/fxcrt/unowned_ptr.h> +#include <core/fxcrt/widestring.h> +#include <core/fxcrt/xml/cfx_xmlchardata.h> +#include <core/fxcrt/xml/cfx_xmldocument.h> +#include <core/fxcrt/xml/cfx_xmlelement.h> +#include <core/fxcrt/xml/cfx_xmlinstruction.h> +#include <core/fxcrt/xml/cfx_xmlnode.h> +#include <core/fxcrt/xml/cfx_xmlparser.h> +#include <core/fxcrt/xml/cfx_xmltext.h> +#include <core/fxge/agg/fx_agg_driver.h> +#include <core/fxge/calculate_pitch.h> +#include <core/fxge/cfx_cliprgn.h> +#include <core/fxge/cfx_color.h> +#include <core/fxge/cfx_defaultrenderdevice.h> +#include <core/fxge/cfx_drawutils.h> +#include <core/fxge/cfx_face.h> +#include <core/fxge/cfx_fillrenderoptions.h> +#include <core/fxge/cfx_folderfontinfo.h> +#include <core/fxge/cfx_font.h> +#include <core/fxge/cfx_fontcache.h> +#include <core/fxge/cfx_fontmapper.h> +#include <core/fxge/cfx_fontmgr.h> +#include <core/fxge/cfx_gemodule.h> +#include <core/fxge/cfx_glyphbitmap.h> +#include <core/fxge/cfx_glyphcache.h> +#include <core/fxge/cfx_graphstate.h> +#include <core/fxge/cfx_graphstatedata.h> +#include <core/fxge/cfx_path.h> +#include <core/fxge/cfx_renderdevice.h> +#include <core/fxge/cfx_substfont.h> +#include <core/fxge/cfx_textrenderoptions.h> +#include <core/fxge/cfx_unicodeencoding.h> +#include <core/fxge/dib/cfx_bitmapcomposer.h> +#include <core/fxge/dib/cfx_bitmapstorer.h> +#include <core/fxge/dib/cfx_cmyk_to_srgb.h> +#include <core/fxge/dib/cfx_dibbase.h> +#include <core/fxge/dib/cfx_dibextractor.h> +#include <core/fxge/dib/cfx_dibitmap.h> +#include <core/fxge/dib/cfx_imagerenderer.h> +#include <core/fxge/dib/cfx_imagestretcher.h> +#include <core/fxge/dib/cfx_imagetransformer.h> +#include <core/fxge/dib/cfx_scanlinecompositor.h> +#include <core/fxge/dib/cstretchengine.h> +#include <core/fxge/dib/fx_dib.h> +#include <core/fxge/dib/scanlinecomposer_iface.h> +#include <core/fxge/fontdata/chromefontdata/chromefontdata.h> +#include <core/fxge/freetype/fx_freetype.h> +#include <core/fxge/fx_font.h> +#include <core/fxge/renderdevicedriver_iface.h> +#include <core/fxge/scoped_font_transform.h> +#include <core/fxge/systemfontinfo_iface.h> +#include <core/fxge/text_char_pos.h> +#include <core/fxge/text_glyph_pos.h> +#include <fpdfsdk/cpdfsdk_annot.h> +#include <fpdfsdk/cpdfsdk_annotiteration.h> +#include <fpdfsdk/cpdfsdk_annotiterator.h> +#include <fpdfsdk/cpdfsdk_appstream.h> +#include <fpdfsdk/cpdfsdk_baannot.h> +#include <fpdfsdk/cpdfsdk_customaccess.h> +#include <fpdfsdk/cpdfsdk_filewriteadapter.h> +#include <fpdfsdk/cpdfsdk_formfillenvironment.h> +#include <fpdfsdk/cpdfsdk_helpers.h> +#include <fpdfsdk/cpdfsdk_interactiveform.h> +#include <fpdfsdk/cpdfsdk_pageview.h> +#include <fpdfsdk/cpdfsdk_pauseadapter.h> +#include <fpdfsdk/cpdfsdk_renderpage.h> +#include <fpdfsdk/cpdfsdk_widget.h> +#include <fpdfsdk/formfiller/cffl_button.h> +#include <fpdfsdk/formfiller/cffl_checkbox.h> +#include <fpdfsdk/formfiller/cffl_combobox.h> +#include <fpdfsdk/formfiller/cffl_fieldaction.h> +#include <fpdfsdk/formfiller/cffl_formfield.h> +#include <fpdfsdk/formfiller/cffl_interactiveformfiller.h> +#include <fpdfsdk/formfiller/cffl_listbox.h> +#include <fpdfsdk/formfiller/cffl_perwindowdata.h> +#include <fpdfsdk/formfiller/cffl_pushbutton.h> +#include <fpdfsdk/formfiller/cffl_radiobutton.h> +#include <fpdfsdk/formfiller/cffl_textfield.h> +#include <fpdfsdk/formfiller/cffl_textobject.h> +#include <fpdfsdk/pwl/cpwl_button.h> +#include <fpdfsdk/pwl/cpwl_caret.h> +#include <fpdfsdk/pwl/cpwl_cbbutton.h> +#include <fpdfsdk/pwl/cpwl_cblistbox.h> +#include <fpdfsdk/pwl/cpwl_combo_box.h> +#include <fpdfsdk/pwl/cpwl_edit.h> +#include <fpdfsdk/pwl/cpwl_edit_impl.h> +#include <fpdfsdk/pwl/cpwl_list_box.h> +#include <fpdfsdk/pwl/cpwl_list_ctrl.h> +#include <fpdfsdk/pwl/cpwl_sbbutton.h> +#include <fpdfsdk/pwl/cpwl_scroll_bar.h> +#include <fpdfsdk/pwl/cpwl_special_button.h> +#include <fpdfsdk/pwl/cpwl_wnd.h> +#include <fpdfsdk/pwl/ipwl_fillernotify.h> +#include <fxjs/cjs_event_context_stub.h> +#include <fxjs/cjs_runtimestub.h> +#include <fxjs/ijs_event_context.h> +#include <fxjs/ijs_runtime.h> +#include <public/fpdf_annot.h> +#include <public/fpdf_attachment.h> +#include <public/fpdf_catalog.h> +#include <public/fpdf_dataavail.h> +#include <public/fpdf_doc.h> +#include <public/fpdf_edit.h> +#include <public/fpdf_ext.h> +#include <public/fpdf_flatten.h> +#include <public/fpdf_formfill.h> +#include <public/fpdf_fwlevent.h> +#include <public/fpdf_progressive.h> +#include <public/fpdf_save.h> +#include <public/fpdf_searchex.h> +#include <public/fpdf_signature.h> +#include <public/fpdf_structtree.h> +#include <public/fpdf_sysfontinfo.h> +#include <public/fpdf_text.h> +#include <public/fpdf_transformpage.h> +#include <public/fpdfview.h> +#include <third_party/abseil-cpp/absl/types/optional.h> +#include <third_party/agg23/agg_clip_liang_barsky.h> +#include <third_party/agg23/agg_conv_dash.h> +#include <third_party/agg23/agg_conv_stroke.h> +#include <third_party/agg23/agg_curves.h> +#include <third_party/agg23/agg_path_storage.h> +#include <third_party/agg23/agg_pixfmt_gray.h> +#include <third_party/agg23/agg_rasterizer_scanline_aa.h> +#include <third_party/agg23/agg_renderer_scanline.h> +#include <third_party/agg23/agg_scanline_u.h> +#include <third_party/base/allocator/partition_allocator/address_space_randomization.h> +#include <third_party/base/allocator/partition_allocator/oom.h> +#include <third_party/base/allocator/partition_allocator/oom_callback.h> +#include <third_party/base/allocator/partition_allocator/page_allocator.h> +#include <third_party/base/allocator/partition_allocator/page_allocator_internal.h> +#include <third_party/base/allocator/partition_allocator/partition_alloc.h> +#include <third_party/base/allocator/partition_allocator/partition_alloc_check.h> +#include <third_party/base/allocator/partition_allocator/partition_alloc_constants.h> +#include <third_party/base/allocator/partition_allocator/partition_bucket.h> +#include <third_party/base/allocator/partition_allocator/partition_direct_map_extent.h> +#include <third_party/base/allocator/partition_allocator/partition_oom.h> +#include <third_party/base/allocator/partition_allocator/partition_page.h> +#include <third_party/base/allocator/partition_allocator/partition_root_base.h> +#include <third_party/base/allocator/partition_allocator/random.h> +#include <third_party/base/allocator/partition_allocator/spin_lock.h> +#include <third_party/base/bits.h> +#include <third_party/base/check.h> +#include <third_party/base/check_op.h> +#include <third_party/base/compiler_specific.h> +#include <third_party/base/containers/adapters.h> +#include <third_party/base/containers/contains.h> +#include <third_party/base/cxx17_backports.h> +#include <third_party/base/debug/alias.h> +#include <third_party/base/memory/aligned_memory.h> +#include <third_party/base/no_destructor.h> +#include <third_party/base/notreached.h> +#include <third_party/base/numerics/safe_conversions.h> +#include <third_party/base/numerics/safe_math.h> +#include <third_party/base/ptr_util.h> +#include <third_party/base/span.h> +#include <third_party/skia_shared/SkFloatToDecimal.h> +#endif // PCH_LEVEL >= 3 +#if PCH_LEVEL >= 4 +#endif // PCH_LEVEL >= 4 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/external/pdfium/include.patch b/external/pdfium/include.patch new file mode 100644 index 000000000..75c0e3b92 --- /dev/null +++ b/external/pdfium/include.patch @@ -0,0 +1,11 @@ +--- constants/annotation_flags.h ++++ constants/annotation_flags.h +@@ -5,6 +5,8 @@ + #ifndef CONSTANTS_ANNOTATION_FLAGS_H_ + #define CONSTANTS_ANNOTATION_FLAGS_H_ + ++#include <stdint.h> ++ + namespace pdfium { + namespace annotation_flags { + diff --git a/external/pdfium/ubsan.patch b/external/pdfium/ubsan.patch new file mode 100644 index 000000000..bc9868244 --- /dev/null +++ b/external/pdfium/ubsan.patch @@ -0,0 +1,24 @@ +--- core/fxcrt/string_data_template.cpp ++++ core/fxcrt/string_data_template.cpp +@@ -82,7 +82,8 @@ void StringDataTemplate<CharType>::CopyContentsAt(size_t offset, + DCHECK_GE(offset, 0); + DCHECK_GE(nLen, 0); + DCHECK_LE(offset + nLen, m_nAllocLength); +- memcpy(m_String + offset, pStr, nLen * sizeof(CharType)); ++ if (nLen != 0) ++ memcpy(m_String + offset, pStr, nLen * sizeof(CharType)); + m_String[offset + nLen] = 0; + } + +--- core/fxge/cfx_glyphcache.cpp ++++ core/fxge/cfx_glyphcache.cpp +@@ -183,7 +183,8 @@ std::unique_ptr<CFX_GlyphBitmap> CFX_GlyphCache::RenderGlyph( + } + } + } else { +- memset(pDestBuf, 0, dest_pitch * bmheight); ++ if (dest_pitch != 0 && bmheight != 0) ++ memset(pDestBuf, 0, dest_pitch * bmheight); + int rowbytes = std::min(abs(src_pitch), dest_pitch); + for (int row = 0; row < bmheight; row++) + memcpy(pDestBuf + row * dest_pitch, pSrcBuf + row * src_pitch, rowbytes); diff --git a/external/pdfium/windows7.patch.1 b/external/pdfium/windows7.patch.1 new file mode 100644 index 000000000..d33f273ff --- /dev/null +++ b/external/pdfium/windows7.patch.1 @@ -0,0 +1,34 @@ +diff --git a/third_party/base/win/win_util.cc b/third_party/base/win/win_util.cc +index ae2dba84d..7a3718848 100644 +--- a/third_party/base/win/win_util.cc ++++ b/third_party/base/win/win_util.cc +@@ -12,28 +12,7 @@ namespace base { + namespace win { + + bool IsUser32AndGdi32Available() { +- static auto is_user32_and_gdi32_available = []() { +- // If win32k syscalls aren't disabled, then user32 and gdi32 are available. +- +- typedef decltype( +- GetProcessMitigationPolicy)* GetProcessMitigationPolicyType; +- GetProcessMitigationPolicyType get_process_mitigation_policy_func = +- reinterpret_cast<GetProcessMitigationPolicyType>(GetProcAddress( +- GetModuleHandle(L"kernel32.dll"), "GetProcessMitigationPolicy")); +- +- if (!get_process_mitigation_policy_func) +- return true; +- +- PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY policy = {}; +- if (get_process_mitigation_policy_func(GetCurrentProcess(), +- ProcessSystemCallDisablePolicy, +- &policy, sizeof(policy))) { +- return policy.DisallowWin32kSystemCalls == 0; +- } +- +- return true; +- }(); +- return is_user32_and_gdi32_available; ++ return true; + } + + } // namespace win |