diff options
author | Kai Ahrens <ka@openoffice.org> | 2001-09-13 10:41:52 +0000 |
---|---|---|
committer | Kai Ahrens <ka@openoffice.org> | 2001-09-13 10:41:52 +0000 |
commit | 989252c113639a8053b738fa589dff91b62d4d05 (patch) | |
tree | 9537d35ed425da0ae5f9cf697cf9b8dafbbf26ab /xmloff | |
parent | 8f7fa89a23979aaf553edb300d1abed6af1d5235 (diff) |
#90020#: use persist name of OLE objects
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/draw/ximpshap.cxx | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx index 0a94fbeffdca..19bc45313f97 100644 --- a/xmloff/source/draw/ximpshap.cxx +++ b/xmloff/source/draw/ximpshap.cxx @@ -2,9 +2,9 @@ * * $RCSfile: ximpshap.cxx,v $ * - * $Revision: 1.62 $ + * $Revision: 1.63 $ * - * last change: $Author: mib $ $Date: 2001-09-07 06:06:55 $ + * last change: $Author: ka $ $Date: 2001-09-13 11:41:52 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -2336,13 +2336,16 @@ void SdXMLObjectShapeContext::StartElement( const ::com::sun::star::uno::Referen if( !mbIsPlaceholder && maHref.getLength() ) { - uno::Reference< container::XNamed > xNamed( mxShape, uno::UNO_QUERY ); - if( xNamed.is() ) + uno::Reference< beans::XPropertySet > xProps( mxShape, uno::UNO_QUERY ); + + if( xProps.is() ) { - OUString aName( GetImport().ResolveEmbeddedObjectURL( maHref, maCLSID ) ); - const OUString sURL(RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.EmbeddedObject:" )); - aName = aName.copy( sURL.getLength() ); - xNamed->setName( aName ); + uno::Any aAny; + OUString aPersistName( GetImport().ResolveEmbeddedObjectURL( maHref, maCLSID ) ); + const OUString sURL(RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.EmbeddedObject:" )); + + aAny <<= ( aPersistName = aPersistName.copy( sURL.getLength() ) ); + xProps->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "PersistName" ) ), aAny ); } } |