summaryrefslogtreecommitdiff
path: root/sd/source
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2020-06-15 14:07:04 +0200
committerTomaž Vajngerl <quikee@gmail.com>2020-06-29 20:36:27 +0200
commit1aa683fb0c54dd409bb3d0a779ca0fd3e9ae8e56 (patch)
treea7b979b7bb7d0c0e1c458d488590f5c3bdf4fde7 /sd/source
parent32ace69e0e449d63bf11f2955c18a22ddd0482c7 (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> (cherry picked from commit 03f0ea92bc381ef5a8df7de1ae9edf4aed45a3b2) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97437 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Diffstat (limited to 'sd/source')
-rw-r--r--sd/source/filter/pdf/sdpdffilter.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sd/source/filter/pdf/sdpdffilter.cxx b/sd/source/filter/pdf/sdpdffilter.cxx
index c1069da58233..91eb0d1a6ae4 100644
--- a/sd/source/filter/pdf/sdpdffilter.cxx
+++ b/sd/source/filter/pdf/sdpdffilter.cxx
@@ -40,7 +40,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;
@@ -51,10 +51,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 && static_cast<size_t>(nPageNumber) < aGraphics.size());