summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/vcl/vectorgraphicdata.hxx3
-rw-r--r--svx/source/svdraw/svdedtv2.cxx2
2 files changed, 3 insertions, 2 deletions
diff --git a/include/vcl/vectorgraphicdata.hxx b/include/vcl/vectorgraphicdata.hxx
index 62e7617cdb56..8fce6666e6e8 100644
--- a/include/vcl/vectorgraphicdata.hxx
+++ b/include/vcl/vectorgraphicdata.hxx
@@ -26,6 +26,7 @@
#include <rtl/ustring.hxx>
#include <deque>
#include <memory>
+#include <algorithm>
namespace com::sun::star::graphic { class XPrimitive2D; }
struct WmfExternal;
@@ -110,7 +111,7 @@ public:
const BitmapEx& getReplacement() const;
BitmapChecksum GetChecksum() const;
- sal_Int32 getPageIndex() const { return mnPageIndex; }
+ sal_Int32 getPageIndex() const { return std::max(sal_Int32(0), mnPageIndex); }
bool isPrimitiveSequenceCreated() const { return mbSequenceCreated; }
};
diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx
index 661dd0779e18..de8c521b3119 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);
}