diff options
-rw-r--r-- | comphelper/source/container/embeddedobjectcontainer.cxx | 3 | ||||
-rw-r--r-- | sw/source/core/ole/ndole.cxx | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/comphelper/source/container/embeddedobjectcontainer.cxx b/comphelper/source/container/embeddedobjectcontainer.cxx index 21a2f9dd11c1..b813b96be0dd 100644 --- a/comphelper/source/container/embeddedobjectcontainer.cxx +++ b/comphelper/source/container/embeddedobjectcontainer.cxx @@ -696,7 +696,8 @@ uno::Reference < embed::XEmbeddedObject > EmbeddedObjectContainer::CopyAndGetEmb // objects without persistence are not really stored by the method if (xObj.is() && StoreEmbeddedObject(xObj, rName, true, rSrcShellID, rDestShellID)) { - xResult = Get_Impl( rName, xObj); + assert(!rDestShellID.isEmpty() && !rDestShellID.startsWith("0x")); // assume that every shell has a base URL + xResult = Get_Impl(rName, xObj, &rDestShellID); if ( !xResult.is() ) { // this is a case when object has no real persistence diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx index 8facbeec776b..6089e69ac6ad 100644 --- a/sw/source/core/ole/ndole.cxx +++ b/sw/source/core/ole/ndole.cxx @@ -439,8 +439,8 @@ SwContentNode* SwOLENode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const pSrc->GetEmbeddedObjectContainer(), pSrc->GetEmbeddedObjectContainer().GetEmbeddedObject( aOLEObj.aName ), aNewName, - OUString(), - OUString()); + SfxObjectShell::CreateShellID(pSrc), + SfxObjectShell::CreateShellID(pPersistShell)); SwOLENode* pOLENd = pDoc->GetNodes().MakeOLENode( rIdx, aNewName, GetAspect(), pDoc->GetDfltGrfFormatColl(), |