From 0d7308406c34afb49e3ba30834a8f644e1755c1f Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Oct 29 2020 15:49:20 +0000 Subject: fix --disable-pdfium --- diff --git a/0001-fix-disable-pdfium-build.patch b/0001-fix-disable-pdfium-build.patch new file mode 100644 index 0000000..5f114a6 --- /dev/null +++ b/0001-fix-disable-pdfium-build.patch @@ -0,0 +1,74 @@ +From e835e268f3140f26987041222c7ed0cdd4bc51a1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Thu, 29 Oct 2020 15:45:01 +0000 +Subject: [PATCH] fix --disable-pdfium build + +Change-Id: I580972220bc39abe16288fa62c717e4ab25833d9 +--- + vcl/source/filter/ipdf/pdfread.cxx | 2 +- + xmlsecurity/source/pdfio/pdfdocument.cxx | 11 +++++++---- + 2 files changed, 8 insertions(+), 5 deletions(-) + +diff --git a/vcl/source/filter/ipdf/pdfread.cxx b/vcl/source/filter/ipdf/pdfread.cxx +index 3066c4deba4a..bf11578089e0 100644 +--- a/vcl/source/filter/ipdf/pdfread.cxx ++++ b/vcl/source/filter/ipdf/pdfread.cxx +@@ -218,7 +218,7 @@ size_t RenderPDFBitmaps(const void* pBuffer, int nSize, std::vector& rBi + (void)rBitmaps; + (void)nFirstPage; + (void)nPages; +- (void)fResolutionDPI; ++ (void)pSizeHint; + return 0; + #endif // HAVE_FEATURE_PDFIUM + } +diff --git a/xmlsecurity/source/pdfio/pdfdocument.cxx b/xmlsecurity/source/pdfio/pdfdocument.cxx +index c132d02cc2b0..b229206391f2 100644 +--- a/xmlsecurity/source/pdfio/pdfdocument.cxx ++++ b/xmlsecurity/source/pdfio/pdfdocument.cxx +@@ -138,10 +138,10 @@ bool IsCompleteSignature(SvStream& rStream, vcl::filter::PDFDocument& rDocument, + return std::find(rAllEOFs.begin(), rAllEOFs.end(), nFileEnd) != rAllEOFs.end(); + } + ++#if HAVE_FEATURE_PDFIUM + /// Collects the checksum of each page of one version of the PDF. + void AnalyizeSignatureStream(SvMemoryStream& rStream, std::vector& rPageChecksums) + { +-#if HAVE_FEATURE_PDFIUM + auto pPdfium = vcl::pdf::PDFiumLibrary::get(); + vcl::pdf::PDFiumDocument aPdfDocument( + FPDF_LoadMemDocument(rStream.GetData(), rStream.GetSize(), /*password=*/nullptr)); +@@ -158,10 +158,8 @@ void AnalyizeSignatureStream(SvMemoryStream& rStream, std::vectorgetChecksum(); + rPageChecksums.push_back(nPageChecksum); + } +-#else +- (void)rStream; +-#endif + } ++#endif + + /** + * Checks if incremental updates after singing performed valid modifications only. +@@ -175,6 +173,7 @@ bool IsValidSignature(SvStream& rStream, vcl::filter::PDFObjectElement* pSignatu + return false; + } + ++#if HAVE_FEATURE_PDFIUM + SvMemoryStream aSignatureStream; + sal_uInt64 nPos = rStream.Tell(); + rStream.Seek(0); +@@ -196,6 +195,10 @@ bool IsValidSignature(SvStream& rStream, vcl::filter::PDFObjectElement* pSignatu + // Fail if any page looks different after signing and at the end. Annotations/commenting doesn't + // count, though. + return aSignedPages == aAllPages; ++#else ++ (void)rStream; ++ return true; ++#endif + } + } + +-- +2.26.2 + diff --git a/libreoffice.spec b/libreoffice.spec index e1c60ee..420e6a7 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -253,6 +253,7 @@ Patch5: 0001-Upgrade-liborcus-to-0.16.0.patch Patch6: 0001-rhbz-1882616-move-cursor-one-step-at-a-time-in-the-d.patch Patch7: 0001-export-HYPERLINK-target-in-html-clipboard-export.patch Patch8: 0001-rhbz-1891326-suggest-package-install-of-the-most-app.patch +Patch9: 0001-fix-disable-pdfium-build.patch %if 0%{?rhel} # not upstreamed