sd/source/ui/view/drviewse.cxx | 7 +++++++ 1 file changed, 7 insertions(+)
New commits: commit a6f4bbb285411ce14aca7010e3523ca6821bbd3b Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Thu Dec 19 08:53:09 2024 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Thu Dec 19 09:54:21 2024 +0100 cool#10630 lok doc sign: fix Impress sign line when creating directly Once .uno:InsertSignatureLine gets dispatched, FuConstructRectangle gets activated, the signature line (a graphic shape) gets inserted, but then FuConstructRectangle is not deactivated in the "create directly" case, so next clicks keep inserting new signature lines, while the expectation is that "create directly" inserts one shape and selects it. The "create directly" mode is the default for LOK, but you can trigger it on the desktop with the KeyModifier=8192 (KEY_MOD1, i.e. Ctrl) UNO command parameter, too. The normal mode would send the mouse button down/up events to FuConstructRectangle and sd::FuConstructRectangle::MouseButtonUp() would select the shape after a drag to determine the position/size. The "create directly" mode will insert instantly, so sd::FuConstructRectangle::MouseButtonUp() is not called, so the shape is not selected, so the shape insert mode is not deactivated. Fix this by selecting the object for the create direct mode the same say as FuConstructRectangle would do, at the place where e.g. text editing is started for Impress textboxes. Do this for rectangle shapes for now, but later other shapes might want to do the same: e.g. curve insert doesn't have this problem, but it seems line insert has the same problem -- that's not changed here. Change-Id: I3ae85a07010f95b80a862e0cc631994113613eda Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178784 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index 21f577b74b77..6c96d4cadde3 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -226,6 +226,7 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq) // for LibreOfficeKit - choosing a shape should construct it directly bool bCreateDirectly = false; + bool bRectangle = false; switch ( nSId ) { @@ -453,6 +454,7 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq) case SID_INSERT_SIGNATURELINE: { bCreateDirectly = comphelper::LibreOfficeKit::isActive(); + bRectangle = true; SetCurrentFunction( FuConstructRectangle::Create( this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq, bPermanent ) ); rReq.Done(); } @@ -671,6 +673,11 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq) break; } } + + if (bRectangle && !bPermanent) + { + GetViewFrame()->GetDispatcher()->Execute(SID_OBJECT_SELECT, SfxCallMode::ASYNCHRON); + } } void DrawViewShell::FuDeleteSelectedObjects()