diff options
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/svdraw/svdxcgv.cxx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx index 8fcd742ec71f..88083f3e93e0 100644 --- a/svx/source/svdraw/svdxcgv.cxx +++ b/svx/source/svdraw/svdxcgv.cxx @@ -57,6 +57,7 @@ #include <svx/sdr/contact/objectcontactofobjlistpainter.hxx> #include <svx/sdr/contact/displayinfo.hxx> #include <svx/svdotable.hxx> +#include <sal/log.hxx> using namespace com::sun::star; @@ -744,7 +745,16 @@ std::unique_ptr<SdrModel> SdrExchangeView::CreateMarkedObjModel() const if(nullptr == pNewObj) { - // not cloned yet, use default way + // not cloned yet + if(pObj->GetObjIdentifier() == OBJ_OLE2 && nullptr == mpModel->GetPersist()) + { + // tdf#125520 - former fix was wrong, the SdrModel + // has to have a GetPersist() already, see task. + // We can still warn here when this is not the case + SAL_WARN( "svx", "OLE gets cloned Persist, EmbeddedObjectContainer will not be copied" ); + } + + // use default way pNewObj = pObj->CloneSdrObject(*pNewModel); } |