From fab3ca134f687fed35d9abcd2a11e654cd84a1db Mon Sep 17 00:00:00 2001 From: Ashod Nakashian Date: Fri, 13 Apr 2018 20:26:11 -0400 Subject: svx: improved text importing from PDF Change-Id: I9a2fc2c8511655c1aa362c1a03a5e82ae3ba697e (cherry picked from commit d057cf3d9184cc5d96af9c957411911f5e788f4d) --- ...07-svx-improved-text-importing-from-PDF.patch.2 | 62 ++++++++++++++++++++++ external/pdfium/UnpackedTarball_pdfium.mk | 1 + 2 files changed, 63 insertions(+) create mode 100644 external/pdfium/0007-svx-improved-text-importing-from-PDF.patch.2 (limited to 'external') diff --git a/external/pdfium/0007-svx-improved-text-importing-from-PDF.patch.2 b/external/pdfium/0007-svx-improved-text-importing-from-PDF.patch.2 new file mode 100644 index 000000000000..e7afda576d15 --- /dev/null +++ b/external/pdfium/0007-svx-improved-text-importing-from-PDF.patch.2 @@ -0,0 +1,62 @@ +From 87f3da183a87f3ff5df854971a0c3bc2134ecd61 Mon Sep 17 00:00:00 2001 +From: Ashod Nakashian +Date: Tue, 5 Jun 2018 11:31:35 +0200 +Subject: [PATCH 07/14] svx: improved text importing from PDF + +--- + pdfium/fpdfsdk/fpdf_editpage.cpp | 9 +++++++-- + pdfium/public/fpdf_edit.h | 6 +++++- + 2 files changed, 12 insertions(+), 3 deletions(-) + +diff --git a/pdfium/fpdfsdk/fpdf_editpage.cpp b/pdfium/fpdfsdk/fpdf_editpage.cpp +index f8e2418..2249e8e 100644 +--- a/pdfium/fpdfsdk/fpdf_editpage.cpp ++++ b/pdfium/fpdfsdk/fpdf_editpage.cpp +@@ -652,8 +652,11 @@ FPDFTextObj_GetMatrix(FPDF_PAGEOBJECT text_object, + double* a, + double* b, + double* c, +- double* d) { +- if (!text_object) ++ double* d, ++ double* e, ++ double* f) ++{ ++ if (!text_object || !a || !b || !c || !d || !e || !f) + return; + + CPDF_TextObject* pTxtObj = CPDFTextObjectFromFPDFPageObject(text_object); +@@ -662,6 +665,8 @@ FPDFTextObj_GetMatrix(FPDF_PAGEOBJECT text_object, + *b = matrix.b; + *c = matrix.c; + *d = matrix.d; ++ *e = matrix.e; ++ *f = matrix.f; + } + + FPDF_EXPORT int FPDF_CALLCONV +diff --git a/pdfium/public/fpdf_edit.h b/pdfium/public/fpdf_edit.h +index 89ec8cf..fc906f4 100644 +--- a/pdfium/public/fpdf_edit.h ++++ b/pdfium/public/fpdf_edit.h +@@ -1038,12 +1038,16 @@ FPDFTextObj_GetFontSize(FPDF_PAGEOBJECT text_object); + // 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 + FPDFTextObj_GetMatrix(FPDF_PAGEOBJECT text_object, + double* a, + double* b, + double* c, +- double* d); ++ double* d, ++ double* e, ++ double* f); + + // Get the unicode of a special character in a text object. + // +-- +2.16.3 + diff --git a/external/pdfium/UnpackedTarball_pdfium.mk b/external/pdfium/UnpackedTarball_pdfium.mk index af7841dcd120..f0ee740ddf94 100644 --- a/external/pdfium/UnpackedTarball_pdfium.mk +++ b/external/pdfium/UnpackedTarball_pdfium.mk @@ -20,6 +20,7 @@ pdfium_patches += 0003-svx-import-PDF-images-as-BGRA.patch.2 pdfium_patches += 0004-svx-support-PDF-text-color.patch.2 pdfium_patches += 0005-svx-support-Paths-in-PDFs-while-importing.patch.2 pdfium_patches += 0006-svx-improve-path-importing-from-PDF.patch.2 +pdfium_patches += 0007-svx-improved-text-importing-from-PDF.patch.2 $(eval $(call gb_UnpackedTarball_UnpackedTarball,pdfium)) -- cgit