From 7db7e040d6cfbdc4ebc5f9828e53d614cb0077c3 Mon Sep 17 00:00:00 2001 From: Oliver Bolte Date: Tue, 15 Mar 2005 10:19:24 +0000 Subject: INTEGRATION: CWS mav17 (1.100.20); FILE MERGED 2005/03/02 16:15:38 mav 1.100.20.2: RESYNC: (1.100-1.102); FILE MERGED 2005/02/18 16:54:17 mav 1.100.20.1: #i39893# relative URLs for embedded links --- xmloff/source/draw/ximpshap.cxx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'xmloff/source/draw/ximpshap.cxx') diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx index d31f6c47c46c..fa608e271f23 100644 --- a/xmloff/source/draw/ximpshap.cxx +++ b/xmloff/source/draw/ximpshap.cxx @@ -2,9 +2,9 @@ * * $RCSfile: ximpshap.cxx,v $ * - * $Revision: 1.102 $ + * $Revision: 1.103 $ * - * last change: $Author: vg $ $Date: 2005-02-25 09:23:23 $ + * last change: $Author: obo $ $Date: 2005-03-15 11:19:24 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -2581,19 +2581,21 @@ void SdXMLObjectShapeContext::StartElement( const ::com::sun::star::uno::Referen { OUString aPersistName = GetImport().ResolveEmbeddedObjectURL( maHref, maCLSID ); - if ( aPersistName.getLength() ) + if ( GetImport().IsPackageURL( maHref ) ) { const OUString sURL(RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.EmbeddedObject:" )); - uno::Any aAny; - aAny <<= ( aPersistName = aPersistName.copy( sURL.getLength() ) ); - xProps->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "PersistName" ) ), aAny ); + if ( aPersistName.compareTo( sURL, sURL.getLength() ) == 0 ) + aPersistName = aPersistName.copy( sURL.getLength() ); + + xProps->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "PersistName" ) ), + uno::makeAny( aPersistName ) ); } else { // this is OOo link object xProps->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "LinkURL" ) ), - uno::makeAny( maHref ) ); + uno::makeAny( aPersistName ) ); } } } -- cgit