From 03f0ea92bc381ef5a8df7de1ae9edf4aed45a3b2 Mon Sep 17 00:00:00 2001 From: Tomaž Vajngerl Date: Mon, 15 Jun 2020 14:07:04 +0200 Subject: vcl: add PDFGraphicResult instead of std::pair in ImportPDFUnloaded MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ImportPDFUnloaded returned graphics as a vector of std::pair with Graphic and Size. Instead, use a new struct PDFGraphicResult, so it can be extended in the future. Change-Id: Idda00a3b98a8efcbd9b8c8d0ee3982becfdc1d7f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96755 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl --- sd/source/filter/pdf/sdpdffilter.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sd/source') diff --git a/sd/source/filter/pdf/sdpdffilter.cxx b/sd/source/filter/pdf/sdpdffilter.cxx index 55d21f4057b8..2b09bc9e828e 100644 --- a/sd/source/filter/pdf/sdpdffilter.cxx +++ b/sd/source/filter/pdf/sdpdffilter.cxx @@ -41,7 +41,7 @@ bool SdPdfFilter::Import() const OUString aFileName( mrMedium.GetURLObject().GetMainURL(INetURLObject::DecodeMechanism::NONE)); - std::vector> aGraphics; + std::vector aGraphics; if (vcl::ImportPDFUnloaded(aFileName, aGraphics) == 0) return false; @@ -52,10 +52,10 @@ bool SdPdfFilter::Import() mrDocument.DuplicatePage(0); } - for (const std::pair& aPair : aGraphics) + for (vcl::PDFGraphicResult const& rPDFGraphicResult : aGraphics) { - const Graphic& rGraphic = aPair.first; - const Size& aSizeHMM = aPair.second; + const Graphic& rGraphic = rPDFGraphicResult.maGraphic; + const Size& aSizeHMM = rPDFGraphicResult.maSize; const sal_Int32 nPageNumber = rGraphic.getPageNumber(); assert(nPageNumber >= 0 && o3tl::make_unsigned(nPageNumber) < aGraphics.size()); -- cgit