diff options
author | Thorsten Behrens <tbehrens@suse.com> | 2011-10-25 21:02:03 +0200 |
---|---|---|
committer | Thorsten Behrens <tbehrens@suse.com> | 2011-10-25 23:23:40 +0200 |
commit | c0913d78c258f7e49b52f45909b2cebbd9fb6103 (patch) | |
tree | 7c2a2bd67f5de927b25fdf9a6500ee4576a6dc6b /sw/source/core/graphic/ndgrf.cxx | |
parent | 494c6b5524dad78f2eeb48a3b979a11bc8413984 (diff) |
Fix fdo#41995 fallout - recognize .svg in odf containers
More code paths that needed fixing - Writer sports its own Graphic
loading implementation, so that had the need for the stream name
fwd-ing, too. The svg deep type detection was necessary for e.g. the
flat odf - which has inline svg without any filename.
Diffstat (limited to 'sw/source/core/graphic/ndgrf.cxx')
-rwxr-xr-x | sw/source/core/graphic/ndgrf.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx index b407c9b5b385..11d9555bb2d9 100755 --- a/sw/source/core/graphic/ndgrf.cxx +++ b/sw/source/core/graphic/ndgrf.cxx @@ -386,12 +386,11 @@ Size SwGrfNode::GetTwipSize() const sal_Bool SwGrfNode::ImportGraphic( SvStream& rStrm ) { Graphic aGraphic; - if( !GraphicFilter::GetGraphicFilter().ImportGraphic( aGraphic, String(), rStrm ) ) + const String aGraphicURL( aGrfObj.GetUserData() ); + if( !GraphicFilter::GetGraphicFilter().ImportGraphic( aGraphic, aGraphicURL, rStrm ) ) { - const String aUserData( aGrfObj.GetUserData() ); - aGrfObj.SetGraphic( aGraphic ); - aGrfObj.SetUserData( aUserData ); + aGrfObj.SetUserData( aGraphicURL ); return sal_True; } @@ -879,7 +878,8 @@ SwCntntNode* SwGrfNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const SvStream* pStrm = _GetStreamForEmbedGrf( refPics, aStrmName ); if ( pStrm ) { - GraphicFilter::GetGraphicFilter().ImportGraphic( aTmpGrf, String(), *pStrm ); + const String aGraphicURL( aGrfObj.GetUserData() ); + GraphicFilter::GetGraphicFilter().ImportGraphic( aTmpGrf, aGraphicURL, *pStrm ); delete pStrm; } } |