From 106a9e98c864fe07bf91331d510dd41e3801c6eb Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Wed, 9 Dec 2020 21:58:36 +0100 Subject: pdfium: no need to use FPDFPageObj_GetBounds() directly Change-Id: I74f968e0b76a2992d5f07524a29a7c8600983d3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107509 Tested-by: Jenkins Reviewed-by: Miklos Vajna --- svx/source/svdraw/svdpdf.cxx | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'svx') diff --git a/svx/source/svdraw/svdpdf.cxx b/svx/source/svdraw/svdpdf.cxx index 6f2f1de42f72..e1ae905cef33 100644 --- a/svx/source/svdraw/svdpdf.cxx +++ b/svx/source/svdraw/svdpdf.cxx @@ -914,15 +914,13 @@ void ImpSdrPdfImport::ImportImage(std::unique_ptr co break; } - float left; - float bottom; - float right; - float top; - if (!FPDFPageObj_GetBounds(pPageObject->getPointer(), &left, &bottom, &right, &top)) - { - SAL_WARN("sd.filter", "FAILED to get image bounds"); - } - + basegfx::B2DRectangle aBounds = pPageObject->getBounds(); + float left = aBounds.getMinX(); + // Upside down. + float bottom = aBounds.getMinY(); + float right = aBounds.getMaxX(); + // Upside down. + float top = aBounds.getMaxY(); tools::Rectangle aRect = PointsToLogic(left, right, top, bottom); aRect.AdjustRight(1); aRect.AdjustBottom(1); -- cgit