diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2020-06-15 14:07:04 +0200 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2020-06-20 14:24:01 +0200 |
commit | 03f0ea92bc381ef5a8df7de1ae9edf4aed45a3b2 (patch) | |
tree | 5f2eea79b2db6582650a42e3af16d2e55fd3229c /sd | |
parent | bbc326841a833596c46b9b716fdf15d49c7578ee (diff) |
vcl: add PDFGraphicResult instead of std::pair in ImportPDFUnloaded
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 <quikee@gmail.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/filter/pdf/sdpdffilter.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
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<std::pair<Graphic, Size>> aGraphics; + std::vector<vcl::PDFGraphicResult> aGraphics; if (vcl::ImportPDFUnloaded(aFileName, aGraphics) == 0) return false; @@ -52,10 +52,10 @@ bool SdPdfFilter::Import() mrDocument.DuplicatePage(0); } - for (const std::pair<Graphic, Size>& 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()); |