diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx index c49a2f6..012f703 100644 --- a/sw/source/core/ole/ndole.cxx +++ b/sw/source/core/ole/ndole.cxx @@ -768,6 +768,12 @@ const uno::Reference < embed::XEmbeddedObject > SwOLEObj::GetOleRef() SfxObjectShell* p = pOLENd->GetDoc()->GetPersist(); OSL_ENSURE( p, "kein SvPersist vorhanden" ); + if( !p ) + { + p = new SwDocShell( const_cast(pOLENd->GetDoc()), SFX_CREATE_MODE_INTERNAL ); + p->DoInitNew( NULL ); + } + uno::Reference < embed::XEmbeddedObject > xObj = p->GetEmbeddedObjectContainer().GetEmbeddedObject( aName ); OSL_ENSURE( !xOLERef.is(), "rekursiver Aufruf von GetOleRef() ist nicht erlaubt" );