INTEGRATION: CWS mav19 (1.16.2); FILE MERGED
2006/01/09 12:00:12 mav 1.16.2.1: #126520# avoid crash
This commit is contained in:
parent
e0301fd47c
commit
45eaae1413
1 changed files with 7 additions and 5 deletions
|
@ -4,9 +4,9 @@
|
|||
*
|
||||
* $RCSfile: embedobj.cxx,v $
|
||||
*
|
||||
* $Revision: 1.17 $
|
||||
* $Revision: 1.18 $
|
||||
*
|
||||
* last change: $Author: obo $ $Date: 2006-01-20 09:50:04 $
|
||||
* last change: $Author: kz $ $Date: 2006-02-01 19:04:41 $
|
||||
*
|
||||
* The Contents of this file are made available subject to
|
||||
* the terms of GNU Lesser General Public License Version 2.1.
|
||||
|
@ -136,14 +136,16 @@ void OCommonEmbeddedObject::Deactivate()
|
|||
//MBA if ( !xModif.is() )
|
||||
//MBA throw uno::RuntimeException();
|
||||
|
||||
if ( !m_xClientSite.is() )
|
||||
// no need to lock for the initialization
|
||||
uno::Reference< embed::XEmbeddedClient > xClientSite = m_xClientSite;
|
||||
if ( !xClientSite.is() )
|
||||
throw embed::WrongStateException(); //TODO: client site is not set!
|
||||
|
||||
// store document if it is modified
|
||||
if ( xModif.is() && xModif->isModified() )
|
||||
{
|
||||
try {
|
||||
m_xClientSite->saveObject();
|
||||
xClientSite->saveObject();
|
||||
}
|
||||
catch( embed::ObjectSaveVetoException& )
|
||||
{
|
||||
|
@ -159,7 +161,7 @@ void OCommonEmbeddedObject::Deactivate()
|
|||
|
||||
m_pDocHolder->CloseFrame();
|
||||
|
||||
m_xClientSite->visibilityChanged( sal_False );
|
||||
xClientSite->visibilityChanged( sal_False );
|
||||
}
|
||||
|
||||
//----------------------------------------------
|
||||
|
|
Loading…
Reference in a new issue