tdf#95551 - fix image map crash.
Remove listener we add, and don't crash on callback for disposed dialog. Change-Id: Ia6a1bddd212cb28a0331469e8e87324346d02841
This commit is contained in:
@@ -182,7 +182,7 @@ SvxIMapDlg::SvxIMapDlg(SfxBindings *_pBindings, SfxChildWindow *pCW, vcl::Window
|
|||||||
m_pEdtText->SetModifyHdl( LINK( this, SvxIMapDlg, URLModifyHdl ) );
|
m_pEdtText->SetModifyHdl( LINK( this, SvxIMapDlg, URLModifyHdl ) );
|
||||||
m_pCbbTarget->SetLoseFocusHdl( LINK( this, SvxIMapDlg, URLLoseFocusHdl ) );
|
m_pCbbTarget->SetLoseFocusHdl( LINK( this, SvxIMapDlg, URLLoseFocusHdl ) );
|
||||||
|
|
||||||
SvtMiscOptions aMiscOptions;
|
SvtMiscOptions aMiscOptions;
|
||||||
aMiscOptions.AddListenerLink( LINK( this, SvxIMapDlg, MiscHdl ) );
|
aMiscOptions.AddListenerLink( LINK( this, SvxIMapDlg, MiscHdl ) );
|
||||||
|
|
||||||
m_pTbxIMapDlg1->SetSelectHdl( LINK( this, SvxIMapDlg, TbxClickHdl ) );
|
m_pTbxIMapDlg1->SetSelectHdl( LINK( this, SvxIMapDlg, TbxClickHdl ) );
|
||||||
@@ -220,6 +220,9 @@ void SvxIMapDlg::dispose()
|
|||||||
{
|
{
|
||||||
pIMapWnd->SetUpdateLink( Link<GraphCtrl*,void>() );
|
pIMapWnd->SetUpdateLink( Link<GraphCtrl*,void>() );
|
||||||
|
|
||||||
|
SvtMiscOptions aMiscOptions;
|
||||||
|
aMiscOptions.RemoveListenerLink( LINK( this, SvxIMapDlg, MiscHdl ) );
|
||||||
|
|
||||||
// Delete URL-List
|
// Delete URL-List
|
||||||
pIMapWnd.disposeAndClear();
|
pIMapWnd.disposeAndClear();
|
||||||
DELETEZ( pOwnData );
|
DELETEZ( pOwnData );
|
||||||
@@ -805,8 +808,11 @@ IMPL_LINK_TYPED( SvxIMapDlg, StateHdl, GraphCtrl*, pWnd, void )
|
|||||||
|
|
||||||
IMPL_LINK_NOARG_TYPED(SvxIMapDlg, MiscHdl, LinkParamNone*, void)
|
IMPL_LINK_NOARG_TYPED(SvxIMapDlg, MiscHdl, LinkParamNone*, void)
|
||||||
{
|
{
|
||||||
SvtMiscOptions aMiscOptions;
|
if (m_pTbxIMapDlg1)
|
||||||
m_pTbxIMapDlg1->SetOutStyle( aMiscOptions.GetToolboxStyle() );
|
{
|
||||||
|
SvtMiscOptions aMiscOptions;
|
||||||
|
m_pTbxIMapDlg1->SetOutStyle( aMiscOptions.GetToolboxStyle() );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SvxIMapDlg* GetIMapDlg()
|
SvxIMapDlg* GetIMapDlg()
|
||||||
|
Reference in New Issue
Block a user