diff options
author | Samuel Mehrbrodt <s.mehrbrodt@gmail.com> | 2013-12-09 11:12:13 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-01-17 15:16:25 +0000 |
commit | 0f86895fcd1001324974d644a728152b97b22ab0 (patch) | |
tree | b3ecf3510c2b31d6113f7996173dcbe690cf6d3c /sw/source/ui | |
parent | 769778e489722f454fa3d81ffcf73f1934a0a88b (diff) |
Add the Navigation buttons to the Search toolbar
They were remove from below the scrollbar before and it was decided to put them on the Search toolbar: http://nabble.documentfoundation.org/Libreoffice-ux-advise-Remove-the-Navigator-button-below-the-scrollbar-in-Writer-tp4083097p4086370.html
Change-Id: I5f7dfc0aa522e97cf3821c494525c967dcd6a92c
Reviewed-on: https://gerrit.libreoffice.org/7006
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source/ui')
-rw-r--r-- | sw/source/ui/inc/view.hxx | 2 | ||||
-rw-r--r-- | sw/source/ui/ribbar/workctrl.cxx | 13 | ||||
-rw-r--r-- | sw/source/ui/uiview/view2.cxx | 31 |
3 files changed, 29 insertions, 17 deletions
diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx index f86e1ed6d92d..fb8d0b6a68b2 100644 --- a/sw/source/ui/inc/view.hxx +++ b/sw/source/ui/inc/view.hxx @@ -525,7 +525,7 @@ public: void ChangeTabMetric(FieldUnit eUnit); void GetHRulerMetric(FieldUnit& rToFill) const; - // Handler + // Handler void Execute(SfxRequest&); void ExecPageMove(SfxRequest&); void ExecStyle(SfxRequest&); diff --git a/sw/source/ui/ribbar/workctrl.cxx b/sw/source/ui/ribbar/workctrl.cxx index fe7f1417af9a..31e0f66f2644 100644 --- a/sw/source/ui/ribbar/workctrl.cxx +++ b/sw/source/ui/ribbar/workctrl.cxx @@ -566,15 +566,12 @@ IMPL_LINK(SwScrollNaviPopup, SelectHdl, ToolBox*, pSet) } else { - SfxBoolItem aNext(FN_SCROLL_NEXT_PREV, NID_NEXT == nSet); - Any a; - Sequence< PropertyValue > aArgs( 1 ); - aArgs[0].Name = "ScrollNextPrev"; - aNext.QueryValue( a ); - aArgs[0].Value = a; + Sequence< PropertyValue > aArgs; + OUString cmd(".uno:ScrollToPrevious"); + if (NID_NEXT == nSet) + cmd = OUString(".uno:ScrollToNext"); SfxToolBoxControl::Dispatch( Reference< XDispatchProvider >( GetFrame()->getController(), UNO_QUERY ), - OUString( ".uno:ScrollNextPrev" ), - aArgs ); + cmd, aArgs ); } return 0; } diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx index 37a178ac5799..7b10e68fc337 100644 --- a/sw/source/ui/uiview/view2.cxx +++ b/sw/source/ui/uiview/view2.cxx @@ -1006,19 +1006,34 @@ void SwView::Execute(SfxRequest &rReq) lcl_SetAllTextToDefaultLanguage( *m_pWrtShell, RES_CHRATR_CJK_LANGUAGE ); } break; - case FN_SCROLL_NEXT_PREV: - if(pArgs && pArgs->GetItemState(FN_SCROLL_NEXT_PREV, sal_False, &pItem)) + case FN_SCROLL_PREV: + case FN_SCROLL_NEXT: + { + // call the handlers of PageUp/DownButtons, only + bool *pbNext = new bool(true); // FN_SCROLL_NEXT + if (nSlot == FN_SCROLL_PREV) + *pbNext = false; + // #i75416# move the execution of the search to an asynchronously called static link + Application::PostUserEvent( STATIC_LINK(this, SwView, MoveNavigationHdl), pbNext ); + } + break; + case FN_NAVIGATION_POPUP: + { + SfxViewFrame* pVFrame = GetViewFrame(); + SfxChildWindow* pCh = pVFrame->GetChildWindow( SID_NAVIGATOR ); + if (!pCh) { - // call the handlers of PageUp/DownButtons, only - bool* pbNext = new bool ( ((const SfxBoolItem*)pItem)->GetValue() ); - // #i75416# move the execution of the search to an asynchronously called static link - Application::PostUserEvent( STATIC_LINK(this, SwView, MoveNavigationHdl), pbNext ); + pVFrame->ToggleChildWindow( SID_NAVIGATOR ); + pCh = pVFrame->GetChildWindow( SID_NAVIGATOR ); } - break; + ((SwNavigationPI*) pCh->GetContextWindow(SW_MOD()))->CreateNavigationTool( + GetVisArea(), true, &pVFrame->GetWindow()); + } + break; case SID_JUMPTOMARK: if( pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_JUMPTOMARK, sal_False, &pItem)) JumpToSwMark( (( const SfxStringItem*)pItem)->GetValue() ); - break; + break; case SID_GALLERY : GetViewFrame()->ChildWindowExecute(rReq); break; |