diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-07-10 12:11:20 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-07-10 14:13:56 -0400 |
commit | a111f9c49296edc31b5cc82889576e114537e283 (patch) | |
tree | e9ea6dd8b69486098608e1e44faf0f4e41207c00 /svx | |
parent | e3bd5018dcf76694841131471d9e87e414487564 (diff) |
Clean this up.
Change-Id: If44715c7d88f7494cbb61a7c1b696c0494426c59
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/svdraw/svdoole2.cxx | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx index 889f3ed19ae2..51c9a473be62 100644 --- a/svx/source/svdraw/svdoole2.cxx +++ b/svx/source/svdraw/svdoole2.cxx @@ -1990,22 +1990,11 @@ bool SdrOle2Obj::Unload( const uno::Reference< embed::XEmbeddedObject >& xObj, s bool SdrOle2Obj::Unload() { - bool bUnloaded = false; - - if( xObjRef.is() ) - { - //TODO/LATER: no refcounting tricks anymore! - //"customers" must register as state change listeners - // Not necessary in Doc DTor (MM) - //sal_uIntPtr nRefCount = (*ppObjRef)->GetRefCount(); - // prevent Unload if there are external references - //if( nRefCount > 2 ) - // return false; - //DBG_ASSERT( nRefCount == 2, "Wrong RefCount for unload" ); - } - else - bUnloaded = true; + if (!xObjRef.is()) + // Already unloaded. + return true; + bool bUnloaded = false; if ( pModel && xObjRef.is() ) { bUnloaded = Unload( xObjRef.GetObject(), GetAspect() ); |