From 7c88c0089af36bc8075b87480669e78385d6b878 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Tue, 13 Oct 2020 21:03:46 +0200 Subject: pdfium: add an FPDFImageObj_GetImageMetadata() wrapper And in general use more pdfium wrappers in CppunitTest_vcl_pdfexport, so all the '#if defined OSL_BIGENDIAN' checks can be removed. Change-Id: Id05e6ecf3dbb103a263d6068085eede847be320f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104254 Tested-by: Jenkins Reviewed-by: Miklos Vajna --- vcl/source/pdf/PDFiumLibrary.cxx | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'vcl/source') diff --git a/vcl/source/pdf/PDFiumLibrary.cxx b/vcl/source/pdf/PDFiumLibrary.cxx index a0668d0c6048..b8d0cb536be7 100644 --- a/vcl/source/pdf/PDFiumLibrary.cxx +++ b/vcl/source/pdf/PDFiumLibrary.cxx @@ -355,6 +355,13 @@ std::unique_ptr PDFiumPageObject::getPathSegment(int index) return pPDFiumPathSegment; } +Size PDFiumPageObject::getImageSize(PDFiumPage& rPage) +{ + FPDF_IMAGEOBJ_METADATA aMeta; + FPDFImageObj_GetImageMetadata(mpPageObject, rPage.getPointer(), &aMeta); + return Size(aMeta.width, aMeta.height); +} + BitmapChecksum PDFiumPage::getChecksum() { size_t nPageWidth = getWidth(); -- cgit