summaryrefslogtreecommitdiff
path: root/external/pdfium/0011-svx-correctly-possition-form-objects-from-PDF.patch.2
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2018-07-17 21:23:40 +0200
committerMiklos Vajna <vmiklos@collabora.com>2020-12-17 10:02:22 +0100
commit3465490b8bcc9606596b1011a530f4955daf8d0a (patch)
treec7622f1271d08f7fdbfd0e0a5e216174f3a9bb75 /external/pdfium/0011-svx-correctly-possition-form-objects-from-PDF.patch.2
parent14f75d0969e7e41085cf405e9ae99f8575916beb (diff)
pdfium: update to 3471
Allows dropping 4 API patches + the one that allows building against system ICU. (cherry picked from commit 1445d84cdc906fabf6cc7a59f3c94b4049477701) Conflicts: external/pdfium/0002-svx-more-accurate-PDF-text-importing.patch.2 external/pdfium/UnpackedTarball_pdfium.mk [ Also split up edit.patch.1 which as done when forward-porting from cp-6.0 to cp-6.2, so not something that could be backported explicitly. ] Change-Id: Ib5c63ba7daf51b320c07b24486f7398bf71bcfbf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107340 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'external/pdfium/0011-svx-correctly-possition-form-objects-from-PDF.patch.2')
-rw-r--r--external/pdfium/0011-svx-correctly-possition-form-objects-from-PDF.patch.275
1 files changed, 75 insertions, 0 deletions
diff --git a/external/pdfium/0011-svx-correctly-possition-form-objects-from-PDF.patch.2 b/external/pdfium/0011-svx-correctly-possition-form-objects-from-PDF.patch.2
new file mode 100644
index 000000000000..081840e20576
--- /dev/null
+++ b/external/pdfium/0011-svx-correctly-possition-form-objects-from-PDF.patch.2
@@ -0,0 +1,75 @@
+From c82f6e80d94f8598221009035c8f336f5f656333 Mon Sep 17 00:00:00 2001
+From: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
+Date: Tue, 5 Jun 2018 11:35:14 +0200
+Subject: [PATCH 11/14] svx: correctly possition form objects from PDF
+
+---
+ pdfium/fpdfsdk/fpdf_editpage.cpp | 25 +++++++++++++++++++++++++
+ pdfium/public/fpdf_edit.h | 18 ++++++++++++++++++
+ 2 files changed, 43 insertions(+)
+
+diff --git a/pdfium/fpdfsdk/fpdf_editpage.cpp b/pdfium/fpdfsdk/fpdf_editpage.cpp
+index bf68250..f4a1688 100644
+--- a/pdfium/fpdfsdk/fpdf_editpage.cpp
++++ b/pdfium/fpdfsdk/fpdf_editpage.cpp
+@@ -810,3 +810,28 @@ FPDFFormObj_GetSubObject(FPDF_PAGEOBJECT form_object, int index)
+
+ return nullptr;
+ }
++
++FPDF_EXPORT void FPDF_CALLCONV
++FPDFFormObj_GetMatrix(FPDF_PAGEOBJECT form_object,
++ double* a,
++ double* b,
++ double* c,
++ double* d,
++ double* e,
++ double* f)
++{
++ if (!form_object || !a || !b || !c || !d || !e || !f)
++ return;
++
++ CPDF_FormObject* pFrmObj = CPDFFormObjectFromFPDFPageObject(form_object);
++ if (pFrmObj)
++ {
++ const CFX_Matrix& matrix = pFrmObj->form_matrix();
++ *a = matrix.a;
++ *b = matrix.b;
++ *c = matrix.c;
++ *d = matrix.d;
++ *e = matrix.e;
++ *f = matrix.f;
++ }
++}
+diff --git a/pdfium/public/fpdf_edit.h b/pdfium/public/fpdf_edit.h
+index ca76954..f249e64 100644
+--- a/pdfium/public/fpdf_edit.h
++++ b/pdfium/public/fpdf_edit.h
+@@ -1098,6 +1098,24 @@ FPDFFormObj_CountSubObjects(FPDF_PAGEOBJECT form_object);
+ FPDF_EXPORT FPDF_PAGEOBJECT FPDF_CALLCONV
+ FPDFFormObj_GetSubObject(FPDF_PAGEOBJECT form_object, int index);
+
++// Get the matrix of a particular form object.
++//
++// form_object - Handle of form object
++// a - Pointer to a double value receiving coefficient "a" of the matrix.
++// b - Pointer to a double value receiving coefficient "b" of the matrix.
++// c - Pointer to a double value receiving coefficient "c" of the matrix.
++// d - Pointer to a double value receiving coefficient "d" of the matrix.
++// e - Pointer to a double value receiving coefficient "e" of the matrix.
++// f - Pointer to a double value receiving coefficient "f" of the matrix.
++FPDF_EXPORT void FPDF_CALLCONV
++FPDFFormObj_GetMatrix(FPDF_PAGEOBJECT form_object,
++ double* a,
++ double* b,
++ double* c,
++ double* d,
++ double* e,
++ double* f);
++
+ #ifdef __cplusplus
+ } // extern "C"
+ #endif // __cplusplus
+--
+2.16.3
+