sd/source/ui/view/drviews2.cxx | 29 ++++++++++++++++++++--------- sfx2/source/sidebar/ResourceManager.cxx | 3 +-- sfx2/source/view/viewfrm.cxx | 11 +++++++++++ vcl/jsdialog/enabled.cxx | 6 +++--- vcl/jsdialog/jsdialogbuilder.cxx | 9 ++++++--- 5 files changed, 41 insertions(+), 17 deletions(-)
New commits: commit 4ad89dd8166fac837d7ed6887c17f9255f06285e Author: Attila Szűcs <attila.sz...@collabora.com> AuthorDate: Wed May 3 04:24:35 2023 +0200 Commit: Szymon Kłos <szymon.k...@collabora.com> CommitDate: Mon May 15 09:03:04 2023 +0200 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.k...@collabora.com> Reviewed-by: Szymon Kłos <szymon.k...@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151704 Tested-by: Jenkins 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; diff --git a/sfx2/source/sidebar/ResourceManager.cxx b/sfx2/source/sidebar/ResourceManager.cxx index cfc5437037cc..5974e20af488 100644 --- a/sfx2/source/sidebar/ResourceManager.cxx +++ b/sfx2/source/sidebar/ResourceManager.cxx @@ -260,8 +260,7 @@ void ResourceManager::ReadDeckList() if (comphelper::LibreOfficeKit::isActive()) { // Hide these decks in LOK as they aren't fully functional. - if (aDeckName == "GalleryDeck" || aDeckName == "NavigatorDeck" - || aDeckName == "StyleListDeck") + if (aDeckName == "GalleryDeck" || aDeckName == "StyleListDeck") continue; } diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index d62090bad118..bf42fc5de078 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -3414,6 +3414,17 @@ void SfxViewFrame::ChildWindowExecute( SfxRequest &rReq ) rReq.Done(); return; } + if (nSID == SID_NAVIGATOR) + { + if (comphelper::LibreOfficeKit::isActive()) + { + ShowChildWindow(SID_SIDEBAR); + OUString panelId = "SdNavigatorPanel"; + ::sfx2::sidebar::Sidebar::TogglePanel(panelId, GetFrame().GetFrameInterface()); + rReq.Done(); + return; + } + } bool bHasChild = HasChildWindow(nSID); bool bShow = pShowItem ? pShowItem->GetValue() : !bHasChild; diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx index 73a4eedf96b4..36707140b927 100644 --- a/vcl/jsdialog/enabled.cxx +++ b/vcl/jsdialog/enabled.cxx @@ -299,7 +299,7 @@ bool isBuilderEnabledForSidebar(std::u16string_view rUIFile) { if (// scalc rUIFile == u"modules/scalc/ui/functionpanel.ui" - //|| rUIFile == u"modules/scalc/ui/navigatorpanel.ui" + || rUIFile == u"modules/scalc/ui/navigatorpanel.ui" || rUIFile == u"modules/scalc/ui/sidebaralignment.ui" || rUIFile == u"modules/scalc/ui/sidebarcellappearance.ui" || rUIFile == u"modules/scalc/ui/sidebarnumberformat.ui" @@ -316,7 +316,7 @@ bool isBuilderEnabledForSidebar(std::u16string_view rUIFile) || rUIFile == u"modules/simpress/ui/masterpagepanel.ui" || rUIFile == u"modules/simpress/ui/masterpagepanelall.ui" || rUIFile == u"modules/simpress/ui/masterpagepanelrecent.ui" - //|| rUIFile == u"modules/simpress/ui/navigatorpanel.ui" + || rUIFile == u"modules/simpress/ui/navigatorpanel.ui" || rUIFile == u"modules/simpress/ui/sidebarslidebackground.ui" || rUIFile == u"modules/simpress/ui/slidetransitionspanel.ui" || rUIFile == u"modules/simpress/ui/tabledesignpanel.ui" @@ -325,7 +325,7 @@ bool isBuilderEnabledForSidebar(std::u16string_view rUIFile) || rUIFile == u"modules/smath/ui/sidebarproperties_math.ui" // swriter || rUIFile == u"modules/swriter/ui/managechangessidebar.ui" - //|| rUIFile == u"modules/swriter/ui/navigatorpanel.ui" + || rUIFile == u"modules/swriter/ui/navigatorpanel.ui" || rUIFile == u"modules/swriter/ui/pagefooterpanel.ui" || rUIFile == u"modules/swriter/ui/pageformatpanel.ui" || rUIFile == u"modules/swriter/ui/pageheaderpanel.ui" diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx index a3c55e28ddfb..b894395e4660 100644 --- a/vcl/jsdialog/jsdialogbuilder.cxx +++ b/vcl/jsdialog/jsdialogbuilder.cxx @@ -143,7 +143,8 @@ std::unique_ptr<tools::JsonWriter> JSDialogNotifyIdle::generateFullUpdate() cons return aJsonWriter; m_aContentWindow->DumpAsPropertyTree(*aJsonWriter); - aJsonWriter->put("id", m_aNotifierWindow->GetLOKWindowId()); + if (m_aNotifierWindow) + aJsonWriter->put("id", m_aNotifierWindow->GetLOKWindowId()); aJsonWriter->put("jsontype", m_sTypeOfJSON); return aJsonWriter; @@ -159,7 +160,8 @@ JSDialogNotifyIdle::generateWidgetUpdate(VclPtr<vcl::Window> pWindow) const aJsonWriter->put("jsontype", m_sTypeOfJSON); aJsonWriter->put("action", "update"); - aJsonWriter->put("id", m_aNotifierWindow->GetLOKWindowId()); + if (m_aNotifierWindow) + aJsonWriter->put("id", m_aNotifierWindow->GetLOKWindowId()); { auto aEntries = aJsonWriter->startNode("control"); pWindow->DumpAsPropertyTree(*aJsonWriter); @@ -187,7 +189,8 @@ JSDialogNotifyIdle::generateActionMessage(VclPtr<vcl::Window> pWindow, aJsonWriter->put("jsontype", m_sTypeOfJSON); aJsonWriter->put("action", "action"); - aJsonWriter->put("id", m_aNotifierWindow->GetLOKWindowId()); + if (m_aNotifierWindow) + aJsonWriter->put("id", m_aNotifierWindow->GetLOKWindowId()); { auto aDataNode = aJsonWriter->startNode("data");