From ff7414a97f5ded66a8e8c8611ad801b1e6c11c9e Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 3 Sep 2013 16:46:22 +0100 Subject: Resolves: fdo#68726 make navigator child dialog float on top i.e. set its parent to the thing it wants to be on top of As an aside I'm not entirely sure that this little dialog has the decorations set on it that it would like, I suspect it wants to be more like the tearable-off font color floatingwindow. But lets not muddy the waters in this commit. Change-Id: I9e0c35fbb66e50c04c7b28904d3937cf9ae417f4 --- sw/source/ui/inc/navipi.hxx | 2 +- sw/source/ui/inc/workctrl.hxx | 2 +- sw/source/ui/ribbar/workctrl.cxx | 8 ++++---- sw/source/ui/utlui/navipi.cxx | 9 ++++----- 4 files changed, 10 insertions(+), 11 deletions(-) (limited to 'sw') diff --git a/sw/source/ui/inc/navipi.hxx b/sw/source/ui/inc/navipi.hxx index 1082a6a979f3..4e339cf2eed3 100644 --- a/sw/source/ui/inc/navipi.hxx +++ b/sw/source/ui/inc/navipi.hxx @@ -168,7 +168,7 @@ public: sal_Bool IsGlobalMode() const {return bGlobalMode;} SwView* GetCreateView() const; - void CreateNavigationTool(const Rectangle& rRect, bool bSetFocus); + void CreateNavigationTool(const Rectangle& rRect, bool bSetFocus, Window *pParent); }; class SwNavigationChild : public SfxChildWindowContext diff --git a/sw/source/ui/inc/workctrl.hxx b/sw/source/ui/inc/workctrl.hxx index be38a2960f55..dcba5914ae5c 100644 --- a/sw/source/ui/inc/workctrl.hxx +++ b/sw/source/ui/inc/workctrl.hxx @@ -162,7 +162,7 @@ protected: virtual void DataChanged( const DataChangedEvent& rDCEvt ); public: - SwScrollNaviPopup( sal_uInt16 nId, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame ); + SwScrollNaviPopup( sal_uInt16 nId, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, Window *pParent ); ~SwScrollNaviPopup(); static String GetQuickHelpText(sal_Bool bNext); diff --git a/sw/source/ui/ribbar/workctrl.cxx b/sw/source/ui/ribbar/workctrl.cxx index 91d8f59b86bc..0c92c2846db0 100644 --- a/sw/source/ui/ribbar/workctrl.cxx +++ b/sw/source/ui/ribbar/workctrl.cxx @@ -452,8 +452,8 @@ static const char* aNavigationHelpIds[ NAVI_ENTRIES ] = HID_NID_NEXT }; -SwScrollNaviPopup::SwScrollNaviPopup( sal_uInt16 nId, const Reference< XFrame >& rFrame ) - : SfxPopupWindow(nId, rFrame, SW_RES(RID_SCROLL_NAVIGATION_WIN) ), +SwScrollNaviPopup::SwScrollNaviPopup(sal_uInt16 nId, const Reference< XFrame >& rFrame, Window *pParent) + : SfxPopupWindow(nId, rFrame, pParent, SW_RES(RID_SCROLL_NAVIGATION_WIN)), aToolBox(this, 0), aSeparator(this, SW_RES(FL_SEP)), aInfoField(this, SW_RES(FI_INFO)), @@ -540,7 +540,7 @@ void SwScrollNaviPopup::ApplyImageList() SfxPopupWindow* SwScrollNaviPopup::Clone() const { - return new SwScrollNaviPopup( GetId(), GetFrame() ); + return new SwScrollNaviPopup( GetId(), GetFrame(), GetParent() ); } IMPL_LINK(SwScrollNaviPopup, SelectHdl, ToolBox*, pSet) @@ -602,7 +602,7 @@ void SwNaviImageButton::Click() { pPopup = new SwScrollNaviPopup( FN_SCROLL_NAVIGATION, - m_xFrame ); + m_xFrame, this ); Point aPos = OutputToScreenPixel(Point(0,0)); Rectangle aRect(aPos, GetSizePixel()); SetPopupWindow( pPopup ); diff --git a/sw/source/ui/utlui/navipi.cxx b/sw/source/ui/utlui/navipi.cxx index a681f8cfcd9f..95a6e2290588 100644 --- a/sw/source/ui/utlui/navipi.cxx +++ b/sw/source/ui/utlui/navipi.cxx @@ -355,7 +355,7 @@ IMPL_LINK( SwNavigationPI, ToolBoxDropdownClickHdl, ToolBox*, pBox ) { case FN_CREATE_NAVIGATION: { - CreateNavigationTool(pBox->GetItemRect(FN_CREATE_NAVIGATION), true); + CreateNavigationTool(pBox->GetItemRect(FN_CREATE_NAVIGATION), true, this); } break; @@ -418,18 +418,17 @@ void SwNavHelpToolBox::MouseButtonDown(const MouseEvent &rEvt) if(rEvt.GetButtons() == MOUSE_LEFT && FN_CREATE_NAVIGATION == GetItemId(rEvt.GetPosPixel())) { - ((SwNavigationPI*)GetParent())->CreateNavigationTool(GetItemRect(FN_CREATE_NAVIGATION), false); + ((SwNavigationPI*)GetParent())->CreateNavigationTool(GetItemRect(FN_CREATE_NAVIGATION), false, this); } else SwHelpToolBox::MouseButtonDown(rEvt); } -void SwNavigationPI::CreateNavigationTool(const Rectangle& rRect, bool bSetFocus) +void SwNavigationPI::CreateNavigationTool(const Rectangle& rRect, bool bSetFocus, Window *pParent) { Reference< XFrame > xFrame = GetCreateView()->GetViewFrame()->GetFrame().GetFrameInterface(); SwScrollNaviPopup* pPopup = new - SwScrollNaviPopup(FN_SCROLL_NAVIGATION, - xFrame ); + SwScrollNaviPopup(FN_SCROLL_NAVIGATION, xFrame, pParent); Rectangle aRect(rRect); Point aT1 = aRect.TopLeft(); -- cgit