diff options
author | Muhammet Kara <muhammet.kara@collabora.com> | 2019-04-16 21:54:34 +0300 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2019-04-16 22:03:16 +0200 |
commit | 1c81d74c6ce2f7e92c2b4926f784efecd863141b (patch) | |
tree | f5aaabf161d6237d977e669b3b3ab3d30145f897 /sfx2 | |
parent | a4c2ae0e039534367c51c5e4f4041dd0b0bf1365 (diff) |
Protect page position during redaction
Users might accidentally move the main shape of
the page being redacted. Let's prevent that.
Change-Id: Ic0f3c2c819d1f974d203fa5fd70d57e5545ba8ef
Reviewed-on: https://gerrit.libreoffice.org/70843
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/SfxRedactionHelper.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sfx2/source/doc/SfxRedactionHelper.cxx b/sfx2/source/doc/SfxRedactionHelper.cxx index 023a51f6e582..9db938f3c79f 100644 --- a/sfx2/source/doc/SfxRedactionHelper.cxx +++ b/sfx2/source/doc/SfxRedactionHelper.cxx @@ -138,6 +138,8 @@ void SfxRedactionHelper::addPagesToDraw(uno::Reference<XComponent>& xComponent, xFactory->createInstance("com.sun.star.drawing.GraphicObjectShape"), uno::UNO_QUERY); uno::Reference<beans::XPropertySet> xShapeProperySet(xShape, uno::UNO_QUERY); xShapeProperySet->setPropertyValue("Graphic", uno::Any(xGraph)); + xShapeProperySet->setPropertyValue("MoveProtect", uno::Any(true)); + xShapeProperySet->setPropertyValue("SizeProtect", uno::Any(true)); // Set size and position xShape->setSize( |