Hi there, it seems, though the filter is there, we don't read .svg files from the Pictures stream inside the odf zip container. Easy fix attached, could someone please review & commit to -3-4? Cheers, -- Thorsten
From abc156890a8cb64094f5d668274559203ae188b5 Mon Sep 17 00:00:00 2001 From: Thorsten Behrens <tbehrens@novell.com> Date: Fri, 21 Oct 2011 11:14:32 +0200 Subject: [PATCH] Fix fdo#41995 fallout - recognize .svg in odf 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. --- svx/source/svdraw/svdograf.cxx | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index e51a268..56d0643 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -1299,8 +1299,11 @@ IMPL_LINK( SdrGrafObj, ImpSwapHdl, GraphicObject*, pO ) mbIsPreview = sal_True; } - if( !GraphicFilter::GetGraphicFilter()->ImportGraphic( aGraphic, String(), *pStream, - GRFILTER_FORMAT_DONTKNOW, NULL, 0, pFilterData ) ) + if( !GraphicFilter::GetGraphicFilter()->ImportGraphic( aGraphic, + aStreamInfo.maUserData, + *pStream, + GRFILTER_FORMAT_DONTKNOW, + NULL, 0, pFilterData ) ) { const String aUserData( pGraphic->GetUserData() ); -- 1.7.1
Attachment:
pgpb7Nyre8Sjw.pgp
Description: PGP signature