diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2022-10-05 21:44:45 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2022-10-06 10:16:35 +0200 |
commit | d0b2f5f65e80a4262425bb87d5716d7b4341dfea (patch) | |
tree | 06454afb84511a05b2bf6a40b465f04982061244 /external | |
parent | f8983580f67b06461b23fa34dd1bfdefbb33012a (diff) |
pdfium: drop not needed annot.patch.1
If FORM_OnAfterLoadPage() is called, then FPDFAnnot_GetFontSize() can do
what we need.
Change-Id: I8aa3acbbda5c040f30b28db36f8b3332115b50e5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140997
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'external')
-rw-r--r-- | external/pdfium/UnpackedTarball_pdfium.mk | 1 | ||||
-rw-r--r-- | external/pdfium/annot.patch.1 | 45 |
2 files changed, 0 insertions, 46 deletions
diff --git a/external/pdfium/UnpackedTarball_pdfium.mk b/external/pdfium/UnpackedTarball_pdfium.mk index 4c9f483f8ed7..7dde5d674e6f 100644 --- a/external/pdfium/UnpackedTarball_pdfium.mk +++ b/external/pdfium/UnpackedTarball_pdfium.mk @@ -28,7 +28,6 @@ pdfium_patches += include.patch pdfium_patches += abseil-trivial.patch -pdfium_patches += annot.patch.1 pdfium_patches += annot-alternate-name.patch.1 $(eval $(call gb_UnpackedTarball_UnpackedTarball,pdfium)) diff --git a/external/pdfium/annot.patch.1 b/external/pdfium/annot.patch.1 deleted file mode 100644 index 542cb9766ff7..000000000000 --- a/external/pdfium/annot.patch.1 +++ /dev/null @@ -1,45 +0,0 @@ -diff --git a/fpdfsdk/fpdf_annot.cpp b/fpdfsdk/fpdf_annot.cpp -index 349348583..54e139645 100644 ---- a/fpdfsdk/fpdf_annot.cpp -+++ b/fpdfsdk/fpdf_annot.cpp -@@ -1223,6 +1223,26 @@ FPDFAnnot_GetFormFieldType(FPDF_FORMHANDLE hHandle, FPDF_ANNOTATION annot) { - return pFormField ? static_cast<int>(pFormField->GetFieldType()) : -1; - } - -+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV -+FPDFAnnot_GetFormFontSize(FPDF_FORMHANDLE hHandle, FPDF_ANNOTATION annot, float* value) { -+ const CPDF_FormField* pFormField = GetFormField(hHandle, annot); -+ if (!pFormField) { -+ return false; -+ } -+ -+ if (!value) { -+ return false; -+ } -+ -+ ByteString DA; -+ if (const CPDF_Object* pObj = pFormField->GetFieldAttr(pFormField->GetDict(), "DA")) -+ DA = pObj->GetString(); -+ -+ CPDF_DefaultAppearance appearance(DA); -+ appearance.GetFont(value); -+ return true; -+} -+ - FPDF_EXPORT unsigned long FPDF_CALLCONV - FPDFAnnot_GetFormFieldValue(FPDF_FORMHANDLE hHandle, - FPDF_ANNOTATION annot, -diff --git a/public/fpdf_annot.h b/public/fpdf_annot.h -index ccfbb0f1c..3c96b99a0 100644 ---- a/public/fpdf_annot.h -+++ b/public/fpdf_annot.h -@@ -699,6 +699,9 @@ FPDFAnnot_GetFormFieldName(FPDF_FORMHANDLE hHandle, - FPDF_EXPORT int FPDF_CALLCONV - FPDFAnnot_GetFormFieldType(FPDF_FORMHANDLE hHandle, FPDF_ANNOTATION annot); - -+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV -+FPDFAnnot_GetFormFontSize(FPDF_FORMHANDLE hHandle, FPDF_ANNOTATION annot, float* value); -+ - // Experimental API. - // Gets the value of |annot|, which is an interactive form annotation. - // |buffer| is only modified if |buflen| is longer than the length of contents. |