diff options
author | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2018-04-18 21:27:27 -0400 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2018-06-07 10:45:29 +0200 |
commit | d28e9e10a893b60b4bad5a1d0bae47a986dd2bdb (patch) | |
tree | 2d0619ecbf9ecf70ace1dba01b0e41f41b4a9624 /external | |
parent | 3ac5ec542031e08996768918d8793b5da3648fda (diff) |
svx: correctly possition form objects from PDF
Change-Id: I7d216ca61b8a10219628877db7dd593a4987ef60
(cherry picked from commit 81f16107c1b0b5315537f38a9830cf967e4abb68)
Diffstat (limited to 'external')
-rw-r--r-- | external/pdfium/0011-svx-correctly-possition-form-objects-from-PDF.patch.2 | 75 | ||||
-rw-r--r-- | external/pdfium/UnpackedTarball_pdfium.mk | 1 |
2 files changed, 76 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 + diff --git a/external/pdfium/UnpackedTarball_pdfium.mk b/external/pdfium/UnpackedTarball_pdfium.mk index 707c904fdd96..6880ac0b670b 100644 --- a/external/pdfium/UnpackedTarball_pdfium.mk +++ b/external/pdfium/UnpackedTarball_pdfium.mk @@ -24,6 +24,7 @@ pdfium_patches += 0007-svx-improved-text-importing-from-PDF.patch.2 pdfium_patches += 0008-svx-correct-the-positioning-of-PDF-Paths-and-the-str.patch.2 pdfium_patches += 0009-svx-support-color-text-for-imported-PDFs.patch.2 pdfium_patches += 0010-svx-support-importing-forms-from-PDFs.patch.2 +pdfium_patches += 0011-svx-correctly-possition-form-objects-from-PDF.patch.2 $(eval $(call gb_UnpackedTarball_UnpackedTarball,pdfium)) |