diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-06-05 10:36:32 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-06-05 13:21:15 +0100 |
commit | 627b4a4a5a015bc12da61c5f106bc942154f7d12 (patch) | |
tree | a674cd0704cc3e9b211b4f52af242d8a17dc0951 | |
parent | ab67914eac41cc72bfae7c99b1a80d0f6b5d1b96 (diff) |
Resolves: tdf#91864 unset a dying childwindow as the active window
Change-Id: Ief014895facbc092913b3069ed04cace1e233ff0
(cherry picked from commit 8f99f936326342566067c849fbf27867825b81cf)
-rw-r--r-- | sfx2/source/appl/childwin.cxx | 7 | ||||
-rw-r--r-- | sfx2/source/inc/workwin.hxx | 1 |
2 files changed, 7 insertions, 1 deletions
diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx index a735b7297d29..0b41d4301985 100644 --- a/sfx2/source/appl/childwin.cxx +++ b/sfx2/source/appl/childwin.cxx @@ -177,7 +177,12 @@ void SfxChildWindow::Destroy() { if ( GetFrame().is() ) { - pImp->pWorkWin = NULL; + if (pImp->pWorkWin) + { + if (pImp->pWorkWin->GetActiveChild_Impl() == pWindow) + pImp->pWorkWin->SetActiveChild_Impl(NULL); + pImp->pWorkWin = NULL; + } try { ::com::sun::star::uno::Reference < ::com::sun::star::util::XCloseable > xClose( GetFrame(), ::com::sun::star::uno::UNO_QUERY ); diff --git a/sfx2/source/inc/workwin.hxx b/sfx2/source/inc/workwin.hxx index 7233fe676838..9574b67b5147 100644 --- a/sfx2/source/inc/workwin.hxx +++ b/sfx2/source/inc/workwin.hxx @@ -322,6 +322,7 @@ public: bool IsVisible_Impl( sal_uInt16 nMode ) const; bool IsFloating( sal_uInt16 nId ); void SetActiveChild_Impl( vcl::Window *pChild ); + VclPtr<vcl::Window> GetActiveChild_Impl() const { return pActiveChild; } bool ActivateNextChild_Impl( bool bForward = true ); bool AllowChildWindowCreation_Impl( const SfxChildWin_Impl& i_rCW ) const; |