RepositoryExternal.mk | 1 download.lst | 4 - external/pdfium/Library_pdfium.mk | 32 +++++---- external/pdfium/UnpackedTarball_pdfium.mk | 3 external/pdfium/build.patch.1 | 46 ++++---------- external/pdfium/c++20-comparison.patch | 13 ++++ external/pdfium/inc/pch/precompiled_pdfium.hxx | 66 ++++++++++---------- external/pdfium/visibility.patch.1 | 45 ------------- solenv/flatpak-manifest.in | 6 - svx/source/svdraw/svdpdf.cxx | 27 ++++---- vcl/qa/cppunit/pdfexport/pdfexport.cxx | 81 +++++++++++++++++++++++++ 11 files changed, 182 insertions(+), 142 deletions(-)
New commits: commit 6b0e621b94da45739ce49f6ef137c9c84d00a086 Author: Miklos Vajna <[email protected]> AuthorDate: Wed Jan 22 21:02:05 2020 +0100 Commit: Vasily Melenchuk <[email protected]> CommitDate: Tue Dec 22 23:39:05 2020 +0300 pdfium: don't patch out the COMPONENT_BUILD check, define it So next time we update, no need to adapt a failing patch. Change-Id: I785f16047d1decbf922177fdde4bc6aad7cfebfc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87215 Tested-by: Jenkins Reviewed-by: Miklos Vajna <[email protected]> diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk index 08cfadf76c52..27e7f07d49ba 100644 --- a/RepositoryExternal.mk +++ b/RepositoryExternal.mk @@ -4154,6 +4154,7 @@ ifneq ($(ENABLE_PDFIUM),) define gb_LinkTarget__use_pdfium $(call gb_LinkTarget_set_include,$(1),\ -I$(call gb_UnpackedTarball_get_dir,pdfium)/public \ + -DCOMPONENT_BUILD \ $$(INCLUDE) \ ) $(call gb_LinkTarget_use_libraries,$(1),pdfium) diff --git a/external/pdfium/Library_pdfium.mk b/external/pdfium/Library_pdfium.mk index 1d645909b58a..8607fde503eb 100644 --- a/external/pdfium/Library_pdfium.mk +++ b/external/pdfium/Library_pdfium.mk @@ -31,6 +31,7 @@ $(eval $(call gb_Library_add_defs,pdfium,\ -DMEMORY_TOOL_REPLACES_ALLOCATOR \ -DUNICODE \ -DWIN32_LEAN_AND_MEAN \ + -DCOMPONENT_BUILD \ )) $(eval $(call gb_Library_set_generated_cxx_suffix,pdfium,cpp)) diff --git a/external/pdfium/UnpackedTarball_pdfium.mk b/external/pdfium/UnpackedTarball_pdfium.mk index ba1a7e994dbf..93d3fede6e3c 100644 --- a/external/pdfium/UnpackedTarball_pdfium.mk +++ b/external/pdfium/UnpackedTarball_pdfium.mk @@ -8,7 +8,6 @@ # pdfium_patches := -pdfium_patches += visibility.patch.1 pdfium_patches += ubsan.patch # Fixes build on our baseline. pdfium_patches += build.patch.1 diff --git a/external/pdfium/visibility.patch.1 b/external/pdfium/visibility.patch.1 deleted file mode 100644 index 14a380bbfa16..000000000000 --- a/external/pdfium/visibility.patch.1 +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/public/fpdfview.h b/public/fpdfview.h -index 0542b0541..2c9a37b4a 100644 ---- a/public/fpdfview.h -+++ b/public/fpdfview.h -@@ -175,7 +175,6 @@ typedef int FPDF_ANNOT_APPEARANCEMODE; - // Dictionary value types. - typedef int FPDF_OBJECT_TYPE; - --#if defined(COMPONENT_BUILD) - // FPDF_EXPORT should be consistent with |export| in the pdfium_fuzzer - // template in testing/fuzzers/BUILD.gn. - #if defined(WIN32) -@@ -191,9 +190,6 @@ typedef int FPDF_OBJECT_TYPE; - #define FPDF_EXPORT - #endif // defined(FPDF_IMPLEMENTATION) - #endif // defined(WIN32) --#else --#define FPDF_EXPORT --#endif // defined(COMPONENT_BUILD) - - #if defined(WIN32) && defined(FPDFSDK_EXPORTS) - #define FPDF_CALLCONV __stdcall commit 3f86d67a7367b4e7dfdc67f7cbdd71058e3aa5fb Author: Stephan Bergmann <[email protected]> AuthorDate: Fri Jan 17 18:27:14 2020 +0100 Commit: Vasily Melenchuk <[email protected]> CommitDate: Tue Dec 22 23:38:44 2020 +0300 external/pdfium: C++20 comparison operator fix Missing const leads to overload resolution ambiguity when a synthesized candidate of operator == for a reversed-argument rewrite conflicts with the actual operator ==, due to the asymmetric const-ness of the implicit object parameter and the RHS parameter: > In file included from workdir/UnpackedTarball/pdfium/core/fxge/cfx_font.cpp:7: > In file included from workdir/UnpackedTarball/pdfium/core/fxge/cfx_font.h:11: > llvm/inst/include/c++/v1/vector:1369:27: error: use of overloaded operator '!=' is ambiguous (with operand types 'std::__1::__vector_base<unsigned char, FxAllocAllocator<unsigned char> >::allocator_type' (aka 'FxAllocAllocator<unsigned char>') and 'std::__1::__vector_base<unsigned char, FxAllocAllocator<unsigned char> >::allocator_type') > if (__base::__alloc() != __c.__alloc()) > ~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~ > llvm/inst/include/c++/v1/vector:1359:5: note: in instantiation of member function 'std::__1::vector<unsigned char, FxAllocAllocator<unsigned char> >::__move_assign' requested here > __move_assign(__x, integral_constant<bool, > ^ > workdir/UnpackedTarball/pdfium/core/fxge/cfx_font.cpp:384:24: note: in instantiation of member function 'std::__1::vector<unsigned char, FxAllocAllocator<unsigned char> >::operator=' requested here > m_FontDataAllocation = std::vector<uint8_t, FxAllocAllocator<uint8_t>>( > ^ > workdir/UnpackedTarball/pdfium/core/fxcrt/fx_memory_wrappers.h:74:8: note: candidate function > bool operator!=(const FxAllocAllocator& that) { return false; } > ^ > workdir/UnpackedTarball/pdfium/core/fxcrt/fx_memory_wrappers.h:73:8: note: candidate function > bool operator==(const FxAllocAllocator& that) { return true; } > ^ > workdir/UnpackedTarball/pdfium/core/fxcrt/fx_memory_wrappers.h:73:8: note: candidate function (with reversed parameter order) Change-Id: I48cfc8ce37287d9d3c0dec8c4d8b14b53de895d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86993 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <[email protected]> diff --git a/external/pdfium/UnpackedTarball_pdfium.mk b/external/pdfium/UnpackedTarball_pdfium.mk index 2874bd72719f..ba1a7e994dbf 100644 --- a/external/pdfium/UnpackedTarball_pdfium.mk +++ b/external/pdfium/UnpackedTarball_pdfium.mk @@ -14,6 +14,7 @@ pdfium_patches += ubsan.patch pdfium_patches += build.patch.1 # Avoids Windows 8 build dependency. pdfium_patches += windows7.patch.1 +pdfium_patches += c++20-comparison.patch $(eval $(call gb_UnpackedTarball_UnpackedTarball,pdfium)) diff --git a/external/pdfium/c++20-comparison.patch b/external/pdfium/c++20-comparison.patch new file mode 100644 index 000000000000..025f9ba010db --- /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 @@ + } + + // There's no state, so they are all the same, +- bool operator==(const FxAllocAllocator& that) { return true; } +- bool operator!=(const FxAllocAllocator& that) { return false; } ++ bool operator==(const FxAllocAllocator& that) const { return true; } ++ bool operator!=(const FxAllocAllocator& that) const { return false; } + }; + + #endif // CORE_FXCRT_FX_MEMORY_WRAPPERS_H_ commit daba2fb4c5591ad4f3d503b081688d78196e6b30 Author: Miklos Vajna <[email protected]> AuthorDate: Tue Jan 14 21:34:52 2020 +0100 Commit: Vasily Melenchuk <[email protected]> CommitDate: Tue Dec 22 23:36:33 2020 +0300 external: update pdfium to 4021 Change-Id: I1c3280e811bf65641bf559e3f01bc62e609548f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86811 Reviewed-by: Miklos Vajna <[email protected]> Tested-by: Jenkins Conflicts: vcl/qa/cppunit/pdfexport/pdfexport.cxx diff --git a/download.lst b/download.lst index c5dc4bb6a7c2..f414414a8261 100644 --- a/download.lst +++ b/download.lst @@ -200,8 +200,8 @@ export OWNCLOUD_ANDROID_LIB_SHA256SUM := b18b3e3ef7fae6a79b62f2bb43cc47a5346b633 export OWNCLOUD_ANDROID_LIB_TARBALL := owncloud-android-library-0.9.4-no-binary-deps.tar.gz export PAGEMAKER_SHA256SUM := 66adacd705a7d19895e08eac46d1e851332adf2e736c566bef1164e7a442519d export PAGEMAKER_TARBALL := libpagemaker-0.0.4.tar.xz -export PDFIUM_SHA256SUM := 80d4d6bd8faec226936fcde5521c6e92c0c645126ac3ae72dd2c160ca1749895 -export PDFIUM_TARBALL := pdfium-3963.tar.bz2 +export PDFIUM_SHA256SUM := 55d642468718c45fc8409537a3e8badd7e7e7be18c6e1c4be90eb278d1f1e04a +export PDFIUM_TARBALL := pdfium-4021.tar.bz2 export PIXMAN_SHA256SUM := 21b6b249b51c6800dc9553b65106e1e37d0e25df942c90531d4c3997aa20a88e export PIXMAN_TARBALL := e80ebae4da01e77f68744319f01d52a3-pixman-0.34.0.tar.gz export LIBPNG_SHA256SUM := 505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201fc80868d88ca diff --git a/external/pdfium/Library_pdfium.mk b/external/pdfium/Library_pdfium.mk index 75617516c6d6..1d645909b58a 100644 --- a/external/pdfium/Library_pdfium.mk +++ b/external/pdfium/Library_pdfium.mk @@ -315,6 +315,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ UnpackedTarball/pdfium/core/fpdfdoc/cpdf_structtree \ UnpackedTarball/pdfium/core/fpdfdoc/cba_fontmap \ UnpackedTarball/pdfium/core/fpdfdoc/cpdf_color_utils \ + UnpackedTarball/pdfium/core/fpdfdoc/cpdf_icon \ )) # fpdftext @@ -552,6 +553,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ 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 \ )) # skia_shared diff --git a/external/pdfium/UnpackedTarball_pdfium.mk b/external/pdfium/UnpackedTarball_pdfium.mk index 8f493ea3a0d6..2874bd72719f 100644 --- a/external/pdfium/UnpackedTarball_pdfium.mk +++ b/external/pdfium/UnpackedTarball_pdfium.mk @@ -44,6 +44,7 @@ $(eval $(call gb_UnpackedTarball_set_post_action,pdfium,\ 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/win/win_util.cc third_party/base/win/win_util.cpp \ )) diff --git a/external/pdfium/build.patch.1 b/external/pdfium/build.patch.1 index 47316fe235a1..729d87f5ee8e 100644 --- a/external/pdfium/build.patch.1 +++ b/external/pdfium/build.patch.1 @@ -1,24 +1,3 @@ -diff --git a/core/fxge/dib/cfx_imagetransformer.cpp b/core/fxge/dib/cfx_imagetransformer.cpp -index 8e01127b0..f4ce4d915 100644 ---- a/core/fxge/dib/cfx_imagetransformer.cpp -+++ b/core/fxge/dib/cfx_imagetransformer.cpp -@@ -315,14 +315,14 @@ bool CFX_ImageTransformer::Continue(IFX_PauseIndicator* pPause) { - } else if (pDestMask) { - CalcData cdata = { - pDestMask.Get(), result2stretch, pSrcMaskBuf, -- m_Storer.GetBitmap()->m_pAlphaMask->GetPitch(), -+ static_cast<uint32_t>(m_Storer.GetBitmap()->m_pAlphaMask->GetPitch()), - }; - CalcMask(cdata); - } - - CalcData cdata = {pTransformed.Get(), result2stretch, - m_Storer.GetBitmap()->GetBuffer(), -- m_Storer.GetBitmap()->GetPitch()}; -+ static_cast<uint32_t>(m_Storer.GetBitmap()->GetPitch())}; - if (m_Storer.GetBitmap()->IsAlphaMask()) { - CalcAlpha(cdata); - } else { diff --git a/core/fpdfdoc/cpdf_metadata.cpp b/core/fpdfdoc/cpdf_metadata.cpp index 323de4ffc..f11a0b0ad 100644 --- a/core/fpdfdoc/cpdf_metadata.cpp @@ -58,3 +37,17 @@ index 0fb627ba8..dda1fc8bc 100644 : span(container.data(), container.size()) {} template < typename Container, +--- a/core/fxcrt/fx_memory_wrappers.h.orig 2020-01-15 11:16:03.848760100 +0100 ++++ b/core/fxcrt/fx_memory_wrappers.h 2020-01-15 11:16:44.050531200 +0100 +@@ -23,8 +23,11 @@ + template <class T> + struct FxAllocAllocator { + public: ++#ifndef _WIN32 ++ // MSVC thinks uint8_t is not an arithmetic type. + static_assert(std::is_arithmetic<T>::value, + "Only numeric types allowed in this partition"); ++#endif + + using value_type = T; + using pointer = T*; diff --git a/external/pdfium/visibility.patch.1 b/external/pdfium/visibility.patch.1 index 835528794f4b..14a380bbfa16 100644 --- a/external/pdfium/visibility.patch.1 +++ b/external/pdfium/visibility.patch.1 @@ -1,16 +1,16 @@ diff --git a/public/fpdfview.h b/public/fpdfview.h -index 2b84f07ba..b6c0a356b 100644 +index 0542b0541..2c9a37b4a 100644 --- a/public/fpdfview.h +++ b/public/fpdfview.h -@@ -168,7 +168,6 @@ typedef int FPDF_OBJECT_TYPE; - // Text object enums. - typedef int FPDF_TEXT_RENDERMODE; +@@ -175,7 +175,6 @@ typedef int FPDF_ANNOT_APPEARANCEMODE; + // Dictionary value types. + typedef int FPDF_OBJECT_TYPE; -#if defined(COMPONENT_BUILD) // FPDF_EXPORT should be consistent with |export| in the pdfium_fuzzer // template in testing/fuzzers/BUILD.gn. #if defined(WIN32) -@@ -184,9 +183,6 @@ typedef int FPDF_TEXT_RENDERMODE; +@@ -191,9 +190,6 @@ typedef int FPDF_OBJECT_TYPE; #define FPDF_EXPORT #endif // defined(FPDF_IMPLEMENTATION) #endif // defined(WIN32) diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in index 68e6d00f6f6e..e7f79af800cf 100644 --- a/solenv/flatpak-manifest.in +++ b/solenv/flatpak-manifest.in @@ -69,10 +69,10 @@ "type": "shell" }, { - "url": "https://dev-www.libreoffice.org/src/pdfium-3963.tar.bz2", - "sha256": "80d4d6bd8faec226936fcde5521c6e92c0c645126ac3ae72dd2c160ca1749895", + "url": "https://dev-www.libreoffice.org/src/pdfium-4021.tar.bz2", + "sha256": "55d642468718c45fc8409537a3e8badd7e7e7be18c6e1c4be90eb278d1f1e04a", "type": "file", - "dest-filename": "external/tarballs/pdfium-3963.tar.bz2" + "dest-filename": "external/tarballs/pdfium-4021.tar.bz2" }, { "url": "https://dev-www.libreoffice.org/src/0168229624cfac409e766913506961a8-ucpp-1.3.2.tar.gz", diff --git a/svx/source/svdraw/svdpdf.cxx b/svx/source/svdraw/svdpdf.cxx index 766f3a298b36..f1dfe60082f9 100644 --- a/svx/source/svdraw/svdpdf.cxx +++ b/svx/source/svdraw/svdpdf.cxx @@ -768,9 +768,9 @@ void ImpSdrPdfImport::ImportForm(FPDF_PAGEOBJECT pPageObject, FPDF_TEXTPAGE pTex // Get the form matrix to perform correct translation/scaling of the form sub-objects. const Matrix aOldMatrix = mCurMatrix; - double a, b, c, d, e, f; - FPDFFormObj_GetMatrix(pPageObject, &a, &b, &c, &d, &e, &f); - mCurMatrix = Matrix(a, b, c, d, e, f); + FS_MATRIX matrix; + FPDFFormObj_GetMatrix(pPageObject, &matrix); + mCurMatrix = Matrix(matrix.a, matrix.b, matrix.c, matrix.d, matrix.e, matrix.f); const int nCount = FPDFFormObj_CountObjects(pPageObject); for (int nIndex = 0; nIndex < nCount; ++nIndex) @@ -798,8 +798,8 @@ void ImpSdrPdfImport::ImportText(FPDF_PAGEOBJECT pPageObject, FPDF_TEXTPAGE pTex if (left == right || top == bottom) return; - double a, b, c, d, e, f; - FPDFTextObj_GetMatrix(pPageObject, &a, &b, &c, &d, &e, &f); + FS_MATRIX matrix; + FPDFTextObj_GetMatrix(pPageObject, &matrix); Matrix aTextMatrix(mCurMatrix); aTextMatrix.Transform(left, right, top, bottom); @@ -817,8 +817,8 @@ void ImpSdrPdfImport::ImportText(FPDF_PAGEOBJECT pPageObject, FPDF_TEXTPAGE pTex OUString sText(pText.get(), nActualChars); const double dFontSize = FPDFTextObj_GetFontSize(pPageObject); - double dFontSizeH = fabs(sqrt2(a, c) * dFontSize); - double dFontSizeV = fabs(sqrt2(b, d) * dFontSize); + double dFontSizeH = fabs(sqrt2(matrix.a, matrix.c) * dFontSize); + double dFontSizeV = fabs(sqrt2(matrix.b, matrix.d) * dFontSize); dFontSizeH = lcl_PointToPixel(dFontSizeH); dFontSizeV = lcl_PointToPixel(dFontSizeV); dFontSizeH = lcl_ToLogic(dFontSizeH); @@ -861,6 +861,7 @@ void ImpSdrPdfImport::ImportText(FPDF_PAGEOBJECT pPageObject, FPDF_TEXTPAGE pTex break; case FPDF_TEXTRENDERMODE_STROKE: case FPDF_TEXTRENDERMODE_STROKE_CLIP: + case FPDF_TEXTRENDERMODE_UNKNOWN: break; case FPDF_TEXTRENDERMODE_INVISIBLE: case FPDF_TEXTRENDERMODE_CLIP: @@ -1033,9 +1034,9 @@ void ImpSdrPdfImport::ImportImage(FPDF_PAGEOBJECT pPageObject, int /*nPageObject void ImpSdrPdfImport::ImportPath(FPDF_PAGEOBJECT pPageObject, int /*nPageObjectIndex*/) { - double a, b, c, d, e, f; - FPDFPath_GetMatrix(pPageObject, &a, &b, &c, &d, &e, &f); - Matrix aPathMatrix(a, b, c, d, e, f); + FS_MATRIX matrix; + FPDFPath_GetMatrix(pPageObject, &matrix); + Matrix aPathMatrix(matrix.a, matrix.b, matrix.c, matrix.d, matrix.e, matrix.f); aPathMatrix.Concatinate(mCurMatrix); basegfx::B2DPolyPolygon aPolyPoly; diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx b/vcl/qa/cppunit/pdfexport/pdfexport.cxx index 28b9fc9f3bcc..9714cb621b26 100644 --- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx +++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx @@ -1818,6 +1818,87 @@ void PdfExportTest::testTocLink() CPPUNIT_ASSERT(FPDFLink_Enumerate(pPdfPage.get(), &nStartPos, &pLinkAnnot)); } +void PdfExportTest::testPdfImageResourceInlineXObjectRef() +{ + // Create an empty document. + mxComponent = loadFromDesktop("private:factory/swriter"); + CPPUNIT_ASSERT(mxComponent.is()); + uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); + uno::Reference<text::XText> xText = xTextDocument->getText(); + uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor(); + + // Insert the PDF image. + uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY); + uno::Reference<beans::XPropertySet> xGraphicObject( + xFactory->createInstance("com.sun.star.text.TextGraphicObject"), uno::UNO_QUERY); + OUString aURL + = m_directories.getURLFromSrc(DATA_DIRECTORY) + "pdf-image-resource-inline-xobject-ref.pdf"; + xGraphicObject->setPropertyValue("GraphicURL", uno::makeAny(aURL)); + uno::Reference<drawing::XShape> xShape(xGraphicObject, uno::UNO_QUERY); + xShape->setSize(awt::Size(1000, 1000)); + uno::Reference<text::XTextContent> xTextContent(xGraphicObject, uno::UNO_QUERY); + xText->insertTextContent(xCursor->getStart(), xTextContent, /*bAbsorb=*/false); + + // Save as PDF. + uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY); + utl::MediaDescriptor aMediaDescriptor; + aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export"); + xStorable->storeToURL(maTempFile.GetURL(), aMediaDescriptor.getAsConstPropertyValueList()); + + // Init pdfium, vcl::ImportPDF() calls FPDF_DestroyLibrary after our setUp(). + FPDF_LIBRARY_CONFIG config; + config.version = 2; + config.m_pUserFontPaths = nullptr; + config.m_pIsolate = nullptr; + config.m_v8EmbedderSlot = 0; + FPDF_InitLibraryWithConfig(&config); + + // Parse the export result. + SvFileStream aFile(maTempFile.GetURL(), StreamMode::READ); + maMemory.WriteStream(aFile); + DocumentHolder pPdfDocument( + FPDF_LoadMemDocument(maMemory.GetData(), maMemory.GetSize(), /*password=*/nullptr)); + CPPUNIT_ASSERT(pPdfDocument.get()); + CPPUNIT_ASSERT_EQUAL(1, FPDF_GetPageCount(pPdfDocument.get())); + + // Make sure that the page -> form -> form has a child image. + PageHolder pPdfPage(FPDF_LoadPage(pPdfDocument.get(), /*page_index=*/0)); + CPPUNIT_ASSERT(pPdfPage.get()); + CPPUNIT_ASSERT_EQUAL(1, FPDFPage_CountObjects(pPdfPage.get())); + FPDF_PAGEOBJECT pPageObject = FPDFPage_GetObject(pPdfPage.get(), 0); + CPPUNIT_ASSERT_EQUAL(FPDF_PAGEOBJ_FORM, FPDFPageObj_GetType(pPageObject)); + CPPUNIT_ASSERT_EQUAL(1, FPDFFormObj_CountObjects(pPageObject)); + FPDF_PAGEOBJECT pFormObject = FPDFFormObj_GetObject(pPageObject, 0); + CPPUNIT_ASSERT_EQUAL(FPDF_PAGEOBJ_FORM, FPDFPageObj_GetType(pFormObject)); + // Without the accompanying fix in place, this test would have failed with: + // - Expected: 1 + // - Actual : 0 + // i.e. the sub-form was missing its image. + CPPUNIT_ASSERT_EQUAL(1, FPDFFormObj_CountObjects(pFormObject)); + + // Check if the inner form object (original page object in the pdf image) has the correct + // rotation. + FPDF_PAGEOBJECT pInnerFormObject = FPDFFormObj_GetObject(pFormObject, 0); + CPPUNIT_ASSERT_EQUAL(FPDF_PAGEOBJ_FORM, FPDFPageObj_GetType(pInnerFormObject)); + CPPUNIT_ASSERT_EQUAL(1, FPDFFormObj_CountObjects(pInnerFormObject)); + FPDF_PAGEOBJECT pImage = FPDFFormObj_GetObject(pInnerFormObject, 0); + CPPUNIT_ASSERT_EQUAL(FPDF_PAGEOBJ_IMAGE, FPDFPageObj_GetType(pImage)); + FS_MATRIX aMatrix; + FPDFFormObj_GetMatrix(pInnerFormObject, &aMatrix); + basegfx::B2DHomMatrix aMat{ aMatrix.a, aMatrix.c, aMatrix.e, aMatrix.b, aMatrix.d, aMatrix.f }; + basegfx::B2DTuple aScale; + basegfx::B2DTuple aTranslate; + double fRotate = 0; + double fShearX = 0; + aMat.decompose(aScale, aTranslate, fRotate, fShearX); + int nRotateDeg = basegfx::rad2deg(fRotate); + // Without the accompanying fix in place, this test would have failed with: + // - Expected: -90 + // - Actual : 0 + // i.e. rotation was lost on pdf export. + CPPUNIT_ASSERT_EQUAL(-90, nRotateDeg); +} + CPPUNIT_TEST_SUITE_REGISTRATION(PdfExportTest); } commit e6787fa5ad6c0f713d08703d95550b26989229a4 Author: Miklos Vajna <[email protected]> AuthorDate: Tue Nov 12 21:21:21 2019 +0100 Commit: Vasily Melenchuk <[email protected]> CommitDate: Tue Dec 22 22:21:29 2020 +0300 external: update pdfium to 3963 Also simplify visibility.patch.1. Change-Id: I8b4ed78b314a1a1f7d31467f782877f056429cc2 Reviewed-on: https://gerrit.libreoffice.org/82548 Tested-by: Jenkins Reviewed-by: Miklos Vajna <[email protected]> diff --git a/download.lst b/download.lst index 945d6e63880c..c5dc4bb6a7c2 100644 --- a/download.lst +++ b/download.lst @@ -200,8 +200,8 @@ export OWNCLOUD_ANDROID_LIB_SHA256SUM := b18b3e3ef7fae6a79b62f2bb43cc47a5346b633 export OWNCLOUD_ANDROID_LIB_TARBALL := owncloud-android-library-0.9.4-no-binary-deps.tar.gz export PAGEMAKER_SHA256SUM := 66adacd705a7d19895e08eac46d1e851332adf2e736c566bef1164e7a442519d export PAGEMAKER_TARBALL := libpagemaker-0.0.4.tar.xz -export PDFIUM_SHA256SUM := 7b08c4239e6eec685d9bfc99a041ba5df68d11fcd039ba908b91c9af90f941b1 -export PDFIUM_TARBALL := pdfium-3896.tar.bz2 +export PDFIUM_SHA256SUM := 80d4d6bd8faec226936fcde5521c6e92c0c645126ac3ae72dd2c160ca1749895 +export PDFIUM_TARBALL := pdfium-3963.tar.bz2 export PIXMAN_SHA256SUM := 21b6b249b51c6800dc9553b65106e1e37d0e25df942c90531d4c3997aa20a88e export PIXMAN_TARBALL := e80ebae4da01e77f68744319f01d52a3-pixman-0.34.0.tar.gz export LIBPNG_SHA256SUM := 505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201fc80868d88ca diff --git a/external/pdfium/Library_pdfium.mk b/external/pdfium/Library_pdfium.mk index 90a7f1157e4b..75617516c6d6 100644 --- a/external/pdfium/Library_pdfium.mk +++ b/external/pdfium/Library_pdfium.mk @@ -23,7 +23,7 @@ $(eval $(call gb_Library_set_include,pdfium,\ )) $(eval $(call gb_Library_add_defs,pdfium,\ - -DPDFIUM_DLLIMPLEMENTATION \ + -DFPDF_IMPLEMENTATION \ -DUSE_SYSTEM_LCMS2 \ -DUSE_SYSTEM_LIBJPEG \ -DUSE_SYSTEM_ZLIB \ @@ -241,6 +241,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ 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/edit/cpdf_creator \ UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_encryptor \ UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_flateencoder \ @@ -635,6 +636,10 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ $(eval $(call gb_Library_use_system_win32_libs,pdfium,\ gdi32 \ )) + +$(eval $(call gb_Library_add_defs,pdfium,\ + -DWIN32 \ +)) endif ifeq ($(OS),MACOSX) diff --git a/external/pdfium/visibility.patch.1 b/external/pdfium/visibility.patch.1 index 9983723b2055..835528794f4b 100644 --- a/external/pdfium/visibility.patch.1 +++ b/external/pdfium/visibility.patch.1 @@ -1,45 +1,22 @@ diff --git a/public/fpdfview.h b/public/fpdfview.h -index f5212599f..57d6cda13 100644 +index 2b84f07ba..b6c0a356b 100644 --- a/public/fpdfview.h +++ b/public/fpdfview.h -@@ -154,31 +154,20 @@ typedef int FPDF_ANNOT_APPEARANCEMODE; - // Dictionary value types. - typedef int FPDF_OBJECT_TYPE; +@@ -168,7 +168,6 @@ typedef int FPDF_OBJECT_TYPE; + // Text object enums. + typedef int FPDF_TEXT_RENDERMODE; -#if defined(COMPONENT_BUILD) --// FPDF_EXPORT should be consistent with |export| in the pdfium_fuzzer --// template in testing/fuzzers/BUILD.gn. --#if defined(WIN32) --#if defined(FPDF_IMPLEMENTATION) -+#if defined(PDFIUM_DLLIMPLEMENTATION) -+#ifdef _WIN32 - #define FPDF_EXPORT __declspec(dllexport) - #else --#define FPDF_EXPORT __declspec(dllimport) --#endif // defined(FPDF_IMPLEMENTATION) + // FPDF_EXPORT should be consistent with |export| in the pdfium_fuzzer + // template in testing/fuzzers/BUILD.gn. + #if defined(WIN32) +@@ -184,9 +183,6 @@ typedef int FPDF_TEXT_RENDERMODE; + #define FPDF_EXPORT + #endif // defined(FPDF_IMPLEMENTATION) + #endif // defined(WIN32) -#else --#if defined(FPDF_IMPLEMENTATION) --#define FPDF_EXPORT __attribute__((visibility("default"))) --#else --#define FPDF_EXPORT --#endif // defined(FPDF_IMPLEMENTATION) --#endif // defined(WIN32) -+#define FPDF_EXPORT __attribute__ ((visibility("default"))) -+#endif - #else -#define FPDF_EXPORT -#endif // defined(COMPONENT_BUILD) -- --#if defined(WIN32) && defined(FPDFSDK_EXPORTS) --#define FPDF_CALLCONV __stdcall -+#ifdef _WIN32 -+#define FPDF_EXPORT __declspec(dllimport) - #else --#define FPDF_CALLCONV -+#define FPDF_EXPORT __attribute__ ((visibility("default"))) - #endif -+#endif -+#define FPDF_CALLCONV - // Exported Functions - #ifdef __cplusplus + #if defined(WIN32) && defined(FPDFSDK_EXPORTS) + #define FPDF_CALLCONV __stdcall diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in index 9ea80d2093d4..68e6d00f6f6e 100644 --- a/solenv/flatpak-manifest.in +++ b/solenv/flatpak-manifest.in @@ -69,10 +69,10 @@ "type": "shell" }, { - "url": "https://dev-www.libreoffice.org/src/pdfium-3896.tar.bz2", - "sha256": "7b08c4239e6eec685d9bfc99a041ba5df68d11fcd039ba908b91c9af90f941b1", + "url": "https://dev-www.libreoffice.org/src/pdfium-3963.tar.bz2", + "sha256": "80d4d6bd8faec226936fcde5521c6e92c0c645126ac3ae72dd2c160ca1749895", "type": "file", - "dest-filename": "external/tarballs/pdfium-3896.tar.bz2" + "dest-filename": "external/tarballs/pdfium-3963.tar.bz2" }, { "url": "https://dev-www.libreoffice.org/src/0168229624cfac409e766913506961a8-ucpp-1.3.2.tar.gz", diff --git a/svx/source/svdraw/svdpdf.cxx b/svx/source/svdraw/svdpdf.cxx index e4ef7c640373..766f3a298b36 100644 --- a/svx/source/svdraw/svdpdf.cxx +++ b/svx/source/svdraw/svdpdf.cxx @@ -799,7 +799,7 @@ void ImpSdrPdfImport::ImportText(FPDF_PAGEOBJECT pPageObject, FPDF_TEXTPAGE pTex return; double a, b, c, d, e, f; - FPDFText_GetMatrix(pPageObject, &a, &b, &c, &d, &e, &f); + FPDFTextObj_GetMatrix(pPageObject, &a, &b, &c, &d, &e, &f); Matrix aTextMatrix(mCurMatrix); aTextMatrix.Transform(left, right, top, bottom); @@ -851,7 +851,7 @@ void ImpSdrPdfImport::ImportText(FPDF_PAGEOBJECT pPageObject, FPDF_TEXTPAGE pTex Color aTextColor(COL_TRANSPARENT); bool bFill = false; bool bUse = true; - switch (FPDFText_GetTextRenderMode(pPageObject)) + switch (FPDFTextObj_GetTextRenderMode(pPageObject)) { case FPDF_TEXTRENDERMODE_FILL: case FPDF_TEXTRENDERMODE_FILL_CLIP: commit 3313f032cf6d3459387635f02ac3bf80a5e71fec Author: Miklos Vajna <[email protected]> AuthorDate: Tue Sep 10 23:17:35 2019 +0200 Commit: Vasily Melenchuk <[email protected]> CommitDate: Tue Dec 22 22:20:21 2020 +0300 external: update pdfium to 3896 Change-Id: I9d47d9afed47e01657b42fbfdb06e7fc91a150c8 Reviewed-on: https://gerrit.libreoffice.org/78806 Tested-by: Jenkins Reviewed-by: Miklos Vajna <[email protected]> diff --git a/download.lst b/download.lst index 211b193431ee..945d6e63880c 100644 --- a/download.lst +++ b/download.lst @@ -200,8 +200,8 @@ export OWNCLOUD_ANDROID_LIB_SHA256SUM := b18b3e3ef7fae6a79b62f2bb43cc47a5346b633 export OWNCLOUD_ANDROID_LIB_TARBALL := owncloud-android-library-0.9.4-no-binary-deps.tar.gz export PAGEMAKER_SHA256SUM := 66adacd705a7d19895e08eac46d1e851332adf2e736c566bef1164e7a442519d export PAGEMAKER_TARBALL := libpagemaker-0.0.4.tar.xz -export PDFIUM_SHA256SUM := 43ef702b65a21d66fc580b1b9c77893e33fe07dd764a17c2aac08ecec534c8ad -export PDFIUM_TARBALL := pdfium-3849.tar.bz2 +export PDFIUM_SHA256SUM := 7b08c4239e6eec685d9bfc99a041ba5df68d11fcd039ba908b91c9af90f941b1 +export PDFIUM_TARBALL := pdfium-3896.tar.bz2 export PIXMAN_SHA256SUM := 21b6b249b51c6800dc9553b65106e1e37d0e25df942c90531d4c3997aa20a88e export PIXMAN_TARBALL := e80ebae4da01e77f68744319f01d52a3-pixman-0.34.0.tar.gz export LIBPNG_SHA256SUM := 505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201fc80868d88ca diff --git a/external/pdfium/Library_pdfium.mk b/external/pdfium/Library_pdfium.mk index 34c2e9a3fd43..90a7f1157e4b 100644 --- a/external/pdfium/Library_pdfium.mk +++ b/external/pdfium/Library_pdfium.mk @@ -37,7 +37,6 @@ $(eval $(call gb_Library_set_generated_cxx_suffix,pdfium,cpp)) # pdfium $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ - UnpackedTarball/pdfium/fpdfsdk/cfx_systemhandler \ UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_annot \ UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_annothandlermgr \ UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_annotiteration \ @@ -73,8 +72,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ UnpackedTarball/pdfium/fpdfsdk/fpdf_save \ UnpackedTarball/pdfium/fpdfsdk/fpdf_text \ UnpackedTarball/pdfium/fpdfsdk/fpdf_view \ - UnpackedTarball/pdfium/fpdfsdk/ipdfsdk_pauseadapter \ - UnpackedTarball/pdfium/fpdfsdk/cpdf_annotcontext \ + UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_pauseadapter \ UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_interactiveform \ )) @@ -163,8 +161,6 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ 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/cpdf_modulemgr \ - UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_pagerendercontext \ UnpackedTarball/pdfium/core/fpdfapi/edit/cpdf_pagecontentgenerator \ UnpackedTarball/pdfium/core/fpdfapi/font/cpdf_cidfont \ UnpackedTarball/pdfium/core/fpdfapi/font/cpdf_font \ @@ -232,7 +228,6 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_read_validator \ UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_charposlist \ UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_devicebuffer \ - UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_dibtransferfunc \ UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_docrenderdata \ UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_imagecacheentry \ UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_imageloader \ @@ -244,9 +239,8 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ 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_transferfunc \ UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_type3cache \ - UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_type3glyphs \ + UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_type3glyphmap \ UnpackedTarball/pdfium/core/fpdfapi/edit/cpdf_creator \ UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_encryptor \ UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_flateencoder \ @@ -272,12 +266,16 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ 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/render/cpdf_dibbase \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_dibbase \ 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_dibtransferfunc \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_transferfunc \ )) # fpdfdoc @@ -484,7 +482,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ # pwl $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ - UnpackedTarball/pdfium/fpdfsdk/pwl/cpwl_appstream \ + UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_appstream \ UnpackedTarball/pdfium/fpdfsdk/pwl/cpwl_button \ UnpackedTarball/pdfium/fpdfsdk/pwl/cpwl_caret \ UnpackedTarball/pdfium/fpdfsdk/pwl/cpwl_combo_box \ @@ -496,8 +494,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ UnpackedTarball/pdfium/fpdfsdk/pwl/cpwl_list_impl \ UnpackedTarball/pdfium/fpdfsdk/pwl/cpwl_scroll_bar \ UnpackedTarball/pdfium/fpdfsdk/pwl/cpwl_special_button \ - UnpackedTarball/pdfium/fpdfsdk/pwl/cpwl_timer \ - UnpackedTarball/pdfium/fpdfsdk/pwl/cpwl_timer_handler \ + UnpackedTarball/pdfium/core/fxcrt/cfx_timer \ UnpackedTarball/pdfium/fpdfsdk/pwl/cpwl_wnd \ )) @@ -632,6 +629,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ UnpackedTarball/pdfium/core/fxge/win32/fx_win32_print \ UnpackedTarball/pdfium/core/fxcrt/cfx_fileaccess_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,\ diff --git a/external/pdfium/build.patch.1 b/external/pdfium/build.patch.1 index 562b2e6198d3..47316fe235a1 100644 --- a/external/pdfium/build.patch.1 +++ b/external/pdfium/build.patch.1 @@ -58,16 +58,3 @@ index 0fb627ba8..dda1fc8bc 100644 : span(container.data(), container.size()) {} template < typename Container, -diff --git a/core/fpdfdoc/cpdf_dest.h b/core/fpdfdoc/cpdf_dest.h -index 7f4eb86c0..5e227f86e 100644 ---- a/core/fpdfdoc/cpdf_dest.h -+++ b/core/fpdfdoc/cpdf_dest.h -@@ -41,7 +41,7 @@ - float* pZoom) const; - - private: -- UnownedPtr<const CPDF_Array> const m_pArray; -+ UnownedPtr<const CPDF_Array> m_pArray; - }; - - #endif // CORE_FPDFDOC_CPDF_DEST_H_ diff --git a/external/pdfium/inc/pch/precompiled_pdfium.hxx b/external/pdfium/inc/pch/precompiled_pdfium.hxx index ad1239d5bb28..d4d3b2f462a3 100644 --- a/external/pdfium/inc/pch/precompiled_pdfium.hxx +++ b/external/pdfium/inc/pch/precompiled_pdfium.hxx @@ -78,7 +78,6 @@ #include <core/fpdfapi/cmaps/Japan1/cmaps_japan1.h> #include <core/fpdfapi/cmaps/Korea1/cmaps_korea1.h> #include <core/fpdfapi/cmaps/cmap_int.h> -#include <core/fpdfapi/cpdf_modulemgr.h> #include <core/fpdfapi/edit/cpdf_contentstream_write_utils.h> #include <core/fpdfapi/edit/cpdf_creator.h> #include <core/fpdfapi/edit/cpdf_pagecontentgenerator.h> @@ -101,6 +100,7 @@ #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_clippath.h> #include <core/fpdfapi/page/cpdf_color.h> #include <core/fpdfapi/page/cpdf_colorspace.h> @@ -109,6 +109,8 @@ #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_dibbase.h> +#include <core/fpdfapi/page/cpdf_dibtransferfunc.h> #include <core/fpdfapi/page/cpdf_docpagedata.h> #include <core/fpdfapi/page/cpdf_expintfunc.h> #include <core/fpdfapi/page/cpdf_form.h> @@ -125,7 +127,6 @@ #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_pagerendercontext.h> #include <core/fpdfapi/page/cpdf_path.h> #include <core/fpdfapi/page/cpdf_pathobject.h> #include <core/fpdfapi/page/cpdf_pattern.h> @@ -141,6 +142,7 @@ #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_transparency.h> #include <core/fpdfapi/parser/cfdf_document.h> #include <core/fpdfapi/parser/cpdf_array.h> @@ -177,22 +179,20 @@ #include <core/fpdfapi/parser/fpdf_parser_utility.h> #include <core/fpdfapi/render/cpdf_charposlist.h> #include <core/fpdfapi/render/cpdf_devicebuffer.h> -#include <core/fpdfapi/render/cpdf_dibbase.h> -#include <core/fpdfapi/render/cpdf_dibtransferfunc.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_renderstatus.h> #include <core/fpdfapi/render/cpdf_scaledrenderbuffer.h> #include <core/fpdfapi/render/cpdf_textrenderer.h> -#include <core/fpdfapi/render/cpdf_transferfunc.h> #include <core/fpdfapi/render/cpdf_type3cache.h> -#include <core/fpdfapi/render/cpdf_type3glyphs.h> +#include <core/fpdfapi/render/cpdf_type3glyphmap.h> #include <core/fpdfdoc/cba_fontmap.h> #include <core/fpdfdoc/cline.h> #include <core/fpdfdoc/cpdf_aaction.h> @@ -276,6 +276,7 @@ #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> @@ -369,13 +370,12 @@ #include <core/fxge/systemfontinfo_iface.h> #include <core/fxge/text_char_pos.h> #include <core/fxge/text_glyph_pos.h> -#include <fpdfsdk/cfx_systemhandler.h> -#include <fpdfsdk/cpdf_annotcontext.h> #include <fpdfsdk/cpdfsdk_actionhandler.h> #include <fpdfsdk/cpdfsdk_annot.h> #include <fpdfsdk/cpdfsdk_annothandlermgr.h> #include <fpdfsdk/cpdfsdk_annotiteration.h> #include <fpdfsdk/cpdfsdk_annotiterator.h> +#include <fpdfsdk/cpdfsdk_appstream.h> #include <fpdfsdk/cpdfsdk_baannot.h> #include <fpdfsdk/cpdfsdk_baannothandler.h> #include <fpdfsdk/cpdfsdk_customaccess.h> @@ -385,6 +385,7 @@ #include <fpdfsdk/cpdfsdk_helpers.h> #include <fpdfsdk/cpdfsdk_interactiveform.h> #include <fpdfsdk/cpdfsdk_pageview.h> +#include <fpdfsdk/cpdfsdk_pauseadapter.h> #include <fpdfsdk/cpdfsdk_widget.h> #include <fpdfsdk/cpdfsdk_widgethandler.h> #include <fpdfsdk/formfiller/cffl_button.h> @@ -398,8 +399,6 @@ #include <fpdfsdk/formfiller/cffl_textfield.h> #include <fpdfsdk/formfiller/cffl_textobject.h> #include <fpdfsdk/ipdfsdk_annothandler.h> -#include <fpdfsdk/ipdfsdk_pauseadapter.h> -#include <fpdfsdk/pwl/cpwl_appstream.h> #include <fpdfsdk/pwl/cpwl_button.h> #include <fpdfsdk/pwl/cpwl_caret.h> #include <fpdfsdk/pwl/cpwl_combo_box.h> @@ -411,9 +410,8 @@ #include <fpdfsdk/pwl/cpwl_list_impl.h> #include <fpdfsdk/pwl/cpwl_scroll_bar.h> #include <fpdfsdk/pwl/cpwl_special_button.h> -#include <fpdfsdk/pwl/cpwl_timer.h> -#include <fpdfsdk/pwl/cpwl_timer_handler.h> #include <fpdfsdk/pwl/cpwl_wnd.h> +#include <fpdfsdk/pwl/ipwl_systemhandler.h> #include <fxjs/cjs_event_context_stub.h> #include <fxjs/cjs_runtimestub.h> #include <fxjs/ijs_event_context.h> diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in index cb766aa303ea..9ea80d2093d4 100644 --- a/solenv/flatpak-manifest.in +++ b/solenv/flatpak-manifest.in @@ -69,10 +69,10 @@ "type": "shell" }, { - "url": "https://dev-www.libreoffice.org/src/pdfium-3794.tar.bz2", - "sha256": "e3faddcf741336c64ca2e6f72b23e9e60979969b2cf67c878c9a5bc38328cfc4", + "url": "https://dev-www.libreoffice.org/src/pdfium-3896.tar.bz2", + "sha256": "7b08c4239e6eec685d9bfc99a041ba5df68d11fcd039ba908b91c9af90f941b1", "type": "file", - "dest-filename": "external/tarballs/pdfium-3794.tar.bz2" + "dest-filename": "external/tarballs/pdfium-3896.tar.bz2" }, { "url": "https://dev-www.libreoffice.org/src/0168229624cfac409e766913506961a8-ucpp-1.3.2.tar.gz", commit 34b1c3ec95974423626a610bb05006c0bb2afa4a Author: Miklos Vajna <[email protected]> AuthorDate: Tue Jul 16 23:32:31 2019 +0200 Commit: Vasily Melenchuk <[email protected]> CommitDate: Tue Dec 22 22:19:11 2020 +0300 external: update pdfium to 3849 Change-Id: I616f57bd9de72b078500a290bf9ff89c71773f26 Reviewed-on: https://gerrit.libreoffice.org/75736 Tested-by: Jenkins Reviewed-by: Miklos Vajna <[email protected]> diff --git a/external/pdfium/inc/pch/precompiled_pdfium.hxx b/external/pdfium/inc/pch/precompiled_pdfium.hxx index c70c4d16a101..ad1239d5bb28 100644 --- a/external/pdfium/inc/pch/precompiled_pdfium.hxx +++ b/external/pdfium/inc/pch/precompiled_pdfium.hxx @@ -79,7 +79,7 @@ #include <core/fpdfapi/cmaps/Korea1/cmaps_korea1.h> #include <core/fpdfapi/cmaps/cmap_int.h> #include <core/fpdfapi/cpdf_modulemgr.h> -#include <core/fpdfapi/cpdf_pagerendercontext.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> @@ -120,10 +120,12 @@ #include <core/fpdfapi/page/cpdf_image.h> #include <core/fpdfapi/page/cpdf_imageobject.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_pagerendercontext.h> #include <core/fpdfapi/page/cpdf_path.h> #include <core/fpdfapi/page/cpdf_pathobject.h> #include <core/fpdfapi/page/cpdf_pattern.h> @@ -139,6 +141,7 @@ #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_transparency.h> #include <core/fpdfapi/parser/cfdf_document.h> #include <core/fpdfapi/parser/cpdf_array.h> #include <core/fpdfapi/parser/cpdf_boolean.h> @@ -188,9 +191,9 @@ #include <core/fpdfapi/render/cpdf_scaledrenderbuffer.h> #include <core/fpdfapi/render/cpdf_textrenderer.h> #include <core/fpdfapi/render/cpdf_transferfunc.h> -#include <core/fpdfapi/render/cpdf_transparency.h> #include <core/fpdfapi/render/cpdf_type3cache.h> #include <core/fpdfapi/render/cpdf_type3glyphs.h> +#include <core/fpdfdoc/cba_fontmap.h> #include <core/fpdfdoc/cline.h> #include <core/fpdfdoc/cpdf_aaction.h> #include <core/fpdfdoc/cpdf_action.h> @@ -200,6 +203,7 @@ #include <core/fpdfdoc/cpdf_apsettings.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_docjsactions.h> @@ -213,7 +217,6 @@ #include <core/fpdfdoc/cpdf_metadata.h> #include <core/fpdfdoc/cpdf_nametree.h> #include <core/fpdfdoc/cpdf_numbertree.h> -#include <core/fpdfdoc/cpdf_occontext.h> #include <core/fpdfdoc/cpdf_pagelabel.h> #include <core/fpdfdoc/cpdf_structelement.h> #include <core/fpdfdoc/cpdf_structtree.h> @@ -230,29 +233,22 @@ #include <core/fpdftext/cpdf_textpage.h> #include <core/fpdftext/cpdf_textpagefind.h> #include <core/fpdftext/unicodenormalizationdata.h> -#include <core/fxcodec/JBig2_DocumentContext.h> -#include <core/fxcodec/bmp/fx_bmp.h> -#include <core/fxcodec/codec/ccodec_basicmodule.h> -#include <core/fxcodec/codec/ccodec_faxmodule.h> -#include <core/fxcodec/codec/ccodec_flatemodule.h> -#include <core/fxcodec/codec/ccodec_gifmodule.h> -#include <core/fxcodec/codec/ccodec_iccmodule.h> -#include <core/fxcodec/codec/ccodec_jbig2module.h> -#include <core/fxcodec/codec/ccodec_jpegmodule.h> -#include <core/fxcodec/codec/ccodec_jpxmodule.h> -#include <core/fxcodec/codec/ccodec_scanlinedecoder.h> -#include <core/fxcodec/codec/cfx_codec_memory.h> -#include <core/fxcodec/codec/cjpx_decoder.h> -#include <core/fxcodec/codec/codec_int.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/cfx_gifcontext.h> #include <core/fxcodec/gif/cfx_lzwdecompressor.h> +#include <core/fxcodec/gif/gifmodule.h> +#include <core/fxcodec/icc/iccmodule.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> @@ -265,6 +261,12 @@ #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/jbig2module.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/jpx/jpxmodule.h> +#include <core/fxcodec/scanlinedecoder.h> #include <core/fxcrt/autorestorer.h> #include <core/fxcrt/bytestring.h> #include <core/fxcrt/cfx_binarybuf.h> @@ -273,7 +275,6 @@ #include <core/fxcrt/cfx_fixedbufgrow.h> #include <core/fxcrt/cfx_memorystream.h> #include <core/fxcrt/cfx_readonlymemorystream.h> -#include <core/fxcrt/cfx_seekablemultistream.h> #include <core/fxcrt/cfx_seekablestreamproxy.h> #include <core/fxcrt/cfx_utf8decoder.h> #include <core/fxcrt/cfx_utf8encoder.h> @@ -313,6 +314,7 @@ #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/string_pool_template.h> @@ -329,7 +331,7 @@ #include <core/fxge/cfx_cliprgn.h> #include <core/fxge/cfx_color.h> #include <core/fxge/cfx_defaultrenderdevice.h> -#include <core/fxge/cfx_facecache.h> +#include <core/fxge/cfx_face.h> #include <core/fxge/cfx_folderfontinfo.h> #include <core/fxge/cfx_font.h> #include <core/fxge/cfx_fontcache.h> @@ -337,15 +339,16 @@ #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_pathdata.h> #include <core/fxge/cfx_renderdevice.h> #include <core/fxge/cfx_substfont.h> #include <core/fxge/cfx_unicodeencoding.h> -#include <core/fxge/cttfontdesc.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> @@ -360,9 +363,11 @@ #include <core/fxge/fx_dib.h> #include <core/fxge/fx_font.h> #include <core/fxge/fx_freetype.h> +#include <core/fxge/render_defines.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/cfx_systemhandler.h> #include <fpdfsdk/cpdf_annotcontext.h> @@ -382,7 +387,6 @@ #include <fpdfsdk/cpdfsdk_pageview.h> #include <fpdfsdk/cpdfsdk_widget.h> #include <fpdfsdk/cpdfsdk_widgethandler.h> -#include <fpdfsdk/formfiller/cba_fontmap.h> #include <fpdfsdk/formfiller/cffl_button.h> #include <fpdfsdk/formfiller/cffl_checkbox.h> #include <fpdfsdk/formfiller/cffl_combobox.h> diff --git a/svx/source/svdraw/svdpdf.cxx b/svx/source/svdraw/svdpdf.cxx index a3666b5b7d5a..e4ef7c640373 100644 --- a/svx/source/svdraw/svdpdf.cxx +++ b/svx/source/svdraw/svdpdf.cxx @@ -1138,12 +1138,12 @@ void ImpSdrPdfImport::ImportPath(FPDF_PAGEOBJECT pPageObject, int /*nPageObjectI unsigned int nG; unsigned int nB; unsigned int nA; - FPDFPath_GetFillColor(pPageObject, &nR, &nG, &nB, &nA); + FPDFPageObj_GetFillColor(pPageObject, &nR, &nG, &nB, &nA); mpVD->SetFillColor(Color(nR, nG, nB)); if (bStroke) { - FPDFPath_GetStrokeColor(pPageObject, &nR, &nG, &nB, &nA); + FPDFPageObj_GetStrokeColor(pPageObject, &nR, &nG, &nB, &nA); mpVD->SetLineColor(Color(nR, nG, nB)); } else _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
