summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2002-10-24 12:06:11 +0000
committerMathias Bauer <mba@openoffice.org>2002-10-24 12:06:11 +0000
commit9e02869956a1b5da942fbfed6fbc239f33dfa4a2 (patch)
treebb4ac219ba63de53605f0e544023ab0dff414d4c /sfx2
parent845292b99bfeaeedb7679f7f53467c3d6a55f691 (diff)
#88560#: Controller is close listener
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/view/sfxbasecontroller.cxx15
1 files changed, 10 insertions, 5 deletions
diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx
index 76a569840d42..c172cd939112 100644
--- a/sfx2/source/view/sfxbasecontroller.cxx
+++ b/sfx2/source/view/sfxbasecontroller.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: sfxbasecontroller.cxx,v $
*
- * $Revision: 1.36 $
+ * $Revision: 1.37 $
*
- * last change: $Author: mba $ $Date: 2002-10-24 12:47:59 $
+ * last change: $Author: mba $ $Date: 2002-10-24 13:06:11 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -678,7 +678,8 @@ sal_Bool SAL_CALL SfxBaseController::suspend( sal_Bool bSuspend ) throw( ::com::
::vos::OGuard aGuard( Application::GetSolarMutex() );
if ( m_pData->m_pViewShell->PrepareClose() )
{
- getFrame()->removeFrameActionListener( m_pData->m_xListener ) ;
+ if ( getFrame().is() )
+ getFrame()->removeFrameActionListener( m_pData->m_xListener ) ;
SfxViewFrame* pActFrame = m_pData->m_pViewShell->GetFrame() ;
// weitere View auf dasselbe Doc?
@@ -700,7 +701,8 @@ sal_Bool SAL_CALL SfxBaseController::suspend( sal_Bool bSuspend ) throw( ::com::
}
else
{
- getFrame()->addFrameActionListener( m_pData->m_xListener ) ;
+ if ( getFrame().is() )
+ getFrame()->addFrameActionListener( m_pData->m_xListener ) ;
return sal_True ;
}
}
@@ -868,7 +870,7 @@ void SAL_CALL SfxBaseController::dispose() throw( ::com::sun::star::uno::Runtime
aObject.Source = (XCONTROLLER*)this ;
m_pData->m_aListenerContainer.disposeAndClear( aObject ) ;
- if ( m_pData->m_pController )
+ if ( m_pData->m_pController && m_pData->m_pController->getFrame().is() )
m_pData->m_pController->getFrame()->removeFrameActionListener( m_pData->m_xListener ) ;
if ( m_pData->m_pViewShell )
@@ -944,6 +946,9 @@ void SfxBaseController::ReleaseShell_Impl()
if ( xModel.is() )
xModel->disconnectController( this );
m_pData->m_pViewShell = 0;
+
+ REFERENCE < XFRAME > aXFrame;
+ attachFrame( aXFrame );
}
}