summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2020-12-09 21:58:36 +0100
committerMiklos Vajna <vmiklos@collabora.com>2020-12-10 09:17:55 +0100
commit106a9e98c864fe07bf91331d510dd41e3801c6eb (patch)
treef3023a54e85e1591357cd8ab7f467ac1cfaae2bf /svx
parentbea06517127085a714e07f35a6c1b1a13545518e (diff)
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 <vmiklos@collabora.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/svdraw/svdpdf.cxx16
1 files changed, 7 insertions, 9 deletions
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<vcl::pdf::PDFiumPageObject> 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);