diff options
author | Oliver-Rainer Wittmann <orw@apache.org> | 2014-05-19 11:37:11 +0000 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2014-06-02 19:01:54 +0200 |
commit | d9a0a6429cde62f2c5845b6e6c75ec357b103669 (patch) | |
tree | 47f1bc10408fbfcf1317b7f168e95dca8e9155de /xmloff | |
parent | a757108ddeac0c5c2ac5606fddafe346f041c579 (diff) |
various situations where graphic go missing on save
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
(cherry picked from commit 192abfb36b8a4859879fcb49326d59ed62083c8d)
Conflicts:
sw/inc/ndgrf.hxx
Change-Id: I9d4a02af2561467fe1a66f036b55d6dcf2429986
Resolves: #i124946# only apply new embedded stream name...
for a graphic, if is already has one.
- needed correction for the fix made for issue #i114361#
(cherry picked from commit 23a4bd91ceb89e5e0a2413f80fc987db106a0bc9)
Conflicts:
sw/inc/ndgrf.hxx
sw/source/core/graphic/ndgrf.cxx
sw/source/filter/xml/xmltexte.cxx
(cherry picked from commit 05e07167e422caf58d23ff883edda30acc3ba88d)
Conflicts:
sw/inc/ndgrf.hxx
sw/source/core/graphic/ndgrf.cxx
Change-Id: Ia9771932ae5b380ccae9b0a3cbb79d41f5d9bdb8
Resolves: #i124966# keep picture format information
- <GfxLink> instance - also for the reading of preview picture data
in order to avoid trouble on save in case that the preview data equals the
picture data
(cherry picked from commit d6af1b601bb8fe2569d17e01505f67e1becc9366)
Conflicts:
svx/source/svdraw/svdograf.cxx
(cherry picked from commit 597ae8dd9c28ee370874b219d594fa1c105f2c72)
Conflicts:
svx/source/svdraw/svdograf.cxx
Change-Id: Ifecb07b4d5d33d593502fccd6f21644893027d2d
Reviewed-on: https://gerrit.libreoffice.org/9456
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'xmloff')
-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 da5057c289d3..bddf0ac81fc4 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -2257,7 +2257,6 @@ void XMLShapeExport::ImpExportGraphicObjectShape( if( !bIsEmptyPresObj ) { OUString aStreamURL; - OUString aStr; xPropSet->getPropertyValue("GraphicStreamURL") >>= aStreamURL; xPropSet->getPropertyValue("GraphicURL") >>= sImageURL; @@ -2265,7 +2264,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() ) ); @@ -2282,16 +2281,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; |