sw/source/core/graphic/ndgrf.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
New commits: commit 5180b2d840093ec67ca356e3f0fb803d9278f7ae Author: Thorsten Behrens <tbehr...@novell.com> Date: Tue Oct 25 20:54:01 2011 +0200 Fix fdo#41995 fallout - recognize .svg in odt container Seems the graphic load code is stupid and not using the path name / file extension to guess file type, but only "magic byte" detection. Giving filter framework the path now, so that .svg actually loads. This parrots 050350f326629c6edffcdb2cf288893027f264e6, but for Writer, which sadly sports its own Graphic implementation. Signed-off-by: Noel Power <nopo...@suse.com> Signed-off-by: Fridrich Strba <fridrich.st...@graduateinstitute.ch> Signed-off-by: Michael Stahl <mst...@redhat.com> diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx index 0a11a93..62a9a4b 100644 --- a/sw/source/core/graphic/ndgrf.cxx +++ b/sw/source/core/graphic/ndgrf.cxx @@ -394,12 +394,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; } @@ -893,7 +892,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; } // <-- _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits