Kaydet (Commit) 0f3a3c38 authored tarafından Ras-al-Ghul's avatar Ras-al-Ghul Kaydeden (comit) Michael Meeks

tdf#96888 Kill internal vcl dog-tags ..

Made pBorderWin a VclPtr

Change-Id: I1869371b410276df2e7504b32617c2d1e2b6725f
Reviewed-on: https://gerrit.libreoffice.org/21281Reviewed-by: 's avatarMichael Meeks <michael.meeks@collabora.com>
Tested-by: 's avatarMichael Meeks <michael.meeks@collabora.com>
üst ba539fa9
...@@ -432,15 +432,13 @@ void ToolBox::Highlight() ...@@ -432,15 +432,13 @@ void ToolBox::Highlight()
void ToolBox::Select() void ToolBox::Select()
{ {
ImplDelData aDelData; VclPtr<vcl::Window> xWindow = this;
ImplAddDel( &aDelData );
CallEventListeners( VCLEVENT_TOOLBOX_SELECT ); CallEventListeners( VCLEVENT_TOOLBOX_SELECT );
maSelectHdl.Call( this ); maSelectHdl.Call( this );
if ( aDelData.IsDead() ) if ( xWindow->IsDisposed() )
return; return;
ImplRemoveDel( &aDelData );
// TODO: GetFloatingWindow in DockingWindow is currently inline, change it to check dockingwrapper // TODO: GetFloatingWindow in DockingWindow is currently inline, change it to check dockingwrapper
ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this ); ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this );
...@@ -1892,22 +1890,19 @@ void ToolBox::ImplExecuteCustomMenu() ...@@ -1892,22 +1890,19 @@ void ToolBox::ImplExecuteCustomMenu()
GetMenu()->GetMenuFlags() | MenuFlags::AlwaysShowDisabledEntries ); GetMenu()->GetMenuFlags() | MenuFlags::AlwaysShowDisabledEntries );
// toolbox might be destroyed during execute // toolbox might be destroyed during execute
ImplDelData aDelData;
ImplAddDel( &aDelData );
ImplDelData aBorderDel;
bool bBorderDel = false; bool bBorderDel = false;
vcl::Window *pWin = this; VclPtr<vcl::Window> pWin = this;
Rectangle aMenuRect = mpData->maMenubuttonItem.maRect; Rectangle aMenuRect = mpData->maMenubuttonItem.maRect;
VclPtr<ImplBorderWindow> pBorderWin;
if( IsFloatingMode() ) if( IsFloatingMode() )
{ {
// custom menu is placed in the decoration // custom menu is placed in the decoration
ImplBorderWindow *pBorderWin = dynamic_cast<ImplBorderWindow*>( GetWindow( GetWindowType::Border ) ); pBorderWin = dynamic_cast<ImplBorderWindow*>( GetWindow( GetWindowType::Border ) );
if( pBorderWin && !pBorderWin->GetMenuRect().IsEmpty() ) if( pBorderWin && !pBorderWin->GetMenuRect().IsEmpty() )
{ {
pWin = pBorderWin; pWin = pBorderWin;
aMenuRect = pBorderWin->GetMenuRect(); aMenuRect = pBorderWin->GetMenuRect();
pWin->ImplAddDel( &aBorderDel );
bBorderDel = true; bBorderDel = true;
} }
} }
...@@ -1915,17 +1910,15 @@ void ToolBox::ImplExecuteCustomMenu() ...@@ -1915,17 +1910,15 @@ void ToolBox::ImplExecuteCustomMenu()
sal_uInt16 uId = GetMenu()->Execute( pWin, Rectangle( ImplGetPopupPosition( aMenuRect, Size() ), Size() ), sal_uInt16 uId = GetMenu()->Execute( pWin, Rectangle( ImplGetPopupPosition( aMenuRect, Size() ), Size() ),
PopupMenuFlags::ExecuteDown | PopupMenuFlags::NoMouseUpClose ); PopupMenuFlags::ExecuteDown | PopupMenuFlags::NoMouseUpClose );
if ( aDelData.IsDead() ) if ( pWin->IsDisposed() )
return; return;
ImplRemoveDel( &aDelData );
if( GetMenu() ) if( GetMenu() )
GetMenu()->RemoveEventListener( LINK( this, ToolBox, ImplCustomMenuListener ) ); GetMenu()->RemoveEventListener( LINK( this, ToolBox, ImplCustomMenuListener ) );
if( bBorderDel ) if( bBorderDel )
{ {
if( aBorderDel.IsDead() ) if( pBorderWin->IsDisposed() )
return; return;
pWin->ImplRemoveDel( &aBorderDel );
} }
pWin->Invalidate( aMenuRect ); pWin->Invalidate( aMenuRect );
......
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