diff options
author | Oliver-Rainer Wittmann <orw@apache.org> | 2014-05-19 11:37:11 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-05-23 20:38:13 +0100 |
commit | 192abfb36b8a4859879fcb49326d59ed62083c8d (patch) | |
tree | 2381f9d2d8b66750bbca679f41e778e9a916260f /xmloff/source | |
parent | e0eb5fa849c5680031f809a1440a35cbd6b58e93 (diff) |
Resolves: #i114361# provide and accept changed URL...
of embedded graphic file during save (ODF export)
(cherry picked from commit a90c007908eb3f66e28a9ea525729065db652b6f)
Conflicts:
sw/inc/ndgrf.hxx
sw/source/core/graphic/ndgrf.cxx
sw/source/core/unocore/unoframe.cxx
sw/source/filter/xml/xmltexte.cxx
xmloff/source/draw/shapeexport2.cxx
Change-Id: I9d4a02af2561467fe1a66f036b55d6dcf2429986
Diffstat (limited to 'xmloff/source')
-rw-r--r-- | xmloff/source/draw/shapeexport.cxx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index 9a1723bc183a..66577bac9594 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -2247,7 +2247,6 @@ void XMLShapeExport::ImpExportGraphicObjectShape( if( !bIsEmptyPresObj ) { OUString aStreamURL; - OUString aStr; xPropSet->getPropertyValue("GraphicStreamURL") >>= aStreamURL; xPropSet->getPropertyValue("GraphicURL") >>= sImageURL; @@ -2255,7 +2254,7 @@ void XMLShapeExport::ImpExportGraphicObjectShape( OUString aResolveURL( sImageURL ); const OUString sPackageURL( "vnd.sun.star.Package:" ); - // sj: trying to preserve the filename + // trying to preserve the filename if ( aStreamURL.match( sPackageURL, 0 ) ) { OUString sRequestedName( aStreamURL.copy( sPackageURL.getLength(), aStreamURL.getLength() - sPackageURL.getLength() ) ); @@ -2272,16 +2271,20 @@ void XMLShapeExport::ImpExportGraphicObjectShape( } } - aStr = mrExport.AddEmbeddedGraphicObject( aResolveURL ); + const OUString aStr = mrExport.AddEmbeddedGraphicObject( aResolveURL ); mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_HREF, aStr ); if( !aStr.isEmpty() ) { + aStreamURL = sPackageURL; if( aStr[ 0 ] == '#' ) { - aStreamURL = sPackageURL; aStreamURL = aStreamURL.concat( aStr.copy( 1, aStr.getLength() - 1 ) ); } + else + { + aStreamURL = aStreamURL.concat( aStr ); + } // update stream URL for load on demand uno::Any aAny; |