INTEGRATION: CWS mbafixesfor22 (1.26.8); FILE MERGED

2007/01/18 13:06:01 mav 1.26.8.1: #i73611# handle the error cases correctly
This commit is contained in:
Oliver Bolte 2007-01-25 10:40:04 +00:00
parent df442d05ff
commit b618458f34

View File

@ -4,9 +4,9 @@
*
* $RCSfile: docholder.cxx,v $
*
* $Revision: 1.27 $
* $Revision: 1.28 $
*
* last change: $Author: obo $ $Date: 2007-01-23 07:34:08 $
* last change: $Author: obo $ $Date: 2007-01-25 11:40:04 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@ -710,32 +710,19 @@ void DocumentHolder::DisconnectFrameDocument()
void DocumentHolder::CloseDocument()
{
try
DisconnectFrameDocument();
uno::Reference< util::XCloseable > xCloseable(
m_xDocument, uno::UNO_QUERY );
if ( xCloseable.is() )
{
uno::Reference< util::XModifyBroadcaster > xModifiable( m_xDocument, uno::UNO_QUERY_THROW );
xModifiable->removeModifyListener( (util::XModifyListener*)this );
}
catch( uno::Exception& )
{}
uno::Reference< util::XCloseBroadcaster > xBroadcaster(
m_xDocument, uno::UNO_QUERY );
if ( xBroadcaster.is() )
{
xBroadcaster->removeCloseListener( (util::XCloseListener*)this );
uno::Reference< util::XCloseable > xCloseable(
xBroadcaster, uno::UNO_QUERY );
if ( xCloseable.is() )
try
{
try
{
xCloseable->close( sal_True );
}
catch( uno::Exception& )
{}
xCloseable->close( sal_True );
}
catch( uno::Exception& )
{}
}
m_pIDispatch = NULL;
@ -745,10 +732,14 @@ void DocumentHolder::CloseDocument()
void DocumentHolder::CloseFrame()
{
uno::Reference< util::XCloseBroadcaster > xBroadcaster(
m_xFrame, uno::UNO_QUERY );
if ( xBroadcaster.is() )
try
{
uno::Reference< util::XCloseBroadcaster > xBroadcaster(
m_xFrame, uno::UNO_QUERY_THROW );
xBroadcaster->removeCloseListener( (util::XCloseListener*)this );
}
catch( uno::Exception& )
{}
uno::Reference<util::XCloseable> xCloseable(
m_xFrame,uno::UNO_QUERY);
@ -1561,10 +1552,14 @@ void SAL_CALL
DocumentHolder::notifyClosing(
const lang::EventObject& aSource )
{
uno::Reference< util::XCloseBroadcaster > xEventBroadcaster(
aSource.Source, uno::UNO_QUERY );
if ( xEventBroadcaster.is() )
try
{
uno::Reference< util::XCloseBroadcaster > xEventBroadcaster(
aSource.Source, uno::UNO_QUERY_THROW );
xEventBroadcaster->removeCloseListener( (util::XCloseListener*)this );
}
catch( uno::Exception& )
{}
if ( m_xDocument.is() && m_xDocument == aSource.Source )
{