diff options
author | Attila Szűcs <attila.szucs@collabora.com> | 2023-05-03 04:24:35 +0200 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2023-05-15 09:03:04 +0200 |
commit | 4ad89dd8166fac837d7ed6887c17f9255f06285e (patch) | |
tree | 967add61eb09b4b8fcbe9cf812139bc24908f66f /sd | |
parent | 627a601d1fcea0b3198654756d351b0b81600b49 (diff) |
LOK: Navi-1 open/close on sidebar
Enabling Navigator sidebar in case of LOKit.
Change-Id: I3a656fa12822e5866c2cd4fbf82627a88f26903a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151307
Tested-by: Szymon Kłos <szymon.klos@collabora.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151704
Tested-by: Jenkins
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/view/drviews2.cxx | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index 7f1b762d6e48..5c5aa56e960d 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -3343,16 +3343,27 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) case SID_NAVIGATOR: { - if ( rReq.GetArgs() ) - GetViewFrame()->SetChildWindow(SID_NAVIGATOR, - static_cast<const SfxBoolItem&>(rReq.GetArgs()-> - Get(SID_NAVIGATOR)).GetValue()); - else - GetViewFrame()->ToggleChildWindow( SID_NAVIGATOR ); + if (comphelper::LibreOfficeKit::isActive()) + { + GetViewFrame()->ShowChildWindow(SID_SIDEBAR); + OUString panelId = "SdNavigatorPanel"; + ::sfx2::sidebar::Sidebar::TogglePanel( + panelId, GetViewFrame()->GetFrame().GetFrameInterface()); - GetViewFrame()->GetBindings().Invalidate(SID_NAVIGATOR); - Cancel(); - rReq.Ignore (); + Cancel(); + rReq.Done(); + } else { + if ( rReq.GetArgs() ) + GetViewFrame()->SetChildWindow(SID_NAVIGATOR, + static_cast<const SfxBoolItem&>(rReq.GetArgs()-> + Get(SID_NAVIGATOR)).GetValue()); + else + GetViewFrame()->ToggleChildWindow( SID_NAVIGATOR ); + + GetViewFrame()->GetBindings().Invalidate(SID_NAVIGATOR); + Cancel(); + rReq.Ignore (); + } } break; |