From 42b970560809ea1828987031cd01f797976b5373 Mon Sep 17 00:00:00 2001 From: Kurt Zenker Date: Mon, 4 Oct 2004 17:11:16 +0000 Subject: INTEGRATION: CWS mav09 (1.31.28); FILE MERGED 2004/09/16 17:45:49 mav 1.31.28.5: RESYNC: (1.33-1.37); FILE MERGED 2004/08/27 08:42:12 mav 1.31.28.4: #i27773# linkage support related fix 2004/08/09 18:17:47 mav 1.31.28.3: RESYNC: (1.32-1.33); FILE MERGED 2004/07/08 07:24:32 mav 1.31.28.2: RESYNC: (1.31-1.32); FILE MERGED 2004/06/30 14:38:45 mav 1.31.28.1: #i27773# storing of links in draw impress and calc --- xmloff/source/draw/shapeexport2.cxx | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) (limited to 'xmloff/source/draw/shapeexport2.cxx') diff --git a/xmloff/source/draw/shapeexport2.cxx b/xmloff/source/draw/shapeexport2.cxx index ec17b6d38686..4b06fb4b5ab1 100644 --- a/xmloff/source/draw/shapeexport2.cxx +++ b/xmloff/source/draw/shapeexport2.cxx @@ -2,9 +2,9 @@ * * $RCSfile: shapeexport2.cxx,v $ * - * $Revision: 1.37 $ + * $Revision: 1.38 $ * - * last change: $Author: rt $ $Date: 2004-09-08 14:58:05 $ + * last change: $Author: kz $ $Date: 2004-10-04 18:11:16 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1507,11 +1507,21 @@ void XMLShapeExport::ImpExportOLE2Shape( { OUString sPersistName; - xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM( "PersistName" ) ) ) >>= sPersistName; - if( sPersistName.getLength() ) + if ( bInternal ) { - sURL = OUString( RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.EmbeddedObject:" ) ); - sURL += sPersistName; + // OOo internal links have no storage persistance, URL is stored in the XML file + // the result LinkURL is empty in case the object is not a link + xPropSet->getPropertyValue( OUString::createFromAscii( "LinkURL" ) ) >>= sURL; + } + + if ( !sURL.getLength() ) + { + xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM( "PersistName" ) ) ) >>= sPersistName; + if( sPersistName.getLength() ) + { + sURL = OUString( RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.EmbeddedObject:" ) ); + sURL += sPersistName; + } } if( !bInternal ) @@ -1527,7 +1537,9 @@ void XMLShapeExport::ImpExportOLE2Shape( // #96717# in theorie, if we don't have a url we shouldn't even // export this ole shape. But practical its to risky right now // to change this so we better dispose this on load - sURL = rExport.AddEmbeddedObject( sURL ); + ::rtl::OUString aResolvedURL = rExport.AddEmbeddedObject( sURL ); + if ( aResolvedURL.getLength() ) + sURL = aResolvedURL; rExport.AddAttribute(XML_NAMESPACE_XLINK, XML_HREF, sURL ); rExport.AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE ); -- cgit v1.2.3