summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancesco Gradi <frk.grd@libero.it>2017-05-29 17:40:53 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-05-29 23:28:25 +0200
commit1955bb1172508b2bf3c7476de241834ae7771359 (patch)
tree626c892d132dbbfdf6e16028e1d66cee45f95959
parent6f1530bfdefc8e4deabf37ab337e09a89d3841b3 (diff)
Related: tdf#79167 sw: open the navigator in sidebar from the findbar
The navigator window is still available from View->Navigator. Change-Id: I143256be548a101edeac57713c4d2a128bcdf6a5 Reviewed-on: https://gerrit.libreoffice.org/38161 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
-rw-r--r--sw/source/uibase/uiview/view2.cxx19
1 files changed, 7 insertions, 12 deletions
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index 5b767c76297c..a677c3ac9ad6 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -1039,18 +1039,13 @@ void SwView::Execute(SfxRequest &rReq)
break;
case FN_NAVIGATION_POPUP:
{
- SfxViewFrame* pVFrame = GetViewFrame();
- SfxChildWindow* pCh = pVFrame->GetChildWindow( SID_NAVIGATOR );
- if (!pCh)
- {
- pVFrame->ToggleChildWindow( SID_NAVIGATOR );
- pCh = pVFrame->GetChildWindow( SID_NAVIGATOR );
- }
- if (pCh)
- {
- static_cast<SwNavigationPI*>( pCh->GetContextWindow(SW_MOD()))->CreateNavigationTool(
- GetVisArea(), true, &pVFrame->GetWindow());
- }
+ // First make sure that the sidebar is visible
+ GetViewFrame()->ShowChildWindow(SID_SIDEBAR);
+
+ ::sfx2::sidebar::Sidebar::ShowPanel(
+ "SwNavigatorPanel",
+ GetViewFrame()->GetFrame().GetFrameInterface());
+
}
break;
case SID_JUMPTOMARK: