From e4cea049c80f4fd6d2a586e73fe9fa08ebd08371 Mon Sep 17 00:00:00 2001 From: Andrés Maldonado Date: Fri, 24 May 2019 17:59:13 +0200 Subject: tdf#125520 Fix OLE objects drag&drop with 'Insert as Copy' Change-Id: Ia4e6038c95d1388bdf7f9984b7cf4a69aead87a1 Reviewed-on: https://gerrit.libreoffice.org/73026 Tested-by: Jenkins Reviewed-by: Thorsten Behrens --- svx/source/svdraw/svdxcgv.cxx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'svx') diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx index 31d4cf2163f0..a65d38c8738d 100644 --- a/svx/source/svdraw/svdxcgv.cxx +++ b/svx/source/svdraw/svdxcgv.cxx @@ -743,8 +743,17 @@ std::unique_ptr SdrExchangeView::CreateMarkedObjModel() const if(nullptr == pNewObj) { - // not cloned yet, use default way - pNewObj = pObj->CloneSdrObject(*pNewModel); + // not cloned yet + if (pObj->GetObjIdentifier() == OBJ_OLE2) + { + // tdf#125520 + pNewObj = pObj->CloneSdrObject(pObj->getSdrModelFromSdrObject()); + } + else + { + // use default way + pNewObj = pObj->CloneSdrObject(*pNewModel); + } } if(pNewObj) -- cgit