Kaydet (Commit) 548a6894 authored tarafından Caolán McNamara's avatar Caolán McNamara

VclPtr: fix crash on loading kde86727-1.html

and all the other html crashtest loading failures
I believe

Change-Id: I38d3e1ad283efc08f468d9062e520149663e3e84
üst 023e907b
...@@ -102,6 +102,8 @@ public: ...@@ -102,6 +102,8 @@ public:
//use this to manipulate the dialog bevore executing it: //use this to manipulate the dialog bevore executing it:
void SetDialogCreatedHdl( const Link<>& rLink ) { maDialogCreatedHdl = rLink; } void SetDialogCreatedHdl( const Link<>& rLink ) { maDialogCreatedHdl = rLink; }
const Link<>& GetDialogCreatedHdl() const { return maDialogCreatedHdl; } const Link<>& GetDialogCreatedHdl() const { return maDialogCreatedHdl; }
void SetEditModifyHdl( const Link<>& rLink );
}; };
#endif #endif
......
...@@ -193,14 +193,17 @@ IMPL_LINK_NOARG(FileControl, ButtonHdl) ...@@ -193,14 +193,17 @@ IMPL_LINK_NOARG(FileControl, ButtonHdl)
return 0; return 0;
} }
void FileControl::GetFocus() void FileControl::GetFocus()
{ {
maEdit->GrabFocus(); maEdit->GrabFocus();
} }
void FileControl::SetEditModifyHdl( const Link<>& rLink )
{
if (!maEdit || maEdit->IsDisposed())
return;
maEdit->SetModifyHdl(rLink);
}
void FileControl::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) void FileControl::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags )
{ {
......
...@@ -595,11 +595,11 @@ void VCLXFileControl::SetWindow( const VclPtr< vcl::Window > &pWindow ) ...@@ -595,11 +595,11 @@ void VCLXFileControl::SetWindow( const VclPtr< vcl::Window > &pWindow )
{ {
VclPtr< FileControl > pPrevFileControl = GetAsDynamic< FileControl >(); VclPtr< FileControl > pPrevFileControl = GetAsDynamic< FileControl >();
if ( pPrevFileControl ) if ( pPrevFileControl )
pPrevFileControl->GetEdit().SetModifyHdl( Link<>() ); pPrevFileControl->SetEditModifyHdl( Link<>() );
FileControl* pNewFileControl = dynamic_cast<FileControl*>( pWindow.get() ); FileControl* pNewFileControl = dynamic_cast<FileControl*>( pWindow.get() );
if ( pNewFileControl ) if ( pNewFileControl )
pNewFileControl->GetEdit().SetModifyHdl( LINK( this, VCLXFileControl, ModifyHdl ) ); pNewFileControl->SetEditModifyHdl( LINK( this, VCLXFileControl, ModifyHdl ) );
VCLXWindow::SetWindow( pWindow ); VCLXWindow::SetWindow( pWindow );
} }
......
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