diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2020-06-26 16:35:34 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2020-06-26 17:55:31 +0200 |
commit | 5d296183072dc7cfe7a9985c38388b56f37d873c (patch) | |
tree | 558cd1a97c213bf60370960e75655c7e91bab9d6 | |
parent | 3d37d591377fe532fc0d32e9fbc8e57b8ded6768 (diff) |
sd signature line: allow move / resize of shape before signing
Once the initial rectangle is drawn, a certificate is attached to this
shape. Allow modifying this shape (and only this one) before the actual
signing, in case the user wants to fine-tune the geometry.
Change-Id: Icdf4ffa99eaf02f81d60884d45c26b3500ea73d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97240
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
-rw-r--r-- | sd/source/ui/func/fusel.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx index 18616775ac9e..baa6c6b9e3ad 100644 --- a/sd/source/ui/func/fusel.cxx +++ b/sd/source/ui/func/fusel.cxx @@ -201,8 +201,15 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) if (!bTextEdit && eHit == SdrHitKind::UrlField && !rMEvt.IsMod2() && !lcl_followHyperlinkAllowed(rMEvt)) bTextEdit = true; + bool bPreventModify = mpDocSh->IsReadOnly(); + if (bPreventModify && mpDocSh->GetSignPDFCertificate().is()) + { + // If the just added signature line shape is selected, allow moving / resizing it. + bPreventModify = false; + } + if(!bTextEdit - && !mpDocSh->IsReadOnly() + && !bPreventModify && ((mpView->IsMarkedHit(aMDPos, nHitLog) && !rMEvt.IsShift() && !rMEvt.IsMod2()) || pHdl != nullptr) && (rMEvt.GetClicks() != 2) ) |