[Libreoffice-commits] core.git: vcl/source xmlsecurity/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Sat Sep 19 20:21:31 UTC 2020


 vcl/source/filter/ipdf/pdfread.cxx       |    2 +-
 xmlsecurity/source/pdfio/pdfdocument.cxx |   12 +++++++-----
 2 files changed, 8 insertions(+), 6 deletions(-)

New commits:
commit 5f3f17a9c64e33fb787a79dc94d902147da77d71
Author:     Noel Grandin <noelgrandin at gmail.com>
AuthorDate: Sat Sep 19 20:38:29 2020 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Sep 19 22:20:57 2020 +0200

    fix non-pdfium build
    
    Change-Id: Ic1e30a412927748ba58a21cf2ee922cd1a490aa4
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103040
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/vcl/source/filter/ipdf/pdfread.cxx b/vcl/source/filter/ipdf/pdfread.cxx
index 39c2933be8d5..a9b079a75bc3 100644
--- a/vcl/source/filter/ipdf/pdfread.cxx
+++ b/vcl/source/filter/ipdf/pdfread.cxx
@@ -220,7 +220,7 @@ size_t RenderPDFBitmaps(const void* pBuffer, int nSize, std::vector<Bitmap>& 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 8561c481170b..b2c1cc0db77a 100644
--- a/xmlsecurity/source/pdfio/pdfdocument.cxx
+++ b/xmlsecurity/source/pdfio/pdfdocument.cxx
@@ -137,10 +137,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<BitmapChecksum>& rPageChecksums)
 {
-#if HAVE_FEATURE_PDFIUM
     auto pPdfium = vcl::pdf::PDFiumLibrary::get();
     vcl::pdf::PDFiumDocument aPdfDocument(
         FPDF_LoadMemDocument(rStream.GetData(), rStream.GetSize(), /*password=*/nullptr));
@@ -157,11 +157,8 @@ void AnalyizeSignatureStream(SvMemoryStream& rStream, std::vector<BitmapChecksum
         BitmapChecksum nPageChecksum = pPdfPage->getChecksum();
         rPageChecksums.push_back(nPageChecksum);
     }
-#else
-    (void)rStream;
-    (void)rPageChecksums;
-#endif
 }
+#endif
 
 /**
  * Checks if incremental updates after singing performed valid modifications only.
@@ -175,6 +172,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 +194,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
 }
 }
 


More information about the Libreoffice-commits mailing list