summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--svx/source/svdraw/svdxcgv.cxx15
1 files changed, 14 insertions, 1 deletions
diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx
index 1c5664a2602e..4ba25a6c1265 100644
--- a/svx/source/svdraw/svdxcgv.cxx
+++ b/svx/source/svdraw/svdxcgv.cxx
@@ -734,7 +734,20 @@ std::unique_ptr<SdrModel> SdrExchangeView::CreateMarkedObjModel() const
if(nullptr == pNewObj)
{
- // not cloned yet, use default way
+ // not cloned yet
+ if (pObj->GetObjIdentifier() == OBJ_OLE2)
+ {
+ // tdf#125520 - temp SdrModel will need a comphelper::IEmbeddedHelper
+ // to succesfully clone the OLE content, use the one from source model
+ // in the temporary SdrModel - it gets not deleted in SdrModel destructor.
+ // As long as the temporary SdrModel is used temprary (and does NOT get
+ // extended to a full document) this *should* work. There stay some
+ // concerns about what may happen in BG and if saved/loaded from clipboard,
+ // so this *might* need to be enhanced in the future.
+ pNewModel->SetPersist(mpModel->GetPersist());
+ }
+
+ // use default way
pNewObj = pObj->CloneSdrObject(*pNewModel);
}