diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-09-03 16:46:22 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-09-03 16:49:10 +0100 |
commit | ff7414a97f5ded66a8e8c8611ad801b1e6c11c9e (patch) | |
tree | ff1bba7e409c1cce51d92e1b8e871f1d473846b2 | |
parent | fdo#68731: vcl: fix path for bundled fonts on Windows (diff) | |
download | core-ff7414a97f5ded66a8e8c8611ad801b1e6c11c9e.tar.gz core-ff7414a97f5ded66a8e8c8611ad801b1e6c11c9e.zip |
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
-rw-r--r-- | include/sfx2/tbxctrl.hxx | 4 | ||||
-rw-r--r-- | sfx2/source/toolbox/tbxitem.cxx | 17 | ||||
-rw-r--r-- | sw/source/ui/inc/navipi.hxx | 2 | ||||
-rw-r--r-- | sw/source/ui/inc/workctrl.hxx | 2 | ||||
-rw-r--r-- | sw/source/ui/ribbar/workctrl.cxx | 8 | ||||
-rw-r--r-- | sw/source/ui/utlui/navipi.cxx | 9 |
6 files changed, 31 insertions, 11 deletions
diff --git a/include/sfx2/tbxctrl.hxx b/include/sfx2/tbxctrl.hxx index af1b1a640ab9..3d4037661a7d 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 ea1d3172f31b..928b77158ea2 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 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(); |