INTEGRATION: CWS impress82 (1.91.46); FILE MERGED

2006/01/17 15:38:43 cl 1.91.46.1: #130231# do not call dispose in d'tor, call it during last release call
This commit is contained in:
Jens-Heiner Rechtien 2006-01-24 13:44:11 +00:00
parent aa092fe054
commit 0a920a6fdb

View file

@ -4,9 +4,9 @@
*
* $RCSfile: unomodel.cxx,v $
*
* $Revision: 1.92 $
* $Revision: 1.93 $
*
* last change: $Author: obo $ $Date: 2006-01-16 15:20:17 $
* last change: $Author: hr $ $Date: 2006-01-24 14:44:11 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@ -348,7 +348,6 @@ SdXImpressDocument::SdXImpressDocument( SdDrawDocument* _pDoc, sal_Bool bClipBoa
***********************************************************************/
SdXImpressDocument::~SdXImpressDocument() throw()
{
dispose();
}
// uno helper
@ -424,7 +423,26 @@ void SAL_CALL SdXImpressDocument::acquire() throw ( )
void SAL_CALL SdXImpressDocument::release() throw ( )
{
SfxBaseModel::release();
if (osl_decrementInterlockedCount( &m_refCount ) == 0)
{
// restore reference count:
osl_incrementInterlockedCount( &m_refCount );
if(!mbDisposed)
{
try
{
dispose();
}
catch (uno::RuntimeException const& exc)
{ // don't break throw ()
OSL_ENSURE(
false, OUStringToOString(
exc.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
static_cast<void>(exc);
}
}
SfxBaseModel::release();
}
}
// XTypeProvider