summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorsten Behrens <tbehrens@novell.com>2011-10-25 20:54:01 +0200
committerThorsten Behrens <tbehrens@suse.com>2011-10-26 23:10:28 +0200
commit1a6c6a66b72ca64641cb16b3c49c40aba06602f1 (patch)
tree32cabc6797711e6d32b65a9ef37ead02dd5dc3aa
parent97513a3e07fee5b85a2256457d696a1825af2011 (diff)
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 <nopower@suse.com>
-rwxr-xr-x[-rw-r--r--]sw/source/core/graphic/ndgrf.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx
index 0a11a93b01..62a9a4b322 100644..100755
--- 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;
}
// <--