summaryrefslogtreecommitdiff
path: root/xmloff/source/draw/shapeexport2.cxx
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2004-10-04 17:11:16 +0000
committerKurt Zenker <kz@openoffice.org>2004-10-04 17:11:16 +0000
commit42b970560809ea1828987031cd01f797976b5373 (patch)
treedd795380f394db0d41f94cf5c020e6770b6a8c33 /xmloff/source/draw/shapeexport2.cxx
parent34bef5a78eb0f3b3f888f590f61de62a8325da1b (diff)
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
Diffstat (limited to 'xmloff/source/draw/shapeexport2.cxx')
-rw-r--r--xmloff/source/draw/shapeexport2.cxx26
1 files changed, 19 insertions, 7 deletions
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 );