sw/source/uibase/uiview/view2.cxx |   19 +++++++------------
 1 file changed, 7 insertions(+), 12 deletions(-)

New commits:
commit 1955bb1172508b2bf3c7476de241834ae7771359
Author: Francesco Gradi <frk....@libero.it>
Date:   Mon May 29 17:40:53 2017 +0200

    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 <c...@libreoffice.org>
    Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk>

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:
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to