From 3e146690d527d1c736685640e9f11172c7d087ba Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 4 Jan 2012 16:45:34 +0000 Subject: Resolves: fdo#43867 collection of problems causing loss of ole2 previews a) factor out part of SvXMLEmbeddedObjectHelper::ImplGetStorageNames as splitObjectURL to reuse in SvXMLGraphicHelper::ImplGetStreamNames to get better url splitting logic to handle "./ObjectReplacements/foo" b) FN_UNO_REPLACEMENT_GRAPHIC_URL and FN_UNO_GRAPHIC ids collide urls incorrectly treated as graphics c) imported preview images for objects set on a temporary svt::EmbeddedObjectRef *copy* of the object, not the real object. (cherry picked from commit ef17be8b006737c078a59635ae334a03301727ea) Signed-off-by: Michael Stahl Conflicts: svx/source/xml/xmlgrhlp.cxx --- sw/source/core/unocore/unoframe.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index 2091ac628f0f..141dabfbe537 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -1211,10 +1211,10 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno:: if ( pOleNode ) { - svt::EmbeddedObjectRef xObj = pOleNode->GetOLEObj().GetObject(); + svt::EmbeddedObjectRef &rObj = pOleNode->GetOLEObj().GetObject(); ::rtl::OUString aMediaType; - xObj.SetGraphic( aGraphic, aMediaType ); + rObj.SetGraphic( aGraphic, aMediaType ); } } } -- cgit v1.2.3