[Libreoffice-commits] core.git: sd/source

Miklos Vajna (via logerrit) logerrit at kemper.freedesktop.org
Fri Jun 26 15:56:06 UTC 2020


 sd/source/ui/func/fusel.cxx |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 5d296183072dc7cfe7a9985c38388b56f37d873c
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Fri Jun 26 16:35:34 2020 +0200
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Fri Jun 26 17:55:31 2020 +0200

    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 at collabora.com>
    Tested-by: Jenkins

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)
             )


More information about the Libreoffice-commits mailing list