summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2020-10-15 12:53:18 +0200
committerTomaž Vajngerl <quikee@gmail.com>2020-10-18 21:22:27 +0200
commit2a1b5af875d8ee84fec18c781020d836c4650dc9 (patch)
treef713f33d5df25e98e5b9464cbc2e3e9d8ceb4a86 /sd
parent7ea49126e7a247ac60ad45ab420106fe4be574ea (diff)
sd: protect size, position when opening with PDFium import filter
This is to prevent that the PDF graphics can be moved and/or resized. Change-Id: Ica4276e93e268bb2ec4a0aae0e50620a09c538f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104370 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/filter/pdf/sdpdffilter.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/sd/source/filter/pdf/sdpdffilter.cxx b/sd/source/filter/pdf/sdpdffilter.cxx
index 5e190f8a0117..e903c015d4be 100644
--- a/sd/source/filter/pdf/sdpdffilter.cxx
+++ b/sd/source/filter/pdf/sdpdffilter.cxx
@@ -83,6 +83,9 @@ bool SdPdfFilter::Import()
SdrGrafObj* pSdrGrafObj = new SdrGrafObj(pPage->getSdrModelFromSdrPage(), rGraphic,
tools::Rectangle(Point(), aSizeHMM));
+ pSdrGrafObj->SetResizeProtect(true);
+ pSdrGrafObj->SetMoveProtect(true);
+
pPage->InsertObject(pSdrGrafObj);
for (auto const& rPDFAnnotation : rPDFGraphicResult.GetAnnotations())