include/sfx2/tbxctrl.hxx | 4 ++++ sfx2/source/toolbox/tbxitem.cxx | 17 +++++++++++++++++ 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 ++++----- 6 files changed, 31 insertions(+), 11 deletions(-)
New commits: commit ff7414a97f5ded66a8e8c8611ad801b1e6c11c9e Author: Caolán McNamara <[email protected]> Date: Tue Sep 3 16:46:22 2013 +0100 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 diff --git a/include/sfx2/tbxctrl.hxx b/include/sfx2/tbxctrl.hxx index af1b1a6..3d403766 100644 --- a/include/sfx2/tbxctrl.hxx +++ b/include/sfx2/tbxctrl.hxx @@ -146,6 +146,10 @@ public: const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, Window* pParentWindow, WinBits nBits ); + SfxPopupWindow( sal_uInt16 nId, + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, + Window* pParentWindow, + const ResId &rId ); ~SfxPopupWindow(); virtual SfxPopupWindow* Clone() const; diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx index ea1d317..928b771 100644 --- a/sfx2/source/toolbox/tbxitem.cxx +++ b/sfx2/source/toolbox/tbxitem.cxx @@ -1208,6 +1208,23 @@ SfxPopupWindow::SfxPopupWindow( ((SystemWindow *)pWindow)->GetTaskPaneList()->AddWindow( this ); } +SfxPopupWindow::SfxPopupWindow( + sal_uInt16 nId, + const Reference< XFrame >& rFrame, + Window* pParentWindow, + const ResId &rId ) : + FloatingWindow( pParentWindow, rId ) + , m_bFloating(sal_False) + , m_bCascading( sal_False ) + , m_nId( nId ) + , m_xFrame( rFrame ) + , m_pStatusListener( 0 ) +{ + Window* pWindow = GetTopMostParentSystemWindow( this ); + if ( pWindow ) + ((SystemWindow *)pWindow)->GetTaskPaneList()->AddWindow( this ); +} + //-------------------------------------------------------------------- SfxPopupWindow::~SfxPopupWindow() diff --git a/sw/source/ui/inc/navipi.hxx b/sw/source/ui/inc/navipi.hxx index 1082a6a..4e339cf 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 be38a29..dcba591 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 91d8f59..0c92c28 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 a681f8c..95a6e22 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();
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
