diff options
-rw-r--r-- | include/svtools/filectrl.hxx | 2 | ||||
-rw-r--r-- | svtools/source/control/filectrl.cxx | 9 | ||||
-rw-r--r-- | svtools/source/uno/unoiface.cxx | 4 |
3 files changed, 10 insertions, 5 deletions
diff --git a/include/svtools/filectrl.hxx b/include/svtools/filectrl.hxx index bc8c96a58a1a..8f6abd2591a3 100644 --- a/include/svtools/filectrl.hxx +++ b/include/svtools/filectrl.hxx @@ -102,6 +102,8 @@ public: //use this to manipulate the dialog bevore executing it: void SetDialogCreatedHdl( const Link<>& rLink ) { maDialogCreatedHdl = rLink; } const Link<>& GetDialogCreatedHdl() const { return maDialogCreatedHdl; } + + void SetEditModifyHdl( const Link<>& rLink ); }; #endif diff --git a/svtools/source/control/filectrl.cxx b/svtools/source/control/filectrl.cxx index 974edbf2f0b7..ab07a4a7b688 100644 --- a/svtools/source/control/filectrl.cxx +++ b/svtools/source/control/filectrl.cxx @@ -193,14 +193,17 @@ IMPL_LINK_NOARG(FileControl, ButtonHdl) return 0; } - - void FileControl::GetFocus() { 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 ) { diff --git a/svtools/source/uno/unoiface.cxx b/svtools/source/uno/unoiface.cxx index ac364521afd3..8b9dd52f5446 100644 --- a/svtools/source/uno/unoiface.cxx +++ b/svtools/source/uno/unoiface.cxx @@ -595,11 +595,11 @@ void VCLXFileControl::SetWindow( const VclPtr< vcl::Window > &pWindow ) { VclPtr< FileControl > pPrevFileControl = GetAsDynamic< FileControl >(); if ( pPrevFileControl ) - pPrevFileControl->GetEdit().SetModifyHdl( Link<>() ); + pPrevFileControl->SetEditModifyHdl( Link<>() ); FileControl* pNewFileControl = dynamic_cast<FileControl*>( pWindow.get() ); if ( pNewFileControl ) - pNewFileControl->GetEdit().SetModifyHdl( LINK( this, VCLXFileControl, ModifyHdl ) ); + pNewFileControl->SetEditModifyHdl( LINK( this, VCLXFileControl, ModifyHdl ) ); VCLXWindow::SetWindow( pWindow ); } |