diff options
author | Mathias Bauer <mba@openoffice.org> | 2001-08-20 09:04:30 +0000 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2001-08-20 09:04:30 +0000 |
commit | 419e6a08a930c5bd1ee074e43ba221c7e1c2d6a1 (patch) | |
tree | 3ee0ce6e1a2ec041f4d1aed0e725c556b6e3400c | |
parent | 36a3c3bce9ca4100b31856c865746c6c897320d9 (diff) |
#90669#: Activate ViewFrame if hidden frame is made visible
-rw-r--r-- | sfx2/source/view/viewfrm.cxx | 44 |
1 files changed, 20 insertions, 24 deletions
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index c3a7ed0e8b21..25aa628b7e11 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -2,9 +2,9 @@ * * $RCSfile: viewfrm.cxx,v $ * - * $Revision: 1.31 $ + * $Revision: 1.32 $ * - * last change: $Author: mba $ $Date: 2001-08-16 15:52:37 $ + * last change: $Author: mba $ $Date: 2001-08-20 10:04:30 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -2293,6 +2293,9 @@ void SfxViewFrame::Show() // hat oder wenn er keine Component enth"alt if ( &GetWindow() == &GetFrame()->GetWindow() || !GetFrame()->HasComponent() ) GetWindow().Show(); + + if ( GetFrame()->GetFrameInterface()->isActive() && SfxViewFrame::Current() != this && !GetActiveChildFrame_Impl() ) + MakeActive_Impl( FALSE ); } //-------------------------------------------------------------------- @@ -2662,23 +2665,20 @@ sal_Bool SfxViewFrame::SwitchToViewShell_Impl GetDispatcher()->SetDisableFlags( 0 ); SetViewShell_Impl(pSh); -// if( !pSh->pImp->bControllerSet ) - { - Reference < ::com::sun::star::awt::XWindow > xWindow( - GetFrame()->GetWindow().GetComponentInterface(), UNO_QUERY ); - Reference < XFrame > xFrame( GetFrame()->GetFrameInterface() ); - if ( !pSh->GetController().is() ) - pSh->SetController( new SfxBaseController( pSh ) ); - Reference < XController > xController( pSh->GetController() ); - xFrame->setComponent( xWindow, xController ); - xController->attachFrame( xFrame ); - Reference < XModel > xModel( GetObjectShell()->GetModel() ); - if ( xModel.is() ) - { - xController->attachModel( xModel ); - xModel->connectController( xController ); - xModel->setCurrentController( xController ); - } + Reference < ::com::sun::star::awt::XWindow > xWindow( + GetFrame()->GetWindow().GetComponentInterface(), UNO_QUERY ); + Reference < XFrame > xFrame( GetFrame()->GetFrameInterface() ); + if ( !pSh->GetController().is() ) + pSh->SetController( new SfxBaseController( pSh ) ); + Reference < XController > xController( pSh->GetController() ); + xFrame->setComponent( xWindow, xController ); + xController->attachFrame( xFrame ); + Reference < XModel > xModel( GetObjectShell()->GetModel() ); + if ( xModel.is() ) + { + xController->attachModel( xModel ); + xModel->connectController( xController ); + xModel->setCurrentController( xController ); } GetDispatcher()->Push( *pSh ); @@ -2710,11 +2710,7 @@ sal_Bool SfxViewFrame::SwitchToViewShell_Impl if ( pEditWin && pSh->IsShowView_Impl() ) { - SfxFrameSetViewShell *pFrSh = PTR_CAST( SfxFrameSetViewShell, pSh ); - if ( pFrSh ) - pFrSh->GetSplitWindow()->Show(); - else - pEditWin->Show(); + pEditWin->Show(); if ( bHasFocus ) GetFrame()->GrabFocusOnComponent_Impl(); } |