[Libreoffice-commits] core.git: sw/source

Francesco Gradi frk.grd at libero.it
Mon May 29 21:28:55 UTC 2017


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

New commits:
commit 1955bb1172508b2bf3c7476de241834ae7771359
Author: Francesco Gradi <frk.grd at 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 <ci at libreoffice.org>
    Reviewed-by: Miklos Vajna <vmiklos at 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:


More information about the Libreoffice-commits mailing list