Kaydet (Commit) 535f34bb authored tarafından Caolán McNamara's avatar Caolán McNamara

Resolves: tdf#Crash when clicking the Reminder icon on the Navigation toolbar

the Parent window isn't a SwScrollNaviPopup anymore

Change-Id: I5c539d125aac28bfee0beb842ff2df001e19c945
üst af6cd235
...@@ -110,14 +110,21 @@ public: ...@@ -110,14 +110,21 @@ public:
DECL_LINK(PopupHdl, PopupMenu*); DECL_LINK(PopupHdl, PopupMenu*);
}; };
class SwScrollNaviPopup;
class SwScrollNaviToolBox : public ToolBox class SwScrollNaviToolBox : public ToolBox
{ {
SwScrollNaviPopup *m_pNaviPopup;
virtual void MouseButtonUp( const MouseEvent& rMEvt ) SAL_OVERRIDE; virtual void MouseButtonUp( const MouseEvent& rMEvt ) SAL_OVERRIDE;
virtual void RequestHelp( const HelpEvent& rHEvt ) SAL_OVERRIDE; virtual void RequestHelp( const HelpEvent& rHEvt ) SAL_OVERRIDE;
public: public:
SwScrollNaviToolBox(vcl::Window* pParent, WinBits nWinStyle ) : SwScrollNaviToolBox(vcl::Window* pParent, SwScrollNaviPopup* pNaviPopup, WinBits nWinStyle)
ToolBox(pParent, nWinStyle ) {} : ToolBox(pParent, nWinStyle)
, m_pNaviPopup(pNaviPopup)
{
}
}; };
class SwScrollNaviPopup : public SfxPopupWindow class SwScrollNaviPopup : public SfxPopupWindow
......
...@@ -394,7 +394,7 @@ SwScrollNaviPopup::SwScrollNaviPopup(sal_uInt16 nId, const Reference< XFrame >& ...@@ -394,7 +394,7 @@ SwScrollNaviPopup::SwScrollNaviPopup(sal_uInt16 nId, const Reference< XFrame >&
"modules/swriter/ui/floatingnavigation.ui", rFrame), "modules/swriter/ui/floatingnavigation.ui", rFrame),
aIList(SW_RES(IL_VALUES)) aIList(SW_RES(IL_VALUES))
{ {
m_pToolBox = new SwScrollNaviToolBox(get<vcl::Window>("box"), 0); m_pToolBox = new SwScrollNaviToolBox(get<vcl::Window>("box"), this, 0);
get(m_pInfoField, "label"); get(m_pInfoField, "label");
sal_uInt16 i; sal_uInt16 i;
...@@ -502,8 +502,8 @@ IMPL_LINK(SwScrollNaviPopup, SelectHdl, ToolBox*, pSet) ...@@ -502,8 +502,8 @@ IMPL_LINK(SwScrollNaviPopup, SelectHdl, ToolBox*, pSet)
void SwScrollNaviToolBox::MouseButtonUp( const MouseEvent& rMEvt ) void SwScrollNaviToolBox::MouseButtonUp( const MouseEvent& rMEvt )
{ {
ToolBox::MouseButtonUp(rMEvt); ToolBox::MouseButtonUp(rMEvt);
if ( static_cast<SwScrollNaviPopup*>(GetParent())->IsInPopupMode() ) if (m_pNaviPopup->IsInPopupMode())
static_cast<SwScrollNaviPopup*>(GetParent())->EndPopupMode( FLOATWIN_POPUPMODEEND_CLOSEALL ); m_pNaviPopup->EndPopupMode(FLOATWIN_POPUPMODEEND_CLOSEALL);
} }
void SwScrollNaviToolBox::RequestHelp( const HelpEvent& rHEvt ) void SwScrollNaviToolBox::RequestHelp( const HelpEvent& rHEvt )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment