summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2020-05-31 20:25:11 +0200
committerTomaž Vajngerl <quikee@gmail.com>2020-06-08 16:27:54 +0200
commit1e6b3014f1ecb06c40d3f1549351870abc4f9582 (patch)
tree830a99314e179dbd9dfedd5823a7a1ad4c232b54 /svx
parentb61ed3d735eedc24f81d18783673a8cb361897bf (diff)
tdf#133547 Fix breaking of PDF graphic objects
ImpSdrPdfImport did not handle -1 as the page number correctly. When the page number is -1 it means it was never explicitly set and should be treated as page with index 0 most of the time. So instead of allowing -1 as the page index, return it as 0 already in Graphic (VectorGraphicData). Change-Id: I3813f3ceeb5e41cb06fc40d67297d2439d7f3407 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95227 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 573de30566e4477c8dc09abec08f1082d16c74bc) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95800 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/svdraw/svdedtv2.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx
index 4fd92b1e30ca..7400563320bf 100644
--- a/svx/source/svdraw/svdedtv2.cxx
+++ b/svx/source/svdraw/svdedtv2.cxx
@@ -2104,7 +2104,7 @@ void SdrEditView::DoImportMarkedMtf(SvdProgressInfo *pProgrInfo)
#if HAVE_FEATURE_PDFIUM
aLogicRect = pGraf->GetLogicRect();
ImpSdrPdfImport aFilter(*mpModel, pObj->GetLayer(), aLogicRect, aGraphic);
- if (pGraf->getEmbeddedPageNumber() < aFilter.GetPageCount())
+ if (aGraphic.getPageNumber() < aFilter.GetPageCount())
{
nInsCnt = aFilter.DoImport(*pOL, nInsPos, aGraphic.getPageNumber(), pProgrInfo);
}